From nobody Mon Feb 23 00:25:55 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fK1qB2zTfz6SMpr; Mon, 23 Feb 2026 00:25:58 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fK1qB1pFMz3t2l; Mon, 23 Feb 2026 00:25:58 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771806358; h=from:from:reply-to:subject:subject: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=jYDCRbGyHm2MFcxFfhyh5wk0eyJrJxYflPviNjPvEIo=; b=gPVVyOGNbZXQQAx7eF89QHHhlhJHQB3uXmF8l5XVzZgkYP1575opc+RHhGBMPM46obwfhD yU3xIMtinURwllCqG2q+egqF4hGe8AmkkihgV5B1aYeC5nIWntwsbBeqIBDOFiaV1PwVRP zDypCKDUX8cSuDD+Nkfp4LCyDxe8tzR7aIWDuFabBZPI3F5hQWJyY3DWvY1pnQb0xmc8bB hOii0SO0WeqIB1NXqSFcI2AvjnMj9Qvq768XcQhT6kZnYibp2NJ7e8sB3cZ7Mn1pJpOheY PL/vGVeaLIVB7CgnuxcEW8NCHBMdOhF8SXm6BBFgPm8dGHIwTuW+zMiZsmedaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771806358; a=rsa-sha256; cv=none; b=kBNrRvk3g9cqaURFKaUKT07u2WkBtoTFpTai+w2yuLdtdnH/2PLriJl3Bzs1eI6Kgz9nDk vMHyMCa33uca6QucVSMZe9y8sBeVvgUtMSPhL1ihIyj/OiqZXyExyZueOXxAQfXuOIYEOq mbeo2QmyXT1SzEnSVfGeY0veI0C9GZ/za4k/quuvSjADDk0IR6p45GfRRepmiCYZZqYKvh dmXI4Rv9N2emZfbEhqh07YUnlnGjEitPgYvz1XjeRHQJmXTtM7vXV3K2EyJZAuGZrN+jSu FQwRg2wnbebsjyDqGbVCHl5GtY5MaxdJXvZNYEdt5TkvXHNNxifFiGFiKHXenA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771806358; h=from:from:reply-to:subject:subject: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=jYDCRbGyHm2MFcxFfhyh5wk0eyJrJxYflPviNjPvEIo=; b=AHhDITh2YcHeIMNRYbzLZG6I9L78lVriPcQ4YGoBqVEdie53WgPVxD8Vlvg+1apiN3AwxW msruapdOjaf206dzzeZFoUnDxXj9coraQw8bXa1hsPNBzX1FdbeKuq33QSnbggUTXJ7inr C/BkqDNtUqZr9q1p3kW6ABG7Ukb6AToCjRPwu3Gv6AVSPMjWnEt0xsTHurEeZs7vaOHY/r b9ilHtalCO0RcNU+m6tZbnZcPtD41t3tSZyFgwoxVOFIB+eg6RYog9Tm4p15FDWBgODqNk DHHDQFpPku7XLTtoCneaYq79Mw38ne4/9g5vqSbxiJF7YQNvVPyIcw3FE8cpTA== Received: from ltc.des.dev (lfbn-nan-1-698-103.w86-236.abo.wanadoo.fr [86.236.35.103]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fK1qB0HXVz1C0C; Mon, 23 Feb 2026 00:25:58 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 40B03F6777; Mon, 23 Feb 2026 01:25:55 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Baptiste Daroussin Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 507c611aeac7 - main - m4: Fix eval output width In-Reply-To: (Baptiste Daroussin's message of "Tue, 17 Feb 2026 16:12:03 +0100") References: <699474ed.430b3.aec99f6@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Mon, 23 Feb 2026 01:25:55 +0100 Message-ID: <86v7fotiek.fsf@ltc.des.dev> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Baptiste Daroussin writes: > Did you try to upstream this? espie@ is responsive to such patches in gen= eral. Yes, he passed them on to one of his students, thank you for reminding me. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Mon Feb 23 03:39:03 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fK68H4JKTz6Sfwr; Mon, 23 Feb 2026 03:41:03 +0000 (UTC) (envelope-from ivy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fK68H2mtSz3FqJ; Mon, 23 Feb 2026 03:41:03 +0000 (UTC) (envelope-from ivy@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771818063; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=PRGFLpU6YP73ePZV7XbbHqmi76Qhdr0itV3fX0Wryto=; b=NJc5RdlY/2Zye9ViOKtPzwg6eVa5ioGs1FahHv/B5MQEo9n3rCYZJrYIptX9D16oNgD2MR rqBqrWa6DnEA3oSrWpXwmsbAbY5GF0RaZoYEDIIBnWgedQO6yX/HZPIh4KvBK4LSnJSXQn zLhGTbAsogKbgEUZqAktXwofEx9qVQdj+a408XRIJE8Sl3lIDOYd5thgJPz6Rhd1UWJ+9k 0HMHh4DZSWdX1ghG4F7Jn3ziDJDsdQJ1bdbTLSD6VmleXUF7ORhS0Y8m+kfA9Q4AHP0r1j /2/4O9sIi08PlGSsQvtnLy4DJw4n6EuklBHqxE157pbb1zMxOW5tK0ND7dbBAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771818063; a=rsa-sha256; cv=none; b=kHll4gQZviyBC8QV94Wcgly7kmQoJx1Wz7aK5V1jshiW/cSByF03/m4RjDTAjBSg7THwIZ QNhP2tnj5HdO0JBvyu6ZwWuMUlhwWajFzsczrmPgpMoB611w8dTV1+rvfhXvpaXu7D6Jrp vZTYnVN9cRV2ZexXdQWA8Dbxa2qfKtPGd4oXc2GqprDcjXal8Gqi0MGE8oyu+wjblCHg8e vU1d4GYotQAknWOGBSRZEg5FPsQU50c9hXkYGOObhPkr1W1MUeYioqo9SHzSrqS1wwxVzv TjXrQLNmgVUevC2+JIpiL8mCrPhPcduDs4HAN2nNHP7gwcb9HUxq77sW14EGNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771818063; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=PRGFLpU6YP73ePZV7XbbHqmi76Qhdr0itV3fX0Wryto=; b=d5fJ0coxOQjZjKsJEtKZvnBXiOVkDSZyrVxhf192cTrZ5FyvvUqPbxJohWrD1/dtMzvUxf Rcm8BEqEI3j/NgHoo0Ujq7i99cNBKUeMXMBSepln4gJ1xwVjZHN8Oz2j3ICXQDw24RyzgV s7V16RTrxj0Jt+ouP8mFprb5aKkWCkXSeFTN8GZnQ8ietwi7G9YeCah7u11PQtlFpp48t5 ANtZYr265cQsxTf2MGFmgtRMJNDxBEGNvLMg6sc9p/K50PL5r+piozig3gkx7Dzmf9hMA1 W7YIxSn08nWkuFWx2V4nneCKM3rLv7BoA5xvpmqlvNCyQJDPguF6zJptuHT/+Q== Received: from amaryllis.le-fay.org (amaryllis.le-fay.org [IPv6:2a00:1098:6b:400::9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: ivy/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fK68G54SGz1Gmn; Mon, 23 Feb 2026 03:41:02 +0000 (UTC) (envelope-from ivy@freebsd.org) Date: Mon, 23 Feb 2026 03:39:03 +0000 From: Lexi Winter To: Ravi Pokala Cc: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: d4f6cb754249 - main - build: Move all of lp under LPR option Message-ID: Mail-Followup-To: Ravi Pokala , Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <699a2335.220a6.2c3156ae@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="oKHSM9g455v0w4Ko" Content-Disposition: inline In-Reply-To: --oKHSM9g455v0w4Ko Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Ravi Pokala wrote in : > Why is the package "lp", when the conditional uses "LPR"? i named this package "lp" because it contains support for (line) printers. i suppose you could argue that "lpr" might be a more suitable name on BSD since that's what the traditional frontend is called, but either seems fine to me. > Shouldn't they match? there isn't generally any corresponence between package names and src.conf options, except where this happens naturally, and even when the same name is used, they don't always mean the same thing. for example, WITHOUT_SENDMAIL controls both sendmail and libmilter, but in pkgbase these are two separate packages, so even though the src.conf option has the same name, it means something different. so, as a general rule, there's no particular effort made to ensure package names match src.conf option names. --oKHSM9g455v0w4Ko Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSyjTg96lp3RifySyn1nT63mIK/YAUCaZvL0wAKCRD1nT63mIK/ YOR4AQCJOTc7he+NYeYEF2HFeNhkjgzq/8tEcACgxYymkdFksAD+P7qcLwHiQmzM qsopdlEkFvfq5RlRbMFY5oGmoVXXBQY= =Uq8n -----END PGP SIGNATURE----- --oKHSM9g455v0w4Ko-- From nobody Mon Feb 23 06:40:44 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKB7j40gyz6SvDk for ; Mon, 23 Feb 2026 06:40:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKB7j3WRtz3TSw for ; Mon, 23 Feb 2026 06:40:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771828849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qIeck9Kuqwr800nh5YMljogQiqozB/RbUHMWWE/IDBw=; b=W5NcdJZFjaXQNU21zvOThRjm4RVJaH0tRKH1mTpQF3x8Alw9TvX4LhxDHb/9bjzlCiVPsR RbdeqKT/OR4ipTK1GNCmXhWOA+SATany0yMaSSjGbt/KXT6HhM2FG6MKne1cyozOVCOGBc t01mhUnSOYHJ3KamuQO/WfbN3Uw6ahfqHqkSKLl4B3YymAhK/8LPW7rp0ul80Vwgp15Ut+ Px76qS+OLsItBoLQI4N4gh+5ThxWx6oe1VuL/f9t3rgJ8iHo5VhKaaS07PjFDLj58kvKhp UPnyQOzldBmli3Og1W3x6YPmvZ6a62qAsj3tv9jfRe/WMGPKJH4xsAgnIqcsHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771828849; a=rsa-sha256; cv=none; b=ynQGlAkfb3c6pM76qAW6TMrKMJISFRkplM9csHqnyCh84xraiu3Wm/tAapIYUf8/JG7Tvr RmAEip2whQ+EBq2VUoI7FiS7VdO588ODOZtPVIo8w5BvGYJXG3YhlO+zoHZTYsC1/Lqb3D Bf4F7fSN2MiR9VmZgkCdl287rJByJPSGK9yhQeKsEO2WgmQzHYefasi09LWZXoxaK9t1m7 txihEqsKcln8hixRdjZZeyggJ7vEm6WmaplI+/XeJRIsifbQW4fqfZRh0sujDcc4P4QuKa Tt1+aFC2byZ1KfB4ZnHIJ4wAKN4QTIVy0u0MZhbMbkH2HdNYM5s0RRKeEE/N5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771828849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qIeck9Kuqwr800nh5YMljogQiqozB/RbUHMWWE/IDBw=; b=gjK8w1b1LTjIHJTdWlQb3ZrU5JrVUF0fbFzrPUz48Qd3cw8MHLAH2AC/erk+T1ZOmsq4DC bmq4XsAZ6zEAior0jHTmLXKOQOIpggF7Iat+04Z+riTOpBvJQj1xXPx4xfSk20sYevvsK6 xLwYFh97JrRvqwCUBYheEqWexOIqJWeogh8zz0anALA7F+9l2n+gx95QpUs5TwX/MFrq5K tGh0aTgy2Tb0fMYWnN/PLb8W4sTBZg2wiIAxBmN62HBMaXJYgti8G39A/DWKTuqywlEpNQ Lv3Q9FKJwPj1nJW+AIrAf05bAa3+0aXSUNQYp/tR7m7quE2xUUwWk27BaRWCRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKB7j33hvz3sM for ; Mon, 23 Feb 2026 06:40:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42775 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Feb 2026 06:40:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: db80ff6133ab - stable/15 - traceroute: MFC: graceful recover after networking errors with as_server List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: db80ff6133ab50f0aae9f392e3d64a88f6921deb Auto-Submitted: auto-generated Date: Mon, 23 Feb 2026 06:40:44 +0000 Message-Id: <699bf66c.42775.4a29cbbd@gitrepo.freebsd.org> The branch stable/15 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=db80ff6133ab50f0aae9f392e3d64a88f6921deb commit db80ff6133ab50f0aae9f392e3d64a88f6921deb Author: Eugene Grosbein AuthorDate: 2026-02-09 09:47:01 +0000 Commit: Eugene Grosbein CommitDate: 2026-02-23 06:35:46 +0000 traceroute: MFC: graceful recover after networking errors with as_server Currently, the traceroute[6] utility does not check for possible networking errors while talking to as_server in case of "traceroute -a". Meantime, there is a common case when trace is long and it has many non-responding hops (shown as '* * *'), so as_server aborts our connection, hence no AS numbers shown for the rest of trace. Somewhat artifical way to reproduce the problem: traceroute to 57.144.244.1 (57.144.244.1), 80 hops max, 48 byte packets 5 [AS174] be2950.ccr42.fra05.atlas.cogentco.com (154.54.72.42) 74.277 ms 9.605 ms 9.599 ms 6 [AS174] 149.11.228.19 (149.11.228.19) 9.506 ms 9.466 ms 9.420 ms 7 [AS33182] po172.asw02.fra5.tfbnw.net (129.134.108.146) 9.725 ms 9.874 ms 9.696 ms 8 [AS32934] psw04.fra5.tfbnw.net (157.240.59.85) 8.718 ms 8.691 ms 8.618 ms 9 * * * 10 [AS0] edge-star-mini-shv-01-fra5.facebook.com (57.144.244.1) 9.747 ms 9.815 ms 9.699 ms Note what due to increased timeout (-w10) we get [AS0] for 10th hop because as_server closed our connection. Same problem occurs with default -w3 when there are lots of '* * *' hops in a trace. Fix it with some additional error checking and a reconnection. This patch was in my use for many years and after traceroute(8) moved from contrib/ to usr.sbin/ it's nice to have it in the tree. (cherry picked from commit 60a6ebaf73719ef7aa15768c3906626fb106b2b3) --- usr.sbin/traceroute/as.c | 24 ++++++++++++++++++++---- usr.sbin/traceroute/as.h | 2 +- usr.sbin/traceroute/traceroute.c | 21 +++++++++++++++++++-- usr.sbin/traceroute6/traceroute6.c | 23 +++++++++++++++++++++-- 4 files changed, 61 insertions(+), 9 deletions(-) diff --git a/usr.sbin/traceroute/as.c b/usr.sbin/traceroute/as.c index 7fb952ed3da1..512f1dd6f14c 100644 --- a/usr.sbin/traceroute/as.c +++ b/usr.sbin/traceroute/as.c @@ -118,7 +118,7 @@ as_setup(const char *server) } unsigned int -as_lookup(void *_asn, char *addr, sa_family_t family) +as_lookup(void *_asn, char *addr, sa_family_t family, int *status) { struct aslookup *asn = _asn; char buf[1024]; @@ -128,8 +128,17 @@ as_lookup(void *_asn, char *addr, sa_family_t family) as = 0; rc = dlen = 0; plen = (family == AF_INET6) ? 128 : 32; - (void)fprintf(asn->as_f, "!r%s/%d,l\n", addr, plen); - (void)fflush(asn->as_f); + *status = fprintf(asn->as_f, "!r%s/%d,l\n", addr, plen); + if (*status < 0) { + *status = errno; + return 0; + } + *status = fflush(asn->as_f); + if (*status == EOF) { + *status = errno; + return 0; + } + *status = 0; #ifdef AS_DEBUG_FILE if (asn->as_debug) { @@ -138,7 +147,14 @@ as_lookup(void *_asn, char *addr, sa_family_t family) } #endif /* AS_DEBUG_FILE */ - while (fgets(buf, sizeof(buf), asn->as_f) != NULL) { + while (1) { + if (fgets(buf, sizeof(buf), asn->as_f) == NULL) { + if(feof(asn->as_f) || ferror(asn->as_f)) { + *status = EIO; + return 0; + } + break; + } buf[sizeof(buf) - 1] = '\0'; #ifdef AS_DEBUG_FILE diff --git a/usr.sbin/traceroute/as.h b/usr.sbin/traceroute/as.h index f5a5dae2acec..ac61bbab4786 100644 --- a/usr.sbin/traceroute/as.h +++ b/usr.sbin/traceroute/as.h @@ -30,5 +30,5 @@ */ void *as_setup(const char *); -unsigned int as_lookup(void *, char *, sa_family_t); +unsigned int as_lookup(void *, char *, sa_family_t, int *); void as_shutdown(void *); diff --git a/usr.sbin/traceroute/traceroute.c b/usr.sbin/traceroute/traceroute.c index 1297d3402ebd..be14c40b8d7b 100644 --- a/usr.sbin/traceroute/traceroute.c +++ b/usr.sbin/traceroute/traceroute.c @@ -1653,6 +1653,7 @@ print(register u_char *buf, register int cc, register struct sockaddr_in *from) { register struct ip *ip; register int hlen; + int as, status; char addr[INET_ADDRSTRLEN]; ip = (struct ip *) buf; @@ -1661,8 +1662,24 @@ print(register u_char *buf, register int cc, register struct sockaddr_in *from) strlcpy(addr, inet_ntoa(from->sin_addr), sizeof(addr)); - if (as_path) - Printf(" [AS%u]", as_lookup(asn, addr, AF_INET)); + while(as_path) { + as = as_lookup(asn, addr, AF_INET, &status); + if (status) { + as_shutdown(asn); + asn = as_setup(as_server); + if (asn == NULL) { + Fprintf(stderr, "%s: as_setup failed, AS# lookups" + " disabled\n", prog); + (void)fflush(stderr); + as_path = 0; + break; + } + else + continue; + } + Printf(" [AS%u]", as); + break; + } if (nflag) Printf(" %s", addr); diff --git a/usr.sbin/traceroute6/traceroute6.c b/usr.sbin/traceroute6/traceroute6.c index 173e97c13bb3..eb6086706f9f 100644 --- a/usr.sbin/traceroute6/traceroute6.c +++ b/usr.sbin/traceroute6/traceroute6.c @@ -894,6 +894,8 @@ main(int argc, char *argv[]) as_path = 0; } } + if (as_path) + signal(SIGPIPE, SIG_IGN); /* * Message to users @@ -1577,13 +1579,30 @@ void print(struct msghdr *mhdr, int cc) { struct sockaddr_in6 *from = (struct sockaddr_in6 *)mhdr->msg_name; + int as, status; char hbuf[NI_MAXHOST]; if (cap_getnameinfo(capdns, (struct sockaddr *)from, from->sin6_len, hbuf, sizeof(hbuf), NULL, 0, NI_NUMERICHOST) != 0) strlcpy(hbuf, "invalid", sizeof(hbuf)); - if (as_path) - printf(" [AS%u]", as_lookup(asn, hbuf, AF_INET6)); + while (as_path) { + as = as_lookup(asn, hbuf, AF_INET6, &status); + if (status) { + as_shutdown(asn); + asn = as_setup(as_server); + if (asn == NULL) { + fprintf(stderr, "traceroute6: as_setup failed, AS# lookups" + " disabled\n"); + (void)fflush(stderr); + as_path = 0; + break; + } + else + continue; + } + printf(" [AS%u]", as); + break; + } if (nflag) printf(" %s", hbuf); else From nobody Mon Feb 23 06:42:31 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKB9g3xq7z6SvQV for ; Mon, 23 Feb 2026 06:42:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKB9g2bv0z3VWW for ; Mon, 23 Feb 2026 06:42:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771828951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Q66/EPllj8KzD4FkoIiMY85f+nAiPTnzF8Gq/txtk0=; b=wBtANu7PdHWoWH7/+Mw3LDb6eyo/+/XzKFK+JcmP6IvRcod0il1COebp5qQPBKYmj9qWzZ VIceECxjmEXYtkz0qZMlbRxL5stkMJC2itGCzOXfeRve5FhDKNNiarwo9ZNP4HfQ/cLS+k 0p+8e22vA+znCt3q9z/PiufRBuYeCxc3ppM3o6/bSCeqY7WF5hoLufABctuuO74L3n+c+B Dmyhqr0oSuQLhaVKvItSRL1iqHyLbllhMet9H+PVX5j6yH662/yVgresO4iQvEomAs+RNL QoRJZSvKOpXIyN7aoRHwsOeKX8X0vxnoJ3OuuzLDgyCms8uD+oiZyg3ECcIpAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771828951; a=rsa-sha256; cv=none; b=emAwk6m5vIp9nt0IKENyNr480POsQRPqY7Uca/OXzYu/fvKkw8TRvwWFh9bYWzFE+wxUJF 1zRBy4NHs89EVfSTwbMBZnBgZLoyqNoLmUu+swSfcagizyEg6hjrB4XEFQzpmcyWQHg7+p gTue2nxAa5dD667ksXEEK3drtn3m6pMj5MSfe8ee1sGteCmDPuO3JUHIZtEWkrYBriHpu8 CPpsOaULaG5sSPqaImsRb5qGGNadmietbtDndBw6e/WZo+CMRzgstwgTUrNdax6ZjR8YKr dPoQeHjn+jsk1JnpieqU8IozZynVXdhTK3PVZU0bTyhUHQWYT5KGBDorf2hizg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771828951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Q66/EPllj8KzD4FkoIiMY85f+nAiPTnzF8Gq/txtk0=; b=QmFHJLiNCQxWpkhracQ4TTGMOc1GJR6XQq9vrj+mr/Soi6gXULpPMEOPQtVckuOlwtgU76 wmk0/QVQdC1EaDSNjUfpaFl2FQTs0P5X9ZTLCwNjXPqaP+Iqj3aegk0VOMnYc+TxTdxv0D M8iKaWOzXxyIKIvWsOxcb+tiempBdyVoMRWdQL4MLXUE7x4Hvog8W7gQaAxdYZcWz2D0fY 2QnM2Ar2/n1VAl8X/yD/dnPDpQhYY7xvUrePjSxfYTnkAp42lQ4gHeNLrteVI4RcIr53aj l4th2S0MbVVYra2LfbS3+KiBcpvu/taacgD9hw8SeF3EIBoDIpFy18IcaNZY0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKB9g2C5Qz49S for ; Mon, 23 Feb 2026 06:42:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44686 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Feb 2026 06:42:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: 8df05ce54e12 - stable/14 - traceroute: MFC: graceful recover after networking errors with as_server List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8df05ce54e12860111445e4ad98a791d4235be9e Auto-Submitted: auto-generated Date: Mon, 23 Feb 2026 06:42:31 +0000 Message-Id: <699bf6d7.44686.28121ae3@gitrepo.freebsd.org> The branch stable/14 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=8df05ce54e12860111445e4ad98a791d4235be9e commit 8df05ce54e12860111445e4ad98a791d4235be9e Author: Eugene Grosbein AuthorDate: 2026-02-09 09:47:01 +0000 Commit: Eugene Grosbein CommitDate: 2026-02-23 06:42:20 +0000 traceroute: MFC: graceful recover after networking errors with as_server Currently, the traceroute[6] utility does not check for possible networking errors while talking to as_server in case of "traceroute -a". Meantime, there is a common case when trace is long and it has many non-responding hops (shown as '* * *'), so as_server aborts our connection, hence no AS numbers shown for the rest of trace. Somewhat artifical way to reproduce the problem: traceroute to 57.144.244.1 (57.144.244.1), 80 hops max, 48 byte packets 5 [AS174] be2950.ccr42.fra05.atlas.cogentco.com (154.54.72.42) 74.277 ms 9.605 ms 9.599 ms 6 [AS174] 149.11.228.19 (149.11.228.19) 9.506 ms 9.466 ms 9.420 ms 7 [AS33182] po172.asw02.fra5.tfbnw.net (129.134.108.146) 9.725 ms 9.874 ms 9.696 ms 8 [AS32934] psw04.fra5.tfbnw.net (157.240.59.85) 8.718 ms 8.691 ms 8.618 ms 9 * * * 10 [AS0] edge-star-mini-shv-01-fra5.facebook.com (57.144.244.1) 9.747 ms 9.815 ms 9.699 ms Note what due to increased timeout (-w10) we get [AS0] for 10th hop because as_server closed our connection. Same problem occurs with default -w3 when there are lots of '* * *' hops in a trace. Fix it with some additional error checking and a reconnection. This patch was in my use for many years and after traceroute(8) moved from contrib/ to usr.sbin/ it's nice to have it in the tree. (cherry picked from commit 60a6ebaf73719ef7aa15768c3906626fb106b2b3) --- usr.sbin/traceroute/as.c | 24 ++++++++++++++++++++---- usr.sbin/traceroute/as.h | 2 +- usr.sbin/traceroute/traceroute.c | 21 +++++++++++++++++++-- usr.sbin/traceroute6/traceroute6.c | 23 +++++++++++++++++++++-- 4 files changed, 61 insertions(+), 9 deletions(-) diff --git a/usr.sbin/traceroute/as.c b/usr.sbin/traceroute/as.c index fd2f96100101..ab86b5205565 100644 --- a/usr.sbin/traceroute/as.c +++ b/usr.sbin/traceroute/as.c @@ -119,7 +119,7 @@ as_setup(const char *server) } unsigned int -as_lookup(void *_asn, char *addr, sa_family_t family) +as_lookup(void *_asn, char *addr, sa_family_t family, int *status) { struct aslookup *asn = _asn; char buf[1024]; @@ -129,8 +129,17 @@ as_lookup(void *_asn, char *addr, sa_family_t family) as = 0; rc = dlen = 0; plen = (family == AF_INET6) ? 128 : 32; - (void)fprintf(asn->as_f, "!r%s/%d,l\n", addr, plen); - (void)fflush(asn->as_f); + *status = fprintf(asn->as_f, "!r%s/%d,l\n", addr, plen); + if (*status < 0) { + *status = errno; + return 0; + } + *status = fflush(asn->as_f); + if (*status == EOF) { + *status = errno; + return 0; + } + *status = 0; #ifdef AS_DEBUG_FILE if (asn->as_debug) { @@ -139,7 +148,14 @@ as_lookup(void *_asn, char *addr, sa_family_t family) } #endif /* AS_DEBUG_FILE */ - while (fgets(buf, sizeof(buf), asn->as_f) != NULL) { + while (1) { + if (fgets(buf, sizeof(buf), asn->as_f) == NULL) { + if(feof(asn->as_f) || ferror(asn->as_f)) { + *status = EIO; + return 0; + } + break; + } buf[sizeof(buf) - 1] = '\0'; #ifdef AS_DEBUG_FILE diff --git a/usr.sbin/traceroute/as.h b/usr.sbin/traceroute/as.h index ce10b4b50098..d5d3f928c0da 100644 --- a/usr.sbin/traceroute/as.h +++ b/usr.sbin/traceroute/as.h @@ -31,5 +31,5 @@ */ void *as_setup(const char *); -unsigned int as_lookup(void *, char *, sa_family_t); +unsigned int as_lookup(void *, char *, sa_family_t, int *); void as_shutdown(void *); diff --git a/usr.sbin/traceroute/traceroute.c b/usr.sbin/traceroute/traceroute.c index 2f9358689c90..93116fe7fc3c 100644 --- a/usr.sbin/traceroute/traceroute.c +++ b/usr.sbin/traceroute/traceroute.c @@ -1653,6 +1653,7 @@ print(register u_char *buf, register int cc, register struct sockaddr_in *from) { register struct ip *ip; register int hlen; + int as, status; char addr[INET_ADDRSTRLEN]; ip = (struct ip *) buf; @@ -1661,8 +1662,24 @@ print(register u_char *buf, register int cc, register struct sockaddr_in *from) strlcpy(addr, inet_ntoa(from->sin_addr), sizeof(addr)); - if (as_path) - Printf(" [AS%u]", as_lookup(asn, addr, AF_INET)); + while(as_path) { + as = as_lookup(asn, addr, AF_INET, &status); + if (status) { + as_shutdown(asn); + asn = as_setup(as_server); + if (asn == NULL) { + Fprintf(stderr, "%s: as_setup failed, AS# lookups" + " disabled\n", prog); + (void)fflush(stderr); + as_path = 0; + break; + } + else + continue; + } + Printf(" [AS%u]", as); + break; + } if (nflag) Printf(" %s", addr); diff --git a/usr.sbin/traceroute6/traceroute6.c b/usr.sbin/traceroute6/traceroute6.c index 1f5fc0a6b3a3..f2c1999b6ac5 100644 --- a/usr.sbin/traceroute6/traceroute6.c +++ b/usr.sbin/traceroute6/traceroute6.c @@ -908,6 +908,8 @@ main(int argc, char *argv[]) as_path = 0; } } + if (as_path) + signal(SIGPIPE, SIG_IGN); /* * Message to users @@ -1587,13 +1589,30 @@ void print(struct msghdr *mhdr, int cc) { struct sockaddr_in6 *from = (struct sockaddr_in6 *)mhdr->msg_name; + int as, status; char hbuf[NI_MAXHOST]; if (cap_getnameinfo(capdns, (struct sockaddr *)from, from->sin6_len, hbuf, sizeof(hbuf), NULL, 0, NI_NUMERICHOST) != 0) strlcpy(hbuf, "invalid", sizeof(hbuf)); - if (as_path) - printf(" [AS%u]", as_lookup(asn, hbuf, AF_INET6)); + while (as_path) { + as = as_lookup(asn, hbuf, AF_INET6, &status); + if (status) { + as_shutdown(asn); + asn = as_setup(as_server); + if (asn == NULL) { + fprintf(stderr, "traceroute6: as_setup failed, AS# lookups" + " disabled\n"); + (void)fflush(stderr); + as_path = 0; + break; + } + else + continue; + } + printf(" [AS%u]", as); + break; + } if (nflag) printf(" %s", hbuf); else if (lflag) From nobody Mon Feb 23 07:10:11 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKBnh3gDsz6Sy8C for ; Mon, 23 Feb 2026 07:10:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKBnh37yDz3YtN for ; Mon, 23 Feb 2026 07: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=1771830616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yqect+l6S7280U8vD1D3xAnHzfozoB6TrEOnHHWGlqY=; b=VxdwHs1ttlAb238nBLlRhattcl7IrhFYG2irSigs1Oy8BSfKsWhFRV5Cc3PIRe1N+C5hN5 JgEzqT2jE9eu/0mffMey06eerI4YZiEBkGPzGv56hMhY3rgCF3yTKKbfnEeHr2Y+c8MbBr MJS/ClHwPV4In5nfecWZ8m2HQewzM1lLu04r6Tc0lEyA9lNMrbJUcV8cKPfezlEBf7uPje GDOxSVocQsjWNL+1p4I3u0diNQBI1EeHo+E+pQ9wO1T1ZbYCyCOzXTlHfUsvE7HqrZ6EEI u1zSJcu92+YwExo8YzQYSgLNvI34mbd6hlvIf1q+Y40E7d/5v3YcrRdeo+J1mA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771830616; a=rsa-sha256; cv=none; b=ooJlQjPJeEIiTiHep0GuhwJuBzA+vzPuaBAYDRVvTWhw9SnBlYIBLzJTBsW8JA9Pjjdqi6 TiJ474otEFErIGqm+HkxuorlLKK+Or0QS00VQTgMhcHzKjKKGDmFLpBMrJaWf32GPKWK6b /q7A9McHIyQ58XHwo/Mv84taYl0rbge2VPkigFZyCSG3xY4ChWhcl8C5oI9dEjqvjYLjWL W3pzDE5R5wZEHqXq7uQzBTACnTgE6O2DvwN+Fwoc85ACmeBqLNcwyTDlsINZOEfL/Md+uc TkIQNALIbLVS53v/30cfX1JSz1cGf+MLdmL5Cqnl1ZWg90k85KBPdnaZzdschw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771830616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yqect+l6S7280U8vD1D3xAnHzfozoB6TrEOnHHWGlqY=; b=Dj8weN3+AytoOwMloPaSMxKMq5Ebq4bshQSrwO0OtHH9ZIdKX38zA1XfubV0cszebTBoxV url4ncEW1C93R6WG6cVVpuNmHXOt95oNr9xeRUySLDT2uBBz0e4Z7qy5nOJ2bcD2nqURtY eYKJO6mnt/UJxcBzvK+WWtKpBnnS3Yyq8OtBG4SxcveZK6/3lpmLPFIhvlFQ/qfmJSxhlW EwBZQW6dD61D/u2xseXWqO7UAoUu0E/IU0Hoym80NxP/YyYOLZaMyRs8HD/6xLfEfj/81K C/b54zOS85A51k5z8jsgCPlGIm0PShl4j2SZjtIzXoGWrDDRKWCg/rXwI2003w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKBnh2lNsz4L7 for ; Mon, 23 Feb 2026 07:10:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4722c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Feb 2026 07:10:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: f0a6e0a8dcf5 - stable/14 - trim(8): minor output correction List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f0a6e0a8dcf5a49b9df1f5c9314cb2755c97f5e5 Auto-Submitted: auto-generated Date: Mon, 23 Feb 2026 07:10:11 +0000 Message-Id: <699bfd53.4722c.6933746c@gitrepo.freebsd.org> The branch stable/14 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=f0a6e0a8dcf5a49b9df1f5c9314cb2755c97f5e5 commit f0a6e0a8dcf5a49b9df1f5c9314cb2755c97f5e5 Author: Eugene Grosbein AuthorDate: 2025-07-20 10:36:33 +0000 Commit: Eugene Grosbein CommitDate: 2026-02-23 07:09:24 +0000 trim(8): minor output correction "trim /dev/da*" would print the following line multiple times when given multiple agruments: dry run: add -f to actually perform the operation Print it once before looping over arguments. Also, note possible suffixes P and E after offset/length as per expand_number(3). (cherry picked from commit 5d5848648013a189fc766e4ee3a121362905b836) (cherry picked from commit f1b934c8138cfd98a70e305d54b2b431c842ec21) --- usr.sbin/trim/trim.8 | 18 ++++++++++-------- usr.sbin/trim/trim.c | 11 ++++++----- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/usr.sbin/trim/trim.8 b/usr.sbin/trim/trim.8 index b4799399e110..e7fc9da1a740 100644 --- a/usr.sbin/trim/trim.8 +++ b/usr.sbin/trim/trim.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 9, 2025 +.Dd July 20, 2025 .Dt TRIM 8 .Os .Sh NAME @@ -36,7 +36,7 @@ .Bk -words .Sm off .Ar offset -.Op Cm K | k | M | m | G | g | T | t ] +.Op Cm K | k | M | m | G | g | T | t | P | p | E | e ] .Sm on .Xc .Ek @@ -85,13 +85,13 @@ Overrides .It Fl l Xo .Sm off .Ar offset -.Op Cm K | k | M | m | G | g | T | t +.Op Cm K | k | M | m | G | g | T | t | P | p | E | e .Sm on .Xc .It Fl o Xo .Sm off .Ar offset -.Op Cm K | k | M | m | G | g | T | t +.Op Cm K | k | M | m | G | g | T | t | P | p | E | e .Sm on .Xc Specify the length @@ -105,12 +105,14 @@ unless one or both of these options are presented. The argument may be suffixed with one of .Cm K , .Cm M , -.Cm G +.Cm G , +.Cm T , +.Cm P or -.Cm T +.Cm E (either upper or lower case) to indicate a multiple of -Kilobytes, Megabytes, Gigabytes or Terabytes -respectively. +Kilobytes, Megabytes, Gigabytes, Terabytes, Petabytes or +Exabytes, respectively. .It Fl q Do not output anything except of possible error messages (quiet mode). Overrides diff --git a/usr.sbin/trim/trim.c b/usr.sbin/trim/trim.c index 3e187faa0fb3..27f57ac2fb72 100644 --- a/usr.sbin/trim/trim.c +++ b/usr.sbin/trim/trim.c @@ -114,7 +114,7 @@ main(int argc, char **argv) * * trim -f -- /dev/da0 -r rfile */ - + if (strcmp(argv[optind-1], "--") != 0) { for (ch = optind; ch < argc; ch++) if (argv[ch][0] == '-') @@ -127,6 +127,9 @@ main(int argc, char **argv) if (argc < 1) usage(name); + if (dryrun) + printf("dry run: add -f to actually perform the operation\n"); + while ((fname = *argv++) != NULL) if (trim(fname, offset, length, dryrun, verbose) < 0) error++; @@ -213,10 +216,8 @@ trim(const char *path, off_t offset, off_t length, bool dryrun, bool verbose) printf("trim %s offset %ju length %ju\n", path, (uintmax_t)offset, (uintmax_t)length); - if (dryrun) { - printf("dry run: add -f to actually perform the operation\n"); + if (dryrun) return (0); - } fd = opendev(path, O_RDWR | O_DIRECT); arg[0] = offset; @@ -237,7 +238,7 @@ static void usage(const char *name) { (void)fprintf(stderr, - "usage: %s [-[lo] offset[K|k|M|m|G|g|T|t]] [-r rfile] [-Nfqv] device ...\n", + "usage: %s [-[lo] offset[K|k|M|m|G|g|T|t|P|p|E|e]] [-r rfile] [-Nfqv] device ...\n", name); exit(EX_USAGE); } From nobody Mon Feb 23 07:14:37 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKBtm0rmWz6Syk3 for ; Mon, 23 Feb 2026 07:14:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKBtj2dQJz3b2g for ; Mon, 23 Feb 2026 07:14:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771830877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ya7a4jqABNJs2tz4ooMXbCBgpPoR3qsPK0X815kHCGw=; b=aie6UGA4jhqGPRJ1K/wBwXeHxn88q3+2GXG3kM/JxxSQk1/BSWDlYEn4zM1c7dHcJbtIFA Tr5Cji9T2wagyeFzkMSfHp5DY6ro3Mx4JUNuJV+2o2lEGxtdIlrTWE2gxf2HXbd/w/9QLg fPWUtrHKTege2fhzdVSlNAcI+PxDEHGEmKp6mpswoHIW28+5cFvHalPSNANi1NgsBAIulW QktlgYdtVh95tgWZ1IHQLjkf+nBZ2edpxlZkoBVQ9hbSuYTjivCAFI3bLkPvLCFZSydi7T ssP8/IEFzxAUqL+czfN4TKJgNWN8/WriTj+JE97aAe42YDfnQ1hW1gmZwEDPBw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771830877; a=rsa-sha256; cv=none; b=eMrRvYQgADSQ7VPGr5BEqj2EsEuF05iKlMhncD5oNXzQFDYudskJAhtwxB1Ad+RaVYRQ/G LnjPbBxvqiWTuZQGn1A68WS5RH8DlguElDfd2B5ggPJDVtJIUy2GxbcpGgSDR5wNXFYPKR 46UEwKco1shyx6C27YEsgPJFdD/PWeEZzqu3XcFhFe6pYjs15TYJqxeQnCAxixliHF8sV2 a2HeFi5YcOy5aRf0hZsBDtT9SUd2I2FZ/fp5UirRy69eXecmXwcd5b7w1gYkdfEqfO76mL 4Q61Dmz/uG04pqxvxk0hPJXz7Rp0p8Yn/7RtiSiV++Rum4QFvbcMftlJVjetuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771830877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ya7a4jqABNJs2tz4ooMXbCBgpPoR3qsPK0X815kHCGw=; b=AhGQc9KLJOA7Ys8hMteB9D2y2ZJ8xwqfppTIJNDePGVoDXqEEjgYYZAgx9A5q5aByQRgqW S/yTU0Q56+pC+sBEcTWQaUaxDNUnYh0zvauyHq79VVDgDGnqlWP9H7g6P/M26YWGRpsX2I FpHRQ8Hv2onLqcnfyUTH/owInkCc98vKAtoCfB7ff2WE5x1VKrDB4mYvtH20a67wlYX08t jz4jHjUU2KQUJ74Y62HTb0jlbuWpfhWw0THAcUgHKwgPo6saxUxgd6oaYQEBsSpRqTgTQv mF/nGIm0bhyIn+af8gYbYnMGshh168eYgCUa+JJOtdERDF2mwQ6fQSKfpif6eQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKBtj2FLfz4Rg for ; Mon, 23 Feb 2026 07:14:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18183 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Feb 2026 07:14:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: 3c1f69661eda - stable/13 - trim(8): minor output correction List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3c1f69661eda69709f00a40826c6efd045dbf01b Auto-Submitted: auto-generated Date: Mon, 23 Feb 2026 07:14:37 +0000 Message-Id: <699bfe5d.18183.614658ec@gitrepo.freebsd.org> The branch stable/13 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=3c1f69661eda69709f00a40826c6efd045dbf01b commit 3c1f69661eda69709f00a40826c6efd045dbf01b Author: Eugene Grosbein AuthorDate: 2025-07-20 10:36:33 +0000 Commit: Eugene Grosbein CommitDate: 2026-02-23 07:14:05 +0000 trim(8): minor output correction "trim /dev/da*" would print the following line multiple times when given multiple agruments: dry run: add -f to actually perform the operation Print it once before looping over arguments. Also, note possible suffixes P and E after offset/length as per expand_number(3). (cherry picked from commit 5d5848648013a189fc766e4ee3a121362905b836) (cherry picked from commit f1b934c8138cfd98a70e305d54b2b431c842ec21) --- usr.sbin/trim/trim.8 | 18 ++++++++++-------- usr.sbin/trim/trim.c | 11 ++++++----- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/usr.sbin/trim/trim.8 b/usr.sbin/trim/trim.8 index b4799399e110..e7fc9da1a740 100644 --- a/usr.sbin/trim/trim.8 +++ b/usr.sbin/trim/trim.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 9, 2025 +.Dd July 20, 2025 .Dt TRIM 8 .Os .Sh NAME @@ -36,7 +36,7 @@ .Bk -words .Sm off .Ar offset -.Op Cm K | k | M | m | G | g | T | t ] +.Op Cm K | k | M | m | G | g | T | t | P | p | E | e ] .Sm on .Xc .Ek @@ -85,13 +85,13 @@ Overrides .It Fl l Xo .Sm off .Ar offset -.Op Cm K | k | M | m | G | g | T | t +.Op Cm K | k | M | m | G | g | T | t | P | p | E | e .Sm on .Xc .It Fl o Xo .Sm off .Ar offset -.Op Cm K | k | M | m | G | g | T | t +.Op Cm K | k | M | m | G | g | T | t | P | p | E | e .Sm on .Xc Specify the length @@ -105,12 +105,14 @@ unless one or both of these options are presented. The argument may be suffixed with one of .Cm K , .Cm M , -.Cm G +.Cm G , +.Cm T , +.Cm P or -.Cm T +.Cm E (either upper or lower case) to indicate a multiple of -Kilobytes, Megabytes, Gigabytes or Terabytes -respectively. +Kilobytes, Megabytes, Gigabytes, Terabytes, Petabytes or +Exabytes, respectively. .It Fl q Do not output anything except of possible error messages (quiet mode). Overrides diff --git a/usr.sbin/trim/trim.c b/usr.sbin/trim/trim.c index 3e187faa0fb3..27f57ac2fb72 100644 --- a/usr.sbin/trim/trim.c +++ b/usr.sbin/trim/trim.c @@ -114,7 +114,7 @@ main(int argc, char **argv) * * trim -f -- /dev/da0 -r rfile */ - + if (strcmp(argv[optind-1], "--") != 0) { for (ch = optind; ch < argc; ch++) if (argv[ch][0] == '-') @@ -127,6 +127,9 @@ main(int argc, char **argv) if (argc < 1) usage(name); + if (dryrun) + printf("dry run: add -f to actually perform the operation\n"); + while ((fname = *argv++) != NULL) if (trim(fname, offset, length, dryrun, verbose) < 0) error++; @@ -213,10 +216,8 @@ trim(const char *path, off_t offset, off_t length, bool dryrun, bool verbose) printf("trim %s offset %ju length %ju\n", path, (uintmax_t)offset, (uintmax_t)length); - if (dryrun) { - printf("dry run: add -f to actually perform the operation\n"); + if (dryrun) return (0); - } fd = opendev(path, O_RDWR | O_DIRECT); arg[0] = offset; @@ -237,7 +238,7 @@ static void usage(const char *name) { (void)fprintf(stderr, - "usage: %s [-[lo] offset[K|k|M|m|G|g|T|t]] [-r rfile] [-Nfqv] device ...\n", + "usage: %s [-[lo] offset[K|k|M|m|G|g|T|t|P|p|E|e]] [-r rfile] [-Nfqv] device ...\n", name); exit(EX_USAGE); } From nobody Mon Feb 23 08:28:20 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKDWs6srgz6Srq5 for ; Mon, 23 Feb 2026 08:28:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKDWs3m1mz3kV6 for ; Mon, 23 Feb 2026 08:28:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771835305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FlQ4m6VCd6Ynn4IaElj18idF6dY46dGnnL97xxP55yg=; b=OoHW4jkh0GZaUS6xr8gi8UjB2NZjNhIOrKcPPVdeURnd0cyZ+socGtNkScOF7HZXyG204c 6nNxkRepZHeiskI9eRXkpFEFaKAqSK8R6GMb7jloFvILykLZB8pcSgcjkjUYDD+BPGdCq7 NosbFCStTR4kn9ckoilXO3ERzTs+mtvnCVzQItpFAygmqY4g7Zu+49OgYOHL+uLYjHyvwk cglgi29WfDlPZJ9IvXXFqsPbj0bizEajGllLoi288rgbqvJd3xF5OYffj9H9ZTkH00neI7 udZK5/4HOVKhY0akXRMYe/Q8R8d4X6fY/B/+QIINLNRtLI63e5iBD8zCsWv2Bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771835305; a=rsa-sha256; cv=none; b=CAw/bcmEIuq7XDh7FRRQuxxhEXLh7cUrBkWEiRmUz9Tyzs+ZFiiSUqLYbwHbm1bM8+tDkd hp6Zex6BHiTxvVm9rCb+Pc4CLnUQkOtqI59j7+qxanZnvl6kKr3f91YrFZHXdLzeNpiMmy lFz37ZNIm7KJnP4ykBSr3+T9FO6+h1IVZGHy2WyoaUFrmvZXP0YrBck3kJBQJcjIp5sXDy GPFggQLK9z7pcxcBGoOk3PwFXESpIfuCC/uEBVicEXh1dK4mqCtt7tolhE9+kssV/A0cvg VbXoQx5MuqthwfwjUpBDkgf8ZGa+pUIoL+UlG8QsNDahddCWhNZoaO+QLIQGyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771835305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FlQ4m6VCd6Ynn4IaElj18idF6dY46dGnnL97xxP55yg=; b=g2ywsEi8rhpTlUhXy8ltbKb3/xkJCyH2soeSs1mxKqZs4XKmgwKJKJbnHC8BQ3jgY9Ibps 6KoZbcYcFG0G/yzAGSNUvfbrEXILlYYNzKV0OZOmxFPGxMmyubQyc/gMyeBFscC3nueSle XPK6xZt6jq65IwkQ8h3D0+NMAXAWI/JfYvKNl7HEEGKxTh/R73ox28v8g8sycMzO+ex0w3 IGdakzOtICIAPbtxo1g+0amDQADW+ZPX7LtBjnzawEJLA8JxNrEumOQMib8Bc3IJaL+wfz 8tWZjZOi5hWTb855pQl5BASOJXirf/5fHj5HcbodipG1yB9jw+eYx4ADqoMd1A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKDWs32YHz6Y2 for ; Mon, 23 Feb 2026 08:28:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 201a8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Feb 2026 08:28:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 9a20515bc9ce - main - sh.1: Add .sh_history and .shrc to FILES List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a20515bc9ce3fe6d7f09fd6bdece0dd45bdbc87 Auto-Submitted: auto-generated Date: Mon, 23 Feb 2026 08:28:20 +0000 Message-Id: <699c0fa4.201a8.29b12b1f@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=9a20515bc9ce3fe6d7f09fd6bdece0dd45bdbc87 commit 9a20515bc9ce3fe6d7f09fd6bdece0dd45bdbc87 Author: Alexander Ziaee AuthorDate: 2026-02-23 08:16:33 +0000 Commit: Alexander Ziaee CommitDate: 2026-02-23 08:18:23 +0000 sh.1: Add .sh_history and .shrc to FILES MFC after: 3 days Reviewed by: bapt (previous), jilles, tembun@bk.ru Differential Revision: https://reviews.freebsd.org/D55295 --- bin/sh/sh.1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/sh/sh.1 b/bin/sh/sh.1 index 63755bbcf8a9..4f860d89c654 100644 --- a/bin/sh/sh.1 +++ b/bin/sh/sh.1 @@ -3091,6 +3091,10 @@ which may affect the shell as described under .Bl -tag -width "/etc/suid_profileXX" -compact .It Pa ~/.profile User's login profile. +.It Pa ~/.sh_history +Default shell history. +.It Pa ~/.shrc +Default shell resources. .It Pa /etc/profile System login profile. .It Pa /etc/shells From nobody Mon Feb 23 08:32:54 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKDd25BVjz6Ss32 for ; Mon, 23 Feb 2026 08:32:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKDd21hzkz3lPb for ; Mon, 23 Feb 2026 08:32:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771835574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jo1BERWZvVWtX7dUwanWqwmTkGDCbYzaZZIXja9+cCs=; b=lvSQ4nOfxhWeRkpwmO3tQqXDx2+r5SjOYff6iV4KbIVrOGPWc7yobAYMMd1EgDKG767HBB Ci654x2PAJ0qOhsCu7EV4fEJsrKg72lrDUzcpKoQhofou+VzJmL40mf0PxXFmU+0YIR6JX TyVxZ/K/cJgXw5QYLSkiKtLpSoFOH8UH3DHITMaVH9CxB503ikpnJUI6QeSwVxPdyQJDqZ 3ZwAkiNXmRF/aaMYRaDc6xuKkPoyHWvOtyDNqq63EI3kv+gUZ75JdVmsOcQK361VqpAKwk IXCGMvomB+EaQvvkksMsIKkJXkGbFRfTK7eIYH8Z78cmTXGv3LBCR3cgviBZ3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771835574; a=rsa-sha256; cv=none; b=FFIQPwoesFjZqRFVA5r1ean0bEgI4ZMWogbhmQAW55AtMlOQJ4hIH3P6IHgQq2rBfSN4nW 92pbHd0VseGKttwNQeJ97camBAp/nFV0x4kM8lX2jVvYvslYeuquKeS/E0nn+lloPIGtzj ZJaticoMMnLr0kkVwpSgLGhP2JwZIrPCfvij+i39ZXJBy12OUEsvuaEmM3kvZPvULc46nl 0gla2PxeX/qdECz6z523JzyzOYHOadMkCFiBouhgxB4DC7LvreEXPDlhIa4HRI/z95ZHDu EJxdTYs263rko4yxRJtY0mVxuGj9Yl7cba1LjRWu/wYPRIlxRUFiJlJvB+Nv4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771835574; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jo1BERWZvVWtX7dUwanWqwmTkGDCbYzaZZIXja9+cCs=; b=u+NK/ainWxjOUkfWwH/fc7CngAfDFOZ2I8Hr6boaCimSZAInD4ddMqvD6o9N0x223QSjZK zwNA1G8LQmY70Wqe8/rWdTKIlXwnkvNOg9EnLr6Pt/2RGXLu/aPlNuUt0iQ7QgS8uppra7 2nuBBfV9Bn68LqlZoOlJ2FQvd4DSx8gomy34bcN7nAFAsthpYopYXieh93VtHuNV6MT4ZD D8K2E8dLgyym+1F/+Vsqr6lf1Lt5VdFnKvxff4BsHmEQKjoh/LihX/wSyRXBViLvqKJbkx MP0yrRWvRCHTsEngJT/WcDuIGDJRjhNCk+lWcHqICeBcyVn0KOmw/dRy/OO4Kw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKDd20xdwz6MS for ; Mon, 23 Feb 2026 08:32:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 211d3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Feb 2026 08:32:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Artem Bunichev From: Alexander Ziaee Subject: git: ab835b37075e - main - debug.sh: Fix a typo List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab835b37075e6478ef82f8c807a2335f5d19edaf Auto-Submitted: auto-generated Date: Mon, 23 Feb 2026 08:32:54 +0000 Message-Id: <699c10b6.211d3.4a3957ad@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=ab835b37075e6478ef82f8c807a2335f5d19edaf commit ab835b37075e6478ef82f8c807a2335f5d19edaf Author: Artem Bunichev AuthorDate: 2026-02-23 08:31:31 +0000 Commit: Alexander Ziaee CommitDate: 2026-02-23 08:31:34 +0000 debug.sh: Fix a typo MFC after: 3 days Reviewed by: emaste, guest-seuros, sjg, ziaee Differential Revision: https://reviews.freebsd.org/D55416 --- libexec/rc/debug.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/debug.sh b/libexec/rc/debug.sh index 739c81a709f6..4284a6e3b5fb 100755 --- a/libexec/rc/debug.sh +++ b/libexec/rc/debug.sh @@ -201,7 +201,7 @@ _debugOn() { DEBUG_DO= DEBUG_SKIP=: DEBUG_X=-x - # do this firt to reduce noise + # do this first to reduce noise case ",$DEBUG_SH," in *,$1:debug_add:*) _debugAdd $1;; *,$2:debug_add:*) _debugAdd $2;; From nobody Mon Feb 23 10:05:23 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKGgl4ZKMz6T2Z6 for ; Mon, 23 Feb 2026 10:05:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKGgl3k1zz3xtr for ; Mon, 23 Feb 2026 10:05:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771841123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+njbO6gaymjezJTfocKgXyF84ZP/SyfQ+D1bT4V18YM=; b=j190LRvFGt8Db/apDzuDWxFmD7wbpndGuAdtn0GxNEPc6anzGXYK2W9HYtTh2vmApYd/Bj BYHSZhj/1eNf/b8VInPHKno7o2eEGTbZjoDgMm0fGeGiiPFDaX/TQKpMkf88qSlFl6Pbex YlclTBro4lG7nGHQSszTlwGbFkH0K2Xx5dg1+DJYtN8ILOQ7QGtn72v+r0X+IyrD4srJP9 E+hgSa8SJmYs0jSrXI/DMldLfkqP5x9Hizuls0zNpuhPx/MAkVOEisunxCU9HGkJnJjwN7 9HKkSE5rmqSOHgLCl9/3b17liZsjBkq7LVxjalXVASa1Es8wO8NStDeq8GJCrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771841123; a=rsa-sha256; cv=none; b=ohXqzq4buJ6faR/Q/yK1Rto2SRpXWhQWYFQ6hIQ6QsywJzWgdXTV6jt2q6OMCASfM4231x B24fw8yvVyRZ/ZemgL5NA9Ch9qBh7h0o+Gk2NxE3yNf48HehqMroDjSHThXphF+j8UNU9t bkLZyJZNQ+/f9bWu30wKHhm7gNxo7v/GY3bTkX1neVzp49HW/wTkxsZxfBxvQc/s19jdzu DTb82nJMBtOkjbQ3A6GrCzJWqsi0Yp8KY/vgMXr8/jdp2cIEv/B2KoLQ9xfLOcmBrLKLFR 3nyvjT3SP866iqyLjgitwVawGAUOxH/Ne7gegMHzCJM5qFF6tYfCt/fPGcIoWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771841123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+njbO6gaymjezJTfocKgXyF84ZP/SyfQ+D1bT4V18YM=; b=FQfTrmlyB+rps/QIgKJOk1pY8lqFllyEoZkXpDqoSjpolvymPWFF9Kyb0ek2QyarpAxghx MJtw4bD3iBuN+JLqSNuOslWj81QaAlfpJuS4l7B7xFBUf3qNv6eUVG81iUeFR+COB2XfOi E5w3tRxIQ+LYmreDXUfRZG0BZrZOKymg2owGfS5NdjAWCQuZFYiI2a/34+uySmFesPzQjs 0QxrPNsGxuZOdTNMWQrw8bIGnvAqw8Ix82SceAa26ccA6B0V+4LLHBCXkk5s/o0PM0pHlJ vxoZINroUQ4aRXJBP1fP+c/TmVRjXQ/sTvz7DZX9lllMvA2zHunB5qhImKvnHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKGgl3HSZz9CK for ; Mon, 23 Feb 2026 10:05:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32317 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Feb 2026 10:05:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 0076f6d1ad05 - main - sys/_offsetof.h: pacify GCC 12's macro redefinition check List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0076f6d1ad05e80d372bef1caf15615cd639fb5c Auto-Submitted: auto-generated Date: Mon, 23 Feb 2026 10:05:23 +0000 Message-Id: <699c2663.32317.683ad64d@gitrepo.freebsd.org> The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=0076f6d1ad05e80d372bef1caf15615cd639fb5c commit 0076f6d1ad05e80d372bef1caf15615cd639fb5c Author: Brooks Davis AuthorDate: 2026-02-23 09:45:58 +0000 Commit: Brooks Davis CommitDate: 2026-02-23 10:05:06 +0000 sys/_offsetof.h: pacify GCC 12's macro redefinition check GCC 12 has a strict definition of identity (all characters including whitespace must be identical) when comparing "redefined" macros. Make our definition exactly match the stddef.h that comes with GCC to fix test-includes of netlink/netlink_snl.h. (Note: later versions of GCC are a bit more flexible and don't have this problem.) Reported by: des Sponsored by: DARPA, AFRL Fixes: 2adc3f0db187 ("stddef.h: centralize definition of offsetof()") --- sys/sys/_offsetof.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/_offsetof.h b/sys/sys/_offsetof.h index 25982fad774a..7a38914818a0 100644 --- a/sys/sys/_offsetof.h +++ b/sys/sys/_offsetof.h @@ -13,7 +13,7 @@ #define _SYS__OFFSETOF_H_ #ifndef offsetof -#define offsetof(type, field) __builtin_offsetof(type, field) +#define offsetof(TYPE, MEMBER) __builtin_offsetof (TYPE, MEMBER) #endif #endif /* _SYS__OFFSETOF_H_ */ From nobody Mon Feb 23 12:35:04 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKL0T1cxhz6THsG for ; Mon, 23 Feb 2026 12:35:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKL0S6VGyz4N1T for ; Mon, 23 Feb 2026 12:35:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771850104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jV6OyKuRjpfg0ccB3kCZNjqKzy60vo3tMfgl8frL9tA=; b=UkXEMGrywCIoLVagptl6axZVJFrWlVlgVBNj10HUdw0D+iicQLW+9cCirtgIqgcwVyO/bQ sIJj1+X03R+Sn/m6xHhfgVDrl8YnDFVXLH5xDezJaIPeHZq9x4QJwT282mFET1O5w4fjf1 gOGrEAZm/dmsLOOEKcF1c5Y7DIbbqEoiigSCqmvUErbBWHXwDnBTkx3ML3FnbC+Vh8JEvs Dff46mIj3sop8NT3NUsLz4ywto6FOw7pM+/f1ZlzgbWv7cHYMp7Wlzjrs11L1pvehvuKsu VSBBV0JmmPBfaTkKdg9FpVovRezMbjZdPnP/kgOQnuo+GRLD7HurgTiXSRvlcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771850104; a=rsa-sha256; cv=none; b=gY9MGEK34TD6NVthMFknYTWf70Ar6SQi1yB/k4J5BwDkXjcw7E7tE4WQWmyMyYjhfq8ImC EEEFw9LJPhxXllt1DLcAqhyvF15YhynnRRa7EUyLNIGCsAygoEQo/Amn/cEvky57dr4jgM 8eWM2wi1kg36Nuy9295qqUW6hoIp8w8Et9PDYsy4DGqUg8pFD42xvc/EIFEqI/T6bx+zWW Xup4hhMSKe6mRcV+G95I1YqKSsdmPsvq4O8E/jHCoH42GYgZrFCIJM8gwpL6JWsofBghjJ orXwXvkLBbFNCgyqXuclZwFofLrXCZD3rPTU+34meZ/zndNxUgRFf7374iVW9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771850104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jV6OyKuRjpfg0ccB3kCZNjqKzy60vo3tMfgl8frL9tA=; b=rfT11mLZ6gBjVfbZwgtDaXXRPqp28ORl4gFagUToMmHUP8dl/kIP9CRBJHN9Eyhg7jRrqU QCbqzT8K2haNd5RV3Oro2UHvcAucibF/P+r/73v2a5N5d4Q43TQnpLsVV59vbZG6ZOk7zJ 0pABduZ1OCAUKPKaFVXOyV4rwrUydvPd9UJTXRXoFuf6zCT0KFNZOXeDr3+Ftc1M9MUV/R wTVkMD/mtOi76BwTp95r178rosoC1og/mBQX0dLD5Eo4N5yp/wsUwutmh15cgEOUgQkOH5 wFX4po0saOXf2Vfcht2ktPrjR4fIGvg/ndEHloJoxrENFXDCDWNhx+97ll2iZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKL0S54mKzTsQ for ; Mon, 23 Feb 2026 12:35:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4150c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Feb 2026 12:35:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Quent=?utf-8?Q?in Th=C3=A9?=bault From: Christos Margiolis Subject: git: 06b466526a7f - main - virtual_oss: use hw.snd.default_unit by default List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 06b466526a7fc35cc6fc5bf6f6269e7f3a0a7aea Auto-Submitted: auto-generated Date: Mon, 23 Feb 2026 12:35:04 +0000 Message-Id: <699c4978.4150c.72371258@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=06b466526a7fc35cc6fc5bf6f6269e7f3a0a7aea commit 06b466526a7fc35cc6fc5bf6f6269e7f3a0a7aea Author: Quentin Thébault AuthorDate: 2026-02-23 12:33:33 +0000 Commit: Christos Margiolis CommitDate: 2026-02-23 12:33:33 +0000 virtual_oss: use hw.snd.default_unit by default Reviewed by: christos MFC after: 1 week Signed-off-by: Quentin Thébault Sponsored by: Defenso PR: 293130 Pull Request: https://github.com/freebsd/freebsd-src/pull/2043 --- libexec/rc/rc.d/virtual_oss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.d/virtual_oss b/libexec/rc/rc.d/virtual_oss index b8f1e7620582..42353a6c1520 100644 --- a/libexec/rc/rc.d/virtual_oss +++ b/libexec/rc/rc.d/virtual_oss @@ -24,6 +24,7 @@ required_modules="cuse" configs= pidpath="/var/run/${name}" +default_unit=$(sysctl -n hw.snd.default_unit) virtual_oss_default_args="\ -S \ -C 2 \ @@ -32,7 +33,7 @@ virtual_oss_default_args="\ -b 24 \ -s 8ms \ -i 8 \ - -f /dev/dsp \ + -f /dev/dsp${default_unit} \ -d dsp \ -t vdsp.ctl" From nobody Mon Feb 23 13:32:10 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKMGL53cLz6TNqr for ; Mon, 23 Feb 2026 13:32:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKMGL4M1hz3J8J for ; Mon, 23 Feb 2026 13:32:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771853530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RYGOdVtIjChtor+tqbpxBiAodzF7vjl2J8Va8lE4SP8=; b=VGqdw8Y4trqtBBNfwFetNSibR1XwTrcPmO/QKyf8rKiitp7JZMWGsS1vcU4lJ/Biy70Vzs 9WCNvIX7sOLoGhNYmkhxMjPTGzXPWvtSxnLpW0z0vR389x6wyqH82yDWaE4u4KSDbm37RG FpEpRT2pxihdDTLpg+3pd/RMizeuVAbSvuu6iBQDjWWgv+z/39otFpfb1FPAQdW3qJ+UnM ivO+uUE0QMuSW1Up3YV1P13JZEgOgQDRpjBfQTWacKb+vfCSrHnCQbLZiuncXidY8lpKLJ k0W21W/5IH72/LHlCkEh2AwPzjIhzoJjyTlddN12MP5TewuG4OYqOOnimBJCXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771853530; a=rsa-sha256; cv=none; b=ALet0EOegbx1y6T6dr/Ziugx/hc4flSbHL1vDncSLwhgEjd1pyUdrmUIvriL4T3IHYw9pk WExwIkg4phCppjxT+SKUXmfUb7glxCFEY2NwIz2/j7tnvCTWv51/pjHYQr7FWFZlFEcO8c 4eeIeGyLt7pATvPcH+lqes99pF07F57URYQjBGG8snzK01pGU9hUFiFibgUQLGCSIDGT6T 8ZBeHyuFWe6DzBOwCFAFskxbSJbpZfZStwDxTJWtpJksaQN/PFEzWe007gVe6555VnqDM8 bNKOLP0WqAI94+xZgGajZXTaHrqcD+kbjT7XkxIA1dLhU+FhxhQuxF6bk873TQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771853530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RYGOdVtIjChtor+tqbpxBiAodzF7vjl2J8Va8lE4SP8=; b=SNEQ7nZnLED9ouN0icu2qIJ1i34mSuHjgax7m0Oh97/rPvwlZri3/MFXjXxR6mGUjMuK1e TagbEs4pNEKFJIpcKCyDzog1PF5o2+diOJ4RISWeSDyLTbmJwGw7Ha4rY1AC/urscYYpdP 3/5D6WvQAvn4Bd3JzEZSQzzD4oXsKtEoBsW0ShjTI2T7XUuoH51pNnVj+bqfgkFjgutovG ZXqPmJPw38HKP+b7ZPkNwa5MzLXjHx746eJUihICAPE5qs27b1ZcO6CGGC/ewx4mF+e6Ti +kEl9caOlGQFFurLTMQ9RVdSunfZxA7IMKyxfTj8oBkjuevCMgK/uXlxQqX+WA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKMGL3d1yzXjr for ; Mon, 23 Feb 2026 13:32:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 46ae9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Feb 2026 13:32:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: George V. Neville-Neil Subject: git: d967f923caaa - stable/15 - Convert fully to Python 3. Remove licence text, only keep SPDX. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gnn X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d967f923caaaaf9a4efd74d1c442788377e2bc89 Auto-Submitted: auto-generated Date: Mon, 23 Feb 2026 13:32:10 +0000 Message-Id: <699c56da.46ae9.50327ab4@gitrepo.freebsd.org> The branch stable/15 has been updated by gnn: URL: https://cgit.FreeBSD.org/src/commit/?id=d967f923caaaaf9a4efd74d1c442788377e2bc89 commit d967f923caaaaf9a4efd74d1c442788377e2bc89 Author: George V. Neville-Neil AuthorDate: 2026-01-05 11:40:12 +0000 Commit: George V. Neville-Neil CommitDate: 2026-02-23 13:31:43 +0000 Convert fully to Python 3. Remove licence text, only keep SPDX. Update to use argparse rather than OptionParser (now deprecated). (cherry picked from commit eb1c0d74cbb99f329767b3d565ae57a3ec032bee) --- tools/test/hwpmc/pmctest.py | 73 ++++++++++++--------------------------------- 1 file changed, 19 insertions(+), 54 deletions(-) diff --git a/tools/test/hwpmc/pmctest.py b/tools/test/hwpmc/pmctest.py index 4bd4910b00a9..bda2f3500d7d 100755 --- a/tools/test/hwpmc/pmctest.py +++ b/tools/test/hwpmc/pmctest.py @@ -2,37 +2,9 @@ # SPDX-License-Identifier: BSD-3-Clause # # Copyright (c) 2012, Neville-Neil Consulting +# Copyright (c) 2026, George V. Neville-Neil # All rights reserved. # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# Neither the name of Neville-Neil Consulting nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# Author: George V. Neville-Neil -# # Description: A program to run a simple program against every available # pmc counter present in a system. @@ -44,17 +16,19 @@ # This should result in ls being run with every available counter # and the system should neither lock up nor panic. # -# The default is to wait after each counter is tested. Since the +# The default is not to wait after each counter is tested. Since the # prompt would go to stdout you won't see it, just press return # to continue or Ctrl-D to stop. -import sys import subprocess from subprocess import PIPE +import argparse -# Use input() for Python version 3 -if sys.version_info[0] == 3: - raw_input = input +def gather_counters(): + """Run program and return output as array of lines.""" + result = subprocess.run("pmccontrol -L", shell=True, capture_output=True, text=True) + tabbed = result.stdout.strip().split('\n') + return [line.replace('\t', '') for line in tabbed] # A list of strings that are not really counters, just # name tags that are output by pmccontrol -L @@ -62,37 +36,28 @@ notcounter = ["IAF", "IAP", "TSC", "UNC", "UCF", "UCP", "SOFT" ] def main(): - from optparse import OptionParser - - parser = OptionParser() - parser.add_option("-p", "--program", dest="program", - help="program to execute") - parser.add_option("-w", "--wait", action="store_true", dest="wait", - default=True, help="wait after each execution") + parser = argparse.ArgumentParser(description='Exercise a program under hwpmc') + parser.add_argument('--program', type=str, required=True, help='target program') + parser.add_argument('--wait', action='store_true', help='Wait after each counter.') - (options, args) = parser.parse_args() + args = parser.parse_args() - if (options.program == None): - print("specify program, such as ls, with -p/--program") - sys.exit() - - p = subprocess.Popen(["pmccontrol", "-L"], stdout=PIPE) - counters = p.communicate()[0] + counters = gather_counters() if len(counters) <= 0: print("no counters found") sys.exit() - for counter in counters.split(): + for counter in counters: if counter in notcounter: continue - p = subprocess.Popen(["pmcstat", "-p", counter, options.program], - stdout=PIPE) - result = p.communicate()[0] + p = subprocess.Popen(["pmcstat", "-p", counter, args.program], + text=True, stderr=PIPE) + result = p.communicate()[1] print(result) - if (options.wait == True): + if (args.wait == True): try: - value = raw_input("next?") + value = input("Waitin for you to press ENTER") except EOFError: sys.exit() From nobody Mon Feb 23 13:32:11 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKMGM6Nhlz6TNcM for ; Mon, 23 Feb 2026 13:32:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKMGM4x1vz3HsM for ; Mon, 23 Feb 2026 13:32:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771853531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3wAdWOcXjhXafe4VMERqbCcWJcSLBmKPLotA0yQX9f0=; b=bP2ZdjX8Pwh8L+iLu36/8VM24zutpAsegVovtbTQ02SOCqUwrXBUb+SMnJ0dgqQ0ONntjB EOvA48ujvDssKuyCz9i1tPLYXnf7pHsSesIrWqxJf4VCVI1Egyq31GJBFjAAF9I+56IU8c YeSFtFa87C9U9Rgd6AkVQ7QB9Yh6vnJnLVfkAluvqFD8UifYbGJZ8MPH3z0tQq/vgg3u96 t0wMbGWqRXt4nwQdXmK6yFi/kQ05rRr8Ye/vs2AZcPCEj5oPbn600UsbohHI9gTZCQ5fIH wJcS7Fd5Fz4A6sgeQNCdhYF526sif8rIL+U7oeQUmLOVPk+rnbkIIPsBXAJo6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771853531; a=rsa-sha256; cv=none; b=T0QlRbVxQ1JTb1fcFDM1GzHcXHZy0h/8cD/MXyPC+P/z6r4wkkcX8b6u5av5s9OD0T/Ie5 WFqnzQBuA/yh5mRiRUBd7hsEEUnLwxHdMRev3l1O/kHSgIH87XgsH/9TJwAevY+PfmgBc+ DBJNN3p8VVse92HuM9qOLrsV2ozZH0F+DZdmSe6MHOBU0ZWMm15o75RtzEeIyBIuhMNb4u SAvakwTLndZ5jw2LukKV4Boy/KxJWgpNG5BTZdIVYXY5DCnnH0Kprq6uQaHAqWiPrAGJDq 4iZU5s/1a8H3JwrEUwkLXIJwh/nQs7lUmuMG/0mpdadoC2vHCdBGXNjhfSLwEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771853531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3wAdWOcXjhXafe4VMERqbCcWJcSLBmKPLotA0yQX9f0=; b=SR6fvZEzp/kw9ynwQhqzJASgYLFPyFHS4H6moUimdlo0B3TQVbjHT3hk8WLyKRX+eHWQCA F1xyEH6lP6Q4z459kl4bg/X/CsEfn3ScEYtq7nIbtGu25v8tUvcS1yT/7yoypOMi0xaZ1Y dETSv8KBWWgiur78KRbUBWoft241b8fAaMnvZNvM7//VJ8FR7QgjLxeOiA1C8BVwTc/6Kl 71gJGjPhKnT/E4oDWqx3N22TsFe4I0OCr9kdz0/53jLpak6ozjDz8dZSrRj2cGuUpqKVdC TzK3toYvv8koikbrxT+dofotameDWatLMfFTiu2VDSt33Vv+MWB5gyGdWiO7qQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKMGM4QHszXPv for ; Mon, 23 Feb 2026 13:32:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 462e3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Feb 2026 13:32:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: George V. Neville-Neil Subject: git: 076e75332575 - stable/15 - Start adding an exercise mode for programs under test. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gnn X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 076e753325758b211e9987d76c3452bc550c0488 Auto-Submitted: auto-generated Date: Mon, 23 Feb 2026 13:32:11 +0000 Message-Id: <699c56db.462e3.405cbbec@gitrepo.freebsd.org> The branch stable/15 has been updated by gnn: URL: https://cgit.FreeBSD.org/src/commit/?id=076e753325758b211e9987d76c3452bc550c0488 commit 076e753325758b211e9987d76c3452bc550c0488 Author: George V. Neville-Neil AuthorDate: 2026-01-05 12:30:22 +0000 Commit: George V. Neville-Neil CommitDate: 2026-02-23 13:31:49 +0000 Start adding an exercise mode for programs under test. In exercise mode we collect data for every available counter on a program and keep all of that in a directory in /tmp. (cherry picked from commit 4a1b69ade6b5e8665dfb4d0cb683854705192a68) --- tools/test/hwpmc/pmctest.py | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/tools/test/hwpmc/pmctest.py b/tools/test/hwpmc/pmctest.py index bda2f3500d7d..f54541aeea1e 100755 --- a/tools/test/hwpmc/pmctest.py +++ b/tools/test/hwpmc/pmctest.py @@ -23,6 +23,7 @@ import subprocess from subprocess import PIPE import argparse +import tempfile def gather_counters(): """Run program and return output as array of lines.""" @@ -39,6 +40,7 @@ def main(): parser = argparse.ArgumentParser(description='Exercise a program under hwpmc') parser.add_argument('--program', type=str, required=True, help='target program') parser.add_argument('--wait', action='store_true', help='Wait after each counter.') + parser.add_argument('--exercise', action='store_true', help='Exercise the program being studied using sampling counters.') args = parser.parse_args() @@ -48,19 +50,32 @@ def main(): print("no counters found") sys.exit() + if args.exercise == True: + tmpdir = tempfile.mkdtemp() + print("Exercising program ", args.program, " storing results data in ", tmpdir) + for counter in counters: if counter in notcounter: continue - p = subprocess.Popen(["pmcstat", "-p", counter, args.program], + if args.exercise == True: + p = subprocess.Popen(["pmcstat", + "-O", tmpdir + "/" + args.program + "-" + counter + ".pmc", + "-g", + "-P", counter, args.program], + text=True, stderr=PIPE) + result = p.communicate()[1] + print(result) + else: + p = subprocess.Popen(["pmcstat", "-p", counter, args.program], text=True, stderr=PIPE) - result = p.communicate()[1] - print(result) - if (args.wait == True): - try: - value = input("Waitin for you to press ENTER") - except EOFError: - sys.exit() - + result = p.communicate()[1] + print(result) + if (args.wait == True): + try: + value = input("Waitin for you to press ENTER") + except EOFError: + sys.exit() + # The canonical way to make a python module into a script. # Remove if unnecessary. From nobody Mon Feb 23 13:32:12 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKMGP4FZ7z6TNtq for ; Mon, 23 Feb 2026 13:32:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKMGN6bT7z3Hvs for ; Mon, 23 Feb 2026 13:32:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771853532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CeJm/qwgzo7p5/5+DXWALZ8B4Sj9y0F8VzuAoQCb9q4=; b=qWh1bQ927ijMy1/oSlFsmcDbrqszuTmbbGtQa4krWRQbw4jn3gX4xyJMxouPzcMo+8kO0U 8OWtj2c0YBsWUE8MwsmrxWfoVPi5lkBlQMia9GlLTkgGvmc/P5CrxLBPdtN7VWLhln6XGa H10r5RCl3Usy4ujYdF+YQfCm7Xl0YmJLA+clWbTVJfXNvMHP/ewcOBWec1OSAl27my0Ymm DzbVo5Kpi1LP8cTf5nFyf+uTp3XCJr7GgJz0b2z1MYGzUko4YkjeMhVTY++T35eIGpMkEK 3Ckor1ZSaaoGNidlm6yfYadbffRS1Q90Wx2XCFMX/7JamwpV7lZp6siZRMvZNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771853533; a=rsa-sha256; cv=none; b=yafvhvRYgG9/REjzHl//KraBjCmR7orUfdZu5m+jx8AENQlilo59H5LQbjjyo99NHN/pVr 2JmdX8BNKE3UXBOo7lMSbQqMCsQmIwMwfttYQh+UYx+e86ACMtA6OQoC5g9F6DLrJFUJLw pBrYdfroIQ6osjZi0ehWurG4SkQNkb8TZ1bcFIpKiDTQPTS9nYsjNIt5rk59kTWfPpohVt csyYL8MjoHVJMM7B5OjEkNwTDOGiwTCW0W5V9HT2UR5aVfWFRtVgUJig92QdiXIcL+sDUw SrTDm+vfwAft4f9B7/NdYn6UKcCDJyBc+ZQF6NFcI0c3ioWxDyNmsJiiV+VvbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771853533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CeJm/qwgzo7p5/5+DXWALZ8B4Sj9y0F8VzuAoQCb9q4=; b=eh19wNvLl9rViaGnqNJWWRLzUBRMrwFVRtl48UUf90ol7fJAKBssRNrDIucJj9CWY60t6U qGnaR+dSD+paUoG1Kfba0t8BISdRJ+19whnyMJ6N+/lDGyiSVXgWsZnmEloxR+mW0wM7D9 sYuYtVqe4CUad2JvrcGUy6EXjXw5HfjWrxKjHTUUNicEs1kIqwKqj0srDffhayPPJvIo2Q jCtwK1va7pOS2pQkXy6Yeqpp/YmYfkmgylRMUvwXyN6rMe9mNufwrNn8OTANA0cxdHYgSS gpLJImyYtYpJ4cYOomN+KWlhRwJ+zNG78TaHW0n4980ROPB1CYvizHpnHO6vJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKMGN5F6XzXN0 for ; Mon, 23 Feb 2026 13:32:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 47835 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Feb 2026 13:32:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: George V. Neville-Neil Subject: git: 4db1b93235c4 - stable/15 - Correct the data collection arguments. Add proper tempdirs. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gnn X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4db1b93235c4f657bdf6cdb81891fe46d5f8bb18 Auto-Submitted: auto-generated Date: Mon, 23 Feb 2026 13:32:12 +0000 Message-Id: <699c56dc.47835.4d61270a@gitrepo.freebsd.org> The branch stable/15 has been updated by gnn: URL: https://cgit.FreeBSD.org/src/commit/?id=4db1b93235c4f657bdf6cdb81891fe46d5f8bb18 commit 4db1b93235c4f657bdf6cdb81891fe46d5f8bb18 Author: George V. Neville-Neil AuthorDate: 2026-01-06 08:17:38 +0000 Commit: George V. Neville-Neil CommitDate: 2026-02-23 13:31:49 +0000 Correct the data collection arguments. Add proper tempdirs. (cherry picked from commit e018fedef0a6389240322da9fa4b9fa9971f6e59) --- tools/test/hwpmc/pmctest.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/test/hwpmc/pmctest.py b/tools/test/hwpmc/pmctest.py index f54541aeea1e..8accdf09e69a 100755 --- a/tools/test/hwpmc/pmctest.py +++ b/tools/test/hwpmc/pmctest.py @@ -20,10 +20,12 @@ # prompt would go to stdout you won't see it, just press return # to continue or Ctrl-D to stop. +import sys import subprocess from subprocess import PIPE import argparse import tempfile +from pathlib import Path def gather_counters(): """Run program and return output as array of lines.""" @@ -50,8 +52,10 @@ def main(): print("no counters found") sys.exit() + program = Path(args.program).name + if args.exercise == True: - tmpdir = tempfile.mkdtemp() + tmpdir = tempfile.mkdtemp(prefix=program + "-", suffix="-pmc") print("Exercising program ", args.program, " storing results data in ", tmpdir) for counter in counters: @@ -59,8 +63,7 @@ def main(): continue if args.exercise == True: p = subprocess.Popen(["pmcstat", - "-O", tmpdir + "/" + args.program + "-" + counter + ".pmc", - "-g", + "-O", tmpdir + "/" + program + "-" + counter + ".pmc", "-P", counter, args.program], text=True, stderr=PIPE) result = p.communicate()[1] From nobody Mon Feb 23 13:32:14 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKMGR42xSz6TNv5 for ; Mon, 23 Feb 2026 13:32:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKMGR0TCkz3HyY for ; Mon, 23 Feb 2026 13:32:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771853535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HTTQmg9YE4V+oO73aDfrHsRVHmMkccJIeTgHEKUzB5U=; b=DqQgJ1XbYvjFV1JB3HMob+pmLCCDLRsYBFLb5XlqkDFe1z6IOkDk5mIVDmxR2/HHu7c+sF e0gcwUTQEsuujIKdHYBvklxRzuZJzXXjs3YKf9CYcRXPA+Qg3lc1oTQtAYNqYggNSrZZZ8 L5Ho7N79hoE8+Kj0usLEsj+bW0dgZmjOAGW6+WaHwOacRNY0+NZ8xNA/Gy6tQg3exPOTAn XNS1Hwa9iJdby3auHpRWhxXNa9DjqsaOjur0XaciGqPlvy3fQGg3jSLQ9d4AVHYMAeEYIs 6ROZfkNPWkap06VNbosFSwQzZ/gb2EGEqALr18BExGwbuG41vCokE/C38Iy0Lw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771853535; a=rsa-sha256; cv=none; b=YEE6dtuVzIf3kzJPdhsQXfNxKq+/xfpVBcHVlBAfoORpvBGr18oI52xVzC0kJf+60iwfJV nFS3Fve3mFMgzVxRW5LDdopEwhOOTFANIfBYmhmabjVUIEPdc8cqx8MM3gZ68HFaXcZJqd hcC/RIWbsbtzpZxUe64E1/3WSNforiwTzu6eglUZ4s+vGVYU0xqd/GN+DXrFR4l1hYWiQi SrycVSjmHe5HzjhYh5Tl0g18rPNEn6rq0fWpzoXu25fZO7IcYTLlGw5+4v9SP6cKQOfdUC Kco3n0IsnafRg4gmG9U5CwxJwZHHw41xvaxNHbpDwp57pjSHFwgJXSuvsBrYGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771853535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HTTQmg9YE4V+oO73aDfrHsRVHmMkccJIeTgHEKUzB5U=; b=lCyKMgMnrSqttPq3P9TEn9bYY3z27OpuXXivmqvdXorQqI0vfLULMPSDvOM4JuwQbBNX24 E8XLwf+BaqDqkOR04AHNyLdkDm2c19wBlSnP9O5D4PNYz5VWnyshwX8kfwM3NCW18HoYxo akkwkYcAZmcWqeXA8XEjFbLuSc6kRyd4UDqZV7hsGYP6rsneepmelD/dpQmQlrdle/Tf0c C+U5EaTw+kxxwkL63tVKuo3pgnIzZ24UFyefDavDP0dAnRhBNoHbaRuZ4RazAflsEhN6ho wBGjUPB5bDj7UAIHeDSTzbJFXs+0QRzqfYnT6f0mo4GGmJOGuZzRbW1uWL1KPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKMGQ6ZtTzXPc for ; Mon, 23 Feb 2026 13:32:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 47839 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Feb 2026 13:32:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: George V. Neville-Neil Subject: git: 2b00065616a2 - stable/15 - Extend the script to collect gprof data List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gnn X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2b00065616a2857e58a68ba97d3f0136a53108a4 Auto-Submitted: auto-generated Date: Mon, 23 Feb 2026 13:32:14 +0000 Message-Id: <699c56de.47839.2624a319@gitrepo.freebsd.org> The branch stable/15 has been updated by gnn: URL: https://cgit.FreeBSD.org/src/commit/?id=2b00065616a2857e58a68ba97d3f0136a53108a4 commit 2b00065616a2857e58a68ba97d3f0136a53108a4 Author: George V. Neville-Neil AuthorDate: 2026-01-08 04:13:04 +0000 Commit: George V. Neville-Neil CommitDate: 2026-02-23 13:31:50 +0000 Extend the script to collect gprof data While we're at it, switch to simple waiting from communicate() calls. (cherry picked from commit e2bedc7d69926426a710d035df51e0a0812d38b1) --- tools/test/hwpmc/pmctest.py | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/tools/test/hwpmc/pmctest.py b/tools/test/hwpmc/pmctest.py index 588fe6d79e83..ba20306f1d68 100755 --- a/tools/test/hwpmc/pmctest.py +++ b/tools/test/hwpmc/pmctest.py @@ -26,6 +26,7 @@ from subprocess import PIPE import argparse import tempfile from pathlib import Path +import os def gather_counters(): """Run program and return output as array of lines.""" @@ -75,20 +76,42 @@ def main(): p = subprocess.Popen(["pmcstat", "-p", counter, args.program], text=True, stderr=file, stdout=file) - result = p.communicate()[1] + result = p.wait() print(result) elif args.sample == True: + pmcout = tmpdir + "/" + program + "-" + counter + ".pmc" p = subprocess.Popen(["pmcstat", - "-O", tmpdir + "/" + program + "-" + counter + ".pmc", + "-O", pmcout, "-P", counter, args.program], text=True, stderr=PIPE) - result = p.communicate()[1] + result = p.wait() + resdir = tmpdir + "/" + program + "-" + counter + ".results" + os.makedirs(resdir) + p = subprocess.Popen(["pmcstat", + "-R", pmcout, + "-g"], + cwd=resdir, + text=True, stderr=PIPE) + result = p.wait() + gmondir = resdir + "/" + counter + if Path(gmondir).is_dir(): + with open(gmondir + "/" + "gprof.out", "w") as file: + p = subprocess.Popen(["gprof", + args.program, + program + ".gmon"], + cwd=gmondir, + text=True, + stdout=file, + stderr=subprocess.STDOUT) + result = p.wait() + else: + print ("Failed to get gmon data for ", counter) print(result) else: p = subprocess.Popen(["pmcstat", "-p", counter, args.program], text=True, stderr=PIPE) - result = p.communicate()[1] + result = p.wait() print(result) if (args.wait == True): try: From nobody Mon Feb 23 13:32:13 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKMGQ1tm1z6TP5H for ; Mon, 23 Feb 2026 13:32:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKMGP6pGrz3JBp for ; Mon, 23 Feb 2026 13:32:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771853533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YjbkcYZPDK9/Mq77BCFopJAIFyH9FQ6JhY83LekRH3E=; b=TJzsLfnHC6fDeguZEomU48JtFe7Vz6/2qszgNrTOQefp1AsZxbo9pWyZTluIRqqgIjKrA4 FY6Ctl6iXEJsFFPPkVCRXbmlNrttVrSX9ihdPF8EBKPdz0kZRsulAU+TweoiQLc7/romSs QhJWzzEG0L7nS9GPbcmuXlHZt8a2RHlj3JIOZgPyuxIbRtRxEbk98a1nkJkoNfWuZOTYmE vKiTM6ddPDUqYy6PM5uJqsirABQjAMhDBMTz+Mc7eMqcRcDZo2HbI4uWS0X1xGnMutiteb N5iiheXM/puDljR1OAlUJR7ieRctY8g5aaTEIxbi5EXru/iMcmSqtad/hNvfkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771853534; a=rsa-sha256; cv=none; b=xD1XFxSUhBlCKoVZzQEumrb+jFcPr4hjpguO8aKHFt7frHduQPlGKPjgpEJ5Jv4Cw9PjQX 7A/bk7qUafUawwsOiUE2N6PArAbYsZI2YHZKYsFP26NzWYzWiBvL2moaAzmDjB8SywsJBt gWy1NzR+jgldHz61ErxTgcL4pMPRQa4TVrH+bBel7+LIo0rL73FUA+oadMsAZrO/PStzae Exa3F1ou9uaYrX4cqVFwPS+CNT+sBnKUN+ai2EUWpHA/XBEulaJpBedqk636WQG2XcCg+v u8zKe8dAwz+KIqaM7a/LYqMRoU30k5UBPgYAFakWeJd6GcpxHk+3AKMFLH0Y3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771853534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YjbkcYZPDK9/Mq77BCFopJAIFyH9FQ6JhY83LekRH3E=; b=WoQ52IVQF0E2C4hrwXq4eFEmQ0Xw+tHHAsVqvgsh7ViNgDrJt3s48TzhQW0v09BoeIRmhX h0SW4Y8XFijHRipprZdRdq+y0vpRcDtcYK+hqsfH+jas1KM2SxICmikPO8ZitVgrnETfuf 4Vyf9ZIB5C1xiEzJY+LwZAG62pNx65Nfylr+XRmguBYUuy+x0zEckY5tEzMWDYML3gBCNJ e2+mB/4wrNE4ScnY5kzIvkwMXG6xHd3mh0BDXGuzhJDsV8ouDHru3F9unM+qe1JqrBdGiw s82v4JyNVZkCdag0bj9M+UbyER0ald3nmhDkYDV5DhKcuw4tDs4YazTlg7xWaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKMGP61fSzXgR for ; Mon, 23 Feb 2026 13:32:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 471a2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Feb 2026 13:32:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: George V. Neville-Neil Subject: git: 4a9a27036186 - stable/15 - Split counting from sampling. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gnn X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4a9a2703618663ccc59a114d1463ab5ef710ff2e Auto-Submitted: auto-generated Date: Mon, 23 Feb 2026 13:32:13 +0000 Message-Id: <699c56dd.471a2.d285ce0@gitrepo.freebsd.org> The branch stable/15 has been updated by gnn: URL: https://cgit.FreeBSD.org/src/commit/?id=4a9a2703618663ccc59a114d1463ab5ef710ff2e commit 4a9a2703618663ccc59a114d1463ab5ef710ff2e Author: George V. Neville-Neil AuthorDate: 2026-01-06 08:55:14 +0000 Commit: George V. Neville-Neil CommitDate: 2026-02-23 13:31:50 +0000 Split counting from sampling. (cherry picked from commit 77153a491e3b31475f5faddb21271a0a8e0d4a9b) --- tools/test/hwpmc/pmctest.py | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/tools/test/hwpmc/pmctest.py b/tools/test/hwpmc/pmctest.py index 8accdf09e69a..588fe6d79e83 100755 --- a/tools/test/hwpmc/pmctest.py +++ b/tools/test/hwpmc/pmctest.py @@ -42,7 +42,8 @@ def main(): parser = argparse.ArgumentParser(description='Exercise a program under hwpmc') parser.add_argument('--program', type=str, required=True, help='target program') parser.add_argument('--wait', action='store_true', help='Wait after each counter.') - parser.add_argument('--exercise', action='store_true', help='Exercise the program being studied using sampling counters.') + parser.add_argument('--count', action='store_true', help='Exercise the program being studied using counting mode pmcs.') + parser.add_argument('--sample', action='store_true', help='Exercise the program being studied using sampling mode pmcs.') args = parser.parse_args() @@ -52,22 +53,38 @@ def main(): print("no counters found") sys.exit() + if args.count == True and args.sample == True: + print("Choose one of --count OR --sample.") + sys.exit() + program = Path(args.program).name - if args.exercise == True: - tmpdir = tempfile.mkdtemp(prefix=program + "-", suffix="-pmc") + if args.count == True: + tmpdir = tempfile.mkdtemp(prefix=program + "-", suffix="-counting-pmc") + print("Exercising program ", args.program, " storing results data in ", tmpdir) + + if args.sample == True: + tmpdir = tempfile.mkdtemp(prefix=program + "-", suffix="-sampling-pmc") print("Exercising program ", args.program, " storing results data in ", tmpdir) for counter in counters: if counter in notcounter: continue - if args.exercise == True: + if args.count == True: + with open(tmpdir + "/" + program + "-" + counter + ".txt", 'w') as file: + p = subprocess.Popen(["pmcstat", + "-p", counter, args.program], + text=True, stderr=file, stdout=file) + result = p.communicate()[1] + print(result) + elif args.sample == True: p = subprocess.Popen(["pmcstat", "-O", tmpdir + "/" + program + "-" + counter + ".pmc", "-P", counter, args.program], text=True, stderr=PIPE) result = p.communicate()[1] print(result) + else: p = subprocess.Popen(["pmcstat", "-p", counter, args.program], text=True, stderr=PIPE) From nobody Mon Feb 23 13:33:44 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKMJ85L0dz6TNt6 for ; Mon, 23 Feb 2026 13:33:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKMJ835Rbz3KxK for ; Mon, 23 Feb 2026 13:33:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771853624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yRQ6dXXUTiEsyMcBiCB/o9S8fh+lTFrOYOvDHKGCAQc=; b=KdHcb35myY9X53LzQKugZWx3hies5j5Ke4t5MDbJ4gqtmnCC4m8FJmOvt09BrYa10YpyYB 1VUcvy9l44zse34jiKGsiImZLTP/eLWG6aE4En5qtSVdJ19CbOb7oDiIUVeiMkYPzsmCvO QX8OaNig5eJWZL5Ng6bsuRuEn44dUTaONwQVJJjXoytaZACjLrMwUpsU3MSmcvJBBOWK1y jmfDxi+bRKJ6l/e/efw84scmpqvbhpaqGnjpQ/Oo3cMraQibw5c5zdnGyAfFI3TE6uGEfG 949KIQlTNXP+kjW2bTapGll4LY4bmrWKUiioYu4FStiYG9FT8T2KSxwkVfjTYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771853624; a=rsa-sha256; cv=none; b=Vqn/QZLWOtBGjMPhucitGHXzh2Pyn2q4d+tIZBgs5fwJt6aqtptw8giIw9katsCucKsYY+ SwFJ8ZcGl78GaaRKUHiryGTU2pb1zoMpGBFhPA2A81lr2WRko1dDeqYq+Vc6x0paVkY535 3JFhT8nvMv1xQ3vLrCUtBDDMb9pQL8p+YDHXOgfR/clg1l4LetwDeisoDfa86bUgxHJlKD u7oNNnXrSMi0ngWGKUsga9CT0XGPIURQxVOA4rUJu9OeOZI4ExJ2MvaFEkReAV1NCFuZEX EFdD3CkS6YLHGYJCenpeZI/H7pki3ULNC6WUEZcYsPpHtYJXx8MCeiHmPBJYCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771853624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yRQ6dXXUTiEsyMcBiCB/o9S8fh+lTFrOYOvDHKGCAQc=; b=xUzhD0KEM/7b39EcXuF9pxpeeBVAySuQjylxEDOKswy2foqypmIssSiIGC5jAnqFsCivms KCcU1HCVSbsYKaDWl19kQG6oZ/NISYMQlARgfM8PhHOtNVO24wRmTM+VKc7oGWswTwMRtN u/yWag98dtc+xlJToiQ2P//bSKcv1HgdRNDCFkFit03HIUVsQ9BTLavGdKDDwHZOxoyfxr 7i0mq4KESlEeu44y2d2mRs4UfwmBI5qOK6TFAOzYE2S4YvfeJ3BpA7L5qH1Cjo5GQuNpo+ DXIUsFr1rr/pmQu/ehekaB58vU6MkaUrhalzuWO7c8XhT5IJ0+jkyNu0TtPNnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKMJ82MdTzY1y for ; Mon, 23 Feb 2026 13:33:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 46167 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Feb 2026 13:33:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: George V. Neville-Neil Subject: git: 9f80b89c5a4e - stable/14 - Convert fully to Python 3. Remove licence text, only keep SPDX. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gnn X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9f80b89c5a4ee66c9428f0d240899d77f442079f Auto-Submitted: auto-generated Date: Mon, 23 Feb 2026 13:33:44 +0000 Message-Id: <699c5738.46167.75b11eaa@gitrepo.freebsd.org> The branch stable/14 has been updated by gnn: URL: https://cgit.FreeBSD.org/src/commit/?id=9f80b89c5a4ee66c9428f0d240899d77f442079f commit 9f80b89c5a4ee66c9428f0d240899d77f442079f Author: George V. Neville-Neil AuthorDate: 2026-01-05 11:40:12 +0000 Commit: George V. Neville-Neil CommitDate: 2026-02-23 13:33:27 +0000 Convert fully to Python 3. Remove licence text, only keep SPDX. Update to use argparse rather than OptionParser (now deprecated). (cherry picked from commit eb1c0d74cbb99f329767b3d565ae57a3ec032bee) --- tools/test/hwpmc/pmctest.py | 73 ++++++++++++--------------------------------- 1 file changed, 19 insertions(+), 54 deletions(-) diff --git a/tools/test/hwpmc/pmctest.py b/tools/test/hwpmc/pmctest.py index 4bd4910b00a9..bda2f3500d7d 100755 --- a/tools/test/hwpmc/pmctest.py +++ b/tools/test/hwpmc/pmctest.py @@ -2,37 +2,9 @@ # SPDX-License-Identifier: BSD-3-Clause # # Copyright (c) 2012, Neville-Neil Consulting +# Copyright (c) 2026, George V. Neville-Neil # All rights reserved. # -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# Neither the name of Neville-Neil Consulting nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# Author: George V. Neville-Neil -# # Description: A program to run a simple program against every available # pmc counter present in a system. @@ -44,17 +16,19 @@ # This should result in ls being run with every available counter # and the system should neither lock up nor panic. # -# The default is to wait after each counter is tested. Since the +# The default is not to wait after each counter is tested. Since the # prompt would go to stdout you won't see it, just press return # to continue or Ctrl-D to stop. -import sys import subprocess from subprocess import PIPE +import argparse -# Use input() for Python version 3 -if sys.version_info[0] == 3: - raw_input = input +def gather_counters(): + """Run program and return output as array of lines.""" + result = subprocess.run("pmccontrol -L", shell=True, capture_output=True, text=True) + tabbed = result.stdout.strip().split('\n') + return [line.replace('\t', '') for line in tabbed] # A list of strings that are not really counters, just # name tags that are output by pmccontrol -L @@ -62,37 +36,28 @@ notcounter = ["IAF", "IAP", "TSC", "UNC", "UCF", "UCP", "SOFT" ] def main(): - from optparse import OptionParser - - parser = OptionParser() - parser.add_option("-p", "--program", dest="program", - help="program to execute") - parser.add_option("-w", "--wait", action="store_true", dest="wait", - default=True, help="wait after each execution") + parser = argparse.ArgumentParser(description='Exercise a program under hwpmc') + parser.add_argument('--program', type=str, required=True, help='target program') + parser.add_argument('--wait', action='store_true', help='Wait after each counter.') - (options, args) = parser.parse_args() + args = parser.parse_args() - if (options.program == None): - print("specify program, such as ls, with -p/--program") - sys.exit() - - p = subprocess.Popen(["pmccontrol", "-L"], stdout=PIPE) - counters = p.communicate()[0] + counters = gather_counters() if len(counters) <= 0: print("no counters found") sys.exit() - for counter in counters.split(): + for counter in counters: if counter in notcounter: continue - p = subprocess.Popen(["pmcstat", "-p", counter, options.program], - stdout=PIPE) - result = p.communicate()[0] + p = subprocess.Popen(["pmcstat", "-p", counter, args.program], + text=True, stderr=PIPE) + result = p.communicate()[1] print(result) - if (options.wait == True): + if (args.wait == True): try: - value = raw_input("next?") + value = input("Waitin for you to press ENTER") except EOFError: sys.exit() From nobody Mon Feb 23 13:33:45 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKMJ95LVtz6TP4F for ; Mon, 23 Feb 2026 13:33:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKMJ93cMVz3Kb2 for ; Mon, 23 Feb 2026 13:33:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771853625; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ryQLJWOy0MBUFHonYX9XIpsbuVb0XCyEBscQnj6phw0=; b=f2LJ9m8FCv9szhFw9hc+GFHPdCgALv/3tLijjtc1hSBZ2U7HYXuOWfTpW6e4jHenfRWB1T N7OL3QjOA212qTABuMgRCAoIGVPrhEES17z403Ts7jfE2WUbrKi1bFqTju9jSoxzFa8G/G h6sT9p4oVJNCoDr5RiVqNJ87fp2P0c/CsxzVbjbUpHeOWF7BFoXIuY4ywFciMwXhcYEDOq WEcxAVRm9UTjNRYM+EbsUTJ29AVF8+9xK8zQdFFh6E5qkPHBUN64wYkxDAUnK2+Gl+na5O SZeA3hjcFaoB9G9X0PAD5TwjfBbeSj+nQaXu0if8Eh4LHcdU+as6IuIvIYhYyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771853625; a=rsa-sha256; cv=none; b=GsfY0l7B27C7Q6AAmjIAr9+Q+4xrsufmtikSiS2kEDgJL9WN6IYSnZENeowxAwL6EHrK9A AZKTOamvecx+tXNjtv7kxUdW7EK0xO6EiOkKzT35y/Wvgqx5lRjxNjEyY/x+klaSsVX/95 hVZYS+jCQdX2Y9ifn/E6g5yMSURFdlwpHqJByPYNkPIHDMApLoqfkIi+aWIV3ZZ8ezL7gX EGHaB2Uqs4NZcP0dbTct7nq9FggPDcQ9j1BPm5d+jTLBWQw1vy2U21HdYUgZzCwegGJTiq 4ZTuM4bsCrG0LeF2Ogz+JEow43rDEqfSuPEyKflPRUU3Sa92DdOZkohyvxD5Gg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771853625; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ryQLJWOy0MBUFHonYX9XIpsbuVb0XCyEBscQnj6phw0=; b=SK3ZEcsFB8ukN4v4vncMyPTJO2uTN9TD9UmWfPp8tbOdZ6i7SQM4z2Uz96vgkz5Ya1HDry ILRevrJgU8OXlNYgmIuUt/DcLCaCKzY7pGTxqstY0vErkJnq61Im8Gt4lVGXxEivO5F2Tx aOSkkPzf0B/QTJ2XnOWtOMGUMOeqm69vbQUFiyrZNNW4+0XPoFmgAZnjKj73DcoR9t9Zf5 94zFUyM26VKLg1RsNXhGUgEMJkxGPlPywlBc9SIfPnsP+PhoYQhVPXvvIELm2omX4LjTs+ 7i/XI54XUwG7DO5/a9vv8buiPPFg85CuMhHrL4cKQBp6JHsg0OdHjaXCAhxs8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKMJ93B20zXQC for ; Mon, 23 Feb 2026 13:33:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 47f83 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Feb 2026 13:33:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: George V. Neville-Neil Subject: git: 711ab199b51a - stable/14 - Start adding an exercise mode for programs under test. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gnn X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 711ab199b51aae8fa4eaddfd6a3ff1e63205375b Auto-Submitted: auto-generated Date: Mon, 23 Feb 2026 13:33:45 +0000 Message-Id: <699c5739.47f83.5c531706@gitrepo.freebsd.org> The branch stable/14 has been updated by gnn: URL: https://cgit.FreeBSD.org/src/commit/?id=711ab199b51aae8fa4eaddfd6a3ff1e63205375b commit 711ab199b51aae8fa4eaddfd6a3ff1e63205375b Author: George V. Neville-Neil AuthorDate: 2026-01-05 12:30:22 +0000 Commit: George V. Neville-Neil CommitDate: 2026-02-23 13:33:31 +0000 Start adding an exercise mode for programs under test. In exercise mode we collect data for every available counter on a program and keep all of that in a directory in /tmp. (cherry picked from commit 4a1b69ade6b5e8665dfb4d0cb683854705192a68) --- tools/test/hwpmc/pmctest.py | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/tools/test/hwpmc/pmctest.py b/tools/test/hwpmc/pmctest.py index bda2f3500d7d..f54541aeea1e 100755 --- a/tools/test/hwpmc/pmctest.py +++ b/tools/test/hwpmc/pmctest.py @@ -23,6 +23,7 @@ import subprocess from subprocess import PIPE import argparse +import tempfile def gather_counters(): """Run program and return output as array of lines.""" @@ -39,6 +40,7 @@ def main(): parser = argparse.ArgumentParser(description='Exercise a program under hwpmc') parser.add_argument('--program', type=str, required=True, help='target program') parser.add_argument('--wait', action='store_true', help='Wait after each counter.') + parser.add_argument('--exercise', action='store_true', help='Exercise the program being studied using sampling counters.') args = parser.parse_args() @@ -48,19 +50,32 @@ def main(): print("no counters found") sys.exit() + if args.exercise == True: + tmpdir = tempfile.mkdtemp() + print("Exercising program ", args.program, " storing results data in ", tmpdir) + for counter in counters: if counter in notcounter: continue - p = subprocess.Popen(["pmcstat", "-p", counter, args.program], + if args.exercise == True: + p = subprocess.Popen(["pmcstat", + "-O", tmpdir + "/" + args.program + "-" + counter + ".pmc", + "-g", + "-P", counter, args.program], + text=True, stderr=PIPE) + result = p.communicate()[1] + print(result) + else: + p = subprocess.Popen(["pmcstat", "-p", counter, args.program], text=True, stderr=PIPE) - result = p.communicate()[1] - print(result) - if (args.wait == True): - try: - value = input("Waitin for you to press ENTER") - except EOFError: - sys.exit() - + result = p.communicate()[1] + print(result) + if (args.wait == True): + try: + value = input("Waitin for you to press ENTER") + except EOFError: + sys.exit() + # The canonical way to make a python module into a script. # Remove if unnecessary. From nobody Mon Feb 23 13:33:46 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKMJB6Vhjz6TNqP for ; Mon, 23 Feb 2026 13:33:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKMJB4WK2z3KxS for ; Mon, 23 Feb 2026 13:33:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771853626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FyMOARZS5yEwU5D3R0X8si9j8VpPhhxyEXWgKESTrtc=; b=q6DUUnN07EEPs4JMOs6/RPn2tMhD+Yz0qPaiLiJklA6HEHXcxMHq32CBgMNEJ6t8+XhO8Z jXl27UpCGZbnKDofe2KZSY/6uddwyi9nfVh7+8DxmYmowkCWT3wRhqNHHw48TNtuOhyd9I TzvwG12HTrrXhe34YAZU/bgLC8Fh996/nIyOp3hhJRNLD1BMAbsLdFu/S6T10VblxP5dlj bWTWzgoHRah/9RjAOySjFWwpzRMAF/5XxI8C5kpAUDRzkMMccNOl2vnpQRaQVeBWoMorYg /2a7leELVKABAm8dcLZ/pKGQCxone0wWmIu3OI5zQ3KcIWaOD4cBCdwxdg0YKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771853626; a=rsa-sha256; cv=none; b=oSjGi67TexAKZh6qU58c8wKw2G1W8WG/KhvsHBA91DN2vHfe2s5bnh2vs2uVm7VNVzLMHl GkCMhd4ekGBamalG6QnCbOtE2oeJj5WJs0Sxfbt4zZhnXsiOF2L/cSwpU2qOpDlqLld8LP +gep7AT0EwE8uxA1rDLapODugwC/sIDs1un35J17zsUVhmMU1f4smGJbdKpDKPIuwWzVME oDiBcIjeFIz9aWPUujb0YKopq/AdjOS3yGY2lCg9ztGOVspYarv9EyANdZXJ9zovPGsdVF Xej1Qiormo7cavl99OqWT3WRprB+PH0AwXpodOJo7GpyM3oIt0jc07VwbyqrGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771853626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FyMOARZS5yEwU5D3R0X8si9j8VpPhhxyEXWgKESTrtc=; b=PufiNDVxOYfYV7/i7L8XTyJb1WZ3QwxBQE7U3eKrTNJ3MubYt7Pnr13s/xw2qrRlc1lXRb je8p5qEPwv7ppTpjNmhN3B59UEuKw7KR2kN+S0NDbX7hjGVY7TtEolPUNWzOvAb6JbcOR7 oCO9VyeSsbAxZDx+UJxNyCu4Sd34qlzkcqS1jflVzt93lOldGXoxpfJoyhcMhSLVb/32iu Q1JRNzfq05uMbqvlzoWlvyCYxJ0QIxenSFX9Mxsats5IK3grSCox+TmTF5vr3y+5i3kQhM MQ2S+xzbwe1zWofldmb3kxwMjuORfW/nCxp/g8wndbVJllg1yH3Fif7Pmzy7lA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKMJB416kzXk0 for ; Mon, 23 Feb 2026 13:33:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 46bae by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Feb 2026 13:33:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: George V. Neville-Neil Subject: git: 329655d89d9f - stable/14 - Correct the data collection arguments. Add proper tempdirs. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gnn X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 329655d89d9fdb03eac1dc0fda0aae3de61c0b93 Auto-Submitted: auto-generated Date: Mon, 23 Feb 2026 13:33:46 +0000 Message-Id: <699c573a.46bae.1c570d3a@gitrepo.freebsd.org> The branch stable/14 has been updated by gnn: URL: https://cgit.FreeBSD.org/src/commit/?id=329655d89d9fdb03eac1dc0fda0aae3de61c0b93 commit 329655d89d9fdb03eac1dc0fda0aae3de61c0b93 Author: George V. Neville-Neil AuthorDate: 2026-01-06 08:17:38 +0000 Commit: George V. Neville-Neil CommitDate: 2026-02-23 13:33:31 +0000 Correct the data collection arguments. Add proper tempdirs. (cherry picked from commit e018fedef0a6389240322da9fa4b9fa9971f6e59) --- tools/test/hwpmc/pmctest.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/test/hwpmc/pmctest.py b/tools/test/hwpmc/pmctest.py index f54541aeea1e..8accdf09e69a 100755 --- a/tools/test/hwpmc/pmctest.py +++ b/tools/test/hwpmc/pmctest.py @@ -20,10 +20,12 @@ # prompt would go to stdout you won't see it, just press return # to continue or Ctrl-D to stop. +import sys import subprocess from subprocess import PIPE import argparse import tempfile +from pathlib import Path def gather_counters(): """Run program and return output as array of lines.""" @@ -50,8 +52,10 @@ def main(): print("no counters found") sys.exit() + program = Path(args.program).name + if args.exercise == True: - tmpdir = tempfile.mkdtemp() + tmpdir = tempfile.mkdtemp(prefix=program + "-", suffix="-pmc") print("Exercising program ", args.program, " storing results data in ", tmpdir) for counter in counters: @@ -59,8 +63,7 @@ def main(): continue if args.exercise == True: p = subprocess.Popen(["pmcstat", - "-O", tmpdir + "/" + args.program + "-" + counter + ".pmc", - "-g", + "-O", tmpdir + "/" + program + "-" + counter + ".pmc", "-P", counter, args.program], text=True, stderr=PIPE) result = p.communicate()[1] From nobody Mon Feb 23 13:33:47 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKMJD1xg4z6TNqT for ; Mon, 23 Feb 2026 13:33:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKMJC5nYvz3L0m for ; Mon, 23 Feb 2026 13:33:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771853627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fvnu3wcDDB/5C/6VZ60ZR1z2PQg2K4P3i50sAOkMsNs=; b=a45tKSNXhoC0j3WlEPdp0M0tRPy1CTWI3VA446JNug7EaMW8ZBIiinEdEwNM69raV605Lw Ae8J3PkII/fLupXqN6mIkNW3gR3pElQgZGuWDjjC6pB5e7gtTVdzxm3CxscFJl+E+/L+ZR zCSGUYgTlauQTBMue+IA0UFBpWvdNt7xSLDggtVoHSPNz4TlFsuXxzxK6Re2eFX7Chwh+n mGRP3tXhPCr4q/6FK+TbhKohiJvKMImqkoekLoGWsI+4b1BAuIcaaI35M50KDi4zlYxQAR 1T37k8YlME5UFZeZM4PPknB40aRxpbdwpkIeUUzcpzgQfKSs+hnRuyhK7Z1NBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771853627; a=rsa-sha256; cv=none; b=JIbIH3qUvAjjwAqNLJGYPxw+MWVeNd3wh1kQh0mU/H8aekF/V5n6+uM0kyEO7kf4vwFRv0 J1HxzirE3Q4kHtj+fWxQtUjS+6dz8W+wLaRunFEsgNgT9F5ecTWWa3pcVEc0BS/WlApXOe BFYaNnxK6AAE4pvVDMD0ZGS+TTy/RCjj1snzVlTWk9EsQ/CAsNiYxaWEJlcmIpMnYttJdi zCgRi1c2WdbgJMZX4btqhC40XNonIDQuOIG9D+awq1EoJBgtA7oze8D3bXMJkHV1f6bbFz o6yRJHSe5TwOqdX/FDK2KzfbjdrCLrKVEx0W+CZnHLiOLwbxUnkCCnrpfiruQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771853627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fvnu3wcDDB/5C/6VZ60ZR1z2PQg2K4P3i50sAOkMsNs=; b=tS/GpsRANFz7/W2ilAE2Bx7lX6Et99Yk9hcKd6HLz3Ov7XLyKCZHF8d3yAHtBrLFLg0C/k 5GahMM5MLjAIJHQ3kt46twPA65EkRVfDmBLz6gugPWnX4KDWuoTvI1tDOyfNHTDVl2u4us yh4AUNW6S8TQnyz4vyqzRqFAFFdSZRKt7XUlSImKENbgJyb1NRDjMWyN6ya5UfdrHNjNxN E8wfSSKRYJLejEjwn39+XyAmLYlNCdzvcI1IzLTN8Wjdbdqd5UoY/6CDqTwkSTQXQAsVmO J3hh/us4+rtE4kk3xSm1Aaicw/Ojzmm32FKKq+wUk7Mhc4WStpq64B6thWJveA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKMJC4pGGzXk1 for ; Mon, 23 Feb 2026 13:33:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 45179 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Feb 2026 13:33:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: George V. Neville-Neil Subject: git: 21b4ec51c215 - stable/14 - Split counting from sampling. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gnn X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 21b4ec51c215fb6aff5e29c33639b5095fcb022c Auto-Submitted: auto-generated Date: Mon, 23 Feb 2026 13:33:47 +0000 Message-Id: <699c573b.45179.5eb96e19@gitrepo.freebsd.org> The branch stable/14 has been updated by gnn: URL: https://cgit.FreeBSD.org/src/commit/?id=21b4ec51c215fb6aff5e29c33639b5095fcb022c commit 21b4ec51c215fb6aff5e29c33639b5095fcb022c Author: George V. Neville-Neil AuthorDate: 2026-01-06 08:55:14 +0000 Commit: George V. Neville-Neil CommitDate: 2026-02-23 13:33:31 +0000 Split counting from sampling. (cherry picked from commit 77153a491e3b31475f5faddb21271a0a8e0d4a9b) --- tools/test/hwpmc/pmctest.py | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/tools/test/hwpmc/pmctest.py b/tools/test/hwpmc/pmctest.py index 8accdf09e69a..588fe6d79e83 100755 --- a/tools/test/hwpmc/pmctest.py +++ b/tools/test/hwpmc/pmctest.py @@ -42,7 +42,8 @@ def main(): parser = argparse.ArgumentParser(description='Exercise a program under hwpmc') parser.add_argument('--program', type=str, required=True, help='target program') parser.add_argument('--wait', action='store_true', help='Wait after each counter.') - parser.add_argument('--exercise', action='store_true', help='Exercise the program being studied using sampling counters.') + parser.add_argument('--count', action='store_true', help='Exercise the program being studied using counting mode pmcs.') + parser.add_argument('--sample', action='store_true', help='Exercise the program being studied using sampling mode pmcs.') args = parser.parse_args() @@ -52,22 +53,38 @@ def main(): print("no counters found") sys.exit() + if args.count == True and args.sample == True: + print("Choose one of --count OR --sample.") + sys.exit() + program = Path(args.program).name - if args.exercise == True: - tmpdir = tempfile.mkdtemp(prefix=program + "-", suffix="-pmc") + if args.count == True: + tmpdir = tempfile.mkdtemp(prefix=program + "-", suffix="-counting-pmc") + print("Exercising program ", args.program, " storing results data in ", tmpdir) + + if args.sample == True: + tmpdir = tempfile.mkdtemp(prefix=program + "-", suffix="-sampling-pmc") print("Exercising program ", args.program, " storing results data in ", tmpdir) for counter in counters: if counter in notcounter: continue - if args.exercise == True: + if args.count == True: + with open(tmpdir + "/" + program + "-" + counter + ".txt", 'w') as file: + p = subprocess.Popen(["pmcstat", + "-p", counter, args.program], + text=True, stderr=file, stdout=file) + result = p.communicate()[1] + print(result) + elif args.sample == True: p = subprocess.Popen(["pmcstat", "-O", tmpdir + "/" + program + "-" + counter + ".pmc", "-P", counter, args.program], text=True, stderr=PIPE) result = p.communicate()[1] print(result) + else: p = subprocess.Popen(["pmcstat", "-p", counter, args.program], text=True, stderr=PIPE) From nobody Mon Feb 23 13:33:48 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKMJF2073z6TNqX for ; Mon, 23 Feb 2026 13:33:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKMJD65g2z3Kv0 for ; Mon, 23 Feb 2026 13:33:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771853628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O90xFaBMiYNji0OoNExQnRb1t16b3MtvD4e3IkLFkBE=; b=LQ9nScVveswBYaA0r9e7Fm3KPkBQm7TL48dth3tIII+G5xvsXXh/Z9zCUh6VUQBfWn/iTR ceCXmUMmEwvKLvnUrSKObjGw3l7gHtKa5WAA01FsNUVxsRVgHm73+G9zWnUV4TWBO4MuuP 848wXs4QBwSFepxRMDH9B1M4xIA4Dwx5GnS+YLnzBfInDS92slFVAgy27eskXLyk90DIYm LVm7g81lBAik2DakBu8FrkkCym1vCM1mEihznBw3Y9kplTxdo0gOsaYCfSmzjdQM0Tgy5G UyUwlxvZD2qg4JhfbctJFmucsXbpnf+1C5HT2rBbSgtnatznvo2FjE0yg80LYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771853628; a=rsa-sha256; cv=none; b=DeI1XCBuT5zqFPAmC1XvdABrhduYoP9k/UAaH8ttr1xZAAjq8wV0kZUE8c8ywq7CcqqGr2 H14jnA1fWC1yQoqHNdSo9vF5ti0URB2r+eHOP60sRIswQi19bxjt7B4biUcO9DFL11Z8k9 FxWIYZmYTKReUvMAsIBPSjMveHzHXwCMNHRrIGJdUN/4wH0js5VpNIJCkUz5Tuwf3YJCDU 6Oe3wfudQa9XEheuSbV2GSOnDntHLgTiRwAis5wljR0b3Glnmqjv3SkZEwO6ZDBhfWRk29 Gnw3gdTTY+jF+/G7DKaffjc8/YIiU5ugD+acbHUZH6BMq27Wxht/6SrRB37Kyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771853628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O90xFaBMiYNji0OoNExQnRb1t16b3MtvD4e3IkLFkBE=; b=a+RjJaoWhVDQJ7KjyGc5gbpPnCrCLmwtIwFfKEf6d0QFskjEAJj83sbA4rzqZ3IJEaFNFv gwiqRObx82xlv1XxBtdG5E0TPiCjcufNSw0r12F15Y14aAHdcUpRtqfa/PsX7/Ih6ZsVCT hvne4RMQRbl38F4UXzKo0wnJXdJ9DzT+u+fxVCv828nmKt6U/66Qu3pDbyj53DIyTv0DDU uP5OACCixGBQr/XADRuq5/y7klXC/ZEgwu2e/M7+VDA4MDqpgSx6Rkom7OWFKkOgHfCWui DGZNdQng4a6Khr5obyHBDYegmjBMrcfPcR5l1KOKiHA6RFbQad37E7lXOtM2OA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKMJD5bS7zXN4 for ; Mon, 23 Feb 2026 13:33:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 473cd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Feb 2026 13:33:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: George V. Neville-Neil Subject: git: 259506ff3886 - stable/14 - Extend the script to collect gprof data List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gnn X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 259506ff38863e084398766af198c5de813f9ce7 Auto-Submitted: auto-generated Date: Mon, 23 Feb 2026 13:33:48 +0000 Message-Id: <699c573c.473cd.46a2c91f@gitrepo.freebsd.org> The branch stable/14 has been updated by gnn: URL: https://cgit.FreeBSD.org/src/commit/?id=259506ff38863e084398766af198c5de813f9ce7 commit 259506ff38863e084398766af198c5de813f9ce7 Author: George V. Neville-Neil AuthorDate: 2026-01-08 04:13:04 +0000 Commit: George V. Neville-Neil CommitDate: 2026-02-23 13:33:31 +0000 Extend the script to collect gprof data While we're at it, switch to simple waiting from communicate() calls. (cherry picked from commit e2bedc7d69926426a710d035df51e0a0812d38b1) --- tools/test/hwpmc/pmctest.py | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/tools/test/hwpmc/pmctest.py b/tools/test/hwpmc/pmctest.py index 588fe6d79e83..ba20306f1d68 100755 --- a/tools/test/hwpmc/pmctest.py +++ b/tools/test/hwpmc/pmctest.py @@ -26,6 +26,7 @@ from subprocess import PIPE import argparse import tempfile from pathlib import Path +import os def gather_counters(): """Run program and return output as array of lines.""" @@ -75,20 +76,42 @@ def main(): p = subprocess.Popen(["pmcstat", "-p", counter, args.program], text=True, stderr=file, stdout=file) - result = p.communicate()[1] + result = p.wait() print(result) elif args.sample == True: + pmcout = tmpdir + "/" + program + "-" + counter + ".pmc" p = subprocess.Popen(["pmcstat", - "-O", tmpdir + "/" + program + "-" + counter + ".pmc", + "-O", pmcout, "-P", counter, args.program], text=True, stderr=PIPE) - result = p.communicate()[1] + result = p.wait() + resdir = tmpdir + "/" + program + "-" + counter + ".results" + os.makedirs(resdir) + p = subprocess.Popen(["pmcstat", + "-R", pmcout, + "-g"], + cwd=resdir, + text=True, stderr=PIPE) + result = p.wait() + gmondir = resdir + "/" + counter + if Path(gmondir).is_dir(): + with open(gmondir + "/" + "gprof.out", "w") as file: + p = subprocess.Popen(["gprof", + args.program, + program + ".gmon"], + cwd=gmondir, + text=True, + stdout=file, + stderr=subprocess.STDOUT) + result = p.wait() + else: + print ("Failed to get gmon data for ", counter) print(result) else: p = subprocess.Popen(["pmcstat", "-p", counter, args.program], text=True, stderr=PIPE) - result = p.communicate()[1] + result = p.wait() print(result) if (args.wait == True): try: From nobody Mon Feb 23 14:36:13 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKNhL2bhRz6TV5y for ; Mon, 23 Feb 2026 14:36:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKNhL210Lz3SVr for ; Mon, 23 Feb 2026 14:36:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771857378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6wZb1FwRiMDWxe2U24fDuJRHsmdnnR3nLRQwjYYMCIc=; b=iD7q2Ixffuz6lTc1nq8Rf2f701WGnZfx+NzOnImIlHGAaLMNc65koB4mbyfuIqLjI4qGnm jq/aywF4fHp+llpIGVzPQjeEVUY/SB5griWRzSoDuACBJfS7ahQTSF4DXzNr+vVqg/49dq q370CVWZQ6KVpiZYeX4lo8VeXGhck/t//HXMwcuXrLE4aXOqAwLQokS/3g1AxBn+5CJDMQ 9FgC89LVeiS/Zn7WeZbifldB0uqHI1U69pYGMps/i7UsDv5hXOSW9Erz42xtoHDmj6YmxB VzNkFN618ZuKx1oY7MSVtpmwsD7V/ntTrSGIsVZ5SvKp2kI10x3hcW4jxBtcvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771857378; a=rsa-sha256; cv=none; b=O1Ldq7If4T4En8SmjbsiqNpJ28tS9PYqRTHntgo3CJuVbTxyCZ5kdrGSA9O2YmR/r3V1Bw oRWxYzVHF3HxfN/L0/TUaFZPYTkI/zfiR/vtcfbjC3FZyfcw1JyA0eZsvWPzqV3LJ6duUQ 5DC5a0i0Rgur8UYXUlkl4ZqYZzvo7+y92TYBNJ/EnwoVfPJfo/YL/Z+bwGSD8u/AUypnCu JLWgKdSvUY4/VvOpddFGlw8139utEYIla1377rWcttYcslEsOpCyngwbu/ta4jaIwt6Ti4 EKoaC7TKeWHWl4Z0tiY3jt1VM7gWHDpY7t47ieNJYG4AAt9W0BTfbX8nZudEMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771857378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6wZb1FwRiMDWxe2U24fDuJRHsmdnnR3nLRQwjYYMCIc=; b=Bzw+aUDPKFio5xmG17NC4vQRDU0/Cu5F0hHSHsyONIEdDKTrquh5xlLrKHMz8YcdYtcv4V 05xm5ds8rWjNkan+1NGfcZQk8ycM3S51FfcJZzbPUDNLTLhFy5kuDta9vdF6oRqvbB2qst ttGyqJ5eYP+ZWinGuI7W5vQFF2KyQ4BEyDqsR/y3KRiY5ITvJFHbF0zDF/qrjgZmY1I/V+ 9vP3XUx8t9Fuh9K1uoyDuy3MfGf69kWsuJJbxWv8swd+ROvHcp8ZwXZAS/qLPRGjk2U0AK kv7UbJCoI8cFvOI0gNEZTqt6x3suG0knv1xHr21us5Szqek05gf1VgNRVlCaEA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKNhL1Cl3zb0J for ; Mon, 23 Feb 2026 14:36:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e5f2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Feb 2026 14:36:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Nathaniel Braun From: Ed Maste Subject: git: 3ca02a70f7f9 - stable/15 - vt: Fix handling of backtab List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3ca02a70f7f94f7479ffcd3ed7ca6d83ec58af10 Auto-Submitted: auto-generated Date: Mon, 23 Feb 2026 14:36:13 +0000 Message-Id: <699c65dd.1e5f2.5f659a2d@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3ca02a70f7f94f7479ffcd3ed7ca6d83ec58af10 commit 3ca02a70f7f94f7479ffcd3ed7ca6d83ec58af10 Author: Nathaniel Braun AuthorDate: 2026-01-17 17:14:42 +0000 Commit: Ed Maste CommitDate: 2026-02-23 14:22:55 +0000 vt: Fix handling of backtab PR: 292463 Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2002 (cherry picked from commit 5fec99caff3ac4f476bb88078ebf85fbecf6afb3) --- sys/dev/vt/vt_core.c | 6 ++++++ sys/teken/teken.c | 4 ++++ sys/teken/teken.h | 2 ++ 3 files changed, 12 insertions(+) diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index 6d1012110678..bd6596eceacb 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -950,6 +950,9 @@ vt_processkey(keyboard_t *kbd, struct vt_device *vd, int c) VT_UNLOCK(vd); break; } + case BKEY | BTAB: /* Back tab (usually, shift+tab). */ + terminal_input_special(vw->vw_terminal, TKEY_BTAB); + break; case FKEY | F(1): case FKEY | F(2): case FKEY | F(3): case FKEY | F(4): case FKEY | F(5): case FKEY | F(6): case FKEY | F(7): case FKEY | F(8): case FKEY | F(9): @@ -1962,6 +1965,9 @@ vtterm_cngetc(struct terminal *tm) VTBUF_SLCK_DISABLE(&vw->vw_buf); } break; + case SPCLKEY | BTAB: /* Back tab (usually, shift+tab). */ + vw->vw_kbdsq = "\x1b[Z"; + break; /* XXX: KDB can handle history. */ case SPCLKEY | FKEY | F(50): /* Arrow up. */ vw->vw_kbdsq = "\x1b[A"; diff --git a/sys/teken/teken.c b/sys/teken/teken.c index b0161a2e3b20..a1522e00ecf7 100644 --- a/sys/teken/teken.c +++ b/sys/teken/teken.c @@ -703,6 +703,8 @@ static const char * const special_strings_cons25[] = { [TKEY_F7] = "\x1B[S", [TKEY_F8] = "\x1B[T", [TKEY_F9] = "\x1B[U", [TKEY_F10] = "\x1B[V", [TKEY_F11] = "\x1B[W", [TKEY_F12] = "\x1B[X", + + [TKEY_BTAB] = "\x1B[Z", }; static const char * const special_strings_ckeys[] = { @@ -726,6 +728,8 @@ static const char * const special_strings_normal[] = { [TKEY_F7] = "\x1B[18~", [TKEY_F8] = "\x1B[19~", [TKEY_F9] = "\x1B[20~", [TKEY_F10] = "\x1B[21~", [TKEY_F11] = "\x1B[23~", [TKEY_F12] = "\x1B[24~", + + [TKEY_BTAB] = "\x1B[Z", }; const char * diff --git a/sys/teken/teken.h b/sys/teken/teken.h index 38a85e80110e..c8c73db55f06 100644 --- a/sys/teken/teken.h +++ b/sys/teken/teken.h @@ -206,6 +206,8 @@ void teken_set_winsize_noreset(teken_t *, const teken_pos_t *); #define TKEY_F10 0x13 #define TKEY_F11 0x14 #define TKEY_F12 0x15 + +#define TKEY_BTAB 0x16 const char *teken_get_sequence(const teken_t *, unsigned int); /* Legacy features. */ From nobody Mon Feb 23 16:04:59 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKQfm2nb7z6TfW8 for ; Mon, 23 Feb 2026 16:05:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKQfm28SMz3l9L for ; Mon, 23 Feb 2026 16:05:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771862704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6WtkIMf6XYxdPXm6zVQkU/F0kKi/+0PBe8VzYaVstZM=; b=ciBqWfK0LQEulYrlw+NBQfRMbaaNod52EyGDhCUaDXh+PwzndYt59dql4GMdsw4NzlNhg+ oOVMos7cdFUfwBSQUnh1qdDuY7rcWVI3issyyg4yRw9xBc4O3yHMtcF+tMY1R5Vay2JdRk s+o/0vmQSzTA2Po2D0xBl6SKF2NgQI6eyEBytQrR+HGJW1Uskqqvh8HG/zoCuJ/ewI2wSQ TGaO/dlgtisIg9nRrnwqT9e/MJYM8RuL4n/1eVmn9h+8bCNPoaFWVYSmxuqPnFeZwUdyh9 bwZNt622mANI3nk/IigZMABpKIuzmo/ChUEvT/fqc3JLP4dCUJR53MczJGraxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771862704; a=rsa-sha256; cv=none; b=e9YS4+NLfH/LutLWzT3BxBTfvSu/EyCqYwe351wu2HrOqdu6HFOD3HK4eq4qBM3+OLf6KH KVUCNoDNpFU9SnidmWrRSOQA6pv3GKUwu3d+aGCGHE9eDhJs5tNem/IQ2zNxBl4DjN94d+ Z3qERIeyArN89pcHGi0VMe13fHl0PjwOLQphsRuE/t4zBWIibwypQOqHrxIiyKMXGffNP7 pYqPeJI03CkdG3FmmBBAXYuwSp3Lab5bHjLP4CIq8EveSvlS4dpPzo8kx3qOnbf5ijIrmB OGapbpzmPWMwcznE1iileparJmOPybpqnRwblzrvOcwQuKeLGvkQUupXlKxjYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771862704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6WtkIMf6XYxdPXm6zVQkU/F0kKi/+0PBe8VzYaVstZM=; b=v7Po6z3e3ev1c78rouUjvYEHItzVKK76A4bTeQYkxcfKAASjKP84nQBDwPAKx7Xo14L02c pC/U+itVweM2R9RdE0XnL4apvXL9a7j5kuwhOUHOhjXo5kX4wOBlnCX25CU+CD+lxOEHjU zO3aVEMF90oLpLbTJnpcOmWR9K761fHG3n9rofX64Bxs3MFtUMnAy5qkXE61oH6LfNBQpT LxG5xljMlbI8YuVm5WxeEfBtV4iWP7gTNU0VRGcJxPjDRKHiqxWXdiBol3O6KyTlRTSiUe cNlr6MSWW+mUrTmhBlwerRyzDpPewSGhUSdxvtfOlf+tNmhWdAl31Jj5oU0gXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKQfm1jCjzd4C for ; Mon, 23 Feb 2026 16:05:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25afd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Feb 2026 16:04:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Yusuf Yaman Subject: git: 477ab960440c - main - Add records about new ports committer (nxjoseph) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nxjoseph X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 477ab960440c5284fb5819c63c6f03aa15606def Auto-Submitted: auto-generated Date: Mon, 23 Feb 2026 16:04:59 +0000 Message-Id: <699c7aab.25afd.7f99284f@gitrepo.freebsd.org> The branch main has been updated by nxjoseph: URL: https://cgit.FreeBSD.org/src/commit/?id=477ab960440c5284fb5819c63c6f03aa15606def commit 477ab960440c5284fb5819c63c6f03aa15606def Author: Yusuf Yaman AuthorDate: 2026-02-23 16:04:02 +0000 Commit: Yusuf Yaman CommitDate: 2026-02-23 16:04:02 +0000 Add records about new ports committer (nxjoseph) Update Mentor and Mentee Information to follow step 5 of the Committers Guide. Reviewed by: osa, vvd (mentors) Approved by: osa (mentor) Differential Revision: https://reviews.freebsd.org/D55457 --- share/misc/committers-ports.dot | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/misc/committers-ports.dot b/share/misc/committers-ports.dot index c16ba50a19d1..84a9395fb216 100644 --- a/share/misc/committers-ports.dot +++ b/share/misc/committers-ports.dot @@ -257,6 +257,7 @@ netchild [label="Alexander Leidinger\nnetchild@FreeBSD.org\n2002/03/19"] nobutaka [label="Nobutaka Mantani\nnobutaka@FreeBSD.org\n2001/11/02"] nork [label="Norikatsu Shigemura\nnork@FreeBSD.org\n2002/04/01"] novel [label="Roman Bogorodskiy\nnovel@FreeBSD.org\n2005/03/07"] +nxjoseph [label="Yusuf Yaman\nnxjoseph@FreeBSD.org\n2026/02/18"] olivier [label="Olivier Cochard-Labbe\nolivier@FreeBSD.org\n2016/02/02"] olivierd [label="Olivier Duchateau\nolivierd@FreeBSD.org\n2012/05/29"] osa [label="Sergey A. Osokin\nosa@FreeBSD.org\n2003/06/04"] @@ -700,6 +701,7 @@ obrien -> gerald olivier -> pizzamig +osa -> nxjoseph osa -> otis osa -> vg @@ -849,6 +851,8 @@ tz -> mfechner vsevolod -> eugen +vvd -> nxjoseph + wen -> cs wen -> culot wen -> pawel From nobody Mon Feb 23 16:06:43 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKQhh5vHFz6TgQk; Mon, 23 Feb 2026 16:06:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKQhh3zjJz3lZW; Mon, 23 Feb 2026 16:06:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771862804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TyRd5L2o4tj3jxwfr8/jrFA8RbrNkW/1AGN20VbZ/rM=; b=OshlzxYR6lRNSustA+vPIXbb6gcQAUGvIl+dpMlpzq1zO34jNaJV4v4mMW3FNOabyHY/wl 3W8/7Ru7c22LeipfCsvHpzlvAq1hdrN6MIXPwe9lcZU3i58u//Hm7mlMa6x0JYV7LY6uff DzCLpbOYVTlXy9mweGOP21P3YoBgPKsdIAp3zllxZMgGvYVf96ODYbCUcwoTN2Y8TiLdTz ITTWe2ebJYxbMqIJiJWYOoBYBNEH3+UEsIJKmFQeN/QsfaFuXSQUMaghSgimueRCsiZhTx 0qaSTecKATfvQAtif9Ov0quTfRrhMWHtj+cKZb0Nl3jvKEx88EuYdAHZXr5Tpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771862804; a=rsa-sha256; cv=none; b=h0NelkRcIll1G3JVWo9G2z6tpC66Py3V/GoXte3ctu0dZ9cmOgs+zC9CR+1Ti5P3ZYfgLP 4jyTb8krjBSzM14J9891Vjt0AM2fXIEDU2jILkBgyyKWVBncKgWIsx6SYoTinqcUIngygx XWm7NSYMZEe0i0DgKR6cu2Pn9NUnSfczDCGSbixlYQIsn756kJhBPHvDQX4pYAVKiEH/T8 x5dAwEknBjfgsiRwC0Q4nOajqUUYylQr2/aCzbq9h4wTHnB5MmgHWj3NKsplcMcMXaiIs8 OUh91Ga87bawARO+61cS7tvmX1Xq3yqmnd+sEgbRNHmA1oZuJhAIgqAKVbCXew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771862804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TyRd5L2o4tj3jxwfr8/jrFA8RbrNkW/1AGN20VbZ/rM=; b=WCTFF/+TbXYC0seIIWI6CB/a4HmL89Ds5cjPOwE9WEttdyq7SiYJcwQycwnKAftY4i4BBh ozuTjq62U5ZnH80Tv22iFtqo0haX8d32BqXFGVNOsMyVM+j28JC93rvpyLbYmC2Q5Wulh4 vjgdP0MYW8FPMSj4yvQiKX5AXvYXZ0FYwKllOWEH5la2V/pOUHYeJWfRuQzyX38QiuShkc oUj1qnnBeOog0KCVKOb634LZOMgyTIlrnOUSLmA6zZYHJmsAkQX5V/iFnzvT8kwDK7HM4Q 86JvhwgaDi6IuwYi+99YScksm/UxeVN3N4TCYct9nr2uF+IYk41aU1doFayDSw== Received: from [IPV6:2601:5c0:4202:5670:dd0e:5a2:6441:fcd5] (unknown [IPv6:2601:5c0:4202:5670:dd0e:5a2:6441:fcd5]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fKQhh1tdqz3kG; Mon, 23 Feb 2026 16:06:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <3c07e539-5024-4462-a085-34fc958aeae6@FreeBSD.org> Date: Mon, 23 Feb 2026 11:06:43 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: eda36ae09dd1 - main - asmc: resource cleanup simplifications Content-Language: en-US To: Enji Cooper , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <699a632b.4690e.2fab15e8@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <699a632b.4690e.2fab15e8@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/21/26 21:00, Enji Cooper wrote: > The branch main has been updated by ngie: > > URL: https://cgit.FreeBSD.org/src/commit/?id=eda36ae09dd1fab78bd377739fc5d6c65c61f5d7 > > commit eda36ae09dd1fab78bd377739fc5d6c65c61f5d7 > Author: Enji Cooper > AuthorDate: 2026-01-30 06:55:08 +0000 > Commit: Enji Cooper > CommitDate: 2026-02-22 01:59:06 +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 > --- > 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 bff214c084c5..084b57331dd9 100644 > --- a/sys/dev/asmc/asmc.c > +++ b/sys/dev/asmc/asmc.c > @@ -795,25 +795,21 @@ 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, 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 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); This cleanup is good. > return (ret); > } > @@ -826,16 +822,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; Does this actually matter? That is, I don't think there is any reason for asmc_detach to be reentrant. New-bus (specifically device_attach()) does not invoke DEVICE_DETACH if DEVICE_ATTACH fails. Instead, DEVICE_ATTACH routines are expected to fully cleanup on failure. The changes to be reentrant here don't hurt, but they generally just add clutter. > } > - 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)) { Please do not use this. Code should know if the mutex is initialized or not. That is, always initalize the mutex in attach before any failures that could enter this path. > + mtx_destroy(&sc->sc_mtx); > + } -- John Baldwin From nobody Mon Feb 23 16:11:42 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKQpR5SGyz6TgwN; Mon, 23 Feb 2026 16:11:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKQpR2QRcz3mbl; Mon, 23 Feb 2026 16:11:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771863103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fTGnMNsrFeeGaXJgBOcsYp3Xtr4S/UUV2DBYNxktmmk=; b=McMxzWFTs3IKrBDSnsnscrJzs8N4cpVDxlcHT9bmsORI6UJUW/LMAMkcJmgmLWiewM+5du tWH0PAhEml5vZjlRfjIIxPhma9+k7tn5f+haGHIxtwbCpGTPsLfmMgIkrI4xRIKxVVdxxc Xjww9DjEko5PjBJbgN/0+BxvcKdsVbKVosimcRuFzVNdzOSMLRgWolkse47TF1wQwQLbio uiG1xfR3vTX28Du8+n5S8Jm6HbKlJ79cZE3n7JDvSTyEc13VRMKZMF6mr4Yn0oJrdqfp5B lsD7oOitcBrIyrMSU6UBcnpYLvCwWuB6nZvE5TckjRRCqldVgSY25EwuAXLmKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771863103; a=rsa-sha256; cv=none; b=RtsXELX8G2YiNopyMfxlVbfteL8Ce6ELqyQEjntpHDKqW7/a9T61vb9nfLEPxA9R9Gmpxn 1FqORFQ82Ac4WZrx9Hq/I259CrlhnreK9OkDp+RFqPzA7OGrukA2hit+K49DH0wMChomXQ 2Imz3GZOr904H9fFoS/1S8rWv2C2RtY1d9cUUKNafYqjPwcjb/SsgJdd2QbnFo/pVXGbMd JWueBVYyFF74bguicNeJZewS2cw2QMwUXgcVJ2i/gQ+GvrjiGYTHIbChTrCievolKqsixe BY5wQ+AkiN9QLaehRrRMwPdfN7FNMf09Gp5dHdlgNRk9EiuPXHSZVxO2kfrznw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771863103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fTGnMNsrFeeGaXJgBOcsYp3Xtr4S/UUV2DBYNxktmmk=; b=q128QaIhxJgkVC+eRl5I8EH1MB/rDnlt2lbgNFFjzNUCevUF6aRiWPzgjhH0baUl7ELpYe MVWN9t6iCPkcwOmSDptW8klRumjVuNLtkeuRckCzeSR55c2zpdBiHKuvYlYKbzvLJx1iBZ XlFOxTYELudsU8LaMC1v9nPBgO5vjKVv1ADmSwmKtDPY02eSMuJuMTI8kQA9JreQRPX7xp NSw+RKFHscKtmleHtk4ujky847aFw/vfwXjMKA5tGgwygKt+6K7R8rVbQ+n5vMIAMVaIzC /9O6n5GTyQfQsfNN+Q5+h0rga5bYqW1vjgQyoQSnRy08l+EcAiFfKc/EILqM1Q== Received: from [IPV6:2601:5c0:4202:5670:dd0e:5a2:6441:fcd5] (unknown [IPv6:2601:5c0:4202:5670:dd0e:5a2:6441:fcd5]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fKQpR0YHQz4Bp; Mon, 23 Feb 2026 16:11:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <228a09d3-a7ab-43f6-8903-c73d659f0173@FreeBSD.org> Date: Mon, 23 Feb 2026 11:11:42 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 4544f34f2d30 - main - .gitignore: ignore additional unwanted files Content-Language: en-US To: Enji Cooper , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <699a713f.1c7b3.81402c1@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <699a713f.1c7b3.81402c1@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/21/26 22:00, Enji Cooper wrote: > The branch main has been updated by ngie: > > URL: https://cgit.FreeBSD.org/src/commit/?id=4544f34f2d30ee63ab1eec9fa52c31bd92d457ca > > commit 4544f34f2d30ee63ab1eec9fa52c31bd92d457ca > Author: Enji Cooper > AuthorDate: 2026-02-04 07:39:03 +0000 > Commit: Enji Cooper > CommitDate: 2026-02-22 03:00:06 +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 > --- > .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 Hmm, do we still generate .po object files since MK_PROFILE was removed? The bsd.*.mk rules for those were removed about a year ago (0e4c4cc4916c965f7f3116e1840396755d6b21f4) and haven't been relevant since 3750ccefb862 (actual date of Nov 2024, not 2021). (Rest of these changes all look good to me FWIW) -- John Baldwin From nobody Mon Feb 23 16:18:53 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKQym6L5kz6ThXV; Mon, 23 Feb 2026 16:18:56 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKQym5s92z3nX5; Mon, 23 Feb 2026 16:18:56 +0000 (UTC) (envelope-from rpokala@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771863536; h=from:from:reply-to:subject:subject: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=ag+IaMfl4yrEMQY3GG6+itr0/7+DPqpuoxtclTPVcMI=; b=CnKoCI1MoWBaIl8tpB3158xGig6uaAIApBKn+SKQLCXaP1QGavry8hQIe7DqP4O9GvllA9 OeHB2aLGCLq2DDQ8WqvPyLcAYCMheM1mptj7TT93zyU7yzln7kbCF+4sw2ZBJIZJqg0CGD UpPkoOXpM6UUpW9eqA5ZM6qR9TJDli9OJDzI1vqX5NzRruA8bTiuGaFlbUQKAEbftegPkA 9u9c4cYctblG2/5/hIXgJ7SHdDxmqdomDyqDDGj88wBozHIOuoUelZxXpI0u67VcUaFJSf pPWiTjDAswlVBUE136XjkrUYEJ6gTQLQ5u5dmBUpSWK24405gsG5bLDjLQeGdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771863536; a=rsa-sha256; cv=none; b=eViYqC8d+gveYLaeSQZ4PMpALIZKDr1ie7xVXWB8+GCqGHOs8ASCrwvCohpvwF2I9bYo4n fGvAuNf4jBWE/CMJKh7h3dQ0wboP1Pq/IsF1H1AuZ7t5dkqbLoDhEhTx/EREFMFjpnxuMW IsAtc9+U/gw1VDGXc/42xZkWU0hKul85O8bLn8HiEDFhe5NR5/V/QiRlnEBPLln27xGS9/ cmKX2C7mwDl83i7JaynIZ0ZDWeZmCk5EQIkmHIAxtdwNt4kARqHuOcaSqFZf4j49RcXWyB 8WnNExs3+gIA9SdhCy7tMfuDBvzqaI1zkvKae8t9aO0OlRMMa1I4ctgLPshMYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771863536; h=from:from:reply-to:subject:subject: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=ag+IaMfl4yrEMQY3GG6+itr0/7+DPqpuoxtclTPVcMI=; b=nm84TntiZMsI4ksJwJaKxnA1kJf7cas8Yfh+any4Dgi+KiiREuEnge7rv/Y8t23diCzDT1 HT2yCnkTEid6nb3DyT3vpcUCBhzfKXJTnDRPb2OwpRiJaB97pRXWOsZHC3dgGdPNfnLDE2 up6tFN7kGatueVfOJZ88kAfzdhL/cvqZJxVadUzHaoHZlek2MvwVfNIl6b0rgA+hoYOXQP f+zm2jpBpTC96zlnVd005SvJ3minVzjwfN3xXkBZdWPEMq0YwF5R7/C1dfzuNYFtOWM3cA QwhOz3fbtyApxhA4xFby/IbatDnnmAxWz/dSl9R0IXJ3zRVYFae4h71x//eCgQ== Received: from [172.17.5.105] (dip-pa.panasas.com [65.205.22.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fKQym207mz2mV; Mon, 23 Feb 2026 16:18:56 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.106.26021521 Date: Mon, 23 Feb 2026 11:18:53 -0500 Subject: Re: d4f6cb754249 - main - build: Move all of lp under LPR option From: Ravi Pokala To: Lexi Winter CC: Dag-Erling =?UTF-8?B?U23DuHJncmF2?= , , , Message-ID: <2664C0F5-32C2-41D2-8662-7D1D2D28523F@panasas.com> Thread-Topic: d4f6cb754249 - main - build: Move all of lp under LPR option References: <699a2335.220a6.2c3156ae@gitrepo.freebsd.org> In-Reply-To: List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable Hi Lexi, Fair enough. Thanks, Ravi (rpokala@) =EF=BB=BF-----Original Message----- From: > on behalf of Lexi Winter > Date: Sunday, February 22, 2026 at 22:39 To: Ravi Pokala > Cc: Dag-Erling Sm=C3=B8rgrav >, >, >, > Subject: Re: d4f6cb754249 - main - build: Move all of lp under LPR option Ravi Pokala wrote in >: > Why is the package "lp", when the conditional uses "LPR"? i named this package "lp" because it contains support for (line) printers. i suppose you could argue that "lpr" might be a more suitable name on BSD since that's what the traditional frontend is called, but either seems fine to me. > Shouldn't they match? there isn't generally any corresponence between package names and src.conf options, except where this happens naturally, and even when the same name is used, they don't always mean the same thing. for example, WITHOUT_SENDMAIL controls both sendmail and libmilter, but in pkgbase these are two separate packages, so even though the src.conf option has the same name, it means something different. so, as a general rule, there's no particular effort made to ensure package names match src.conf option names. From nobody Mon Feb 23 16:21:43 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKR1z2Q88z6ThmB for ; Mon, 23 Feb 2026 16:21:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKR1z1ZKcz3pF6 for ; Mon, 23 Feb 2026 16:21:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771863703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S7GJAty7Tmkt7dVH2D26vRyUxfX794ZiQ7ktvANXOzg=; b=g1MAvL9+Vgu8+C7toapunSpMx0mwtqdC2QGbPFJ6Na6Li2tLU21uKTW8QNEN5bbG0yZWn3 AqwYpgs9NiAVKQcSSPioCOnCf2GcEbgSEMK1btqaIYl3u6iRUaGI4cCVJBkudmwAuT3CrI zqUCNkOvOlptAlDXhdAxceqpkmX9dn/fNcASbWhUqveKjfArfISeyh0Gv83sgAr2v/NbCz Z8TfmRTPgV675TRyDS3AMbHwp2nv4GFoXrjE/B/a+0ILqiHJpoURjPXY6i/d/3ETrpeG2x OTFFOk/JQvhx8Do4OHrHdCoQKdqwIJCqwjUXfDF8KaEwDB+R34wF6uNyzKENXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771863703; a=rsa-sha256; cv=none; b=l6PSA1uxm2I9xf3PPLUcoaA7qicX2wnFW0JYLpXymrvlnHQzvkahSzfr3es68T8/9ZrAZZ IE/Mh5s9bu5ihG6GCuctKuNkemiieYR3jcvYU3YnLx3aN4ws2QrlLBwvobq05T6ToK9H+z lsCidryGDDSX57quEA9Liv0M3uHF6nvurCQxpl7T5WmJXJRzvtlHvA/5f5kW1Ml6n7RCLD oaYR3yoPDSOLUlJ4dw4aA6AEmNTxBUU05rsKMJ37d94RdFy++zNSLDethq2+iRPrtA7gN4 lqmT3ct+9Z0kD8a3Y1kX9UB6/1UG5QIdJm8TKo0FxE24SzgS9P3r1qdSagEaag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771863703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S7GJAty7Tmkt7dVH2D26vRyUxfX794ZiQ7ktvANXOzg=; b=igI4a85aIQ1WM6ryZc+g092dRpRKmTxOXLnjv6RypIYODLiTjlZVMz9eIDomF0P1yKB/Ng Qt+vyaHD7VSV6AQwBAF0pfcgbXE/9Lb9y2LVq1Wb8njL4SmCLOwMGEN9vZLvdeemksZY41 KU2SiX2XfFZDWR/KjosZ103AYZs8CMsRfc/6k02Iwd6c41sEGchr8ZCHZqH5v6c7Gh7027 h5Db7GVNi6wEoYlBlTfRKA8x4jFQeMBq8f58nnTy7OZv7mrrDIVvOH2TQ8BXaLDj5SBozd mVAcDv8WvwkPrU4Nxv0IfNi2Mvb9FxvzChEtMafbuSU/TPCUufn0VChnXtAgFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKR1z17FRzdKb for ; Mon, 23 Feb 2026 16:21:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31a94 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Feb 2026 16:21:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Abdelkader Boudih From: Aymeric Wibo Subject: git: 16822dac32ab - main - acpi_panasonic: Clear wireless RF_KILL on boot and resume List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 16822dac32ab8955539ffa4eda05145df8638154 Auto-Submitted: auto-generated Date: Mon, 23 Feb 2026 16:21:43 +0000 Message-Id: <699c7e97.31a94.4a81884f@gitrepo.freebsd.org> The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=16822dac32ab8955539ffa4eda05145df8638154 commit 16822dac32ab8955539ffa4eda05145df8638154 Author: Abdelkader Boudih AuthorDate: 2026-02-23 16:11:10 +0000 Commit: Aymeric Wibo CommitDate: 2026-02-23 16:11:23 +0000 acpi_panasonic: Clear wireless RF_KILL on boot and resume On Panasonic FZ-Y1 and similar models, the EC latches RF_KILL on shutdown and suspend when battery is at certain level, causing wireless to boot with hard block. Call WLSW.SHRF during attach and resume to clear the block. Tested on Panasonic FZ-Y1 with Intel Wireless 7265. Reviewed by: adrian, obiwac Approved by: adrian, obiwac Differential Revision: https://reviews.freebsd.org/D55265 --- sys/dev/acpi_support/acpi_panasonic.c | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/sys/dev/acpi_support/acpi_panasonic.c b/sys/dev/acpi_support/acpi_panasonic.c index 67d51ea9bc1f..8fea47ee45e8 100644 --- a/sys/dev/acpi_support/acpi_panasonic.c +++ b/sys/dev/acpi_support/acpi_panasonic.c @@ -80,6 +80,8 @@ static int acpi_panasonic_probe(device_t dev); static int acpi_panasonic_attach(device_t dev); static int acpi_panasonic_detach(device_t dev); static int acpi_panasonic_shutdown(device_t dev); +static int acpi_panasonic_resume(device_t dev); +static void acpi_panasonic_clear_rfkill(device_t dev); static int acpi_panasonic_sysctl(SYSCTL_HANDLER_ARGS); static UINT64 acpi_panasonic_sinf(ACPI_HANDLE h, UINT64 index); static void acpi_panasonic_sset(ACPI_HANDLE h, UINT64 index, @@ -116,6 +118,7 @@ static device_method_t acpi_panasonic_methods[] = { DEVMETHOD(device_attach, acpi_panasonic_attach), DEVMETHOD(device_detach, acpi_panasonic_detach), DEVMETHOD(device_shutdown, acpi_panasonic_shutdown), + DEVMETHOD(device_resume, acpi_panasonic_resume), DEVMETHOD_END }; @@ -172,6 +175,8 @@ acpi_panasonic_attach(device_t dev) CTLFLAG_MPSAFE, sc, i, acpi_panasonic_sysctl, "I", ""); } + acpi_panasonic_clear_rfkill(dev); + #if 0 /* Activate hotkeys */ status = AcpiEvaluateObject(sc->handle, "", NULL, NULL); @@ -232,6 +237,37 @@ acpi_panasonic_shutdown(device_t dev) return (0); } +static int +acpi_panasonic_resume(device_t dev) +{ + + acpi_panasonic_clear_rfkill(dev); + return (0); +} + +static void +acpi_panasonic_clear_rfkill(device_t dev) +{ + ACPI_HANDLE wlsw_handle; + ACPI_STATUS status; + + /* + * Call WLSW.SHRF to clear wireless RF_KILL on models that have it. + * On FZ-Y1 and similar models, the EC latches RF_KILL on shutdown + * and suspend, causing the wireless card to boot with hard block + * enabled. The SHRF method sets the EC state to deassert RF_KILL + * GPIO on mini-PCIe pin 20 via SMI (ASRV call with function + * 0x0F/0x03). + */ + status = AcpiGetHandle(NULL, "\\_SB.WLSW", &wlsw_handle); + if (ACPI_SUCCESS(status)) { + status = AcpiEvaluateObject(wlsw_handle, "SHRF", NULL, NULL); + if (ACPI_FAILURE(status) && bootverbose) + device_printf(dev, "WLSW.SHRF failed: %s\n", + AcpiFormatException(status)); + } +} + static int acpi_panasonic_sysctl(SYSCTL_HANDLER_ARGS) { From nobody Mon Feb 23 18:59:36 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKVXF6J65z6TyxY for ; Mon, 23 Feb 2026 18:59:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKVXF5pW9z48jT for ; Mon, 23 Feb 2026 18:59:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771873181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yVgkxAmAADKWgbxDlGlfxm9KuNbVu7walnpDUs37++Y=; b=V5BBQK+sgVJoDeH55SYgRtwN8StGC6zNDuhXum8REqCLIOYuJthANN3UFoUf6u635fVWCd yfZCvSNAGGu/+wBSXHDD9vicvBCyXQogp/MU2eYWb/8YHenZAY2h9V73nAwqM+Ox+R24Y1 MbRHX0Ex2Xbe3Ejjg4yfnUNAkSogfoojymfqKniZP3HPbbXyxvR2cocbDB3Mst5/szxqjT DeCQeVjGKqIfMre4NXJa6oHDLz7+XHxQ2fW7dyR8tD31CyPUs08i0uLl1jzh72sdgByPzH e7AzlbgmSroAQSExAhtA+S+2MYOzL6PIRThnBEfk52xQ60BqeazlqdLo+3lrQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771873181; a=rsa-sha256; cv=none; b=wb/4QM788yOGDKn+cVv/DTuCBSW+9IN8kqCLn103E8/8gySMwCSCBIqSTjtyqPL8E+tkhK YHgsEG5i9dA7LHUyTG+wLmPskiUbW8H2FqrtYDSIwfi6tuNjYWWHLpA7Vo3ym6Fnp/5SFY 39HsmlTP5CjXLov7uR8hc17fnOZIQUNqsxDXcKrwwYKbNBu0WUZxdiR59n56BuR5MVcNEI xuYRMYpHOlHS1dBCxl4QVhYHWJUsAbYpE97WUYfSv96VNxtR/fRe8df9ybONslguo1sgCx O1pXhHx+QoNHxMp9GoJSwooH3+djXBDC5kvSilu2GycR3bp22Y8mVoGLAszRMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771873181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yVgkxAmAADKWgbxDlGlfxm9KuNbVu7walnpDUs37++Y=; b=eXiPg5oh0307N6fEln3OUWG2hoj+xK73r3JYxUfdbxuhOvjsYkEwLYdjL+rTsFu9cppoNR +hG2NqwbFByReJcK5ApIqoez0Y14A6mFrlr8ixlnfy0vKb6ePwwnkvO7heQyt6wCkYbCEb YLYHeTHgOeo6ByipaEuUSVL3lDtqgpzY5WH4RpMot0KjRmUDb7Es/aMr5smKGNTXPVes1n qvtFxs21Lb/HXwn/+yjLQweKkXfo0OqxMy4Ozjg6VvE5MlnMTueWBjmI7I4VWMqzzNktFx o65BIBz1cXA7uLZen1p3iP5PdtMEl5ZyjrExkbrluVJ5qJogm3YZzr5FVVcJXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKVXF5HcWzjcb for ; Mon, 23 Feb 2026 18:59:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41417 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Feb 2026 18:59:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: b4305c90a3be - main - lesspipe: Allow zstd to operate on a symlink List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b4305c90a3be7e1a40b76545b8b761fdbda5c309 Auto-Submitted: auto-generated Date: Mon, 23 Feb 2026 18:59:36 +0000 Message-Id: <699ca398.41417.5923747d@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b4305c90a3be7e1a40b76545b8b761fdbda5c309 commit b4305c90a3be7e1a40b76545b8b761fdbda5c309 Author: Ed Maste AuthorDate: 2026-02-04 16:56:37 +0000 Commit: Ed Maste CommitDate: 2026-02-23 18:57:58 +0000 lesspipe: Allow zstd to operate on a symlink By default zstd refuses to operate on symlinks, so for example `zless /var/crash/vmcore.last.zst` failed to view the uncompressed core file. Add -f to the zstd command line to allow operation on symlinks. Reviewed by: delphij Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55101 --- 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 253914b8b3ee..6fc6cc471638 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 "$1" 2>/dev/null + exec zstd -d -q -c -f "$1" 2>/dev/null ;; *) exec cat "$1" 2>/dev/null ;; From nobody Mon Feb 23 19:47:07 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKWb45yc3z6S9fB for ; Mon, 23 Feb 2026 19:47:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKWb44kYDz3J5R for ; Mon, 23 Feb 2026 19:47:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771876032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tF06KMCfUDzn2Kovac+5YQPwhUnQFC1r/UbSb/Sqf0w=; b=uvmuEV09Dnw23bP/FT5H7l9fqi2Xm2VQ71qCAA1iJ63hpkjy2esH+Xc7IwbgCSwnJATDS/ QH+xZdT51eg2tmEw8jtKHZmzXCni+2uJTZTgF5RI2cA0sZjGQfKok5KUr6cdRdsbSLC0dh +EPfrCZd4GNUHn83uC2NfLfjNZwZ71Nc5PXMwT5xrNlYXY6uzsTHEazJfJUpYYC0xdT/fx Xm91jOxyyE3uNr+9R9L0MBN18JbK3/0lbnscb4LPOuDAfUeu4l5nTXRv4z8d9NwlXpLkFT L61PVT97JgJf6FUcU7kCwlWSnZIadkro4esw7mmfoKhoJKB/Ocu16aEq0AhvRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771876032; a=rsa-sha256; cv=none; b=hZM1rk7+Juw3qtCJ4glA2yZsUKMjrgj9cJUvAVrZH5xbCGS86Iwn/Q/vDQ6AVO5RfgMu5t 24qUFNDURW1lUkb5Q0wjPqvvL/KDnZiDsGHdusTBAiEuP4NsMFQK7XOz6fz/jWj/i8X0pZ EhBu+bK/ctFNGXy2CcSV9UVMAPYse1YLtHI3/JCyFiTj/84cpiWuXpaOu/54urQvojOqk8 8ZaZxlXH+amCjLOLTQyzMJbIM7brQPsi7XOjinDXtylubUvIdqxWo+SnlPRT8KVT9gYjDf 1RsoCuI6FzlJ4x8DE7bcsye15VmLwI3gRdkNPmoAeFPstitIZn7WC4VtmWXUmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771876032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tF06KMCfUDzn2Kovac+5YQPwhUnQFC1r/UbSb/Sqf0w=; b=yJodgl+XlT9GH6HET30JmSRxh3E/1B9o9oqWRyiDfRBD0zCXCVlrdJcoxC8qvS/9HWaODQ SdprAWNGg4TAQMn8jNRrIc7b7M4PuF9oLRKdW2ytfX0wtY99InP/ugA0rCKzxLA3gdAj4I i/o8hoGl95xk4yCC/OoYMT5IRDtQh/mle+yo7D79KlucwggtjseO9223YiVKCk+a3vs5w4 GucuMsggRiXjTT/SN+w9yPQ5sJAoNWv3w7knZvTAhO7oHlx+6R5SeZ+6EUviwT3Y4OoKtZ eqvV50lr6r/qWiunv49LbRF/Jt2FHURxOZinJTP59XirSm1+sWQfFXR3kcPHBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKWb43YDmzkPl for ; Mon, 23 Feb 2026 19:47:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4562c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Feb 2026 19:47:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Brooks Davis From: Ed Maste Subject: git: b0476eea5ef4 - stable/15 - OpenSSL: install EVP_CIPHER_CTX_get_app_data.3 once List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b0476eea5ef4ab2ccf2479652f486af3d4ab9cc0 Auto-Submitted: auto-generated Date: Mon, 23 Feb 2026 19:47:07 +0000 Message-Id: <699caebb.4562c.6600355b@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b0476eea5ef4ab2ccf2479652f486af3d4ab9cc0 commit b0476eea5ef4ab2ccf2479652f486af3d4ab9cc0 Author: Brooks Davis AuthorDate: 2026-02-17 18:24:29 +0000 Commit: Ed Maste CommitDate: 2026-02-23 19:46:42 +0000 OpenSSL: install EVP_CIPHER_CTX_get_app_data.3 once A separate EVP_CIPHER_CTX_get_app_data.3 was added in the OpenSSL 3.5.5 import, but the link to EVP_EncryptInit.3 was still being installed which stomped on the file and created inconsistent entries in the METALOG. Reviewed by: emaste Found by: package_check script in Cirrus-CI Fixes: 1731fc70f734 ("OpenSSL: update vendor sources to match 3.5.5 content") Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D55332 (cherry picked from commit c4130a8a84e1ce0fc9c05d2b48f83e66ade302aa) --- secure/lib/libcrypto/man/man3/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/secure/lib/libcrypto/man/man3/Makefile b/secure/lib/libcrypto/man/man3/Makefile index 01c40aed495e..172444fcb68c 100644 --- a/secure/lib/libcrypto/man/man3/Makefile +++ b/secure/lib/libcrypto/man/man3/Makefile @@ -1973,7 +1973,6 @@ MLINKS+= EVP_EncryptInit.3 EVP_CIPHER_CTX_free.3 MLINKS+= EVP_EncryptInit.3 EVP_CIPHER_CTX_get0_cipher.3 MLINKS+= EVP_EncryptInit.3 EVP_CIPHER_CTX_get0_name.3 MLINKS+= EVP_EncryptInit.3 EVP_CIPHER_CTX_get1_cipher.3 -MLINKS+= EVP_EncryptInit.3 EVP_CIPHER_CTX_get_app_data.3 MLINKS+= EVP_EncryptInit.3 EVP_CIPHER_CTX_get_block_size.3 MLINKS+= EVP_EncryptInit.3 EVP_CIPHER_CTX_get_iv_length.3 MLINKS+= EVP_EncryptInit.3 EVP_CIPHER_CTX_get_key_length.3 From nobody Mon Feb 23 20:32:18 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKXb65zMkz6SGHh for ; Mon, 23 Feb 2026 20: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKXb625l8z3PGf for ; Mon, 23 Feb 2026 20: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=1771878738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CIqD9UONFT2eE0Ylk1G6zlEwN5yX6SdoxZuFM0XpCB0=; b=Zj13kk2OGnL5XFvdH+MNxew07wm5pA/BUnG3arvyyL1wLGq0ZHCuzU7wR6k/Nxow1CFpbN ewW1V9F5f1LAD4nX/bNw7MnnLwcenFFbNZb5hzHObHiDCcIgHhI0DtW1JVdYkcB7U8yonU tu0+OHh5m28/gMBZrbPJwG9XC5IDWYv5Qogy2G9Hr9XJCrhdFsP2vJHpxIrOIpl2OtNoC2 bhfovjG0xsdt9+zJ+w4gomlyFlcE/omCt70xbNoH4f3cx0gAmeWUDV/KnRJHPBk7y5+bf5 Yai5R0IkjIwf84vApdC+VcRE26q+kutj2rLadsaSAUkhO02WuSqhVhw2rZd8bQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771878738; a=rsa-sha256; cv=none; b=MRVbnhtnnK4cIvZ2vMxSTaLUgxEKNLsEn156u1opCKd5CxG0ni9faPtG1TI8/v0xR7yymQ AZWa4DUBkGa+y1iELiz4sO8Pdk/O4NgRHrltM3u4yaLshdhA52+CVJt/5FEJnHBrVhGr0b WklAd3dlfJ8K/xjRUtqVEUUhcRyS03R5Xb5wMKajQErltl2CwZQJ/RRlIEsZHQhCyk8HAG xJn7eAjxbZ8Ebk1a+jfXcPCMwErvDwenONcvjspuW1k0LkL3Qcv5es4J1gQMLqci8AMtRH YpLteasP23ZFEbiRbSQn7nGTeqMSYwjPcONICAVS+9pHcRqIEzDD0RyIk5NXFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771878738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CIqD9UONFT2eE0Ylk1G6zlEwN5yX6SdoxZuFM0XpCB0=; b=bvliOR70JCBlYw9P9DsC+i84LCh8ouIG1GjVmQcabNot4Ta7nEoeM+LVXDzGOE345Amk+7 HqQ6cktrYFeH1g9g7GTN33SIVPpiav+3X+eTlViCIBoH6enxdxmAkeyrQ7Oy8LM7PNrC8+ hA+2z0129z2q5jgHFM5Y9Cf2nQ/qb89tkO3m50mEeKQJPEhbJSY1CzRi0AGlgXTN8iqzPa MadDMyDy6sHpzXmWlDJQxVjJY8PFkg2lmBetYGRlaufs7AWaW154+QsI1ku7zgHlvLlcOf 3SIpa35C0DKIXXHKq+GBGY8adF8OvggmIexvVXZPfkEdlLkvDCnwr23dnrXFLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKXb61B3zzlbx for ; Mon, 23 Feb 2026 20:32:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 19f34 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Feb 2026 20:32:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Pouria Mousavizadeh Tehrani Subject: git: 49ab036fc48a - stable/15 - multicast.4: Fix disabling multicast forwarding List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 49ab036fc48a4dd5f3f3d47b3d7d604df1235724 Auto-Submitted: auto-generated Date: Mon, 23 Feb 2026 20:32:18 +0000 Message-Id: <699cb952.19f34.312211d4@gitrepo.freebsd.org> The branch stable/15 has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=49ab036fc48a4dd5f3f3d47b3d7d604df1235724 commit 49ab036fc48a4dd5f3f3d47b3d7d604df1235724 Author: Pouria Mousavizadeh Tehrani AuthorDate: 2026-02-12 23:06:15 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-02-23 20:30:10 +0000 multicast.4: Fix disabling multicast forwarding Reviewed by: markj, glebius MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55266 (cherry picked from commit f2c2e5b0bf9def01b10651b9802fa38d07d9d265) --- share/man/man4/multicast.4 | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/share/man/man4/multicast.4 b/share/man/man4/multicast.4 index aa3293e107eb..84c6c5c4199b 100644 --- a/share/man/man4/multicast.4 +++ b/share/man/man4/multicast.4 @@ -23,7 +23,7 @@ .\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER .\" DEALINGS IN THE SOFTWARE. .\" -.Dd May 27, 2009 +.Dd February 13, 2026 .Dt MULTICAST 4 .Os .\" @@ -124,15 +124,15 @@ Therefore, for portability reason the multicast routing socket should be reused for IGMP and MLD messages as well. .Pp After the multicast routing socket is open, it can be used to enable -or disable multicast forwarding in the kernel: +multicast forwarding in the kernel: .Bd -literal /* IPv4 */ -int v = 1; /* 1 to enable, or 0 to disable */ +int v = 1; setsockopt(mrouter_s4, IPPROTO_IP, MRT_INIT, (void *)&v, sizeof(v)); .Ed .Bd -literal /* IPv6 */ -int v = 1; /* 1 to enable, or 0 to disable */ +int v = 1; setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_INIT, (void *)&v, sizeof(v)); \&... /* If necessary, filter all ICMPv6 messages */ @@ -142,6 +142,24 @@ setsockopt(mrouter_s6, IPPROTO_ICMPV6, ICMP6_FILTER, (void *)&filter, sizeof(filter)); .Ed .Pp +When applied to the multicast routing socket, the +.Dv MRT_DONE +and +.Dv MRT6_DONE +socket options disable multicast forwarding in the kernel: +.Bd -literal +/* IPv4 */ +int v = 1; +setsockopt(mrouter_s4, IPPROTO_IP, MRT_DONE, (void *)&v, sizeof(v)); +.Ed +.Bd -literal +/* IPv6 */ +int v = 1; +setsockopt(mrouter_s6, IPPROTO_IPV6, MRT6_DONE, (void *)&v, sizeof(v)); +.Ed +.Pp +Closing the socket has the same effect. +.Pp After multicast forwarding is enabled, the multicast routing socket can be used to enable PIM processing in the kernel if we are running PIM-SM or PIM-DM From nobody Tue Feb 24 01:05:46 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKfff4tqTz6SqTd for ; Tue, 24 Feb 2026 01:05:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKfff311Xz3pXM for ; Tue, 24 Feb 2026 01:05:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771895146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RPTz2UEMPhXFbDC3UF0D4Dx8L5vRqR5TJpXCTYUVt/Y=; b=ukekNWSNZSu8wWyC2XwummopmZFqd68d2a/Bt15P7ASgphNNys+5f3e6R9/HyNyvKtM9u/ 1EnCc7WXvEfrJnF1LCaAwZ1lJ7HZ9aTXzfRSA2H4vq3/HKhXWPhkLDTZeO86nLphlYscOH zk4modLLyRLOLHi7Pg22qgSrjrL1OFiTVmYvgPSF7a64lOzbWQcSVdqRTRapqoyLEroAAr p9bDyCN7Qe1zq1OpM+F+j9HBGdBI7sY2wXWnw1nYadEsHl7gOEBPPGOQINlflGD0HalxdN uXNPU1LyfDgEuBGAezlFYHG8+o5Bz4QkPSEsiLhW+Ws0I49UwPerS7kAH7R1Gg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771895146; a=rsa-sha256; cv=none; b=DRbaq4TJmJZLAykkzFwXmlPKB4VvnuqW3d5XTIgv4DOf/aJ6EIAqLH9iMYDOfTb0m87UBE 9pXSthcaGafS/9bEN61zeNzcl2PKj6lpCqgjdCxZ1BNBMlsyelF/dyM30Ynqdi8lnFZ2bM AQwJxrpKuQEE38Pv7RKzXfK0cQou8cA2rclz6VEpFfRQ2Dh/2POo0QJ39zEjcNx1dV5mPm Kh32bI0SLS7cJRUpW2c1reeLyDWYYrk5MCAIdwLCIZIwNAoMvwAu+wNQJ/EM03uh1rt2Hp Cew+F6yoUs0+OBmDTN99o5gilCEa7JOU+be3IWGV/IGm3mtzH/N1GmpXx6do3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771895146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RPTz2UEMPhXFbDC3UF0D4Dx8L5vRqR5TJpXCTYUVt/Y=; b=w0RHoS6RhI+s0DPTu0BOt7pv6hx3kFvO1aVgGsL8rIufgxHq9TNkeFgscLT9VnpF7Jbcpj 9LIqdyXjXTsgXOYo+PF1t36MrXWWx8pUgBbNqPzeOvz5LNABf+Dvl/jrLP+dFS1m401/iD ZJujlB6gW29idyeTCQ22dX0wmYuaO4YFhMefYtcIdU2N1lj5ba6fgw6AtAtVN+nR8r0PU3 dlt8q9SPpCO5xHwNXSUJWVeITfmsYGTZwfJwk1D5LYrlrRcXEPRQ+ewJIbPxxC1jMnEaRP focrB3szUv8Nxo9ktveD2hGuQbnaZeSvtLLI5uCAv70zPoLFneAxO9GTV9YZWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKfff25FTztGk for ; Tue, 24 Feb 2026 01:05:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f53e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 01:05:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Siva Mahadevan Subject: git: 47911892a029 - stable/15 - syslogd/tests: use kern.features to detect INET support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: siva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 47911892a029a4e016765b3a087e9ea65f18919d Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 01:05:46 +0000 Message-Id: <699cf96a.3f53e.4e6c9474@gitrepo.freebsd.org> The branch stable/15 has been updated by siva: URL: https://cgit.FreeBSD.org/src/commit/?id=47911892a029a4e016765b3a087e9ea65f18919d commit 47911892a029a4e016765b3a087e9ea65f18919d Author: Siva Mahadevan AuthorDate: 2026-02-19 20:53:26 +0000 Commit: Siva Mahadevan CommitDate: 2026-02-24 01:05:17 +0000 syslogd/tests: use kern.features to detect INET support This fixes INET feature detection with kernel configs that do not include the kern.conftxt sysctl, such as riscv64 currently[0]. [0] https://ci.freebsd.org/view/Test/job/FreeBSD-main-riscv64-test/16514/testReport/usr.sbin.syslogd/syslogd_forwarded_format_test/O_flag_bsd_forwarded_legacy/ Reviewed by: markj Approved by: emaste (mentor) MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55383 (cherry picked from commit c721ceeb3ef0b29d06e6c3c634579f3bc85cc28b) --- usr.sbin/syslogd/tests/syslogd_format_test_common.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/usr.sbin/syslogd/tests/syslogd_format_test_common.sh b/usr.sbin/syslogd/tests/syslogd_format_test_common.sh index 99623015c15d..ea32561ccbb3 100644 --- a/usr.sbin/syslogd/tests/syslogd_format_test_common.sh +++ b/usr.sbin/syslogd/tests/syslogd_format_test_common.sh @@ -48,9 +48,8 @@ local_privsocket_filename() confirm_INET_support_or_skip() { - if ! sysctl kern.conftxt | grep -qw INET; then + test "$(sysctl -inq kern.features.inet)" = 1 || \ atf_skip "Running kernel does not support INET" - fi } set_common_atf_metadata() From nobody Tue Feb 24 01:05:45 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKffk4yDTz6Sqr7 for ; Tue, 24 Feb 2026 01:05:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKffk2c7sz3pgQ for ; Tue, 24 Feb 2026 01:05:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771895150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=faQw1gtLpqRJT61XrwOYJ4N6EqvBGG+hu0Sl2+tzcpU=; b=XD2FnP0KAaiaoqKgHGYQnlw2nnV10Ij/FRtseMdLt0yMavEm+TDAt0blAnMMqvipiUpOLY PCt/NJIlUru1BgBkI68J9mx1bIMcpB6NSoNp/HApyr+U/SzqqLjtWTenx9kHkGpooZb0S/ +ZMm7G9DdRT88pdLbGW3eF4/qq76e8kg+WeRldmfKob3Q3gEl0UtcgxHSoN13VNaJK7c9Y 2QoWZF3mP2xngZXdaGYkr2iuc1nf69s62eq2zZt6PrPiNWA115iGKRssMiQ4sdAxfI/75F klYYBrrkmjqRYPNXEMk/oNaYoiFOVVfMcJi+I51i1ns5/n2RpLm8CboHnxloaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771895150; a=rsa-sha256; cv=none; b=NI/Kvkvlj38Q9wxkNZPyXnRUJGYlnwtZs6H0BwexEbuTytgOllqFGJ3y82X2jK5PisLAYH 9gmEbH/ZJvK3l1dv424NB7EMHlAPiXrh/QzrX8z7eCKUE8fQTEE8g7yC00Uotwa+0YBOah AYGtvoH4IMGEhpVYUXxQrC0Ai6KGmJR1XVBm0Wu5OR34kHafVq8AUFyZTtQUiuh3daYySB xuVNMo57KvtXxCmhHd9ccu+z9dqhdvQA7N4Nwd/KmtHguPmVP48pTQm8Q+9/PIOE/bs5ib OBYf9kRereqmaXHN9VEdrVyE1Tsr/AM3djWiQ4O5zDezZhPRkfBl1H6HYeHwPA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771895150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=faQw1gtLpqRJT61XrwOYJ4N6EqvBGG+hu0Sl2+tzcpU=; b=ggfinRE5TJ9a04NDo1kCAZhJQqb5B6rWCZbg7EHxQh7LlY3UFgYuTtQQn17Ub3BF/Kgh6e RnvMyDsjCvFj94aTwsB5n+b2Z8Eiag+ZWf0uMCHZDGs6RI89sq5NziWmd8l2wyLQC0nl36 0X6MYmWb7GhEwzIY+HH2u9dZWx+tftreVeN24e0jHZE3gHrEu70CkRv+RkFKGq6IIlXTpt xY4NAHYk3iUEz0GiKSYEs/L2uK6y3zfeKc3Ma+m9XI+BkS12MHESiLKcT7TV0zMibVYTZD X+B/Bhy6LKQanIMl/w7J6OtkNkO8Xr1vlVcpMTuRFPwDEPJLHYDzmM6axSLKZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKffk1hpZztdw for ; Tue, 24 Feb 2026 01:05:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 185b8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 01:05:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Siva Mahadevan Subject: git: 86a8a6726b59 - stable/15 - riscv: GENERIC: enable KERN_TLS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: siva X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 86a8a6726b5942f45d7e3b658940d8c69f71a8be Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 01:05:45 +0000 Message-Id: <699cf969.185b8.20422d89@gitrepo.freebsd.org> The branch stable/15 has been updated by siva: URL: https://cgit.FreeBSD.org/src/commit/?id=86a8a6726b5942f45d7e3b658940d8c69f71a8be commit 86a8a6726b5942f45d7e3b658940d8c69f71a8be Author: Siva Mahadevan AuthorDate: 2026-02-19 17:37:44 +0000 Commit: Siva Mahadevan CommitDate: 2026-02-24 01:05:16 +0000 riscv: GENERIC: enable KERN_TLS This unskips 585 sys/kern/ktls_test testcases[0] in CI. All 585 tests currently pass. [0] https://ci.freebsd.org/view/Test/job/FreeBSD-main-riscv64-test/16514/testReport/sys.kern/ Approved by: emaste (mentor) MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55376 (cherry picked from commit 1e649491b8567151270095fda3bce8faea394952) --- sys/riscv/conf/GENERIC | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index ffd958bb33bf..0b3defb3c285 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -35,6 +35,7 @@ options TCP_OFFLOAD # TCP offload options TCP_BLACKBOX # Enhanced TCP event logging options TCP_RFC7413 # TCP Fast Open options SCTP_SUPPORT # Allow kldload of SCTP +options KERN_TLS # TLS transmit & receive offload options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists From nobody Tue Feb 24 01:44:51 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKgWm35Sqz6Svkx for ; Tue, 24 Feb 2026 01: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKgWm0Nmyz3y0T for ; Tue, 24 Feb 2026 01: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=1771897492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4spjuUXCNlii6lM4pGt1fPUUe+t7EMtVmAU8TPlg69I=; b=Jj/QxnsqDzztVtTq30Eef9p8bYIlzGXZC+v+GoC8Hv1Q5Iihgh3l2gXYsB6P7vua5EctQG tSH7z9eW7kizHTb9QXHgMiEcNfE5v1Qg91YIeGCDPGnAuSLqJztJbOEez8ygBAXbJewtCZ cwWb4x2O8ErDBBG40JMk6BA7gefjlJMDBWmZ7ppet51N07iVyEoZtQmXRby7yzM8J9VrSA 5F740iE3Nr1xBUQL2hloORvyavGG+GEsxC/VdFBWz7zXJPTpCsgMABEnkKEa6lQLPfcDGT eI9gkD7SZh31s5qqDPyDE8eeMaRjKWwP7N2YexUhO2SQn0/JzV2ZZjsYL0WVpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771897492; a=rsa-sha256; cv=none; b=K3E3KnOZpWSw/Lt5lPlMYs9OE8yjUC3zUVkHhfcNXdXC2nGVOBg3uqTJYW1tAQZ283ItL9 J7zZj/A4JJoQ/OmoWwmSAzEZPnMVz2Jva1/S87hJygPTKWaIA9aYEOZA/X6h9E88tADI+R amCLecZUPX71e4QixBUdB6C6GYi5WTeVilt7ss3isYyDvhyUiQarpzvjbLx6xI/u2OX/Lv Gqqsv2b2gwLhoaXNzryK47CL2pWHheWyX55t7FxZLHpkIiO5OYp/6NwvY7MWdJB/3S4RiP B4ntijoOBnUrVrhARZXUofc54HXtv0itr2kbMWbpECoNs6dzRFlK4ZMbrec95g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771897492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4spjuUXCNlii6lM4pGt1fPUUe+t7EMtVmAU8TPlg69I=; b=uFZWerxLwa4k2hQPeO1/B4dwqIYQhhIqGLVU8sfP4tyDZE1bJaISmAIoxio1mAzP3ol55Z 1XwpfVbxiA+w4LwzS3cvUO6AcxSuCiO7DUul/A1w9rlKNmEAoQwX0q7cDjq46JGOEdzR+O fHatIa3dLH3u/x7ccQmJPh2ksMdYAx9RlAW/8/BwhTxVDABQPvATOb3m/tTXrfEqQC7LZq 1kCNoeNznHgYIogcOQvUL4Lh9hI70o8YZCBz84gj8GIIlcloGHRcqw+nGUbownjNlqIgHU DvC+7DOeKwx2ozzli9/xXNI2ttMUp5lUCNJ5sliRGgK9cuy8lghl0kAG0EZp6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKgWl6p1Gzv21 for ; Tue, 24 Feb 2026 01:44:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d910 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 01:44:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 7ae432e6fbb2 - stable/15 - vfs_mount.c: Don't call VFS_MOUNT() if only exports are being updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7ae432e6fbb2350fbb6a805dd0e14b73f8e0c9ef Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 01:44:51 +0000 Message-Id: <699d0293.1d910.5ae75a70@gitrepo.freebsd.org> The branch stable/15 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=7ae432e6fbb2350fbb6a805dd0e14b73f8e0c9ef commit 7ae432e6fbb2350fbb6a805dd0e14b73f8e0c9ef Author: Rick Macklem AuthorDate: 2026-02-17 22:57:42 +0000 Commit: Rick Macklem CommitDate: 2026-02-24 01:41:58 +0000 vfs_mount.c: Don't call VFS_MOUNT() if only exports are being updated PR#293198 reports a hang within ZFS when exports are being updated concurrently with a VOP_SETEXTATTR(). The hang appears to be caused by mishandling of the z_teardown_lock, but fixing handling of this lock appears to be a major effort. Since the hang occurs when VFS_MOUNT() acquires a write/exclusive z_teardown_lock, which rarely occurs, except when exports are being updated, this patch avoids the VFS_MOUNT() call for this case. Avoiding a VFS_MOUNT() call fixes the hang for the case reported by PR#293198 and is also an optimization. As such, this patch avoids the VFS_MOUNT() call when only exports are being updated similar to what was already being done within vnet prisons. PR: 293198 (cherry picked from commit 935cf3284f520c90a63baaadb762caaa30084f5c) --- sys/kern/vfs_mount.c | 52 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 21 deletions(-) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 2237fcc6b423..383ccf98c10e 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -74,7 +74,7 @@ #define VFS_MOUNTARG_SIZE_MAX (1024 * 64) static int vfs_domount(struct thread *td, const char *fstype, char *fspath, - uint64_t fsflags, bool jail_export, + uint64_t fsflags, bool only_export, bool jail_export, struct vfsoptlist **optlist); static void free_mntarg(struct mntarg *ma); @@ -806,7 +806,7 @@ vfs_donmount(struct thread *td, uint64_t fsflags, struct uio *fsoptions) struct vfsopt *opt, *tmp_opt; char *fstype, *fspath, *errmsg; int error, fstypelen, fspathlen, errmsg_len, errmsg_pos; - bool autoro, has_nonexport, jail_export; + bool autoro, has_nonexport, only_export, jail_export; errmsg = fspath = NULL; errmsg_len = fspathlen = 0; @@ -861,12 +861,11 @@ vfs_donmount(struct thread *td, uint64_t fsflags, struct uio *fsoptions) * when we want to update the root filesystem. */ has_nonexport = false; - jail_export = false; + only_export = false; TAILQ_FOREACH_SAFE(opt, optlist, link, tmp_opt) { int do_freeopt = 0; - if (jailed(td->td_ucred) && - strcmp(opt->name, "export") != 0 && + if (strcmp(opt->name, "export") != 0 && strcmp(opt->name, "update") != 0 && strcmp(opt->name, "fstype") != 0 && strcmp(opt->name, "fspath") != 0 && @@ -957,7 +956,7 @@ vfs_donmount(struct thread *td, uint64_t fsflags, struct uio *fsoptions) fsflags |= MNT_UNION; else if (strcmp(opt->name, "export") == 0) { fsflags |= MNT_EXPORTED; - jail_export = true; + only_export = true; } else if (strcmp(opt->name, "automounted") == 0) { fsflags |= MNT_AUTOMOUNTED; do_freeopt = 1; @@ -989,14 +988,22 @@ vfs_donmount(struct thread *td, uint64_t fsflags, struct uio *fsoptions) } /* - * If has_nonexport is true or the caller is not running within a - * vnet prison that can run mountd(8), set jail_export false. + * only_export is set to true only if exports are being + * updated and nothing else is being updated. + */ + if (has_nonexport) + only_export = false; + /* + * If only_export is true and the caller is running within a + * vnet prison that can run mountd(8), set jail_export true. */ - if (has_nonexport || !jailed(td->td_ucred) || - !prison_check_nfsd(td->td_ucred)) - jail_export = false; + jail_export = false; + if (only_export && jailed(td->td_ucred) && + prison_check_nfsd(td->td_ucred)) + jail_export = true; - error = vfs_domount(td, fstype, fspath, fsflags, jail_export, &optlist); + error = vfs_domount(td, fstype, fspath, fsflags, only_export, + jail_export, &optlist); if (error == ENODEV) { error = EINVAL; if (errmsg != NULL) @@ -1014,8 +1021,8 @@ vfs_donmount(struct thread *td, uint64_t fsflags, struct uio *fsoptions) printf("%s: R/W mount failed, possibly R/O media," " trying R/O mount\n", __func__); fsflags |= MNT_RDONLY; - error = vfs_domount(td, fstype, fspath, fsflags, jail_export, - &optlist); + error = vfs_domount(td, fstype, fspath, fsflags, only_export, + jail_export, &optlist); } bail: /* copyout the errmsg */ @@ -1307,6 +1314,7 @@ vfs_domount_update( struct thread *td, /* Calling thread. */ struct vnode *vp, /* Mount point vnode. */ uint64_t fsflags, /* Flags common to all filesystems. */ + bool only_export, /* Got export option. */ bool jail_export, /* Got export option in vnet prison. */ struct vfsoptlist **optlist /* Options local to the filesystem. */ ) @@ -1442,15 +1450,16 @@ vfs_domount_update( * get. No freeing of cn_pnbuf. */ /* + * When only updating mount exports, VFS_MOUNT() does not need to + * be called, as indicated by only_export being set true. * For the case of mountd(8) doing exports from within a vnet jail, * "from" is typically not set correctly such that VFS_MOUNT() will - * return ENOENT. It is not obvious that VFS_MOUNT() ever needs to be - * called when mountd is doing exports, but this check only applies to - * the specific case where it is running inside a vnet jail, to - * avoid any POLA violation. + * return ENOENT. For ZFS, there is a locking bug which can result in + * deadlock if VFS_MOUNT() is called when extended attributes are + * being updated. */ error = 0; - if (!jail_export) + if (!only_export) error = VFS_MOUNT(mp); export_error = 0; @@ -1590,6 +1599,7 @@ vfs_domount( const char *fstype, /* Filesystem type. */ char *fspath, /* Mount path. */ uint64_t fsflags, /* Flags common to all filesystems. */ + bool only_export, /* Got export option. */ bool jail_export, /* Got export option in vnet prison. */ struct vfsoptlist **optlist /* Options local to the filesystem. */ ) @@ -1693,8 +1703,8 @@ vfs_domount( } free(pathbuf, M_TEMP); } else - error = vfs_domount_update(td, vp, fsflags, jail_export, - optlist); + error = vfs_domount_update(td, vp, fsflags, only_export, + jail_export, optlist); out: NDFREE_PNBUF(&nd); From nobody Tue Feb 24 02:42:42 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKhpV2bdkz6Sn6D for ; Tue, 24 Feb 2026 02:42:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKhpV1vmnz44Mf for ; Tue, 24 Feb 2026 02:42:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771900962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HqsbmZQPyzxH3TfGzmaAWChiZO+g0xmqAHBEhE5WKsQ=; b=DGO6cLfq/hsvPYA1rfQ0kOr0AiWpjAnoxQWwkQX0VTHJiEn9McttI/bC1eUkfvBNlLm6Wx Dcv5ONV5evVnw4Ot2yTMeVS7EjeUBEc9Cc6CIu55DwVWvTC5+hGzYgmmAzvFTUvsLWT99u jtFOq4ls78Uzus1ssNWHk8ypUkSjH1aD5w2Uv/HINcgU03G51KnDn258Tc3/FYnoRRMPfJ OB2v/0Qfn018GcCNxfE1K4NYKpF7evAEjENHRSnUNZdlKZZTNXsy+BxSCufqhuR8IWbDiV bFWgzqYOO4Qiz4OVu2xteKVNRwnGKFrVt+nAI0sdP55V/JSDZnyA6bH8VcJeIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771900962; a=rsa-sha256; cv=none; b=kKtEWmbbgZ/dnFMSTseAP3/U025uFl3rhpmcG1UatebqY/ZczzOHRQWUJizxwE26bXsANR R4f+pbnQwQDMOd/sNsknmNdz3Zcze8RRmNwzDuvxmsvzYOQWAQGWs8+cjwQWKLmOi+rsJZ FMYuXRjR9kZM6+ooPdApwlyBF5T/b3Z4n9Z/AdZQ0EDCgSpV0GsMT0VOBde+Qez7JReLx4 ylCIviF0PYhUzJ/lPT/xQDwQcSVaBCV1c+6xVCv8ZqCoc/TwVn7AhmHpvdGEgKijYV2MpQ efZH0RsteHt19HEB0oHTlUBqXycHLUFeZHJwAnbrYMQ4XRyO1RC5WQmj66Y99w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771900962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HqsbmZQPyzxH3TfGzmaAWChiZO+g0xmqAHBEhE5WKsQ=; b=nTLVk7NypThdVzCjdvH8TeGSHMXWB8fmHK+tN+l8EWIAQlnIPSmGhVhogDVcOzfZA1zC/T xfKlMZAfqixLdN80tz7I6FNbgPekP93b++esHJxerdT2q7RD7oNEwWMkCQ+rpQtp3cJa6I EoQMKfqiFF3ga6aTpOVJZpl5OwPV/HAserQgBVt1OG9cYaXJhaA+keJG+0WTFdsH17U1ze 7dXEaqh4qw2HAzv9gnY4AEOWYNaA+kxG4Q5fq7Qlr2/G15NmbxVrvXgd3SAIQq1iTQJJ4Q 0rT54u65H4ZU0JknlDBFfVSLLnJAGN2hbMGT6ZJebDwXRBka3VmdatDX6rty+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 4fKhpV1VH5zx6X for ; Tue, 24 Feb 2026 02:42:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 219eb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 02:42:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Siva Mahadevan Subject: git: 97b7f7325d8d - stable/14 - riscv: GENERIC: enable KERN_TLS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: siva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 97b7f7325d8defd88a00ad82d1895b63bc84d0e6 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 02:42:42 +0000 Message-Id: <699d1022.219eb.175d0757@gitrepo.freebsd.org> The branch stable/14 has been updated by siva: URL: https://cgit.FreeBSD.org/src/commit/?id=97b7f7325d8defd88a00ad82d1895b63bc84d0e6 commit 97b7f7325d8defd88a00ad82d1895b63bc84d0e6 Author: Siva Mahadevan AuthorDate: 2026-02-19 17:37:44 +0000 Commit: Siva Mahadevan CommitDate: 2026-02-23 20:22:54 +0000 riscv: GENERIC: enable KERN_TLS This unskips 585 sys/kern/ktls_test testcases[0] in CI. All 585 tests currently pass. [0] https://ci.freebsd.org/view/Test/job/FreeBSD-main-riscv64-test/16514/testReport/sys.kern/ Approved by: emaste (mentor) MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55376 (cherry picked from commit 1e649491b8567151270095fda3bce8faea394952) --- sys/riscv/conf/GENERIC | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index 7ecd496d6aab..411e25a3b9d6 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -35,6 +35,7 @@ options TCP_OFFLOAD # TCP offload options TCP_BLACKBOX # Enhanced TCP event logging options TCP_RFC7413 # TCP Fast Open options SCTP_SUPPORT # Allow kldload of SCTP +options KERN_TLS # TLS transmit & receive offload options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists From nobody Tue Feb 24 02:45:19 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKhsW6LkTz6Smtx for ; Tue, 24 Feb 2026 02:45:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKhsW2hw1z45sc for ; Tue, 24 Feb 2026 02:45:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771901119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zlr4381vbzRUKlZ5FyH0PGsyRAKjyp/NZknEmaJQYKI=; b=U2OnYoaHSyx7KHXDh7WWXSna3+xPKweXKRAvl3oR4RIMsfwI2KjJ3Qvl23YgINBQmtAiQc HIuf6wSD/2MbC0aTkxqQ60gd4mlzryhecQE8yyMWff5fB08yhpAxiUR5pNqFxSFDPZld1S J1rlA12XQspX5WRfQDxyUMHtB05TsZkltqIg71kFdjRu76whzMFYptiSMAbElKPyaVB7yq pP/5k9VGLO9EEG8zSL9FDXMdCE7TNWGycp9aXv7FE+5aD4eZ+eCOc5y4nak7NBQoIGAqMa nxCznYC+G1gmlbb/k9cDbI9DXSBB+kFvFTOb2+BWc0VYH3Jh6wCIexb3Nsutmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771901119; a=rsa-sha256; cv=none; b=gz4DFqgzJh9f7r9w5/ziNeLZvsvfO4MlKHIlPlw0khY4vmH9PxoThTg73c9vFqngFz4MFK davuXzqqVRBsei7B7I12nQt8Cn8a3IsxWWOD4O/cViPlwTl5EYcMzUMrlchKKxUsZZeI7N e2yXgLgv5fOodRZS+sMkMbJEdGNa4Wp/BRUbEsyS34L1FaIQVi5sBaLJtHSLKjit1YQR9c Jbzn/qUt93MxkRkywyxliyUAEMhkObZgCNCFnM5JW4G1QFja4N6YrS7PzeHWkQuctihzaj eLQCzftupl0ifMuVzjEzJm0iMEBXKUOimp3Xhvnx3P/R4lioi63B2+CpBUqjUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771901119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zlr4381vbzRUKlZ5FyH0PGsyRAKjyp/NZknEmaJQYKI=; b=G2sxp2D8BkaAgMeYF3UyOJOCIfwd372oAHhda5UKJjkXPwPPXMEyr9HiyG8XuXWXAS4fsA 5LbBVHW/98SnEqNWl+JQtfc+pHxrc8EjTaUIjX7NXrOOYpzPvZkt/2VAnyj5qmTa4LxQAt B/K3Tu4Q19wihnkWkQLwlYiKSbsHvnny6MeIaahIzqlSKCoExz25kuLCFNsOKz+eamDAwf 81GlFNZ8nPWKDPl08ukYfgDx6ljEDVgvLAwQErgAJPPz7Qj4ZkinPxW6KVoQXNLzZ5d09t krp3SR9NbyagDhpGKXQ2CRKnlNV22SG/EJw1WR2eZ5SacBY1R9vs2N+mbQjvbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKhsW1ZHYzx6Z for ; Tue, 24 Feb 2026 02:45:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23d99 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 02:45:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Brooks Davis From: Ed Maste Subject: git: 5d6dfa511048 - stable/15 - src.conf.5: regen documenting WITH_IPFILTER_IPFS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5d6dfa5110488605c25d97f3513fc1ace30a32e5 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 02:45:19 +0000 Message-Id: <699d10bf.23d99.4f28c941@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5d6dfa5110488605c25d97f3513fc1ace30a32e5 commit 5d6dfa5110488605c25d97f3513fc1ace30a32e5 Author: Brooks Davis AuthorDate: 2025-12-15 13:52:34 +0000 Commit: Ed Maste CommitDate: 2026-02-24 02:44:36 +0000 src.conf.5: regen documenting WITH_IPFILTER_IPFS (cherry picked from commit b9b1262a8ef95857101e538145703894e3b880b7) --- share/man/man5/src.conf.5 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index ecb990d6fcdc..74c45a6e2138 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd February 6, 2026 +.Dd February 23, 2026 .Dt SRC.CONF 5 .Os .Sh NAME @@ -848,6 +848,10 @@ The user still must set the variable to point to a directory where the user has write permissions. .It Va WITHOUT_IPFILTER Do not build IP Filter package. +.It Va WITH_IPFILTER_IPFS +Enable building the +.Xr ipfs 8 +tool to save and restore IPFilter state tables. .It Va WITHOUT_IPFW Do not build IPFW tools. .It Va WITHOUT_IPSEC_SUPPORT From nobody Tue Feb 24 02:45:18 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKhsb5x3Cz6Smv1 for ; Tue, 24 Feb 2026 02:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKhsb2mlQz45p0 for ; Tue, 24 Feb 2026 02:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771901123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xLq3Tdceot0gAoQ47WIyZPavj7iz73luuWVtrWrS2gM=; b=dlYYcFqjIxMi+ammD28iOLKJHm0F7bXTJG2fQRsnX8yKSBrAP7BBeU7MqpI8lrBctDmmHY SCJLyXdrsx026lkP6ze+92tAaHeox7u+wnLkI4828PjrP4wPd9H6e64/gvWcDdO0AlY3Bc kSUDjvBzQPA7krOMmz8nLjTWVINbDPH4xUTIVVquTdltde93M2N7uQRPTgp7pcXIdWpW+q eYE2HCilqYpyYJG+fUm0EEKIIVtvvGOuCrI4R0QNA+GVQtLH4AeohxsvwX2g2uTMI2toUA okzJvg7f/Dkf/121obM01gVKgVuM6QPH8A0neFv3L3hHtWw83GOnmGeskkeJsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771901123; a=rsa-sha256; cv=none; b=cRVl+5clSWC2V+pFe5QfV+sgA60QG9WI0Yx+2ri2ms9/6fzEyWutdb/2BJKFXYqUmiy20I jSBR6DQJlNuIdVEp16/SAdTCfKXJhzJ8o7ZOu1/VsNtoHNxziKbfb3GP8GhX3Mq20o5GlK kWjhpppOw65OYyvbLFhaO1oCsfnHHbPHionCwwjR6r45TuhJ38Kn4orxRlaiX2kku59ThN hCyrK6LOuldDOO/oYWtLvwpWabfVYzfYOZdxvwKF6xB2AyZewCYKZt29eKudNdBno7vlw4 ZnhEUaypSssKYv0dVZMoad4FsfuijbMQ+R8r3xeJ5mNZDY/cKaSG6Po7WLfHiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771901123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xLq3Tdceot0gAoQ47WIyZPavj7iz73luuWVtrWrS2gM=; b=Un2EZ/CH5qHri4qRb2ONIC4xDJ7gly2IPGJXYK8VilQqNGWyVC4DpQJ02BdVzXDUCXh2K1 W1enNBLzdcMkTtMwWiz5eK8eI7pBs+9AZHH6+IXOz1iTNvZ8A7OcSlKYhtmavpSFBqNqkn FcvLY9fPcdkMKZ5+W3mijzFKJ7/jJNWNiMirzNxVXoVnnFGOV7O3zRRCWU/ErRr86J6qH9 RRqqfhJ3tQPNs/tC+Ew+VlEBPfElKx+9YVDSBtUtswZNL+a6rdczb1TA9B1tr1juhR/moz JmowwCrPMVtuO1X2pI/Pshbgc/s0DPyFVWSt1AQ24g2ID3gu8JASZw3hCbVudQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKhsb2Gt6zxM7 for ; Tue, 24 Feb 2026 02:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23139 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 02:45:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Brooks Davis From: Ed Maste Subject: git: f981908926a8 - stable/15 - options: describe WITH_IPFILTER_IPFS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f981908926a88357ca6b53aed5566fca4c05a850 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 02:45:18 +0000 Message-Id: <699d10be.23139.3b461844@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f981908926a88357ca6b53aed5566fca4c05a850 commit f981908926a88357ca6b53aed5566fca4c05a850 Author: Brooks Davis AuthorDate: 2025-12-15 13:50:56 +0000 Commit: Ed Maste CommitDate: 2026-02-24 02:42:05 +0000 options: describe WITH_IPFILTER_IPFS Add a description for WITH_IPFILTER_IPFS. Fixes: 0ff0c19e7f70 ("ipfilter: Disable ipfs(8) by default") (cherry picked from commit c112ad75605ccdfcb8bbce2f57b0e7a077f057f8) --- tools/build/options/WITH_IPFILTER_IPFS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/build/options/WITH_IPFILTER_IPFS b/tools/build/options/WITH_IPFILTER_IPFS new file mode 100644 index 000000000000..6822b70f443e --- /dev/null +++ b/tools/build/options/WITH_IPFILTER_IPFS @@ -0,0 +1,3 @@ +Enable building the +.Xr ipfs 8 +tool to save and restore IPFilter state tables. From nobody Tue Feb 24 03:10:24 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKjQX1VQMz6Sqfk; Tue, 24 Feb 2026 03:10:28 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKjQX0xk4z49NY; Tue, 24 Feb 2026 03:10:28 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771902628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0f3RCcTn8CfxeHOw3LQjbvIBEztCj1FLBJ+wzLX+JCg=; b=CfEpK4sdvo6Vf+oM3/wUmqiZhV/lQuYZ9v5CEfVcyk2QJqClNK9hguh/9PAbOa+Vy4lG8O ky8qMLx0ULZ94b+yKiQ41/B20+97C5D94xIJF6GUVBQoyygx4lwlhfWTBibyPSBocAm1/m 06tS1bofuQVHNac5b14bBJQ+LW1TcAtcL/Q0ZQybQF38idLCveBorEx2g3fNn0b3p4yNmr /OHTWgVCt8leWe4vBai6rYETPdDNECB2ltw14jMVXZFtiaalDQE+HMhEJD1uwIeB0IYbN9 dei2dBEOekZM3Cq+EPljocjDvkG7xDt01Y/xcRwOqMlJkoOyUBMKobD0EQ3D2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771902628; a=rsa-sha256; cv=none; b=Pug6X6QQRR3hLqbHPi+4uxf0sUMWWk1C7eC5r9d3IDIUQSIPScSIBBeJSuDLgZL1pIBURt +3apYmDx/v6LS8mBjSccq7nvWAi5pkloCmgCwfExpzG4v9GNpKtzFWRjDlEfxsxxFyLc18 Uf+xe5lhsRg0G6X1iOCJfR2HnS+4uWO7CHm2L0atYyDnSR9eN2iyQ0jxDDN9b21tI3jiqG xyNKOLPIoYDsoXQPGs62ezaLLkNXC2Db7NEmPk8NYupmbpjWD+yJG3Y/L3eNR278zbHkTN ShhJleQi0n/dsU8hejVsuN/Qv/ANZW9cEArFV353ifIDf8LcQKo1p5me9P+yuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771902628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0f3RCcTn8CfxeHOw3LQjbvIBEztCj1FLBJ+wzLX+JCg=; b=G9nz/bNYx5Px0Bf5VH1hMFAktZan7WhcCcsQdM9DQG7nnlLbcyjxCdqVAeJfL2l2xSBuwx eS3ydkbhU9mIWMiXRavspA23C/j6dg5mXWY3gRdicX8M/XY4FHUnGanmwu2wziWMMS5OFM VG0wsJauCJsUrOGI3dlxGc1LGt4urfYPB6b3XHnZEEapne3yKxEcug5F8i3rJUIRtLCZcF Xiv4QCqj8P6Wb9XmnCNsTiUYBgz/D5Zyqs4RDuUttY/2cahT/iBaqe/Cf7CTiqGfkOsZI7 ucbVF8C8poAyPcD64I5w6DE6iMszfdXczMWzviasIVZMKQQkhuOXf1ht29tTOw== Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fKjQW4T8RzJBt; Tue, 24 Feb 2026 03:10:27 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: Date: Mon, 23 Feb 2026 21:10:24 -0600 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 0d3652f67d24 - main - sched_shim: Drop the no-ifunc case To: Mitchell Horne , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org, Konstantin Belousov References: <6984c635.1e072.359146aa@gitrepo.freebsd.org> Content-Language: en-US From: Kyle Evans In-Reply-To: <6984c635.1e072.359146aa@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/5/26 10:32, Mitchell Horne wrote: > The branch main has been updated by mhorne: > > URL: https://cgit.FreeBSD.org/src/commit/?id=0d3652f67d246348e2c017205c6782caf4484449 > > commit 0d3652f67d246348e2c017205c6782caf4484449 > Author: Mitchell Horne > AuthorDate: 2026-02-05 16:12:03 +0000 > Commit: Mitchell Horne > CommitDate: 2026-02-05 16:32:16 +0000 > > sched_shim: Drop the no-ifunc case > > Now all architectures support kernel ifunc resolvers. Therefore, the > alternate implementation can be removed. > > Reviewed by: kib > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D55114 > --- > sys/kern/sched_shim.c | 8 -------- > 1 file changed, 8 deletions(-) > Hi, I'm trying to mentally reconcile the commit message with the diff... shouldn't we have kept the `DEFINE_IFUNC` version if all architectures now support ifunc resolvers? To the naked eye it looks like we removed the ifunc bits instead of the non-ifunc bits. Thanks, Kyle Evans > diff --git a/sys/kern/sched_shim.c b/sys/kern/sched_shim.c > index 83e4412494d3..2b1dcecda433 100644 > --- a/sys/kern/sched_shim.c > +++ b/sys/kern/sched_shim.c > @@ -22,20 +22,12 @@ > > const struct sched_instance *active_sched; > > -#ifndef __DO_NOT_HAVE_SYS_IFUNCS > -#define __DEFINE_SHIM(__m, __r, __n, __p, __a) \ > - DEFINE_IFUNC(, __r, __n, __p) \ > - { \ > - return (active_sched->__m); \ > - } > -#else > #define __DEFINE_SHIM(__m, __r, __n, __p, __a) \ > __r \ > __n __p \ > { \ > return (active_sched->__m __a); \ > } > -#endif > #define DEFINE_SHIM0(__m, __r, __n) \ > __DEFINE_SHIM(__m, __r, __n, (void), ()) > #define DEFINE_SHIM1(__m, __r, __n, __t1, __a1) \ > From nobody Tue Feb 24 03:17:46 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKjZz06x8z6Ss5v for ; Tue, 24 Feb 2026 03:17:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKjZy3xLrz3DZX for ; Tue, 24 Feb 2026 03:17:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771903066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JnXl9Tq7G8ssLjwLdijDjrh6nTLc4yZKIhZ9xZUH0+Y=; b=LbPKq1QtqTB7MRvcE8u2BiXUKDaw6xDHmIsWfFVkmfW6KW8MM7UDrkF4BFdwMB73nrvcIy n55jqky0KhORmNkAxJR52PMLAiZFiBSwDCNjDZNoi21lam7EIY2ubdiPmptPrLu1JXto9y morabzM3KOJPoEzjtpZ/Lor6M4I55GzVNbOTAnmE0o+8g1xXBHjPXu4zHnGFiR7oHP8M/V rDHpBlaEynHRsKa5ByjLhySKcxNXPXtpf7nonyQT/ydjJUTX+RSNFQUfiCShRSOUA13GTg icC9+RKAi6DwG+3p2bddKMeCyky2V0Hp+lxxOyTaHh58mY4fGkXqPJwJSG+9cQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771903066; a=rsa-sha256; cv=none; b=eAEgi4vwCCGAZ4GUJPdFhqe7bTeV+VCDJyGJCCwua9zorqZApxT6uvBG/23lzYkZ6beogv tCHXbsduAquyYGFPY/gkWLYhyhtFdrP21tFvC/kToXyCLDvTxpnt8O4+eX9k2sQzwakiGN asYfMTuIMqsq32p2rsAZmCoKe5O71ZLJ/tMM0D7O9eMZWcKMz7OKx46P8d/FEhlPGAlPb7 QZeOAt2VXY29HE2OMzn9c9I58p3YbjENwYJ/1odJNvQm24C5Ns+LYMRbXIsgbMDQbRcSj5 +CjufxHCdtBaAibbyLwfK7bGgaoXvXBPFkqDUEvPbvG4Q4lXMq+lN/l1Pg31Mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771903066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JnXl9Tq7G8ssLjwLdijDjrh6nTLc4yZKIhZ9xZUH0+Y=; b=sKI2RA4mXJL5Ecz6oGvF6JfPpnUEsAOgepKLz/xgnHw4AE2ASaEFJKqIeJ3rqk8/Kz1RfH 4OMbDrfXv4/8wzuVKA6TXh2Ckl4cCI+Cp+2L8eIdslJ9bV54RCo6RpptMPuoeTlX51CqFc cUfEuM/qsr6gEZL+T1YUcc2KF7BEjUeO8eHw9PAZIdRWdPIgeJQPuw901yzsLa3iP0aozM uk+M6gGeb6/yLaBiU0GE2+wF8gpA3TxtrhuRf5cIwJ5Am/CDt382Ya0h3aHU6B1QohCik+ t5HOPf2DeUMNxv40P8+tsShsVO/Dbx2b0ug322q4ehNcUD/qSFibRkAlVlA7RA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKjZy3Fz4zy62 for ; Tue, 24 Feb 2026 03:17:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 263f9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 03:17:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: John Baldwin From: Cy Schubert Subject: git: 1ce195ddf8a6 - stable/14 - heimdal: Pass the correct pointer to realloc when growing a string buffer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1ce195ddf8a6f92da597b400905a233deffa2cf4 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 03:17:46 +0000 Message-Id: <699d185a.263f9.1bc749cd@gitrepo.freebsd.org> The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=1ce195ddf8a6f92da597b400905a233deffa2cf4 commit 1ce195ddf8a6f92da597b400905a233deffa2cf4 Author: John Baldwin AuthorDate: 2026-02-02 17:18:11 +0000 Commit: Cy Schubert CommitDate: 2026-02-24 03:17:35 +0000 heimdal: Pass the correct pointer to realloc when growing a string buffer The realloc in my_fgetln was trying to grow the pointer to the string buffer, not the string buffer itself. In function 'my_fgetln', inlined from 'mit_prop_dump' at crypto/heimdal/kdc/mit_dump.c:156:19: crypto/heimdal/kdc/mit_dump.c:119:13: error: 'realloc' called on unallocated object 'line' [-Werror=free-nonheap-object] 119 | n = realloc(buf, *sz + (*sz >> 1)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ crypto/heimdal/kdc/mit_dump.c: In function 'mit_prop_dump': crypto/heimdal/kdc/mit_dump.c:139:11: note: declared here 139 | char *line = NULL; | ^~~~ Reviewed by: rmacklem, cy Fixes: a93e1b731ae4 ("heimdal-kadmin: Add support for the -f dump option") Differential Revision: https://reviews.freebsd.org/D54933 (cherry picked from commit 03d8ac948b1ad9c419b294c3129b7da58d818363) --- crypto/heimdal/kdc/mit_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/heimdal/kdc/mit_dump.c b/crypto/heimdal/kdc/mit_dump.c index 4397d1ad897d..d790b145af11 100644 --- a/crypto/heimdal/kdc/mit_dump.c +++ b/crypto/heimdal/kdc/mit_dump.c @@ -116,7 +116,7 @@ my_fgetln(FILE *f, char **buf, size_t *sz, size_t *len) return 0; } *len += strlen(&(*buf)[*len]); /* *len should be == *sz */ - n = realloc(buf, *sz + (*sz >> 1)); + n = realloc(*buf, *sz + (*sz >> 1)); if (!n) { free(*buf); *buf = NULL; From nobody Tue Feb 24 03:17:45 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKjb266kfz6Srnx for ; Tue, 24 Feb 2026 03: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKjb25VHNz3Df9 for ; Tue, 24 Feb 2026 03: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=1771903070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oRQ8m+kJHseunfjQ8n8qeNOynpo+kPXOa3W1g0+fd8k=; b=QnHBpUeYOOWnFntVw8aIBhzb0XMm5UAzeQiBhg9T8/u8IdjwzXO+ZpMvQLBx4A3iC0ePFd B8QCWYqY3ANvALORchJT+COOb31mvUCvxebKHEtmons0OaIkrAlXuQYl0HmrRg4U4LQDPv NtT6rSj+MYEl9dkCct/V5wBe/2KUInPoHpsfYltSIwmd5zRcx7oku8iv5yaY9TiXT4KVyF sRCp/7bv0tpCtg4raP4O1W3MmRsXq6a7fIuFS0x6ZBRAHDFxOmxQpWVcznDMyBSjL1xI5s RkEdJ7pnzQSrsrgNgAhBD39t8FbZZQRw6cx5+v4OEIAwlxCnUMOfDat80yetkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771903070; a=rsa-sha256; cv=none; b=Rf6qAJpJ+fsHhBM/CFVqsPwC44OAJYFsZ9K2cRqK9g/L8ZqLdBLEqlemBk/FMFKQfnZpJR gDuV2stjryfLD9aXDmONuXBoeW1f5yDF6+kPhw4Ep2jwm/VctH/zWp/tgJeBi3/JiPijjH FozfxW7TbiHnfPtbBi81xEdsx08tdu11FVjImqKx3ff8EzlsfTxJy+deqSgJ2e+OM38cUZ +4S8UKgQL3G9WuG4tRu671Dve+XPPGRwf14Ky1POZgrBO5Wf+3Dro1nTFXWU7zaxFLTOFv TI8ZR8swT+XqC6KZKtx225VYTfgS1FjcC8ln6FtuhKOvOkFzHny7CECViEkx3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771903070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oRQ8m+kJHseunfjQ8n8qeNOynpo+kPXOa3W1g0+fd8k=; b=X6tXJGHY+Bx3DttjJUZK8lvcTw8ipUmokOu4nYkWed9+p70QFHGgB+Z9VPNkMVoMBAkurj R6heX7DZjcSF4JPXuWyVemqhigI5A0hlj9OiPh6zoOgJPWoZCr7Y+JEh9qJ7Nr0eJ+9ptS VPfrqYvqUXMmU57Bx348B0IJjNkXERjbuQ9AvGSiEeb9DEmYHMoAUpHA+9NO5bawS8mEfW 3IDmHL7wYo3nGeTIY+7jKJTk91lMjNLj3cVdXeE71bFt2YDfagugEPmwDF6yxAVOPkakHF 0YgcdsnLlUDKg++T3KeeelfmJihWUMOCbxtFKsZvTlJWxNVQaWpZ+nwHXo2mBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKjb24m96zx39 for ; Tue, 24 Feb 2026 03:17:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 271bd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 03:17:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: John Baldwin From: Cy Schubert Subject: git: 51bb8e49cf7e - stable/14 - heimdal: Pass the correct pointer to free in an error case List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 51bb8e49cf7e0d6e42cbae980c3b57d8a71af07b Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 03:17:45 +0000 Message-Id: <699d1859.271bd.2e28eee7@gitrepo.freebsd.org> The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=51bb8e49cf7e0d6e42cbae980c3b57d8a71af07b commit 51bb8e49cf7e0d6e42cbae980c3b57d8a71af07b Author: John Baldwin AuthorDate: 2026-01-31 17:00:44 +0000 Commit: Cy Schubert CommitDate: 2026-02-24 03:17:34 +0000 heimdal: Pass the correct pointer to free in an error case This fixes a warning reported by GCC 14 on stable/14: crypto/heimdal/lib/hdb/keys.c:241:13: warning: 'free' called on pointer 'ext' with nonzero offset 16 [-Wfree-nonheap-object] 241 | free(hist_keys); | ^~~~~~~~~~~~~~~ crypto/heimdal/lib/hdb/keys.c:234:15: note: returned from 'calloc' 234 | ext = calloc(1, sizeof (*ext)); | ^~~~~~~~~~~~~~~~~~~~~~~~ Reviewed by: rmacklem, cy Fixes: 5000d023a446 ("heimdal-kadmin: Add support for the -f dump option") Differential Revision: https://reviews.freebsd.org/D54932 (cherry picked from commit b26a7af438f36dcde86f39a681123cc2140affb2) --- crypto/heimdal/lib/hdb/keys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/heimdal/lib/hdb/keys.c b/crypto/heimdal/lib/hdb/keys.c index 9c0af5c47f23..ef6113610009 100644 --- a/crypto/heimdal/lib/hdb/keys.c +++ b/crypto/heimdal/lib/hdb/keys.c @@ -238,7 +238,7 @@ hdb_add_current_keys_to_history(krb5_context context, hdb_entry *entry) hist_keys = &ext->data.u.hist_keys; hist_keys->val = calloc(1, sizeof (*hist_keys->val)); if (hist_keys->val == NULL) { - free(hist_keys); + free(ext); return ENOMEM; } hist_keys->len = 1; From nobody Tue Feb 24 05:59:23 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKn9X6Xthz6T9Kx for ; Tue, 24 Feb 2026 05:59:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKn9X5Nlqz3VxZ for ; Tue, 24 Feb 2026 05:59:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771912768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JDg+Zt5IaE+HMwb6d/JW3FR4iT4gmQ3CWQRxlzXGjiE=; b=EGagbt9fuVZQOuH4qle4z0386xAEwUkwdJj3rludUO23tY/O/+8RQqMxujE/bmcOoeZ1O1 R8BetAVbodY1OzjgXxKozNqZ4aF1czZ11j+m2caynNixCHGXEGQ98DaL+XlEPELKmS8Oko Z6ruBWHPGrThntZBE5WfbYrahfnCrSH5HlKVH0z9Uj6OUk+TM9+kuxu92jFjkVrLW9w8PO vMQ2i1iBMGl+TyjNJLLJrcJ9vGF+KBhtegEXp2ogdPKHHYhpjHB5o50rd1gKXziBLyWeUE BV1FxsU5gDSm9jNhYGki53ydasQWQEws+6XmIicQ+hk2wC8GBKRfZ/Ee6HeflA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771912768; a=rsa-sha256; cv=none; b=hZyWqY7f1hNkfX+NhGbXnKB5ql1JnMQra9z08nTYK37D1tq8kO9NkxaTJCa5FX3b476Cur lsVuGtEu3DR3d8Unsykwm+OKI3/AUUABMAB8+SV3dCGXSI6jX7WO1m0AIubPWfRAvtWvTf yv5ZFmGn2dgjA/IjsfBdzi4TPEzc/AnUpi5nkweAvotxEqtijf+V5LoDAn7inzv2OmMNh8 lLU7rSe7DbFCjgAQtmiAJfUsAdxSPylxdudGJKTgzEP0PYBe1tMuwtA8U1JF+Fh4u35A2b FZbO5o+g+wuP49Uhn1R7Glg+JVKiqZYycXuNDbDHqLW6EpQQ1iajN9yY8u/D/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=1771912768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JDg+Zt5IaE+HMwb6d/JW3FR4iT4gmQ3CWQRxlzXGjiE=; b=sEOfHxkVaMOESPszyHAduuauBnrl42hhh5hGwxru8g7OGxQISIOz7u8NFkmP1Lt5XCFglM RmqNhOSwOk86EeTpgTmvJdnQT3fICY6xnOyaXPC3KLRPVZiU4iAM3eJDTcQZnWapIdlpdn XnHK0Zmnd8KwLx49WnjZsYu8JJpEvK1Z65hsWTBwgnVRBLmlD8j26bjYe4zO9aeqg/FqBK c9mfbzBwVWfKw1KhZhSLxrXa17IAwaJd/TFerS3402wAi0M8L3KAMrJwg3vPUSSHmjvRpD bgVYzpVznqSmhAHP4J7zDnVeuXQHZOn6JYIwVUNf1cDggk1G14419x+TiJ8aTw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKn9X4xsvz12hj for ; Tue, 24 Feb 2026 05:59:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f49e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 05:59:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 686280c0fdc4 - main - libjail: avoid a double-free in the MAC label bits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 686280c0fdc4807676c3e8b896a1816ce62d4457 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 05:59:23 +0000 Message-Id: <699d3e3b.3f49e.3106aad9@gitrepo.freebsd.org> The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=686280c0fdc4807676c3e8b896a1816ce62d4457 commit 686280c0fdc4807676c3e8b896a1816ce62d4457 Author: Kyle Evans AuthorDate: 2026-02-24 05:55:12 +0000 Commit: Kyle Evans CommitDate: 2026-02-24 05:58:45 +0000 libjail: avoid a double-free in the MAC label bits As written, we'll repeatedly jps_free() the first element, which is obviously bogus. Fix it to index appropriately. Fixes: db3b39f063d9f ("libjail: extend struct handlers [...]") --- lib/libjail/jail.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libjail/jail.c b/lib/libjail/jail.c index baabeb4afed9..95ba336b62ce 100644 --- a/lib/libjail/jail.c +++ b/lib/libjail/jail.c @@ -978,7 +978,7 @@ jailparam_free(struct jailparam *jp, unsigned njp) for (j = 0; j < njp; j++) { free(jp[j].jp_name); if (!(jp[j].jp_flags & JP_RAWVALUE)) { - jps_free(jp); + jps_free(&jp[j]); free(jp[j].jp_value); } } From nobody Tue Feb 24 09:54:05 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKtNX09p9z6TbTX; Tue, 24 Feb 2026 09:54:20 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKtNW3LMjz3wM6; Tue, 24 Feb 2026 09:54:19 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 61O9s5hp066211; Tue, 24 Feb 2026 11:54:08 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 61O9s5hp066211 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 61O9s5Qn066210; Tue, 24 Feb 2026 11:54:05 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 24 Feb 2026 11:54:05 +0200 From: Konstantin Belousov To: Kyle Evans Cc: Mitchell Horne , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 0d3652f67d24 - main - sched_shim: Drop the no-ifunc case Message-ID: References: <6984c635.1e072.359146aa@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4fKtNW3LMjz3wM6 X-Spamd-Bar: ---- On Mon, Feb 23, 2026 at 09:10:24PM -0600, Kyle Evans wrote: > On 2/5/26 10:32, Mitchell Horne wrote: > > The branch main has been updated by mhorne: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=0d3652f67d246348e2c017205c6782caf4484449 > > > > commit 0d3652f67d246348e2c017205c6782caf4484449 > > Author: Mitchell Horne > > AuthorDate: 2026-02-05 16:12:03 +0000 > > Commit: Mitchell Horne > > CommitDate: 2026-02-05 16:32:16 +0000 > > > > sched_shim: Drop the no-ifunc case > > Now all architectures support kernel ifunc resolvers. Therefore, the > > alternate implementation can be removed. > > Reviewed by: kib > > Sponsored by: The FreeBSD Foundation > > Differential Revision: https://reviews.freebsd.org/D55114 > > --- > > sys/kern/sched_shim.c | 8 -------- > > 1 file changed, 8 deletions(-) > > > > Hi, > > I'm trying to mentally reconcile the commit message with the diff... shouldn't we have kept the `DEFINE_IFUNC` version if all architectures now support ifunc resolvers? To the naked eye it looks like we removed the ifunc bits instead of the non-ifunc bits. > You are right, thank you for noting. Will you fix it? > Thanks, > > Kyle Evans > > > diff --git a/sys/kern/sched_shim.c b/sys/kern/sched_shim.c > > index 83e4412494d3..2b1dcecda433 100644 > > --- a/sys/kern/sched_shim.c > > +++ b/sys/kern/sched_shim.c > > @@ -22,20 +22,12 @@ > > const struct sched_instance *active_sched; > > -#ifndef __DO_NOT_HAVE_SYS_IFUNCS > > -#define __DEFINE_SHIM(__m, __r, __n, __p, __a) \ > > - DEFINE_IFUNC(, __r, __n, __p) \ > > - { \ > > - return (active_sched->__m); \ > > - } > > -#else > > #define __DEFINE_SHIM(__m, __r, __n, __p, __a) \ > > __r \ > > __n __p \ > > { \ > > return (active_sched->__m __a); \ > > } > > -#endif > > #define DEFINE_SHIM0(__m, __r, __n) \ > > __DEFINE_SHIM(__m, __r, __n, (void), ()) > > #define DEFINE_SHIM1(__m, __r, __n, __t1, __a1) \ > > From nobody Tue Feb 24 10:45:07 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKvW74Ft3z6ThQ4 for ; Tue, 24 Feb 2026 10:45:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKvW71fLnz42mT for ; Tue, 24 Feb 2026 10:45:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771929907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4fUl2TyRqBoGSKkfSWGUriI8mbXYONsl1WrVWoPtNUY=; b=G1xuzgO/smcl/Zrrpd5S1qVRbnUaInHjqY0Lmd8kn/IlgNPQ6Y8Y/9uQvPF4IQWrx2f7eW MQm5dyT3cax96G/uXiwxMgfmRoVlP3N8lvJpSHhHm5ugYTnMPphy541Fh/mUP3ocz5oCj8 pHKkZZcjcne0GCFa/g6ktaolKhB2duoDbCmdh6ItNu088YuJphwOtsD4Gjglv6CsrPl5wN osBf6krFMoER5lEYiBQcaL7KdEGcrSBtSQDpfA662PJgfJHOHhItudZJx16Crl7LjkbHYk gTawLykzpT95UGv9zl0RNVSzrLIwpbrElYTNxVhg3BtPOG19gNZbodeoeOIuzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771929907; a=rsa-sha256; cv=none; b=iMAzrS2Gy5AS/opVhkESLtZNs9TZld7CLy9dSvcoE4Y3yb2Ahjld/b8N9rTVSxVVd5NY0I q5Ip+zediLWKcTKYuuE4O3VBUqPWKWo3u2jP8fXzf4i1k9mYWXQne9vCcguYpVK5YqWiFk MKe3jT6gROIQ5s+EFwa+Zqow7f8dN/XZV14ERSGD6RtXvF221dnymDpQpUDL6Z+KrxdwTU Mh3zW7zCwdFij5tazw9DhD6uChwDWiPhCeN2xLbVMHNofnB1mVB4OIj98TXNvJ5/oC219B S1iHnf5flTL2BaG+O75lRnVDbhVyDHIIM0doZsUY/dptYqY6UJp9fNWFAysBcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771929907; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4fUl2TyRqBoGSKkfSWGUriI8mbXYONsl1WrVWoPtNUY=; b=A0B58MiV94HCho0EbWN4oq7ihokEeodNhNo/Rix8kcHE5g4IGpIPyY/V7fUd0IqynZXfAI +/tzQ8ayWGLTglsd2fkoqdFH8o1KS7SmE+QeJJlxtFhfqYs7+ZWe0mYgvuViDAs45qp6vp boOE/jY0UysOIuL09VAAsOMVTsaQDjCQJ+Psv3om/PeEtO1qqtPbXLdcSB4E4tCSHZsf21 075uy1o6ibtBxX39ziaoe10Rwmqi/+gpR/4oc/wt9TtpaEaZv5ExOEJ3JyTMszTAGOa5oY lqWGb0WkfVdrRyswCL7bMU59LFZmcupcBIxTv7gXH/pZd+Mxp0rU4RKwBLl0kg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKvW71Ckpz1BK5 for ; Tue, 24 Feb 2026 10:45:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36cf4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 10:45:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 18e4cb41e945 - stable/13 - qlnxe: Avoid memcpy with same source and destination List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 18e4cb41e945a79afabb8fa82fe39f28865aa3cf Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 10:45:07 +0000 Message-Id: <699d8133.36cf4.46d1f27b@gitrepo.freebsd.org> The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=18e4cb41e945a79afabb8fa82fe39f28865aa3cf commit 18e4cb41e945a79afabb8fa82fe39f28865aa3cf Author: Zhenlei Huang AuthorDate: 2026-02-06 17:52:53 +0000 Commit: Zhenlei Huang CommitDate: 2026-02-24 10:15:35 +0000 qlnxe: Avoid memcpy with same source and destination In case the device is VF, qlnx_get_mac_addr() returns ha->primary_mac hence it ends up memcpy with same source and destination. Refactor slightly to avoid that. Reviewed by: kbowling MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D54884 (cherry picked from commit 3aeeedc7e0dc231c16406ff64f4a08a716964c40) (cherry picked from commit 6462189595047800337aaf052e397d1aade3f9a7) (cherry picked from commit ea1143bddbc3671f49219a6b2a054965deea0c63) --- sys/dev/qlnx/qlnxe/qlnx_def.h | 1 - sys/dev/qlnx/qlnxe/qlnx_os.c | 13 +++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/qlnx_def.h b/sys/dev/qlnx/qlnxe/qlnx_def.h index 898d85fdba89..3e63bd2d1882 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_def.h +++ b/sys/dev/qlnx/qlnxe/qlnx_def.h @@ -683,7 +683,6 @@ extern int qlnx_grc_dump(qlnx_host_t *ha, uint32_t *num_dumped_dwords, int hwfn_index); extern int qlnx_idle_chk(qlnx_host_t *ha, uint32_t *num_dumped_dwords, int hwfn_index); -extern uint8_t *qlnx_get_mac_addr(qlnx_host_t *ha); extern void qlnx_fill_link(qlnx_host_t *ha, struct ecore_hwfn *hwfn, struct qlnx_link_output *if_link); extern int qlnx_set_lldp_tlvx(qlnx_host_t *ha, qlnx_lldp_sys_tlvs_t *lldp_tlvs); diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index 64909d39ff59..a9acfffee629 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -94,6 +94,7 @@ static void qlnx_stop(qlnx_host_t *ha); static int qlnx_send(qlnx_host_t *ha, struct qlnx_fastpath *fp, struct mbuf **m_headp); static int qlnx_get_ifq_snd_maxlen(qlnx_host_t *ha); +static void qlnx_get_mac_addr(qlnx_host_t *ha); static uint32_t qlnx_get_optics(qlnx_host_t *ha, struct qlnx_link_output *if_link); static int qlnx_transmit(struct ifnet *ifp, struct mbuf *mp); @@ -2369,7 +2370,7 @@ qlnx_init_ifnet(device_t dev, qlnx_host_t *ha) ha->max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; - memcpy(ha->primary_mac, qlnx_get_mac_addr(ha), ETH_ALEN); + qlnx_get_mac_addr(ha); if (!ha->primary_mac[0] && !ha->primary_mac[1] && !ha->primary_mac[2] && !ha->primary_mac[3] && @@ -3835,7 +3836,7 @@ qlnx_get_ifq_snd_maxlen(qlnx_host_t *ha) return(TX_RING_SIZE - 1); } -uint8_t * +static void qlnx_get_mac_addr(qlnx_host_t *ha) { struct ecore_hwfn *p_hwfn; @@ -3844,8 +3845,10 @@ qlnx_get_mac_addr(qlnx_host_t *ha) p_hwfn = &ha->cdev.hwfns[0]; - if (qlnx_vf_device(ha) != 0) - return (p_hwfn->hw_info.hw_mac_addr); + if (qlnx_vf_device(ha) != 0) { + memcpy(ha->primary_mac, p_hwfn->hw_info.hw_mac_addr, ETH_ALEN); + return; + } ecore_vf_read_bulletin(p_hwfn, &p_is_forced); if (ecore_vf_bulletin_get_forced_mac(p_hwfn, mac, &p_is_forced) == @@ -3855,8 +3858,6 @@ qlnx_get_mac_addr(qlnx_host_t *ha) p_is_forced, mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); memcpy(ha->primary_mac, mac, ETH_ALEN); } - - return (ha->primary_mac); } static uint32_t From nobody Tue Feb 24 10:45:08 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKvW85JVJz6ThXl for ; Tue, 24 Feb 2026 10:45:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKvW82n6Kz42gl for ; Tue, 24 Feb 2026 10:45:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771929908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bNwOTQOtPw9SB6Z+WRxs8LcpNEW9qeMy/z3FaAzvFRw=; b=QWIg5Sz3oHO7H8GZgaSr4JuKsdItWIYE3dBzdB8jZQAigwZwu5vac0/kjVOdgvT4SsM4jZ u+Q/DJ/YZhq65iGUFWIWqKIvx57m/zRAQ/BFmYXxl4KhrO+7ABlgPM5dEP3pGS2+6xiL3N 9043t1iXRIw2PHAEC6Gc5SKQ4yLu96vj5UyXnYgRx/57TfWXT9u/mCKfbAT7EtWamGnUjo DN5Qd/d3QxhoXXIW92J64jknybyI5IDtwR/8f77RFwzjj6rDu3LOS5hZULB/GcwZBnFbZ4 aKtNKumwKCtvlaMz8AIdylmAuJZYyBRrOMUjZJsUShVVQKPZxnzKcQjWNYb+Yw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771929908; a=rsa-sha256; cv=none; b=llNvVtzPycNmcRICFjoTA6bk+21AslLMLgBLr1d02nfy4gv2C+mFip5fJ5uuxP+FmniYR2 il4qytVxeLsf7dJ6qEMCjgnBZTsVlQygDt80RjxPTDLZWVn4gJ0YDGyt2rqzFe414C/Zqk JLNO3cN1ZDLxW4ycQ6VBZiUafIl7n4IU8CSa38i/l+G75UvzJcndP1huSu3JyS4n3nMh/V Je3zeEtFzLc/vhID9zCpDUp/TrgzhIAfhVlttuZdb+uTmKZ/hkn6hfCwq3Ol+xhd9Z/DnC RSUjZ7GWe9X+80CrqCii8M+nyZp6ouCaBL9NpVab6zvoQm/YstWGhOgkLmfKbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771929908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bNwOTQOtPw9SB6Z+WRxs8LcpNEW9qeMy/z3FaAzvFRw=; b=oaL/nYctJYrsm5g74P3Up0Z03ex/PZEfqJCu3vfhjdlQBoeq36D9kgS1jC/lWY684T+DAm fPGFEdZfboHW3+3e7KSYiEhZDoVOZjTZ8ej4zE2W8+nhEfSWCE3TYmyQl7enKttLQ7yAzn elHBpxENrBVoxNhQDri88AsJudN+ZtnOWQk6AoSVIjOiaEAKySEkB8pUltnpb98ZCgSL9W eMkZFZwKLT+h7ot/ibZrlhPG0CRlItjR7z12ZlpI3C6wD3TiKg0gQxySPGW/q1VwQmm+r+ m860UkUILAy1+/6VlwUMr8i+Y5Tx/Aut/wncSWdRo1ir1tsJz3YUsp3uVJUbxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKvW822Wrz1Bcr for ; Tue, 24 Feb 2026 10:45:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36618 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 10:45:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: fb463bcd621b - stable/13 - qlnxe: Fix setting the unicast MAC filter of RX path List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fb463bcd621b78351d0ff91e60071ea9cbda05bc Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 10:45:08 +0000 Message-Id: <699d8134.36618.3aeec826@gitrepo.freebsd.org> The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=fb463bcd621b78351d0ff91e60071ea9cbda05bc commit fb463bcd621b78351d0ff91e60071ea9cbda05bc Author: Zhenlei Huang AuthorDate: 2026-02-06 17:52:53 +0000 Commit: Zhenlei Huang CommitDate: 2026-02-24 10:15:36 +0000 qlnxe: Fix setting the unicast MAC filter of RX path When an Ethernet interface is added to lagg(4) as a child interface, its type, aka if_type, is changed from IFT_ETHER to IFT_IEEE8023ADLAG. Well changing the link-layer address of the lagg(4) interface will be propagated to all child interfaces, hence the drivers of child interfaces shall not presume the type of the interface will not be changed. Meanwhile, on initializing, an ifnet has been fully attached and it is guaranteed to have non-null link-layer address so stop NULL checking for it. Reviewed by: kbowling Fixes: 792226e53023 qlnxe: Allow MAC address override MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D54885 (cherry picked from commit f250852c9a0c1021c3be4b498e27cfc7b42a81db) (cherry picked from commit 6d138e958ffb318595eec29b910cada414e2f86d) (cherry picked from commit 93719f8c8348a5d13c9037352072ce67f530288b) --- sys/dev/qlnx/qlnxe/qlnx_os.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index a9acfffee629..28aeaa784e14 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -7185,18 +7185,10 @@ qlnx_set_rx_mode(qlnx_host_t *ha) int rc = 0; uint8_t filter; const struct ifnet *ifp = ha->ifp; - struct sockaddr_dl *sdl; - if (ifp->if_type == IFT_ETHER && ifp->if_addr != NULL && - ifp->if_addr->ifa_addr != NULL) { - sdl = (struct sockaddr_dl *) ifp->if_addr->ifa_addr; - - rc = qlnx_set_ucast_rx_mac(ha, ECORE_FILTER_REPLACE, LLADDR(sdl)); - } else { - rc = qlnx_set_ucast_rx_mac(ha, ECORE_FILTER_REPLACE, ha->primary_mac); - } - if (rc) - return rc; + rc = qlnx_set_ucast_rx_mac(ha, ECORE_FILTER_REPLACE, IF_LLADDR(ifp)); + if (rc) + return rc; rc = qlnx_remove_all_mcast_mac(ha); if (rc) From nobody Tue Feb 24 10:45:09 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKvW94k9Kz6Thb3 for ; Tue, 24 Feb 2026 10:45:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKvW93Jj1z42Y6 for ; Tue, 24 Feb 2026 10:45:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771929909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=quew4mUMabqx9yBwDul93P3fiSfAhibdLz/8z6VNSDg=; b=LBFoj2xMLw5XzDY44sogLbMtCn6EPvdOuatn2CInfx0wtTX2IuA61WDyYBK5Sjml2+k9fv Pees2BetdYyKgarx65ksHNhJe6XyyaoNCuB3bLvK/jLaihoSaSKH+1tg5OVuE069/A+M8K CB4a0ca3pRz6vommcm0MOqIJXKOTj2gmHn76gJ1xhEiTOFcH01iT3G1saWJuWkWYMX1FN6 x9dK77Kx7Ems7Kvkp8zJ8wpM4Hl1wwRxlsxiGFzuXNVyOYI3hlpDkpK5+B7749452DajYY wJlKJ+QYPujL+5zkrN/bzx71pN2mxP45BtipLsMJfc7JaZAiBMsKsw1meVl8HA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771929909; a=rsa-sha256; cv=none; b=k8m+hRFqScUHeQwzKE9Dw6dd16WIoTaKSy9IXOM8OonKt3pkg+sDg73XrSmXiNRddARhWM 1IR9Uqn1lunjzlHAqzMF1Fohf5vDNKWqSt8uBabNW3ghnW5ArX5QvGNsD3tNMzsyZbwcaU MHdPrXOpa3G89RhkoZ3hykmfmglkxLbP7/5HBzJ0nfPnQIDqFRXxwGUcco6hMxh5h9vR4x RIO17AtAr1K/amDS9d0jNnG20YYnJxkbIMiCbl/hoRmyldqQFjJnXq2T8gY3nO4FB8KGOu 01uAsU1DgkOMRyMSqe6CIiOH2w4tMRsDAk1TMfjaVWcwp73t2m4Pyn2CKufGqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771929909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=quew4mUMabqx9yBwDul93P3fiSfAhibdLz/8z6VNSDg=; b=b9QboaLiYjX9wCt3xEUE/n4THcnczHiGLflNxgUfUccixCnAVAqoM6YmaT9WZlXTcrLBj+ entw8thnrNIxLjlCekfqE/NVBEJmRd3BRgyRtfJRJTy2zIZBc0cAH7GlZi0bWenlYHB+2d xYPChUjbn7ts81pJVgE9+ku2xCcwyfvVigYkflfze0n6OnHY4VRqLKWoxASMGhfQVSGhtK +CgeuVkiwxPQXs7g1DhVJigqoK6mz1V9KGK4DprTQMP33JIZNO8aWXXkKpAztBD8lU3WA9 vpd9/IJ8T/QzrBaqQrSaRBPAUFhj6O3eXv2juri/dLTswvRMm/kYRKRJxpdrKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKvW92szTz1BnJ for ; Tue, 24 Feb 2026 10:45:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3661c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 10:45:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: e16c965add1d - stable/13 - qlnxe: Prevent potential concurrency between ioctls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e16c965add1d28422f92388daf623dbf967794fe Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 10:45:09 +0000 Message-Id: <699d8135.3661c.37dbd163@gitrepo.freebsd.org> The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=e16c965add1d28422f92388daf623dbf967794fe commit e16c965add1d28422f92388daf623dbf967794fe Author: Zhenlei Huang AuthorDate: 2026-02-06 17:52:53 +0000 Commit: Zhenlei Huang CommitDate: 2026-02-24 10:15:36 +0000 qlnxe: Prevent potential concurrency between ioctls The driver-managed status flags should be lock protected to be touched. Also this can serialize ioctls those check the IFF_DRV_RUNNING status. Reviewed by: kbowling MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D54886 (cherry picked from commit 0df8a998a9fe28af659cb401c537c6d785e55f81) (cherry picked from commit 285b25c080faf71c60de36e834ef31cf70e6b50d) (cherry picked from commit 6e5b12acb66a9e269801b8d88c8f9838044d631c) --- sys/dev/qlnx/qlnxe/qlnx_os.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index 28aeaa784e14..f0d83c3356ff 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -2617,9 +2617,7 @@ qlnx_set_multi(qlnx_host_t *ha, uint32_t add_multi) mcnt = if_foreach_llmaddr(ifp, qlnx_copy_maddr, mta); - QLNX_LOCK(ha); qlnx_hw_set_multi(ha, mta, mcnt, add_multi); - QLNX_UNLOCK(ha); return (0); } @@ -2682,11 +2680,10 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) if (ifa->ifa_addr->sa_family == AF_INET) { ifp->if_flags |= IFF_UP; - if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { - QLNX_LOCK(ha); + QLNX_LOCK(ha); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) qlnx_init_locked(ha); - QLNX_UNLOCK(ha); - } + QLNX_UNLOCK(ha); QL_DPRINT4(ha, "SIOCSIFADDR (0x%lx) ipv4 [0x%08x]\n", cmd, ntohl(IA_SIN(ifa)->sin_addr.s_addr)); @@ -2746,19 +2743,23 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) case SIOCADDMULTI: QL_DPRINT4(ha, "%s (0x%lx)\n", "SIOCADDMULTI", cmd); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + QLNX_LOCK(ha); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { if (qlnx_set_multi(ha, 1)) ret = EINVAL; } + QLNX_UNLOCK(ha); break; case SIOCDELMULTI: QL_DPRINT4(ha, "%s (0x%lx)\n", "SIOCDELMULTI", cmd); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + QLNX_LOCK(ha); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { if (qlnx_set_multi(ha, 0)) ret = EINVAL; } + QLNX_UNLOCK(ha); break; case SIOCSIFMEDIA: From nobody Tue Feb 24 10:45:10 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKvWB6QpJz6ThSh for ; Tue, 24 Feb 2026 10:45:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKvWB48LGz42dm for ; Tue, 24 Feb 2026 10:45:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771929910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eNzKURkMuM/7h5W+t9172Tv0OqsnxfDUyzBigUFMeV0=; b=jAwW/eWz4g3ZT1X+VazmQR9IfAucpd6bmgOPv0T8+Y/O6MQBZlsLJhqplOETn429cnYae+ myRw2IHc1s3ZQ0UV7SeLYmsWCvij1L+drvkAkDA2rhGUiIfZb2+N1hWYNLOt/VIPHNYpap 1ojibqKwF3p97xN317r45rz+sYg/kgxuFjqciGuUEVwd9yHIvHjZ3j4gimT/prAvs1bOfP Yhns+dRPTjKRtQPSUCGHTbcAkWsdeQcTGhqYKUJ/uCSGO1nM/0GdYY8KcPjzP0N4bcVm29 kZy5M9fVeenJyxzNraMVgXJjpxKs/atrmXIuazxJDHU/3f652KKN9TlDB4SI8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771929910; a=rsa-sha256; cv=none; b=ZAJ+7Q2lRbKedMZ58OHzw3FKk6Dlq/voaUSMOPeSzM0dvRlFrNiqAsMAzZj+TMxn215V+K 7R0EVAWNXrl5ENgAZEdD5RmldSOoYnoE/hh8mqB5iA7gkm49qp4PQB3aVxYQ3wdn+CQlb4 5UalPnFWiwGLwQtio2p3PbZ72pxA95dq2cswwNn9/Yf7QFLmFR2o5ia7xsdbl3GlRH1som PXRUC2d50q8NFu9ES0fvRlqtWI1J3I+aMso6XcDuqO3B6eHWIzPHISh9B3k8RZ3RPNjjTM bpv8u4fsGVXgOzfcSseSW/Iz8vJ152kE+z9C7kU3TtFKS2bbMrXdsIpPG4P4ww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771929910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eNzKURkMuM/7h5W+t9172Tv0OqsnxfDUyzBigUFMeV0=; b=NjrhRK+lWXKMxNHn8Xb5osB5QVVIy0XiY2UtpZTRXKqN9az9DVLKsWMyCVxrh8lIZEzaUB s/zemX4EpqunWvW8huTP/tJVzOOcPhgk4lt/ScmOMpmisn58nt/mopHoj6RxwYfLtxicxF b4asRzkHvbSncvnjCjj/mwDSJKfDMW4NBDlJ5cnJnSZa8i3XjJB4YwNvE9sj8k+FE5zK9n Egmkd4/PFTEtBKkVvO5RenvYEysPsGVS2eLmaJkdQULPHl58PmSp2X7wL8uAG/4zvCnR4C oObxITPKSD9CuINvDj3NiE+nbAFW9BSN6MP6HV2p+aelEHkIHJQ47bW267yg5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKvWB3lT6z1Bmy for ; Tue, 24 Feb 2026 10:45:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36620 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 10:45:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: aef23e8e2736 - stable/13 - qlnxe: Avoid reinitializing the interface when it is already initialized List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: aef23e8e2736e839051bd7664b19ec0b9dc2dbf3 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 10:45:10 +0000 Message-Id: <699d8136.36620.2a37f8ec@gitrepo.freebsd.org> The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=aef23e8e2736e839051bd7664b19ec0b9dc2dbf3 commit aef23e8e2736e839051bd7664b19ec0b9dc2dbf3 Author: Zhenlei Huang AuthorDate: 2026-02-06 17:52:54 +0000 Commit: Zhenlei Huang CommitDate: 2026-02-24 10:15:37 +0000 qlnxe: Avoid reinitializing the interface when it is already initialized qlnx_init_locked() unconditionally uninitialize the interface thus is actually reinitializing the interface. Well the init routine qlnx_init() is to initialize the interface by net stack when assigned with the first inet or inet6 address. The ioctl SIOCSIFADDR for the first inet6 address is handled by ether_ioctl() thus the interface is reinitialized no matter it was initialized or not. Add a driver status check for that to avoid reinitializing. Further plan is removing SIOCSIFADDR ioctl from the driver and let ether_ioctl() handle it. Reviewed by: kbowling MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D54887 (cherry picked from commit c10e6bc0f0079e90cb484323ad71d437f1882422) (cherry picked from commit 8731ff4871d5397bae65bf184c44629a52c0e97b) (cherry picked from commit ee6495580925b337f5851b6ee0f1188f81d7a6c8) --- sys/dev/qlnx/qlnxe/qlnx_os.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index f0d83c3356ff..8bb599065f0c 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -2480,7 +2480,8 @@ qlnx_init(void *arg) QL_DPRINT2(ha, "enter\n"); QLNX_LOCK(ha); - qlnx_init_locked(ha); + if ((ha->ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + qlnx_init_locked(ha); QLNX_UNLOCK(ha); QL_DPRINT2(ha, "exit\n"); From nobody Tue Feb 24 10:45:06 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKvWC6l59z6ThNC for ; Tue, 24 Feb 2026 10:45:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKvWC2wSwz42k0 for ; Tue, 24 Feb 2026 10:45:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771929911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6xuemcRASKgv0kXq7GjRd70tvllOp8uHoVE82kvPyZE=; b=fwxlkYPea1fmsAdZExI1lyQcnhFUszIQGmmL/DbcneOVLRqu7YpcdX7R8XJ0At3r2HDhAV 1Z2PR4kBd0sdfBn5so3wAlqxwcRMy7vqw/G03iRGgN6fN3Z5drjtk6O3fQxG4fB/fif/d1 WACv2CGWliyJd57QE0Qnix03jOsqLd+F1U3AfY3RgDWWy/4OzktHtS/ch8lFEeTkkgna3V 4ok1Xt1hLyYyB7kr69KrzjfRbxrrL4EHlN56qtddkmpZOtEplVtZ7Ol8Cy6RMBdnKCHy6B KF396GKT09QSH9hXwGw9t0GFfgJyjOktWOMuTLd40zOW1Lh8Bj5CBCA0cis8Xg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771929911; a=rsa-sha256; cv=none; b=FxkA7OBvVvGFpiKhVbIjy1U2U0TG5NAnf/UQ4N1TDqaFPrf/tsDjJJ8m228NFd4Q9Z0BCP Pn3/L4xGsGleF7kSnR3nzM524GtOBRjQOkO58vNwMs6FD8Zlxcn8UBihUxTuEiHza6kgra OjZyecOgaX/PfhIlVG1MPWv4ASYvtdVaMC8RE5CPgYpwVakQsQICWjJnXudkOFmpL5y9DS q44uXzP0RoKpdDwCVdpEi+yguBYuDDLCYnLA1a8ui8Zzvn8Q+h0ZCN81tGljPrj6zp3F5y FT620uwmGN5WUQbotB4eH1ONOeQ/HxtFv9/HodF/rGNagBdRGk2L8/9D+RnkOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771929911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6xuemcRASKgv0kXq7GjRd70tvllOp8uHoVE82kvPyZE=; b=adTcbGAemi4b9juxAQ7F7H4c9o86tKUfsD2GnsRBSxEl+5u0NhKVyDiSyhjmdJuP5NiLuo H82sV4It7pw7A0iAV0bpgdvaTsKkwdcknczfPycn23/tQrKmpeOeJhzDLVaSU5e/P0BOYM 471zsj6OplzM90jFlI4fNnhnbYink7xO787Uj5jvPmgc3RpOLZDTNL8L63T4U4Z9bKZA8y TUcFrbMUgNNP7k3Am0VmPJWa+9sb/cJQrFwykCNKhLRxOJrxCMqvggXpOqCNky0C7IY5OI zS+PyiG3rVVM+UGdF1vfGxa6dI3Okj2vZzISbIjPxOnQwDoOI5tr7901TCe3fw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKvWC2Sm2z1BQD for ; Tue, 24 Feb 2026 10:45:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3652b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 10:45:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Keith Reynolds From: Zhenlei Huang Subject: git: 610b81333f48 - stable/13 - qlnxe: Fix promiscuous and allmulti settings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 610b81333f4816b5906df780cb064526cd8ba1f0 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 10:45:06 +0000 Message-Id: <699d8132.3652b.4381cdf5@gitrepo.freebsd.org> The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=610b81333f4816b5906df780cb064526cd8ba1f0 commit 610b81333f4816b5906df780cb064526cd8ba1f0 Author: Keith Reynolds AuthorDate: 2024-05-28 05:57:44 +0000 Commit: Zhenlei Huang CommitDate: 2026-02-24 10:15:35 +0000 qlnxe: Fix promiscuous and allmulti settings PR: 278087 (cherry picked from commit e3ec564ecb9c2daa96a8db36052e50ea554fe598) (cherry picked from commit e4f48fc20b56df8a03ab63fb867f49bfcc0e7eae) --- sys/dev/qlnx/qlnxe/qlnx_os.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index ba9731600b50..64909d39ff59 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -85,8 +85,8 @@ static void qlnx_init_ifnet(device_t dev, qlnx_host_t *ha); static void qlnx_init(void *arg); static void qlnx_init_locked(qlnx_host_t *ha); static int qlnx_set_multi(qlnx_host_t *ha, uint32_t add_multi); -static int qlnx_set_promisc(qlnx_host_t *ha); -static int qlnx_set_allmulti(qlnx_host_t *ha); +static int qlnx_set_promisc(qlnx_host_t *ha, int enabled); +static int qlnx_set_allmulti(qlnx_host_t *ha, int enabled); static int qlnx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data); static int qlnx_media_change(struct ifnet *ifp); static void qlnx_media_status(struct ifnet *ifp, struct ifmediareq *ifmr); @@ -2624,7 +2624,7 @@ qlnx_set_multi(qlnx_host_t *ha, uint32_t add_multi) } static int -qlnx_set_promisc(qlnx_host_t *ha) +qlnx_set_promisc(qlnx_host_t *ha, int enabled) { int rc = 0; uint8_t filter; @@ -2633,15 +2633,20 @@ qlnx_set_promisc(qlnx_host_t *ha) return (0); filter = ha->filter; - filter |= ECORE_ACCEPT_MCAST_UNMATCHED; - filter |= ECORE_ACCEPT_UCAST_UNMATCHED; + if (enabled) { + filter |= ECORE_ACCEPT_MCAST_UNMATCHED; + filter |= ECORE_ACCEPT_UCAST_UNMATCHED; + } else { + filter &= ~ECORE_ACCEPT_MCAST_UNMATCHED; + filter &= ~ECORE_ACCEPT_UCAST_UNMATCHED; + } rc = qlnx_set_rx_accept_filter(ha, filter); return (rc); } static int -qlnx_set_allmulti(qlnx_host_t *ha) +qlnx_set_allmulti(qlnx_host_t *ha, int enabled) { int rc = 0; uint8_t filter; @@ -2650,7 +2655,11 @@ qlnx_set_allmulti(qlnx_host_t *ha) return (0); filter = ha->filter; - filter |= ECORE_ACCEPT_MCAST_UNMATCHED; + if (enabled) { + filter |= ECORE_ACCEPT_MCAST_UNMATCHED; + } else { + filter &= ~ECORE_ACCEPT_MCAST_UNMATCHED; + } rc = qlnx_set_rx_accept_filter(ha, filter); return (rc); @@ -2714,10 +2723,10 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) if (ifp->if_drv_flags & IFF_DRV_RUNNING) { if ((ifp->if_flags ^ ha->if_flags) & IFF_PROMISC) { - ret = qlnx_set_promisc(ha); + ret = qlnx_set_promisc(ha, ifp->if_flags & IFF_PROMISC); } else if ((ifp->if_flags ^ ha->if_flags) & IFF_ALLMULTI) { - ret = qlnx_set_allmulti(ha); + ret = qlnx_set_allmulti(ha, ifp->if_flags & IFF_ALLMULTI); } } else { ha->max_frame_size = ifp->if_mtu + @@ -2727,9 +2736,9 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) } else { if (ifp->if_drv_flags & IFF_DRV_RUNNING) qlnx_stop(ha); - ha->if_flags = ifp->if_flags; } + ha->if_flags = ifp->if_flags; QLNX_UNLOCK(ha); break; @@ -7196,9 +7205,11 @@ qlnx_set_rx_mode(qlnx_host_t *ha) ECORE_ACCEPT_MCAST_MATCHED | ECORE_ACCEPT_BCAST; - if (qlnx_vf_device(ha) == 0) { + if (qlnx_vf_device(ha) == 0 || (ha->ifp->if_flags & IFF_PROMISC)) { filter |= ECORE_ACCEPT_UCAST_UNMATCHED; filter |= ECORE_ACCEPT_MCAST_UNMATCHED; + } else if (ha->ifp->if_flags & IFF_ALLMULTI) { + filter |= ECORE_ACCEPT_MCAST_UNMATCHED; } ha->filter = filter; From nobody Tue Feb 24 10:45:11 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKvWD3mrCz6ThSq for ; Tue, 24 Feb 2026 10: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKvWC5YMMz42mg for ; Tue, 24 Feb 2026 10:45:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771929911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eSJBB1E2QrSTH7Qvdb0RcdZvzUtTbIxrPwm+39SPStg=; b=yk4Rs06lh0L7ubfH2Wibr3V+GqW/Br1qjTlNNN/Xjuhf8+mCo8Q/dIKkyL+zL6L66VZ93U f14i8aCdBA5ljbdTyEH0QHKKaHKbc5Bm9Kgfv7xe9Iz8baX+DFvRUJpk13wxrdLpJuq/ny /Ud8Nnd+xk1F8PRqRowQ/iXp13rhwWIjKBW8yu6SAsVk1/ENhuHAvDJlow83mNR9YxPwad OR4QeIrt4gJGXhAaTVc7NkagCUl5exE7Wyep8ZX1KTU7eevJCGLWvBxC3wlfxBWmFg63dK RdARzmDfypa13syiTNRNfRYwDVvXe+pCWluEphT3ugj5ypYeZ3icts2SzF5X7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771929911; a=rsa-sha256; cv=none; b=yTZCJ0HHxaO0dBQ2H7RlZPelZ4GFxv6t2faLEQfwO6F16zGLug8BCyn0I+RdbNixT+RPKN ZzMkgQm2BgCmT95sYEKCNWWS7K8zxCJcJyFccYfk9gCx29AHrkh7MGPKK8LBFcuc2JRq6f 6TxQYg21uveSNOgIL49IgFJNgWPvBnjdvs3pEpbeMo2xgCgdCBWeXLmjAiMfaYt+OK73CG b+6ptfNJ1bR8u7BBkErYYftiCCAyf6AHAYfWnn88qLZnIWb9/qkCvlv4ZRe/q4nwEx1lyo L0burHJDFsmTrvKyBsc4F++RrwzrACpAxlfWpuOuBAD8OW5OijN5L+Jh15kQiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771929911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eSJBB1E2QrSTH7Qvdb0RcdZvzUtTbIxrPwm+39SPStg=; b=LgU0EWIpGWYlByYNwPXeHt9asmJFa6eGGSrdhzvVu1IfxdwUFzfYyonxHIm8DeDPLTQLZ2 EnpPP52Ek2eevZue36mdtcwR/dUOQGHq2ziDgFcRCKMcCDUhZ8jlZzm8WdcYScuoSMJgb+ 70v0iR47KqzFfzrNBsX7iYCU4jtr7P/r+EFP+XJ1LbnhFw4weBWePczETID2dkqo5ZSCnn AS+KU9ws1kG9XMTFUejiRhf0y+nM+UQsu2ND94DW6la5BhCid+qkmQLbx7lTiGGqYI1Sga 8Io0P0Wt7TtZKrG926UapLD+xxlgQuvMWF1TZCRqYykMdp/upSqyAFkCnui0NQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKvWC4b2lz1BK6 for ; Tue, 24 Feb 2026 10:45:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 337f7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 10:45:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 52609ccbf703 - stable/13 - qlnxe: Let ether_ioctl() handle SIOCSIFADDR ioctl List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 52609ccbf7030f89133181ed5337f642b325f7af Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 10:45:11 +0000 Message-Id: <699d8137.337f7.4c6167b4@gitrepo.freebsd.org> The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=52609ccbf7030f89133181ed5337f642b325f7af commit 52609ccbf7030f89133181ed5337f642b325f7af Author: Zhenlei Huang AuthorDate: 2026-02-06 17:52:54 +0000 Commit: Zhenlei Huang CommitDate: 2026-02-24 10:15:37 +0000 qlnxe: Let ether_ioctl() handle SIOCSIFADDR ioctl Since the change [1], the init routine qlnx_init() works as intended. Let ether_ioctl() handle SIOCSIFADDR to simplify the code. Combined with the change [1], this shall be a better fix for PR 287445. [1] c10e6bc0f007 qlnxe: Avoid reinitializing the interface when it is already initialized PR: 287445 Reviewed by: kbowling MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D54888 (cherry picked from commit 4012b63889e40bb877bc0e4c8da1792bce472c08) (cherry picked from commit 0f383f74b7398161c12a290e50b060baf45d2800) (cherry picked from commit 20ffe22fcfe13b48a8e993cbf565f9cd9229a4b3) --- sys/dev/qlnx/qlnxe/qlnx_os.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index 8bb599065f0c..cce23f0f7ea1 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -2670,30 +2670,11 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { int ret = 0, mask; struct ifreq *ifr = (struct ifreq *)data; - struct ifaddr *ifa = (struct ifaddr *)data; qlnx_host_t *ha; ha = (qlnx_host_t *)ifp->if_softc; switch (cmd) { - case SIOCSIFADDR: - QL_DPRINT4(ha, "SIOCSIFADDR (0x%lx)\n", cmd); - - if (ifa->ifa_addr->sa_family == AF_INET) { - ifp->if_flags |= IFF_UP; - QLNX_LOCK(ha); - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) - qlnx_init_locked(ha); - QLNX_UNLOCK(ha); - QL_DPRINT4(ha, "SIOCSIFADDR (0x%lx) ipv4 [0x%08x]\n", - cmd, ntohl(IA_SIN(ifa)->sin_addr.s_addr)); - - arp_ifinit(ifp, ifa); - } else { - ether_ioctl(ifp, cmd, data); - } - break; - case SIOCSIFMTU: QL_DPRINT4(ha, "SIOCSIFMTU (0x%lx)\n", cmd); From nobody Tue Feb 24 10:45:12 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKvWF3QSwz6ThSs for ; Tue, 24 Feb 2026 10: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKvWD6QrSz42B0 for ; Tue, 24 Feb 2026 10: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=1771929912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EWX4mnDApX1BNK9UZmbe7kPsFWrXAklW0nyb4xl+C7o=; b=qecsc2g3SCqNYSuuY5r4F+xN6ymv+2tQ9ouK8frtJvtcsiLbNiTqCZQJzcOMozbWpxDSrB C1gNdgdpRPT/A7XYhZbqbIUPHO/NwrFmWx08UgfYGkiKKcjOOkZD9d5mrQhAdue6QR89Qq +6HTCuS+qIjbRh/ox3Aa9ofM2v0SkrTXvo3HEpe4oZdXESjTh0Wvfb+rHY/ymYBMMQl6We EwOtml7ot7xGm6mxeS/MixnfTEOMj9oBnXiu7udH3IxUPRQnzzr7UtzMGUQotUhPq0LTEN Fo+7V5cZSGsGckDQUK+TulBhzGsqgyUWBgatX9k7ETBGCLVn77LzrG3iou3Dog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771929912; a=rsa-sha256; cv=none; b=SRtfyX7DC+QXvNVBlswV4lj2/wUWeGa87kw4iLCAHBB1IUVAeT2x2xf9GTuCWCUB2lcrGx aXm5x4xdAJLlcfD2EEpZ4/OhA7F8iwrTaqZxEPZ5ph1f90rYMlgkhlJgv4t02A/wnUpRxW ZcwhFR+ErA/TnLwop0oIvtS0+PWlO1SEPqhLvjPszx5jGzCm8/MgPvNpX8QqSGi2ocNu95 b/CeGYZGRSNXcy9NVXSrg2VKZv9enrkOuS7Kv5/0zMSy0MMnLO3SuRI66vqXV9suRsm7ib LlAPWQfe2MG/n70s8nfxf03XKiS6pZegdcc1LWw1yYZjnd8fQRgcvqkfPLlQZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771929912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EWX4mnDApX1BNK9UZmbe7kPsFWrXAklW0nyb4xl+C7o=; b=pjOQZLC+ObSF0bMC5PXTmf9ynXXXeX0XuoS2ToEjkLsaHoctZxOvO8bk4WPY25zSc0V/ar rBL4c66+yR4Fgseq+OSS+7NPwHt6e/hgI1E9srZlCrVhDvauEL/yxfByp7qYADQMieyGab /AxXckXyGEKALaBWWC4IuhVrUh68xSzEJcTNeR0ZxuNtNukTMiODfZJEXZRuaMsFN3lL0y u9/aaJNdD43d9uvIwCdguNuoswv+/RnAcAwofgPlKjFgBQEMCZVcjKwNpmctg1YDkI+o97 8SqyVkOwMoZp/4Rcuu6mAPpnMV8V6IxsxC8GAVk5mHQ/S8nq65M7UkFPd0J4Nw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKvWD5RhSz1BK7 for ; Tue, 24 Feb 2026 10:45:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37282 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 10:45:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: eeb4c04dd12b - stable/13 - qlnxe: Refactor setting the promiscuous and allmulti mode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: eeb4c04dd12becd430e9367a679f72d6ee9100f0 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 10:45:12 +0000 Message-Id: <699d8138.37282.48a9226f@gitrepo.freebsd.org> The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=eeb4c04dd12becd430e9367a679f72d6ee9100f0 commit eeb4c04dd12becd430e9367a679f72d6ee9100f0 Author: Zhenlei Huang AuthorDate: 2026-02-06 17:52:54 +0000 Commit: Zhenlei Huang CommitDate: 2026-02-24 10:15:37 +0000 qlnxe: Refactor setting the promiscuous and allmulti mode There are two entry points to set the promiscuous and allmulti mode. One is ioctl, and another is the init routine. Given they share almost the identical logic, refactor a little to make the code more clear. While here, for the ioctl, translate the error to EINVAL to avoid confusing the net stack. Reviewed by: kbowling MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D54890 (cherry picked from commit 45b1718fadae7d56051ba04ef9d7a175a602a226) (cherry picked from commit b8d2c1c367465506b66a1696483caec1d04b2ea0) (cherry picked from commit 00ab0df79364f4567ad61f6a66eba1b2f0a7d507) --- sys/dev/qlnx/qlnxe/qlnx_def.h | 1 - sys/dev/qlnx/qlnxe/qlnx_os.c | 80 +++++++++++++++++++------------------------ 2 files changed, 36 insertions(+), 45 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/qlnx_def.h b/sys/dev/qlnx/qlnxe/qlnx_def.h index 3e63bd2d1882..d647f928f6d4 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_def.h +++ b/sys/dev/qlnx/qlnxe/qlnx_def.h @@ -370,7 +370,6 @@ struct qlnx_host { uint16_t device_id; struct ifnet *ifp; - int if_flags; volatile int link_up; struct ifmedia media; uint16_t max_frame_size; diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index cce23f0f7ea1..311ab73eb868 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -85,8 +85,8 @@ static void qlnx_init_ifnet(device_t dev, qlnx_host_t *ha); static void qlnx_init(void *arg); static void qlnx_init_locked(qlnx_host_t *ha); static int qlnx_set_multi(qlnx_host_t *ha, uint32_t add_multi); -static int qlnx_set_promisc(qlnx_host_t *ha, int enabled); -static int qlnx_set_allmulti(qlnx_host_t *ha, int enabled); +static int qlnx_set_promisc_allmulti(qlnx_host_t *ha, int flags); +static int _qlnx_set_promisc_allmulti(qlnx_host_t *ha, bool promisc, bool allmulti); static int qlnx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data); static int qlnx_media_change(struct ifnet *ifp); static void qlnx_media_status(struct ifnet *ifp, struct ifmediareq *ifmr); @@ -2624,44 +2624,49 @@ qlnx_set_multi(qlnx_host_t *ha, uint32_t add_multi) } static int -qlnx_set_promisc(qlnx_host_t *ha, int enabled) +qlnx_set_promisc_allmulti(qlnx_host_t *ha, int flags) { int rc = 0; - uint8_t filter; if (qlnx_vf_device(ha) == 0) return (0); - filter = ha->filter; - if (enabled) { - filter |= ECORE_ACCEPT_MCAST_UNMATCHED; - filter |= ECORE_ACCEPT_UCAST_UNMATCHED; - } else { - filter &= ~ECORE_ACCEPT_MCAST_UNMATCHED; - filter &= ~ECORE_ACCEPT_UCAST_UNMATCHED; - } - - rc = qlnx_set_rx_accept_filter(ha, filter); + rc = _qlnx_set_promisc_allmulti(ha, flags & IFF_PROMISC, + flags & IFF_ALLMULTI); return (rc); } static int -qlnx_set_allmulti(qlnx_host_t *ha, int enabled) +_qlnx_set_promisc_allmulti(qlnx_host_t *ha, bool promisc, bool allmulti) { int rc = 0; uint8_t filter; - - if (qlnx_vf_device(ha) == 0) - return (0); + bool mcast, ucast; filter = ha->filter; - if (enabled) { + filter |= ECORE_ACCEPT_UCAST_MATCHED; + filter |= ECORE_ACCEPT_MCAST_MATCHED; + filter |= ECORE_ACCEPT_BCAST; + + mcast = promisc || allmulti; + ucast = promisc; + + if (mcast) filter |= ECORE_ACCEPT_MCAST_UNMATCHED; - } else { + else filter &= ~ECORE_ACCEPT_MCAST_UNMATCHED; - } - rc = qlnx_set_rx_accept_filter(ha, filter); + if (ucast) + filter |= ECORE_ACCEPT_UCAST_UNMATCHED; + else + filter &= ~ECORE_ACCEPT_UCAST_UNMATCHED; + + if (filter == ha->filter) + return (0); + + rc = qlnx_set_rx_accept_filter(ha, filter); + if (rc == 0) + ha->filter = filter; return (rc); } @@ -2701,13 +2706,8 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) if (ifp->if_flags & IFF_UP) { if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - if ((ifp->if_flags ^ ha->if_flags) & - IFF_PROMISC) { - ret = qlnx_set_promisc(ha, ifp->if_flags & IFF_PROMISC); - } else if ((ifp->if_flags ^ ha->if_flags) & - IFF_ALLMULTI) { - ret = qlnx_set_allmulti(ha, ifp->if_flags & IFF_ALLMULTI); - } + if (qlnx_set_promisc_allmulti(ha, ifp->if_flags) != 0) + ret = EINVAL; } else { ha->max_frame_size = ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; @@ -2718,7 +2718,6 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) qlnx_stop(ha); } - ha->if_flags = ifp->if_flags; QLNX_UNLOCK(ha); break; @@ -7123,6 +7122,9 @@ qlnx_clean_filters(qlnx_host_t *ha) { int rc = 0; + /* Reset rx filter */ + ha->filter = 0; + /* Remove all unicast macs */ rc = qlnx_remove_all_ucast_mac(ha); if (rc) @@ -7166,7 +7168,6 @@ static int qlnx_set_rx_mode(qlnx_host_t *ha) { int rc = 0; - uint8_t filter; const struct ifnet *ifp = ha->ifp; rc = qlnx_set_ucast_rx_mac(ha, ECORE_FILTER_REPLACE, IF_LLADDR(ifp)); @@ -7177,19 +7178,10 @@ qlnx_set_rx_mode(qlnx_host_t *ha) if (rc) return rc; - filter = ECORE_ACCEPT_UCAST_MATCHED | - ECORE_ACCEPT_MCAST_MATCHED | - ECORE_ACCEPT_BCAST; - - if (qlnx_vf_device(ha) == 0 || (ha->ifp->if_flags & IFF_PROMISC)) { - filter |= ECORE_ACCEPT_UCAST_UNMATCHED; - filter |= ECORE_ACCEPT_MCAST_UNMATCHED; - } else if (ha->ifp->if_flags & IFF_ALLMULTI) { - filter |= ECORE_ACCEPT_MCAST_UNMATCHED; - } - ha->filter = filter; - - rc = qlnx_set_rx_accept_filter(ha, filter); + if (qlnx_vf_device(ha) == 0) + rc = _qlnx_set_promisc_allmulti(ha, true, true); + else + rc = qlnx_set_promisc_allmulti(ha, ifp->if_flags); return (rc); } From nobody Tue Feb 24 10:45:14 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKvWH3zfdz6ThHY for ; Tue, 24 Feb 2026 10:45:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKvWH0DNzz42q1 for ; Tue, 24 Feb 2026 10:45:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771929915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DOAQOzLsBHacauDaAAJ1NCMukMbAC2hXiNbEAhfX1po=; b=qeZWDtkbCsv9MoMlpu7P0fllTmUdnB/GfSrB5hH6aWTXpZbyRFwDyxcsVsl/HwXUJ/EN8F G1tGFEQgrMsXtIsXee670QjqJSNxyPlZ5MHmdyeyXMYtM+EH+aHYdfwCz2riP+61EIJo/Z A05338MOhww/JFDjoEyMxxZK3mVg428pvPVcyPccsEj3xQkq08QGRiLQ/Ohej7oIyjFmxl pUNq2H8IAXYM6aKvbMpwrEsTDezJtNOl2wfyIq+8BPeuV8L6YiDCl3KhGSkGOiX3EvnGPv wvsAJ7MWnvTwpi+sd7iPJT0PX+cWU0hRRG+UOuLjHGFjolYrWGL3xcRALSEJaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771929915; a=rsa-sha256; cv=none; b=LdmE2PSJ6XyhzDG+Hu6SzVs7wtK5l4rRboBIEPvEIO7it1lxbZY4FL2LicTU3KHO82XJ0v NnEt+mqX60Z29RGa2nX4SX9p/eguXQIL4iAOuzMFM/1G+ZCT0qAaOSmvKa04WnG+cMGiVN TR0R00jxjVr0XPkHPNm38XsvzvEOSOiVWi9c3r1oo2p79/afUK/d3e7a3rmDxAuLrJtuTo BrQl4hkLlY8UagvKceFeeLt1Mu8jnnzDQP/QFezJ6pYcsNMDQD4iaO5/kVkek9z3r22be2 2Stxa8RJPbxbjARajwreX4jMBfFYxo2wUeRkShojpAxJ9/8clMSxHE4XJgDMRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771929915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DOAQOzLsBHacauDaAAJ1NCMukMbAC2hXiNbEAhfX1po=; b=NMnVrsWOrolg12FccsUsxf4ErrkjfodS67scmfdYbICC3PiEP/JbFEb+R0CPIEO5kBJqiW aZYrkeYy3+jS/o0jDtVCh43s6Ns4ugzCPX8ShYuWyVoy7+j5pDHNYajMSHGkqd0jF1TlLY mI3ac2nw09LdnrTLbQzkVOwXRjdwQsbiMgc67UzOa6tGd85dHtl6Y/4iQa2mvkZyHBcZt9 FAtRk3RHNXnN0qBJgMnjl5XVmoQoTvnAupM75wN8FtcQibNGAK9mlTxPj7M2vzfe9y1B75 cko574xiwYyRXLEUas3Rb8twcIVrWmqsPImzsZPtYkGKdU1rJNHWvkNaClnrjA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKvWG6r9Yz1Bn0 for ; Tue, 24 Feb 2026 10:45:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3481c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 10:45:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 091a1e7d21c9 - stable/13 - qlnxe: Overhaul setting the multicast MAC filters List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 091a1e7d21c9b2cbd7dbe89335b08d4d50fab96e Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 10:45:14 +0000 Message-Id: <699d813a.3481c.c6b5cbf@gitrepo.freebsd.org> The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=091a1e7d21c9b2cbd7dbe89335b08d4d50fab96e commit 091a1e7d21c9b2cbd7dbe89335b08d4d50fab96e Author: Zhenlei Huang AuthorDate: 2026-02-06 17:52:55 +0000 Commit: Zhenlei Huang CommitDate: 2026-02-24 10:15:38 +0000 qlnxe: Overhaul setting the multicast MAC filters When operating the multicast MAC filters, the current usage of ECORE_FILTER_ADD and ECORE_FILTER_REMOVE are rather misleading. ECORE_FILTER_ADD reads "adding new filter", but it actually removes any existing filters and then addes a new one. ECORE_FILTER_REMOVE reads "removing a filter", but it actually removes all filters. Let's use ECORE_FILTER_REPLACE and ECORE_FILTER_FLUSH instead to avoid confusion. In the current implementation, only one MAC address is passed to ecore_sp_eth_filter_mcast() and any previously installed filters are removed, hence it breaks the multicast function. That can be observed via either assigning new IPv6 addresses to the interface or putting the interface as a member of lagg(4) interface with LACP aggregation protocol. Fix that by calculating the multicast filter bins directly from multicast MAC addresses and replace the filters every time the bins changes. Due to the nature of the multicast filter, which is hash based, a full 1's multicast filter bin means all multicast packets are to be accepted. Thus there's no need to make the vport into allmulti mode when the number of multicast MAC addresses exceeds the limit (ECORE_MAX_MC_ADDRS, 64). Tested with a FastLinQ QL41212HLCU 25GbE adapter, both MFW_Version 8.35.23.0 and 8.59.16.0 are tested. Note: Currently the VF port is set to promiscuous mode unconditionally, and the setting of the multicast MAC filters for VF ports is short-circuited, so the VF port functions as it did. PR: 265857 PR: 290973 Reviewed by: kbowling MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D54892 (cherry picked from commit 70256d2b86d95a678a63c65b157b9c635f1f4c6a) (cherry picked from commit 0cfc1145cdfc2a7beeeb7f39ad2722c7053681c0) (cherry picked from commit 87942d7f8fc58e8b4af90ec1050b263005c3d64e) --- sys/dev/qlnx/qlnxe/ecore_l2.c | 41 ++++---- sys/dev/qlnx/qlnxe/ecore_l2_api.h | 9 +- sys/dev/qlnx/qlnxe/ecore_vf.c | 11 +-- sys/dev/qlnx/qlnxe/qlnx_def.h | 5 +- sys/dev/qlnx/qlnxe/qlnx_os.c | 190 ++++++++------------------------------ 5 files changed, 66 insertions(+), 190 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/ecore_l2.c b/sys/dev/qlnx/qlnxe/ecore_l2.c index ee7d225540d0..5e281c330765 100644 --- a/sys/dev/qlnx/qlnxe/ecore_l2.c +++ b/sys/dev/qlnx/qlnxe/ecore_l2.c @@ -1617,14 +1617,13 @@ ecore_sp_eth_filter_mcast(struct ecore_hwfn *p_hwfn, struct ecore_spq_comp_cb *p_comp_data) { struct vport_update_ramrod_data *p_ramrod = OSAL_NULL; - u32 bins[ETH_MULTICAST_MAC_BINS_IN_REGS]; struct ecore_spq_entry *p_ent = OSAL_NULL; struct ecore_sp_init_data init_data; u8 abs_vport_id = 0; enum _ecore_status_t rc; int i; - if (p_filter_cmd->opcode == ECORE_FILTER_ADD) + if (p_filter_cmd->opcode == ECORE_FILTER_REPLACE) rc = ecore_fw_vport(p_hwfn, p_filter_cmd->vport_to_add_to, &abs_vport_id); else @@ -1654,30 +1653,33 @@ ecore_sp_eth_filter_mcast(struct ecore_hwfn *p_hwfn, /* explicitly clear out the entire vector */ OSAL_MEMSET(&p_ramrod->approx_mcast.bins, 0, sizeof(p_ramrod->approx_mcast.bins)); - OSAL_MEMSET(bins, 0, sizeof(u32) * ETH_MULTICAST_MAC_BINS_IN_REGS); - /* filter ADD op is explicit set op and it removes - * any existing filters for the vport. - */ - if (p_filter_cmd->opcode == ECORE_FILTER_ADD) { - for (i = 0; i < p_filter_cmd->num_mc_addrs; i++) { - u32 bit; - - bit = ecore_mcast_bin_from_mac(p_filter_cmd->mac[i]); - bins[bit / 32] |= 1 << (bit % 32); - } - + /* + * filter REPLACE op is explicit set op and it removes + * any existing filters for the vport. + */ + if (p_filter_cmd->opcode == ECORE_FILTER_REPLACE) { + _Static_assert(sizeof(p_filter_cmd->bins) == sizeof(p_ramrod->approx_mcast.bins), "Size mismatch"); + _Static_assert(nitems(p_filter_cmd->bins) == ETH_MULTICAST_MAC_BINS_IN_REGS, "Size mismatch"); /* Convert to correct endianity */ for (i = 0; i < ETH_MULTICAST_MAC_BINS_IN_REGS; i++) { struct vport_update_ramrod_mcast *p_ramrod_bins; p_ramrod_bins = &p_ramrod->approx_mcast; - p_ramrod_bins->bins[i] = OSAL_CPU_TO_LE32(bins[i]); + p_ramrod_bins->bins[i] = OSAL_CPU_TO_LE32(p_filter_cmd->bins[i]); } - } + } /* else FLUSH op clears existing filters */ p_ramrod->common.vport_id = abs_vport_id; rc = ecore_spq_post(p_hwfn, p_ent, OSAL_NULL); + + DP_INFO(p_hwfn, "Multicast filter cmd: [%s], bins: [%08x, %08x, %08x, %08x, %08x, %08x, %08x, %08x], ret = %d\n", + p_filter_cmd->opcode == ECORE_FILTER_REPLACE ? "replace" : "flush", + p_ramrod->approx_mcast.bins[0], p_ramrod->approx_mcast.bins[1], + p_ramrod->approx_mcast.bins[2], p_ramrod->approx_mcast.bins[3], + p_ramrod->approx_mcast.bins[4], p_ramrod->approx_mcast.bins[5], + p_ramrod->approx_mcast.bins[6], p_ramrod->approx_mcast.bins[7], rc); + if (rc != ECORE_SUCCESS) DP_ERR(p_hwfn, "Multicast filter command failed %d\n", rc); @@ -1692,10 +1694,9 @@ enum _ecore_status_t ecore_filter_mcast_cmd(struct ecore_dev *p_dev, enum _ecore_status_t rc = ECORE_SUCCESS; int i; - /* only ADD and REMOVE operations are supported for multi-cast */ - if ((p_filter_cmd->opcode != ECORE_FILTER_ADD && - (p_filter_cmd->opcode != ECORE_FILTER_REMOVE)) || - (p_filter_cmd->num_mc_addrs > ECORE_MAX_MC_ADDRS)) { + /* only REPLACE and FLUSH operations are supported for multi-cast */ + if ((p_filter_cmd->opcode != ECORE_FILTER_REPLACE && + (p_filter_cmd->opcode != ECORE_FILTER_FLUSH))) { return ECORE_INVAL; } diff --git a/sys/dev/qlnx/qlnxe/ecore_l2_api.h b/sys/dev/qlnx/qlnxe/ecore_l2_api.h index 610cc329f1fd..3b2f48e9fe11 100644 --- a/sys/dev/qlnx/qlnxe/ecore_l2_api.h +++ b/sys/dev/qlnx/qlnxe/ecore_l2_api.h @@ -162,14 +162,13 @@ struct ecore_filter_ucast { }; struct ecore_filter_mcast { - /* MOVE is not supported for multicast */ + /* Only REPLACE and FLUSH is supported for multicast */ enum ecore_filter_opcode opcode; u8 vport_to_add_to; u8 vport_to_remove_from; - u8 num_mc_addrs; -#define ECORE_MAX_MC_ADDRS 64 - unsigned char mac[ECORE_MAX_MC_ADDRS][ETH_ALEN]; + u32 bins[ETH_MULTICAST_MAC_BINS_IN_REGS]; }; +#define ECORE_MAX_MC_ADDRS 64 struct ecore_filter_accept_flags { u8 update_rx_mode_config; @@ -384,7 +383,7 @@ struct ecore_sp_vport_update_params { u8 anti_spoofing_en; u8 update_accept_any_vlan_flg; u8 accept_any_vlan; - u32 bins[8]; + u32 bins[ETH_MULTICAST_MAC_BINS_IN_REGS]; struct ecore_rss_params *rss_params; struct ecore_filter_accept_flags accept_flags; struct ecore_sge_tpa_params *sge_tpa_params; diff --git a/sys/dev/qlnx/qlnxe/ecore_vf.c b/sys/dev/qlnx/qlnxe/ecore_vf.c index 6cdc94d05c86..a7b006b982de 100644 --- a/sys/dev/qlnx/qlnxe/ecore_vf.c +++ b/sys/dev/qlnx/qlnxe/ecore_vf.c @@ -1515,18 +1515,13 @@ void ecore_vf_pf_filter_mcast(struct ecore_hwfn *p_hwfn, struct ecore_filter_mcast *p_filter_cmd) { struct ecore_sp_vport_update_params sp_params; - int i; OSAL_MEMSET(&sp_params, 0, sizeof(sp_params)); sp_params.update_approx_mcast_flg = 1; - if (p_filter_cmd->opcode == ECORE_FILTER_ADD) { - for (i = 0; i < p_filter_cmd->num_mc_addrs; i++) { - u32 bit; - - bit = ecore_mcast_bin_from_mac(p_filter_cmd->mac[i]); - sp_params.bins[bit / 32] |= 1 << (bit % 32); - } + if (p_filter_cmd->opcode == ECORE_FILTER_REPLACE) { + _Static_assert(sizeof(sp_params.bins) == sizeof(p_filter_cmd->bins), "Size mismatch"); + memcpy(sp_params.bins, p_filter_cmd->bins, sizeof(sp_params.bins)); } ecore_vf_pf_vport_update(p_hwfn, &sp_params); diff --git a/sys/dev/qlnx/qlnxe/qlnx_def.h b/sys/dev/qlnx/qlnxe/qlnx_def.h index d647f928f6d4..70a29eab9a05 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_def.h +++ b/sys/dev/qlnx/qlnxe/qlnx_def.h @@ -319,7 +319,6 @@ typedef struct qlnx_link_output qlnx_link_output_t; #define QLNX_TPA_MAX_AGG_BUFFERS (20) -#define QLNX_MAX_NUM_MULTICAST_ADDRS ECORE_MAX_MC_ADDRS typedef struct _qlnx_mcast { uint16_t rsrvd; uint8_t addr[6]; @@ -442,9 +441,7 @@ struct qlnx_host { qlnx_ivec_t irq_vec[QLNX_MAX_RSS]; uint8_t filter; - uint32_t nmcast; - qlnx_mcast_t mcast[QLNX_MAX_NUM_MULTICAST_ADDRS]; - struct ecore_filter_mcast ecore_mcast; + uint32_t ecore_mcast_bins[ETH_MULTICAST_MAC_BINS_IN_REGS]; uint8_t primary_mac[ETH_ALEN]; uint8_t prio_to_tc[MAX_NUM_PRI]; struct ecore_eth_stats hw_stats; diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index 1e4f43b46200..96a5e9e7e269 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -48,6 +48,7 @@ #include "ecore_sp_commands.h" #include "ecore_dev_api.h" #include "ecore_l2_api.h" +#include "ecore_l2.h" #include "ecore_mcp.h" #include "ecore_hw_defs.h" #include "mcp_public.h" @@ -84,7 +85,7 @@ static void qlnx_fp_isr(void *arg); static void qlnx_init_ifnet(device_t dev, qlnx_host_t *ha); static void qlnx_init(void *arg); static void qlnx_init_locked(qlnx_host_t *ha); -static int qlnx_set_multi(qlnx_host_t *ha, uint32_t add_multi); +static int qlnx_set_multi(qlnx_host_t *ha); static int qlnx_set_promisc_allmulti(qlnx_host_t *ha, int flags); static int _qlnx_set_promisc_allmulti(qlnx_host_t *ha, bool promisc, bool allmulti); static int qlnx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data); @@ -122,14 +123,13 @@ static void qlnx_set_id(struct ecore_dev *cdev, char name[NAME_SIZE], char ver_str[VER_SIZE]); static void qlnx_unload(qlnx_host_t *ha); static int qlnx_load(qlnx_host_t *ha); -static void qlnx_hw_set_multi(qlnx_host_t *ha, uint8_t *mta, uint32_t mcnt, - uint32_t add_mac); static void qlnx_dump_buf8(qlnx_host_t *ha, const char *msg, void *dbuf, uint32_t len); static int qlnx_alloc_rx_buffer(qlnx_host_t *ha, struct qlnx_rx_queue *rxq); static void qlnx_reuse_rx_data(struct qlnx_rx_queue *rxq); static void qlnx_update_rx_prod(struct ecore_hwfn *p_hwfn, struct qlnx_rx_queue *rxq); +static int qlnx_remove_all_mcast_mac(qlnx_host_t *ha); static int qlnx_set_rx_accept_filter(qlnx_host_t *ha, uint8_t filter); static int qlnx_grc_dumpsize(qlnx_host_t *ha, uint32_t *num_dwords, int hwfn_index); @@ -2489,138 +2489,45 @@ qlnx_init(void *arg) return; } -static int -qlnx_config_mcast_mac_addr(qlnx_host_t *ha, uint8_t *mac_addr, uint32_t add_mac) -{ - struct ecore_filter_mcast *mcast; - struct ecore_dev *cdev; - int rc; - - cdev = &ha->cdev; - - mcast = &ha->ecore_mcast; - bzero(mcast, sizeof(struct ecore_filter_mcast)); - - if (add_mac) - mcast->opcode = ECORE_FILTER_ADD; - else - mcast->opcode = ECORE_FILTER_REMOVE; - - mcast->num_mc_addrs = 1; - memcpy(mcast->mac, mac_addr, ETH_ALEN); - - rc = ecore_filter_mcast_cmd(cdev, mcast, ECORE_SPQ_MODE_CB, NULL); - - return (rc); -} - -static int -qlnx_hw_add_mcast(qlnx_host_t *ha, uint8_t *mta) -{ - int i; - - for (i = 0; i < QLNX_MAX_NUM_MULTICAST_ADDRS; i++) { - if (QL_MAC_CMP(ha->mcast[i].addr, mta) == 0) - return 0; /* its been already added */ - } - - for (i = 0; i < QLNX_MAX_NUM_MULTICAST_ADDRS; i++) { - if ((ha->mcast[i].addr[0] == 0) && - (ha->mcast[i].addr[1] == 0) && - (ha->mcast[i].addr[2] == 0) && - (ha->mcast[i].addr[3] == 0) && - (ha->mcast[i].addr[4] == 0) && - (ha->mcast[i].addr[5] == 0)) { - if (qlnx_config_mcast_mac_addr(ha, mta, 1)) - return (-1); - - bcopy(mta, ha->mcast[i].addr, ETH_ALEN); - ha->nmcast++; - - return 0; - } - } - return 0; -} - -static int -qlnx_hw_del_mcast(qlnx_host_t *ha, uint8_t *mta) -{ - int i; - - for (i = 0; i < QLNX_MAX_NUM_MULTICAST_ADDRS; i++) { - if (QL_MAC_CMP(ha->mcast[i].addr, mta) == 0) { - if (qlnx_config_mcast_mac_addr(ha, mta, 0)) - return (-1); - - ha->mcast[i].addr[0] = 0; - ha->mcast[i].addr[1] = 0; - ha->mcast[i].addr[2] = 0; - ha->mcast[i].addr[3] = 0; - ha->mcast[i].addr[4] = 0; - ha->mcast[i].addr[5] = 0; - - ha->nmcast--; - - return 0; - } - } - return 0; -} - -/* - * Name: qls_hw_set_multi - * Function: Sets the Multicast Addresses provided the host O.S into the - * hardware (for the given interface) - */ -static void -qlnx_hw_set_multi(qlnx_host_t *ha, uint8_t *mta, uint32_t mcnt, - uint32_t add_mac) -{ - int i; - - for (i = 0; i < mcnt; i++) { - if (add_mac) { - if (qlnx_hw_add_mcast(ha, mta)) - break; - } else { - if (qlnx_hw_del_mcast(ha, mta)) - break; - } - - mta += ETHER_ADDR_LEN; - } - return; -} - static u_int -qlnx_copy_maddr(void *arg, struct sockaddr_dl *sdl, u_int mcnt) +qlnx_mcast_bins_from_maddr(void *arg, struct sockaddr_dl *sdl, u_int mcnt) { - uint8_t *mta = arg; - - if (mcnt == QLNX_MAX_NUM_MULTICAST_ADDRS) - return (0); + uint8_t bit; + uint32_t *bins = arg; - bcopy(LLADDR(sdl), &mta[mcnt * ETHER_ADDR_LEN], ETHER_ADDR_LEN); + bit = ecore_mcast_bin_from_mac(LLADDR(sdl)); + bins[bit / 32] |= 1 << (bit % 32); return (1); } static int -qlnx_set_multi(qlnx_host_t *ha, uint32_t add_multi) +qlnx_set_multi(qlnx_host_t *ha) { - uint8_t mta[QLNX_MAX_NUM_MULTICAST_ADDRS * ETHER_ADDR_LEN]; - struct ifnet *ifp = ha->ifp; - u_int mcnt; + struct ecore_filter_mcast mcast; + struct ecore_dev *cdev; + struct ifnet *ifp = ha->ifp; + u_int mcnt __unused; + int rc; if (qlnx_vf_device(ha) == 0) return (0); - mcnt = if_foreach_llmaddr(ifp, qlnx_copy_maddr, mta); + bzero(&mcast, sizeof(struct ecore_filter_mcast)); + mcnt = if_foreach_llmaddr(ifp, qlnx_mcast_bins_from_maddr, mcast.bins); + QL_DPRINT1(ha, "total %d multicast MACs found\n", mcnt); - qlnx_hw_set_multi(ha, mta, mcnt, add_multi); + if (memcmp(ha->ecore_mcast_bins, mcast.bins, sizeof(mcast.bins)) == 0) + return (0); - return (0); + cdev = &ha->cdev; + mcast.opcode = ECORE_FILTER_REPLACE; + rc = ecore_filter_mcast_cmd(cdev, &mcast, ECORE_SPQ_MODE_CB, NULL); + if (rc == 0) + memcpy(ha->ecore_mcast_bins, mcast.bins, sizeof(mcast.bins)); + + QL_DPRINT1(ha, "ecore_filter_mcast_cmd: end(%d)\n", rc); + return (rc); } static int @@ -2722,22 +2629,12 @@ qlnx_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) break; case SIOCADDMULTI: - QL_DPRINT4(ha, "%s (0x%lx)\n", "SIOCADDMULTI", cmd); - - QLNX_LOCK(ha); - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { - if (qlnx_set_multi(ha, 1)) - ret = EINVAL; - } - QLNX_UNLOCK(ha); - break; - case SIOCDELMULTI: - QL_DPRINT4(ha, "%s (0x%lx)\n", "SIOCDELMULTI", cmd); + QL_DPRINT4(ha, "%s (0x%lx)\n", "SIOCADDMULTI/SIOCDELMULTI", cmd); QLNX_LOCK(ha); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) { - if (qlnx_set_multi(ha, 0)) + if (qlnx_set_multi(ha) != 0) ret = EINVAL; } QLNX_UNLOCK(ha); @@ -7089,31 +6986,18 @@ qlnx_remove_all_ucast_mac(qlnx_host_t *ha) static int qlnx_remove_all_mcast_mac(qlnx_host_t *ha) { - struct ecore_filter_mcast *mcast; + struct ecore_filter_mcast mcast; struct ecore_dev *cdev; - int rc, i; + int rc; cdev = &ha->cdev; - mcast = &ha->ecore_mcast; - bzero(mcast, sizeof(struct ecore_filter_mcast)); - - mcast->opcode = ECORE_FILTER_REMOVE; - - for (i = 0; i < QLNX_MAX_NUM_MULTICAST_ADDRS; i++) { - if (ha->mcast[i].addr[0] || ha->mcast[i].addr[1] || - ha->mcast[i].addr[2] || ha->mcast[i].addr[3] || - ha->mcast[i].addr[4] || ha->mcast[i].addr[5]) { - memcpy(&mcast->mac[i][0], &ha->mcast[i].addr[0], ETH_ALEN); - mcast->num_mc_addrs++; - } - } - mcast = &ha->ecore_mcast; - - rc = ecore_filter_mcast_cmd(cdev, mcast, ECORE_SPQ_MODE_CB, NULL); + bzero(&mcast, sizeof(struct ecore_filter_mcast)); + mcast.opcode = ECORE_FILTER_FLUSH; - bzero(ha->mcast, (sizeof(qlnx_mcast_t) * QLNX_MAX_NUM_MULTICAST_ADDRS)); - ha->nmcast = 0; + rc = ecore_filter_mcast_cmd(cdev, &mcast, ECORE_SPQ_MODE_CB, NULL); + if (rc == 0) + bzero(ha->ecore_mcast_bins, sizeof(ha->ecore_mcast_bins)); return (rc); } @@ -7175,7 +7059,7 @@ qlnx_set_rx_mode(qlnx_host_t *ha) if (rc) return rc; - rc = qlnx_remove_all_mcast_mac(ha); + rc = qlnx_set_multi(ha); if (rc) return rc; From nobody Tue Feb 24 10:45:13 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKvWG2G39z6Thb7 for ; Tue, 24 Feb 2026 10:45:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKvWF6WR2z42kY for ; Tue, 24 Feb 2026 10: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=1771929913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O1vcYdKDsO11QDFq9S80cyV3zRpTCo8YS+WOTVD42T0=; b=yyVXryTWaoi55yjeBUCs3iBIXDsFgWHLHrNqlevFwoC31paPD6JpdmDSjTtpEiNO9yPLQu T0Ewr9QWxPPmlquWKi2HRtaWCzTY3S+MhG8ZekF/jGlhzKL6+9zh6Yl1NUzAa1OKwGSn56 +GJl9nWNyD4WSe9MhV4kg5boMYR1nDQ9eHeQXgbuF+gTN1RAi9F2Hd7KtHp3TrMU5B/Rai 3hz4Qj48ogGqOu6qgm2xdgsG4w1L89bz88fCuUrkisIzMsX06BLQavIiiILJTPPrSgZNEj i3sZ9kqURJ1/mBSOEZVzJ0iJNdVwWR7bIF11ZVo+MY61f63o3UTS9nSRZwPbqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771929913; a=rsa-sha256; cv=none; b=xLz3W2Vb9vwhqTwHcX4STv39eWdyCOf+d9A9pEd0HRf1pO4vrIhy/fSJMtNTAKuxaF+Cjs KZFLeTY5kAjq++00T17s7ACpdXEr7XIrklsgwiJHXqcxYdAjbXvz2p8g3WpwAKVJ7MyWne OmT/wMQD0YsBEyVdTGvOp9MmZonJg/bRytK2bTJMmU1w72/mcRQ0KHIan21Le6U69xBTE0 lES5uVaXouDBzVCLBEqltxwggT0Y8XYEGGzaYXQV7TXCYrDOE/oaoMLVikh6xJQ3t2LLNc mOt90rEAC3TBURmmMNNeaYtcB8oV8p1MFd1Rj3KplSErnGOxZi9ecMYiOYG53w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771929913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O1vcYdKDsO11QDFq9S80cyV3zRpTCo8YS+WOTVD42T0=; b=y0Zu8WkfAL+i4jTfbm/aIWoSg16E/3CK2XQutcsbSck+UwC4JObadZohFVCl8uWGoRTvU7 w1hNPw18fB42goGM7NjGlJrdqMXWzUkGJLX1fmdOOSH2uDnbeqITl4mCfXnxRomZr1Vocu T1HLRJ73UnWEhmCd+1C1nYFQGBWKpuyGaF96WsO8JZqMelXPNRHJotLPjsR3NgIVQfEyLT mkLiRPEaHZQtTIqODzSvfWmNaA5ngOkLqg9tDVeTXEe+KI4TvCsX6g+V1uoGA1T5SoZyEQ Hnd1rH83/T6Xo/ylO090vtJGKcpLkxjxqp5M+COQxM6HvrWxmt9ct/az4qlwiQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKvWF64XXz1BWM for ; Tue, 24 Feb 2026 10:45:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36624 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 10:45:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 281d578e9ff5 - stable/13 - qlnxe: Allow tapping the TX packets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 281d578e9ff56412bedbf7884fa097e5e59438da Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 10:45:13 +0000 Message-Id: <699d8139.36624.671f7bfd@gitrepo.freebsd.org> The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=281d578e9ff56412bedbf7884fa097e5e59438da commit 281d578e9ff56412bedbf7884fa097e5e59438da Author: Zhenlei Huang AuthorDate: 2026-02-06 17:52:54 +0000 Commit: Zhenlei Huang CommitDate: 2026-02-24 10:15:37 +0000 qlnxe: Allow tapping the TX packets Currently only the packets in the RX path can be captured by tcpdump as the ETHER_BPF_MTAP call in the TX path is missing. Add it so that packets in both directions can be captured. PR: 290973 Reviewed by: kbowling MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D54891 (cherry picked from commit 968647502ec21464ad3aecc7577ff0e8dfd41693) (cherry picked from commit 425b9cec0b8ce15a6e67d54a73f4f38dc66a4ccc) (cherry picked from commit ddfe98e8ccb120a0a5c42b2288694ecd2b70c80c) --- sys/dev/qlnx/qlnxe/qlnx_os.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index 311ab73eb868..1e4f43b46200 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -3049,6 +3049,7 @@ qlnx_transmit_locked(struct ifnet *ifp,struct qlnx_fastpath *fp, struct mbuf * drbr_advance(ifp, fp->tx_br); fp->tx_pkts_transmitted++; fp->tx_pkts_processed++; + ETHER_BPF_MTAP(ifp, mp); } mp = drbr_peek(ifp, fp->tx_br); From nobody Tue Feb 24 11:54:23 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKx391k3nz6TpxP for ; Tue, 24 Feb 2026 11:54:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKx390qCCz4HvR for ; Tue, 24 Feb 2026 11:54:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771934069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VtFimM7AXO927M79xRmRQX+7sNZ7ND88tnFNYuXxn8E=; b=syzt3CVBm488fDWdUQjxUI8s6zO2Yl/qKM3YXtrQ6Th8lpk98vpnepWA+VQ2c1NRVU1iof +Ru+sC7uiQQJMzfuZmQIqBFxJhx5IEbQOUEOkJ7Vji0Xm+KicrT4W4epoTUrL5t+C/Dzpw qVylag1dPICafEk00BFAoxJOJjnoY7HTBMnUBKAb3hiX1QwJu9nwAGR424pCuCrsbUP2m/ 3pdxkzBvlG9izLQ9RJXo9d6qpHYQxAKqu/DaUcCMAfxkKmXA2P0tJRSUV6dCDN/13d57SK b3hQHaglxiVLFkSkiNGHHWKpE4H9n1bVFDyF+vThcIC1LpLHj0wEcJdvRUFPXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771934069; a=rsa-sha256; cv=none; b=c3MgjNCId6pP4CBRQMqRrpX0o8stjkuHN1g1ET3n27SJSmGQZOcdh9SI2L2fEe7491vfzu UanqDia/V9fuc8e84EdxZdafqhiC5OrHi/97AS+/anD/GKNOose4Z8i++NMddk7hzybJrS PKcNrdhUjRjWC2yO7zIZTl36rQoGTj28+GQKS4FxzBuIZPuUwn9shvORogFBFxwHyjY4yj VG5+Y6n0IdxkA7IZHhfhxwUAGOtbwSwUtgIh/2c+9NCnIX2rQHZ6rVaQC5IuQynZI0+6Ah aqWppnJ9TPuqWP1CKWM7He4RDgV9viqPIqh3D08HrYvUon4Bk4OVQaRVNy44aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771934069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VtFimM7AXO927M79xRmRQX+7sNZ7ND88tnFNYuXxn8E=; b=eOR7JdYjDQd62sf6tGJ6VmMReb7oThm9xf5ZSW+ydUG9eFOJLLgKIIbZTd7Cdx9hyIt2lw oVp1g1tjGWhMNImmkNbld5Pt+Rl2iRYruuywnsTExLOP5ZnQ/RT1IKdL+Oz4VG0ney31bK cMUvFCgOq4JU902MIanNj7pKALX2VArpSDMTJqNusyDH2ytlbpZgqcBNXINHeFoRH2+taq GK8gYn6sqsWb5KTlPUeOTPw5qyepr7KvBBMkXyNqlPq5eIjeNZ24cG+JNqWT6/EXMjHCUR 3oziJQKxs94g7oOj80odhvP0rrooQFuVDCLqPj0s31/K8jnwxuzSQQ4iQoYVyg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKx386nK8z94 for ; Tue, 24 Feb 2026 11:54:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c440 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 11:54:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Johan=?utf-8?Q? S=C3=B6llv?=ander Subject: git: d3fec169baf9 - stable/15 - sbin/geom: Convert err/warn() to xo_err/warn() and style(9) fixes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: js X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d3fec169baf9ea0a94d868b04adeab16f918e29f Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 11:54:23 +0000 Message-Id: <699d916f.3c440.32f3c141@gitrepo.freebsd.org> The branch stable/15 has been updated by js: URL: https://cgit.FreeBSD.org/src/commit/?id=d3fec169baf9ea0a94d868b04adeab16f918e29f commit d3fec169baf9ea0a94d868b04adeab16f918e29f Author: Johan Söllvander AuthorDate: 2026-02-10 12:19:50 +0000 Commit: Johan Söllvander CommitDate: 2026-02-24 11:53:02 +0000 sbin/geom: Convert err/warn() to xo_err/warn() and style(9) fixes Finishing up the libxo conversion of geom by switching err(3) to their libxo equivalents. While here, fix some style(9) issues. There are still a few left, but at least they're fewer now. Reviewed by: asomers Approved by: asomers (mentor) Sponsored by: ConnectWise Differential Revision: https://reviews.freebsd.org/D54938 (cherry picked from commit 821243b3877d90290ba519f2aeccf6f48430db32) --- sbin/geom/core/geom.c | 79 ++++++++++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 39 deletions(-) diff --git a/sbin/geom/core/geom.c b/sbin/geom/core/geom.c index a1b1b351ebb3..757eadc218ef 100644 --- a/sbin/geom/core/geom.c +++ b/sbin/geom/core/geom.c @@ -201,7 +201,7 @@ load_module(void) /* Not present in kernel, try loading it. */ if (kldload(name2) < 0 || modfind(name1) < 0) { if (errno != EEXIST) { - err(EXIT_FAILURE, "cannot load %s", name2); + xo_err(EXIT_FAILURE, "cannot load %s", name2); } } } @@ -259,7 +259,8 @@ set_option(struct gctl_req *req, struct g_option *opt, const char *val) size_t optnamesize; if (G_OPT_NUM(opt) == UCHAR_MAX) - errx(EXIT_FAILURE, "Too many -%c options.", opt->go_char); + xo_errx(EXIT_FAILURE, "Too many -%c options.", + opt->go_char); /* * Base option name length plus 3 bytes for option number @@ -268,7 +269,7 @@ set_option(struct gctl_req *req, struct g_option *opt, const char *val) optnamesize = strlen(opt->go_name) + 3 + 1; ptr = malloc(optnamesize); if (ptr == NULL) - errx(EXIT_FAILURE, "No memory."); + xo_errx(EXIT_FAILURE, "No memory."); snprintf(ptr, optnamesize, "%s%u", opt->go_name, G_OPT_NUM(opt)); G_OPT_NUMINC(opt); optname = ptr; @@ -278,12 +279,12 @@ set_option(struct gctl_req *req, struct g_option *opt, const char *val) if (G_OPT_TYPE(opt) == G_TYPE_NUMBER) { if (expand_number(val, &number) == -1) { - err(EXIT_FAILURE, "Invalid value for '%c' argument", + xo_err(EXIT_FAILURE, "Invalid value for '%c' argument", opt->go_char); } ptr = malloc(sizeof(intmax_t)); if (ptr == NULL) - errx(EXIT_FAILURE, "No memory."); + xo_errx(EXIT_FAILURE, "No memory."); *(intmax_t *)ptr = number; opt->go_val = ptr; gctl_ro_param(req, optname, sizeof(intmax_t), opt->go_val); @@ -292,7 +293,7 @@ set_option(struct gctl_req *req, struct g_option *opt, const char *val) } else if (G_OPT_TYPE(opt) == G_TYPE_BOOL) { ptr = malloc(sizeof(int)); if (ptr == NULL) - errx(EXIT_FAILURE, "No memory."); + xo_errx(EXIT_FAILURE, "No memory."); *(int *)ptr = *val - '0'; opt->go_val = ptr; gctl_ro_param(req, optname, sizeof(int), opt->go_val); @@ -346,16 +347,16 @@ parse_arguments(struct g_command *cmd, struct gctl_req *req, int *argc, /* Options passed to kernel. */ opt = find_option(cmd, ch); if (opt == NULL) { - if (ch == 'v' && (cmd->gc_flags & G_FLAG_VERBOSE) != 0){ + if (ch == 'v' && (cmd->gc_flags & G_FLAG_VERBOSE) != 0) { if (++vcount < 2) continue; else - warnx("Option 'v' specified twice."); + xo_warnx("Option 'v' specified twice."); } usage(); } if (!G_OPT_ISMULTI(opt) && G_OPT_ISDONE(opt)) { - warnx("Option '%c' specified twice.", opt->go_char); + xo_warnx("Option '%c' specified twice.", opt->go_char); usage(); } G_OPT_DONE(opt); @@ -383,7 +384,7 @@ parse_arguments(struct g_command *cmd, struct gctl_req *req, int *argc, set_option(req, opt, "0"); } else { if (opt->go_val == NULL) { - warnx("Option '%c' not specified.", + xo_warnx("Option '%c' not specified.", opt->go_char); usage(); } else if (opt->go_val == G_VAL_OPTIONAL) { @@ -470,14 +471,12 @@ run_command(int argc, char *argv[]) /* Now, try to find a standard command. */ cmd = find_command(argv[0], GEOM_STD_CMDS); if (cmd == NULL) { - warnx("Unknown command: %s.", argv[0]); + xo_warnx("Unknown command: %s.", argv[0]); usage(); } - if (!std_available(cmd->gc_name)) { - warnx("Command '%s' not available; " + if (!std_available(cmd->gc_name)) + xo_errx(EXIT_FAILURE, "Command '%s' not available; " "try 'load' first.", argv[0]); - exit(EXIT_FAILURE); - } } if ((cmd->gc_flags & G_FLAG_LOADKLD) != 0) load_module(); @@ -502,7 +501,7 @@ run_command(int argc, char *argv[]) errstr = gctl_issue(req); } if (errstr != NULL && errstr[0] != '\0') { - warnx("%s", errstr); + xo_warnx("%s", errstr); /* Suppress EXIT_FAILURE for warnings */ if (strncmp(errstr, "warning: ", strlen("warning: ")) == 0) req->nerror = 0; @@ -543,7 +542,7 @@ load_library(void) ret = 0; tofree = totalpath = strdup(library_path()); if (totalpath == NULL) - err(EXIT_FAILURE, "Not enough memory for library path"); + xo_err(EXIT_FAILURE, "Not enough memory for library path"); if (strchr(totalpath, ':') != NULL) curpath = strsep(&totalpath, ":"); @@ -563,7 +562,7 @@ load_library(void) curpath = strsep(&totalpath, ":"); continue; } - err(EXIT_FAILURE, "Cannot access library"); + xo_err(EXIT_FAILURE, "Cannot access library"); } break; } @@ -573,27 +572,28 @@ load_library(void) return; dlh = dlopen(path, RTLD_NOW); if (dlh == NULL) - errx(EXIT_FAILURE, "Cannot open library: %s.", dlerror()); + xo_errx(EXIT_FAILURE, "Cannot open library: %s.", dlerror()); lib_version = dlsym(dlh, "lib_version"); if (lib_version == NULL) { - warnx("Cannot find symbol %s: %s.", "lib_version", dlerror()); + xo_warnx("Cannot find symbol %s: %s.", "lib_version", + dlerror()); dlclose(dlh); exit(EXIT_FAILURE); } if (*lib_version != G_LIB_VERSION) { dlclose(dlh); - errx(EXIT_FAILURE, "%s and %s are not synchronized.", + xo_errx(EXIT_FAILURE, "%s and %s are not synchronized.", getprogname(), path); } version = dlsym(dlh, "version"); if (version == NULL) { - warnx("Cannot find symbol %s: %s.", "version", dlerror()); + xo_warnx("Cannot find symbol %s: %s.", "version", dlerror()); dlclose(dlh); exit(EXIT_FAILURE); } class_commands = dlsym(dlh, "class_commands"); if (class_commands == NULL) { - warnx("Cannot find symbol %s: %s.", "class_commands", + xo_warnx("Cannot find symbol %s: %s.", "class_commands", dlerror()); dlclose(dlh); exit(EXIT_FAILURE); @@ -614,7 +614,7 @@ set_class_name(void) *s1 = tolower(*s1); gclass_name = malloc(strlen(class_name) + 1); if (gclass_name == NULL) - errx(EXIT_FAILURE, "No memory"); + xo_errx(EXIT_FAILURE, "No memory"); s1 = gclass_name; s2 = class_name; for (; *s2 != '\0'; s2++) @@ -645,7 +645,7 @@ get_class(int *argc, char ***argv) *argc -= 1; *argv += 1; } else { - errx(EXIT_FAILURE, "Invalid utility name."); + xo_errx(EXIT_FAILURE, "Invalid utility name."); } #ifndef STATIC_GEOM_CLASSES @@ -664,7 +664,7 @@ get_class(int *argc, char ***argv) /* If we can't load or list, it's not a class. */ if (!std_load_available() && !std_list_available()) - errx(EXIT_FAILURE, "Invalid class name '%s'.", class_name); + xo_errx(EXIT_FAILURE, "Invalid class name '%s'.", class_name); if (*argc < 1) usage(); @@ -786,7 +786,7 @@ show_tree(void) error = geom_gettree(&mesh); if (error != 0) - errc(EXIT_FAILURE, error, "Cannot get GEOM tree"); + xo_errc(EXIT_FAILURE, error, "Cannot get GEOM tree"); width = compute_tree_width(&mesh); @@ -824,7 +824,7 @@ main(int argc, char *argv[]) case 'p': provider_name = strdup(optarg); if (provider_name == NULL) - err(1, "strdup"); + xo_err(1, "strdup"); break; case 't': tflag = true; @@ -842,7 +842,7 @@ main(int argc, char *argv[]) xo_set_version(GEOM_XO_VERSION); if (tflag && provider_name != NULL) { - errx(EXIT_FAILURE, + xo_errx(EXIT_FAILURE, "At most one of -P and -t may be specified."); } @@ -1003,11 +1003,11 @@ list_one_geom_by_provider(const char *provider_name) error = geom_gettree(&mesh); if (error != 0) - errc(EXIT_FAILURE, error, "Cannot get GEOM tree"); + xo_errc(EXIT_FAILURE, error, "Cannot get GEOM tree"); gp = find_geom_by_provider(&mesh, provider_name); if (gp == NULL) - errx(EXIT_FAILURE, "Cannot find provider '%s'.", provider_name); + xo_errx(EXIT_FAILURE, "Cannot find provider '%s'.", provider_name); xo_open_container(provider_name); xo_emit("{Lwc:Geom class}{:class}\n", gp->lg_class->lg_name); @@ -1031,7 +1031,7 @@ std_list_available(void) error = geom_gettree_geom(&mesh, gclass_name, "", 0); if (error != 0) - errc(EXIT_FAILURE, error, "Cannot get GEOM tree"); + xo_errc(EXIT_FAILURE, error, "Cannot get GEOM tree"); classp = find_class(&mesh, gclass_name); geom_deletetree(&mesh); if (classp != NULL) @@ -1055,11 +1055,11 @@ std_list(struct gctl_req *req, unsigned flags __unused) } else error = geom_gettree(&mesh); if (error != 0) - errc(EXIT_FAILURE, error, "Cannot get GEOM tree"); + xo_errc(EXIT_FAILURE, error, "Cannot get GEOM tree"); classp = find_class(&mesh, gclass_name); if (classp == NULL) { geom_deletetree(&mesh); - errx(EXIT_FAILURE, "Class '%s' not found.", gclass_name); + xo_errx(EXIT_FAILURE, "Class '%s' not found.", gclass_name); } all = gctl_get_int(req, "all"); if (nargs > 0) { @@ -1067,7 +1067,7 @@ std_list(struct gctl_req *req, unsigned flags __unused) name = gctl_get_ascii(req, "arg%d", i); gp = find_geom(classp, name); if (gp == NULL) { - errx(EXIT_FAILURE, "Class '%s' does not have " + xo_errx(EXIT_FAILURE, "Class '%s' does not have " "an instance named '%s'.", gclass_name, name); } @@ -1340,10 +1340,10 @@ std_status(struct gctl_req *req, unsigned flags __unused) error = geom_gettree(&mesh); if (error != 0) - errc(EXIT_FAILURE, error, "Cannot get GEOM tree"); + xo_errc(EXIT_FAILURE, error, "Cannot get GEOM tree"); classp = find_class(&mesh, gclass_name); if (classp == NULL) - errx(EXIT_FAILURE, "Class %s not found.", gclass_name); + xo_errx(EXIT_FAILURE, "Class %s not found.", gclass_name); nargs = gctl_get_int(req, "nargs"); all = gctl_get_int(req, "all"); geoms = gctl_get_int(req, "geoms"); @@ -1356,7 +1356,8 @@ std_status(struct gctl_req *req, unsigned flags __unused) name = gctl_get_ascii(req, "arg%d", i); gp = find_geom(classp, name); if (gp == NULL) - errx(EXIT_FAILURE, "No such geom: %s.", name); + xo_errx(EXIT_FAILURE, "No such geom: %s.", + name); if (geoms) { status_update_len(gp, &name_len, &status_len); @@ -1438,7 +1439,7 @@ std_load_available(void) bzero(paths, sizeof(paths)); len = sizeof(paths); if (sysctlbyname("kern.module_path", paths, &len, NULL, 0) < 0) - err(EXIT_FAILURE, "sysctl(kern.module_path)"); + xo_err(EXIT_FAILURE, "sysctl(kern.module_path)"); for (p = strtok(paths, ";"); p != NULL; p = strtok(NULL, ";")) { snprintf(name, sizeof(name), "%s/geom_%s.ko", p, class_name); /* From nobody Tue Feb 24 13:28:21 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKz7Z6SbLz6S2wm for ; Tue, 24 Feb 2026 13:28:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKz7Z4NlMz3L7q for ; Tue, 24 Feb 2026 13:28:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771939706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IRXE7Q2PNn3AHhIRG9p51qGKUDXshdZrtot+YGMb6Rw=; b=LhUZAjaeIKVCL5r8bOQiAo4jO1eTYplqKFvYjt/vzqzVPtBDWba/q2xH9SfEmySely/PUH uuyObMIG6D+cVi+h1h+RSRSi5qoLhED2TGHZF8i9j9IVv4kdcfe5pzzVwYqYOyqL9BJuGw 9fTAAN94hnaN5JaFwkWN0gXmvQTG6/6S8+MkQuIKg81fr61rlCKp1Y+wnAkzvT0+Sx3YKe PU5YN0nyHJCNhcNfUy7OM65Urx9/LWcLWe/ZialW0ck65iXumPJJV5TLkyKwEUIAQOSDMh siORdOTBI/zrciHD3Pw6e9yIrj3CeNwItw/NmTcpDi3ha6ltqKI0AkrAk4/KjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771939706; a=rsa-sha256; cv=none; b=xbRlWtnnJhIjp/E0ynxpcHB75M8x7I5q+SAAmmVVuzXke7evlqnGppPq7jmfvcyiAYVvKa 6amYNeLuhSXwYdCCfr/p48nV8zUduICF/x1pEcdoU1OFgDFVTwjX6LYUzYLsutSBIr+Pyc cID3e9kUmoNWT+Tl/eeibJ/opLonFt452Nk2bQexsanKxbEME5wGvFoVbavwss9BvgDQGw v+/dCem+P+Gw+Cf8cKEy4f5ZIa14peiAXSk62VkIj0+U/diCZoMohqiff4mnD65tbwhdIw MRf4e3Ct/QjeVLoXtaR0cB1FqVwABel5IGVccH+G9UJyqdN/MGUCvjQpWeMeGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771939706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IRXE7Q2PNn3AHhIRG9p51qGKUDXshdZrtot+YGMb6Rw=; b=hFoA3K8OL16p2dAp/7agq1mI83wPRwVgKZIjItF7v3YEFnMbyc/XnixrhjrrZW1Qj68O6B ViRmcb0WU/w7xRbhhuhJ5ewq6YCnsdz/SDb6R4oAei6n66+oHTUyyXeMx3zpFu14EtUL6E pvpzBaEFos9Z+lT0kUN7n4FpiK+xEeb8wBtWWwxBUkmL+NM/FOwJabxTkzhkGCLEl0wAEQ 1xZm1ALdGEd+q+W3NsolaZ2gfoBqCfTL+kupRgRt2pCrAkxnM2Zi4EQAGCm13pHty2okkN IgHvmj5B+73prpaT6AUhWNLUbumvZdBVWm+zQ5okpC2q0M9Jt7GeBuYy0/KtPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKz7Z40HJz2vW for ; Tue, 24 Feb 2026 13:28:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 43f64 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 13:28:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: f0b8355db6ba - main - ffs.4: Mlink to ufs.4 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f0b8355db6ba57a0849c41722e0a09f312d9eef5 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 13:28:21 +0000 Message-Id: <699da775.43f64.5464da66@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=f0b8355db6ba57a0849c41722e0a09f312d9eef5 commit f0b8355db6ba57a0849c41722e0a09f312d9eef5 Author: Alexander Ziaee AuthorDate: 2026-02-24 13:24:16 +0000 Commit: Alexander Ziaee CommitDate: 2026-02-24 13:26:20 +0000 ffs.4: Mlink to ufs.4 PR: 293423 MFC after: 3 days Requested by: bms --- share/man/man4/Makefile | 1 + share/man/man4/ffs.4 | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 9bdd2d2c83ff..a385363138d0 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -719,6 +719,7 @@ MLINKS+=ext2fs.4 ext4fs.4 MLINKS+=fd.4 stderr.4 \ fd.4 stdin.4 \ fd.4 stdout.4 +MLINKS+=ffs.4 ufs.4 MLINKS+=fdt.4 FDT.4 MLINKS+=firewire.4 ieee1394.4 MLINKS+=fwe.4 if_fwe.4 diff --git a/share/man/man4/ffs.4 b/share/man/man4/ffs.4 index 5f8787d6fefc..519ef1d1e8a5 100644 --- a/share/man/man4/ffs.4 +++ b/share/man/man4/ffs.4 @@ -28,11 +28,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 19, 2025 +.Dd February 24, 2026 .Dt FFS 4 .Os .Sh NAME -.Nm ffs +.Nm ffs , +.Nm ufs .Nd Berkeley fast file system .Sh SYNOPSIS In the kernel configuration file: From nobody Tue Feb 24 13:55:04 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fKzkP3HW2z6S6gy for ; Tue, 24 Feb 2026 13:55:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fKzkP27Wgz3Pv1 for ; Tue, 24 Feb 2026 13:55:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771941309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BH8w/T1V9VXC9B9KPHmq7jv2cXPYCYF4uiZujHamZu8=; b=gJU9UYNPNGMUkPbq2NGZKbVXMA5w5pzVu7WFcexcucy6gad+pQCcjJy9QsVt0HF0I9r6Qc d2MlTCbaItBvOOlARx1MdHk172n8moYK1tinD+14y/n89H1mwLyRobb0Qb6C2i9j+KZHqf KFSWsxdTLeH3NAUABvRHB7ObPsfxnqD8AJAccm7kdyBlzfarAIxR1VrSZtOthS3IHRawMd bF4iBlXOch3yfIEkB0P1IHP1Ruu+o8zvbXZODS2jplsXFG/e1yN5Driq7ski0w8rVPWVvm BiMZnykLA5yDcxhOHifWa0Dfvy9isc7/+/heeD72PB+uoMNp/iGNWlpDCrE22Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771941309; a=rsa-sha256; cv=none; b=OiFlHt4Ok631wdsbXkOka8OOxmXfc15yaLt+jZ7y5y96I9GESlFXLQ7dpuUizigwBiOy51 i1EBX9ZYnc5AImlAy6MnoafHf4Nk7D1VTS+PmnwWuWGZe64fEiR7FNJB7wBrKfVa+F25Yb ghejd4ot90Rx+4LAMhswBfMY84/LMGHrAujLXc7nGZcWeZCer7mjILGUp63/Rz7zCSHNVM asRNQeS7z2t+VrDHuo5KTGGvjB/NsLZ/5Nw8GkQjvAiGeZKbbvrHVUTOymL+6bEhRgIA7b lEqJ54QYC2WO+lWMAdZKiDWdAsAiJ2yHjVE7qSGZYwAdIGeMNI8JhLQ/7jXuaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771941309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BH8w/T1V9VXC9B9KPHmq7jv2cXPYCYF4uiZujHamZu8=; b=W4tgZepxqdcshyq5u1bva+H/uNbOPPv0TGJc09Ch8xcqlO1hNmts9DsNAL8q7ocwkedcZp 2jRKee+PQX19f2U1CU9Y2YUwJHCCw7HmuaEun6c7btRfwrXInyPTVNVMaGwMHcB+ysoR6g Y7gUwLx3eR3Mgp4ILaHQyOR0A3IJO2SNTrq7jDElEnfMwF++3pdvaGHTBLR0uPh2eddzHq TAEFYRDQ+E/dJuo/NGB1yjwZbOgdj3LCCzeG8VASxW5SYXSE/DNO9ar0eJ6UFzWnG+0iT8 iKA/XLvkycRj9tsSevsvs5oMtYTY111Tgw6tCH1w5aOxcSsuO9NOpEKrIcVxuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fKzkP1G65z3gt for ; Tue, 24 Feb 2026 13:55:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1938f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 13:55:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: b7ef4f4b230f - main - sys: Restore sorting in sys/elf_common.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b7ef4f4b230f01968473269f280bd7e4e86a3ec9 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 13:55:04 +0000 Message-Id: <699dadb8.1938f.22a54dfd@gitrepo.freebsd.org> The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=b7ef4f4b230f01968473269f280bd7e4e86a3ec9 commit b7ef4f4b230f01968473269f280bd7e4e86a3ec9 Author: Jessica Clarke AuthorDate: 2026-02-24 13:52:21 +0000 Commit: Jessica Clarke CommitDate: 2026-02-24 13:52:21 +0000 sys: Restore sorting in sys/elf_common.h These various definitions are meant to be kept sorted by machine prefix. Fixes: 2bb61497ca76 ("elf_common.h: Add definitions for LoongArch ELF files") --- sys/sys/elf_common.h | 350 +++++++++++++++++++++++++-------------------------- 1 file changed, 175 insertions(+), 175 deletions(-) diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h index 9520bd63cbea..353ac882350b 100644 --- a/sys/sys/elf_common.h +++ b/sys/sys/elf_common.h @@ -345,6 +345,25 @@ typedef struct { #define EF_ARM_VFP_FLOAT EF_ARM_ABI_FLOAT_HARD /* Pre-V5 ABI name */ #define EF_ARM_MAVERICK_FLOAT 0x00000800 +/* + * Loongson LoongArch Specific e_flags + * + * Definitions from LoongArch ELF psABI v2.01. + * Reference: https://github.com/loongson/LoongArch-Documentation + * (commit hash 296de4def055c871809068e0816325a4ac04eb12) + */ + +/* LoongArch Base ABI Modifiers */ +#define EF_LOONGARCH_ABI_SOFT_FLOAT 0x00000001 +#define EF_LOONGARCH_ABI_SINGLE_FLOAT 0x00000002 +#define EF_LOONGARCH_ABI_DOUBLE_FLOAT 0x00000003 +#define EF_LOONGARCH_ABI_MODIFIER_MASK 0x00000007 + +/* LoongArch Object file ABI versions */ +#define EF_LOONGARCH_OBJABI_V0 0x00000000 +#define EF_LOONGARCH_OBJABI_V1 0x00000040 +#define EF_LOONGARCH_OBJABI_MASK 0x000000C0 + #define EF_MIPS_NOREORDER 0x00000001 #define EF_MIPS_PIC 0x00000002 /* Contains PIC code */ #define EF_MIPS_CPIC 0x00000004 /* STD PIC calling sequence */ @@ -383,25 +402,6 @@ typedef struct { #define EF_RISCV_RVE 0x00000008 #define EF_RISCV_TSO 0x00000010 -/* - * Loongson LoongArch Specific e_flags - * - * Definitions from LoongArch ELF psABI v2.01. - * Reference: https://github.com/loongson/LoongArch-Documentation - * (commit hash 296de4def055c871809068e0816325a4ac04eb12) - */ - -/* LoongArch Base ABI Modifiers */ -#define EF_LOONGARCH_ABI_SOFT_FLOAT 0x00000001 -#define EF_LOONGARCH_ABI_SINGLE_FLOAT 0x00000002 -#define EF_LOONGARCH_ABI_DOUBLE_FLOAT 0x00000003 -#define EF_LOONGARCH_ABI_MODIFIER_MASK 0x00000007 - -/* LoongArch Object file ABI versions */ -#define EF_LOONGARCH_OBJABI_V0 0x00000000 -#define EF_LOONGARCH_OBJABI_V1 0x00000040 -#define EF_LOONGARCH_OBJABI_MASK 0x000000C0 - #define EF_SPARC_EXT_MASK 0x00ffff00 #define EF_SPARC_32PLUS 0x00000100 #define EF_SPARC_SUN_US1 0x00000200 @@ -1226,6 +1226,162 @@ typedef struct { #define R_IA_64_DTPREL64LSB 0xb7 /* word64 LSB @dtprel(S + A) */ #define R_IA_64_LTOFF_DTPREL22 0xba /* imm22 @ltoff(@dtprel(S+A)) */ +/* + * Loongson LoongArch relocation types. + * + * LoongArch ELF psABI: https://github.com/loongson/LoongArch-Documentation + * (commit hash 9b3bd9f4a497115913c22f1a2a47863798fbc02a) + */ + +/* Relocation types used by the dynamic linker */ +#define R_LARCH_NONE 0 +#define R_LARCH_32 1 +#define R_LARCH_64 2 +#define R_LARCH_RELATIVE 3 +#define R_LARCH_COPY 4 +#define R_LARCH_JUMP_SLOT 5 +#define R_LARCH_TLS_DTPMOD32 6 +#define R_LARCH_TLS_DTPMOD64 7 +#define R_LARCH_TLS_DTPREL32 8 +#define R_LARCH_TLS_DTPREL64 9 +#define R_LARCH_TLS_TPREL32 10 +#define R_LARCH_TLS_TPREL64 11 +#define R_LARCH_IRELATIVE 12 +#define R_LARCH_MARK_LA 20 +#define R_LARCH_MARK_PCREL 21 +#define R_LARCH_SOP_PUSH_PCREL 22 +#define R_LARCH_SOP_PUSH_ABSOLUTE 23 +#define R_LARCH_SOP_PUSH_DUP 24 +#define R_LARCH_SOP_PUSH_GPREL 25 +#define R_LARCH_SOP_PUSH_TLS_TPREL 26 +#define R_LARCH_SOP_PUSH_TLS_GOT 27 +#define R_LARCH_SOP_PUSH_TLS_GD 28 +#define R_LARCH_SOP_PUSH_PLT_PCREL 29 +#define R_LARCH_SOP_ASSERT 30 +#define R_LARCH_SOP_NOT 31 +#define R_LARCH_SOP_SUB 32 +#define R_LARCH_SOP_SL 33 +#define R_LARCH_SOP_SR 34 +#define R_LARCH_SOP_ADD 35 +#define R_LARCH_SOP_AND 36 +#define R_LARCH_SOP_IF_ELSE 37 +#define R_LARCH_SOP_POP_32_S_10_5 38 +#define R_LARCH_SOP_POP_32_U_10_12 39 +#define R_LARCH_SOP_POP_32_S_10_12 40 +#define R_LARCH_SOP_POP_32_S_10_16 41 +#define R_LARCH_SOP_POP_32_S_10_16_S2 42 +#define R_LARCH_SOP_POP_32_S_5_20 43 +#define R_LARCH_SOP_POP_32_S_0_5_10_16_S2 44 +#define R_LARCH_SOP_POP_32_S_0_10_10_16_S2 45 +#define R_LARCH_SOP_POP_32_U 46 +#define R_LARCH_ADD8 47 +#define R_LARCH_ADD16 48 +#define R_LARCH_ADD24 49 +#define R_LARCH_ADD32 50 +#define R_LARCH_ADD64 51 +#define R_LARCH_SUB8 52 +#define R_LARCH_SUB16 53 +#define R_LARCH_SUB24 54 +#define R_LARCH_SUB32 55 +#define R_LARCH_SUB64 56 +#define R_LARCH_GNU_VTINHERIT 57 +#define R_LARCH_GNU_VTENTRY 58 + +/* + * Relocs whose processing do not require a stack machine. + * + * Spec addition: https://github.com/loongson/LoongArch-Documentation/pull/57 + */ +#define R_LARCH_B16 64 +#define R_LARCH_B21 65 +#define R_LARCH_B26 66 +#define R_LARCH_ABS_HI20 67 +#define R_LARCH_ABS_LO12 68 +#define R_LARCH_ABS64_LO20 69 +#define R_LARCH_ABS64_HI12 70 +#define R_LARCH_PCALA_HI20 71 +#define R_LARCH_PCALA_LO12 72 +#define R_LARCH_PCALA64_LO20 73 +#define R_LARCH_PCALA64_HI12 74 +#define R_LARCH_GOT_PC_HI20 75 +#define R_LARCH_GOT_PC_LO12 76 +#define R_LARCH_GOT64_PC_LO20 77 +#define R_LARCH_GOT64_PC_HI12 78 +#define R_LARCH_GOT_HI20 79 +#define R_LARCH_GOT_LO12 80 +#define R_LARCH_GOT64_LO20 81 +#define R_LARCH_GOT64_HI12 82 +#define R_LARCH_TLS_LE_HI20 83 +#define R_LARCH_TLS_LE_LO12 84 +#define R_LARCH_TLS_LE64_LO20 85 +#define R_LARCH_TLS_LE64_HI12 86 +#define R_LARCH_TLS_IE_PC_HI20 87 +#define R_LARCH_TLS_IE_PC_LO12 88 +#define R_LARCH_TLS_IE64_PC_LO20 89 +#define R_LARCH_TLS_IE64_PC_HI12 90 +#define R_LARCH_TLS_IE_HI20 91 +#define R_LARCH_TLS_IE_LO12 92 +#define R_LARCH_TLS_IE64_LO20 93 +#define R_LARCH_TLS_IE64_HI12 94 +#define R_LARCH_TLS_LD_PC_HI20 95 +#define R_LARCH_TLS_LD_HI20 96 +#define R_LARCH_TLS_GD_PC_HI20 97 +#define R_LARCH_TLS_GD_HI20 98 +#define R_LARCH_32_PCREL 99 +#define R_LARCH_RELAX 100 + +/* + * Relocs added in ELF for the LoongArch™ Architecture v20230519, part of the + * v2.10 LoongArch ABI specs. + * + * Spec addition: https://github.com/loongson/la-abi-specs/pull/1 + * + * Note that the 101 and 104 relocation numbers are defined as R_LARCH_DELETE + * and R_LARCH_CFA respectively in psABI 2.10. But they are marked as reserved + * in psABI v2.20 because they were proved not necessary to be exposed outside + * of the linker. + */ +#define R_LARCH_ALIGN 102 +#define R_LARCH_PCREL20_S2 103 +#define R_LARCH_ADD6 105 +#define R_LARCH_SUB6 106 +#define R_LARCH_ADD_ULEB128 107 +#define R_LARCH_SUB_ULEB128 108 +#define R_LARCH_64_PCREL 109 + +/* + * Relocs added in ELF for the LoongArch™ Architecture v20231102, part of the + * v2.20 LoongArch ABI specs. + * + * Spec addition: https://github.com/loongson/la-abi-specs/pull/4 + */ +#define R_LARCH_CALL36 110 + +/* + * Relocs added in ELF for the LoongArch™ Architecture v20231219, part of the + * v2.30 LoongArch ABI specs. + * + * Spec addition: https://github.com/loongson/la-abi-specs/pull/5 + */ +#define R_LARCH_TLS_DESC32 13 +#define R_LARCH_TLS_DESC64 14 +#define R_LARCH_TLS_DESC_PC_HI20 111 +#define R_LARCH_TLS_DESC_PC_LO12 112 +#define R_LARCH_TLS_DESC64_PC_LO20 113 +#define R_LARCH_TLS_DESC64_PC_HI12 114 +#define R_LARCH_TLS_DESC_HI20 115 +#define R_LARCH_TLS_DESC_LO12 116 +#define R_LARCH_TLS_DESC64_LO20 117 +#define R_LARCH_TLS_DESC64_HI12 118 +#define R_LARCH_TLS_DESC_LD 119 +#define R_LARCH_TLS_DESC_CALL 120 +#define R_LARCH_TLS_LE_HI20_R 121 +#define R_LARCH_TLS_LE_ADD_R 122 +#define R_LARCH_TLS_LE_LO12_R 123 +#define R_LARCH_TLS_LD_PCREL20_S2 124 +#define R_LARCH_TLS_GD_PCREL20_S2 125 +#define R_LARCH_TLS_DESC_PCREL20_S2 126 + #define R_MIPS_NONE 0 /* No reloc */ #define R_MIPS_16 1 /* Direct 16 bit */ #define R_MIPS_32 2 /* Direct 32 bit */ @@ -1426,162 +1582,6 @@ typedef struct { #define R_RISCV_TLSDESC_CALL 65 #define R_RISCV_VENDOR 191 -/* - * Loongson LoongArch relocation types. - * - * LoongArch ELF psABI: https://github.com/loongson/LoongArch-Documentation - * (commit hash 9b3bd9f4a497115913c22f1a2a47863798fbc02a) - */ - -/* Relocation types used by the dynamic linker */ -#define R_LARCH_NONE 0 -#define R_LARCH_32 1 -#define R_LARCH_64 2 -#define R_LARCH_RELATIVE 3 -#define R_LARCH_COPY 4 -#define R_LARCH_JUMP_SLOT 5 -#define R_LARCH_TLS_DTPMOD32 6 -#define R_LARCH_TLS_DTPMOD64 7 -#define R_LARCH_TLS_DTPREL32 8 -#define R_LARCH_TLS_DTPREL64 9 -#define R_LARCH_TLS_TPREL32 10 -#define R_LARCH_TLS_TPREL64 11 -#define R_LARCH_IRELATIVE 12 -#define R_LARCH_MARK_LA 20 -#define R_LARCH_MARK_PCREL 21 -#define R_LARCH_SOP_PUSH_PCREL 22 -#define R_LARCH_SOP_PUSH_ABSOLUTE 23 -#define R_LARCH_SOP_PUSH_DUP 24 -#define R_LARCH_SOP_PUSH_GPREL 25 -#define R_LARCH_SOP_PUSH_TLS_TPREL 26 -#define R_LARCH_SOP_PUSH_TLS_GOT 27 -#define R_LARCH_SOP_PUSH_TLS_GD 28 -#define R_LARCH_SOP_PUSH_PLT_PCREL 29 -#define R_LARCH_SOP_ASSERT 30 -#define R_LARCH_SOP_NOT 31 -#define R_LARCH_SOP_SUB 32 -#define R_LARCH_SOP_SL 33 -#define R_LARCH_SOP_SR 34 -#define R_LARCH_SOP_ADD 35 -#define R_LARCH_SOP_AND 36 -#define R_LARCH_SOP_IF_ELSE 37 -#define R_LARCH_SOP_POP_32_S_10_5 38 -#define R_LARCH_SOP_POP_32_U_10_12 39 -#define R_LARCH_SOP_POP_32_S_10_12 40 -#define R_LARCH_SOP_POP_32_S_10_16 41 -#define R_LARCH_SOP_POP_32_S_10_16_S2 42 -#define R_LARCH_SOP_POP_32_S_5_20 43 -#define R_LARCH_SOP_POP_32_S_0_5_10_16_S2 44 -#define R_LARCH_SOP_POP_32_S_0_10_10_16_S2 45 -#define R_LARCH_SOP_POP_32_U 46 -#define R_LARCH_ADD8 47 -#define R_LARCH_ADD16 48 -#define R_LARCH_ADD24 49 -#define R_LARCH_ADD32 50 -#define R_LARCH_ADD64 51 -#define R_LARCH_SUB8 52 -#define R_LARCH_SUB16 53 -#define R_LARCH_SUB24 54 -#define R_LARCH_SUB32 55 -#define R_LARCH_SUB64 56 -#define R_LARCH_GNU_VTINHERIT 57 -#define R_LARCH_GNU_VTENTRY 58 - -/* - * Relocs whose processing do not require a stack machine. - * - * Spec addition: https://github.com/loongson/LoongArch-Documentation/pull/57 - */ -#define R_LARCH_B16 64 -#define R_LARCH_B21 65 -#define R_LARCH_B26 66 -#define R_LARCH_ABS_HI20 67 -#define R_LARCH_ABS_LO12 68 -#define R_LARCH_ABS64_LO20 69 -#define R_LARCH_ABS64_HI12 70 -#define R_LARCH_PCALA_HI20 71 -#define R_LARCH_PCALA_LO12 72 -#define R_LARCH_PCALA64_LO20 73 -#define R_LARCH_PCALA64_HI12 74 -#define R_LARCH_GOT_PC_HI20 75 -#define R_LARCH_GOT_PC_LO12 76 -#define R_LARCH_GOT64_PC_LO20 77 -#define R_LARCH_GOT64_PC_HI12 78 -#define R_LARCH_GOT_HI20 79 -#define R_LARCH_GOT_LO12 80 -#define R_LARCH_GOT64_LO20 81 -#define R_LARCH_GOT64_HI12 82 -#define R_LARCH_TLS_LE_HI20 83 -#define R_LARCH_TLS_LE_LO12 84 -#define R_LARCH_TLS_LE64_LO20 85 -#define R_LARCH_TLS_LE64_HI12 86 -#define R_LARCH_TLS_IE_PC_HI20 87 -#define R_LARCH_TLS_IE_PC_LO12 88 -#define R_LARCH_TLS_IE64_PC_LO20 89 -#define R_LARCH_TLS_IE64_PC_HI12 90 -#define R_LARCH_TLS_IE_HI20 91 -#define R_LARCH_TLS_IE_LO12 92 -#define R_LARCH_TLS_IE64_LO20 93 -#define R_LARCH_TLS_IE64_HI12 94 -#define R_LARCH_TLS_LD_PC_HI20 95 -#define R_LARCH_TLS_LD_HI20 96 -#define R_LARCH_TLS_GD_PC_HI20 97 -#define R_LARCH_TLS_GD_HI20 98 -#define R_LARCH_32_PCREL 99 -#define R_LARCH_RELAX 100 - -/* - * Relocs added in ELF for the LoongArch™ Architecture v20230519, part of the - * v2.10 LoongArch ABI specs. - * - * Spec addition: https://github.com/loongson/la-abi-specs/pull/1 - * - * Note that the 101 and 104 relocation numbers are defined as R_LARCH_DELETE - * and R_LARCH_CFA respectively in psABI 2.10. But they are marked as reserved - * in psABI v2.20 because they were proved not necessary to be exposed outside - * of the linker. - */ -#define R_LARCH_ALIGN 102 -#define R_LARCH_PCREL20_S2 103 -#define R_LARCH_ADD6 105 -#define R_LARCH_SUB6 106 -#define R_LARCH_ADD_ULEB128 107 -#define R_LARCH_SUB_ULEB128 108 -#define R_LARCH_64_PCREL 109 - -/* - * Relocs added in ELF for the LoongArch™ Architecture v20231102, part of the - * v2.20 LoongArch ABI specs. - * - * Spec addition: https://github.com/loongson/la-abi-specs/pull/4 - */ -#define R_LARCH_CALL36 110 - -/* - * Relocs added in ELF for the LoongArch™ Architecture v20231219, part of the - * v2.30 LoongArch ABI specs. - * - * Spec addition: https://github.com/loongson/la-abi-specs/pull/5 - */ -#define R_LARCH_TLS_DESC32 13 -#define R_LARCH_TLS_DESC64 14 -#define R_LARCH_TLS_DESC_PC_HI20 111 -#define R_LARCH_TLS_DESC_PC_LO12 112 -#define R_LARCH_TLS_DESC64_PC_LO20 113 -#define R_LARCH_TLS_DESC64_PC_HI12 114 -#define R_LARCH_TLS_DESC_HI20 115 -#define R_LARCH_TLS_DESC_LO12 116 -#define R_LARCH_TLS_DESC64_LO20 117 -#define R_LARCH_TLS_DESC64_HI12 118 -#define R_LARCH_TLS_DESC_LD 119 -#define R_LARCH_TLS_DESC_CALL 120 -#define R_LARCH_TLS_LE_HI20_R 121 -#define R_LARCH_TLS_LE_ADD_R 122 -#define R_LARCH_TLS_LE_LO12_R 123 -#define R_LARCH_TLS_LD_PCREL20_S2 124 -#define R_LARCH_TLS_GD_PCREL20_S2 125 -#define R_LARCH_TLS_DESC_PCREL20_S2 126 - #define R_SPARC_NONE 0 #define R_SPARC_8 1 #define R_SPARC_16 2 From nobody Tue Feb 24 14:26:04 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL0QB3Ww3z6S9wW for ; Tue, 24 Feb 2026 14:26:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL0QB2VCcz3TNC for ; Tue, 24 Feb 2026 14:26:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771943170; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+qPrg7naIr2VU+Zeg4F3ADs8OyeUybPYPvjp5OyAmjA=; b=pEati6HcOoNhh6tIf4CZh/PA11H9gD0cLE7feP7PX9iNXb6eC4zyCwL+hkGCFOvhaIl8W+ AVMndf+J5ctYuNGFbZ6PhWyaCecueu697jOQZ2jKqpYEvty3u3xrXNl3w4m/4B0vASLzZh gKhB4MkqDFW2oHc/IG9RKUUo6x7E6gQ3nYOWY/GOIt6zQXKxywe1fWSargemLhziMsGZ5u 1FXVRxbqTZhvOWtjA3SVuy2gQ8gsw1H7eOAcYAwougnJoKCIg1rFl4XZMeTG6nFq6UhAAo pribsbig1hlTjwNEoEuqjHNtjA3vQ8trrb+bAU8q79aFfgp89d8pv9IeOFNMwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771943170; a=rsa-sha256; cv=none; b=J/v2BWIefxFyN6zokDLWAiaD46AvxYDJPkZ5cW/s8jNAxrnbPuyBOVJFq79Y2ajOrVr2gF 0rO5A0spcTiy5wrrNZPhaAOW6blLXHBcF0uZ3YsOIejr6Gkcme/A0X7wRlYXxqRIunxG6X ZvuLPKwDJin01rMmT1kzTsAQbabmKBhxj/u4arAkqpY0C/eZ6ztWvj4qe0dH80dXCVYpkX Br628/SYGFtvrTkVeOP5vk0mbzmshz5JeeOKN32hvgfv2hXMGglNk1q9eMsEF7WHIM55Q4 LYIlemudOIofdC7c0lHxZjzTSBtWPE01dwye9A63t5CZ7jWg49ljcAqI1QODSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771943170; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+qPrg7naIr2VU+Zeg4F3ADs8OyeUybPYPvjp5OyAmjA=; b=cJnW9yZVImLbxOm4HgCzp/lsGdnTT7Z01oy099+21PRJtOyCNqb2rRVTjc1KnjjxyHHNfS Fri/bbD5wka71YdS4JPda72HDRInWXd/3JR2jPSEECFiiaFgVwj/YID2xGBk6r4yDuixxp 1dHaEH5WXFCXeRAF+YrlvygDplkiwApq3zOwO1T1jbbFzQMxMRBnnVNGIIqkei4bSqIQ1e zKVd0QoY0Ci+CAJBAtN+YVej7C5dZ+g0ZU9YW1m7Fqf1nHXKpdGzQRtcYp7I00aRU7GEpl GtE4ZN433jJSYW8MTyhC1IfDyx5HzB5on5VsXDiyc2enhKXW7GKuRaszUd1u7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL0QB14qFz3lq for ; Tue, 24 Feb 2026 14:26:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1cf24 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 14:26:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 6c4777c59325 - main - ngctl: Fix getline loop List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6c4777c59325c2cfefcce0c466b3bf475404a550 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 14:26:04 +0000 Message-Id: <699db4fc.1cf24.4f3430f0@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=6c4777c59325c2cfefcce0c466b3bf475404a550 commit 6c4777c59325c2cfefcce0c466b3bf475404a550 Author: Dag-Erling Smørgrav AuthorDate: 2026-02-24 14:23:39 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-24 14:25:57 +0000 ngctl: Fix getline loop I misremembered when I wrote this code: getline() returns -1 on EOF, not zero, so the loop condition and the error check are both incorrect (though in practice getline() will never return 0). MFC after: 3 days Fixes: 3cbdcabf714d ("ngctl: Modernize code somewhat") Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D55487 --- usr.sbin/ngctl/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/ngctl/main.c b/usr.sbin/ngctl/main.c index b58de1e042b3..2b711fd4155a 100644 --- a/usr.sbin/ngctl/main.c +++ b/usr.sbin/ngctl/main.c @@ -243,7 +243,7 @@ ReadFile(FILE *fp) unsigned int lineno = 0; int rtn = CMDRTN_OK; - while ((len = getline(&line, &sz, fp)) > 0) { + while ((len = getline(&line, &sz, fp)) >= 0) { lineno++; if (*line == '#') continue; @@ -252,7 +252,7 @@ ReadFile(FILE *fp) break; } } - if (len < 0) + if (ferror(fp)) rtn = CMDRTN_ERROR; free(line); return (rtn); From nobody Tue Feb 24 14:29:32 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL0V92FKjz6SBJR for ; Tue, 24 Feb 2026 14:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL0V90YhJz3Tc8 for ; Tue, 24 Feb 2026 14:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771943377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZlGxSzDoEVk6OnAAFMvDo9XXJXYmgA0kt++rYgmbVgA=; b=qj2Jj+44qRUXfaycwCt1WOHLf3uENb8rOzDfniUWCxDcXWo5bhR3nQvKnx7o718eSJ7pP2 NIzrFljpMgRbC9zgmRArEZnkecgU1drocWfMjLoNqGAIH9M8M/cIAEgn3cpJilwTiNLhwD 7Puhwhv0EF9qkYMVDLltxulnKs3pK98WnIlVEcYoAZWdo3ZRisaJ3U+vZ/CwJz/UJ7eT7r hyAXVuWllohKatuvRBqsEZRi3AsTmj88+Cs9LWTxjYxnUpXsjNBi4OjqoYic1a8K7K8OwL en1fbH7d00j+pFnK2G3mUcXGVOaMwA0UiZR/lCUnK5DeUt70WmRu3OvL/46qjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771943377; a=rsa-sha256; cv=none; b=HUDFON6rBbfBycpWqdsspEp2rylEhrTUusgy6t0XQLQ5ERga5axVgglyatEu4PT8pLApZC vygJWFK6xZo6PbDI3527GwBUr0VCjA0AHdzJEggA8vGdibdyrKQNr5516fKCmVev0NTOfP S96n8nad047uRfJonfG6uKC8BHsoCXzzv0LgFTrbfTt4GuUZ96xryK5UhQm1AnPGpozO0Z U6lqGMKJOFQ1fiYPsrfylNYNgHuWBfULJqCsEwfiNmX5JfVGXiVnoj9Q08Bm0kbwipvhql 2aTIwUJHWnENKfQIoak1NZsAXKYMha0va8H3ljdEflXLT7LOio8uERvRzo0Mog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771943377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZlGxSzDoEVk6OnAAFMvDo9XXJXYmgA0kt++rYgmbVgA=; b=LgSzZPOOkG27ux+MKnyybvplZucgZ6SVckhGHy0D9SIxPXubBrlAxaK314FJPg98o5aihE lN8Gyy4P4v/pVmjlus1+xRlfvbDgMC+ULQM8fx+KpktM8qtU07NjGN4nAtxQCoq4AzsBQE lAGUkRaDImTvkWWJjgdCBD8Aj4Y9g3ZYePVbmD5xlC4vGrSuja4ASQuTk6TkK1C0VRrKVh DBCvxZlGlit6xW7UUJVUepC8BGDqIb65qoaO/UL7An64aVbyprTHYaGmIld1MDYzSOqd0z y15vqTsk6zJ83TWE/tLcYmhUMqsZuYxJSRpIUrPyFDdeKrhvRqrN8BhApHNmaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL0V903gxz4R6 for ; Tue, 24 Feb 2026 14:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1c45d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 14:29:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: David Marker From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 9ed56cd8d692 - main - ngctl.8: fix incorrect synopsis List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9ed56cd8d6929e3ee733e1e61d2e0c6b81122983 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 14:29:32 +0000 Message-Id: <699db5cc.1c45d.3b7f09bf@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=9ed56cd8d6929e3ee733e1e61d2e0c6b81122983 commit 9ed56cd8d6929e3ee733e1e61d2e0c6b81122983 Author: David Marker AuthorDate: 2026-02-24 14:27:52 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-24 14:29:01 +0000 ngctl.8: fix incorrect synopsis Tiny manpage bug I caused in D50241 I left a line in the manpage that shouldn't be there. MFC after: 3 days Fixes: 72d01e62b082 ("netgraph: teach ngctl to attach and run itself in a jail") Reviewed by: des, markj Differential Revision: https://reviews.freebsd.org/D55485 --- usr.sbin/ngctl/ngctl.8 | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.sbin/ngctl/ngctl.8 b/usr.sbin/ngctl/ngctl.8 index 63b8f58ed3df..2fb22fd59646 100644 --- a/usr.sbin/ngctl/ngctl.8 +++ b/usr.sbin/ngctl/ngctl.8 @@ -44,7 +44,6 @@ .Op Fl f Ar filename .Op Fl n Ar nodename .Op Ar command Op Ns Ar argument ... -.Op Ar command ... .Sh DESCRIPTION The .Nm From nobody Tue Feb 24 14:49:29 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL0xC3lrtz6SDBG for ; Tue, 24 Feb 2026 14:49:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL0xB6tfvz3XdG for ; Tue, 24 Feb 2026 14:49:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771944575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0stQO3jGYf6rDjT4j6W6yj4RaKvRbE1z6/QXouJyTjc=; b=T06FomlC/MbU4NjR2DZQZx7i8aAmalBnXRAA8fHtUaawvIqpE52wvbbrcE7eT6cuEV6QFz BIHrY9oOk/PuC7S61TFvFiW3wXSTD1JxF5ZbWNAg8B4NaXX54DoAC2cc2qP2TXDKn66wDC xMB6Oj90ZXsUFIS6RVKpTtHMq3S0nyxWljXKRJMaku/9qmBVHMRVeVjmfP0GjmeCa6717W q2ScoQfchaRCSd1vEQ6lvV88lFj8pd4mtMNIRiwrBqvc3m/d6uu9iGcHbOtMqlTXlsVrE2 cu/CNGr2dhaG9HZ5LQrwh8/pkNEr0teon9zU3II+oBNrv2smZgP6H5viG/jMAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771944575; a=rsa-sha256; cv=none; b=fDhh58oThpbUnnm/jN2HeBrVtABe2WWPUup8DP7X3b/63+HdqYq2BXYNPHleBkarzpl+aZ GsA/6dhXgAgCZwwqJo4y3E56UIGdfy3B66uRIgLAMaQxbtfpIncNHAoH5+CtCCf/O352xW PflXKEeLKzi94BjjeRwbKT6UMRfuGua8E6d+X/Kd4tV2HmBuKlB79xm/aOg9rwtKXJ+hQu dSH0h03+relrWHyuDAtubT2UaNMYMsplE5sjPl2+sCcL0jGNOQJfRTLXNde9Nd00Rxl7Q7 dTCcgK6C88tQ8xLLaOj5NnhmWk80oUCV9MKZ+5kLmcbwlVKBZvg65H3n6F0n2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771944575; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0stQO3jGYf6rDjT4j6W6yj4RaKvRbE1z6/QXouJyTjc=; b=LFVHKYyXTbfyaswaAI8Wg9tDaVJVtvbjgbQ0SWrHif675uX4GcRKgkqGQJvx0D00oD17SS sUZ6f12Wgg0uO8Ob5jTuru7EZUc1HA+iYSkLaAL9HCAOouWFHaDnVj2RJjdEPEf9IM0d8b 71ZSJVbchkj8v2BqJ/p0U21UOpRvr+G0XhhLWVWQUbyrhzLGnJRVa47xjgQkH7yACxW+b+ sQhHki3HCC1ya8mbqTfLV6MWHYqtzqrUGyPb3TlCNS928HXL1SgcGVQWvTc8v0DTYUaeus 2lBsIOG5uwbF8SFPN0zH+uwVmKVVc/WiHXY1Jw64e8G1Mgo89K1VoE0hsyCLRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL0xB6PrGz43g for ; Tue, 24 Feb 2026 14:49:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e1c3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 14:49:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Dmitry Lukhtionov From: Ed Maste Subject: git: f4f9054dc47b - main - camcontrol: Print 'transport revision' List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f4f9054dc47b430872d38c7a75fea753c6fe796f Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 14:49:29 +0000 Message-Id: <699dba79.1e1c3.76bd3c1c@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f4f9054dc47b430872d38c7a75fea753c6fe796f commit f4f9054dc47b430872d38c7a75fea753c6fe796f Author: Dmitry Lukhtionov AuthorDate: 2026-02-23 14:42:59 +0000 Commit: Ed Maste CommitDate: 2026-02-24 14:48:58 +0000 camcontrol: Print 'transport revision' As described in Serial ATA Revision 3.5a Reviewed by: mav Pull Request: https://github.com/freebsd/freebsd-src/pull/2044 --- sbin/camcontrol/camcontrol.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c index c2deafbd81da..7ad177c3e4b6 100644 --- a/sbin/camcontrol/camcontrol.c +++ b/sbin/camcontrol/camcontrol.c @@ -1674,6 +1674,35 @@ atacapprint(struct ata_params *parm) } printf("\n"); + printf("transport revision "); + if (parm->transport_major == 0 || parm->transport_major == 0xffff) { + printf("Unknown"); + } else { + if (parm->transport_major & 0x0400) + printf("SATA Rev 3.5"); + else if (parm->transport_major & 0x0200) + printf("SATA Rev 3.4"); + else if (parm->transport_major & 0x0100) + printf("SATA Rev 3.3"); + else if (parm->transport_major & 0x0080) + printf("SATA Rev 3.2"); + else if (parm->transport_major & 0x0040) + printf("SATA Rev 3.1"); + else if (parm->transport_major & 0x0020) + printf("SATA Rev 3.0"); + else if (parm->transport_major & 0x0010) + printf("SATA Rev 2.6"); + else if (parm->transport_major & 0x0008) + printf("SATA Rev 2.5"); + else if (parm->transport_major & 0x0004) + printf("SATA II: Extensions"); + else if (parm->transport_major & 0x0002) + printf("SATA 1.0a"); + else if (parm->transport_major & 0x0001) + printf("ATA8-AST"); + } + printf("\n"); + if (parm->media_rotation_rate == 1) { printf("media RPM non-rotating\n"); } else if (parm->media_rotation_rate >= 0x0401 && From nobody Tue Feb 24 15:16:03 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL1Ws3xBqz6SHS5 for ; Tue, 24 Feb 2026 15:16:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL1Ws2hF3z3bkS for ; Tue, 24 Feb 2026 15:16:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771946169; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=umiwpMs2n/SUCd3etabwJepLhA6CKjqXkYYCAFNNzeQ=; b=Fhzy9I7pRxyjtkAxJQEzglqPAjm2UKk7+k8w6mVELFY7BCRl4WxpVS348hTfx1Ttvln0xP oQbNtHi2Mc5f12irQ58ZLE6lHynSoz0odAwv14teKjai6gt1/r5r5HMtRZAw8l3UOu3Jqv CmJ3eRsQ8yF+iixKDAH9etXkmOsJCuC1QodJKg8d5NuOekOb6PRKpxMRuzGAxqshTcrJ2+ AE93uPv6tUyzEAsgL1VkUgiq5UeN7H0+7s8jZ9YX39g28mWuahat9+T0l887LusvshBirp efiK/TmxCwjx+iGOSGs+evT0pSGiF03wbjyzkKevyb5Y5KY0jPbtkr83Pcf64A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771946169; a=rsa-sha256; cv=none; b=avWKVHRLwi5yopmvLUnO1dLfLu90OmSiDBDcGBCmZnJ9/JHz98a3Kbu/V0GKJLseyCRei9 tz10mix2oU0QdLgkDn5X89Ci3HhBT7Qhivm2qpapCuZH5YEHm92pXnL2gKWGX6IIKW4z0d o+Q2jDfVmhYeJvJy4P341+R/SDjOln6QE1PIYZskcHYYxA5Xp6MQSD2Rrvdj4QMQtWgxfK WSfKae0MZu/irpfKgbJbI1Z6/1SOEO3WYpTcRzw+7Mvj1vBZYG4zFok0V/+3YspV4WH3Al q0zzxOp2vDHCQ7g33B+hrUfuiCAS0s8hFlbv8+d97nRdfVlSCMhlpUVMdB+I6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771946169; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=umiwpMs2n/SUCd3etabwJepLhA6CKjqXkYYCAFNNzeQ=; b=l/sy1ss/mdUlCe3tWrVKs4Ln+bCejXKJIHkX95fQhALaKq8kxw/AdGTlqnQg5wjniFYyf4 bsMc94PKZIvo7ctcPWZuhq1z7mRnPnfmPkrpFaSUnsr5gcf0fPAl9S3L+FnChnAxEN/QpP RS1XfliUKISnznJwaBPswEW0aAvURgAEc6nZRDyy2PiZWoHsyu8ZcI7T9rriV1P/QllHJs kwUIgudH8eEtPKrBck0KQ/MssDWMkjRYneyE9UDPDDZv/7EPP24bKi9mhTelMURC7D3UeG sp7wsX9BSkzlBIOc8ehqcvRTrwhLQx2KTdxw6/tkCr4wXhM1fUqysTktWIF/EA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL1Ws2FJsz60p for ; Tue, 24 Feb 2026 15:16:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21550 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 15:16:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: d7d4da91de20 - main - bhyve: Fix truncate_iov() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d7d4da91de201841c57a6b8f89b450754b9b8696 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 15:16:03 +0000 Message-Id: <699dc0b3.21550.38192579@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d7d4da91de201841c57a6b8f89b450754b9b8696 commit d7d4da91de201841c57a6b8f89b450754b9b8696 Author: Mark Johnston AuthorDate: 2026-02-24 15:14:39 +0000 Commit: Mark Johnston CommitDate: 2026-02-24 15:14:39 +0000 bhyve: Fix truncate_iov() The implementation was simply wrong. It would always just return the first entry in the iovec, even if the requested length is larger than that first entry. Note, this function will be removed soon, see D53468. Reported by: Vinod p n Reviewed by: des, emaste, Hans Rosenfeld MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D55438 --- usr.sbin/bhyve/iov.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/usr.sbin/bhyve/iov.c b/usr.sbin/bhyve/iov.c index 5ebc426227a6..2bad55267ff3 100644 --- a/usr.sbin/bhyve/iov.c +++ b/usr.sbin/bhyve/iov.c @@ -81,19 +81,14 @@ count_iov(const struct iovec *iov, int niov) void truncate_iov(struct iovec *iov, int *niov, size_t length) { - size_t done = 0; int i; - for (i = 0; i < *niov; i++) { - size_t toseek = MIN(length - done, iov[i].iov_len); - done += toseek; - - if (toseek <= iov[i].iov_len) { - iov[i].iov_len = toseek; - *niov = i + 1; - return; - } + for (i = 0; i < *niov && length > 0; i++) { + if (length < iov[i].iov_len) + iov[i].iov_len = length; + length -= iov[i].iov_len; } + *niov = i; } ssize_t From nobody Tue Feb 24 15:18:15 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL1ZP1GG0z6SHTJ for ; Tue, 24 Feb 2026 15:18:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL1ZP01S2z3c6Y for ; Tue, 24 Feb 2026 15:18:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771946301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=71d4M9kThsnG7W7/TKJnOJx4G66BJxX70BUafF/Lz8Y=; b=GvdAzMFPgPURd7eWDoht0mVjxZkhk0B3mAF1nK/mCXSX9VvFUr9KZTWKkrV4s3YkfH87+0 JoMp03JphbYppaENuej31s+WSHtWO/ft2zbr6SjtO6Wg7aZaq6GDs5JrgrVSsizGBPOP+x vyJhJ0MYibB++mCNvzz5Iae+kWThutF9YMH9C+Ei7hvEdm19J0hEIlGp9g5TS7A/dTuQAT 8BZf2+llKbt0ltueLLhBpOoOwGkfrOCRWq1yI87aR9b1k9gVsF8Rgfendxh/YxRk+W9Z2P FMCQAqD7yBopC1yo1Y09Kif/YGQ/i+F2gwIMKhORVVFh1ZVeS1PEXBBJWQ03iQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771946301; a=rsa-sha256; cv=none; b=UxhXHKWIPyZmyoOACozDJ5y8+Pk9VolQKy9NLSH42+0l3JxmiKofjwy89CPb9OoEO2bxBX v3eEM3g+5P8OKPDPYDkkP2Es5UwDAx8Bsx+heRjHBopePI1oOogCIn27mS7vp9rlOg6Ig/ /JH5EWkAuFrU6CIpSzk+0BSbFOf/APZ4EXtyIR3M0k5v3h5FIVC/O+lAOQrB2EgXwFci99 i/PyjdvPsC1ieAACUWK7Pr2pKXyle8ClhQxBbQCZqyx1LrhyW+X/FyNv8BcAFxDJo6/A3W tyFTG8+xnnUBbupMlof8Vsr4ZKef81kBfwozhh/6iTqghwB7B0X1q1wdFjp53Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771946301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=71d4M9kThsnG7W7/TKJnOJx4G66BJxX70BUafF/Lz8Y=; b=jRofLp/UxoAGX2XB0gWnOOIm0q7TOQUlU7LcNqXAcJ3ObnVDJHXvSFeO+3l/3j6mlRNxKy cGg2DkUrfGeAy8PEE6wi4ufRd2gD8ZJpik4YhYsWC/n7ZXgEWt+HJJ4iq96kZZw2SZQ7/R khcTytV/GYFj8DKy/bY0jjeNNMg/Ahve6trq2tcEL5Q5Um/vp8M3y5UbGuhPLhRU5HV1sS gCBsoYjijEC4dXTgJwqfUKKDPN4cEeXHDcu3j0YUWc7LIE4VKUmiTrptLBlJFC1uAJDyMy lNHuF3VgdgbDXZt6x75pLkwKXRqnlR5aAJxiPgnYP3URXeAeoR9u/aK5nE9e9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL1ZN6Wbnz5Z9 for ; Tue, 24 Feb 2026 15:18:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22690 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 15:18:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 0ff08b8c402b - main - elf_common.h: Sort SHT_ entries List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0ff08b8c402b3c555125e4c72df0b80b4d084d56 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 15:18:15 +0000 Message-Id: <699dc137.22690.4273b464@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0ff08b8c402b3c555125e4c72df0b80b4d084d56 commit 0ff08b8c402b3c555125e4c72df0b80b4d084d56 Author: Ed Maste AuthorDate: 2026-02-24 14:26:55 +0000 Commit: Ed Maste CommitDate: 2026-02-24 15:17:48 +0000 elf_common.h: Sort SHT_ entries Reviewed by: jrtc27 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55488 --- sys/sys/elf_common.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h index 353ac882350b..42252d2e21af 100644 --- a/sys/sys/elf_common.h +++ b/sys/sys/elf_common.h @@ -470,8 +470,6 @@ typedef struct { #define SHT_HISUNW 0x6fffffff #define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */ #define SHT_LOPROC 0x70000000 /* reserved range for processor */ -#define SHT_X86_64_UNWIND 0x70000001 /* unwind information */ -#define SHT_AMD64_UNWIND SHT_X86_64_UNWIND #define SHT_ARM_EXIDX 0x70000001 /* Exception index table. */ #define SHT_ARM_PREEMPTMAP 0x70000002 /* BPABI DLL dynamic linking @@ -512,6 +510,9 @@ typedef struct { #define SHT_SPARC_GOTDATA 0x70000000 +#define SHT_X86_64_UNWIND 0x70000001 /* unwind information */ +#define SHT_AMD64_UNWIND SHT_X86_64_UNWIND + #define SHTORDERED #define SHT_HIPROC 0x7fffffff /* specific section header types */ #define SHT_LOUSER 0x80000000 /* reserved range for application */ From nobody Tue Feb 24 15:30:07 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL1r01g2Zz6SK9l; Tue, 24 Feb 2026 15:30:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL1r017CWz3d5F; Tue, 24 Feb 2026 15:30:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771947008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=seljLdEbIHfM1rOHKrxpW1niy+C6XdPKnaLZnhnBGv8=; b=DPhxpze0elquFGtRQG9Kmsb0NjlISNCdI4D9KtDXUrE12IaDkGPs9Sn+jxrb8AJ8QqeXzb iFy+9zaiTeT5oKm+uXfrosZbdie5+CeXZGSEkbfUa4A3tuaYDWsAG30OfH7D94UikEFjFs 6rrU7SXlIxW+z6LDj9CHW/mMG5NruMFMorBD513b32uuGS2kfYRzLoETeAvWjFzM/+UEUw /QpZd/kdluhsayQXGEPVUULe+lsqBsWUf5gxDF25kK99QEFzARUvNNF++fE8/3uOgiowM5 WlONtok8aNxx3Lkk+RyRM2/atuwI4FG3a81xsiCVlEWDGHNFpUysfSygW4XyRw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771947008; a=rsa-sha256; cv=none; b=o2EP3630SfLdtYbzdyo6+Es9c+Gfx8P+Dz3bgcASHUhfdWgJx9AL+Aem/sZ4ty3hQxA7w7 TqJiRzdbLPfVWMTxUMQQlaY/OhYZKJPx31Xe7MNcx12D0DkrKRbpAWKndF6V9hnxOeK4LC iUyyB36rcSoqO0THsIRvaOE1b8JtxS0TbCTEmVLVpKLqrnHabH9Pvby1mwxyWTbuvXAaYb p29cNa943beiUX0Qq9pUA9SjCsc/axExlvu+b/P5qtShf0fb3DP+GPFsn0KRanTvQ8JYW7 7t+ljC8En+8/5V9HBeCp3kxf3H7jwrPHnF8m3j3pPbwItXwHPJ2L/JUjUcujjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771947008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=seljLdEbIHfM1rOHKrxpW1niy+C6XdPKnaLZnhnBGv8=; b=L6AZ58p48ljwtybi48UTk9huXcSaM0eaVYnY3aOZ3+kcaTOQgWAm18Yt15oeSWa6yTFYPM wzXT4tNLmMQSFBlHsowYopkcsfU76QLd+jB+AbNM5Se8NBfjXl/JhslFAuDAHnQokseZQO lxdwgDw+IKt3iyeDHpRNjZonVpTBZyjqWHNOXzMNxclV03C/Qsyqccks9eWPaUEcbr3M5Z LpAzJ2aZFE+OXv97wt2GW07YD78cfSzZShCU02cfjTvgdaF5Rp6o8a3PbquC4ENqRjCF/9 O6cXnn9wy7W93DGwRu6hT8XYrQzGbooeemp3RI9p8yEJVGV2St8zRsJfwu94bA== Received: from [IPV6:2601:5c0:4202:5670:b946:cabf:47b1:71cf] (unknown [IPv6:2601:5c0:4202:5670:b946:cabf:47b1:71cf]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fL1qz61ngzqsj; Tue, 24 Feb 2026 15:30:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Tue, 24 Feb 2026 10:30:07 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 887f0f125fd1 - stable/14 - Revert "GoogleTest: import 1.17.0" Content-Language: en-US To: Enji Cooper , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org References: <699a9186.32e99.543fe4bb@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <699a9186.32e99.543fe4bb@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/22/26 00:17, Enji Cooper wrote: > The branch stable/14 has been updated by ngie: > > URL: https://cgit.FreeBSD.org/src/commit/?id=887f0f125fd1282c8054b402ad72af371a9f5dec > > commit 887f0f125fd1282c8054b402ad72af371a9f5dec > Author: Enji Cooper > AuthorDate: 2026-02-22 05:17:40 +0000 > Commit: Enji Cooper > CommitDate: 2026-02-22 05:17:40 +0000 > > Revert "GoogleTest: import 1.17.0" > > This reverts commit 227baf32d26360137492b108aba06c6a54c0949b. Please include the "why" in commit logs when reverting. I (nor any other readers) have any idea why you reverted these commits. -- John Baldwin From nobody Tue Feb 24 16:00:00 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL2VZ26Bdz6SNt9 for ; Tue, 24 Feb 2026 16:00:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL2VZ0H6Rz3jdr for ; Tue, 24 Feb 2026 16:00:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CJud7bP+Tdxn4xyy+K2ev/nRrLNA63tyRiPmnlpX02Y=; b=oBISOGMBHtB6C9I90hiRIazGh/uhSRR2HYQSq4XrBEpEEXVfijC4TXg6CQe5aCz2Rk24PI +nx23GRfvmvBZAT0b16EG4KB/aAKbzwJDuBFHmDYtrfOIfGFS8W7iFBC/dpvGgI67BH/ow 9z7BYe/+eA1dAvTpjBxwl4g2WG+VuUwPXwJ/2aUTlcsA39RzGsr3qEiZhfpF1zH9Yu5uzD TbtCyYjKbPJeXZucVm0UZQ5RQZvHoWJf9AUY5Eyu18IKzJ4XolywgFA4nQlSnvkeXCCh9N gx5NYl9VMlNVzS2YjWKqvSti10YPL6lF5qalf1fIol/Y4LtoNwPmlUIZKH2bbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771948806; a=rsa-sha256; cv=none; b=CLEWJS4uObGYOk/ZQHTgltKeCm5HSUFrG/KRajt56wsWkoIcbOf6ecBKpi0hL2WZBtkd1F ac7aTKoe47ol4aKP8NtzaY7N5gM/NoZOGHO2mZ5lAmHwCv9XE2pGInx5Lz5bpLPuEzm2co ou3+daIC6XcyXV3FzDNUdf0KFQnEQ0fVlRBNhatHQMeR55hMxGq5ndgsgmyTYSbD2mVzkF +4uyU3tbffb/02djTbq+O1S2LOL3TvZNJ7txcJDqzJwGJmetR3eeOz3WkHZBUV+PrMInAX uKzVPZUl/tqSwjs++5ifm3/ISN4TWRhOzsRBwkCnYJi/lStpvcFtRyxMotg4fQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CJud7bP+Tdxn4xyy+K2ev/nRrLNA63tyRiPmnlpX02Y=; b=JDAvbQNII9fU8cM/OMeBj+QjMUnwkmkx/oITuq1ykOPBS8xKVwObJvNMl9FI5huzLJeFCU ZNgWlJL41mDhWDwxOZrqHBRnGXF3rW6HQ2ET9rtWwdyOzYUCCsyyZuIBHYPyq/fsETOF6O Lt6Z95V/Yfe0S6VmpJqUQh3jkMgmKfNlmzukrH8MVzwi0HevX4Bfm5m4/TiRvp5Fxy7hq4 DieTvcNkOdLHuW85NGh61Vt55r8R6qgih1IVozU6VoShb8aV9V3abZR8XiyTA5ItWEXSC3 ZVg+CwlXej2xuLNu3W7oacg5grxT9KV2OMc/fJTjVksQmeW5wPrQsuPys9ndhQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL2VY707zz6Sw for ; Tue, 24 Feb 2026 16:00:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26afa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 16:00:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: f3be7df50f01 - main - rtsock: Fix stack overflow List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f3be7df50f01d9a6ead9f27b55bb4dfd7dc4f9d2 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 16:00:00 +0000 Message-Id: <699dcb00.26afa.1fe11e3c@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f3be7df50f01d9a6ead9f27b55bb4dfd7dc4f9d2 commit f3be7df50f01d9a6ead9f27b55bb4dfd7dc4f9d2 Author: Mark Johnston AuthorDate: 2026-02-23 15:52:50 +0000 Commit: Mark Johnston CommitDate: 2026-02-24 15:58:48 +0000 rtsock: Fix stack overflow Approved by: so Security: FreeBSD-SA-26:05.route Security: CVE-2026-3038 Fixes: 92be2847e845 ("rtsock: Avoid copying uninitialized padding bytes") --- sys/net/rtsock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 774537366910..5251d4d75f15 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1875,8 +1875,8 @@ rtsock_msg_buffer(int type, struct rt_addrinfo *rtinfo, struct walkarg *w, int * #endif dlen = SA_SIZE(sa); if (cp != NULL && buflen >= dlen) { - KASSERT(dlen <= sizeof(ss), - ("%s: sockaddr size overflow", __func__)); + if (sa->sa_len > sizeof(ss)) + return (EINVAL); bzero(&ss, sizeof(ss)); bcopy(sa, &ss, sa->sa_len); sa = (struct sockaddr *)&ss; From nobody Tue Feb 24 16:00:26 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL2Vy3GGfz6SNx8 for ; Tue, 24 Feb 2026 16:00:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL2Vy27vdz3jkm for ; Tue, 24 Feb 2026 16:00:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QO9SW4iFVDhyTVj2F3RREooNiVUGsprln0x3RPjsA+g=; b=qy8qjnxhIqVCDJd5h2lxWjuFZM040LwZbdQF/DSvOmzXDaxFThMZKTsKZeMovciXlhSwOl X/T/pyf2A/CLvgCWqx1pqkbFJJuzx+n0gd4NUswDVo4A4emWetgvwLTBo0edZfkFvb3IJK 3/sIesdXYLfb3XEfgf/SRclj+G38qd+V3ahGijTK8EaH5XvHwEsJTKEYV89JWogGs4yc/U NMsRyf2mPzYZYdp95S+9ubsn6V5HKZmF7n+qJEfZ0fvaF2cMVjeiaBRzq4DlA7+ihlEH7v b47d4CHLPC1KvzN5+WnMPpiFQ8xUV8F+MESdpR00CUNVUI1cR25U2w+Thsa15A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771948826; a=rsa-sha256; cv=none; b=F0ouC1LhZBmzDOC5197gCbeRGOt/0J3e30GqYfuqX35zGji1yAJel58jDdy+Iq82mFbht9 o+VCA2bQFb5xkDux6UH6AAlHT8KgpFb5J4HBOPSSa7ZQz7dWF0KyRFo6zYf8fgXqOgvH2I 7s1R5hYuWP2GJyxA3nxvFJSsxxVB4sCst3TYut9SUpLQkabBuEhrGORntwgBqyAGDTz9m5 s0wIWfflR9wtZblOeZZmjc+dDS+2UIkFf1+/poTe8yxpjHxn2pk2admcXCvFmt21L/CnON Wj5HqqfjpcR2MhImJ1cFSEgCFAl1qVSXFp647IKBvSMlHFAiPjm3ZLnKGzNf3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948826; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QO9SW4iFVDhyTVj2F3RREooNiVUGsprln0x3RPjsA+g=; b=jjT5zDbz5KOH4i4qYtfoQDPOpiF06Kejo0BB8OxXO1BGC9h9aQjvUiF0urI6CEhw+qfMxi EFRM/GpuX96XBZmWTfJFWXIH7+B4klzfj8vF5yRpSFDL9KR5eqR9JvekBvCjT8WwhaSKzd JRVGv06fu/8tElpiTC9f1UVCMzX841I87W33bRFsknABrWwoZ10ZV7ATuCXuxhh6Z4f52J 1of/+KBiiTlQP6txY68Q/ZiGx9soRQPIh+hVimUYgXZFoVaiw/xTytVVGZcWDuRUguH7np 4fOGKwTTvR9Xt0OSDzoFD0PtPo6LJjQ68i0O7Fv9+O+/X+JFSroWuZUx9ZU9Bw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL2Vy1Scqz6YV for ; Tue, 24 Feb 2026 16:00:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26f35 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 16:00:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: df932377e7dd - stable/15 - rtsock: Fix stack overflow List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: df932377e7dd7dc536fa14612d9e80aa3554772e Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 16:00:26 +0000 Message-Id: <699dcb1a.26f35.8ebd06@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=df932377e7dd7dc536fa14612d9e80aa3554772e commit df932377e7dd7dc536fa14612d9e80aa3554772e Author: Mark Johnston AuthorDate: 2026-02-23 15:52:50 +0000 Commit: Mark Johnston CommitDate: 2026-02-24 16:00:21 +0000 rtsock: Fix stack overflow Approved by: so Security: FreeBSD-SA-26:05.route Security: CVE-2026-3038 Fixes: 92be2847e845 ("rtsock: Avoid copying uninitialized padding bytes") (cherry picked from commit f3be7df50f01d9a6ead9f27b55bb4dfd7dc4f9d2) --- sys/net/rtsock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index be858428bb3e..de4c3f8c6374 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1866,8 +1866,8 @@ rtsock_msg_buffer(int type, struct rt_addrinfo *rtinfo, struct walkarg *w, int * #endif dlen = SA_SIZE(sa); if (cp != NULL && buflen >= dlen) { - KASSERT(dlen <= sizeof(ss), - ("%s: sockaddr size overflow", __func__)); + if (sa->sa_len > sizeof(ss)) + return (EINVAL); bzero(&ss, sizeof(ss)); bcopy(sa, &ss, sa->sa_len); sa = (struct sockaddr *)&ss; From nobody Tue Feb 24 16:00:39 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL2WC6BNxz6SP0G for ; Tue, 24 Feb 2026 16:00:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL2WC4wTsz3kNj for ; Tue, 24 Feb 2026 16:00:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gIQiIazey/RldZFWKyrpOK2XeJTxud+KgpR5aPGOUmc=; b=wSILS7Lw0n3zQYPw9RGXxAciel8Wa1mNl2UE9jwsXZ6kvtSl2EkUsO8iFL7cG/S/ig+Yev v6hDysHLXdq8K4AXMuT81X4SzfzIvxMy3zeDvbn9JmOVdMlpRXJV6E/OUm+02u6/LhnGpn CJP8vYZZlDsdqJW0htM+cLPAswHKPWy/oGwxYUjAosfblftEk7J1MSHkbABUr3+XS9XnGw XEGcsiXAVyKNZMlLTXpvVQC5pucd0NZDzYBUarpaOhAFb80QK/16pDWhJer0NhZhUTp31j MHQMLSYrZYkBYEBd8kKZoZ3Y2ji+Y+AdvqKlbkCZBSj1xbpUeoIZ6kCS72BltA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771948839; a=rsa-sha256; cv=none; b=Nb7hCFhIQ1w89DwEifaQEMecc4M4qU3XHOUbVNl6RostE2lgEUfrUNzJqQ5aIif+S6MSgq SvFlGDlao9wFGVwxMfQs1GE3Vak+DbV1CzUhohRb6OxGwFR+EnHfP94lgDoJYmE2+aHlZB Okt521fFozC0T7WRNI2xEHGbZoRRWWN0PRorychwl+a+zPuovTjRN+7sbBx2SV7Cyf9hXC 1qAT5dqz4+Zva6ZJHVlhM7DiPajUFgwvcSzJIhtm9SoFUdeJTno5/bCSZIgXS/3wTtHvCD M6Q8VYOtP/mNkdbi7Dqwx+59O/lqd/A4qk07k1F8PZiXuolhmUBE+Zbnv7mlTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gIQiIazey/RldZFWKyrpOK2XeJTxud+KgpR5aPGOUmc=; b=SDV+yoN0oYNL+W59WsNI34Awh4znDFZU2az1iakTHh9vfZSWQgijJWH4KsdbmsI+EFvOJW vwTBJLKmLCKo0d2eEGQvY73w0uSkYqxCd2qOKBLzXF+GQ3gTVaJfUMuR7FBIX7X3fpwLhk 3MRNoHFso0KCPL876vdLduZbdzIKWOBMH7LrTw3qSLJeHJGv4SYCHhPAmVjlpXCFLBew0t /pWuQkQMCJbSWFyRKN8IJpgaKIrhEMv0HgA4fSrC8RxySjdd/xIQnJ355dap1JGm8i4iWg K72a3XFfiWdk9Mc/I3lwJZVMOB+KAOzUePR5/M6siJ41lp5uIxjmzXoqLcvUdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL2WC4XFhz6Sy for ; Tue, 24 Feb 2026 16:00:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27d52 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 16:00:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 5de6a55c70ba - releng/15.0 - rtsock: Fix stack overflow List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 5de6a55c70ba97c9bded822df449228065519ac0 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 16:00:39 +0000 Message-Id: <699dcb27.27d52.51528588@gitrepo.freebsd.org> The branch releng/15.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5de6a55c70ba97c9bded822df449228065519ac0 commit 5de6a55c70ba97c9bded822df449228065519ac0 Author: Mark Johnston AuthorDate: 2026-02-23 15:52:50 +0000 Commit: Mark Johnston CommitDate: 2026-02-23 16:39:42 +0000 rtsock: Fix stack overflow Approved by: so Security: FreeBSD-SA-26:05.route Security: CVE-2026-3038 Fixes: 92be2847e845 ("rtsock: Avoid copying uninitialized padding bytes") --- sys/net/rtsock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index f0dcc973ca7c..42be9b174972 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1866,8 +1866,8 @@ rtsock_msg_buffer(int type, struct rt_addrinfo *rtinfo, struct walkarg *w, int * #endif dlen = SA_SIZE(sa); if (cp != NULL && buflen >= dlen) { - KASSERT(dlen <= sizeof(ss), - ("%s: sockaddr size overflow", __func__)); + if (sa->sa_len > sizeof(ss)) + return (EINVAL); bzero(&ss, sizeof(ss)); bcopy(sa, &ss, sa->sa_len); sa = (struct sockaddr *)&ss; From nobody Tue Feb 24 16:00:40 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL2WD6rCQz6SP2L for ; Tue, 24 Feb 2026 16:00:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL2WD5Y09z3kLF for ; Tue, 24 Feb 2026 16:00:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qEofP36tXCf2kwQT5KnznccW6vDBliUb8BdB42jOoVU=; b=r0n3kCouBRGwVvFPEhy3/9YZTfZIfHfzkPVkN6JkQb5b3PjoUE7kyJWgnY9kgRGNj6u9Io pTU6TFlkR1hJA+4ba21p++zp68KKuGVa/BkbspfhOnI5EzhynBdtBpCCZEr0lO0+GqU7f7 nkAZwtMae8pZ9+EyAD8lesqe2tV4YVBP47Mu8E/XgxTfrEU+rL/lBG82axaFhoN2jLdpoI FlWglQkw+fj8gwaufiSAxh/CLV5QdoOShWcAO0znf59FuCc2h7xFFfNUB+8tSMOS2ET0Ab 1DOuZAHUtEY7LjGmZs2HnqQft8W+4mJGIbAiLcfz1M2l5dWvAT1FmaZvMYqugA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771948840; a=rsa-sha256; cv=none; b=btENvxpws6Ss2CZwU3WK/aJG2Wv/QP6wDMAL+psu+icB286V+MoE2YqdcElrJdjqMbGYlM vaSqDLIY6Ern9ey/F3ak6oN3RZhlf7fN1ABax2EIK9uQazTpRH7O/MxIXmK32jAerIodtP oXjSAQe0qHpIiul6ips/0CwNs0RQKvslL2nww3PwzV7Yd3JETI/dE9p6ftZMi+fg/UTCOd 8UfTNW5AUkD2lbbTV1nHcJVzcywErk4/5U8udUfauu9MwxoPg2lMcM0krcYDL67QQ+OH2J 7Ltc44HqMdVbspzkLfekuZd0nAyhKFs5Aktzm+IZYQaIRptcLW0kgaSqeXTQWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qEofP36tXCf2kwQT5KnznccW6vDBliUb8BdB42jOoVU=; b=JpdBNt8UY8aSH9XbzOYCVONFRIQMAZRRW8LNp4Ois1URkO3riouEhHviMaYyEi46mfIRwo OgF4Mj/O2Sd5FVVwd6Fbzr3FJ7HroBUY1H0uGxmSA3CjmD6eC+6t6LZox11xk5eCxmcfD5 cDuvr/e9NcaNmYk6hY4y+BFeOzdrKtJE/BXNy1EtYkQB8COFn2jbhQr3gkg6h+To7dfy5L DZ9f/IWzC5u1rfwDw2+Bz3qEGMTARMcHB6tQdwwmAwmeKiiatOPk0PGUaeG+YBAhA8bGPd eeoT8gf7K5QaSk8kSmoiFctIjV1Sx9pMNzGz733xwJbp0sji+Ym+QGtx0T+jug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL2WD51ccz6wh for ; Tue, 24 Feb 2026 16:00:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 275a8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 16:00:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 8ef0ed690df2 - releng/15.0 - Add UPDATING entries and bump version List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: 8ef0ed690df2dca0cc22b827819d112f868470bb Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 16:00:40 +0000 Message-Id: <699dcb28.275a8.30f6d984@gitrepo.freebsd.org> The branch releng/15.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8ef0ed690df2dca0cc22b827819d112f868470bb commit 8ef0ed690df2dca0cc22b827819d112f868470bb Author: Mark Johnston AuthorDate: 2026-02-23 16:40:58 +0000 Commit: Mark Johnston CommitDate: 2026-02-23 16:40:58 +0000 Add UPDATING entries and bump version Approved by: so --- UPDATING | 5 +++++ sys/conf/newvers.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 086c4b8e2892..6fdc5195e4d6 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. +20260224: + 15.0-RELEASE-p4 SA-26:05.route + + Local DoS and possible privilege escalation via routing sockets. [SA-26:05.route] + 20260210: 15.0-RELEASE-p3 SA-26:03.blocklistd EN-26:04.arm64 diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 3132de9d99cb..3f0163ecefe2 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -51,7 +51,7 @@ TYPE="FreeBSD" REVISION="15.0" -BRANCH="RELEASE-p3" +BRANCH="RELEASE-p4" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Tue Feb 24 16:00:56 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL2WX3818z6SP9Q for ; Tue, 24 Feb 2026 16:00:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL2WX2Fwkz3l8p for ; Tue, 24 Feb 2026 16:00:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lj+XbCafwQpq+j1oZfBnEdShbZL2aedW8AjXagZcURM=; b=T88gAoWVj22FWKSDOzqjgmOASKmsz/X2kGUEtXjbaeo174njwIOql6jmMjheGQQ8B1LCUv x974o0pfsphYGis6CWyI/KCMKQ5Jdx9rECuUNYkYXmdiT6toepGYPHH/Ctvx4eyJf1icus m/UEjsuq7fDCZkZmCcmidjLkU7hCcc12UhC+kxvivoCS8pO3oubgVSG3NQTFFs2a1aXaZc nd7Tdhq4i0xeYiSh3/izZfS6ZzMWnuimMBRy8SZl0Q4Wn0OdVE6Cp5bUxJrkkVe0zLIGVW TfV5YPgoMeHp/2QtPFFFiI3XKM5JVOpYy0QVIUwOx4l+4fOv60UPjXO79EjtKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771948856; a=rsa-sha256; cv=none; b=oE+SJwcZKjAyMdvOSpZbxflSIYWcXgXsmMmukFy3oCRDm9teFYF57rLeZzhit7h9MNFpAv BZV5Ok+x0XyC11Q0nQrME+NCmznzicd+z3UO6lK7g0BM+o6QSJjKc2qclRx0C8FlQcqSTx X6rtEVe2vu/EAA6rsjSnBBtzUk0ml4A+NvlTNeZ7jqrdvkyZTCFA4PpXcPM3UXcIveyRqM IxOuuzfMCGBRjY674XtwbZ9zqi6PSMObYQVrRd+KwGUMTkX0KAd9jn/SyA8CjkUYo+rtQ2 /U0b2z/VXprQbN9Dm3LFfpiIkt+J6xZvhh2ou1LKgmbvBJGOYeryLOqyAdkn7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lj+XbCafwQpq+j1oZfBnEdShbZL2aedW8AjXagZcURM=; b=oJ1cmbn48e+ghe3AAnkW4dVieuP81Ws9Fwx+Fm36n1OOsqTk/nBnHgzbXJZu7AcUq1ErOV vw9phUYbM/p9HVcQbnWkbFJcojqOL5hbUhNxrvC07UVSbVIfs+/OOioKgC7f5cMqRm6vBu G1l0kVl+CK3wowdAWkcnPhMdJ99Y/NQehTjHbUTbOvgC5uLl6W10/4TjhhotrItq2eXxlw FTjkCyQIGWDHJ994/lCaCDrJoPXt08sg244IoaLv4RiMfa978/7FMx4vzbsveUC+RPDcNz NzzQuhBrw6twFVhTVJ5GDqpd6un8c0EO7NTzcn0GU8kdjLvlZuKO/zii20jifQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL2WX1lnVz6nM for ; Tue, 24 Feb 2026 16:00:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2744d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 16:00:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 1eb2beb3686c - stable/14 - rtsock: Fix stack overflow List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1eb2beb3686c50a870ed7688f753f89dd0f0ab3e Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 16:00:56 +0000 Message-Id: <699dcb38.2744d.78c96b37@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1eb2beb3686c50a870ed7688f753f89dd0f0ab3e commit 1eb2beb3686c50a870ed7688f753f89dd0f0ab3e Author: Mark Johnston AuthorDate: 2026-02-23 15:52:50 +0000 Commit: Mark Johnston CommitDate: 2026-02-24 16:00:52 +0000 rtsock: Fix stack overflow Approved by: so Security: FreeBSD-SA-26:05.route Security: CVE-2026-3038 Fixes: 92be2847e845 ("rtsock: Avoid copying uninitialized padding bytes") (cherry picked from commit f3be7df50f01d9a6ead9f27b55bb4dfd7dc4f9d2) --- sys/net/rtsock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index bc70c600e3ab..e3116b8ee4b5 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1851,8 +1851,8 @@ rtsock_msg_buffer(int type, struct rt_addrinfo *rtinfo, struct walkarg *w, int * #endif dlen = SA_SIZE(sa); if (cp != NULL && buflen >= dlen) { - KASSERT(dlen <= sizeof(ss), - ("%s: sockaddr size overflow", __func__)); + if (sa->sa_len > sizeof(ss)) + return (EINVAL); bzero(&ss, sizeof(ss)); bcopy(sa, &ss, sa->sa_len); sa = (struct sockaddr *)&ss; From nobody Tue Feb 24 16:01:29 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL2XB2FWWz6SPGd for ; Tue, 24 Feb 2026 16:01:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL2X96YNsz3lHF for ; Tue, 24 Feb 2026 16:01:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V+eFa19f4OyGc5+UgvarGnrVJKimg9bsUdE930dJGik=; b=cQ3cA9zGsIMmzNKX3MGmKl1qTs6Cr6k9LKdMw6LqdpA2VpBVsPTEB8EZiZAsqbRy1WbcQX ITdMKtc9NOrO6CcNQOVp3oxV648/eJzNrV37wlNTlqwphokuNOKgyb5PqGkvgUGLW7OLrH o1yZI/VRhrSTx67vQFQz8zITwEerikkduhJ2bZmT/eQMCpAO5SPqx160D6GkG2Tl+NPcnG ZQWdktzLaznVq1+czcDtbftqMRsJw+gyV2EqnMCTFKpzDIQlNMfXSy0Wywr0V6pydlX7si r4ZcgcxATNZ5f4htuOpzUgryzCHsRuPIAGqdDO8XzhAkv2meyeDa6vS46AoKmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771948889; a=rsa-sha256; cv=none; b=NtwbSHmNPLxGYbjLE7P8ImP5abwMG9vBUHhK7B8AoqM+/WT+bcH42vTSf0Hx6PnrrMaVxb dn+FZMCUXwI6BdX+/YiJWUtyzeJt1eiF2O+rE8uKyHIjtJO4rrD/1DUTh/41ynhVnJpMcw VyAQ9pFNWXAFSkbVVPPPGmKV12hZec2Da8jHuUyGiSWepkSWOoJhWKCOcdkJx4VpBjLwzt sgtuYLukP2vB3z2UaWqC7s5FCyPnktklz61tKoFhm1wSAQKQKwYoXNJAk0uZ1eLCT5MJsQ uNWp/E4EUCwNaq++BRtJ+gC8o3czFVjkuEh+EBuBgaASSnBMAUigSEd+yabAsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V+eFa19f4OyGc5+UgvarGnrVJKimg9bsUdE930dJGik=; b=XWtu2xr+0baiq9aNw1moJTFJmLljYZ1fUjKhXIQ/EOkvAeG01WTJJzYT4gPQQoOBxKEDbF pscTVBetpXfiuzIIHm6By8jwD2exZaI580XkPQVCzwhPUM1o+7Fz8vHAZSwJUwGmkVt4hR YIHqF3XZ4KSDpfrxCZUHKgURq/cTn/15eRmL8D+9Vlaf3dITDq71NlJzJQaSZFRD6cLPG/ nhzoLwdSF5AuaPPShMf1CdVvC+iH/j2MaX8gCavNQhD4RuRf3RqyeIzUPulJvwfNK+EzSs H/w2S0tgbLuSrslIzjNoXZ7d9KXQEhGuTxE0Umb3/wBtHg4blo5SHOW0fOzAMw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL2X95tqyz75G for ; Tue, 24 Feb 2026 16:01:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27aba by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 16:01:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: aaa0c2247f4c - releng/14.3 - file: Add a fd flag with O_RESOLVE_BENEATH semantics List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: aaa0c2247f4c1466ca90b58650381e318f8be8fc Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 16:01:29 +0000 Message-Id: <699dcb59.27aba.27a83b44@gitrepo.freebsd.org> The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=aaa0c2247f4c1466ca90b58650381e318f8be8fc commit aaa0c2247f4c1466ca90b58650381e318f8be8fc Author: Mark Johnston AuthorDate: 2025-06-24 20:17:07 +0000 Commit: Mark Johnston CommitDate: 2026-02-23 16:00:13 +0000 file: Add a fd flag with O_RESOLVE_BENEATH semantics The O_RESOLVE_BENEATH openat(2) flag restricts name lookups such that they remain under the directory referenced by the dirfd. This commit introduces an implicit version of the flag, FD_RESOLVE_BENEATH, stored in the file descriptor entry. When the flag is set, any lookup relative to that fd automatically has O_RESOLVE_BENEATH semantics. Furthermore, the flag is sticky, meaning that it cannot be cleared, and it is copied by dup() and openat(). File descriptors with FD_RESOLVE_BENEATH set may not be passed to fchdir(2) or fchroot(2). Various fd lookup routines are modified to return fd flags to the caller. This flag will be used to address a case where jails with different root directories and the ability to pass SCM_RIGHTS messages across the jail boundary can transfer directory fds in such as way as to allow a filesystem escape. Approved by: so PR: 262180 Reviewed by: kib MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D50371 (cherry picked from commit f35525ff2053e026a423e852136d73ed93c95803) (cherry picked from commit 10b3f2138573da952b4db29f88f6d67cfc3300cd) --- sys/fs/fdescfs/fdesc_vnops.c | 4 +- sys/kern/kern_descrip.c | 97 ++++++++++++++++++++++++++++++++------------ sys/kern/uipc_syscalls.c | 2 +- sys/kern/vfs_acl.c | 4 +- sys/kern/vfs_cache.c | 14 +++++-- sys/kern/vfs_extattr.c | 8 ++-- sys/kern/vfs_syscalls.c | 21 +++++++--- sys/sys/file.h | 2 +- sys/sys/filedesc.h | 8 +++- sys/sys/namei.h | 1 + 10 files changed, 113 insertions(+), 48 deletions(-) diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index 9c451aa9247a..47fb387a007e 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -504,7 +504,7 @@ fdesc_setattr(struct vop_setattr_args *ap) cap_rights_init_one(&rights, CAP_EXTATTR_SET), &fp); } else { error = getvnode_path(td, fd, - cap_rights_init_one(&rights, CAP_EXTATTR_SET), &fp); + cap_rights_init_one(&rights, CAP_EXTATTR_SET), NULL, &fp); } if (error) { /* @@ -641,7 +641,7 @@ fdesc_readlink(struct vop_readlink_args *va) VOP_UNLOCK(vn); td = curthread; - error = fget_cap(td, fd_fd, &cap_no_rights, &fp, NULL); + error = fget_cap(td, fd_fd, &cap_no_rights, NULL, &fp, NULL); if (error != 0) goto out; diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 8b391da95840..1932336ded28 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -111,8 +111,8 @@ static void fdgrowtable_exp(struct filedesc *fdp, int nfd); static void fdunused(struct filedesc *fdp, int fd); static void fdused(struct filedesc *fdp, int fd); static int fget_unlocked_seq(struct thread *td, int fd, - const cap_rights_t *needrightsp, struct file **fpp, - seqc_t *seqp); + const cap_rights_t *needrightsp, uint8_t *flagsp, + struct file **fpp, seqc_t *seqp); static int getmaxfd(struct thread *td); static u_long *filecaps_copy_prep(const struct filecaps *src); static void filecaps_copy_finish(const struct filecaps *src, @@ -480,6 +480,8 @@ kern_fcntl_freebsd(struct thread *td, int fd, int cmd, long arg) return (error); } +#define FD_RESOLVE_BENEATH 2 + int kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg) { @@ -529,7 +531,9 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg) fde = fdeget_noref(fdp, fd); if (fde != NULL) { td->td_retval[0] = - (fde->fde_flags & UF_EXCLOSE) ? FD_CLOEXEC : 0; + ((fde->fde_flags & UF_EXCLOSE) ? FD_CLOEXEC : 0) | + ((fde->fde_flags & UF_RESOLVE_BENEATH) ? + FD_RESOLVE_BENEATH : 0); error = 0; } FILEDESC_SUNLOCK(fdp); @@ -540,8 +544,13 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg) FILEDESC_XLOCK(fdp); fde = fdeget_noref(fdp, fd); if (fde != NULL) { + /* + * UF_RESOLVE_BENEATH is sticky and cannot be cleared. + */ fde->fde_flags = (fde->fde_flags & ~UF_EXCLOSE) | - (arg & FD_CLOEXEC ? UF_EXCLOSE : 0); + ((arg & FD_CLOEXEC) != 0 ? UF_EXCLOSE : 0) | + ((arg & FD_RESOLVE_BENEATH) != 0 ? + UF_RESOLVE_BENEATH : 0); error = 0; } FILEDESC_XUNLOCK(fdp); @@ -2166,7 +2175,8 @@ _finstall(struct filedesc *fdp, struct file *fp, int fd, int flags, seqc_write_begin(&fde->fde_seqc); #endif fde->fde_file = fp; - fde->fde_flags = (flags & O_CLOEXEC) != 0 ? UF_EXCLOSE : 0; + fde->fde_flags = ((flags & O_CLOEXEC) != 0 ? UF_EXCLOSE : 0) | + ((flags & O_RESOLVE_BENEATH) != 0 ? UF_RESOLVE_BENEATH : 0); if (fcaps != NULL) filecaps_move(fcaps, &fde->fde_caps); else @@ -2914,7 +2924,7 @@ out: #ifdef CAPABILITIES int fget_cap(struct thread *td, int fd, const cap_rights_t *needrightsp, - struct file **fpp, struct filecaps *havecapsp) + uint8_t *flagsp, struct file **fpp, struct filecaps *havecapsp) { struct filedesc *fdp = td->td_proc->p_fd; int error; @@ -2923,7 +2933,8 @@ fget_cap(struct thread *td, int fd, const cap_rights_t *needrightsp, *fpp = NULL; for (;;) { - error = fget_unlocked_seq(td, fd, needrightsp, &fp, &seq); + error = fget_unlocked_seq(td, fd, needrightsp, flagsp, &fp, + &seq); if (error != 0) return (error); @@ -2954,10 +2965,10 @@ get_locked: #else int fget_cap(struct thread *td, int fd, const cap_rights_t *needrightsp, - struct file **fpp, struct filecaps *havecapsp) + uint8_t *flagsp, struct file **fpp, struct filecaps *havecapsp) { int error; - error = fget_unlocked(td, fd, needrightsp, fpp); + error = fget_unlocked(td, fd, needrightsp, flagsp, fpp); if (havecapsp != NULL && error == 0) filecaps_fill(havecapsp); @@ -3040,7 +3051,7 @@ out: #ifdef CAPABILITIES int -fgetvp_lookup_smr(struct nameidata *ndp, struct vnode **vpp, bool *fsearch) +fgetvp_lookup_smr(struct nameidata *ndp, struct vnode **vpp, int *flagsp) { const struct filedescent *fde; const struct fdescenttbl *fdt; @@ -3050,7 +3061,7 @@ fgetvp_lookup_smr(struct nameidata *ndp, struct vnode **vpp, bool *fsearch) const cap_rights_t *haverights; cap_rights_t rights; seqc_t seq; - int fd; + int fd, flags; VFS_SMR_ASSERT_ENTERED(); @@ -3070,7 +3081,9 @@ fgetvp_lookup_smr(struct nameidata *ndp, struct vnode **vpp, bool *fsearch) return (EAGAIN); if (__predict_false(cap_check_inline_transient(haverights, &rights))) return (EAGAIN); - *fsearch = ((fp->f_flag & FSEARCH) != 0); + flags = fp->f_flag & FSEARCH; + flags |= (fde->fde_flags & UF_RESOLVE_BENEATH) != 0 ? + O_RESOLVE_BENEATH : 0; vp = fp->f_vnode; if (__predict_false(vp == NULL)) { return (EAGAIN); @@ -3104,17 +3117,19 @@ fgetvp_lookup_smr(struct nameidata *ndp, struct vnode **vpp, bool *fsearch) #endif } *vpp = vp; + *flagsp = flags; return (0); } #else int -fgetvp_lookup_smr(struct nameidata *ndp, struct vnode **vpp, bool *fsearch) +fgetvp_lookup_smr(struct nameidata *ndp, struct vnode **vpp, int *flagsp) { + const struct filedescent *fde; const struct fdescenttbl *fdt; struct filedesc *fdp; struct file *fp; struct vnode *vp; - int fd; + int fd, flags; VFS_SMR_ASSERT_ENTERED(); @@ -3123,9 +3138,13 @@ fgetvp_lookup_smr(struct nameidata *ndp, struct vnode **vpp, bool *fsearch) fdt = fdp->fd_files; if (__predict_false((u_int)fd >= fdt->fdt_nfiles)) return (EBADF); - fp = fdt->fdt_ofiles[fd].fde_file; + fde = &fdt->fdt_ofiles[fd]; + fp = fde->fde_file; if (__predict_false(fp == NULL)) return (EAGAIN); + flags = fp->f_flag & FSEARCH; + flags |= (fde->fde_flags & UF_RESOLVE_BENEATH) != 0 ? + O_RESOLVE_BENEATH : 0; *fsearch = ((fp->f_flag & FSEARCH) != 0); vp = fp->f_vnode; if (__predict_false(vp == NULL || vp->v_type != VDIR)) { @@ -3141,6 +3160,7 @@ fgetvp_lookup_smr(struct nameidata *ndp, struct vnode **vpp, bool *fsearch) return (EAGAIN); filecaps_fill(&ndp->ni_filecaps); *vpp = vp; + *flagsp = flags; return (0); } #endif @@ -3154,13 +3174,15 @@ fgetvp_lookup(struct nameidata *ndp, struct vnode **vpp) struct componentname *cnp; cap_rights_t rights; int error; + uint8_t flags; td = curthread; rights = *ndp->ni_rightsneeded; cap_rights_set_one(&rights, CAP_LOOKUP); cnp = &ndp->ni_cnd; - error = fget_cap(td, ndp->ni_dirfd, &rights, &fp, &ndp->ni_filecaps); + error = fget_cap(td, ndp->ni_dirfd, &rights, &flags, &fp, + &ndp->ni_filecaps); if (__predict_false(error != 0)) return (error); if (__predict_false(fp->f_ops == &badfileops)) { @@ -3178,6 +3200,10 @@ fgetvp_lookup(struct nameidata *ndp, struct vnode **vpp) */ if ((fp->f_flag & FSEARCH) != 0) cnp->cn_flags |= NOEXECCHECK; + if ((flags & UF_RESOLVE_BENEATH) != 0) { + cnp->cn_flags |= RBENEATH; + ndp->ni_resflags |= NIRES_BENEATH; + } fdrop(fp, td); #ifdef CAPABILITIES @@ -3225,7 +3251,7 @@ out_free: #ifdef CAPABILITIES static int fget_unlocked_seq(struct thread *td, int fd, const cap_rights_t *needrightsp, - struct file **fpp, seqc_t *seqp) + uint8_t *flagsp, struct file **fpp, seqc_t *seqp) { struct filedesc *fdp; const struct filedescent *fde; @@ -3234,6 +3260,7 @@ fget_unlocked_seq(struct thread *td, int fd, const cap_rights_t *needrightsp, seqc_t seq; cap_rights_t haverights; int error; + uint8_t flags; fdp = td->td_proc->p_fd; fdt = fdp->fd_files; @@ -3245,6 +3272,7 @@ fget_unlocked_seq(struct thread *td, int fd, const cap_rights_t *needrightsp, fde = &fdt->fdt_ofiles[fd]; haverights = *cap_rights_fde_inline(fde); fp = fde->fde_file; + flags = fde->fde_flags; if (__predict_false(fp == NULL)) { if (seqc_consistent(fd_seqc(fdt, fd), seq)) return (EBADF); @@ -3273,19 +3301,21 @@ fget_unlocked_seq(struct thread *td, int fd, const cap_rights_t *needrightsp, fdrop(fp, td); } *fpp = fp; - if (seqp != NULL) { + if (flagsp != NULL) + *flagsp = flags; + if (seqp != NULL) *seqp = seq; - } return (0); } #else static int fget_unlocked_seq(struct thread *td, int fd, const cap_rights_t *needrightsp, - struct file **fpp, seqc_t *seqp __unused) + uint8_t *flagsp, struct file **fpp, seqc_t *seqp __unused) { struct filedesc *fdp; const struct fdescenttbl *fdt; struct file *fp; + uint8_t flags; fdp = td->td_proc->p_fd; fdt = fdp->fd_files; @@ -3294,6 +3324,7 @@ fget_unlocked_seq(struct thread *td, int fd, const cap_rights_t *needrightsp, for (;;) { fp = fdt->fdt_ofiles[fd].fde_file; + flags = fdt->fdt_ofiles[fd].fde_flags; if (__predict_false(fp == NULL)) return (EBADF); if (__predict_false(!refcount_acquire_if_not_zero(&fp->f_count))) { @@ -3310,6 +3341,8 @@ fget_unlocked_seq(struct thread *td, int fd, const cap_rights_t *needrightsp, break; fdrop(fp, td); } + if (flagsp != NULL) + *flagsp = flags; *fpp = fp; return (0); } @@ -3323,8 +3356,8 @@ fget_unlocked_seq(struct thread *td, int fd, const cap_rights_t *needrightsp, * racing with itself. */ int -fget_unlocked(struct thread *td, int fd, const cap_rights_t *needrightsp, - struct file **fpp) +fget_unlocked_flags(struct thread *td, int fd, const cap_rights_t *needrightsp, + uint8_t *flagsp, struct file **fpp) { struct filedesc *fdp; #ifdef CAPABILITIES @@ -3336,6 +3369,7 @@ fget_unlocked(struct thread *td, int fd, const cap_rights_t *needrightsp, seqc_t seq; const cap_rights_t *haverights; #endif + uint8_t flags; fdp = td->td_proc->p_fd; fdt = fdp->fd_files; @@ -3348,8 +3382,10 @@ fget_unlocked(struct thread *td, int fd, const cap_rights_t *needrightsp, fde = &fdt->fdt_ofiles[fd]; haverights = cap_rights_fde_inline(fde); fp = fde->fde_file; + flags = fde->fde_flags; #else fp = fdt->fdt_ofiles[fd].fde_file; + flags = fdt->fdt_ofiles[fd].fde_flags; #endif if (__predict_false(fp == NULL)) goto out_fallback; @@ -3373,12 +3409,21 @@ fget_unlocked(struct thread *td, int fd, const cap_rights_t *needrightsp, #endif goto out_fdrop; *fpp = fp; + if (flagsp != NULL) + *flagsp = flags; return (0); out_fdrop: fdrop(fp, td); out_fallback: *fpp = NULL; - return (fget_unlocked_seq(td, fd, needrightsp, fpp, NULL)); + return (fget_unlocked_seq(td, fd, needrightsp, flagsp, fpp, NULL)); +} + +int +fget_unlocked(struct thread *td, int fd, const cap_rights_t *needrightsp, + struct file **fpp) +{ + return (fget_unlocked_flags(td, fd, needrightsp, NULL, fpp)); } /* @@ -3530,7 +3575,7 @@ fget_mmap(struct thread *td, int fd, const cap_rights_t *rightsp, fdp = td->td_proc->p_fd; MPASS(cap_rights_is_set(rightsp, CAP_MMAP)); for (;;) { - error = fget_unlocked_seq(td, fd, rightsp, &fp, &seq); + error = fget_unlocked_seq(td, fd, rightsp, NULL, &fp, &seq); if (__predict_false(error != 0)) return (error); if (__predict_false(fp->f_ops == &badfileops)) { @@ -3585,7 +3630,7 @@ fget_fcntl(struct thread *td, int fd, const cap_rights_t *rightsp, *fpp = NULL; MPASS(cap_rights_is_set(rightsp, CAP_FCNTL)); for (;;) { - error = fget_unlocked_seq(td, fd, rightsp, &fp, &seq); + error = fget_unlocked_seq(td, fd, rightsp, NULL, &fp, &seq); if (error != 0) return (error); error = cap_fcntl_check(fdp, fd, needfcntl); @@ -3647,7 +3692,7 @@ fgetvp_rights(struct thread *td, int fd, const cap_rights_t *needrightsp, struct file *fp; int error; - error = fget_cap(td, fd, needrightsp, &fp, &caps); + error = fget_cap(td, fd, needrightsp, NULL, &fp, &caps); if (error != 0) return (error); if (fp->f_ops == &badfileops) { diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 4dca0522f707..86b3731468fa 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -93,7 +93,7 @@ getsock_cap(struct thread *td, int fd, const cap_rights_t *rightsp, struct file *fp; int error; - error = fget_cap(td, fd, rightsp, &fp, havecapsp); + error = fget_cap(td, fd, rightsp, NULL, &fp, havecapsp); if (__predict_false(error != 0)) return (error); if (__predict_false(fp->f_type != DTYPE_SOCKET)) { diff --git a/sys/kern/vfs_acl.c b/sys/kern/vfs_acl.c index 58b950a04cd1..b4b1285400d3 100644 --- a/sys/kern/vfs_acl.c +++ b/sys/kern/vfs_acl.c @@ -435,7 +435,7 @@ sys___acl_get_fd(struct thread *td, struct __acl_get_fd_args *uap) AUDIT_ARG_FD(uap->filedes); error = getvnode_path(td, uap->filedes, - cap_rights_init_one(&rights, CAP_ACL_GET), &fp); + cap_rights_init_one(&rights, CAP_ACL_GET), NULL, &fp); if (error == 0) { error = vacl_get_acl(td, fp->f_vnode, uap->type, uap->aclp); fdrop(fp, td); @@ -570,7 +570,7 @@ sys___acl_aclcheck_fd(struct thread *td, struct __acl_aclcheck_fd_args *uap) AUDIT_ARG_FD(uap->filedes); error = getvnode_path(td, uap->filedes, - cap_rights_init_one(&rights, CAP_ACL_CHECK), &fp); + cap_rights_init_one(&rights, CAP_ACL_CHECK), NULL, &fp); if (error == 0) { error = vacl_aclcheck(td, fp->f_vnode, uap->type, uap->aclp); fdrop(fp, td); diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 55f3ef8da8c3..afe090795e37 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -4445,17 +4445,23 @@ cache_fplookup_dirfd(struct cache_fpl *fpl, struct vnode **vpp) { struct nameidata *ndp; struct componentname *cnp; - int error; - bool fsearch; + int error, flags; ndp = fpl->ndp; cnp = fpl->cnp; - error = fgetvp_lookup_smr(ndp, vpp, &fsearch); + error = fgetvp_lookup_smr(ndp, vpp, &flags); if (__predict_false(error != 0)) { return (cache_fpl_aborted(fpl)); } - fpl->fsearch = fsearch; + if (__predict_false((flags & O_RESOLVE_BENEATH) != 0)) { + _Static_assert((CACHE_FPL_SUPPORTED_CN_FLAGS & RBENEATH) == 0, + "RBENEATH supported by fplookup"); + cache_fpl_smr_exit(fpl); + cache_fpl_aborted(fpl); + return (EOPNOTSUPP); + } + fpl->fsearch = (flags & FSEARCH) != 0; if ((*vpp)->v_type != VDIR) { if (!((cnp->cn_flags & EMPTYPATH) != 0 && cnp->cn_pnbuf[0] == '\0')) { cache_fpl_smr_exit(fpl); diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index dc1bbb58644b..831090f02f90 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -254,7 +254,7 @@ kern_extattr_set_fd(struct thread *td, int fd, int attrnamespace, AUDIT_ARG_TEXT(attrname); error = getvnode_path(td, fd, - cap_rights_init_one(&rights, CAP_EXTATTR_SET), &fp); + cap_rights_init_one(&rights, CAP_EXTATTR_SET), NULL, &fp); if (error) return (error); @@ -442,7 +442,7 @@ kern_extattr_get_fd(struct thread *td, int fd, int attrnamespace, AUDIT_ARG_TEXT(attrname); error = getvnode_path(td, fd, - cap_rights_init_one(&rights, CAP_EXTATTR_GET), &fp); + cap_rights_init_one(&rights, CAP_EXTATTR_GET), NULL, &fp); if (error) return (error); @@ -598,7 +598,7 @@ kern_extattr_delete_fd(struct thread *td, int fd, int attrnamespace, AUDIT_ARG_TEXT(attrname); error = getvnode_path(td, fd, - cap_rights_init_one(&rights, CAP_EXTATTR_DELETE), &fp); + cap_rights_init_one(&rights, CAP_EXTATTR_DELETE), NULL, &fp); if (error) return (error); @@ -765,7 +765,7 @@ kern_extattr_list_fd(struct thread *td, int fd, int attrnamespace, AUDIT_ARG_FD(fd); AUDIT_ARG_VALUE(attrnamespace); error = getvnode_path(td, fd, - cap_rights_init_one(&rights, CAP_EXTATTR_LIST), &fp); + cap_rights_init_one(&rights, CAP_EXTATTR_LIST), NULL, &fp); if (error) return (error); diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 670ceb151468..ded3a87e7f8b 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -375,7 +375,7 @@ kern_fstatfs(struct thread *td, int fd, struct statfs *buf) int error; AUDIT_ARG_FD(fd); - error = getvnode_path(td, fd, &cap_fstatfs_rights, &fp); + error = getvnode_path(td, fd, &cap_fstatfs_rights, NULL, &fp); if (error != 0) return (error); vp = fp->f_vnode; @@ -898,12 +898,17 @@ sys_fchdir(struct thread *td, struct fchdir_args *uap) struct mount *mp; struct file *fp; int error; + uint8_t fdflags; AUDIT_ARG_FD(uap->fd); - error = getvnode_path(td, uap->fd, &cap_fchdir_rights, + error = getvnode_path(td, uap->fd, &cap_fchdir_rights, &fdflags, &fp); if (error != 0) return (error); + if ((fdflags & UF_RESOLVE_BENEATH) != 0) { + fdrop(fp, td); + return (ENOTCAPABLE); + } vp = fp->f_vnode; vrefact(vp); fdrop(fp, td); @@ -1252,6 +1257,10 @@ success: else #endif fcaps = NULL; + if ((nd.ni_resflags & NIRES_BENEATH) != 0) + flags |= O_RESOLVE_BENEATH; + else + flags &= ~O_RESOLVE_BENEATH; error = finstall_refed(td, fp, &indx, flags, fcaps); /* On success finstall_refed() consumes fcaps. */ if (error != 0) { @@ -1939,7 +1948,7 @@ kern_funlinkat(struct thread *td, int dfd, const char *path, int fd, fp = NULL; if (fd != FD_NONE) { - error = getvnode_path(td, fd, &cap_no_rights, &fp); + error = getvnode_path(td, fd, &cap_no_rights, NULL, &fp); if (error != 0) return (error); } @@ -4326,12 +4335,12 @@ out: */ int getvnode_path(struct thread *td, int fd, const cap_rights_t *rightsp, - struct file **fpp) + uint8_t *flagsp, struct file **fpp) { struct file *fp; int error; - error = fget_unlocked(td, fd, rightsp, &fp); + error = fget_unlocked_flags(td, fd, rightsp, flagsp, &fp); if (error != 0) return (error); @@ -4368,7 +4377,7 @@ getvnode(struct thread *td, int fd, const cap_rights_t *rightsp, { int error; - error = getvnode_path(td, fd, rightsp, fpp); + error = getvnode_path(td, fd, rightsp, NULL, fpp); if (__predict_false(error != 0)) return (error); diff --git a/sys/sys/file.h b/sys/sys/file.h index bad161d5d46b..7d1a191b4374 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -300,7 +300,7 @@ int fgetvp_read(struct thread *td, int fd, const cap_rights_t *rightsp, struct vnode **vpp); int fgetvp_write(struct thread *td, int fd, const cap_rights_t *rightsp, struct vnode **vpp); -int fgetvp_lookup_smr(struct nameidata *ndp, struct vnode **vpp, bool *fsearch); +int fgetvp_lookup_smr(struct nameidata *ndp, struct vnode **vpp, int *flagsp); int fgetvp_lookup(struct nameidata *ndp, struct vnode **vpp); static __inline __result_use_check bool diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h index ecb8c58e5d29..440c5d3d15f9 100644 --- a/sys/sys/filedesc.h +++ b/sys/sys/filedesc.h @@ -150,6 +150,7 @@ struct filedesc_to_leader { * Per-process open flags. */ #define UF_EXCLOSE 0x01 /* auto-close on exec */ +#define UF_RESOLVE_BENEATH 0x02 /* lookups must be beneath this dir */ #ifdef _KERNEL @@ -280,17 +281,20 @@ struct filedesc_to_leader * int getvnode(struct thread *td, int fd, const cap_rights_t *rightsp, struct file **fpp); int getvnode_path(struct thread *td, int fd, const cap_rights_t *rightsp, - struct file **fpp); + uint8_t *flagsp, struct file **fpp); void mountcheckdirs(struct vnode *olddp, struct vnode *newdp); int fget_cap_noref(struct filedesc *fdp, int fd, const cap_rights_t *needrightsp, struct file **fpp, struct filecaps *havecapsp); int fget_cap(struct thread *td, int fd, const cap_rights_t *needrightsp, - struct file **fpp, struct filecaps *havecapsp); + uint8_t *flagsp, struct file **fpp, struct filecaps *havecapsp); /* Return a referenced file from an unlocked descriptor. */ int fget_unlocked(struct thread *td, int fd, const cap_rights_t *needrightsp, struct file **fpp); +int fget_unlocked_flags(struct thread *td, int fd, + const cap_rights_t *needrightsp, uint8_t *flagsp, + struct file **fpp); /* Return a file pointer without a ref. FILEDESC_IS_ONLY_USER must be true. */ int fget_only_user(struct filedesc *fdp, int fd, const cap_rights_t *needrightsp, struct file **fpp); diff --git a/sys/sys/namei.h b/sys/sys/namei.h index 7033e5469240..dae714f97aef 100644 --- a/sys/sys/namei.h +++ b/sys/sys/namei.h @@ -195,6 +195,7 @@ int cache_fplookup(struct nameidata *ndp, enum cache_fpl_status *status, #define NIRES_ABS 0x00000001 /* Path was absolute */ #define NIRES_STRICTREL 0x00000002 /* Restricted lookup result */ #define NIRES_EMPTYPATH 0x00000004 /* EMPTYPATH used */ +#define NIRES_BENEATH 0x00000008 /* O_RESOLVE_BENEATH is to be inherited */ /* * Flags in ni_lcf, valid for the duration of the namei call. From nobody Tue Feb 24 16:01:30 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL2XC1hFTz6SPDv for ; Tue, 24 Feb 2026 16:01:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL2XC00Gsz3lMv for ; Tue, 24 Feb 2026 16:01:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Aq3FmYWcJDAHeL3IoPA1I5p+3MlbLT8pw9rXuET3IXE=; b=qy2ucQqcY0uNYnmf5bKMTU4RFD4M4bNtI4yI2kS0rLiye4jV24NaQCCJeit30LPD3TAKGz mR0KeuUu9qm3gw7RpcKWfny8+DEG/0iL+I6EAsdB7RsdPRQO3dLCkTQ5+KjKO3D2tiofUT HAx9JN24GAQqaOj9ZHzLymh2ADRUmu1vhHRvMgjIO9u8d7qRIJhov6Ha6reROlIdE+Oi2p +t3BBX/P/sRgHgnU+it0024Kurv/a6WMXajerByXKhqwOQ2jKURi6P3k/xzZvUf7Zs1hmk l6pPmKjWe3D6SeAfhdipf6ulCKN3tAZZtGqaDfb54wu7gYG692hhwHv09G2tZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771948891; a=rsa-sha256; cv=none; b=ZOeaYilZDl9+oA2uwmYBt8miB4SCIVxXZaXkPynciT/ACs765f1BNNJO3zfKjyqPWY2r0t sBFz15roEqNQS5Ncy1d20/LKt8DHy5lUqlyD67/5g/zxF9wjQxLmdY+yA3YjuTUzVVDQDK vlMN1oJOchd3Y5FM+KwvRY9K+sB0rTZgQx33bQak4OrpmZhQCivTIf0bi7+Ll9QGI6RXsu ++I+YrN9KG35bWBBY5ZE1bWbxT1MO9rxDbOcoQ3XTHt+hy/88FfRCJrVJSAMFyc82zRUas wQh08369WgT5p+mjCqFXiVo7MDv73XZWHmdR6wwH93dF3/N8tKz7bKhJnrCSGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Aq3FmYWcJDAHeL3IoPA1I5p+3MlbLT8pw9rXuET3IXE=; b=AQ+gfCUJOKL56/XwvPkUQSBKjnLE+rXKBlt8NLgAu5n4ZhRxkaSi0jufDZejk4jdf7QnFx uQa7pYE/7OclBwkLEqBDULwotPo0mh5svFYvDxXFJIFW3xdiso92776wPHY/cuHHzA81R/ QPdg5YyTMr5XJvU+w+upWW4Hjcr/SbTuRodCMTf90+T/U6/PphNa3HWkZXXcorrD2pDV7z VdqizwuHRg4oUh+NZpzJFqyXrdL2HU/DWfvG8HWcHdMAgLjgccIvXFQOkDr1R2ah04qBYI 0updkWJaVzC6sZgP06pzDm01tBXVhTgsIImQMTVvByiboJL+4+la+hjUCN/aHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL2XB6g2lz75H for ; Tue, 24 Feb 2026 16:01:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27e98 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 16:01:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c52fe2c45e4a - releng/14.3 - file: Fix the !CAPABILITIES build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: c52fe2c45e4ae6573eea806fb5ca8d6af69dc0ee Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 16:01:30 +0000 Message-Id: <699dcb5a.27e98.5b8d9e91@gitrepo.freebsd.org> The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c52fe2c45e4ae6573eea806fb5ca8d6af69dc0ee commit c52fe2c45e4ae6573eea806fb5ca8d6af69dc0ee Author: Mark Johnston AuthorDate: 2025-06-29 16:56:59 +0000 Commit: Mark Johnston CommitDate: 2026-02-23 16:00:13 +0000 file: Fix the !CAPABILITIES build Approved by: so Reported by: Ian FREISLICH Fixes: f35525ff2053 ("file: Add a fd flag with O_RESOLVE_BENEATH semantics") (cherry picked from commit 6783dfb10637100067520bd6d9804e154cfee7ee) (cherry picked from commit 8f6769b82a2a071cf07080b6d77639e919efbbcf) --- sys/kern/kern_descrip.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 1932336ded28..32b07192fcbc 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -2968,7 +2968,7 @@ fget_cap(struct thread *td, int fd, const cap_rights_t *needrightsp, uint8_t *flagsp, struct file **fpp, struct filecaps *havecapsp) { int error; - error = fget_unlocked(td, fd, needrightsp, flagsp, fpp); + error = fget_unlocked_flags(td, fd, needrightsp, flagsp, fpp); if (havecapsp != NULL && error == 0) filecaps_fill(havecapsp); @@ -3145,7 +3145,6 @@ fgetvp_lookup_smr(struct nameidata *ndp, struct vnode **vpp, int *flagsp) flags = fp->f_flag & FSEARCH; flags |= (fde->fde_flags & UF_RESOLVE_BENEATH) != 0 ? O_RESOLVE_BENEATH : 0; - *fsearch = ((fp->f_flag & FSEARCH) != 0); vp = fp->f_vnode; if (__predict_false(vp == NULL || vp->v_type != VDIR)) { return (EAGAIN); From nobody Tue Feb 24 16:01:32 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL2XD2F9Pz6SPMS for ; Tue, 24 Feb 2026 16:01:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL2XD0Z10z3lMw for ; Tue, 24 Feb 2026 16:01:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wq0u8I/S1c7ncP+60D6Cjrp00BqhfyJRZRetab0aSxQ=; b=AzBigM7QHzpwBDemFgvQ4mZgJdkvUGkXpZ3ICDGPw4pWpjGO2hcM0/l1R2qYEpIcw7W4yj MC3aPeusJ0YXdUzs8FzikmQDWG0lpy1neslZw440UqlwzijKgapukGb1eAwMkiQVtdKdup h6/KF7Ea6W+58KTuoE5eLsPkNHj8TJH4ihsbcj4TYR7fKGpng0sWfydg1nftreKSnH1ktB JWhiXKyq4bCTHiS4qylWEUdLsflgPEPqsdNQ6H/FHgwuSphN9DLvyhQmX6qwIkBn27uu/B Do5ayW5SqhrbogCKU8ezF8chgiicrH2mw6Lri6o1dCPCpA1FulbalLm/h3EOkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771948892; a=rsa-sha256; cv=none; b=I6bRSUeh2Ll6rLxqWmKoW/Swe5JlWB5FHrI8yhlAzirwW4LqjirambXBaDhOOUiTELx92l BO7njzhRWuy2y7AF0f0U/HmJmhwJ8EnYsrs1Tymi2XTBCIA92gnjCiUz4sk0mEArHZTN2o 89Jl6ytWKKq7DS3YjiPHwxT7ZGg8DB0MckSCbBfOMBz/G738aWgi7ECbmlJjId26eL/6KF mL/jbzWazvHYjmgrLuyHLedgvMVOQ0imJBNm9V4YqaIg63+bcwGCrE0MKrjXQmwAhDjFr6 Vdi8GJfP91ENafpaZ4dekOwu060g/7PcoEADrEcEpcSgzEfNDtjxXVN9oeXfTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wq0u8I/S1c7ncP+60D6Cjrp00BqhfyJRZRetab0aSxQ=; b=VtHs/IeSbnMdSl01S95RQzX7PzxaarHXjb7agmwmKxcG+SiuIfALSDXLx+/7Uf3HQnk2cx KZh8BbQ9T0LAiZeziqonRGdyyaucISCQQhhNqj106sGprkkCm4G0/USVe2mSdBJtWt/bKP akIsRj+UMAfcpDVGTRZXPrvI0YYE/Xy5Ozh5EBoE5Q6Nu6lWbrzRWjWd4bzoY1X9D5SZtj yEWig8oHPcPjWYvGMvdYBUuhHQ0cuS9H8hluU9/KgId3a0v6J4R4IlJYcqbEd0+Gop1BzE zNxeEDN5NbjHOCPlu6sDO8G4gHjwvg5YFXHVpmsmgxji9dEPTZJd3V2IkxFLzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL2XD06JJz72R for ; Tue, 24 Feb 2026 16:01:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27e9c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 16:01:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: fbc35b3e6615 - releng/14.3 - unix: Set O_RESOLVE_BENEATH on fds transferred between jails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: fbc35b3e6615e6ff2866a9aeba67ed236f9bdb98 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 16:01:32 +0000 Message-Id: <699dcb5c.27e9c.7c8c9279@gitrepo.freebsd.org> The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fbc35b3e6615e6ff2866a9aeba67ed236f9bdb98 commit fbc35b3e6615e6ff2866a9aeba67ed236f9bdb98 Author: Mark Johnston AuthorDate: 2025-06-24 20:05:37 +0000 Commit: Mark Johnston CommitDate: 2026-02-23 16:00:13 +0000 unix: Set O_RESOLVE_BENEATH on fds transferred between jails If a pair of jails with different filesystem roots is able to exchange SCM_RIGHTS messages (e.g., using a unix socket in a shared nullfs mount), a process in one jail can open a directory outside of the root of the second jail and then pass the fd to that second jail, allowing the receiving process to escape the jail chroot. Address this using the new FD_RESOLVE_BENEATH flag. When externalizing an SCM_RIGHTS message into the receiving process, automatically set this flag on all new fds where a jail boundary is crossed. This ensures that the receiver cannot do more than access files underneath the directory; in particular, the received fd cannot be used to access vnodes not accessible by the sender. Approved by: so Security: FreeBSD-SA-26:04.jail Security: CVE-2025-15576 PR: 262179 Reviewed by: kib MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D50371 (cherry picked from commit 350ba9672a7f4f16e30534a603df577dfd083b3f) (cherry picked from commit 3ad3ab5f9b6e91efc923bae9799697a823eb7227) --- sys/amd64/conf/SYZKALLER | 5 +++++ sys/kern/uipc_usrreq.c | 31 +++++++++++++++++++++++-------- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/sys/amd64/conf/SYZKALLER b/sys/amd64/conf/SYZKALLER new file mode 100644 index 000000000000..965841313616 --- /dev/null +++ b/sys/amd64/conf/SYZKALLER @@ -0,0 +1,5 @@ +include GENERIC-KASAN +ident SYZKALLER + +options COVERAGE +options KCOV diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 80ac5cc0b775..4df36221bc6a 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -58,7 +58,6 @@ * need a proper out-of-band */ -#include #include "opt_ddb.h" #include @@ -68,6 +67,7 @@ #include #include #include +#include #include #include #include @@ -2433,22 +2433,34 @@ unp_freerights(struct filedescent **fdep, int fdcount) free(fdep[0], M_FILECAPS); } +static bool +restrict_rights(struct file *fp, struct thread *td) +{ + struct prison *prison1, *prison2; + + prison1 = fp->f_cred->cr_prison; + prison2 = td->td_ucred->cr_prison; + return (prison1 != prison2 && prison1->pr_root != prison2->pr_root && + prison2 != &prison0); +} + static int unp_externalize(struct mbuf *control, struct mbuf **controlp, int flags) { struct thread *td = curthread; /* XXX */ struct cmsghdr *cm = mtod(control, struct cmsghdr *); - int i; int *fdp; struct filedesc *fdesc = td->td_proc->p_fd; struct filedescent **fdep; void *data; socklen_t clen = control->m_len, datalen; - int error, newfds; + int error, fdflags, newfds; u_int newlen; UNP_LINK_UNLOCK_ASSERT(); + fdflags = (flags & MSG_CMSG_CLOEXEC) ? O_CLOEXEC : 0; + error = 0; if (controlp != NULL) /* controlp == NULL => free control messages */ *controlp = NULL; @@ -2490,11 +2502,14 @@ unp_externalize(struct mbuf *control, struct mbuf **controlp, int flags) *controlp = NULL; goto next; } - for (i = 0; i < newfds; i++, fdp++) { - _finstall(fdesc, fdep[i]->fde_file, *fdp, - (flags & MSG_CMSG_CLOEXEC) != 0 ? O_CLOEXEC : 0, - &fdep[i]->fde_caps); - unp_externalize_fp(fdep[i]->fde_file); + for (int i = 0; i < newfds; i++, fdp++) { + struct file *fp; + + fp = fdep[i]->fde_file; + _finstall(fdesc, fp, *fdp, fdflags | + (restrict_rights(fp, td) ? + O_RESOLVE_BENEATH : 0), &fdep[i]->fde_caps); + unp_externalize_fp(fp); } /* From nobody Tue Feb 24 16:01:34 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL2XG6Yznz6SPVB for ; Tue, 24 Feb 2026 16:01:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL2XG2Xqmz3lYl for ; Tue, 24 Feb 2026 16:01:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V383PtCH62SyxlT+hRXA+YNFO4DzHBLTuHPOMrfoaUQ=; b=HsaZK8OUClBWjBnB1NWXdEStCoY6O5R5FYYnLKHdtYcDOq8vtJ170ty/k2udOAm4nJY49z NXfKqBI+7MQoZd5sJKraU/APHq852QXG4H975Y6T9eUVNKBVYhD7bwZ/qgwkJoKUu/+bNj kTVp0CqWdxSmzSactlbnyyOqBoLmX6tXIOTI/nFpWYwA1pW9DhWgZYzuyAUKZbXoRtY2hZ dkwypg7B9FYxMcErTsTTLsfazk5zyG5NfQIyzz+oxnjnjVo0pGuNoJqYlP/GQEN9xxadlO LVVn93co+47ppvufvdfMGRjE4MjBLw22+c/f6x6WfcvPCd5z/aHpmYe7RVUVGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771948894; a=rsa-sha256; cv=none; b=Z91JIWh/QJ/IU7/Y70raVZfcy8oq2NToH5g/sQqj5EPCc3VK25P4qasKRoCAyhl7bxCxfD 9wjYU3Ee+50br143j6t3m8JS5/RFKDlXXZiEUp9i8opBId/JRiGtMZB3mxLn2azl/XeK2/ ITFqQBvq4SgCS+NNlTYpMKpxvfFIrEtRSvOvaMzep9pwQCTIBlJNYi8KrlDgwpQq4SccgY Mb1WTPKi0FFStIaYmSpDaHTOsl2ocJaDRC7J/QFuy8QNyFRYKLPOT2lqJBjdAiaZlrFTEa 8pwnBZ3xEs1e7kRItoyLJFZV6MvUv/GtDMO44aOWJBGvA1f62lTZ64uaLesw0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V383PtCH62SyxlT+hRXA+YNFO4DzHBLTuHPOMrfoaUQ=; b=ENxbTJUSIxacm8ZxSYIE3yMKPtJ8ZH7N27JD0NnkddVtLzS5pWyn5lN8b2vy+Gs4ZfgdWF VLwPdWr7btGHH4hTJr1AEGq+1z+hUmRdZVSvbwdtYKCKcv8lOBcCQR0w1ztw569IUyiBHy urFzJnl14wWhCRDO95Spq0OAehFGm9VmPnZWTJlUMqB6Q5fl6kDoNubpZ4SAAb+L/NneYL nzdxMD5SfIKxfj4MJxWu2AtUQzAuIJLs/7Y6luTsoxX2VBmcOGUMH6XvlmdMU3vZnyfJQO UVDvIVuz/sKjhHrbdEzu6bhBWU9QLXTDLZjGyDZm/dd+RGAp6ZiU0K2IcXUrfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL2XG1lvjz7GT for ; Tue, 24 Feb 2026 16:01:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27ccf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 16:01:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 3a495a08e9a2 - releng/14.3 - amd64/conf: Remove a config committed by accident List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: 3a495a08e9a2ce875f1ed0fd96609155ba2c454c Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 16:01:34 +0000 Message-Id: <699dcb5e.27ccf.62b0acf6@gitrepo.freebsd.org> The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3a495a08e9a2ce875f1ed0fd96609155ba2c454c commit 3a495a08e9a2ce875f1ed0fd96609155ba2c454c Author: Mark Johnston AuthorDate: 2025-06-25 12:50:50 +0000 Commit: Mark Johnston CommitDate: 2026-02-23 16:00:13 +0000 amd64/conf: Remove a config committed by accident Approved by: so Reported by: kib, kp Fixes: 350ba9672a7f ("unix: Set O_RESOLVE_BENEATH on fds transferred between jails") (cherry picked from commit 3ef39f58e5d63a78fd1c37e6c62d599bc68d5e1e) (cherry picked from commit 302120bcb934ea150555362326c812353fb72eaa) --- sys/amd64/conf/SYZKALLER | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/amd64/conf/SYZKALLER b/sys/amd64/conf/SYZKALLER deleted file mode 100644 index 965841313616..000000000000 --- a/sys/amd64/conf/SYZKALLER +++ /dev/null @@ -1,5 +0,0 @@ -include GENERIC-KASAN -ident SYZKALLER - -options COVERAGE -options KCOV From nobody Tue Feb 24 16:01:33 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL2XF6xPVz6SPBg for ; Tue, 24 Feb 2026 16:01:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL2XF26tZz3lN2 for ; Tue, 24 Feb 2026 16:01:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ot/7CE9zAb/1YpiDKJzOXII+qBuburgX2bBuW3PSC1A=; b=QoKwLDA8YnQ01/DUQs+4q6IiECTx6HXpEibYhxMjIu38Gv83yt9KVY9w05tyQ7tpaW4nhe sIT9g/jRYFgX8LdksqXSthitgNWlw+a+ACd2HzNlp2HAa/RMxFn7XMOtPqPf+RPmt7pLt/ ToeSqghDWyjQzCn1ApSLujAalCdi+3HKNP9lQhQC+qZ99YGzANHOIq2TxxMhTG/bj334nP 54KBl05oGO+B21tBUag3GaaWcYnq0l09NiQVqOT+pOMSH4lB99eEtyMrDgByIrM7GWPwKc ZRJtmmdtd1eHbJPI8TBD+h0IYoO4p4InbC4K39BPHgCGP6/xT9lpnQZBFTdRAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771948893; a=rsa-sha256; cv=none; b=T0m2MCcLJdiMcZIBR8/muOwvy9cumx+sEED24XKi4S8AzvD1wI/cy3Y83HrbQIlb5ZVEWA HZqrjVVZxyScepENVAUYGhO1Ffw2ip8043NVwtisEtN2sdJe4HWWNpBsRPZkLZUUpy0nVl N3kvvD2j/d+gwuKgh4fxPXl5X1x7nxtB2AF581eWFTEUCM9EuFlkVwL+fCmBdMVEbaTcEa YQcTWYMrTl7aFgx95DVT9voZUAHvwxfrQg3tnNMYtmQPNp+wdtO6yhVenJeTWrppxcAzBR RWEiadPrWFLhQBFFq50IqbbT/hGJlK+dfzWExbRJgFDIHdja/1Nxf0D8fEJNRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ot/7CE9zAb/1YpiDKJzOXII+qBuburgX2bBuW3PSC1A=; b=Gbg1i0kotv438UNuuEoDzr+fL5YOxUIANc83A7jheUji+aQ5Y4ijerTwDo6W1hNXeKRfPZ wLWeu1U775TtLeo3omV1QCnis6s220GoqToBGtJLBM7V+Ah6L4FLaWzjsndJ/ogzWE+r7Q GFRPPafLoPF7z6Pktr7Nv+2dnWhzsgMilRprSFaWzqwofeqJ0wcux5Byxq0GUcAktvatYp P1yqXQa/qU8c+C92asMgVvHPJrGDCHT7qH7UcaME943Ejnhhra89NiIZ2EHHiEoCcPSl3C loBQrrx5MFWf0Ya8ewEUM3ss0/5pUkSi/cCjyQ3A+oluvsEP6nPx1GvqnOzxIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL2XF0wY2z708 for ; Tue, 24 Feb 2026 16:01:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 277b7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 16:01:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 32ff24bd702c - releng/14.3 - unix/tests: Add a regression test for fd transfer across jails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: 32ff24bd702c89ed387a38bc76f3df31dbadd8cb Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 16:01:33 +0000 Message-Id: <699dcb5d.277b7.38259535@gitrepo.freebsd.org> The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=32ff24bd702c89ed387a38bc76f3df31dbadd8cb commit 32ff24bd702c89ed387a38bc76f3df31dbadd8cb Author: Mark Johnston AuthorDate: 2025-06-24 20:08:22 +0000 Commit: Mark Johnston CommitDate: 2026-02-23 16:00:13 +0000 unix/tests: Add a regression test for fd transfer across jails Approved by: so MFC after: 3 weeks (cherry picked from commit 5843b8ee02e99527c28f579acfc1f48e10033529) (cherry picked from commit ac2279ea57b72d688cf0af5a6fa7f5dbd1d4521b) --- tests/sys/kern/Makefile | 2 + tests/sys/kern/unix_passfd_test.c | 131 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 133 insertions(+) diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index 846ac3e4adc9..eb5ea8c3c549 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -86,6 +86,8 @@ LIBADD.sendfile_helper+= pthread LIBADD.fdgrowtable_test+= util pthread kvm procstat LIBADD.sigwait+= rt LIBADD.ktrace_test+= sysdecode +LIBADD.unix_passfd_dgram+= jail +LIBADD.unix_passfd_stream+= jail NETBSD_ATF_TESTS_C+= lockf_test NETBSD_ATF_TESTS_C+= mqueue_test diff --git a/tests/sys/kern/unix_passfd_test.c b/tests/sys/kern/unix_passfd_test.c index d8c0efe5b9ea..69898d19e797 100644 --- a/tests/sys/kern/unix_passfd_test.c +++ b/tests/sys/kern/unix_passfd_test.c @@ -28,15 +28,19 @@ #include #include +#include #include #include #include #include #include #include +#include +#include #include #include +#include #include #include #include @@ -946,6 +950,132 @@ ATF_TC_BODY(empty_rights_message, tc) (void)close(putfd); } +ATF_TC_WITH_CLEANUP(cross_jail_dirfd); +ATF_TC_HEAD(cross_jail_dirfd, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} +ATF_TC_BODY(cross_jail_dirfd, tc) +{ + int error, sock[2], jid1, jid2, status; + pid_t pid1, pid2; + + domainsocketpair(sock); + + error = mkdir("./a", 0755); + ATF_REQUIRE(error == 0); + error = mkdir("./b", 0755); + ATF_REQUIRE(error == 0); + error = mkdir("./c", 0755); + ATF_REQUIRE(error == 0); + error = mkdir("./a/c", 0755); + ATF_REQUIRE(error == 0); + + jid1 = jail_setv(JAIL_CREATE, + "name", "passfd_test_cross_jail_dirfd1", + "path", "./a", + "persist", NULL, + NULL); + ATF_REQUIRE_MSG(jid1 >= 0, "jail_setv: %s", jail_errmsg); + + jid2 = jail_setv(JAIL_CREATE, + "name", "passfd_test_cross_jail_dirfd2", + "path", "./b", + "persist", NULL, + NULL); + ATF_REQUIRE_MSG(jid2 >= 0, "jail_setv: %s", jail_errmsg); + + pid1 = fork(); + ATF_REQUIRE(pid1 >= 0); + if (pid1 == 0) { + ssize_t len; + int dfd, error; + char ch; + + error = jail_attach(jid1); + if (error != 0) + err(1, "jail_attach"); + + dfd = open(".", O_RDONLY | O_DIRECTORY); + if (dfd < 0) + err(1, "open(\".\") in jail %d", jid1); + + ch = 0; + len = sendfd_payload(sock[0], dfd, &ch, sizeof(ch)); + if (len == -1) + err(1, "sendmsg"); + + _exit(0); + } + + pid2 = fork(); + ATF_REQUIRE(pid2 >= 0); + if (pid2 == 0) { + int dfd, dfd2, error, fd; + char ch; + + error = jail_attach(jid2); + if (error != 0) + err(1, "jail_attach"); + + /* Get a directory from outside the jail root. */ + recvfd_payload(sock[1], &dfd, &ch, sizeof(ch), + CMSG_SPACE(sizeof(int)), 0); + + if ((fcntl(dfd, F_GETFD) & 2) == 0) + errx(1, "dfd does not have FD_RESOLVE_BENEATH set"); + + /* Make sure we can't chdir. */ + error = fchdir(dfd); + if (error == 0) + errx(1, "fchdir succeeded"); + if (errno != ENOTCAPABLE) + err(1, "fchdir"); + + /* Make sure a dotdot access fails. */ + fd = openat(dfd, "../c", O_RDONLY | O_DIRECTORY); + if (fd >= 0) + errx(1, "openat(\"../c\") succeeded"); + if (errno != ENOTCAPABLE) + err(1, "openat"); + + /* Accesses within the sender's jail root are ok. */ + fd = openat(dfd, "c", O_RDONLY | O_DIRECTORY); + if (fd < 0) + err(1, "openat(\"c\")"); + + dfd2 = openat(dfd, "", O_EMPTY_PATH | O_RDONLY | O_DIRECTORY); + if (dfd2 < 0) + err(1, "openat(\"\")"); + if ((fcntl(dfd2, F_GETFD) & 2) == 0) + errx(1, "dfd2 does not have FD_RESOLVE_BENEATH set"); + + _exit(0); + } + + error = waitpid(pid1, &status, 0); + ATF_REQUIRE(error != -1); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE(WEXITSTATUS(status) == 0); + error = waitpid(pid2, &status, 0); + ATF_REQUIRE(error != -1); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE(WEXITSTATUS(status) == 0); + + closesocketpair(sock); +} +ATF_TC_CLEANUP(cross_jail_dirfd, tc) +{ + int jid; + + jid = jail_getid("passfd_test_cross_jail_dirfd1"); + if (jid >= 0 && jail_remove(jid) != 0) + err(1, "jail_remove"); + jid = jail_getid("passfd_test_cross_jail_dirfd2"); + if (jid >= 0 && jail_remove(jid) != 0) + err(1, "jail_remove"); +} + ATF_TP_ADD_TCS(tp) { @@ -964,6 +1094,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, truncated_rights); ATF_TP_ADD_TC(tp, copyout_rights_error); ATF_TP_ADD_TC(tp, empty_rights_message); + ATF_TP_ADD_TC(tp, cross_jail_dirfd); return (atf_no_error()); } From nobody Tue Feb 24 16:01:28 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL2XG3Ns8z6SNxH for ; Tue, 24 Feb 2026 16:01:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL2XF6kR7z3lKk for ; Tue, 24 Feb 2026 16:01:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s8iXV18FSdyknd86+z7uFkD08Cz5hK1Vv2E0ekKXxmw=; b=STj32nqZafKDTMB3hnWT+Ps65svW1XOty1b+IrPnxNc84Zfmzabktlz5NU8UKsqV80f8b9 NTOiJDD6Uu/0XfMNPXXehT8ogbnC72D3TrhYNgY4jrhreo/d3iXfX5uS6+hOG6+6OMR7OW nHR4RiMlj8qbsF6R8pWb5/VJSkHE7W3YCRaopHVqV2R6k/0Pk/ywrUk48TedUYfmgUKiR9 IPw/OdSRtd2MjG9kLCpYjFWZe4U9Oy/bSwxk+vUCWctCcjKP6T3yFqTTLQnMYWLRywqIwt gLVQlHxsuq//W9NoPZck1B3I0Gd2qeE0OsMgxPpsrXd6jFsySp/B7nfsQ/4Nmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771948893; a=rsa-sha256; cv=none; b=Yzh9OCGWJGEgUedCph1ATr71ouRj85q0XMV2k9YwieVqpQa8gzp/lvlYws0OrrnjgrnGBx Ty73gtDO0DiKXkP152uDPPzkeXvijP/UZTJFmY+JxIGrfr5g/OXfIrc//xvydIG5qKKL/R MRlWKmGETh26PMMm0R22OUCZczD11Lk5IlTiNHXF4vQSOF1klo8Q8cpL6F3GzO8C4skSuu LZTzefNXVEkTXHZ9e+g5pPtfkqRpdNcixszw0lYCM3/87a8TnRpaS22VUNruZ6SFcdhZda R4mdKN05f+Rs2qGryZ0M1xdkmC7pNSEqmb1CKUOV4/shNdsqE8/BE/pcWpTAHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s8iXV18FSdyknd86+z7uFkD08Cz5hK1Vv2E0ekKXxmw=; b=DBY3ESAyU+x1WnlGppK7OP6ZZzEfiFHKt20UPD4sKhI/GY0GtODX2/CXgxmSwc6s/qRxyN EyxZOZm2j+0BI14yX1boQDxytgIMesgy+EJuFBd3CPAnwl1TZqNWcKLYKFlBFLtFQlW9Zn +H7yv7gZieZeBtVPkrr+kJCyDw9Qhob4yXQ+2jJUZqRnL/T0qaG0v4mVavDX1mgQGm1Z+K cvzILKnCgUO59U4WCJMsrDgKTHMYZOVp5aWeWm4jpqR/U1kUPvGP301UFDSuCzq1Sbo75w o110mpvna8NgqFfNEiCuTgCps/46phcgtdYK6XFnRZM8rGHTiUJWXfj6Xh5UlQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL2XF6DPPz6TG for ; Tue, 24 Feb 2026 16:01:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2663f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 16:01:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: fa552645887a - releng/14.3 - file: Qualify pointers to capsicum rights as const List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: fa552645887a36f608692ee9eb860c2f1ed45957 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 16:01:28 +0000 Message-Id: <699dcb58.2663f.221880b8@gitrepo.freebsd.org> The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fa552645887a36f608692ee9eb860c2f1ed45957 commit fa552645887a36f608692ee9eb860c2f1ed45957 Author: Mark Johnston AuthorDate: 2025-05-20 20:19:30 +0000 Commit: Mark Johnston CommitDate: 2026-02-09 22:01:24 +0000 file: Qualify pointers to capsicum rights as const File descriptor lookup routines typically take a set of capsicum rights as input to the lookup, so that the fd's rights can be atomically checked. This set should be qualified with const. No functional change intended. Approved by: so Reviewed by: olce, oshogbo, brooks, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D50419 (cherry picked from commit 5319cb21610ad947c56fd0cd4f18ef5b58bc8db7) (cherry picked from commit 2060337c0937f08d9960d629eb59ce737339640c) --- sys/kern/kern_descrip.c | 52 +++++++++++++++++++++++++++--------------------- sys/kern/sys_procdesc.c | 5 +++-- sys/kern/uipc_mqueue.c | 5 +++-- sys/kern/uipc_sem.c | 6 +++--- sys/kern/uipc_syscalls.c | 7 ++++--- sys/kern/vfs_syscalls.c | 5 +++-- sys/sys/file.h | 21 +++++++++---------- sys/sys/filedesc.h | 19 +++++++++--------- sys/sys/namei.h | 4 ++-- sys/sys/procdesc.h | 6 ++++-- sys/sys/socketvar.h | 4 ++-- 11 files changed, 74 insertions(+), 60 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 2d1c0d4aea5f..8b391da95840 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -111,7 +111,8 @@ static void fdgrowtable_exp(struct filedesc *fdp, int nfd); static void fdunused(struct filedesc *fdp, int fd); static void fdused(struct filedesc *fdp, int fd); static int fget_unlocked_seq(struct thread *td, int fd, - cap_rights_t *needrightsp, struct file **fpp, seqc_t *seqp); + const cap_rights_t *needrightsp, struct file **fpp, + seqc_t *seqp); static int getmaxfd(struct thread *td); static u_long *filecaps_copy_prep(const struct filecaps *src); static void filecaps_copy_finish(const struct filecaps *src, @@ -2879,7 +2880,7 @@ finit_vnode(struct file *fp, u_int flag, void *data, const struct fileops *ops) } int -fget_cap_noref(struct filedesc *fdp, int fd, cap_rights_t *needrightsp, +fget_cap_noref(struct filedesc *fdp, int fd, const cap_rights_t *needrightsp, struct file **fpp, struct filecaps *havecapsp) { struct filedescent *fde; @@ -2912,7 +2913,7 @@ out: #ifdef CAPABILITIES int -fget_cap(struct thread *td, int fd, cap_rights_t *needrightsp, +fget_cap(struct thread *td, int fd, const cap_rights_t *needrightsp, struct file **fpp, struct filecaps *havecapsp) { struct filedesc *fdp = td->td_proc->p_fd; @@ -2952,7 +2953,7 @@ get_locked: } #else int -fget_cap(struct thread *td, int fd, cap_rights_t *needrightsp, +fget_cap(struct thread *td, int fd, const cap_rights_t *needrightsp, struct file **fpp, struct filecaps *havecapsp) { int error; @@ -3223,7 +3224,7 @@ out_free: */ #ifdef CAPABILITIES static int -fget_unlocked_seq(struct thread *td, int fd, cap_rights_t *needrightsp, +fget_unlocked_seq(struct thread *td, int fd, const cap_rights_t *needrightsp, struct file **fpp, seqc_t *seqp) { struct filedesc *fdp; @@ -3279,7 +3280,7 @@ fget_unlocked_seq(struct thread *td, int fd, cap_rights_t *needrightsp, } #else static int -fget_unlocked_seq(struct thread *td, int fd, cap_rights_t *needrightsp, +fget_unlocked_seq(struct thread *td, int fd, const cap_rights_t *needrightsp, struct file **fpp, seqc_t *seqp __unused) { struct filedesc *fdp; @@ -3322,7 +3323,7 @@ fget_unlocked_seq(struct thread *td, int fd, cap_rights_t *needrightsp, * racing with itself. */ int -fget_unlocked(struct thread *td, int fd, cap_rights_t *needrightsp, +fget_unlocked(struct thread *td, int fd, const cap_rights_t *needrightsp, struct file **fpp) { struct filedesc *fdp; @@ -3391,7 +3392,7 @@ out_fallback: */ #ifdef CAPABILITIES int -fget_only_user(struct filedesc *fdp, int fd, cap_rights_t *needrightsp, +fget_only_user(struct filedesc *fdp, int fd, const cap_rights_t *needrightsp, struct file **fpp) { const struct filedescent *fde; @@ -3421,7 +3422,7 @@ fget_only_user(struct filedesc *fdp, int fd, cap_rights_t *needrightsp, } #else int -fget_only_user(struct filedesc *fdp, int fd, cap_rights_t *needrightsp, +fget_only_user(struct filedesc *fdp, int fd, const cap_rights_t *needrightsp, struct file **fpp) { struct file *fp; @@ -3457,7 +3458,7 @@ fget_only_user(struct filedesc *fdp, int fd, cap_rights_t *needrightsp, */ static __inline int _fget(struct thread *td, int fd, struct file **fpp, int flags, - cap_rights_t *needrightsp) + const cap_rights_t *needrightsp) { struct file *fp; int error; @@ -3503,15 +3504,15 @@ _fget(struct thread *td, int fd, struct file **fpp, int flags, } int -fget(struct thread *td, int fd, cap_rights_t *rightsp, struct file **fpp) +fget(struct thread *td, int fd, const cap_rights_t *rightsp, struct file **fpp) { return (_fget(td, fd, fpp, 0, rightsp)); } int -fget_mmap(struct thread *td, int fd, cap_rights_t *rightsp, vm_prot_t *maxprotp, - struct file **fpp) +fget_mmap(struct thread *td, int fd, const cap_rights_t *rightsp, + vm_prot_t *maxprotp, struct file **fpp) { int error; #ifndef CAPABILITIES @@ -3554,22 +3555,24 @@ fget_mmap(struct thread *td, int fd, cap_rights_t *rightsp, vm_prot_t *maxprotp, } int -fget_read(struct thread *td, int fd, cap_rights_t *rightsp, struct file **fpp) +fget_read(struct thread *td, int fd, const cap_rights_t *rightsp, + struct file **fpp) { return (_fget(td, fd, fpp, FREAD, rightsp)); } int -fget_write(struct thread *td, int fd, cap_rights_t *rightsp, struct file **fpp) +fget_write(struct thread *td, int fd, const cap_rights_t *rightsp, + struct file **fpp) { return (_fget(td, fd, fpp, FWRITE, rightsp)); } int -fget_fcntl(struct thread *td, int fd, cap_rights_t *rightsp, int needfcntl, - struct file **fpp) +fget_fcntl(struct thread *td, int fd, const cap_rights_t *rightsp, + int needfcntl, struct file **fpp) { #ifndef CAPABILITIES return (fget_unlocked(td, fd, rightsp, fpp)); @@ -3607,7 +3610,7 @@ fget_fcntl(struct thread *td, int fd, cap_rights_t *rightsp, int needfcntl, * XXX: what about the unused flags ? */ static __inline int -_fgetvp(struct thread *td, int fd, int flags, cap_rights_t *needrightsp, +_fgetvp(struct thread *td, int fd, int flags, const cap_rights_t *needrightsp, struct vnode **vpp) { struct file *fp; @@ -3629,14 +3632,15 @@ _fgetvp(struct thread *td, int fd, int flags, cap_rights_t *needrightsp, } int -fgetvp(struct thread *td, int fd, cap_rights_t *rightsp, struct vnode **vpp) +fgetvp(struct thread *td, int fd, const cap_rights_t *rightsp, + struct vnode **vpp) { return (_fgetvp(td, fd, 0, rightsp, vpp)); } int -fgetvp_rights(struct thread *td, int fd, cap_rights_t *needrightsp, +fgetvp_rights(struct thread *td, int fd, const cap_rights_t *needrightsp, struct filecaps *havecaps, struct vnode **vpp) { struct filecaps caps; @@ -3668,14 +3672,16 @@ out: } int -fgetvp_read(struct thread *td, int fd, cap_rights_t *rightsp, struct vnode **vpp) +fgetvp_read(struct thread *td, int fd, const cap_rights_t *rightsp, + struct vnode **vpp) { return (_fgetvp(td, fd, FREAD, rightsp, vpp)); } int -fgetvp_exec(struct thread *td, int fd, cap_rights_t *rightsp, struct vnode **vpp) +fgetvp_exec(struct thread *td, int fd, const cap_rights_t *rightsp, + struct vnode **vpp) { return (_fgetvp(td, fd, FEXEC, rightsp, vpp)); @@ -3683,7 +3689,7 @@ fgetvp_exec(struct thread *td, int fd, cap_rights_t *rightsp, struct vnode **vpp #ifdef notyet int -fgetvp_write(struct thread *td, int fd, cap_rights_t *rightsp, +fgetvp_write(struct thread *td, int fd, const cap_rights_t *rightsp, struct vnode **vpp) { diff --git a/sys/kern/sys_procdesc.c b/sys/kern/sys_procdesc.c index dbf8e579530f..3221885c9277 100644 --- a/sys/kern/sys_procdesc.c +++ b/sys/kern/sys_procdesc.c @@ -121,7 +121,7 @@ static const struct fileops procdesc_ops = { * died. */ int -procdesc_find(struct thread *td, int fd, cap_rights_t *rightsp, +procdesc_find(struct thread *td, int fd, const cap_rights_t *rightsp, struct proc **p) { struct procdesc *pd; @@ -168,7 +168,8 @@ procdesc_pid(struct file *fp_procdesc) * Retrieve the PID associated with a process descriptor. */ int -kern_pdgetpid(struct thread *td, int fd, cap_rights_t *rightsp, pid_t *pidp) +kern_pdgetpid(struct thread *td, int fd, const cap_rights_t *rightsp, + pid_t *pidp) { struct file *fp; int error; diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index 7dd0f9796682..75daf94b9849 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -2155,13 +2155,14 @@ sys_kmq_unlink(struct thread *td, struct kmq_unlink_args *uap) return (error); } -typedef int (*_fgetf)(struct thread *, int, cap_rights_t *, struct file **); +typedef int (*_fgetf)(struct thread *, int, const cap_rights_t *, + struct file **); /* * Get message queue by giving file slot */ static int -_getmq(struct thread *td, int fd, cap_rights_t *rightsp, _fgetf func, +_getmq(struct thread *td, int fd, const cap_rights_t *rightsp, _fgetf func, struct file **fpp, struct mqfs_node **ppn, struct mqueue **pmq) { struct mqfs_node *pn; diff --git a/sys/kern/uipc_sem.c b/sys/kern/uipc_sem.c index 35ca9a9fb06e..2fc4d3e9cfb3 100644 --- a/sys/kern/uipc_sem.c +++ b/sys/kern/uipc_sem.c @@ -123,8 +123,8 @@ static int ksem_create(struct thread *td, const char *path, semid_t *semidp, mode_t mode, unsigned int value, int flags, int compat32); static void ksem_drop(struct ksem *ks); -static int ksem_get(struct thread *td, semid_t id, cap_rights_t *rightsp, - struct file **fpp); +static int ksem_get(struct thread *td, semid_t id, + const cap_rights_t *rightsp, struct file **fpp); static struct ksem *ksem_hold(struct ksem *ks); static void ksem_insert(char *path, Fnv32_t fnv, struct ksem *ks); static struct ksem *ksem_lookup(char *path, Fnv32_t fnv); @@ -587,7 +587,7 @@ ksem_create(struct thread *td, const char *name, semid_t *semidp, mode_t mode, } static int -ksem_get(struct thread *td, semid_t id, cap_rights_t *rightsp, +ksem_get(struct thread *td, semid_t id, const cap_rights_t *rightsp, struct file **fpp) { struct ksem *ks; diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 6121bde4c574..4dca0522f707 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -87,7 +87,7 @@ static int sockargs(struct mbuf **, char *, socklen_t, int); * A reference on the file entry is held upon returning. */ int -getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp, +getsock_cap(struct thread *td, int fd, const cap_rights_t *rightsp, struct file **fpp, struct filecaps *havecapsp) { struct file *fp; @@ -107,7 +107,8 @@ getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp, } int -getsock(struct thread *td, int fd, cap_rights_t *rightsp, struct file **fpp) +getsock(struct thread *td, int fd, const cap_rights_t *rightsp, + struct file **fpp) { struct file *fp; int error; @@ -737,7 +738,7 @@ kern_sendit(struct thread *td, int s, struct msghdr *mp, int flags, struct uio auio; struct iovec *iov; struct socket *so; - cap_rights_t *rights; + const cap_rights_t *rights; #ifdef KTRACE struct uio *ktruio = NULL; #endif diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 6756925416a3..670ceb151468 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -4325,7 +4325,7 @@ out: * semantics. */ int -getvnode_path(struct thread *td, int fd, cap_rights_t *rightsp, +getvnode_path(struct thread *td, int fd, const cap_rights_t *rightsp, struct file **fpp) { struct file *fp; @@ -4363,7 +4363,8 @@ getvnode_path(struct thread *td, int fd, cap_rights_t *rightsp, * A reference on the file entry is held upon returning. */ int -getvnode(struct thread *td, int fd, cap_rights_t *rightsp, struct file **fpp) +getvnode(struct thread *td, int fd, const cap_rights_t *rightsp, + struct file **fpp) { int error; diff --git a/sys/sys/file.h b/sys/sys/file.h index 07f6bbd5bcae..bad161d5d46b 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -257,14 +257,15 @@ extern const struct fileops socketops; extern int maxfiles; /* kernel limit on number of open files */ extern int maxfilesperproc; /* per process limit on number of open files */ -int fget(struct thread *td, int fd, cap_rights_t *rightsp, struct file **fpp); -int fget_mmap(struct thread *td, int fd, cap_rights_t *rightsp, +int fget(struct thread *td, int fd, const cap_rights_t *rightsp, + struct file **fpp); +int fget_mmap(struct thread *td, int fd, const cap_rights_t *rightsp, vm_prot_t *maxprotp, struct file **fpp); -int fget_read(struct thread *td, int fd, cap_rights_t *rightsp, +int fget_read(struct thread *td, int fd, const cap_rights_t *rightsp, struct file **fpp); -int fget_write(struct thread *td, int fd, cap_rights_t *rightsp, +int fget_write(struct thread *td, int fd, const cap_rights_t *rightsp, struct file **fpp); -int fget_fcntl(struct thread *td, int fd, cap_rights_t *rightsp, +int fget_fcntl(struct thread *td, int fd, const cap_rights_t *rightsp, int needfcntl, struct file **fpp); int _fdrop(struct file *fp, struct thread *td); int fget_remote(struct thread *td, struct proc *p, int fd, struct file **fpp); @@ -289,15 +290,15 @@ int file_kcmp_generic(struct file *fp1, struct file *fp2, struct thread *td); void finit(struct file *, u_int, short, void *, const struct fileops *); void finit_vnode(struct file *, u_int, void *, const struct fileops *); -int fgetvp(struct thread *td, int fd, cap_rights_t *rightsp, +int fgetvp(struct thread *td, int fd, const cap_rights_t *rightsp, struct vnode **vpp); -int fgetvp_exec(struct thread *td, int fd, cap_rights_t *rightsp, +int fgetvp_exec(struct thread *td, int fd, const cap_rights_t *rightsp, struct vnode **vpp); -int fgetvp_rights(struct thread *td, int fd, cap_rights_t *needrightsp, +int fgetvp_rights(struct thread *td, int fd, const cap_rights_t *needrightsp, struct filecaps *havecaps, struct vnode **vpp); -int fgetvp_read(struct thread *td, int fd, cap_rights_t *rightsp, +int fgetvp_read(struct thread *td, int fd, const cap_rights_t *rightsp, struct vnode **vpp); -int fgetvp_write(struct thread *td, int fd, cap_rights_t *rightsp, +int fgetvp_write(struct thread *td, int fd, const cap_rights_t *rightsp, struct vnode **vpp); int fgetvp_lookup_smr(struct nameidata *ndp, struct vnode **vpp, bool *fsearch); int fgetvp_lookup(struct nameidata *ndp, struct vnode **vpp); diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h index c0fb4e3834e1..ecb8c58e5d29 100644 --- a/sys/sys/filedesc.h +++ b/sys/sys/filedesc.h @@ -277,22 +277,23 @@ struct filedesc_to_leader * struct filedesc_to_leader * filedesc_to_leader_share(struct filedesc_to_leader *fdtol, struct filedesc *fdp); -int getvnode(struct thread *td, int fd, cap_rights_t *rightsp, +int getvnode(struct thread *td, int fd, const cap_rights_t *rightsp, struct file **fpp); -int getvnode_path(struct thread *td, int fd, cap_rights_t *rightsp, +int getvnode_path(struct thread *td, int fd, const cap_rights_t *rightsp, struct file **fpp); void mountcheckdirs(struct vnode *olddp, struct vnode *newdp); -int fget_cap_noref(struct filedesc *fdp, int fd, cap_rights_t *needrightsp, - struct file **fpp, struct filecaps *havecapsp); -int fget_cap(struct thread *td, int fd, cap_rights_t *needrightsp, +int fget_cap_noref(struct filedesc *fdp, int fd, + const cap_rights_t *needrightsp, struct file **fpp, + struct filecaps *havecapsp); +int fget_cap(struct thread *td, int fd, const cap_rights_t *needrightsp, struct file **fpp, struct filecaps *havecapsp); /* Return a referenced file from an unlocked descriptor. */ -int fget_unlocked(struct thread *td, int fd, cap_rights_t *needrightsp, - struct file **fpp); +int fget_unlocked(struct thread *td, int fd, + const cap_rights_t *needrightsp, struct file **fpp); /* Return a file pointer without a ref. FILEDESC_IS_ONLY_USER must be true. */ -int fget_only_user(struct filedesc *fdp, int fd, cap_rights_t *needrightsp, - struct file **fpp); +int fget_only_user(struct filedesc *fdp, int fd, + const cap_rights_t *needrightsp, struct file **fpp); #define fput_only_user(fdp, fp) ({ \ MPASS(FILEDESC_IS_ONLY_USER(fdp)); \ MPASS(refcount_load(&fp->f_count) > 0); \ diff --git a/sys/sys/namei.h b/sys/sys/namei.h index 5dbf31f6c606..7033e5469240 100644 --- a/sys/sys/namei.h +++ b/sys/sys/namei.h @@ -70,7 +70,7 @@ struct nameidata { */ const char *ni_dirp; /* pathname pointer */ enum uio_seg ni_segflg; /* location of pathname */ - cap_rights_t *ni_rightsneeded; /* rights required to look up vnode */ + const cap_rights_t *ni_rightsneeded; /* rights needed to look up vnode */ /* * Arguments to lookup. */ @@ -244,7 +244,7 @@ int cache_fplookup(struct nameidata *ndp, enum cache_fpl_status *status, #define NDINIT_ALL(ndp, op, flags, segflg, namep, dirfd, startdir, rightsp) \ do { \ struct nameidata *_ndp = (ndp); \ - cap_rights_t *_rightsp = (rightsp); \ + const cap_rights_t *_rightsp = (rightsp); \ MPASS(_rightsp != NULL); \ NDINIT_PREFILL(_ndp); \ NDINIT_DBG(_ndp); \ diff --git a/sys/sys/procdesc.h b/sys/sys/procdesc.h index ca26d65d5417..4e8b06fb7377 100644 --- a/sys/sys/procdesc.h +++ b/sys/sys/procdesc.h @@ -94,8 +94,10 @@ struct procdesc { * In-kernel interfaces to process descriptors. */ int procdesc_exit(struct proc *); -int procdesc_find(struct thread *, int fd, cap_rights_t *, struct proc **); -int kern_pdgetpid(struct thread *, int fd, cap_rights_t *, pid_t *pidp); +int procdesc_find(struct thread *, int fd, const cap_rights_t *, + struct proc **); +int kern_pdgetpid(struct thread *, int fd, const cap_rights_t *, + pid_t *pidp); void procdesc_new(struct proc *, int); void procdesc_finit(struct procdesc *, struct file *); pid_t procdesc_pid(struct file *); diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index 40fdd142525f..1efff4a18bee 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -490,9 +490,9 @@ struct uio; */ int getsockaddr(struct sockaddr **namp, const struct sockaddr *uaddr, size_t len); -int getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp, +int getsock_cap(struct thread *td, int fd, const cap_rights_t *rightsp, struct file **fpp, struct filecaps *havecaps); -int getsock(struct thread *td, int fd, cap_rights_t *rightsp, +int getsock(struct thread *td, int fd, const cap_rights_t *rightsp, struct file **fpp); void soabort(struct socket *so); int soaccept(struct socket *so, struct sockaddr **nam); From nobody Tue Feb 24 16:01:35 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL2XH5YN9z6SPQf for ; Tue, 24 Feb 2026 16:01:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL2XH2sbjz3lbZ for ; Tue, 24 Feb 2026 16:01:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u6iKBQ9qMIAaTrtn79TPhPz4NqIVv31xrC2gVfaMym0=; b=JhNIME2PBHC+puMcPbsTGrG9miv7S32ykPbj0R/LT8wa94Ml6Q2uTt7Iuy/PPS2YZ/EvP9 WAsjTd9jD0zNAFxddXy0pPpk6PSKQvPSEHgCyoW7d/oZYeZrsQ8wMhKX/R6ZKS7JkO23jy VZ7DStZiX2M2Ofkk8hD3ylcJBU7g5qNiLFQI1Vh5DM7N161hRRuyheLJoWd4qE9WFPDzWO vUR+UQtVzDhkBpciEF+e9OFlARuIDYas8qcEu69F/juapRjYRn34QKBUMOj5PrGl+3WBVj E8NjXRobN6jXxgx/Z8Sg27DrJrVeNi8EwcdxtyTrEvQci9ekF3rf9Rpdwt6gDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771948895; a=rsa-sha256; cv=none; b=BFBkQRwdBhvZMyZp0TQ0BKw4Kx4toW7iJvXGXP1m4o4Zzo90ptBaXJWBQ5FklQVqsh+hoV yb+MvvLGjMvlHFgsnpVLnjWsnY09baA4OpGvOlcF8u+VaCNl3r4HNWTGOYtDxvnuLI2dRo pmdq0Zbh+PRHCUVotELOyWUq+/Jutou8IGVZvP1tdIyEEf6sgGzYlL6LLODg7Y6rlxf0A6 oMFILr+JvPAapF4vqtuPjw/ps4aHjSoTn9FwjsRc7K6dXygadwP7iwU2wXpTnO+AEdiG1r jF0FYuMeoKO9BHoFC9il7U3gC8c0Ne8B9qpbpstvYXOaw2rlaQQi0FObB4Lk4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u6iKBQ9qMIAaTrtn79TPhPz4NqIVv31xrC2gVfaMym0=; b=ZSqf7WfjyXFPHUKIPuhaZdAqsQm4Wic707/1TLoUKist4luoxy37tQqIbqO1VtT7s8KIKu bDNGe5IP/eCLhYHAPhO+GamshsdtIMU+slUWFrKQOuxlFnoiuYH+KYXx8OAxIaHBznhrtV yedA7sVDgNJAA7IEwhLKEsILA/jqPAkORl3QHkN56SfK9rMO/9sawfevj2mWHaeFNGKM/E DTUUpEAwLWV7ZuGT9fqSgkF92z+1swFzXTcXHXUllHstuSOti5E5EB4xLishwg7vaqeS1d s0fwl4xQ/rtkrwdHdJ/Czp1h5vVS0gSpApJNxa+Nm3pUlF7MXL87NqKstHWTOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL2XH2Rf5z7GV for ; Tue, 24 Feb 2026 16:01:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27b67 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 16:01:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: d521badafdaa - releng/14.3 - rtsock: Fix stack overflow List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: d521badafdaa846d46157185e3c87d5165aeaa59 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 16:01:35 +0000 Message-Id: <699dcb5f.27b67.55dc77f8@gitrepo.freebsd.org> The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d521badafdaa846d46157185e3c87d5165aeaa59 commit d521badafdaa846d46157185e3c87d5165aeaa59 Author: Mark Johnston AuthorDate: 2026-02-23 15:52:50 +0000 Commit: Mark Johnston CommitDate: 2026-02-23 16:39:30 +0000 rtsock: Fix stack overflow Approved by: so Security: FreeBSD-SA-26:05.route Security: CVE-2026-3038 Fixes: 92be2847e845 ("rtsock: Avoid copying uninitialized padding bytes") (cherry picked from commit cd00cd9f6ed4b6f6e6bb8ae168f2537968991b53) (cherry picked from commit f44d771c2c6c80f3fabd11d335964e1efdf50a21) --- sys/net/rtsock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 8b4e716a0508..cd4363f1c0ce 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1851,8 +1851,8 @@ rtsock_msg_buffer(int type, struct rt_addrinfo *rtinfo, struct walkarg *w, int * #endif dlen = SA_SIZE(sa); if (cp != NULL && buflen >= dlen) { - KASSERT(dlen <= sizeof(ss), - ("%s: sockaddr size overflow", __func__)); + if (sa->sa_len > sizeof(ss)) + return (EINVAL); bzero(&ss, sizeof(ss)); bcopy(sa, &ss, sa->sa_len); sa = (struct sockaddr *)&ss; From nobody Tue Feb 24 16:01:36 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL2XJ5sY7z6SPFQ for ; Tue, 24 Feb 2026 16:01:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL2XJ3LC5z3lQd for ; Tue, 24 Feb 2026 16:01:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MLETRFRc++JwSjosmW3nP/Vi9W+cxaMB/eBsLxBGP4w=; b=bRENNvRj0Iw5DXCxmK0vZR+bWy8r9QPawUoSxAEeLPXVfHl0evBJdf/somiR5tsffYlUSq 5aNO/1/1PMxtX6iSvN/TVBBo67ttKNNTmDVlC1Dl7SEbf56nHZRtOUm8jqBk5F0OJBrrEE cDQy4NDdxZ290zZP1+V3dI8K2nLK/QcUxpNXtPq7vlcAHypGcl5WMnGL9XuGKoRZqOrT1K n/z4KOFJoleOVVNU2WSz6ZeOXf9kEOlF34S7hdmKPcGEyhxiNoh1lTyeLjhsLLaD27mPUS wfX4YqOr7jkMfBl9X4kfC70NUs8tHgTeOvadqUXaYAcJGGp26mjIZaLZfiu7rg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771948896; a=rsa-sha256; cv=none; b=BDpjxT0kDVyjI+EISuXIyQ97ZmHcySKpGjPee6y4Lc+js8R551NUC+3gVonecR9aSpg/T6 z9fh5axlyPB+X4+no7/jdqb5hYQfJm39fh9v5PbXzcCjq2AeufxmG93JQlokVT7oPpa89k JXK3FtljwRR4XOp9b8UPg5+DdMaAf6yqDrkkIxzjR+yq2F7ofnUlDptdcI8rSzF2JMnlcl AcwzfHGHFZhOpaTs4N1idg2oP7MQ+tJ5jfPXg4Ks/bdMDyogxRkiokS3spIxv6QjWSuTKl 20ExbbdZ4ea8Y079rwcwmQabN4J21D+gkSXLLspi8gtxB5BVjABTLh10ZhY8bA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MLETRFRc++JwSjosmW3nP/Vi9W+cxaMB/eBsLxBGP4w=; b=Wl+h0nODexXVUN2zr/IO2+YdZwPgJ5lq4XrwyNp6mnAngktDeY6EenWrMlPVSahaMO57PQ HBsTvzLW3hlY1wyiXhk6fOymIzuPAqV6MLSb/FtsmVlHVaNzid/27IRmH1G1PVX7n+4/sZ wae6W93x0jQxlViBVXhT0q66wzsq/DMe5UqCaqxbZxyN814XHK968diVYejBsvepMnf/J3 lkt84DdePhMn2uzd9TdkhHgfa6CmLQD8SeY8A7xEjn3iScGNYCTzl2Q2IXL2CH9XCIKict rzkBB7RHOTB48CTg/S5gofQvngbP6StNTtzQ9bafRYb1mYOr0XkX9qhryWDjeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL2XJ2tCZz7Fc for ; Tue, 24 Feb 2026 16:01:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27887 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 16:01:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 24c55170cef4 - releng/14.3 - Add UPDATING entries and bump version List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: 24c55170cef490616ad4b9262a39e1c5c47b8d0f Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 16:01:36 +0000 Message-Id: <699dcb60.27887.7eaaa745@gitrepo.freebsd.org> The branch releng/14.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=24c55170cef490616ad4b9262a39e1c5c47b8d0f commit 24c55170cef490616ad4b9262a39e1c5c47b8d0f Author: Mark Johnston AuthorDate: 2026-02-24 15:56:57 +0000 Commit: Mark Johnston CommitDate: 2026-02-24 15:56:57 +0000 Add UPDATING entries and bump version Approved by: so --- UPDATING | 8 ++++++++ sys/conf/newvers.sh | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 300b4519af5b..328fd425b883 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,14 @@ 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. +20250224: + 14.3-RELEASE-p9 SA-26:04.jail + SA-26:05.route + + Jail chroot escape via fd exchange with a different jail. [SA-26:04.jail] + + Local DoS and possible privilege escalation via routing sockets. [SA-26:05.route] + 20250127: 14.3-RELEASE-p8 SA-26:01.openssl SA-26:02.jail diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 094db9aa02bd..6f6d7ac69d2c 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="14.3" -BRANCH="RELEASE-p8" +BRANCH="RELEASE-p9" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Tue Feb 24 16:02:31 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL2YN1hW5z6SPq0 for ; Tue, 24 Feb 2026 16:02:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL2YM4wQFz3nck for ; Tue, 24 Feb 2026 16:02:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=07VYIbPxmxXGsuYIqvCJvV+q3Ez2360DTdBlieyC6XM=; b=ikAx1fojzkIXnha9fuXBH5YGWsXF6zQNnKRx5TaJCZZ8gk7te3OVDuuxp+26KzAILM05tg 3KdcQrZFR1+jTh1cWtt/sjr9C9fwtMaZKEs6HdkqxlsRZKS06rxm+Z/9ovQx9x/BeF6+hd Y7oWo8XwZ0gsCjE+IVWcn42Am46O3zSdXXiOArXdgpSv541COykkbGAzUrgSvBp0oYyV+c ppMSW38CmlOEQuOWt0WMnWRwEbJOImk14gdCVNh76AOnjIt8RenaOR8iHFw/oQLJBA0bc9 ciglMKb5QN7iybbQynluLPUfl+ZB+W10w79p5Ain5eGInoLDrv45Rrp6aE7KFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771948951; a=rsa-sha256; cv=none; b=MWH0pLxhX3xA7mOTKFm3Xk6jw2SCTn9yumNSjri8ZJGZFHbGYB+wDWeOBDoE2grDq2Yex7 SggyV+pipHAHleFluA7MRg9MuXs3w2hOF29Yk0VrX+a4Xth3Fno20p/55pBrnDAJZuVD9c H3CAUkd80lMG13Pf6ZGaRMihcnF9A6j0JYNCy8znfnU7tYdakeJfIbtx/eQDRSOmmJNusN LE7924+j06/tp80Y3sOsgZjFlFosUxUYvVSO1qxbBOYXUQuNrKbfL56FizLarUQeyynUlD 8SyWn5kIP99PgRJcQfXewBllPTV0UXBb+d74IjYBK4ySo6kGghC9ogWebLdOew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=07VYIbPxmxXGsuYIqvCJvV+q3Ez2360DTdBlieyC6XM=; b=F9Lu/LdA2lEDwLQH1/NSBKt+ly2WRa9QMtLnf6DFwqCAqixpmRrpCkAI25Gn5H9po5jB5y ahxrkSYviU+oE0/z13wZqBkObMFBFDzcqFuGA09Ii7GdtQqxG61KxlvsIJpLRBT7Mom/c+ TbTD7Kd2BMoLkJ4iXvNHSkgjv66Eh04cvs8h2LrL3u6tgsNzguDdL2tLrb828hR/uBhpSJ pwrtmHPcDRKhNi2Xlchmq/ILHQMTQNfOGedai0VBFGsFn6aqzXVUOKR8H69wKV/x8APyzV 5LWtKul11aP/pHt7GGgbCaxxRIQPPZsGUzjmO3lJBMMCvASna2AwVVDU2uMQrg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL2YM4LZpz7G4 for ; Tue, 24 Feb 2026 16:02:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27b9c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 16:02:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 7465d0b094b7 - releng/14.4 - rtsock: Fix stack overflow List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.4 X-Git-Reftype: branch X-Git-Commit: 7465d0b094b7ad8a41ba1df8305c4a8aaa83eb4b Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 16:02:31 +0000 Message-Id: <699dcb97.27b9c.1e83b993@gitrepo.freebsd.org> The branch releng/14.4 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7465d0b094b7ad8a41ba1df8305c4a8aaa83eb4b commit 7465d0b094b7ad8a41ba1df8305c4a8aaa83eb4b Author: Mark Johnston AuthorDate: 2026-02-23 15:52:50 +0000 Commit: Mark Johnston CommitDate: 2026-02-24 16:02:21 +0000 rtsock: Fix stack overflow Approved by: so Approved by: re (cperciva) Security: FreeBSD-SA-26:05.route Security: CVE-2026-3038 Fixes: 92be2847e845 ("rtsock: Avoid copying uninitialized padding bytes") (cherry picked from commit f3be7df50f01d9a6ead9f27b55bb4dfd7dc4f9d2) (cherry picked from commit 1eb2beb3686c50a870ed7688f753f89dd0f0ab3e) --- sys/net/rtsock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index bc70c600e3ab..e3116b8ee4b5 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1851,8 +1851,8 @@ rtsock_msg_buffer(int type, struct rt_addrinfo *rtinfo, struct walkarg *w, int * #endif dlen = SA_SIZE(sa); if (cp != NULL && buflen >= dlen) { - KASSERT(dlen <= sizeof(ss), - ("%s: sockaddr size overflow", __func__)); + if (sa->sa_len > sizeof(ss)) + return (EINVAL); bzero(&ss, sizeof(ss)); bcopy(sa, &ss, sa->sa_len); sa = (struct sockaddr *)&ss; From nobody Tue Feb 24 16:03:17 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL2ZG1D9Nz6SPr3 for ; Tue, 24 Feb 2026 16:03:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL2ZF6wKhz3pBd for ; Tue, 24 Feb 2026 16:03:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dt7oNro1In8aryYPz6eLxPZi5cPnuoo1pDx45b/kqfI=; b=crPvkQ9WHhuxdPoYxBPPC2hxMzEDHufVFrNnN4otRaX5dJGjmB2qf3ihRzbjosaR1Z9ufB qhZ7MZWgDSgH+lUZ6xnJu6NVhkFeYN4rJ2ca1HRjaP9oyrNSVcLX/QJIfVYGVmEd6Qz7Rs Ol98qKGgvm+SVVgjweEIk2Sw113YW56dwl+oe1Fzf1vz7uSyvZhXC/gRjxExlA9WshmEI5 tbUzexnD6bXGB9G5ltvEwsrdEr45NADxGhGqIms/b3FwFzfdoZ9mFBhmebIMKr4R5t8FvY fm4hle/del4v1ikRO21+6eEJiZ8uyYBZRkt/t5/gQf+4IfCe/BJQOco7vJlS1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771948998; a=rsa-sha256; cv=none; b=K1ZKOY6S3SDMbnRzDezbvEAra1z9r7SdPjlr8dkC9xNHuF0J0bXfhe24xtKIPfayZJQWs8 kH/GL+Lx1l9GyIIQXHt0p3i4vGwLiNPDBHhOWqFwEvm4HUma42zVdWbyk1L1SK8X+K5YxF MChHNaxLiqW+PzolWc1Xr13dFaVbJJ/60nJRFBKIewt+p0r9rBEBBHgj6Kkf4Qlk09K4C3 lOl+o5fGuSnwujGGulb7HXOPG9DiE//ygpqyCUier81bLxcsqwJf5qqKpEB76hSe0Uz6wh CETAYQQdSUghN3azVX2OISd2jipvoz11SrkBIu5ZSFLYSXrBrR535IeGbtTuBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771948998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dt7oNro1In8aryYPz6eLxPZi5cPnuoo1pDx45b/kqfI=; b=fXM6JB/xUwtkPMSsHKzRwSxJnebUBqpHE5VOQotOHsqZTRB7ZygUw56i8F3bvJsEZhQXu9 e9GCRQsX+g2Ncs0QTgiWg4ycgdp210LXuRzA8uErkgEgkp4xGN1YUdFPpB+19vUKpso46D vdG88QLnzhAtdP5a8OvnCiqzyIYr8TcFxkhMeSBmXh4JHdppfZ3GrMSZ/TnJStruaCbSpK qGdVXD6OX1nw86qVNWh4LPN1hvs4Y8yB2gDkGPdTmGt2bpBWAwTRbxba+HH75RhxBg7dmA 67u1JEBCKmoB3TNeXaU9XqH67wdC3N5RuIkmMoHoTKSF3m7MgkQ0mt9RlDs0hA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL2ZF6GZhz6ZB for ; Tue, 24 Feb 2026 16:03:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26640 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 16:03:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 8b476ffc4ea3 - stable/13 - rtsock: Fix stack overflow List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8b476ffc4ea3f82f758714fee0289209bc980782 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 16:03:17 +0000 Message-Id: <699dcbc5.26640.7b0d3479@gitrepo.freebsd.org> The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8b476ffc4ea3f82f758714fee0289209bc980782 commit 8b476ffc4ea3f82f758714fee0289209bc980782 Author: Mark Johnston AuthorDate: 2026-02-23 15:52:50 +0000 Commit: Mark Johnston CommitDate: 2026-02-24 16:03:14 +0000 rtsock: Fix stack overflow Approved by: so Security: FreeBSD-SA-26:05.route Security: CVE-2026-3038 Fixes: 92be2847e845 ("rtsock: Avoid copying uninitialized padding bytes") (cherry picked from commit f3be7df50f01d9a6ead9f27b55bb4dfd7dc4f9d2) --- sys/net/rtsock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index d78a60070615..24b9007a987f 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1885,8 +1885,8 @@ rtsock_msg_buffer(int type, struct rt_addrinfo *rtinfo, struct walkarg *w, int * #endif dlen = SA_SIZE(sa); if (cp != NULL && buflen >= dlen) { - KASSERT(dlen <= sizeof(ss), - ("%s: sockaddr size overflow", __func__)); + if (sa->sa_len > sizeof(ss)) + return (EINVAL); bzero(&ss, sizeof(ss)); bcopy(sa, &ss, sa->sa_len); sa = (struct sockaddr *)&ss; From nobody Tue Feb 24 16:04:40 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL2br19wvz6SPYV for ; Tue, 24 Feb 2026 16:04:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL2br0Y9Fz3pZH for ; Tue, 24 Feb 2026 16:04:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771949080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qKJaz+3jO7EalaspAUuPuCpBrSSkvaQ/Gan2Gecq4uI=; b=TDUM+1/pMfYeV1BRGZnmpDPLALzxztcnwGGlDOogE9kh8az6pC1JZQBL3eM/9t1CSGOYDe nU/jrMxcu5AoG4umRESvXxmTd0uPikhOxJ67jLiMl5Wnj+XYRbT6Gn8GKe0mFZo1YSs42A /5xDraMO9cFOAm9i589B+gTmTyRPyUrfbbL6QoyfQ/zIRNiLb2TvLFZy7p+jxZBhmA+dxS bOQDIFAPWj/J71W3xw80V5qdKZZOiGbIjJiMZTarVDkewgFEKhh23XHBJvWUvYdgDmybc7 RniKLuMa3pJceKxEs0W8Je1XpsbTm26l5WQ72yU3oJ5hjToKFerZ1+tuC99SHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771949080; a=rsa-sha256; cv=none; b=Ec5JZBUiBxwgzdN7/TEEBs1eAxK7GIy7Rt0EIDtGIiwhYc1z/KCP6+hniyRmwoemnehF98 TxRy/RXmGcEB4RKJS31o6KL0Vh94m1GhyVZiD04bYFquD28DsU+5YOCYNTU0kMe3vtupkh k8ZDxMDdKmdJgdsvzGFmlrDlyhYnu8vIBcY7UBLPiV/4EnDII0ItSHc3j/71asFTIGOLFe LXgPUwy4Fk/HNBX0UDWeOatRt1wt78j2xletZn7Rx9/9aTmno9OoUqYI24pRh7TCivaH5d EaBEHnumOQmy4VtHeYpbp+Y7q+AUOMZ0fOZhETihF2MmbWxwj/v2Hv0r2J6lTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771949080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qKJaz+3jO7EalaspAUuPuCpBrSSkvaQ/Gan2Gecq4uI=; b=vOoMTylsoFkq2AwIL0qDQhbe1mxhcv9UprXnbXJMLMXjwYEVU+RT5MPS0uTJWpcc6qual8 NOTEPPjNoMFPBNHLbfeuDv5I0dxPpeaU13xPXP2X9428MU8H9Gv7M+KfjLNU8uNIp4hb3x i8SIZBn3qfqONsWvJWynh+FJB/LzSRfi2soxe9glbrJ18Jy2jUDzYw0T3WYqFuUqzRsAVU BHDxe0ud5RLKHYkhzpAaHZQ7Les8O8f2s5cVCoCT3hCASUeJlc3tSzi9dNhpcu7taJ22q3 qgFVocb/ILsQxAjuAHNm0WCx6xAGCEiRtQuBqYCAWD4/RPAIDTTKdAVS34pswg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL2br07CVz6ZC for ; Tue, 24 Feb 2026 16:04:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27ea0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 16:04:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 0b18e4842c9d - releng/13.5 - file: Qualify pointers to capsicum rights as const List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.5 X-Git-Reftype: branch X-Git-Commit: 0b18e4842c9df9caefac5f5d8fd8f4fbd5b29901 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 16:04:40 +0000 Message-Id: <699dcc18.27ea0.735a0a09@gitrepo.freebsd.org> The branch releng/13.5 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0b18e4842c9df9caefac5f5d8fd8f4fbd5b29901 commit 0b18e4842c9df9caefac5f5d8fd8f4fbd5b29901 Author: Mark Johnston AuthorDate: 2025-05-20 20:19:30 +0000 Commit: Mark Johnston CommitDate: 2026-02-09 23:11:00 +0000 file: Qualify pointers to capsicum rights as const File descriptor lookup routines typically take a set of capsicum rights as input to the lookup, so that the fd's rights can be atomically checked. This set should be qualified with const. No functional change intended. Approved by: so Reviewed by: olce, oshogbo, brooks, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D50419 (cherry picked from commit 5319cb21610ad947c56fd0cd4f18ef5b58bc8db7) (cherry picked from commit ecc1e61d31407680c9acee9c7adcf2ca2aa21432) --- sys/kern/kern_descrip.c | 48 +++++++++++++++++++++++++++--------------------- sys/kern/sys_procdesc.c | 5 +++-- sys/kern/uipc_mqueue.c | 5 +++-- sys/kern/uipc_sem.c | 6 +++--- sys/kern/uipc_syscalls.c | 4 ++-- sys/kern/vfs_syscalls.c | 5 +++-- sys/sys/file.h | 21 +++++++++++---------- sys/sys/filedesc.h | 19 ++++++++++--------- sys/sys/namei.h | 4 ++-- sys/sys/procdesc.h | 6 ++++-- sys/sys/socketvar.h | 2 +- 11 files changed, 69 insertions(+), 56 deletions(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index f51a1092114d..f37eab12da70 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -114,7 +114,8 @@ static void fdgrowtable_exp(struct filedesc *fdp, int nfd); static void fdunused(struct filedesc *fdp, int fd); static void fdused(struct filedesc *fdp, int fd); static int fget_unlocked_seq(struct filedesc *fdp, int fd, - cap_rights_t *needrightsp, struct file **fpp, seqc_t *seqp); + const cap_rights_t *needrightsp, struct file **fpp, + seqc_t *seqp); static int getmaxfd(struct thread *td); static u_long *filecaps_copy_prep(const struct filecaps *src); static void filecaps_copy_finish(const struct filecaps *src, @@ -2978,7 +2979,7 @@ finit_vnode(struct file *fp, u_int flag, void *data, struct fileops *ops) } int -fget_cap_locked(struct filedesc *fdp, int fd, cap_rights_t *needrightsp, +fget_cap_locked(struct filedesc *fdp, int fd, const cap_rights_t *needrightsp, struct file **fpp, struct filecaps *havecapsp) { struct filedescent *fde; @@ -3010,7 +3011,7 @@ out: } int -fget_cap(struct thread *td, int fd, cap_rights_t *needrightsp, +fget_cap(struct thread *td, int fd, const cap_rights_t *needrightsp, struct file **fpp, struct filecaps *havecapsp) { struct filedesc *fdp = td->td_proc->p_fd; @@ -3256,7 +3257,7 @@ out_free: } static int -fget_unlocked_seq(struct filedesc *fdp, int fd, cap_rights_t *needrightsp, +fget_unlocked_seq(struct filedesc *fdp, int fd, const cap_rights_t *needrightsp, struct file **fpp, seqc_t *seqp) { #ifdef CAPABILITIES @@ -3339,7 +3340,7 @@ fget_unlocked_seq(struct filedesc *fdp, int fd, cap_rights_t *needrightsp, * racing with itself. */ int -fget_unlocked(struct filedesc *fdp, int fd, cap_rights_t *needrightsp, +fget_unlocked(struct filedesc *fdp, int fd, const cap_rights_t *needrightsp, struct file **fpp) { #ifdef CAPABILITIES @@ -3406,7 +3407,7 @@ out_fallback: */ #ifdef CAPABILITIES int -fget_only_user(struct filedesc *fdp, int fd, cap_rights_t *needrightsp, +fget_only_user(struct filedesc *fdp, int fd, const cap_rights_t *needrightsp, struct file **fpp) { const struct filedescent *fde; @@ -3436,7 +3437,7 @@ fget_only_user(struct filedesc *fdp, int fd, cap_rights_t *needrightsp, } #else int -fget_only_user(struct filedesc *fdp, int fd, cap_rights_t *needrightsp, +fget_only_user(struct filedesc *fdp, int fd, const cap_rights_t *needrightsp, struct file **fpp) { struct file *fp; @@ -3472,7 +3473,7 @@ fget_only_user(struct filedesc *fdp, int fd, cap_rights_t *needrightsp, */ static __inline int _fget(struct thread *td, int fd, struct file **fpp, int flags, - cap_rights_t *needrightsp) + const cap_rights_t *needrightsp) { struct filedesc *fdp; struct file *fp; @@ -3520,15 +3521,15 @@ _fget(struct thread *td, int fd, struct file **fpp, int flags, } int -fget(struct thread *td, int fd, cap_rights_t *rightsp, struct file **fpp) +fget(struct thread *td, int fd, const cap_rights_t *rightsp, struct file **fpp) { return (_fget(td, fd, fpp, 0, rightsp)); } int -fget_mmap(struct thread *td, int fd, cap_rights_t *rightsp, vm_prot_t *maxprotp, - struct file **fpp) +fget_mmap(struct thread *td, int fd, const cap_rights_t *rightsp, + vm_prot_t *maxprotp, struct file **fpp) { int error; #ifndef CAPABILITIES @@ -3571,22 +3572,24 @@ fget_mmap(struct thread *td, int fd, cap_rights_t *rightsp, vm_prot_t *maxprotp, } int -fget_read(struct thread *td, int fd, cap_rights_t *rightsp, struct file **fpp) +fget_read(struct thread *td, int fd, const cap_rights_t *rightsp, + struct file **fpp) { return (_fget(td, fd, fpp, FREAD, rightsp)); } int -fget_write(struct thread *td, int fd, cap_rights_t *rightsp, struct file **fpp) +fget_write(struct thread *td, int fd, const cap_rights_t *rightsp, + struct file **fpp) { return (_fget(td, fd, fpp, FWRITE, rightsp)); } int -fget_fcntl(struct thread *td, int fd, cap_rights_t *rightsp, int needfcntl, - struct file **fpp) +fget_fcntl(struct thread *td, int fd, const cap_rights_t *rightsp, + int needfcntl, struct file **fpp) { struct filedesc *fdp = td->td_proc->p_fd; #ifndef CAPABILITIES @@ -3624,7 +3627,7 @@ fget_fcntl(struct thread *td, int fd, cap_rights_t *rightsp, int needfcntl, * XXX: what about the unused flags ? */ static __inline int -_fgetvp(struct thread *td, int fd, int flags, cap_rights_t *needrightsp, +_fgetvp(struct thread *td, int fd, int flags, const cap_rights_t *needrightsp, struct vnode **vpp) { struct file *fp; @@ -3646,14 +3649,15 @@ _fgetvp(struct thread *td, int fd, int flags, cap_rights_t *needrightsp, } int -fgetvp(struct thread *td, int fd, cap_rights_t *rightsp, struct vnode **vpp) +fgetvp(struct thread *td, int fd, const cap_rights_t *rightsp, + struct vnode **vpp) { return (_fgetvp(td, fd, 0, rightsp, vpp)); } int -fgetvp_rights(struct thread *td, int fd, cap_rights_t *needrightsp, +fgetvp_rights(struct thread *td, int fd, const cap_rights_t *needrightsp, struct filecaps *havecaps, struct vnode **vpp) { struct filecaps caps; @@ -3685,14 +3689,16 @@ out: } int -fgetvp_read(struct thread *td, int fd, cap_rights_t *rightsp, struct vnode **vpp) +fgetvp_read(struct thread *td, int fd, const cap_rights_t *rightsp, + struct vnode **vpp) { return (_fgetvp(td, fd, FREAD, rightsp, vpp)); } int -fgetvp_exec(struct thread *td, int fd, cap_rights_t *rightsp, struct vnode **vpp) +fgetvp_exec(struct thread *td, int fd, const cap_rights_t *rightsp, + struct vnode **vpp) { return (_fgetvp(td, fd, FEXEC, rightsp, vpp)); @@ -3700,7 +3706,7 @@ fgetvp_exec(struct thread *td, int fd, cap_rights_t *rightsp, struct vnode **vpp #ifdef notyet int -fgetvp_write(struct thread *td, int fd, cap_rights_t *rightsp, +fgetvp_write(struct thread *td, int fd, const cap_rights_t *rightsp, struct vnode **vpp) { diff --git a/sys/kern/sys_procdesc.c b/sys/kern/sys_procdesc.c index aab7b1616594..4665dc2c0421 100644 --- a/sys/kern/sys_procdesc.c +++ b/sys/kern/sys_procdesc.c @@ -121,7 +121,7 @@ static struct fileops procdesc_ops = { * died. */ int -procdesc_find(struct thread *td, int fd, cap_rights_t *rightsp, +procdesc_find(struct thread *td, int fd, const cap_rights_t *rightsp, struct proc **p) { struct procdesc *pd; @@ -168,7 +168,8 @@ procdesc_pid(struct file *fp_procdesc) * Retrieve the PID associated with a process descriptor. */ int -kern_pdgetpid(struct thread *td, int fd, cap_rights_t *rightsp, pid_t *pidp) +kern_pdgetpid(struct thread *td, int fd, const cap_rights_t *rightsp, + pid_t *pidp) { struct file *fp; int error; diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index 6f14f071588d..926a9d311b67 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -2160,13 +2160,14 @@ sys_kmq_unlink(struct thread *td, struct kmq_unlink_args *uap) return (error); } -typedef int (*_fgetf)(struct thread *, int, cap_rights_t *, struct file **); +typedef int (*_fgetf)(struct thread *, int, const cap_rights_t *, + struct file **); /* * Get message queue by giving file slot */ static int -_getmq(struct thread *td, int fd, cap_rights_t *rightsp, _fgetf func, +_getmq(struct thread *td, int fd, const cap_rights_t *rightsp, _fgetf func, struct file **fpp, struct mqfs_node **ppn, struct mqueue **pmq) { struct mqfs_node *pn; diff --git a/sys/kern/uipc_sem.c b/sys/kern/uipc_sem.c index 7cb25749ad9c..9871c0528338 100644 --- a/sys/kern/uipc_sem.c +++ b/sys/kern/uipc_sem.c @@ -123,8 +123,8 @@ static int ksem_create(struct thread *td, const char *path, semid_t *semidp, mode_t mode, unsigned int value, int flags, int compat32); static void ksem_drop(struct ksem *ks); -static int ksem_get(struct thread *td, semid_t id, cap_rights_t *rightsp, - struct file **fpp); +static int ksem_get(struct thread *td, semid_t id, + const cap_rights_t *rightsp, struct file **fpp); static struct ksem *ksem_hold(struct ksem *ks); static void ksem_insert(char *path, Fnv32_t fnv, struct ksem *ks); static struct ksem *ksem_lookup(char *path, Fnv32_t fnv); @@ -588,7 +588,7 @@ ksem_create(struct thread *td, const char *name, semid_t *semidp, mode_t mode, } static int -ksem_get(struct thread *td, semid_t id, cap_rights_t *rightsp, +ksem_get(struct thread *td, semid_t id, const cap_rights_t *rightsp, struct file **fpp) { struct ksem *ks; diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index ef3ebeb58176..336a0dd77d5c 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -91,7 +91,7 @@ static int sockargs(struct mbuf **, char *, socklen_t, int); * A reference on the file entry is held upon returning. */ int -getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp, +getsock_cap(struct thread *td, int fd, const cap_rights_t *rightsp, struct file **fpp, u_int *fflagp, struct filecaps *havecapsp) { struct file *fp; @@ -727,7 +727,7 @@ kern_sendit(struct thread *td, int s, struct msghdr *mp, int flags, struct uio auio; struct iovec *iov; struct socket *so; - cap_rights_t *rights; + const cap_rights_t *rights; #ifdef KTRACE struct uio *ktruio = NULL; #endif diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 7dcdaa66adb8..51f26b843c45 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -4315,7 +4315,7 @@ out: * semantics. */ int -getvnode_path(struct thread *td, int fd, cap_rights_t *rightsp, +getvnode_path(struct thread *td, int fd, const cap_rights_t *rightsp, struct file **fpp) { struct file *fp; @@ -4353,7 +4353,8 @@ getvnode_path(struct thread *td, int fd, cap_rights_t *rightsp, * A reference on the file entry is held upon returning. */ int -getvnode(struct thread *td, int fd, cap_rights_t *rightsp, struct file **fpp) +getvnode(struct thread *td, int fd, const cap_rights_t *rightsp, + struct file **fpp) { int error; diff --git a/sys/sys/file.h b/sys/sys/file.h index 9ae31974745a..4c0ec276c700 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -251,14 +251,15 @@ extern struct fileops socketops; extern int maxfiles; /* kernel limit on number of open files */ extern int maxfilesperproc; /* per process limit on number of open files */ -int fget(struct thread *td, int fd, cap_rights_t *rightsp, struct file **fpp); -int fget_mmap(struct thread *td, int fd, cap_rights_t *rightsp, +int fget(struct thread *td, int fd, const cap_rights_t *rightsp, + struct file **fpp); +int fget_mmap(struct thread *td, int fd, const cap_rights_t *rightsp, vm_prot_t *maxprotp, struct file **fpp); -int fget_read(struct thread *td, int fd, cap_rights_t *rightsp, +int fget_read(struct thread *td, int fd, const cap_rights_t *rightsp, struct file **fpp); -int fget_write(struct thread *td, int fd, cap_rights_t *rightsp, +int fget_write(struct thread *td, int fd, const cap_rights_t *rightsp, struct file **fpp); -int fget_fcntl(struct thread *td, int fd, cap_rights_t *rightsp, +int fget_fcntl(struct thread *td, int fd, const cap_rights_t *rightsp, int needfcntl, struct file **fpp); int _fdrop(struct file *fp, struct thread *td); int fget_remote(struct thread *td, struct proc *p, int fd, struct file **fpp); @@ -281,15 +282,15 @@ int file_kcmp_generic(struct file *fp1, struct file *fp2, struct thread *td); void finit(struct file *, u_int, short, void *, struct fileops *); void finit_vnode(struct file *, u_int, void *, struct fileops *); -int fgetvp(struct thread *td, int fd, cap_rights_t *rightsp, +int fgetvp(struct thread *td, int fd, const cap_rights_t *rightsp, struct vnode **vpp); -int fgetvp_exec(struct thread *td, int fd, cap_rights_t *rightsp, +int fgetvp_exec(struct thread *td, int fd, const cap_rights_t *rightsp, struct vnode **vpp); -int fgetvp_rights(struct thread *td, int fd, cap_rights_t *needrightsp, +int fgetvp_rights(struct thread *td, int fd, const cap_rights_t *needrightsp, struct filecaps *havecaps, struct vnode **vpp); -int fgetvp_read(struct thread *td, int fd, cap_rights_t *rightsp, +int fgetvp_read(struct thread *td, int fd, const cap_rights_t *rightsp, struct vnode **vpp); -int fgetvp_write(struct thread *td, int fd, cap_rights_t *rightsp, +int fgetvp_write(struct thread *td, int fd, const cap_rights_t *rightsp, struct vnode **vpp); int fgetvp_lookup_smr(int fd, struct nameidata *ndp, struct vnode **vpp, bool *fsearch); int fgetvp_lookup(int fd, struct nameidata *ndp, struct vnode **vpp); diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h index 9055f0a785e7..bf7a27e37161 100644 --- a/sys/sys/filedesc.h +++ b/sys/sys/filedesc.h @@ -267,22 +267,23 @@ struct filedesc_to_leader * struct filedesc_to_leader * filedesc_to_leader_share(struct filedesc_to_leader *fdtol, struct filedesc *fdp); -int getvnode(struct thread *td, int fd, cap_rights_t *rightsp, +int getvnode(struct thread *td, int fd, const cap_rights_t *rightsp, struct file **fpp); -int getvnode_path(struct thread *td, int fd, cap_rights_t *rightsp, +int getvnode_path(struct thread *td, int fd, const cap_rights_t *rightsp, struct file **fpp); void mountcheckdirs(struct vnode *olddp, struct vnode *newdp); -int fget_cap_locked(struct filedesc *fdp, int fd, cap_rights_t *needrightsp, - struct file **fpp, struct filecaps *havecapsp); -int fget_cap(struct thread *td, int fd, cap_rights_t *needrightsp, +int fget_cap_locked(struct filedesc *fdp, int fd, + const cap_rights_t *needrightsp, struct file **fpp, + struct filecaps *havecapsp); +int fget_cap(struct thread *td, int fd, const cap_rights_t *needrightsp, struct file **fpp, struct filecaps *havecapsp); /* Return a referenced file from an unlocked descriptor. */ -int fget_unlocked(struct filedesc *fdp, int fd, cap_rights_t *needrightsp, - struct file **fpp); +int fget_unlocked(struct filedesc *fdp, int fd, + const cap_rights_t *needrightsp, struct file **fpp); /* Return a file pointer without a ref. FILEDESC_IS_ONLY_USER must be true. */ -int fget_only_user(struct filedesc *fdp, int fd, cap_rights_t *needrightsp, - struct file **fpp); +int fget_only_user(struct filedesc *fdp, int fd, + const cap_rights_t *needrightsp, struct file **fpp); #define fput_only_user(fdp, fp) ({ \ MPASS(FILEDESC_IS_ONLY_USER(fdp)); \ MPASS(refcount_load(&fp->f_count) > 0); \ diff --git a/sys/sys/namei.h b/sys/sys/namei.h index 2eb5d49afa62..8ae9f0d786d6 100644 --- a/sys/sys/namei.h +++ b/sys/sys/namei.h @@ -72,7 +72,7 @@ struct nameidata { */ const char *ni_dirp; /* pathname pointer */ enum uio_seg ni_segflg; /* location of pathname */ - cap_rights_t *ni_rightsneeded; /* rights required to look up vnode */ + const cap_rights_t *ni_rightsneeded; /* rights needed to look up vnode */ /* * Arguments to lookup. */ @@ -250,7 +250,7 @@ int cache_fplookup(struct nameidata *ndp, enum cache_fpl_status *status, #define NDINIT_ALL(ndp, op, flags, segflg, namep, dirfd, startdir, rightsp, td) \ do { \ struct nameidata *_ndp = (ndp); \ - cap_rights_t *_rightsp = (rightsp); \ + const cap_rights_t *_rightsp = (rightsp); \ MPASS(_rightsp != NULL); \ NDINIT_PREFILL(_ndp); \ NDINIT_DBG(_ndp); \ diff --git a/sys/sys/procdesc.h b/sys/sys/procdesc.h index ca26d65d5417..4e8b06fb7377 100644 --- a/sys/sys/procdesc.h +++ b/sys/sys/procdesc.h @@ -94,8 +94,10 @@ struct procdesc { * In-kernel interfaces to process descriptors. */ int procdesc_exit(struct proc *); -int procdesc_find(struct thread *, int fd, cap_rights_t *, struct proc **); -int kern_pdgetpid(struct thread *, int fd, cap_rights_t *, pid_t *pidp); +int procdesc_find(struct thread *, int fd, const cap_rights_t *, + struct proc **); +int kern_pdgetpid(struct thread *, int fd, const cap_rights_t *, + pid_t *pidp); void procdesc_new(struct proc *, int); void procdesc_finit(struct procdesc *, struct file *); pid_t procdesc_pid(struct file *); diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index e7ad086818f4..d2b5ac867a46 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -418,7 +418,7 @@ struct uio; */ int getsockaddr(struct sockaddr **namp, const struct sockaddr *uaddr, size_t len); -int getsock_cap(struct thread *td, int fd, cap_rights_t *rightsp, +int getsock_cap(struct thread *td, int fd, const cap_rights_t *rightsp, struct file **fpp, u_int *fflagp, struct filecaps *havecaps); void soabort(struct socket *so); int soaccept(struct socket *so, struct sockaddr **nam); From nobody Tue Feb 24 16:04:41 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL2bs42r0z6SPTb for ; Tue, 24 Feb 2026 16:04:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL2bs1TMJz3plN for ; Tue, 24 Feb 2026 16:04:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771949081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=45SaOOZPgBl9yy6q0NBei8U/DMAIVTi87hD3+URpI3E=; b=I7Dz4jLZdTHSoE0mrKuLG/wdLPXpXdyLwaJakHKLjO8HBNzYa+YlqU0A5m1P/YianS1ak0 5wNvKFzswWA1RVcF/u7Aw8vFNd88kz264A60FG8BkRXEv1QYHAQvhYinoeCyqLlDdzs0CX 3rVlhRw2xoID41WDi8PxFPYMcOds9/KfqVvwUJDY8/zdmc0wyBwjUejjmYjKGH6a218DIW LGcbSoiFx8tQ7vxSS+B1XMp9a9yi+WmlzICPp55EtsnJ9Oml7hkzut0sJWYDX2WVbkubj7 hUv/DAEhjY1ZDCZ4oVAJcsjI/ewSsxYWt5SVOg/qveYVVwy6MKdRSju2ES0xZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771949081; a=rsa-sha256; cv=none; b=ovaPfurwb8vBo7uFeZ7njLXBAcVnknn/HSaRtSslcuMeUpUiJJzTjDdAArEp+iMEQNvxbn nwRRjm6D9mMq1ob+PoVz/bQv/hrTS1ZUyoCHHtUHUk8arqNV9RYYFUU9PG8wJM3JVc03yd asumjl0jk44wPHwScdOQjDuRy8MCFOHDtCfzRhUel30YcpnuqXSF4YCsdNeKXoDrXdtXoS /ipRu8WBelU0yduSocQY33+dwMfRfhq8Tj8NwTDMNoqrLP5nGDuJ6tYPaVly7SirTc/+FA tPiFwu3nhsCVW9Tfgr79/dFIjvLAwjCQiegsNKV1eHorOcED3nMg3SpST3Dytw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771949081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=45SaOOZPgBl9yy6q0NBei8U/DMAIVTi87hD3+URpI3E=; b=lwSrGHGaIzxQ+QXwuS2nLuKM2yc+WLqLd0iVhPghQrYAlWcLJHy5EiKVQnrBucdy9fma5K JdeB31QkwuPx/7r/iQ80gliMZfWCceHCv/63p3Pz9DReLZR8wHN8d841kYGBjklAqfuV3q 8MaNMWzjxIsJVGi33jOrDf7s/NsXCs/YgFod4zlS+QzFDWOTXSzCJulirNvWTyG1mT2FNs PK1L1fNMgiuTIdFwVry3mmUB379c8crkDrWL3E6i5jQ1m17lD24mNOIzWp/8Q3HfSDvYEg DlAZo0glCp0xQTzxK7QB6RXB87sGn3CANPVLbe/HnZA13nVHfyDy8Q5vQvRBCQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL2bs14lyz75j for ; Tue, 24 Feb 2026 16:04:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2788b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 16:04:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 82cee749b523 - releng/13.5 - file: Add a fd flag with O_RESOLVE_BENEATH semantics List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.5 X-Git-Reftype: branch X-Git-Commit: 82cee749b5230ac906a30ad6bf5a0bababbe00e9 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 16:04:41 +0000 Message-Id: <699dcc19.2788b.1ce1070f@gitrepo.freebsd.org> The branch releng/13.5 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=82cee749b5230ac906a30ad6bf5a0bababbe00e9 commit 82cee749b5230ac906a30ad6bf5a0bababbe00e9 Author: Mark Johnston AuthorDate: 2026-02-09 16:47:16 +0000 Commit: Mark Johnston CommitDate: 2026-02-23 01:48:38 +0000 file: Add a fd flag with O_RESOLVE_BENEATH semantics The O_RESOLVE_BENEATH openat(2) flag restricts name lookups such that they remain under the directory referenced by the dirfd. This commit introduces an implicit version of the flag, FD_RESOLVE_BENEATH, stored in the file descriptor entry. When the flag is set, any lookup relative to that fd automatically has O_RESOLVE_BENEATH semantics. Furthermore, the flag is sticky, meaning that it cannot be cleared, and it is copied by dup() and openat(). File descriptors with FD_RESOLVE_BENEATH set may not be passed to fchdir(2) or fchroot(2). Various fd lookup routines are modified to return fd flags to the caller. This flag will be used to address a case where jails with different root directories and the ability to pass SCM_RIGHTS messages across the jail boundary can transfer directory fds in such as way as to allow a filesystem escape. Approved by: so PR: 262180 Reviewed by: kib MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D50371 (cherry picked from commit f35525ff2053e026a423e852136d73ed93c95803) (cherry picked from commit f7cbcb19a9ecf606172d6d6c472b5ba7130a398b) --- sys/compat/cloudabi/cloudabi_fd.c | 2 +- sys/fs/fdescfs/fdesc_vnops.c | 4 +- sys/kern/kern_descrip.c | 89 +++++++++++++++++++++++++++++---------- sys/kern/uipc_syscalls.c | 2 +- sys/kern/vfs_acl.c | 4 +- sys/kern/vfs_cache.c | 14 ++++-- sys/kern/vfs_extattr.c | 8 ++-- sys/kern/vfs_syscalls.c | 22 +++++++--- sys/sys/file.h | 2 +- sys/sys/filedesc.h | 8 +++- sys/sys/namei.h | 1 + 11 files changed, 110 insertions(+), 46 deletions(-) diff --git a/sys/compat/cloudabi/cloudabi_fd.c b/sys/compat/cloudabi/cloudabi_fd.c index 2883adcda3a8..1c9e77a2f21b 100644 --- a/sys/compat/cloudabi/cloudabi_fd.c +++ b/sys/compat/cloudabi/cloudabi_fd.c @@ -389,7 +389,7 @@ cloudabi_sys_fd_stat_get(struct thread *td, int error, oflags; /* Obtain file descriptor properties. */ - error = fget_cap(td, uap->fd, cap_rights_init(&rights), &fp, + error = fget_cap(td, uap->fd, cap_rights_init(&rights), NULL, &fp, &fcaps); if (error != 0) return (error); diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c index 44dfc173f49b..b0ce63b2bb1c 100644 --- a/sys/fs/fdescfs/fdesc_vnops.c +++ b/sys/fs/fdescfs/fdesc_vnops.c @@ -515,7 +515,7 @@ fdesc_setattr(struct vop_setattr_args *ap) cap_rights_init_one(&rights, CAP_EXTATTR_SET), &fp); } else { error = getvnode_path(td, fd, - cap_rights_init_one(&rights, CAP_EXTATTR_SET), &fp); + cap_rights_init_one(&rights, CAP_EXTATTR_SET), NULL, &fp); } if (error) { /* @@ -652,7 +652,7 @@ fdesc_readlink(struct vop_readlink_args *va) VOP_UNLOCK(vn); td = curthread; - error = fget_cap(td, fd_fd, &cap_no_rights, &fp, NULL); + error = fget_cap(td, fd_fd, &cap_no_rights, NULL, &fp, NULL); if (error != 0) goto out; diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index f37eab12da70..e2e1ecae9a20 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -114,8 +114,8 @@ static void fdgrowtable_exp(struct filedesc *fdp, int nfd); static void fdunused(struct filedesc *fdp, int fd); static void fdused(struct filedesc *fdp, int fd); static int fget_unlocked_seq(struct filedesc *fdp, int fd, - const cap_rights_t *needrightsp, struct file **fpp, - seqc_t *seqp); + const cap_rights_t *needrightsp, uint8_t *flagsp, + struct file **fpp, seqc_t *seqp); static int getmaxfd(struct thread *td); static u_long *filecaps_copy_prep(const struct filecaps *src); static void filecaps_copy_finish(const struct filecaps *src, @@ -471,6 +471,8 @@ kern_fcntl_freebsd(struct thread *td, int fd, int cmd, long arg) return (error); } +#define FD_RESOLVE_BENEATH 2 + int kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg) { @@ -520,7 +522,9 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg) fde = fdeget_locked(fdp, fd); if (fde != NULL) { td->td_retval[0] = - (fde->fde_flags & UF_EXCLOSE) ? FD_CLOEXEC : 0; + ((fde->fde_flags & UF_EXCLOSE) ? FD_CLOEXEC : 0) | + ((fde->fde_flags & UF_RESOLVE_BENEATH) ? + FD_RESOLVE_BENEATH : 0); error = 0; } FILEDESC_SUNLOCK(fdp); @@ -531,8 +535,13 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg) FILEDESC_XLOCK(fdp); fde = fdeget_locked(fdp, fd); if (fde != NULL) { + /* + * UF_RESOLVE_BENEATH is sticky and cannot be cleared. + */ fde->fde_flags = (fde->fde_flags & ~UF_EXCLOSE) | - (arg & FD_CLOEXEC ? UF_EXCLOSE : 0); + ((arg & FD_CLOEXEC) != 0 ? UF_EXCLOSE : 0) | + ((arg & FD_RESOLVE_BENEATH) != 0 ? + UF_RESOLVE_BENEATH : 0); error = 0; } FILEDESC_XUNLOCK(fdp); @@ -2159,7 +2168,8 @@ _finstall(struct filedesc *fdp, struct file *fp, int fd, int flags, seqc_write_begin(&fde->fde_seqc); #endif fde->fde_file = fp; - fde->fde_flags = (flags & O_CLOEXEC) != 0 ? UF_EXCLOSE : 0; + fde->fde_flags = ((flags & O_CLOEXEC) != 0 ? UF_EXCLOSE : 0) | + ((flags & O_RESOLVE_BENEATH) != 0 ? UF_RESOLVE_BENEATH : 0); if (fcaps != NULL) filecaps_move(fcaps, &fde->fde_caps); else @@ -3012,7 +3022,7 @@ out: int fget_cap(struct thread *td, int fd, const cap_rights_t *needrightsp, - struct file **fpp, struct filecaps *havecapsp) + uint8_t *flagsp, struct file **fpp, struct filecaps *havecapsp) { struct filedesc *fdp = td->td_proc->p_fd; int error; @@ -3026,7 +3036,8 @@ fget_cap(struct thread *td, int fd, const cap_rights_t *needrightsp, *fpp = NULL; for (;;) { - error = fget_unlocked_seq(fdp, fd, needrightsp, &fp, &seq); + error = fget_unlocked_seq(fdp, fd, needrightsp, flagsp, &fp, + &seq); if (error != 0) return (error); @@ -3090,7 +3101,7 @@ fget_remote(struct thread *td, struct proc *p, int fd, struct file **fpp) #ifdef CAPABILITIES int -fgetvp_lookup_smr(int fd, struct nameidata *ndp, struct vnode **vpp, bool *fsearch) +fgetvp_lookup_smr(int fd, struct nameidata *ndp, struct vnode **vpp, int *flagsp) { const struct filedescent *fde; const struct fdescenttbl *fdt; @@ -3100,6 +3111,7 @@ fgetvp_lookup_smr(int fd, struct nameidata *ndp, struct vnode **vpp, bool *fsear const cap_rights_t *haverights; cap_rights_t rights; seqc_t seq; + int flags; VFS_SMR_ASSERT_ENTERED(); @@ -3118,7 +3130,9 @@ fgetvp_lookup_smr(int fd, struct nameidata *ndp, struct vnode **vpp, bool *fsear return (EAGAIN); if (__predict_false(cap_check_inline_transient(haverights, &rights))) return (EAGAIN); - *fsearch = ((fp->f_flag & FSEARCH) != 0); + flags = fp->f_flag & FSEARCH; + flags |= (fde->fde_flags & UF_RESOLVE_BENEATH) != 0 ? + O_RESOLVE_BENEATH : 0; vp = fp->f_vnode; if (__predict_false(vp == NULL)) { return (EAGAIN); @@ -3152,16 +3166,19 @@ fgetvp_lookup_smr(int fd, struct nameidata *ndp, struct vnode **vpp, bool *fsear #endif } *vpp = vp; + *flagsp = flags; return (0); } #else int -fgetvp_lookup_smr(int fd, struct nameidata *ndp, struct vnode **vpp, bool *fsearch) +fgetvp_lookup_smr(int fd, struct nameidata *ndp, struct vnode **vpp, int *flagsp) { + const struct filedescent *fde; const struct fdescenttbl *fdt; struct filedesc *fdp; struct file *fp; struct vnode *vp; + int flags; VFS_SMR_ASSERT_ENTERED(); @@ -3169,10 +3186,13 @@ fgetvp_lookup_smr(int fd, struct nameidata *ndp, struct vnode **vpp, bool *fsear fdt = fdp->fd_files; if (__predict_false((u_int)fd >= fdt->fdt_nfiles)) return (EBADF); - fp = fdt->fdt_ofiles[fd].fde_file; + fde = &fdt->fdt_ofiles[fd]; + fp = fde->fde_file; if (__predict_false(fp == NULL)) return (EAGAIN); - *fsearch = ((fp->f_flag & FSEARCH) != 0); + flags = fp->f_flag & FSEARCH; + flags |= (fde->fde_flags & UF_RESOLVE_BENEATH) != 0 ? + O_RESOLVE_BENEATH : 0; vp = fp->f_vnode; if (__predict_false(vp == NULL || vp->v_type != VDIR)) { return (EAGAIN); @@ -3187,6 +3207,7 @@ fgetvp_lookup_smr(int fd, struct nameidata *ndp, struct vnode **vpp, bool *fsear return (EAGAIN); filecaps_fill(&ndp->ni_filecaps); *vpp = vp; + *flagsp = flags; return (0); } #endif @@ -3200,13 +3221,15 @@ fgetvp_lookup(int fd, struct nameidata *ndp, struct vnode **vpp) struct componentname *cnp; cap_rights_t rights; int error; + uint8_t flags; td = curthread; rights = *ndp->ni_rightsneeded; cap_rights_set_one(&rights, CAP_LOOKUP); cnp = &ndp->ni_cnd; - error = fget_cap(td, ndp->ni_dirfd, &rights, &fp, &ndp->ni_filecaps); + error = fget_cap(td, ndp->ni_dirfd, &rights, &flags, &fp, + &ndp->ni_filecaps); if (__predict_false(error != 0)) return (error); if (__predict_false(fp->f_ops == &badfileops)) { @@ -3224,6 +3247,10 @@ fgetvp_lookup(int fd, struct nameidata *ndp, struct vnode **vpp) */ if ((fp->f_flag & FSEARCH) != 0) cnp->cn_flags |= NOEXECCHECK; + if ((flags & UF_RESOLVE_BENEATH) != 0) { + cnp->cn_flags |= RBENEATH; + ndp->ni_resflags |= NIRES_BENEATH; + } fdrop(fp, td); #ifdef CAPABILITIES @@ -3258,11 +3285,9 @@ out_free: static int fget_unlocked_seq(struct filedesc *fdp, int fd, const cap_rights_t *needrightsp, - struct file **fpp, seqc_t *seqp) + uint8_t *flagsp, struct file **fpp, seqc_t *seqp) { -#ifdef CAPABILITIES const struct filedescent *fde; -#endif const struct fdescenttbl *fdt; struct file *fp; #ifdef CAPABILITIES @@ -3270,6 +3295,7 @@ fget_unlocked_seq(struct filedesc *fdp, int fd, const cap_rights_t *needrightsp, cap_rights_t haverights; int error; #endif + uint8_t flags; fdt = fdp->fd_files; if (__predict_false((u_int)fd >= fdt->fdt_nfiles)) @@ -3288,10 +3314,13 @@ fget_unlocked_seq(struct filedesc *fdp, int fd, const cap_rights_t *needrightsp, fde = &fdt->fdt_ofiles[fd]; haverights = *cap_rights_fde_inline(fde); fp = fde->fde_file; + flags = fde->fde_flags; if (!seqc_consistent(fd_seqc(fdt, fd), seq)) continue; #else - fp = fdt->fdt_ofiles[fd].fde_file; + fde = &fdt->fdt_ofiles[fd]; + flags = fde->fde_flags; + fp = fde->fde_file; #endif if (fp == NULL) return (EBADF); @@ -3324,6 +3353,8 @@ fget_unlocked_seq(struct filedesc *fdp, int fd, const cap_rights_t *needrightsp, fdrop(fp, curthread); } *fpp = fp; + if (flagsp != NULL) + *flagsp = flags; if (seqp != NULL) { #ifdef CAPABILITIES *seqp = seq; @@ -3340,8 +3371,8 @@ fget_unlocked_seq(struct filedesc *fdp, int fd, const cap_rights_t *needrightsp, * racing with itself. */ int -fget_unlocked(struct filedesc *fdp, int fd, const cap_rights_t *needrightsp, - struct file **fpp) +fget_unlocked_flags(struct filedesc *fdp, int fd, const cap_rights_t *needrightsp, + uint8_t *flagsp, struct file **fpp) { #ifdef CAPABILITIES const struct filedescent *fde; @@ -3352,6 +3383,7 @@ fget_unlocked(struct filedesc *fdp, int fd, const cap_rights_t *needrightsp, seqc_t seq; const cap_rights_t *haverights; #endif + uint8_t flags; fdt = fdp->fd_files; if (__predict_false((u_int)fd >= fdt->fdt_nfiles)) { @@ -3363,8 +3395,10 @@ fget_unlocked(struct filedesc *fdp, int fd, const cap_rights_t *needrightsp, fde = &fdt->fdt_ofiles[fd]; haverights = cap_rights_fde_inline(fde); fp = fde->fde_file; + flags = fde->fde_flags; #else fp = fdt->fdt_ofiles[fd].fde_file; + flags = fdt->fdt_ofiles[fd].fde_flags; #endif if (__predict_false(fp == NULL)) goto out_fallback; @@ -3388,12 +3422,21 @@ fget_unlocked(struct filedesc *fdp, int fd, const cap_rights_t *needrightsp, #endif goto out_fdrop; *fpp = fp; + if (flagsp != NULL) + *flagsp = flags; return (0); out_fdrop: fdrop(fp, curthread); out_fallback: *fpp = NULL; - return (fget_unlocked_seq(fdp, fd, needrightsp, fpp, NULL)); + return (fget_unlocked_seq(fdp, fd, needrightsp, flagsp, fpp, NULL)); +} + +int +fget_unlocked(struct filedesc *fdp, int fd, const cap_rights_t *needrightsp, + struct file **fpp) +{ + return (fget_unlocked_flags(fdp, fd, needrightsp, NULL, fpp)); } /* @@ -3547,7 +3590,7 @@ fget_mmap(struct thread *td, int fd, const cap_rights_t *rightsp, fdp = td->td_proc->p_fd; MPASS(cap_rights_is_set(rightsp, CAP_MMAP)); for (;;) { - error = fget_unlocked_seq(fdp, fd, rightsp, &fp, &seq); + error = fget_unlocked_seq(fdp, fd, rightsp, NULL, &fp, &seq); if (__predict_false(error != 0)) return (error); if (__predict_false(fp->f_ops == &badfileops)) { @@ -3602,7 +3645,7 @@ fget_fcntl(struct thread *td, int fd, const cap_rights_t *rightsp, *fpp = NULL; MPASS(cap_rights_is_set(rightsp, CAP_FCNTL)); for (;;) { - error = fget_unlocked_seq(fdp, fd, rightsp, &fp, &seq); + error = fget_unlocked_seq(fdp, fd, rightsp, NULL, &fp, &seq); if (error != 0) return (error); error = cap_fcntl_check(fdp, fd, needfcntl); @@ -3664,7 +3707,7 @@ fgetvp_rights(struct thread *td, int fd, const cap_rights_t *needrightsp, struct file *fp; int error; - error = fget_cap(td, fd, needrightsp, &fp, &caps); + error = fget_cap(td, fd, needrightsp, NULL, &fp, &caps); if (error != 0) return (error); if (fp->f_ops == &badfileops) { diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 336a0dd77d5c..65ea38dc87f5 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -97,7 +97,7 @@ getsock_cap(struct thread *td, int fd, const cap_rights_t *rightsp, struct file *fp; int error; - error = fget_cap(td, fd, rightsp, &fp, havecapsp); + error = fget_cap(td, fd, rightsp, NULL, &fp, havecapsp); if (error != 0) return (error); if (fp->f_type != DTYPE_SOCKET) { diff --git a/sys/kern/vfs_acl.c b/sys/kern/vfs_acl.c index ea250104aff4..3120ff007044 100644 --- a/sys/kern/vfs_acl.c +++ b/sys/kern/vfs_acl.c @@ -433,7 +433,7 @@ sys___acl_get_fd(struct thread *td, struct __acl_get_fd_args *uap) AUDIT_ARG_FD(uap->filedes); error = getvnode_path(td, uap->filedes, - cap_rights_init_one(&rights, CAP_ACL_GET), &fp); + cap_rights_init_one(&rights, CAP_ACL_GET), NULL, &fp); if (error == 0) { error = vacl_get_acl(td, fp->f_vnode, uap->type, uap->aclp); fdrop(fp, td); @@ -566,7 +566,7 @@ sys___acl_aclcheck_fd(struct thread *td, struct __acl_aclcheck_fd_args *uap) AUDIT_ARG_FD(uap->filedes); error = getvnode_path(td, uap->filedes, - cap_rights_init_one(&rights, CAP_ACL_CHECK), &fp); + cap_rights_init_one(&rights, CAP_ACL_CHECK), NULL, &fp); if (error == 0) { error = vacl_aclcheck(td, fp->f_vnode, uap->type, uap->aclp); fdrop(fp, td); diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index e6cf39c09f19..ebab765994a4 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -4364,17 +4364,23 @@ cache_fplookup_dirfd(struct cache_fpl *fpl, struct vnode **vpp) { struct nameidata *ndp; struct componentname *cnp; - int error; - bool fsearch; + int error, flags; ndp = fpl->ndp; cnp = fpl->cnp; - error = fgetvp_lookup_smr(ndp->ni_dirfd, ndp, vpp, &fsearch); + error = fgetvp_lookup_smr(ndp->ni_dirfd, ndp, vpp, &flags); if (__predict_false(error != 0)) { return (cache_fpl_aborted(fpl)); } - fpl->fsearch = fsearch; + if (__predict_false((flags & O_RESOLVE_BENEATH) != 0)) { + _Static_assert((CACHE_FPL_SUPPORTED_CN_FLAGS & RBENEATH) == 0, + "RBENEATH supported by fplookup"); + cache_fpl_smr_exit(fpl); + cache_fpl_aborted(fpl); + return (EOPNOTSUPP); + } + fpl->fsearch = (flags & FSEARCH) != 0; if ((*vpp)->v_type != VDIR) { if (!((cnp->cn_flags & EMPTYPATH) != 0 && cnp->cn_pnbuf[0] == '\0')) { cache_fpl_smr_exit(fpl); diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index c9007c308b58..664d0b4edc5f 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -241,7 +241,7 @@ sys_extattr_set_fd(struct thread *td, struct extattr_set_fd_args *uap) AUDIT_ARG_TEXT(attrname); error = getvnode_path(td, uap->fd, - cap_rights_init_one(&rights, CAP_EXTATTR_SET), &fp); + cap_rights_init_one(&rights, CAP_EXTATTR_SET), NULL, &fp); if (error) return (error); @@ -408,7 +408,7 @@ sys_extattr_get_fd(struct thread *td, struct extattr_get_fd_args *uap) AUDIT_ARG_TEXT(attrname); error = getvnode_path(td, uap->fd, - cap_rights_init_one(&rights, CAP_EXTATTR_GET), &fp); + cap_rights_init_one(&rights, CAP_EXTATTR_GET), NULL, &fp); if (error) return (error); @@ -543,7 +543,7 @@ sys_extattr_delete_fd(struct thread *td, struct extattr_delete_fd_args *uap) AUDIT_ARG_TEXT(attrname); error = getvnode_path(td, uap->fd, - cap_rights_init_one(&rights, CAP_EXTATTR_DELETE), &fp); + cap_rights_init_one(&rights, CAP_EXTATTR_DELETE), NULL, &fp); if (error) return (error); @@ -689,7 +689,7 @@ sys_extattr_list_fd(struct thread *td, struct extattr_list_fd_args *uap) AUDIT_ARG_FD(uap->fd); AUDIT_ARG_VALUE(uap->attrnamespace); error = getvnode_path(td, uap->fd, - cap_rights_init_one(&rights, CAP_EXTATTR_LIST), &fp); + cap_rights_init_one(&rights, CAP_EXTATTR_LIST), NULL, &fp); if (error) return (error); diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 51f26b843c45..ea7361b0839a 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -373,7 +373,7 @@ kern_fstatfs(struct thread *td, int fd, struct statfs *buf) int error; AUDIT_ARG_FD(fd); - error = getvnode_path(td, fd, &cap_fstatfs_rights, &fp); + error = getvnode_path(td, fd, &cap_fstatfs_rights, NULL, &fp); if (error != 0) return (error); vp = fp->f_vnode; @@ -887,12 +887,17 @@ sys_fchdir(struct thread *td, struct fchdir_args *uap) struct mount *mp; struct file *fp; int error; + uint8_t fdflags; AUDIT_ARG_FD(uap->fd); - error = getvnode_path(td, uap->fd, &cap_fchdir_rights, + error = getvnode_path(td, uap->fd, &cap_fchdir_rights, &fdflags, &fp); if (error != 0) return (error); + if ((fdflags & UF_RESOLVE_BENEATH) != 0) { + fdrop(fp, td); + return (ENOTCAPABLE); + } vp = fp->f_vnode; vrefact(vp); fdrop(fp, td); @@ -1243,6 +1248,10 @@ success: else #endif fcaps = NULL; + if ((nd.ni_resflags & NIRES_BENEATH) != 0) + flags |= O_RESOLVE_BENEATH; + else + flags &= ~O_RESOLVE_BENEATH; error = finstall_refed(td, fp, &indx, flags, fcaps); /* On success finstall_refed() consumes fcaps. */ if (error != 0) { @@ -1933,7 +1942,7 @@ kern_funlinkat(struct thread *td, int dfd, const char *path, int fd, fp = NULL; if (fd != FD_NONE) { - error = getvnode_path(td, fd, &cap_no_rights, &fp); + error = getvnode_path(td, fd, &cap_no_rights, NULL, &fp); if (error != 0) return (error); } @@ -4316,12 +4325,13 @@ out: */ int getvnode_path(struct thread *td, int fd, const cap_rights_t *rightsp, - struct file **fpp) + uint8_t *flagsp, struct file **fpp) { struct file *fp; int error; - error = fget_unlocked(td->td_proc->p_fd, fd, rightsp, &fp); + error = fget_unlocked_flags(td->td_proc->p_fd, fd, rightsp, flagsp, + &fp); if (error != 0) return (error); @@ -4358,7 +4368,7 @@ getvnode(struct thread *td, int fd, const cap_rights_t *rightsp, { int error; - error = getvnode_path(td, fd, rightsp, fpp); + error = getvnode_path(td, fd, rightsp, NULL, fpp); /* * Filter out O_PATH file descriptors, most getvnode() callers diff --git a/sys/sys/file.h b/sys/sys/file.h index 4c0ec276c700..d3e4a29d0803 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -292,7 +292,7 @@ int fgetvp_read(struct thread *td, int fd, const cap_rights_t *rightsp, struct vnode **vpp); int fgetvp_write(struct thread *td, int fd, const cap_rights_t *rightsp, struct vnode **vpp); -int fgetvp_lookup_smr(int fd, struct nameidata *ndp, struct vnode **vpp, bool *fsearch); +int fgetvp_lookup_smr(int fd, struct nameidata *ndp, struct vnode **vpp, int *flagsp); int fgetvp_lookup(int fd, struct nameidata *ndp, struct vnode **vpp); static __inline __result_use_check bool diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h index bf7a27e37161..a39716fdce0b 100644 --- a/sys/sys/filedesc.h +++ b/sys/sys/filedesc.h @@ -136,6 +136,7 @@ struct filedesc_to_leader { * Per-process open flags. */ #define UF_EXCLOSE 0x01 /* auto-close on exec */ +#define UF_RESOLVE_BENEATH 0x02 /* lookups must be beneath this dir */ #ifdef _KERNEL @@ -270,17 +271,20 @@ struct filedesc_to_leader * int getvnode(struct thread *td, int fd, const cap_rights_t *rightsp, struct file **fpp); int getvnode_path(struct thread *td, int fd, const cap_rights_t *rightsp, - struct file **fpp); + uint8_t *flagsp, struct file **fpp); void mountcheckdirs(struct vnode *olddp, struct vnode *newdp); int fget_cap_locked(struct filedesc *fdp, int fd, const cap_rights_t *needrightsp, struct file **fpp, struct filecaps *havecapsp); int fget_cap(struct thread *td, int fd, const cap_rights_t *needrightsp, - struct file **fpp, struct filecaps *havecapsp); + uint8_t *flagsp, struct file **fpp, struct filecaps *havecapsp); /* Return a referenced file from an unlocked descriptor. */ int fget_unlocked(struct filedesc *fdp, int fd, const cap_rights_t *needrightsp, struct file **fpp); +int fget_unlocked_flags(struct filedesc *fdp, int fd, + const cap_rights_t *needrightsp, uint8_t *flagsp, + struct file **fpp); /* Return a file pointer without a ref. FILEDESC_IS_ONLY_USER must be true. */ int fget_only_user(struct filedesc *fdp, int fd, const cap_rights_t *needrightsp, struct file **fpp); diff --git a/sys/sys/namei.h b/sys/sys/namei.h index 8ae9f0d786d6..51aa9a6e4f67 100644 --- a/sys/sys/namei.h +++ b/sys/sys/namei.h @@ -208,6 +208,7 @@ int cache_fplookup(struct nameidata *ndp, enum cache_fpl_status *status, #define NIRES_ABS 0x00000001 /* Path was absolute */ #define NIRES_STRICTREL 0x00000002 /* Restricted lookup result */ #define NIRES_EMPTYPATH 0x00000004 /* EMPTYPATH used */ +#define NIRES_BENEATH 0x00000008 /* O_RESOLVE_BENEATH is to be inherited */ /* * Flags in ni_lcf, valid for the duration of the namei call. From nobody Tue Feb 24 16:04:42 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL2bt4KFyz6SPX8 for ; Tue, 24 Feb 2026 16:04:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL2bt2RTJz3pp6 for ; Tue, 24 Feb 2026 16:04:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771949082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/6VW+lW7SKkoWcb2QM1AWBBYQzn9wMUnR434Zk4AALE=; b=BBM35zt6/Xr/QbtPr/gSzaTzNUx48ssiXI3cJRNWWl3R2LbTAqHspIK2fgq7+tQd+pmGqQ xzZPRqv7QmuFbkz7Ckzh9CrmK+q9HxP2UtJ0GqhqGRrHav9wiKQdBTdtjb023+A4GY/hg4 HcGabCFGWu44oYBogrKnt3YRlFVN5ajKHJiF+AO0j1hIb0AQj7g1GazWb94M5O+18p2u+n T65fxhf7pBuTV5Ozi4wtilW+uHnfadJsuEP0jm75bt6B5sEE1OyzNPV12j6bWnVTg9k+f3 RduTpR2ECEgjnoWBFU3avITMSWSLtIi0aMxEv0yqophPsV+T7xY6AKg7+V2u4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771949082; a=rsa-sha256; cv=none; b=gybPRw3Y+Z3KScST0xBc7mJygxf7gn2LStDmXNzWAW6N9uGRJfXf5xIDTYKmLxsGnlZzfb OkOLCj/AJcSL1rhhnScKT56Mulr9OHe9EWCc7zj+Roc7sICgOg1PNf3PUVxTM2Po78YYFa w8F31kL+f7ne3i7qf/I7izmE9CxSiCpA4wrgQF7ZtdpHWBJ4W5W+nn+KSYVddMfVOMiia3 vdJAe2XZshrOsalSu+28zM1olX8SiU6H6LJqncTwm0tnoHFH+UkFLcmxlSt2ckFouOYVra oRYU6c1SQE31In5NHtVFx26oO0t5NRXMU2f7rcJ+ke6qAzvqRG+fY/1jpULBTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771949082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/6VW+lW7SKkoWcb2QM1AWBBYQzn9wMUnR434Zk4AALE=; b=ctp0C4y8BUWnh/7YWZkWJyBTc8qkbbwsn4F1pGNIzJajM03HoyoWdHGE+uNFp+lk84oAvv uVngV52eevglJ8Vl4hL49BUiOCUozuxP3JcJimkN0WvKCJ1DUoSz0q9KuZw1dK4stYIA1E 1J4azYHT3Os1WHEN2zE7/92cf+oWb+K0tTXEXKynYFEZWAFw1VQrw9CeelpK1b61vDJjbA Rf4Hf5MSXyHutwIe1TG2CmeO0d/QYyz5Mnl2Ndq1Jx49RoOZzTx7d1JOrVISucppHkGDcs m6Ea0JWkfu5NL41Pq0IG4WMFLkFWFJigap328FYxeVi3aW4MGrpQg4wlQg4JuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL2bt1xYPz6Wh for ; Tue, 24 Feb 2026 16:04:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 275b0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 16:04:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: e6b96891ef7c - releng/13.5 - unix: Set O_RESOLVE_BENEATH on fds transferred between jails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.5 X-Git-Reftype: branch X-Git-Commit: e6b96891ef7c44b5413164a05a8c0a07eaaf59e3 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 16:04:42 +0000 Message-Id: <699dcc1a.275b0.30339030@gitrepo.freebsd.org> The branch releng/13.5 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e6b96891ef7c44b5413164a05a8c0a07eaaf59e3 commit e6b96891ef7c44b5413164a05a8c0a07eaaf59e3 Author: Mark Johnston AuthorDate: 2025-06-24 20:05:37 +0000 Commit: Mark Johnston CommitDate: 2026-02-23 01:48:38 +0000 unix: Set O_RESOLVE_BENEATH on fds transferred between jails If a pair of jails with different filesystem roots is able to exchange SCM_RIGHTS messages (e.g., using a unix socket in a shared nullfs mount), a process in one jail can open a directory outside of the root of the second jail and then pass the fd to that second jail, allowing the receiving process to escape the jail chroot. Address this using the new FD_RESOLVE_BENEATH flag. When externalizing an SCM_RIGHTS message into the receiving process, automatically set this flag on all new fds where a jail boundary is crossed. This ensures that the receiver cannot do more than access files underneath the directory; in particular, the received fd cannot be used to access vnodes not accessible by the sender. Approved by: so PR: 262179 Reviewed by: kib MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D50371 (cherry picked from commit 350ba9672a7f4f16e30534a603df577dfd083b3f) (cherry picked from commit 73530e4c2ea92564e393e0497f13dfac251a41b7) --- sys/amd64/conf/SYZKALLER | 5 +++++ sys/kern/uipc_usrreq.c | 31 +++++++++++++++++++++++-------- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/sys/amd64/conf/SYZKALLER b/sys/amd64/conf/SYZKALLER new file mode 100644 index 000000000000..965841313616 --- /dev/null +++ b/sys/amd64/conf/SYZKALLER @@ -0,0 +1,5 @@ +include GENERIC-KASAN +ident SYZKALLER + +options COVERAGE +options KCOV diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 0f5048a96e89..4043e7260d0f 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -57,7 +57,6 @@ * need a proper out-of-band */ -#include #include "opt_ddb.h" #include @@ -67,6 +66,7 @@ #include #include #include +#include #include #include #include @@ -1993,22 +1993,34 @@ unp_freerights(struct filedescent **fdep, int fdcount) free(fdep[0], M_FILECAPS); } +static bool +restrict_rights(struct file *fp, struct thread *td) +{ + struct prison *prison1, *prison2; + + prison1 = fp->f_cred->cr_prison; + prison2 = td->td_ucred->cr_prison; + return (prison1 != prison2 && prison1->pr_root != prison2->pr_root && + prison2 != &prison0); +} + static int unp_externalize(struct mbuf *control, struct mbuf **controlp, int flags) { struct thread *td = curthread; /* XXX */ struct cmsghdr *cm = mtod(control, struct cmsghdr *); - int i; int *fdp; struct filedesc *fdesc = td->td_proc->p_fd; struct filedescent **fdep; void *data; socklen_t clen = control->m_len, datalen; - int error, newfds; + int error, fdflags, newfds; u_int newlen; UNP_LINK_UNLOCK_ASSERT(); + fdflags = (flags & MSG_CMSG_CLOEXEC) ? O_CLOEXEC : 0; + error = 0; if (controlp != NULL) /* controlp == NULL => free control messages */ *controlp = NULL; @@ -2059,11 +2071,14 @@ unp_externalize(struct mbuf *control, struct mbuf **controlp, int flags) *controlp = NULL; goto next; } - for (i = 0; i < newfds; i++, fdp++) { - _finstall(fdesc, fdep[i]->fde_file, *fdp, - (flags & MSG_CMSG_CLOEXEC) != 0 ? O_CLOEXEC : 0, - &fdep[i]->fde_caps); - unp_externalize_fp(fdep[i]->fde_file); + for (int i = 0; i < newfds; i++, fdp++) { + struct file *fp; + + fp = fdep[i]->fde_file; + _finstall(fdesc, fp, *fdp, fdflags | + (restrict_rights(fp, td) ? + O_RESOLVE_BENEATH : 0), &fdep[i]->fde_caps); + unp_externalize_fp(fp); } /* From nobody Tue Feb 24 16:04:43 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL2bv6vY7z6SPrL for ; Tue, 24 Feb 2026 16:04:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL2bv3lVQz3pZf for ; Tue, 24 Feb 2026 16:04:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771949083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OyUYX9ny0ZnsgxQH9iZT9WyqKvv4YQIoL9MAuXPWsUo=; b=pnu/KgvZGXRvTZrpuFqMVtidud209qHynY/RdUytzzZyAzZTCV/7Ky67XO3EF2Ct79xnDS IPDGebPdGGNCJIcxCHqjAQovnBy7uJSGixjRbgEEPK0HQEfkURQh7giENiYKJHpcpvkew1 163lV5zEsKsnKkgY0rAvvgpNCjTgHxqe8KRIaQGgFM1OIpQNi9BZ39PViKYqxVmHD2K2RY LNGBpAdUD4SW+HnC4LjZsBcRm6d4qoln5pmyJnBqHDrvZtUb/Sjp9lp2+QWisN2TuQ4Wf5 GzjHqwCcKXes05Nroe4S2Ww2zlEzRER781dg3VSHMuKOucbm/S8GoiA6ZR0uoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771949083; a=rsa-sha256; cv=none; b=w0CJts4bXvWVrnkghF7rThKiuR1e9m+g0c8TY+5r2kdl/8XCIvh8hWf0AmnUzfXGgjbzqZ 1DGNZKLZHKVi13bPY6nZJO3F4ewwPweNxhWLQN+Fcg8h5zs15iOCNjNVjjlnZl85hh+Y36 LMcWPH9QbYRLYHIIyLVOdwF1Tp/7P1TOrs2NdaY/IHjKppoteRyDavmdw085Ki7geQNznz MNHegiSBkPmEcew72EOKJB0AbNjik7jQPieRjmK/c+6OSOEBWCQqp0ER8LfvF9R8p7NQ9d Tly5x7oVp1zt5Ew2cYLUu4BldOCeholLFDgfkP1ziuRlzgyt9XFEx/a+i8Stxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771949083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OyUYX9ny0ZnsgxQH9iZT9WyqKvv4YQIoL9MAuXPWsUo=; b=k/x+VpLFrmAATMJHDSTQHVX/Z/+zQYe8YT505XZ7gbUuK+aqAe/154yHjdjWfVUNUG6DNB vdy0PBOGMReHMz66lN0EjoxV9GISG7goMKMQjKP5b9kUMEVrxq5PE5Ltuglm9QR+LIHSot aQB5cjAhhZmQCnQ0KyfGA8eOml7zi7birIEFf3LNKwCoXKs8WiQXZvTxWsn4UWieHm+6SN jtN4RNfBON0tcedwTOGCaDEbt9snKPTK3afqS4JlLkVpubU7hK4KX0jIoacEy6ARPHN65r fcoLdLfpzMx/Fqdwot8vQhYbKn4YoVQDmwaBhMklZVEJkDye0sCdyqClke6kUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL2bv2m64z70M for ; Tue, 24 Feb 2026 16:04:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 275b4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 16:04:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: ecec5410875f - releng/13.5 - unix/tests: Add a regression test for fd transfer across jails List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.5 X-Git-Reftype: branch X-Git-Commit: ecec5410875f7ffcfdd3d6d5a2cac445203274b2 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 16:04:43 +0000 Message-Id: <699dcc1b.275b4.7098e4ce@gitrepo.freebsd.org> The branch releng/13.5 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ecec5410875f7ffcfdd3d6d5a2cac445203274b2 commit ecec5410875f7ffcfdd3d6d5a2cac445203274b2 Author: Mark Johnston AuthorDate: 2025-06-24 20:08:22 +0000 Commit: Mark Johnston CommitDate: 2026-02-23 01:48:38 +0000 unix/tests: Add a regression test for fd transfer across jails Approved by: so MFC after: 3 weeks (cherry picked from commit 5843b8ee02e99527c28f579acfc1f48e10033529) (cherry picked from commit c9977132865ec06d2d3e1f404e946836019ff7a2) --- tests/sys/kern/Makefile | 1 + tests/sys/kern/unix_passfd_test.c | 134 +++++++++++++++++++++++++++++++++++++- 2 files changed, 133 insertions(+), 2 deletions(-) diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index f862e41d1d72..d499fd525222 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -75,6 +75,7 @@ LIBADD.socket_msg_waitall+= pthread LIBADD.sendfile_helper+= pthread LIBADD.fdgrowtable_test+= util pthread kvm procstat LIBADD.sigwait+= rt +LIBADD.unix_passfd_test+= jail NETBSD_ATF_TESTS_C+= lockf_test NETBSD_ATF_TESTS_C+= mqueue_test diff --git a/tests/sys/kern/unix_passfd_test.c b/tests/sys/kern/unix_passfd_test.c index d5654ed62315..d8f6973cd3b0 100644 --- a/tests/sys/kern/unix_passfd_test.c +++ b/tests/sys/kern/unix_passfd_test.c @@ -25,15 +25,18 @@ * SUCH DAMAGE. */ -#include -#include +#include +#include #include #include #include #include +#include +#include #include #include +#include #include #include #include @@ -713,6 +716,132 @@ ATF_TC_BODY(empty_rights_message, tc) (void)close(putfd); } +ATF_TC_WITH_CLEANUP(cross_jail_dirfd); +ATF_TC_HEAD(cross_jail_dirfd, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} +ATF_TC_BODY(cross_jail_dirfd, tc) +{ + int error, sock[2], jid1, jid2, status; + pid_t pid1, pid2; + + domainsocketpair(sock); + + error = mkdir("./a", 0755); + ATF_REQUIRE(error == 0); + error = mkdir("./b", 0755); + ATF_REQUIRE(error == 0); + error = mkdir("./c", 0755); + ATF_REQUIRE(error == 0); + error = mkdir("./a/c", 0755); + ATF_REQUIRE(error == 0); + + jid1 = jail_setv(JAIL_CREATE, + "name", "passfd_test_cross_jail_dirfd1", + "path", "./a", + "persist", NULL, + NULL); + ATF_REQUIRE_MSG(jid1 >= 0, "jail_setv: %s", jail_errmsg); + + jid2 = jail_setv(JAIL_CREATE, + "name", "passfd_test_cross_jail_dirfd2", + "path", "./b", + "persist", NULL, + NULL); + ATF_REQUIRE_MSG(jid2 >= 0, "jail_setv: %s", jail_errmsg); + + pid1 = fork(); + ATF_REQUIRE(pid1 >= 0); + if (pid1 == 0) { + ssize_t len; + int dfd, error; + char ch; + + error = jail_attach(jid1); + if (error != 0) + err(1, "jail_attach"); + + dfd = open(".", O_RDONLY | O_DIRECTORY); + if (dfd < 0) + err(1, "open(\".\") in jail %d", jid1); + + ch = 0; + len = sendfd_payload(sock[0], dfd, &ch, sizeof(ch)); + if (len == -1) + err(1, "sendmsg"); + + _exit(0); + } + + pid2 = fork(); + ATF_REQUIRE(pid2 >= 0); + if (pid2 == 0) { + int dfd, dfd2, error, fd; + char ch; + + error = jail_attach(jid2); + if (error != 0) + err(1, "jail_attach"); + + /* Get a directory from outside the jail root. */ + recvfd_payload(sock[1], &dfd, &ch, sizeof(ch), + CMSG_SPACE(sizeof(int)), 0); + + if ((fcntl(dfd, F_GETFD) & 2) == 0) + errx(1, "dfd does not have FD_RESOLVE_BENEATH set"); + + /* Make sure we can't chdir. */ + error = fchdir(dfd); + if (error == 0) + errx(1, "fchdir succeeded"); + if (errno != ENOTCAPABLE) + err(1, "fchdir"); + + /* Make sure a dotdot access fails. */ + fd = openat(dfd, "../c", O_RDONLY | O_DIRECTORY); + if (fd >= 0) + errx(1, "openat(\"../c\") succeeded"); + if (errno != ENOTCAPABLE) + err(1, "openat"); + + /* Accesses within the sender's jail root are ok. */ + fd = openat(dfd, "c", O_RDONLY | O_DIRECTORY); + if (fd < 0) + err(1, "openat(\"c\")"); + + dfd2 = openat(dfd, "", O_EMPTY_PATH | O_RDONLY | O_DIRECTORY); + if (dfd2 < 0) + err(1, "openat(\"\")"); + if ((fcntl(dfd2, F_GETFD) & 2) == 0) + errx(1, "dfd2 does not have FD_RESOLVE_BENEATH set"); + + _exit(0); + } + + error = waitpid(pid1, &status, 0); + ATF_REQUIRE(error != -1); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE(WEXITSTATUS(status) == 0); + error = waitpid(pid2, &status, 0); + ATF_REQUIRE(error != -1); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE(WEXITSTATUS(status) == 0); + + closesocketpair(sock); +} +ATF_TC_CLEANUP(cross_jail_dirfd, tc) +{ + int jid; + + jid = jail_getid("passfd_test_cross_jail_dirfd1"); + if (jid >= 0 && jail_remove(jid) != 0) + err(1, "jail_remove"); + jid = jail_getid("passfd_test_cross_jail_dirfd2"); + if (jid >= 0 && jail_remove(jid) != 0) + err(1, "jail_remove"); +} + ATF_TP_ADD_TCS(tp) { @@ -728,6 +857,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, truncated_rights); ATF_TP_ADD_TC(tp, copyout_rights_error); ATF_TP_ADD_TC(tp, empty_rights_message); + ATF_TP_ADD_TC(tp, cross_jail_dirfd); return (atf_no_error()); } From nobody Tue Feb 24 16:04:44 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL2bx0g3zz6SPxP for ; Tue, 24 Feb 2026 16:04:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL2bw698Jz3ppT for ; Tue, 24 Feb 2026 16:04:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771949084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k0yoUTLFzDPjg28hSWM6JuYdaMNcIBZAbYrgieIrHdE=; b=pdX1ugdS9c8ota7RTR90Vot/8fpQnm02bO4oR8+XKMY1hrwxqCheEDFNbpFkvZuiLgU5mO Ni/0CdaKgvI4cJGHALg+Nr/E8qUy7pAHtYfzQhvnW3D1WwQaq5SHWnqu8ducHr8dy49Hb3 EK/JmKK1w9AbbJr4HBYVzkJXCdcajJdv7tFhreiXxzKG/J2k0liN8aawdaslHbG1u9BjUf 4cCP8DSAg0/H5KPU/TEEKiMtjmz1QrUSvEnmBSiNDzpInVIUWyVTG06n0gu5xaXGtVT2MC mNyp9m6Nlyxmn3hGYL0ltXJmqmXZcOdO+hDJT0XfkItZTTRq+DmZEDxPPl/EVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771949084; a=rsa-sha256; cv=none; b=gGwhctg9YqkiYGxLVSe+5V5guxOOCZIUlL786lbOfaYESPg6lu/M2L8cuKh+E5AS3EL4gB 1W9UMpFGjYsPXHTNIzBL0zvlM16LUOUl/epC8hHfopcz9mTd6wzCATytDo88GhVQRsvqvd rv+lDb2Wpejm5yQT0SyAcNkBxYvpb7EZ6kfcM0/XFREDRMPB0i8pgPoqwanlsty1rB8D3l f15tgjHRSWIMtZKSbCqBIIOD4UmmxpOVllDNrrj6Xb0kcB7KoWQP9JmnnSVRxC11Rq0XTp GrM2X9BzljYDKRR2wAUdC1zbO5PmSapzOKiSRgGpSLf8lxZgeKLqs/ItqxTlnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771949084; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k0yoUTLFzDPjg28hSWM6JuYdaMNcIBZAbYrgieIrHdE=; b=nKiKrjMeGIVI92tiQU/8dCM6j4GVYx+pZAmC00ePbC7dkxOXok1qUBlYIJol1tqUe2kj1B eb/+hjyjU2mC0vtgkwQOxyjWz8Flmjx51CIdMRyvD+aycP+mM+x8p0PVkQg3jPzdpxsS/P Ms/AKXcCKshUyudWGjmcLHUZH0+ZigE3l2yLcnzHHxjfbIWNnapLM8Wp5OcdU4HN4AWuXH 948bW6FA7fKjoYkrojfD8svf8qQzeK1FOrlwy+eeWXtW04SQML/3EqzV/4VLoNPHMUdS01 tm+5ehgGM4g1NKugPHK+CwMoEkeOWm672Hj+pS4+6zm8FVQspQbspYkWnEh7fA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL2bw3bgNz6Wj for ; Tue, 24 Feb 2026 16:04:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2788f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 16:04:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 933abe4a1940 - releng/13.5 - amd64/conf: Remove a config committed by accident List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.5 X-Git-Reftype: branch X-Git-Commit: 933abe4a194056f659c175a19da9afc3b46e9ff1 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 16:04:44 +0000 Message-Id: <699dcc1c.2788f.7536fe8b@gitrepo.freebsd.org> The branch releng/13.5 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=933abe4a194056f659c175a19da9afc3b46e9ff1 commit 933abe4a194056f659c175a19da9afc3b46e9ff1 Author: Mark Johnston AuthorDate: 2025-06-25 12:50:50 +0000 Commit: Mark Johnston CommitDate: 2026-02-23 01:48:38 +0000 amd64/conf: Remove a config committed by accident Approved by: so Reported by: kib, kp Fixes: 350ba9672a7f ("unix: Set O_RESOLVE_BENEATH on fds transferred between jails") (cherry picked from commit 3ef39f58e5d63a78fd1c37e6c62d599bc68d5e1e) (cherry picked from commit 3b0f13ca60981186b1455d1e506ef4365054acc3) --- sys/amd64/conf/SYZKALLER | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/amd64/conf/SYZKALLER b/sys/amd64/conf/SYZKALLER deleted file mode 100644 index 965841313616..000000000000 --- a/sys/amd64/conf/SYZKALLER +++ /dev/null @@ -1,5 +0,0 @@ -include GENERIC-KASAN -ident SYZKALLER - -options COVERAGE -options KCOV From nobody Tue Feb 24 16:04:45 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL2bx72pCz6SPxR for ; Tue, 24 Feb 2026 16:04:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL2bx5K8cz3ppf for ; Tue, 24 Feb 2026 16:04:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771949085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3OUoJus7hoi7wkrUUAQA0IKzQs4daehHuijhvXTQHdQ=; b=B9LzLJx/fccjRFlIzxruIG4pCUE+KSkhjlqWA/X6LZ2l3Z9AIdkuJ8Hg3JeKG9DGn1w+8S /Bs3jRSlrx/1+0xN9x/EmLBhUKKvKuiDDsw+r7HjIFXWZpkMWqmLKupVloXTnPkUK8wiJE 9J/ZRJHedPE631+uNwhYmU+YkSRs5XR2kZ1IgX3HVlEKPXeTpFrDS2I2QinGWnrl9/gCXr 9YX20LYD6gsKV29Ua35oVtxebkSOKjwvPFx1Ln2ojPeJJQ4cXFwOP9LEPBKIXVKn734Tax UK6aLo7nHVmAGmlofTyFmfSytv0V0SUUdYESGRmeRV+XrGSeyg+x/fzVzemuNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771949085; a=rsa-sha256; cv=none; b=I31V8pXZ2mKkp5CeC/CUyJzH3ibBF05tmVyLdTqxafY0ey2S01raahgmWDwFUvsn0x6Avk 06ej3S9O2zPgQu4NXv1sf9tcvnu8ADQE6sNBug6Ufa6kSrR2bFuleT9jPtOPD1G1/JkUVh fS2W9qZFFhHcmLhexysPdHZZXCcQvDCE/1VxEbDsEC6JstlJ0LfU6B7FSAR4onCIFUV0Xh 90VI1isb6QVyVNqnAK9rSmiN0ipNkRx/+c4Bungcue1jMs1CMdeoGiAmg2ia+7U/lwaTKF 1D6CxI+Fr1KJMIxtiSPs8ePFvtI8xjRNvtn/DGh4WNx9zSILqJ1zpPYNShq3Lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771949085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3OUoJus7hoi7wkrUUAQA0IKzQs4daehHuijhvXTQHdQ=; b=L/+fZMCCMch6uQjUTTNExxcWsN2zZgrTEAWr2jfj9Xjo3aHocR2F4M4slSluEB08DOJGRN wcZWkIho6Cs4gviYRuekBLiry4CiZqY36tr+1K3ViLuoDrzE/mJXlrGWbip8wAWojRL5Zn O4pTBRbrZ8GRvqAsH5eMVI3/JSX3w0wbXwLrPCKz4GMLwJBOh3+mhfimPizedAqXz+K+H0 wJwtxSP246UV1stGZHp5T38Zr67uUWYYp4+IA8k5vHhWtFS4zdGZgt37KfIR1lYm6oJzjd MKdBPSDoX9Re6zjvLbg1CtmBb7HuB9ms4wJcEq5vRBaPjuBQ3oft9PmUhu3fqg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL2bx4QNCz6xl for ; Tue, 24 Feb 2026 16:04:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2771b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 16:04:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c2e2bfbd9e09 - releng/13.5 - rtsock: Fix stack overflow List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.5 X-Git-Reftype: branch X-Git-Commit: c2e2bfbd9e09026790deb5c930b6d48c042cdffe Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 16:04:45 +0000 Message-Id: <699dcc1d.2771b.4218b73@gitrepo.freebsd.org> The branch releng/13.5 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c2e2bfbd9e09026790deb5c930b6d48c042cdffe commit c2e2bfbd9e09026790deb5c930b6d48c042cdffe Author: Mark Johnston AuthorDate: 2026-02-23 15:52:50 +0000 Commit: Mark Johnston CommitDate: 2026-02-24 16:03:49 +0000 rtsock: Fix stack overflow Approved by: so Security: FreeBSD-SA-26:05.route Security: CVE-2026-3038 Fixes: 92be2847e845 ("rtsock: Avoid copying uninitialized padding bytes") (cherry picked from commit f3be7df50f01d9a6ead9f27b55bb4dfd7dc4f9d2) (cherry picked from commit 8b476ffc4ea3f82f758714fee0289209bc980782) --- sys/net/rtsock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index d78a60070615..24b9007a987f 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1885,8 +1885,8 @@ rtsock_msg_buffer(int type, struct rt_addrinfo *rtinfo, struct walkarg *w, int * #endif dlen = SA_SIZE(sa); if (cp != NULL && buflen >= dlen) { - KASSERT(dlen <= sizeof(ss), - ("%s: sockaddr size overflow", __func__)); + if (sa->sa_len > sizeof(ss)) + return (EINVAL); bzero(&ss, sizeof(ss)); bcopy(sa, &ss, sa->sa_len); sa = (struct sockaddr *)&ss; From nobody Tue Feb 24 16:04:46 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL2bz0LlHz6SQ0M for ; Tue, 24 Feb 2026 16:04:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL2by6CZ7z3ptp for ; Tue, 24 Feb 2026 16:04:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771949086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h3TnH5t1yufyrTvFMM1vDZYr14DzrqSHQDmXonZkNSg=; b=WxCmtShnkmuy4ATFvnOpR9OtUQ4y5uUHmv/Gd/cbswwPwmqTqUDYy+kvvl3vV81WyW6k6k g90LUcHFlOaVh44GPfRr9Prca7zqZ88/QX0ZrClly6l4MZvp3HaXs6JQOGfthcq9SQlKka hdL88mnpTjC7ROGkFG1U72cnFA8iGoeMM/X9/tI3foLKR+R3kW8JO1aMkJZD565Ekl7ZU/ pr8S4fFW/6+JBWOww8I2bAgAD+M5i1BsyW4UJtDzOudy5RlBNSXZ8R3FQPu04/jbHD7lBX hEq/lXz2upGkCBo1x6T1PCTmAwbWiWPHppbKGPm5AVZ0vjs51LanO2sXpfZaow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771949086; a=rsa-sha256; cv=none; b=f8igOkw+MhEdG8qR+UtRBw59cImS12vTC741BUiA3pE+uSRh2DTNqSoRvIbzDnO+FJDzRh qErsRrvkN8QzyavbGaiivKlMcE1EvbcwpCUvM5cMO7anR5oGLLNyXIOu4YFQwEh8BJiKmf RUJgRyzl3TLfFlwdnwFmbIIcYJBn9yIL3ZJU8196Utneed+sojbBxog62zxrvRLoUZhMvT GgOWOzvn0wO57L4dngmRmlN94LDyj4371M7Lc2MCuSKS8AAMkbz0uiRLhawAQ18QQoaifU r0LD42Tt7A9Za1VCtcXxd386uScf9xVYSZMSHeeFcWg1aD/7m4Tu87wVugellQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771949086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h3TnH5t1yufyrTvFMM1vDZYr14DzrqSHQDmXonZkNSg=; b=vmIU7vS+ktMpAq1j2pufcptS5elQlDVoYh2w9sdTuWtt6ZsWnYO+DNAmet0oykN4AM7agG NrLGibXn0MDDLyUTHy0Y90qWHhD5qpTpiE8YKUKCIKTMYh/2BoUg2xT0zhj2VdIHatbKPB CuVyQUclf/iQ4uXD570MILAtSjRy8iBIlEBnoA8dEb7MB6uKWSxk33n5t1SxTVo4s6EYvO BgScP0nXfP23XiZP6Wa52g08Ncyt6nj9GzH7ApXBtdQ0OUr2ltB+8XdjcLnD2UD+PsvV8U z8eWp5rOX/bFlq+oiWcPJb+fF7TeWDc+haNvRyLii8c6TlvpEXt9mccVAsWTzg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL2by58FQz6Wl for ; Tue, 24 Feb 2026 16:04:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27893 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 16:04:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 9d3e842358b4 - releng/13.5 - Add UPDATING entries and bump version List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.5 X-Git-Reftype: branch X-Git-Commit: 9d3e842358b4b776a0e4bbab921695ac35f3baa3 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 16:04:46 +0000 Message-Id: <699dcc1e.27893.2b6e5eb7@gitrepo.freebsd.org> The branch releng/13.5 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9d3e842358b4b776a0e4bbab921695ac35f3baa3 commit 9d3e842358b4b776a0e4bbab921695ac35f3baa3 Author: Mark Johnston AuthorDate: 2026-02-24 15:58:22 +0000 Commit: Mark Johnston CommitDate: 2026-02-24 16:04:27 +0000 Add UPDATING entries and bump version Approved by: so --- UPDATING | 8 ++++++++ sys/conf/newvers.sh | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 13a3cbcb3bc8..629e14fdcecc 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,14 @@ 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. +20260224: + 13.5-RELEASE-p10 SA-26:04.jail + SA-26:05.route + + Jail chroot escape via fd exchange with a different jail. [SA-26:04.jail] + + Local DoS and possible privilege escalation via routing sockets. [SA-26:05.route] + 20260127: 13.5-RELEASE-p9 SA-26:01.openssl SA-26:02.jail diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 52678a1e95aa..4506455b52a2 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="13.5" -BRANCH="RELEASE-p9" +BRANCH="RELEASE-p10" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Tue Feb 24 16:49:11 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL3bK25Rsz6SWGS for ; Tue, 24 Feb 2026 16:49:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL3bJ6yF2z3JDg for ; Tue, 24 Feb 2026 16:49:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771951757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YO+rZhagu5meueQLP2TkCkm+ikWeK0pH7ZDGFOvXyAY=; b=Os65hfQfFksGpWXd3nwKTBLLM2lCNuYry0kFBKBdCb9n9+WHir9AoPj7kFbs8rpom0zg3v jG2w4Hp836nQg9d3cBxdPdci7ASzYg4Gzfqi8XrPDnimiggnxHzTfxXvH0eGI3Ivrjdwa1 GFZ418eoh64I0rLIsBm3x5f7H9cOdmQelgDpQMSp27pZqUxXCk4Kah9jfWnJ5YCP/wYACM h+Mn7t+8SaeBIlSK+oGFReAdvkFV/xdhO8IAm2rdR7CWOXREyAF9fKvUk572KbkWbrcf2d D53htkMtciLWJ0QMcwZtwzu7O2BeScq8gaNDHvOuiWCc0q70CqMEAgkNvxyU4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771951757; a=rsa-sha256; cv=none; b=Phkv6xZg0m8lYgV8K93vS+HUEAYimXHbcVDyMOsv0gAgAr1pWDhM7Kya57XFt9jEjIo35F Yg7/X9m+6jKdwpAKNf7K0sZ7S1CR0Kh71HG7oJFxmnwSSp0ocY516bR3Zvtl3OV2KiWR9K X0FYc+nL3LZFUbiGYO5z2+TJugocKlHpQ0xthAa2qLbzFKMgXJ+5jRQoZx4RbvdIMQ1ArW MoKkvEFCqLTOqmHn5aO6kVq/dJcag2Uz32AtEtUUD3IvEgQt2lvY6cmQAdR72zeZwpewV7 zsLiXkfTTv8bKrahIHmYw8lwSNsSaRMSoDpnX2BVNTCZRR+BS6TTSVoNjrWWdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771951757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YO+rZhagu5meueQLP2TkCkm+ikWeK0pH7ZDGFOvXyAY=; b=is+d+96roLw6z2QHidFhCsci2WQjBuwSlHFieIaiM83WIWfOeKrmC8l8O9N4Pl/soyKn4B awhg1i2c+i5bQbJixlSyFL4/H/YqDqGpC9vbjeYqK2gYXTDfzNOS6kggMG8bcZLJ2O/BBo mfS2iPgWWpSBlxEWliRpUIHsGw30zQP5ldVvI8g6SRuIVmr0K1SqLZlyk4iuL6jR8YP7QA ZGACHlpkCwXoJs9Oohxo93U6Be+slaXmw7vn3T8h0bv8U64bfRAL9mGgFVRQGg4skBVfNf qhtjAh4eCBw8Y0LEyjPGRFdJR0S3RB+HktNNN6+W3deeEIxjEqHREa2TjfodwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL3bJ6Rvrz8Cv for ; Tue, 24 Feb 2026 16:49:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34343 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 16:49:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Randall Stewart Subject: git: 9063968e8e39 - main - Mitigate a case where TCP rack can send an extra ack. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9063968e8e394b8062a855592e12607b143c1b0f Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 16:49:11 +0000 Message-Id: <699dd687.34343.32dd11f9@gitrepo.freebsd.org> The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=9063968e8e394b8062a855592e12607b143c1b0f commit 9063968e8e394b8062a855592e12607b143c1b0f Author: Randall Stewart AuthorDate: 2026-02-24 16:47:36 +0000 Commit: Randall Stewart CommitDate: 2026-02-24 16:47:36 +0000 Mitigate a case where TCP rack can send an extra ack. Rack will in theory send an extra rate limited ack when we get to a closing state (sending a FIN) so that if we have only 1 packet outstanding we might encourage the connection to close out. However it does this always which is not always wise. Change it so that it only does that if its been more than an srtt since we have had some activity i.e. a send or a receive of a packet. Reviewed by:tuexen, rscheff Differential Revision: --- sys/netinet/tcp_stacks/rack.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index f55abbf919b7..42c6757b4b2a 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -20742,8 +20742,17 @@ just_return_nolock: * The idea behind that is instead of having to have * the peer wait for the delayed-ack timer to run off * we send an ack that makes the peer send us an ack. + * + * Note we do not send anything if its been less than + * a srtt. */ - rack_send_ack_challange(rack); + uint64_t tmark; + + tmark = tcp_get_u64_usecs(&tv); + if ((tmark > rack->r_ctl.lt_timemark) && + (((tmark - rack->r_ctl.lt_timemark) / 1000) > tp->t_srtt)) { + rack_send_ack_challange(rack); + } } if (tot_len_this_send > 0) { rack->r_ctl.fsb.recwin = recwin; @@ -21143,7 +21152,7 @@ send: to.to_tsecr = tp->ts_recent; to.to_flags |= TOF_TS; if ((len == 0) && - (TCPS_HAVEESTABLISHED(tp->t_state)) && + (tp->t_state == TCPS_ESTABLISHED) && ((ms_cts - rack->r_ctl.last_rcv_tstmp_for_rtt) > RCV_PATH_RTT_MS) && (tp->snd_una == tp->snd_max) && (flags & TH_ACK) && From nobody Tue Feb 24 17:54:55 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL53633sxz6ShPh; Tue, 24 Feb 2026 17:54:58 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL5362bDWz3SPr; Tue, 24 Feb 2026 17:54:58 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771955698; h=from:from:reply-to:subject:subject: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=9td9AehFmPQCnja9mVQhzqlIMy8dj4HSPzS0zg+LWxY=; b=nFjBN4Ul1GfAv7ZjkMSfTWSNHHhhFNVwTaIiNM/sRIVSTKMgJ7iDvlgao2tdKcJJQnzvFN 7HlOhf76LpqoFnHsjkUexqtsTXyqhkOuaK5RRpZJpdis6lUZZM/9I7Ym/rTIdAIVe9DfzK nM8cUJPJNWPGIIti8AFj1KOUHO8Q1Nt2JYI6lMil+cIyTAC2MGmQWD6u4V5VpJtT/LkUi4 WDKTfeik6SWf9OKylOSVphtm3SJFTt1Jrt1mxH6A+MzeTLfbOlYc6nHeVjm57hMnJ3wtaQ ga5Hev5eYb4D4oG6HGvoZ5y48BlucZrjmMGjmCVwCW2KTGUwjTR81+q+gR0Gqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771955698; a=rsa-sha256; cv=none; b=UKU585/84wKePB9fw43qjpa4K7mT7+NOeaOwoCdzhvjvglxVvlN2Y2mkEAT04BwVn2LiR7 liy7Umrq+E2/py8n8WF2hXIfZfJQfwwhDdor7suGK0aflP2zicpNifIAzJpV7RHxy3I1Qa 9o87QAyEFG3KXtMQnfvlw7cG0XhWXiFLf8Zte9HdIaV5DkcIxHpHs3J/ls90OwCCdpzIl7 bQUNkScayans1LlsGuJhkfFpnwzPqnxDJt351R2hEXnIukoimRksQGW+oyx5MVII6iseGa JkAlJwpkLTZZyqH0kenZIu7DDgcJELDAshNg7wZ9fryuRC0Rs3ek/1ieoU+yCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771955698; h=from:from:reply-to:subject:subject: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=9td9AehFmPQCnja9mVQhzqlIMy8dj4HSPzS0zg+LWxY=; b=MV+8pHfDGqw0F2R/hKfKUiY4zn5JMR93xo5+wCSRT++eb8qzRHaeb3P5P9cJnPw95Fh7zO T1GrNzE1uHWDPSxJngsng5lzN2Flx27VHt7kIZv4eD3dkzx7QVEp91o5tT7zP+x8v7MlBN UWU/KOsy70NHprHVYoWaEIImytrIM19sn5Skq6LhzF8Hs3wYGPj9oUbmencDZa/7DKyeoP awZ2hqwvUdpc9cVVQGX6J+HKUzrQHqXKdR7Svn7JYASc0uJfi393afDPlzVHkNFqSGHfiT ZbufM/+bPEUN47ZsNML+jElrBY/F7yOWpKzjLRX7/eSHUC1EzaRdq2jmdUx3GA== Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fL5354M98ztrM; Tue, 24 Feb 2026 17:54:57 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Tue, 24 Feb 2026 09:54:55 -0800 From: Gleb Smirnoff To: "Enji Cooper (yaneurabeya)" Cc: John Baldwin , Enji Cooper , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: d1f1402dff63 - main - libnetbsd: import `__CTASSERT(..)` macros Message-ID: References: <6998e4cc.32d8e.74c069d@gitrepo.freebsd.org> <2D23AD65-FC83-486F-99BD-1C2DAF6BCE05@gmail.com> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2D23AD65-FC83-486F-99BD-1C2DAF6BCE05@gmail.com> On Sat, Feb 21, 2026 at 09:53:14AM -0800, Enji Cooper (yaneurabeya) wrote: E> > FYI, _Static_assert is not a FreeBSD-ism, it's part of C11. Our old CTASSERT is E> > a FreeBSD-ism that this extends, but really, these should be implemented in E> > terms of _Static_assert when possible. Something like: E> > E> > #if is_c11 E> > #define __CTASSERT(x) __Static_assert(x) E> > #else E> > /* all the rest */ E> > #endif E> > E> > If __CTASSERT0 is used directly anywhere, you could emulate it via something like E> > E> > #define __CTASSERT0(x, y, z) __Static_assert(x, __STRING(y) "_" __STRING(z)) E> > E> > (Note that we build all of userspace as C17 by default in 15.0 and later.) E> E> E> Hi jhb@! E> E> Excellent points. Incorporating our macros/adaptations can cause grief sometimes and I don’t want to porting more code than necessary, so I have incorporated these macros (and a few others) wholesale from NetBSD (I got these from [1]). E> E> -Enji E> E> 1. https://github.com/NetBSD/src/blob/c26cc77b3a0b26b95a2df2e0154e2b2f7292ab20/sys/sys/cdefs.h#L168-L182 I don't expect any grief if __CTASSERT() is implemented via __Static_assert(). -- Gleb Smirnoff From nobody Tue Feb 24 20:24:28 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL8Mj658hz6Spmg for ; Tue, 24 Feb 2026 20:24:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL8Mj4vCTz3npW for ; Tue, 24 Feb 2026 20:24:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771964673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f/bgFFj7beYZ978SRnWCdpOK4GY72/xwO2YXU3tNe9s=; b=m3Q0zAEZSLQpE9eaB9HqwzlRdQzWdFYLqudhS+DvQXVd+TwuZSoWxuYXC03Ci1SHcIb3kq 4ZxxSDVWa/2PpddKQIXX+VWUkCTb9AvzAiypSNc7Xj9lHQtMRzcfxkMvCwsdYEZqx1qENi kaaibsE8L2MKc5pwwgwuXLV2DXUAqOyP6pla7z+yvghehW2VwG5L6m+Kzhpn7kfWEq8zAe XxgjSFbA+x1qq1MVNotAZKefkAfm8tI5HEt+i5UTlhLUsy2ZS81W7H7khdH91gRBXbBfeR FeE7KZb7rsq6J6uovTJjNRDHIVXuSCZJ3PWMSLpfAiLuaDTRsVDTTNEK2YuAyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771964673; a=rsa-sha256; cv=none; b=f2VUovXf92NaEPUsVmuLLevjyLeBubRqC7tfGx4Q1Rj2XmTaiwBKEecWtIy4eRSI/yd+74 s9095+6g6BWPPmK8A0BeSZVNVtumFdIlrTtku71JBbgRaAgP957sfdxGAT1CmJLLl27pAd EzV0i2A0/EV+pwgO/fa2WLwcT8RCtNmqQ8wWbDMQCburPsx1ZredkzScpurLPTl7VxsE3X l/tE012klVj/081IK9j0lKZeNqAC91GwQl0SmdkSgFOIHp56WPCCfe4/mHm/YzeFv486qQ 5olt7Li+OSCzGtoM4sbd4gpwXo19ebFcekl8FQKlXpFJ3HbnpnYF3cW47/mBTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771964673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f/bgFFj7beYZ978SRnWCdpOK4GY72/xwO2YXU3tNe9s=; b=VLGPVMcgwS+Y4jAe7M0Mw7ka5E4nbkZC/DglVCBdWh5eIO0GOHgf3VpHCn1PiE1ZvnkzTJ FkR3/NTJ6bqVe9N7MdoWPUMAViONphmiQWObKs1WWBLhbjGbT+gZw9uMhk6lEdXyMwe6y/ HFxVQcv5UR/KUAQc02eJR0NtnPPJsI4Gtc13nqdCgkWxIAcTb7ZtqhPH9b/fzFP5qpzoEi RxIQztsOg7dY/ArclBzojhRvtRRL0ZhTtIgZEC5QxgyawiHN0cbxBCY8dntKIv3E6RDgpX 7vt4EWFoTNkE0/hojWxRYXJHuUbpC1dcdXbwMSUr14L1Oxk2Fgk+c6SWFpm/iA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL8Mj3SlszXGL for ; Tue, 24 Feb 2026 20:24:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23d15 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 20:24:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 5faceb84142f - main - __builtin_align_down: Cast value to __uintptr_t in the fallback List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 5faceb84142f3c9886f38a03dd5214785ac6961f Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 20:24:28 +0000 Message-Id: <699e08fc.23d15.721aa131@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=5faceb84142f3c9886f38a03dd5214785ac6961f commit 5faceb84142f3c9886f38a03dd5214785ac6961f Author: John Baldwin AuthorDate: 2026-02-24 20:24:17 +0000 Commit: John Baldwin CommitDate: 2026-02-24 20:24:17 +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 --- 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 Tue Feb 24 20:25:59 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL8PM2Ht7z6SqGH for ; Tue, 24 Feb 2026 20:25:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL8PM1QmCz3p3W for ; Tue, 24 Feb 2026 20:25:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771964759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rG3EDX0Kqzmqv3p6vjns4tKdKuXTAvQ1Jw7V7DR/t6c=; b=DxLCRYSdFZ/N0XwSaY9yWcIHyvqfhssRV+Iq3y7V56oDkH8QnzvTBXs0U6/QfalVQyyuW8 s9/f0/BF8mA5hyfOtVwm4lwBl1VlohNOBzUZtNlLOGYSjeQAj7MV2w55MAukIYeZ3z3kyL JbdKMuC0l+IK+LHZiymuolw3P6F6Ttu/rHGqlS5bkG372ugIIRGC2nPjTEKLMPwK22/mYM sol7vN++Webpo1Pc2scCnYYnlp5XH/AS57Wnc4wAirWbE1mEzdPu9CGs03U/2yymK1DQ0C L61Y8d0sdMNmx209PVfEHflwCbdAlLN5sKaeb45RTmgCAUCBlRb4p4TL3/s5Xw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771964759; a=rsa-sha256; cv=none; b=mGuF2apVVLX2pLbtEKo7qmYiWHNNXWBen/z4MK3xQANJe8fc8qcL7KN8D08atgHPnAhqUR 8MQs09mbXrySK7mCG7VlEA9dSBbdrVmi6jaR7vBnsOTYZa980P2SakdH274D5RY3q1JKv/ xc94pTgmICSA6ozIcCCi4oUnDLxkdx5rwShdrF7aDowDdekUU0Ap6yutkfwN0nUnUMqpSb 7uebrVzcMtkCSPHA4QSfxdb4su4sxdLVME2vUEgZGFFY4oVBQi65cVGqKe8yrUpIib+ff5 b9fRNZ0kNRe/bnA8Co0lEApRiqr8xoUjaOiJito5OBNMC5FcMsPTwZzVdNkR9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771964759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rG3EDX0Kqzmqv3p6vjns4tKdKuXTAvQ1Jw7V7DR/t6c=; b=HCms2FxsK2sf7SKyy+WIXvbh3FtzrN8Ja2sleKHNuFxEy2EfMfA7/Z1toO2KcEwYP6f1Ig oYfdI3w/g+mnTr3vRrcoH6HV4+Er97tblwiy/V2VKi/3xoK5+gG3ehM9I5DODQlyRsU1Qa nug+mJAXp9Ds99Ojb9yTWx8QHPM/WvFG8Oq5BDLGmyb+1R9OqI9t+wvecuuCDryUF8ZhKZ 9pcgTnpuMwYjGmX2FWrwZ3Dr8gh/rJbX2UpK3cO75dL1jY8XJGyMz5UzWkR4cpflMGuRKw SCQZV8MPr7SkkE0L7sRdJQWYgVZlUIqbuJdwliwSr3GVf83+8OjanHdRdEwmUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL8PM0q5tzX78 for ; Tue, 24 Feb 2026 20:25:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2412f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 20:25:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 8d3f41dbcb2a - main - ccp: Don't name anonymous structure and union types List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 8d3f41dbcb2a949b52660501d7efc6bb12850b09 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 20:25:59 +0000 Message-Id: <699e0957.2412f.67bd42ba@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8d3f41dbcb2a949b52660501d7efc6bb12850b09 commit 8d3f41dbcb2a949b52660501d7efc6bb12850b09 Author: John Baldwin AuthorDate: 2026-02-24 20:25:45 +0000 Commit: John Baldwin CommitDate: 2026-02-24 20:25:45 +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 --- 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 Tue Feb 24 20:33:25 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL8Yx5kp2z6SrTv for ; Tue, 24 Feb 2026 20: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL8Yx2tC4z3qXM for ; Tue, 24 Feb 2026 20: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=1771965205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6+QogX0OQaCqyZwcREcENjK64XJ9q1ZsXCfWB2B8buo=; b=bzsERMw0Vkz7Yy8qsO82P/aHuvW8AV33tKDWGjpqspp77VbOb7/plkI7pH25sHN39Xka0B ko7d2j906ilYvSM5ifS+Wm3NYTIaO/7fr1HNtlZYFOMJd0swghPbV62uwsLn5bgvxDAD6v 8a6do3swN6wjvK2Q+VTp+Ts3wxnoR3s8wAc28veE46HMpBtNzgAr+mwb7goS8tzy/KGIcV Ws9mE5c6SlJ6RkXsXqxTXiy3uJZZqsYEkXefU6QaLjO+MOZGqoS4tPtRUWiMfwIaBYDROa e92tBcsrG0f2luZ8ULFM9d44dWjlfsWCJna8Sa0lepebC+0gOxwo596d8A2gqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771965205; a=rsa-sha256; cv=none; b=NDfHEka3Nq/x2zi/8u1a4hCgALxZG2e+rXgQrnSxElT8AAPYmj4aSJ4CjLPsKVZaZI9Vo8 hCwZUnfpykfHs7SE+Xe+WeXVqMKqjp1+XFYY6nUg2MxR53y7peWAz8fe+RXPHjLjvhycCY eFI7TLjxrkfLhzw2UlkLjNbQO/fxUQswcZa8+SbScrhZuWwNAi8gyXNa0CspKupGurrq0T EjVU4YvHeeLY32oUjmq52pDFU+KY7xDMwXBBOJXnULXv7C9nmVtCrxOmrEXu0EkopKmt80 k1boyReM9SYSTMxStNplK9LmyqlVwQ5DGVreP2M88vHER7mtDA8+Jdu8OULV1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771965205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6+QogX0OQaCqyZwcREcENjK64XJ9q1ZsXCfWB2B8buo=; b=uZw993s2cukHdU9GvAdxdkpUgSDX/QZq20/+m8SK8owk3F5zTLGYcA3xplU5Lxj2ixWnX1 0Yi+QhPocyf2hhMnI/pXN1C/DJFTFOanfgv9S6opwenbOBQt/i4y6uViQgboEOHmH2hEfT zGibgjl3m17iBw3ftSdMOFxzoqVCSE1EUXjGRlEf4xMujCDN2vhy9z2QuA5b5WwlqXSUmB z19r5ogELn3RnGR6MgGW0ZPXQT2TL83m8CVx5caZEC49URLZlHrIGyVayYUIkqLk43wrs/ IoEFosOHJecWcdX9PPeNprLHQo5GlWsuMyH6dQDFt59lmjHMx/+OJRLC+XH4Ug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL8Yx2R24zXM8 for ; Tue, 24 Feb 2026 20:33:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24ce3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 20:33:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 82b293ea6987 - main - sdiob: Forward-declare struct sdio_func List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 82b293ea6987ebcadf1142acd2218f50ab5e3fc8 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 20:33:25 +0000 Message-Id: <699e0b15.24ce3.15a2d099@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=82b293ea6987ebcadf1142acd2218f50ab5e3fc8 commit 82b293ea6987ebcadf1142acd2218f50ab5e3fc8 Author: John Baldwin AuthorDate: 2026-02-24 20:26:55 +0000 Commit: John Baldwin CommitDate: 2026-02-24 20:26:55 +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 --- 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 f356cca42588..3875ced43731 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 Tue Feb 24 20:33:26 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL8Yy6Cmjz6Srcy for ; Tue, 24 Feb 2026 20:33:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL8Yy3nxXz3qQt for ; Tue, 24 Feb 2026 20: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=1771965206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EEQzk4SZBLM/m9J3m0M6kfPzd3SYii5+yFy2V2Py3ZA=; b=ogUbMaEJX/cA/zc5siewnAq3a2MODG8u4WxX6b5DyR8bFwSykt8LLarvpORBMRO9qIL7Hg gkD2o4o3a8q8lRf+38LHm82B51+n6liTVEn4bN+V8MDefD5g2MRRIberEKbVmsZZ5wv6Su ygapIIHKSqE53giT570ouDEFG7acvXm7oUEBFZKzcO92xbAyML98RiTtwLI1JM8mDH2VHU 0pFXEVf+ivHk/2E2h/L101I9flXeZTwz1ZR1gMs14CTg9WHXeN874u6RYyQqvLECiHTjBO nyD8V2ftUm7pQPiTzxqmA7lZNUXrOXArEczL5ev7+A90s1L+0BwWDFrafR3k9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771965206; a=rsa-sha256; cv=none; b=ij4dy5dKu2kOz0KninHFzAgU8H6HiWYcQtLyoqYhjDfo8IGsPtzXR7LmjnmUPfGAUo8pE8 1gENBVQOWkMyuAl9CH17k4FqZw/TWev0Fd/8l/9csCzKUss8yYJLz0YulO7ATVo/jiO4h3 dpI6SGLmwUqq7T8GWI5VD4fkRSSgTWNfYJc3a4JQbnlh7r6DWqPOe94D1sjbhtrT8YTF5y 9c/TtXD44THKuGWf5Dwe/fSCkdUvKa9Tg4gdSz7XkMZ3JV4GZbz8yEnvIbppq+dFDvOqiK Uo6oy32/AIsr0kxH93oVO/5bOrYagCoeYa0+hd/cRLSfx+ARdrhPxauOhPqNhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771965206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EEQzk4SZBLM/m9J3m0M6kfPzd3SYii5+yFy2V2Py3ZA=; b=fJ5VhJZebpvMJnn2569oHQEJSLZUZTj8cwjuHpgWy+HxK62MbXrwhqzEzqA0fmh5x2PKFr YHh6mYVTRCFZpL74/DgcZHQ3sLz7gQ+xGDthEJnviW1m7Cyfi/wDMecRGEeUYYaaX4wxMZ px/x16on74eDIm6TjPdH5IL/VPFW41Rw4u5tTfG/f9f8sjf5LEg1U8j7NIzOUlQVQajf3Z NN9mgpDIMCooU2ZY8R1KmhUs7eGsQDLMuRzzeZGsBrL+mB3Z0WTBFR1NYoz90fSctVXV4m TtJFIaLWflLOjamdZjDVJp9/xP2fVEY1HCyCxO2h7MotNrU9iruZvEbaCOh9lA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL8Yy3DjvzXMB for ; Tue, 24 Feb 2026 20:33:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23f75 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 20:33:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: cb5a0eb05310 - main - bus: Add a new IVAR accessor to check for the existence of an IVAR List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: cb5a0eb05310d06e9853a01a542be55b9adee038 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 20:33:26 +0000 Message-Id: <699e0b16.23f75.68e9cd60@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=cb5a0eb05310d06e9853a01a542be55b9adee038 commit cb5a0eb05310d06e9853a01a542be55b9adee038 Author: John Baldwin AuthorDate: 2026-02-24 20:28:28 +0000 Commit: John Baldwin CommitDate: 2026-02-24 20:28:28 +0000 bus: Add a new IVAR accessor to check for the existence of an IVAR _has_ returns true if the given IVAR can be read. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55352 --- sys/sys/bus.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/sys/bus.h b/sys/sys/bus.h index d90e2a81f054..0d1baaafb4cd 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -945,6 +945,17 @@ DECLARE_MODULE(_name##_##busname, _name##_##busname##_mod, \ */ #define __BUS_ACCESSOR(varp, var, ivarp, ivar, type) \ \ +static __inline bool \ +varp ## _has_ ## var(device_t dev) \ +{ \ + uintptr_t v = 0; \ + int e; \ + \ + e = BUS_READ_IVAR(device_get_parent(dev), dev, \ + ivarp ## _IVAR_ ## ivar, &v); \ + return (e == 0); \ +} \ + \ static __inline type \ varp ## _get_ ## var(device_t dev) \ { \ From nobody Tue Feb 24 20:33:27 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL8Yz5Tscz6SrXx for ; Tue, 24 Feb 2026 20: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL8Yz4R6gz3qNF for ; Tue, 24 Feb 2026 20: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=1771965207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+136S8HjmJy7VKSskPCY23TPBnI7Zoy0murx2qfMgNU=; b=pVqTlFx4m/lKF+InTd3VE94O6ptUuEaDRv0vWthGGFCXuhGflYzIIcDfStyRBQLxwjb4jr 3ERfQO/QAGq14j2IUZhQy67JhymSKyx7kJBUVF9OacwIndLqPy1Vrq8Vrr3fTz/UaHrXAM y2edUHXY18hiyBfGGoGRR+FIcsmfqGuABMRYSwvQNhMrh7zOZckVbj5OMi+Wq/tm5uixkM zyg+ILRKAvY2sMY8j+3A5vOEtqVZKp2qe/Rtlz++VsdVPy7HCanzZ7sv4x7wevNTfHrD6Y EoxArd2wkrJo4pHyi0I0E7mICibdOXvpZO2zZQ9YbjOr7xUXgOW30dTXqwQ4EQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771965207; a=rsa-sha256; cv=none; b=hzzil3BwINM1g52kKzl7ouxncPmvAu6hYx/+pZwyrWOaTYcjmuFZ2a4/TeoWc3QI5rJ7Ju Bguif3SvgUWyOSoOFB3+G/AyF6IeGKClUnktBld/o7UXOxDRxzWjFcUO1qi+qtX6u2+onu qimPh1rPWnCuBgBOgFaWKfg3B8JRYdVE3DHsLi0TzRrqV6gq7rQgCFgrvdYuw7kKSduxOO PK6qJmKTVPH2pXvzMylMckElfyLwzUJ4x10apM59wGpsFJe9WUgB0ZJwC6N1hc499EfKZe puQUOA2KPuyKqcrueIDr5Gf9NK9NORhPG0ig0MSjGS0vM/HI2VIOlzPZq2LXuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771965207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+136S8HjmJy7VKSskPCY23TPBnI7Zoy0murx2qfMgNU=; b=wuE1c60DgkwcYLMJWsLge7Qj0PGm09EkC//vwZYGEWTdH3biqRub1B3Pxj1/YmvxxRnvyI eouuP7W3oSpAvxNXIRjfF5bjQMHpytdBnSyr7sF728E1/Plmk3WqirTpQMj29k6zng17fl tdK5yb1AEaQBFQSDwA+lrU7zxdA5G/oqkEL9iXC+RK5n0T+tWu7hN2m5HCRlUVxq8NSDf5 bFpXpT8xG60J8NlYyl8c6du4NLZd54tDCl5e12A7x5ejQvik2qJlUatDai87AS2uBJzU/l owYnQZNC130dDcWwvKzVoAv0JZUxiWwsQxa5JwKzt4xjuYkztJ6/UzhAc0ShDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL8Yz3zC6zXM8 for ; Tue, 24 Feb 2026 20:33:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22878 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 20:33:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: b937f9bf7509 - main - bus: Add __BUS_ACCESSOR_DEFAULT List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b937f9bf750907602606691dd92fb6d70e9f88da Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 20:33:27 +0000 Message-Id: <699e0b17.22878.7d05cc3d@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b937f9bf750907602606691dd92fb6d70e9f88da commit b937f9bf750907602606691dd92fb6d70e9f88da Author: John Baldwin AuthorDate: 2026-02-24 20:29:40 +0000 Commit: John Baldwin CommitDate: 2026-02-24 20:29:40 +0000 bus: Add __BUS_ACCESSOR_DEFAULT This macro is similar to __BUS_ACCESSOR in that it creates three helper routines for an ivar, but the "get" wrapper returns a default value if BUS_READ_IVAR does not return a value. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55353 --- sys/sys/bus.h | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/sys/sys/bus.h b/sys/sys/bus.h index 0d1baaafb4cd..a2e315bb9dee 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -943,7 +943,7 @@ DECLARE_MODULE(_name##_##busname, _name##_##busname##_mod, \ /** * Generic ivar accessor generation macros for bus drivers */ -#define __BUS_ACCESSOR(varp, var, ivarp, ivar, type) \ +#define __BUS_ACCESSOR_COMMON(varp, var, ivarp, ivar, type) \ \ static __inline bool \ varp ## _has_ ## var(device_t dev) \ @@ -956,29 +956,47 @@ varp ## _has_ ## var(device_t dev) \ return (e == 0); \ } \ \ +static __inline void \ +varp ## _set_ ## var(device_t dev, type t) \ +{ \ + uintptr_t v = (uintptr_t) t; \ + int e __diagused; \ + e = BUS_WRITE_IVAR(device_get_parent(dev), dev, \ + ivarp ## _IVAR_ ## ivar, v); \ + KASSERT(e == 0, ("%s failed for %s on bus %s, error = %d", \ + __func__, device_get_nameunit(dev), \ + device_get_nameunit(device_get_parent(dev)), e)); \ +} + +#define __BUS_ACCESSOR(varp, var, ivarp, ivar, type) \ + __BUS_ACCESSOR_COMMON(varp, var, ivarp, ivar, type) \ + \ static __inline type \ varp ## _get_ ## var(device_t dev) \ { \ uintptr_t v = 0; \ int e __diagused; \ + \ e = BUS_READ_IVAR(device_get_parent(dev), dev, \ ivarp ## _IVAR_ ## ivar, &v); \ KASSERT(e == 0, ("%s failed for %s on bus %s, error = %d", \ __func__, device_get_nameunit(dev), \ device_get_nameunit(device_get_parent(dev)), e)); \ return ((type) v); \ -} \ +} + +#define __BUS_ACCESSOR_DEFAULT(varp, var, ivarp, ivar, type, default) \ + __BUS_ACCESSOR_COMMON(varp, var, ivarp, ivar, type) \ \ -static __inline void \ -varp ## _set_ ## var(device_t dev, type t) \ +static __inline type \ +varp ## _get_ ## var(device_t dev) \ { \ - uintptr_t v = (uintptr_t) t; \ - int e __diagused; \ - e = BUS_WRITE_IVAR(device_get_parent(dev), dev, \ - ivarp ## _IVAR_ ## ivar, v); \ - KASSERT(e == 0, ("%s failed for %s on bus %s, error = %d", \ - __func__, device_get_nameunit(dev), \ - device_get_nameunit(device_get_parent(dev)), e)); \ + uintptr_t v = 0; \ + int e; \ + \ + e = BUS_READ_IVAR(device_get_parent(dev), dev, \ + ivarp ## _IVAR_ ## ivar, &v); \ + return (e == 0 ? (type) v : (default)); \ } struct device_location_cache; From nobody Tue Feb 24 20:33:28 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL8Z11RQmz6SrPj for ; Tue, 24 Feb 2026 20:33:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL8Z05JRtz3qdF for ; Tue, 24 Feb 2026 20:33:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771965208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Q2ZbYVOw7tK3fZP09d5cyuFTb1S397dak49XxNqJSE=; b=TTkNlUdkqA74/5OwC/rLO01HVGGHKn7UmLfhjjYHIBJLntQHK8FASA/rpGRBoGnOFkEae6 kkcPvOA6h+w1/ObdAWU1nXcwWkrDTffmmBRIyzW/nQSZYzvgKswQyvYDq4ve3Jmdd4PfMN a62jpPMotqafHEmTuk+uaKseDof4gS7vEdUtx+/PKFhzZPi7Tyb0XLES50n0YH9f3wQQum ait+CY1pg7fBd4dniV7mkVWjqBPb9NpYtdbuojp+l2TEQ+j5S7qsMpo+6KtGspBAJsfMgs LMKP3CidzjLCBUqk4P4q8vVqGfYM+zU1dnEdbdeLWXCxZmmqKMTraBL1+YW1nw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771965208; a=rsa-sha256; cv=none; b=YGcPU3oCUsH5isN+e8DOOwAb5PCyXsE+BV1q3FMJt1hIoAmXVU8TRudJLzUJ10yqlWk9hI tlaLPJlw0trFMGQ2ckeVwD4PCo94qccf9St5QDkBgzle2bdQPkjJHfrUcDYpTGgSAqkbQs L9XbbS18UQ0uldsTu/zcXxx7mR5/q9QF1d2hdVtg2fH6MR7g3u4Fz9wiIDKtbq0c709Q7x b4VBj7779fFlJgSllI4QkAgopthgwXBDCmRVx9DeEzZSbYPW5PCKnGrbQswIo9GdI7Nlyb qQxULgr+byKWDKlnlq+XoqK26IyFdgYd1JLnXrh8CZ0M2M81o0p+4/joGDQnKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771965208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Q2ZbYVOw7tK3fZP09d5cyuFTb1S397dak49XxNqJSE=; b=H8VR9khgDJ5h2Bh5M2UPVo/rPuJGU7pxXuw9PuNAyA8ZFEiLG7kzSLGqockka9hGtG8qSr POHHd1/DB3wUJvp7wOY5v3BOTVQcTJOn+n0YgjyUy4nHrHC+sRbZnZU9W4Xv2vSXnV24hK R2mfUApEfFCEiXdAWXVUZKvCcz2mFxx4sfDAVSLpbWo4jUy8gAxIYPX2DuldiWFSZ/BOHa R2acxIFOLNBB+6Gc0tDgiI2wQxqQByDGP3GHHfOjtjIwztpxdkJteJg/wiZcYdgx/sBJti c5S72XjMFtG5JSt3AFmeY4X3aMYQa/3e/KLSSGXvuRQqkDfnAS/IgCNpu9Z75g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL8Z04M8lzXYV for ; Tue, 24 Feb 2026 20:33:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22961 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 20:33:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 0bb867e9f565 - main - acpi: Split ACPI IVARs into global and private sets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 0bb867e9f56500e30948ea7c440dd1166097df7f Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 20:33:28 +0000 Message-Id: <699e0b18.22961.3b3524d9@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0bb867e9f56500e30948ea7c440dd1166097df7f commit 0bb867e9f56500e30948ea7c440dd1166097df7f Author: John Baldwin AuthorDate: 2026-02-24 20:30:06 +0000 Commit: John Baldwin CommitDate: 2026-02-24 20:30:06 +0000 acpi: Split ACPI IVARs into global and private sets ACPI_IVAR_HANDLE is the only true "global" IVAR that can be used across multiple bus drivers. The other IVARs are private to direct children of acpi0. However, they need to be numbered after ISA IVARs as ACPI mimics an ISA bus device. To ensure this remains true, add an ISA_IVAR_LAST to use in assert that the private ACPI IVARs do not overlap with ISA IVARs. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55354 --- sys/dev/acpica/acpi.c | 3 +++ sys/dev/acpica/acpivar.h | 6 +++--- sys/isa/isavar.h | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index f903f265f9fa..3a664523c27e 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -1154,6 +1154,9 @@ acpi_child_deleted(device_t dev, device_t child) free(dinfo, M_ACPIDEV); } +_Static_assert(ACPI_IVAR_PRIVATE >= ISA_IVAR_LAST, + "ACPI private IVARs overlap with ISA IVARs"); + /* * Handle per-device ivars */ diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index d1d55d2b7e5f..336f6ed1dc94 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -278,10 +278,10 @@ extern int acpi_override_isa_irq_polarity; * attach to ACPI. */ enum { - ACPI_IVAR_HANDLE = BUS_IVARS_ACPI, - ACPI_IVAR_PRIVATE, + ACPI_IVAR_PRIVATE = 20, ACPI_IVAR_FLAGS, - ACPI_IVAR_DOMAIN + ACPI_IVAR_DOMAIN, + ACPI_IVAR_HANDLE = BUS_IVARS_ACPI }; /* diff --git a/sys/isa/isavar.h b/sys/isa/isavar.h index f0b880de2930..39eb7c2bc76c 100644 --- a/sys/isa/isavar.h +++ b/sys/isa/isavar.h @@ -128,7 +128,8 @@ enum isa_device_ivars { ISA_IVAR_CONFIGATTR, ISA_IVAR_PNP_CSN, ISA_IVAR_PNP_LDN, - ISA_IVAR_PNPBIOS_HANDLE + ISA_IVAR_PNPBIOS_HANDLE, + ISA_IVAR_LAST }; /* From nobody Tue Feb 24 20:33:29 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL8Z21bmCz6SrV4 for ; Tue, 24 Feb 2026 20:33:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL8Z15ts1z3qXs for ; Tue, 24 Feb 2026 20:33:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771965209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j06MmnWpoPbAQeTmgcdaUCCMJoA0pexlN378S6MRIZA=; b=Aa+xcqfG6Y5b0/vWO/tPRTxJf0d/u4qS9ekAm2Zriun57Ph5rCCAJMwD94s5ED4hFI1iCo P0ghFz3pT2W5/XJPBeGIZ/hLoI7A+4QRets+gM9MCO/BB/o3nj+LewsrlB+BZFIvvSSAqG /63lv1qUQNmEDTwbJct+nq/VznqqhorxStlqEouFOUIPEOMHtCm/An5ilQgdAsTy4QwcAJ VPT3SJK7hvAHEOIhetMp0G19QPmNQPz9HgHN0UbEbBua6YKQtVqGQkF+F7klIJm+z8oJIw H8L6GAtjzPZUBXQH9Lq3eHd3tlanx8aSCKDrQuKoG1zSCSTSM/o22PjGcukdlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771965209; a=rsa-sha256; cv=none; b=AwMHAKxXXZ/1IpYt0Edb2M/PlqUkeH3n96y2lb3r+tIeJarJLVk77rZBV0iHOJzVFUu38T 2/zOwtV84IsV5dv2b6xUQp8mNe7jFldGnChQQAdI08fMq7sELvO/WxZzaiLy3L0PhBLKQp pzxVzUtj1ft3J61mCTUQNAWv9TBkdDBO+Vce5jW5GPoe3E0vjXbn0bxOaAdOdykUWKoV62 GZ/BWcG9tFsl/owuEnbGkR/AstFoWMKMqchuInOOnKlBq4BcQEnzOfliexK0d7cdoT/Yke 5YzNrKSNI5LW5ZFKMEXyEdK2AS7YUqI50AhumlMQMs49o72HnVA4/p/Ly5jAIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771965209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j06MmnWpoPbAQeTmgcdaUCCMJoA0pexlN378S6MRIZA=; b=nl7lwQlmbB6rXMqqCEUjmT0ycPbVYSYzHF6TMiWuPKpMe8/XYavQPldW32/PZ+SzylETrb 8Mo6YY2mpMuCy60hJZosAshi8t8epwvViFb3PMs9AcVcGDUaEnaM2d50UTRbiZqtsaFDon Omcg4y7VqsMOPTPyIcYuZgOyRJ4rw5MwduzTLECnmUU1FzFaTF9dd7h/05Ffjc/cWcJzjR fq1okxGz1rVU1xVkS0HyASUv73e2ZFj3LsJrTh+KwNB/7A/CiKbMHvGgw+V4cloWLS/cD4 dqr5o9MMLnd/xzQim+z1DanXBlf+YI8Vec0nhoce/6Qmo09FWAWXxWgOg8+xhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL8Z159gNzWpH for ; Tue, 24 Feb 2026 20:33:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 239d6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 20:33:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 591127bd4839 - main - acpi: Use __BUS_ACCESSOR_DEFAULT and __BUS_ACCESSOR for IVARs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 591127bd4839d00fc218d74096ca07088ad30703 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 20:33:29 +0000 Message-Id: <699e0b19.239d6.2a99f979@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=591127bd4839d00fc218d74096ca07088ad30703 commit 591127bd4839d00fc218d74096ca07088ad30703 Author: John Baldwin AuthorDate: 2026-02-24 20:30:36 +0000 Commit: John Baldwin CommitDate: 2026-02-24 20:30:36 +0000 acpi: Use __BUS_ACCESSOR_DEFAULT and __BUS_ACCESSOR for IVARs - Use __BUS_ACCESSOR_DEFAULT for the global handle IVAR to preserve existing behavior for acpi_get_handle. - Use __BUS_ACCESSOR for the private ACPI IVARs as these are only used with direct children of acpi0. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55355 --- sys/dev/acpica/acpivar.h | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index 336f6ed1dc94..aa8d5bd0971f 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -289,31 +289,10 @@ enum { */ #define ACPI_DEV_DOMAIN_UNKNOWN (-1) -/* - * Accessor functions for our ivars. Default value for BUS_READ_IVAR is - * (type) 0. The accessor functions don't check return values. - */ -#define __ACPI_BUS_ACCESSOR(varp, var, ivarp, ivar, type) \ - \ -static __inline type varp ## _get_ ## var(device_t dev) \ -{ \ - uintptr_t v = 0; \ - BUS_READ_IVAR(device_get_parent(dev), dev, \ - ivarp ## _IVAR_ ## ivar, &v); \ - return ((type) v); \ -} \ - \ -static __inline void varp ## _set_ ## var(device_t dev, type t) \ -{ \ - uintptr_t v = (uintptr_t) t; \ - BUS_WRITE_IVAR(device_get_parent(dev), dev, \ - ivarp ## _IVAR_ ## ivar, v); \ -} - -__ACPI_BUS_ACCESSOR(acpi, handle, ACPI, HANDLE, ACPI_HANDLE) -__ACPI_BUS_ACCESSOR(acpi, private, ACPI, PRIVATE, void *) -__ACPI_BUS_ACCESSOR(acpi, flags, ACPI, FLAGS, int) -__ACPI_BUS_ACCESSOR(acpi, domain, ACPI, DOMAIN, int) +__BUS_ACCESSOR_DEFAULT(acpi, handle, ACPI, HANDLE, ACPI_HANDLE, NULL) +__BUS_ACCESSOR(acpi, private, ACPI, PRIVATE, void *) +__BUS_ACCESSOR(acpi, flags, ACPI, FLAGS, int) +__BUS_ACCESSOR(acpi, domain, ACPI, DOMAIN, int) void acpi_fake_objhandler(ACPI_HANDLE h, void *data); static __inline device_t From nobody Tue Feb 24 20:45:43 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL8r811hYz6StVW for ; Tue, 24 Feb 2026 20:45:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL8r76qr2z3tn6 for ; Tue, 24 Feb 2026 20:45:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771965944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5axBAcGO/0uwOWFyK4flh5KkJw3Yfpk+BO0kQZ+UXao=; b=EbS5vfc2btsd1HCvKyVBmdp7OsuAIzBoygDKYI1zKyjeXLz6EXdRouxQIh/NHq+lEqE8jS 6eCb6dldJD5weoKBMhkchyu1qZKBeCi9CqeQt5uqX8Pm2RrXJWV5Ize1G6WP20Ew3oOdmh /I/FSC3h/df/QasgbZde7zB3TqiGppt03Ei2Dl7frMiATqmBpq91+FuUqkV4yo/qmx7o2H /rwjsPUYJorVNxkDgBKHPgwX0BptD+GzrMekz/uKcDqrfzwbLdWS39rSrGvUNVodTtxFlw QnHvahagtZ8tNhahBaS0HidbQHFOLGL1WJtpddcCLbhGDdlbe2Jnk/1VoqY1vQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771965944; a=rsa-sha256; cv=none; b=yKfBDGjYyZLIse1ET540Z/eK+up1Om05rR4wGdNY8Bvgpe3rmkKzYGjlQODyJdNekMfk3i LLVVC5XawPvnSgHJob9Fuk5T+nXOHUXXlC4azPnrIQkNKo3VPUoSAFRDuBeaycAbrwICft W+jTZa1LtnFaRpuvy6H5iMXwSX7PdWzDHnt4PWHytXXbcSudqFVE+ZRO9jMsPl5RUS4bua IZXmI1zA8oKNrzCefDlVaUXopBa/dr5g4QIcb/UjemNnpbejV7vKlK05dfSS6QzxUVtK1Q SZNs6ZVkuA6wRkYpVcOWvzmEPEL4eik2T5qqkjArab74lb3/XWGT/ySIMb5CQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771965944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5axBAcGO/0uwOWFyK4flh5KkJw3Yfpk+BO0kQZ+UXao=; b=R3ynMpdARZsUNf1H+zqJ8ChHizR57ik8ZpZRScTgLqa90P2TwK0gNAtsLos/rduC5CVf7G uAxz96J7lacFVA9NSCgWXEyfV2kxxRWoqCZrJhmd0JKQK+vyLTF45+P3r7OzYu+SkCl49M GD/nIqk2ynFoYDgeMJdH7WTCGdqgiPg+f6NmNzbNQiPod9Zbg1buhRPOR59qgOphw0lzxG 9NS9TEnh8JO7Hy7VV0+Cr+a6pLvJeYBoIlQZtlX7+pL68Qj1KC5NdU7oaj4DjSMX+qdXg1 Fi1J+aRZ+ThP35KeIzNe49nw78yDFdKfTZJC466ESqzxc5Mdzhmz8EPagEcrdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL8r76PjjzXqD for ; Tue, 24 Feb 2026 20:45:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24af8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 20:45:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ahmad Khalifa Subject: git: fac9ae3db4e6 - main - efibootmgr.8: capitalize examples section header List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fac9ae3db4e6a28dfd467369e262f636e10a3b01 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 20:45:43 +0000 Message-Id: <699e0df7.24af8.323a997b@gitrepo.freebsd.org> The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=fac9ae3db4e6a28dfd467369e262f636e10a3b01 commit fac9ae3db4e6a28dfd467369e262f636e10a3b01 Author: Ahmad Khalifa AuthorDate: 2026-02-24 20:11:26 +0000 Commit: Ahmad Khalifa CommitDate: 2026-02-24 20:42:21 +0000 efibootmgr.8: capitalize examples section header MFC after: 3 days --- usr.sbin/efibootmgr/efibootmgr.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/efibootmgr/efibootmgr.8 b/usr.sbin/efibootmgr/efibootmgr.8 index ca4e87a30ef8..e5054023e40c 100644 --- a/usr.sbin/efibootmgr/efibootmgr.8 +++ b/usr.sbin/efibootmgr/efibootmgr.8 @@ -202,7 +202,7 @@ Displays the UEFI device path of .It Fl v -verbose Display the device path of boot entries in the output. .El -.Sh Examples +.Sh EXAMPLES To display the current .Cm Boot related variables in the system: From nobody Tue Feb 24 20:45:44 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL8r92b1Mz6Stdl for ; Tue, 24 Feb 2026 20:45:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL8r90QjBz3tfV for ; Tue, 24 Feb 2026 20:45:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771965945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aJ8LF8Ve7w4B5wu6rr/xII/T5pTJPqJ91DJfW/T3sLo=; b=cZlFFxWfoYwfdR/D2spD6jEHEpkm7hTai4Y6YtX75DS5/hEuuc6kO+wdupH+fp/VBDG3aF CfVj7F6nModt/Eggw2jeZbqQLItZZE+TGFqCs6mt+VJzVoefv7ZEDksSkJyZ3f/cyWL9d5 qUjNUzYjg8WrP+flwIH/1j2pmMe3TRjraUGxjSyDaJv6t/JHaW1VO+wvF7YWfl9eSnEu0e HmsZ84E6kLhU/sT2/eL5iJl2R9Ak3mtqhzbvyX+X7qwtDDot2HgRiQ1a7vR2eWDzj/HsrX nyKKCaDJlfhZboMd9YnGEJaS+jxuaVbcYsEaTfixuOztXPR9hcgncjLs8oVC/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771965945; a=rsa-sha256; cv=none; b=fZDF3T6nJ80Kayky7PnfUIj/dYgcWvkwCKwKZbF4/RwN98QFMzvb+XMnUCTIVAqcxITRky cou2GM5gAZr+GWtqdbdr+hR39S+RrcLBNTarqWJ0KKxlp2IX9wes1MdhzlbPHjrmRwoAVH loX/r/TjU+xK/dXBD05itKftCYewJVeJm2RAXPZgWbCeyr+5pvW7jyEK957Pjd9P1QNG0n fcK64lT7OCAigbqF7dpYrWgv08oDviVMMKrv13bZQRCP4SWxuYJD52SRtePE1KHZ2OwkWj jwa+ig0we1nxNIxH792D62N6BD3vZixXhYu0EbefAzbm60vcjB1yoDRjj/ZLLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771965945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aJ8LF8Ve7w4B5wu6rr/xII/T5pTJPqJ91DJfW/T3sLo=; b=Lhb3ZlcgaKWk0C7vVrOW7sthT9HGe4L1XV0pKTxRGanGu/5jTG2kO+uOPYBUjZPah7ODIo BNtZfCGjRAH3EuQYGA5UIHnYObaiRi+9nAHTQloG/dWX6dSU38ORKo4nVgkMkWJnVx3vRh Em2Qyn9zcI52FiyVuXFOY298tp0gSGXNY7YGawfRof0tRwtvKcc7l9gfrfdW65ubSYIKeY gcPJcO5lm8/ID6HBTB+gvyziCg9kFlF65EUTzQD5NJ7cj+yB1yjwryCSfYdDjzSOhbJOum gTeVrPZ6VrvJtb+p6GXb6E+WK4S1csixfW15/167LJ8LktMEeoDecmoz8tH9tg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fL8r901cZzXcy for ; Tue, 24 Feb 2026 20:45:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25d0b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 20:45:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ahmad Khalifa Subject: git: 0fd91c489134 - main - bsdinstall: fix EFI boot entry creation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0fd91c489134643ac9e38c0f55ba7464fe892c5e Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 20:45:44 +0000 Message-Id: <699e0df8.25d0b.67e9348e@gitrepo.freebsd.org> The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=0fd91c489134643ac9e38c0f55ba7464fe892c5e commit 0fd91c489134643ac9e38c0f55ba7464fe892c5e Author: Ahmad Khalifa AuthorDate: 2026-02-24 20:11:32 +0000 Commit: Ahmad Khalifa CommitDate: 2026-02-24 20:42:21 +0000 bsdinstall: fix EFI boot entry creation update_uefi_bootentry assumes that the caller sets FREEBSD_BOOTNAME and mntpt, which isn't the case anymore. The result is that there is no "FreeBSD" boot entry created/updated after install. Most machines manage to boot from the removable media path (if the loader is installed there too), but some don't. Take the loader's path as an argument and rename the variable used in the ZFS mirror loop so mntpt can be reused below. Also mark nentries as a local variable so it doesn't leak out of the function. PR: 293385 Fixes: 494de51bc0074472d1b01604f085daea0844f240 MFC after: 2 days Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55469 --- usr.sbin/bsdinstall/scripts/bootconfig | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/bootconfig b/usr.sbin/bsdinstall/scripts/bootconfig index 9c188c1d8a91..d551d2448611 100755 --- a/usr.sbin/bsdinstall/scripts/bootconfig +++ b/usr.sbin/bsdinstall/scripts/bootconfig @@ -83,11 +83,13 @@ uefi_copy_loader() update_uefi_bootentry() { - nentries=$(efibootmgr | grep -c "${EFI_LABEL_NAME}$") + local nentries=$(efibootmgr | grep -c "${EFI_LABEL_NAME}$") + local loader_path=$1 + # No entries so directly create one and return if [ ${nentries} -eq 0 ]; then f_dprintf "Creating UEFI boot entry" - efibootmgr --create --activate --label "$EFI_LABEL_NAME" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null + efibootmgr --create --activate --label "$EFI_LABEL_NAME" --loader "${loader_path}" > /dev/null return fi @@ -97,13 +99,13 @@ update_uefi_bootentry() for entry in $(efibootmgr | awk "\$NF == \"$EFI_LABEL_NAME\" { sub(/.*Boot/,\"\", \$1); sub(/\*/,\"\", \$1); print \$1 }"); do efibootmgr -B -b ${entry} done - efibootmgr --create --activate --label "$EFI_LABEL_NAME" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null + efibootmgr --create --activate --label "$EFI_LABEL_NAME" --loader "${loader_path}" > /dev/null return fi FREEBSD_BOOTLABEL=$(dialog_uefi_entryname "${EFI_LABEL_NAME}") [ $? -eq $DIALOG_CANCEL ] && exit 1 - efibootmgr --create --activate --label "$FREEBSD_BOOTLABEL" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null + efibootmgr --create --activate --label "$FREEBSD_BOOTLABEL" --loader "${loader_path}" > /dev/null } f_dialog_title "Boot Configuration" @@ -151,21 +153,22 @@ if [ -n "$(awk '{if ($2=="/boot/efi") printf("%s\n",$1);}' $PATH_FSTAB)" ]; then # over gmirror, so we only do this for ZFS. esps=${TMPDIR:-"/tmp"}/bsdinstall-esps if [ -f "$esps" ]; then - mntpt=$(mktemp -d -t bsdinstall-esp) + tmpmnt=$(mktemp -d -t bsdinstall-esp) for dev in $(cat $esps); do f_dprintf "Installing ${file} onto redundant ESP ${dev}" - mount -t msdos "$dev" "$mntpt" + mount -t msdos "$dev" "$tmpmnt" uefi_copy_loader "$BSDINSTALL_CHROOT/boot/${file}" \ - "${mntpt}/efi/freebsd" "${mntpt}/efi/boot" \ + "${tmpmnt}/efi/freebsd" "${tmpmnt}/efi/boot" \ boot${ARCHBOOTNAME}.efi - umount "$mntpt" + umount "$tmpmnt" done - rmdir "${mntpt}" + rmdir "${tmpmnt}" fi - # Try to set the UEFI NV BootXXXX variables to record the boot location + # Try to set the UEFI NV BootXXXX variables to record the boot location. + # Note that the ESP is mounted at ${mntpt}/efi. if [ "$BSDINSTALL_CONFIGCURRENT" ] && [ "$ARCHBOOTNAME" != ia32 ]; then - update_uefi_bootentry + update_uefi_bootentry "${mntpt}/efi/freebsd/${file}" fi f_dprintf "Finished configuring ESP" From nobody Tue Feb 24 20:45:42 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fL8rD5lYTz6StQf for ; Tue, 24 Feb 2026 20:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fL8rD0w9rz3twM for ; Tue, 24 Feb 2026 20:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771965948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PDacF/p6ezyiERG6v9TJKmDTqrDXvHnMmg+0vIZDY0o=; b=AiP5nMYUDo/4YZWv756oZ8zFDv5lpuPFukCAWdyN8MADPeMNV1DEAQqLMtxqTrSHoNduVI hutjolxG3mclIaR2gFh3Qb88EXNU9wNSYOCB41ctKZTO/niHXOy4FrLn6GWHpcqf1RBPX/ S0cLOo7ls1EktYt2LuDKuvFH/kbqaMpsrCDZhvj2XIAVNKcGK/qUs/jxlWeB5O/8uD0OtX J+gQzgSV2EKBWIv7KPZbnx43+fi1T13aP9knPUr3ZUTfNJKbzOQe23rOUPdhAwsvftPJP3 sIX/sgNCZHzP5LgGyGEhPNqIvoFvpO0qlm1Co2I2a/d8IFwaanvBoMrqDgt7jg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771965948; a=rsa-sha256; cv=none; b=ZnHTI7n7uwaPcTYSwbbClKZ+8xvPrsvIHVRsmN1X+Kw8td2a7wPofKrxofqv6wSdonpyKK wExj8nHdgOe2TSiJFHpulnoay1af7/ZW4KZoxlAH/QYZkjN3hXEVIPAwRjWIZ1LoOKwMQP JocYV8TPo6gwErpSftVszvIylO1qOqY7wGj0FmN1VYaSGxuTqbVgXbl2C6dsgbxOPjhXq3 Odd62oSBgEUQ7PPbtWzibewgaerC4BGKcTwh9HHtM4V9ig0lc91ZmfQAW1FOG8ENlxtgdp V9QFAjv/PCoAOTb507jcKzSwhnxSA7r5QRbVwipKI4otN4eJe8vJE7XbbGNf+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=1771965948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PDacF/p6ezyiERG6v9TJKmDTqrDXvHnMmg+0vIZDY0o=; b=Hbc+XS7wYVhaG40LRAYMwDgDavwlJtOKbmNoVsFyGu3bGBf4Vt2L7rhRIr10ozIJLygkjF kD7m1LVdcaA8zEL26bv2XOq7xu9yVGSs79GHEJOAofLKP+O4nQap1xQvq+KKz9fB7TNY4N K2E3z6uGfBuwv3VoapyYt2RIY7ptcPCozQHEa4m+K9GS1PmTq5hLQds8uOz4QexohHBdpn VUhyyqa48It6AlLZ7+Ua9XwqnHu+zxONWTgHp1CYkZDGusiAE404w4CxZpkm5HkZJOCj4q vSkSOXJuHfzrZtbZrutKlY+SARNo2svtcuDTIm14GhDD3PbpuLk5pyLvyyEY/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 4fL8rD0M8JzXGb for ; Tue, 24 Feb 2026 20:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23cd1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 20:45:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ahmad Khalifa Subject: git: 0c075db78a98 - main - tools/build/stddef.h: fix stock clang/gcc headers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0c075db78a98de8e3a255597d045bcd24ba27be7 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 20:45:42 +0000 Message-Id: <699e0df6.23cd1.cb2856a@gitrepo.freebsd.org> The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=0c075db78a98de8e3a255597d045bcd24ba27be7 commit 0c075db78a98de8e3a255597d045bcd24ba27be7 Author: Ahmad Khalifa AuthorDate: 2026-02-24 20:11:12 +0000 Commit: Ahmad Khalifa CommitDate: 2026-02-24 20:42:21 +0000 tools/build/stddef.h: fix stock clang/gcc headers Both clang and gcc's stddef.h are designed to be included multiple times with different combinations of __need_* macros defined (e.g __need_size_t). Remove the #pragma once to accommodate this, ptraddr_t is guarded by _PTRADDR_T_DECLARED anyways. Also use __SIZE_TYPE__ instead of size_t since it's not guaranteed to be defined. Reviewed by: brooks, imp, kib Differential Revision: https://reviews.freebsd.org/D55453 --- tools/build/stddef.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/build/stddef.h b/tools/build/stddef.h index 77348dd57149..ca6d481a9d29 100644 --- a/tools/build/stddef.h +++ b/tools/build/stddef.h @@ -36,14 +36,24 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -#pragma once + +/* + * The header guard is left out on purpose here. Both clang and gcc's + * stddef.h are designed to be included multiple times with different + * combinations of __need_* macros defined (e.g __need_size_t). + */ + #include_next #ifndef _PTRADDR_T_DECLARED #ifdef __PTRADDR_TYPE__ typedef __PTRADDR_TYPE__ ptraddr_t; #else -typedef size_t ptraddr_t; +/* + * If anything other than __need_size_t is defined (see above), we won't + * have size_t. Use __SIZE_TYPE__ instead. + */ +typedef __SIZE_TYPE__ ptraddr_t; #endif #define _PTRADDR_T_DECLARED #endif From nobody Tue Feb 24 21:41:08 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLB441zqKz6T28S for ; Tue, 24 Feb 2026 21: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLB441Pg9z42PW for ; Tue, 24 Feb 2026 21: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=1771969268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/9qv4vm8ER+gu06Q8VOe+0CbW1SYBI2ZLXp3Uzxj4Wk=; b=pB8Anx8oeu3jPX0+hZRGVUFXPzlLzdI81Ig5VwOXh53nUiIYLvYp2++Buq2k3OBzzEMLJK eElQAoJ89HEk2Duz764hwU+ci6T/qUNZL5obSVSnb9OTKvVN/2e2ZtIuhdz5AAvsgjABMK kGmZbwxyASV0mkvPheBCkxHOn8J0ixbjGDPWm24zhRCHSVW3IsRqgBMInS78pE42Tw+xnw 8tbFsRMKQZiQzrzIIxfkq/zuSUk8zRD2l5JYNTFY+pw7mfusBr01Xzr+5xsNFi7G3WsmC7 YFYFj2KunU/EE+pVan7rMkfvybosrNJeNTxi1BW4q5b2ky4lDPstPmHcCk700w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771969268; a=rsa-sha256; cv=none; b=G2qG6XE99y7xMlniCiSrgaq1DSa1okRfdWyt0cTHY+yLGZe/ZcyHhjV7ALlIuF/wjOyEvX ujhSZBkfhL9AmeXgEp22EWIRsrLg4zkwpa8gAVCrAlcFStp0U+duJvtHoggD5MmPrBJnar pLNSx3SBZzTLsRj490iAYtkZhUtE/oPS0TouLgpnBUixi6A0R7UYB4zCe+Vd8YPkNHa48u xChojdlHgO5esDu2/02jIkv/mj2gUnqDSFnFEBG0RxsuvKbtppEPgWrhFIoCN1kvv2JZuG YuVn/BWStT0O/Sqzcf5619mSsbNzB1DHxcXoV+x4MlPnq2r7h/7g5+I9g1MdLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771969268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/9qv4vm8ER+gu06Q8VOe+0CbW1SYBI2ZLXp3Uzxj4Wk=; b=fJIdxSrf2wAdQlkl6HsftKdJdAqnh7wvBc+n/rlePZvFFdriwdS4/pWcRQF5Qx0vnX7fMT UECSESnLAx5CTc8QEU+/Vr40W8MKnL5X9HV6lsutTMwzYTG1645pkbIaHrwOQQl7CT0756 8xBxwbcybhf4lHQaLm0Ztb+lRyQy+1AgVw4nCgjDbRqoOZCB0M+4p09sXhVQGAsPhmKRBq jd0dMX8OgXtVg/cbXypZNqQdjLVBQ44kkY8GP0sR12f4zSPz4JFSP6gXdU0sdBPfXdnRhC rBt05z6BJJ70+VA2sKOu/2qqeUiRuBbnNVQkRJ0Mwivi/gPHd6glrit6jKSu1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLB440qZfzYtH for ; Tue, 24 Feb 2026 21:41:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3227a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 21:41:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 56a6305557db - stable/15 - ahci: Restrict NVMe redirection by BAR size List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 56a6305557db0d545c4f358ea8e154a657d95dfc Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 21:41:08 +0000 Message-Id: <699e1af4.3227a.29d13108@gitrepo.freebsd.org> The branch stable/15 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=56a6305557db0d545c4f358ea8e154a657d95dfc commit 56a6305557db0d545c4f358ea8e154a657d95dfc Author: Alexander Motin AuthorDate: 2026-02-09 19:23:26 +0000 Commit: Alexander Motin CommitDate: 2026-02-24 21:40:41 +0000 ahci: Restrict NVMe redirection by BAR size Attempts to access vendor-specific registers on emulator of older Intel hardware was reported to confuse one. Since the redirection obviously require BAR size bigger than normal 2KB of AHCI, add the condition, similar to what Linux is doing. Requested by: kib MFC after: 2 weeks (cherry picked from commit b9d3945831fc7a60f2065c7a0afc747dc5653c9f) --- sys/dev/ahci/ahci_pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/ahci/ahci_pci.c b/sys/dev/ahci/ahci_pci.c index 2b4cb37275a6..ed1b734f70be 100644 --- a/sys/dev/ahci/ahci_pci.c +++ b/sys/dev/ahci/ahci_pci.c @@ -523,7 +523,8 @@ ahci_pci_attach(device_t dev) * here, or the user has to change the mode in the BIOS * from RST to AHCI. */ - if (pci_get_vendor(dev) == 0x8086) { + if (pci_get_vendor(dev) == 0x8086 && + rman_get_size(ctlr->r_mem) >= 512 * 1024) { uint32_t vscap; vscap = ATA_INL(ctlr->r_mem, AHCI_VSCAP); From nobody Tue Feb 24 21:45:02 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLB8j0Mb6z6T2XM for ; Tue, 24 Feb 2026 21:45:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLB8g65SDz435L for ; Tue, 24 Feb 2026 21:45:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771969507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p9H8ukiA9tLvlj5KsAbBCAlgnk3Z28/t4KJOet9r+7A=; b=Ff0DZqJrnkQbLyrXNxb/bmrvLJh1th1701AlFrhLyKRjuejfGLxf3/E/B2hgtZDaiZMKEk eP5SQ+CYmEoxdveCeEqV5IssVYUOkpwxpV4OKsm0hj1kLZ8cUQISm3272w59MXjeU+JCx6 4cOlJtUJmhbK0HzfXFP3yPcrZctN9+JGmuNdKgD5N38uuSz7uUOUC/ftD/F5SVaoxbWwKY /mQy8wG6F5lkY2sE/uCBptJg1oYy6XCh1IupAKmbLrfI5wukMEnk1G3+wD70QvHhhp4TTd HVbgcoJ+yYyzS1YKpN/VwDTTaw7Pjk1bk3UwBJrGB7WWiAKfhVPSTc4SdDGqbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771969507; a=rsa-sha256; cv=none; b=g5mgs9hLVkRWFZ8gjFm/6UeD0efIPZ2qfKg/96txxcBhZdcG1/6ZvCrxCjSO1KqCztl7HJ rCXDGXErWU7mCyHj1dB7iPvMtY7zV2QvZijuiPRGemNd0uUxsUz5WWswjdH+Fdmub29ttY spogoUtZldt8iUVFY6gTaayOvyIB4TE7/ZEifuI7NETt3w2z8SF10e594MPjly86E01KDs JhexpXNeiqzG368a23U1Pn5Ou2wQ2tU0X2d0H+0N9ueI3gkDv0gUTFojFGZ72DFkIbjiKg MkIG8xjTSrcf+qcH7KPtfFCknZMY6IZnlwzXvfYue1NE4W9q4yYlir6OmTAqDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771969507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p9H8ukiA9tLvlj5KsAbBCAlgnk3Z28/t4KJOet9r+7A=; b=MewV4c3meEd/V4VU6/07gwj4V2TpGMaYNrS86V6MwsHU6vVRZ4Aq8KCt4LGrHHMJ/QUSUB 6CMVsNOYQ36haQN+rTWg3KNA+zcsd3H0pg+HypaZGgzAcKleiYfUGFfWSoExmETbUAFDp6 rftuc+1wnoPfCw38XyQtrQeO4zxrqz777x8f3FEQOwXrEbtBzmH64rDgJWvOpi3xjt1f/h 0ELL38kK+LsdXYdLiEu+O6i9j6SNMdYv5yB6lbQ3cPMfL0mg2idQ32qpd2/fMcaTUaDS79 2SYl+OgF3u6qJfR8N4uNwAG9tHTrF8srJAoovpFe/zSVUsR9eri57Cz+UnBaPQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLB8g5Mw6zZlB for ; Tue, 24 Feb 2026 21:45:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32bb9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 21:45:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: aabd5243fb97 - stable/14 - ahci: Restrict NVMe redirection by BAR size List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: aabd5243fb97979d33a7eece4f7cca18ffd82a95 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 21:45:02 +0000 Message-Id: <699e1bde.32bb9.731a65b1@gitrepo.freebsd.org> The branch stable/14 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=aabd5243fb97979d33a7eece4f7cca18ffd82a95 commit aabd5243fb97979d33a7eece4f7cca18ffd82a95 Author: Alexander Motin AuthorDate: 2026-02-09 19:23:26 +0000 Commit: Alexander Motin CommitDate: 2026-02-24 21:43:36 +0000 ahci: Restrict NVMe redirection by BAR size Attempts to access vendor-specific registers on emulator of older Intel hardware was reported to confuse one. Since the redirection obviously require BAR size bigger than normal 2KB of AHCI, add the condition, similar to what Linux is doing. Requested by: kib MFC after: 2 weeks (cherry picked from commit b9d3945831fc7a60f2065c7a0afc747dc5653c9f) --- sys/dev/ahci/ahci_pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/ahci/ahci_pci.c b/sys/dev/ahci/ahci_pci.c index 3de1f6a79ef5..d708951efb05 100644 --- a/sys/dev/ahci/ahci_pci.c +++ b/sys/dev/ahci/ahci_pci.c @@ -520,7 +520,8 @@ ahci_pci_attach(device_t dev) * here, or the user has to change the mode in the BIOS * from RST to AHCI. */ - if (pci_get_vendor(dev) == 0x8086) { + if (pci_get_vendor(dev) == 0x8086 && + rman_get_size(ctlr->r_mem) >= 512 * 1024) { uint32_t vscap; vscap = ATA_INL(ctlr->r_mem, AHCI_VSCAP); From nobody Tue Feb 24 22:08:20 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLBgY6Jhrz6T51Z for ; Tue, 24 Feb 2026 22: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLBgY5WY1z459C for ; Tue, 24 Feb 2026 22: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=1771970905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1ie7aitw7nPfm/soK14sUqv6moeLBVrCoHP1GEWUIHA=; b=vEtUxTl6FPv1jmR2uIEnh0KcGQ+0t7/mj9ujWWbfaAy/AGCHgv3pljLLAkpSv+CgziSAHF 4yi819So4i7LAKnzHgCfYj8TFLb2h4ArF+oTTOVKXQwFGqJH7pZBLNhrSzSZQddggMGElI r6qCCbpzHLLkR+g6NxHKZ0FIYKcJ5uTzZ53+byvLuuR3htryqt5/p3nfIsjuD4EtKyWF/m THjMUUnUSFM2pngfco+Ct6TjeyjyRK0uqutYvw2ISf9f/TBTFVXv5N8+PKDV8/wjsHE45O jABpeW1Jm6WDJHHhyfY8makxvMCzBoJVwW1is32bkJyPzrt4opXYv5N+9WC9xg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771970905; a=rsa-sha256; cv=none; b=CtaSae9rMCZfJYOCSbpoeaxb/cl1ao/jpSBOK6s6REBAMbYy7wMmWMnzKQDEvVQQi6g0D2 IQJxy3rIQU3GbdNmYoYWPClCFimnbOtY5xeInvEVqgqEnfv2gWYGgFz67jdPtFcD/RGpbA AEH5/hf4FuXbm7CnkSoMEVgnxh5ubBkn2ZuDI6rtPsAcsp5B4YMNS5Hd0l3EVcgY54ARZG /gAUH7qtX382Pl8Wb/Zxukasdil+Ywc5oS+JiDVNXajqO//egwUy3EqFnT9Ef1e8AapVwh xV6VVq5EyTR/eFen3P42CYyypr/Trcr9OY18BrnMABvun9kiiNf315QrOaUy2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771970905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1ie7aitw7nPfm/soK14sUqv6moeLBVrCoHP1GEWUIHA=; b=uqS6/lEQMNN79cKuPt+HgiVfwR7x0eXcLBS5rBBF16mf5WN+rmifea+e58v5SRZZ86c1YB U8Zy4HK6xKXRuBEmI3pfxHhjM8IZ28rNpAnMZ3oqOeoqXLiYYlCcIR4ujbdFP2g4305sBp uOeQOB+u7Nu6goyoh9IL6GBbndEjuuXkYweTeSgeXl7TznK4cctZSzrOyKgCkZ71/cIMWw yI83jDw2VISS4wj66b44XkIy38URGt9Opnf8E/svm5z99oXInpL/Qc/ypwBJJQXIgKvim7 biEIF0ZBmQCGpY+HMtL8eycu05r/dqGxv4DMyHkMb0/JjfCwuUUpPD3XnL7jIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLBgY4rH6zZmn for ; Tue, 24 Feb 2026 22:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36a8c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 22:08:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Rick Macklem Subject: git: 5153ca331b44 - stable/14 - vfs_mount.c: Don't call VFS_MOUNT() if only exports are being updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5153ca331b4448e062cebad987773756c0aff2dc Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 22:08:20 +0000 Message-Id: <699e2154.36a8c.18415958@gitrepo.freebsd.org> The branch stable/14 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=5153ca331b4448e062cebad987773756c0aff2dc commit 5153ca331b4448e062cebad987773756c0aff2dc Author: Rick Macklem AuthorDate: 2026-02-17 22:57:42 +0000 Commit: Rick Macklem CommitDate: 2026-02-24 22:05:42 +0000 vfs_mount.c: Don't call VFS_MOUNT() if only exports are being updated PR#293198 reports a hang within ZFS when exports are being updated concurrently with a VOP_SETEXTATTR(). The hang appears to be caused by mishandling of the z_teardown_lock, but fixing handling of this lock appears to be a major effort. Since the hang occurs when VFS_MOUNT() acquires a write/exclusive z_teardown_lock, which rarely occurs, except when exports are being updated, this patch avoids the VFS_MOUNT() call for this case. Avoiding a VFS_MOUNT() call fixes the hang for the case reported by PR#293198 and is also an optimization. As such, this patch avoids the VFS_MOUNT() call when only exports are being updated similar to what was already being done within vnet prisons. PR: 293198 (cherry picked from commit 935cf3284f520c90a63baaadb762caaa30084f5c) --- sys/kern/vfs_mount.c | 52 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 21 deletions(-) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index b380a7fdaf6b..dabf52f07017 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -76,7 +76,7 @@ #define VFS_MOUNTARG_SIZE_MAX (1024 * 64) static int vfs_domount(struct thread *td, const char *fstype, char *fspath, - uint64_t fsflags, bool jail_export, + uint64_t fsflags, bool only_export, bool jail_export, struct vfsoptlist **optlist); static void free_mntarg(struct mntarg *ma); @@ -806,7 +806,7 @@ vfs_donmount(struct thread *td, uint64_t fsflags, struct uio *fsoptions) struct vfsopt *opt, *tmp_opt; char *fstype, *fspath, *errmsg; int error, fstypelen, fspathlen, errmsg_len, errmsg_pos; - bool autoro, has_nonexport, jail_export; + bool autoro, has_nonexport, only_export, jail_export; errmsg = fspath = NULL; errmsg_len = fspathlen = 0; @@ -861,12 +861,11 @@ vfs_donmount(struct thread *td, uint64_t fsflags, struct uio *fsoptions) * when we want to update the root filesystem. */ has_nonexport = false; - jail_export = false; + only_export = false; TAILQ_FOREACH_SAFE(opt, optlist, link, tmp_opt) { int do_freeopt = 0; - if (jailed(td->td_ucred) && - strcmp(opt->name, "export") != 0 && + if (strcmp(opt->name, "export") != 0 && strcmp(opt->name, "update") != 0 && strcmp(opt->name, "fstype") != 0 && strcmp(opt->name, "fspath") != 0 && @@ -957,7 +956,7 @@ vfs_donmount(struct thread *td, uint64_t fsflags, struct uio *fsoptions) fsflags |= MNT_UNION; else if (strcmp(opt->name, "export") == 0) { fsflags |= MNT_EXPORTED; - jail_export = true; + only_export = true; } else if (strcmp(opt->name, "automounted") == 0) { fsflags |= MNT_AUTOMOUNTED; do_freeopt = 1; @@ -989,14 +988,22 @@ vfs_donmount(struct thread *td, uint64_t fsflags, struct uio *fsoptions) } /* - * If has_nonexport is true or the caller is not running within a - * vnet prison that can run mountd(8), set jail_export false. + * only_export is set to true only if exports are being + * updated and nothing else is being updated. + */ + if (has_nonexport) + only_export = false; + /* + * If only_export is true and the caller is running within a + * vnet prison that can run mountd(8), set jail_export true. */ - if (has_nonexport || !jailed(td->td_ucred) || - !prison_check_nfsd(td->td_ucred)) - jail_export = false; + jail_export = false; + if (only_export && jailed(td->td_ucred) && + prison_check_nfsd(td->td_ucred)) + jail_export = true; - error = vfs_domount(td, fstype, fspath, fsflags, jail_export, &optlist); + error = vfs_domount(td, fstype, fspath, fsflags, only_export, + jail_export, &optlist); if (error == ENODEV) { error = EINVAL; if (errmsg != NULL) @@ -1014,8 +1021,8 @@ vfs_donmount(struct thread *td, uint64_t fsflags, struct uio *fsoptions) printf("%s: R/W mount failed, possibly R/O media," " trying R/O mount\n", __func__); fsflags |= MNT_RDONLY; - error = vfs_domount(td, fstype, fspath, fsflags, jail_export, - &optlist); + error = vfs_domount(td, fstype, fspath, fsflags, only_export, + jail_export, &optlist); } bail: /* copyout the errmsg */ @@ -1307,6 +1314,7 @@ vfs_domount_update( struct thread *td, /* Calling thread. */ struct vnode *vp, /* Mount point vnode. */ uint64_t fsflags, /* Flags common to all filesystems. */ + bool only_export, /* Got export option. */ bool jail_export, /* Got export option in vnet prison. */ struct vfsoptlist **optlist /* Options local to the filesystem. */ ) @@ -1442,15 +1450,16 @@ vfs_domount_update( * get. No freeing of cn_pnbuf. */ /* + * When only updating mount exports, VFS_MOUNT() does not need to + * be called, as indicated by only_export being set true. * For the case of mountd(8) doing exports from within a vnet jail, * "from" is typically not set correctly such that VFS_MOUNT() will - * return ENOENT. It is not obvious that VFS_MOUNT() ever needs to be - * called when mountd is doing exports, but this check only applies to - * the specific case where it is running inside a vnet jail, to - * avoid any POLA violation. + * return ENOENT. For ZFS, there is a locking bug which can result in + * deadlock if VFS_MOUNT() is called when extended attributes are + * being updated. */ error = 0; - if (!jail_export) + if (!only_export) error = VFS_MOUNT(mp); export_error = 0; @@ -1590,6 +1599,7 @@ vfs_domount( const char *fstype, /* Filesystem type. */ char *fspath, /* Mount path. */ uint64_t fsflags, /* Flags common to all filesystems. */ + bool only_export, /* Got export option. */ bool jail_export, /* Got export option in vnet prison. */ struct vfsoptlist **optlist /* Options local to the filesystem. */ ) @@ -1693,8 +1703,8 @@ vfs_domount( } free(pathbuf, M_TEMP); } else - error = vfs_domount_update(td, vp, fsflags, jail_export, - optlist); + error = vfs_domount_update(td, vp, fsflags, only_export, + jail_export, optlist); out: NDFREE_PNBUF(&nd); From nobody Tue Feb 24 22:09:09 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLBhP3sjHz6T4tP for ; Tue, 24 Feb 2026 22: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLBhP0vyNz45Zk for ; Tue, 24 Feb 2026 22: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=1771970949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qjSg0nUWnqHniJasF1oE2UqdJHsRJjdAFYnZMKLtJw0=; b=nKsbZ2qAQeRBcyTGeMg7vMh+uxAqXOkm8/zIqSKYbsnNV2V1UE8wKiRmtqNGG9+uWNI0cZ Wa07T6zP8yxOEimIBkxapIQIOZwR/6Jd7QvIVNnA9MjoR8db38xWWWaMJbzoHf2WtpasZP TlDKlp5dE94CpyYWwILx3z1XlCiul2WtRdc2ZlKBi0vyr5PtLV3xJ8WD7QNr5mkxO8sQ6u Cso7Mc8f3bD90LAyTvfd7ppBEmDs9ocku24ezcC/Q9ZJ5m/pPgGtRgi2qU7sBiY7EhS6Go DSKNpAIpOFkt5zKUpP8PIMI3bTyeokbjVGlESnXVYjgBWnOnR6ekBVE1HYRSaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771970949; a=rsa-sha256; cv=none; b=pfdd9llpz3X9Y8WeP5uttpEmIEnjiSzupAj0I4d09Nvdzc7oIdD277RRP51I92AvRLGwO+ r2Iww6qD9PfgGdAfL24Hh8FpofcUTGwhLTi7x2t3/lQx6y7AIPvVlnKgbHNJNfsNqP0SOr 43bSKSULGcfzxdW1arloAUN/KanjM4DHdnnjlYzmpS/LhXWAj3xolobwr+5lHG9H7DV49j oO08kq9InZzeejTP7TCV3GhUY4uWr2tWPJWP8DEaei+QMv1V/t0f2eTzRi+qddyz9lQBiL eh20cTsJLwg++6qR7gF+zAJ/TPi/0XoVwXEPwf5S7Px8rueYUyoy+JzcJ9yX/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=1771970949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qjSg0nUWnqHniJasF1oE2UqdJHsRJjdAFYnZMKLtJw0=; b=h+M+S0sbWVUfQzaP92Eo0418dE5jrKUqUriwbtacIc96EOxWtBU8hW4/WTvGQ5WzH+YVOt 4mCQr7ihOFTRR5TOXrYy2XdiY8eph1u/23Slwa5kq7zTbI5KSvbyiZ1Dd7+j0S5flwqV/O ZsTU1RYPYfnPre1hHSLUwAxhAQXz90TpQNjnLh5wMGLkgcjSGOf3ZzBlVaUMOVQtR5GdOa d307kmPckZu5vX/711+nOZemOYvVBbPi2kBNhwToUjFpObgMXmxj6ZNqv+P3QEpLj/V4R9 bWKwv//rvXmrUGpsltTT38lmP9sOnXIuox/R7s2uehQyQgkTTln6eOIDo1BkGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLBhP0WMzzZxd for ; Tue, 24 Feb 2026 22:09:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37782 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 22:09:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 5edf24aac1d0 - main - ofed: reduce usage of struct dma_attrs *dma_attrs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5edf24aac1d0978d37d62594f42d87c9f118622b Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 22:09:09 +0000 Message-Id: <699e2185.37782.5dbfa03b@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5edf24aac1d0978d37d62594f42d87c9f118622b commit 5edf24aac1d0978d37d62594f42d87c9f118622b Author: Bjoern A. Zeeb AuthorDate: 2026-02-19 23:12:29 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-24 22:04:36 +0000 ofed: reduce usage of struct dma_attrs *dma_attrs ib_verbs.h still uses struct dma_attrs *dma_attrs everywhere. It is beyond my knowledge when that struct got deprecated upstream but it is still supported by our LinuxKPI. The problem is that the functions called with that argument (dma_map_single_attrs, dma_unmap_single_attrs, dma_map_sg_attrs, dma_unmap_sg_attrs) so far are #defines in LinuxKPI and drop the last argument (attrs) so it was never a problem. In preparation to pass the attrs to the actual implementation in LinuxKPI, which has gained support for them, we now pass dma_sttrs->flags which is the expected unsigned long bit field. If anyone has serious interest in updating our ofed implementation they could look into this some more and remove the usage of struct dma_attrs entirely. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D55390 --- sys/ofed/include/rdma/ib_verbs.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/ofed/include/rdma/ib_verbs.h b/sys/ofed/include/rdma/ib_verbs.h index 78aa0af4fa2b..0c40a6f18f7c 100644 --- a/sys/ofed/include/rdma/ib_verbs.h +++ b/sys/ofed/include/rdma/ib_verbs.h @@ -3539,7 +3539,7 @@ static inline u64 ib_dma_map_single_attrs(struct ib_device *dev, struct dma_attrs *dma_attrs) { return dma_map_single_attrs(dev->dma_device, cpu_addr, size, - direction, dma_attrs); + direction, dma_attrs->flags); } static inline void ib_dma_unmap_single_attrs(struct ib_device *dev, @@ -3548,7 +3548,7 @@ static inline void ib_dma_unmap_single_attrs(struct ib_device *dev, struct dma_attrs *dma_attrs) { return dma_unmap_single_attrs(dev->dma_device, addr, size, - direction, dma_attrs); + direction, dma_attrs->flags); } /** @@ -3630,7 +3630,7 @@ static inline int ib_dma_map_sg_attrs(struct ib_device *dev, dma_attrs); else return dma_map_sg_attrs(dev->dma_device, sg, nents, direction, - dma_attrs); + dma_attrs->flags); } static inline void ib_dma_unmap_sg_attrs(struct ib_device *dev, @@ -3643,7 +3643,7 @@ static inline void ib_dma_unmap_sg_attrs(struct ib_device *dev, dma_attrs); else dma_unmap_sg_attrs(dev->dma_device, sg, nents, direction, - dma_attrs); + dma_attrs->flags); } /** * ib_sg_dma_address - Return the DMA address from a scatter/gather entry From nobody Tue Feb 24 22:09:07 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLBhT4HsDz6T4yT for ; Tue, 24 Feb 2026 22: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLBhT2WSFz45P2 for ; Tue, 24 Feb 2026 22: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=1771970953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8pgrhLxsYYNIqTZcgQy9C2Eqg2riMO+dxMBGSfIE8Fc=; b=soOlb+46I0PGraH66VGFHVJd+xxXYBwxIjPaz1SMS7lLvzIqPSrQVoo7xuQbelgCThX2V4 74xUqAw+OhjcN4cURzJntjUFd88WK27u5bIWwI9VQC3Q9ug0qTHJZeCEOSygLAYp6NLRHt WxJII3Td821L2pxzTidlM6Y0QCYq4r6Pb+VFn2PBe+jMgZJEvrm+XqhOxHt8loNvqMSuGY DHa9uQSa4Px4nM3bWfpFc4bzo0na99qOXRGgo192IiPRIaswKin6DCHRz/W59aqQYy0XMW uF2V6M5wgTrbfMdO0TDAl4CqE9bsrukBNfoCNRtTyrOdKqarF/WpYGmjGxxxVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771970953; a=rsa-sha256; cv=none; b=e+TjMFLC56OUq8/h+iOkKL/ertfscQMQpebGmL3YtJbn+aryBW4gWVj6fY72diqmKOBWSN aX45M73w0F1bDH4elFv0lFOHlkSAKJh0D0w44rGBDLI/75UoQC3x6IBZXmIwxsPdBaz8vg qhOrMwtPC00MEcoVzAp6IVJ9gIWsA+v2XO1UFf5HZiGYnNnMNfYpng6UYDMnhfdxtW1n2h o717RRsjMuSbAAuU53v5EmQcqdMetT64CnZnJ2Ug+DhndIMOdajE1q8WPgCT9Qy8JC6egU cP/H0M7bOdREZ0IRvGglpwzSQNkQ4L6GYA+a78OBb8PjW5ACRn/ajM9LE+fzaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771970953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8pgrhLxsYYNIqTZcgQy9C2Eqg2riMO+dxMBGSfIE8Fc=; b=iknrMNg6rmdc/NwOXpY5+1eYwmWlWgjj0LP4nCTSt0ZAfns5EMlg6YHAVgZbBkBEFz8/Ux mgsNfHYBEGLzy5feUsHHxb9MuJt/yldY45S17uhwulVXQ4IoVx8oiCqgpuKsYEOFLbLnKs 1LPJP0QKuk4I88ZpXvvQMHSlVyOa11ZIIG0l8nX2I0YxUctsLWTPa1x5DbfKTOpDb1K/+g EzE6uNEusXk1xAnbj7dEzlp0o3yJTuDjaPvtJrBfpwwd9BAqMKg+JxrL8SCAVNrHuuLLN1 GMyn5pUuvAVTHKKl1VVIwUYsj4eRnmQ9RdZ/gSlchUD0jqnpGKISlDrvKztu4w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLBhT1tc4zbFX for ; Tue, 24 Feb 2026 22:09:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36913 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 22:09:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: a4e30909ec98 - main - qoriq: fix spelling in device_set_desc() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a4e30909ec983f7986954e6c509ea21422561d84 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 22:09:07 +0000 Message-Id: <699e2183.36913.62844028@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a4e30909ec983f7986954e6c509ea21422561d84 commit a4e30909ec983f7986954e6c509ea21422561d84 Author: Bjoern A. Zeeb AuthorDate: 2026-02-19 23:10:34 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-24 22:04:36 +0000 qoriq: fix spelling in device_set_desc() The product series is called NXP QorIQ Layerscape. Remove the extra 'e. MFC after: 3 days Reviewed by: mmel, emaste Differential Revision: https://reviews.freebsd.org/D55388 --- sys/arm64/qoriq/qoriq_dw_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/qoriq/qoriq_dw_pci.c b/sys/arm64/qoriq/qoriq_dw_pci.c index b6eecba48c39..7d51db2a9505 100644 --- a/sys/arm64/qoriq/qoriq_dw_pci.c +++ b/sys/arm64/qoriq/qoriq_dw_pci.c @@ -176,7 +176,7 @@ qorif_dw_pci_probe(device_t dev) if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) return (ENXIO); - device_set_desc(dev, "NPX Layaerscape PCI-E Controller"); + device_set_desc(dev, "NPX Layerscape PCI-E Controller"); return (BUS_PROBE_DEFAULT); } From nobody Tue Feb 24 22:09:10 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLBhQ4W9Nz6T58v for ; Tue, 24 Feb 2026 22: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLBhQ2cPJz45Zn for ; Tue, 24 Feb 2026 22: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=1771970950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CbcSuZ4NINzugGM4jkI6Cm32z4EYGw+01MI8PKnTGpE=; b=KeW0CDoPuKGlF5rbn2XTCpEKcKjnm5qZAmsBqW2SS6ExlI/VmLqKeFxON5xSkgaV634JHj c4LeqYMfyqmr7KqS4Ax9YFrsQF/78uW1uqoI5z1nL8Q/zQ/fpKAThKldhV/u3bnWJ5RzgV VFgN9Jm3n+juT6Mjri4G0HrQn9bRtG4oFrsjMnGV6WaLBDax3QcvyFOYhVmnLdiO70hXbX jaLkq4dkz1ycoF5/If1N+kkSBM5B+86mHpw0d4zQ1Ucx4zwpLcIdT8e+MuOsrsYDndHabQ VFm6N38l/dqTZIVebHNgt3yrlPtv8obI+agOddlTU2nnIQ5EyopNdhuX/vf+rw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771970950; a=rsa-sha256; cv=none; b=ddptrQk9f31WHKQTUF7sNOqYG1AE/xwouNIWuz0MqjyXMzCtqXRzFupOQ5y+oZ/lqWOq6q 6wDBlhOrP5QarwyxRAlxcKUPxsv+pPDq8l2OvqcDe03fTULJuxfPJ5RDKpCOMP0H3+t/wj utFHMiwtNQ/7LFyKtvoVlZQcuN6gClOjXDBbu/6ObyzI4pPL/3uzgTVAXZxSiTLixWztxK /FmqXLOmi7W9BvdxCKBAlXWOzpfuiEnxrmj1xNHrcbmLy2rakJbUORO3XC1PdSA8Mpejo4 GdeqhnsCK8I/oesUMcRpTay+YU7/5APJx0wcyGwmq6pqAo7xSkNPRktL2HJFQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771970950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CbcSuZ4NINzugGM4jkI6Cm32z4EYGw+01MI8PKnTGpE=; b=elL6fNyGSl1GYHbk+3asJJZVA3oCGHjqnh3CocyEI2xteXUs99Iu1/AhNaY2YbBsfH9DfM bAkMmlvuE3UmZGz+9ue4XLiN586Auhb3EOkJnxFMY17ElBuviawSpdB/9ff5FAEXzmBI1+ Xp7PUsj8LsEKnc9IqhF9XE2lNgidlLZMqV+GYtyRfNEqRg9QrVJCzRyHm+fMJ0Fhez9jqk T//kBbid7WMbi69Z5mLc5DQ4t9WiZm8xpQPx2+/VEYmxwml0UvZ8pCVq7jVQuWWGoG0uBh Sp6XFxxGKsnnGWJnY+zV+uF7Z/JPZ0a9w1NR6IiplPwwUBDKZixmO28IziNRug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLBhQ1LtQzbCL for ; Tue, 24 Feb 2026 22:09:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3483e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 22:09:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: fc9369abef6b - main - LinuxKPI: 802.11: do not leak BA sessions when tearing down state List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fc9369abef6b6993e79b08de832e1d49f81a17b9 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 22:09:10 +0000 Message-Id: <699e2186.3483e.4e53180e@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=fc9369abef6b6993e79b08de832e1d49f81a17b9 commit fc9369abef6b6993e79b08de832e1d49f81a17b9 Author: Bjoern A. Zeeb AuthorDate: 2026-02-24 12:55:48 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-24 22:06:18 +0000 LinuxKPI: 802.11: do not leak BA sessions when tearing down state In certain cases we may tear down state of a node with 'ongoing' BA sessions. This can trigger a firmware crash with iwlwifi as reported in [1] when trying to remove the sta from the firmware. 0x2010303A | ADVANCED_SYSASSERT .. 0x00000000 | umac data1 (sta id=0) .. 0x0088030C | last host cmd (STA_RM) [1] https://lists.freebsd.org/archives/freebsd-wireless/2025-November/003901.html I hit the same problem while running regression tests after reworking some LinuxKPI 802.11 sta state machine bits. Add the missing calls to lkpi_sta_run_to_assoc() and lkpi_sta_run_to_init() to make sure (through net80211) we call (*ampdu_action) with IEEE80211_AMPDU_RX_STOP to avoid the firmware crash. Note: this specific patch was not excessively tested. The upcoming change to the state machine including this fix has seen more testing but also only needed the change in one place. The reason for putting this in upfront is to document the case well. Reported by: Mohammad Amin (the.madamin20 gmail.com) [1] Sponsored by: The FreeBSSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/src/linux_80211.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 0b732cb691c6..e80cf9436b3a 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -3256,6 +3256,7 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int #if 0 enum ieee80211_bss_changed bss_changed; #endif + struct ieee80211_rx_ampdu *rap; int error; lhw = vap->iv_ic->ic_softc; @@ -3311,6 +3312,16 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int goto outni; } + /* Stop any BA sessions if still active. */ + for (int rapn = 0; rapn < WME_NUM_TID; rapn++) { + rap = &ni->ni_rx_ampdu[rapn]; + + if ((rap->rxa_flags & IEEE80211_AGGR_RUNNING) == 0) + continue; + + vap->iv_ic->ic_ampdu_rx_stop(ni, rap); + } + IEEE80211_UNLOCK(vap->iv_ic); /* Ensure the packets get out. */ @@ -3412,6 +3423,7 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int struct ieee80211_sta *sta; struct ieee80211_prep_tx_info prep_tx_info; enum ieee80211_bss_changed bss_changed; + struct ieee80211_rx_ampdu *rap; int error; lhw = vap->iv_ic->ic_softc; @@ -3467,6 +3479,16 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int goto outni; } + /* Stop any BA sessions if still active. */ + for (int rapn = 0; rapn < WME_NUM_TID; rapn++) { + rap = &ni->ni_rx_ampdu[rapn]; + + if ((rap->rxa_flags & IEEE80211_AGGR_RUNNING) == 0) + continue; + + vap->iv_ic->ic_ampdu_rx_stop(ni, rap); + } + IEEE80211_UNLOCK(vap->iv_ic); /* Ensure the packets get out. */ From nobody Tue Feb 24 23:04:53 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLCwy6X8Tz6TCH5 for ; Tue, 24 Feb 2026 23:05:06 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLCwy4Ypqz3Dhg for ; Tue, 24 Feb 2026 23:05:06 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qt1-x834.google.com with SMTP id d75a77b69052e-506251815a3so58624511cf.0 for ; Tue, 24 Feb 2026 15:05:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1771974305; cv=none; d=google.com; s=arc-20240605; b=LBQsG09Ad/bpGQ8dndge/YSz1OKTNGeh3asM4slWsCngQMmCJ/uyoSUkDgkYwqgxLZ dQPwtEeZFKilA6a1A158FB14j16cIUF9AFrXm9eBCaU3XmISoHEzLAkOx70iVRvjta5b FtymTvETrys4vWWb+TYwTaOsNtG7B6Su2qEfVcdhYjga3t+TSPcD7SZKVBN6scw5e6Xl eLFfNxEtY87Xw+TmgbTR25WT58Pras+bAhPtcBLaZ1PewTK8a7SSQIOPAJ5kURmseJD5 nDkjNyXVyjAxyw4EkAPOGh8VMM9SiuP5Sl3hznOTroYwASbxP6LUTF/iR0YxHJ0SFqg3 YWdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=bnRgZSfn+Zzb3vzgjXF1+7EFnxZmLDChc9l3UsEn580=; fh=Un/RoxVRzpwlavbbKqWJl23ib3hEFLqqqN9BtEJUjRs=; b=WriKr4xLkYLw7D6zdsEUkq2LSlk6X/vPDunmgwfOkwGiCAa4XMp1YA6SsJaJOBkkw3 HkDRJ0ZToZww5+TTFiUJg+EXNMmrO0BBHjkDIv6ARGrSU76FT4zjmW9lKdgkpJQOXfdY Ipp3ap0oRgStrzAeTqPIhkS2ADzOnM4LlUuIuzpzaYsEpZMtEaJDgYiGL1XQxP32Lbz3 svJW4wutvXifwpeouZm5JTA8iVqHl2TFaZvPC4HZh47uCZGPfPKoEynffxP7YnF0BoRU GhTQgLfeGiXs5Vl7S1QbFx7vJlrYO6BLe1Qvs5txV4VHl/2JOjGkl2WBGPG+yfPmK8vI aqIQ==; darn=freebsd.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kev009.com; s=google; t=1771974305; x=1772579105; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=bnRgZSfn+Zzb3vzgjXF1+7EFnxZmLDChc9l3UsEn580=; b=CZ7+5d+yMLNmVLj4IsWBpHI56fW7arGqlly+zkxr0AHEErjZo3HKdnOmOvf5Gd38lK Mx31lZ8+AzLZyxpCgEYzD5u9z0NwsI0IyU4dy8dMER5I8UJ/ujTKNg6Uo1P1OxoeqtDX EtEY6ewRQyahEi0xVl8uL9cqyRg3EcYCJZ0yI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771974305; x=1772579105; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=bnRgZSfn+Zzb3vzgjXF1+7EFnxZmLDChc9l3UsEn580=; b=lbVJYvAApHmYD1mLbgyAqR3arTPB+BMl9czYY/p7QvnL5eq3rY/0bmLx6RbUmOieho CAN7bH4nt4f4a6MkksGInOxb39fZ+YApty7Pu8R1kP95H/1CHB9Spd68hOqEWFe7zmN2 CtaklfekBY2NOqqfRUG6KSQ0OVqRGiGIDzv+pg7cNde0qXwImtjk794ocB8r3lsH340V SxQLP8idNc4IcRemwUzCgr3DkHf9maZ7iOuf/CV1TnZb1xX4UZ83dsoao9cHrM+htdpy 7yBnn8Zg7eqU8oA9F9X7plKJhnpWX0YCTHw8eTH8ilpJuGorrI7FUFUCYVnfftEkufDY mK3w== X-Forwarded-Encrypted: i=1; AJvYcCWcXGCWp3wQ1tpjR65TqF6SCL7Qf93lCFRNn+j/bd84R6TR0KETyOStZmFOGxLej6OYjr7rCKV/+xnL/zzk7yZlTnor@freebsd.org X-Gm-Message-State: AOJu0YxhCwZurCJw3BD7gdU4glrUwTAsWhGkvqrBxTLTsSSnek5CUOmo s2lZyvMrUWDvSIw2bqY07Z0lGlhHHZ47xKtkBU/bIICDca1BSpkBrQGxXbKIzuIqJYg9ljy1Nu8 +Zyxkeu4DrBrbwQYtUuhbKkYYL5mzjs3S2Mk6NK5X X-Gm-Gg: ATEYQzwVYVrVpNtGjs/DPcynFDnIwD8eta9/M1VqXWb9snYIsjfHl6XS7v2rLBh7ZyI e/udkvhwAdW4p2jikNV7y4ERpUY78AXPLS0e/rEmvN3ir2z+vO1oiJZElzgiwxkpoCz8XDPo/pR BUUmX3BPNbiY0hQn5XAEFNt00ApNtZ1+9VwJTY+5eVwzM4W4MZ31H1OjUOtIvxzpBgoWRylBOix NFJfecZ/pDObv8BPFLpr0/WsmWTa9YrjLXPmGamIwcpp9QFchYLvktx8yarj2fQgguq1dm0r3CF 1kytqSyRhjKMPLUyR/E33q8cSDSMOWEQCpuGVHpcWQJHjsDqFgyc/6NJS25kLYV72a94bA== X-Received: by 2002:ac8:7f13:0:b0:501:467d:17e8 with SMTP id d75a77b69052e-5070bcb310dmr191823541cf.61.1771974304836; Tue, 24 Feb 2026 15:05:04 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <699e2183.36913.62844028@gitrepo.freebsd.org> In-Reply-To: <699e2183.36913.62844028@gitrepo.freebsd.org> From: Kevin Bowling Date: Tue, 24 Feb 2026 16:04:53 -0700 X-Gm-Features: AaiRm53mC5unaoyQjdveCbbCm69iUZSeg-lu0G4_ntwqxNS1Ka_aMVr6kYfZg4Q Message-ID: Subject: Re: git: a4e30909ec98 - main - qoriq: fix spelling in device_set_desc() To: "Bjoern A. Zeeb" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4fLCwy4Ypqz3Dhg X-Spamd-Bar: ---- On Tue, Feb 24, 2026 at 3:09=E2=80=AFPM Bjoern A. Zeeb wro= te: > > The branch main has been updated by bz: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Da4e30909ec983f7986954e6c50= 9ea21422561d84 > > commit a4e30909ec983f7986954e6c509ea21422561d84 > Author: Bjoern A. Zeeb > AuthorDate: 2026-02-19 23:10:34 +0000 > Commit: Bjoern A. Zeeb > CommitDate: 2026-02-24 22:04:36 +0000 > > qoriq: fix spelling in device_set_desc() > > The product series is called NXP QorIQ Layerscape. Remove the extra = 'e. > > MFC after: 3 days > Reviewed by: mmel, emaste > Differential Revision: https://reviews.freebsd.org/D55388 > --- > sys/arm64/qoriq/qoriq_dw_pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sys/arm64/qoriq/qoriq_dw_pci.c b/sys/arm64/qoriq/qoriq_dw_pc= i.c > index b6eecba48c39..7d51db2a9505 100644 > --- a/sys/arm64/qoriq/qoriq_dw_pci.c > +++ b/sys/arm64/qoriq/qoriq_dw_pci.c > @@ -176,7 +176,7 @@ qorif_dw_pci_probe(device_t dev) > if (ofw_bus_search_compatible(dev, compat_data)->ocd_data =3D=3D = 0) > return (ENXIO); > > - device_set_desc(dev, "NPX Layaerscape PCI-E Controller"); > + device_set_desc(dev, "NPX Layerscape PCI-E Controller"); This should probably be NXP not NPX? > return (BUS_PROBE_DEFAULT); > } > > From nobody Tue Feb 24 23:09:15 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLD1q04zGz6TCr7; Tue, 24 Feb 2026 23:09:19 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLD1p6hslz3F62; Tue, 24 Feb 2026 23:09:18 +0000 (UTC) (envelope-from bz@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771974558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=eAhL1c3WT0sEgCF5n8lCL3XSmpoZP4ysC3DwCjXV8xQ=; b=Z1Wb8lTFlzcarvEBYTYedAB8Rw9yeN2vdBJPNczZFt6MCxmmpjZxztbJJ/nSN1aIp1beHJ 3ouc+CJfdFvCSmpYWkxwqQeOUjQI8AkXSkvXm6FFDjMrp7s3dGK4K1UEVO7mg+fGNq1ZL3 JKhzy5VTyWNS80Wj3yW++uDDw5ZUsEIvNGTN5SA61BJBCE62ExiTjwyUtMq3R819krtd9s AJKfhtRVmvbV+wdgHxQIdbTTh85d6CIlzxG/rATPKf0eAF81h9xJAB6FNlCQJbDnPWCDFg Bdw+49PUdm8X9VpqT6/XyB8qOs3ByiwiJUY7WIFTdjYzH5kXsVvm7Ep/iOOh3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771974558; a=rsa-sha256; cv=none; b=YBN3N6+QJ+OeSfw8Ixij7fXxs6GGjAmigd+H71Ed4H46QGp8ol0MYCAM9tYGvkmIeI2viC 51dcFrL/ABfOmXW6Ys33M4F6Esnd5nkRekuZgfuN3NCBtSYb201df8WpJayF1+tqudKrYB kjv8JUN+GyyG/L8XDvVgY4ckEjQdHZneHk+kR8RQIwBIiA8oxOUmndEGzz0LRcQE5x40L/ jJqvklz1sL2SDW5S0owXO8+QpJ/0DlUo/rVaam9160lEjYg3WUkz3jEUEHPnq2Q5UZywqn VvJu40NUl0hLS84ozsfKPb3533hwgVDdaVovsMY8BuyGg9DilMk/mS+zCXgBSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771974558; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=eAhL1c3WT0sEgCF5n8lCL3XSmpoZP4ysC3DwCjXV8xQ=; b=huRvUEqjnR5Cme6r6qHp/aGZBNPBu0ZjLZgqLzH+3uzZSPiXQppcwaMKmUebfcS9qf3LkZ WRsgm+pDD2Cu48cJJ7O8ZvxH+2JvqE5bjTCYRGt8Zs7kqUMlt7rLxdPoH+0t1gz4IYV4SZ 0P5tH5DlZu+zIieI9RKEQeb3IyiNO5edmPrSIgNNwnuu0+6d+hPChZTOU7O3d1UT3QCBP1 p/GzElBHrwciYkbuYyeij+CJpqE7SDmP7TQ6Po5pIE82/++ON5gcCdTzd7P2Lc+/QZ7dlU dUS/UOPg/S3nOI3edrMVmltSvXFkEp2cvFxncFoaE7xfStwiExBDUXAFm+3VJg== Received: from mx-01.divo.sbone.de (legacy1.sbone.de [80.151.10.34]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E7" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fLD1p57FQz10Yy; Tue, 24 Feb 2026 23:09:18 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id DCE86A64808; Tue, 24 Feb 2026 23:08:57 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id AF0572D029E7; Tue, 24 Feb 2026 23:09:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id rQJy1ap1BBEs; Tue, 24 Feb 2026 23:09:15 +0000 (UTC) Received: from nv.t4-02.sbone.de (nv.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id BEFAD2D029D8; Tue, 24 Feb 2026 23:09:15 +0000 (UTC) Date: Tue, 24 Feb 2026 23:09:15 +0000 (UTC) From: "Bjoern A. Zeeb" To: Kevin Bowling cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: a4e30909ec98 - main - qoriq: fix spelling in device_set_desc() In-Reply-To: Message-ID: References: <699e2183.36913.62844028@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-51106479-1771974555=:11296" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-51106479-1771974555=:11296 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Tue, 24 Feb 2026, Kevin Bowling wrote: > On Tue, Feb 24, 2026 at 3:09 PM Bjoern A. Zeeb wrote: >> >> The branch main has been updated by bz: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=a4e30909ec983f7986954e6c509ea21422561d84 >> >> commit a4e30909ec983f7986954e6c509ea21422561d84 >> Author: Bjoern A. Zeeb >> AuthorDate: 2026-02-19 23:10:34 +0000 >> Commit: Bjoern A. Zeeb >> CommitDate: 2026-02-24 22:04:36 +0000 >> >> qoriq: fix spelling in device_set_desc() >> >> The product series is called NXP QorIQ Layerscape. Remove the extra 'e. >> >> MFC after: 3 days >> Reviewed by: mmel, emaste >> Differential Revision: https://reviews.freebsd.org/D55388 >> --- >> sys/arm64/qoriq/qoriq_dw_pci.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/sys/arm64/qoriq/qoriq_dw_pci.c b/sys/arm64/qoriq/qoriq_dw_pci.c >> index b6eecba48c39..7d51db2a9505 100644 >> --- a/sys/arm64/qoriq/qoriq_dw_pci.c >> +++ b/sys/arm64/qoriq/qoriq_dw_pci.c >> @@ -176,7 +176,7 @@ qorif_dw_pci_probe(device_t dev) >> if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) >> return (ENXIO); >> >> - device_set_desc(dev, "NPX Layaerscape PCI-E Controller"); >> + device_set_desc(dev, "NPX Layerscape PCI-E Controller"); > > This should probably be NXP not NPX? WOW. Our brain is a mystical thing .. I'll fix that one right away as well.. >> return (BUS_PROBE_DEFAULT); >> } >> >> > -- Bjoern A. Zeeb r15:7 --0-51106479-1771974555=:11296-- From nobody Tue Feb 24 23:17:19 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLDC92r9xz6TDVP for ; Tue, 24 Feb 2026 23:17:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLDC91CTCz3Fbx for ; Tue, 24 Feb 2026 23:17:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771975045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e74KfVMZnO4rNu4bLdGu0i2Qw8vL4TK3MLrLsNSlVfY=; b=uT7N4eo11eIJw8RLYf/bzwgk3+CoMMsN63jc9ROQp0cqKX9h+7IG/IleD8ZubTpDtu8nil KXfMYO62I+lRyGxHzZ51ErxUnMtmd6PbWZjDlpgfW7P5B1NX4zEsunct4uz0CT0R5yTL/G 7sEbVhYk7sWQrMUciTFs1RQi8Ab/As9P2T5+OjJ0OebAx98buI3tByLzzCy/mvULliFeDJ xE4I+MAObS00z3+Dft03pr2MwDsnsv2MmcFJT45r5DfVP6dmT41MlKv8PC2uW7nxKyJ2JH UxWKdUnoSKmeBTTDzoSAjjtVxZmEpvDabhh5d+OknbYw40wfHT4PhH1OxN54zA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771975045; a=rsa-sha256; cv=none; b=Fdblnq8UOayom9FtpLANSDHZFSCzckUmJXdEWTYqQIPmX1QXKnfysaRGZnZzaIYZIm+3qi yzCfdbokWIcrh+/RudBAjXWMslvhKjlOqIFWVATyvee8DlYy7txy0R4n3d9Pb+LLC7aMRr M99kDDJDyMlFX+YfYeHyt1RefduK/TUkKuEcXaAJipNBjgi/ET0fv1ihDRwBR+8ZByEqQ9 rqn7Pa2bD0qknfpeY84kYKEZ46zsngTlZ+qCJHZFJHQt9OIQPkRK79CIV58ogOOLrx4mQF jQ57AROlxy4uZTH/g+HQxxReAri9LlU82Z5OCPxgeyj2OWe20H7OUEdI7dpJ4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771975045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e74KfVMZnO4rNu4bLdGu0i2Qw8vL4TK3MLrLsNSlVfY=; b=ML2F6pxOjWBUcsessUhK7hVT1rQdFy6NADH6Emkn03Csweo+ciEJwfyQP9u5qDbBfZjhnG SPteybZIOXUPtpOuYvleUG+geTEk2KOvH+lW9xYulBWcIYMYnFoBE74wsnTupzopct4/VL n32Qxi6PEjRxSDb/2mnww1GmtpH0IXEhJlMXRgN/QUlDfzCdOA1riSnwEWs3+gCji/Pudm 7JKZuDNpCc4SVYkAg9/971oI1pawjX6yeTLv/7FUfw2s4A0l0d0QOkNjg3HPghgJ+kRtJI UQ9nj/xPEFAu5z4UWUOZkd/S8OIu4jORwhihlK71cPRv5EpwAu2+isXO4proAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLDC90XCfzcfP for ; Tue, 24 Feb 2026 23:17:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d426 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 24 Feb 2026 23:17:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: c3ed2f3e4144 - main - qoriq / nxp: Fix spelling take II List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c3ed2f3e414497ab3cf6ade17e52a87f07a547e6 Auto-Submitted: auto-generated Date: Tue, 24 Feb 2026 23:17:19 +0000 Message-Id: <699e317f.3d426.6ebe757@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c3ed2f3e414497ab3cf6ade17e52a87f07a547e6 commit c3ed2f3e414497ab3cf6ade17e52a87f07a547e6 Author: Bjoern A. Zeeb AuthorDate: 2026-02-24 23:12:46 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-24 23:12:46 +0000 qoriq / nxp: Fix spelling take II Fix spelling of NXP, which is not NPX, in two places. Improves: a4e30909ec98 Reported by: Kevin Bowling (kevin.bowling kev009.com), qoriq_dw_pci.c MFC after: 3 days --- sys/arm64/conf/std.nxp | 2 +- sys/arm64/qoriq/qoriq_dw_pci.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm64/conf/std.nxp b/sys/arm64/conf/std.nxp index b4552fadaff4..367d058bf666 100644 --- a/sys/arm64/conf/std.nxp +++ b/sys/arm64/conf/std.nxp @@ -6,7 +6,7 @@ options SOC_NXP_LS # I2C -device pca954x # NPX I2C bus multiplexer / switches +device pca954x # NXP I2C bus multiplexer / switches device pcf8563 # NXP Real-time clock/calendar device tca64xx # NXP I2C gpio expander device pcf85063 # NXP Real-time clock diff --git a/sys/arm64/qoriq/qoriq_dw_pci.c b/sys/arm64/qoriq/qoriq_dw_pci.c index 7d51db2a9505..f4ca024c941f 100644 --- a/sys/arm64/qoriq/qoriq_dw_pci.c +++ b/sys/arm64/qoriq/qoriq_dw_pci.c @@ -176,7 +176,7 @@ qorif_dw_pci_probe(device_t dev) if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) return (ENXIO); - device_set_desc(dev, "NPX Layerscape PCI-E Controller"); + device_set_desc(dev, "NXP QorIQ Layerscape PCI-E Controller"); return (BUS_PROBE_DEFAULT); } From nobody Wed Feb 25 01:16:27 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLGrd0PVWz6TTWv for ; Wed, 25 Feb 2026 01:16:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLGrc4kL4z3Sy8 for ; Wed, 25 Feb 2026 01:16:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771982192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mnDLu8bUKGjyy8X851dXbBlI/uH8mvFLdaE8WDyjFSg=; b=rys9vibEBqt4ZTl96XTXoQ/6Lpby9Je8rjJCXySoBw7BtsngQeDAk/i2+2T3MqI+c0PMuv MHnAEWDcnVspN1HPHIIv33v+cw+4sAGLTh2IxUKVNR3p6ZbqBtDKefMU7AeMbb9mrQTKQL iYq+CPhVnYUUkvecQdhLaQ48aNI+q90kMS7lsLwRo2v7fWjYWcqdsIHeu2yrn4kPqjnRz3 q6cZ6zOGdTf1ORRGShTY0bdTm7Yl1nusxoFlNJMfqxrllJMMkjfRGsl7/ponejsy0r/HQe 7EJUJQcYdaKQiwS3Z5ywYcLRvsb9YsU7rwez3dUU5PKjgY7sl+odGRCsSDn+aQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771982192; a=rsa-sha256; cv=none; b=HHqCFmhpKZ/iOJNwlgNRlftQiN+V9J5bnk3lFkvWkVioCB5wVqVuDHYOWs61Ks7pEJ+VPV Pq19cNOBog7vTM082ZiIdw7lxpHd0L3CSPeUyK+iH3LN9gDr20yBHqoSNFz2jREQdzuajn 3adUTtVWVpU/wHhOWMRcd1ryqVqpH6qP7DK7L+mbkRxsO/BWGqB4tUZjwTyNrXlvp82I+x s3KF3Eghp9WUKO5HO/wnP8VvnXi57CVnOiHE4wYxqSlE6A4oet5BvHY66rbCn/w6b8KfY2 5BSxdlpXS6th36T0H+4SyicsKfeLEU5m36xUvCkwyzFvcyvuvWJB6UTXqHLorQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771982192; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mnDLu8bUKGjyy8X851dXbBlI/uH8mvFLdaE8WDyjFSg=; b=fka6TrR5RY0vUjUz21dgR/5hecxxA4WbAIMWmYgP49eV1Vw5SI0uB2CiP0A8yoO8QGNDta 8gvNN207Y844olFeOCrEyKTEd0+h5Lth1LN3LvtjAQ1ksidu4kds7gXmS2iH2mMaN9vvFx 2TNuxPmfSUsuRfXFt8uipDjnntx4a+vKRuPtaW5PCahXUBMyHcFbEMDmvhXx4olXxIJ7U0 aL0HMpAoKTxWLFXu7JNbdhHryAizu/1K4BrgxzhszV/t7xztc6y649YB6bmC261MZxjKmF fIdu4M9m7YytPMSqCbQhKa01y6qUZQ4Gwr5bqHr1a0tyhGanM9qKFOdjF889Sw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLGrc3Zl9zgYD for ; Wed, 25 Feb 2026 01:16:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 19835 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 01:16:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: ff09319d3060 - Create tag release/15.0.0-p4 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/tags/release/15.0.0-p4 X-Git-Reftype: annotated tag X-Git-Commit: ff09319d3060f30648e17e0da721c1f42d4163e0 Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 01:16:27 +0000 Message-Id: <699e4d6b.19835.426946c9@gitrepo.freebsd.org> The annotated tag release/15.0.0-p4 has been created by philip: URL: https://cgit.FreeBSD.org/src/tag/?h=release/15.0.0-p4 tag release/15.0.0-p4 Tagger: Philip Paeps TaggerDate: 2026-02-25 01:13:22 +0000 Tag FreeBSD 15.0-RELEASE-p4 commit 8ef0ed690df2dca0cc22b827819d112f868470bb Author: Mark Johnston AuthorDate: 2026-02-23 16:40:58 +0000 Commit: Mark Johnston CommitDate: 2026-02-23 16:40:58 +0000 Add UPDATING entries and bump version Approved by: so From nobody Wed Feb 25 01:18:21 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLGtp6CX0z6TTbJ for ; Wed, 25 Feb 2026 01:18:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLGtp48Gwz3TTS for ; Wed, 25 Feb 2026 01:18:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771982306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jK4Is8IxXJQW1/+ZIC/kFf9iavkjo/Birtz6OuuolL0=; b=Qcz5OMJTEl7qoO2mgjYgbPjSlTOPhi4AwtmcNCLCsOcshd1KKhTDWEihqpMEYgLTwCu6Rp MUR1x+Emabu8RqYsCO1X8vHyBNTVLigoaVsLLz0anzPDcxyEqtC8pr37/UmpXlQqQHNwNr KjqdyBsvLgRfPskkUNYkq/b+Yt+w9GQmjgqu0Q/Chh7VPOUlq5l3vJGfLupnfmdWk5oYSN f0WC6AwOjGA9tAupAZDGXsi7b52Tg4AE5ngIpUgqO3ntt26u8RXcVz6x/m0ELnYa/gwZ1h cnDDzFMQG1JeX1ZLPPCQCDUZkP9yGS/eHn5kkqOG80UjxvQckb+8+jcZeOHZzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771982306; a=rsa-sha256; cv=none; b=Ar6okewzc+sx4/xMqwZe72dRBOszeCfB4/nUdTIMnPAfoL8uHVzlGl1OB+MJczLrvCkKi5 Ew8upzgRtNZK9KpVmi5EPdfVnT64HP6UGTS8o1eLjn/hOmIadq63IXcUrG1CtWwnLPIxYD 7uIzzZeLKUgFz/+6qCb2/RcdfbjnxQbnP6KGw/IWFNp7d2iTKHORRCA1it7DKYltt1C+mA rQRoIL2yZy2Hfi9QqO1mrlOs6mcKWDWsu01aMGHjSClNM1gdbGqkhkjgOR3xu6/L3q7SHv b1YJReXBZGFirKYfMJ1XhQJV9PvUg4J/YC5iQyjW9Sk/A9cw1B346JyZK2qlDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771982306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jK4Is8IxXJQW1/+ZIC/kFf9iavkjo/Birtz6OuuolL0=; b=MMd5nq3C5Geu2i6jHFxM77rjTdd/6kdVn+1P/H1kzk3IWzBJKAHK4X2bZwikyIgScuE7ZP kQQQVQ/UW5cTxJRucaGAfjQW1i0xfDBG2Mx9CWAc0t3niezUdBZqmVOtEirOpAIuBHraog cL7QKj3v6bRPtqwG/aHWP579AtVqrtMzqFIbbHAUFn4l2YhO4DeXVoibO8X97oJjeRbFVU 8rKRy+AroS5UffaCxqQOpbehQdsSriq5oeg2nfYVf31pTr0ZBJQEr9jKh9RxR09g75wnEs LssZfawF7KitpsKFYxFHTO6tR+c+te/rb1Xrcuwsk/QSU11pGuvnrCzMViOG8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLGtp3835zgbQ for ; Wed, 25 Feb 2026 01:18:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 188f3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 01:18:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: 2bf2ce3acd0b - Create tag release/14.3.0-p9 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/tags/release/14.3.0-p9 X-Git-Reftype: annotated tag X-Git-Commit: 2bf2ce3acd0b67d4299734e3b350becc372717df Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 01:18:21 +0000 Message-Id: <699e4ddd.188f3.60d72bbb@gitrepo.freebsd.org> The annotated tag release/14.3.0-p9 has been created by philip: URL: https://cgit.FreeBSD.org/src/tag/?h=release/14.3.0-p9 tag release/14.3.0-p9 Tagger: Philip Paeps TaggerDate: 2026-02-25 01:15:24 +0000 Tag FreeBSD 14.3-RELEASE-p9 commit 24c55170cef490616ad4b9262a39e1c5c47b8d0f Author: Mark Johnston AuthorDate: 2026-02-24 15:56:57 +0000 Commit: Mark Johnston CommitDate: 2026-02-24 15:56:57 +0000 Add UPDATING entries and bump version Approved by: so From nobody Wed Feb 25 01:19:09 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLGvf202Qz6TTRp for ; Wed, 25 Feb 2026 01:19:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLGvd6Bb9z3Tp1 for ; Wed, 25 Feb 2026 01:19:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771982349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8i1x6jUwgO4EWUfuqKBPRnVOmWILpyaf+YCKoDJa9dU=; b=eamtwFfGAnyqZTLGAD94w1COc0gk8AfDQP9kZPVECWGMDufzeyGRUJlP4HUJ+86ECaKTp+ 4b08tJAweBqj3q9YckD2AnHpSrqVqBshobEIxLDkGJTbSrqsTL9mVNEi9/zKSIjVM0tTJu KKTcSAvui0TAx/kcxBMHQWkkZN/oTrRlaJDbacAaLyqiiGr4iddp+GC8d7EVtU2j2eGeBR Rgu8gy9ieyRLEHhW9YrfqJOJjN3IJdhVZgDqLxL3m/77FizxUFbCpJ6UyARh5urAtMtTZQ uWER6LV3acjmegiyDvrRvBSoaXPDc5dp+blb8HJaoKZkON7d/Vg6dYPlW0gIHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771982349; a=rsa-sha256; cv=none; b=ptgkO+DLrB/foNkDnXyrd1QKZ+DJXt3p9jF7w74FVHbMapJkRXbByDtKREvQTf3Cg7YXPX 5zxlIKhCQFrG2sgCgGGasH3iG8q/NSDlivSpdFqJt4J/7b+ucWN3WdNyCxcndAq0f3fcPA r64SMSsK92uIKK0/UBlko4KVXwg9CkIWC21Wb0FUSOGUE0pcFS+x3TzP2C3jYbxFUihC+k HiiznwIcR4axhyJvCXCqyB1pJVPmPVRza1AB92acS74CmwgVZjMlfTw280Ey78MsKSwDpu Mwa5s8qI04UyWm8MNssqoWMauQKmc7EyDNcsOLTJpyieJaTNtgqa/DDotTfcEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771982349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8i1x6jUwgO4EWUfuqKBPRnVOmWILpyaf+YCKoDJa9dU=; b=blL5jqn/wEl8TLxY0gHW/S/GSGcpGYhgGTKq5MrazALsoWDwo53UQySD9Xbcengy8CWEOi ZHWX8p1OqU8GCGajWChIQV48QzXSIrDKFAqCApBbgds2WGrWKKxe3sD6FuOcdzD8QqZXCd kG+8v+SuH45nBA3MpReIn/GWNaUdU8cTSUgdfXL+Y6MecKCDBsvzBZxBe50zZpw/S0F3kt TwDdmzzk7j295c0eCdwMGq6bWIAfEhEQ8He/V3rKI/KKorN1m9zL2xgArTXxSBsWCVgxtj mrB4u6tVdpUnPVaRRzRfm697KQWcphN+C8qUNkOoQ3qIGNPO8f0IetgmXPSbYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLGvd5GqJzhCS for ; Wed, 25 Feb 2026 01:19:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 46f71 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 01:19:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: 91772c3ccbd6 - Create tag release/13.5.0-p10 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/tags/release/13.5.0-p10 X-Git-Reftype: annotated tag X-Git-Commit: 91772c3ccbd68f3f821bfafb587c42cff27bb19c Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 01:19:09 +0000 Message-Id: <699e4e0d.46f71.65357014@gitrepo.freebsd.org> The annotated tag release/13.5.0-p10 has been created by philip: URL: https://cgit.FreeBSD.org/src/tag/?h=release/13.5.0-p10 tag release/13.5.0-p10 Tagger: Philip Paeps TaggerDate: 2026-02-25 01:16:23 +0000 Tag FreeBSD 13.5-RELEASE-p10 commit 9d3e842358b4b776a0e4bbab921695ac35f3baa3 Author: Mark Johnston AuthorDate: 2026-02-24 15:58:22 +0000 Commit: Mark Johnston CommitDate: 2026-02-24 16:04:27 +0000 Add UPDATING entries and bump version Approved by: so From nobody Wed Feb 25 01:24:05 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLH1L1gxJz6TVJK; Wed, 25 Feb 2026 01:24:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLH1L03Qsz3Vm4; Wed, 25 Feb 2026 01:24:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771982646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jP7ztwe26VZ2jvmvFaOP9fAmrWLOpBeq24VI27hIbsk=; b=i933i4WiCspUtXsPe7nSAb0fQR6Vqp/+U8B6NHvkRWUSz3KQSCNY4QPRaSitaq5s7eofMk OvoHw+aHvI1Zt2JhTXhiwF9USXfSRWhEPK0Ku0sbB5VX8YMBBtlbeDvbA7lnZmT2qtVfjf fXVsebgMpKnTVl6sO8Mzs7yNJQsLDjFfdo2PINjf4jv5Dzpo/0ygH8aW1e8fEU2HNtirVh CvkeLSVe2fpSmPAytjfcawRBhXKBizqP1a/Xaf95QzmNLO9qfUz1WxWX0PlhQ0CpiCZaVb 5TvzPtXNOVieKDnltv9Rx/N4sBo67wo6k7L/F+NMws7N9VBCGFEJb8oqo756EQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771982646; a=rsa-sha256; cv=none; b=mWB/Hv31kATJP1vZas3aS6o0wChCn3oVIo8hk4u51DiaY6AwUPoFv+r7aJKm6sGBQ7tP0M kJZ2A4l0G0RRENmldZjAJjG/FmbT/cXiobtugLQ6Gxb9M5il5n7Y5kdRew408HDaStpNTh rnJ9U4dUtd89L4Qcs5XNaCsVWxxu91XzPXL3ZwkiiXNPJ+c2CBpY4WXGye7iK3RgN4J9AG L3h5fHihG38GaJWHv9GkHXK1If6oM/k3M8z7P8qnMq4fdU7N0h2K5NI3r+xt+WrNVMr2op DVbpQwsGYYdDJn9/QsaK405tdGuuq4P9lhGwjTPQTQbh3edxPiVXkt9KOgNYAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771982646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jP7ztwe26VZ2jvmvFaOP9fAmrWLOpBeq24VI27hIbsk=; b=aQanWda1iQIXXafqTNYa8ZE3X7WZSYbyVfbTFWe7WC7j3XMouN3VJ6jFlCWlVIVgPxR4/j KmyG9vuNuJuAIdfmM5qol3cxTDUy08cv7VO5elSUQoguuHBsvEpOIq+gm8sNOCkBXd714P zjhXkIrRe6MEyYXzoXG9SlHVcekJyRzbQepOV8u8TsiZSeOagr48lzie8HDftUnQ4q7w4l X6uClyuHky80TutFlmM3zwYIkawcwup3bbOYzcXGmVvwWkGzAwJODW4vIHVZcGewlg1sa7 EU8800hvHp2HlZAesPfF92kWAQE8W0jyn3mWIFvxMLOVy6HpudIdfXhubMGcIw== Received: from [IPV6:2601:5c0:4202:5670:b946:cabf:47b1:71cf] (unknown [IPv6:2601:5c0:4202:5670:b946:cabf:47b1:71cf]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fLH1K5Fn1z148w; Wed, 25 Feb 2026 01:24:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Tue, 24 Feb 2026 20:24:05 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 5edf24aac1d0 - main - ofed: reduce usage of struct dma_attrs *dma_attrs Content-Language: en-US To: "Bjoern A. Zeeb" , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <699e2185.37782.5dbfa03b@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <699e2185.37782.5dbfa03b@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/24/26 17:09, Bjoern A. Zeeb wrote: > The branch main has been updated by bz: > > URL: https://cgit.FreeBSD.org/src/commit/?id=5edf24aac1d0978d37d62594f42d87c9f118622b > > commit 5edf24aac1d0978d37d62594f42d87c9f118622b > Author: Bjoern A. Zeeb > AuthorDate: 2026-02-19 23:12:29 +0000 > Commit: Bjoern A. Zeeb > CommitDate: 2026-02-24 22:04:36 +0000 > > ofed: reduce usage of struct dma_attrs *dma_attrs > > ib_verbs.h still uses struct dma_attrs *dma_attrs everywhere. > It is beyond my knowledge when that struct got deprecated upstream but > it is still supported by our LinuxKPI. The problem is that the > functions called with that argument (dma_map_single_attrs, > dma_unmap_single_attrs, dma_map_sg_attrs, dma_unmap_sg_attrs) so far > are #defines in LinuxKPI and drop the last argument (attrs) so it was > never a problem. > > In preparation to pass the attrs to the actual implementation in LinuxKPI, > which has gained support for them, we now pass dma_sttrs->flags which > is the expected unsigned long bit field. > > If anyone has serious interest in updating our ofed implementation they > could look into this some more and remove the usage of struct dma_attrs > entirely. I already have. It's buried in this branch that I still need to get wider testing (and I'm not sure yet I've backported all the things I need): https://github.com/freebsd/freebsd-src/compare/main...bsdjhb:freebsd:ofed_backports Notably, early in the branch are these two commits: https://github.com/freebsd/freebsd-src/commit/a4583c049091d6468593fb04c1fc23c18195666f (cherry-pick of an old Linux commit) and then: https://github.com/freebsd/freebsd-src/commit/788fb6bf0e6f3aa33aaf7dba362c44f1092a3559 -- John Baldwin From nobody Wed Feb 25 01:34:12 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLHF63bJZz6TWNn for ; Wed, 25 Feb 2026 01:34:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLHF61lmJz3WjR for ; Wed, 25 Feb 2026 01:34:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771983258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=28UFiieHDv4VASc5H502dLitRuJjP23BdI2luf0oAUY=; b=LV0xG6M+kQA143umnktZZGa68NR2HI38N8LtJD9oG0zqapZoeCDD8CwpSp9w3Eab2HZ+bW 9drQfGMSpw4GZxjnpxrR0uFVM+isAm/djj80MdNI6L0feyh4ml3GSgRhbLero9a4saC+sB 9HnBbqjlwwRdpAZiR8jSPvBU5dcsi0yhq5pT89Bu1/EMSpM1o1PEC2fNS35rsPynGwPi1s Mmnzh00UJYxVaZm0fh0lF57u6svL+fl0orIhkdOsg16YG6gIGN60sKPU5pz1+5FXP3x5FM waUFkLYnUwdLHyjGS6m5z2Kk3xYHJEW406sCzOdDXyjEm54HFeuOR36uRYpS/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771983258; a=rsa-sha256; cv=none; b=jgDtMNAr9csW/ZXwi77cN4YOd2OpC5oM2rkrbRQwI+wEDsfnge1Uu2tCYGicdZ/Mg52HOW mOVLtrzjA1Go4Vobwj8NmvggDh2slLhMJ1Stjt0fYri+U0ycAry4c4Qhx163cwfLUNrPbN mNQn9bQTa8f1jJ3jxxpLJLyZVKOGIaf5sj2WSlceYu9M2OjhAEdMiHQ3ymxWt/g/ERtclK 2wnC4E2S2w/BX8/ySn83RXmyli0vfLXEUGYVM4V3ZEhIc/qFTPGD8qcKvW6nJOPMif10JV CROx/yPky1mQLeFroZ2OKuGlwjBDggS/NFNtogvBdqcHX0g16Ypa6xpDx5X95Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771983258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=28UFiieHDv4VASc5H502dLitRuJjP23BdI2luf0oAUY=; b=f62McW4dYjGnfTXV1Q4nSDDlar7Ld+4HI4YnKnP0BAMMJWEVGFamgi70f/Uf8fw6/bASjT asknVjAKIwfSrD7en4GWL6umnIZFhdDx5+v5baFZHo9Q7kH0YfoEQhkTa1psiBja0lb32j dvlRE3KlWYXNR1dIEsz0ALtL68xBuj7mTSsu/Wn1leuLunQEznRWtPSRwP/33IvcSULoQi bQOeoe7jPCWbjHu8Cg4T+X8sz4YpIRK02EQ3HAEqJ8MwTcQ9dljJKvWmHw+j4Lm5pSltTD DstWFm2dkhTeMHK9FjdPYirbTkh2duzBOzi8juN+J6rtcHpDM837L5ljBXXEug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLHF60M32zhN7 for ; Wed, 25 Feb 2026 01:34:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 19ff5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 01:34:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: ef1218add1d3 - main - kern/sched_shims.c: back to ifunc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ef1218add1d3d2baca9d3b8bcfb57e05ef6fc503 Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 01:34:12 +0000 Message-Id: <699e5194.19ff5.64ba5c6f@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ef1218add1d3d2baca9d3b8bcfb57e05ef6fc503 commit ef1218add1d3d2baca9d3b8bcfb57e05ef6fc503 Author: Konstantin Belousov AuthorDate: 2026-02-24 15:36:26 +0000 Commit: Konstantin Belousov CommitDate: 2026-02-25 01:33:52 +0000 kern/sched_shims.c: back to ifunc Reported by: kevans Reviewed by: kevans, mhorne Fixes: 0d3652f67d246348e2c017205c6782caf4484449 Sponsored by: The FreeBSD Foundation MFC after: 1 week Differrential revision: https://reviews.freebsd.org/D55490 --- sys/kern/sched_shim.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/kern/sched_shim.c b/sys/kern/sched_shim.c index 2b1dcecda433..6f0473084704 100644 --- a/sys/kern/sched_shim.c +++ b/sys/kern/sched_shim.c @@ -23,10 +23,9 @@ const struct sched_instance *active_sched; #define __DEFINE_SHIM(__m, __r, __n, __p, __a) \ - __r \ - __n __p \ + DEFINE_IFUNC(, __r, __n, __p) \ { \ - return (active_sched->__m __a); \ + return (active_sched->__m); \ } #define DEFINE_SHIM0(__m, __r, __n) \ __DEFINE_SHIM(__m, __r, __n, (void), ()) From nobody Wed Feb 25 02:09:54 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLJ2F4zdTz6TZfh; Wed, 25 Feb 2026 02:09:57 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLJ2F44JJz3bYr; Wed, 25 Feb 2026 02:09:57 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771985397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Hzi8lzn2GEysrMxzaKbzpKWkC9OKJ55tZ7QB3T/9qoo=; b=rrnI5SlWAsYqJzPUYo2S/QWzwRgLJ+DqSZorELpJ2G7wCZjnGMDPTX36h4305hFE71wtuI 1QMEQdaannnuavP5I7mKmPxRRY4Ma7QUtClbMb3l8ONk4CYIO6Misviyg8n0Oo4qy/VDZA core4b7tcqJuWM9oBAnz92hKOMfJUrIh1Rq9RFz0Rb4YSkJKuScdOZOBiIZyUWK/MtBAN6 7HTYxtRC+USR8+dR6I8axLx3eWIPEHMPUXL1CiqgWdfuTSUPAagxCMc305BHgjUIs6x/TH CucBMIY8ZnyiY5Dk4QyFT4x7iq1Jw/khfaqImzCRBn6joshJXIMPs1u8T/xNMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771985397; a=rsa-sha256; cv=none; b=ArldPEG2YB2+cdX/SnaD/zbel8FqkIz49b4U5jyEi0p+MOb/mZX1P/8xexYR/7ek2bkRX+ HnSHvCe0fY/+HRChSyhk+wD6M9pHynO/UhoXLrOBFEWTWAfqbnFw9lNimbNCgIFNs8UmH+ ON21jshrhmh1g7sgUalvK/PqZZLD3Eps8Jze9jeOKkw3GkrrJjwCVoDVWNOsRL23v514E8 tWVXA5m6cMfMYavWzWv8kZwOmjJ/q7F5CnBDKI7GXPavaCVelA3T6Bs5SQ/Zw7J+G2KqdU rM0TRMjBv/LvLRiFcC7tTpCW9EXHk7SCThj+F9WQSSFjL03PbcqgNzkIozTlOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771985397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Hzi8lzn2GEysrMxzaKbzpKWkC9OKJ55tZ7QB3T/9qoo=; b=MBe+xXNqkiXnx4VKHYibs+ee8QcXd6oqs/LXKBrg79dj2FZD5TI01+UJ4MI042GT73N+xa V4y4gHXKoz/QPVJXcqQshyTVrdZG1deKWckM3fedY8Gm98K2UjdNugJINMc/CT9PU147xx iFMEgsYPHk2EDSEMASgOAorcAzCXO+jIBnijaIf/WCfRErutHx88IJ/uQ5tBkpIfCeNTMC RdAP/p9//Mp76AIY/e4bM272f4aUmGa7h8XvRY0HZyCyTK9NcG9uIyCLxR1F/6HnoQuJJs 7qRVckmr2TxLVc0qAObn7XxAgApXas73e1+K5Jgcx8bXREYd5MQixk/Iz0x+oQ== Received: from mx-01.divo.sbone.de (legacy1.sbone.de [80.151.10.34]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E7" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fLJ2F2QTMz143C; Wed, 25 Feb 2026 02:09:57 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id E8FE3A64808; Wed, 25 Feb 2026 02:09:36 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id A8B4F2D029D8; Wed, 25 Feb 2026 02:09:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id 9VZQORp6rFJE; Wed, 25 Feb 2026 02:09:54 +0000 (UTC) Received: from nv.t4-02.sbone.de (nv.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 377B62D029E8; Wed, 25 Feb 2026 02:09:54 +0000 (UTC) Date: Wed, 25 Feb 2026 02:09:54 +0000 (UTC) From: "Bjoern A. Zeeb" To: John Baldwin cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 5edf24aac1d0 - main - ofed: reduce usage of struct dma_attrs *dma_attrs In-Reply-To: Message-ID: References: <699e2185.37782.5dbfa03b@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed On Tue, 24 Feb 2026, John Baldwin wrote: > On 2/24/26 17:09, Bjoern A. Zeeb wrote: >> The branch main has been updated by bz: >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=5edf24aac1d0978d37d62594f42d87c9f118622b >> >> commit 5edf24aac1d0978d37d62594f42d87c9f118622b >> Author: Bjoern A. Zeeb >> AuthorDate: 2026-02-19 23:12:29 +0000 >> Commit: Bjoern A. Zeeb >> CommitDate: 2026-02-24 22:04:36 +0000 >> >> ofed: reduce usage of struct dma_attrs *dma_attrs >> ib_verbs.h still uses struct dma_attrs *dma_attrs everywhere. >> It is beyond my knowledge when that struct got deprecated upstream but >> it is still supported by our LinuxKPI. The problem is that the >> functions called with that argument (dma_map_single_attrs, >> dma_unmap_single_attrs, dma_map_sg_attrs, dma_unmap_sg_attrs) so far >> are #defines in LinuxKPI and drop the last argument (attrs) so it was >> never a problem. >> In preparation to pass the attrs to the actual implementation in >> LinuxKPI, >> which has gained support for them, we now pass dma_sttrs->flags which >> is the expected unsigned long bit field. >> If anyone has serious interest in updating our ofed >> implementation they >> could look into this some more and remove the usage of struct >> dma_attrs >> entirely. > > I already have. It's buried in this branch that I still need to get wider > testing (and I'm not sure yet I've backported all the things I need): > > https://github.com/freebsd/freebsd-src/compare/main...bsdjhb:freebsd:ofed_backports > > Notably, early in the branch are these two commits: > > https://github.com/freebsd/freebsd-src/commit/a4583c049091d6468593fb04c1fc23c18195666f > (cherry-pick of an old Linux commit) Thank you! > and then: > > https://github.com/freebsd/freebsd-src/commit/788fb6bf0e6f3aa33aaf7dba362c44f1092a3559 Ah nice. You made me check when this happend upstream and I found 00085f1efa387 . Seems this was v4.8 so that should not be a problem to ditch dma-attrs.h then :) Thank you! I'll be happy to help review changes if needed, especially for all things concerning LinuxKPI (or in case you hit that netdevice). /bz -- Bjoern A. Zeeb r15:7 From nobody Wed Feb 25 02:21:28 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLJHX4NKXz6Tbmy for ; Wed, 25 Feb 2026 02:21:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLJHX3VfLz3dVX for ; Wed, 25 Feb 2026 02:21:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771986088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K4s/jlol5i+2AJopXoRsD0e5Sl6ma33HEbkhfHTUk9o=; b=dV+Kl+dApKEndCZY+90e39BEiQx5cqd/TIKn7HRS2p26UJE7G/cy/RajeEoWjB5qiAY5cu x9ecn1k1y8PFnhy7MVI+rUSsF1NazViZqKo6r6lvnJON9Gqt6WTbmDDMuDw5em6DZZC+Gh zsn8VZH6UhjHnGt8F/X+QsYcQupJPErWWDIntTlp83XJw9qbByF2bMXwEeqgqTQBn4BDBf H1Tp5Dtfs3uT3ANvDGQ5x1LrMh+iiysWiPSScN2zBP5Hv018MlSAwsAC0StBSlcfogcy4H l4QA35vZM2ZVQXCUKNvjZKnZBtAtZC7+fcfUI1KaYSMvnX3WonksdmMiPMI4fw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771986088; a=rsa-sha256; cv=none; b=ullY/4AhVCapgAnGaXcs8hQFGoGqoYkDY2WeLLpoyU9Od3Ouj/c68AJ/tqNecx/sLsaSlN 8s0ebvz/Ywp8Relkozm2ePHC+ApfusG3j3kmWVs9Ns3g0Y354oCDYkm/TvYxBGPYzJL1NB URcalC8bjQUHvEnModqqauYyQ08mQnHokbl7QSsTgO7oCetg0Wccvhwbv7oewkc17fQE7+ Y1kBesrh0rfGhwkuXCecQsvrnU8LjP0No4z3zWhOp4bpB3osiNi/8L/EqjpXPWmT2POM6P Ey8i3uIfPWK7mP8xoYsgciOCfqYidX25h+35187k64vwj8IdBF95ahmuyi2C5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771986088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K4s/jlol5i+2AJopXoRsD0e5Sl6ma33HEbkhfHTUk9o=; b=wnGUa17Ck/pIA/LBsXSRLZN7tnaQc5vNj2wytZyzI+BddRb75Lk7aSLU4txMcTi4CFOGL8 Lx8zJPwhqOhq6aDdI+mp4pTZZpGlO36aBX7Gu9XcNV8FLY1XXO4USDkb3NxYD1AZAw33F2 P4U4VFh0AvhPZ5l4h319wuE/Udueaa2WJRDiNHqkQT/P87lELSRgKQAeUW9Ci78XWygYa6 4Ih0MzcXLbfu0QN6k0YendlAH90kuzZvkP38Uk03SG0aZ6WmzbQiySlThSxBT36jVUEIjS rQkTMr51LjrjG6kG3IfFYdw3ChbPKPGJJ/KxTZu1f8N+EtGVWZo11GFA927YDw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLJHX33NgzjZr for ; Wed, 25 Feb 2026 02:21:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21c2d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 02:21:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 6513c2845f89 - main - sys: Declare 'end' as an extern char[] List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 6513c2845f8912c30749cf64704d3dfeeeb9a47a Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 02:21:28 +0000 Message-Id: <699e5ca8.21c2d.1aa79159@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6513c2845f8912c30749cf64704d3dfeeeb9a47a commit 6513c2845f8912c30749cf64704d3dfeeeb9a47a Author: John Baldwin AuthorDate: 2026-02-25 02:20:59 +0000 Commit: John Baldwin CommitDate: 2026-02-25 02:20:59 +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 --- 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 60d63cebca3d..1cd016f62e1b 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 9bb1f0ccae91..6ad3f9d744b3 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 0214426eea18..3f454bdb1c8f 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 Wed Feb 25 02:21:27 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLJHc4P75z6TbhT for ; Wed, 25 Feb 2026 02:21:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLJHc335sz3dbN for ; Wed, 25 Feb 2026 02:21:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771986092; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RMnO6zoN6sCMrAAFgnh5gZT4K4FG94QON/ngxCj5BKM=; b=gdx3yac0z6P+mJ3c416vcsrkoq0rXdpRZWKkgsHpoN8QzKrto+/0V0EML643M0jxbbxcAo tC9UzPbZ1tBBn4ji6EOkIw8jff1Qqvf7g601yYAEit6iYnEZnge8JSmRPgE3NuOZTE2Y+m ltOXuXBLsB4Q7fxO0WqDM1M+RFmXzzHUcfe+fKwFHkO1fX5pmTKD/zi5SERzW9FfGY2eHq 5+p6HN0jHRjuLvHCpgiT9LpGNS8+PM4jlrslEPn0od2ySQfxDRfPYjJirqYR9B3UL2Lhag shmx2PjsG6cDGAnNpxR1/T+jojVZ3oXxwXd+w50zrUuwTy8CtWYSNyMLFrz7vw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771986092; a=rsa-sha256; cv=none; b=TR7snPi7b0+vJqBfYg+b6TCYifD1JooQmyDjudWludnsfza8sz8lBHQqiH6uEOQ/iwQBOv 5ez1ZeC9LAkqLXSfRtfnQcCfXjdS6Ztu6p2dQf7LNBQ3yBwlvYDE3w9P0gN3qFf3lONUyX oc2wsui3NtufRSfc6apK4TACFVv4ueMYySIV/bItFvCV6wZbI7jfl1cbwNeZ6g6TeIQ7pq l184drEg4dcMmXTlm/w7ixP41oiwFeZ9C+QGRkxA/zjLChkuBqZvvDvaA7zH3xTPSFIyZa MzK0oA4kS56gacsDw0sF2eE0P2ciPgb6D9keDAZxIcT6gOZM0Hax4zc9M9c7Cg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771986092; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RMnO6zoN6sCMrAAFgnh5gZT4K4FG94QON/ngxCj5BKM=; b=X3q0hOla2elIrAips8GXC6zM4PRwDgxoyoN0nCS5jJT41zU+Uil1Z1xI8pg7DvHsL9dQLB q/Xy0PaaxQXxe+8znBHoE2tpwdkIR7wskolSWqqWqxwJDr6bzoHGGRpQ3rLXnu5VO19FLE sCNYUtwncdmJRGel1pjyht141VB4GbCHmoFu4hIXDcC+WevfKVpK4V548LPFPwLKJkZ2BS GaLij6hMSQiFE7GWlmOGj1iKwFfQrIhSX9i87A4YRmhj7WBcCYHGAN+1ajmbhsl0KF4yTC C7dB+bGeZLXeM5W9Bx/Y/lwqCJus+VDzC2Pde242Q8gZ5wWQgfyxzzuSfrDrKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLJHc2VTKzjGq for ; Wed, 25 Feb 2026 02:21:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2034b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 02:21:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Marcin Cieslak From: John Baldwin Subject: git: fba56be09f1c - main - Do not fail 'devctl clear driver' if another driver is not found List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: fba56be09f1c344cc5805b898fbfef6066950942 Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 02:21:27 +0000 Message-Id: <699e5ca7.2034b.4e9ac9e0@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=fba56be09f1c344cc5805b898fbfef6066950942 commit fba56be09f1c344cc5805b898fbfef6066950942 Author: Marcin Cieslak AuthorDate: 2026-02-25 01:58:59 +0000 Commit: John Baldwin CommitDate: 2026-02-25 01:58:59 +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 --- 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 c9d64e3674c6..b5c1c5b61f60 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 Wed Feb 25 02:24:05 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLJLg1bVJz6TcNy for ; Wed, 25 Feb 2026 02:24:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLJLg0lLPz3f9m for ; Wed, 25 Feb 2026 02:24:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771986251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sXIsiDLs9MZebfc0p4toXHHkUtBk9Od6rhpjmhGn9Ig=; b=nrm82DUVH0bQBY3//euCGwLbbgDD4CW4EhY1lKb64v9DhANaFaPLrIKv3kYedfNbK74+MU Zm55tWb1MGSRq02wPi5mHovpLGgZI8nMpzAZ2n8ELsxx038GxfNHMrZwHONR1CSzGlGahj YaZEAolu1QQ6pddK88CJg8TpWYkoBMhwKHeyJCAaI3T0MEv2Nnm59uc7hmMe7XFH3QeQkr 8Il1wea9XvrB8fZT+Ck1ZJtVn1eFuIc7jAO5/15Yk+ikg1JUvTKXKtpccGlWKdSE/DLSi+ vKBQhMJmny+DzuLdDSlp1wbyiXmvu08hSpkZWVwwUkb0q5gIQZqUZBrWXvWdzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771986251; a=rsa-sha256; cv=none; b=BSfbcSB+X01W7o8lTfFsZv/1+Hav7LiVxUhClRlrCzd7wUq3cAwNJwsSgkzEwrSABRN41/ 1AMKs2177I1Js0anuowMNavN755EsGzTe3fEPgTcS94lkWU9u4XXgWGFgJaxSpViB1yh+e PrFMXJAdvmsKspoJ/Rc8b0abmnznRsVP7IvQNZK980JiRQzQANlRuEO2D6DfLPjk9VOvZf RhC+Ny62Yy6Ez3mUhfps7W2Gqq300N1XXpV0KG9OIsjQLEVrPoTFgwOL6AsU7gPhJvlC8P EVtq4QVPHJo8Ul74+tjK81yDf6gk13WwvbnUizIvaz4It68IfUzacnW3866F3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771986251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sXIsiDLs9MZebfc0p4toXHHkUtBk9Od6rhpjmhGn9Ig=; b=VW0OzXCL1TKLEti5ppkuqc0+V2i1j6++DSm0ksSC1AAogR9g511VctltTFua4A0c4gAAg0 eaIE+b9AQF8yvTtluX3ugzXCEjQfy3Fasl92vllTmwfpi3SZFTVHlWR4ypboR6GzOYuHLh KpMqrI8L4t7wGNR+IrpRgt1QKUewnZxyxfIzLLpEDMfWcluv54KbgMnt9VnuRk+dbryi8J /4MikvwbBhiAIWq+7VyW//e7pnW24Domv7lFpqCV5sOc31vjA3hOFWIYMlG2o2jG+qNweA InW6zck0ZK3MAVx90gd/MkrF7zUnxkMckk45bH5P0Hc6KIfyB+gE1NHqQWYYkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLJLg0KLDzk1r for ; Wed, 25 Feb 2026 02:24:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21a33 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 02:24:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: e43730e585fa - main - cxgbe tom: Use the same WRs as iSCSI to send PDUs for NVMe List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: e43730e585fab3385c5b774b83e95e16c984dacc Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 02:24:05 +0000 Message-Id: <699e5d45.21a33.29061bdf@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e43730e585fab3385c5b774b83e95e16c984dacc commit e43730e585fab3385c5b774b83e95e16c984dacc Author: John Baldwin AuthorDate: 2026-02-25 02:23:39 +0000 Commit: John Baldwin CommitDate: 2026-02-25 02:23:39 +0000 cxgbe tom: Use the same WRs as iSCSI to send PDUs for NVMe Reviewed by: np (earlier version) Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D55470 --- sys/dev/cxgbe/tom/t4_cpl_io.c | 112 +++++------------------------------------- 1 file changed, 13 insertions(+), 99 deletions(-) diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c index 5c39ae5fa8f3..7e1c497240c2 100644 --- a/sys/dev/cxgbe/tom/t4_cpl_io.c +++ b/sys/dev/cxgbe/tom/t4_cpl_io.c @@ -496,9 +496,6 @@ t4_close_conn(struct adapter *sc, struct toepcb *toep) #define MIN_ISO_TX_CREDITS (howmany(sizeof(struct cpl_tx_data_iso), 16)) #define MIN_TX_CREDITS(iso) \ (MIN_OFLD_TX_CREDITS + ((iso) ? MIN_ISO_TX_CREDITS : 0)) -#define MIN_OFLD_TX_V2_CREDITS (howmany(sizeof(struct fw_ofld_tx_data_v2_wr) + 1, 16)) -#define MIN_TX_V2_CREDITS(iso) \ - (MIN_OFLD_TX_V2_CREDITS + ((iso) ? MIN_ISO_TX_CREDITS : 0)) _Static_assert(MAX_OFLD_TX_CREDITS <= MAX_OFLD_TX_SDESC_CREDITS, "MAX_OFLD_TX_SDESC_CREDITS too small"); @@ -546,46 +543,6 @@ max_dsgl_nsegs(int tx_credits, int iso) return (nseg); } -/* Maximum amount of immediate data we could stuff in a WR */ -static inline int -max_imm_payload_v2(int tx_credits, int iso) -{ - const int iso_cpl_size = iso ? sizeof(struct cpl_tx_data_iso) : 0; - - KASSERT(tx_credits >= 0 && - tx_credits <= MAX_OFLD_TX_CREDITS, - ("%s: %d credits", __func__, tx_credits)); - - if (tx_credits < MIN_TX_V2_CREDITS(iso)) - return (0); - - return (tx_credits * 16 - sizeof(struct fw_ofld_tx_data_v2_wr) - - iso_cpl_size); -} - -/* Maximum number of SGL entries we could stuff in a WR */ -static inline int -max_dsgl_nsegs_v2(int tx_credits, int iso, int imm_payload) -{ - int nseg = 1; /* ulptx_sgl has room for 1, rest ulp_tx_sge_pair */ - int sge_pair_credits = tx_credits - MIN_TX_V2_CREDITS(iso); - - KASSERT(tx_credits >= 0 && - tx_credits <= MAX_OFLD_TX_CREDITS, - ("%s: %d credits", __func__, tx_credits)); - - if (tx_credits < MIN_TX_V2_CREDITS(iso) || - sge_pair_credits <= howmany(imm_payload, 16)) - return (0); - sge_pair_credits -= howmany(imm_payload, 16); - - nseg += 2 * (sge_pair_credits * 16 / 24); - if ((sge_pair_credits * 16) % 24 == 16) - nseg++; - - return (nseg); -} - static inline void write_tx_wr(void *dst, struct toepcb *toep, int fw_wr_opcode, unsigned int immdlen, unsigned int plen, uint8_t credits, int shove, @@ -613,35 +570,6 @@ write_tx_wr(void *dst, struct toepcb *toep, int fw_wr_opcode, } } -static inline void -write_tx_v2_wr(void *dst, struct toepcb *toep, int fw_wr_opcode, - unsigned int immdlen, unsigned int plen, uint8_t credits, int shove, - int ulp_submode) -{ - struct fw_ofld_tx_data_v2_wr *txwr = dst; - uint32_t flags; - - memset(txwr, 0, sizeof(*txwr)); - txwr->op_to_immdlen = htobe32(V_WR_OP(fw_wr_opcode) | - V_FW_WR_IMMDLEN(immdlen)); - txwr->flowid_len16 = htobe32(V_FW_WR_FLOWID(toep->tid) | - V_FW_WR_LEN16(credits)); - txwr->plen = htobe32(plen); - flags = V_TX_ULP_MODE(ULP_MODE_NVMET) | V_TX_ULP_SUBMODE(ulp_submode) | - V_TX_URG(0) | V_TX_SHOVE(shove); - - if (toep->params.tx_align > 0) { - if (plen < 2 * toep->params.emss) - flags |= F_FW_OFLD_TX_DATA_WR_LSODISABLE; - else - flags |= F_FW_OFLD_TX_DATA_WR_ALIGNPLD | - (toep->params.nagle == 0 ? 0 : - F_FW_OFLD_TX_DATA_WR_ALIGNPLDSHOVE); - } - - txwr->lsodisable_to_flags = htobe32(flags); -} - /* * Generate a DSGL from a starting mbuf. The total number of segments and the * maximum segments in any one mbuf are provided. @@ -1300,7 +1228,7 @@ write_nvme_mbuf_wr(struct toepcb *toep, struct mbuf *sndptr) { struct mbuf *m; const struct nvme_tcp_common_pdu_hdr *hdr; - struct fw_v2_nvmet_tx_data_wr *txwr; + struct fw_ofld_tx_data_wr *txwr; struct cpl_tx_data_iso *cpl_iso; void *p; struct wrqe *wr; @@ -1330,29 +1258,16 @@ write_nvme_mbuf_wr(struct toepcb *toep, struct mbuf *sndptr) return (wr); } - /* - * The first mbuf is the PDU header that is always sent as - * immediate data. - */ - imm_data = sndptr->m_len; - iso = mbuf_iscsi_iso(sndptr); - max_imm = max_imm_payload_v2(tx_credits, iso); - - /* - * Not enough credits for the PDU header. - */ - if (imm_data > max_imm) - return (NULL); - - max_nsegs = max_dsgl_nsegs_v2(tx_credits, iso, imm_data); + max_imm = max_imm_payload(tx_credits, iso); + max_nsegs = max_dsgl_nsegs(tx_credits, iso); iso_mss = mbuf_iscsi_iso_mss(sndptr); - plen = imm_data; + plen = 0; nsegs = 0; max_nsegs_1mbuf = 0; /* max # of SGL segments in any one mbuf */ nomap_mbuf_seen = false; - for (m = sndptr->m_next; m != NULL; m = m->m_next) { + for (m = sndptr; m != NULL; m = m->m_next) { int n; if (m->m_flags & M_EXTPG) @@ -1440,13 +1355,13 @@ write_nvme_mbuf_wr(struct toepcb *toep, struct mbuf *sndptr) if (iso) wr_len += sizeof(struct cpl_tx_data_iso); if (plen <= max_imm && !nomap_mbuf_seen) { - /* Immediate data tx for full PDU */ + /* Immediate data tx */ imm_data = plen; wr_len += plen; nsegs = 0; } else { /* DSGL tx for PDU data */ - wr_len += roundup2(imm_data, 16); + imm_data = 0; wr_len += sizeof(struct ulptx_sgl) + ((3 * (nsegs - 1)) / 2 + ((nsegs - 1) & 1)) * 8; } @@ -1460,7 +1375,7 @@ write_nvme_mbuf_wr(struct toepcb *toep, struct mbuf *sndptr) credits = howmany(wr->wr_len, 16); if (iso) { - write_tx_v2_wr(txwr, toep, FW_V2_NVMET_TX_DATA_WR, + write_tx_wr(txwr, toep, FW_ISCSI_TX_DATA_WR, imm_data + sizeof(struct cpl_tx_data_iso), adjusted_plen, credits, shove, ulp_submode | ULP_ISO); cpl_iso = (struct cpl_tx_data_iso *)(txwr + 1); @@ -1470,16 +1385,15 @@ write_nvme_mbuf_wr(struct toepcb *toep, struct mbuf *sndptr) hdr->pdo); p = cpl_iso + 1; } else { - write_tx_v2_wr(txwr, toep, FW_V2_NVMET_TX_DATA_WR, imm_data, + write_tx_wr(txwr, toep, FW_OFLD_TX_DATA_WR, imm_data, adjusted_plen, credits, shove, ulp_submode); p = txwr + 1; } - /* PDU header (and immediate data payload). */ - m_copydata(sndptr, 0, imm_data, p); - if (nsegs != 0) { - p = roundup2((char *)p + imm_data, 16); - write_tx_sgl(p, sndptr->m_next, NULL, nsegs, max_nsegs_1mbuf); + if (imm_data != 0) { + m_copydata(sndptr, 0, plen, p); + } else { + write_tx_sgl(p, sndptr, NULL, nsegs, max_nsegs_1mbuf); if (wr_len & 0xf) { uint64_t *pad = (uint64_t *)((uintptr_t)txwr + wr_len); *pad = 0; From nobody Wed Feb 25 02:47:39 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLJsr57Z0z6Tfmc for ; Wed, 25 Feb 2026 02:47:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLJsr3CBcz3hmG for ; Wed, 25 Feb 2026 02:47:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771987664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q9O4J+nLfW4nvKgAhm/QDRaYINoN2cYFeUXA/VhZKHU=; b=A9IPzA92rWRUyU1A1LmCsP1yFq27uYGQ8C+QyLydXQdzmsDwqEnn9nBQbrQMvIYPZLzNGR XfLoWl1UgoKHwY/KGq0mWM3eaYLVXv2zx6wrBejJWKeYSw4KJzvRxbFYmNOeQRqZWFsIUO msslq52L6VJ9qcnTfUw5cVsWafkeMW5dV7es49pBc/Rb//sv3PlNM+VYP2qM9ffLs2KkiF cnYgTAWU8IX2kIDF7zEHfkmWVTop+oN3qHSYWvpQ8C2ijv2QAqr9EDrbTpiDqWRwdqvx0h ZUIacCoKRMJjTJzUTXJbsslT2hUeCWGfrEyuUGBFDtemYdwEtJOUegzmtXVGoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771987664; a=rsa-sha256; cv=none; b=d57FRfTiTRY84fEj65F+1lSIO6UpsQUrU1DSI/WAsqlCtBIJf7PXj45RPrGLTJkj3DeZrr N3NXhyQORwXdFQlq5IsvzQU0K8b1vrjBIyvUKkYm+Y2lE/FRZgR8fHGgjW0ledPXpGr1rj TzFWuhZYfk2ZcL4VYPD0cKtv6TdlSRjpF2/on47W4HYCjaDzM2P0d+XgRfUGbPwYjlhjPL fp47FqolHGL2FD4WYCpJ2YmwCSoYBf20n+KsIQcrPgiTrIiu9ixXDFUEQLb+/F/rvdCPoi QQnhBlS7E6a7stu+OAUoM6ZcsU429rH7m92p6MFc5ySB4xFX+T8zwEcyemr8QA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771987664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q9O4J+nLfW4nvKgAhm/QDRaYINoN2cYFeUXA/VhZKHU=; b=Yqu9wobK5+612MIM/pWqc+khCB7STTbhr8UAMcePABifg36jykrcZoWh/s1jaFT4aYVg1r Q7W/XH+tt2R1ru7xrJ80jhs+JwSM4PLACCNO2+zUaaz+VFfGdgrTKHqGmTAvwnsXrWzvYt p2Sm1u0o6MOoo45jlj9dcHa275dMLvEM/Ah/kiZWURLxiVguDbXVwws84G7zcs8BoC4dpD 7fXe/+xr5pey6CcKLgJ4gbZ2iW8c6KPhiUzifYHN4h/dyur47aWL5QCRKEOvnnRo4VlWU6 sKXJXT+51EgRV5W9JrHnNsHEksDuURb0YmKiCgZH3kU/UsWVEQ2pWTzdldwKaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLJsr2YbNzjrc for ; Wed, 25 Feb 2026 02:47:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 239a2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 02:47:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: a2c2de82c053 - stable/14 - pkg-stage.sh: Add ext2 and ntfs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a2c2de82c053ba7596f90ebf7d7ea6cb41938587 Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 02:47:39 +0000 Message-Id: <699e62cb.239a2.5f1eb4f0@gitrepo.freebsd.org> The branch stable/14 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=a2c2de82c053ba7596f90ebf7d7ea6cb41938587 commit a2c2de82c053ba7596f90ebf7d7ea6cb41938587 Author: Colin Percival AuthorDate: 2026-02-22 00:38:01 +0000 Commit: Colin Percival CommitDate: 2026-02-25 02:47:29 +0000 pkg-stage.sh: Add ext2 and ntfs Having these packages available on release media may help users who need to sneakernet other packages (e.g. firmware) from systems running Linux or Windows. Suggested by: vladlen, ziaee MFC after: 3 days (cherry picked from commit 6881fd278d80ac63b4d511fc130a79ff16d1bb48) --- release/scripts/pkg-stage.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh index 8f7ae35ce9d1..cb613950c916 100755 --- a/release/scripts/pkg-stage.sh +++ b/release/scripts/pkg-stage.sh @@ -17,6 +17,8 @@ comms/usbmuxd devel/git@lite editors/emacs@nox editors/vim +filesystems/ext2 +filesystems/ntfs misc/freebsd-doc-all net/mpd5 net/rsync From nobody Wed Feb 25 04:25:08 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLM2D4wjKz6TrdQ for ; Wed, 25 Feb 2026 04:25:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLM2D3l4sz3vcy for ; Wed, 25 Feb 2026 04:25:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771993508; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vaO+CSBatbqOurAfEGJBraBX9WkM4X8VaF/s+pHon00=; b=RZbhee5vG/V/ME/9EJ/5Ovw7tnPt8uROjUdlN/kCThtNFCMqjXKrFS3KsBPQma7LVxlNLo PiUW6CG6BmdF0ur6yzZMSbH9SwkGPwh1XDv7MygpmoDXSz1BJoaeoJGH8j68nfYsyvWcux ibJ8xj4WmfGxFdAYxlhPoWoWbUMrqaYUd/6RZgdhHn6NTadsmDRa5n89PHZti/GWVBcOAD yCX+L/h8FSeMlUDJnwbag66pESYq1muKP0skMU5IV836qDQXzyNGXEhcfePBwK6VfFRVsa 8beilnnghe1h//02/TFmttmOyxOMH0L2iaXpAqmTUbFWR0W11P7eW3oY2lvH3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771993508; a=rsa-sha256; cv=none; b=KqOUeojgoSuXpJ8XdjUbEiaduKgjo0hZqHqcHl6C+Ke8f7RZDoq6jY1esO6hhytRIX3ir3 r1pjFW4zpnHu2pjIn5cHYL4fstNcAfM08Wk1BE6j7V7N2H7N7mD8C8CvL9I+Dk+0UZcJRw Pj9W7ORqg+1wYRHFGPedvz797fOiO8130iqtpcC60IqvINtnHjfoNVQw00aNFm1bA5lBGa FyPiYcHBDvUW6bInbFGORxu80S95UE59Ym7sudAgEpdnO/h8z+9h3M9BlUB7+vTKI+A6zZ dUSlzCXteszMsRMLGYaE1GgJZO6bQkoPY1RIc2IdMKzIG/gdHbFa2tqWsoGKSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771993508; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vaO+CSBatbqOurAfEGJBraBX9WkM4X8VaF/s+pHon00=; b=It/eRAQBXELVj0yKk5AnU7iI+Mh9R76UP0lJU0xoSvKleGew1jMeLLUc/qvvRtVywPknKO UGK+lnPa7qEOF19Sg4xAglFZrwF8S4Y9mSLTGUiBIioDLovJu7/SuOKpHutsbvpxmuhxx9 6MNKFo2vU5evSS6voUlMcBOco5XPxWiuvb3w5K8rrEzY3qtHC0ADTktiXDoLlclC/aEcKS XIWcaht9Vb8+3+q1N276bb2U8Jpxr2YeyxigkAvSBNmhpJ6slsWe0d6ZCe5x58WflfDzxB 0/61SEK++jGayV7Eluea8BSjOqj2ePv7kiNxmAKR8LWcqakB6VLktoWCZ0IxnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLM2D2gYJzmr1 for ; Wed, 25 Feb 2026 04:25:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36f92 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 04:25:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: acba7a62b92f - main - LinuxKPI: 802.11: improve crypto debug logging List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: acba7a62b92ff62ca4ae831e9c28fc6ed4f6455a Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 04:25:08 +0000 Message-Id: <699e79a4.36f92.77392ff3@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=acba7a62b92ff62ca4ae831e9c28fc6ed4f6455a commit acba7a62b92ff62ca4ae831e9c28fc6ed4f6455a Author: Bjoern A. Zeeb AuthorDate: 2026-02-25 00:05:36 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-25 04:24:50 +0000 LinuxKPI: 802.11: improve crypto debug logging Add a log entry to lkpi_ieee80211_iterate_keys() in order to be able to determine if there are still keys available when a driver calls into this (e.g., iwlwifi does before removing the sta to make sure the keys are gone). Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/src/linux_80211.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 550bd417c529..9693e4eec268 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -7106,6 +7106,14 @@ lkpi_ieee80211_iterate_keys(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *, struct ieee80211_key_conf *, void *), void *arg) { +#ifdef LINUXKPI_DEBUG_80211 + if (linuxkpi_debug_80211 & D80211_TRACE_HW_CRYPTO) + net80211_vap_printf(LVIF_TO_VAP(VIF_TO_LVIF(vif)), + "%s:%d: lsta %6D added_to_drv %d kc[keyix %u] %p\n", + __func__, __LINE__, LSTA_TO_STA(lsta)->addr, ":", + lsta->added_to_drv, keyix, lsta->kc[keyix]); +#endif + if (!lsta->added_to_drv) return; From nobody Wed Feb 25 04:25:09 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLM2H0DNPz6TrPl for ; Wed, 25 Feb 2026 04: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLM2G1KqWz3vd9 for ; Wed, 25 Feb 2026 04: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=1771993510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mMZo1+qrG3qvqXpC1Tkh+iCm4uGpz4RY5ZZ4K/u9hMI=; b=XFzl6XwNaALKiI/iRyCFLzSy54XF6IW9V176ZIxAHzZI0CXDCu94wHUNeDJO591MSXaoX4 TH2nYU4QbkqwLLNysv0vYNt7GbJr+eTi7UGJor+fvOmB38v8dRJoPNgV6R3L/1gED/G188 mLPKScT/Z/4g6yQajIglkY3mfbGMarxGBYWnLlBicuppE1i0dAJL+f2fE3u8FXQ3HxGLop n4vVrQPHTy0eUkpfpoir38sjWN1evt20YeN13ZcNIHKVXnVNyRfrIDYjoYtUvRJZxv4Xmk ZI2PF2+GRv92VSBn+cIl/7rp6zH8SpP85XShxyZ7DnQKUAWsQzOBLSiE9aMsCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771993510; a=rsa-sha256; cv=none; b=IWCz+kWzv37tbB1neXgLrTX8dj/8k9+rr89ETG/kQZyFn3/cBIXmJyIwUk7f8PP7DifA8r KXef/L960joDFbOMvtY2c9BWvrm2GujzKnhsScRw9DiUB2mE2++wTHHfg5GOW1zO2ihYJh i2xLeNXtYuw+OWEniaOl0cwhzvcrXJoaLQqQLWKhJX6rmK5e5TpRmK83ivOrQMH7arRw0D SusiFi5HTQJoi1+IwdeigWREYUHRgwzVQ3ZC/4QSw7gV9lnWhNmVlBJ0dIcDVoo1miVtLY u6IYApjhZBMxIiilocxV8DHg3fc+1A8a1FOFAXf5ir228UsnCqtbiM9qbChk/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=1771993510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mMZo1+qrG3qvqXpC1Tkh+iCm4uGpz4RY5ZZ4K/u9hMI=; b=fyFfbu0kaQfKQUVKbQXUDBeogs9RmZhR+mX6jDSt/C/9PHA2mpptJ8Jyc3w2YGoUy74nsF ZNqDTqk/TxvOexweclYXT20NevlOJish4b90ITgTR+EXhQWKy6EoPV0fGBUwFeFGNqogI7 87k7x9pVl7c8mMoZLFM0JRNPVr+RBqDNRUFI1aqAFt9diqaV+5qQi/bALpKQBZoyipWjUT Pk6L6IkX0+YmXS1YJSgtKh8AibwP6gXAyFtsmjpggNvfJy1U7Y4qVcDQFB0/Ha4b6EpDs+ FrttcOkzQF8igJuYcHMeJzSdxUAOM3C9/K/EqoaKBw3hnQX7mcUy66J0iPKdTg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLM2F3mf8zmr2 for ; Wed, 25 Feb 2026 04:25:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35f58 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 04:25:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 48f55a49a1d1 - main - LinuxKPI: 802.11: fold the sta state machine again List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 48f55a49a1d142c616edbc7ee6745dd6b83393e4 Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 04:25:09 +0000 Message-Id: <699e79a5.35f58.7f62dd86@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=48f55a49a1d142c616edbc7ee6745dd6b83393e4 commit 48f55a49a1d142c616edbc7ee6745dd6b83393e4 Author: Bjoern A. Zeeb AuthorDate: 2026-02-25 00:13:22 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-25 04:24:50 +0000 LinuxKPI: 802.11: fold the sta state machine again In and around d9f59799fc3e7 we adjusted the initial sta state machine implementation and unfolded some functions, duplicating code. This version tries to undo some of that as it seems that we can get away with doing it more cleanly these days. There are 5 main functions for the path from INIT to RUN (UP1,2,3.1,3.2,4) and 4 main functions for the path from RUN to INIT (DOWN1,2,3,4). The reason there is one more on the patch up is that we can go directly from AUTH to RUN without going through ASSOC first. In addition there are further functions relying only on these 9 base state change functions in order to implement the remaining possible state transitions net80211 can do (without CSA and SLEEP). Another change is that we no longer take a sta always through INIT/SCAN first and then back up to AUTH, that is, we are no longer deleting the sta from the firmware unless net80211 would also take us down to that state and in a follow-up back up. This is a preparation for another fix to come in order to import a newer version of iwlwifi (v6.19). I have run a few days of mlme_assoc (see tools) and some other basic regression tests. The only thing I managed was to deadlock net80211 for other reasons (ieee80211_waitfor_parent()). But this will need excessive user testing as the various options which may have an effect on the subtle details are great as we learnt in the past years. Sponsored by: The FreeBSD Foundation MFC after: 5 days --- sys/compat/linuxkpi/common/src/linux_80211.c | 834 +++++++++------------------ 1 file changed, 278 insertions(+), 556 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 9693e4eec268..48b87ae47751 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2121,7 +2121,7 @@ lkpi_disassoc(struct ieee80211_sta *sta, struct ieee80211_vif *vif, * The caller is responsible for removing the sta gong to * IEEE80211_STA_NOTEXIST and then executing the * bss_info_changed() update. - * See lkpi_sta_run_to_init() for more detailed comment. + * See DOWN4 for more detailed comment. */ lvif = VIF_TO_LVIF(vif); @@ -2248,13 +2248,17 @@ lkpi_remove_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif) static int lkpi_sta_state_do_nada(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { - return (0); } -/* lkpi_iv_newstate() handles the stop scan case generally. */ -#define lkpi_sta_scan_to_init(_v, _n, _a) lkpi_sta_state_do_nada(_v, _n, _a) +/* UP1 */ +static int +lkpi_sta_init_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) +{ + return (lkpi_sta_state_do_nada(vap, nstate, arg)); +} +/* UP2 */ static int lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { @@ -2579,136 +2583,7 @@ out_relocked: return (error); } -static int -lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) -{ - struct lkpi_hw *lhw; - struct ieee80211_hw *hw; - struct lkpi_vif *lvif; - struct ieee80211_vif *vif; - struct ieee80211_node *ni; - struct lkpi_sta *lsta; - struct ieee80211_sta *sta; - struct ieee80211_prep_tx_info prep_tx_info; - enum ieee80211_bss_changed bss_changed; - int error; - - lhw = vap->iv_ic->ic_softc; - hw = LHW_TO_HW(lhw); - lvif = VAP_TO_LVIF(vap); - vif = LVIF_TO_VIF(lvif); - - LKPI_80211_LVIF_LOCK(lvif); -#ifdef LINUXKPI_DEBUG_80211 - /* XXX-BZ KASSERT later; state going down so no action. */ - if (lvif->lvif_bss == NULL) - ic_printf(vap->iv_ic, "%s:%d: lvif %p vap %p iv_bss %p lvif_bss %p " - "lvif_bss->ni %p synched %d\n", __func__, __LINE__, - lvif, vap, vap->iv_bss, lvif->lvif_bss, - (lvif->lvif_bss != NULL) ? lvif->lvif_bss->ni : NULL, - lvif->lvif_bss_synched); -#endif - - lsta = lvif->lvif_bss; - LKPI_80211_LVIF_UNLOCK(lvif); - KASSERT(lsta != NULL && lsta->ni != NULL, ("%s: lsta %p ni %p " - "lvif %p vap %p\n", __func__, - lsta, (lsta != NULL) ? lsta->ni : NULL, lvif, vap)); - ni = lsta->ni; /* Reference held for lvif_bss. */ - sta = LSTA_TO_STA(lsta); - - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - - IEEE80211_UNLOCK(vap->iv_ic); - wiphy_lock(hw->wiphy); - - /* flush, drop. */ - lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), true); - - /* Wake tx queues to get packet(s) out. */ - lkpi_wake_tx_queues(hw, sta, false, true); - - /* flush, no drop */ - lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), false); - - /* End mgd_complete_tx. */ - if (lsta->in_mgd) { - memset(&prep_tx_info, 0, sizeof(prep_tx_info)); - prep_tx_info.success = false; - lkpi_80211_mo_mgd_complete_tx(hw, vif, &prep_tx_info); - lsta->in_mgd = false; - } - - /* sync_rx_queues */ - lkpi_80211_mo_sync_rx_queues(hw); - - /* sta_pre_rcu_remove */ - lkpi_80211_mo_sta_pre_rcu_remove(hw, vif, sta); - - /* Take the station down. */ - - /* Adjust sta and change state (from NONE) to NOTEXIST. */ - KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); - KASSERT(lsta->state == IEEE80211_STA_NONE, ("%s: lsta %p state not " - "NONE: %#x, nstate %d arg %d\n", __func__, lsta, lsta->state, nstate, arg)); - error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_NOTEXIST); - if (error != 0) { - IMPROVE("do we need to undo the chan ctx?"); - ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(NOTEXIST) " - "failed: %d\n", __func__, __LINE__, error); - goto out; - } -#if 0 - lsta->added_to_drv = false; /* mo manages. */ -#endif - - bss_changed = 0; - vif->bss_conf.dtim_period = 0; /* go back to 0. */ - bss_changed |= BSS_CHANGED_BEACON_INFO; - lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, bss_changed); - - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - - LKPI_80211_LVIF_LOCK(lvif); - /* Remove ni reference for this cache of lsta. */ - lvif->lvif_bss = NULL; - lvif->lvif_bss_synched = false; - LKPI_80211_LVIF_UNLOCK(lvif); - lkpi_lsta_remove(lsta, lvif); - - /* conf_tx */ - - lkpi_remove_chanctx(hw, vif); - -out: - wiphy_unlock(hw->wiphy); - IEEE80211_LOCK(vap->iv_ic); - if (error == 0) { - /* - * We do this outside the wiphy lock as net80211::node_free() may call - * into crypto code to delete keys and we have a recursed on - * non-recursive sx panic. Also only do this if we get here w/o error. - * - * The very last release the reference on the ni for the ni/lsta on - * lvif->lvif_bss. Upon return from this both ni and lsta are invalid - * and potentially freed. - */ - ieee80211_free_node(ni); - } - return (error); -} - -static int -lkpi_sta_auth_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) -{ - int error; - - error = lkpi_sta_auth_to_scan(vap, nstate, arg); - if (error == 0) - error = lkpi_sta_scan_to_init(vap, nstate, arg); - return (error); -} - +/* UP3.1 */ static int lkpi_sta_auth_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { @@ -2768,18 +2643,21 @@ lkpi_sta_auth_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, in lsta->in_mgd = false; } - /* Now start assoc. */ + /* Now start assoc. unless nstate=RUN (auth_to_run). */ /* Start mgd_prepare_tx. */ - if (!lsta->in_mgd) { + if (nstate == IEEE80211_S_ASSOC && !lsta->in_mgd) { memset(&prep_tx_info, 0, sizeof(prep_tx_info)); prep_tx_info.duration = PREP_TX_INFO_DURATION; lkpi_80211_mo_mgd_prepare_tx(hw, vif, &prep_tx_info); lsta->in_mgd = true; } +#if 0 + /* We do not yet have a packet to go out. */ /* Wake tx queue to get packet out. */ lkpi_wake_tx_queues(hw, LSTA_TO_STA(lsta), false, true); +#endif /* * .. we end up in "assoc_to_run" @@ -2797,76 +2675,23 @@ out: return (error); } -/* auth_to_auth, assoc_to_assoc. */ +static int lkpi_sta_assoc_to_run(struct ieee80211vap *, enum ieee80211_state, int); + +/* UP3.2 */ static int -lkpi_sta_a_to_a(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) +lkpi_sta_auth_to_run(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { - struct lkpi_hw *lhw; - struct ieee80211_hw *hw; - struct lkpi_vif *lvif; - struct ieee80211_vif *vif; - struct lkpi_sta *lsta; - struct ieee80211_prep_tx_info prep_tx_info; int error; - lhw = vap->iv_ic->ic_softc; - hw = LHW_TO_HW(lhw); - lvif = VAP_TO_LVIF(vap); - vif = LVIF_TO_VIF(lvif); - - IEEE80211_UNLOCK(vap->iv_ic); - wiphy_lock(hw->wiphy); - - LKPI_80211_LVIF_LOCK(lvif); - /* XXX-BZ KASSERT later? */ - if (!lvif->lvif_bss_synched || lvif->lvif_bss == NULL) { -#ifdef LINUXKPI_DEBUG_80211 - ic_printf(vap->iv_ic, "%s:%d: lvif %p vap %p iv_bss %p lvif_bss %p " - "lvif_bss->ni %p synched %d\n", __func__, __LINE__, - lvif, vap, vap->iv_bss, lvif->lvif_bss, - (lvif->lvif_bss != NULL) ? lvif->lvif_bss->ni : NULL, - lvif->lvif_bss_synched); -#endif - LKPI_80211_LVIF_UNLOCK(lvif); - error = ENOTRECOVERABLE; - goto out; - } - lsta = lvif->lvif_bss; - LKPI_80211_LVIF_UNLOCK(lvif); - - KASSERT(lsta != NULL, ("%s: lsta %p! lvif %p vap %p\n", __func__, - lsta, lvif, vap)); - - IMPROVE("event callback?"); - - /* End mgd_complete_tx. */ - if (lsta->in_mgd) { - memset(&prep_tx_info, 0, sizeof(prep_tx_info)); - prep_tx_info.success = false; - lkpi_80211_mo_mgd_complete_tx(hw, vif, &prep_tx_info); - lsta->in_mgd = false; - } - - /* Now start assoc. */ - - /* Start mgd_prepare_tx. */ - if (!lsta->in_mgd) { - memset(&prep_tx_info, 0, sizeof(prep_tx_info)); - prep_tx_info.duration = PREP_TX_INFO_DURATION; - lkpi_80211_mo_mgd_prepare_tx(hw, vif, &prep_tx_info); - lsta->in_mgd = true; - } - - error = 0; -out: - wiphy_unlock(hw->wiphy); - IEEE80211_LOCK(vap->iv_ic); - + error = lkpi_sta_auth_to_assoc(vap, nstate, arg); + if (error == 0) + error = lkpi_sta_assoc_to_run(vap, nstate, arg); return (error); } +/* UP4 */ static int -_lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) +lkpi_sta_assoc_to_run(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { struct lkpi_hw *lhw; struct ieee80211_hw *hw; @@ -2888,15 +2713,19 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i wiphy_lock(hw->wiphy); LKPI_80211_LVIF_LOCK(lvif); + /* XXX-BZ KASSERT later? */ + if (!lvif->lvif_bss_synched || lvif->lvif_bss == NULL) { #ifdef LINUXKPI_DEBUG_80211 - /* XXX-BZ KASSERT later; state going down so no action. */ - if (lvif->lvif_bss == NULL) ic_printf(vap->iv_ic, "%s:%d: lvif %p vap %p iv_bss %p lvif_bss %p " "lvif_bss->ni %p synched %d\n", __func__, __LINE__, lvif, vap, vap->iv_bss, lvif->lvif_bss, (lvif->lvif_bss != NULL) ? lvif->lvif_bss->ni : NULL, lvif->lvif_bss_synched); #endif + LKPI_80211_LVIF_UNLOCK(lvif); + error = ENOTRECOVERABLE; + goto out; + } lsta = lvif->lvif_bss; LKPI_80211_LVIF_UNLOCK(lvif); KASSERT(lsta != NULL && lsta->ni != NULL, ("%s: lsta %p ni %p " @@ -2904,244 +2733,28 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lsta, (lsta != NULL) ? lsta->ni : NULL, lvif, vap)); ni = lsta->ni; /* Reference held for lvif_bss. */ - sta = LSTA_TO_STA(lsta); - - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - - /* flush, drop. */ - lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), true); - - IMPROVE("What are the proper conditions for DEAUTH_NEED_MGD_TX_PREP?"); - if (ieee80211_hw_check(hw, DEAUTH_NEED_MGD_TX_PREP) && - !lsta->in_mgd) { - memset(&prep_tx_info, 0, sizeof(prep_tx_info)); - prep_tx_info.duration = PREP_TX_INFO_DURATION; - prep_tx_info.was_assoc = true; - lkpi_80211_mo_mgd_prepare_tx(hw, vif, &prep_tx_info); - lsta->in_mgd = true; - } - wiphy_unlock(hw->wiphy); - IEEE80211_LOCK(vap->iv_ic); + IMPROVE("ponder some of this moved to ic_newassoc, scan_assoc_success, " + "and to lesser extend ieee80211_notify_node_join"); - /* Call iv_newstate first so we get potential DEAUTH packet out. */ - error = lvif->iv_newstate(vap, nstate, arg); + /* Finish assoc. (even if this is auth_to_run!) */ + /* Update sta_state (AUTH to ASSOC) and set aid. */ + KASSERT(lsta->state == IEEE80211_STA_AUTH, ("%s: lsta %p state not " + "AUTH: %#x\n", __func__, lsta, lsta->state)); + sta = LSTA_TO_STA(lsta); + sta->aid = IEEE80211_NODE_AID(ni); +#ifdef LKPI_80211_WME + if (vap->iv_flags & IEEE80211_F_WME) + sta->wme = true; +#endif + error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_ASSOC); if (error != 0) { - ic_printf(vap->iv_ic, "%s:%d: iv_newstate(%p, %d, %d) " - "failed: %d\n", __func__, __LINE__, vap, nstate, arg, error); - goto outni; + ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(ASSOC) " + "failed: %d\n", __func__, __LINE__, error); + goto out; } - IEEE80211_UNLOCK(vap->iv_ic); - - /* Ensure the packets get out. */ - lkpi_80211_flush_tx(lhw, lsta); - - wiphy_lock(hw->wiphy); - - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - - /* Wake tx queues to get packet(s) out. */ - lkpi_wake_tx_queues(hw, sta, false, true); - - /* flush, no drop */ - lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), false); - - /* End mgd_complete_tx. */ - if (lsta->in_mgd) { - memset(&prep_tx_info, 0, sizeof(prep_tx_info)); - prep_tx_info.success = false; - prep_tx_info.was_assoc = true; - lkpi_80211_mo_mgd_complete_tx(hw, vif, &prep_tx_info); - lsta->in_mgd = false; - } - - /* sync_rx_queues */ - lkpi_80211_mo_sync_rx_queues(hw); - - /* sta_pre_rcu_remove */ - lkpi_80211_mo_sta_pre_rcu_remove(hw, vif, sta); - - /* Take the station down. */ - - /* Update sta and change state (from AUTH) to NONE. */ - KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); - KASSERT(lsta->state == IEEE80211_STA_AUTH, ("%s: lsta %p state not " - "AUTH: %#x\n", __func__, lsta, lsta->state)); - error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_NONE); - if (error != 0) { - ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(NONE) " - "failed: %d\n", __func__, __LINE__, error); - goto out; - } - - /* See comment in lkpi_sta_run_to_init(). */ - bss_changed = 0; - bss_changed |= lkpi_disassoc(sta, vif, lhw); - -#ifdef LKPI_80211_HW_CRYPTO - /* - * In theory we remove keys here but there must not exist any for this - * state change until we clean them up again into small steps and no - * code duplication. - */ -#endif - - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - - /* Adjust sta and change state (from NONE) to NOTEXIST. */ - KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); - KASSERT(lsta->state == IEEE80211_STA_NONE, ("%s: lsta %p state not " - "NONE: %#x, nstate %d arg %d\n", __func__, lsta, lsta->state, nstate, arg)); - error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_NOTEXIST); - if (error != 0) { - IMPROVE("do we need to undo the chan ctx?"); - ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(NOTEXIST) " - "failed: %d\n", __func__, __LINE__, error); - goto out; - } - - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */ - - IMPROVE("Any bss_info changes to announce?"); - vif->bss_conf.qos = 0; - bss_changed |= BSS_CHANGED_QOS; - vif->cfg.ssid_len = 0; - memset(vif->cfg.ssid, '\0', sizeof(vif->cfg.ssid)); - bss_changed |= BSS_CHANGED_BSSID; - vif->bss_conf.dtim_period = 0; /* go back to 0. */ - bss_changed |= BSS_CHANGED_BEACON_INFO; - lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, bss_changed); - - LKPI_80211_LVIF_LOCK(lvif); - /* Remove ni reference for this cache of lsta. */ - lvif->lvif_bss = NULL; - lvif->lvif_bss_synched = false; - LKPI_80211_LVIF_UNLOCK(lvif); - lkpi_lsta_remove(lsta, lvif); - - /* conf_tx */ - - lkpi_remove_chanctx(hw, vif); - - error = EALREADY; -out: - wiphy_unlock(hw->wiphy); - IEEE80211_LOCK(vap->iv_ic); - if (error == EALREADY) { - /* - * We do this outside the wiphy lock as net80211::node_free() may call - * into crypto code to delete keys and we have a recursed on - * non-recursive sx panic. Also only do this if we get here w/o error. - * - * The very last release the reference on the ni for the ni/lsta on - * lvif->lvif_bss. Upon return from this both ni and lsta are invalid - * and potentially freed. - */ - ieee80211_free_node(ni); - } -outni: - return (error); -} - -static int -lkpi_sta_assoc_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) -{ - int error; - - error = _lkpi_sta_assoc_to_down(vap, nstate, arg); - if (error != 0 && error != EALREADY) - return (error); - - /* At this point iv_bss is long a new node! */ - - error |= lkpi_sta_scan_to_auth(vap, nstate, 0); - return (error); -} - -static int -lkpi_sta_assoc_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) -{ - int error; - - error = _lkpi_sta_assoc_to_down(vap, nstate, arg); - return (error); -} - -static int -lkpi_sta_assoc_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) -{ - int error; - - error = _lkpi_sta_assoc_to_down(vap, nstate, arg); - return (error); -} - -static int -lkpi_sta_assoc_to_run(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) -{ - struct lkpi_hw *lhw; - struct ieee80211_hw *hw; - struct lkpi_vif *lvif; - struct ieee80211_vif *vif; - struct ieee80211_node *ni; - struct lkpi_sta *lsta; - struct ieee80211_sta *sta; - struct ieee80211_prep_tx_info prep_tx_info; - enum ieee80211_bss_changed bss_changed; - int error; - - lhw = vap->iv_ic->ic_softc; - hw = LHW_TO_HW(lhw); - lvif = VAP_TO_LVIF(vap); - vif = LVIF_TO_VIF(lvif); - - IEEE80211_UNLOCK(vap->iv_ic); - wiphy_lock(hw->wiphy); - - LKPI_80211_LVIF_LOCK(lvif); - /* XXX-BZ KASSERT later? */ - if (!lvif->lvif_bss_synched || lvif->lvif_bss == NULL) { -#ifdef LINUXKPI_DEBUG_80211 - ic_printf(vap->iv_ic, "%s:%d: lvif %p vap %p iv_bss %p lvif_bss %p " - "lvif_bss->ni %p synched %d\n", __func__, __LINE__, - lvif, vap, vap->iv_bss, lvif->lvif_bss, - (lvif->lvif_bss != NULL) ? lvif->lvif_bss->ni : NULL, - lvif->lvif_bss_synched); -#endif - LKPI_80211_LVIF_UNLOCK(lvif); - error = ENOTRECOVERABLE; - goto out; - } - lsta = lvif->lvif_bss; - LKPI_80211_LVIF_UNLOCK(lvif); - KASSERT(lsta != NULL && lsta->ni != NULL, ("%s: lsta %p ni %p " - "lvif %p vap %p\n", __func__, - lsta, (lsta != NULL) ? lsta->ni : NULL, lvif, vap)); - - ni = lsta->ni; /* Reference held for lvif_bss. */ - - IMPROVE("ponder some of this moved to ic_newassoc, scan_assoc_success, " - "and to lesser extend ieee80211_notify_node_join"); - - /* Finish assoc. */ - /* Update sta_state (AUTH to ASSOC) and set aid. */ - KASSERT(lsta->state == IEEE80211_STA_AUTH, ("%s: lsta %p state not " - "AUTH: %#x\n", __func__, lsta, lsta->state)); - sta = LSTA_TO_STA(lsta); - sta->aid = IEEE80211_NODE_AID(ni); -#ifdef LKPI_80211_WME - if (vap->iv_flags & IEEE80211_F_WME) - sta->wme = true; -#endif - error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_ASSOC); - if (error != 0) { - ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(ASSOC) " - "failed: %d\n", __func__, __LINE__, error); - goto out; - } - - IMPROVE("wme / conf_tx [all]"); + IMPROVE("wme / conf_tx [all]"); /* Update bss info (bss_info_changed) (assoc, aid, ..). */ bss_changed = 0; @@ -3180,7 +2793,7 @@ lkpi_sta_assoc_to_run(struct ieee80211vap *vap, enum ieee80211_state nstate, int * - event_callback */ - /* End mgd_complete_tx. */ + /* End mgd_complete_tx. (we do not have to check ostate == IEEE80211_S_ASSOC). */ if (lsta->in_mgd) { memset(&prep_tx_info, 0, sizeof(prep_tx_info)); prep_tx_info.success = true; @@ -3243,17 +2856,11 @@ out: return (error); } -static int -lkpi_sta_auth_to_run(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) -{ - int error; - - error = lkpi_sta_auth_to_assoc(vap, nstate, arg); - if (error == 0) - error = lkpi_sta_assoc_to_run(vap, nstate, arg); - return (error); -} - +/* + * DOWN1 + * "to assoc" means we are going back to State 2 from State 4[/3]. + * This means ni still is authenticated, so we keep sta, chanctx, .. + */ static int lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { @@ -3276,6 +2883,9 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int lvif = VAP_TO_LVIF(vap); vif = LVIF_TO_VIF(lvif); + IEEE80211_UNLOCK(vap->iv_ic); + wiphy_lock(hw->wiphy); + LKPI_80211_LVIF_LOCK(lvif); #ifdef LINUXKPI_DEBUG_80211 /* XXX-BZ KASSERT later; state going down so no action. */ @@ -3297,9 +2907,6 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - IEEE80211_UNLOCK(vap->iv_ic); - wiphy_lock(hw->wiphy); - /* flush, drop. */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), true); @@ -3316,7 +2923,7 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int wiphy_unlock(hw->wiphy); IEEE80211_LOCK(vap->iv_ic); - /* Call iv_newstate first so we get potential DISASSOC packet out. */ + /* Call iv_newstate first so we get potential (RE-)ASSOC/DEAUTH? packet out. */ error = lvif->iv_newstate(vap, nstate, arg); if (error != 0) { ic_printf(vap->iv_ic, "%s:%d: iv_newstate(%p, %d, %d) " @@ -3363,7 +2970,7 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_80211_mo_sync_rx_queues(hw); /* sta_pre_rcu_remove */ - lkpi_80211_mo_sta_pre_rcu_remove(hw, vif, sta); + lkpi_80211_mo_sta_pre_rcu_remove(hw, vif, sta); #endif /* Take the station down. */ @@ -3412,6 +3019,7 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int #if 0 /* Update bss info (bss_info_changed) (assoc, aid, ..). */ + /* See comment in DOWN4. */ lkpi_disassoc(sta, vif, lhw); #endif @@ -3423,8 +3031,15 @@ outni: return (error); } +/* + * DOWN2 + * We are in state 2 and go back to state 1 and will try to auth again + * (to IEEE80211_S_AUTH in FreeBSD means "try to auth"). This should be + * like scan_to_auth but that we keep the "ni" and with that chanctx/bssid, + * which essentially makes this "a_to_a" in LinuxKPI. + */ static int -lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) +lkpi_sta_assoc_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { struct lkpi_hw *lhw; struct ieee80211_hw *hw; @@ -3432,10 +3047,6 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int struct ieee80211_vif *vif; struct ieee80211_node *ni; struct lkpi_sta *lsta; - struct ieee80211_sta *sta; - struct ieee80211_prep_tx_info prep_tx_info; - enum ieee80211_bss_changed bss_changed; - struct ieee80211_rx_ampdu *rap; int error; lhw = vap->iv_ic->ic_softc; @@ -3463,53 +3074,81 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lsta, (lsta != NULL) ? lsta->ni : NULL, lvif, vap)); ni = lsta->ni; /* Reference held for lvif_bss. */ - sta = LSTA_TO_STA(lsta); lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - /* flush, drop. */ - lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), true); - - IMPROVE("What are the proper conditions for DEAUTH_NEED_MGD_TX_PREP?"); - if (ieee80211_hw_check(hw, DEAUTH_NEED_MGD_TX_PREP) && - !lsta->in_mgd) { - memset(&prep_tx_info, 0, sizeof(prep_tx_info)); - prep_tx_info.duration = PREP_TX_INFO_DURATION; - prep_tx_info.was_assoc = true; - lkpi_80211_mo_mgd_prepare_tx(hw, vif, &prep_tx_info); - lsta->in_mgd = true; + /* Take the station down. */ + /* Update sta_state (AUTH to NONE). */ + KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); + KASSERT(lsta->state == IEEE80211_STA_AUTH, ("%s: lsta %p state not " + "AUTH: %#x\n", __func__, lsta, lsta->state)); + error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_NONE); + if (error != 0) { + ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(NONE) " + "failed: %d\n", __func__, __LINE__, error); + goto out; } + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); + +out: wiphy_unlock(hw->wiphy); IEEE80211_LOCK(vap->iv_ic); + return (error); +} - /* Call iv_newstate first so we get potential DISASSOC packet out. */ - error = lvif->iv_newstate(vap, nstate, arg); - if (error != 0) { - ic_printf(vap->iv_ic, "%s:%d: iv_newstate(%p, %d, %d) " - "failed: %d\n", __func__, __LINE__, vap, nstate, arg, error); - goto outni; - } - - /* Stop any BA sessions if still active. */ - for (int rapn = 0; rapn < WME_NUM_TID; rapn++) { - rap = &ni->ni_rx_ampdu[rapn]; - - if ((rap->rxa_flags & IEEE80211_AGGR_RUNNING) == 0) - continue; +/* + * DOWN3 + * We are in state 1. Either auth timed out (arg != 0) or we have an internal + * state change forcing us to give up trying to authenticate. + * Cleanup and remove chanctx, sta, ... + */ +static int +lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) +{ + struct lkpi_hw *lhw; + struct ieee80211_hw *hw; + struct lkpi_vif *lvif; + struct ieee80211_vif *vif; + struct ieee80211_node *ni; + struct lkpi_sta *lsta; + struct ieee80211_sta *sta; + struct ieee80211_prep_tx_info prep_tx_info; + enum ieee80211_bss_changed bss_changed; + int error; - vap->iv_ic->ic_ampdu_rx_stop(ni, rap); - } + lhw = vap->iv_ic->ic_softc; + hw = LHW_TO_HW(lhw); + lvif = VAP_TO_LVIF(vap); + vif = LVIF_TO_VIF(lvif); IEEE80211_UNLOCK(vap->iv_ic); + wiphy_lock(hw->wiphy); - /* Ensure the packets get out. */ - lkpi_80211_flush_tx(lhw, lsta); + LKPI_80211_LVIF_LOCK(lvif); +#ifdef LINUXKPI_DEBUG_80211 + /* XXX-BZ KASSERT later; state going down so no action. */ + if (lvif->lvif_bss == NULL) + ic_printf(vap->iv_ic, "%s:%d: lvif %p vap %p iv_bss %p lvif_bss %p " + "lvif_bss->ni %p synched %d\n", __func__, __LINE__, + lvif, vap, vap->iv_bss, lvif->lvif_bss, + (lvif->lvif_bss != NULL) ? lvif->lvif_bss->ni : NULL, + lvif->lvif_bss_synched); +#endif - wiphy_lock(hw->wiphy); + lsta = lvif->lvif_bss; + LKPI_80211_LVIF_UNLOCK(lvif); + KASSERT(lsta != NULL && lsta->ni != NULL, ("%s: lsta %p ni %p " + "lvif %p vap %p\n", __func__, + lsta, (lsta != NULL) ? lsta->ni : NULL, lvif, vap)); + ni = lsta->ni; /* Reference held for lvif_bss. */ + sta = LSTA_TO_STA(lsta); lkpi_lsta_dump(lsta, ni, __func__, __LINE__); + /* flush, drop. */ + lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), true); + /* Wake tx queues to get packet(s) out. */ lkpi_wake_tx_queues(hw, sta, false, true); @@ -3520,7 +3159,6 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int if (lsta->in_mgd) { memset(&prep_tx_info, 0, sizeof(prep_tx_info)); prep_tx_info.success = false; - prep_tx_info.was_assoc = true; lkpi_80211_mo_mgd_complete_tx(hw, vif, &prep_tx_info); lsta->in_mgd = false; } @@ -3528,36 +3166,8 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* sync_rx_queues */ lkpi_80211_mo_sync_rx_queues(hw); - /* sta_pre_rcu_remove */ - lkpi_80211_mo_sta_pre_rcu_remove(hw, vif, sta); - - /* Take the station down. */ - - /* Adjust sta and change state (from AUTHORIZED) to ASSOC. */ - KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); - KASSERT(lsta->state == IEEE80211_STA_AUTHORIZED, ("%s: lsta %p state not " - "AUTHORIZED: %#x\n", __func__, lsta, lsta->state)); - error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_ASSOC); - if (error != 0) { - ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(ASSOC) " - "failed: %d\n", __func__, __LINE__, error); - goto out; - } - - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - #ifdef LKPI_80211_HW_CRYPTO if (lkpi_hwcrypto) { - /* - * In theory we only need to do this if we changed assoc. - * If we were not assoc, there should be no keys and we - * should not be here. - */ -#ifdef notyet - KASSERT((bss_changed & BSS_CHANGED_ASSOC) != 0, ("%s: " - "trying to remove keys but were not assoc: %#010jx, lvif %p\n", - __func__, (uintmax_t)bss_changed, lvif)); -#endif error = lkpi_sta_del_keys(hw, vif, lsta); if (error != 0) { ic_printf(vap->iv_ic, "%s:%d: lkpi_sta_del_keys " @@ -3572,29 +3182,12 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int } #endif - /* Update sta_state (ASSOC to AUTH). */ - KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); - KASSERT(lsta->state == IEEE80211_STA_ASSOC, ("%s: lsta %p state not " - "ASSOC: %#x\n", __func__, lsta, lsta->state)); - error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_AUTH); - if (error != 0) { - ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(AUTH) " - "failed: %d\n", __func__, __LINE__, error); - goto out; - } + /* sta_pre_rcu_remove */ + lkpi_80211_mo_sta_pre_rcu_remove(hw, vif, sta); - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); + synchronize_net(); - /* Update sta and change state (from AUTH) to NONE. */ - KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); - KASSERT(lsta->state == IEEE80211_STA_AUTH, ("%s: lsta %p state not " - "AUTH: %#x\n", __func__, lsta, lsta->state)); - error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_NONE); - if (error != 0) { - ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(NONE) " - "failed: %d\n", __func__, __LINE__, error); - goto out; - } + /* Take the station down. */ bss_changed = 0; /* @@ -3641,16 +3234,15 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_lsta_remove(lsta, lvif); - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */ + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); IMPROVE("Any bss_info changes to announce?"); - vif->bss_conf.qos = 0; + vif->bss_conf.qos = false; bss_changed |= BSS_CHANGED_QOS; vif->cfg.ssid_len = 0; memset(vif->cfg.ssid, '\0', sizeof(vif->cfg.ssid)); bss_changed |= BSS_CHANGED_BSSID; vif->bss_conf.use_short_preamble = false; - vif->bss_conf.qos = false; /* XXX BSS_CHANGED_???? */ vif->bss_conf.dtim_period = 0; /* go back to 0. */ bss_changed |= BSS_CHANGED_BEACON_INFO; @@ -3666,11 +3258,10 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_remove_chanctx(hw, vif); - error = EALREADY; out: wiphy_unlock(hw->wiphy); IEEE80211_LOCK(vap->iv_ic); - if (error == EALREADY) { + if (error == 0) { /* * We do this outside the wiphy lock as net80211::node_free() may call * into crypto code to delete keys and we have a recursed on @@ -3682,15 +3273,148 @@ out: */ ieee80211_free_node(ni); } -outni: + return (error); +} + +/* DOWN4 */ +static int +lkpi_sta_scan_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) +{ + /* lkpi_iv_newstate() handles the stop scan case in common code. */ + return (lkpi_sta_state_do_nada(vap, nstate, arg)); +} + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +static int +lkpi_sta_auth_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) +{ + int error; + + error = lkpi_sta_auth_to_scan(vap, nstate, arg); + if (error == 0) + error = lkpi_sta_scan_to_init(vap, nstate, arg); + return (error); +} + +/* auth_to_auth, assoc_to_assoc. */ +static int +lkpi_sta_a_to_a(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) +{ + struct lkpi_hw *lhw; + struct ieee80211_hw *hw; + struct lkpi_vif *lvif; + struct ieee80211_vif *vif; + struct lkpi_sta *lsta; + struct ieee80211_prep_tx_info prep_tx_info; + int error; + + lhw = vap->iv_ic->ic_softc; + hw = LHW_TO_HW(lhw); + lvif = VAP_TO_LVIF(vap); + vif = LVIF_TO_VIF(lvif); + *** 160 LINES SKIPPED *** From nobody Wed Feb 25 04:25:07 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLM2J610tz6TrgS for ; Wed, 25 Feb 2026 04:25:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLM2J3QCXz3vqK for ; Wed, 25 Feb 2026 04:25:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771993512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EC29ckDPI04GHrlLySplJ9oiru0ypC7LNFvnTsnJu7w=; b=hhZoo4SkVCY+ACyBqY6D4gy4DIbXhAtTbOfXRXg0cCkKMpdP3C7KSjrYRZ5rVUROl7US9X hOdPvRwHPYJJ/NhBOAXaK7fWbdWF2QFUP6XegcAp4YseRgYhum/8Di0WTdPnKJGtxjTMbp UHvKfEJ8QPqqHvacNFQWvQ9eLq8b80m8eeMC9fk795X5YJa2VefQHXisWt5TWGKgByWKFe OSzLGQJi6v7fOxBs/3EqfijjTXJB4h9lzJK0fbtoSOHcIH0QYASmxXImDx33NiZWGAluJ+ fiRDJdyZSoQjoFF/CdyW0Qkw0HX94fw1gxYddgaTwMHgOvShvsa3WWXXkfBjZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771993512; a=rsa-sha256; cv=none; b=ZU1Ld/M0G/dY3JAraQ3EAtukpMag881r6owNi1klL9G/DcYWHufBpASng8gmZGVYIRVSGj BaWqflWFV5gFYWEKmA16UCV0RoS8mllv+rvH9OdPfj0UnwSBiljrg0lQ+LOJXxOzKGzhcN TXD6SLHjRQulLeAHMnWgrtTsp8+JFmFFnz0LP+RCZB51BlLiEsMEfe6qPkxvthEGuiYag7 CPRUeVKpaz0N4ltMB4HPsIYCrSZo+Y1jj3UZBRq5bwRYcNkoFZUQXmnXLmUKNamYfC2Art X4H0UcPXgrhSu8m/AJKwA+bbeY8wYJy5DvtUYBzWFA6+19Jc8fIeOXj1kdNUMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771993512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EC29ckDPI04GHrlLySplJ9oiru0ypC7LNFvnTsnJu7w=; b=K/Aw0Fh6oXI+O8q+x4G+AP/F4kBDt2OjMMAYTX/B5g6TRcg6fH6XlcoDkabCFeGkmUYiTd clP3Z+DY1SrQ5tk26Myf4vyhB5ggaMkE2XjUu00Kn0HDLPlBcNJV2HkaG1Z4lXIUzMN56+ l1z2+mkihJs8QAz2zzi+FXEOtuxpsB5l/vsGk7PsLToEfglAlMun8ploFXcO6/DFxYIBHf Y5q86v55UDsHwlIgUHoqrAonqdgKLZSQsJl8hdTTE72Sxo4uF+1uJN88eakGd5sRGIBZ/K DDN5yCsE6r+nHgxsRmQJk1/Hc2iYi9q5Vf2ZsVVw4KvBolkQuIfAa9ZVGxVUCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLM2J23tTzm0L for ; Wed, 25 Feb 2026 04:25:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36520 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 04:25:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 96a57fc4bf4e - main - LinuxKPI: 802.11: adjust assoc check before key deletion List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 96a57fc4bf4edca9a579cc47f9058253c11f8313 Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 04:25:07 +0000 Message-Id: <699e79a3.36520.36b4b94a@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=96a57fc4bf4edca9a579cc47f9058253c11f8313 commit 96a57fc4bf4edca9a579cc47f9058253c11f8313 Author: Bjoern A. Zeeb AuthorDate: 2026-02-24 23:51:43 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-25 04:24:50 +0000 LinuxKPI: 802.11: adjust assoc check before key deletion There is a discrepancy between the vif assoc state and the sta state (see comment in lkpi_sta_run_to_init()). Adjust the check in lkpi_iv_key_delete() and add it to lkpi_sta_del_keys() so that we can take way the keys after whatever comes first: the sta went away from AUTHORIZED (RUN) or if the vif is no longer marked assoc. This is needed as we may only take the sta down partially back to State 2 (cf. 802.11-2024, Figure 11-23) and key material is no longer valid before the vif gets cleaned up and the sta is removed entirely. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/src/linux_80211.c | 30 +++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index e80cf9436b3a..550bd417c529 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1373,6 +1373,15 @@ lkpi_sta_del_keys(struct ieee80211_hw *hw, struct ieee80211_vif *vif, return (0); lockdep_assert_wiphy(hw->wiphy); + + if (vif->cfg.assoc && lsta->state == IEEE80211_STA_AUTHORIZED) { + if (linuxkpi_debug_80211 & D80211_TRACE_HW_CRYPTO) + ic_printf(lsta->ni->ni_ic, + "%d %lu %s: vif still assoc; not deleting keys\n", + curthread->td_tid, jiffies, __func__); + return (0); + } + ieee80211_ref_node(lsta->ni); error = 0; @@ -1452,6 +1461,15 @@ lkpi_iv_key_delete(struct ieee80211vap *vap, const struct ieee80211_key *k) */ lockdep_assert_wiphy(hw->wiphy); + ni = ieee80211_ref_node(vap->iv_bss); + lsta = ni->ni_drv_data; + if (lsta == NULL) { + ic_printf(ic, "%s: ni %p (%6D) with lsta NULL\n", + __func__, ni, ni->ni_bssid, ":"); + ieee80211_free_node(ni); + return (0); + } + /* * While we are assoc we may still send packets. We cannot delete the * keys as otherwise packets could go out unencrypted. Some firmware @@ -1462,30 +1480,24 @@ lkpi_iv_key_delete(struct ieee80211vap *vap, const struct ieee80211_key *k) * How to test: run 800Mbit/s UDP traffic and during that restart your * supplicant. You want to survive that. */ - if (vif->cfg.assoc) { + if (vif->cfg.assoc && lsta->state == IEEE80211_STA_AUTHORIZED) { if (linuxkpi_debug_80211 & D80211_TRACE_HW_CRYPTO) ic_printf(ic, "%d %lu %s: vif still assoc; not deleting keys\n", curthread->td_tid, jiffies, __func__); + ieee80211_free_node(ni); return (0); } if (IEEE80211_KEY_UNDEFINED(k)) { ic_printf(ic, "%s: vap %p key %p is undefined: %p %u\n", __func__, vap, k, k->wk_cipher, k->wk_keyix); + ieee80211_free_node(ni); return (0); } if (vap->iv_bss == NULL) { ic_printf(ic, "%s: iv_bss %p for vap %p is NULL\n", __func__, vap->iv_bss, vap); - return (0); - } - - ni = ieee80211_ref_node(vap->iv_bss); - lsta = ni->ni_drv_data; - if (lsta == NULL) { - ic_printf(ic, "%s: ni %p (%6D) with lsta NULL\n", - __func__, ni, ni->ni_bssid, ":"); ieee80211_free_node(ni); return (0); } From nobody Wed Feb 25 05:29:20 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLNSJ2Vsfz6SVVy for ; Wed, 25 Feb 2026 05: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLNSJ1n2vz43LN for ; Wed, 25 Feb 2026 05: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=1771997360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CYxdrt3i0EJpZhZ92PZmWmJQ55vl0MQHXumDzUrxSK4=; b=wu/QgkrsgHC8tew2bctvMpL8c6p4PXvgEMSW0owiM5ieInCx9n3E6MbucUMbiI5xv/8B0W 1ayahIkxpqM7HRQCkZ4bvUsRLK1WiwIB2nKeLoinrJrBGEkQo7dKdm2lxyW7Pz+iz2Ggz4 tDOIn4959lchXH8Olg3ilfWhfx+AT9Q+lx5w41QRPkIXZ7QoOwa3WnG3IgC73qJseU+l4Z q2Rg4To/7foDZybadIrUqI20MwXy/t0rp0DXZ7HwXrCDUn6PUc1rPuW31WQh5EtTq/2Exw 3Qt/k2wTkgQsIsoXiRzP2LLRzclJmCOjS9jtd1DgxK1YrvTHo0kX4kb+O7Fwbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771997360; a=rsa-sha256; cv=none; b=vAPnOIiGxBufcZSaI/pbkbilN1pkz6+vvrgj7Xtb2Q/8EKb7JnUql4yvq7qifrcJvnhqnm 7qdEbDbwpxMGIhKCyckIdH6Va9rY2sE0M701lllGmLv5WcdysXp1CFcMtrkwf+J4pdBGi7 r9lsVM1ikO3t6Y83JkKVibL1k+jETjvL/2vyvnyscZJknXT2VJEIAYbvU2uZ8DFgoQWu0/ ULEOkjvW3Ru42BC9h3Go3xSvWyHruhlJMZhdiBOvoc3wHKgsIjhYYxkjN94Afh1HQfw/yH lQAcqmBaL4Ssy9tU3agzzo3sx8mNPzcSZ83SGdKVdNGzp3+IyqG3zcvAuVSdPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771997360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CYxdrt3i0EJpZhZ92PZmWmJQ55vl0MQHXumDzUrxSK4=; b=XQd0xVHc0nenW3WdNJR/enfnolEBdtqUtXVQSoqOFr+oDUCqdtzP+v97odUFEBii26JTol vMlUUZHuASGNrDfoL1ddeREnXRCPHznUNgXolmr590lYKChCw6QtF6hqatNqZjs+shrHTi cxEaJqq1zkuHQF/woeVNk7NNG018dpD9HnTrpTPXgEGNIcbgqcI+Emehb97fQwM60q5KJi 24Bu/n8s8hjdb4Usp/BwH73XXSbm/k3Ej0bF2PTAfXBcXc0xps6kOHqbPvL09ikEx/PqdM W1NozGPRSEnyl6yGWZJZ0EG/ZHzcEW+3LPkOoy3y0O8bZQsye6JKwRpsQgAg+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 4fLNSJ1Jl0zpTC for ; Wed, 25 Feb 2026 05:29:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c9df by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 05:29:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Stephen J. Kiernan From: Ka Ho Ng Subject: git: de773bcc2ffb - main - Use NO_SHARED instead of explicitly using -static flag List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: de773bcc2ffb8472f68283985bf4b7b698c57914 Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 05:29:20 +0000 Message-Id: <699e88b0.3c9df.43dfb219@gitrepo.freebsd.org> The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=de773bcc2ffb8472f68283985bf4b7b698c57914 commit de773bcc2ffb8472f68283985bf4b7b698c57914 Author: Stephen J. Kiernan AuthorDate: 2026-02-25 05:25:08 +0000 Commit: Ka Ho Ng CommitDate: 2026-02-25 05:29:04 +0000 Use NO_SHARED instead of explicitly using -static flag NO_SHARED is the proper way to declare linking a program without shared libraries. Obtained from: Hewlett Packard Enterprise MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D44761 --- tools/tools/syscall_timing/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/tools/syscall_timing/Makefile b/tools/tools/syscall_timing/Makefile index e33148eee2e9..2c6a7d8dc371 100644 --- a/tools/tools/syscall_timing/Makefile +++ b/tools/tools/syscall_timing/Makefile @@ -2,7 +2,8 @@ # PROG= syscall_timing -CFLAGS+= -static -O +CFLAGS+= -O +NO_SHARED= MAN= #LIBADD= pthread From nobody Wed Feb 25 05:38:55 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLNgT3gkXz6SWwv for ; Wed, 25 Feb 2026 05:39:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLNgT1hQTz44ZP for ; Wed, 25 Feb 2026 05:39:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771997941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uWSRt71mf3+vkb2Gfgzwb8T4DieaOjwVGVD4P+ekPpk=; b=qba4DE47KcxyF2OLLT2oCFUR/kAH2WkOwlC6NmhnXSLaPh2CPO6ZaZq3hlmXXzGOssX4zJ TLB3FjeKOkqYQ78tjiV1HRscuJRsuX+ye0HSJbad3lBCxNRVQXr1i7yuG+1kApDZvf906h bsTj/8ri6AQljc7CSeUn516zwoyA7cJA0x+JivvOCEdqkCTmP9Q5WtS+2HODgAdM/CN8En SpHkX+xFg9riX3P0OmLQxmOvbzRLa6XyVRLIZsz/uTdMmEAwWj0gLk63KG6Dd/kNwzzXyE Rc8HYNpnrvSyFGn2qGIW17Kz0Bv+XvygLIhfFiGnTKwePRUjzFmUNg1OKl7pLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771997941; a=rsa-sha256; cv=none; b=TrazVhTh1CBvo9a9IV+BPaxSliKsIe4GrhRsJxSf7CD90yD7SWeVKY8vqR4rZzjzjKLENH y/z/0kv4LV+pUKcjUAq7q0NsJOiSAi8bDS+zt3s1t4KwYUnhOAfDj2GQxhqfCiR8EoJd3D c44CLBFM91Wsf5g6OakBd+mbqxNEqcM/cIgeEikOvnDz+e9kcOrqY4kQNk6MrXvEQKMTZw L9wBfjYOfDoKKQO911PWLaHxUynT5ueOSKp7RTKUQgqRIBTVmpewUNVpfNyB4A6QBd4Pd6 jTHxGE4DAGGdhqE1M+qubQ1vdh5HtTFEdP5u9wc5Ley/Dvz4GT7mcxJUIiC02g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771997941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uWSRt71mf3+vkb2Gfgzwb8T4DieaOjwVGVD4P+ekPpk=; b=wsGEMqt1I1rkTvjEJ4m77LvCPRCW6qPPUuZAl4vL/8Ev8eKiKkfEUtbdL/dyatYrCRK1HU XhJIM/hx7OyEWPWtwNbg7odAm7u3l7vicbcI5KSgKz6AdmX5VTABL/xuUbtw7jbBK34kJG OdL700oPeCjpW4VNboIhDHNHZ/47yvciW5BiME5ILE0cdSM5Sc7q7BX47oi/m5AtlNHF+4 LCN8UATiXdUNRdzbsQFmUQ9G36wKKk7Z3u5VSYO1Um3+7Y8F01IXhdgKFSE194TRcIR+Dp WOs/sLaaLb5TuN8prO6XBCVk5FovFzsKaeDJM3UcUHFav+Wl9iO4fZ/aGNU3dg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLNgT1120zpfx for ; Wed, 25 Feb 2026 05:39:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d121 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 05:38:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: 0ac5cddebe1e - main - syscall_timing: add Makefile.depend List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0ac5cddebe1e98d7d29493f0e6e829021be7fcef Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 05:38:55 +0000 Message-Id: <699e8aef.3d121.5b48eca1@gitrepo.freebsd.org> The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=0ac5cddebe1e98d7d29493f0e6e829021be7fcef commit 0ac5cddebe1e98d7d29493f0e6e829021be7fcef Author: Ka Ho Ng AuthorDate: 2026-02-25 05:33:34 +0000 Commit: Ka Ho Ng CommitDate: 2026-02-25 05:38:40 +0000 syscall_timing: add Makefile.depend This was part of review D44761. It was separated into another commit for better clarity. Obtained from: Hewlett Packard Enterprise MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D44761 --- tools/tools/syscall_timing/Makefile.depend | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tools/tools/syscall_timing/Makefile.depend b/tools/tools/syscall_timing/Makefile.depend new file mode 100644 index 000000000000..c6d60673577c --- /dev/null +++ b/tools/tools/syscall_timing/Makefile.depend @@ -0,0 +1,13 @@ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/xlocale \ + lib/libc \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif From nobody Wed Feb 25 05:59:44 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLP7V0VMfz6SYxF for ; Wed, 25 Feb 2026 05:59:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLP7V08hdz46bm for ; Wed, 25 Feb 2026 05:59:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771999190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ioJvxiXfY9A4/RTOIPZRHy6Rt1k0Qbv8F64HXSmVTxU=; b=ujTjySjDRKxpcxOyt9xLinY5Sm/KjFCMwWvlVZPNz9TStLuPAa7+CWWsrVS3/Tl+KsTsJo z8ytsju9xMg87mWtUbTudx3Tf1RwQ/oO2MSNhoV3Pd8q2ywcVTK4HoF4bdIoIImeEFTrwx q2SeRgan8oeX1a95zQZouv01W/91EEMbNJM8dukmpkJiYGKF/k4GjC5qCWlcOI+pWLV9C6 0UNbGQxoW3CyVb7g1aO6xInr4gr8NSZcQeYAqkcHjc8n5/tjduI1AQIdvOVcw5m8RTEfvl GqO1sjIYGI1vysP91WP7g2/3ykwm1B6Ts0Z+s06jtWAfGeX2yOWu67pUHBuPrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771999190; a=rsa-sha256; cv=none; b=X6QEvbpYZJBXGf44p7tRJolZcqgLJm4hfI6ARskCUZ6OdbKpX5JeaEs4I4gvAMe+Ddmfig hNnBHb7jXhdGIRJ0Kh0X+RqHTKeWKt/iXRaKa0/NQfcecxH9GckhthtRmSkyS+iLSxprCL 2UexZzkbubF8WM6fvVEi+D8pgJoPEeZDDNuThP4Bglka+hI7/DepSgwjSJlj+gY3z+bHP5 S+s9HGsX/XxQ7csOjCmBw64/wBZ+EWwRIWO3RXuyvpZ5jGa7NFuyIEJjTiyk1yPXCA4oeT yQORHiBFmNTjiwTL8cYmJRFc96Y8yScVhRg+MTGHdeOUnPZT8Aqdhd8JzB5xlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771999190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ioJvxiXfY9A4/RTOIPZRHy6Rt1k0Qbv8F64HXSmVTxU=; b=h6HGbBiexpV9mV+P+jbwwcyNi+UG+eooa1OEwEwhrA1M1G+rAXsqWpKDAR6CPy5ixraDCc HuP5Ize02d8MK08ILViel8ROLQ+m0lHGULxvAHduVBQ5gvYaSsYXPTmH5hlUq/GFHzXycz j8b2Fha7oHOe66uluJK8ZNU+wuIlMufblMpKMONUC4N1uTbuBDZ6fkbeIaW9kNENqk8mjo W28vrfxtH1QkvjfQMmS34pibK0TwYyar2Rm3fd7ivvr4RIKFuiL3gUXuLkTL1amPAZCfSV iwvNL8UQlXpvQQad/OECYqXrCrcDCRYZMfXJ0MBmYyGKi7Owj6hkcco2yvPrJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLP7T6dL3zq8Z for ; Wed, 25 Feb 2026 05:59:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fabd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 05:59:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: 0fc6c3f731a2 - main - chore: replace {0, 0} with {DEV,KOBJ}METHOD_END List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 0fc6c3f731a2cca3120798806c330a3081c9424b Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 05:59:44 +0000 Message-Id: <699e8fd0.3fabd.7365965c@gitrepo.freebsd.org> The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=0fc6c3f731a2cca3120798806c330a3081c9424b commit 0fc6c3f731a2cca3120798806c330a3081c9424b Author: Enji Cooper AuthorDate: 2026-02-21 06:14:46 +0000 Commit: Enji Cooper CommitDate: 2026-02-25 05:59:34 +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 --- 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/nvd/nvd.c | 2 +- sys/dev/nvme/nvme_ahci.c | 2 +- sys/dev/nvme/nvme_pci.c | 2 +- sys/dev/nvme/nvme_sim.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 | 3 ++- 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 +- 186 files changed, 208 insertions(+), 207 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 371eac691916..fa98d6f56a3a 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 084b57331dd9..dd7ad7d5e66d 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -534,7 +534,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 062c5fc491e8..fe8bbf0c8d75 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 ecbe4d997278..cb0ad2342e7c 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -128,7 +128,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", @@ -144,7 +144,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 34b29ad6e236..330db7b89715 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 35016073ba0e..89bf802e0067 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), DEVMETHOD(device_detach, mx25l_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t mx25l_driver = { diff --git a/sys/dev/flash/n25q.c b/sys/dev/flash/n25q.c index 95d005125930..495649357bf1 100644 *** 1760 LINES SKIPPED *** From nobody Wed Feb 25 06:22:56 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLPfR31cXz6ScRs for ; Wed, 25 Feb 2026 06:23:11 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLPfR0PKJz3CY1 for ; Wed, 25 Feb 2026 06:23:10 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-824a9348603so2591382b3a.2 for ; Tue, 24 Feb 2026 22:23:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772000589; x=1772605389; darn=freebsd.org; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=IcdZiYI2qFTtonIAFGMm6YjYnrEMwg5pce4IEpGv+5I=; b=GoZz2Q0dHuwxCMkF4LhLNOC+xhvNbWW6BW/rtyMlneiJxwOv84TjK57c/J9GSMe++r 37f7ZxzEem4F7U0WNyDPWZ3YDLak6V7NlMJvzd3k4Tej+dWQulOp4aCXo4trMONBl2Zh 7xEFSkTEtjA+WZ4GzUMDMwAwfoFMvnO0yRo7ZQSIcSTNQZ0PHLpI0ArZj1aTkcjHPtUk a41jam8Zkc7RmoV7KEJN9Aom3T/UtHrF+Y4WlB/kBYL/eNVH22GQHiZYnvJi6zxJcfMp v7b1GdykB1vJ3LkGnZGH06A/iRdC7vvHiCSqd0Bg7SEWRXVlgmBW4bS51eSR4kO3IQqU KFcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772000589; x=1772605389; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=IcdZiYI2qFTtonIAFGMm6YjYnrEMwg5pce4IEpGv+5I=; b=cdf9kU+/mnSvYmHFADB2x6cxvwxGOO0hPoNAJO7vmY7aUCs4hlHv3R56zVy98rVr9k Qgr08gi5xnMzerlWNZcAPBkjs/1L0v91efVRLjFASfFR01p4gyvP76qApBnBAzfJR+9s CrFIUr5aDgJVEJoJ3klVn0FMvnAfyF44ZngUp3H6t5/G8GpKWvpiRGNMjxJ5Ov3LWr1u yYl8++vIsPXa1bL6d9zPGMd2pzKo0kRzH3pUXpWhgcQOtyLwxoEX5zgaeV0OHHyhuU2C 1kv/dWv6mGZ58tAti7SQ/KcDn8Fgx9qW/VgsFSVBLyxhM40rGF6Thr8nN9zxbMPisygH 3Vkg== X-Forwarded-Encrypted: i=1; AJvYcCUvyiC+KwbMqavI7qlx7B2zAEHOcNd3TOqEJTsFFXGgb5lZhkI04kZ9b6rrsOz1OsA0RUSZWk/c5KrSo/fF5ok9iZ8F@freebsd.org X-Gm-Message-State: AOJu0Yz4UHKIcJlyKhfZZyHQe05x6B3797DF4OsOdzFB0NVVmXUSHsQ/ n5Fzo26u2VUalMnKhbzQsDeYOmUYOKb8KKLud6aYdyrU8lS610KGoLKL X-Gm-Gg: ATEYQzydVQLNPVD5fRCfc2CcL7bayNXI+w9g5fI/5l5cuZASmUL+Bv4/nKQvW9PK4DE MXJ2MugPI/lT4q+ZAlB18vN2QM7JZ4osF9B7zi1tu5SK2Lj2uuFhSNDh3+dm6BXFXxv8JDeaNqs Q+apX6zTaWFMJJeqmGF6J+yw7TcYbaCXMEaKutTXHKHWEx7eKKl1bNjhZeSeDHl4Un+j4clTPmI eRJnycl1/bHnWHSm15ZjIMO7scpyCPJS9vim5LeKPASUqOUGzuEJjoPmdXEUa3P1PDXwOq0+5e2 qUhVjw6UELDjlcOq/59VTAhUN56wWpmnY5QisZPaiFykpDol7sUcqAsvePSAsyLo8nwYM63tOAF HXidyqq/aPWRE1F05OwUFMuSX7C6bdvsj6M8OnRMTLVA+2K+c80VZvxFhFzEApe6nAehjF9l8CH lChsSLI9CXov3fMpMSZhceSGRHAtqg85lG9fTOnqBfUXcA1xecEdPt X-Received: by 2002:a05:6a00:3a1d:b0:81e:7496:f826 with SMTP id d2e1a72fcca58-826da9f08c1mr13054461b3a.31.1772000588857; Tue, 24 Feb 2026 22:23:08 -0800 (PST) Received: from smtpclient.apple ([176.100.43.172]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-826dd8ba11bsm12578956b3a.50.2026.02.24.22.23.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Feb 2026 22:23:08 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_4BA3F2B1-4A4D-4B78-84AB-B941736561C8"; protocol="application/pgp-signature"; micalg=pgp-sha256 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81.1.3\)) Subject: Re: git: 887f0f125fd1 - stable/14 - Revert "GoogleTest: import 1.17.0" From: "Enji Cooper (yaneurabeya)" In-Reply-To: Date: Tue, 24 Feb 2026 22:22:56 -0800 Cc: Enji Cooper , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-branches@freebsd.org" Message-Id: <30C3C506-3327-4605-8D6C-237393D6D676@gmail.com> References: <699a9186.32e99.543fe4bb@gitrepo.freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.3826.700.81.1.3) X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4fLPfR0PKJz3CY1 X-Spamd-Bar: ---- --Apple-Mail=_4BA3F2B1-4A4D-4B78-84AB-B941736561C8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 24, 2026, at 7:30=E2=80=AFAM, John Baldwin = wrote: >=20 > On 2/22/26 00:17, Enji Cooper wrote: >> The branch stable/14 has been updated by ngie: >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D887f0f125fd1282c8054b402ad72af37= 1a9f5dec >> commit 887f0f125fd1282c8054b402ad72af371a9f5dec >> Author: Enji Cooper >> AuthorDate: 2026-02-22 05:17:40 +0000 >> Commit: Enji Cooper >> CommitDate: 2026-02-22 05:17:40 +0000 >> Revert "GoogleTest: import 1.17.0" >> This reverts commit = 227baf32d26360137492b108aba06c6a54c0949b. >=20 > Please include the "why" in commit logs when reverting. I (nor any > other readers) have any idea why you reverted these commits. Will do next time :/. I reverted these changes because some of the compiler changes made on = main couldn=E2=80=99t be backported without potentially breaking how C++ = binaries are built, resulting in potentially unexpected breakage on = stable/14. I might retry it in a future cherry-pick after additional = testing, but for now I pulled the changes out to ensure behavior isn=E2=80= =99t dramatically changed on the branch. Thank you so very much for bringing this up. -Enji= --Apple-Mail=_4BA3F2B1-4A4D-4B78-84AB-B941736561C8 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEkHfexGRJ3gYRdA2gGpE5DjPsNJgFAmmelUAACgkQGpE5DjPs NJiZSQ//e1L8BZUMEbpjJHQLeZ1DNBrPNxghEjtHFs0gJlkWdSN4h1kdP79nBI0t 0B2IJ96nNk4+kW4JoWuGkgaGIlS2toshmtYj3ZC1/ZFaNqJoN4b0pvBDPjEuAvI6 RMQCtzne41riS2pCFth/X8cVua/mTIlyU34h5nwlykAHlaY0S3w9fYSe+YBx21DY HBG5zLBQKpKOo96+3OyguOCsv7jH72NMxdqPSjJTHtqPGThHw1IbaeQ2d3vQh6WB Vc28AkSBmhBFUpQu8T+SRFoM7IU3hxTIgLCTEQY7H+SRx3aF5jkQ2D/LfxYEK1ZS Uq6b6JQddWaPGp/DtcGUW/PWZ2cFUY7YI9zTnCGRNWqK4uPSX67SWooQFVRpuwZS Jm6J+IfdRn/rLTjG4UhKFV5YUR+6TlNALKSJdwxYEIQF+WQvqWYVq1vLwCirdI5Q 4NXq6nnI1v40zMbquBy3r0Mj1tNRnaY/5aRzISacscilfmauksobwNKk7v5IlacV Q7otjbGPoREOCxcgvnsnBLoPqfD/+l9kRrOVhhDiMRg3ATtw5QhvS2yqdYd5ql0e xjCy1azlHMW2iNIw/bECdjLYMLeYeQ7wbRtXlKXzms8n/W1Ests4sqkxAlPKn+/I dJGk7hvFZPThgDWzz2SiNEE+STumrrtGKQoNEtG/QpmtJnBw8jk= =h2lo -----END PGP SIGNATURE----- --Apple-Mail=_4BA3F2B1-4A4D-4B78-84AB-B941736561C8-- From nobody Wed Feb 25 06:38:52 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLQ0X6QdYz6Sfk5 for ; Wed, 25 Feb 2026 06:38:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLQ0X2WV2z3HSL for ; Wed, 25 Feb 2026 06:38:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772001532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nxbvbep1ciwEQcvB0bnEtGELxtsWMaTawBDi+ERF7jc=; b=KHuB99fkdv860MkItES24Os3a+MbXLTCnuiaFixZ2q3SpuIvEdR3ni/qJwJBMoKT7n4+jf yZTKwWyER+24rHGVuU+n1ofxEyx0qlhwnwSX7RzIcUrWLZ/Nb+i81uQOFwLC1DFIc+8rY9 wC+kR5VeYAHzvPUG7SCGXXGU+d0Kbiv/f5HYMsjkfH2FSM5VomuT5zfqyHt1LsAFulTDFI v9eld5riYxfDCgrzBA2mc30CfS9SrNBLZsdnSbljRohCUWuMrR2SMIbsNLZCjzq50czpkw JCIf7qRhvQZxdxK0dI72NGOZv2D+zJCLzujS8Kb9fNspl9W9mxG4/B9pbpuGQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772001532; a=rsa-sha256; cv=none; b=kLABcIXytGCh52RtItL63EaVSYcghpyFqHN1vaNgqgz9RzzmRL4fH31K3tXeQMiFOOo2e9 0ZP6P/AWZOtX4c8NGVlNeG2l7LPxDkUB+IxCpnHiU+wk/th7q1WrWCIKoHf/rNsBbzWn3R 6TROp46LuoQc628mxYC0gBMp412Xq9gDgBxxWNPGqng3EkQpruvendJx8/lixRRQqmvtPS cAI3HVLWjLTAoeq6BrkyOt/EOkjwx0dnwZkcdXYZXS2TurgP2aO3fYAG9frvMlKZSGGi6E v/qcw9GSzMQOuX1reOCbovICI50SVQrTtyBHioXmkvdrVgBkLF400TXnvX8t/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=1772001532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nxbvbep1ciwEQcvB0bnEtGELxtsWMaTawBDi+ERF7jc=; b=wGSdQLA6LEyj/7frPS4KdVLO7qL9FB9cRdmBWyXXmxU6ck0Vc5XzWlHzhv4sH2r1a0PIc2 990mZNlF4ADwZlvRpjLF5oNtX+msottNDk0Z9pwK9DCqH3uJZKF2kIHgFbP1uGiRdOH4N0 xpFuAS8rkMYnChk5SHOHkTXoT7NaHfk7tHmmJrWu9LgZCak8TTDfabkoDS0FuiAQrQAjjh LheBS48GOrXjyHyvUGiG+hUOWodmA0pqE2YY/GAJPhWUm43uBsDq+BzmwbrFyGLXO7GRCQ y3Yu8yG1FnKy57d3nn5wRbda7SRbQbmphnySEFRBs/Z+iQA2ql4IasbIT91FHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLQ0X10tlzr8H for ; Wed, 25 Feb 2026 06:38:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 43456 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 06:38:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Abdelkader Boudih From: Enji Cooper Subject: git: 94db365042d3 - main - asmc: add Wake-on-LAN control via sysctl List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 94db365042d35ff7e3ee7365a87a89bab1560030 Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 06:38:52 +0000 Message-Id: <699e98fc.43456.7db13a6@gitrepo.freebsd.org> The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=94db365042d35ff7e3ee7365a87a89bab1560030 commit 94db365042d35ff7e3ee7365a87a89bab1560030 Author: Abdelkader Boudih AuthorDate: 2026-02-25 06:32:42 +0000 Commit: Enji Cooper CommitDate: 2026-02-25 06:38:19 +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 --- 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 dd7ad7d5e66d..35c050cab100 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. */ @@ -879,9 +880,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; @@ -951,6 +955,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, @@ -1704,3 +1718,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 a6e9c75017e0..97e5076455c9 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 Wed Feb 25 06:42:28 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLQ4h5217z6SgTQ for ; Wed, 25 Feb 2026 06:42:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLQ4h3wDfz3JX7 for ; Wed, 25 Feb 2026 06:42:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772001748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e2Q4ivKEd4sQhmLQNSzG75ijNJQFsrYU/rdB1vzzmBU=; b=dfju0Q2IKoklKHwS2aZygnLMIxe9J7rJ1YRWypI99GJmw/USk4P9vKDat8G+0eiz/L1Tba au5jqAbl+Z53yTW8qhH7Pxiw2zhehnWzEybsmQu6m186I+w0dbyx+r7bYRjlG7A1Ycn8GV xROGVQNzA2zgEV9sHZnynO1DJUYJxOajG0Y6phu7lVgtrYFYv4PmQk1iJE2nKr6MuFSnXQ PPai13kXllP2Z8lXYf06PK/801e6gjLdHlgCtbPdCaRsgdiS3ZOXScmvGqrpbWZ6JrZmOv ZIa5JbGLNnNIhxUI50EEuUwaT7IrrNJSfB5B19l0ntB1XvhK95fPiHQLOKVOrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772001748; a=rsa-sha256; cv=none; b=yRQVr1UjZ28JMrWtIgA5DKRrr0oUjkJax3cTCn+JVE4/OoJbyAgyEXwHhO3+18xvo7/JOv mjbnFIFYlMFNko7CSTssiariXHCZAWjweFlmALuRaOyE13HnQD+qnuYxvMJPZ3w5GNThbx x/Rer4tBVeXIxF7WO2pwYSwvhPoxQG7IKvUuH1oA4xA1K4zen9Yab656LC5Hr9K+6vUT7+ cSaF3X9guYnOkNsQNmSb1C2+AFItxMNGTZ7FEqIoRD7u7kLJ10dkAqmKUIaOLKnbKOIF6j 052bb2G0gqR8fcgjvhdEys0JFRJMB5BGLlgo8s1a7qsuMqGgrfPA72uqzzb2wA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772001748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e2Q4ivKEd4sQhmLQNSzG75ijNJQFsrYU/rdB1vzzmBU=; b=j0Usyt+2/1TIpuuIKiRFQvCySHGjsF41houVQ3x6vhcdVTkRYDssukmI2oajxOsLIPYsbS 0YpBZ3EDEXwl5Bm5kFU9Y0wzib2UBZf0nbmt4/VbEum/38+0HdwAy9aqcDmP6bSVtAkCqJ TN4j0HBZjRvto84himgR75LcTKfR0Q6uiB+IA+huFzAOdbtxUoEwKrFAs7PptN9bs2t802 9wM7qnG9lWusTjVM0ZfLIolhX9aiq0LELG0v9tA5VkASHsKJhZU76HL1gtpU2ggFguJUK/ XrXMleHoQCiVVL2jLPwF931FuS2WGGSMUJt3EhzPMoDBAZokGZ/qSroZLxVxgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLQ4h3Jfbzrjj for ; Wed, 25 Feb 2026 06:42:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4478a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 06:42:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: 3023bb49e115 - main - asmc: introduce the concept of generic models List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 3023bb49e115b4149f9fc0683dabde172ecb1336 Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 06:42:28 +0000 Message-Id: <699e99d4.4478a.67cccaa5@gitrepo.freebsd.org> The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=3023bb49e115b4149f9fc0683dabde172ecb1336 commit 3023bb49e115b4149f9fc0683dabde172ecb1336 Author: Enji Cooper AuthorDate: 2026-02-20 06:37:05 +0000 Commit: Enji Cooper CommitDate: 2026-02-25 06:41: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 --- 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 35c050cab100..cf977071cc69 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -176,6 +176,11 @@ static const struct asmc_model *asmc_match(device_t dev); .smc_light_right = NULL, \ .smc_light_control = 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", @@ -517,8 +522,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 @@ -566,28 +605,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)) @@ -597,11 +649,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 Wed Feb 25 09:10:37 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLTMp13N1z6T1KT; Wed, 25 Feb 2026 09:10:46 +0000 (UTC) (envelope-from roger.pau@citrix.com) Received: from PH0PR06CU001.outbound.protection.outlook.com (mail-westus3azon11011037.outbound.protection.outlook.com [40.107.208.37]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.protection.outlook.com", Issuer "DigiCert Cloud Services CA-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLTMn24wSz3YVs; Wed, 25 Feb 2026 09:10:45 +0000 (UTC) (envelope-from roger.pau@citrix.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=citrix.com header.s=selector1 header.b=A6nbrxGt; dmarc=pass (policy=reject) header.from=citrix.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (mx1.freebsd.org: domain of roger.pau@citrix.com designates 40.107.208.37 as permitted sender) smtp.mailfrom=roger.pau@citrix.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xO8mZ8EMjNhBL198ZzE1BnMP5v1ATJU+i4caqBYWjcIGdMMNMlV/w2lCEVfbPAlsHOJppaEObwn2ySGHziq2iwhMi7tUIsde4Syt+eufpp+ZxRZWfr4bGdA/NklPJDDmeWsa+/mEA3gnbMMNZDdhJWXe1k+dfRlMGpR2z6JA9079clU19Nhn5+LAtct2pb68UX2jGMOCdqyFm+Aa5WjjCQqYkQAbeV5QQ3f9ojneCve31/o42BXy/1jHQ2ZpxsYVbJVSHa6qjzXFYZikEcg4KqJnXGwVkcuVaK9gqB0YAquZf1OysPWdgoXmPP5mGoFLjOUD8XUagK9TgBeESVmaHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=D7elEguEvqa1u+1LT3VYQQPw9CDY8g61T/rVKicph1A=; b=cyJQSAS5w1KEnudqOOWxPo/P2MTvoRDpMvP7Jpug/zwEjftgsqP9D6Gtrrqmm72a+DSlJJj4d2C5nYl4YNMdvkcb6t0epzc/jC5u88/cn8QHi+IjbyZ9cNJUreoPuKAaSuPZJfv3PlB1iAKdi7iHQFXdp6chtvJntczuKAYri+6vnyhTpP+thR7llr3Ol+70WRyQ+QcJ2PPaRk/+4YiqD9CO5CctWsFLFyHuV7gm3P6L/pLyPfZtIIhWKLFWOeIuZ/1Iyw/FVnpy2OqME+n+KT/fue4ZeIVwZCAC4QB1XwZAWTfB+RX/tp96kmZHCgff35snpYyjgGJ66iZ89d8Rzw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=D7elEguEvqa1u+1LT3VYQQPw9CDY8g61T/rVKicph1A=; b=A6nbrxGtLIpZcLnHTRRAXSRxjCcXGkADo3yP+4/+jI3HuF6x0zM8Bt7HkCgXLZ5hnsfUNMgN2ayn4PqtmkMK2BNNgWD8FObQ/par7hHFdBfLWPkMIeati9dpfizQ1kMwglkZzRhVwC9dcivzBWJqrM2YXHvFpguJHxhkH+kQmIU= Received: from CH7PR03MB7860.namprd03.prod.outlook.com (2603:10b6:610:24e::14) by CO1PR03MB7889.namprd03.prod.outlook.com (2603:10b6:303:275::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9654.11; Wed, 25 Feb 2026 09:10:42 +0000 Received: from CH7PR03MB7860.namprd03.prod.outlook.com ([fe80::f5ba:35df:1c9f:b343]) by CH7PR03MB7860.namprd03.prod.outlook.com ([fe80::f5ba:35df:1c9f:b343%4]) with mapi id 15.20.9632.017; Wed, 25 Feb 2026 09:10:42 +0000 Date: Wed, 25 Feb 2026 10:10:37 +0100 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Aymeric Wibo Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c5daa5a4c32c - main - acpi_spmc: Add system power management controller driver Message-ID: References: <69776f5e.2500f.227efeb7@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <69776f5e.2500f.227efeb7@gitrepo.freebsd.org> X-ClientProxiedBy: MR1P264CA0044.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:3e::6) To CH7PR03MB7860.namprd03.prod.outlook.com (2603:10b6:610:24e::14) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH7PR03MB7860:EE_|CO1PR03MB7889:EE_ X-MS-Office365-Filtering-Correlation-Id: 0aa1a20b-29b5-4742-3168-08de744dc070 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016|7053199007; X-Microsoft-Antispam-Message-Info: PYOfunC959uJuhq0AO099F3pj4Rzy/EJhgxVpBgNHC441tlenuqBmrqQ1f1qw8qkjfPYLuvH/128HJl3eqfPEzpj19VZuJRQpefEfUnk0aVcp0B/1eqI65MpaBPbFkKHxBqlysRM+3SAmcLyuSEntro0ri543RY3ets5d7u75HKrEyLzgYiNItv2t996ZrXyK4BvK6kxHjp0BC8umP4NXfNoOqqN+ZB1SEBXQs8IkSRlzck0pbSD0d+QSjYTEFraAln/09BOvujFRdiFri0lA9PCnb1xVDwJ5/wBrYFeJe/2K28yWw7gfvbmZoRfBz0w2CS34zzXSd53AY8Rwf/t2HyvuX3I38zfDmYUklqmZBCYveUvpGsEz/gMCAhmrz70yvBc7cNKoukvZ9jjzKbzucVa09FatEe7cOEUnBVCgyAZvAIZUjyemU59/33DdIGKusV+pYB/FC6wOOR5S2K556SVOpCnDYoeVFg9BPQ+5hxExUFCjmQab/2TngqtYuprI1YWSfEIDIDel9F6h4vhx+E44fRURF5ST9pk86qpZq97hBr0n0ttWwTSFbukBscraGc/O/po6mQNW3xtFRAU9tDC5fFpc6g4vNaAKA+1IR+B8vCxdKfb81eR8bbmMWyvkS0NfFKz3WUfY2BqflLHVYPqy+tI0YvAHH5JIClQjkSAAU0Npn/b9jyraBQLhvZLz6Mi58Byl/w1f1J0X8//Z40RVFLqaOTcm+TTp5UEMjA= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH7PR03MB7860.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016)(7053199007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TFpEMG9JdFlXY0tmanZtREdRcUJkZWZPNk1NUTJZQXNWTHZ0TXJLSzRSNjZS?= =?utf-8?B?eE8weW9iMlh1V0I1Q1pPS1hTSThLM0MwMjdTdVRaaFNSNUVGNGFqTW9LYnQx?= =?utf-8?B?MXpmdldlVUMrSFVRekFEdXcxeVNvN0tHK0dnWk93aGdQWWVwUmpXWjZjQXdX?= =?utf-8?B?R0Fablp4cmpmZTkwMWQ4aUdjb1dVZzZqOE9SV2UrZ0JTNmdWM01ZY0E2K1Uv?= =?utf-8?B?UUUzRktSRWxKTThreUwzZENjd0xtN0dMcTVnQVhjMCsyNyt2NzFnM0xzV1Fz?= =?utf-8?B?VjZqQ2xXNmNpaVE3NDBVczZkM0pJS2FZNE1YNUxyNHJFaDdmY2RBZzdQWndm?= =?utf-8?B?MDVqTTZEN1o4dWNsRUo4YW9xVlB2Tlg2SHk1QS9yMzZNVnViNjRvMUN0d0Uw?= =?utf-8?B?TmQ2UVFyQzNqZ2lkSFNwY0U0NnFmcmVlVWpsK3EzRG5hWXVLcklTYTRjN0Nn?= =?utf-8?B?K2xGQ0RFeUUyMm51R1FsVEtKUFBWZXdDcVpSQUFqSzRaeUlndGFQOTZqU2lD?= =?utf-8?B?M1h5YkxJVWh1a2lMYjNQbTkzZDNIeStFc3lVem90V0dmbW9GTWlxeE9yV3Ru?= =?utf-8?B?MTJTUTZNVmFzVHBrVXFPRExQSkNoWVRIL0UyRUR5NnVVSFVQN2RiTGQrZHRF?= =?utf-8?B?TlVWL01QZ1hUMVZ4YzZJZ3huRmtjQ01lRFJTMnRtOEc2WS84OUVsWTMrSlNX?= =?utf-8?B?YXZocUhoWXIvWmdkL09KYUhjL1JzTjVacTlWMktQZjlYVmdvQ2NjRVNqNW5Y?= =?utf-8?B?Ky9OeG9NV0tiWXNOWTJyVlU4YjkyeXVrQXBjejBDTS9HRmtYYVczNzdVU1pt?= =?utf-8?B?dVdsYU1ZaFVYdnl4VUxiZ1N2akpJakkyU0NOamRmZXVZSVhSckxmMnVucGoy?= =?utf-8?B?QVZMWk90aU1LRGR2SC9zRmJQNTJrWC9BWHozMWhKTFJkTmg3QTgzOFJoWHJF?= =?utf-8?B?U0EwalhaaEFVbHN5ZTd5eGJRbjFha29ndnNTZVc5dnYzKzY3STFNT0R5UUpk?= =?utf-8?B?QmNwQ3VVWVNMZEVSbnJMdWkwWDBPQjdvWTB0Qjd6cURSZlR2V1dXaGMxNWp0?= =?utf-8?B?Snp1dlB0VGg0cWtJS29yZDFraU9kUGx4am8wdVYzOVBWN2lTZngzdzdiSmxn?= =?utf-8?B?VjlLeVdoUWpXaVJGY283am5hdFdZMllUN0FJV2hvb2JIejRjdGtzZlBBZW5F?= =?utf-8?B?eENHemM1QkFGZEVYdVlEUHFmaEFYcGtuajBLbHBITWNsaFFmYW1lYnUya21D?= =?utf-8?B?QXNaaTFWeVg0RThCTEdvekhpOVlySlNQTllZRFFsUVp0alc2cURtTUV2OE5l?= =?utf-8?B?YTltcGM2aGFoRVBQNm9wV2NuOU8rMVFyK2JlRmtmRUZmMzFLZ1Z3MEYybDBk?= =?utf-8?B?ekZwU1RHaXdyUjZsK1UrQmhnaXh6ZGZzRGlWRENFTEtvTm1mcUorTjAxbjF4?= =?utf-8?B?dTByc0lhS2w3ZEhoK2Y4QlRFVzlienBPRisrQXQ3VTYrNTN1YSs4NDBjY1Z0?= =?utf-8?B?Mk1INFhiS2t6dURKc2lJTVJCLzJ1cW53cGN0dnhUMWVGSVhoalFtQlU1cHNi?= =?utf-8?B?WE00ZFYvVTRyUjdJUXFtbUxPL285VDl2Q2hma0h2Ynk5VUlrNkdOMmZuNUtv?= =?utf-8?B?N1Vrcnp1UHZBR0xIUmV4YS9KQnZyNWNqRlpmeHJYVWs1bXpsUHl3ZDN4bVNV?= =?utf-8?B?T3FKWHlWOEhkVnlsVk9FejkrNGluOWFnMS9hS1BNVWRDNjNkVVJCeXhtdU9T?= =?utf-8?B?d1FWVTBhamlEV2NTNU9NS2xBV25rU3hUcUlqNGxoQWJiZkVqZk0xSVI0TERS?= =?utf-8?B?ZTB6UmVhSnFQVExkbHFPQ0xrdWE5OU0yTDV1NGEzUG0rZmRZWGxpblZKVVpu?= =?utf-8?B?aFoxSGRWdER4ODBJcnplVUN3YzJ2S0wrdDBjYU9Yc242MmdYQTFXdGZLdjJa?= =?utf-8?B?UlRESTN4Ny8wOVVnRXhNTFlJNkdzVGdIazFoaWRiM3I5SlV2YnRON0xnTEVi?= =?utf-8?B?WWV4eVBZa09Ya0lsdmJaM3NPeGpOQlBqd09GWXF1ZS9RZzhRYlNBOHdqdmxu?= =?utf-8?B?QWhPU3dOdFY0S3pNWEtKMWFUUTVzREV5M3U5clcrMzJFbDJIRlFEd1ZCYngx?= =?utf-8?B?TXZ2Q1R5SGo5SGMvRjMvMS9lMGVNYmR3cDRUTENQckY3enZ0T1k5NkJaelFa?= =?utf-8?B?VGJEUkhnS1FwV0h5NmNVQXlaSkZiYWl0WHRZdHExNkJqYldNUUpPOE93L0dw?= =?utf-8?B?a2ZIRU1iUmhwR0FRZ0ZtUWNBNmYrNTJoVzBLZy9qU0xxaWhxQTRIM0lBNUdN?= =?utf-8?B?eEthdkJhd3dNRVBPcUREUTdEbTlaSjZKaldvcE5OejBBMHA1bkhtdz09?= X-OriginatorOrg: citrix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0aa1a20b-29b5-4742-3168-08de744dc070 X-MS-Exchange-CrossTenant-AuthSource: CH7PR03MB7860.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Feb 2026 09:10:42.4599 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: nxYrXEhPaZMn7mqU2xsRCys0q7aAbjbUnivh46Yh0xoEbRVxGat6RbTEbCWSb46hMMkae7j0MX1Z3xsihDM62g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR03MB7889 X-Spamd-Result: default: False [-4.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector10001:i=1]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.991]; DMARC_POLICY_ALLOW(-0.50)[citrix.com,reject]; R_DKIM_ALLOW(-0.20)[citrix.com:s=selector1]; R_SPF_ALLOW(-0.20)[+ip4:40.107.0.0/16]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[40.107.208.37:from]; MISSING_XM_UA(0.00)[]; ASN(0.00)[asn:8075, ipnet:40.104.0.0/14, country:US]; FROM_EQ_ENVFROM(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[40.107.208.37:from]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; RCPT_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[citrix.com:+] X-Rspamd-Queue-Id: 4fLTMn24wSz3YVs X-Spamd-Bar: ---- On Mon, Jan 26, 2026 at 01:42:54PM +0000, Aymeric Wibo wrote: > The branch main has been updated by obiwac: > > URL: https://cgit.FreeBSD.org/src/commit/?id=c5daa5a4c32c9b1ecb506ddf1a80579c93c3ea6d > > commit c5daa5a4c32c9b1ecb506ddf1a80579c93c3ea6d > Author: Aymeric Wibo > AuthorDate: 2025-06-14 15:30:44 +0000 > Commit: Aymeric Wibo > CommitDate: 2026-01-26 13:42:11 +0000 > > acpi_spmc: Add system power management controller driver > > Add SPMC (system power management controller) driver as acpi_spmc. This > is the device which provides the LPI device D-state constraints and > allows for OSPM to send S0ix/modern standby entry/exit notifications. > This supports the original Intel DSM > (https://uefi.org/sites/default/files/resources/Intel_ACPI_Low_Power_S0_Idle.pdf, > untested), the AMD DSM (tested), and the Microsoft DSM (tested). > > Before entry, acpi_spmc_check_constraints is called to notify of any > violated power constraints. This will use acpi_pwr_get_state to get > current device D-states when that gets added back. I'm getting a lot of "acpi_spmc0: Unknown revision" messages from this driver on my box, below is the full (non-verbose) boot log. However the affect of those messages is not clear to me. Does it mean S0ix won't work? Or are those just warning messages? The logged text and occurrence of those should be adjusted, it's too verbose right now and the printed message doesn't help the user figure out what's going on. Thanks, Roger. --- EFI framebuffer information: addr, size 0x0, 0x0 dimensions 0 x 0 stride 0 masks 0x00000000, 0x00000000, 0x00000000, 0x00000000 Timeout initializing vt_vga GDB: no debug ports present KDB: debugger backends: ddb KDB: current backend: ddb ---<>--- Copyright (c) 1992-2026 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 16.0-CURRENT #6 -dirty: Wed Feb 25 09:50:30 CET 2026 root@nuc:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 FreeBSD clang version 19.1.7 (https://github.com/llvm/llvm-project.git llvmorg-19.1.7-0-gcd708029e0b2) WARNING: WITNESS option enabled, expect reduced performance. VT(vga): resolution 640x480 CPU microcode: no matching update found CPU: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz (2803.20-MHz K8-class CPU) Origin="GenuineIntel" Id=0x806c1 Family=0x6 Model=0x8c Stepping=1 Features=0xbfebfbff Features2=0x7ffafbbf AMD Features=0x2c100800 AMD Features2=0x121 Structured Extended Features=0xf3bfa7eb Structured Extended Features2=0x18c05fde Structured Extended Features3=0xfc100710 XSAVE Features=0xf IA32_ARCH_CAPS=0xa005c6b VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID,VID,PostIntr TSC: P-state invariant, performance statistics real memory = 17179869184 (16384 MB) avail memory = 16203403264 (15452 MB) Event timer "LAPIC" quality 600 ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs FreeBSD/SMP: 1 package(s) x 4 core(s) x 2 hardware threads random: registering fast source Intel Secure Key Seed random: fast provider: "Intel Secure Key Seed" random: unblocking device. ioapic0 irqs 0-119 Launching APs: 1 5 4 7 6 2 3 random: entropy device external interface kbd0 at kbdmux0 efirtc0: efirtc0: registered as a time-of-day clock, resolution 1.000000s smbios0: at iomem 0x414ca000-0x414ca017 smbios0: Entry point: v3 (64-bit), Version: 3.3 aesni0: acpi0: acpi0: Power Button (fixed) cpu0: on acpi0 hpet0: iomem 0xfed00000-0xfed003ff on acpi0 Timecounter "HPET" frequency 19200000 Hz quality 950 Event timer "HPET" frequency 19200000 Hz quality 550 atrtc1: on acpi0 atrtc1: Warning: Couldn't map I/O. atrtc1: registered as a time-of-day clock, resolution 1.000000s Event timer "RTC" frequency 32768 Hz quality 0 attimer0: port 0x40-0x43,0x50-0x53 irq 0 on acpi0 Timecounter "i8254" frequency 1193182 Hz quality 0 Event timer "i8254" frequency 1193182 Hz quality 100 Timecounter "ACPI-fast" frequency 3579545 Hz quality 900 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1808-0x180b on acpi0 acpi_ec0: port 0x62,0x66 on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 vgapci0: port 0x3000-0x303f mem 0x603c000000-0x603cffffff,0x4000000000-0x400fffffff at device 2.0 on pci0 vgapci0: Boot video device pcib1: at device 6.0 on pci0 pci1: on pcib1 nvme0: mem 0x6a400000-0x6a403fff at device 0.0 on pci1 pcib2: at device 7.0 on pci0 pcib3: at device 7.2 on pci0 xhci0: mem 0x603d190000-0x603d19ffff at device 13.0 on pci0 xhci0: 32 bytes context size, 64-bit DMA xhci0: xECP capabilities usbus0 on xhci0 usbus0: 5.0Gbps Super Speed USB v3.0 pci0: at device 13.2 (no driver attached) pci0: at device 13.3 (no driver attached) xhci1: mem 0x603d180000-0x603d18ffff at device 20.0 on pci0 xhci1: 32 bytes context size, 64-bit DMA xhci1: xECP capabilities usbus1 on xhci1 usbus1: 5.0Gbps Super Speed USB v3.0 pci0: at device 20.2 (no driver attached) pci0: at device 20.3 (no driver attached) pci0: at device 21.0 (no driver attached) pci0: at device 21.1 (no driver attached) pci0: at device 22.0 (no driver attached) ahci0: port 0x3090-0x3097,0x3080-0x3083,0x3060-0x307f mem 0x6a500000-0x6a501fff,0x6a503000-0x6a5030ff,0x6a502000-0x6a5027ff at device 23.0 on pci0 ahci0: AHCI v1.31 with 1 6Gbps ports, Port Multiplier not supported ahcich0: at channel 0 on ahci0 pcib4: at device 29.0 on pci0 pci2: on pcib4 igc0: mem 0x6a200000-0x6a2fffff,0x6a300000-0x6a303fff at device 0.0 on pci2 igc0: EEPROM V1.57-0 eTrack 0x80000181 igc0: Using 1024 TX descriptors and 1024 RX descriptors igc0: Using 4 RX queues 4 TX queues igc0: Using MSI-X interrupts with 5 vectors igc0: Ethernet address: 48:21:0b:35:a5:77 igc0: netmap queues/slots: TX 4/1024, RX 4/1024 isab0: at device 31.0 on pci0 isa0: on isab0 hdac0: mem 0x603d1a0000-0x603d1a3fff,0x603d000000-0x603d0fffff at device 31.3 on pci0 pci0: at device 31.5 (no driver attached) acpi_button0: on acpi0 acpi_spmc0: on acpi0 acpi_spmc0: Unknown revision -670172952 for device constraint detail package acpi_spmc0: Unknown revision -670172768 for device constraint detail package acpi_spmc0: Unknown revision -670172584 for device constraint detail package acpi_spmc0: Unknown revision -670172400 for device constraint detail package acpi_spmc0: Unknown revision -670172216 for device constraint detail package acpi_spmc0: Unknown revision -670172032 for device constraint detail package acpi_spmc0: Unknown revision -670171848 for device constraint detail package acpi_spmc0: Unknown revision -670171664 for device constraint detail package acpi_spmc0: Unknown revision -670171480 for device constraint detail package acpi_spmc0: Unknown revision -670171296 for device constraint detail package acpi_spmc0: Unknown revision -670171112 for device constraint detail package acpi_spmc0: Unknown revision -670170928 for device constraint detail package acpi_spmc0: Unknown revision -670170744 for device constraint detail package acpi_spmc0: Unknown revision -670170560 for device constraint detail package acpi_spmc0: Unknown revision -670170376 for device constraint detail package acpi_spmc0: Unknown revision -670170192 for device constraint detail package acpi_spmc0: Unknown revision -670169984 for device constraint detail package acpi_spmc0: Unknown revision -670169800 for device constraint detail package acpi_spmc0: Unknown revision -670169616 for device constraint detail package acpi_spmc0: Unknown revision -670169432 for device constraint detail package acpi_spmc0: Unknown revision -670169248 for device constraint detail package acpi_spmc0: Unknown revision -670169064 for device constraint detail package acpi_spmc0: Unknown revision -670168880 for device constraint detail package acpi_spmc0: Unknown revision -670168696 for device constraint detail package acpi_spmc0: Unknown revision -670168512 for device constraint detail package acpi_spmc0: Unknown revision -670168328 for device constraint detail package acpi_spmc0: Unknown revision -670168112 for device constraint detail package acpi_spmc0: Unknown revision -670167896 for device constraint detail package acpi_spmc0: Unknown revision -670167680 for device constraint detail package acpi_spmc0: Unknown revision -670167464 for device constraint detail package acpi_spmc0: Unknown revision -670167248 for device constraint detail package acpi_spmc0: Unknown revision -670167032 for device constraint detail package acpi_spmc0: Unknown revision -670166816 for device constraint detail package acpi_spmc0: Unknown revision -670166600 for device constraint detail package acpi_spmc0: Unknown revision -670166384 for device constraint detail package acpi_spmc0: Unknown revision -670166168 for device constraint detail package acpi_spmc0: Unknown revision -670165952 for device constraint detail package acpi_spmc0: Unknown revision -670165736 for device constraint detail package acpi_spmc0: Unknown revision -670165520 for device constraint detail package acpi_spmc0: Unknown revision -670165304 for device constraint detail package acpi_spmc0: Unknown revision -670165088 for device constraint detail package acpi_spmc0: Unknown revision -670164872 for device constraint detail package acpi_spmc0: Unknown revision -670164656 for device constraint detail package acpi_spmc0: Unknown revision -670164440 for device constraint detail package acpi_spmc0: Unknown revision -670164224 for device constraint detail package acpi_spmc0: Unknown revision -670164008 for device constraint detail package acpi_spmc0: Unknown revision -670163792 for device constraint detail package acpi_spmc0: Unknown revision -670163608 for device constraint detail package acpi_spmc0: Unknown revision -670163424 for device constraint detail package acpi_spmc0: Unknown revision -670163240 for device constraint detail package acpi_spmc0: Unknown revision -670163056 for device constraint detail package acpi_spmc0: Unknown revision -670162872 for device constraint detail package acpi_spmc0: Unknown revision -670162688 for device constraint detail package acpi_spmc0: Unknown revision -670162504 for device constraint detail package acpi_spmc0: Unknown revision -670162320 for device constraint detail package acpi_spmc0: Unknown revision -670162136 for device constraint detail package acpi_spmc0: Unknown revision -670161928 for device constraint detail package acpi_spmc0: Unknown revision -670161744 for device constraint detail package acpi_spmc0: Unknown revision -670161536 for device constraint detail package acpi_spmc0: Unknown revision -670161352 for device constraint detail package acpi_spmc0: Unknown revision -670161160 for device constraint detail package acpi_spmc0: Unknown revision -670160976 for device constraint detail package acpi_spmc0: Unknown revision -670160792 for device constraint detail package acpi_spmc0: Unknown revision -670160600 for device constraint detail package acpi_spmc0: Unknown revision -670160400 for device constraint detail package acpi_spmc0: Unknown revision -670160216 for device constraint detail package acpi_spmc0: Unknown revision -670160032 for device constraint detail package acpi_spmc0: Unknown revision -670159848 for device constraint detail package acpi_spmc0: Unknown revision -670159664 for device constraint detail package acpi_spmc0: Unknown revision -670159480 for device constraint detail package acpi_spmc0: Unknown revision -670159296 for device constraint detail package acpi_spmc0: Unknown revision -670159112 for device constraint detail package acpi_spmc0: Unknown revision -670158928 for device constraint detail package acpi_spmc0: Unknown revision -670158744 for device constraint detail package acpi_spmc0: Unknown revision -670158560 for device constraint detail package acpi_spmc0: Unknown revision -670158376 for device constraint detail package acpi_spmc0: Unknown revision -670158192 for device constraint detail package acpi_spmc0: Unknown revision -670158008 for device constraint detail package acpi_spmc0: Unknown revision -670157824 for device constraint detail package acpi_spmc0: Unknown revision -670157640 for device constraint detail package acpi_spmc0: Unknown revision -670157456 for device constraint detail package acpi_spmc0: Unknown revision -670157248 for device constraint detail package acpi_spmc0: Unknown revision -670157040 for device constraint detail package acpi_spmc0: Unknown revision -670156824 for device constraint detail package acpi_spmc0: Unknown revision -670156608 for device constraint detail package acpi_spmc0: Unknown revision -670156400 for device constraint detail package acpi_spmc0: Unknown revision -670156192 for device constraint detail package acpi_spmc0: Unknown revision -670156000 for device constraint detail package acpi_spmc0: Unknown revision -670155808 for device constraint detail package acpi_spmc0: Unknown revision -670155616 for device constraint detail package acpi_spmc0: Unknown revision -670155408 for device constraint detail package acpi_button1: on acpi0 acpi_tz0: on acpi0 uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 uart: ns8250: UART FCR is broken (0x2) uart0: console (115200,n,8,1) acpi_syscontainer0: on acpi0 acpi_syscontainer1: on acpi0 atrtc0: at port 0x70 irq 8 on isa0 atrtc0: Warning: Couldn't map I/O. atrtc0: registered as a time-of-day clock, resolution 1.000000s atrtc0: Can't map interrupt. atrtc0: non-PNP ISA device will be removed from GENERIC in FreeBSD 16. hwpstate_intel0: on cpu0 cpufreq0: on cpu0 hwpstate_intel1: on cpu1 cpufreq1: on cpu1 hwpstate_intel2: on cpu2 cpufreq2: on cpu2 hwpstate_intel3: on cpu3 cpufreq3: on cpu3 hwpstate_intel4: on cpu4 cpufreq4: on cpu4 hwpstate_intel5: on cpu5 cpufreq5: on cpu5 hwpstate_intel6: on cpu6 cpufreq6: on cpu6 hwpstate_intel7: on cpu7 cpufreq7: on cpu7 Timecounter "TSC-low" frequency 1401600888 Hz quality 1000 Timecounters tick every 1.000 msec ugen0.1: at usbus0 uhub0 on usbus0 uhub0: on usbus0 ugen1.1: at usbus1 ZFS filesystem version: 5 ZFS storage pool version: features support (5000) uhub1 on usbus1 uhub1: on usbus1 nvme0: Allocated 64MB host memory buffer nvme_sim0: on nvme0 hdacc0: at cad 2 on hdac0 hdaa0: at nid 1 on hdacc0 pcm0: at nid 4 on hdaa0 nda0 at nvme0 bus 0 scbus1 target 0 lun 1 nda0: nda0: Serial Number 50026B738193844D nda0: nvme version 1.4 nda0: 238475MB (488397168 512 byte sectors) Trying to mount root from zfs:zroot/ROOT/default []... WARNING: WITNESS option enabled, expect reduced performance. uhub0: 5 ports with 5 removable, self powered uhub1: 16 ports with 16 removable, self powered Root mount waiting for: usbus1 ugen1.2: at usbus1 ugen1.3: at usbus1 Dual Console: Serial Primary, Video Secondary WARNING: sysctl vfs.zfs.min_auto_ashift is deprecated. Use vfs.zfs.vdev.min_auto_ashift instead. Setting hostuuid: d81bcf51-811f-c4d6-cf81-48210b35a577. Setting hostid: 0xd1e215da. Starting file system checks: /dev/gpt/efiboot0: FILESYSTEM CLEAN; SKIPPING CHECKS Mounting local filesystems:. no pools available to import Autoloading module: acpi_wmi Autoloading module: ichsmb Autoloading module: if_iwlwifi Autoloading module: if_iwx Autoloading module: ig4 iwlwifi0: mem 0x603d1a4000-0x603d1a7fff at device 20.3 on pci0 Firmware Warning (ACPI): Possibly buggy BIOS with ACPI_TYPE_INTEGER for function enumeration (20251212/ACPI-3119) Firmware Warning (ACPI): Possibly buggy BIOS with ACPI_TYPE_INTEGER for function enumeration (20251212/ACPI-3119) iwlwifi0: Detected crf-id 0x3617, cnv-id 0x20000302 wfpm id 0x80000000 iwlwifi0: PCI dev a0f0/0074, rev=0x351, rfid=0x10a100 iwlwifi0: Detected Intel(R) Wi-Fi 6 AX201 160MHz iwlwifi0: could not load firmware image 'iwlwifi-QuZ-a0-hr-b0-77.ucode' iwlwifi0: File size way too small! iwlwifi0: no suitable firmware found! iwlwifi0: iwlwifi-QuZ-a0-hr-b0-77 is required iwlwifi0: check git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git iwlwifi0: On FreeBSD the firmware package can be installed running fwget(8). ig4iic0: at device 21.0 on pci0 ig4iic0: Using MSI iicbus0: on ig4iic0 iicbus0: at addr 0x21 ig4iic1: at device 21.1 on pci0 ig4iic1: Using MSI iicbus1: on ig4iic1 ichsmb0: port 0xefa0-0xefbf mem 0x603d1ac000-0x603d1ac0ff at device 31.4 on pci0 smbus0: on ichsmb0 acpi_wmi0: on acpi0 acpi_wmi0: Embedded MOF found acpi_wmi1: on acpi0 acpi_wmi1: Embedded MOF found acpi_wmi2: on acpi0 acpi_wmi2: Embedded MOF found From nobody Wed Feb 25 11:30:37 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLXTG4VcPz6THWs for ; Wed, 25 Feb 2026 11:30:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLXTG2GWcz3qZ6 for ; Wed, 25 Feb 2026 11:30:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772019042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2La9R2/ynTai5Ak9pNS7j0Vn9VZ+AY+SmpuLlj6dVaQ=; b=Y5LxG0svbXi5wyJj0EU3NRtZBkC6m0dveMcVhkxDyrzuEevzVXtxXu6pE+qd/bDsh6Afcf 9O0PnyjJDfAUum+QU2ogHdDka9Etw0B9/umAm/WXi07Jcr6PSqnUzXWes0EGituECa87bw /M+mD0oFeBE2FWBZn9J81KpUOgz9CKZeZrHl8wcqB7bmloL5+fLjKMlIWSi0fY+NHYgMVV bgDuL4aYSUXYL6qxxB5+WeYCP2HPHN4cGGriDvkwrGNquo5mbxo3N7yINX5FZJ2WINTwel JSonS89aQIz3Pjq9JPZqDGjL1h+bX1NL4MFBYdNGgB0hAvd40qvNZOE40K/lWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772019042; a=rsa-sha256; cv=none; b=U0wL7ZrJXRAS1M3tzSTFQkZcMXdZR53f9lyxCYo02gQwU+qlAJkPr4rtgvrHnyZeLOocp8 bJO+kmigC1he2GDsrb8L33gLkADc1TRoV+gHVc/WC8yq7gWhEo39Ojn/mA+77gIFVMb0C+ z8ln/W2rvR6GaBnPZyiOTE+PGUov01Cxe6mG4lxKwIqCzW/9Ub1vMTXHgnY32lRrM9qfyK StjwIRv1DRqY7clyLSLvmcZqujxmeA/bG7laaPUCNc1PkS45xchacLUIwIKbipUJ0ZK0EA lzg+3Q2dUozGdsj2GIE45F1jdTiyy8woYnl9lgJztdJ5MXOeUxmkKJgno9+pzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772019042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2La9R2/ynTai5Ak9pNS7j0Vn9VZ+AY+SmpuLlj6dVaQ=; b=MRVtVPGeobCCQzdZqQf9J2533eW0n6oIQtz0xzrxKleAE814xXc+WsFsxB9IPeG1m1LKHJ 09AnLOJvvW8+p2l2173+K4NSDla8juhulTFC88z9ZEijNyMxdCt/NPYxGyJXyp2X5pJkrK Uf5sn3SuOoLSt8CYEqR8v4rfQb33+a8BwDL+cIpxyoV/D9xYO8s+MV3o48+bT5JxcZxCic qqyV6PKi3GhqbxuTkEIXtcCEKE8FdnK/WqHaRCRutJnMrdRzUx41UGs1fr0BwhtL9Tyy73 Chrse2wxtw+BvpDRFmXo2JnL4Ye34qwcaucGkPYAUJUFCbZIgoog/PFqWJqfqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLXTG1mL3z10R8 for ; Wed, 25 Feb 2026 11:30:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3abb8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 11:30:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan Novk=?utf-8?Q?ovi=C4=87?= Subject: git: bce0c14fe19d - main - mpool/mpool_get.c: Avoid clobbering 'errno' when handling 'pread' errors List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bce0c14fe19defeef4f02cfebc018e9adf979783 Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 11:30:37 +0000 Message-Id: <699edd5d.3abb8.3b1aebcd@gitrepo.freebsd.org> The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=bce0c14fe19defeef4f02cfebc018e9adf979783 commit bce0c14fe19defeef4f02cfebc018e9adf979783 Author: Bojan Novković AuthorDate: 2026-02-23 15:30:26 +0000 Commit: Bojan Novković CommitDate: 2026-02-25 11:30:05 +0000 mpool/mpool_get.c: Avoid clobbering 'errno' when handling 'pread' errors POSIX.1-2024 states that the 'free' function "shall not modify errno if ptr is a null pointer or a pointer previously returned as if by malloc() and not yet deallocated". However this is a fairly recent addition and non-compliant allocators might still clobber 'errno', causing 'mpool_get' to return the wrong error code. Fix this by saving and restoring 'errno' after calling 'free'. Sponsored by: Klara, Inc. Reviewed by: obiwac Differential Revision: https://reviews.freebsd.org/D55463 MFC after: 1 week --- lib/libc/db/mpool/mpool.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/libc/db/mpool/mpool.c b/lib/libc/db/mpool/mpool.c index 1bab66d73baf..0df19dc09e4d 100644 --- a/lib/libc/db/mpool/mpool.c +++ b/lib/libc/db/mpool/mpool.c @@ -214,10 +214,14 @@ mpool_get(MPOOL *mp, pgno_t pgno, /* Read in the contents. */ off = mp->pagesize * pgno; if ((nr = pread(mp->fd, bp->page, mp->pagesize, off)) != (ssize_t)mp->pagesize) { + int serrno; + switch (nr) { case -1: /* errno is set for us by pread(). */ + serrno = errno; free(bp); + errno = serrno; mp->curcache--; return (NULL); case 0: From nobody Wed Feb 25 13:00:13 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLZSg00q7z6TSQp for ; Wed, 25 Feb 2026 13:00:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLZSf5zmFz40wb for ; Wed, 25 Feb 2026 13:00:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772024418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Yh1QUS18sGefBmVGYkhJg6zVDtIvOMTDT0gQb0xjAs=; b=K0HnqyIlrlbpqHdXVLyRqztdAEsXXT85nDbiq6XP3rrazV+ndjJflnAuw4n5x7JkvZfCm2 XQaGN6z3lM0w+O7ow9/Ysq0sjXVef7QokPu3jtXQWkGKRb/TF8mDVQ+2NtOUQ4/SsobPSI KotGZxk9Gqwb1notcFUu+goK6EfqsS/qrl9/o3g1UvopPiAJDURI7yJksI+Xd/1VGRnWQt Wm4AFyvkpJ/48y3RjCnQy2lmtk7WtSPZgB/5gTxieH/qZjT4pmAD6Vx+czyLDYNqTs6SL5 knwUWeCWyKEawg4TdNclYdEuxfaxXOTuzvskeS+7veqvrUjHOiK+ZZaCHmLVxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772024418; a=rsa-sha256; cv=none; b=n10Lya58q4110G3C7XwptpkJPXSlCaVSfdM2aslf7V5NKZqHwoX6Yiyf3NNPVLktIEya7n qLvKIm1I6HiAjSv3yppA69pP6Hm/I212DvYVMM2FiWiCSSZbGKDLuJMIKzaw+buRa8OaAx cE5T8mRC6eiMdASSlJwJ6S+NSLYa055cdHgkeM1RpX1fZjuzB3vg3FiqkUQw1bwDjQtzM2 uQ5kAQYOwN9PaBui3OYs4XTy5AxM7dkECuuSC7/NIIt4hZcnS6MQMuMW8SgNhV6gXo/bqn 0FCtQLzNVX0UpjdSLHlU16t9LC5PgEP8KkLN5ZlE5NRdmwUZmD/5tciqBIEEaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772024418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Yh1QUS18sGefBmVGYkhJg6zVDtIvOMTDT0gQb0xjAs=; b=QSpYiEIg80BHEIQYHkFBH/lJi8WFsyl2HfwRMbMJVJYf7ndTK1QvSDZ61UwKN1fyI3+yYr 0a6TQbsHlTKFQQVuCXHuvqeI3SHbMfLJmg2YQ4GG3Qn07xRDdCZGHs0i7uKD17I+PNkiqs MZ+rYSfXxncPH/FXTHtQwSKQgtgkfxuntGkf5BN8EgEEPIUAMdFsRB6mVVkAFH6W6JTp4y +5OMiMNaLddzFm3uht/diDq97pSh01bzFnY5vaQPEqgV5ogoCU5CS6nY5BmhKVPa8hJOeH xmPP5reqYYM1kLwulc/Vx7JHjX4GGCphoO/quUoIsZBsZCykqmJN/6dqtoXikQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLZSf5JLKz12P5 for ; Wed, 25 Feb 2026 13:00:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42e41 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 13:00:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 454212b9718b - main - sctp: fix so_proto when peeling off a socket List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 454212b9718b55b43781f81bef252658e20e0fd3 Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 13:00:13 +0000 Message-Id: <699ef25d.42e41.7579887f@gitrepo.freebsd.org> The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=454212b9718b55b43781f81bef252658e20e0fd3 commit 454212b9718b55b43781f81bef252658e20e0fd3 Author: Michael Tuexen AuthorDate: 2026-02-25 12:55:54 +0000 Commit: Michael Tuexen CommitDate: 2026-02-25 12:55:54 +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 --- 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 8b5d1f504e80..f7c339784693 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1316,7 +1316,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; @@ -1336,7 +1336,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 80d1d58a7866..01f241d29637 100644 --- a/sys/netinet/sctp_syscalls.c +++ b/sys/netinet/sctp_syscalls.c @@ -75,6 +75,8 @@ #include #include +#include +#include #include #include @@ -171,7 +173,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 Wed Feb 25 13:03:46 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLZXn2nqDz6TStP for ; Wed, 25 Feb 2026 13:03:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLZXm1nkmz41mZ for ; Wed, 25 Feb 2026 13:03:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772024632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UBgFVGIFeU091Q0f51jps3P6WhIrv47SMbnkQNKXbr4=; b=ywYXaHlzoIl+5beEyn/QMyTA/0sVqSWRZBPdzDukbKsSPU5ptpkh9qYh1AEAoi/0Aw7pUT DXBEGbK0bZxbcpBmmvRtkP7W6ysjYSFDNan5kb1QQIfYTccU6G/11DeqmEwM3yCGlIXNpV LkhMiJ7FbvgQMPUpilx1rcJ/P6n/kSg1Q1y2XFQA+bKHDS9Zu8rNpISx6EvxO1VFJcqHnO asW8k+sfPyzaEmAfanpx2vFzOZr/QwtEnECiVGqlWQFQXIuK5vEh8DLCJBY/NjbniOGEEw MdC/k9KfmirZnnreUqhUMaaJz6Bg4YpXlxSbQ4gaQ42plE+5GYkbvw8hbj21JQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772024632; a=rsa-sha256; cv=none; b=GlDdyggrQV755m5Ml1TwwkkxgaUVhYIVW8sKVvMflv+tBSZqAu7OyjOmC0+Ma8KSA6lkor 3YDesRxs/FgtciErSLeTQvsGWSIVFq2WNb0SMS3FbJA4V3DDVvisJf+rWNDeJUr0ERUQ2/ pWxqriSlRn7hBl+IlabUi6qkbBrv8MMlPuQblzpaPgfqRaJd23KfV4BbLXFh8BfUUqnb/E Y/wNTNaU4U+AIcjO5O5r5RlUiNzXtBByiZe/m/4RlcjwIMiPDQ279v+uHxMLfIbzoiR2kx 0CwGLUIXHdUOFtuxRc031eagHed/WzZ7ObS2S340EvuVeHl8qJbDVd6ibKXKEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772024632; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UBgFVGIFeU091Q0f51jps3P6WhIrv47SMbnkQNKXbr4=; b=XAIKSdGGd3uhjBGKMHy6CkFF+mIX/TPpAFnax1skNHnZ2X4q2lTH8F44yrkTg9kIdGiA+r TbsrYb3fFSPgkoqt3AuKy18Za29D/V3jieihvyTSDcLdshIyXTUlAv2MRgsEfjBUvQBHhB Tn5qMf/8hmDD6b1Ag8OGS6MT3Bcxg4hTjGjVtKjzBarglBqg7iQjs/uXFhR3WI95a9SmY1 F9A7Zk0U2ukKL5CL4vOS6xSUtiyfoXfrt0nGpMX61laVMOoTCwviXpt8SGCryJc9L0WKJq axtTX1GYUHyFqDnqHqnGdfzunihke9IwlgyB4aKFJLCClSqKVjLFqiqrssOsaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLZXm0Qm9z12N0 for ; Wed, 25 Feb 2026 13:03:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 432c4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 13:03:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Randall Stewart Subject: git: 4e28874a6048 - main - When TCP ECN decides it wants to assure an ACK is sent it needs to do it correctly and with some limits. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e28874a6048f3c5a72a42b5bcfcfc7e71cad8a6 Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 13:03:46 +0000 Message-Id: <699ef332.432c4.5f0d0d29@gitrepo.freebsd.org> The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=4e28874a6048f3c5a72a42b5bcfcfc7e71cad8a6 commit 4e28874a6048f3c5a72a42b5bcfcfc7e71cad8a6 Author: Randall Stewart AuthorDate: 2026-02-25 12:59:04 +0000 Commit: Randall Stewart CommitDate: 2026-02-25 13:03:33 +0000 When TCP ECN decides it wants to assure an ACK is sent it needs to do it correctly and with some limits. So in testing I have found two interesting cases where ECN is going to make it so that an ack will be sent right away. These cases need to be limited to being in the ESTABLISHED state. You don't want ECN sending ACK's when we are transitioning in front or end states. Also we don't start a delayed ack timer at the same time set the ACKNOW flag, thats just plain wrong. Reviewed by: tuexen, rscheff Differential Revision: --- sys/netinet/tcp_ecn.c | 5 ++++- sys/netinet/tcp_input.c | 7 +++++-- sys/netinet/tcp_stacks/rack.c | 5 ++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/sys/netinet/tcp_ecn.c b/sys/netinet/tcp_ecn.c index 31b9418c5fc2..fb650831289e 100644 --- a/sys/netinet/tcp_ecn.c +++ b/sys/netinet/tcp_ecn.c @@ -353,7 +353,10 @@ tcp_ecn_input_segment(struct tcpcb *tp, uint16_t thflags, int tlen, int pkts, in } if (thflags & TH_CWR) { tp->t_flags2 &= ~TF2_ECN_SND_ECE; - tp->t_flags |= TF_ACKNOW; + if ((tp->t_state == TCPS_ESTABLISHED) || + (tp->t_state == TCPS_FIN_WAIT_1) || + (tp->t_state == TCPS_FIN_WAIT_2)) + tp->t_flags |= TF_ACKNOW; } if ((iptos & IPTOS_ECN_MASK) == IPTOS_ECN_CE) tp->t_flags2 |= TF2_ECN_SND_ECE; diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index c015995ffc7a..35a9d7633fa7 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -539,9 +539,12 @@ cc_ecnpkt_handler_flags(struct tcpcb *tp, uint16_t flags, uint8_t iptos) CC_ALGO(tp)->ecnpkt_handler(&tp->t_ccv); - if (tp->t_ccv.flags & CCF_ACKNOW) { - tcp_timer_activate(tp, TT_DELACK, tcp_delacktime); + if (((tp->t_state == TCPS_ESTABLISHED) || + (tp->t_state == TCPS_FIN_WAIT_1) || + (tp->t_state == TCPS_FIN_WAIT_2)) && + (tp->t_ccv.flags & CCF_ACKNOW)) { tp->t_flags |= TF_ACKNOW; + tp->t_ccv.flags &= ~CCF_ACKNOW; } } } diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 42c6757b4b2a..78b0026a8c5d 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -15709,6 +15709,8 @@ rack_do_compressed_ack_processing(struct tcpcb *tp, struct socket *so, struct mb tcp_packets_this_ack(tp, ae->ack), ae->codepoint)) rack_cong_signal(tp, CC_ECN, ae->ack, __LINE__); + if (tp->t_flags & TF_ACKNOW) + rack->r_wanted_output = 1; #ifdef TCP_ACCOUNTING /* Count for the specific type of ack in */ if (tp->t_flags2 & TF2_TCP_ACCOUNTING) { @@ -16566,7 +16568,8 @@ rack_do_segment_nounlock(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, tcp_packets_this_ack(tp, th->th_ack), iptos)) rack_cong_signal(tp, CC_ECN, th->th_ack, __LINE__); - + if (tp->t_flags & TF_ACKNOW) + rack->r_wanted_output = 1; /* * If echoed timestamp is later than the current time, fall back to * non RFC1323 RTT calculation. Normalize timestamp if syncookies From nobody Wed Feb 25 13:04:46 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLZYq1wMrz6TTLs for ; Wed, 25 Feb 2026 13:04:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLZYp6v2qz42M4 for ; Wed, 25 Feb 2026 13:04:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772024687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0AOXOEhjyyP1BaB3XptPCeXmB2ctwWzQ7rihjg5PqWc=; b=OSc4IXGMJ+xz0Bvccfs4b+SwmhFK+oS+VYUXCs6ohnoh/W0FFbP2rYxD3JLLFXcXCW4wT9 0nzXRpQLJ0jy32+yLrcfdKsoNrW7UWZJcvsCh6s63gajlIy1QquQWGvoq9LHQLxQAXPPyw xacTAZwUxt3Zu8HQzPeIW+At9ZJKOHtC9AbSy+fBlLV/ZS4IKt7nQRujO233KA8tBzurB0 YDFuEgfMgrEqm5W6S0AeM6J101i/JvdIoRqhiHsmg48JqwEnfmfjrclphAXXk4D1otYRrm VopN0jkckibj/LjR/1ujmmCt4SAkRHXzQ8yvOCSMvRScy1VmqR2PtVESaz7gbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772024687; a=rsa-sha256; cv=none; b=tIHdWZGJArkSSnr0g28DK5Y+GWpVs1dbZLJanCIoGRcy/k5o+cTL/y5z+rqbPv2bHBlygS thbYFDpIAlgXhX4zA+hJWjZxTRwDo7EvqWJCYySSudKQ6hDrJfRrm/6UMBW7L2YvOU3NXp kbJ/fU7xnbWRKUxXuB6c4eoUYBFByOZ8gJaHyRRlc8+I47osEErLpWOvdWIWbpjSca+NF5 uPca8DNJrn3BNG2mX0cQ/nuGYBn9LuBmNbEAYk194J27XUxi0DJQAAsBGGz1q9rsse4oo6 6eOAnbFTWPY4nUIx6p51nOtga8NE6e+tyO2ljwfPqT4B9CNON7T3V+N7xmH3YQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772024687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0AOXOEhjyyP1BaB3XptPCeXmB2ctwWzQ7rihjg5PqWc=; b=nXvewaGdZZfnwww4L6nuY0wq3SeS6Lqf+4egglC5qaFEPzybEqlf6VHibglLUjuFZ/LcnB KyD+Tbo/+ng2I4UYiky4QUsCkIF6ww6t9vSdi+/+wMb+n6jGO49PR4uX31deX7k0U9m+Ck 940V2O7zxn4UaJNsimUsTNKnFsfnDBW6VkRGXlwuNod8cogiAWb+wHPHx4MPmDW0Il2SB3 lv/B2IhJRpq/gnnc3m/1XwBusgtaY9f3gx6W1UnGLS10Hk6dn1DGHTn5yUq+BKkABXBGiK 6ZEo/FRzYfeCpNSVFpkFkpVDWvl2nWFM1d4OVOAsJ84tUkekVdI/sq8w67KmVw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLZYp6HZlz12qw for ; Wed, 25 Feb 2026 13:04:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44562 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 13:04:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 8d2f910ceb0f - main - tcp: BBLog incoming packets in TCPS_TIME_WAIT List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8d2f910ceb0f1c366bcf2146a5ba1d1074d07933 Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 13:04:46 +0000 Message-Id: <699ef36e.44562.f4e71a8@gitrepo.freebsd.org> The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=8d2f910ceb0f1c366bcf2146a5ba1d1074d07933 commit 8d2f910ceb0f1c366bcf2146a5ba1d1074d07933 Author: Michael Tuexen AuthorDate: 2026-02-25 13:01:50 +0000 Commit: Michael Tuexen CommitDate: 2026-02-25 13:04:37 +0000 tcp: BBLog incoming packets in TCPS_TIME_WAIT PR: 292293 Reviewed by: rrs, rscheff, pouria, Nick Banks, Peter Lei MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D5546 --- 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 259ec7dc50dc..847598422da5 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -75,6 +75,7 @@ #include #include #include +#include #include #include @@ -288,6 +289,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 Wed Feb 25 13:09:24 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLZg872M0z6TTTh for ; Wed, 25 Feb 2026 13: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLZg84tv2z42tB for ; Wed, 25 Feb 2026 13: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=1772024964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rlOU3AijB8f2b8ymAl+Ympzr9Qj1nKP7y5z5VEYLTws=; b=DA2jct/aL53H/x17Ojm/NkxRPcGiBwAEMCtzt42wlGGXadqscnGy/slyo4z1SWZn9NSGpG 87tpy7j8zZz9YBRPccIM9Nv/baPu/nW3IoJeC4fKxrlN3IQyFu0zBB9yPp1eHOTWD8s6qb 5i9YJonLlB4858XCBEkhj/yUcUpSB3mhx8ThjRwDLwSbBYD0fJUnbwiAhiarQRVHMwciy3 kyxyjCHUL6P/u5WhxbDB7IPXXU5c+zVfBOt4izrsJFdhuXjKb54YN9sVjkOFb0I8+iR+xz eK5FIbPXqC+LSRZ/u8PEs16nLRS9pBIFAAqs6p6z1ZrIdBsz/eylLYq/gcDIBw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772024964; a=rsa-sha256; cv=none; b=qDo2CqUo+y6DEKrXTZYRqbuCj/gRJ2B1ZhXc7LIkWKAEFsa/G69Yv+cg+dLAExh/4H8OVg xHioBZIDpWSd98a47BmqSS3yvYARBvGb+Lch1FeL/9DWfym240uuPAk7oI4UVafoI+Mu+U ij88goR5CxP199w83s3ei/57CIQ+hsMOpTFI5Bn65zBv+saFm7c067YkPPSFG4bpK9A3RS ln1Xu85RmTiUScj8soxwqMc0rnsJotm+by9pjawuynJmDnTdiJIjsYjqW77AyXeoUNg0/6 B2+7QuVFgKLOzaqxa3RzLDAuVDWFiSBFAEy1bibIKwKQmb/uxI3dDdDNAoXR+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=1772024964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rlOU3AijB8f2b8ymAl+Ympzr9Qj1nKP7y5z5VEYLTws=; b=JcQ6QMb3I/Nni9KZQyYto2x1fV0o3TUZo98Z/wcQOZ+sGKquxWfC8D/diWNigBJjD0L612 YaQPdcPeQvgwyNTlZ+A2NaSeCK+YV+ajCb0Ovsv++pnj3O4RVqhefgXPIOpoC3GlYamCEP mHOJfakzyntKpHCSh9Se7Yu1nZdsDgeiH6UeBCFd3+gNBiJ5ESOSK9w9ujP2rsFIFXneyL /UykB2epQyRlUprEo1CMiNJ2AjxMs59D+BUFmR57q4YcH1ay5EMrZdEOlD+1qZOhjZPsiG 6fxxoAExPAc9GPrDESUGq+PChnJaKzfy3njgoMZxT5HYVxI2BUUfK5/MgSIJmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLZg83mw3z124v for ; Wed, 25 Feb 2026 13:09:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 43768 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 13:09:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: f3364d3c8c87 - main - tcp: improve handling of segments in TIME WAIT List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f3364d3c8c876074a9a6f68168e5eb8bd60207de Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 13:09:24 +0000 Message-Id: <699ef484.43768.3dbbc2ef@gitrepo.freebsd.org> The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=f3364d3c8c876074a9a6f68168e5eb8bd60207de commit f3364d3c8c876074a9a6f68168e5eb8bd60207de Author: Michael Tuexen AuthorDate: 2026-02-25 13:06:15 +0000 Commit: Michael Tuexen CommitDate: 2026-02-25 13:06:15 +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 MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D55489 --- 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 847598422da5..ba5c90c91e43 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -287,7 +287,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 Wed Feb 25 13:42:06 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLbNt4GTtz6Splg for ; Wed, 25 Feb 2026 13:42:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLbNt3ZCsz4ChJ for ; Wed, 25 Feb 2026 13:42:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772026926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6hgQdH5a5OLK6I9hm1nWixlWzI95zrWL00HZfBKZ53k=; b=grPiM0ttykkmWyLkHwzJtJtRBgPjGEZGPaQm116AEOrfqnuU2ekngwa0wEgVTh13TJpItF ewtokCbqFV9XuFaIn51LK2STw5LG1A4OeRDl80j9N/d+ijgpiQHFuWry9EyuwOsiulcLjT PID43BmAzsFTWzyHgspQyyrdb97ErxtDp0io+dOQJFIZQEdv70H252oEc7wNaoPfTkJc4H Y8VntPUlu+pFYBTCrMtS4cFxRKFJHNPwVa961B57sFHTJRn4hJlUKO1IxACg5ZwrH8sPm4 l5zIa7KjBL1258FzRQQzOQZDkAiF/rRbdblCfGXmCMQG3P37h+71QuzYdDy5UA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772026926; a=rsa-sha256; cv=none; b=R5EGr55Jj+JUbi2C7qALd0ZrNS17RT2JNfWTOOkiFR4K3xTWiyOFfUm4qFi8gJNuUjtK9Y VfPIFX/y8xr7smiBoq/Hgy0OK+FmuYlAcoQSYK3frf89t8o12M1tm7dXH3vjPZPfcsB3wu uta0yNgkolzkJ4IyI7yvgsa35PWmVAl1miVoDg4rUSOBQu+UHbBnjaYP8bcWEy4Qqa+NTV L/Zpab5qJG9+VwnGH4qxEV0JxFb4WUIzkrPCwewspQowqpKNMTNkDf7/QJYIj7yHJYlHUb rtVPRB6xGx75iHMEeTIBHp6m66xA6iP/QGEG3HL1Ska69khRJG8TWoxGOtEw1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772026926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6hgQdH5a5OLK6I9hm1nWixlWzI95zrWL00HZfBKZ53k=; b=bPq1U3IDwDtKOnFhvPukFDv1OxIdkY9vUaU9UreCPd3hzm8U7SpGV5ZPLX4d+vcAQGZrou BYQhmMnLkFu9txXtVC1VQvcXFj95Y16NJzmsl6NPl+iimqfYBkbx8i6W+S8ekOdAaSpN2m XcFyMEJpgjmk5qYiX+uyJEQluleiGtVJjF9FypANo5FL78nv1CmI82dVtxIlwLEUp5naNf gcXWxOXuA3UR70vGouQmoMEUGdXtNZ3qsMTJEM3ZhjOCAHTPmURcv/RjW/G1wF2pUXB6sl 5gXEOVVut5h4x8zsCD78pq+p4+NtTwD2FZmmi1R4EW7SBxv6b8rf/XZ5e/rheA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLbNt35Lnz1478 for ; Wed, 25 Feb 2026 13:42:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 470b8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 13:42:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: b642867c2cc7 - stable/15 - pf: avoid NULL deref on purged states List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b642867c2cc7e06057ba766c9847ecd200c53bd2 Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 13:42:06 +0000 Message-Id: <699efc2e.470b8.732e3c13@gitrepo.freebsd.org> The branch stable/15 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b642867c2cc7e06057ba766c9847ecd200c53bd2 commit b642867c2cc7e06057ba766c9847ecd200c53bd2 Author: Kristof Provost AuthorDate: 2026-02-18 18:23:42 +0000 Commit: Kristof Provost CommitDate: 2026-02-25 09:13:13 +0000 pf: avoid NULL deref on purged states States can be invalidated and still be present in the state table for a while (until the pf_purge thread cleans them up). These states might not have keys set, so we must make sure a state is not purged before we try to access those keys. MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit d60082f16e4c91d4b97d8b3b56b39fa348ecfbda) --- sys/netpfil/pf/pf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 882c7f4cc0dc..8b0fca69827e 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1943,8 +1943,10 @@ pf_find_state(struct pf_pdesc *pd, const struct pf_state_key_cmp *key, /* Look through the other list, in case of AF-TO */ idx = idx == PF_SK_WIRE ? PF_SK_STACK : PF_SK_WIRE; TAILQ_FOREACH(s, &sk->states[idx], key_list[idx]) { - if (s->key[PF_SK_WIRE]->af == s->key[PF_SK_STACK]->af) + if (s->timeout < PFTM_MAX && + s->key[PF_SK_WIRE]->af == s->key[PF_SK_STACK]->af) continue; + if (s->kif == V_pfi_all || s->kif == pd->kif || s->orig_kif == pd->kif) { PF_STATE_LOCK(s); From nobody Wed Feb 25 17:10:12 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLh152L4zz6THnB for ; Wed, 25 Feb 2026 17: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLh151smlz3XZf for ; Wed, 25 Feb 2026 17:10:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772039417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oCUgFhAKH/l6eV0LNJ+oRmuBekLZv8aUmqw68qg91l8=; b=dzw7F/wP9NXVaoaUUcWTGcDY/Qqu55+DyyO/UAKyYoDzAjA6ANSnWLbCvF0hkz9pS0k5DC Io3lGiSQAhVbh8zDx2O3naIqs/FTkVyLHX/lQBbwbmwpEM9CeLazll2/GbAGiEdFuObW0L j7bv1DLj5cazdUNnimHVrLfVi5e8VDdm/I1jXE8cHqxG8UgZzj903POXxJqv0ttfqn2J8z DdbPTFvAdN5BwwC5siNPFHkDz+VG347caWKK2z/jE3MmzqZrkJzn5e2Cegzjz4HVtyiyFN TZKXbSqOl6epDtVnjgf/7H8Fy7eSl4zmPDHbbHVjlj/+y+3bOcCPqatzHBxxBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772039417; a=rsa-sha256; cv=none; b=iravScpz3e2KU7tm4d5L2APwH1CCI0xbBE9JZp9sPKTiv+0W0J1gea93An8tL8mEUb5C9X UfdKnbRsmQaNGp7x9ScjkaL0NlsgCGeOs1K/XOocpPPydcumgoL4G2T3RbL0E2B2Ly72Ag wHICOW0nqodgEKsyfyi1GU4GBeOULzX4HG0XrN1TY6ND+ynmJNYR0eQM5Te7zZfO3vnmiP re5H2xPqQkhOm6bVo0LQNBXJxRM2A6Xc3kmxIhMHGULAa5HrkzhUhjP5QzyadlILgmym3e YqisUKeKuKK0G5rj4pXi7nUbwgNPzYB8APYF8j/JPNNAjJlhT7oFvJeDEclPBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772039417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oCUgFhAKH/l6eV0LNJ+oRmuBekLZv8aUmqw68qg91l8=; b=pQOfy1Z6oc6dDjIH4pJ1ZYFeUjqS9pfmC8gj0sfn5lEfdoAs7PBCP+lqSXNJOcZSDK1p0r 4w1AcareswKtxodVaPFjCUtzEo/OwmVQ15tQtPmeSHVi+cF/g+nh/U8IefMJjiY1kjL0jL TCx6H6TQg9zKjhmw/bFRZHN8RfPKG7Kva/5YYmtoVZ9TdK7JlwYKALm3OXium9eICrZTjS ZLwr7WzjBovSZa4yck9FYE0rf/oqsAuybY2p3WeEIzBDLhzHQlF+TsYK+y53m9T73HEFtG gt92dDyFi75HjlSg40aOJ0hQfg0KbjvztftAZ8FmmiJKZQY8My7iDWUHDuF3ig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLh151RGYz18tb for ; Wed, 25 Feb 2026 17:10:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34474 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 17:10:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 8b64d46fab87 - main - nullfs: Fix handling of doomed vnodes in nullfs_unlink_lowervp() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8b64d46fab87af3ae062901312187f3a04ad2d67 Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 17:10:12 +0000 Message-Id: <699f2cf4.34474.243e2fe@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8b64d46fab87af3ae062901312187f3a04ad2d67 commit 8b64d46fab87af3ae062901312187f3a04ad2d67 Author: Mark Johnston AuthorDate: 2026-02-25 15:31:30 +0000 Commit: Mark Johnston CommitDate: 2026-02-25 15:31:30 +0000 nullfs: Fix handling of doomed vnodes in nullfs_unlink_lowervp() nullfs_unlink_lowervp() is called with the lower vnode locked, so the nullfs vnode is locked too. The following can occur: 1. the vunref() call decrements the usecount 2->1, 2. a different thread calls vrele() on the vnode, decrements the usecount 0->1, then blocks on the vnode lock, 3. the first thread tests vp->v_usecount == 0 and observes that it is true, 4. the first thread incorrectly unlocks the lower vnode. Fix this by testing VN_IS_DOOMED directly. Since nullfs_unlink_lowervp() holds the vnode lock, the value of the VIRF_DOOMED flag is stable. Thanks to leres@ for patiently helping to track this down. PR: 288345 MFC after: 1 week Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D55446 --- sys/fs/nullfs/null_vfsops.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index 170a3dd51cd8..c3eec727aeea 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -461,16 +461,12 @@ nullfs_unlink_lowervp(struct mount *mp, struct vnode *lowervp) vhold(vp); vunref(vp); - if (vp->v_usecount == 0) { + if (VN_IS_DOOMED(vp)) { /* - * If vunref() dropped the last use reference on the - * nullfs vnode, it must be reclaimed, and its lock - * was split from the lower vnode lock. Need to do - * extra unlock before allowing the final vdrop() to - * free the vnode. + * If the vnode is doomed, its lock was split from the lower + * vnode lock. Therefore we need to do an extra unlock before + * allowing the final vdrop() to free the vnode. */ - KASSERT(VN_IS_DOOMED(vp), - ("not reclaimed nullfs vnode %p", vp)); VOP_UNLOCK(vp); } else { /* @@ -480,8 +476,6 @@ nullfs_unlink_lowervp(struct mount *mp, struct vnode *lowervp) * relevant for future reclamations. */ ASSERT_VOP_ELOCKED(vp, "unlink_lowervp"); - KASSERT(!VN_IS_DOOMED(vp), - ("reclaimed nullfs vnode %p", vp)); xp->null_flags &= ~NULLV_NOUNLOCK; } vdrop(vp); From nobody Wed Feb 25 17:20:20 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLhDj1KBcz6TK3q for ; Wed, 25 Feb 2026 17:20:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLhDh6nVDz3ZZq for ; Wed, 25 Feb 2026 17:20:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772040021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fhDb7azHn0/x9uABes9ttNhICuWK/F6PewIId5wBzn0=; b=D/8+1p/oDLd9rIgs6ympOKgMqXHtV+aRFhIZFOMDa+H8Ky6zhTFco3yoxsIEu71G0rwtFK qhpD6QMTYrEHAMEBCa6xPDkbOV6o+1noA6QJiuDTyfgx+hXwgVGO82PYlBW62FMlR7/uK5 Qy5LP8l8sCHINNZXg9OZ/TOCX2uCK2GMMDU1PHXdoUzWS0gNXUW85WQXbyUrY7HOhUS6Hd Kh/XrqtTbR+uaDPImYoeQmznwayOtoJDoQrG63mQ8vmqyyBiGW0+AmZHTnWDQVU8+wpX+a 15af6n2EIfTz6vQ4uXzLEkPv0cWlUF5B7kOoL0jg7uZsPzPrUzBWHLrFep1Rlg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772040020; a=rsa-sha256; cv=none; b=Gke5H/0g4P5Eo8at23S6EhNbPOa2ojydWgFVwgP5hKtVjbtRi4emdFNJDOu7i/E7jEmckk nZJ+oYzrznEbtOaA1wa0nP9jgOxdpNw74+6Ln3Ui5GXMXYAH0NQhYoSo2iqNa17bz7XQTD pAT+JrtE5WDm0wDAXZvY9FCdRdoUPwkI9iLEPDDgtDLjHzgtv/ANpkO9KszVWdY77Vrs8X AXaOTyhJ1s7eSDUE6N5zketKRKESIHY2ocFLXeiYqCWwPgFzkYIQcT4DFiI+upula+yU3S wWNkNKg+LmQsgv9Oy5ohQxvvm2gIgQFIIS6bZ8ZwLun0Py1pZh9+jIvgmeNa8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772040020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fhDb7azHn0/x9uABes9ttNhICuWK/F6PewIId5wBzn0=; b=AcrLNaocnhho9qlXe6zFZDWxPOUxD1O1htIKnAkHYFf/WtmJQ5abJWm0KKQuvUW0HE/Kay MeD8Beh9xCGzQ9w60BN+OpvXPRvve95vPkunyh3NsHAO12gs6qNcwrvEqT4vk+uRvCgygQ 58KLZz3mT0kq6IhV89sOH5ISi3wYKm10Ux7yUjPr1d+GqOL7wBwG8dXn+lwyA87cSEZYLw Rqzt5NM6Mangd7CVn1D8go8zcES73VZbEJVTnZ5xLb6SOdw5z5v4BdNfAnNG1Gk+vu70VO r3nnykZ6hSGHze4FibqyF91lt8pWYVR7NUUktrZYENuUGxfjPk3bygzBmPY53A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLhDh5pLPz19Qb for ; Wed, 25 Feb 2026 17:20:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3891e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 17:20:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 0e5caac7d543 - main - ipsec_offload: add comment stating why ipsec_accel_sa_newkey_cb() returns 0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0e5caac7d543687d540fa83a7125726c7c9e6e58 Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 17:20:20 +0000 Message-Id: <699f2f54.3891e.7d80e848@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0e5caac7d543687d540fa83a7125726c7c9e6e58 commit 0e5caac7d543687d540fa83a7125726c7c9e6e58 Author: Konstantin Belousov AuthorDate: 2026-02-04 02:34:59 +0000 Commit: Konstantin Belousov CommitDate: 2026-02-25 17:19:36 +0000 ipsec_offload: add comment stating why ipsec_accel_sa_newkey_cb() returns 0 Reviewed by: slavash Tested by: Wafa Hamzah Sponsored by: NVidia networking MFC after: 1 week --- sys/netipsec/ipsec_offload.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/netipsec/ipsec_offload.c b/sys/netipsec/ipsec_offload.c index 23d36c395c43..e3a9d3247491 100644 --- a/sys/netipsec/ipsec_offload.c +++ b/sys/netipsec/ipsec_offload.c @@ -343,6 +343,13 @@ ipsec_accel_sa_newkey_cb(if_t ifp, void *arg) } } out: + /* + * Return 0, ignoring any errors from the SA installation. + * This function is a callback for if_foreach_sleep(), which + * stops iteration if one of the callbacks returns non-zero. + * We need to offer the SA to all interfaces that could + * offload it. + */ return (0); } From nobody Wed Feb 25 17:20:21 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLhDk1g94z6TK6R for ; Wed, 25 Feb 2026 17:20:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLhDk0L5Nz3Zcx for ; Wed, 25 Feb 2026 17:20:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772040022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nyc4FUR//0FLYSMaDscLUmM7+cMhY9gWVMcxQviBpJY=; b=HaNBFDkxtMXs+emVBy0wQaRuY9CW+tS+vIiCBLSKmBuf1ZGT3jpqDyzvZtfohy+8YrhqZe QO5nrwAJrQqciKklaFuwt9uQqyq1qHZK4Lud5yB7GJiK4e+3zRcn+CsV8Z/zzerWviE5Ex 029Tl37bOnCW4yvBX6/qKX0YrdN/sg2Y2bdiTrvYPoo5xXqjZYcYxp4HuH679Pmdnpujjt ndbaO3zWdVusHxhGLBkiEVQxeKCdQeyETiNxvKxBfXFqdzCJOq1Mt7hnLOOwKZ/7Lyetme cEj+F1uaAjSRVdw1moAsKCsboZi55KN/YRmZ7J/SHmH1ANqh2HjhWsnS6oSU/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772040022; a=rsa-sha256; cv=none; b=D3xALaf1ZL6b5rMQwdsWejRmIxiuyaUxVn9H6mtEwdxf2HKq7lj6ATcZu+ZefyU6B7/vrx l9ASBZjXLa3htlv3CiS0AsyQZJOTh+mWuCUTRp/AJLaSrNvrtQ+enEzxRfCsEXdP31COtE KmoCZY73ygu0Q+HBCW0CpMxIeMA/n/AtgqH2iWHiN5ry9jUgWizvn/7RidQ95EnrcN2AAI rjm5AogKlJaewVv7/Yg9pKK4xp+zyTgrLtXaRdfFwyQHj/WY/Smlk0gdF78PrS8dYd0p8m 9ATxaciLGGRJFOij7i334pfh7uuz7UDq3/FgJ9rTcTiU1Wu02y4Mbt8hkSlaVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772040022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nyc4FUR//0FLYSMaDscLUmM7+cMhY9gWVMcxQviBpJY=; b=iWUPpevnbHRaLB9ohd0dBflsU/Lf4P+bN+qCPXuxF2CTdzWV9/HTBPvBppQ7CPnHXSeaLe rSLTsO/1Z1WWXq7M3K7twtcQBZF2/sZLjeQvNkhOReNg/4YrgWj3dHl87tkIrqfG076w1k AIAUovmaXDI3m1+zPa6g0AWvnU+8eYw/tXa8QXCiNcMLQ39n58HsjAiPAGDBRvTIIoTrBC 2LSaNhzV1/nQunsG7HX6rUGgkmszpqzhc4GA/Shk9WIUJ5+ZHmvfIjbBH7mYehG6fzzBLS FXFriNJIbDzDzkkkKCKDFv+ruXjLU4x4IiXk2HU6tvnysARcZg8dKFF7bpfBYw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLhDj6djQz18vR for ; Wed, 25 Feb 2026 17:20:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38391 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 17:20:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: de29fd032225 - main - mlx5: report IPSEC offload capabilities whenever IPSEC_OFFLOAD is configured List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: de29fd0322254127c3ebaedbc91ee4f9620f5fdf Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 17:20:21 +0000 Message-Id: <699f2f55.38391.59be0d76@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=de29fd0322254127c3ebaedbc91ee4f9620f5fdf commit de29fd0322254127c3ebaedbc91ee4f9620f5fdf Author: Konstantin Belousov AuthorDate: 2026-01-28 05:32:53 +0000 Commit: Konstantin Belousov CommitDate: 2026-02-25 17:19:36 +0000 mlx5: report IPSEC offload capabilities whenever IPSEC_OFFLOAD is configured Do it always for bootverbose if offload was enabled in the kernel config, not only if the device actually supports all required capabilities to do the offload. Otherwise, having the code to print the caps is pointless. Reviewed by: slavash Tested by: Wafa Hamzah Sponsored by: NVidia networking MFC after: 1 week --- sys/dev/mlx5/mlx5_accel/ipsec.h | 1 + sys/dev/mlx5/mlx5_accel/mlx5_ipsec.c | 19 ++++++++++++++----- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 3 +++ 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/sys/dev/mlx5/mlx5_accel/ipsec.h b/sys/dev/mlx5/mlx5_accel/ipsec.h index c3f3a2372482..8685c07e84db 100644 --- a/sys/dev/mlx5/mlx5_accel/ipsec.h +++ b/sys/dev/mlx5/mlx5_accel/ipsec.h @@ -204,6 +204,7 @@ struct mlx5e_ipsec_pol_entry { /* This function doesn't really belong here, but let's put it here for now */ void mlx5_object_change_event(struct mlx5_core_dev *dev, struct mlx5_eqe *eqe); +void mlx5e_ipsec_report(struct mlx5e_priv *priv); int mlx5e_ipsec_init(struct mlx5e_priv *priv); void mlx5e_ipsec_cleanup(struct mlx5e_priv *priv); diff --git a/sys/dev/mlx5/mlx5_accel/mlx5_ipsec.c b/sys/dev/mlx5/mlx5_accel/mlx5_ipsec.c index 3f3c575c9dad..bdbad6a084d9 100644 --- a/sys/dev/mlx5/mlx5_accel/mlx5_ipsec.c +++ b/sys/dev/mlx5/mlx5_accel/mlx5_ipsec.c @@ -739,13 +739,14 @@ static const struct if_ipsec_accel_methods mlx5e_ipsec_funcs = { .if_hwassist = mlx5e_if_ipsec_hwassist, }; -int mlx5e_ipsec_init(struct mlx5e_priv *priv) +void +mlx5e_ipsec_report(struct mlx5e_priv *priv) { - struct mlx5_core_dev *mdev = priv->mdev; - struct mlx5e_ipsec *pipsec; - if_t ifp = priv->ifp; - int ret; + struct mlx5_core_dev *mdev; + if (!bootverbose) + return; + mdev = priv->mdev; mlx5_core_info(mdev, "ipsec " "offload %d log_max_dek %d gen_obj_types %d " "ipsec_encrypt %d ipsec_decrypt %d " @@ -775,6 +776,14 @@ int mlx5e_ipsec_init(struct mlx5e_priv *priv) MLX5_CAP_FLOWTABLE_NIC_RX(mdev, reformat_del_esp_transport_over_udp) != 0, MLX5_CAP_IPSEC(mdev, ipsec_esn) != 0); +} + +int mlx5e_ipsec_init(struct mlx5e_priv *priv) +{ + struct mlx5_core_dev *mdev = priv->mdev; + struct mlx5e_ipsec *pipsec; + if_t ifp = priv->ifp; + int ret; if (!(mlx5_ipsec_device_caps(mdev) & MLX5_IPSEC_CAP_PACKET_OFFLOAD)) { mlx5_core_dbg(mdev, "Not an IPSec offload device\n"); diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index daa98752c59b..0baeab31b100 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -4713,6 +4713,9 @@ mlx5e_create_ifp(struct mlx5_core_dev *mdev) goto err_rl_init; } +#ifdef IPSEC_OFFLOAD + mlx5e_ipsec_report(priv); +#endif if ((if_getcapenable2(ifp) & IFCAP2_BIT(IFCAP2_IPSEC_OFFLOAD)) != 0) { err = mlx5e_ipsec_init(priv); if (err) { From nobody Wed Feb 25 17:20:23 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLhDl44FTz6TK6W for ; Wed, 25 Feb 2026 17:20:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLhDl1P3Xz3Zg9 for ; Wed, 25 Feb 2026 17:20:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772040023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NJkhGFj2VhcKwNEJoL2Jq5qdTmurkNR8AFBSelPT7jA=; b=FYSVseSmPKkJZLar13vzU8wCVT6nDi4YOyxVrkK+VHyTNOpxl0YhRKCkGfk7pe1uJxt/P5 rF2CqHqN+RD3OyWs6iKUFHge0pX6Qz6fJiXMesSgITbLenxDZYgTEH8cfb6appWOV5e2yS gkJip3h2HRYKTBJvlle/Kkt0nZyy9I4zdlvudicVcmElfGMYMd2zILbeVw0DClSnqhclke pMDSpoRDOlZupACnvVlGE2EWXapABePE+PEEoqKptzKH+p7iJie92bG4halKqRqBj8bd7n j+4J/vTqCVO/0rk0DmVDBENmCHoq/gOe/IOYSA7RDbShUISbW4ZBWmUXZ9GDpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772040023; a=rsa-sha256; cv=none; b=ZVH+KAYBgABAeFuDGt6JwrdWlzujbFtD4xqgFTtIramkDPkdzycJrdbWBU5i7ABfcaeLgr k2xJRLNoRcaWm+RythCYG56e4RTlCjRTtitZCT54jstXaXNVxrUknmZSFlMyGTDzTBWDGZ sP+A7wmWEDo8/FKlEkMjsHK2x0UUmCt4K6UkEIvBNTn6VHGG721Xy8w/x2MPRdZqmgWNia vD0GSTcQXyxueRvfGZB7OqiZyzqnFm/8r/HeFehE78iwmodWLBGgJJGhPnMVMjfdjVRIH/ MItfSdZoIdP3cUFL0RgwPWjGc24hFdnmsF/I260jTN862y6I97warizmdbd2Yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772040023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NJkhGFj2VhcKwNEJoL2Jq5qdTmurkNR8AFBSelPT7jA=; b=yzBMb0JUefBXfX/FFuXwjr/U/xvz40fUmj7L28KTgtRITWd+NP7MFhxfQNv3kU475Tos3p GEBrpkcm7UL7pWPgPS26DHOs7E/tFQIKp3i5+2EBr5HMwffZcnPD+3/TBKgXsEC/3MAOWO A5NcfKltOQ6V34GWEKqJjMF0YnOQTavJWuVwuFyzl0VFS0/ugjHK0GSUbV0ryQWyAKbDQE YK2gAk7p/8gRF4tke2Sb82ki1nNq3wed4ireY6olTA1U4LL7Lyo1RTMZNwTA/4tFmAtMLS b36lGeU5Olx4BmwGs4MAPSUxNHgVOQenOUZZ4r1Mgpv36MsYiveQH5lMehym1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLhDl0HjNz19Qc for ; Wed, 25 Feb 2026 17:20:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37432 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 17:20:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 87ca74de89e0 - main - mlx5: convert GET_TRUNK_IF() to function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 87ca74de89e0ae96774674f7ae14d303fad5b780 Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 17:20:23 +0000 Message-Id: <699f2f57.37432.4a747006@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=87ca74de89e0ae96774674f7ae14d303fad5b780 commit 87ca74de89e0ae96774674f7ae14d303fad5b780 Author: Konstantin Belousov AuthorDate: 2026-01-29 00:25:01 +0000 Commit: Konstantin Belousov CommitDate: 2026-02-25 17:19:36 +0000 mlx5: convert GET_TRUNK_IF() to function Reviewed by: slavash Tested by: Wafa Hamzah Sponsored by: Nvidia networking MFC after: 1 week --- sys/dev/mlx5/mlx5_accel/mlx5_ipsec.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/sys/dev/mlx5/mlx5_accel/mlx5_ipsec.c b/sys/dev/mlx5/mlx5_accel/mlx5_ipsec.c index bdbad6a084d9..325c70969306 100644 --- a/sys/dev/mlx5/mlx5_accel/mlx5_ipsec.c +++ b/sys/dev/mlx5/mlx5_accel/mlx5_ipsec.c @@ -418,24 +418,30 @@ err_xfrm: return err; } -#define GET_TRUNK_IF(vifp, ifp, ept) \ - if (if_gettype(vifp) == IFT_L2VLAN) { \ - NET_EPOCH_ENTER(ept); \ - ifp = VLAN_TRUNKDEV(vifp); \ - NET_EPOCH_EXIT(ept); \ - } else { \ - ifp = vifp; \ +static struct ifnet * +mlx5_get_trunk_if(struct ifnet *vifp) +{ + struct epoch_tracker et; + struct ifnet *res; + + if (if_gettype(vifp) == IFT_L2VLAN) { + NET_EPOCH_ENTER(et); + res = VLAN_TRUNKDEV(vifp); + NET_EPOCH_EXIT(et); + } else { + res = vifp; } + return (res); +} static int mlx5e_if_sa_newkey(struct ifnet *ifpo, void *sav, u_int dev_spi, void **privp) { struct mlx5e_ipsec_priv_bothdir *pb; - struct epoch_tracker et; struct ifnet *ifp; int error; - GET_TRUNK_IF(ifpo, ifp, et); + ifp = mlx5_get_trunk_if(ifpo); pb = malloc(sizeof(struct mlx5e_ipsec_priv_bothdir), M_DEVBUF, M_WAITOK | M_ZERO); @@ -478,10 +484,9 @@ static int mlx5e_if_sa_deinstall(struct ifnet *ifpo, u_int dev_spi, void *priv) { struct mlx5e_ipsec_priv_bothdir pb, *pbp; - struct epoch_tracker et; struct ifnet *ifp; - GET_TRUNK_IF(ifpo, ifp, et); + ifp = mlx5_get_trunk_if(ifpo); pbp = priv; pb = *(struct mlx5e_ipsec_priv_bothdir *)priv; @@ -516,10 +521,9 @@ mlx5e_if_sa_cnt(struct ifnet *ifpo, void *sa, uint32_t drv_spi, void *priv, struct mlx5e_ipsec_priv_bothdir *pb; u64 packets_in, packets_out; u64 bytes_in, bytes_out; - struct epoch_tracker et; struct ifnet *ifp; - GET_TRUNK_IF(ifpo, ifp, et); + ifp = mlx5_get_trunk_if(ifpo); pb = priv; mlx5e_if_sa_cnt_one(ifp, sa, drv_spi, pb->priv_in, @@ -652,12 +656,11 @@ mlx5e_if_spd_install(struct ifnet *ifpo, void *sp, void *inp1, void **ifdatap) { struct mlx5e_ipsec_pol_entry *pol_entry; struct mlx5e_priv *priv; - struct epoch_tracker et; u16 vid = VLAN_NONE; struct ifnet *ifp; int err; - GET_TRUNK_IF(ifpo, ifp, et); + ifp = mlx5_get_trunk_if(ifpo); if (if_gettype(ifpo) == IFT_L2VLAN) VLAN_TAG(ifpo, &vid); priv = if_getsoftc(ifp); From nobody Wed Feb 25 17:20:19 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLhDn49D2z6TK6c for ; Wed, 25 Feb 2026 17:20:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLhDm75M7z3ZTn for ; Wed, 25 Feb 2026 17:20:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772040025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OcZxEfvuEKOSKcQLpA3fS2lnF+XIG1oZ6fA44+VtWok=; b=LiGV1hDXNRP7zJ+flXxtK3pd0JHxg1yBr3W1XH05XFPsc4mAI/+0Yo5pAvPuCHARdw4Pad /bUluxUTZW8bM9NDMkgVJorNu8Rcp4cfRgWB2vCoK6d6IP0rMOhzlgG7E/Q5V/RLKaIER/ /chAy3cpNPc5XZrtIXEjh6oC5C41Rj6QC2hn3dIQ8oPNLjkW5fbsbiIiZiNOtKt580/tft ftyvMZsieLPEyQcWzPr/FEBgTrA9KmD60uJLoURidDGG6ZcY8tXOgxKRx46tuzE0nOpkKu 8iR/RlO87SLwBjk5blDGW4UEOuUYLKaEpiFKgjFrC3Dqnh4UjHf6nQ0R6Ce9tQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772040025; a=rsa-sha256; cv=none; b=dTPdS9ucEhrhZlnvvKtpwe4DLEOQQoRSzvZkHxQS29kPWtdtzVa312c44SWsTGW9Bfr2G/ R1TJSaAZ6ZZuQVNNLrAOENHNckVc8cJ6I0sgL2I1gw8vkxujf8ZAOWujtx5WukkiMU5iEn aZZGGGxDZ8uhjrO8U9naDhIA3/b4PiyFm3kZ+l5SlRRTVTwtMXt0Vo/HTS3yRl55y6isS2 8E7ZEWQq7DTvhjBmBUyP02JUro7qFEi1lQ4/KwFf7mfcnXeKmURg5oyRhE9x1TdZ38ZjkT sD+JJMkR5IjlzHhmMT7Zoa0JTaaMfaE2Xb7QQmqHjOt6gX4YEZcd5cD1V2SgYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772040025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OcZxEfvuEKOSKcQLpA3fS2lnF+XIG1oZ6fA44+VtWok=; b=Il1uTVHtfSi+8OFBCoUf0x8lYASyxMBELF8i01PKGbm7nPnbCq64xETAQh6UDr2DX1OyhC VTa7m3Cm18x9gLAWvCu9lc+2TjV5KAsO5NDAA9JDiVTNoRgf5koJnKtSjmzMAy23j1mMLC 4Ad9VcOaamjj/NlICjEg0hORqXRmFwIMlst9PoLrLBSlNWi+X16HUNipYk4Zb5s4dmzsLj I0vTNVusdbdOv29bxfNc1IzI4Vje+2siZjwlzJ5AC1tg0dv0ctZppb0w5r3rNuzDxjVCy+ qgpnyM/s3BjJ3Y4PGxsYzNLKUlMgULkxolCrf/0U0eyxu8ptNb6NdFVs7aqJiQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLhDm6V35z19Lb for ; Wed, 25 Feb 2026 17:20:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3777b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 17:20:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 477f020c7b54 - main - netipsec/ipsec_offload.c: handle failures to install SA nicely List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 477f020c7b5453bcd3bff7f1491e9830027b271e Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 17:20:19 +0000 Message-Id: <699f2f53.3777b.68820e75@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=477f020c7b5453bcd3bff7f1491e9830027b271e commit 477f020c7b5453bcd3bff7f1491e9830027b271e Author: Konstantin Belousov AuthorDate: 2026-01-27 01:00:36 +0000 Commit: Konstantin Belousov CommitDate: 2026-02-25 17:19:36 +0000 netipsec/ipsec_offload.c: handle failures to install SA nicely If driver refused to install SA, record rejected handle for SA on the interface always, not only for EOPNOTSUPP case. The ipsec_accel_output() function did the right thing if there is no rejection handle, but not having the handle allows further attempts to install the SA on the interface. If driver installed the SA, but ipsec_accel_handle_sav() returned error, uninstall the SA from the interface. Hardware must not be set up to process packets for which kernel expects no processing is done. In both cases, free the drv_spi if a handle was not installed. But keep drv_spi allocated if the deinstall returned an error from the driver. Reviewed by: slavash Tested by: Wafa Hamzah Sponsored by: NVidia networking MFC after: 1 week --- sys/netipsec/ipsec_offload.c | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/sys/netipsec/ipsec_offload.c b/sys/netipsec/ipsec_offload.c index 632e99b8cfce..23d36c395c43 100644 --- a/sys/netipsec/ipsec_offload.c +++ b/sys/netipsec/ipsec_offload.c @@ -308,23 +308,38 @@ ipsec_accel_sa_newkey_cb(if_t ifp, void *arg) dprintf("ipsec_accel_sa_newkey: driver " "refused sa if %s spi %#x\n", if_name(ifp), be32toh(tq->sav->spi)); - error = ipsec_accel_handle_sav(tq->sav, - ifp, drv_spi, priv, IFP_HS_REJECTED, NULL); - /* XXXKIB */ } else { dprintf("ipsec_accel_sa_newkey: driver " "error %d if %s spi %#x\n", error, if_name(ifp), be32toh(tq->sav->spi)); - /* XXXKIB */ + } + error = ipsec_accel_handle_sav(tq->sav, ifp, drv_spi, priv, + IFP_HS_REJECTED, NULL); + if (error != 0) { + dprintf("ipsec_accel_sa_newkey: handle_sav REJECTED " + "err %d if %s spi %#x\n", error, + if_name(ifp), be32toh(tq->sav->spi)); + free_unr(drv_spi_unr, drv_spi); } } else { error = ipsec_accel_handle_sav(tq->sav, ifp, drv_spi, priv, IFP_HS_HANDLED, NULL); if (error != 0) { - /* XXXKIB */ - dprintf("ipsec_accel_sa_newkey: handle_sav " + dprintf("ipsec_accel_sa_newkey: handle_sav HANDLED " "err %d if %s spi %#x\n", error, if_name(ifp), be32toh(tq->sav->spi)); + error = ifp->if_ipsec_accel_m->if_sa_deinstall(ifp, + drv_spi, priv); + if (error == 0) + free_unr(drv_spi_unr, drv_spi); + /* + * If driver refused to deinstall the SA, keep + * drv_spi leaked so that it is not reused. + * The SA is still programmed into the + * hardware with the drv_spi ident, so it is + * better to leak the drv_spi then reuse for + * another SA and have issues due to aliasing. + */ } } out: From nobody Wed Feb 25 17:52:00 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLhxX1skJz6TNdL for ; Wed, 25 Feb 2026 17:52:16 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLhxW39svz3gtK for ; Wed, 25 Feb 2026 17:52:15 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b="D/X4YgCo"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of yaneurabeya@gmail.com designates 2607:f8b0:4864:20::42c as permitted sender) smtp.mailfrom=yaneurabeya@gmail.com Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-826c49b7628so16190b3a.0 for ; Wed, 25 Feb 2026 09:52:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772041933; x=1772646733; darn=freebsd.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=EDjzfVLRUKa7ZYPnLyAVv6qvrrORjygse1rce365qxo=; b=D/X4YgCodDvmLuuvm9hlycWXWF+E9jVTq32NS1v3CfhQb6dUKBjU34ZrVBXaIPEMpw XTTqYxsDAC8+oHcnTcYBamSGlmeXAqhSM460D70Xe7QZs4m39e6gka76gv6ORIA5hTca psESohEZFzVq/McL1Vc+fLxWUTuP85D2Xe20eGJb9wZS35AbvxKLp8dU6WTTBC/DKO6c 60Db5L7MsDhNvpbXpp4KH23UM7mPbbITwc8fsWRaq0RMB5FHKUSE+anLmHjFms6tVMbW dt1lJH7eIO4QhlJ/V8o+h/uXjcK+79167dsguPCB4XvOCgLAk1CvBpVWnzljmxMzPKfI bpIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772041933; x=1772646733; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=EDjzfVLRUKa7ZYPnLyAVv6qvrrORjygse1rce365qxo=; b=esi8kfTjkrod/oYNflw3LllCRZLxHgEuUidmdNAbXsWh/Ngn63H6H2whjQEu6gzzjt uLc+dGEhL7a25krRoxiKUJD4UeozwaTbA+IJ/qpPGOvdfLLNxRMcg18Ei4Uq0LS+GiBB +NZb/AxY58e9QYiOVtLqojwUbN7aSDawtxTSt4bPHwrI5JOTTMU7oXSaQSG09fHQB52O IJok1aD3wZXIDEh9ZoY0Z2WU7Dmz8mffZUb08lqndFHy7ZTJj539MDO5u8zt7jwMsiim lPdcyh8aAhd8Gib41G6ec3M8uGSQgkcGA4BH6//GQJkJLM8mYxIGRJEEQxGIEJW4BsyE QlCQ== X-Forwarded-Encrypted: i=1; AJvYcCXLWDUgiQiCjyNCbhiwBMex7Tlh0qCCT6QRs2QEmmhweucrPMS8TpIVcT/Qyzq4LauxZboc4/g8jPCTI9q8++QDscxU@freebsd.org X-Gm-Message-State: AOJu0YyhyKGsLdBdlH+iM97hBO7lpIMqv7v7pohzSST8Vf1TCgEcHUwr 7w2mk2bHXb4Qroi/1763VPooqTo69SQblxCDp5H0kpr1qaHRvecx37wMWx/49aKp X-Gm-Gg: ATEYQzyR8I8fGhh3XYLxYef/37WxrM80Y7fA9FpydzmlyzULxMH8A//0+mF7LsBg3fz 5P+UBCP8nXO6t1Th34oYsgMB+ymmEjAUxdJavXGneNHBzT95UMPa7yNzYojbZCKYZ01kvMnZp+C RKmi62N6da2zyyqPGd9TR0+Ha7PCkfzczP8+ZvDRJkboUFbksTNThRJaIHUix6GdpjVKyEnnE06 K1I6J212AgX40ktz9tBrFZ/ahMh+0EQCLKk3KkXs/Sgz9nzWndJOhBfxBjF8xFQFylCpGTZp2xY 9ZWBAOSV8M5mEnAm0stljpTF2Wg6El0sV1Z0hRxZW9gD44s3dsDDr1cSJQ3Pl0qXQfw6vfTFy73 OCzUWAtje07PyS5EDYM2Ok99yP+gQfvc0kX7u/dSUK51M0Laxcj9YmzkUGlLRhWcXunxIbzRoNU VcoKtsD2YufAJBnWsqqhNUQrXmbo0V2TZFzmYaNdet X-Received: by 2002:a05:6a00:895:b0:81b:bc05:e27d with SMTP id d2e1a72fcca58-8273375f52fmr1088940b3a.40.1772041932655; Wed, 25 Feb 2026 09:52:12 -0800 (PST) Received: from smtpclient.apple ([162.118.1.182]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-826dd8ecc83sm14245700b3a.62.2026.02.25.09.52.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Feb 2026 09:52:12 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81.1.4\)) Subject: Re: git: 64dab63f3b3b - main - LinuxKPI: Use negative bit field size to trigger BUILD_BUG_ON_ZERO From: "Enji Cooper (yaneurabeya)" In-Reply-To: <202201101950.20AJor0m009372@gitrepo.freebsd.org> Date: Wed, 25 Feb 2026 09:52:00 -0800 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <241DCDC1-B8A5-43CF-9FAA-19406EB8A996@gmail.com> References: <202201101950.20AJor0m009372@gitrepo.freebsd.org> To: Vladimir Kondratyev X-Mailer: Apple Mail (2.3826.700.81.1.4) X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_DN_EQ_ADDR_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::42c:from] X-Rspamd-Queue-Id: 4fLhxW39svz3gtK X-Spamd-Bar: --- > On Jan 10, 2022, at 11:50=E2=80=AFAM, Vladimir Kondratyev = wrote: >=20 > The branch main has been updated by wulf: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D64dab63f3b3b6c6a1f8a92f43bed0aa2= 8319d627 >=20 > commit 64dab63f3b3b6c6a1f8a92f43bed0aa28319d627 > Author: Vladimir Kondratyev > AuthorDate: 2021-12-25 18:42:15 +0000 > Commit: Vladimir Kondratyev > CommitDate: 2022-01-10 19:49:38 +0000 >=20 > LinuxKPI: Use negative bit field size to trigger BUILD_BUG_ON_ZERO >=20 > compile time assertion on non-NULL pointers. Tests conducted show = that > _Static_assert, negative array size method and current code does = not > handle pointers well enough. Bit field method solves this problem. >=20 > This change is derrived from Linux implementation of = BUILD_BUG_ON_ZERO. >=20 > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D33674 > --- > sys/compat/linuxkpi/common/include/linux/kernel.h | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) >=20 > diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h = b/sys/compat/linuxkpi/common/include/linux/kernel.h > index 419dae214396..a84f577dd912 100644 > --- a/sys/compat/linuxkpi/common/include/linux/kernel.h > +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h > @@ -109,9 +109,7 @@ > #define BUILD_BUG_ON_MSG(x, msg) BUILD_BUG_ON(x) > #define BUILD_BUG_ON_NOT_POWER_OF_2(x) BUILD_BUG_ON(!powerof2(x)) > #define BUILD_BUG_ON_INVALID(expr) while (0) { (void)(expr); } > - > -extern const volatile int lkpi_build_bug_on_zero; > -#define BUILD_BUG_ON_ZERO(x) ((x) ? lkpi_build_bug_on_zero : 0) > +#define BUILD_BUG_ON_ZERO(x) ((int)sizeof(struct { int:-((x) !=3D 0); = })) Hi Vladimir, I think this change is causing build problems now with gcc14. = Please see the snippet from = https://ci.freebsd.org/job/FreeBSD-main-amd64-gcc14_build/2986/consoleText= below. Thanks, -Enji --- all_subdir_rtw89 --- --- core.o --- In file included from = /workspace/src/sys/compat/linuxkpi/common/include/linux/kernel.h:44, from = /workspace/src/sys/compat/linuxkpi/common/include/linux/skbuff.h:39, from = /workspace/src/sys/compat/linuxkpi/common/include/linux/ip.h:40, from /workspace/src/sys/contrib/dev/rtw89/core.c:9: /workspace/src/sys/contrib/dev/rtw89/core.c: In function = 'rtw89_bcn_calc_drift': = /workspace/src/sys/compat/linuxkpi/common/include/linux/build_bug.h:60:33:= error: statement with no effect [-Werror=3Dunused-value] 60 | #define BUILD_BUG_ON_ZERO(x) ((int)sizeof(struct { int:-((x) = !=3D 0); })) | ^ /workspace/src/sys/compat/linuxkpi/common/include/linux/sort.h:37:9: = note: in expansion of macro 'BUILD_BUG_ON_ZERO' 37 | BUILD_BUG_ON_ZERO(swap); \ | ^~~~~~~~~~~~~~~~~ /workspace/src/sys/contrib/dev/rtw89/core.c:2575:9: note: in expansion = of macro 'sort' 2575 | sort(drift, RTW89_BCN_TRACK_STAT_NR, sizeof(*drift), = cmp_u16, NULL); | ^~~~= From nobody Wed Feb 25 20:19:12 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLmC41zhcz6TghZ for ; Wed, 25 Feb 2026 20:19:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLmC41BC6z41PK for ; Wed, 25 Feb 2026 20:19:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772050752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HrhJzI+sDZWqOjaqstHg/jjABh863vNA0FFPSJU5onU=; b=xEnclVxYKbxJdvYX1mcOxt+h6r5I58zoiPMpjK5EthoMyFjvBvB+zk+Q/bmGO71TroXZV1 HNd4ZfvsCIT8Sh4SdokWpgpzNpfKEWyb80scTOyU8dBKijorXTT/LWdSUJPzgPNldB4TG3 tqg0dQeiryXch7VgDw0+ilKSnE3S63RVkiy2YfWexegSZD35GjwieJMsLafAtOrGSU0AIx tblgx0eWkwm42YC/dzrRFrf2AvEbdcEBmEFStYd+dwVhIMgG6dOrZsikWxayBSL1Nr4H0w wTNdFc9W068lQRwQ74+SP/SPbI3J40psyuEWs8y2ebrXiDwdu1nT13f4HoPDjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772050752; a=rsa-sha256; cv=none; b=LXjHBpSmpUj35zjGfup5mFUiOStg+Iy86JB6MoaTih5d6dh1uPTMMO2Ga7Vq2Qsi2bjtJb Vv8hrnHa54FafsZjm1i+zrb8DZjze5o1yJoGLw345vjXFwUMI+rhujswbBJ71egk2PrEiw A+Lm/1YEOoNddWMl/1+9hODRi2oPcSq/2TF0mjHw+fUDF92vZ5Sz3KubZiEv5XlSmlQSXW fBUBRhZ70PdsfFUmsWOaDoC7oAhU5G4265nayQBBVUjG+J/b22ohPro1Pn3M7oVreRJfXw MaNpoMMnMyVpxcrzY+93MjaG0e4Dk/CbXiU3SmHbjsJkDlEVsQiG4G+/dAKfJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772050752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HrhJzI+sDZWqOjaqstHg/jjABh863vNA0FFPSJU5onU=; b=Y9yB6Z+6c9uEHxbC7qCSHSzuOLisvHjZm45vFkhHcPVeql5nqxHpf1iZKHB/b4p8Na0jUl AseUg7emN5vP83jnHHRShRNDFzO5bkGPtr6XMAFenlza63S9yrdgl3wRSZai3BLNd9wF0g 4EM8hrMQCDHnenSUbXtg0pkrtNp3/HI6cJ5C0cNL8xrytNfye5tZmqBFrqcAflVutPdrTV RYBPydJLX0qf4baUJjlJn5EVGb9jEOTnlc8UcBd0xSTk0nFJ7H0NcbMV5zjTi+8PzvhNhi TtNMXUWAtIpuM9ZtIhwruncVHQ9ZARB3ctq+UbBNprpcux+O7bbs7yCFqqa1HQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLmC40V4dz1GBk for ; Wed, 25 Feb 2026 20:19:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21ef0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 20:19:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric van Gyzen Subject: git: 722fbfef0abb - main - ffs snapshots: pass valid args to vn_start_write List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vangyzen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 722fbfef0abb4de31fb91fd35f9b85fd534725c4 Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 20:19:12 +0000 Message-Id: <699f5940.21ef0.1823f74a@gitrepo.freebsd.org> The branch main has been updated by vangyzen: URL: https://cgit.FreeBSD.org/src/commit/?id=722fbfef0abb4de31fb91fd35f9b85fd534725c4 commit 722fbfef0abb4de31fb91fd35f9b85fd534725c4 Author: Eric van Gyzen AuthorDate: 2026-02-25 16:26:06 +0000 Commit: Eric van Gyzen CommitDate: 2026-02-25 16:44:38 +0000 ffs snapshots: pass valid args to vn_start_write If the initial no-wait vn_start_write fails, we pass the old PCATCH flag to the following sleepable vn_start_write. Following a75d1ddd74, that flag should be V_PCATCH. Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D55512 --- sys/ufs/ffs/ffs_snapshot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index 31823458ed8a..a024cbf84283 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -282,7 +282,7 @@ restart: NDFREE_PNBUF(&nd); vput(nd.ni_dvp); if ((error = vn_start_write(NULL, &wrtmp, - V_XSLEEP | PCATCH)) != 0) + V_XSLEEP | V_PCATCH)) != 0) return (error); goto restart; } From nobody Wed Feb 25 21:12:53 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLnP12ybzz6TnYk for ; Wed, 25 Feb 2026 21:12:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLnP113qqz47Dp for ; Wed, 25 Feb 2026 21:12:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772053973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AEUabYiJLEWqTEUEOVh3BfQTtfltTdSDlWBZtmYZh7M=; b=nf4uIlbpmGShVrmHbkvOy5PaIQS5Mq+zoTUjah5tc7swiTvGIDf67yoN7yu2EK4KhMvOa8 1q6D1QzNVoGm1HEssE/xrxrSPLsITd2zeqswrtyAc6ITd9B1pZ3cKomYgGJUF2NuBm8vaF 4j5j4+iBK1wlZ/ev0oShljbm3P/FVa1S/Oskct6HyeRpbyPNEk9V9jdptw7wLXQFq/Uplw VNx1Dox2BusrbFX2g0Sgsooo4U+L5cxdXn+6vYlMFAIRvKGPhmGf3njX1jvvQOUxuq5kUK 4Fu6L/hMu8OwdEu7ELVDuCbnd0OeIHmfEoxbliAtjd31V8u1aM9w35mEW3zB4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772053973; a=rsa-sha256; cv=none; b=dwZNwrXd72V9pe04VJUMmxKYqHf+utxRA3P94qQZe4KaJIFy7Ujdr6st5dpp6ghJBtpIDJ MnyKJ6aVogovo4hqXl+X1d7uG4uI0yIrIW0CoetbxDXN/9f+qkW6yaPDItCeIPhzSy07fN 5LagH3Q/3RgGAiBgxLzjF+bt678kI6Q5DMIhadGngkf82/udLSD0IyeZRxsfeAUli+qXBw v2zyKu3FHeAkTxGIbJYThLvAZ0DV8kY9TnzUK7XC0bWwqc3b6mxj7eBz/T30T5dlsbXjXI 6ggWJ0Vr/Rd9rlIf7xcoGWvgkpKmkxwURXLcgMSKIjsFgKa1VqL3M5zV+AG2xQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772053973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AEUabYiJLEWqTEUEOVh3BfQTtfltTdSDlWBZtmYZh7M=; b=LBTOZAsXo/BP9vDLagzAQ7R1dR0gfpNdf58MErOTSGc4OignmZnXpN961P5zQSS/9qNRmv 792xmdarFCl7fILcH4I3c+A8xDppvNASXm3uukH0lasqoDy+uXXww+c7hXCi0pOLpo8CTs hTiWtjLwxX+aw6Rtc2YFYv7zDV38kCCgXxwVDDP+t2vMKWOW8vP510fQQuZg2GWFDxyil7 WT3ZB624e+pZUfdYATvhxQYuf+uqXa0q/lbUubMf8dhWPAmC5srIIgrJo5XWEn3230yGxR oQvZuxSbWteNivp4Z+oorFuE2qW6sclgckxDujm28U021OpByMzLE/r/NOMS9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLnP10f8Kz1Hfr for ; Wed, 25 Feb 2026 21:12:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30816 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 21:12:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 6e589e6e8e64 - main - system(3): Improve signal handling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6e589e6e8e64793adb437c561ec084dbb6ad1ced Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 21:12:53 +0000 Message-Id: <699f65d5.30816.41b354e9@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=6e589e6e8e64793adb437c561ec084dbb6ad1ced commit 6e589e6e8e64793adb437c561ec084dbb6ad1ced Author: Dag-Erling Smørgrav AuthorDate: 2026-02-25 21:12:21 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-25 21:12:21 +0000 system(3): Improve signal handling Ignore SIGINT and SIGQUIT and block SIGCHLD, as POSIX requires. To deal with the concurrency problem described in POSIX, we keep track of the count of concurrent invocations. We ignore and block signals only when the counter was zero before we incremented it, and restore them only when the counter reaches zero after we decrement it. Note that this does not address the issue of thread cancellation. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: bnovkov, sef, kevans Differential Revision: https://reviews.freebsd.org/D55471 --- lib/libc/stdlib/system.c | 116 +++++++++++++++++++++++++++++------------------ 1 file changed, 73 insertions(+), 43 deletions(-) diff --git a/lib/libc/stdlib/system.c b/lib/libc/stdlib/system.c index b581a6ec3b14..17dd63eb52f9 100644 --- a/lib/libc/stdlib/system.c +++ b/lib/libc/stdlib/system.c @@ -32,21 +32,22 @@ #include "namespace.h" #include #include + +#include +#include #include -#include #include +#include #include #include -#include -#include #include "un-namespace.h" #include "libc_private.h" +#include "spinlock.h" #pragma weak system int system(const char *command) { - return (((int (*)(const char *)) __libc_interposing[INTERPOS_system])(command)); } @@ -54,54 +55,83 @@ system(const char *command) int __libc_system(const char *command) { - pid_t pid, savedpid; - int pstat; - struct sigaction ign, intact, quitact; - sigset_t newsigblock, oldsigblock; + static spinlock_t lock = _SPINLOCK_INITIALIZER; + static volatile unsigned long concurrent; + static struct sigaction ointact, oquitact; + struct sigaction ign; + sigset_t sigblock, osigblock; + int pstat = -1, serrno = 0; + pid_t pid; - if (!command) /* just checking... */ - return(1); + if (command == NULL) /* just checking... */ + return (1); - (void)sigemptyset(&newsigblock); - (void)sigaddset(&newsigblock, SIGCHLD); - (void)sigaddset(&newsigblock, SIGINT); - (void)sigaddset(&newsigblock, SIGQUIT); - (void)__libc_sigprocmask(SIG_BLOCK, &newsigblock, &oldsigblock); - switch(pid = vfork()) { /* - * In the child, use unwrapped syscalls. libthr is in - * undefined state after vfork(). + * If we are the first concurrent instance, ignore SIGINT and + * SIGQUIT. Block SIGCHLD regardless of concurrency, since on + * FreeBSD, sigprocmask() is equivalent to pthread_sigmask(). */ - case -1: /* error */ - (void)__libc_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); - return (-1); - case 0: /* child */ + if (__isthreaded) + _SPINLOCK(&lock); + if (concurrent++ == 0) { + memset(&ign, 0, sizeof(ign)); + ign.sa_handler = SIG_IGN; + sigemptyset(&ign.sa_mask); + (void)__libc_sigaction(SIGINT, &ign, &ointact); + (void)__libc_sigaction(SIGQUIT, &ign, &oquitact); + } + sigemptyset(&sigblock); + sigaddset(&sigblock, SIGCHLD); + (void)__libc_sigprocmask(SIG_BLOCK, &sigblock, &osigblock); + if (__isthreaded) + _SPINUNLOCK(&lock); + + /* + * Fork the child process. + */ + if ((pid = fork()) < 0) { /* error */ + serrno = errno; + } else if (pid == 0) { /* child */ /* - * Restore original signal dispositions and exec the command. + * Restore original signal dispositions. */ - (void)__sys_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); - execl(_PATH_BSHELL, "sh", "-c", command, (char *)NULL); + (void)__libc_sigaction(SIGINT, &ointact, NULL); + (void)__libc_sigaction(SIGQUIT, &oquitact, NULL); + (void)__sys_sigprocmask(SIG_SETMASK, &osigblock, NULL); + /* + * Exec the command. + */ + execl(_PATH_BSHELL, "sh", "-c", command, NULL); _exit(127); + } else { /* parent */ + /* + * Wait for the child to terminate. + */ + while (_wait4(pid, &pstat, 0, NULL) < 0) { + if (errno != EINTR) { + serrno = errno; + break; + } + } } - /* - * If we are running means that the child has either completed - * its execve, or has failed. - * Block SIGINT/QUIT because sh -c handles it and wait for - * it to clean up. + + /* + * If we are the last concurrent instance, restore original signal + * dispositions. Unblock SIGCHLD, unless it was already blocked. */ - memset(&ign, 0, sizeof(ign)); - ign.sa_handler = SIG_IGN; - (void)sigemptyset(&ign.sa_mask); - (void)__libc_sigaction(SIGINT, &ign, &intact); - (void)__libc_sigaction(SIGQUIT, &ign, &quitact); - savedpid = pid; - do { - pid = _wait4(savedpid, &pstat, 0, (struct rusage *)0); - } while (pid == -1 && errno == EINTR); - (void)__libc_sigaction(SIGINT, &intact, NULL); - (void)__libc_sigaction(SIGQUIT, &quitact, NULL); - (void)__libc_sigprocmask(SIG_SETMASK, &oldsigblock, NULL); - return (pid == -1 ? -1 : pstat); + if (__isthreaded) + _SPINLOCK(&lock); + if (--concurrent == 0) { + (void)__libc_sigaction(SIGINT, &ointact, NULL); + (void)__libc_sigaction(SIGQUIT, &oquitact, NULL); + } + if (!sigismember(&osigblock, SIGCHLD)) + (void)__libc_sigprocmask(SIG_UNBLOCK, &sigblock, NULL); + if (__isthreaded) + _SPINUNLOCK(&lock); + if (serrno != 0) + errno = serrno; + return (pstat); } __weak_reference(__libc_system, __system); From nobody Wed Feb 25 21:12:54 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLnP23Rv7z6TnM0 for ; Wed, 25 Feb 2026 21:12:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLnP221lHz47Gp for ; Wed, 25 Feb 2026 21:12:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772053974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DWBtLwpf/hM1u8GqgUvy7KDTDSIZOeLKyUB/dXg4dBc=; b=hx4UkmWSa1WMvX2YLI++jqbPG2Q5E0S29XN3urgku36Q3glS8zWWW0O1F9gAleM0vvuRGD vq6sq2BN/+yPYEOlpZXr8LflIbpjow6djWlREH1DRmG/BRU8jQ8Ekv1Z5/43dUqaMtuFUT tBw540nZ1rd0jYzpylWl3D7jIgyjMjm0t6pSf7SP0BK1VngWYHJnW9zGYaCuUzGQxNRykr uayLUZFK1zuxiO2YvbveMxLs6b5W2JU1Y80bJ0uJ9vo7CnVaaQvnkp5Xc/uqOc2m0XZLfr zLnBzvhOf1C4zuuw2djV1F4BoH675H9kOGh0GVA+EFEqpYzIJsg0HdwTKZyA8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772053974; a=rsa-sha256; cv=none; b=xiRPIRjKEAnNUy7Ymu3uBov/VZLcg3aW7z+RT7uDGoCj8IeeCrTZjMSRMH5cgeRdTEw0cp NdXNOSUw42Rbm+NCnIt0ZFx9nIxTGYXr94zY2ppIduFaIYX9eyblLzCZikp4JqUoqoULIB epzuS9qIawYqYUlZ1IDhIMLyth6SHijwzRHcjg+sNzmljIexT0kdvWRII0qysPbH3ao9Wu RC5eN5d5eMZu8j0p0B4kTxwGmsDkhLpucyT8uFiY94a11Jy4s6cYvJcwhbz7eqLlSSp/OE CF4FzpsQ0AO1BZtR0Jqr0reZt+5AIbCDVQ+QrOXWR+bUFtrUplWDxctWpc9Lug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772053974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DWBtLwpf/hM1u8GqgUvy7KDTDSIZOeLKyUB/dXg4dBc=; b=jDaMq3dSELdbRA1tZGhFQRTjPQMyX/nSuQwG7aWWlDstxTK4sFrplDloElnJ4UDao/mtDk NXj9/TqevAH8jWPlVPU4bfLCwAKbFDdPp2OOf3PFkc1I2q6VICsSB55U6RpXmdEoDRhatA PvgjFGTtsApnl6k92r5jiwJirCv8fybalDuqw00gs+1fZMspPQl/bupFRAcHAH5alERzQJ gxbWoSGNqpX4VW3auLBWi+2+MMKekZAff6EL+ECXlbGhOKMYzmP9W6qMaKYR3prBbArXvs QNj2WmXbFQN6zH7Rufax2zTFFrlOJpeTo8KURckD5DfnMYpMviLp2aHaVM88Tw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLnP21b6mz1HcW for ; Wed, 25 Feb 2026 21:12:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27fcd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 21:12:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 7a1ade5109ac - main - system(3): Write our own tests List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7a1ade5109ac57d1f59eaa75b5d0f13fabecf6ba Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 21:12:54 +0000 Message-Id: <699f65d6.27fcd.1a11d18e@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=7a1ade5109ac57d1f59eaa75b5d0f13fabecf6ba commit 7a1ade5109ac57d1f59eaa75b5d0f13fabecf6ba Author: Dag-Erling Smørgrav AuthorDate: 2026-02-25 21:12:29 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-25 21:12:29 +0000 system(3): Write our own tests Replace the somewhat perfunctory NetBSD tests with our own. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: bnovkov, kevans Differential Revision: https://reviews.freebsd.org/D55482 --- lib/libc/tests/stdlib/Makefile | 3 +- lib/libc/tests/stdlib/system_test.c | 164 ++++++++++++++++++++++++++++++++++++ 2 files changed, 166 insertions(+), 1 deletion(-) diff --git a/lib/libc/tests/stdlib/Makefile b/lib/libc/tests/stdlib/Makefile index 9d84becfbd1f..a714a8cab774 100644 --- a/lib/libc/tests/stdlib/Makefile +++ b/lib/libc/tests/stdlib/Makefile @@ -17,6 +17,7 @@ ATF_TESTS_C+= qsort_s_test ATF_TESTS_C+= qsort_bench ATF_TESTS_C+= set_constraint_handler_s_test ATF_TESTS_C+= strfmon_test +ATF_TESTS_C+= system_test ATF_TESTS_C+= tsearch_test ATF_TESTS_CXX+= cxa_thread_atexit_test ATF_TESTS_CXX+= cxa_thread_atexit_nothr_test @@ -44,7 +45,6 @@ NETBSD_ATF_TESTS_C+= posix_memalign_test NETBSD_ATF_TESTS_C+= random_test NETBSD_ATF_TESTS_C+= strtod_test NETBSD_ATF_TESTS_C+= strtol_test -NETBSD_ATF_TESTS_C+= system_test # TODO: need to come up with a correct explanation of what the patch pho does # with h_atexit @@ -78,6 +78,7 @@ LIBADD.${t}+= netbsd util LIBADD.libc_exit_test+= pthread LIBADD.strtod_test+= m +LIBADD.system_test+= pthread SUBDIR+= dynthr_mod SUBDIR+= libatexit diff --git a/lib/libc/tests/stdlib/system_test.c b/lib/libc/tests/stdlib/system_test.c new file mode 100644 index 000000000000..713e4bb0f87a --- /dev/null +++ b/lib/libc/tests/stdlib/system_test.c @@ -0,0 +1,164 @@ +/*- + * Copyright (c) 2026 Klara, Inc. + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +ATF_TC(system_true); +ATF_TC_HEAD(system_true, tc) +{ + atf_tc_set_md_var(tc, "descr", "system(\"true\")"); +} +ATF_TC_BODY(system_true, tc) +{ + ATF_REQUIRE_EQ(W_EXITCODE(0, 0), system("true")); +} + +ATF_TC(system_false); +ATF_TC_HEAD(system_false, tc) +{ + atf_tc_set_md_var(tc, "descr", "system(\"false\")"); +} +ATF_TC_BODY(system_false, tc) +{ + ATF_REQUIRE_EQ(W_EXITCODE(1, 0), system("false")); +} + +ATF_TC(system_touch); +ATF_TC_HEAD(system_touch, tc) +{ + atf_tc_set_md_var(tc, "descr", "system(\"touch file\")"); +} +ATF_TC_BODY(system_touch, tc) +{ + /* The file does not exist */ + ATF_CHECK_ERRNO(ENOENT, unlink("file")); + + /* Run a command that creates it */ + ATF_REQUIRE_EQ(W_EXITCODE(0, 0), system("touch file")); + + /* Now the file exists */ + ATF_CHECK_EQ(0, unlink("file")); +} + +ATF_TC(system_null); +ATF_TC_HEAD(system_null, tc) +{ + atf_tc_set_md_var(tc, "descr", "system(NULL)"); +} +ATF_TC_BODY(system_null, tc) +{ + ATF_REQUIRE_EQ(1, system(NULL)); +} + +/* + * Define PROCMASK_IS_THREADMASK if sigprocmask() gets / sets the thread + * mask in multithreaded programs, which makes it impossible to verify + * that system(3) correctly blocks and unblocks SIGCHLD. + */ +#ifdef __FreeBSD__ +#define PROCMASK_IS_THREADMASK 1 +#endif + +static void * +system_thread(void *arg) +{ + char cmd[64]; + int i = (int)(intptr_t)arg; + + snprintf(cmd, sizeof(cmd), "rm flag%d ; lockf -ns lock%d true", i, i); + return ((void *)(intptr_t)system(cmd)); +} + +ATF_TC(system_concurrent); +ATF_TC_HEAD(system_concurrent, tc) +{ + atf_tc_set_md_var(tc, "descr", "Concurrent calls"); +} +ATF_TC_BODY(system_concurrent, tc) +{ +#define N 3 + sigset_t normset, sigset; + pthread_t thr[N]; + char fn[8]; + int fd[N]; + void *arg, *ret; + + /* Create and lock the locks */ + for (int i = 0; i < N; i++) { + snprintf(fn, sizeof(fn), "lock%d", i); + fd[i] = open(fn, O_CREAT|O_EXCL|O_EXLOCK|O_CLOEXEC, 0644); + ATF_REQUIRE_MSG(fd[i] >= 0, "%s: %m", fn); + } + + /* Create the flags */ + for (int i = 0; i < N; i++) { + snprintf(fn, sizeof(fn), "flag%d", i); + ATF_REQUIRE_EQ(0, symlink(fn, fn)); + } + + /* Get the current and expected signal mask */ + sigprocmask(0, NULL, &normset); + + /* Spawn threads which block on these files */ + for (int i = 0; i < N; i++) { + arg = (void *)(intptr_t)i; + ATF_REQUIRE_INTEQ(0, + pthread_create(&thr[i], NULL, system_thread, arg)); + } + + /* Wait until the flags are gone */ + for (int i = 0; i < N; i++) { + snprintf(fn, sizeof(fn), "flag%d", i); + while (readlink(fn, fn, sizeof(fn)) > 0) + usleep(10000); + ATF_REQUIRE_EQ(ENOENT, errno); + } + + /* Release the locks */ + for (int i = 0; i < N; i++) { + /* Check the signal dispositions */ + ATF_CHECK_EQ(SIG_IGN, signal(SIGINT, SIG_IGN)); + ATF_CHECK_EQ(SIG_IGN, signal(SIGQUIT, SIG_IGN)); +#ifndef PROCMASK_IS_THREADMASK + sigprocmask(0, NULL, &sigset); + ATF_CHECK(sigismember(&sigset, SIGCHLD)); +#endif + + /* Close the file, releasing the lock */ + ATF_REQUIRE_INTEQ(0, close(fd[i])); + + /* Join the thread and check the return value */ + ATF_CHECK_INTEQ(0, pthread_join(thr[i], &ret)); + ATF_CHECK_INTEQ(W_EXITCODE(0, 0), (int)(intptr_t)ret); + } + + /* Check the signal dispositions */ + ATF_CHECK_EQ(SIG_DFL, signal(SIGINT, SIG_DFL)); + ATF_CHECK_EQ(SIG_DFL, signal(SIGQUIT, SIG_DFL)); + sigprocmask(0, NULL, &sigset); + ATF_CHECK_EQ(0, memcmp(&sigset, &normset, sizeof(sigset_t))); +#undef N +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, system_true); + ATF_TP_ADD_TC(tp, system_false); + ATF_TP_ADD_TC(tp, system_touch); + ATF_TP_ADD_TC(tp, system_null); + ATF_TP_ADD_TC(tp, system_concurrent); + return (atf_no_error()); +} From nobody Wed Feb 25 21:12:55 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLnP33rv2z6TnRZ for ; Wed, 25 Feb 2026 21:12:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLnP32dMNz47Dt for ; Wed, 25 Feb 2026 21:12:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772053975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kMLGAHGcQoy1qBXWTWtYSkvp7WNkAOnLk922St4zBcw=; b=tuHlsgcgJRIWJy9gktDJbKjkRy0wBpv2Ap2SiRgaa4zwa0Xk00iltvZ7Su/qUhYZU2NgOW 3Rcsuw9wsBd5cbEt8dZxQHwWXup1ZP7Kv4oybM0siWK/r1tnYOb0ZcfWvXzp28Pmrr6CM5 PZHejOXiK1TRe67KBW3+rPUEkGsLn1wBCx0GG7bTAULg2XlQE3E0oct4LhYzolFIYnopTl YC5eV74IUvkogfFlVYQYXyV1HTFmRDjnoVSaAXHp4OLQismMDl3BWRoaz1AfFjWTeKZEGk EIcZR1VMkJDNAo/IIKVDgkg06n7WzO5Ylw1zzwm0OYNymlgM+Hby6bl8A9kXFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772053975; a=rsa-sha256; cv=none; b=mQpqmryNmKhkAFFiqqDu6KfiK3xBNK3A2pcyR0c+GfMbm59t5zlVd+CvkPoN+fuKgN+1fh tmqMiZ4vEm35TbwOom3e0mJFIRNtSeRNf49Y0sACfJ7M09hsJx9tThNSYdQmN8K7CVZyOW viFdD6VxvNsn+aP99NBeP13qpAw9HuHML2yocY5N4eIRXMc519GRzaiJvR6NgFrHxXjJdd /bkXnyIsQYYrXejO3lR8Msg7XoscVL5vwyIBcoN4RsylOgsbcFXhoDijC5CgUtyhPOGdjX EYDLj7knvNDx4g0l2/ihZClVa42Tt2tUgHepRXEuiCvv3fC7J1cp9lZ/moJQXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772053975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kMLGAHGcQoy1qBXWTWtYSkvp7WNkAOnLk922St4zBcw=; b=j0ab05eDKPNAh97RNLPT7rSAl+iDyii3f4jFtcBT3XbWRD3OIGuOQ1la6hxso+Er1F8z2m 7huoSRmR/Xxhb0pDg+XpQdge0htDbT5dL/1vMiH3t1A6darqMW+VkchJWG4ofmgwGSMkTG u7jpffV6UgoTXGUiwZYGaiR33b/U4d3aUhzvf7vffez5hJ8SM0vrzkjcGWhQdtcTR1hRpa VEoS9rKMOKEGxPTsCQSvCtfhwxhc+fr5a/0fHT/Kjr19ctgYUEHonVzSrsOx0hNdwSCC3b ZxzJPLe5aWo0NC2tU+v6i03pWN2Y1o6Pl3GoZ6lzybdAv3jSUk1JjcHLX3Ikaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLnP32B3kz1GZC for ; Wed, 25 Feb 2026 21:12:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27fd7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 21:12:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 7305604b29d3 - main - system(3): Clarify return values List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7305604b29d3db29c9bb5de6e7a25829fb541d1e Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 21:12:55 +0000 Message-Id: <699f65d7.27fd7.233b8521@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=7305604b29d3db29c9bb5de6e7a25829fb541d1e commit 7305604b29d3db29c9bb5de6e7a25829fb541d1e Author: Dag-Erling Smørgrav AuthorDate: 2026-02-25 21:12:36 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-25 21:12:36 +0000 system(3): Clarify return values Our manual page currently states that system() will return 127 if it fails to execute the shell. The actual return value is, to quote POSIX, “as if the command language interpreter had terminated using exit(127) or _exit(127)”. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: bnovkov, kevans Differential Revision: https://reviews.freebsd.org/D55483 --- lib/libc/stdlib/system.3 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/libc/stdlib/system.3 b/lib/libc/stdlib/system.3 index 119432342f70..f09577099a5c 100644 --- a/lib/libc/stdlib/system.3 +++ b/lib/libc/stdlib/system.3 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 11, 2024 +.Dd February 24, 2026 .Dt SYSTEM 3 .Os .Sh NAME @@ -77,8 +77,10 @@ or \-1 if an error occurred when invoking .Xr fork 2 or .Xr waitpid 2 . -A return value of 127 means the execution of the shell -failed. +If the child process fails to execute the shell, it will terminate +with an exit code of 127 and +.Nm +will return the corresponding exit status. .Sh SEE ALSO .Xr sh 1 , .Xr execve 2 , From nobody Wed Feb 25 21:12:56 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLnP461Hmz6TnG6 for ; Wed, 25 Feb 2026 21:12:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLnP43pnyz47K6 for ; Wed, 25 Feb 2026 21:12:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772053976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C/pGglxByI/B98SyYAlYgs9odB4GIpOHR+NGT1Oqejs=; b=vATClW1dfUyHfs4lTlyMoMicsftwylM9mOUhIwO5z9KpJcHpDSe0Qxyy4IhFi4m4UTr+F4 81TopoMOYRlK3pfMsqqr7WglpzFWyPjiKDB7zCjbTL7uvKaByEYNlRy7N8tiqNK6NfWMVs SBIurF84ZE8CkJuKbf2k4XYqj/ioNmwT6t6Xojx6Z6uu7AqzOQPycu41K8IrMG9TwxFnXm apFJS/4HL8OmcemJxfT+AIqaHJMLLrr+PuXTZ7ov/yyiWHo1D3TOkqeFKn+mn6u+70Kcx3 LyvHmoTMGLyqqK7h3boN/sATS8PrELF7+/YuLSM1vrHbCB+jTBfuheoKvlrQOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772053976; a=rsa-sha256; cv=none; b=hwFQBZEcX+fAYlW5/bsz0oREVOWXJ4MSMmdK0I6k6kihapIBqHKXtDUBiLobpYRvd3h5e8 xB2uYkc3upryrs+hy1xVvhLOpZfACRK9PxRBxoLJKh/A/7Mgfe1BLSBlybYfTkvwnXz9ob cgX0dvgAO4MeBZQXaMDxslPm5i94hU6SzycR9cG6oAqvDaeMt4RKUAROwV2fSIoque/GC2 UPfOszHu66biYXSlW+11HNaG81fK+XTPsNodMK02YbTbwLbS2o18cGOEcRIhKrCs2MV1Qc Kd8r4RnzYjh/1aZzVSR07UOurXozeIWYdwpJgLYOC39lX49P/7NTkW9G5MPeug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772053976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C/pGglxByI/B98SyYAlYgs9odB4GIpOHR+NGT1Oqejs=; b=PtEcReBrbV20jUPy5IokiIzV4UXm1wwlwm10w5/jiaDCnnUwGpwflKvGxIOSlSHdDdyE3P u3f8zyy/o+Oxcway28SgFT4aUpUjWwYVKarvjZX46V/U7VjCjEaQZjLSLw7Vpsf3sum4+Y 7+Sl70fzk0I7FlqaefRwV9OmQqCnaiSbxtjDRVN2lEMlNSMZV0PyDWyjx2vfjVsON1PIkA 6SToOpIf1EL5/jtio62w9yNX++Dzls8tCXajBYhCgHexJsLEBTw99p6I8QYC4CX9LHNchC 4K0TIaTMPO0fvymTw/hL27CHDSd+RTA90NE+Ji5bxR5ZcT4PieO/N17fTg7umQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLnP430Wtz1HFq for ; Wed, 25 Feb 2026 21:12:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30799 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 21:12:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 8ae3f4499194 - main - system(3): Fix null case List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8ae3f44991948cc97b09adc248a9a46db71bf9e0 Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 21:12:56 +0000 Message-Id: <699f65d8.30799.72e465a3@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=8ae3f44991948cc97b09adc248a9a46db71bf9e0 commit 8ae3f44991948cc97b09adc248a9a46db71bf9e0 Author: Dag-Erling Smørgrav AuthorDate: 2026-02-25 21:12:42 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-25 21:12:42 +0000 system(3): Fix null case Our manual page states that if given a null pointer, system() returns non-zero if the shell is available and zero if it is not. This is consistent with the C standard's description of system(), but it is not what we actually do. What we actually do is always return non-zero, as required by POSIX. As the POSIX rationale explains, implementing the logic required by the C standard does not violate POSIX, since a conforming system always has a shell, therefore the logic will always return non-zero. Since our libc is commonly used in non-conforming situations such as chroots or thin jails, we should implement the full logic required by the C standard. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: obiwac, bnovkov, kevans Differential Revision: https://reviews.freebsd.org/D55484 --- lib/libc/stdlib/system.c | 2 +- lib/libc/tests/stdlib/system_test.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/libc/stdlib/system.c b/lib/libc/stdlib/system.c index 17dd63eb52f9..94f7460c9b68 100644 --- a/lib/libc/stdlib/system.c +++ b/lib/libc/stdlib/system.c @@ -64,7 +64,7 @@ __libc_system(const char *command) pid_t pid; if (command == NULL) /* just checking... */ - return (1); + return (eaccess(_PATH_BSHELL, X_OK) == 0); /* * If we are the first concurrent instance, ignore SIGINT and diff --git a/lib/libc/tests/stdlib/system_test.c b/lib/libc/tests/stdlib/system_test.c index 713e4bb0f87a..b6a31583d52d 100644 --- a/lib/libc/tests/stdlib/system_test.c +++ b/lib/libc/tests/stdlib/system_test.c @@ -57,10 +57,20 @@ ATF_TC(system_null); ATF_TC_HEAD(system_null, tc) { atf_tc_set_md_var(tc, "descr", "system(NULL)"); + atf_tc_set_md_var(tc, "require.user", "root"); } ATF_TC_BODY(system_null, tc) { + /* First, test in a normal environment */ ATF_REQUIRE_EQ(1, system(NULL)); + + /* Now enter an empty chroot */ + ATF_REQUIRE_EQ(0, chroot(".")); + ATF_REQUIRE_EQ(0, chdir("/")); + + /* Test again with no shell available */ + ATF_REQUIRE_EQ(0, system(NULL)); + ATF_REQUIRE_EQ(W_EXITCODE(127, 0), system("true")); } /* From nobody Wed Feb 25 23:10:35 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLr0w4Zdjz6SXqg for ; Wed, 25 Feb 2026 23:10:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLr0w3vhMz3VVk for ; Wed, 25 Feb 2026 23:10:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772061040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IKnY9vJEbJ3DKVGeSykMPMWSqiH4k8INfVuds1ADneg=; b=CwRgvL49u7qna1GLk9bhH2aauBnqFDKFX0PObG68+eCG6w59Xo/QegMl8dz4+NTtuU+o8L /rmAY9fHsLLau8Q95Aa2TpFO9lXkXC72cQesg0HEldOSHiMd/TkczVIgpBjlvyGOsxn5BV ec+1mgh2sVb6QfGyROKnEGB9wrSDgx8Rq4jp71vIbgpr29zNoYTR5pk5SLtQNFH4flD/bx f3H8UDgDNe8pnmA9S+X13ImndfAw5QJupsKulLgTQUm+3suevg0rb3NtEn0pu6fevDFdXd MvZy5cjXIgsQO/ya0qxsYqK5NDn7UXrvGLbTO0gV+dPRFqeaO+cN5O2CJZ/Y1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772061040; a=rsa-sha256; cv=none; b=OL5hwp351H9gNeaatRUh14vEkcVPRWBsIMKzgqIz7K2JNBWVn8srf7snokZ7vPsNKtIzX8 cFyncURblr3drny7MZkp+JNcwaZepW0m4Iw4xodaeMFT6rv4HzNo/v9CyyoTy4bFJ5KhpC ikEYlUz0dl9xK3pNBZVG++cJz82THXAkGH5CFIIy0HGIQ09lsUHxR/w9MztS3mYSnQXsaz HTMDgQAu1f3OW/DTcUIM/NUIn3za7iSenRriXgOEc95l3h6zZYkbxc8ZQLioBs0+R6DMq7 9i2BsZwGzI1UhePlYl5hcrDIMh4PDT+wenS8uZlPsVs6Ws3gZ6CDhGDXiLKngA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772061040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IKnY9vJEbJ3DKVGeSykMPMWSqiH4k8INfVuds1ADneg=; b=U6ixKwe2vzQqVQJbAFuIBGwLyV4iVXPoreaDX4adP4ykebHwp6YWbFxTOkC5kVevBWwQxF +eR/hdGjaSOYZvxt++9z2u4x8ek3Qjl+92hLwzfjKXEg8THy1kYDaadSdYN/X/T9hskdha Yi1j7MB3OOWlkdREis7FpEXabjETPZl6Rr388z44y7fomMAXU3ipo3gGWETu52VjQqdM1n poJw4ZQeFMCAM797CIOAe2RRgky5Rb6lo3RVRQAHY6hXl0xqidR7ro4Jfj4uFU0mvmV7lY MlLuWugSB3JODLHzI66mptPLXTaYWJDApUFkShLNnmwQE5aCgcE7u/jc+CYTkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLr0w3J1qz1LBw for ; Wed, 25 Feb 2026 23:10:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b3d9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 23:10:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: David Bright Subject: git: 42ab99095b7d - main - procstat: CID 1593951: Resource leak List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dab X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 42ab99095b7dc2243629574e1c627cf5e6a9070c Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 23:10:35 +0000 Message-Id: <699f816b.3b3d9.505fb456@gitrepo.freebsd.org> The branch main has been updated by dab: URL: https://cgit.FreeBSD.org/src/commit/?id=42ab99095b7dc2243629574e1c627cf5e6a9070c commit 42ab99095b7dc2243629574e1c627cf5e6a9070c Author: David Bright AuthorDate: 2026-02-21 22:47:00 +0000 Commit: David Bright CommitDate: 2026-02-22 21:29:25 +0000 procstat: CID 1593951: Resource leak Summary: A trivial resource leak fix; free the allocated memory before return. Test Plan: Code inspection, run command. I built a simple program that waits for a signal on a kqueue, then ran that. The standard procstat displays: ``` fbsd-dev% Waiting for SIGTERM... procstat -a kqueue PID KQFD FILTER IDENT FLAGS FFLAGS DATA UDATA STATUS 84352 3 SIGNAL 15 C - 0 0x0 - ``` The revised procstat displays: ``` fbsd-dev% sudo LD_LIBRARY_PATH=/usr/obj/usr/home/dab/git/freebsd/src/arm64.aarch64/lib/libutil /usr/obj/usr/home/dab/git/freebsd/src/arm64.aarch64/usr.bin/procstat/procstat -a kqueue PID KQFD FILTER IDENT FLAGS FFLAGS DATA UDATA STATUS 84352 3 SIGNAL 15 C - 0 0x0 - fbsd-dev% ``` As expected, the two displays are identical. This doesn't prove that the leak is gone, but it does prove that the revised command still operates correctly. I think it can clearly be seen from inspection of the change that the leak has been remedied. Reviewed-bys: vangyzen Differential Revision: https://reviews.freebsd.org/D55422 --- usr.bin/procstat/procstat_kqueue.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.bin/procstat/procstat_kqueue.c b/usr.bin/procstat/procstat_kqueue.c index ce9d2cb42fe2..b4d396e12d3a 100644 --- a/usr.bin/procstat/procstat_kqueue.c +++ b/usr.bin/procstat/procstat_kqueue.c @@ -135,8 +135,10 @@ procstat_kqueue_flags(const struct pk_elem *names, unsigned flags, bool commas) } } - if (strlen(res) == 0) - return (strdup("-")); + if (strlen(res) == 0) { + free(res); + res = strdup("-"); + } return (res); } From nobody Wed Feb 25 23:35:02 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLrY26lJtz6Sbr0 for ; Wed, 25 Feb 2026 23:35:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLrY24jwnz3Z6L for ; Wed, 25 Feb 2026 23:35:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772062502; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5ds26vwPIODzTJX99+DrZnvoLDZVCWZ8Y5WOBKE0ng4=; b=BC8ucGMKmmKvSDulFhyCLJzJQRpQBXNSM1PKa25v+EUmHk5CmOwLBrXkj/Lor9MBkVXkSP VGJak8ruY/uZKEhLPJJNT2ELdL52LKWVTaI3qeUDXiId8LVikmiax9e3sZkYZB7ZIvem0R oB2/5TCuecQh8ynfTsNeJmWqvL59rTbtDmYTzrFTxtRDKlGwUa06bQ08gG7JQ1papdYphl cJ796i+K9eBb16fY3zuyDKDzfNpPXx9WBdBCKnfeI89j/wlwCk+yaDr028I+IaS+kFbcUO 8c60dEz9QFgA2vAxyvEzh9KAHPWXfWf6fNrQhGzzXluRYIKnY4J3zv2c4ESKDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772062502; a=rsa-sha256; cv=none; b=xSLcmcOWI0d84sZcsnI8HxHa6osIh29fXrlYzpRQovPeHUQ5hfw1yD7NR8uPB7esBs8imk HtoWHuZnBRw0uc/6Yvm5jdKnKgBsMOhJIKjJY1A6H5DKfWjo6Uv5BlLAUo+5gqZXHKUJwe U/nEW7Mnc6a4zEpe7x6pThepxL3rEVqIO13VrzRFce7S4stXDI1nbX48ZaEj6P6PKLy11G h3Uey8M7DBwMBlMRQXJODLuGkSOYrBtsGi/bRnYalcy+SFUVFAj4CSJ4O6YmK7htL7J8tD do9NysaGZPpNOqvyRjpBngYOEjq7GVJdUXTRXuUOjpiTWYAljltVuh/dRPZNaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772062502; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5ds26vwPIODzTJX99+DrZnvoLDZVCWZ8Y5WOBKE0ng4=; b=Yl19729xUAWtsR5HUsMvRqPZsJXKMw/w3t4cTP0cqpMnUnlE39FhIrbOViADLiMYWFkiWd T8Hk2UcT8293fVtCn5FjgyadK+MpVTl24ylkPzQnqLPM5rLmcwCm0fGNhyznCgXYwSkzQo +520HKBetIHIKKH3w0Jv6uRMkRYRtPtyBdNw+zbYEkRA8WA+HA0ahjGgURrYJJicxco44U Ubn3HZ4msB5V7IsrQHKpwj4ZXqZrqNYO+Ucne2FLaXnU9qBt8zuKAdxif2nr6DmySzjpCT +sZvQCPZrFVB2fGhbOyCTtmxuHuxHyAamyYynLJF2OlXpv369vtSNgJrRTPjRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLrY23ClWz1Lyr for ; Wed, 25 Feb 2026 23:35:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f0ac by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 25 Feb 2026 23:35:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: 2a6c2d9c38dc - main - libnetbsd: add math.h and sys/time.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2a6c2d9c38dc421025b6c18cac68fe9965c574c0 Auto-Submitted: auto-generated Date: Wed, 25 Feb 2026 23:35:02 +0000 Message-Id: <699f8726.3f0ac.2ddade18@gitrepo.freebsd.org> The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=2a6c2d9c38dc421025b6c18cac68fe9965c574c0 commit 2a6c2d9c38dc421025b6c18cac68fe9965c574c0 Author: Enji Cooper AuthorDate: 2026-02-25 23:19:56 +0000 Commit: Enji Cooper CommitDate: 2026-02-25 23:34:32 +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 --- 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 Thu Feb 26 00:23:58 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLsdV380Sz6SjdX for ; Thu, 26 Feb 2026 00:23:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLsdV1m9Mz3g5x for ; Thu, 26 Feb 2026 00:23:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772065438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xFg+Dw/vjFwtTx+c2zvcejdVrsJLyaBmW2hnPvhFDvs=; b=h9AzIPI0saxPv33vASVeWIsqyEmlYQbfIcamwjAQac6XPhUl4XT1kaRknUB69CNHXbdJs1 fD+193keD3hEnq5L7i9dt8HNdenrbZhIPhsSl13EpO+KO65aJ+lkcyvDpu0GdOx4C7Kd8h Amb9Ho0oyDcIJfdhuA6wnKcUV/Jalz0xYN4jgcqH6g+PEntxm+8PdDguS25z4wHq6z3jBK OSN0RCrxDniPavPjVwk9sVsIsteclygR49pQvsu0gRlKtuLDNQpJZnU6n8Hgb4aOYYqHV3 InhJi2Lb9oAQL79mrwE11aVs2uDyD3F2lISoQjYUsCcnUklyOknE1mmOINH5rw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772065438; a=rsa-sha256; cv=none; b=xEWcHnJxhq1QodChyV+MBxtl2gR3CwJ7PR7p0KD5qR0bkqIQTRdAQa0czl3Q2qZMA0XOlP 01LtLlG76OWj2J9WkSh2gp2Wn3Nfzk+Dm+cu/qBZxlScZtvDNVk9FqeSYd7j38rc+AEata UXOm41O5PiPYTK4uv5KtMnscphDNy0yWlriDygJKd9jHjHZAXQa/CvWA6ZoRgyZa4sgbhC RevSyPJGsF6J62u89mTjQhBheOKwvpkq/R+rgzy+hXUA261qw51wvpwmGUPwNTuEzldlWE KUkwGVLb9KuIYKZVUDCdzdI97CYjkvgriFZ2U/3/ZOmqmCAbcq8ne77sH9vimg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772065438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xFg+Dw/vjFwtTx+c2zvcejdVrsJLyaBmW2hnPvhFDvs=; b=CMC6ltgQ8JeBfyxK/FGn9RJNMyMxx84SGL6cn7veBwBeuuNZzFb6x6xJtKqWN7pH9PChVN tYiv5geNOOLpAWIVotTucXQ7Y7b+Zc35aZqyRoVGEXf9tcdQztKLBOycRG4gqoIM/x+r7o zKe6wlisxZ3OmRlh9BtSWOnqB/s44XJjIjOc+dYyKF9v3nbFTw57A2DYWTBmF0cznql9JH 0c8li2vepMhmVFtK01hF7woDYkf3+WZwedymE/N8l4SNQRx2nxj+qet0ZRPjuqaPy0u0Ax 214hQwabjxSvYTvyLWYxc6RsZTsv0RPcgAcGQuP4EPBOlgPqIUrb8JKhFyvcPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLsdV15mFz1NFf for ; Thu, 26 Feb 2026 00:23:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42e51 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 00:23:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 20cff160e140 - releng/14.4 - pkg-stage.sh: Add ext2 and ntfs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.4 X-Git-Reftype: branch X-Git-Commit: 20cff160e140cbc595fd2da12bba628a5413439d Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 00:23:58 +0000 Message-Id: <699f929e.42e51.1a8af9a@gitrepo.freebsd.org> The branch releng/14.4 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=20cff160e140cbc595fd2da12bba628a5413439d commit 20cff160e140cbc595fd2da12bba628a5413439d Author: Colin Percival AuthorDate: 2026-02-22 00:38:01 +0000 Commit: Colin Percival CommitDate: 2026-02-26 00:23:37 +0000 pkg-stage.sh: Add ext2 and ntfs Having these packages available on release media may help users who need to sneakernet other packages (e.g. firmware) from systems running Linux or Windows. Suggested by: vladlen, ziaee MFC after: 3 days (cherry picked from commit 6881fd278d80ac63b4d511fc130a79ff16d1bb48) (cherry picked from commit a2c2de82c053ba7596f90ebf7d7ea6cb41938587) --- release/scripts/pkg-stage.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh index 86bf32940975..3425534bed7e 100755 --- a/release/scripts/pkg-stage.sh +++ b/release/scripts/pkg-stage.sh @@ -17,6 +17,8 @@ comms/usbmuxd devel/git@lite editors/emacs@nox editors/vim +filesystems/ext2 +filesystems/ntfs misc/freebsd-doc-all net/mpd5 net/rsync From nobody Thu Feb 26 00:23:57 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLsdZ47pqz6Sjdd for ; Thu, 26 Feb 2026 00:24:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLsdZ36dDz3gfw for ; Thu, 26 Feb 2026 00:24:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772065442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ryeT3+46U+WD3GuFuzvGW0egT0olxKfXubqv4uXfO/Y=; b=B0b4MGkWe3ZlZzF8j9qO25g//vsD+Wz1hnTsUpfdAQUarjIg7EbyzZ7VCHU4kOeIE14COp q+56SUIi7rxSoQ55WufgbgdJ0Fo5tkG+LOHgJ3BUogHTgB8wDOL9P9I61YTVip4PLSI/c2 TrsX7hl9JqxaXq8FZCkjE4GR0InNQKQWIvRsopUptt+mioLAe3+f6hubl+SX1mf9EFfCXy VMMQZWwf0Ooztju2UXBAxYMzrwodY/y3ZEyHbjTrbo9Xo2/WBbOE6aN9gihOJ53MOBG99b 1cEVLThJ7HOhD132YTWVcCvzBDo1ZS6LlZ0zIwOvqrXW4huNqF11DgTypyGXmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772065442; a=rsa-sha256; cv=none; b=uymPXPdqks85ChO95tQcMvpRSqnzEijoegFSnEjD5fg7MtTW789bVXrWNqhP5+YGD0tGmU OE6cU6haW5N74xnc6FCrp8fG4kEDjekn1CPGJY50z6ikDT3v1wHMG+Ie1FHSRTUHSg0Xoc IVhSPG54ULoMqY6+t+aXG8n3eRuiywa56OAWMMNMiAOkGmDYBPCYsiRYeGg0y6P3toyB+d pIRen2jSZGKclAPulBwvNksTtOhUD9l775jI/pf/jF+X2e1c5xiiAG05gN3YxtOznRCtsI JprKgWecHrUDSd8QL92AQU+o5C5Tw1aTaX+anlqqAqoqo9e4WPq38a3gZYhPjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772065442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ryeT3+46U+WD3GuFuzvGW0egT0olxKfXubqv4uXfO/Y=; b=PkjBx8mEQ2pTwxbuQYnG7DGj3GDhn2jWSmydETWrIi83xcsTMGXKWdJWUP1iQzUL90CeZv b1kCUrH0Vvc/ZVSaLco373020j9z/nEcZE7jEVuBbODhZ1ArnIkI5iSiVJtSymkn/pxvRz u41C0/HX1v2YrBBacUVQCzr/MFf+FJYxLmLNWKFKWMSLwfWwNmMz0K90ZLB+iwvpb3x+aw DfgPiyBuQSzvOTnhpMruteTHJAsUjAqRBPa6vDCvt0MSIt2B4BmsmmP7PNWa8kjYZh7gwa qT2tcvLtKPZfvP+04obpxxv1u996xmeH0jlSPldwHicQX5khJlqjzYF+1qow4w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLsdZ2RdTz1NFg for ; Thu, 26 Feb 2026 00:24:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42d0d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 00:23:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 6ecd231b9e68 - releng/14.4 - pkg-stage.sh: Add emacs@nox and vim List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.4 X-Git-Reftype: branch X-Git-Commit: 6ecd231b9e68f2d143927b54606a444141dd5094 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 00:23:57 +0000 Message-Id: <699f929d.42d0d.68450c39@gitrepo.freebsd.org> The branch releng/14.4 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=6ecd231b9e68f2d143927b54606a444141dd5094 commit 6ecd231b9e68f2d143927b54606a444141dd5094 Author: Colin Percival AuthorDate: 2026-02-22 00:33:27 +0000 Commit: Colin Percival CommitDate: 2026-02-26 00:23:31 +0000 pkg-stage.sh: Add emacs@nox and vim We have a bit of space left on the 14.4 DVDs; add packages for two editors, one of which is useful. Direct commit to stable/14: These packages were added to 15.0 but at the same time as removing kde, because shipping distribution sets *and* a pkgbase repository on 15 significantly cuts into the space available. On 14 we can keep kde and still add these packages. With hat: re MFC after: 3 days (cherry picked from commit d982b7bd4ebfa483a8fa03411fa798add225e6f5) --- release/scripts/pkg-stage.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/release/scripts/pkg-stage.sh b/release/scripts/pkg-stage.sh index fe4b5051fc14..86bf32940975 100755 --- a/release/scripts/pkg-stage.sh +++ b/release/scripts/pkg-stage.sh @@ -15,6 +15,8 @@ export PORTSDIR="${PORTSDIR:-/usr/ports}" _DVD_PACKAGES=" comms/usbmuxd devel/git@lite +editors/emacs@nox +editors/vim misc/freebsd-doc-all net/mpd5 net/rsync From nobody Thu Feb 26 02:54:04 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLwyn2qQmz6T3Z8 for ; Thu, 26 Feb 2026 02:54:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLwyn2FBlz4256 for ; Thu, 26 Feb 2026 02:54:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772074449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qy+/tmfi5hHdF8LsRz2V1CVJVyfhX602pfvl3moToPs=; b=FaKvcWTikvyv+eXWG4wLVs+At8n0DbNLH3Y8Cl4PW44i26Z0TTq7c06SnAEIIPSYJ96tKM HKfwqGMo9WuUNmuIvP8xsSvmuggEzamklRc/FCXuz008pWOs+Jk5+2ba9o6tvxRUKBpbIG LmkE7HMazhluUfu8ZqTlr2kbWwjVGNWyhDX2pIBGf74yXrDJt7lFoPPb6VYigEBi9EySSR ech3z/j2fJmz7xu/YbWfduTPN1YE54ZR7OI6JKCVcRep1EmSDeL76TpoKnOksB3Nm9u9ZU Y4+6VYnuJjI5GYxcErRcnxGxhIOzZk/11kOsmWXN5MieT9VsF9zCKMUwcTIyGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772074449; a=rsa-sha256; cv=none; b=U7D753EWunUF9hW9GuzUx9oUZOHp46IU8e2HjftSBzuE1oftkviBs0HmTDK+gUcwRKsqR5 SMandJvlDNuiqBdIIiD7Yr8isAy8VmTTv2BlHtJjT4teTwam7B/brtje5JA4ub43TgrP9h t3vxa9wA7G1KUWQ7+Gy7JeqT2CdeCZwwNqCquX3+B/x3SEKy5nMAPxABTmtiKimESP35oF HaPCXf9RAHXEtcu40QWs7AdBSf99j8PQFinj5XqWfTbeV2vjuK8NAAeVpnIoBxzIHg12oh 9/0RAbKimZfLJnQie8EaF3/JOu2roL/RNMAxzK4V7uzwkyC1opthga4KiTlfVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772074449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qy+/tmfi5hHdF8LsRz2V1CVJVyfhX602pfvl3moToPs=; b=y0/wq8SDgxsco4XY0jYxo2J0Ap7c1DoqTNLLmMefmf8uWADWshnIQDwL+hHbOfucK6gcV7 IL2hPj9fYf8C+MRkV8FQpxOszQW2FEFts+F4e0+tGvDVjgkJql625s0HJAc63dFkHdfUkV 7PLwd7Jc5NEiJa712/FlJmCpV8x0KVWm9kZ9jldZqtDMh7U9vojSPA8X4QdifONVi1o3+C xnSKYxLXU8a0d2pVpUms/P4yHEcMDG19DcOD3LvXo37HLFGScBfhfMkr5pDscH6KJuw5pT f4W7+lReD+1IHoj5YSt8jnoB4mF7ZjeS1stHelifYgOmw/fCLXiQjorqM2KMOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLwyn1Fc0z1Rmc for ; Thu, 26 Feb 2026 02:54:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24dcc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 02:54:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Lo Subject: git: 25e89051df7a - main - rge.4: correct media types in the manual page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevlo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 25e89051df7ace23ae4953c21402e568cfce78b4 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 02:54:04 +0000 Message-Id: <699fb5cc.24dcc.2f34737f@gitrepo.freebsd.org> The branch main has been updated by kevlo: URL: https://cgit.FreeBSD.org/src/commit/?id=25e89051df7ace23ae4953c21402e568cfce78b4 commit 25e89051df7ace23ae4953c21402e568cfce78b4 Author: Kevin Lo AuthorDate: 2026-02-26 02:52:14 +0000 Commit: Kevin Lo CommitDate: 2026-02-26 02:52:14 +0000 rge.4: correct media types in the manual page Correct media types for 1000Mbit/s, 2500Mbit/s, 5000Mbit/s and 10Gbit/s. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D55496 --- share/man/man4/rge.4 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/share/man/man4/rge.4 b/share/man/man4/rge.4 index 5b624cb6bf95..1ef8c1b34fc1 100644 --- a/share/man/man4/rge.4 +++ b/share/man/man4/rge.4 @@ -84,23 +84,23 @@ option can also be used to select either or .Cm half-duplex modes. -.It Cm 1000baseTX -Set 1000baseTX operation over twisted pair. +.It Cm 1000baseT +Set 1000baseT operation over twisted pair. The RealTek gigE chips support 1000Mbps in .Cm full-duplex mode only. -.It Cm 2500baseTX -Set 2500baseTX operation over twisted pair. +.It Cm 2500Base-T +Set 2500Base-T operation over twisted pair. The RealTek devices support 2.5Gbit in .Cm full-duplex mode only. -.It Cm 5000baseTX -Set 5000baseTX operation over twisted pair. +.It Cm 5000Base-T +Set 5000Base-T operation over twisted pair. The RealTek devices support 5Gbit in .Cm full-duplex mode only. -.It Cm 10000baseTX -Set 10000baseTX operation over twisted pair. +.It Cm 10Gbase-T +Set 10Gbase-T operation over twisted pair. The RealTek devices support 10Gbit in .Cm full-duplex mode only. From nobody Thu Feb 26 02:58:37 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLx433XzRz6T3y9 for ; Thu, 26 Feb 2026 02:58:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLx431cqnz42cc for ; Thu, 26 Feb 2026 02:58:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772074723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4g09Ucc5d+vxt2QZU0ug7FdCQogMLVUf0o8k5i/hx7I=; b=E+7SwIzjubc9/mDi17GZBARkTEgede9rIxRZjj26lMIkvUlHoHYI0pugKN2WGz6RjKQ2m7 OVdVrIbRkgoMxkQHfbTothbN5WikOtwRtuNuYpkCIADPkXO9XTSROQ0uaKN+gceJtx6ZRt SeEsgRQv+b/6OUthn7uhAxmctOH5zqW7EnVjhMUFV3Kd41uJncSFr9FxbI0x1l0qz962NJ AcY/xws5v7/CqQWr3P2JKbYyyKXTcdUkXmh66wI0PkwBvaLZ67R8OfuImcIO0VV4sfQ+c9 4UXDM8E570ZBu0w5eJmPmBUTUt/wr4Hw3KxTvmJafY+t4rSpsa0TJZB5NzNBYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772074723; a=rsa-sha256; cv=none; b=VY4sl8mLHOu2UtOL4xqz9jw3Q0uOqeNAYd0EUNB12Z7E8phFhS+zBmD5nMkstjBZMJSTVX S49Ux4ORFViI9P4Avvyxx8CaCSD2pas0FOO1ZSfNd0ad6CdGsE1J5QgJFzjIfOVpzR3Lxs jA/uFShvli904TyJBX9SHVXCloGF72w8NONX70+JjG7i0N4gR1Sn8MXm/fAA9RMSNh16GP LwENXUWn1O4u0hJiaaWD0ZaHq0lGPj+EiKuwlGNXq7BsPT5/bhgAXqWIINS9YWVp6tMXOP 9waYw/dgBHulkrIDrS2r9R9Fm7HOa7oWKxZxrPdEPv34a0Lz3CsqfPzt4/C5rA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772074723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4g09Ucc5d+vxt2QZU0ug7FdCQogMLVUf0o8k5i/hx7I=; b=TWgcChoMUzSJttAOWIq9hIZ8ezsbMCp6X1yZlihGrNC0oG1htEKjhgpYlMdtyJ1E33N+rB sZ2LynocZ1RgrMJJttc9xGjY2MebiFu6H8X9/rdpXzxEUhl+cRpLP/x+GT2nerVwYzL6Pa 4S0PYvGSt3Mse2k6jTiLvhqfbEua04t3PbpMHAS/Hutxxw4l/fWKxDxYoVQT3xUp1x4rjL 8FE/FGSxFsY4TxQoZxlDwIFV75yg5sPrzWg+q1oP4l69n1hpuONbNs/5/6g4L8Z9SFvuBd bQ+hcYEBIOUxX00cLmLJafzPdAenURr7r/ySmSWJen6lcga9nGnAGM1owNgYEA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLx430HH9z1S1M for ; Thu, 26 Feb 2026 02:58:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2501c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 02:58:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 6ed373227680 - stable/14 - nullfs: Fix handling of doomed vnodes in nullfs_unlink_lowervp() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6ed373227680b016b4cfa5af1b802ef23a121513 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 02:58:37 +0000 Message-Id: <699fb6dd.2501c.3702e591@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6ed373227680b016b4cfa5af1b802ef23a121513 commit 6ed373227680b016b4cfa5af1b802ef23a121513 Author: Mark Johnston AuthorDate: 2026-02-25 15:31:30 +0000 Commit: Mark Johnston CommitDate: 2026-02-26 02:54:34 +0000 nullfs: Fix handling of doomed vnodes in nullfs_unlink_lowervp() nullfs_unlink_lowervp() is called with the lower vnode locked, so the nullfs vnode is locked too. The following can occur: 1. the vunref() call decrements the usecount 2->1, 2. a different thread calls vrele() on the vnode, decrements the usecount 0->1, then blocks on the vnode lock, 3. the first thread tests vp->v_usecount == 0 and observes that it is true, 4. the first thread incorrectly unlocks the lower vnode. Fix this by testing VN_IS_DOOMED directly. Since nullfs_unlink_lowervp() holds the vnode lock, the value of the VIRF_DOOMED flag is stable. Thanks to leres@ for patiently helping to track this down. PR: 288345 MFC after: 1 week Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D55446 (cherry picked from commit 8b64d46fab87af3ae062901312187f3a04ad2d67) --- sys/fs/nullfs/null_vfsops.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index 8b9e04775449..cb637c98673e 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -465,16 +465,12 @@ nullfs_unlink_lowervp(struct mount *mp, struct vnode *lowervp) vhold(vp); vunref(vp); - if (vp->v_usecount == 0) { + if (VN_IS_DOOMED(vp)) { /* - * If vunref() dropped the last use reference on the - * nullfs vnode, it must be reclaimed, and its lock - * was split from the lower vnode lock. Need to do - * extra unlock before allowing the final vdrop() to - * free the vnode. + * If the vnode is doomed, its lock was split from the lower + * vnode lock. Therefore we need to do an extra unlock before + * allowing the final vdrop() to free the vnode. */ - KASSERT(VN_IS_DOOMED(vp), - ("not reclaimed nullfs vnode %p", vp)); VOP_UNLOCK(vp); } else { /* @@ -484,8 +480,6 @@ nullfs_unlink_lowervp(struct mount *mp, struct vnode *lowervp) * relevant for future reclamations. */ ASSERT_VOP_ELOCKED(vp, "unlink_lowervp"); - KASSERT(!VN_IS_DOOMED(vp), - ("reclaimed nullfs vnode %p", vp)); xp->null_flags &= ~NULLV_NOUNLOCK; } vdrop(vp); From nobody Thu Feb 26 03:20:37 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLxYQ6CNLz6T6Cc for ; Thu, 26 Feb 2026 03:20:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLxYQ4nG2z45Td for ; Thu, 26 Feb 2026 03:20:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772076042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FgXJvG791MAO2b3jzxQwtT5F6SoXocfSxJs7BnLQOHY=; b=M9iY+Vc1hv9GOA/+kGEfjNSiYBVpU0tGwhG0yTXyJbH8YbbbSac/wGOhco0thXvkvjZeuX 19kGhb9+jbrYGngmVtsKxsHFhNT0SOPiBNHYXk8uibUI/sPbY1+Xb2TlKEDBsz3iHePvyH 0zo/UZIjlXebal5Myl/hTySU1BL6elSMpMHvAL7XP22jWF2HiwQ/yGDXoIf0EPH4cIWZ3J lJMWZCHRunzbY6qkvPmmcP1zoFMQtkw8+ppz3oD0/K4iM49fHsPBsKOiH5zsgM0L8hG/o1 fudUhTGC4cEbaHEkhHRZvknciTM1/6Ek9NkMk9Gqfsh/BQBTUmESoWKLoRbGtw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772076042; a=rsa-sha256; cv=none; b=UDSmD2DpU7VyJXTU4cT/fNiBYqS9Cqs+h0usXJC2shhmD0wlG5TmIZPEfC3HEhNEn7wRmo xzl+Ik0N2WzriN+ESXi1zJL1AY2b7+/6anuzEsT3O5HDZETiIIKivRYdSJo12wi36R+MT1 0PXOEyp2HDRNV8mzDg+WaXHoKlR6Y0PPNNb0NC1E6o1sKF/NkYzTNXiNmXrFP2z/3ucCMI F/OjF1f/KsBQ7Y2twkj9sO/M5Zp5n48eejqdbcmHuvzQlYElv+YyQYcgw3cTSKk4fhE9uV Pbf9wKw5sVsOW7qz4qHk+Lx34i7A6SeuKdj7ik8fwxiCkoVrV1FEfB4j+FMqOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772076042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FgXJvG791MAO2b3jzxQwtT5F6SoXocfSxJs7BnLQOHY=; b=FlZvsB9HsKU3y99HlukuuftL8PJMr5LsFq35hdKzQ8LFKR8bXp9GyCfmJKIgqwF9wF8yRs rIZMHHtpXNUeFemvV3OjzE+Jqq0yRnXN035hRXQoCD1vuRzKcFXzWaashLvPuGF0YdUc3E uy4yfFCtChWEQbgHAbzDQBQCpe3IG3syoCOMJyeJb/k3ow/gqukTLlNpRIgjFcK3iWLwKE o+Eaod+pJ4DJZ58WqUC6UwBRjnP5VI7Gu6tVqyUuo3uUG0JQmvC4qAT5+YU1lOc5taTWkM fbV+lS0m77Or+5UI4/X72feuPiQ4Oy19a9IG7blucFg1DDS60A+RrL0NOMPEPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLxYQ4MpGzF4 for ; Thu, 26 Feb 2026 03:20:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27d40 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 03:20:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Mark Johnston From: Colin Percival Subject: git: 49684d7d93d3 - releng/14.4 - nullfs: Fix handling of doomed vnodes in nullfs_unlink_lowervp() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.4 X-Git-Reftype: branch X-Git-Commit: 49684d7d93d318391c4a2b33b74f5cc3fba61143 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 03:20:37 +0000 Message-Id: <699fbc05.27d40.1fe8b41e@gitrepo.freebsd.org> The branch releng/14.4 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=49684d7d93d318391c4a2b33b74f5cc3fba61143 commit 49684d7d93d318391c4a2b33b74f5cc3fba61143 Author: Mark Johnston AuthorDate: 2026-02-25 15:31:30 +0000 Commit: Colin Percival CommitDate: 2026-02-26 03:12:43 +0000 nullfs: Fix handling of doomed vnodes in nullfs_unlink_lowervp() nullfs_unlink_lowervp() is called with the lower vnode locked, so the nullfs vnode is locked too. The following can occur: 1. the vunref() call decrements the usecount 2->1, 2. a different thread calls vrele() on the vnode, decrements the usecount 0->1, then blocks on the vnode lock, 3. the first thread tests vp->v_usecount == 0 and observes that it is true, 4. the first thread incorrectly unlocks the lower vnode. Fix this by testing VN_IS_DOOMED directly. Since nullfs_unlink_lowervp() holds the vnode lock, the value of the VIRF_DOOMED flag is stable. Thanks to leres@ for patiently helping to track this down. PR: 288345 MFC after: 1 week Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D55446 (cherry picked from commit 8b64d46fab87af3ae062901312187f3a04ad2d67) (cherry picked from commit 6ed373227680b016b4cfa5af1b802ef23a121513) --- sys/fs/nullfs/null_vfsops.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index 8b9e04775449..cb637c98673e 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -465,16 +465,12 @@ nullfs_unlink_lowervp(struct mount *mp, struct vnode *lowervp) vhold(vp); vunref(vp); - if (vp->v_usecount == 0) { + if (VN_IS_DOOMED(vp)) { /* - * If vunref() dropped the last use reference on the - * nullfs vnode, it must be reclaimed, and its lock - * was split from the lower vnode lock. Need to do - * extra unlock before allowing the final vdrop() to - * free the vnode. + * If the vnode is doomed, its lock was split from the lower + * vnode lock. Therefore we need to do an extra unlock before + * allowing the final vdrop() to free the vnode. */ - KASSERT(VN_IS_DOOMED(vp), - ("not reclaimed nullfs vnode %p", vp)); VOP_UNLOCK(vp); } else { /* @@ -484,8 +480,6 @@ nullfs_unlink_lowervp(struct mount *mp, struct vnode *lowervp) * relevant for future reclamations. */ ASSERT_VOP_ELOCKED(vp, "unlink_lowervp"); - KASSERT(!VN_IS_DOOMED(vp), - ("reclaimed nullfs vnode %p", vp)); xp->null_flags &= ~NULLV_NOUNLOCK; } vdrop(vp); From nobody Thu Feb 26 03:26:11 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLxgm2bhvz6T72B for ; Thu, 26 Feb 2026 03:26:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLxgm0VGHz46fm for ; Thu, 26 Feb 2026 03:26:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772076372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YnhUs7SrVcITKRVdtJx+hJjNsLtDZyPXPtaRjX/8LSg=; b=ZbAf8YSKQmdAWInxLL2TXbaUN9DK9OHnw3ybEKMWLquh4g41gr9ACZNNWqY+c+DaTQ8z7X klzLybPGDY+xYZEqb9qldtqRechtZCHvtGHwOChFf51NTk383V7Jgel6k4CZakC5XkmIZv V9x3EcJidZAY0H1W0ml+lyl82fp68S5j1wCqicMXvfP0DNGpYTI7x/KCHRYKpcvmFqSqoK Jway7+hPpsgPezZ3b0PUGo0cpyy0D9scG45pAvSPWdK3bCawbkaLuIFzMclyrTK+03OC5C TmjBeXKSTLwVSxZAfOPSpzABToaSKMHfLzAfd7ByOKfRvbgf8QRXzEtf7G24oQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772076372; a=rsa-sha256; cv=none; b=CyQxMP841Sw74oNAGl/7uv7GTnL/pdaQwYkoVY95xf6CnCFVhJuyS+jsryvqib0o4+ID4i 7Jm+C9iMaRnd/JU9KkA1D8hcbVyH51sIp2bL+bdhjxY59Gvv1fdx3acHi+Hcsu5nXZh9Jb k7yFxveVXgyfjxMl+evultLQcxg3/jIZu8TnO0T8++9mKlWgMVK9ys2OX9mLCSplYTBN5S gOKFZYfRcC2sIZfVzlXH1Ubeyd/Iq5watrU6xVETlx5XOk9oZdutFQP6lEKk6Wmu0LCvZJ AipIJsOAtRWTxixwQXPwL4emi2UYhUeMVszTFp8YNRF3qS4evwwfy1ZunQFSOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772076372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YnhUs7SrVcITKRVdtJx+hJjNsLtDZyPXPtaRjX/8LSg=; b=C+2fyENPSPRaig2YJ5p70LqZ71DDduEkRca9sDCmd51oLsuZMqL8GDzHvRw5BZkwdtyu2m WmYAJkfELXWBLf+7mL+y2zk7eZsPCfdTYkkw7TjPy196Mb/ADjGOmjXkvTkGW/Fl4FGx6L tlaxYiPMXpnCPDPUs+AhyQ0b+nj39gimuMYqhoqds5gDnXpIepTD+2VCU9RXET5vkBsRTt D9sedQ5jLyO8Kv1tzB0b45qA0SOkMbOnn5wyfFKH5OecHAojF3Z9NBHn52OhY/hiZgivyL 9SyHVyRM1nMQW+QsSnTS1+dkML/kDTHEl2dQM/z5faLUUnsxQ2ryW7euVwFwUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLxgl6ThdzT6 for ; Thu, 26 Feb 2026 03:26:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2684f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 03:26:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ahmad Khalifa Subject: git: 0f5900bf663b - stable/14 - efibootmgr.8: capitalize examples section header List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0f5900bf663b980c88546711077110aef88972a7 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 03:26:11 +0000 Message-Id: <699fbd53.2684f.21f7fad2@gitrepo.freebsd.org> The branch stable/14 has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=0f5900bf663b980c88546711077110aef88972a7 commit 0f5900bf663b980c88546711077110aef88972a7 Author: Ahmad Khalifa AuthorDate: 2026-02-24 20:11:26 +0000 Commit: Ahmad Khalifa CommitDate: 2026-02-26 03:13:15 +0000 efibootmgr.8: capitalize examples section header MFC after: 3 days (cherry picked from commit fac9ae3db4e6a28dfd467369e262f636e10a3b01) --- usr.sbin/efibootmgr/efibootmgr.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/efibootmgr/efibootmgr.8 b/usr.sbin/efibootmgr/efibootmgr.8 index fc8da06719c5..68eef1c9cbb5 100644 --- a/usr.sbin/efibootmgr/efibootmgr.8 +++ b/usr.sbin/efibootmgr/efibootmgr.8 @@ -179,7 +179,7 @@ Displays the UEFI device path of .It Fl v -verbose Display the device path of boot entries in the output. .El -.Sh Examples +.Sh EXAMPLES To display the current .Cm Boot related variables in the system: From nobody Thu Feb 26 03:26:13 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLxgn37mBz6T6yc for ; Thu, 26 Feb 2026 03:26:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLxgn0bTVz469J for ; Thu, 26 Feb 2026 03:26:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772076373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HYbDGj5ENJv6iDhrvu5vuQQ7xMwttkMuB6pHWnBNU9w=; b=bNf5p5iu8jzDqOag54UVHRErH49BP3fAkjsEgtVPGOPx53F0e2/i2QmLDJ1Ss5vg3bGpB2 pb1u8XgoNZ1yV1XR0mO3TQ2UMbZH6mp0E2vIWUAsrQXMCC273eMZoB6HHzO+nc1uFSASuF BXly0IWtSNAnKFdDlqdVjqJfMWu0RklD44yGxJnv3kKrYHHLXFIDCVr+XsUU5P3FyB6gzl KxGU4P/dAZpa1w7Zgxb2y/ygTkJ17ifbst/UUEsY0zdYYFTy3vCOtulugL1eNhKmywFihz BepMhu7YZtxfZoTfioHW2f+Kf32dFucJtv79hyBH7GSmRhA3NxqkmruurAVCSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772076373; a=rsa-sha256; cv=none; b=l+juIHDfzRo8q9gol2OoNhNUQGCSA2vrWcc/ZTbP0ArFoEtEknGrLAiSY5MkSNw3bXLNfJ YM4h1UVzLzACM6G0kJ1Uon3I7rk9PJEYebkUxnGIObP2MENuSz/LNbJtdILAF3mUUITL3Y zQKUUiYmdm1zoet2rAzUYyymEP0pkAPMfRkmdtjSkubVmzOyzLMlG10EolMRtIOzMqsgv/ IGptJQ2ahrwBLl5RdDTMxKHJZiwrKVJrs/2wdG2FP3xImTxLIuG7UmlDvolHFv/XTjlf2c KFdtCXpwpU32vSg+xBlMTu236SkzIYbk9424OshBanuzvlkoyhZGQCxORPXkwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772076373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HYbDGj5ENJv6iDhrvu5vuQQ7xMwttkMuB6pHWnBNU9w=; b=lFUGsppStHCRxElMlfXDd6gwCsB9YS2nk5gxSLTpWRYVSelyzkY7EsqHCVk3Wl0eobwDj3 zRdHe8MNibJQbRpkfrq7vosQkR4p4j5pdScvMlN8NPQgPxoyyMDuuGpvQGi1LNGwWaaNzU vSUnLs/wtJklYqbXJ3/qfe/KBpg9ZvsOPsk8DHgYZ7geqlYEFQvYo92fzWoUvCyJYNmpp6 suFhCApIa8kWvNvqGU4unUMZe45oZ8Kaoob74reojzGUNM0w5yacIuR22PPI4pVzZ+LaKq 1in2m1pc2Sbqzzv+Up/nEB3r7hmMhJJZcZkWA2pu7nRWPwMlc3RDUCm6AosnZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLxgn07yzzSP for ; Thu, 26 Feb 2026 03:26:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27806 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 03:26:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ahmad Khalifa Subject: git: cfdd90abab51 - stable/14 - bsdinstall: fix EFI boot entry creation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cfdd90abab51581120da75b45018a79237228b33 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 03:26:13 +0000 Message-Id: <699fbd55.27806.26c7464e@gitrepo.freebsd.org> The branch stable/14 has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=cfdd90abab51581120da75b45018a79237228b33 commit cfdd90abab51581120da75b45018a79237228b33 Author: Ahmad Khalifa AuthorDate: 2026-02-24 20:11:32 +0000 Commit: Ahmad Khalifa CommitDate: 2026-02-26 03:13:15 +0000 bsdinstall: fix EFI boot entry creation update_uefi_bootentry assumes that the caller sets FREEBSD_BOOTNAME and mntpt, which isn't the case anymore. The result is that there is no "FreeBSD" boot entry created/updated after install. Most machines manage to boot from the removable media path (if the loader is installed there too), but some don't. Take the loader's path as an argument and rename the variable used in the ZFS mirror loop so mntpt can be reused below. Also mark nentries as a local variable so it doesn't leak out of the function. PR: 293385 Fixes: 494de51bc0074472d1b01604f085daea0844f240 MFC after: 2 days Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55469 (cherry picked from commit 0fd91c489134643ac9e38c0f55ba7464fe892c5e) --- usr.sbin/bsdinstall/scripts/bootconfig | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/bootconfig b/usr.sbin/bsdinstall/scripts/bootconfig index ba9a4369429c..5bcc49084617 100755 --- a/usr.sbin/bsdinstall/scripts/bootconfig +++ b/usr.sbin/bsdinstall/scripts/bootconfig @@ -80,11 +80,13 @@ uefi_copy_loader() update_uefi_bootentry() { - nentries=$(efibootmgr | grep -c "${EFI_LABEL_NAME}$") + local nentries=$(efibootmgr | grep -c "${EFI_LABEL_NAME}$") + local loader_path=$1 + # No entries so directly create one and return if [ ${nentries} -eq 0 ]; then f_dprintf "Creating UEFI boot entry" - efibootmgr --create --activate --label "$EFI_LABEL_NAME" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null + efibootmgr --create --activate --label "$EFI_LABEL_NAME" --loader "${loader_path}" > /dev/null return fi @@ -94,13 +96,13 @@ update_uefi_bootentry() for entry in $(efibootmgr | awk "\$NF == \"$EFI_LABEL_NAME\" { sub(/.*Boot/,\"\", \$1); sub(/\*/,\"\", \$1); print \$1 }"); do efibootmgr -B -b ${entry} done - efibootmgr --create --activate --label "$EFI_LABEL_NAME" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null + efibootmgr --create --activate --label "$EFI_LABEL_NAME" --loader "${loader_path}" > /dev/null return fi FREEBSD_BOOTLABEL=$(dialog_uefi_entryname "${EFI_LABEL_NAME}") [ $? -eq $DIALOG_CANCEL ] && exit 1 - efibootmgr --create --activate --label "$FREEBSD_BOOTLABEL" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null + efibootmgr --create --activate --label "$FREEBSD_BOOTLABEL" --loader "${loader_path}" > /dev/null } f_dialog_title "Boot Configuration" @@ -148,21 +150,22 @@ if [ -n "$(awk '{if ($2=="/boot/efi") printf("%s\n",$1);}' $PATH_FSTAB)" ]; then # over gmirror, so we only do this for ZFS. esps=${TMPDIR:-"/tmp"}/bsdinstall-esps if [ -f "$esps" ]; then - mntpt=$(mktemp -d -t bsdinstall-esp) + tmpmnt=$(mktemp -d -t bsdinstall-esp) for dev in $(cat $esps); do f_dprintf "Installing ${file} onto redundant ESP ${dev}" - mount -t msdos "$dev" "$mntpt" + mount -t msdos "$dev" "$tmpmnt" uefi_copy_loader "$BSDINSTALL_CHROOT/boot/${file}" \ - "${mntpt}/efi/freebsd" "${mntpt}/efi/boot" \ + "${tmpmnt}/efi/freebsd" "${tmpmnt}/efi/boot" \ boot${ARCHBOOTNAME}.efi - umount "$mntpt" + umount "$tmpmnt" done - rmdir "${mntpt}" + rmdir "${tmpmnt}" fi - # Try to set the UEFI NV BootXXXX variables to record the boot location + # Try to set the UEFI NV BootXXXX variables to record the boot location. + # Note that the ESP is mounted at ${mntpt}/efi. if [ "$BSDINSTALL_CONFIGCURRENT" ] && [ "$ARCHBOOTNAME" != ia32 ]; then - update_uefi_bootentry + update_uefi_bootentry "${mntpt}/efi/freebsd/${file}" fi f_dprintf "Finished configuring ESP" From nobody Thu Feb 26 03:26:14 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLxgp3M60z6T6wW for ; Thu, 26 Feb 2026 03:26:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLxgp1qLKz46Nh for ; Thu, 26 Feb 2026 03:26:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772076374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t2uT3ptlw5AlFxXanlB+65eyKF7pbBFBZZCTpliVYXw=; b=Og2CqbXd/k/cD+T4lGCdwLqb6ZlE5+FnNqtMDaEagLOIqdrqADBxUDFaqs/UwP/G41xoGA reYS1ih4+kqLQbwgs87g2l4sgYjUe/JHo1WoLoEwPTnHUpS5LJj2BaUYP6Ic21NSbq5pvl nLQXkloOGKzUpzYM1LCUJ7TpjntIU6VZ3M5vzFpaPg93+Ql3ToRe78qMWwlCmSrgSI60uA KzrsVvgAP9jCIjwM8qNZFlDJNd02WEjyisklboWORnb6LY5CGxef9Vz1IScyIQAQ/pXSmI ik5HXxO9mBjj30sOUK9b7APcrM50qNksvSzW2AjV2dZ+1zJFmNdxChvXVoF4Mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772076374; a=rsa-sha256; cv=none; b=Yy/cggM3Eao1gm77KCvPiH+vHDNi8SlPLRJV/z0su6h8QlfJ5g8TvCEfmKWQ7A+qu0LLGA aeCVwjISbNxqRXxSZ6rd8hF4IMrjGYT+AFlhFnrDRPiMHmb/R8IO7063tIZGkHl2k3BW9H 13UfC7sbYSZQLSgk7K6EgJYlo8nDD2lfdIvFnAyo+Avx/Es4Y8yfeP0Ptui7q48/eeokj4 YbBFHu/eqkouKXMJU4uzRKA4W67/+d4aED7SrbWu1jiTiOxhVsFokybavkN3f8PreviWg3 IWbTuct4oZhhaG6RUeAFuPOFHPTGHTOrWOARUc3WjEE4P33B3C5RYCBODhzbCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772076374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t2uT3ptlw5AlFxXanlB+65eyKF7pbBFBZZCTpliVYXw=; b=XI1WBBL8EXq7uSF3dyyEHDAAsL6qitzcsQ1+1F3ZedJgJ3lQbdl4Fk+1NuxCaGUUJsU5Yo FEYU44K9uUTFpnHj4sZ0RrthTDkjpu4gMKruS+YYBNROckHadCBQJlZtEHn9PyopXceaiZ mKjpAY5wJMlMcJc2PV33MuxGzdFmzlPMIQQ0LP8AzgK4TJl2Beb/VwSpo83LmTTzr0NXCm O29gDgPAq0DlhXBI1VqyMl915xDke/2U6GrZSLxiMzMIqTXtGXBE5ZN/GgFtLtbUDAo6l9 D29rbRLQbNlVxZvH3J0GmHN8XRJ0syZ847Q71XkvfvYw5OogLrRuQqLwr8vqZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLxgp18HMzSQ for ; Thu, 26 Feb 2026 03:26:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2780a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 03:26:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org, dev-commits-src-branches@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Quent=?utf-8?Q?in Th=C3=A9?=bault From: Ahmad Khalifa Subject: git: 923b3fc963d9 - stable/15 - sys/subr_module: remove useless macro gates List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 923b3fc963d9d1a1cd03d628daac68af0b57f366 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 03:26:14 +0000 Message-Id: <699fbd56.2780a.ff1974b@gitrepo.freebsd.org> The branch stable/15 has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=923b3fc963d9d1a1cd03d628daac68af0b57f366 commit 923b3fc963d9d1a1cd03d628daac68af0b57f366 Author: Quentin Thébault AuthorDate: 2026-02-05 14:57:11 +0000 Commit: Ahmad Khalifa CommitDate: 2026-02-26 02:03:43 +0000 sys/subr_module: remove useless macro gates These constants are always defined by sys/sys/linker.h. Reviewed by: vexeduxr Signed-off-by: Quentin Thébault Sponsored by: Defenso MFC after: 2 weeks Closes: https://github.com/freebsd/freebsd-src/pull/2004 (cherry picked from commit 912418193ed1f9a0f58b083037751b1fbc4c30ef) --- sys/kern/subr_module.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sys/kern/subr_module.c b/sys/kern/subr_module.c index d07990cebdc3..f8b6770e3189 100644 --- a/sys/kern/subr_module.c +++ b/sys/kern/subr_module.c @@ -433,16 +433,12 @@ preload_modinfo_type(struct sbuf *sbp, int type) sbuf_cat(sbp, "MODINFOMD_VBE_FB"); break; #endif -#ifdef MODINFOMD_FONT case MODINFOMD_FONT: sbuf_cat(sbp, "MODINFOMD_FONT"); break; -#endif -#ifdef MODINFOMD_SPLASH case MODINFOMD_SPLASH: sbuf_cat(sbp, "MODINFOMD_SPLASH"); break; -#endif #ifdef MODINFOMD_BOOT_HARTID case MODINFOMD_BOOT_HARTID: sbuf_cat(sbp, "MODINFOMD_BOOT_HARTID"); @@ -497,12 +493,8 @@ preload_modinfo_value(struct sbuf *sbp, uint32_t *bptr, int type, int len) #ifdef MODINFOMD_VBE_FB case MODINFO_METADATA | MODINFOMD_VBE_FB: #endif -#ifdef MODINFOMD_FONT case MODINFO_METADATA | MODINFOMD_FONT: -#endif -#ifdef MODINFOMD_SPLASH case MODINFO_METADATA | MODINFOMD_SPLASH: -#endif sbuf_print_vmoffset(sbp, *(vm_offset_t *)bptr); break; case MODINFO_METADATA | MODINFOMD_HOWTO: From nobody Thu Feb 26 03:26:15 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLxgr2Mywz6T6wZ for ; Thu, 26 Feb 2026 03:26:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLxgq56WBz46cv for ; Thu, 26 Feb 2026 03:26:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772076375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4959B4Q+U4kHkUQ/U4Haf0GxDp2OXCGVmp9BoQ72Ic0=; b=uuBLLl21LjSKrgn5H6lT7/O5A2GdCB4J8/ez3fABLeuj6+lMS3WaoPrmA2YsCpxt67Asg5 +n4fB1844nGP3sDS7FDlHwJHtdEj9nIvu1ieILaOJbkcrN+tpxSPBL4RkqO3c7iP0/QR+7 q7elxmX4QApMP+mXyNFHnZv7wspyWCJ7b34WMa2gTfJ1DNwHF1dkKe0aMXJ7/js9jMGMPq FgIGKqfDQFGWvf/7riDcyt8W4fUOqOKQFO+dpHVnSapT0+3B96on5vUWdkXUtim7Q0GyLF wz+QBgb+I4XPP+IFYvoimyPr/qebWjRLMvZS6DaMl96A4HbspJlSlDY0RittPw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772076375; a=rsa-sha256; cv=none; b=qpgbogwf/H7BLYM+GPZrnV5nQEdsa6LUuhIhZXwZKa7p5WZ2QHVU4pQyD2DRew0L32Iumy Bm4NJrg3mef3XD3OeKD1tOpT4zpVzWgu6aeqgQXDND3cCIRLrXmtshKPekCtI17rzSlyKq argfQAEpzbYHmBhDz1rmEmZg+EhQlEsVPntBJfLJm+GbrG2aGU6Zb1oCtLsxH5Kqs9oY5+ lqtJBJ1h3/H2r1N+YMkYL5VMdnOWCt1M9qtpPilQu6VRCHcW2u1FfeGO8WtoKzXv/FRFiN Fx04WURvS6iK8WP7YLWFsWjDobRQ4mmFpCtd45ae5i/SFBB36m+ELTgMgzdlcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772076375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4959B4Q+U4kHkUQ/U4Haf0GxDp2OXCGVmp9BoQ72Ic0=; b=sLiwh15R7vZC6eyP7i0a+NHOjaiN8YkUe4ZwTRVpY8ZZ2nJPrDvvab7pOcH946SiLAmtmk f97SjPiYHA+q2LY83kWzjfAKtZi3TyhpGmm5NtTbOUjRPEfcDqSSi5JBCZSlxkfmmOfnmb Rr9f0K0WQjU/gFFfAjBwitMv/LhqGctAg7MRqFBfQ5M8WQ689S9XAWEmVShWwYluzE8lip tFNWJumcWzDUE/drfJfYuDmeMeVwxTeLP6W7VqD4gusR35zjE35LluqeEn5vLSqyU1YFN7 tgCYDoWaW5DJv+jjtciuaQsEwzcVVIXaAuXywAgD+C6NmumtTPTIO+kRgw4bOg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLxgq207Pz1SSn for ; Thu, 26 Feb 2026 03:26:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26c45 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 03:26:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org, dev-commits-src-branches@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ahmad Khalifa Subject: git: a36976045138 - stable/15 - efibootmgr.8: capitalize examples section header List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a36976045138ef067be9026e6118c6b308356c37 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 03:26:15 +0000 Message-Id: <699fbd57.26c45.5ef46ece@gitrepo.freebsd.org> The branch stable/15 has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=a36976045138ef067be9026e6118c6b308356c37 commit a36976045138ef067be9026e6118c6b308356c37 Author: Ahmad Khalifa AuthorDate: 2026-02-24 20:11:26 +0000 Commit: Ahmad Khalifa CommitDate: 2026-02-26 02:03:53 +0000 efibootmgr.8: capitalize examples section header MFC after: 3 days (cherry picked from commit fac9ae3db4e6a28dfd467369e262f636e10a3b01) --- usr.sbin/efibootmgr/efibootmgr.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/efibootmgr/efibootmgr.8 b/usr.sbin/efibootmgr/efibootmgr.8 index ca4e87a30ef8..e5054023e40c 100644 --- a/usr.sbin/efibootmgr/efibootmgr.8 +++ b/usr.sbin/efibootmgr/efibootmgr.8 @@ -202,7 +202,7 @@ Displays the UEFI device path of .It Fl v -verbose Display the device path of boot entries in the output. .El -.Sh Examples +.Sh EXAMPLES To display the current .Cm Boot related variables in the system: From nobody Thu Feb 26 03:26:10 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLxgr2R7sz6T76X for ; Thu, 26 Feb 2026 03:26:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLxgr0Zx2z46LS for ; Thu, 26 Feb 2026 03:26:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772076376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xY2OJUAFc4Ow2/YIIDK3E+E7X6V1A1xBgrdKvMA8suc=; b=d1qVomh57WyyypRzOECRBuBlI2LBBtNFOafgKccEmTHOpJkc3MJTPmPgTS6zp19pxYfxIq sj6w35bj9QeVW4IzM6R+jBqHjOONx64FeRg/4eeodlfy2jf8cXTIkDiP98AT3uZUIGJxjF n3uOfUYdO+jlIfSEL/OrmqcCGKjl1q3gAT6MFjpTVJXWiwtICMKSZ34lCE6VR2yTGLP7yn MnECLe+67tVwWtoBX47AF8qCJkSF3I5p+UcALQfzebNbTRRjHIF/XC40tqPjR2Q1Qu+vY8 hAop4CvkwqSpXna7NAnk/unbi15pZaVrOx2eEpJGlJa8MRpWYW2gfJfNIJBeew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772076376; a=rsa-sha256; cv=none; b=aaWOmEvy5lFTNy8FsFAWpEs9ThK+lv7BcHOYAm/0EhqTwj3sT7epw84wado3OSu+Mqlx42 VtrmuNRCkzZDHyT8GAbBAW4trUX+xv8pRZHMecaEU86WZ6x/Kqe4FUHcaN8KKGvvoy3R4q hIfImarUticLDzx4joUd6/OFOWooRu0uvbpoYQmaCpa7qstEFD+FqChN2yKijxpMGLwIeb 1IU4GAUWOCG0CmhVS9BAm8TSN5VLoMTErZQvIkAZPhu2nB+3RA00GkK1S9OyGSmgjCpUOm k67InhSPdE7U1/vwpyO/dp6IFDMOqxZElRMWwdsErSZ50u2t3x2q5VJYaPgX7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772076376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xY2OJUAFc4Ow2/YIIDK3E+E7X6V1A1xBgrdKvMA8suc=; b=hMCw+v1Dxo4MSm2Uf1myAlFJmDe4qrqJNhVpMRrsudHRkx0o6pfZx2mqK3n6emnLoE/DeE sXva9b4RFYZnsp5IgYoo8t+7n+0RoQ3BV0I+98mskksvLqQYx6wFe5HKOR5nLQDOxTptYH ostetEdBK/fsHGT47IAtyzO6Eucb9W68m4lsmq9lFueS8ANWICgjiysXXXSbCMLzv8E02G gYkJUBgx+zBeYDv2qq5c+uHtF0Nxh1J9///1ktpyo4E0mTGydb94kbDVkpHhmT42tji4ug DqPLHUr6/x8ZM9T6hMxH7l7KwDLdy4NdPpS6EcL2Z8jBM4ORcxLv6+lqJ/y2bw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLxgq6SSJzJL for ; Thu, 26 Feb 2026 03:26:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2778f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 03:26:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ahmad Khalifa Subject: git: f03fdff591aa - stable/13 - efibootmgr.8: capitalize examples section header List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f03fdff591aac090279b3a58030740172c80621e Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 03:26:10 +0000 Message-Id: <699fbd52.2778f.5b12b66e@gitrepo.freebsd.org> The branch stable/13 has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=f03fdff591aac090279b3a58030740172c80621e commit f03fdff591aac090279b3a58030740172c80621e Author: Ahmad Khalifa AuthorDate: 2026-02-24 20:11:26 +0000 Commit: Ahmad Khalifa CommitDate: 2026-02-26 03:10:09 +0000 efibootmgr.8: capitalize examples section header MFC after: 3 days (cherry picked from commit fac9ae3db4e6a28dfd467369e262f636e10a3b01) --- usr.sbin/efibootmgr/efibootmgr.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/efibootmgr/efibootmgr.8 b/usr.sbin/efibootmgr/efibootmgr.8 index fc8da06719c5..68eef1c9cbb5 100644 --- a/usr.sbin/efibootmgr/efibootmgr.8 +++ b/usr.sbin/efibootmgr/efibootmgr.8 @@ -179,7 +179,7 @@ Displays the UEFI device path of .It Fl v -verbose Display the device path of boot entries in the output. .El -.Sh Examples +.Sh EXAMPLES To display the current .Cm Boot related variables in the system: From nobody Thu Feb 26 03:26:16 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLxgr51lDz6T6yj for ; Thu, 26 Feb 2026 03:26:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLxgr3ZVMz46lY for ; Thu, 26 Feb 2026 03:26:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772076376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QiFR2FaTxFuELEN5DrikY3WPgA0cJWNLJlqQu7rFFrQ=; b=uujoHodEkox8GRy+rjxTM0zsQaBs1CDVFxLBRugX8q05amcnW/Vrk/8Z1xshB8CN54SDmp 70dLZGIOa/hgMTQzmRWnXBrXtNRKHUJydknIg4ydQFu+MVSssH/EKwUtGFhJse4ncdGoWs FDqa/N9MNMA0EuAUn5W0qu0tyDKY7yB1tEvrD4G5SpZK5TYo4tKTjZMB2XtWS+gINPMLR9 Y/HLJ7qvc1i4dKAnBm20L3LY+NH3i6baMO0Z5TvlD9ixzgkpeu2YhkqXAm08H9w6RLYcgg OveEaArT/jyhM+pd2DzxltaGDBMzxtcUVsPuMCHpb4YVOxuaMjItbOh4UDT1eA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772076376; a=rsa-sha256; cv=none; b=ExFAy7P+OZtpnnXubxAP4WyrUjxBOL8xg6nin85YKDrFAombgLtsRgVwmu8wxnTUMInKvm nLAEtR3FLWR2bg4b0X6/4zOhiBX+XErtpEZknnMwMwfXqTe6zrHNvFdyRBuqfpl9Y6PgMJ 6RKs1W46ur3uQCxvs5/DvVR2fHpJqAzx3WuvLhSeuZDRVPl4EreAOS1njY423unVSMbwJr LNXnF6kaeU84rVmCC6K5wxvA3x30enyzaf4wnpJRJX81EmS6cQLAuDRAZv21pQrDvJhDbT zvrO/QaSWTLrhpQfZUpN3HmMGrBhk04/u+fU5SdH2fh4/kB2Tezos6RSGAPJ5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772076376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QiFR2FaTxFuELEN5DrikY3WPgA0cJWNLJlqQu7rFFrQ=; b=U2+l10IytpbESgPRkeSCZ2TAiOoNHhc4IpG+jYv6Ye8uFtiakuzgsGAwoKfku9LsHbVDbH aRN1abg/9dNdMso+XvZONS0lROiXfGwwK8ttRyKSGwFtZ+is3flPkAGzPnLygKZMXd45ie bRdzlvXK0OeE3jR5PjBnamVtA+fQ/5fv5NlzyQzvOMbOyhkp2CQNemCnNK2lGUavxdSCkG dxahPasqu8Mp8zpklqz/4mpSO5VH6gCt2vb9oKsWd1Z6+BhFgklKLWkuEyHH7/hSQTNCBp bC/6RXXvtbhdkfrwpMMlWZXhPGqNz9w046ZQ7huY/LNl7FGf/j/0HyaOaz1FMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLxgr2pkbzTB for ; Thu, 26 Feb 2026 03:26:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27881 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 03:26:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org, dev-commits-src-branches@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ahmad Khalifa Subject: git: 5425bdae0970 - stable/15 - bsdinstall: fix EFI boot entry creation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5425bdae09703d028a1e48180e0709ad4e86af12 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 03:26:16 +0000 Message-Id: <699fbd58.27881.6d4ed6ba@gitrepo.freebsd.org> The branch stable/15 has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=5425bdae09703d028a1e48180e0709ad4e86af12 commit 5425bdae09703d028a1e48180e0709ad4e86af12 Author: Ahmad Khalifa AuthorDate: 2026-02-24 20:11:32 +0000 Commit: Ahmad Khalifa CommitDate: 2026-02-26 02:03:53 +0000 bsdinstall: fix EFI boot entry creation update_uefi_bootentry assumes that the caller sets FREEBSD_BOOTNAME and mntpt, which isn't the case anymore. The result is that there is no "FreeBSD" boot entry created/updated after install. Most machines manage to boot from the removable media path (if the loader is installed there too), but some don't. Take the loader's path as an argument and rename the variable used in the ZFS mirror loop so mntpt can be reused below. Also mark nentries as a local variable so it doesn't leak out of the function. PR: 293385 Fixes: 494de51bc0074472d1b01604f085daea0844f240 MFC after: 2 days Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55469 (cherry picked from commit 0fd91c489134643ac9e38c0f55ba7464fe892c5e) --- usr.sbin/bsdinstall/scripts/bootconfig | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/bootconfig b/usr.sbin/bsdinstall/scripts/bootconfig index 9c188c1d8a91..d551d2448611 100755 --- a/usr.sbin/bsdinstall/scripts/bootconfig +++ b/usr.sbin/bsdinstall/scripts/bootconfig @@ -83,11 +83,13 @@ uefi_copy_loader() update_uefi_bootentry() { - nentries=$(efibootmgr | grep -c "${EFI_LABEL_NAME}$") + local nentries=$(efibootmgr | grep -c "${EFI_LABEL_NAME}$") + local loader_path=$1 + # No entries so directly create one and return if [ ${nentries} -eq 0 ]; then f_dprintf "Creating UEFI boot entry" - efibootmgr --create --activate --label "$EFI_LABEL_NAME" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null + efibootmgr --create --activate --label "$EFI_LABEL_NAME" --loader "${loader_path}" > /dev/null return fi @@ -97,13 +99,13 @@ update_uefi_bootentry() for entry in $(efibootmgr | awk "\$NF == \"$EFI_LABEL_NAME\" { sub(/.*Boot/,\"\", \$1); sub(/\*/,\"\", \$1); print \$1 }"); do efibootmgr -B -b ${entry} done - efibootmgr --create --activate --label "$EFI_LABEL_NAME" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null + efibootmgr --create --activate --label "$EFI_LABEL_NAME" --loader "${loader_path}" > /dev/null return fi FREEBSD_BOOTLABEL=$(dialog_uefi_entryname "${EFI_LABEL_NAME}") [ $? -eq $DIALOG_CANCEL ] && exit 1 - efibootmgr --create --activate --label "$FREEBSD_BOOTLABEL" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null + efibootmgr --create --activate --label "$FREEBSD_BOOTLABEL" --loader "${loader_path}" > /dev/null } f_dialog_title "Boot Configuration" @@ -151,21 +153,22 @@ if [ -n "$(awk '{if ($2=="/boot/efi") printf("%s\n",$1);}' $PATH_FSTAB)" ]; then # over gmirror, so we only do this for ZFS. esps=${TMPDIR:-"/tmp"}/bsdinstall-esps if [ -f "$esps" ]; then - mntpt=$(mktemp -d -t bsdinstall-esp) + tmpmnt=$(mktemp -d -t bsdinstall-esp) for dev in $(cat $esps); do f_dprintf "Installing ${file} onto redundant ESP ${dev}" - mount -t msdos "$dev" "$mntpt" + mount -t msdos "$dev" "$tmpmnt" uefi_copy_loader "$BSDINSTALL_CHROOT/boot/${file}" \ - "${mntpt}/efi/freebsd" "${mntpt}/efi/boot" \ + "${tmpmnt}/efi/freebsd" "${tmpmnt}/efi/boot" \ boot${ARCHBOOTNAME}.efi - umount "$mntpt" + umount "$tmpmnt" done - rmdir "${mntpt}" + rmdir "${tmpmnt}" fi - # Try to set the UEFI NV BootXXXX variables to record the boot location + # Try to set the UEFI NV BootXXXX variables to record the boot location. + # Note that the ESP is mounted at ${mntpt}/efi. if [ "$BSDINSTALL_CONFIGCURRENT" ] && [ "$ARCHBOOTNAME" != ia32 ]; then - update_uefi_bootentry + update_uefi_bootentry "${mntpt}/efi/freebsd/${file}" fi f_dprintf "Finished configuring ESP" From nobody Thu Feb 26 03:56:21 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLyLZ6hYhz6TBGW for ; Thu, 26 Feb 2026 03: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLyLZ161fz3CR5 for ; Thu, 26 Feb 2026 03: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=1772078182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jsLcqRQBMiMMv0N4XL1DEixRdorR4OWEpf3e0p9YYSU=; b=DTB89oAuj4s5mMMB5+jndMQf1dIWYWa8+yHT79B6Kye6nOElgnYUO/jBI5FQ5HOaYPN2zR Vanw0w9A25LHQAwQsQ3CXTLsJH2Jlr1J2CoK8hgjx7jVt7AEcNe+mkVozxknmSrOeBy66h bvv3wqYTYJo7tpla2WQxwCNo8TZop6KpTWxmRPJof1fFnC24i1KuGF+PYq1AclBngKs5FR FKUS+jUcaP/f6q0M+9ZU4/lQQIOGf4KPoE4XLx35wT6ZsD/siGBAFJ+wTfbfQfPi0FjWKT 61ZOB8XNHytbiFtMz0jEIDDxj4pXENMRy2QQ0A51egcYl6qX5D4RgobGa0JyqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772078182; a=rsa-sha256; cv=none; b=u+XTK/yJgTDRU98IwVnqLrF+f2q0vMcbdselk9pmjX2bKNcVyGO4rleYjRp4YLyHg93Etx caMltGw9VkDanLk5zycXmUCqugwzuJBeq8ud+r6IsCTx63cfTit+bK6uuQh8FFxEbmKxGe 1sv7cMZXUpRWZQKEeJlIlX5oBgQdXxG6o+CWaF6x6bo1xPIa7zZf4dVIXANDCzJa4708Tm Jkl3o5O7gQ/Ppl0IWQH9j8A/tlkoapcJHY/XTF92hOJwe6s3qK4j+6HUGqQeid48poP0ft e0VxJT7866deo0ssSGZXm6LPjeQGhaKI2OdmrK9W/+ODPfoBb/UyDH9nKSJlOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772078182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jsLcqRQBMiMMv0N4XL1DEixRdorR4OWEpf3e0p9YYSU=; b=qeH1/j9PuDTRDQw1MbSLxipNZrfpuuJ6q47c/odM3U8vkuxHzWeaa80RgLGtZEXm18kFgD EvTwFhuiKdfAfRMcDLYwqasZmEa7muFRguale3hlJb9rmrPUFInY0meY3CJhs9OluGUET3 Vi4lC+pppTIfydiEuSelFG6yN3xT29wf1jC1yfAijCNxJjxbfr5gXDWVOuBXa8YYVJkmfn 2qZ/3Swsp27uewlBiw26mzQZeHdOrX/U1C19WWFCekSeXlWeGx1oBTaHA6eckpUlnKrRYb 0tZooUb1LD3J6wlvA/rJzHkFyxrih+oXu51A/kDvyHkBKTxVedlhVgcSpNj8Ng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLyLY4hl3z1Dg for ; Thu, 26 Feb 2026 03:56:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 328d2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 03:56:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 76a20323fcfb - main - iwi: migrate to new net80211 encryption key API List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 76a20323fcfb9df34cd8529129cad0c4317115fb Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 03:56:21 +0000 Message-Id: <699fc465.328d2.30049797@gitrepo.freebsd.org> The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=76a20323fcfb9df34cd8529129cad0c4317115fb commit 76a20323fcfb9df34cd8529129cad0c4317115fb Author: Adrian Chadd AuthorDate: 2026-02-26 03:49:38 +0000 Commit: Adrian Chadd CommitDate: 2026-02-26 03:49:38 +0000 iwi: migrate to new net80211 encryption key API Migrate to the new encryption key API rather than poking at the key struct directly. Differential Revision: https://reviews.freebsd.org/D54481 --- sys/dev/iwi/if_iwi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/iwi/if_iwi.c b/sys/dev/iwi/if_iwi.c index 26b8037186a6..8146b513d4e6 100644 --- a/sys/dev/iwi/if_iwi.c +++ b/sys/dev/iwi/if_iwi.c @@ -2534,9 +2534,10 @@ iwi_setwepkeys(struct iwi_softc *sc, struct ieee80211vap *vap) wepkey.cmd = IWI_WEP_KEY_CMD_SETKEY; wepkey.idx = i; - wepkey.len = wk->wk_keylen; + wepkey.len = ieee80211_crypto_get_key_len(wk); memset(wepkey.key, 0, sizeof wepkey.key); - memcpy(wepkey.key, wk->wk_key, wk->wk_keylen); + memcpy(wepkey.key, ieee80211_crypto_get_key_data(wk), + ieee80211_crypto_get_key_len(wk)); DPRINTF(("Setting wep key index %u len %u\n", wepkey.idx, wepkey.len)); error = iwi_cmd(sc, IWI_CMD_SET_WEP_KEY, &wepkey, From nobody Thu Feb 26 03:56:22 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLyLb0B00z6TB54 for ; Thu, 26 Feb 2026 03: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLyLZ5ngsz3CwN for ; Thu, 26 Feb 2026 03: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=1772078182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tjkPu1qx06sHMgECZLK894VYqbG4ggiAyAT4bO0ZiRA=; b=uWtB+7pHph9GXgUhT8bKTG5VccbnS4Z2V+dpXAZWrXf3XtH+PRIChVfBXkRAuPTzj9fAou HkN2KWmVMPMcocWAWKGzo39G9A2yKW8XuzNgaDxOLyCiMzAkoodV5QNj7PCMeq7h08KH+R Lm6YyGQO6L8B6FWRA7yj3Jxfp4wYZawVjwaOpUeOv1lk7jcWQNimso2ApZhr7DFwCUxSpb ck7ixO/+rDvtOR76mo0oIXKmZZebxV+nyDwCQkdXphEfmPPcBizYiR3TA7r+SrikJvX2tO 0VU2z0shEBmZ1uWENOHgW4yDe14AlAWqipsTsGXSxQ0+ITdM5YRJM5YP0uj9Xw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772078182; a=rsa-sha256; cv=none; b=uwYNsONQq2UR2seuUF0gt5QLUB+8prhwrJfZD+C9G/GOaD0m1zI3tPHvy2PhHGK8VC5ZZv ec6lxaynOnN6lj0WBPRdTtViT5C6dYFuUAIqqf5zOGzZ7+tFoORwT/C+VxZAT6S7C4FvO1 CpSxRYDDmV2dXhO794g6fT/rSpVX97ome44S1CZJIIVdIQsoyxUEhQ8meKD8Zi9yLi+IK6 RfAZhMHVjZthSBVz73lt5Broc7KFZkFAaFIHn0TYHOEcmBo0Kkk1mdwnFrx9hqBrOCdPPs 0xTG+V8YUY5Im1m4mTz6qi57A92WFGo6+6wCLu12nl7ZqTZrTS8jVaSct1wWwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772078182; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tjkPu1qx06sHMgECZLK894VYqbG4ggiAyAT4bO0ZiRA=; b=GrUGNE7jfPBJ8B5DWBe6iSdKaSjDTH+vypOyRsNL1H0kG+toy24rBEHDtzIc2gc3gUlUqP hFKuuH/J4k7qMdJlpmJpkxFs2tGxtDn9itFlZj8Lul5o1v+kVOI0o+DYlh5WHm85kwnNd1 msCEqmrFdrhmlEaejzkPL2Qy8rlSOmTo+khvnl5i3/+T+FsXy2Blyx8kVzWyl1FGkJUrsm DQD1ft9Slv/xb8WJ6ddHLWjXoBlRrOQgXxLR8XiF4Brj+EVQLewDabAXgZg7WrnpCM7lx5 wNhzfNN6wJm6kd9sRpuLvOaNUwWlTk5c4YJ1Jh2dWjDxdYegDivuqbTv3cOW8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLyLZ5Gntzqw for ; Thu, 26 Feb 2026 03:56:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31cee by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 03:56:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 70786de406b6 - main - wpi: migrate to new net80211 encryption key API List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 70786de406b62bed55566ec95c932e150c25c3b3 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 03:56:22 +0000 Message-Id: <699fc466.31cee.5fde8a7e@gitrepo.freebsd.org> The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=70786de406b62bed55566ec95c932e150c25c3b3 commit 70786de406b62bed55566ec95c932e150c25c3b3 Author: Adrian Chadd AuthorDate: 2026-02-26 03:49:43 +0000 Commit: Adrian Chadd CommitDate: 2026-02-26 03:49:43 +0000 wpi: migrate to new net80211 encryption key API Migrate to the new encryption key API rather than poking at the key struct directly. Differential Revision: https://reviews.freebsd.org/D54482 --- sys/dev/wpi/if_wpi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/dev/wpi/if_wpi.c b/sys/dev/wpi/if_wpi.c index 471700ca9f5c..f6039c5bb790 100644 --- a/sys/dev/wpi/if_wpi.c +++ b/sys/dev/wpi/if_wpi.c @@ -2917,7 +2917,8 @@ wpi_tx_data(struct wpi_softc *sc, struct mbuf *m, struct ieee80211_node *ni) break; } - memcpy(tx->key, k->wk_key, k->wk_keylen); + memcpy(tx->key, ieee80211_crypto_get_key_data(k), + ieee80211_crypto_get_key_len(k)); } if (wh->i_fc[1] & IEEE80211_FC1_MORE_FRAG) { @@ -3031,7 +3032,8 @@ wpi_tx_data_raw(struct wpi_softc *sc, struct mbuf *m, break; } - memcpy(tx->key, k->wk_key, k->wk_keylen); + memcpy(tx->key, ieee80211_crypto_get_key_data(k), + ieee80211_crypto_get_key_len(k)); } tx->len = htole16(totlen); @@ -4627,7 +4629,8 @@ wpi_load_key(struct ieee80211_node *ni, const struct ieee80211_key *k) node.control = WPI_NODE_UPDATE; node.flags = WPI_FLAG_KEY_SET; node.kflags = htole16(kflags); - memcpy(node.key, k->wk_key, k->wk_keylen); + memcpy(node.key, ieee80211_crypto_get_key_data(k), + ieee80211_crypto_get_key_len(k)); again: DPRINTF(sc, WPI_DEBUG_KEY, "%s: setting %s key id %d for node %d (%s)\n", __func__, From nobody Thu Feb 26 03:56:23 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLyLc1dX8z6TBBS for ; Thu, 26 Feb 2026 03:56:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLyLb70QYz3Cqj for ; Thu, 26 Feb 2026 03: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=1772078184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aRE0ZpQnAim8bI8tdXo9zYjT8LOPpcK/PKP9ouHGJNw=; b=I2r4ChLtSXYndxJBZwIjK9pk2AYrcoU+mAr5apoxLkaL/6dqgrZa/1YoqiEqrCkeC1zwP9 9gUlHIFmyHdfN5TGxJTsJWF7LVoLQioaJ1aZNwJbAE2NG8sIaVuRvmDpuneiQZqA2nefwB twd5mjd/V7XjRW9YLqal/TIfM7IO5sIxesfqzKYgDCenjfflJtjFpakY/hKg2k7XmK9s7d CiPhjQE3HmDoBjl90EKD524yrJLO1p7aTtKX9fOTW94pBqec5y4XPFTyYFu/8kYT8x2Xej chxzLPmuNZIhat5HclgWhdsHjg114sR1tOatgfepcWjck/FJdN4JRHEFVksJuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772078184; a=rsa-sha256; cv=none; b=o4C6hferiWjWw25TjYucK8QrBorX0YHTHKYPgT2gDG47mGuwcHuXIHgVJ2pmF5fzrz7UP4 XGsAY9NzJvoWSShQD7fQtInWu3SIXrQ13PRHzEfnuPr26ONxLGzOOM2L2LoejVCF8JsXoO GmlZZ/9of1RkMj1v4jbOZtzjl6NhyerBbGQDoIy2zWpuWjQ7SDksWj+bFyatjneTro3IIz BGPrur81Hsu7EX0VmJ8ydwqE3S8uD++OStAbHcp+NuheHaTg5/9tXvbNPAHmoXpvfmkWra 8gY+3+/BqLFPeQdBYYipjHk3bnih5YP1Hbw54Btzq2kVWCZbVn4iFbmIgeTs0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772078184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aRE0ZpQnAim8bI8tdXo9zYjT8LOPpcK/PKP9ouHGJNw=; b=Px3Udvq93Yknf3bNUm1Tan6yMOtlGi4vy9wGiAzPHMwU782U4BKKcwcPItV5zd5zSOnoYf /KQ1xnb8kfXPxcS9MkmHDkx8NSQ5sPxX50E79bhNX5QWRaPoWWPmdXFHQDWyGZA/DZU3j7 eidj1eJ2Esim1m91iE3r7BDuS+ADNnBydhPpkI6SR62G33Vk/3Iwda0AWiVbDrTqVJG4Od l8iBEy9zyXB0vPFvTQMkeykojkQ9REJ9AlDpKVrlxKt/4VQh5wlPvL5LJ5KT7yMrtOgsgq 8N5wWT7Xn3L0rnnKxK7tkN9c1AOnM0bDWZxMJ3N62Tjzsd402g/PMz6FG3b1Vg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLyLb68TGzqx for ; Thu, 26 Feb 2026 03:56:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31cf2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 03:56:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 8ebc054acacc - main - mwl: migrate to new net80211 encryption key API List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8ebc054acacc70de6b95fc171ff724f344374172 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 03:56:23 +0000 Message-Id: <699fc467.31cf2.4b082269@gitrepo.freebsd.org> The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=8ebc054acacc70de6b95fc171ff724f344374172 commit 8ebc054acacc70de6b95fc171ff724f344374172 Author: Adrian Chadd AuthorDate: 2026-02-26 03:49:59 +0000 Commit: Adrian Chadd CommitDate: 2026-02-26 03:49:59 +0000 mwl: migrate to new net80211 encryption key API Migrate to the new encryption key API rather than poking at the key struct directly. Notably this driver was very clear about its expectation the net80211 key layout w/ key, TX MIC and RX MIC matches the firmware layout and just memcpy()'ed it. That has been refactored. Differential Revision: https://reviews.freebsd.org/D54484 --- sys/dev/mwl/if_mwl.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/sys/dev/mwl/if_mwl.c b/sys/dev/mwl/if_mwl.c index 9f3d34f4f50d..513c3d9c60e4 100644 --- a/sys/dev/mwl/if_mwl.c +++ b/sys/dev/mwl/if_mwl.c @@ -1638,28 +1638,43 @@ _mwl_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k, switch (cip->ic_cipher) { case IEEE80211_CIPHER_WEP: hk.keyTypeId = KEY_TYPE_ID_WEP; - hk.keyLen = k->wk_keylen; + hk.keyLen = ieee80211_crypto_get_key_len(k); if (k->wk_keyix == vap->iv_def_txkey) hk.keyFlags = KEY_FLAG_WEP_TXKEY; if (!IEEE80211_IS_STATICKEY(k)) { /* NB: WEP is never used for the PTK */ (void) addgroupflags(&hk, k); } + memcpy(hk.key.aes, ieee80211_crypto_get_key_data(k), + ieee80211_crypto_get_key_len(k)); break; case IEEE80211_CIPHER_TKIP: hk.keyTypeId = KEY_TYPE_ID_TKIP; hk.key.tkip.tsc.high = (uint32_t)(k->wk_keytsc >> 16); hk.key.tkip.tsc.low = (uint16_t)k->wk_keytsc; hk.keyFlags = KEY_FLAG_TSC_VALID | KEY_FLAG_MICKEY_VALID; - hk.keyLen = k->wk_keylen + IEEE80211_MICBUF_SIZE; + hk.keyLen = ieee80211_crypto_get_key_len(k) + + IEEE80211_MICBUF_SIZE; if (!addgroupflags(&hk, k)) hk.keyFlags |= KEY_FLAG_PAIRWISE; + + /* Copy in TKIP MIC after the 16 byte main key */ + memcpy(hk.key.aes, ieee80211_crypto_get_key_data(k), + ieee80211_crypto_get_key_len(k)); + memcpy(hk.key.aes + IEEE80211_KEYBUF_SIZE, + ieee80211_crypto_get_key_txmic_data(k), + 8); + memcpy(hk.key.aes + IEEE80211_KEYBUF_SIZE + 8, + ieee80211_crypto_get_key_rxmic_data(k), + 8); break; case IEEE80211_CIPHER_AES_CCM: hk.keyTypeId = KEY_TYPE_ID_AES; - hk.keyLen = k->wk_keylen; + hk.keyLen = ieee80211_crypto_get_key_len(k); if (!addgroupflags(&hk, k)) hk.keyFlags |= KEY_FLAG_PAIRWISE; + memcpy(hk.key.aes, ieee80211_crypto_get_key_data(k), + ieee80211_crypto_get_key_len(k)); break; default: /* XXX should not happen */ @@ -1667,11 +1682,6 @@ _mwl_key_set(struct ieee80211vap *vap, const struct ieee80211_key *k, __func__, k->wk_cipher->ic_cipher); return 0; } - /* - * NB: tkip mic keys get copied here too; the layout - * just happens to match that in ieee80211_key. - */ - memcpy(hk.key.aes, k->wk_key, hk.keyLen); /* * Locate address of sta db entry for writing key; From nobody Thu Feb 26 03:56:19 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLyLd2Xn7z6TBK5 for ; Thu, 26 Feb 2026 03: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLyLc5907z3CTK for ; Thu, 26 Feb 2026 03: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=1772078184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fjH2bguszh4QHuj4ZqdTHuauBQimoQPN5BdKhRT0HwI=; b=E1KUBci1nX9tmjwwEetUNqHT4m6BEUjzIKUyD69kZzHnpuMnqegVg3ZttBAvDoUCzX75rS sJ+pbtEDBJGvOO/hbdUvWga7N8wsTjyx/J70v5qJkPZFtkjD4yoiruoQLFX9Q/gNnbwAoP WGPctASkW8ol0WNoF7PL32wesc33fUbyIZVX8DiGhwb+gVwT+qwxSiqEYrcypJKjcGAxB1 r9Xi4BxU03R2BqBWm4XYziHW0JekTx2L141oH3B0HA6z6vcX4uu0aB69o++n/ypL/ZKEOE gTzxlT8Q3ge8qYOhiDIeUAARVqASh0LaF/grXF/UsME20TOTmk1BAOLCHvrWRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772078184; a=rsa-sha256; cv=none; b=MmZkHrGUyAeSuNNEZSJFG19yYgm7Ds7vGll3qBZFs3Nh0ET3vdPC/r9LasHFCdV08I800D 8upfSXPvbpW/aqb38zGVl6FbmcVMU8EsK71OChHdcojjSXcTyNv/c4APzocf81gn5sULbB WsuaRxmjG98dPZimFFoHQtUVoVFhy0drQ2QMMDTmpANp5wddTjKPLySFtoPHvVRNqWP+KC DWTSFCM4xT2qoSrDyXZWlgDjqU4czGhLDQXvaCD5uMx1DvPjoQ16Us/qkBHfQAJi3EXA+L VROtZYh5N+Vki28wjs+sooOH7MCcuByg968UBMvvS0Hy40TVE0dAaMMeHXefQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772078184; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fjH2bguszh4QHuj4ZqdTHuauBQimoQPN5BdKhRT0HwI=; b=KSzYIDqr2rr3gOIp+jWw1wiLqQo7jxRx+kIaKbRv1Lp4zJP1m2ilDViTU77SoohN4WVKTv qVxNEnZqub66S5IQA4CVAVw8Ke99W4hOK6zbtNpDTshHUDgGkeXbyEOJTuahKzF3Cx+hAs Dfa4cxA61qltY1clsusAzWQNCfVyLKE1tPQmoAy9jxgRRSEyIB1ehxAAge6eXkqbWaGKNK zb0eoApWwtduJOB6jSoOEZuzg0g0aBAMOdv65oJEjsN73mIOVPobmpC25vyco0AU2NSFx3 DO/09fXF0KWOyvqyNVPy01BC33AAn+nkTNIUHFKU67ptBVi4tiDrrFMAH7m9BQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLyLc3w3Gzwm for ; Thu, 26 Feb 2026 03:56:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3237a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 03:56:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: a54a36c40f07 - main - ath: migrate to new net80211 encryption key API List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a54a36c40f07092ace706ccec8c3db6f6a1877c1 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 03:56:19 +0000 Message-Id: <699fc463.3237a.681a6e95@gitrepo.freebsd.org> The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=a54a36c40f07092ace706ccec8c3db6f6a1877c1 commit a54a36c40f07092ace706ccec8c3db6f6a1877c1 Author: Adrian Chadd AuthorDate: 2026-02-26 03:49:27 +0000 Commit: Adrian Chadd CommitDate: 2026-02-26 03:49:27 +0000 ath: migrate to new net80211 encryption key API Migrate to the new encryption key API rather than poking at the key struct directly. Differential Revision: https://reviews.freebsd.org/D54479 --- sys/dev/ath/if_ath_keycache.c | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/sys/dev/ath/if_ath_keycache.c b/sys/dev/ath/if_ath_keycache.c index a58625ad2803..2b40a8940674 100644 --- a/sys/dev/ath/if_ath_keycache.c +++ b/sys/dev/ath/if_ath_keycache.c @@ -134,12 +134,16 @@ ath_keyset_tkip(struct ath_softc *sc, const struct ieee80211_key *k, * TX key goes at first index, RX key at the rx index. * The hal handles the MIC keys at index+64. */ - memcpy(hk->kv_mic, k->wk_txmic, sizeof(hk->kv_mic)); + memcpy(hk->kv_mic, + ieee80211_crypto_get_key_txmic_data(k), + sizeof(hk->kv_mic)); KEYPRINTF(sc, k->wk_keyix, hk, zerobssid); if (!ath_hal_keyset(ah, k->wk_keyix, hk, zerobssid)) return 0; - memcpy(hk->kv_mic, k->wk_rxmic, sizeof(hk->kv_mic)); + memcpy(hk->kv_mic, + ieee80211_crypto_get_key_rxmic_data(k), + sizeof(hk->kv_mic)); KEYPRINTF(sc, k->wk_keyix+32, hk, mac); /* XXX delete tx key on failure? */ return ath_hal_keyset(ah, k->wk_keyix+32, hk, mac); @@ -149,8 +153,12 @@ ath_keyset_tkip(struct ath_softc *sc, const struct ieee80211_key *k, * slot, just set key at the first index; the hal * will handle the rest. */ - memcpy(hk->kv_mic, k->wk_rxmic, sizeof(hk->kv_mic)); - memcpy(hk->kv_txmic, k->wk_txmic, sizeof(hk->kv_txmic)); + memcpy(hk->kv_mic, + ieee80211_crypto_get_key_rxmic_data(k), + sizeof(hk->kv_mic)); + memcpy(hk->kv_txmic, + ieee80211_crypto_get_key_txmic_data(k), + sizeof(hk->kv_txmic)); KEYPRINTF(sc, k->wk_keyix, hk, mac); return ath_hal_keyset(ah, k->wk_keyix, hk, mac); } @@ -160,13 +168,19 @@ ath_keyset_tkip(struct ath_softc *sc, const struct ieee80211_key *k, * NB: must pass MIC key in expected location when * the keycache only holds one MIC key per entry. */ - memcpy(hk->kv_mic, k->wk_txmic, sizeof(hk->kv_txmic)); + memcpy(hk->kv_mic, + ieee80211_crypto_get_key_txmic_data(k), + sizeof(hk->kv_txmic)); } else - memcpy(hk->kv_txmic, k->wk_txmic, sizeof(hk->kv_txmic)); + memcpy(hk->kv_txmic, + ieee80211_crypto_get_key_txmic_data(k), + sizeof(hk->kv_txmic)); KEYPRINTF(sc, k->wk_keyix, hk, mac); return ath_hal_keyset(ah, k->wk_keyix, hk, mac); } else if (k->wk_flags & IEEE80211_KEY_RECV) { - memcpy(hk->kv_mic, k->wk_rxmic, sizeof(hk->kv_mic)); + memcpy(hk->kv_mic, + ieee80211_crypto_get_key_rxmic_data(k), + sizeof(hk->kv_mic)); KEYPRINTF(sc, k->wk_keyix, hk, mac); return ath_hal_keyset(ah, k->wk_keyix, hk, mac); } @@ -210,8 +224,10 @@ ath_keyset(struct ath_softc *sc, struct ieee80211vap *vap, KASSERT(cip->ic_cipher < nitems(ciphermap), ("invalid cipher type %u", cip->ic_cipher)); hk.kv_type = ciphermap[cip->ic_cipher]; - hk.kv_len = k->wk_keylen; - memcpy(hk.kv_val, k->wk_key, k->wk_keylen); + hk.kv_len = ieee80211_crypto_get_key_len(k); + memcpy(hk.kv_val, + ieee80211_crypto_get_key_data(k), + ieee80211_crypto_get_key_len(k)); } else hk.kv_type = HAL_CIPHER_CLR; From nobody Thu Feb 26 03:56:20 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLyLg0WY1z6TBBZ for ; Thu, 26 Feb 2026 03: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLyLd724Tz3CxS for ; Thu, 26 Feb 2026 03: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=1772078186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0doAuEpIX1KOhS+t/tlxvUz/5daFQfGtTb6Qhx/t7hU=; b=KnRgXSXFykA8H/FFm1VWWWSCUFgaxgS3fSy21OE7laYZnbxGamNn+u+/aXKblWonfrYRnE lnGBUJP2FwGkB468CukVXcvhHRb24tKbuQFWXoQbsO4/ywvEp57YktIm/NC4CmLvhBl38m 6/4PFxxoR7eA/Y3dHfl1aMyVQd1cRPmodMZF02ZE9NCSxJO4W0jX/JF5xgZyabGSXTyeun bda7r9mKGsXaOBbTqqyUukP2kD1PcdK0zqlznE2QXccVTVqmKPiqXAtPn42lmXwgU/ACIM Ctynjp7k+OTIU/kxRv8Kjr2S8wL5sZJS7K0/xih/czmbDSAlylI+r14Gqr9vQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772078186; a=rsa-sha256; cv=none; b=cdoROG0vbB1jH8hSwBVFZpU8gGyfKnnQq+hNzDjVgE351nbaLcxKgYKjLe1ILiU9ixSr7O CGKxZQPc0TLmDuRpw8vgaEeSiHyXqbcif8nALtUNowcQihW+/6EYis6vKe+Fr5v4ukrSOt EvSun2K8ztnJ16nsAOJsEOqI7rSxGhWX4WddEHSa8xLJTDJd+njWp+9cCCVLZPOKjAXBiZ qBGuHvDUwYbAQCtQFgb6woxIpQIHnCGroiSkWhozcOnOlai/y01Ev3aJwkxlcAi8Ql+tki Gd/wLjVElqhH5JnBvgXVHctgBK94UMEBq7t1oTX+YCpMbXJNP+EWXcu065Z5CQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772078186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0doAuEpIX1KOhS+t/tlxvUz/5daFQfGtTb6Qhx/t7hU=; b=HHNBy3csnt/RmRu4jLQ9nqv535DthA+ctwj7o/zOdsh9JLLc0/yBqxygVKpdBn2sFMyRLI kf5MEzJ+YQfFjrrcjbxbwpSaBFX+PG7j3m9Sd921Glt/b8aHZdsKVl3faWEgLi1tEPHnGN FV5tEJyE2v57xjxKc5q3MTFemzzf5w3N8yohgTOIahtJQW2Pjgzbwyr7sjN44s0HvsB1JA w/roTKJyZ37oB2/aIVIwL9/VF9SEalwXlPHG9gLdnhsYNruuGkFtrOxlgKae+fLm6CQL1Z AD5oGfpQhSkAikmCsg91jXDBUc0s8h0kc1UVP/Y+rHdT9Zw+NnAcvHizuFnYVw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLyLd5Tm2ztt for ; Thu, 26 Feb 2026 03:56:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 328ce by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 03:56:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: fec9453dcea4 - main - ipw: migrate to new net80211 encryption key API List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fec9453dcea41f2716baa350c7e0fe33cdeb4d4b Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 03:56:20 +0000 Message-Id: <699fc464.328ce.5fa66cc7@gitrepo.freebsd.org> The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=fec9453dcea41f2716baa350c7e0fe33cdeb4d4b commit fec9453dcea41f2716baa350c7e0fe33cdeb4d4b Author: Adrian Chadd AuthorDate: 2026-02-26 03:49:34 +0000 Commit: Adrian Chadd CommitDate: 2026-02-26 03:49:34 +0000 ipw: migrate to new net80211 encryption key API Migrate to the new encryption key API rather than poking at the key struct directly. Differential Revision: https://reviews.freebsd.org/D54480 --- sys/dev/ipw/if_ipw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/ipw/if_ipw.c b/sys/dev/ipw/if_ipw.c index 9db562669487..a1c4f7ad8041 100644 --- a/sys/dev/ipw/if_ipw.c +++ b/sys/dev/ipw/if_ipw.c @@ -2020,9 +2020,10 @@ ipw_setwepkeys(struct ipw_softc *sc) continue; wepkey.idx = i; - wepkey.len = wk->wk_keylen; + wepkey.len = ieee80211_crypto_get_key_len(wk); memset(wepkey.key, 0, sizeof wepkey.key); - memcpy(wepkey.key, wk->wk_key, wk->wk_keylen); + memcpy(wepkey.key, ieee80211_crypto_get_key_data(wk), + ieee80211_crypto_get_key_len(wk)); DPRINTF(("Setting wep key index %u len %u\n", wepkey.idx, wepkey.len)); error = ipw_cmd(sc, IPW_CMD_SET_WEP_KEY, &wepkey, From nobody Thu Feb 26 04:17:40 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLyqC1p54z6TDXW; Thu, 26 Feb 2026 04:17:43 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLyqC1CtJz3Hlt; Thu, 26 Feb 2026 04:17:43 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079463; h=from:from:reply-to:subject:subject: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=sqIn3MWVWhpDvYZOSNyIR58an1Yg6XypzsUttI4HRZI=; b=C5oGxQ/CgTjGnxWMT2630fK/zlm+TCq8FdIIsX1W6J7esHSt1rmkfNOqu24rMCUdF+0e4i zvOD9zoGsxCdHWMnG/Bg2QO6gWQSQzpDiiDepg2NOs6UgAg4whzN7VUsGUxr7qqrSRzlEO nifDnJ6wsfiPb+Ua/5fURYWfee/UaoCAdx8PRMpfJJ2R8vyl++bipuzpJfZzz5KtG1OT7T jFcFr7zWLBFbwJ0vMXy9AVxfSfgojBKXt5t+bxRFisYcbBuUG0Pi0xpURHZOJQ9G7hCS5d l2Ewnt5LGj93tMa/XEjBgRUdT0Sgb8v0wwrxDiBbNfA0/11SF4ZWtyS2FgKB3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772079463; a=rsa-sha256; cv=none; b=cRVBgH6UCcTxICPz69Y28UUJa82w4MbwZAysJNTlcUOxq3AXTX1KzXRudYXWsCnKkx3zpI fV3lB+51Kf0ngbS25EgHFDmpuCjO6HNqC/eQgV3D19YAC+b9ADeWLO6bA5bmGVb74rrcWJ 30GZ0QKVvgLUdNmaEB28xorOsg0MRgTT0pS4ExVaWj1YyGian3EbNCdA2OAffAGzHSd56R fTuSQSpo5aMSDYsnfq9P/7qrl5RQgGVmm4BSSODdPWP6Zo9d87CVDuw8to48/sfMQeCwaX b31JWEkNkIe/yZCAgkkzdl4xUEG46DLR/qq5Sf4BBXGz28ZtmUkyz5slrL4eaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079463; h=from:from:reply-to:subject:subject: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=sqIn3MWVWhpDvYZOSNyIR58an1Yg6XypzsUttI4HRZI=; b=QS2IsB/mudEXnJ5LDOJWeaB6ZP89H40HqILF3n8blFBiU9jN87ou1t/stRirNrsOASrGS3 isOrG5boswq+k+RJi2n5tXdHE6isGTCeXDdjBtWqVcIz2eJrWYKWx07AZfsqztD8yrPm+V 3uUhZaRulCddc3+PH9MQm/+dL5GRk191Jblo3+RGuoj+4pryyKRs3BFiXJxZy+VuY0s0kn jtPyrhJtl/E7F8zk5OXWZAB0xXC0Iheg9aRvA5lIZAmtQeud3/T+pd0deDOsiVfqC1+HIE SfGJQAg/E9x2XggihAhj8lrDcWMt2f/MVC5C1xrbXFdVywoWsKIRtok6+DDQtw== Received: from ltc.des.dev (lfbn-nan-1-698-103.w86-236.abo.wanadoo.fr [86.236.35.103]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fLyqB6qtgzPmL; Thu, 26 Feb 2026 04:17:42 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id E8BE2F67EA; Thu, 26 Feb 2026 05:17:40 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Baptiste Daroussin Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: Re: git: 297d5bf89067 - stable/15 - ncurses: merge update to ncurses 6.6 In-Reply-To: <6996cfd3.1c403.1e98d5da@gitrepo.freebsd.org> (Baptiste Daroussin's message of "Thu, 19 Feb 2026 08:54:43 +0000") References: <6996cfd3.1c403.1e98d5da@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Thu, 26 Feb 2026 05:17:40 +0100 Message-ID: <86ecm8qgt7.fsf@ltc.des.dev> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Baptiste Daroussin writes: > +# 20251215: Remove intrinsic utilities > +OLD_FILES+=3Dusr/bin/alias > +OLD_FILES+=3Dusr/bin/bg > +OLD_FILES+=3Dusr/bin/cd > +OLD_FILES+=3Dusr/bin/fc > +OLD_FILES+=3Dusr/bin/fg > +OLD_FILES+=3Dusr/bin/getopts > +OLD_FILES+=3Dusr/bin/hash > +OLD_FILES+=3Dusr/bin/jobs > +OLD_FILES+=3Dusr/bin/read > +OLD_FILES+=3Dusr/bin/type > +OLD_FILES+=3Dusr/bin/ulimit > +OLD_FILES+=3Dusr/bin/umask > +OLD_FILES+=3Dusr/bin/unalias > +OLD_FILES+=3Dusr/bin/wait > + Please revert this. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Thu Feb 26 04:22:47 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLyx34fbhz6TF9T for ; Thu, 26 Feb 2026 04:22:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLyx32R26z3JZm for ; Thu, 26 Feb 2026 04:22:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T2Qu62eIBSD/HXrmvxaSoWy0ZnZfwwiYOlQfVl7i0JI=; b=SApymLe5P1VeIN6sJepUcgc6Sg0IVmJiEXUaIV0L+ZrCtpa3MAhZNBuLsWhvwoNVHzFtL8 6D9RdQwfh1vqXQNKV1sldS9tRtmE/1eoKw2cq1P/KCMQ3LIMkl67GgocT2/lbX9NLA1wMm IymXaU82Pp58nA51G7FwOGaeeH5WWaIWAGGMU5awBQW87v7aWCjhr+Yt8fsHM5B40tQ+AF 0zo2QMFTKWRRdRl2AkwzpUfJlHBbzh+2I0Wbr06T/RiNLzu/k5yKtF2tHBuAGS6i/Z67e/ qwA+bxx+Bc6fCFqDNt7CVn3ESjy4fhXmX2POdysXf1DV0KEGveaBY/sb1fbjKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772079767; a=rsa-sha256; cv=none; b=ZKnPA4Q+umZzEl7QR4o25kExBaZws7AiPpRD3FBsqkbf9+QY9nqBbNQ63cp0eD7E73Motc afdVGZo0YAqph7N7PNoxvowUf8EgG3GC+s+6o/58DGd9qTPEg6uZOay8RI4JiTizFxwXlP E0OlUYHkbDxrZRuiLwDVToq1B2/66SNIfb/scbPgmA5QeyuWH4T3aWmZFDSm/qvDabd/Dy ZiHrjAHRT1XMhgSIzLAbI9RPOqfZkpWH4pUxA8UU0T+/EDz8Cq9nl6W5HMoZxvtdY/UT9y PKYOhd8onofPcXt/c0hHtpwUCZq4OvzmXRmqcrMPnLSuY/nx2WdzDaQcS4BggA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T2Qu62eIBSD/HXrmvxaSoWy0ZnZfwwiYOlQfVl7i0JI=; b=sC+mgLt4r+DULMhGJrx4aFPWpQ/ro332edq8wd3mdlDEjNiY8pc2vR7GpdriFJiE5dSiXs 0NE7BWSlWrB9sOVycKlTaQ1eedTMZSDGF8qFn9CAeGIEio+9lnTxmViBobK5fwJUnOKYY6 s+XY5KCWWTx99zHwVhiQMde28PRtB0bcdL1ny2sLWmiO5hW8EGObl0spP9zmRC+zG72bRP tjGSPUxY8YycmXl7yEH1nZR6UJJP5tIM/jGC20e47U+l7txim/e6uaBdAVqNb7QRe7dSHQ eF5Ym+6kkyYoLR18B+PTHFXlIuyUpmTaQVNg8jBRU6BytPENoC6pDxbO2OCHbA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLyx321Tnz1dM for ; Thu, 26 Feb 2026 04:22:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 334f6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 04:22:47 +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: d58ab2ad9499 - stable/15 - diff: Drop unnecessary casts, fix none algo List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d58ab2ad94994f9d13e1f323caea0a646ff025a7 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 04:22:47 +0000 Message-Id: <699fca97.334f6.16c578f8@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d58ab2ad94994f9d13e1f323caea0a646ff025a7 commit d58ab2ad94994f9d13e1f323caea0a646ff025a7 Author: Dag-Erling Smørgrav AuthorDate: 2026-02-18 18:28:21 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-26 04:02:28 +0000 diff: Drop unnecessary casts, fix none algo MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D55349 (cherry picked from commit d5404462f691230423dc8cc543c6fdc44f34ec31) --- usr.bin/diff/diffreg_new.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/usr.bin/diff/diffreg_new.c b/usr.bin/diff/diffreg_new.c index 29882923cd0e..69deae497962 100644 --- a/usr.bin/diff/diffreg_new.c +++ b/usr.bin/diff/diffreg_new.c @@ -56,7 +56,7 @@ static const struct diff_algo_config myers_then_myers_divide; static const struct diff_algo_config patience; static const struct diff_algo_config myers_divide; -static const struct diff_algo_config myers_then_patience = (struct diff_algo_config){ +static const struct diff_algo_config myers_then_patience = { .impl = diff_algo_myers, .permitted_state_size = 1024 * 1024 * sizeof(int), .fallback_algo = &patience, @@ -69,7 +69,7 @@ static const struct diff_algo_config myers_then_myers_divide = .fallback_algo = &myers_divide, }; -static const struct diff_algo_config patience = (struct diff_algo_config){ +static const struct diff_algo_config patience = { .impl = diff_algo_patience, /* After subdivision, do Patience again: */ .inner_algo = &patience, @@ -77,14 +77,14 @@ static const struct diff_algo_config patience = (struct diff_algo_config){ .fallback_algo = &myers_then_myers_divide, }; -static const struct diff_algo_config myers_divide = (struct diff_algo_config){ +static const struct diff_algo_config myers_divide = { .impl = diff_algo_myers_divide, /* When division succeeded, start from the top: */ .inner_algo = &myers_then_myers_divide, /* (fallback_algo = NULL implies diff_algo_none). */ }; -static const struct diff_algo_config no_algo = (struct diff_algo_config){ +static const struct diff_algo_config none = { .impl = diff_algo_none, }; @@ -109,8 +109,9 @@ static const struct diff_config diff_config_patience = { }; /* Directly force Patience as a first divider of the source file. */ -static const struct diff_config diff_config_no_algo = { +static const struct diff_config diff_config_none = { .atomize_func = diff_atomize_text_by_line, + .algo = &none, }; const char * @@ -174,7 +175,7 @@ diffreg_new(char *file1, char *file2, int flags, int capsicum) cfg = &diff_config_patience; break; case DIFFREG_ALGO_NONE: - cfg = &diff_config_no_algo; + cfg = &diff_config_none; break; } From nobody Thu Feb 26 04:22:48 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLyx458Cnz6TFG9 for ; Thu, 26 Feb 2026 04:22:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLyx43YmKz3JXG for ; Thu, 26 Feb 2026 04:22:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HaMkMy1KFuYXS9/fUfJdWYoH6LMUdUeYZXlNeP+Peos=; b=nwR4b2StMtXKHkphDNhDYwPwJxc/kehutZl/6Q0bMTZc6D8/ml7Qii6q0hdntfaASucvpO ek2/yNYlTyqouHu8EjzjTXSYNj2GMRbTjKeFvyWC924vVLdg+BaOEcMztWw6gF8D6y9oom fwzpRIAAsitYiUEYvEh7H8OgJi9r5yiaoGPzOp5xxSVIyAbWprBqR6M6B3UvrQ1LJuu+UA Wlle5g+TzubUzfDRJdO0bGp6q6aDiD9d+zUnVnE45bXh3ImXXJR3ls+ZlN7LOC4ewe91Lo r2rxPn5CtMPhj+fEUcX6K6PtPRT89FxGXctnfQ9DEv6H8VXH3+RFoIhH1GqWdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772079768; a=rsa-sha256; cv=none; b=CmmRQbyuVOG3l7vQKZrYkdMLcEhth5NNtfySV05ArLRfvanLY337uh5t4KE5fE9kwqtyEg cZuhRxMwPT67QDYWfVdohGc3+DA842UW8rRyjVHWg7+V1qD80J0zYH/nM+YnYnHaou+I7G 0EvIhzjj2VSHPEvRdb4TNlW2HAeXu33CsjhhZLLpzolsKt7avX5PEkd4Qzx0eVCAoDmZxS cpZgJHXwQtC7J6kmhyKKWxDEBn4Y+weTuqnZAEfOcGGmmsxwRbtnC8jWzVsye6az4J+2d5 cwqyB+xYOoJUgza3sZ04YB4Mvv2tuz7Eb9FfFhvVWkgvfg0aw6MZysulQ4Dc2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HaMkMy1KFuYXS9/fUfJdWYoH6LMUdUeYZXlNeP+Peos=; b=t4A42PwGP51mL8vfNRH+ZZs18lIbwyNyhc576KSi+IrxAo/U2Du4d2kDAPh2yVpFRWzG2G bMkYGRJdNkV0DZyOV41Yq+SiTEmq6D1fqR5e7LUOrGttQrVSUPwb4Ys/sxZcbJSIuzCZ+Z BZbi7WnWUKg5C10a+0x1BpdPXh8MLc8TG1Bb3iOe20zhx9rPUHOOQ/6Es6eJP4z76AMgyF nWvO6RsEA03fsA4jG+Zl9aYvXWw9NKUowmDC9fCU5C8/FPHHHmf1xMlDRdIMe7ONhLeSAe SAn0fnQmLz9J4w5+WF33K2FPQAkMrqxQ+4idafm59oGhZx5FEAtITng/+qw2sg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLyx42t4gz1rs for ; Thu, 26 Feb 2026 04:22:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3698c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 04:22: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: 458776896fc4 - stable/15 - libfetch: Clean up fetch_info usage List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 458776896fc4f1eae391e866d2f606c33cd996f7 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 04:22:48 +0000 Message-Id: <699fca98.3698c.4fe0b0bb@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=458776896fc4f1eae391e866d2f606c33cd996f7 commit 458776896fc4f1eae391e866d2f606c33cd996f7 Author: Dag-Erling Smørgrav AuthorDate: 2026-02-21 01:18:11 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-26 04:02:28 +0000 libfetch: Clean up fetch_info usage * Provide a wrapper for the common if (verbose) fetch_info(...) idiom. * Replace remaining instances of fprintf(stderr, ...) with fetch_info(). * Fix a few style nits. MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55405 (cherry picked from commit 1b7c4d29fdfc975facdc43f6da50947cf3bb8e4a) --- lib/libfetch/common.c | 88 ++++++++++++++++++++------------------------------- 1 file changed, 34 insertions(+), 54 deletions(-) diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index f679b2afc95c..0bb65b0b8268 100644 --- a/lib/libfetch/common.c +++ b/lib/libfetch/common.c @@ -229,12 +229,16 @@ void fetch_info(const char *fmt, ...) { va_list ap; + int serrno = errno; va_start(ap, fmt); vfprintf(stderr, fmt, ap); va_end(ap); fputc('\n', stderr); + errno = serrno; } +#define fetch_verbose(...) \ + do { if (verbose) fetch_info(__VA_ARGS__); } while (0) /*** Network-related utility functions ***************************************/ @@ -302,7 +306,6 @@ fetch_reopen(int sd) conn_t * fetch_ref(conn_t *conn) { - ++conn->ref; return (conn); } @@ -417,8 +420,7 @@ fetch_socks5_init(conn_t *conn, const char *host, int port, int verbose) unsigned char *ptr; int ret = 1; - if (verbose) - fetch_info("Initializing SOCKS5 connection: %s:%d", host, port); + fetch_verbose("Initializing SOCKS5 connection: %s:%d", host, port); /* Connection initialization */ ptr = buf; @@ -486,7 +488,7 @@ fetch_socks5_init(conn_t *conn, const char *host, int port, int verbose) goto fail; } - switch(*ptr++) { + switch (*ptr++) { case SOCKS_SUCCESS: break; case SOCKS_GENERAL_FAILURE: @@ -564,10 +566,8 @@ fetch_socks5_getenv(char **host, int *port) *host = strndup(socks5env, ext - socks5env); } - if (*host == NULL) { - fprintf(stderr, "Failure to allocate memory, exiting.\n"); + if (*host == NULL) return (-1); - } if (ext == NULL) { *port = 1080; /* Default port as defined in RFC1928 */ } else { @@ -613,26 +613,21 @@ fetch_connect(const char *host, int port, int af, int verbose) /* Not using SOCKS5 proxy */ if (sockshost == NULL) { /* resolve server address */ - if (verbose) - fetch_info("resolving server address: %s:%d", host, - port); + fetch_verbose("resolving server address: %s:%d", host, port); if ((sais = fetch_resolve(host, port, af)) == NULL) goto fail; /* resolve client address */ bindaddr = getenv("FETCH_BIND_ADDRESS"); if (bindaddr != NULL && *bindaddr != '\0') { - if (verbose) - fetch_info("resolving client address: %s", - bindaddr); + fetch_verbose("resolving client address: %s", bindaddr); if ((cais = fetch_resolve(bindaddr, 0, af)) == NULL) goto fail; } } else { /* resolve socks5 proxy address */ - if (verbose) - fetch_info("resolving SOCKS5 server address: %s:%d", - sockshost, socksport); + fetch_verbose("resolving SOCKS5 server address: %s:%d", + sockshost, socksport); if ((sais = fetch_resolve(sockshost, socksport, af)) == NULL) { socks5_seterr(SOCKS5_ERR_BAD_HOST); goto fail; @@ -652,8 +647,7 @@ fetch_connect(const char *host, int port, int af, int verbose) break; } if (err != 0) { - if (verbose) - fetch_info("failed to bind to %s", bindaddr); + fetch_verbose("failed to bind to %s", bindaddr); goto syserr; } /* attempt to connect to server address */ @@ -668,10 +662,8 @@ fetch_connect(const char *host, int port, int af, int verbose) fetch_info("failed to connect to %s:%d", host, port); goto syserr; } else if (sockshost != NULL) { - if (verbose) - fetch_info( - "failed to connect to SOCKS5 server %s:%d", - sockshost, socksport); + fetch_verbose("failed to connect to SOCKS5 server %s:%d", + sockshost, socksport); socks5_seterr(SOCKS5_ERR_CONN_REFUSED); goto fail; } @@ -1053,8 +1045,7 @@ fetch_ssl_setup_transport_layer(SSL_CTX *ctx, int verbose) ssl_ctx_options |= SSL_OP_NO_TLSv1_2; if (getenv("SSL_NO_TLS1_3") != NULL) ssl_ctx_options |= SSL_OP_NO_TLSv1_3; - if (verbose) - fetch_info("SSL options: %lx", ssl_ctx_options); + fetch_verbose("SSL options: %lx", ssl_ctx_options); SSL_CTX_set_options(ctx, ssl_ctx_options); } @@ -1092,16 +1083,14 @@ fetch_ssl_setup_peer_verification(SSL_CTX *ctx, int verbose) else SSL_CTX_set_default_verify_paths(ctx); if ((crl_file = getenv("SSL_CRL_FILE")) != NULL) { - if (verbose) - fetch_info("Using CRL file: %s", crl_file); + fetch_verbose("Using CRL file: %s", crl_file); crl_store = SSL_CTX_get_cert_store(ctx); crl_lookup = X509_STORE_add_lookup(crl_store, X509_LOOKUP_file()); if (crl_lookup == NULL || !X509_load_crl_file(crl_lookup, crl_file, X509_FILETYPE_PEM)) { - fprintf(stderr, - "Could not load CRL file %s\n", + fetch_info("Could not load CRL file %s", crl_file); return (0); } @@ -1124,23 +1113,17 @@ fetch_ssl_setup_client_certificate(SSL_CTX *ctx, int verbose) if ((client_cert_file = getenv("SSL_CLIENT_CERT_FILE")) != NULL) { client_key_file = getenv("SSL_CLIENT_KEY_FILE") != NULL ? getenv("SSL_CLIENT_KEY_FILE") : client_cert_file; - if (verbose) { - fetch_info("Using client cert file: %s", - client_cert_file); - fetch_info("Using client key file: %s", - client_key_file); - } + fetch_verbose("Using client cert file: %s", client_cert_file); + fetch_verbose("Using client key file: %s", client_key_file); if (SSL_CTX_use_certificate_chain_file(ctx, client_cert_file) != 1) { - fprintf(stderr, - "Could not load client certificate %s\n", + fetch_info("Could not load client certificate %s", client_cert_file); return (0); } if (SSL_CTX_use_PrivateKey_file(ctx, client_key_file, SSL_FILETYPE_PEM) != 1) { - fprintf(stderr, - "Could not load client key %s\n", + fetch_info("Could not load client key %s", client_key_file); return (0); } @@ -1165,7 +1148,7 @@ fetch_ssl_cb_verify_crt(int verified, X509_STORE_CTX *ctx) if ((crt = X509_STORE_CTX_get_current_cert(ctx)) != NULL && (name = X509_get_subject_name(crt)) != NULL) str = X509_NAME_oneline(name, 0, 0); - fprintf(stderr, "Certificate verification failed for %s\n", + fetch_info("Certificate verification failed for %s", str != NULL ? str : "no relevant certificate"); OPENSSL_free(str); } @@ -1186,7 +1169,7 @@ fetch_ssl(conn_t *conn, const struct url *URL, int verbose) char *str; if ((conn->ssl_ctx = SSL_CTX_new(TLS_client_method())) == NULL) { - fprintf(stderr, "SSL context creation failed\n"); + fetch_info("SSL context creation failed"); ERR_print_errors_fp(stderr); return (-1); } @@ -1200,17 +1183,15 @@ fetch_ssl(conn_t *conn, const struct url *URL, int verbose) conn->ssl = SSL_new(conn->ssl_ctx); if (conn->ssl == NULL) { - fprintf(stderr, "SSL connection creation failed\n"); + fetch_info("SSL connection creation failed"); ERR_print_errors_fp(stderr); return (-1); } SSL_set_fd(conn->ssl, conn->sd); #if !defined(OPENSSL_NO_TLSEXT) - if (!SSL_set_tlsext_host_name(conn->ssl, - __DECONST(struct url *, URL)->host)) { - fprintf(stderr, - "TLS server name indication extension failed for host %s\n", + if (!SSL_set_tlsext_host_name(conn->ssl, __DECONST(char *, URL->host))) { + fetch_info("Failed to set TLS server name indication for host %s", URL->host); return (-1); } @@ -1226,16 +1207,14 @@ fetch_ssl(conn_t *conn, const struct url *URL, int verbose) conn->ssl_cert = SSL_get_peer_certificate(conn->ssl); if (conn->ssl_cert == NULL) { - fprintf(stderr, "No server SSL certificate\n"); + fetch_info("No server SSL certificate"); return (-1); } if (getenv("SSL_NO_VERIFY_HOSTNAME") == NULL) { - if (verbose) - fetch_info("Verify hostname"); + fetch_verbose("Verify hostname"); if (!fetch_ssl_verify_hname(conn->ssl_cert, URL->host)) { - fprintf(stderr, - "SSL certificate subject doesn't match host %s\n", + fetch_info("SSL certificate subject does not match host %s", URL->host); return (-1); } @@ -1259,7 +1238,7 @@ fetch_ssl(conn_t *conn, const struct url *URL, int verbose) (void)conn; (void)verbose; (void)URL; - fprintf(stderr, "SSL support disabled\n"); + fetch_info("SSL support disabled"); return (-1); #endif } @@ -1297,10 +1276,11 @@ fetch_socket_read(int sd, char *buf, size_t len) rlen = read(sd, buf, len); if (rlen < 0) { - if (errno == EAGAIN || (errno == EINTR && fetchRestartCalls)) + if (errno == EAGAIN || (errno == EINTR && fetchRestartCalls)) { return (FETCH_READ_WAIT); - else + } else { return (FETCH_READ_ERROR); + } } return (rlen); } @@ -1442,7 +1422,7 @@ fetch_write(conn_t *conn, const char *buf, size_t len) iov.iov_base = __DECONST(char *, buf); iov.iov_len = len; - return fetch_writev(conn, &iov, 1); + return (fetch_writev(conn, &iov, 1)); } /* From nobody Thu Feb 26 04:22:49 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLyx52cD4z6TDnw for ; Thu, 26 Feb 2026 04:22:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLyx5180nz3JXN for ; Thu, 26 Feb 2026 04:22:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a6VjiASIpSs1Cxc++Svpl0M2wKr1AVpc56S8RTownwI=; b=l0OnrSe5NwcCEixMRJFZwgpKW5HyzkNb4gxGKLX2WvDDKYgJAkw5G3UdrkNlg+6Pz8HNH3 Me9/e0YHA3ZikcMdYvyoRXX7KQMH7Ygll8VSGR0E1zOTHQV/8ACWTsr6OAL5uaYIFJX/BJ mLR0+Z2ghfI48lTtLlIGVKIbgUkMXHhwH2HXvxRj8R2x2H3DrNjWr2783kjEFtupnVKpdc qSIr7VIchxlj2XnDVBLXHNyehoLfFFEI/h7+TqMjK2wdm8lBnhU1DRRLuHY8LroJmo9Aj7 47aXcWhGjIL9WN0BCFJTriW8iL4kyrynzeOdt0PEyS7w88irVBXmtZxX21mNvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772079769; a=rsa-sha256; cv=none; b=fACY7UwnFTJL+6G3JO0sKVgUe7/ocqroDmfERONaTrOQzSIy5Q0Al61/+0rRa32rLj0Jws fsacFxl5K0ZvR8RQ5vbkjIlok//2wgofkTcHgx0v/QZnjASv7yFzRL1WJ2XJKdPsxnqBa9 vHdYP+yKc1SRxVEXadWIJ6eVnOoe5vDCIvH5OHaD1BQZtITwFiqs1AChJtxWBYBsovzy4E w7XG9567cJpr7x9ALqXc45InUny6ViKE5/WDeZXu3jAmL+nfj5/f9ja7H8WL4d0eh63M7n PilDEEQ7t6qkYT3n5qfGirRYzZOI11oNOLx+wTpGj4hYXzi42V+ux7bNiNw0Yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a6VjiASIpSs1Cxc++Svpl0M2wKr1AVpc56S8RTownwI=; b=UweUaMVTdWnKuCPwrAhCj28VMdychdP9ZFBE71fMx0NazUBLzs/pgbLOOT4Qezlqz3yXrE W13IeLcQ4U+wYmiAVLQfmlE+wdaVjMojCQkrnHouVprijRXzYZhN5VNhTRHaIrVvlXHgM/ qLRlcyy3Qg/CbE0XgN/3qdFxPdhP+PPiHLCO6qniupUzmeqDJalVmESjTMIWFV8CaUlEpN cbLvpn72gDYUQacVtFyr+ijvVaXPj33i5m/PxD6lgQXM1IRn/ge886Utv6RfSHo/Dvm7jt Y3y2tv4Pnc/D4hPfDM5x/CjTfD6feXHd4uLA2DCSUnyr4q24kpDrEl/f+pGgng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLyx50WqRz1b3 for ; Thu, 26 Feb 2026 04:22:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36229 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 04:22: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: 15717dd5c628 - stable/14 - m4: Fix eval output width List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 15717dd5c628ce57d8b73b6b8a8ea7e9d8f5e52a Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 04:22:49 +0000 Message-Id: <699fca99.36229.4c9e748a@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=15717dd5c628ce57d8b73b6b8a8ea7e9d8f5e52a commit 15717dd5c628ce57d8b73b6b8a8ea7e9d8f5e52a Author: Dag-Erling Smørgrav AuthorDate: 2026-02-17 14:01:34 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-26 04:03:42 +0000 m4: Fix eval output width According to POSIX, the optional third argument is the minimum number of digits to print regardless of sign. We interpreted it as the minimum width of the output including the sign. Additionally, the variable used to hold this value was confusingly named “maxdigits”. PR: 293214 MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55311 (cherry picked from commit 507c611aeac7ca9aed12353b1044bb21ab00afae) --- usr.bin/m4/eval.c | 8 ++++---- usr.bin/m4/misc.c | 2 -- usr.bin/m4/tests/eval.m4 | 2 ++ usr.bin/m4/tests/regress.eval.out | 2 ++ 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/usr.bin/m4/eval.c b/usr.bin/m4/eval.c index 4e45a71874e1..0963a61a2914 100644 --- a/usr.bin/m4/eval.c +++ b/usr.bin/m4/eval.c @@ -178,7 +178,7 @@ expand_builtin(const char *argv[], int argc, int td) */ { int base = 10; - int maxdigits = 0; + int mindigits = 0; const char *errstr; if (argc > 3 && *argv[3] != '\0') { @@ -189,14 +189,14 @@ expand_builtin(const char *argv[], int argc, int td) } } if (argc > 4) { - maxdigits = strtonum(argv[4], 0, INT_MAX, &errstr); + mindigits = strtonum(argv[4], 0, INT_MAX, &errstr); if (errstr) { - m4errx(1, "expr: maxdigits is %s: %s.", + m4errx(1, "expr: mindigits is %s: %s.", errstr, argv[4]); } } if (argc > 2) - pbnumbase(expr(argv[2]), base, maxdigits); + pbnumbase(expr(argv[2]), base, mindigits); break; } diff --git a/usr.bin/m4/misc.c b/usr.bin/m4/misc.c index 7d2473f88168..a6abce4936b4 100644 --- a/usr.bin/m4/misc.c +++ b/usr.bin/m4/misc.c @@ -139,8 +139,6 @@ pbnumbase(int n, int base, int d) } while ((num /= base) > 0); - if (n < 0) - printed++; while (printed++ < d) pushback('0'); diff --git a/usr.bin/m4/tests/eval.m4 b/usr.bin/m4/tests/eval.m4 index 1d3f886d0d89..dc0fada781f1 100644 --- a/usr.bin/m4/tests/eval.m4 +++ b/usr.bin/m4/tests/eval.m4 @@ -3,3 +3,5 @@ dnl expr parser eval(224&127) eval(224|127) eval(224&&127) +eval(3-2, 10, 5) +eval(2-3, 10, 4) diff --git a/usr.bin/m4/tests/regress.eval.out b/usr.bin/m4/tests/regress.eval.out index 7298b3f43840..b1bb211dcb64 100644 --- a/usr.bin/m4/tests/regress.eval.out +++ b/usr.bin/m4/tests/regress.eval.out @@ -1,3 +1,5 @@ 96 255 1 +00001 +-0001 From nobody Thu Feb 26 04:22:49 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLyx606GWz6TDr7 for ; Thu, 26 Feb 2026 04:22:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLyx54Pmvz3JJF for ; Thu, 26 Feb 2026 04:22:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H8jJ8idyKJmg7usb7pahZxa/35zuHtcvJ6nNIANLmFI=; b=HBUh99qFt0oCNY1/H2aUF857K97rw7kr7fgA2v97IBIVMF01/11PpzYZ1ySEmNpqtJ80DJ nIICLT/vE941f4uR9whsCXK8Bv24/KbnjvnbastIzGLWf6ByU0IzQ7lc0M0nMTO/+qIrjX DDStugypTQQm0jMfcZPlH7iGB48Jl8URcQ2T7o2qM3DQZl2a1wZ+4hfRycRGg6F3kABRtq ZKYQNK5CzQkeAhndWqQ21axp9H/3AO+/NZ6UXaqMg8E+0DEO/AHWfGkjjXKRwbaOZUBq/o 6c2FoGOEI4z5WGnXHR9eL9exd4S1EyyIiVYqJfzPTCuRy/w4WKXf/gtR/9Afpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772079769; a=rsa-sha256; cv=none; b=RzXkYJ5V9J6lCZ3Yyu21wlbRhCvPWrYnKaPjBAoe1bjhX8fM339INPyTsQEAOFfqQ2eUbv a+ZjkhvKbtuEd+mi5pXxyguZ06ebiJVpbzMZkuPExq0W2h2rXalwZnbo3pRN9bLpWMV84s 75p04P9C/Kx0kuuk0zL8YVdSh+6iAPnaHHdI8oHxRqBTN+ISsSRpVCtY9NQPzLSDREO2Bk 3dQWmy+Ph1XSgW17+BuO9nDsAMZ9Zyi/w6GmDdKgS/ujKXixpbTNt3Fneka6GJzfWWdaET eZwHK8WmQ2YDXMd7dkJ7mRReZR6SJahLNI2HgVqgfDq4E6Kl6k/2ZZILGQBu1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079769; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H8jJ8idyKJmg7usb7pahZxa/35zuHtcvJ6nNIANLmFI=; b=vDRkyeseJvAuziatx2guCUabOzWyrgHeR+jWcGdaL88dZErOg7d/gl9EATV0iK0dbawlpb ElGWzHi4vgudAl3b0Yk3A1JP0LHAF6lBCh1Py4vAjXoiiqdV/spWk6gCHEk56VepOml/ia sam3KGqYlUXnnPrLsf6Xd02p0vR9QFStKiW+ey8shJaxjPecwVnNhjT8jisdJOUV7fd/XM y4qDn2i0ohZBE7mZ3tftBhoeEFUQ5qmaYIvdkVOMgVcE67icHwWLct0iFlNrjIcPKK3ngE du8YEY4Yi1/JwB6w9VM0uPPMMYLih7s6bisPRdZ34nK68bf2ho8hG+fKVjAZ5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLyx53kcMz1vF for ; Thu, 26 Feb 2026 04:22:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3680b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 04:22: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: 3b879f771bd4 - stable/15 - libfetch: Fail hard if interrupted while connecting List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3b879f771bd462948320373dee7b0e5f281e8e08 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 04:22:49 +0000 Message-Id: <699fca99.3680b.479bbc5f@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=3b879f771bd462948320373dee7b0e5f281e8e08 commit 3b879f771bd462948320373dee7b0e5f281e8e08 Author: Dag-Erling Smørgrav AuthorDate: 2026-02-21 01:18:15 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-26 04:02:28 +0000 libfetch: Fail hard if interrupted while connecting This fixes an issue where the first address that DNS returns is blocked by a packet filter, so we hang for a while, then the user hits Ctrl-C, interrupting connect(2), whereupon we move on to the next address, get a connection, request the file, and return to fetch(1), which sees that SIGINT was caught and bails. Note that we make no attempt to enforce fetchTimeout in the connection phase, and never have. It's feasible, but non-trivial, so we'll leave it as an exercise for future us. PR: 293312 MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55406 (cherry picked from commit afbdcd402bb439bd3d487baaad63b68e95929265) --- lib/libfetch/common.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index 0bb65b0b8268..9d31b175c0fc 100644 --- a/lib/libfetch/common.c +++ b/lib/libfetch/common.c @@ -651,7 +651,13 @@ fetch_connect(const char *host, int port, int af, int verbose) goto syserr; } /* attempt to connect to server address */ - if ((err = connect(sd, sai->ai_addr, sai->ai_addrlen)) == 0) + while ((err = connect(sd, sai->ai_addr, sai->ai_addrlen)) < 0) { + if (errno == EINTR && fetchRestartCalls) + continue; + break; + } + /* success? */ + if (err == 0) break; /* clean up before next attempt */ close(sd); From nobody Thu Feb 26 04:22:46 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLyx73tHcz6TF9c for ; Thu, 26 Feb 2026 04:22:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLyx21kYGz3JFm for ; Thu, 26 Feb 2026 04:22:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UkBhHpYgwyh6fGuQcTl8RZz/2Ka8G/q9SykMm8JMt3c=; b=HOCU4YOovKqpi3P1IjUAn2tep0DiENv+VokzkhK0K1pttjVqQ2DY5uIduDS+426eRKD8Dd Bp1YY9+gFCt4NvtiuQLWNg21+24kL1WqqnJFmuNWZNfptu3MAltvnRI7togA/VWznDZTZb 0A4m8eK0sNH4y4rfruU2HNeRCI4LVqdNhfvn2r7CV/DfePm8MTVwzc3WGR8iDk1T6YSY6L 3cyH/OZ6c4bFnptXmwcL0BezXB4nnAsa8fwPyAtRJkAS6OWZxM2qdiQZwf8vukA5BSQ5ME ftfOuxfQ7PfjxiCIa42WfCs4duwV/QWlBASRuWTYqm7nc4J+hHnvDnq+BidYIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772079766; a=rsa-sha256; cv=none; b=iIGPoAlZPweYQSSQW2VgXw4tHL6JaZol19e4fOaZocfGNrF3nd+RCvQw+5boy3SW8KmuB4 fZG/4h5PAeqNX9nKo4i+Xgm5aSTmOe5twYwJvTWxaoswj3A/wrHI9bED2xbw59en1MNotb iAldzkLmMAjeWbCd8RDpsEyc2Qx+JWcXkNl3NIR78tfG5Voyk8ueDLBLeJozjy8tyYPZ5R XtL66uYWq5dVCJ1giJxrhVXrdavy/P6+88uf0slcCjIHu5k5m2UCbhhV/xoKCyaxdSjHIB 0rG6677L0GuIoh8bGh8gDNrm1tNHHKBvBDa/RJygIFIRQ5pbx3F099ZN9g2/Qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UkBhHpYgwyh6fGuQcTl8RZz/2Ka8G/q9SykMm8JMt3c=; b=R8KU1A+nfUbfcxXIgZ/Oz47PQYFSp5M6cvD6GGqvUrLYn6dqesNLgcTNvzWUhjiRTRySpK lrZe5HuEAPpQZd1tDnk3pwILXS0/vwsIPMdTVlvZ5NT2mzq9/tdpxy1YMJ1G7fyNCbVhrd 1iYbjeFrpZkHYEA74ROj7rU1XFpGdowsKuXtqO9eSfY254DGgsXWQmYruw9uUStaiYcPyw 2H4/D4RsDRiWvVL2B+b1MpBrDh0T5ff+zduq+3BNacsR8BWKg+hKpBXv5WsiQBx+jCohLe d/HZbFYKUTEV1uo0X0P+ArWtU62h322fP/BR9LZFalH4SJ0NGvbrCNoWr0/4CQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLyx219Psz1dL for ; Thu, 26 Feb 2026 04:22:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 373e7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 04:22:46 +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: 8124bd4524a2 - stable/15 - m4: Fix eval output width List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 8124bd4524a299a647fb25f8d4ebe2cfe6846a59 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 04:22:46 +0000 Message-Id: <699fca96.373e7.6221e272@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=8124bd4524a299a647fb25f8d4ebe2cfe6846a59 commit 8124bd4524a299a647fb25f8d4ebe2cfe6846a59 Author: Dag-Erling Smørgrav AuthorDate: 2026-02-17 14:01:34 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-26 04:02:28 +0000 m4: Fix eval output width According to POSIX, the optional third argument is the minimum number of digits to print regardless of sign. We interpreted it as the minimum width of the output including the sign. Additionally, the variable used to hold this value was confusingly named “maxdigits”. PR: 293214 MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55311 (cherry picked from commit 507c611aeac7ca9aed12353b1044bb21ab00afae) --- usr.bin/m4/eval.c | 8 ++++---- usr.bin/m4/misc.c | 2 -- usr.bin/m4/tests/eval.m4 | 2 ++ usr.bin/m4/tests/regress.eval.out | 2 ++ 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/usr.bin/m4/eval.c b/usr.bin/m4/eval.c index 4e45a71874e1..0963a61a2914 100644 --- a/usr.bin/m4/eval.c +++ b/usr.bin/m4/eval.c @@ -178,7 +178,7 @@ expand_builtin(const char *argv[], int argc, int td) */ { int base = 10; - int maxdigits = 0; + int mindigits = 0; const char *errstr; if (argc > 3 && *argv[3] != '\0') { @@ -189,14 +189,14 @@ expand_builtin(const char *argv[], int argc, int td) } } if (argc > 4) { - maxdigits = strtonum(argv[4], 0, INT_MAX, &errstr); + mindigits = strtonum(argv[4], 0, INT_MAX, &errstr); if (errstr) { - m4errx(1, "expr: maxdigits is %s: %s.", + m4errx(1, "expr: mindigits is %s: %s.", errstr, argv[4]); } } if (argc > 2) - pbnumbase(expr(argv[2]), base, maxdigits); + pbnumbase(expr(argv[2]), base, mindigits); break; } diff --git a/usr.bin/m4/misc.c b/usr.bin/m4/misc.c index 3091f2ad1f9e..fd72292aeac0 100644 --- a/usr.bin/m4/misc.c +++ b/usr.bin/m4/misc.c @@ -138,8 +138,6 @@ pbnumbase(int n, int base, int d) } while ((num /= base) > 0); - if (n < 0) - printed++; while (printed++ < d) pushback('0'); diff --git a/usr.bin/m4/tests/eval.m4 b/usr.bin/m4/tests/eval.m4 index 1d3f886d0d89..dc0fada781f1 100644 --- a/usr.bin/m4/tests/eval.m4 +++ b/usr.bin/m4/tests/eval.m4 @@ -3,3 +3,5 @@ dnl expr parser eval(224&127) eval(224|127) eval(224&&127) +eval(3-2, 10, 5) +eval(2-3, 10, 4) diff --git a/usr.bin/m4/tests/regress.eval.out b/usr.bin/m4/tests/regress.eval.out index 7298b3f43840..b1bb211dcb64 100644 --- a/usr.bin/m4/tests/regress.eval.out +++ b/usr.bin/m4/tests/regress.eval.out @@ -1,3 +1,5 @@ 96 255 1 +00001 +-0001 From nobody Thu Feb 26 04:22:50 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLyx72qmKz6TFCq for ; Thu, 26 Feb 2026 04:22:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLyx659hpz3JG1 for ; Thu, 26 Feb 2026 04:22:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079770; h=from:from:reply-to:subject:subject: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+5nbtIHZFnb8PSfwjdhNad/WVJTqrjXR/iXnvqC39Q=; b=T5bC/nBOlxVbYy9fapshIoB0gIkbryTZYhIXMn2CJbvzYfHVouA/+/DUd/OwvR87+RFaHc 27qak3aZWd4SXm3l3JOkndC/h/0OIGHXuCxnP7gaoEMVgCWClBVNVdPC250lilxg+qpE3X yiNL9Ds9V+wn5L2B4tH333vwcsepZ7sC7Q9tf9XKnVk6PQ4uduEaWWPhUJRtNQ4ycz9C6g 0z8zNbX+UBesGGWrD6jriVN1kLsad8L/2TlhZ2ffmIQKzt6i9iGgCtm8ymo2fLgoQPeXxm IA4LF5HEDE/GgoAWjsuijZgA9EOOo+3w37kmzne6ZxBTwF8fyyME5EN86WoSaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772079770; a=rsa-sha256; cv=none; b=yUT0E3QXSZFvCyOtTP9cc2/wRXzGFoBlDb8CNmceCbXRLjEZpxIEIFbP5RIZ4hPZvuHqvu 80wfjEP8J0541UGJatcCVyFdMEawKBBxa5ezzU52UkRGPvSk/K5xbShYdvITdRZYhjbAXU KvflTSJSh1LU1q5kdtPRqZfl/mx8jiuMIqA8W42eZN3NBKvfwS+TBla4Lgw0Pm5bibvktU WhRCsxq79yoZqHqkxxrDni5gcp678iZ5fvfksoH52f/gsCiLdCrsRasvAceIpBIIrSwxuK G5nhKTD565Vo/8BzgUVKqFW15SvUrRXJEPtR7tmxLv+6lpoQ3aXdITwgNiQfSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079770; h=from:from:reply-to:subject:subject: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+5nbtIHZFnb8PSfwjdhNad/WVJTqrjXR/iXnvqC39Q=; b=dRjh4nmTjvXfvWRaFr5yfpFCYWLmlbVW702eXlqDqL3hEbalvMAVA+jchX3j9lhb8rTIXu lAnofj08hjuU8asxzFyVERMfNvwn97AlQT69YFt1A9CKVPBki3A6mbqkRYIVvZWrsmErJC Li9YsNUG5zmT/5j09zfGWUtqkE9Xp9XQEMWZNkPwm0bbxPAA0KRfF80kJ9dZPtXm4iXPgj 7UCl7PhIhXqeqGElgNS1aOpacQQbT61oxWOtR6+nwwyjVlklFdYtuiSjoqGXgJrPyV44th ehdpQh0ZqQ2ik1jzfoRwjlZWf9kOdwUu4i2AV8FaVM1SZZryhZvnCULhChZv8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLyx64b7wzy3 for ; Thu, 26 Feb 2026 04:22:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36299 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 04:22: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: d699bac8f6f9 - stable/15 - libfetch: Gracefully skip unsupported protocols List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d699bac8f6f9164ae456ab561b04ac42a695540d Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 04:22:50 +0000 Message-Id: <699fca9a.36299.17a51f0f@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d699bac8f6f9164ae456ab561b04ac42a695540d commit d699bac8f6f9164ae456ab561b04ac42a695540d Author: Dag-Erling Smørgrav AuthorDate: 2026-02-21 01:18:18 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-26 04:02:28 +0000 libfetch: Gracefully skip unsupported protocols If socket() fails because the address family or protocol is unsupported, just continue with the next address. MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55407 (cherry picked from commit b5d570e711da1dad303312bebaf1bd2fb720f0dc) --- lib/libfetch/common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index 9d31b175c0fc..f8a0517b6a5b 100644 --- a/lib/libfetch/common.c +++ b/lib/libfetch/common.c @@ -637,8 +637,12 @@ fetch_connect(const char *host, int port, int af, int verbose) /* try each server address in turn */ for (err = 0, sai = sais; sai != NULL; sai = sai->ai_next) { /* open socket */ - if ((sd = socket(sai->ai_family, SOCK_STREAM, 0)) < 0) + if ((sd = socket(sai->ai_family, SOCK_STREAM, 0)) < 0) { + err = -1; + if (errno == EAFNOSUPPORT || errno == EPROTONOSUPPORT) + continue; goto syserr; + } /* attempt to bind to client address */ for (err = 0, cai = cais; cai != NULL; cai = cai->ai_next) { if (cai->ai_family != sai->ai_family) From nobody Thu Feb 26 04:22:50 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLyx66j0Cz6TDx9 for ; Thu, 26 Feb 2026 04:22:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLyx61rS7z3JG0 for ; Thu, 26 Feb 2026 04:22:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2iDYFGOkvD5x+RPFHLJaLnSs6dCrpE1VCZvc8o5D50M=; b=mpFf74WTtquHzO01NrihhhYTPGz+F7qY6EWqRUZblbkSdQwczluNGgn3E6LzwPSDsAaxmu tBt19/I8v6ufF55jIS9m6LoPiLGVisMMfYh59mANmHoFGtsHqVN5GH5yTeLvPdshKGrMac zNNWqqoB6KfGTPyUs8xOV/Heg4z0pe5MzX/N4+kKaeGX5qyuK69FVcX8yug0/brt+3YMwc +bpZtZIoZvLKrtSEDC3S21rdw/Ls+09MZJD33K0DU8eB0+z8/xFxutLb49Q44YuOb+HBQ5 8oCq6aDKmMXeKsT8R4BI8A11GfVY+XUryLgPfQb8634rTv1wr5PoWb2e7nW+Sw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772079770; a=rsa-sha256; cv=none; b=uoRcx6O9dTn+IbOo2s4snzS6A+SNL9kK6gx49PdW5iDf9IAwjJyUYqtwGrTljLR4FFE1Wh QTPOajuLVeG4eaBpUkJDe05343HVExmfd1lgQXKhKM+XbRQptiJDZH0Q9Uo8dR1YvENfzy fGg4mpVx6cpHyO8Ya6xkSA7FVQMAJoG1nHgzigwu9z36bFA797uMdEh9tq2DU842lvGDVg 1UZsVBseKaGQF4TiqMFtEC5oSirS6+ZZIOoYxMqO2Y9hQgkxFhYWqvgxjVwUJZX2kpD4Vg KiN4dXi4qlh4NFeaeQlDxnrXH19CZ+bIFLoUOs/auHE8Wyf25FxbqlB19c6Hxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079770; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2iDYFGOkvD5x+RPFHLJaLnSs6dCrpE1VCZvc8o5D50M=; b=iTYC8uMb7e44UHUK6b7+XAnqV6SWH1TI87K7zCtyiznMxhKYVvp9l03QfA+nxGJV3rrJp2 FxUgFwuJJZJSEAHnx309yPIs0ZfcBq+O/RSgMWqMQkLDvLyI1hA+8eH+/LQY6NSg58W27B 4j0Xhudlx/qwBFDQk0w8Vgk6fvgoNXsNcvbzvYAOys5XgMf8EfB+7V9roQ1sju1a6+WP7d TZy+7H0wESJdOxIfB7fBCtghmg3yYGvpu0pevRSA6RlZaFwT8peACP2MXvpG3DLwCtdJDE TCgux+8J9tTZpYyVbuJfh2pkcOWaBibTTE1o3JNpAV1nt/rsdn8hdbsEWO2haQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLyx61Mddz1b6 for ; Thu, 26 Feb 2026 04:22:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36706 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 04:22: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: 5c80cdb120b6 - stable/14 - libfetch: Clean up fetch_info usage List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5c80cdb120b6189b2a1b4f846cd21a3a98570af1 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 04:22:50 +0000 Message-Id: <699fca9a.36706.b932497@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5c80cdb120b6189b2a1b4f846cd21a3a98570af1 commit 5c80cdb120b6189b2a1b4f846cd21a3a98570af1 Author: Dag-Erling Smørgrav AuthorDate: 2026-02-21 01:18:11 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-26 04:03:42 +0000 libfetch: Clean up fetch_info usage * Provide a wrapper for the common if (verbose) fetch_info(...) idiom. * Replace remaining instances of fprintf(stderr, ...) with fetch_info(). * Fix a few style nits. MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55405 (cherry picked from commit 1b7c4d29fdfc975facdc43f6da50947cf3bb8e4a) --- lib/libfetch/common.c | 88 ++++++++++++++++++++------------------------------- 1 file changed, 34 insertions(+), 54 deletions(-) diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index bdc72f67c9a0..bff83ed905f6 100644 --- a/lib/libfetch/common.c +++ b/lib/libfetch/common.c @@ -230,12 +230,16 @@ void fetch_info(const char *fmt, ...) { va_list ap; + int serrno = errno; va_start(ap, fmt); vfprintf(stderr, fmt, ap); va_end(ap); fputc('\n', stderr); + errno = serrno; } +#define fetch_verbose(...) \ + do { if (verbose) fetch_info(__VA_ARGS__); } while (0) /*** Network-related utility functions ***************************************/ @@ -303,7 +307,6 @@ fetch_reopen(int sd) conn_t * fetch_ref(conn_t *conn) { - ++conn->ref; return (conn); } @@ -418,8 +421,7 @@ fetch_socks5_init(conn_t *conn, const char *host, int port, int verbose) unsigned char *ptr; int ret = 1; - if (verbose) - fetch_info("Initializing SOCKS5 connection: %s:%d", host, port); + fetch_verbose("Initializing SOCKS5 connection: %s:%d", host, port); /* Connection initialization */ ptr = buf; @@ -487,7 +489,7 @@ fetch_socks5_init(conn_t *conn, const char *host, int port, int verbose) goto fail; } - switch(*ptr++) { + switch (*ptr++) { case SOCKS_SUCCESS: break; case SOCKS_GENERAL_FAILURE: @@ -565,10 +567,8 @@ fetch_socks5_getenv(char **host, int *port) *host = strndup(socks5env, ext - socks5env); } - if (*host == NULL) { - fprintf(stderr, "Failure to allocate memory, exiting.\n"); + if (*host == NULL) return (-1); - } if (ext == NULL) { *port = 1080; /* Default port as defined in RFC1928 */ } else { @@ -614,26 +614,21 @@ fetch_connect(const char *host, int port, int af, int verbose) /* Not using SOCKS5 proxy */ if (sockshost == NULL) { /* resolve server address */ - if (verbose) - fetch_info("resolving server address: %s:%d", host, - port); + fetch_verbose("resolving server address: %s:%d", host, port); if ((sais = fetch_resolve(host, port, af)) == NULL) goto fail; /* resolve client address */ bindaddr = getenv("FETCH_BIND_ADDRESS"); if (bindaddr != NULL && *bindaddr != '\0') { - if (verbose) - fetch_info("resolving client address: %s", - bindaddr); + fetch_verbose("resolving client address: %s", bindaddr); if ((cais = fetch_resolve(bindaddr, 0, af)) == NULL) goto fail; } } else { /* resolve socks5 proxy address */ - if (verbose) - fetch_info("resolving SOCKS5 server address: %s:%d", - sockshost, socksport); + fetch_verbose("resolving SOCKS5 server address: %s:%d", + sockshost, socksport); if ((sais = fetch_resolve(sockshost, socksport, af)) == NULL) { socks5_seterr(SOCKS5_ERR_BAD_HOST); goto fail; @@ -653,8 +648,7 @@ fetch_connect(const char *host, int port, int af, int verbose) break; } if (err != 0) { - if (verbose) - fetch_info("failed to bind to %s", bindaddr); + fetch_verbose("failed to bind to %s", bindaddr); goto syserr; } /* attempt to connect to server address */ @@ -669,10 +663,8 @@ fetch_connect(const char *host, int port, int af, int verbose) fetch_info("failed to connect to %s:%d", host, port); goto syserr; } else if (sockshost != NULL) { - if (verbose) - fetch_info( - "failed to connect to SOCKS5 server %s:%d", - sockshost, socksport); + fetch_verbose("failed to connect to SOCKS5 server %s:%d", + sockshost, socksport); socks5_seterr(SOCKS5_ERR_CONN_REFUSED); goto fail; } @@ -1054,8 +1046,7 @@ fetch_ssl_setup_transport_layer(SSL_CTX *ctx, int verbose) ssl_ctx_options |= SSL_OP_NO_TLSv1_2; if (getenv("SSL_NO_TLS1_3") != NULL) ssl_ctx_options |= SSL_OP_NO_TLSv1_3; - if (verbose) - fetch_info("SSL options: %lx", ssl_ctx_options); + fetch_verbose("SSL options: %lx", ssl_ctx_options); SSL_CTX_set_options(ctx, ssl_ctx_options); } @@ -1093,16 +1084,14 @@ fetch_ssl_setup_peer_verification(SSL_CTX *ctx, int verbose) else SSL_CTX_set_default_verify_paths(ctx); if ((crl_file = getenv("SSL_CRL_FILE")) != NULL) { - if (verbose) - fetch_info("Using CRL file: %s", crl_file); + fetch_verbose("Using CRL file: %s", crl_file); crl_store = SSL_CTX_get_cert_store(ctx); crl_lookup = X509_STORE_add_lookup(crl_store, X509_LOOKUP_file()); if (crl_lookup == NULL || !X509_load_crl_file(crl_lookup, crl_file, X509_FILETYPE_PEM)) { - fprintf(stderr, - "Could not load CRL file %s\n", + fetch_info("Could not load CRL file %s", crl_file); return (0); } @@ -1125,23 +1114,17 @@ fetch_ssl_setup_client_certificate(SSL_CTX *ctx, int verbose) if ((client_cert_file = getenv("SSL_CLIENT_CERT_FILE")) != NULL) { client_key_file = getenv("SSL_CLIENT_KEY_FILE") != NULL ? getenv("SSL_CLIENT_KEY_FILE") : client_cert_file; - if (verbose) { - fetch_info("Using client cert file: %s", - client_cert_file); - fetch_info("Using client key file: %s", - client_key_file); - } + fetch_verbose("Using client cert file: %s", client_cert_file); + fetch_verbose("Using client key file: %s", client_key_file); if (SSL_CTX_use_certificate_chain_file(ctx, client_cert_file) != 1) { - fprintf(stderr, - "Could not load client certificate %s\n", + fetch_info("Could not load client certificate %s", client_cert_file); return (0); } if (SSL_CTX_use_PrivateKey_file(ctx, client_key_file, SSL_FILETYPE_PEM) != 1) { - fprintf(stderr, - "Could not load client key %s\n", + fetch_info("Could not load client key %s", client_key_file); return (0); } @@ -1166,7 +1149,7 @@ fetch_ssl_cb_verify_crt(int verified, X509_STORE_CTX *ctx) if ((crt = X509_STORE_CTX_get_current_cert(ctx)) != NULL && (name = X509_get_subject_name(crt)) != NULL) str = X509_NAME_oneline(name, 0, 0); - fprintf(stderr, "Certificate verification failed for %s\n", + fetch_info("Certificate verification failed for %s", str != NULL ? str : "no relevant certificate"); OPENSSL_free(str); } @@ -1187,7 +1170,7 @@ fetch_ssl(conn_t *conn, const struct url *URL, int verbose) char *str; if ((conn->ssl_ctx = SSL_CTX_new(TLS_client_method())) == NULL) { - fprintf(stderr, "SSL context creation failed\n"); + fetch_info("SSL context creation failed"); ERR_print_errors_fp(stderr); return (-1); } @@ -1201,17 +1184,15 @@ fetch_ssl(conn_t *conn, const struct url *URL, int verbose) conn->ssl = SSL_new(conn->ssl_ctx); if (conn->ssl == NULL) { - fprintf(stderr, "SSL connection creation failed\n"); + fetch_info("SSL connection creation failed"); ERR_print_errors_fp(stderr); return (-1); } SSL_set_fd(conn->ssl, conn->sd); #if !defined(OPENSSL_NO_TLSEXT) - if (!SSL_set_tlsext_host_name(conn->ssl, - __DECONST(struct url *, URL)->host)) { - fprintf(stderr, - "TLS server name indication extension failed for host %s\n", + if (!SSL_set_tlsext_host_name(conn->ssl, __DECONST(char *, URL->host))) { + fetch_info("Failed to set TLS server name indication for host %s", URL->host); return (-1); } @@ -1227,16 +1208,14 @@ fetch_ssl(conn_t *conn, const struct url *URL, int verbose) conn->ssl_cert = SSL_get_peer_certificate(conn->ssl); if (conn->ssl_cert == NULL) { - fprintf(stderr, "No server SSL certificate\n"); + fetch_info("No server SSL certificate"); return (-1); } if (getenv("SSL_NO_VERIFY_HOSTNAME") == NULL) { - if (verbose) - fetch_info("Verify hostname"); + fetch_verbose("Verify hostname"); if (!fetch_ssl_verify_hname(conn->ssl_cert, URL->host)) { - fprintf(stderr, - "SSL certificate subject doesn't match host %s\n", + fetch_info("SSL certificate subject does not match host %s", URL->host); return (-1); } @@ -1260,7 +1239,7 @@ fetch_ssl(conn_t *conn, const struct url *URL, int verbose) (void)conn; (void)verbose; (void)URL; - fprintf(stderr, "SSL support disabled\n"); + fetch_info("SSL support disabled"); return (-1); #endif } @@ -1298,10 +1277,11 @@ fetch_socket_read(int sd, char *buf, size_t len) rlen = read(sd, buf, len); if (rlen < 0) { - if (errno == EAGAIN || (errno == EINTR && fetchRestartCalls)) + if (errno == EAGAIN || (errno == EINTR && fetchRestartCalls)) { return (FETCH_READ_WAIT); - else + } else { return (FETCH_READ_ERROR); + } } return (rlen); } @@ -1443,7 +1423,7 @@ fetch_write(conn_t *conn, const char *buf, size_t len) iov.iov_base = __DECONST(char *, buf); iov.iov_len = len; - return fetch_writev(conn, &iov, 1); + return (fetch_writev(conn, &iov, 1)); } /* From nobody Thu Feb 26 04:22:51 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLyx74Fvpz6TDtl for ; Thu, 26 Feb 2026 04:22:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLyx72pd7z3JdB for ; Thu, 26 Feb 2026 04:22:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=He/gy0Zmi2bGBDfLuedPPurf9b95aK0J43puopGH454=; b=mSg099ubg6T/crw2MrNpn9wtyyPMt0Hbq8A4K8mJ2QXlElOjnKy4Is/N0kbjVtiaiLD4Ts rZSSEH+t++c8RossqL3ehqMXce4wuEPebd8hxRM3sikkX4nv+z7QFGiKpL2sdFNNvRaJP6 8EsmQmdPX9ar4GWqwCoDPg3PAYuAcpdFR0jDLOsAexWxro2f8IzTaj9NZu3TLkOBNwvqCS sSgiaZqeSW6gNAOFphtnzjiHDM1rxGi+zTgdS7zUVk+MN9Xr8NUgXWBD7FFrd1uSvqfje8 LMhVnfGlpw3KSIyqjH/sxdxYU+YT806UtgmrhCnnWmOZ+5m2opKu60hmJR1GNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772079771; a=rsa-sha256; cv=none; b=ugVEAnHiUrGVsF4uaC/CQO5IcmNz20A8AcX5VE+pBWPYG5higxgEIqaiNw1EZXeYYi+pcy 1HS/jN5mzkZLn2J0Y4LXJJ//kF+RbNwMTUUmDUqekitqkqRz27mymDw43tg9751FEPOc85 oZfJzPZ1V1WDuIIohNPmxdk5YfkBxC0Pg5gJc6p0VZIqFOv6k/juqzCq4a62+I+e8GnIHw 0x7Kc40ObdrJjziK0r54VxU7h4nsGOVC93WCT+EVj1CirSHoBjK/Sm4Ikcw+mnmR6xrm/n 1JhHp7D1pzlHhk+eGdWUKcdDRhCu3RgSVyqYOKb9NYStncjqRcaC0Nth6uE+hQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=He/gy0Zmi2bGBDfLuedPPurf9b95aK0J43puopGH454=; b=lfJrOOZ4bYXUHXjby18SSUCQHJxLALiriQ6oY3jFGM20vx0neY+JdJ4UoZFu48ttFjUUeY avFR9m4H+6B0Mze/FnrfgLreo+gQzhCxqIRSG13FDSaSUsgv0aYrh9uCQjuvJhj+2XjepN w24tRUT7EoEAhryXRIGjBTBIsOVj3Oh9qHbCaJQCYKB0ddLWjdG0OegIvcBzYU1MM3Pxve eIzZJHxF3KX9TcH8gFEXArLxkdw9/r2oU/L5R1V3b1wLGUQ8Qt27F1Fg0L3l/F1dq992RR BWc2rgzH41OGFekn2ZOtfj7pysPhpe2RTwxdFO/j58Y15pshpfyCcqtDbq9/cQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLyx72Djrz1LK for ; Thu, 26 Feb 2026 04:22:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36990 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 04:22: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: cca6f5eadb79 - stable/14 - libfetch: Fail hard if interrupted while connecting List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cca6f5eadb796b03379eb21f38c74ca46a64e45b Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 04:22:51 +0000 Message-Id: <699fca9b.36990.1a140c64@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=cca6f5eadb796b03379eb21f38c74ca46a64e45b commit cca6f5eadb796b03379eb21f38c74ca46a64e45b Author: Dag-Erling Smørgrav AuthorDate: 2026-02-21 01:18:15 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-26 04:03:43 +0000 libfetch: Fail hard if interrupted while connecting This fixes an issue where the first address that DNS returns is blocked by a packet filter, so we hang for a while, then the user hits Ctrl-C, interrupting connect(2), whereupon we move on to the next address, get a connection, request the file, and return to fetch(1), which sees that SIGINT was caught and bails. Note that we make no attempt to enforce fetchTimeout in the connection phase, and never have. It's feasible, but non-trivial, so we'll leave it as an exercise for future us. PR: 293312 MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55406 (cherry picked from commit afbdcd402bb439bd3d487baaad63b68e95929265) --- lib/libfetch/common.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index bff83ed905f6..784da2d9e6a2 100644 --- a/lib/libfetch/common.c +++ b/lib/libfetch/common.c @@ -652,7 +652,13 @@ fetch_connect(const char *host, int port, int af, int verbose) goto syserr; } /* attempt to connect to server address */ - if ((err = connect(sd, sai->ai_addr, sai->ai_addrlen)) == 0) + while ((err = connect(sd, sai->ai_addr, sai->ai_addrlen)) < 0) { + if (errno == EINTR && fetchRestartCalls) + continue; + break; + } + /* success? */ + if (err == 0) break; /* clean up before next attempt */ close(sd); From nobody Thu Feb 26 04:22:52 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLyx84vbwz6TFCt for ; Thu, 26 Feb 2026 04:22:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLyx837f9z3JbN for ; Thu, 26 Feb 2026 04:22:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KrZovsPN5H0MENELb884vUxmIOqOXY9Aha9bO3Y4k7I=; b=l1NF0RL8HohjPvAwumeDT4BhdI32s55oENq26uI2uMfB8kavldbff9KtXI7gPrd9+vZuzI JzNb8Fbc59ho3RuT/mDz8oWGwpZjvhBL8+pdMvTn2bAWqcl6kYUSC2/2g+pIrI2CbFLajY h6ICv8lUPtquLiWMtgW5kFyiWcS3kmY8JYtTYG5i0OmZmvgX3g6TBwcOjcrVz/vgmxsesa p51mf219eyHJ/oBLZbPJlv5J03PYuD0AN1lLztS2UQzWn7sJSkltua5ewVmBA0ZjbQDmhb 8CuoriAHNLqD1lb5Foa0egx/sXtkMS5P3CZlw2gEaSq22uImKRCI3sbM9fScWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772079772; a=rsa-sha256; cv=none; b=CZbRW7I9iS48BsleHoBdm+Fw2zgqTfgLqzwOa4nG16BKA+CUAE/UCrq29hx8f3HBqdfeEJ eOSuh3dUzwLJfrmNsEDbAI8oVO/WlKit6rlHZ/5wGjMo28q0oqSTP3Ro1lM03N0TM+NN5A n6AsWCwV983KnWoKCy1OYuaMtPqzexpz+E9qtno6/8AmYId+p8Ts2VqLzqzD1ix8xwY43R SWTLXI6OegtcoklNoYYGm4KusGe+rhZ5rrCtm124XiZRAbjBdR5se006yVQfhi1Hg3bd2n NzPUDCofw0nN4Pr4h+B4P54yHIwlzj8CpVUtfl+NwTLIua0UCBriZHc9SUTxPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KrZovsPN5H0MENELb884vUxmIOqOXY9Aha9bO3Y4k7I=; b=HRJtHp75/HTmygRHoKUD2Okb3GceXufErlH0w8GvJV7TNoiq69BxeRnIBlxyC7P43r7lZr bRv6S8tePSWBmFb2qz+x6kTg6v3C2hy1GY2zaANihqI2fJY34YZh21f3PPXJr7s/ydr6/9 nN9WDHN5wVx5zTieoB93Ry5ThJdwo719MFqWJ/+W21sjTku3csqk0eWePWagj3KTIJV3Ys XbG2jhsZUCMMQPLrXkpNLghBZbZK0AvPwB0zy/IBoExtWWyEO7C05E0xJAGXi5pnF666sJ uIlJuRI/GHK/aYK/ClRitUBrD5rLFtKPl8/rvFFszK5WhczEodcqh6lRgyngqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLyx82hXHz1vG for ; Thu, 26 Feb 2026 04:22:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37407 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 04:22:52 +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: 31f3640c4aa8 - stable/14 - libfetch: Gracefully skip unsupported protocols List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 31f3640c4aa859f2e3a78a51f3c43e0e6e7239f9 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 04:22:52 +0000 Message-Id: <699fca9c.37407.58f0c5ea@gitrepo.freebsd.org> The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=31f3640c4aa859f2e3a78a51f3c43e0e6e7239f9 commit 31f3640c4aa859f2e3a78a51f3c43e0e6e7239f9 Author: Dag-Erling Smørgrav AuthorDate: 2026-02-21 01:18:18 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-26 04:03:43 +0000 libfetch: Gracefully skip unsupported protocols If socket() fails because the address family or protocol is unsupported, just continue with the next address. MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55407 (cherry picked from commit b5d570e711da1dad303312bebaf1bd2fb720f0dc) --- lib/libfetch/common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index 784da2d9e6a2..5115933b8e41 100644 --- a/lib/libfetch/common.c +++ b/lib/libfetch/common.c @@ -638,8 +638,12 @@ fetch_connect(const char *host, int port, int af, int verbose) /* try each server address in turn */ for (err = 0, sai = sais; sai != NULL; sai = sai->ai_next) { /* open socket */ - if ((sd = socket(sai->ai_family, SOCK_STREAM, 0)) < 0) + if ((sd = socket(sai->ai_family, SOCK_STREAM, 0)) < 0) { + err = -1; + if (errno == EAFNOSUPPORT || errno == EPROTONOSUPPORT) + continue; goto syserr; + } /* attempt to bind to client address */ for (err = 0, cai = cais; cai != NULL; cai = cai->ai_next) { if (cai->ai_family != sai->ai_family) From nobody Thu Feb 26 04:22:52 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLyx91K5Dz6TFD0 for ; Thu, 26 Feb 2026 04:22:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLyx85jVjz3JGR for ; Thu, 26 Feb 2026 04:22:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l4ZNUTqigXjMw0dTdrN5LLBwgsEwKoxn7eO3Hpa7OmQ=; b=JOHYM2Z+VFAlioLcdGKRHtsIXF99CzFrK5hd7TQ7Owl/8lj2wTodd9wkgkY/jaMuXmRl3W 60PqKb+Z3n1uNKpdQteV69Zk5WysxSy3M4OXUY7TN9oYtlduk4+ow2tfRzz/1Q4qMpCYmY ubTOtaSyRGYoqkykHr//HRMAJv6VB3R8WcVcgdXFTzzshBMdPIfcMNxzDb0jNV5zyZFEPT yvRPbSwuiVgYR8OcNiaA160EAFJf0CbJ4UtKU5U1V7jm7xwEv0Vnr1QZnYds0Ojgp03dMk pWb0sJ+O2ZvCZ5Clp9trHUGroCNFSV92U08R1clLTe4pOQUM6GjuV8KbiQ2arA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772079772; a=rsa-sha256; cv=none; b=vQsLnUCChzTkDbazzKlyjX0K8dSpt4tY6TQ3U474Lvm9LIwIsi/T/6OHn9n3JyzGcyH90y a2CqUzbLHFJIlu0K5FYrFZzQ4wzdd5yYc1vcP5qEWjs7MGfr0u3NyKEPCwz/fP0v2OAnyo NBXHtFw6t16xGE8AipTFPGmXAChEcR5vVZ+B9rNY4QPPdd7/qC0TZVxyyFp93M8NUEWs9h L0c+aQ1Z3vr70XwfiGLr/YWtjm8dRxzHRGlFxaIDVct+yWnzMh6/36wIUGnaKOioELiDrl x+gwP5JrALIsoBXpV0MMWVH3fnfxnvZRcgKaGFnXPdu2xZa72ekPcZoAt1isSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079772; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l4ZNUTqigXjMw0dTdrN5LLBwgsEwKoxn7eO3Hpa7OmQ=; b=Xbn1RWFWVj3uzDuxG5/RJPBXLzTP8bIqrGdx+/lXMSTV2p1vSTPlNkzZ5zs54HPlxSlcH6 aeRt3+RDZIi8T54ejjFs8X6el8x+MgBEYgOOMKN7fLg7rpw5bUrwSfek5/Tjo7cAhwRsvl A6mGw2T7oGM/myWEQYjQgycdtf0eTvVJm0Uivv8yTfUhTCFB3IjZkth+HC7pwbkZGdscv8 /PD31skF+6EQn+ERtb3Ikx6nSpitklUO4lwvCSMFINVb5M7UoShebDZg8KZyGgq9cFYELp tVh8xfzyT3EDezU9zezD6SHrswwKMZPd1n+aEqlG3SzGbA9wvP+4H7/qlvhwmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLyx851K3z26B for ; Thu, 26 Feb 2026 04:22:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34260 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 04:22:52 +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: c550d07d8d5f - stable/13 - m4: Fix eval output width List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c550d07d8d5f152b4b89f6c737188c30af199e3a Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 04:22:52 +0000 Message-Id: <699fca9c.34260.75813f08@gitrepo.freebsd.org> The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c550d07d8d5f152b4b89f6c737188c30af199e3a commit c550d07d8d5f152b4b89f6c737188c30af199e3a Author: Dag-Erling Smørgrav AuthorDate: 2026-02-17 14:01:34 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-26 04:03:51 +0000 m4: Fix eval output width According to POSIX, the optional third argument is the minimum number of digits to print regardless of sign. We interpreted it as the minimum width of the output including the sign. Additionally, the variable used to hold this value was confusingly named “maxdigits”. PR: 293214 MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55311 (cherry picked from commit 507c611aeac7ca9aed12353b1044bb21ab00afae) --- usr.bin/m4/eval.c | 8 ++++---- usr.bin/m4/misc.c | 2 -- usr.bin/m4/tests/eval.m4 | 2 ++ usr.bin/m4/tests/regress.eval.out | 2 ++ 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/usr.bin/m4/eval.c b/usr.bin/m4/eval.c index 82218eb9ba1c..dba903c2ba24 100644 --- a/usr.bin/m4/eval.c +++ b/usr.bin/m4/eval.c @@ -178,7 +178,7 @@ expand_builtin(const char *argv[], int argc, int td) */ { int base = 10; - int maxdigits = 0; + int mindigits = 0; const char *errstr; if (argc > 3) { @@ -189,14 +189,14 @@ expand_builtin(const char *argv[], int argc, int td) } } if (argc > 4) { - maxdigits = strtonum(argv[4], 0, INT_MAX, &errstr); + mindigits = strtonum(argv[4], 0, INT_MAX, &errstr); if (errstr) { - m4errx(1, "expr: maxdigits is %s: %s.", + m4errx(1, "expr: mindigits is %s: %s.", errstr, argv[4]); } } if (argc > 2) - pbnumbase(expr(argv[2]), base, maxdigits); + pbnumbase(expr(argv[2]), base, mindigits); break; } diff --git a/usr.bin/m4/misc.c b/usr.bin/m4/misc.c index 7d2473f88168..a6abce4936b4 100644 --- a/usr.bin/m4/misc.c +++ b/usr.bin/m4/misc.c @@ -139,8 +139,6 @@ pbnumbase(int n, int base, int d) } while ((num /= base) > 0); - if (n < 0) - printed++; while (printed++ < d) pushback('0'); diff --git a/usr.bin/m4/tests/eval.m4 b/usr.bin/m4/tests/eval.m4 index 1d3f886d0d89..dc0fada781f1 100644 --- a/usr.bin/m4/tests/eval.m4 +++ b/usr.bin/m4/tests/eval.m4 @@ -3,3 +3,5 @@ dnl expr parser eval(224&127) eval(224|127) eval(224&&127) +eval(3-2, 10, 5) +eval(2-3, 10, 4) diff --git a/usr.bin/m4/tests/regress.eval.out b/usr.bin/m4/tests/regress.eval.out index 7298b3f43840..b1bb211dcb64 100644 --- a/usr.bin/m4/tests/regress.eval.out +++ b/usr.bin/m4/tests/regress.eval.out @@ -1,3 +1,5 @@ 96 255 1 +00001 +-0001 From nobody Thu Feb 26 04:22:53 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLyxB3zdzz6TDtx for ; Thu, 26 Feb 2026 04:22:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLyx96tBDz3JVk for ; Thu, 26 Feb 2026 04:22:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N95MhXhx5vQXzfoxs+aagyd3PuMpbzDFMT8oosKZgwM=; b=E7O0Jq5+j/uoMEa3j4eGZK2nXUHuTfZ8DgSjx7uUUhBMNprj98C7XeDdoQNHQNPb72fEQh NW6HGrWpj84PD1ZXq2ujw0newwTLrQM7MIXM+zODvj3Z5zkfkV0zuoyde1fRAhgtGWagku X/ZltjunBLVhWl5EqUSatVKGRX8zfAUPotqsLXPYZMN3me4l3aNQC4ouzkeAI/uANFCl3/ VglMkyXYOr4npDpWy06cNVInYCHBC1CGgOEvvCez66DYIl/uOdzNg1SBZHyZE8ESAQIwau hqxuPUBjrWZRHP0EyapMs1q/sRjoyX0vZZlvcu6b3rdLYDiFNFJDeoQAS9r+yA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772079774; a=rsa-sha256; cv=none; b=Sov3hjrqOLkKtHRXPEoKjG126bvCv+b6UMK/axBXaAOX+Lw4jpR+mCenvrtIUMyi23zy2X V19RZX/SMG3uzuJzoOU3aLRdYvKXCRLg42H8cimd/RSCpm8h5xPD+b8NV5Ahg5m/PJb+HG rMb8tN6bXakOVXwfbDBYGzUT5BnXiAIeV75J4zEGJ3+tuqE+na0A51UwruflQV4TC2UYIU X9pZx1oqzVZh2UM1sPxPfcBPW6SbEWtWKYP+zlnMJNMiVTIFKcmU1Gaegs0oeg66DWfbwk 2m67VIqQpM9MlYW5Y3SJlW1kzmwKZhykbQHdGgSEGc/wtxRZHYTPr+Fg93mB3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N95MhXhx5vQXzfoxs+aagyd3PuMpbzDFMT8oosKZgwM=; b=F9I7S5vRWA0uvsZiAEAOL2crWv7ke+IK6mStoz6js2u8yPH14O8o8bJtTZwil51Ck9948S AxLiF6gvcw4lTJUNr45o2kMEZYxe52Li73tusZEzE3pDx6VDCelMZCM6f6+z+ay1joCzV9 SN6AV5LCi0duXcmNQZ7tgvVaBJN8VKmA6UGGZSEr85gVXlUzhcG1P1qyo2JY8oQ0tXdvpq OlBXaerMkDlBzPdQx5jpWmwb7TGPw54Fgq/AFRxm7focznZCxFds83plu8esYIHzoN2puz BIxkmPcWNHGT5GB5Ngm49pWtUmHMXQcNFQKHri8I5rOWrIe/BIX7y2Fmmxo2Lg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLyx95lTzz1dS for ; Thu, 26 Feb 2026 04:22:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 347b4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 04:22:53 +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: cee22ac13c7d - stable/13 - libfetch: Clean up fetch_info usage List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cee22ac13c7d1e64efa911fdd7649abd31b991cb Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 04:22:53 +0000 Message-Id: <699fca9d.347b4.1fdad1e4@gitrepo.freebsd.org> The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=cee22ac13c7d1e64efa911fdd7649abd31b991cb commit cee22ac13c7d1e64efa911fdd7649abd31b991cb Author: Dag-Erling Smørgrav AuthorDate: 2026-02-21 01:18:11 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-26 04:03:52 +0000 libfetch: Clean up fetch_info usage * Provide a wrapper for the common if (verbose) fetch_info(...) idiom. * Replace remaining instances of fprintf(stderr, ...) with fetch_info(). * Fix a few style nits. MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55405 (cherry picked from commit 1b7c4d29fdfc975facdc43f6da50947cf3bb8e4a) --- lib/libfetch/common.c | 88 ++++++++++++++++++++------------------------------- 1 file changed, 34 insertions(+), 54 deletions(-) diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index 008185720f16..53d9c57b9fb0 100644 --- a/lib/libfetch/common.c +++ b/lib/libfetch/common.c @@ -230,12 +230,16 @@ void fetch_info(const char *fmt, ...) { va_list ap; + int serrno = errno; va_start(ap, fmt); vfprintf(stderr, fmt, ap); va_end(ap); fputc('\n', stderr); + errno = serrno; } +#define fetch_verbose(...) \ + do { if (verbose) fetch_info(__VA_ARGS__); } while (0) /*** Network-related utility functions ***************************************/ @@ -302,7 +306,6 @@ fetch_reopen(int sd) conn_t * fetch_ref(conn_t *conn) { - ++conn->ref; return (conn); } @@ -417,8 +420,7 @@ fetch_socks5_init(conn_t *conn, const char *host, int port, int verbose) unsigned char *ptr; int ret = 1; - if (verbose) - fetch_info("Initializing SOCKS5 connection: %s:%d", host, port); + fetch_verbose("Initializing SOCKS5 connection: %s:%d", host, port); /* Connection initialization */ ptr = buf; @@ -486,7 +488,7 @@ fetch_socks5_init(conn_t *conn, const char *host, int port, int verbose) goto fail; } - switch(*ptr++) { + switch (*ptr++) { case SOCKS_SUCCESS: break; case SOCKS_GENERAL_FAILURE: @@ -564,10 +566,8 @@ fetch_socks5_getenv(char **host, int *port) *host = strndup(socks5env, ext - socks5env); } - if (*host == NULL) { - fprintf(stderr, "Failure to allocate memory, exiting.\n"); + if (*host == NULL) return (-1); - } if (ext == NULL) { *port = 1080; /* Default port as defined in RFC1928 */ } else { @@ -613,26 +613,21 @@ fetch_connect(const char *host, int port, int af, int verbose) /* Not using SOCKS5 proxy */ if (sockshost == NULL) { /* resolve server address */ - if (verbose) - fetch_info("resolving server address: %s:%d", host, - port); + fetch_verbose("resolving server address: %s:%d", host, port); if ((sais = fetch_resolve(host, port, af)) == NULL) goto fail; /* resolve client address */ bindaddr = getenv("FETCH_BIND_ADDRESS"); if (bindaddr != NULL && *bindaddr != '\0') { - if (verbose) - fetch_info("resolving client address: %s", - bindaddr); + fetch_verbose("resolving client address: %s", bindaddr); if ((cais = fetch_resolve(bindaddr, 0, af)) == NULL) goto fail; } } else { /* resolve socks5 proxy address */ - if (verbose) - fetch_info("resolving SOCKS5 server address: %s:%d", - sockshost, socksport); + fetch_verbose("resolving SOCKS5 server address: %s:%d", + sockshost, socksport); if ((sais = fetch_resolve(sockshost, socksport, af)) == NULL) { socks5_seterr(SOCKS5_ERR_BAD_HOST); goto fail; @@ -652,8 +647,7 @@ fetch_connect(const char *host, int port, int af, int verbose) break; } if (err != 0) { - if (verbose) - fetch_info("failed to bind to %s", bindaddr); + fetch_verbose("failed to bind to %s", bindaddr); goto syserr; } /* attempt to connect to server address */ @@ -668,10 +662,8 @@ fetch_connect(const char *host, int port, int af, int verbose) fetch_info("failed to connect to %s:%d", host, port); goto syserr; } else if (sockshost != NULL) { - if (verbose) - fetch_info( - "failed to connect to SOCKS5 server %s:%d", - sockshost, socksport); + fetch_verbose("failed to connect to SOCKS5 server %s:%d", + sockshost, socksport); socks5_seterr(SOCKS5_ERR_CONN_REFUSED); goto fail; } @@ -1053,8 +1045,7 @@ fetch_ssl_setup_transport_layer(SSL_CTX *ctx, int verbose) ssl_ctx_options |= SSL_OP_NO_TLSv1_2; if (getenv("SSL_NO_TLS1_3") != NULL) ssl_ctx_options |= SSL_OP_NO_TLSv1_3; - if (verbose) - fetch_info("SSL options: %lx", ssl_ctx_options); + fetch_verbose("SSL options: %lx", ssl_ctx_options); SSL_CTX_set_options(ctx, ssl_ctx_options); } @@ -1092,16 +1083,14 @@ fetch_ssl_setup_peer_verification(SSL_CTX *ctx, int verbose) else SSL_CTX_set_default_verify_paths(ctx); if ((crl_file = getenv("SSL_CRL_FILE")) != NULL) { - if (verbose) - fetch_info("Using CRL file: %s", crl_file); + fetch_verbose("Using CRL file: %s", crl_file); crl_store = SSL_CTX_get_cert_store(ctx); crl_lookup = X509_STORE_add_lookup(crl_store, X509_LOOKUP_file()); if (crl_lookup == NULL || !X509_load_crl_file(crl_lookup, crl_file, X509_FILETYPE_PEM)) { - fprintf(stderr, - "Could not load CRL file %s\n", + fetch_info("Could not load CRL file %s", crl_file); return (0); } @@ -1124,23 +1113,17 @@ fetch_ssl_setup_client_certificate(SSL_CTX *ctx, int verbose) if ((client_cert_file = getenv("SSL_CLIENT_CERT_FILE")) != NULL) { client_key_file = getenv("SSL_CLIENT_KEY_FILE") != NULL ? getenv("SSL_CLIENT_KEY_FILE") : client_cert_file; - if (verbose) { - fetch_info("Using client cert file: %s", - client_cert_file); - fetch_info("Using client key file: %s", - client_key_file); - } + fetch_verbose("Using client cert file: %s", client_cert_file); + fetch_verbose("Using client key file: %s", client_key_file); if (SSL_CTX_use_certificate_chain_file(ctx, client_cert_file) != 1) { - fprintf(stderr, - "Could not load client certificate %s\n", + fetch_info("Could not load client certificate %s", client_cert_file); return (0); } if (SSL_CTX_use_PrivateKey_file(ctx, client_key_file, SSL_FILETYPE_PEM) != 1) { - fprintf(stderr, - "Could not load client key %s\n", + fetch_info("Could not load client key %s", client_key_file); return (0); } @@ -1165,7 +1148,7 @@ fetch_ssl_cb_verify_crt(int verified, X509_STORE_CTX *ctx) if ((crt = X509_STORE_CTX_get_current_cert(ctx)) != NULL && (name = X509_get_subject_name(crt)) != NULL) str = X509_NAME_oneline(name, 0, 0); - fprintf(stderr, "Certificate verification failed for %s\n", + fetch_info("Certificate verification failed for %s", str != NULL ? str : "no relevant certificate"); OPENSSL_free(str); } @@ -1186,7 +1169,7 @@ fetch_ssl(conn_t *conn, const struct url *URL, int verbose) char *str; if ((conn->ssl_ctx = SSL_CTX_new(TLS_client_method())) == NULL) { - fprintf(stderr, "SSL context creation failed\n"); + fetch_info("SSL context creation failed"); ERR_print_errors_fp(stderr); return (-1); } @@ -1200,17 +1183,15 @@ fetch_ssl(conn_t *conn, const struct url *URL, int verbose) conn->ssl = SSL_new(conn->ssl_ctx); if (conn->ssl == NULL) { - fprintf(stderr, "SSL connection creation failed\n"); + fetch_info("SSL connection creation failed"); ERR_print_errors_fp(stderr); return (-1); } SSL_set_fd(conn->ssl, conn->sd); #if !defined(OPENSSL_NO_TLSEXT) - if (!SSL_set_tlsext_host_name(conn->ssl, - __DECONST(struct url *, URL)->host)) { - fprintf(stderr, - "TLS server name indication extension failed for host %s\n", + if (!SSL_set_tlsext_host_name(conn->ssl, __DECONST(char *, URL->host))) { + fetch_info("Failed to set TLS server name indication for host %s", URL->host); return (-1); } @@ -1226,16 +1207,14 @@ fetch_ssl(conn_t *conn, const struct url *URL, int verbose) conn->ssl_cert = SSL_get_peer_certificate(conn->ssl); if (conn->ssl_cert == NULL) { - fprintf(stderr, "No server SSL certificate\n"); + fetch_info("No server SSL certificate"); return (-1); } if (getenv("SSL_NO_VERIFY_HOSTNAME") == NULL) { - if (verbose) - fetch_info("Verify hostname"); + fetch_verbose("Verify hostname"); if (!fetch_ssl_verify_hname(conn->ssl_cert, URL->host)) { - fprintf(stderr, - "SSL certificate subject doesn't match host %s\n", + fetch_info("SSL certificate subject does not match host %s", URL->host); return (-1); } @@ -1259,7 +1238,7 @@ fetch_ssl(conn_t *conn, const struct url *URL, int verbose) (void)conn; (void)verbose; (void)URL; - fprintf(stderr, "SSL support disabled\n"); + fetch_info("SSL support disabled"); return (-1); #endif } @@ -1297,10 +1276,11 @@ fetch_socket_read(int sd, char *buf, size_t len) rlen = read(sd, buf, len); if (rlen < 0) { - if (errno == EAGAIN || (errno == EINTR && fetchRestartCalls)) + if (errno == EAGAIN || (errno == EINTR && fetchRestartCalls)) { return (FETCH_READ_WAIT); - else + } else { return (FETCH_READ_ERROR); + } } return (rlen); } @@ -1442,7 +1422,7 @@ fetch_write(conn_t *conn, const char *buf, size_t len) iov.iov_base = __DECONST(char *, buf); iov.iov_len = len; - return fetch_writev(conn, &iov, 1); + return (fetch_writev(conn, &iov, 1)); } /* From nobody Thu Feb 26 04:22:56 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLyxD3FBmz6TDrS for ; Thu, 26 Feb 2026 04:22:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLyxD0qvQz3JpS for ; Thu, 26 Feb 2026 04:22:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S0hkCev+5fDc6WsgVwL0v9t+6s7EXKRz9poPN8tOamc=; b=UJFzj3FSqYixliDKFDBWWyg817ox8bvgJIEi7A9TYPoBKq14XM6vf1r5xwgXaT46xfczCL Tme2a9uWDuIINlMuGI1dVbEUjyzaz063YJmX4MaUjNJjuM0mDNLQut5UXvUNExivjH2byR 5f08InuvfKK7ZNy8Kat7wEFk8Ec0K8YSVcCanepJ+0LQYObqzqSClluk5gkNSgd3RBJAg7 b1gKDClBvbcX6lx1xsTmabD8EOHLvE66DumVoV/Xohy3wC3GtAnh1K/EjD5yONUoNzPPpM m1hr7GZizJxA/ZWLg6WMvYhmSntGQnPTEsMJymLjwGRpnzgF4duz2UqcjFSl9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772079776; a=rsa-sha256; cv=none; b=S+mjq347zssCWRfSBDl8BfjhWMqZweu69qjO+MOqo/rjcgI91qpzcTbuuZTwHtT6s9SczH oUjTpppvxqnXm2QydZftIJRu9/5iSwYMchh17GCg0B/zXa/285YtxxHJBqexIdJejMI7/a 3Vp82dM8V14V+AdOVBzPrquJEvXVLzLWDa5hYnwuwXspCTTSLKPVzLNVtIm0gdcrcI5ssL g2Ylj9icuP4raTxjqtleiSgsdxvikXdbwlk1OkvREQrWT9jctyqvDSwQf/dQCn65DVh+P2 SYZheiWCmhalTWoIURnrY7I5gq38HqI+zXExKzQbT7JneqXn/l1z+GIyVxq39g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S0hkCev+5fDc6WsgVwL0v9t+6s7EXKRz9poPN8tOamc=; b=fPe+L7/xnIQsprktCZrFyQIJLVRqT/W4WAgrd84H+p3Cn34fwClDE8YnY2Xu3xruYTohrj ElOAgtjXqfqbSOtP9ZjamkWFeBYk2MICZJCllhUNvhdt3YSEi+dncPhvUalqHWfoZI23jW n2+7AiE3CTZunXFkqUhIRDGFAEoamVrLNzHsu7ibRTgUJiNgXu3JQI9tT2fbAlM72dyre8 gqiWNM6BtoKrscprTJEvMk0s7DPP53Vs0pfsPi7y0I+mk+/WUf7m/IhUeKOyAgJlGLnSYH Jqsbrvu4bw+5L3l+cdysU6432dvr52++OsRzwU9NVNoq4inFvLntUs/dJ8rmYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLyxD0N68z1vK for ; Thu, 26 Feb 2026 04:22:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36233 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 04:22:56 +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: 783cec744b90 - stable/13 - libfetch: Gracefully skip unsupported protocols List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 783cec744b9025d4a0d933b39ee95b0085b677c3 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 04:22:56 +0000 Message-Id: <699fcaa0.36233.60adfdc4@gitrepo.freebsd.org> The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=783cec744b9025d4a0d933b39ee95b0085b677c3 commit 783cec744b9025d4a0d933b39ee95b0085b677c3 Author: Dag-Erling Smørgrav AuthorDate: 2026-02-21 01:18:18 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-26 04:03:52 +0000 libfetch: Gracefully skip unsupported protocols If socket() fails because the address family or protocol is unsupported, just continue with the next address. MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55407 (cherry picked from commit b5d570e711da1dad303312bebaf1bd2fb720f0dc) --- lib/libfetch/common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index aadd354c220d..acd8b19e16cd 100644 --- a/lib/libfetch/common.c +++ b/lib/libfetch/common.c @@ -637,8 +637,12 @@ fetch_connect(const char *host, int port, int af, int verbose) /* try each server address in turn */ for (err = 0, sai = sais; sai != NULL; sai = sai->ai_next) { /* open socket */ - if ((sd = socket(sai->ai_family, SOCK_STREAM, 0)) < 0) + if ((sd = socket(sai->ai_family, SOCK_STREAM, 0)) < 0) { + err = -1; + if (errno == EAFNOSUPPORT || errno == EPROTONOSUPPORT) + continue; goto syserr; + } /* attempt to bind to client address */ for (err = 0, cai = cais; cai != NULL; cai = cai->ai_next) { if (cai->ai_family != sai->ai_family) From nobody Thu Feb 26 04:22:54 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLyxC1ytXz6TFGM for ; Thu, 26 Feb 2026 04:22:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLyxB74gVz3JK6 for ; Thu, 26 Feb 2026 04:22:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c3WS2lPLutTqtOtDdkTdl3nOkfyB9jo1W0wQjR//yfE=; b=cf20FBkBXkP0ctwS0+8rXZ08z0dujCa4ZpXetA/LzZ3Gx1gJ1cOvh6lrzfAfnyt2auvO/+ F3uxMU0Yoooy2mbNU2sgyyHeJeQqSI4Xg7/ZO/r6tHAx5aY6mupDRLLSjD7WFYiXOTkjDc Zx8aw3BzTsf+3fWYuncoYhFO5SZpzGI7Mm9SZefP921gFgRXgb3dHpccCrtR+ZzNqsZO7x +IPnEkCffv2LfELESjQA3h+Gk+CTcYEePPSaK8c0t/AD8vZ0QeVJeDZDDeztlZlRjnmUKp 2TdaJj2rQ9DDn8Ql6usQgZxPVHOoHSUwu5H15WXTZWgvZ+YSEHyU/Qc3kn2Cvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772079775; a=rsa-sha256; cv=none; b=eXhwZcIvL5bUmsmYPhNQInUE/ORLkQfYCKD1QHCxcNyAbvgtOx2hO3FIWCT6qUsvGq5hbH mBVOnvEsu3I4I82vIAIyoi0OydwCHj8+G9T3fDA91zYeAfkCnbJWPfvrPWVM+qT+cTXuac SVHSYGRbdIo/sozPzNRFobRe+8vZembD7+YdROxFCFzbAdadOiT3u4aYagTQ3h3vuviEsH U5nZ69AomkPONITr0DHS9NOpX229xqVCbJS2Pw2kvmDIf+OENOI0pkQqQ12om3W4dHvshV AzwuxjEQQot1Ep3nWLDYKvUN1dNqKx8eumbd/9JifASuZ8ggdK6ypvFzKWESDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c3WS2lPLutTqtOtDdkTdl3nOkfyB9jo1W0wQjR//yfE=; b=YdZdbez6MKxt6XoPcOOElD/Behpd8PPCULBU5spC3AqHtIqnEDtc+O+7IxaJOil1ZNdrfa 8vZ0s4zCxk8muscgzYF6DaFwE3m+VyhEyfNmgYbUL9nDV6fABpqf2haukYqupasVLLyENT UDZA4rs878IZ9galA0YFUjx6g//27Idky61UFGMlui/UVxkDspo6Ql2LVWIPf44ySY19Rg Ik3aRpxdjOzx1RuGFpSA/AHnuvpr79xm2KOC2owZZXjqqE8RHlk/Y22cLhIbmemAJgG4FC QthyDylIbuVjGLcPDYouhyNTL1U4fLVuAmtrycZL5PUyIk57WxJ8ZIe2R55Uew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLyxB6dQGz1rv for ; Thu, 26 Feb 2026 04:22:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3622f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 04:22:54 +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: c0ec07280e92 - stable/13 - libfetch: Fail hard if interrupted while connecting List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c0ec07280e920cf8c672cffa0730676e2dd40d72 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 04:22:54 +0000 Message-Id: <699fca9e.3622f.561b6b87@gitrepo.freebsd.org> The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c0ec07280e920cf8c672cffa0730676e2dd40d72 commit c0ec07280e920cf8c672cffa0730676e2dd40d72 Author: Dag-Erling Smørgrav AuthorDate: 2026-02-21 01:18:15 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-26 04:03:52 +0000 libfetch: Fail hard if interrupted while connecting This fixes an issue where the first address that DNS returns is blocked by a packet filter, so we hang for a while, then the user hits Ctrl-C, interrupting connect(2), whereupon we move on to the next address, get a connection, request the file, and return to fetch(1), which sees that SIGINT was caught and bails. Note that we make no attempt to enforce fetchTimeout in the connection phase, and never have. It's feasible, but non-trivial, so we'll leave it as an exercise for future us. PR: 293312 MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55406 (cherry picked from commit afbdcd402bb439bd3d487baaad63b68e95929265) --- lib/libfetch/common.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index 53d9c57b9fb0..aadd354c220d 100644 --- a/lib/libfetch/common.c +++ b/lib/libfetch/common.c @@ -651,7 +651,13 @@ fetch_connect(const char *host, int port, int af, int verbose) goto syserr; } /* attempt to connect to server address */ - if ((err = connect(sd, sai->ai_addr, sai->ai_addrlen)) == 0) + while ((err = connect(sd, sai->ai_addr, sai->ai_addrlen)) < 0) { + if (errno == EINTR && fetchRestartCalls) + continue; + break; + } + /* success? */ + if (err == 0) break; /* clean up before next attempt */ close(sd); From nobody Thu Feb 26 04:23:20 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLyxj0Ymcz6TF0x for ; Thu, 26 Feb 2026 04:23:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLyxh5Xz0z3Kdb for ; Thu, 26 Feb 2026 04:23:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=018kJ68TmLeBanIkbx5/5kaG+5HvsuA7q5smGKKqNeA=; b=FTJJeqs/2RVj/3ikEWmjhWsLAaL64M2f9vvL3c3/IbRhOs5OMe03ZRHm+sm0GrckYOoP29 g8WuOgHgvsF4ToRu74qfxnIZMORtPuRnde0EYrPrlD/MI3qoHX8MO6zr0p1lLqDjAEO14m z66ytLhNaUAvYHW88/TLNbXwoNRRutqOrTbvHcYPBuiA79/cAlwn3WoIfrFGr+N4Bc+LU7 lbLSuc2G5FSMEEwDYc9t0Rvb+Rt473NwdVfiocl3ZJoKJlDBPIbnyJhQ38DGvo/4gAlUcq iTYG96VBryjXSfvKCq9VL/ySU4tZgMd0XqqfAZkcOnZNqKACYUsp6Eoal+hcbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772079800; a=rsa-sha256; cv=none; b=UndgPvDhMKoKhPrC1Xnhx6hFvyKVeSTNMuYCdLcal6OiWYHl5QeVWjxl9zkfFoDxkKWQnc Xk9N1MFeQcP4QW1BZAfy7EU9WdrDrtgzpCdgw7pto9ixAomFQHpAjakme4vIFAJDuxNovf Vba81SHAYP4KWeafLx9sIbZ4o24N9MVowJNcoYY6QCvAwPmI+PDe2pywySE2dmeDn5OHdK Mg121W/bCakxz5zSYPw6hb9TJrrkQX1nzFw4/1GlcVe2c/5GKvr+jY0Rv4bztuS/OMmsS5 Va07hyQU5C2HWRqyrRwazRmtn40IEkoIEG0PTVFpcQjm+0Eg5zYz2ui0pp7Xxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=018kJ68TmLeBanIkbx5/5kaG+5HvsuA7q5smGKKqNeA=; b=tb5MazaLOfUO79j+c/fea4TTtflHGIrQowuKijtuL0+wgwgHS9nBdFFWeXSI/lZCSYGl6j clYWPM83O0+9/UuGjfS4UlS4k+rGXcPiTqZL+R9QCejcyWaoIgoBBuPG9OuKvowtRf5fZE vg89g8cngVlLLWn6vfBW4aT3G998hllUbarCRL3NzGJrB2krPeT3WM3AL/73iILC+gAuJg HwFaYroruqiAhlzgAclB3UWJWJQvCji1sRZp39NXG1YZ0hGZqGkdIqdAHVLvRSKyg26CV7 QNGGF1tUJNNs/yoYaZYRkAqxzYGWczNSx/iJS2s8DBFt7u30LeJGQyjcPKoFyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLyxh57JKz1LP for ; Thu, 26 Feb 2026 04:23:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36315 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 04:23:20 +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: 122de340a9bc - stable/15 - build: Move all of lp under LPR option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 122de340a9bcd71eb32dfc1930b66188a1431c4e Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 04:23:20 +0000 Message-Id: <699fcab8.36315.2d3947cb@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=122de340a9bcd71eb32dfc1930b66188a1431c4e commit 122de340a9bcd71eb32dfc1930b66188a1431c4e Author: Dag-Erling Smørgrav AuthorDate: 2026-02-20 18:20:04 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-26 04:23:04 +0000 build: Move all of lp under LPR option * Tag related directories with package=lp * Make the examples/printing directory conditional on MK_LPR * Make the hosts.lpd(5) manual page conditional on MK_LPR MFC after: 3 days (cherry picked from commit d4f6cb75424950ee776833ebc6b57855c094a610) --- etc/mtree/BSD.debug.dist | 4 ++-- etc/mtree/BSD.usr.dist | 6 +++--- share/examples/Makefile | 4 +++- share/man/man5/Makefile | 2 +- tools/build/mk/OptionalObsoleteFiles.inc | 18 ++++++++++++++++++ 5 files changed, 27 insertions(+), 7 deletions(-) diff --git a/etc/mtree/BSD.debug.dist b/etc/mtree/BSD.debug.dist index 8959b281f578..0b4ee248702b 100644 --- a/etc/mtree/BSD.debug.dist +++ b/etc/mtree/BSD.debug.dist @@ -57,8 +57,8 @@ libexec bsdinstall .. - lpr - ru + lpr tags=package=lp + ru tags=package=lp .. .. sendmail diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index ad2d8c5b39a4..0a7cfc1b8018 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -181,8 +181,8 @@ .. hyperv .. - lpr - ru + lpr tags=package=lp + ru tags=package=lp .. .. sendmail @@ -354,7 +354,7 @@ .. ppp .. - printing + printing tags=package=lp .. scsi_target .. diff --git a/share/examples/Makefile b/share/examples/Makefile index 09bbf820e574..0174792d2ecb 100644 --- a/share/examples/Makefile +++ b/share/examples/Makefile @@ -25,7 +25,6 @@ LDIRS= BSD_daemon \ perfmon \ ppi \ ppp \ - printing \ ses \ scsi_target \ sound \ @@ -250,6 +249,8 @@ SE_PPP= \ ppp.secret.span-isp \ ppp.secret.span-isp.working +.if ${MK_LPR} != "no" +LDIRS+= printing SE_DIRS+= printing SE_PRINTINGPACKAGE=lp SE_PRINTING= \ @@ -269,6 +270,7 @@ SE_PRINTING= \ psif \ pstf \ pstfX +.endif SE_DIRS+= ses SE_SES= \ diff --git a/share/man/man5/Makefile b/share/man/man5/Makefile index abf4b59d184b..f950df8fdb47 100644 --- a/share/man/man5/Makefile +++ b/share/man/man5/Makefile @@ -75,7 +75,7 @@ MANGROUPS.${MK_TOOLCHAIN}+= TOOLCHAIN TOOLCHAINPACKAGE= toolchain TOOLCHAIN= ar.5 -MANGROUPS+= LP +MANGROUPS.${MK_LPR}+= LP LPPACKAGE= lp LP= hosts.lpd.5 diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 3617e2d4df40..b0d80ab26211 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -5292,11 +5292,29 @@ OLD_FILES+=usr/share/doc/smm/07.lpd/paper.ascii.gz OLD_DIRS+=usr/share/doc/smm/07.lpd OLD_FILES+=usr/share/examples/etc/hosts.lpd OLD_FILES+=usr/share/examples/etc/printcap +OLD_FILES+=usr/share/examples/printing/diablo-if-net +OLD_FILES+=usr/share/examples/printing/hpdf +OLD_FILES+=usr/share/examples/printing/hpif +OLD_FILES+=usr/share/examples/printing/hpof +OLD_FILES+=usr/share/examples/printing/hprf +OLD_FILES+=usr/share/examples/printing/hpvf +OLD_FILES+=usr/share/examples/printing/if-simple +OLD_FILES+=usr/share/examples/printing/if-simpleX +OLD_FILES+=usr/share/examples/printing/ifhp +OLD_FILES+=usr/share/examples/printing/make-ps-header +OLD_FILES+=usr/share/examples/printing/netprint +OLD_FILES+=usr/share/examples/printing/psdf +OLD_FILES+=usr/share/examples/printing/psdfX +OLD_FILES+=usr/share/examples/printing/psif +OLD_FILES+=usr/share/examples/printing/pstf +OLD_FILES+=usr/share/examples/printing/pstfX +OLD_DIRS+=usr/share/examples/printing OLD_FILES+=usr/share/man/man1/lp.1.gz OLD_FILES+=usr/share/man/man1/lpq.1.gz OLD_FILES+=usr/share/man/man1/lpr.1.gz OLD_FILES+=usr/share/man/man1/lprm.1.gz OLD_FILES+=usr/share/man/man1/lptest.1.gz +OLD_FILES+=usr/share/man/man5/hosts.lpd.5.gz OLD_FILES+=usr/share/man/man5/printcap.5.gz OLD_FILES+=usr/share/man/man8/chkprintcap.8.gz OLD_FILES+=usr/share/man/man8/lpc.8.gz From nobody Thu Feb 26 04:23:21 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fLyxk1Jqfz6TDrg for ; Thu, 26 Feb 2026 04:23:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fLyxj62rdz3Kdv for ; Thu, 26 Feb 2026 04:23:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2+Fzd75taqcoo8vu6uLb2xGu1Ct5NTTADcupZ96eL4k=; b=GoftPIEC1rtTa5YVDijGEJAcguFFTrNBN2Qm6Ej/fmClzATeTgXqhei9QKTWXWJSBuEMjc vDqqgMWaZOKuewVc9xmMeMVntCTcz3IsmXp0KFeozR1KXlF8KIA28pzC+YJGF99Ste858b kzT8mdLxG+TrYscKQs/CQ617KflZBkrOTFlvsyY4L3CWrY2fKb+1t5AG1A0FS7GASd89qT 2Ucu2lAEoBTaW6hFzJEVKvLEA5/G9F/doKaQTh6cAAhAdqfTE0vGJ8clXtwVv1DDKqArtQ lxAlgMMNepQmNyphMDlZGx3cC9+KhqVdS5qf6AT2AoX1pb1zo5CVTIB4deevJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772079801; a=rsa-sha256; cv=none; b=A7KhkV0QmucjLGqgvglkv3o/97B7VkZTm78bgZRXMkQkda2ZDazOwAvhswjBum4g6EjwzK TGTaljnoBZmKCIbPIcWtaNL3WamR1/i9edrRRTyiL+qQYqu1UFgfG1jfH+D49kjb8HK5Cr mtRJSk2BRb2mbcbzrZ0mGwZ3RR5zi4OERxsKDqH7pnAI8dk7ZIM01saDyS2ni4et6/XK0z eC+dpxqndSY1qJxjsVAQecsGGkOtvFlMZRqZyAo19YylW7OIXMe3raMyzFAvP/m2B6G+ks GoOIPQETjymGr8bgQmTpvQmbsHeHVaNdbHcvTPerfthT1Tvxmv5FnTpqNVoScw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772079801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2+Fzd75taqcoo8vu6uLb2xGu1Ct5NTTADcupZ96eL4k=; b=f2MlV69qx3324gIqASK7uqCpykb28ZRruuVFQecpPhY9+z0xIYayrRxEomSWOtPx6MEJZB OD2xoPadwEdLun1n6/8nhq1gj+V/kJ13F3NUFu3oki+YqEf/ixvXHDGVNSnLuicqrwdfnD J0dmuAgIOoAKEmlCZ9IZgvNnaLNaap1SuCXYWonKOk+F8usubiYYZQmKN8GeS5wrP1Tatt 7DAUww97ajB/2XcqmUpvr9BboLis82Dniac93ezcxEWZ0lPkAxhE9rcbDqHu/eFKksjTl5 56hE1tic7uMniOegnZ7bz4axpSz4qmx0/HA1rOuSS38LKsBvxZAwBbkOE1ut1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fLyxj5bRxzy7 for ; Thu, 26 Feb 2026 04:23:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3639b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 04:23:21 +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: 9b75d6ec6929 - stable/15 - lpr: Add deprecation notice List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 9b75d6ec6929e7e6723fbfeb52f60acfa63e5dbc Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 04:23:21 +0000 Message-Id: <699fcab9.3639b.164a2fcd@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=9b75d6ec6929e7e6723fbfeb52f60acfa63e5dbc commit 9b75d6ec6929e7e6723fbfeb52f60acfa63e5dbc Author: Dag-Erling Smørgrav AuthorDate: 2026-02-19 17:55:06 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-26 04:23:04 +0000 lpr: Add deprecation notice These programs require elevated privileges to work and have not seen regular maintenance in decades. Unless someone steps up and overhauls them, we will have to remove them before 16.0. Better-maintained alternatives are available in ports (print/cups, sysutils/LPRng). MFC after: 3 days (cherry picked from commit d57dee7ab66f60537b557cb602be194e3eed253d) --- usr.sbin/lpr/chkprintcap/chkprintcap.8 | 3 +++ usr.sbin/lpr/lp/lp.1 | 3 +++ usr.sbin/lpr/lpc/lpc.8 | 3 +++ usr.sbin/lpr/lpd/lpd.8 | 3 +++ usr.sbin/lpr/lpq/lpq.1 | 3 +++ usr.sbin/lpr/lpr/lpr.1 | 3 +++ usr.sbin/lpr/lpr/printcap.5 | 3 +++ usr.sbin/lpr/lprm/lprm.1 | 3 +++ usr.sbin/lpr/lptest/lptest.1 | 3 +++ usr.sbin/lpr/pac/pac.8 | 3 +++ 10 files changed, 30 insertions(+) diff --git a/usr.sbin/lpr/chkprintcap/chkprintcap.8 b/usr.sbin/lpr/chkprintcap/chkprintcap.8 index 7aecf9fbb1b7..1e9638c2b5aa 100644 --- a/usr.sbin/lpr/chkprintcap/chkprintcap.8 +++ b/usr.sbin/lpr/chkprintcap/chkprintcap.8 @@ -34,6 +34,9 @@ .Nm .Op Fl d .Op Fl f Ar printcap +.Sh DEPRECATION NOTICE +This facility is scheduled for removal prior to the release of +.Fx 16.0 . .Sh DESCRIPTION The .Nm diff --git a/usr.sbin/lpr/lp/lp.1 b/usr.sbin/lpr/lp/lp.1 index 907ce867279e..fee272c456e5 100644 --- a/usr.sbin/lpr/lp/lp.1 +++ b/usr.sbin/lpr/lp/lp.1 @@ -44,6 +44,9 @@ .Op Fl d Ar printer .Op Fl n Ar num .Op Ar name ... +.Sh DEPRECATION NOTICE +This facility is scheduled for removal prior to the release of +.Fx 16.0 . .Sh DESCRIPTION The .Nm diff --git a/usr.sbin/lpr/lpc/lpc.8 b/usr.sbin/lpr/lpc/lpc.8 index 089be4ab3bfc..cc1ba05dd775 100644 --- a/usr.sbin/lpr/lpc/lpc.8 +++ b/usr.sbin/lpr/lpc/lpc.8 @@ -34,6 +34,9 @@ .Sh SYNOPSIS .Nm .Op Ar command Op Ar argument ... +.Sh DEPRECATION NOTICE +This facility is scheduled for removal prior to the release of +.Fx 16.0 . .Sh DESCRIPTION The .Nm diff --git a/usr.sbin/lpr/lpd/lpd.8 b/usr.sbin/lpr/lpd/lpd.8 index eed37ea1d6f4..9a4e46996811 100644 --- a/usr.sbin/lpr/lpd/lpd.8 +++ b/usr.sbin/lpr/lpd/lpd.8 @@ -35,6 +35,9 @@ .Nm .Op Fl cdlpsFW46 .Op Ar port# +.Sh DEPRECATION NOTICE +This facility is scheduled for removal prior to the release of +.Fx 16.0 . .Sh DESCRIPTION The .Nm diff --git a/usr.sbin/lpr/lpq/lpq.1 b/usr.sbin/lpr/lpq/lpq.1 index c87bcbbaa94d..a5e26446ba76 100644 --- a/usr.sbin/lpr/lpq/lpq.1 +++ b/usr.sbin/lpr/lpq/lpq.1 @@ -38,6 +38,9 @@ .Op Fl P Ns Ar printer .Op job # ...\& .Op user ...\& +.Sh DEPRECATION NOTICE +This facility is scheduled for removal prior to the release of +.Fx 16.0 . .Sh DESCRIPTION The .Nm diff --git a/usr.sbin/lpr/lpr/lpr.1 b/usr.sbin/lpr/lpr/lpr.1 index b73870a0f46e..c4f86756b959 100644 --- a/usr.sbin/lpr/lpr/lpr.1 +++ b/usr.sbin/lpr/lpr/lpr.1 @@ -46,6 +46,9 @@ .Op Fl w Ar num .Op Fl cdfghlnmprstv .Op Ar name ... +.Sh DEPRECATION NOTICE +This facility is scheduled for removal prior to the release of +.Fx 16.0 . .Sh DESCRIPTION The .Nm diff --git a/usr.sbin/lpr/lpr/printcap.5 b/usr.sbin/lpr/lpr/printcap.5 index e745fafc7b27..e1bc891c5c09 100644 --- a/usr.sbin/lpr/lpr/printcap.5 +++ b/usr.sbin/lpr/lpr/printcap.5 @@ -33,6 +33,9 @@ .Nd printer capability data base .Sh SYNOPSIS .Nm +.Sh DEPRECATION NOTICE +This facility is scheduled for removal prior to the release of +.Fx 16.0 . .Sh DESCRIPTION The .Nm Printcap diff --git a/usr.sbin/lpr/lprm/lprm.1 b/usr.sbin/lpr/lprm/lprm.1 index 8d35a3434969..e6ae6e22012b 100644 --- a/usr.sbin/lpr/lprm/lprm.1 +++ b/usr.sbin/lpr/lprm/lprm.1 @@ -37,6 +37,9 @@ .Op Fl .Op job # ...\& .Op Ar user ...\& +.Sh DEPRECATION NOTICE +This facility is scheduled for removal prior to the release of +.Fx 16.0 . .Sh DESCRIPTION The .Nm diff --git a/usr.sbin/lpr/lptest/lptest.1 b/usr.sbin/lpr/lptest/lptest.1 index 76f9c2418ce8..ba897c1ddccb 100644 --- a/usr.sbin/lpr/lptest/lptest.1 +++ b/usr.sbin/lpr/lptest/lptest.1 @@ -35,6 +35,9 @@ .Nm .Op Ar length .Op Ar count +.Sh DEPRECATION NOTICE +This facility is scheduled for removal prior to the release of +.Fx 16.0 . .Sh DESCRIPTION The .Nm diff --git a/usr.sbin/lpr/pac/pac.8 b/usr.sbin/lpr/pac/pac.8 index 145d54ad4562..9443c3fc1ec2 100644 --- a/usr.sbin/lpr/pac/pac.8 +++ b/usr.sbin/lpr/pac/pac.8 @@ -40,6 +40,9 @@ .Op Fl s .Op Fl r .Op Ar name ... +.Sh DEPRECATION NOTICE +This facility is scheduled for removal prior to the release of +.Fx 16.0 . .Sh DESCRIPTION The .Nm From nobody Thu Feb 26 06:16:27 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fM1SD2x9Kz6TTBk for ; Thu, 26 Feb 2026 06:16:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fM1SD0cr3z3YC1 for ; Thu, 26 Feb 2026 06:16:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772086588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3fyAgFkVyQ1fS5vo+26EFDD4wTLD716+IW7MrABGEwU=; b=a/KvgslROhbetiQVfM6qyiIK+NJeriTONbkC+7AItThH9Zq7GchJtypRjlhWaVPRvMrmvl aHI7IBmpSM3kPH46PfZWOGYx05esmmhqBlpWBY7onQXIZYkcNwVaRftS8K8TJ28U5zW91o QTSPMPzBinUrBZHKjrUk60ZJKYi7xSjVZs6+OUmuT+05OUQS3GQ3wnpLSMqlVrT+knBXWO eX63dtDwfUorxO9lidgpsCho4vqAQDPVcR8Wbe3wIyQAawfUoOfxQ1Iv/AcOfkk5hXHZ4l n27y1YgC8fbdV6NYmTkqPOMv7yZhfpn5Q6aF2gTSyxlMt1ekDnqc2byWHNXNqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772086588; a=rsa-sha256; cv=none; b=F2uPoKD03gZnXCnkGvAjYyHIC2hgrsDLbAaVZXPIfLhwoMST1m7A0KsoWP4YWVxE9wU3kP NfVS5MkLJKXrxKhNscTntwL4F2ACKefjetM8ngR0h2O7ywoIOYRE3NH2+Kjob6Or8dGUaK s3Pk4a4SVs8RRLE0326gvG/C4qcE46cJpYoVCZGNgqiegGBjui6ov8O8vfwTiIk6rf8ntT bADqoihApxxmsHwfZ7OZb7gVKegiBJtDlYf01Y8ikxfvwtb8KZrssytjc/ae3pOhiVr58k VKpxGgwN5PdxnbTZb1Q8iEM1/W7nC5tHThzlC5toIi6cZazUWRQPth0z3IbTbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772086588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3fyAgFkVyQ1fS5vo+26EFDD4wTLD716+IW7MrABGEwU=; b=YlzPMjxn67X5NKxKVdPkQ8i2/YRXmlDGdvUFTnkRxdmUiZ5H81wLO0PaseXwmLPlqJKZ6L xJ82bJy8VgJuaPBByHJCrpGu6PDycOK9iiKA4pnpDFc7DB3sbN22ghdjqTcfG8cQ1rm/xM Rs2JAVkGvosJrys3pbvgAaEh6wobD2t4zs1lyKKsmxoerUSt6/0onGTVYgEXTdR32g6EGL p5S2P1CpYjR1ylfRQd9w6NGNHALPOc2C6G5boz7speiOC1+zbyravM8jlYxK99VaE0nlJw fX78/Tlw8TClT2j9S1IiW8178p2SI2wHkqQW0B3TYHpN+SPoThtx+Hz6Iwpkng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fM1SC6wlWz4Lt for ; Thu, 26 Feb 2026 06:16:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 40648 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 06:16:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 56fbfd1ecdc7 - main - lpd: Add timeout option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 56fbfd1ecdc78fc99b3a2e381c355ce8980de39d Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 06:16:27 +0000 Message-Id: <699fe53b.40648.78a6c4bf@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=56fbfd1ecdc78fc99b3a2e381c355ce8980de39d commit 56fbfd1ecdc78fc99b3a2e381c355ce8980de39d Author: Dag-Erling Smørgrav AuthorDate: 2026-02-26 06:15:14 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-26 06:15:14 +0000 lpd: Add timeout option Set a 120-second receive timeout on all client connections, and add a command-line option to change that value. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D55400 --- usr.sbin/lpr/lpd/lpd.8 | 8 +++++++- usr.sbin/lpr/lpd/lpd.c | 30 +++++++++++++++++++----------- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/usr.sbin/lpr/lpd/lpd.8 b/usr.sbin/lpr/lpd/lpd.8 index 9a4e46996811..9d24a450ba0e 100644 --- a/usr.sbin/lpr/lpd/lpd.8 +++ b/usr.sbin/lpr/lpd/lpd.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 15, 2021 +.Dd February 19, 2026 .Dt LPD 8 .Os .Sh NAME @@ -34,6 +34,7 @@ .Sh SYNOPSIS .Nm .Op Fl cdlpsFW46 +.Op Fl t Ar timeout .Op Ar port# .Sh DEPRECATION NOTICE This facility is scheduled for removal prior to the release of @@ -108,6 +109,11 @@ This means that will not accept any connections from any remote hosts, although it will still accept print requests from all local users. +.It Fl t Ar timeout +Set the network receive timeout for client connections to +.Ar timeout +seconds. +The default is 120. .It Fl F By default, .Nm diff --git a/usr.sbin/lpr/lpd/lpd.c b/usr.sbin/lpr/lpd/lpd.c index 089b8fedc2d5..d1dcd0766a77 100644 --- a/usr.sbin/lpr/lpd/lpd.c +++ b/usr.sbin/lpr/lpd/lpd.c @@ -61,28 +61,28 @@ */ #include -#include -#include +#include #include -#include #include -#include +#include +#include + #include #include -#include -#include -#include -#include +#include +#include #include #include #include -#include +#include +#include #include #include #include #include -#include +#include +#include #include "lp.h" #include "lp.local.h" #include "pathnames.h" @@ -117,6 +117,7 @@ uid_t uid, euid; int main(int argc, char **argv) { + struct timeval tv = { .tv_sec = 120 }; int ch_options, errs, f, funix, *finet, i, lfd, socket_debug; fd_set defreadfds; struct sockaddr_un un, fromunix; @@ -139,7 +140,7 @@ main(int argc, char **argv) errx(EX_NOPERM,"must run as root"); errs = 0; - while ((i = getopt(argc, argv, "cdlpswFW46")) != -1) + while ((i = getopt(argc, argv, "cdlpst:wFW46")) != -1) switch (i) { case 'c': /* log all kinds of connection-errors to syslog */ @@ -159,6 +160,9 @@ main(int argc, char **argv) case 's': /* secure (no inet) */ sflag++; break; + case 't': + tv.tv_sec = atol(optarg); + break; case 'w': /* netbsd uses -w for maxwait */ /* * This will be removed after the release of 4.4, as @@ -386,6 +390,10 @@ main(int argc, char **argv) syslog(LOG_WARNING, "accept: %m"); continue; } + if (tv.tv_sec > 0) { + (void) setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, &tv, + sizeof(tv)); + } if (fork() == 0) { /* * Note that printjob() also plays around with From nobody Thu Feb 26 06:16:26 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fM1SJ0j0Lz6TT1Z for ; Thu, 26 Feb 2026 06:16:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fM1SH6dPjz3YWW for ; Thu, 26 Feb 2026 06:16:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772086591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IpiTk3exn1jw2kp1fEJ6M35gqzf+CU5f7RroS0VgBGY=; b=Z2syoF7IiymFJl4Rsbt8cc6ILrA+mh5h/NgveL5R2SGxL8Ifz5RLcQKu6OQeKIM4aYas0s 9gcDtJHs4b3MxtAyTmsRY+eW1MqbkjRDemSHN7Pj2c3t5//7HY7OwdfKnoJuBWFEf3zgXk iPTu/FLZ4KI1fxO5Oc0dyJBgtCP17CVEzz9Ga0H9gv/+K/BZZxFFqxN/f+SLXcu3Wu+OtE w+oTRIJ0cdliqM0c4KhyJtdcQqHdATGUC5h2ohApTjO6oGXmrEm6th/WVGjHRfW3qaJvWr IOF3iQccJqwYjrjZsyubt6nQqnCP+gKnAYRBLeiTGH1ctS+yNcXeWvrEdB4NQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772086591; a=rsa-sha256; cv=none; b=Nvhn6a/VGl41ln3oVJQ/NUExeAtAa/FuuR9RoKqdNs/PO3t/R1oKjPp89v2VglNNwPtU4e 3XZF2JdDTV2NV9/PyVCOxG6aDpEHt3dRkgP/LjGupnEsHMpCs4NeyieShk2ZVAxZU/XEVs TNvVn9FayYX13DoY+T2gAWrJbX0+LKLTklfZAI5pHbUQgpO7lDSKHWeEP7barXVSz2egA2 zOy4fZnTBZRifbop+2JlfKXd2bHqHY05WmGFBC5u23sG48ARFkIsFPGpGtdRcTsmLDm56F D4p6uSUWojK/usHEPkVxGds6bTKyPYvR4DzJK7MHnABsqD4sjwEPl2rUFVFU0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772086591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IpiTk3exn1jw2kp1fEJ6M35gqzf+CU5f7RroS0VgBGY=; b=WFJPq09cfrbMvbojeXovLjvWejSZabUEDl8EVrtsIDdb5DK4ec83yIqA5JSFrEFo4i3QbH l9QxCbBCeay7LoPc4AgLKsY3dg1rKjETwNVuvquwCYSnVtwv/yxoir79x4xxqLWU6CUyOJ 7bj7ottb1zyip7hUVVxs/Cu1Q8vJn80U6xE4ITzTuZg+qmCYqz2Sr/nvk1Tmi7N3enmAgX MlwpjjlBKV5ayXqhSIDaUwVkx/+Eqs5hBizp5ttRYoPQGXhKaNTqeCaeiRHV0CNmTdBbtq 0H9OqrfXrewCFjWapvp9Ro6vrfSmKz+rYpjeTE1dymdJwXcicbJreG9BCvedaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fM1SH69hzz4rn for ; Thu, 26 Feb 2026 06:16:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41918 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 06:16:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 9065be0a5902 - main - lpd: Improve robustness List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9065be0a5902e058d25a42bd9b3fbe9dc28b189d Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 06:16:26 +0000 Message-Id: <699fe53a.41918.3b436976@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=9065be0a5902e058d25a42bd9b3fbe9dc28b189d commit 9065be0a5902e058d25a42bd9b3fbe9dc28b189d Author: Dag-Erling Smørgrav AuthorDate: 2026-02-26 06:15:06 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-26 06:15:06 +0000 lpd: Improve robustness * Check for integer overflow when receiving file sizes. * Check for buffer overflow when receiving file names, and fully validate the names. * Check for integer overflow when checking for available disk space. * Check for I/O errors when sending status codes. * Enforce one job per connection and one control file per job (see code comments for additional details). * Simplify readfile(), avoiding constructs vulnerable to integer overflow. * Don't delete files we didn't create. * Rename read_number() to read_minfree() since that's all it's used for, and move all the minfree logic into it. * Fix a few style issues. PR: 293278 MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D55399 --- usr.sbin/lpr/lpd/recvjob.c | 291 +++++++++++++++++++++++++++++---------------- 1 file changed, 189 insertions(+), 102 deletions(-) diff --git a/usr.sbin/lpr/lpd/recvjob.c b/usr.sbin/lpr/lpd/recvjob.c index f103829b19e8..94ff82ecb88f 100644 --- a/usr.sbin/lpr/lpd/recvjob.c +++ b/usr.sbin/lpr/lpd/recvjob.c @@ -39,22 +39,25 @@ #include #include -#include -#include -#include #include #include -#include +#include +#include +#include +#include +#include #include #include #include +#include +#include #include "lp.h" #include "lp.local.h" #include "ctlinfo.h" #include "extern.h" #include "pathnames.h" -#define ack() (void) write(STDOUT_FILENO, sp, (size_t)1) +#define digit(ch) ((ch) >= '0' && (ch) <= '9') /* * The buffer size to use when reading/writing spool files. @@ -62,15 +65,16 @@ #define SPL_BUFSIZ BUFSIZ static char dfname[NAME_MAX]; /* data files */ -static int minfree; /* keep at least minfree blocks available */ -static const char *sp = ""; +static size_t minfree; /* keep at least minfree blocks available */ static char tfname[NAME_MAX]; /* tmp copy of cf before linking */ -static int chksize(int _size); +static void ack(struct printer *_pp); +static void nak(struct printer *_pp); +static int chksize(size_t _size); static void frecverr(const char *_msg, ...) __printf0like(1, 2); static int noresponse(void); static void rcleanup(int _signo); -static int read_number(const char *_fn); +static void read_minfree(void); static int readfile(struct printer *_pp, char *_file, size_t _size); static int readjob(struct printer *_pp); @@ -118,7 +122,7 @@ recvjob(const char *printer) } else if (stat(pp->spool_dir, &stb) < 0) frecverr("%s: stat(%s): %s", pp->printer, pp->spool_dir, strerror(errno)); - minfree = 2 * read_number("minfree"); /* scale KB to 512 blocks */ + read_minfree(); signal(SIGTERM, rcleanup); signal(SIGPIPE, rcleanup); @@ -129,18 +133,35 @@ recvjob(const char *printer) /* * Read printer jobs sent by lpd and copy them to the spooling directory. * Return the number of jobs successfully transferred. + * + * In theory, the protocol allows any number of jobs to be transferred in + * a single connection, with control and data files in any order. This + * would be very difficult to police effectively, so enforce a single job + * per connection. The control file can be sent at any time (first, last, + * or between data files). All files must bear the same job number, and + * the data files must be sent sequentially. If any of these requirements + * is violated, we close the connection and delete everything. + * + * Note that RFC 1179 strongly implies only one data file per job; I + * assume this is a mistake in the RFC since it is supposed to describe + * this code, which predates it, but was written by a third party. */ static int readjob(struct printer *pp) { - register int size; - int cfcnt, dfcnt; - char *cp, *clastp, *errmsg; + ssize_t rlen; + size_t len, size; + int cfcnt, dfcnt, curd0, curd2, curn, n; + char *cp, *clastp, *errmsg, *sep; char givenid[32], givenhost[MAXHOSTNAMELEN]; - ack(); + tfname[0] = dfname[0] = '\0'; + ack(pp); cfcnt = 0; dfcnt = 0; + curd0 = 'd'; + curd2 = 'A'; + curn = -1; for (;;) { /* * Read a command to tell us what to do @@ -148,16 +169,16 @@ readjob(struct printer *pp) cp = line; clastp = line + sizeof(line) - 1; do { - size = read(STDOUT_FILENO, cp, (size_t)1); - if (size != (ssize_t)1) { - if (size < (ssize_t)0) { + rlen = read(STDOUT_FILENO, cp, 1); + if (rlen != 1) { + if (rlen < 0) { frecverr("%s: lost connection", pp->printer); /*NOTREACHED*/ } return (cfcnt); } - } while ((*cp++ != '\n') && (cp <= clastp)); + } while (*cp++ != '\n' && cp <= clastp); if (cp > clastp) { frecverr("%s: readjob overflow", pp->printer); /*NOTREACHED*/ @@ -165,37 +186,47 @@ readjob(struct printer *pp) *--cp = '\0'; cp = line; switch (*cp++) { - case '\1': /* cleanup because data sent was bad */ + case '\1': /* abort print job */ rcleanup(0); continue; - case '\2': /* read cf file */ - size = 0; - dfcnt = 0; - while (*cp >= '0' && *cp <= '9') - size = size * 10 + (*cp++ - '0'); + case '\2': /* read control file */ + if (tfname[0] != '\0') { + /* multiple control files */ + break; + } + for (size = 0; digit(*cp); cp++) { + if (ckd_mul(&size, size, 10) || + ckd_add(&size, size, *cp - '0')) + break; + } if (*cp++ != ' ') break; /* - * host name has been authenticated, we use our - * view of the host name since we may be passed - * something different than what gethostbyaddr() - * returns + * The next six bytes must be "cfA" followed by a + * three-digit job number. The rest of the line + * is the client host name, but we substitute the + * host name we've already authenticated. */ - strlcpy(cp + 6, from_host, sizeof(line) - + (size_t)(line - cp - 6)); - if (strchr(cp, '/')) { - frecverr("readjob: %s: illegal path name", cp); - /*NOTREACHED*/ - } - strlcpy(tfname, cp, sizeof(tfname)); - tfname[sizeof (tfname) - 1] = '\0'; + if (cp[0] != 'c' || cp[1] != 'f' || cp[2] != 'A' || + !digit(cp[3]) || !digit(cp[4]) || !digit(cp[5])) + break; + n = (cp[3] - '0') * 100 + (cp[4] - '0') * 10 + + cp[5] - '0'; + if (curn == -1) + curn = n; + else if (curn != n) + break; + len = snprintf(tfname, sizeof(tfname), "%.6s%s", cp, + from_host); + if (len >= sizeof(tfname)) + break; tfname[0] = 't'; if (!chksize(size)) { - (void) write(STDOUT_FILENO, "\2", (size_t)1); + nak(pp); continue; } - if (!readfile(pp, tfname, (size_t)size)) { + if (!readfile(pp, tfname, size)) { rcleanup(0); continue; } @@ -208,27 +239,62 @@ readjob(struct printer *pp) cfcnt++; continue; - case '\3': /* read df file */ + case '\3': /* read data file */ + if (curd0 > 'z') { + /* too many data files */ + break; + } *givenid = '\0'; *givenhost = '\0'; - size = 0; - while (*cp >= '0' && *cp <= '9') - size = size * 10 + (*cp++ - '0'); + for (size = 0; digit(*cp); cp++) { + if (ckd_mul(&size, size, 10) || + ckd_add(&size, size, *cp - '0')) + break; + } if (*cp++ != ' ') break; - if (strchr(cp, '/')) { - frecverr("readjob: %s: illegal path name", cp); - /*NOTREACHED*/ - } + /* + * The next six bytes must be curd0, 'f', curd2 + * followed by a three-digit job number, where + * curd2 cycles through [A-Za-z] while curd0 + * starts at 'd' and increments when curd2 rolls + * around. The rest of the line is the client + * host name, but we substitute the host name + * we've already authenticated. + */ + if (cp[0] != curd0 || cp[1] != 'f' || cp[2] != curd2 || + !digit(cp[3]) || !digit(cp[4]) || !digit(cp[5])) + break; + n = (cp[3] - '0') * 100 + (cp[4] - '0') * 10 + + cp[5] - '0'; + if (curn == -1) + curn = n; + else if (curn != n) + break; + len = snprintf(dfname, sizeof(dfname), "%.6s%s", cp, + from_host); + if (len >= sizeof(dfname)) + break; if (!chksize(size)) { - (void) write(STDOUT_FILENO, "\2", (size_t)1); + nak(pp); continue; } - strlcpy(dfname, cp, sizeof(dfname)); + switch (curd2++) { + case 'Z': + curd2 = 'a'; + break; + case 'z': + curd0++; + curd2 = 'A'; + break; + } dfcnt++; trstat_init(pp, dfname, dfcnt); - (void) readfile(pp, dfname, (size_t)size); - trstat_write(pp, TR_RECVING, (size_t)size, givenid, + if (!readfile(pp, dfname, size)) { + rcleanup(0); + continue; + } + trstat_write(pp, TR_RECVING, size, givenid, from_host, givenhost); continue; } @@ -243,52 +309,55 @@ readjob(struct printer *pp) static int readfile(struct printer *pp, char *file, size_t size) { - register char *cp; char buf[SPL_BUFSIZ]; - size_t amt, i; - int err, fd, j; + ssize_t rlen, wlen; + int err, f0, fd, j; fd = open(file, O_CREAT|O_EXCL|O_WRONLY, FILMOD); if (fd < 0) { - frecverr("%s: readfile: error on open(%s): %s", - pp->printer, file, strerror(errno)); + /* + * We need to pass the file name to frecverr() so it can + * log an error, but frecverr() will then call rcleanup() + * which will delete the file if we don't zero out the + * first character. + */ + f0 = file[0]; + file[0] = '\0'; + frecverr("%s: readfile: error on open(%c%s): %s", + pp->printer, f0, file + 1, strerror(errno)); /*NOTREACHED*/ } - ack(); - err = 0; - for (i = 0; i < size; i += SPL_BUFSIZ) { - amt = SPL_BUFSIZ; - cp = buf; - if (i + amt > size) - amt = size - i; - do { - j = read(STDOUT_FILENO, cp, amt); - if (j <= 0) { - frecverr("%s: lost connection", pp->printer); + ack(pp); + while (size > 0) { + rlen = read(STDOUT_FILENO, buf, MIN(SPL_BUFSIZ, size)); + if (rlen < 0 && errno == EINTR) + continue; + if (rlen <= 0) { + frecverr("%s: lost connection", pp->printer); + /*NOTREACHED*/ + } + size -= rlen; + while (rlen > 0) { + wlen = write(fd, buf, rlen); + if (wlen < 0 && errno == EINTR) + continue; + if (wlen <= 0) { + frecverr("%s: write error on write(%s)", + pp->printer, file); /*NOTREACHED*/ } - amt -= j; - cp += j; - } while (amt > 0); - amt = SPL_BUFSIZ; - if (i + amt > size) - amt = size - i; - if (write(fd, buf, amt) != (ssize_t)amt) { - err++; - break; + rlen -= wlen; } } - (void) close(fd); - if (err) { + if (close(fd) != 0) { frecverr("%s: write error on close(%s)", pp->printer, file); /*NOTREACHED*/ } if (noresponse()) { /* file sent had bad data in it */ - if (strchr(file, '/') == NULL) - (void) unlink(file); + (void) unlink(file); return (0); } - ack(); + ack(pp); return (1); } @@ -297,13 +366,13 @@ noresponse(void) { char resp; - if (read(STDOUT_FILENO, &resp, (size_t)1) != 1) { + if (read(STDOUT_FILENO, &resp, 1) != 1) { frecverr("lost connection in noresponse()"); /*NOTREACHED*/ } if (resp == '\0') - return(0); - return(1); + return (0); + return (1); } /* @@ -311,36 +380,42 @@ noresponse(void) * 1 == OK, 0 == Not OK. */ static int -chksize(int size) +chksize(size_t size) { - int64_t spacefree; struct statfs sfb; + size_t avail; if (statfs(".", &sfb) < 0) { syslog(LOG_ERR, "%s: %m", "statfs(\".\")"); return (1); } - spacefree = sfb.f_bavail * (sfb.f_bsize / 512); - size = (size + 511) / 512; - if (minfree + size > spacefree) - return(0); - return(1); + /* more free space than we can count; possible on 32-bit */ + if (ckd_mul(&avail, sfb.f_bavail, (sfb.f_bsize / 512))) + return (1); + /* already at or below minfree */ + if (avail <= minfree) + return (0); + /* not enough space */ + if (avail - minfree <= size / 512) + return (0); + return (1); } -static int -read_number(const char *fn) +static void +read_minfree(void) { - char lin[80]; - register FILE *fp; + FILE *fp; - if ((fp = fopen(fn, "r")) == NULL) - return (0); - if (fgets(lin, sizeof(lin), fp) == NULL) { + minfree = 0; + /* read from disk */ + if ((fp = fopen("minfree", "r")) != NULL) { + if (fscanf(fp, "%zu", &minfree) != 1) + minfree = 0; fclose(fp); - return (0); } - fclose(fp); - return (atoi(lin)); + /* scale kB to 512-byte blocks */ + if (ckd_mul(&minfree, minfree, 2)) + minfree = SIZE_MAX; } /* @@ -362,8 +437,6 @@ rcleanup(int signo __unused) dfname[0] = '\0'; } -#include - static void frecverr(const char *msg, ...) { @@ -391,3 +464,17 @@ frecverr(const char *msg, ...) putchar('\1'); /* return error code */ exit(1); } + +static void +ack(struct printer *pp) +{ + if (write(STDOUT_FILENO, "\0", 1) != 1) + frecverr("%s: write error on ack", pp->printer); +} + +static void +nak(struct printer *pp) +{ + if (write(STDOUT_FILENO, "\2", 1) != 1) + frecverr("%s: write error on nak", pp->printer); +} From nobody Thu Feb 26 06:29:16 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fM1l62DL2z6Slqf for ; Thu, 26 Feb 2026 06: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fM1l569Lhz3bxW for ; Thu, 26 Feb 2026 06: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=1772087361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+ESwxpP3IP1kxrNmkpuBi7XqKzifWyyYHxvYAL7sET0=; b=nHgcmqUUKN5AAaRDP/cYR/jZUQ4W4YhROL9QpIYSNR8k4py+gI5B43v4JBMbw8RDZt2zCG aOXWeLcr0FLUIYGhUTdaI6rF/GOntxafEluvux0hGZFrh4ApETNwGQLfIAlLqQRdNMN0gX vCllAocJ5dXLsGh9vUvnG6iZMkU8JaLM+RD82+HkvyOWlowcqmY9/EGfRS5ltCzmOxswH/ 6vxT+A9Sy0/53BlcY4cWckER14YhU4mM2TWU34rfIiFcWmnh/qtTmYHaWCCkusyrq4fAMD 9ixsBJvOYzBhYPmKpDHUU7tGrpsi1ToK/JEAcBToPUNSAiFYpb9pG1I7ANNczA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772087361; a=rsa-sha256; cv=none; b=lDWeQ+5h9rBUylsuDZJV3W/SF4tpOLEsu863sfY0IODidOgkAdzJybX4U/vCJI4VdwvxiB EaLQskO4DHhA0G4WG1HyReEpNWek6m6EvUfKtnb2X9ALxsCbav/Ym4XYnsed0hxP8OE/ou vheqEzgoGdXmSKBhuMb3Jpy7CAoPWoRlf2bDq13XxLAsljgxQzQYArj25JNPtdiPDKzXIU Re6R2vljf1N1K/iGgwuTA3iTp+tSPqS+S1WfRaMZgUFEwE4FUya6M+w5myJNYLo/zy9oOY vArlKwsp5OjS3VsX2S25ZuMUH5uiMh2Jx9IppTUgfZsvZ91WBOsT8P5Uv5XqIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772087361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+ESwxpP3IP1kxrNmkpuBi7XqKzifWyyYHxvYAL7sET0=; b=RaimTXD/tkLZ9BammUDvF2sNCAHN3DAh+agpMUCrpzWMP7KLfJvUH+T3lLRFDvspdT0BLO evqiZITVb+U4uDB6w7Urb58vzJVqABICSrJSvmeZQXkM++TiPt7IhGObsIap28fJLwgy9O GnWyXjoJbGog2ZhfLIdvcFuhn33nNBl+DObU07eaU7MdrxY/pMTQ3wqjZExv0d33j+Cfep sagpaun2KsdScgXEQVFJjKUwBUzmlEZZGuS6Pe5h7Mb1dWjzExbBn6sbx5WavLLZB/wi7S 3ASjfhkbjWsCaCSZ4S9TY/XlA+rmJcxbIZuo7mZZUfsOYMRL2FUCQizaqRKp7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fM1l55YsNz4Xk for ; Thu, 26 Feb 2026 06:29:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 40050 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 06:29:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: 6fd98877de63 - main - Refinements to the output when the EXTERROR_VERBOSE environment is set List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6fd98877de633f5ec6f028e78d5a2d94527d63d0 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 06:29:16 +0000 Message-Id: <699fe83c.40050.5e7aeeb1@gitrepo.freebsd.org> The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=6fd98877de633f5ec6f028e78d5a2d94527d63d0 commit 6fd98877de633f5ec6f028e78d5a2d94527d63d0 Author: Kirk McKusick AuthorDate: 2026-02-26 06:20:12 +0000 Commit: Kirk McKusick CommitDate: 2026-02-26 06:20:12 +0000 Refinements to the output when the EXTERROR_VERBOSE environment is set When kernel external errors are available they are included in the err(3) library function messages. In addition to the extended error itself, the kernel also tracks the kernel file and line number at which the error was generated. This additional information is not included in the err(3) messages unless the EXTERROR_VERBOSE environment variable is present. Currently, when EXTERROR_VERBOSE is present, all the internal extended error information associated with the error is printed most of which is redundant with the formatted error message printed by err(3). This change will add only the kernel file and line number to the err(3) message when EXTERROR_VERBOSE is present and set to "brief". Sample output with bad protection bits to mmap: guest_16 % ./Example bigfile Example: mmap bigfile: Invalid argument (unknown PROT bits 0x8) guest_16 % setenv EXTERROR_VERBOSE guest_16 % ./Example bigfile Example: mmap bigfile: Invalid argument (unknown PROT bits 0x8 errno 22 category 1 (src sys/vm/vm_mmap.c:200) p1 0x8 p2 0) guest_16 % setenv EXTERROR_VERBOSE brief guest_16 % ./Example bigfile Example: mmap bigfile: Invalid argument (unknown PROT bits 0x8 (src sys/vm/vm_mmap.c:200)) Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D55494 MFC-after: 1 week Sponsored-by: Netflix --- lib/libc/gen/err.3 | 8 +++++++- lib/libc/gen/uexterr_format.c | 28 ++++++++++++++++++++-------- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/lib/libc/gen/err.3 b/lib/libc/gen/err.3 index 70a214152a19..2df03c2dcdde 100644 --- a/lib/libc/gen/err.3 +++ b/lib/libc/gen/err.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 29, 2012 +.Dd February 23, 2026 .Dt ERR 3 .Os .Sh NAME @@ -128,6 +128,12 @@ environment variable is present, an additional report is printed. The report includes at least the category of the error, the name of the source file (if known by the used version of libc), the source line number, and parameters. +If the +.Ev EXTERROR_VERBOSE +environment variable is present and set to "brief", +the report adds only the name of +the source file (if known by the used version of libc) +and the source line number. The format of the printed string is not contractual and might be changed. .Pp In the case of the diff --git a/lib/libc/gen/uexterr_format.c b/lib/libc/gen/uexterr_format.c index c1974f3c361a..308220adea1f 100644 --- a/lib/libc/gen/uexterr_format.c +++ b/lib/libc/gen/uexterr_format.c @@ -35,13 +35,16 @@ static const char exterror_verbose_name[] = "EXTERROR_VERBOSE"; enum exterr_verbose_state { EXTERR_VERBOSE_UNKNOWN = 100, EXTERR_VERBOSE_DEFAULT, - EXTERR_VERBOSE_ALLOW, + EXTERR_VERBOSE_ALLOW_BRIEF, + EXTERR_VERBOSE_ALLOW_FULL, }; static enum exterr_verbose_state exterror_verbose = EXTERR_VERBOSE_UNKNOWN; static void exterr_verbose_init(void) { + const char *v; + /* * No need to care about thread-safety, the result is * idempotent. @@ -50,8 +53,9 @@ exterr_verbose_init(void) return; if (issetugid()) { exterror_verbose = EXTERR_VERBOSE_DEFAULT; - } else if (getenv(exterror_verbose_name) != NULL) { - exterror_verbose = EXTERR_VERBOSE_ALLOW; + } else if ((v = getenv(exterror_verbose_name)) != NULL) { + exterror_verbose = strcmp(v, "brief") == 0 ? + EXTERR_VERBOSE_ALLOW_BRIEF : EXTERR_VERBOSE_ALLOW_FULL; } else { exterror_verbose = EXTERR_VERBOSE_DEFAULT; } @@ -78,13 +82,21 @@ __uexterr_format(const struct uexterror *ue, char *buf, size_t bufsz) strlcpy(buf, "", bufsz); } - if (exterror_verbose == EXTERR_VERBOSE_ALLOW || !has_msg) { + if (exterror_verbose > EXTERR_VERBOSE_DEFAULT || !has_msg) { char lbuf[128]; - snprintf(lbuf, sizeof(lbuf), - "errno %d category %u (src sys/%s:%u) p1 %#jx p2 %#jx", - ue->error, ue->cat, cat_to_filename(ue->cat), - ue->src_line, (uintmax_t)ue->p1, (uintmax_t)ue->p2); +#define SRC_FMT "(src sys/%s:%u)" + if (exterror_verbose == EXTERR_VERBOSE_ALLOW_BRIEF) { + snprintf(lbuf, sizeof(lbuf), SRC_FMT, + cat_to_filename(ue->cat), ue->src_line); + } else if (!has_msg || + exterror_verbose == EXTERR_VERBOSE_ALLOW_FULL) { + snprintf(lbuf, sizeof(lbuf), + "errno %d category %u " SRC_FMT " p1 %#jx p2 %#jx", + ue->error, ue->cat, cat_to_filename(ue->cat), + ue->src_line, (uintmax_t)ue->p1, (uintmax_t)ue->p2); + } +#undef SRC_FMT if (has_msg) strlcat(buf, " ", bufsz); strlcat(buf, lbuf, bufsz); From nobody Thu Feb 26 07:07:46 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fM2bX35VFz6SrRB for ; Thu, 26 Feb 2026 07:07:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fM2bX2RPbz3gd6 for ; Thu, 26 Feb 2026 07:07:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772089672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ivDSxYcYfULAOW86oImBdsWpcyvvcf50cWT9fruoN+M=; b=IHHXrGMaz92Tt7saz6yCmsg1RGjThLhQF5z0p+tWbmrV0msCYrC4Z92zdo14AWS1X/z6un 0b3HErWvMmnBZcd68rYx5WSUj4l7rMuNAGosykVqkn7ic/CpX+4TjzTpO7QMQyod8yXr6h fEJRW2xrdAUTqbt2neHp3nmbkNnW+J61ghqRMNa8RW/0YiAjdhd7abQPPQNIq4XwSWtjO8 2Wp+UmwITy7Q16Es0/M4CaSoGb+55DGc5PGn+lZ3AQonoh66f49HuYUBojeuHfX0x+gKmv qaZO9b96dpa8Mq0/JaLpQFM3hxr0QgRDZQa4hFaMTLtXZ/XQE8u04lC3BZb+bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772089672; a=rsa-sha256; cv=none; b=bOZ6r09OTU7+spKx8Cb1Fsio182rR/Vjn+t0aIL+eoMBdERb+uqmXZ4sfxa/463Ha7ZYY5 SFzBEKLypzvAZdCc48nh2dkPSybDdNv1eBObXMYjRmm4OZiYZAGn8iuIyvssas4X/DmkOI fgGJqzGMinmyT+qY1RctT2Iq9Fugqf1ViuBChtr7SVVnBPEE6U1BiiI5HCvMZXGZALsR71 FO+3IevSwPhTXNBmc4rcARIM3fQjXIYCcy6jpnubBQCeSFEk8pS9YILO9LvKhJMxLBit0L +bbj2/N8Ozo+B530xhxyUxEDCE/66taJv4jC7AVKLe/jQEWl2nu+Sogj3DoT8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772089672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ivDSxYcYfULAOW86oImBdsWpcyvvcf50cWT9fruoN+M=; b=mGjtq9Lg7E6ZPbfSrQw78IJAn5kx3NSmQEQt/aVVO3haS/hKsvYpxv+vFXqAsVqFUFanrn CI9cmWczV3rRv9t+67ZHZQ0RFevDnc5SdPND+De9eTswFaN6mrVs5Qszwqrt/WZj180Q5b Kp36ShdJJH4Iw1gk9EYMWwXUcAfpIMtWr/SfN5ktldd3MpvgkwwUg+RgAqW5Ez06PdLVui SbAxA7kv1lTrPW3BBfcz4oAXJ7WjJUxpXIPpiqhNpELKxyOmxNerEe9F+9ooslYCqs3Bw2 SGDeOzpq7lG0foxBu0SPl/Tx9XOL73ib6vvEqjvOtElpoRZwuGTjWElEaCBK8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fM2bX1lC5z646 for ; Thu, 26 Feb 2026 07:07:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 463fd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 07:07:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 2abdbe9d7964 - main - style.mdoc: Add example manuals to FILES List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2abdbe9d796419e8149705ffb4c81f0c0cdea05f Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 07:07:46 +0000 Message-Id: <699ff142.463fd.38359604@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=2abdbe9d796419e8149705ffb4c81f0c0cdea05f commit 2abdbe9d796419e8149705ffb4c81f0c0cdea05f Author: Alexander Ziaee AuthorDate: 2026-02-26 07:07:09 +0000 Commit: Alexander Ziaee CommitDate: 2026-02-26 07:07:12 +0000 style.mdoc: Add example manuals to FILES This is the OG meat and potatoes. MFC after: 3 days Reviewed by: 0mp, carlavilla Differential Revision: https://reviews.freebsd.org/D55301 --- share/man/man5/style.mdoc.5 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/share/man/man5/style.mdoc.5 b/share/man/man5/style.mdoc.5 index 2f8ea90ae21f..98cc516ffd64 100644 --- a/share/man/man5/style.mdoc.5 +++ b/share/man/man5/style.mdoc.5 @@ -286,6 +286,11 @@ that would be rendered as: .Va critical_filesystems_ Ns Ar type .Ed .El +.Sh FILES +.Bl -tag -width "/usr/share/examples/mdoc/tab" +.It /usr/share/examples/mdoc/ +Examples for writing manual pages. +.El .Sh SEE ALSO .Xr man 1 , .Xr mandoc 1 , From nobody Thu Feb 26 07:41:52 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fM3Ls6218z6SwH8 for ; Thu, 26 Feb 2026 07:41:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fM3Ls5JZ8z3lWg for ; Thu, 26 Feb 2026 07:41:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772091717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wxAXAv/8VCCTYZvVAx0AfwA4gzW/aCQLMc/yFdbPBcM=; b=xY6LGi0JJc4iW9DpFpozZ4FbcdQH5qTeqJzpWaP6rRm9NAaqFFmK2fixl1iVCOQYwm+9Km Y1UJ6d9znXxmG5IoMcEvIzowvMXmEZpEEbLDNKF4JEruNrVV25q+tJQcu11LWDnOaqxlY3 keDKsj5DHdBzJkZfyXliDBHtorGAxuCGnWF8cUh6/ckB+sjchkBMuq4aUYGaC6hq57O5xa eN/nozb1i84hzsFHyuIfipYHDslmV+ab/vQMo03hZWAuUyyRziJPbXLUmdYHZ2aVKTZobO J+QdRhKS5OdSOZRvJ5X3snOnDNMqp83uT49qR4sZH7/z7CcqfE4iRmHCD4xcqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772091717; a=rsa-sha256; cv=none; b=ikxdDDBcSG5KtEh+4hGM78lcT2Sj4ILqdrz5kaO5IdbMIAdcVBr06irvV4p0+IduJCqqyX ycvHBWJo5b+BmPlNWc9fWcolBn/s6YBOQwaEdYcvlnMpWvkJK90BgaU8SxOdaCPLpxCFme rYU4+r9L2N2o1rcBBrFS6B/l76phcKEmDpX72IUu7F81pdWgELjl1MYzGgEapo5cqoycsf PtZXBhAftM2IPAglpxMTTsuI5qDhBlM3sw+FxiEudsGIRwJqRXCYPgx+w1xq+GvAsozwNs UfIkXQGfzgLXk6bpnANK6xfhg4mwQyY6Qt957PwxqqEbbaF4Ica7NbKFlRHJfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772091717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wxAXAv/8VCCTYZvVAx0AfwA4gzW/aCQLMc/yFdbPBcM=; b=cYDP6R2EL9vIOvrDbvwXOq5h8VSJLHE4XQrtM88Vk7vRJED+KwKLzwJ4OprxyK0p5oDS/p KKGq0pY2yCec//N08JrXORka4llwY90uHeSwrJ3R4Ym0IU/HME2bZOBAy/iOLFmmmJs2QJ nAqhVVfxnDr/SQ/b6r7w/o1VTSD0wwmCcb+TZB234miVAa842/3Pluj0gHeNrUD2KSD/Ju j4w2FiuxaJPnQ5ioe7domaG+g8YRsPT5Kb6N1eFy3QsTqV3eX32Z5t2hVvgwfQUYkjz5Eh xSE5B/VlIzRcLYtveJMIjxPUnNrkfD7aloUryulqj0WUb01MsBd1TI2o6mSATw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fM3Ls4sHsz79h for ; Thu, 26 Feb 2026 07:41:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 19c99 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 07:41:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: db5344a7445f - main - lib/libnetbsd: bring in `__type_m{ax,in}*` macro family List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: db5344a7445f1a796bc3cacd32a46e88e3e589a7 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 07:41:52 +0000 Message-Id: <699ff940.19c99.1af2c339@gitrepo.freebsd.org> The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=db5344a7445f1a796bc3cacd32a46e88e3e589a7 commit db5344a7445f1a796bc3cacd32a46e88e3e589a7 Author: Enji Cooper AuthorDate: 2026-02-26 02:29:49 +0000 Commit: Enji Cooper CommitDate: 2026-02-26 07:41:08 +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 --- 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 78c80735ad01..e4ff4a516519 100644 --- a/lib/libnetbsd/sys/cdefs.h +++ b/lib/libnetbsd/sys/cdefs.h @@ -110,4 +110,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 Thu Feb 26 09:40:15 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fM5zd5gJpz6TBCc for ; Thu, 26 Feb 2026 09:40:29 +0000 (UTC) (envelope-from wschnr@googlemail.com) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fM5zc1jSrz40Zf for ; Thu, 26 Feb 2026 09:40:28 +0000 (UTC) (envelope-from wschnr@googlemail.com) Authentication-Results: mx1.freebsd.org; dkim=none; arc=pass ("google.com:s=arc-20240605:i=1"); dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of wschnr@googlemail.com designates 209.85.221.46 as permitted sender) smtp.mailfrom=wschnr@googlemail.com Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-4376de3f128so417385f8f.0 for ; Thu, 26 Feb 2026 01:40:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772098827; cv=none; d=google.com; s=arc-20240605; b=B5mH3/r6MEr3+RSD86EvqhhT4sT7tG84Rdc4Q966S6rR6Mrr6CtACeaNag1/QOennK oBO5Np97aHJJpNOj/m2WE6nBQovz/G8ul8z0XsZGkrM80PCNN2rDFxzYnfGAA1kor6CH QJGWWe3+kzMLpPi27yePiTdWBi91AP3kzRFtdsyl94tfa++Q3+FvvolYHZFM1VwfeqGK upY7au1PXXCiUztRuV5t+O646fSKfhNOo9RQLsk+dU94e/fCkTrmBd49Ki44QCq/0DpV 28RrPPr7hUlUqIV3U5kJgC5gRMUnYLcDCSllSou5eHnIW//NW35MoMTP6PzSlY4oYZJY Fbrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version; bh=w4IYNYzBIIRacx/0OXveM8T8csEYIR98ppiaoc/WohQ=; fh=oVgFeEk1mmDoUPg4F0O6wCa5KqrGHHyCPg0K2cr6gzw=; b=Rja8yd1YQXOo5Suz6zp/aHjwVv+cuvUQaPBm8OXkuWy9dW4ZQlt0UZ2xxcu8JG5r+L Aso3ekGy3YcT7bjRYFLxGeGLRs4C7jdRSOaRFU1e3F3WnIiOo5hDyhb8C0/Va/Ro/9GK tJpDlc8unpGlk9RSuFRQe3/6nEIkFzUD4Guwuwe+Vt3MpfzE8h+/vsWmKdUCB4dYFf5q 5G44pH6wybBzdvAL8rhzNvdNIwLTfgxO9d51yCByF2ExuNRIeJFlmDXoYGy0KtqrY8e8 X11e+D7HeCx54uaXhdvXsqX1s8wNO4Ejb68IU+WHqFJtGM7IybnQv93Y4jcEzBtmKtOj 8nTg==; darn=freebsd.org ARC-Authentication-Results: i=1; mx.google.com; arc=none X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772098827; x=1772703627; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=w4IYNYzBIIRacx/0OXveM8T8csEYIR98ppiaoc/WohQ=; b=bnS5S/sLvt5+lWzijn3nuZAeayV7LzWj3Ohszf7nudBIWosHCxPL2Ugf0BJKyUcerU i6sKLMfbXwf+HmdMggHJDwN6E6aIuvcqWLLQf7uXVmBWlGN/lWp90R8c1+018cwoEsnl x3Ps6+VviWLxR9TYi51ejKjtojYcFSUGhRcwAthjHj0UBJH0/L+IhcQB0ssNdDyZqh1u bQdqj+T7fZB1PUDORmryghh5A+tBHun7JZlLoOnF/hMrU+colJuhthPr3KS3Ivq4f3aO ZicX+3hOvnoij1RsSReOVf5Rln/4GTFfPC2bpuhL2jy7TFCjNYey5VGtxwltYE1p5Kk7 SheQ== X-Forwarded-Encrypted: i=1; AJvYcCWV+6sDbu8untS/KYQ/JkSup3Qj33hR/It0JnzA9xyr+ytecyQ17kv4QVzi1Yo0ebmgkTcfsk00G2mzhUZTYN3nZcBv@freebsd.org X-Gm-Message-State: AOJu0YwaG3J0yMLC65uEA54aTUKsCRvjfMSWqcLeKR5sJIqhBPutacC3 6y6qJmMTltqyhE44tzopeLhRbWUUSxmenOXHffXusALbRjuzAQvFjPhMddXfAqpK/NWT+puApxL j4X45kGfErLbkb0Eh+rYK7c0I9VjRodA= X-Gm-Gg: ATEYQzzw2OOPEfmxhBhEC8GMLy0iwBY4usQi07B9uIjPq4Kyd+5Zb617g4mHKXH8F9w GxIIqRMA9PFmJCtdyc6Za7TQpo/nRW2lIbSU1TCm/VvGpC23WKDVf8spTXRV7Ia2OPehiWADIb0 7lIQ1AOpnBzlCyoJAQMo7UtV/LEz9AJxwIjz9Yd45Sy+V5aONIyn2PTzqTjb/5HzfavFR9uNR0Z SVyIsZeGVEw7VU8pHwxL3DAWBuDoQub0ETCjoaFnYHvQUMoSH+zt9lPbSccJ1nnBPuLWPsmotOA /k0d2Zn2rxR0EjRnm2WeV3zvsou++g0wqdCEKac04FlwP+TKFur6yDYwXLb2 X-Received: by 2002:a05:6000:4024:b0:439:872f:b489 with SMTP id ffacd0b85a97d-4399429cbc5mr6709958f8f.10.1772098826324; Thu, 26 Feb 2026 01:40:26 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <69792b5c.37509.d3cf068@gitrepo.freebsd.org> In-Reply-To: <69792b5c.37509.d3cf068@gitrepo.freebsd.org> From: Wolfram Schneider Date: Thu, 26 Feb 2026 10:40:15 +0100 X-Gm-Features: AaiRm51k0yigBkfKTrWnaNNw2YC6LFiHhd2CgKFpibiXnWhTfJCjPElHjsbQ2uo Message-ID: Subject: Re: git: 8a9508563542 - main - tests/kern: make ssl_sendfile:truncate and ssl_sendfile:grow less flaky To: Gleb Smirnoff Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [0.60 / 15.00]; ARC_ALLOW(-1.00)[google.com:s=arc-20240605:i=1]; NEURAL_SPAM_LONG(0.98)[0.980]; NEURAL_SPAM_MEDIUM(0.83)[0.827]; NEURAL_HAM_SHORT(-0.30)[-0.304]; FORGED_SENDER(0.30)[wosch@freebsd.org,wschnr@googlemail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FREEMAIL_ENVFROM(0.00)[googlemail.com]; RCVD_COUNT_ONE(0.00)[1]; MISSING_XM_UA(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FROM_NEQ_ENVFROM(0.00)[wosch@freebsd.org,wschnr@googlemail.com]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.46:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.46:from] X-Rspamd-Queue-Id: 4fM5zc1jSrz40Zf X-Spamd-Bar: / On Tue, 27 Jan 2026 at 22:18, Gleb Smirnoff wrote: > > The branch main has been updated by glebius: > > URL: https://cgit.FreeBSD.org/src/commit/?id=8a9508563542d709b1a42a065e6e99e004a8b3fe > > commit 8a9508563542d709b1a42a065e6e99e004a8b3fe > Author: Gleb Smirnoff > AuthorDate: 2026-01-27 21:13:11 +0000 > Commit: Gleb Smirnoff > CommitDate: 2026-01-27 21:17:08 +0000 > > tests/kern: make ssl_sendfile:truncate and ssl_sendfile:grow less flaky > > First problem is a trivial race that the client thread doesn't see updated > c.sbytes. Second problem applies only to the truncate test. On a machine > with huge default buffer sizes, there is a chance that sendfile(2) will > fill both buffers with amount of data that is larger than the size we plan > to truncate. To minimise chances for this scenario, increase file size > and truncate it less aggressively, also try to decrease buffer sizes. > --- > tests/sys/kern/ssl_sendfile.c | 18 ++++++++++++++++-- > 1 file changed, 16 insertions(+), 2 deletions(-) This test fails if I run `make buildworld' with MK_OPENSSL=no IMHO this test needs to be disabled in tests/sys/kern/Makefile for MK_OPENSSL=no -Wolfram --- ssl_sendfile --- /home/wosch/projects/freebsd-src/tests/sys/kern/ssl_sendfile.c:38:10: fatal error: 'openssl/ssl.h' file not found 38 | #include | ^~~~~~~~~~~~~~~ 1 error generated. *** [ssl_sendfile.pieo] Error code 1 make[6]: stopped making "all" in /home/wosch/projects/freebsd-src/tests/sys/kern make[6]: 1 error -- Wolfram Schneider https://wolfram.schneider.org From nobody Thu Feb 26 12:35:25 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fM9sT5y23z6TY9y for ; Thu, 26 Feb 2026 12:35:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fM9sT5Hd5z4J8p for ; Thu, 26 Feb 2026 12:35:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772109325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kBoaMqzp81CuGFhbrAr1nXs7UZ69Y8+g4sWPezuBQ5o=; b=gCGkHXutwnFFZy+Ina3PQTN9m0KCe7VCQZkFSVKqfYre3nj2dTNxwj2nq4FmVWIgvxce09 qnqGBVdYjjloulZFyIzutwpmenwN7JSLedy2IiE5aOpKnHH9mIbePa8XXzvo4KNJBa/YIf 6a0FBHs0mlKciqGrZNrQyGBWVqbtqspW/BSoVyMqjMlKW4ktNjPslFeaEyRf42TyDX9YAg ubjR3dFBV0SekwDJGAjl9RMHvk37HZb74YqDp8sbbaECDGCKhyHGbMYc3urwHJ0s+Annc8 tslPwsBtxtrmCur1ph5dAwYBt+GGGWVQmrE4blIUWzIgzu1xhJDm3MERk9W25Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772109325; a=rsa-sha256; cv=none; b=xGizXHstEoeawb5kvfvAMAiuTmWoPbCVOkKp3EMP1qKAS/afhPwfcTbOeXEB2VD8oWPf1g uN/NirQ6yRy0bnD/HQUqT0JiGPHdbscEBfONwUpDvFpAaPe+uKVQ/ri9ckDhu8JP19BndP l5nnqBNy484Lloios7IhkJzd0H3/3SuyM8yrLs3pPCBv5pPmz3djoq2KFcULVSLr4O7390 PHpJ8Gl5ItdfZw26dqS1GWRYtldWv1DEVpq1FS8VsXPL1+PM3fSiT0uIHbnR4GSDsSBHsU tCEqrRzL6aK8SidWyk3d3iyMZZIKVCKameapFcNZ7aXOdiisVReeFVr9U9SCPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772109325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kBoaMqzp81CuGFhbrAr1nXs7UZ69Y8+g4sWPezuBQ5o=; b=W8fvS0EN5Olu8gLg/iVnK7hLLoyAIoKC9D7O0O+sm5uGXLuzUyk01eCN1gSyVbQNLgsArL CHdlYT7wvvKedTsbr3Wq/wDthzMy8Khw5X4oTzgDrVOkwYbrYEdGNib9gbbM5wA9MmEXvT x8wFzbZpL1pZMseU6xDgetMqcmrWSC15DS5hRYFqes3rtfFxQPOQWPUidSomvBmQobKxj8 tqIkopy2BgBf3lYTovDCwG4euio6jR0Woyxho1lVnAAiID0BpgxDZXfcJdnQlhJsmTj2Py YSY7FMCnljxQfa0Fnwg7ASFHXtsCVQSN4l7tyOSKcyszDqBQegEcNkOiWIsPUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fM9sT4Z49zYPB for ; Thu, 26 Feb 2026 12:35:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 19718 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 12:35:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pouria Mousavizadeh Tehrani Subject: git: 2f7cfeebcc43 - main - netstat(1): Fix expire column in -r flag using netlink List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 2f7cfeebcc4356d3bb85e953900ba5d3f75831ff Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 12:35:25 +0000 Message-Id: <69a03e0d.19718.7418763e@gitrepo.freebsd.org> The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=2f7cfeebcc4356d3bb85e953900ba5d3f75831ff commit 2f7cfeebcc4356d3bb85e953900ba5d3f75831ff Author: Pouria Mousavizadeh Tehrani AuthorDate: 2026-02-22 16:35:23 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-02-26 09:48:09 +0000 netstat(1): Fix expire column in -r flag using netlink Reviewed by: glebius MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D55440 --- usr.bin/netstat/route_netlink.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.bin/netstat/route_netlink.c b/usr.bin/netstat/route_netlink.c index e7b2a1964602..2c4b7a5c6b00 100644 --- a/usr.bin/netstat/route_netlink.c +++ b/usr.bin/netstat/route_netlink.c @@ -218,8 +218,8 @@ p_path(struct snl_parsed_route *rt, bool is_mpath) else xo_emit("{t:interface-name/%*.*s}", wid.iface, wid.iface, prettyname); - if (rt->rta_expires > 0) { - xo_emit(" {:expire-time/%*u}", wid.expire, rt->rta_expires); + if (rt->rta_expire > 0) { + xo_emit(" {:expire-time/%*u}", wid.expire, rt->rta_expire); } } @@ -244,6 +244,7 @@ p_rtentry_netlink(struct snl_state *ss, const char *name, struct nlmsghdr *hdr) rt.rtax_weight = nhop->rtnh_weight; rt.rta_rtflags = nhop->rta_rtflags ? nhop->rta_rtflags : orig_rtflags; rt.rtax_mtu = nhop->rtax_mtu ? nhop->rtax_mtu : orig_mtu; + rt.rta_expire = nhop->rta_expire; xo_open_instance(name); p_path(&rt, true); From nobody Thu Feb 26 12:35:26 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fM9sW1JBSz6TYLy for ; Thu, 26 Feb 2026 12:35:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fM9sV67XYz4Hp3 for ; Thu, 26 Feb 2026 12:35:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772109326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XoimmNYlzNV/o0kUX/vqzdLWAdxqpsX1WZV4I9hTLGg=; b=J5NC3y7CFEd/y5BlqhFfVfJ4lRWwxztMSR9oGIo4I+TeLgupTXjZuEiMK5LMvkw5Z5ZXE4 g9G9zB8Ob8yI8kmUYyccyUALfv1DnzR9963vy1xEXjJYUldyQ709ufd9BajCp5nTrZTCJx BeIGEweq8avegqu0CCp/Z8hGRB6oqhPTwmzeQWgjcvffdwyJ6SJCChgoTnnxGn29c6/rLw 6mXgMvl6joXy0pGVNgwewwl3AKK/ogWj1hZkvGsuW4agWJzF08K5zP3fKCdo108qQeYNwb pdi4emaVLkE3OJbItmi/Pi/hAd8PYo3F1C8riRvVfLWME2BIoqmqxB3ocKlOMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772109326; a=rsa-sha256; cv=none; b=KQPfOYENcx9THas17ejyznAkSCYbcvcGiGs1epNV7qpi37b+C4G4eG/snr2a841+GVwbZ5 3m/wq+0gXZQV2Fe0FC1MN9HsiWhVJsRtDQZ3ZqP6EOjNCyH7IvVNU7hZAhTA+cqVSC3+3s fcup75VQK/dlJUPjuHLdZ/6lsQY4DrLzTE5z6l8oYHinIIyyZ7+lcltLrhcuRKIYjDFfgJ 76dgXbnxmLYCDjmwN1kQuwquG7uRKOY0zKlrHb+AX1KKOLcn3KusBFTxHlzfmV1cVLyd+M YzRoytbo5lj9VxhK0Bk78/cPhpoV4j/vlNKAw1PaU4hNBgSiDcRZ4ugDED67jA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772109326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XoimmNYlzNV/o0kUX/vqzdLWAdxqpsX1WZV4I9hTLGg=; b=cZJmY34rwbKAvmHLezxnIiXbozYdThGb3z2eOkaczSaYHzSzGE1upGUkiKvWuoZaxN02z9 5L0+4rQjkns8B+jlcqB8V29XlLO7JzbfFmf/gDGDvEDC/PtvHP6OyVmZF4wyZy9tQlthld a9q4BvKu1p3CzKkfnmTKnLVlC35IRjBoqPWogZqsMH/rmqKbLqCdIvPJQ64Sg2r1vvpiAG BVAS9ALVHMgww/EQ1nxdg4llbCCRTAGv9hZaL48LR22VmScc8Dqa1AKcNW87aFOpffZLHY X6CadDhL0v+KHXscusi7SAc+Hg2GTwRqU5pPypIpowDOTxwGzdLmSQx/OEHrNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fM9sV5S4czYP6 for ; Thu, 26 Feb 2026 12:35:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3eed8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 12:35:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pouria Mousavizadeh Tehrani Subject: git: 8230cf1aa18d - main - route(8): Fix -expire argument when using netlink List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 8230cf1aa18d9215ee17fec743fc7c7c8fa2da13 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 12:35:26 +0000 Message-Id: <69a03e0e.3eed8.1a2b1f6d@gitrepo.freebsd.org> The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=8230cf1aa18d9215ee17fec743fc7c7c8fa2da13 commit 8230cf1aa18d9215ee17fec743fc7c7c8fa2da13 Author: Pouria Mousavizadeh Tehrani AuthorDate: 2026-02-22 18:41:31 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-02-26 09:49:01 +0000 route(8): Fix -expire argument when using netlink Also fixes nexthop expire value on route get using netlink. Reviewed by: glebius MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D55444 --- sbin/route/route_netlink.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sbin/route/route_netlink.c b/sbin/route/route_netlink.c index ba22a2ec1e22..5dde7501d6b4 100644 --- a/sbin/route/route_netlink.c +++ b/sbin/route/route_netlink.c @@ -263,6 +263,9 @@ rtmsg_nl_int(struct nl_helper *h, int cmd, int rtm_flags, int fib, int rtm_addrs snl_end_attr_nested(&nw, off); } + if (rt_metrics->rmx_expire > 0) + snl_add_msg_attr_u32(&nw, NL_RTA_EXPIRES, rt_metrics->rmx_expire); + if (rt_metrics->rmx_weight > 0) snl_add_msg_attr_u32(&nw, NL_RTA_WEIGHT, rt_metrics->rmx_weight); @@ -343,7 +346,6 @@ static void print_getmsg(struct nl_helper *h, struct nlmsghdr *hdr, struct sockaddr *dst) { struct snl_state *ss = &h->ss_cmd; - struct timespec ts; struct snl_parsed_route r = { .rtax_weight = RT_DEFAULT_WEIGHT }; if (!snl_parse_nlmsg(ss, hdr, &snl_rtm_route_parser, &r)) @@ -385,11 +387,7 @@ print_getmsg(struct nl_helper *h, struct nlmsghdr *hdr, struct sockaddr *dst) printf("%8lu ", 0UL); printf("%8lu ", rmx.rmx_mtu); printf("%8lu ", rmx.rmx_weight); - if (rmx.rmx_expire > 0) - clock_gettime(CLOCK_REALTIME_FAST, &ts); - else - ts.tv_sec = 0; - printf("%8ld \n", (long)(rmx.rmx_expire - ts.tv_sec)); + printf("%8ld \n", rmx.rmx_expire); } static void From nobody Thu Feb 26 12:35:27 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fM9sX11sSz6TYJd for ; Thu, 26 Feb 2026 12:35:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fM9sX02Djz4JPb for ; Thu, 26 Feb 2026 12:35:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772109328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EhavhlUZ153lDHYQcVPbFpAQfxg4VfPz/3aWT54PRjw=; b=mBKvDL0AHpd+wZs6WMPGTPUaMfAaaKUN4hlBGkvGuJAedNNEjd8meGjVjWhCp0PBv9Zmq0 riGs1rscPsPp+pfTKpobC7EVmA+6BzjZIJjrCCkWL3D4u2h2wsI28becnmm1djzenm9jZh iVGT+EfbXnLWye45w+MS24BX4qNyFzHM4tzwCmxJbV/uMkUBjyBFaEuzdQlCcKqrWgXaai U4LBEjacDc62cUzM91zouEPsrGOoLBW/DAJlHINru2DPCWlInqiP5nPSQadZQN2iRqhCu8 cUKnd0r+q55iDUKz2oUQWGjiVV/VXfSAs86iMS6RwsVuLLuhoFUs1Lds2xp3iQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772109328; a=rsa-sha256; cv=none; b=NmF8mBVqD7xiIWT0ZC6zbRTJU70UbfPtfovJBphmfYdyftFz85WWEMl9psOmRYtjY44OoG 6clQsZFPTGfBI8bMWW+llBDqPkKwpgbosQ5AftP9DPXadK0nKGGtlMZ/26lXQ4w/0vXfIT RUFbaqBq7Z6CgbRGbJWzpnttIpRyDI3jpJZXL8frmrHpU0j8Ts8GzFT0mSR1Szhs+VKwky Z28vVv0+BhwbnAtWMyUZf5E4chdsmi8sWc4xBukJazH1xCHSI8DPwSwftVqTQYsNXW1Dd5 3T+2IFu+DzalUx1NFZmwZNZcLRrOa3dKk1M+qa9aAGOv3byVpSyGc+I6XthLgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772109328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EhavhlUZ153lDHYQcVPbFpAQfxg4VfPz/3aWT54PRjw=; b=odX+9u/LnJo6EtJzOlBzAlh7our6gS+hYhE/SEfExgMSs0LasUfpRYqTxUdjQQrgOPvmy3 bnGVYqqaHh7qukLk85s9QWJKViu8D9X/c/xsrn/IVbUj18kwzTxzrKuv/h/r/7hvIBEMqs gKA1RpucJ8eyLknqmMwt4XHzBOX5PNBbL4DagF/Ki1Cf5l4xnekN7AyAKSCKS2HFQjTX1F ukR5XBe+H6dJK9gePIlYOCMqF5jw/sDFETdWb9YAsSp/o/iFBhhNvXz6n0VZCVBcKJbej0 GXl3u44dFozp8PI3YChfa11JqC6GOQI/Xt7wTR8RtAHqJWUe7gjHCLlyl0fIWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fM9sW6KD9zYP8 for ; Thu, 26 Feb 2026 12:35:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f3fe by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 12:35:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pouria Mousavizadeh Tehrani Subject: git: b5366f8e138e - main - route(8): show expire time of each nexthop in monitor List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: b5366f8e138e223d85d7c9b71f0a0384f5d55f29 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 12:35:27 +0000 Message-Id: <69a03e0f.3f3fe.5651a349@gitrepo.freebsd.org> The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=b5366f8e138e223d85d7c9b71f0a0384f5d55f29 commit b5366f8e138e223d85d7c9b71f0a0384f5d55f29 Author: Pouria Mousavizadeh Tehrani AuthorDate: 2026-02-25 16:45:36 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-02-26 09:49:09 +0000 route(8): show expire time of each nexthop in monitor Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D55514 --- sbin/route/route_netlink.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbin/route/route_netlink.c b/sbin/route/route_netlink.c index 5dde7501d6b4..e3ddbf81e62c 100644 --- a/sbin/route/route_netlink.c +++ b/sbin/route/route_netlink.c @@ -488,6 +488,8 @@ print_nlmsg_route_nhop(struct nl_helper *h, struct snl_parsed_route *r, printf("iface %s ", link.ifla_ifname); if (nh->rtax_mtu != 0) printf("mtu %d ", nh->rtax_mtu); + if (nh->rta_expire > 0) + printf("expire %u ", nh->rta_expire); } if (first) { From nobody Thu Feb 26 12:35:24 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fM9sZ2MS3z6TYB8 for ; Thu, 26 Feb 2026 12:35:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fM9sY5tZcz4JBL for ; Thu, 26 Feb 2026 12:35:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772109329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ns1eWDPB5MiI7+ql/xHIVjT0uyxvAWl3YxUCErToqOs=; b=Imtvv1ucriMo9Fnvg8Fq+rH+o0N8pjhVAUwDkMfXe+2OJASwRxbQF/dMes57tK+OM8yem1 pBDrAaxoKMKCl3Ic5PTprr4+GXHTQZ2IPG0NGB875b37A0EmTAo6KOdsL+YuqptTUHvnML b68KjHMfDieQDjGxywmqzpUijAXJ6/09iaZy1v4CuoPcwhWzZbleEI/TNxij5jY/NxFUko DXjldc6W/YwIApr3LVoxhB6m2KE/9ODoGepjRqm+wB9iHOBVEWCrbGP/IkpDcg9UEPEwB3 IxQxxir2VI8hGlKJ6a8Wo7/h5AoVRbnPf8Oc/d67TU50Y9aMJPUqvdglNo1/oA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772109329; a=rsa-sha256; cv=none; b=Mh0EVCWChf/uqrqRAoJTvnfYgk8EFYJ05Mmzz7HkYMOULvsVg4aXScmks7sAXCg+9BGRMn 62361upNgtYNRsSFruKiEYsZSl3BBC2MON6qylnsQkPu/xOWK5WY46lc5HvYWReOVHRboT Ud0yCMb3IfQzN1u5tQYjPFrNIj6IF5ZcujjbdYLKgDsj9K/SVTXIINjVwOdnhcNZWeCTjW YJo7XDf/wbCuM+cYQ8lH9muMutTiH0vewIUKBLzrY6pnrp83YFVtnKLT7vGvN5rW4mtaTl 6W1C7x4G26UccUYW3Kr80qC6ZsR3gRgR3X/OUvmfGLi4TIVidu18cokjp9Pihw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772109329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ns1eWDPB5MiI7+ql/xHIVjT0uyxvAWl3YxUCErToqOs=; b=d8eNn6r+tMmQ4Zc9UyA/Ru6iajAiAPPsTJd9Xhmq+QSsMyt3ygAbDjhLz/Rr4df1rf/J9m fTy/m7vko3QajGn8ueTOVbh3HUdYKnbcYhNIEQfIWsr2NyCxYx+TZYALcPc6ImpCIS7YTU 5cxU4ySTEZpzoeugwdkaLSw40jEfeKFIPJKkA0QggHjgL/DVsK4PD+d5GLb+bfDtdH4TDP pWZ7cD1SI1TlI9dNN0LLewapu3VaqNFSJe9K3U2C+i8Ty2Vxe4Evl3Xtzll5bCjeoXspBA IIqUhwJVUdFgnJtrsGuW4heq/Hun/txnySqawmnS4GVcEA5GddyP1WWLzhvHIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fM9sY5RvqzY4b for ; Thu, 26 Feb 2026 12:35:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 19468 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 12:35:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pouria Mousavizadeh Tehrani Subject: git: ff6d1faa65a1 - main - rtnetlink: Add support for nexthop expiration in new/get route List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: ff6d1faa65a1a77d04746b43023feb457cfa27b8 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 12:35:24 +0000 Message-Id: <69a03e0c.19468.6b3899bb@gitrepo.freebsd.org> The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=ff6d1faa65a1a77d04746b43023feb457cfa27b8 commit ff6d1faa65a1a77d04746b43023feb457cfa27b8 Author: Pouria Mousavizadeh Tehrani AuthorDate: 2026-02-22 17:46:12 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-02-26 09:37:14 +0000 rtnetlink: Add support for nexthop expiration in new/get route Before this change, netlink only shows nexthop expire value if route is not multipath. Now it can set expire time during route creation. Also, show expire time of multipath nexthops. Reviewed by: glebius MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D55442 --- sys/netlink/netlink_snl_route_parsers.h | 2 ++ sys/netlink/route/rt.c | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/sys/netlink/netlink_snl_route_parsers.h b/sys/netlink/netlink_snl_route_parsers.h index 6b7a8188180d..70a12ad3ad74 100644 --- a/sys/netlink/netlink_snl_route_parsers.h +++ b/sys/netlink/netlink_snl_route_parsers.h @@ -53,6 +53,7 @@ struct rta_mpath_nh { uint8_t rtnh_weight; uint32_t rtax_mtu; uint32_t rta_rtflags; + uint32_t rta_expire; }; #define _IN(_field) offsetof(struct rtnexthop, _field) @@ -67,6 +68,7 @@ static const struct snl_attr_parser _nla_p_mp_nh[] = { { .type = NL_RTA_METRICS, .arg = &_metrics_mp_nh_parser, .cb = snl_attr_get_nested }, { .type = NL_RTA_RTFLAGS, .off = _OUT(rta_rtflags), .cb = snl_attr_get_uint32 }, { .type = NL_RTA_VIA, .off = _OUT(gw), .cb = snl_attr_get_ipvia }, + { .type = NL_RTA_EXPIRES, .off = _OUT(rta_expire), .cb = snl_attr_get_uint32 }, }; static const struct snl_field_parser _fp_p_mp_nh[] = { diff --git a/sys/netlink/route/rt.c b/sys/netlink/route/rt.c index dcd19b43105c..4d7f676d2aec 100644 --- a/sys/netlink/route/rt.c +++ b/sys/netlink/route/rt.c @@ -179,7 +179,7 @@ static void dump_rc_nhg(struct nl_writer *nw, const struct nhgrp_object *nhg, struct rtmsg *rtm) { uint32_t uidx = nhgrp_get_uidx(nhg); - uint32_t num_nhops; + uint32_t num_nhops, nh_expire; const struct weightened_nhop *wn = nhgrp_get_nhops(nhg, &num_nhops); uint32_t base_rtflags = nhop_get_rtflags(wn[0].nh); @@ -206,6 +206,9 @@ dump_rc_nhg(struct nl_writer *nw, const struct nhgrp_object *nhg, struct rtmsg * nlattr_add_u32(nw, NL_RTA_RTFLAGS, rtflags); if (rtflags & RTF_FIXEDMTU) dump_rc_nhop_mtu(nw, wn[i].nh); + nh_expire = nhop_get_expire(wn[i].nh); + if (nh_expire > 0) + nlattr_add_u32(nw, NL_RTA_EXPIRES, nh_expire - time_uptime); rtnh = nlattr_restore_offset(nw, nh_off, struct rtnexthop); /* * nlattr_add() allocates 4-byte aligned storage, no need to aligh @@ -487,6 +490,7 @@ struct nl_parsed_route { uint32_t rta_rtflags; uint32_t rta_nh_id; uint32_t rta_weight; + uint32_t rta_expire; uint32_t rtax_mtu; uint8_t rtm_table; uint8_t rtm_family; @@ -513,6 +517,7 @@ static const struct nlattr_parser nla_p_rtmsg[] = { { .type = NL_RTA_RTFLAGS, .off = _OUT(rta_rtflags), .cb = nlattr_get_uint32 }, { .type = NL_RTA_TABLE, .off = _OUT(rta_table), .cb = nlattr_get_uint32 }, { .type = NL_RTA_VIA, .off = _OUT(rta_gw), .cb = nlattr_get_ipvia }, + { .type = NL_RTA_EXPIRES, .off = _OUT(rta_expire), .cb = nlattr_get_uint32 }, { .type = NL_RTA_NH_ID, .off = _OUT(rta_nh_id), .cb = nlattr_get_uint32 }, }; @@ -851,6 +856,7 @@ create_nexthop_from_attrs(struct nl_parsed_route *attrs, { struct nhop_object *nh = NULL; int error = 0; + uint32_t nh_expire = 0; if (attrs->rta_multipath != NULL) { #ifdef ROUTE_MPATH @@ -907,6 +913,10 @@ create_nexthop_from_attrs(struct nl_parsed_route *attrs, nhop_set_transmit_ifp(nh, attrs->rta_oif); if (attrs->rtax_mtu != 0) nhop_set_mtu(nh, attrs->rtax_mtu, true); + if (attrs->rta_expire > 0) { + nh_expire = attrs->rta_expire - time_second + time_uptime; + nhop_set_expire(nh, nh_expire); + } if (attrs->rta_rtflags & RTF_BROADCAST) nhop_set_broadcast(nh, true); if (attrs->rtm_protocol > RTPROT_STATIC) From nobody Thu Feb 26 13:47:36 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMCSp1nW2z6TgwV; Thu, 26 Feb 2026 13:47:38 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMCSp0zb9z4QkD; Thu, 26 Feb 2026 13:47:38 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772113658; h=from:from:reply-to:subject:subject: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=iSMK2nQjmgLp7CgX9vY2KBeZ2NPFwhNNML+iC0TuCEQ=; b=WJWkjr4b1QZzq/JW6VjrXbOSx4JvAaLnutNAwNl6fZIg8iELd6AXO6RlJpJJQgZjKTfJAM m7oezWhRDf3aS9kN5IXrZirFKW3TzwNer8e92w8jp9um8VIsDJy3BK6NNY8ZqSdKo+8rjm Uv+1bMAWf/qGl9lnUWReX85Aajm7+za13NPmBbHdNQ+YXunK1+4mzi0knATG7+r5ArRwdf rKNka5OyGn5wAkz1HDtAbMIj1qFOMNnkXnsOrylbIPadviAuvkNwx/7C0vt/B3Jh8gr8KL 2nf/HQPmiHSpTCiEw8ujzhMls/zserX7BH8ViSK0DuHHoNpmF/sS+GxP9KNE7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772113658; a=rsa-sha256; cv=none; b=rR42l8Y6z9pnui3sQSpRRyU59WoWBWyR6cgspdT1/JXogrgt3xWfzFuq7k/201tBmGrLFt dx+di2bEondpgwHLjeo2Bbvg244LOSMzqNcvL/fySQ4ojIbms2BUDG5ucqHjB6fhxZ01uz 6bQc+O/K94qbpauB530lg3DTpPgyga50+7IfdXGzkkgg4vGDwDqktoghdeNJ+d09qTfGQL izp1d9iGWCLlmWYcfWdws3Jk3DhAX2rZHTlIXOdg97on2ePvcq42hcicmYuB+2809ezsZY jHHzmyhZbnv9MD52C5EvF/0ixBoBxIiQ+Rn4b3FD2BdDYA8yQdKXkisQO785Ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772113658; h=from:from:reply-to:subject:subject: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=iSMK2nQjmgLp7CgX9vY2KBeZ2NPFwhNNML+iC0TuCEQ=; b=jx+im9SmbWFVss/gJRDl9WY2mmJAHARRAPKOnlLiVm7mOLsGQj2Hc/Jin6DlmiaOPnuPUc wijtT/3hzcq1o8oYy44+n+Si+z89mcEISnDvWV1WuE9tXZBcxl5kpg9WA+tXWBuxY2QJxw 9f9ZiyKCMZhSPT4erFE/fRMkA/7hrPEoh6tTuJ/p1nZFCiEhKqoaPmXhp6kPuQLu5Fl3bi erB2qnbdFaGgD+tynxQvPg7SqiUXLsVro6gbBlnusavGqsRNzMjMo54r0IcHoNx+4HI/4c Px3/YWy++U9iVYxz6hhWp2f1kbe77s5RdOoMYIKaKdDLdA/kc3hznEzvBFcIIQ== Received: from ltc.des.dev (2a01cb0585090500922e16fffef1acef.ipv6.abo.wanadoo.fr [IPv6:2a01:cb05:8509:500:922e:16ff:fef1:acef]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fMCSn6TVdzsxh; Thu, 26 Feb 2026 13:47:37 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id B9B9FF7348; Thu, 26 Feb 2026 14:47:36 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Enji Cooper Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: f224591746bd - main - Add ASMC_DEBUG make option In-Reply-To: <695c68c6.3ff5d.593fc2c7@gitrepo.freebsd.org> (Enji Cooper's message of "Tue, 06 Jan 2026 01:43:34 +0000") References: <695c68c6.3ff5d.593fc2c7@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Thu, 26 Feb 2026 14:47:36 +0100 Message-ID: <86342nr4zr.fsf@ltc.des.dev> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Enji Cooper writes: > commit f224591746bdaf14ad5f63de4738a3146cc2f55f > Author: Enji Cooper > AuthorDate: 2026-01-04 08:27:57 +0000 > Commit: Enji Cooper > CommitDate: 2026-01-06 01:43:04 +0000 > > Add ASMC_DEBUG make option >=20=20=20=20=20 > This allows folks to enable debug statements in asmc(4) using kernel > configs via the `options ASMC_DEBUG` directive. >=20=20=20=20=20 > While here, remove a duplicate `device vt_efifb` directive in `NOTES` > as it's already handled in the `GENERIC` config >=20=20=20=20=20 > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D54511 > --- > sys/amd64/conf/NOTES | 7 ++++--- > sys/conf/options.amd64 | 3 +++ > sys/dev/asmc/asmc.c | 20 +++++++++++--------- > sys/modules/asmc/Makefile | 2 +- > 4 files changed, 19 insertions(+), 13 deletions(-) This added asmc to amd64 NOTES even though it's already in x86 NOTES. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Thu Feb 26 13:48:11 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMCTV37DLz6Th6x; Thu, 26 Feb 2026 13:48:14 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMCTV2f6Bz3C3V; Thu, 26 Feb 2026 13:48:14 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772113694; h=from:from:reply-to:subject:subject: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=4jKqF9rHYNJaqDlul3FDuid0ar/ts7yTKXPy5csCVAw=; b=sngsqV0SctITELA/el61MmJ30XUocfLGfBECtZegMEtwFMKrbrhicnWbGJs33QWoCxCi6v ejzgbDFNJ0u6npEhOWWq/RovsU+pzS1ZKFPyuDIE7DHht792ftm6OLw5NlfY+Okvmh7fDf OUqOy9lpzHpss8xIif17LQaAIxWwZOB/Cdkr+7ii1ngbXcvIFJ9WKY69vGmdDK3VOiEFdJ 52ZQ/CTabXTJz4S3k/7FcpIcp+XXAiew9SJS8+HB8WRmJWxmAYn4SbkMZHWiNXfZOR1GcM Jyz9oRMFTHoFNNHrxgNOO8xeoosboTWLHfWytzAPUwFvnxW4gWAwnOOVbq76PQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772113694; a=rsa-sha256; cv=none; b=DgXzR17TL4clKX2YBb7d60H14Zz/GkzOY82Z9wQNFyB5QEY547MjTNtkSxruMLsKSCAqA7 +Eq9DIcu+IkkzkNQp1m/QchOcKhjQCSonZ0FRHBNECgIs1Fq1T2pXirxN6+9ZUk4gIP7IO wxdrSLVLtrSUquMMW/+4KZUXsMIlDB1gFtMRKEU6c5OlmmPi26iRH5M90guDhjGqAm152W rPLrgZ42Ie0hLxklatyzChMURlL6MORZe0gCQo7FJ5DHEzcCamKp/J2iLVx8g0dD5IjPBv RH/D7Ax03N7gtNsB25FZdWrkaRuRYO8tA+4R2IyGh/6tgOLILMuA1odHvdr4ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772113694; h=from:from:reply-to:subject:subject: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=4jKqF9rHYNJaqDlul3FDuid0ar/ts7yTKXPy5csCVAw=; b=eZRpKbmu1BFkE/doy3zeHv7+7bvO7d178gs3Xc0ttxA+UqmI/kg6b+hFIw7jGJWVY44vPj xvSg9PmCtz1YK2YHF5sunEphjuR1EQ4IcoS8UqR6yjD135aTzZbf2vtEutR2lpqbvYpmi0 mssqtAoGt3m57lfYBhx9NqWAzZPvEYwIOa9BS/MWNvplFNLV3zz7uaplTBd/FDtsD+6rjL Gq7r9dAlMP15B9A1URrzuitpibLKeFLtUAyg2GbuhLRtFsI1GYZzc6Z5K7ixS13PSrr+F2 CYpsPWIYVoBw21e4q568ArzafisruiLc/2dxFHCSWqvKkU6+VE+M5XR+ZFtXAQ== Received: from ltc.des.dev (lfbn-nan-1-698-103.w86-236.abo.wanadoo.fr [86.236.35.103]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fMCTV1Vf2ztgv; Thu, 26 Feb 2026 13:48:14 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id E5EEF110909; Thu, 26 Feb 2026 14:48:11 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Olivier Certner Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 8342d9f7b5f1 - main - asmc(4): Stop building it on i386, as it supports only 64-bit chipsets In-Reply-To: <6964e659.38c48.63bb6fee@gitrepo.freebsd.org> (Olivier Certner's message of "Mon, 12 Jan 2026 12:17:29 +0000") References: <6964e659.38c48.63bb6fee@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Thu, 26 Feb 2026 14:48:11 +0100 Message-ID: <86v7fjpqec.fsf@ltc.des.dev> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Olivier Certner writes: > commit 8342d9f7b5f13d0623861cb8b88caf10a15571f6 > Author: Olivier Certner > AuthorDate: 2026-01-12 09:37:24 +0000 > Commit: Olivier Certner > CommitDate: 2026-01-12 12:16:38 +0000 > > asmc(4): Stop building it on i386, as it supports only 64-bit chipsets >=20=20=20=20=20 > Reported by: ngie > Fixes: fde9fe18219f ("i386: Fix kernel compilation after int= roduction of ASMC_DEBUG option") > Sponsored by: The FreeBSD Foundation > --- > sys/conf/files.amd64 | 1 + > sys/conf/files.x86 | 1 - > sys/conf/options.i386 | 3 --- > sys/modules/Makefile | 2 +- > 4 files changed, 2 insertions(+), 5 deletions(-) This broke i386 NOTES. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Thu Feb 26 14:33:55 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMDVC4Dyfz6SYHl for ; Thu, 26 Feb 2026 14:33:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMDVC18wwz3GwL for ; Thu, 26 Feb 2026 14:33:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772116435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T3fZehh2H6pfo4QURNAVP2HoypvLAUASh2+xyvLQWLo=; b=DypCZFEmhCEfB7f26teMKk8QplfxYoTJUM56p5cuyrkkNR5fBm1EbAExKEZnIEhqhY9uzO +F/TvWaEWakZmi5vw7g3dVzEgGMhDMBqK2PyLzLKmHM4LCJE5O8Z0aUY5Ct9eu1y8Y4Hvu /IVo5MKhj4vcpHfVffxJ0OSZiApK005vpcQjUvjOkWr8svxQcD/92RSDW0VRhiRaPabCqq 1k5AmJpRlMOmmpMLZ0YK9+9qVtxWGnh8LfCAYZNg4w+JVgKYNAXQgrLLJsHc6regcNVEEC SDWTGG4fN41rYc4R7h/eLT/vqZRz5xA0XnBCm77WwznGbHcNE0D6OiGPKcDjng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772116435; a=rsa-sha256; cv=none; b=FWaU5q1TwdRnG5+WvI8mfiKdje5Mr0LzLAwFua2L5YUXDQGqAjtR44v8T7NiOfhdAaswXh w0N5DSFn92Nk8GwnwrJsX8kyiBcQvIataa3wQRJ+ZFq3T5sQIiJcWNNG4M4QQ+BgS7reK+ jsO/1aPJ7ZXs3egwPnYRXSKJ54q/U0uVpY7O1y82Uu+8DKIoycoJayyaniPjm7xjJ2uV4Q 1JGHviTicA5zNsiBZtG7ljAWsU857LLWY2Z8X2xc0hullpZmpYDxO2Wcbh/Kp+YHp0186Z PsdgMi5c9OAhNrE2vkM/F1+arl2nH81OyZ2rLFaNLWhk8h6A4/ckWbbLc5unfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772116435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T3fZehh2H6pfo4QURNAVP2HoypvLAUASh2+xyvLQWLo=; b=a17lZ3KLV10/bMY46MV7pC+w0ntbm28oGJ2jbZtN5pvK5re+z7dl26PzSvpiZDx0o+Y5s3 aKoyxXV1KFL2ykul6Vx9Q2fAHSXSnM/JcHi1MUyRyUlVoY5EkTvwEC2DFR2bbXwheItdOn e5aZOnam2KW4IfzhnvpNYS+WCHwKDeDnBWf4WA059jc7mrcR5uB6JYWv+bDWm7dq0IEmiP U2ACCGcYq5HTVPXhUY4xiNG/TU7Q9BMUYx4ejMQNiqXHTyT3i7lWdQV7t32fyxcEiG662h 86rR3NSOnCRxcm4OrkUxI0ev81Qr15vNLQqq2fN8pRvRyPtoIpT0kpzA2ldZdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMDVC0lVvzbp6 for ; Thu, 26 Feb 2026 14:33:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26b40 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 14:33:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 59c399d38dd8 - stable/13 - qlnxe: Remove a pointless copy back from the link-layer address List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 59c399d38dd8c711a9b9ae2f6614eed80afdde63 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 14:33:55 +0000 Message-Id: <69a059d3.26b40.4eacf74f@gitrepo.freebsd.org> The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=59c399d38dd8c711a9b9ae2f6614eed80afdde63 commit 59c399d38dd8c711a9b9ae2f6614eed80afdde63 Author: Zhenlei Huang AuthorDate: 2026-02-06 17:52:53 +0000 Commit: Zhenlei Huang CommitDate: 2026-02-26 14:17:22 +0000 qlnxe: Remove a pointless copy back from the link-layer address On ifnet attaching, ether_ifattach() makes the link-layer address by shadow copying the ha->primary_mac. Well, the link-layer address will not be altered during attaching, thus it is pointless to copy it back. No functional change intended. Reviewed by: kbowling MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D54883 (cherry picked from commit 4ac3081b282800158df7abe93f307d76e1b5b808) (cherry picked from commit 23ffd1650cc431e762387d384ede99ae085bc130) (cherry picked from commit 7d7cee09b9a4ac5cbcbac79cb7ccfef5d6db1e0f) --- sys/dev/qlnx/qlnxe/qlnx_os.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index ad7843dd5596..c1179d83a679 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -2440,8 +2440,6 @@ qlnx_init_ifnet(device_t dev, qlnx_host_t *ha) ifmedia_set(&ha->media, (IFM_ETHER | IFM_AUTO)); ether_ifattach(ifp, ha->primary_mac); - bcopy(IF_LLADDR(ha->ifp), ha->primary_mac, ETHER_ADDR_LEN); - QL_DPRINT2(ha, "exit\n"); return; From nobody Thu Feb 26 14:33:53 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMDVB1J1lz6SYLV for ; Thu, 26 Feb 2026 14:33:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMDVB0dysz3H1k for ; Thu, 26 Feb 2026 14:33:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772116434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GHtR696sAihaDa8TyUrUi2KOoZJWu4YuQLkw0hRarcM=; b=MaV+Kf8NPaXfKRBoF9h9uSyQ7VGAVy5TX2lHnEPh2hQL5OpO8XqZCOYgHM9K3fHr2qmh5M X3DlN70XoUhV5DbqbFWwwSnWKI4kU1THQPrSELmUa3hHdjarvkxqUmqZmGi3a/SILpX2iO ctJgDAyCBKFYHQ8KzHlx7jcNbou75jXBl1x9qjjZoqVe5+shEjj1SNTecsDKJjg3lIvQV8 I3P7nRTWhOWUkAvmpT1w/Z7BcwgTK92a2h/3Sipcf8yu3Q9ccz7W/c+7N4yYP3bSswhhQv CAP+JYPCjkMG+7rKXl8sbxbINiuNj3AizyIU8fo4/wQWe50JMn7mHNrJNUZHwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772116434; a=rsa-sha256; cv=none; b=sdDoRW9LZp3FlXEwhtrJlITLlueSh5cjHn9zoXG55IQ0DLPhYV8a0T9B1+QkyV/y4UeEj4 uPoVff9s8X0hyACCp5jGCJImo+piuckg9rfp76VrG3q1gVFubK/y+EaV5dKNFA5nlvhYxO qMNY8MRoi132YEpiZ0HGbFHXqoc27XEjs4ezzEnIGlYC/bUJ01oLaY4leGzpwMVBYDXklG HVHGC5DM3tBAqvCfcYeNiZiavTELOGItRkmIUFpZIq7zMM3MVfD+wj56I0bBuTCH9o94mM RwdIOKr59IzTUd1Z+dnDVr1+aTsJaU4uiAzofO0aKFOK282dfML8PltVEo4rYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772116434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GHtR696sAihaDa8TyUrUi2KOoZJWu4YuQLkw0hRarcM=; b=Vlp8dhrobxLXxsfYLuwVH8saBDEsTPSe4tBwBYdqZuXejgNRk5K/A84jmUvtxHpMuCJEkC 32JNeme/O7VGi6zbYEKKwnmd4xBBRiuYNG3oDZssGyWDiHSGFvT4ElptGI+IcgWMS0ogIb 0S4RXnk3K22yOHFjj5AnCkPyFadQjzYQCGRIwwGA8xjrcj5ZElCLUBPTk4mLrELqdn9/LZ sHDWqVpGXHt3qz8k46DK/nyWxUFWRtORwu8/JpmchT0CkMvx9xijcp4u43JhWlra6eEsur HzeZb7hv6bXDiDcGcgTYTr/7P8zuSi6o4TCZiUQTCtzoy7UlJvT2gVYfM2Ajyg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMDVB05Z4zcQb for ; Thu, 26 Feb 2026 14:33:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 268c3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 14:33:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 8f1de03b50d0 - stable/13 - qlnxe: Advertise the IFCAP_HWSTATS capability List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8f1de03b50d00211597d7221055b44890fea7fd8 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 14:33:53 +0000 Message-Id: <69a059d1.268c3.614420ce@gitrepo.freebsd.org> The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=8f1de03b50d00211597d7221055b44890fea7fd8 commit 8f1de03b50d00211597d7221055b44890fea7fd8 Author: Zhenlei Huang AuthorDate: 2025-07-22 04:11:02 +0000 Commit: Zhenlei Huang CommitDate: 2026-02-26 14:17:22 +0000 qlnxe: Advertise the IFCAP_HWSTATS capability The hardware can count statistics and the driver has already retrieved them via qlnx_get_counter(). Advertise the IFCAP_HWSTATS capability to avoid the net stack from double counting IFCOUNTER_IBYTES. Reviewed by: kbowling MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D51451 (cherry picked from commit 386960a8805edc6d5ac6bb6215ad102a83314549) (cherry picked from commit bfbb93b6de6afc8aba8df90e2a28db1c93cbd143) --- sys/dev/qlnx/qlnxe/qlnx_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index 2586539617dd..ad7843dd5596 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -2389,7 +2389,6 @@ qlnx_init_ifnet(device_t dev, qlnx_host_t *ha) ifp->if_capabilities = IFCAP_HWCSUM; ifp->if_capabilities |= IFCAP_JUMBO_MTU; - ifp->if_capabilities |= IFCAP_VLAN_MTU; ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING; ifp->if_capabilities |= IFCAP_VLAN_HWFILTER; @@ -2399,6 +2398,7 @@ qlnx_init_ifnet(device_t dev, qlnx_host_t *ha) ifp->if_capabilities |= IFCAP_TSO6; ifp->if_capabilities |= IFCAP_LRO; ifp->if_capabilities |= IFCAP_LINKSTATE; + ifp->if_capabilities |= IFCAP_HWSTATS; ifp->if_hw_tsomax = QLNX_MAX_TSO_FRAME_SIZE - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); From nobody Thu Feb 26 14:33:52 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMDVG4Cw7z6SYLc for ; Thu, 26 Feb 2026 14:33:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMDVG1LPwz3HGK for ; Thu, 26 Feb 2026 14:33:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772116438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w0lark9dn2zS6C/LmhLiwjvjoi7XL33O8mknRjib6fc=; b=yC/Sk3+W6iPGOUShFwIXcqI3uI4xJ51Z0mG/IJ9+yZbIYK84DdDJg1I9biQpqN6s5msz8j q5MCzMBL2Yfmm4QcIQGw4oVX4ZLuwoOP41/kgRKz1QzItZnvo4iciIC6R9+IzJoxC3yh+9 gC4jWABC8a55ppBa09WKNmt+LiEJ4MTSfqdMRswzx5+YFFCfsBbZMHV+jyyRzcCm7tOZRu 8G/xcJWtDc501h8IeR9KudKUvliQdsqnXxbn0Gnj0+wBdBcGUT5c5OStlBE8LaAOSA/fEH 3G5ET9G1yiCdBy+FX22ZVorNmyZ7QqY0W1OGTy/FH0UkYwul9PlE435M7pFkaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772116438; a=rsa-sha256; cv=none; b=vQNbsyVgzQGy4lYsKI85/UZoedY5sCAe7A0kmvc9ypKQKhYf0kjEY9hVlgrxG2Lj7D/wCk Zd1DQrREzlAsS2a5VMp+MKGHX9U4tFkLMOks4IL7xjpnPQKaIFwOcvZwIsqZAPUtkLzrwR YjEuweD56ij/TUeINVgrXH/QxNilZwic28K2eP1EtW5oxKKZztduWKBVFIoYIBJYJrpbI8 O1OU7ZDF6uQnvzanY/+FaL7w3H0SnQbklSELQNnP4lcCbCG70ZQd6l9UvPickhDk2eZe6w MgIiJoe6wTVYDUFI1vHKbkwBS6y7lHEwmNeetB6aHw9vqeThZxEwQwQrRxBgLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772116438; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w0lark9dn2zS6C/LmhLiwjvjoi7XL33O8mknRjib6fc=; b=GIEijI6wewq+ZsXfEEYL1PfpPv2mMsFvoySxuwIk/RjjpZ+c0YZhvY078kWOdtnQ7XRfXJ Q3qaBW97IQaSK7HMfxaw043d+g0vW/t6Fpo8WSjENB8FWBOEL48Yt18lkGC3L943Y1zG4k vNJR8A0T9eF4qAb3W0S2LE66mRccV6H4olSif3gAq1e+Xiq24TEoIQu2ph3S4l3/QsI22q ztFOCnAeKhCTRa/wbsYbppRMMaroyGJ6eqQ7RPfa1oPgY6UcICuV5sWe0xfOyZ6U20Tj4/ /dEaC/zhAT22pc66D0f/jUL9FEk/klDxLLPmCoqEtoP/MIah4NjW/qkaLV358Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMDVG0vlXzcNm for ; Thu, 26 Feb 2026 14:33:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26920 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 14:33:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Kristof Provost From: Zhenlei Huang Subject: git: baed1f130ab1 - stable/13 - qlnx: fix panic at startup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: baed1f130ab1ca0e553f2cb031f3cfd040ba3cfb Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 14:33:52 +0000 Message-Id: <69a059d0.26920.4c001e4@gitrepo.freebsd.org> The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=baed1f130ab1ca0e553f2cb031f3cfd040ba3cfb commit baed1f130ab1ca0e553f2cb031f3cfd040ba3cfb Author: Kristof Provost AuthorDate: 2025-06-12 16:53:33 +0000 Commit: Zhenlei Huang CommitDate: 2026-02-26 14:17:22 +0000 qlnx: fix panic at startup While attaching the qlnx driver we can end up trying to call ifmedia functions before those are set up (through ether_ifattach() -> rtnl_handle_ifattach() -> dump_iface() -> get_operstate_ether() -> ifmedia_ioctl()). Postpone the ether_ifattach() until after the ifmedia setup. Reviewed by: markj,zlei Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D50819 MFC note: qlnxe(4) does not exhibit panic at startup on stable/13, but there's a small windows that the setup of ifmedia has not been done but other threads try to access the ifmedia, since the ifnet is public visible on ether_ifattach(). Postpone ether_ifattach() until after the ifmedia setup to prevent that. (cherry picked from commit 4f7473d18a62077a218ac00817bae09a95b8cbcb) (cherry picked from commit 8ef7ad95e9156bea689274c9d57fc961b203efe2) --- sys/dev/qlnx/qlnxe/qlnx_os.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index 96a5e9e7e269..2586539617dd 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -2387,9 +2387,6 @@ qlnx_init_ifnet(device_t dev, qlnx_host_t *ha) ha->primary_mac[5] = (rnd >> 16) & 0xFF; } - ether_ifattach(ifp, ha->primary_mac); - bcopy(IF_LLADDR(ha->ifp), ha->primary_mac, ETHER_ADDR_LEN); - ifp->if_capabilities = IFCAP_HWCSUM; ifp->if_capabilities |= IFCAP_JUMBO_MTU; @@ -2442,6 +2439,9 @@ qlnx_init_ifnet(device_t dev, qlnx_host_t *ha) ifmedia_set(&ha->media, (IFM_ETHER | IFM_AUTO)); + ether_ifattach(ifp, ha->primary_mac); + bcopy(IF_LLADDR(ha->ifp), ha->primary_mac, ETHER_ADDR_LEN); + QL_DPRINT2(ha, "exit\n"); return; From nobody Thu Feb 26 14:41:40 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMDgF6HLzz6SYsT for ; Thu, 26 Feb 2026 14:41:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMDgF5TPzz3JdQ for ; Thu, 26 Feb 2026 14:41:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772116905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wgutcRhlV6myUGAbM7MKhV16ScFk0T/hee8btMO+uNs=; b=QXOd/2qbgZ2q62SAPsGPgREs9tThe/oncr3lUls5TamcPj9KeX3CuW2bggKbvprFMw6Vn8 oZzbaR/ROwxmecLIrnj+uIzibBr1dzygMa9YvQyjfN5SbpjrKFWCHAL0jOZWLv2YsVK6VN op0YEQuVkq2SS8OHfZkUEw1mvD4s7vX1FWNxASY/dMtHq35exdHBfpwBPK4bVoJwZFvlxs Nd5D3d4qEElvYvyoaCAnj4dzlKJPh8fMgSP+fWXZOPcLpQO5J0HuYLwZhcMXrZNsH+nf5S Sef5yCTn7H3ch+KX2Me5awoLGXbMmI+OfJRMfluKhq2lfS0u2A6Sq8+Rlr8cfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772116905; a=rsa-sha256; cv=none; b=Qt3m89A6hF3BPiSlTqmZftYnX76/p1P6dAaLg4wJCai4d7E9Jl3k3qWGUa9jvpDaSspVDo GRFSENzaHtMExUx5uXsAqtEiXKBG0Cj1qk3N4bEhTz9UYxfay9pE7zYajEhA/Cmo50Sas7 rKSeEw83QfhRXtRb/6jd4F97lEKH1T25oXmLLCjDV8ly2lxlPx2U/tD9sYkEpTuHEueeN0 xosurtwJb6ihPfE5OJs23zCTz17gMhZpyhQMxVQ6081+br8hwl9lBVRHtAyl+cMuqJfmsW 6dOsIiKR6MoEVfb/w4v0JCORpg+iMO/hyp6Nr+VIAoXfRODUFWfcoQ93dgtcrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772116905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wgutcRhlV6myUGAbM7MKhV16ScFk0T/hee8btMO+uNs=; b=NY8WssWHMBrpQstFGzlHDlJYTCzCQWmX17Ox0iUsrgSIvBGlQt6qS9lRlPpMD/yLy1c7zU 5RTgc93pyF26JRtN8MwopoxZ8trIM7BYJms3xRf2uO1kI2UQmPbLo6QgoljT6oxd8vnBz+ jpYEdO66ubzDGOxNIoYk6HLt998FTpgBMfDFEITS5UKc3WQY4PGmd99T0I5+3TEsEaSyTJ thuMO2dd3NfG7+3Xjn3rnQ7vkUEro8N4fiNM3I+yRnE5xOJzShHJTuxvs9nXlMj8w/ps03 hz3f/g7g+CS2QUETvknW7MsukidT1k/R5hsh1oK0bMBLQ5vcfh4tieiLXvjO/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 4fMDgF4Jyfzc6F for ; Thu, 26 Feb 2026 14:41:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25d5b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 14:41:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: d971bc5220f7 - main - elf_common.h: Add AArch64 Memtag ABI constants List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d971bc5220f7adb8a2bdfadc8e3ca7ffcf9ca843 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 14:41:40 +0000 Message-Id: <69a05ba4.25d5b.4f9d2194@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d971bc5220f7adb8a2bdfadc8e3ca7ffcf9ca843 commit d971bc5220f7adb8a2bdfadc8e3ca7ffcf9ca843 Author: Ed Maste AuthorDate: 2026-02-23 21:23:49 +0000 Commit: Ed Maste CommitDate: 2026-02-26 14:28:19 +0000 elf_common.h: Add AArch64 Memtag ABI constants Obtained from the Memtag ABI Extension to ELF for the Arm® 64-bit Architecture (AArch64) [1] [1] https://github.com/ARM-software/abi-aa/blob/main/memtagabielf64/memtagabielf64.rst#dynamic-section Reviewed by: andrew Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55486 --- sys/sys/elf_common.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h index 42252d2e21af..b1ddbaaf39ab 100644 --- a/sys/sys/elf_common.h +++ b/sys/sys/elf_common.h @@ -471,6 +471,9 @@ typedef struct { #define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */ #define SHT_LOPROC 0x70000000 /* reserved range for processor */ +#define SHT_AARCH64_MEMTAG_GLOBALS_STATIC 0x70000007 +#define SHT_AARCH64_MEMTAG_GLOBALS_DYNAMIC 0x70000008 + #define SHT_ARM_EXIDX 0x70000001 /* Exception index table. */ #define SHT_ARM_PREEMPTMAP 0x70000002 /* BPABI DLL dynamic linking pre-emption map. */ @@ -705,6 +708,11 @@ typedef struct { #define DT_AARCH64_BTI_PLT 0x70000001 #define DT_AARCH64_PAC_PLT 0x70000003 #define DT_AARCH64_VARIANT_PCS 0x70000005 +#define DT_AARCH64_MEMTAG_MODE 0x70000009 +#define DT_AARCH64_MEMTAG_HEAP 0x7000000b +#define DT_AARCH64_MEMTAG_STACK 0x7000000c +#define DT_AARCH64_MEMTAG_GLOBALS 0x7000000d +#define DT_AARCH64_MEMTAG_GLOBALSSZ 0x7000000f #define DT_ARM_SYMTABSZ 0x70000001 #define DT_ARM_PREEMPTMAP 0x70000002 From nobody Thu Feb 26 18:16:35 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMKR85DB9z6T3Xv for ; Thu, 26 Feb 2026 18:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMKR80c2rz3h3Y for ; Thu, 26 Feb 2026 18:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772129796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pwuY3LvKcUIQcOWQmyxZtGgvLSm2Vh8Qv8pinhf5Zg8=; b=jmD5+KgXOqfYPWpdeYkG8iHDeuR044WrbXZyDficjsrutiq8OEn5c96C+oYCGhh1nPm89V GfJCNLD1EkKvu+sklp568NaQ+a2Judp8uw/tydSkRJDudgVw3ODIPO4UkbV9uLeYBSY7Js GdfOcYjJnT0E+UIce1iHyJA6+LZJ4o+fH/2fP431zsHd0vGGHgJkBXgIbD/p9HaGhX4sIq o334DgncSsIWKcUguzsFioo1ZewxjBvT0VTSSqR/6OgsTEoccbXi4xWAn8urtA3lyOwoQU l4UpPj+hWK5s/9ZElTxfBRb9Mn5xrQDY5pJtwO/e5ZJdDROxdQpUGFLsda7CSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772129796; a=rsa-sha256; cv=none; b=j/dOe+WGqzlzrtgRKzsp7uSkwC5uB0JuuwJrIX6fjPGLsPYCIPOGEXsOWSm5F0x60cA07E bo17BWeuEGXky8B4pakdMgyUHf8QWVkfRNhY9LFsXGIPITRp5iBWxguS9dBZQd2uUqII4Z 22dM5fWLPv4UNllLzF/+Z/npAatNMwjvawRxOTwEIOrh217t5lKwdJv++ohaKfgm10pbIS bjcbSCHy1KwjDq2UAOmir/ICHzCgL9UO7Is0FvU7Qi0OqleP2zxttQoApPBanKPz6dCqss uIPSqo2uYMJz1r/F59NlIcLGMk6KbU2OiMRJ21DUhlxXErS4z9PjVgGOxqj6mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772129796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pwuY3LvKcUIQcOWQmyxZtGgvLSm2Vh8Qv8pinhf5Zg8=; b=doJ3M8Hu+lmYEHdaeWOP613FRzAdMg+qOQYZgAyTRvUjy+NMpW85bSyysj5V+g+dDww+8Z yqNtYYwbVGFTNwkHcXSU7EP0dekRFY6TRBlP3GG2c69tkIhwlNsBnHWS1wWCGF4gJDtxcZ 9zmzI7Q1mO20M7Etxc9GD5dLOhDfho5g+YJRyqkRaBbnLT7gsxH+9qEIkc2s+H7oKp4wX4 3e+c3cqxP7KBlW6OkwAaoLnmm2q6oZTrzqZ09VcL0Z1iokpa/ZFQKPNAfYLZJH7EsL2eQ0 SgOIJSLYIjQBDNDD51csbMhtBV4bKx9opL+Y0tnd6vGBa8IP0T2SAaH4DQricQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMKR76kJPzjcQ for ; Thu, 26 Feb 2026 18:16:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 430e8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 18:16:35 +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: Colin Percival Subject: git: ca76ec7c4e56 - releng/14.4 - libfetch: Fail hard if interrupted while connecting List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.4 X-Git-Reftype: branch X-Git-Commit: ca76ec7c4e563292a0c75781683b0421a4439a02 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 18:16:35 +0000 Message-Id: <69a08e03.430e8.389b45c0@gitrepo.freebsd.org> The branch releng/14.4 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=ca76ec7c4e563292a0c75781683b0421a4439a02 commit ca76ec7c4e563292a0c75781683b0421a4439a02 Author: Dag-Erling Smørgrav AuthorDate: 2026-02-21 01:18:15 +0000 Commit: Colin Percival CommitDate: 2026-02-26 18:00:38 +0000 libfetch: Fail hard if interrupted while connecting This fixes an issue where the first address that DNS returns is blocked by a packet filter, so we hang for a while, then the user hits Ctrl-C, interrupting connect(2), whereupon we move on to the next address, get a connection, request the file, and return to fetch(1), which sees that SIGINT was caught and bails. Note that we make no attempt to enforce fetchTimeout in the connection phase, and never have. It's feasible, but non-trivial, so we'll leave it as an exercise for future us. PR: 293312 MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55406 (cherry picked from commit afbdcd402bb439bd3d487baaad63b68e95929265) (cherry picked from commit cca6f5eadb796b03379eb21f38c74ca46a64e45b) --- lib/libfetch/common.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index bdc72f67c9a0..949addd8e6e2 100644 --- a/lib/libfetch/common.c +++ b/lib/libfetch/common.c @@ -658,7 +658,13 @@ fetch_connect(const char *host, int port, int af, int verbose) goto syserr; } /* attempt to connect to server address */ - if ((err = connect(sd, sai->ai_addr, sai->ai_addrlen)) == 0) + while ((err = connect(sd, sai->ai_addr, sai->ai_addrlen)) < 0) { + if (errno == EINTR && fetchRestartCalls) + continue; + break; + } + /* success? */ + if (err == 0) break; /* clean up before next attempt */ close(sd); From nobody Thu Feb 26 18:16:34 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMKRD6rvbz6T3hP for ; Thu, 26 Feb 2026 18:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMKRD0QBxz3h5m for ; Thu, 26 Feb 2026 18:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772129800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qYXnwbz5Pv485kcbL4nEMSRL6nMOMthFDh2FukSzhy8=; b=tt6foxJnp8o1UNu+sfakMQxrX29kJuONV2xyezJsvpSs9fAcCIdXd2Mb4Wsik1U3NxeVyg 9mcxha0mGKCHSb53CqDGZpGvPqOxyOQweXCab0Gh2TA773o3qsYwq5f2WhR6ZKGBNHVcL3 yQVgOb8lz2krIm9zf2Fi6FZjC82+T0fJtxQ/vw+tcaUQgB4H3T5HWtZC37vBDCrezxJPYr eTrnvwMDrL8Uqtup20i/2sb0sM/zaXUcXYtI69PusTCe6inSSxbGQ7EWZaLxNE0btw19XM OgLAVKDmQi386pI6j4h+w6xxGA9Cyab/OjaOBYz2oZok4kC5/kQ4ysX4Mdr6Jg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772129800; a=rsa-sha256; cv=none; b=o7ponKKpaiDllQZkeR19Qi5SfThlajQKwuTQOjiCoLPnea3rwHrOgxSoWzijI+PQRA1r2K CzLA8r9s5YKs380309CTLRuGvzSdKB3+8iWv/UEdOHaIEOaYL+i6LKPGzUsTDQPmgB064/ YEOvc8taLiEBzkOKX4y17Ij2S2XTF1NbqQwNKlqaCxn2t8XJ0GuuIQTHcpRJzgp61yLfxc RfLMglpqeaBGws2WQ9bkVvlA+PWhZe64ZaQrGq5sH2RB9Y2PSW76hKSxRwKobCs/hVMaNI f25iR//EMxdHiO7CJo4rg2XdpTqrfxOX5Kvha4xxCZ8ocZgBdERN/hRd1G06LQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772129800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qYXnwbz5Pv485kcbL4nEMSRL6nMOMthFDh2FukSzhy8=; b=Ozrk5dj1BWy08j9FKgqphm+zAYPxPuz2bDcwAF9Hy0EmI8awDtNw0TLJJws4Xiz/i53SHL Me2gyTKMLCqFlKox+oZanSzoxh5Gtd92r+nZ1yWNwb6Ta3h1AsLb1xpSuQ7G3rsFHiwPxX LonzoVrQMz3E3UCjCIQzP3OrAW7hJoIzIW+EtGq+Hu2rSm/AsR3zjr+TuvQhjMyDC7Z+Gx c/LfwqMbU7qy+hnXWSzeMXCI1DZglT1dEANsPaOiTRPOnA1mfBxeRicUGZ2wLe/6dNEPQo o76Ftg6ccMBrGRdDCxT8Rl2951cGDWWR1APNL0MXFqqqwnEnKtQUiUAFTdFClA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMKRC6f5Xzk7P for ; Thu, 26 Feb 2026 18:16:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44e22 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 18:16:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Ahmad Khalifa From: Colin Percival Subject: git: 3cf73e195af3 - releng/14.4 - bsdinstall: fix EFI boot entry creation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.4 X-Git-Reftype: branch X-Git-Commit: 3cf73e195af3d4693d1e52de0a91b6d4b3fb8b5c Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 18:16:34 +0000 Message-Id: <69a08e02.44e22.7ecc78d6@gitrepo.freebsd.org> The branch releng/14.4 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=3cf73e195af3d4693d1e52de0a91b6d4b3fb8b5c commit 3cf73e195af3d4693d1e52de0a91b6d4b3fb8b5c Author: Ahmad Khalifa AuthorDate: 2026-02-24 20:11:32 +0000 Commit: Colin Percival CommitDate: 2026-02-26 16:50:15 +0000 bsdinstall: fix EFI boot entry creation update_uefi_bootentry assumes that the caller sets FREEBSD_BOOTNAME and mntpt, which isn't the case anymore. The result is that there is no "FreeBSD" boot entry created/updated after install. Most machines manage to boot from the removable media path (if the loader is installed there too), but some don't. Take the loader's path as an argument and rename the variable used in the ZFS mirror loop so mntpt can be reused below. Also mark nentries as a local variable so it doesn't leak out of the function. PR: 293385 Fixes: 494de51bc0074472d1b01604f085daea0844f240 MFC after: 2 days Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55469 (cherry picked from commit 0fd91c489134643ac9e38c0f55ba7464fe892c5e) (cherry picked from commit cfdd90abab51581120da75b45018a79237228b33) --- usr.sbin/bsdinstall/scripts/bootconfig | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/bootconfig b/usr.sbin/bsdinstall/scripts/bootconfig index ba9a4369429c..5bcc49084617 100755 --- a/usr.sbin/bsdinstall/scripts/bootconfig +++ b/usr.sbin/bsdinstall/scripts/bootconfig @@ -80,11 +80,13 @@ uefi_copy_loader() update_uefi_bootentry() { - nentries=$(efibootmgr | grep -c "${EFI_LABEL_NAME}$") + local nentries=$(efibootmgr | grep -c "${EFI_LABEL_NAME}$") + local loader_path=$1 + # No entries so directly create one and return if [ ${nentries} -eq 0 ]; then f_dprintf "Creating UEFI boot entry" - efibootmgr --create --activate --label "$EFI_LABEL_NAME" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null + efibootmgr --create --activate --label "$EFI_LABEL_NAME" --loader "${loader_path}" > /dev/null return fi @@ -94,13 +96,13 @@ update_uefi_bootentry() for entry in $(efibootmgr | awk "\$NF == \"$EFI_LABEL_NAME\" { sub(/.*Boot/,\"\", \$1); sub(/\*/,\"\", \$1); print \$1 }"); do efibootmgr -B -b ${entry} done - efibootmgr --create --activate --label "$EFI_LABEL_NAME" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null + efibootmgr --create --activate --label "$EFI_LABEL_NAME" --loader "${loader_path}" > /dev/null return fi FREEBSD_BOOTLABEL=$(dialog_uefi_entryname "${EFI_LABEL_NAME}") [ $? -eq $DIALOG_CANCEL ] && exit 1 - efibootmgr --create --activate --label "$FREEBSD_BOOTLABEL" --loader "${mntpt}/${FREEBSD_BOOTNAME}" > /dev/null + efibootmgr --create --activate --label "$FREEBSD_BOOTLABEL" --loader "${loader_path}" > /dev/null } f_dialog_title "Boot Configuration" @@ -148,21 +150,22 @@ if [ -n "$(awk '{if ($2=="/boot/efi") printf("%s\n",$1);}' $PATH_FSTAB)" ]; then # over gmirror, so we only do this for ZFS. esps=${TMPDIR:-"/tmp"}/bsdinstall-esps if [ -f "$esps" ]; then - mntpt=$(mktemp -d -t bsdinstall-esp) + tmpmnt=$(mktemp -d -t bsdinstall-esp) for dev in $(cat $esps); do f_dprintf "Installing ${file} onto redundant ESP ${dev}" - mount -t msdos "$dev" "$mntpt" + mount -t msdos "$dev" "$tmpmnt" uefi_copy_loader "$BSDINSTALL_CHROOT/boot/${file}" \ - "${mntpt}/efi/freebsd" "${mntpt}/efi/boot" \ + "${tmpmnt}/efi/freebsd" "${tmpmnt}/efi/boot" \ boot${ARCHBOOTNAME}.efi - umount "$mntpt" + umount "$tmpmnt" done - rmdir "${mntpt}" + rmdir "${tmpmnt}" fi - # Try to set the UEFI NV BootXXXX variables to record the boot location + # Try to set the UEFI NV BootXXXX variables to record the boot location. + # Note that the ESP is mounted at ${mntpt}/efi. if [ "$BSDINSTALL_CONFIGCURRENT" ] && [ "$ARCHBOOTNAME" != ia32 ]; then - update_uefi_bootentry + update_uefi_bootentry "${mntpt}/efi/freebsd/${file}" fi f_dprintf "Finished configuring ESP" From nobody Thu Feb 26 20:26:17 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMNJn20Dhz6TL5l for ; Thu, 26 Feb 2026 20:26:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMNJn1NWmz47gj for ; Thu, 26 Feb 2026 20:26:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772137577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YbnIaa4baEadhUPKtEIP2XtSzWGc1nzBUxHAUqEH30I=; b=VD/z9VwMfxZsLxU1/1eJChmqkSwIwDokAHosfVz+3EMAxidxcZLxjaLqsOXKfFPCH7BvLC 7TV/5AeyHgN8Me4l5/YKJjL7pmokcCRpt8bg0zz1yCZSw/tYixkmX49L9IpDKb+oiQUCDh 2Kh3P8gPlfY/n8M0WbdQ+t5j5+RWJFdUwJnHZw96smE3gVqcP+MxHepQqjSrA+0i8OzZsX GFSv+Q7s/17h/SCrSY8wUkT0GUE1MUMwSntvIkSSmP0OqElxOaHo6FUrgzlBqtua80icTY 54B2nUHHcJ9Zxfe9uC+SKponvs50nAz50Cv0eK+vJXeBD24MgTypHPYLKiYbHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772137577; a=rsa-sha256; cv=none; b=xRE054A7pplnrCDnNo1CvInel4FfscdG9iF05UPvVXhuSqpl+BvExJPp/rwX3DvoeuJ2xS IuZbTBCo5nWj9tMUtFFvi3Dy4J2xrDW351lv0b9MSPLi7W3DBaojMsszzAmZ4AnGceFW/t kYXTZvDV0+KNbIJUXGd1wT9mTgRss8yChgnBoRSTFVhLnYQjfDSavAS+89ijdD3Fn3RNeb lGLIglP8nfDCjFp6/EhOAzxzFzJYrxId2d0WWkLhlz5XtIfm5E7I5uFf3Kcx9y2C+Kkgmp DyMpqRq3le/MAafniVIhBs0eR+h2nXHg99rmtbJWsUqnbBHcjikDssV4Tij6dQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772137577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YbnIaa4baEadhUPKtEIP2XtSzWGc1nzBUxHAUqEH30I=; b=x911/fV8fBAtQEnzwFT4pwjBkvi71bz/XBmKcFr+vJhyVznU9bzFNVsp0MN3eHQHCVGzVB 4F4f0g12lZVYOETlIfyCokOWs5UufbScbppn+LL6WER1MaVCzMnl4eu3D9Mm9lsM2LxAwg AefnC+YkAPOxY/DUjDj0RgoTyHhUzPAkd7F9lAN9gka/lMAQriU1SdboP5mwImXAEjcUtT Ark22MSmPZJkO9lJPfXsNQCpI97CBAW9bGEZh994OyGiuQ+iW7riMOqIp4ky3Spo3KCoNa +b36u2gKCAsguDXI81d86QRhKvi2yuh2aaxw+bSPTiIaOcFIfJ0l9Fi2cLorkw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMNJn0YCCznBq for ; Thu, 26 Feb 2026 20:26:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2360d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 20:26:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 5547a7bb39ac - main - divert: Use a better source identifier for netisr_queue_src() calls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5547a7bb39accd8f151b53e90b41d13b55f84c95 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 20:26:17 +0000 Message-Id: <69a0ac69.2360d.f48d28@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5547a7bb39accd8f151b53e90b41d13b55f84c95 commit 5547a7bb39accd8f151b53e90b41d13b55f84c95 Author: Mark Johnston AuthorDate: 2026-02-26 20:25:35 +0000 Commit: Mark Johnston CommitDate: 2026-02-26 20:25:35 +0000 divert: Use a better source identifier for netisr_queue_src() calls These opaque IDs are used by netisr to distribute work among threads. The mapping function is simply SourceID % numthreads, so using socket addresses as source IDs isn't going to distribute packets well due to alignment. Use the divert socket's generation number instead, as that suits this purpose much better. Reviewed by: zlei, glebius MFC after: 1 week Sponsored by: OPNsense Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D55537 --- sys/netinet/ip_divert.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index 9f1d862a0531..2b85bd4a50bb 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -502,8 +502,10 @@ static int div_output_inbound(int family, struct socket *so, struct mbuf *m, struct sockaddr_in *sin) { + struct divcb *dcb; struct ifaddr *ifa; + dcb = so->so_pcb; if (m->m_pkthdr.rcvif == NULL) { /* * No luck with the name, check by IP address. @@ -540,14 +542,14 @@ div_output_inbound(int family, struct socket *so, struct mbuf *m, m->m_flags |= M_MCAST; else if (in_ifnet_broadcast(ip->ip_dst, m->m_pkthdr.rcvif)) m->m_flags |= M_BCAST; - netisr_queue_src(NETISR_IP, (uintptr_t)so, m); + netisr_queue_src(NETISR_IP, (uintptr_t)dcb->dcb_gencnt, m); DIVSTAT_INC(inbound); break; } #endif #ifdef INET6 case AF_INET6: - netisr_queue_src(NETISR_IPV6, (uintptr_t)so, m); + netisr_queue_src(NETISR_IPV6, (uintptr_t)dcb->dcb_gencnt, m); DIVSTAT_INC(inbound); break; #endif From nobody Thu Feb 26 20:31:19 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMNQh5k48z6TLJp for ; Thu, 26 Feb 2026 20:31:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMNQh5Dxdz48jK for ; Thu, 26 Feb 2026 20:31:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772137884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Az7p8FqhI+4+KxgwZAu/I1CH13upcuUhQ46l0zpBPjU=; b=R7MzwtZKoBQY2MDyEbtTmwKJ2h4fNW6Nobiz7BJdleko692VT8TEMHV8MkjkAvDgVMQr5z 7fFPFj3OTodrTr+nkiesfYg6YwAG5cg5vzc4oJiJX0MktOh+WY1DHb3VO7E0zTg5v2gOy4 +Rm0sergMVxqOfWU3fqOLN2NX/noUERWsQlPeERlUXXPPwTX09HFgFV2fEO7j2litqGXoJ GuSBFCpFcKUAfGHYhO+qFF3Cwbuhb5qsEakqDAqjS0/maCvFh+qj+1m4Zx/cGaxoA4DD6v ax7HxfUEhbQl84EXzEc6h2m5MHek9QaOczOw6B2zQuUoLT0mr5YfCNJ0ng8VSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772137884; a=rsa-sha256; cv=none; b=j56lR594VafrM4k/mX+VHgW2DgJ9ro1boxXOSxFV6wCjwJugHqitDNqFgFvwJyOM0oif2v T2mP/OCzWUwLh1tEGn4UUysQe5WJxOV7O/6x6jutFX1Jwe2QkPpv/RgNBt6TbSX3IUB2Fr SZq6m3W8yF/hfhE0WnKXVn+XWWBrQOa2wO0bidVe+NB0aNpizqt4mVhqMQGqy3j193olbz +4aFMm4aIRyXy/1kx+fdhMdj143jR1XHgUGwRdpfLQ1XnmQNiOsgT5tM3V11t/kdCypFZq wlJfFsLIGei5dXzVbuv+UK4Ms/cxB7vuE/4j2IlVy8gMUquSK08A0z6SuHIDQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772137884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Az7p8FqhI+4+KxgwZAu/I1CH13upcuUhQ46l0zpBPjU=; b=EY6VqZoo0ud/NWOtviISFyTypF85x4nr3ejJjOnzHs+ZCN6SPw8punv05PwMRD8VWb1CpQ 4120fzOowBW1wa0BZNrR7Uo6tO7uDyj6CIODOdt+fcz7fqJR0KFSU90UaQfuh7J+itmZOV ItSHjfNLT4tVl4kJroUoG0nvsLAZd9vTGEFe2iySvZootxLqjR8FDcH6funLrEnsgkoadk Ku6bl72NxhDRfem2NSIShVyFNpEgC8XReH7lrpx8ixQVG1Ri9BE91BAKs9PKQohXodIQ/D 5ZikRJLVg4uUx2OdVXOBkRDBGNQPyTaxQ/yfw+kbYzDe4knZgVPjkiycKyILlQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMNQh4s5wzmpD for ; Thu, 26 Feb 2026 20:31:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 223c4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 20:31:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 73d9153fc57b - main - tests/kern: put ssl_sendfile under MK_OPENSSL != no List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 73d9153fc57bcfb665a4867cb1adc8fa0a8aaa84 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 20:31:19 +0000 Message-Id: <69a0ad97.223c4.55b13331@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=73d9153fc57bcfb665a4867cb1adc8fa0a8aaa84 commit 73d9153fc57bcfb665a4867cb1adc8fa0a8aaa84 Author: Gleb Smirnoff AuthorDate: 2026-02-26 20:30:18 +0000 Commit: Gleb Smirnoff CommitDate: 2026-02-26 20:30:18 +0000 tests/kern: put ssl_sendfile under MK_OPENSSL != no Reported by: wosch --- tests/sys/kern/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index 7dfa62ebb229..6d59a752bb4f 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -25,6 +25,7 @@ ATF_TESTS_C+= inotify_test ATF_TESTS_C+= kill_zombie .if ${MK_OPENSSL} != "no" ATF_TESTS_C+= ktls_test +ATF_TESTS_C+= ssl_sendfile .endif ATF_TESTS_C+= ktrace_test ATF_TESTS_C+= listener_wakeup @@ -50,7 +51,6 @@ TEST_METADATA.sigwait+= is_exclusive="true" ATF_TESTS_C+= subr_physmem_test .endif PLAIN_TESTS_C+= subr_unit_test -ATF_TESTS_C+= ssl_sendfile ATF_TESTS_C+= sysctl_kern_proc ATF_TESTS_C+= sys_getrandom ATF_TESTS_C+= tty_pts From nobody Thu Feb 26 21:20:10 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMPWK1Sxpz6TRx1 for ; Thu, 26 Feb 2026 21:20:29 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMPWJ5bsfz3H1L for ; Thu, 26 Feb 2026 21:20:28 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-82748095892so356035b3a.0 for ; Thu, 26 Feb 2026 13:20:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772140822; x=1772745622; darn=freebsd.org; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=bLKtSa7wqwoglG1jLkoCpt+m0Y4pKCmx8DkE2+ieQO8=; b=h3ZPoXIvU0vve7v00a9EMndPC581Gzs0Ufw3vFTcUuZyrdz4ZGnYcWttUWvTHOTmLO DtFMU4UuQyRL7K+WzQvyFXvUm8pwvDgTdG5vBt6aXSvTSW7Ss0zds/l3k9wLNhcw1FOZ C9PAyr09iR6+lAP+zjEJHxFsnGsHwkSFw9k8WqBGachmXvjg283QiRfrp9FbBBvizbl0 kh6bR3of1rCcMXSMfpMu60PgLkwQvfESXsqLZsIULDnxoKA/ckJUYjKWystvklhpwZGd gbpFQU1QlAdxY5xqZ3EJFJs25/iDDJtoijkd+wVJNxAQvkIxXbS0lPEzfDMA8LmhAR5X MhTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772140822; x=1772745622; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=bLKtSa7wqwoglG1jLkoCpt+m0Y4pKCmx8DkE2+ieQO8=; b=wTvwP5Ty49FTNlDIplLoyIVbkTag6T2nuvomAZgBIHrYI2EnI6R8k2R1wWNmWz9XEi sFqASooYhnjo9aAiOMB9XcmwdWB5VRXSYGxOAvSSvgFTHwjlPeD9mXRf6SjYQRGbhjqj do3GHEoimDF0lRjlNpsGCf91uxgfU6a4RfDXV3SVyksGyZVOWuwbS6uiPPi9FM2GumQ7 aECT3Xu1QtiGA9tINVMLLOhhzDItJcKZmOeFXDY4VzZsDvJ5HrDux9D9Jd3byoYMVHBG DMqbN2g4hTtip+uNFs1hlJxjPoV+qIkSNY3MaMXNsfM8FZoIba1jZng+5gmVUwHEi3TI jgyg== X-Forwarded-Encrypted: i=1; AJvYcCVHlXckldpSw2lsA6IzOY+oafDQOYKQBJRSTM+AKH8JYfaK0A6Z1jfSFCiRfGbRV7JVOwg/ulaH2ImKw0sobDytsEi4@freebsd.org X-Gm-Message-State: AOJu0Yx5G8Lc+QnKy36JGyy1xi0XlbA68xPwoKj2ZgaqNrqh9ZMAizaX 013C6vCHDNvB6qauH6rIb4klxSV+Ja7kCFJdUH9ow/pJXsNZ9WDPqEGk X-Gm-Gg: ATEYQzy6iNMhza0B1QEqYOL81ozX+bFQxzn1nxB+Q+thWvfH19gor1Xh/zCcUrLpgdu +4K8AFAnasGfgrzImfFV/54om/SZvocQZ100KuVBTb+VoXKzcmjdTHwVJOaSA6b8tE1dSEw4jDn uB1dYWVKPeKl/h3wN7AoKfA2MEkSCxYSDUF7SDaDgvw2sQ90QGR3ZWO63IJSGDmelBAGlK3W3X/ cTNYCjlVz6XdarGNwM7xZHP1xQVHUM+JcdB+f82GkapBlEos4oMZYqa6BHmVcRKmlYBqXTSvon9 vHlLI3P9LmdsZCTHGLrcUTVQ1NkyewJpsLGMvEMwjUrjsyqQbEMRRQKiODhno5pUlJmf8AvaiUi YF20OcJPyDci8qbIo9viggocLhDk7eUSsned53YUXUipLan8s3xHuLfZDyLBghDExOzGJZRPF/k MvvZm+njHDc5IVU3lOPtuTbouPucJhfGJTFMRxXjHkQQ== X-Received: by 2002:a17:90b:2d43:b0:340:66f9:381 with SMTP id 98e67ed59e1d1-35965c4e541mr457218a91.10.1772140822354; Thu, 26 Feb 2026 13:20:22 -0800 (PST) Received: from smtpclient.apple ([185.153.179.83]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-359037af167sm6821859a91.15.2026.02.26.13.20.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Feb 2026 13:20:21 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_EBD7356F-7BF2-4953-A96B-712F9385A840"; protocol="application/pgp-signature"; micalg=pgp-sha256 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81.1.3\)) Subject: Re: git: f224591746bd - main - Add ASMC_DEBUG make option From: "Enji Cooper (yaneurabeya)" In-Reply-To: <86342nr4zr.fsf@ltc.des.dev> Date: Thu, 26 Feb 2026 13:20:10 -0800 Cc: Enji Cooper , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Message-Id: <9949840A-8EB7-4ECC-A4AE-7774AC63DC42@gmail.com> References: <695c68c6.3ff5d.593fc2c7@gitrepo.freebsd.org> <86342nr4zr.fsf@ltc.des.dev> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= X-Mailer: Apple Mail (2.3826.700.81.1.3) X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4fMPWJ5bsfz3H1L X-Spamd-Bar: ---- --Apple-Mail=_EBD7356F-7BF2-4953-A96B-712F9385A840 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 26, 2026, at 5:47=E2=80=AFAM, Dag-Erling Sm=C3=B8rgrav = wrote: >=20 > Enji Cooper writes: >> commit f224591746bdaf14ad5f63de4738a3146cc2f55f >> Author: Enji Cooper >> AuthorDate: 2026-01-04 08:27:57 +0000 >> Commit: Enji Cooper >> CommitDate: 2026-01-06 01:43:04 +0000 >>=20 >> Add ASMC_DEBUG make option >>=20 >> This allows folks to enable debug statements in asmc(4) using = kernel >> configs via the `options ASMC_DEBUG` directive. >>=20 >> While here, remove a duplicate `device vt_efifb` directive in = `NOTES` >> as it's already handled in the `GENERIC` config >>=20 >> MFC after: 1 week >> Differential Revision: https://reviews.freebsd.org/D54511 >> --- >> sys/amd64/conf/NOTES | 7 ++++--- >> sys/conf/options.amd64 | 3 +++ >> sys/dev/asmc/asmc.c | 20 +++++++++++--------- >> sys/modules/asmc/Makefile | 2 +- >> 4 files changed, 19 insertions(+), 13 deletions(-) >=20 > This added asmc to amd64 NOTES even though it's already in x86 NOTES. I appreciate the reminder! I=E2=80=99ll send out a differential for this = soon (I removed that entry on one of my git branches). Thanks, -Enji= --Apple-Mail=_EBD7356F-7BF2-4953-A96B-712F9385A840 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEkHfexGRJ3gYRdA2gGpE5DjPsNJgFAmmguQoACgkQGpE5DjPs NJirnxAAnQ+wIgInrO9zwshdbvL8F0LyfTcJ/rvGAA0pkMO1t4bANrlnm5bojniJ D/dWidKyWIah/zwjuO88TVFS+/N13UeCcNtv/E+QrtmSRIwl2H8Ba6cnb1PuhCuo cSMWEa2qVPKrFDs05ZUAmQwJq6uBoOmIlgZtyYNefZo4V+Uym9weR3ghGxQCAcjA 0Jm99I0TscO/S8A8+ckm4WSgWPftC3JEohjzgejYnG2WMGCuUCiJx8PIQohCJOkT rMo1nppdjt7qsD3u9ekfUlQql5y0RHDuLWig4rGDl/swqFVhrfIAML3bOXZ3oDyu A6EzIWPT3+4jDT3N/a/snl19s3945JuNcvsiX0BVMgG+TB0cnrtMrxKbR9XULa3Y 8rEQ4nw7EgbysGd6JPiDunO3rem2raznEgM9KrrjEKtEV4kqbhXfQauJXXSC9y9r 5h6rAcqsXVsyqjURYBkM6q1NIkOZEmKYuPE+ZplEMvhzmtEhipnb+8atauehwyS/ EYdXCLt3VG+6ry+sgeDXtJcEJJ6hAkzaJl9z7qSXsXj8qc9/uuKC8nW9p3ejRPZk jARgZBxV0h5KTwJP9i/h3Pxjpyr4w0DpIYaVpQWhDUZBvLlrKHmhoVCGa79+ABh5 yBiJwrAI4rLZltiKQ6CVC2byJ+FEg7uKzZxo4s/96OcODMyZQG8= =bQO/ -----END PGP SIGNATURE----- --Apple-Mail=_EBD7356F-7BF2-4953-A96B-712F9385A840-- From nobody Thu Feb 26 21:26:58 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMPg50njpz6TSXl for ; Thu, 26 Feb 2026 21:27:13 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMPg40LDMz3Hrs for ; Thu, 26 Feb 2026 21:27:12 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=OsLw9gWE; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of yaneurabeya@gmail.com designates 2607:f8b0:4864:20::432 as permitted sender) smtp.mailfrom=yaneurabeya@gmail.com Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-82735a41985so810553b3a.2 for ; Thu, 26 Feb 2026 13:27:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772141230; x=1772746030; darn=freebsd.org; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=B4N0LnPOJpdAGTcJLhV4Ckgdg5ubCPqXshXchRRwo5o=; b=OsLw9gWEQtpgkguYQnnwHklOYXT8VW0pzJOYJZPh/Qg4y57TFMaUhoEMBCWQD44PCA jb/Woe0l51OqYi1ln1wBQURWzVx75e1AU8PmBALsa3CWF/qeKxqaFp2vQGGKbLX4bqBo Y2E/j9keqB8TT8U1Eo/Py84UFsLlngrVlkfvd6V6q+8LyuOa3a6UA42HI4nmatdlBQhT UF28R07IJNhtjC5ryGPM+PP2DTYpBDtWXV99/SjglVW6U70nAC2yoI9U8HFV37bhzhhW 1KHLnSaF9qtytzlB/fTNu5NkMr7wfcpyYxxt190bzKLNCfDP2nAcMlYCZXjt+QdVsnYs Jm1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772141230; x=1772746030; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=B4N0LnPOJpdAGTcJLhV4Ckgdg5ubCPqXshXchRRwo5o=; b=k4cMYbyQOIbjLmwzb5dJ/+fQ7X6tjzKI1xV8UxxBMYNJju5xXW3Rc+Qd8Y5uts28rn fXenBJ3CoWzjwLr6ToUk/arCdLeWexns7mRh7yJY3vOfzcFgTkxs/AICTTPNUnb3Bo/L yxZTQM9HoGYW37d8PA5qK7NftmJXHzRmogAOZoMwf7/mCeYF20QJch5wN7mi2DF4buBN kRtkYQrs/0FrKW/OIXwcrj0pz4OLCXqU/fSqWgKZh0w62TQGwluk/eGaqDRePlya+Cfg ABpaFDEb1tU9x9FHyZlxi261AEn3M5xPLCIPEIlLAT/8siiW088h/D3u5HcBfIW4jauz BUig== X-Forwarded-Encrypted: i=1; AJvYcCUUF3ESXL+XEXdbKz3YLSLYkzj+LkXEtuUz0hebMrOUtcsvmny4Hge4FmsqrllbId/MKE0dvq+26Gr4Hu/n16JEj56N@freebsd.org X-Gm-Message-State: AOJu0Yy0c/2dmI7dqlO5c+mLZ00DzomyjxdN238mimEq2UJvm79PKSqa fCC1WRGDwPEFGlwhDHllCsR0nu6RvWSB9btI90Hu/2TrP18+zjWWQ5db X-Gm-Gg: ATEYQzzk7LZUYz9qiEiPxgsKZmAROG9K60Uiw4G7VLhN8YHjkWdZLwIKXNmnhlyzngy w9STQn66rLXgcaS63SFHPX+9TzjixT8B7pQJQlLZMl01kP2LDWWqzNm9201FtxssHymvtWfpD96 vAcnvqRhBLxt7yUMFxtc9haQcSJSeeP3Zyy5n+Ka63mi9o70xjTNuAkJkjUC/vkMlGcTbNod76C /8QlbD474/EzXW5YLuIBEmXP3hlv73uSg4JQaR4RZAf4E1H820Tbk9FnNH2x8UC/CtM6fi+vd27 iGYIaJIfDE+QTzw7O5XQ9WNQOpauCG0rIe+GBLGYJoL5RRzEIoxwTu3juwqdMvZhqq47RQm2ZG0 r/CWnEQMWSpd2hrMhswzVvY0AvyWWCE6YT2ERKT3jrkmy3qGjKjNdKnAkqXgX8O++2mzQZWYSvT alV+vi+kHtHK5rTSJGwV5BM4K+WNqfm+B0C/wvonyopA== X-Received: by 2002:a17:90a:d403:b0:34a:8e4b:5b52 with SMTP id 98e67ed59e1d1-35965c3b05bmr504222a91.8.1772141229742; Thu, 26 Feb 2026 13:27:09 -0800 (PST) Received: from smtpclient.apple ([185.153.179.83]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3593ddd737fsm4693988a91.13.2026.02.26.13.27.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Feb 2026 13:27:09 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_5974DC08-12B8-4313-AFBE-B25BCA1912DB"; protocol="application/pgp-signature"; micalg=pgp-sha256 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81.1.3\)) Subject: Re: git: f224591746bd - main - Add ASMC_DEBUG make option From: "Enji Cooper (yaneurabeya)" In-Reply-To: <9949840A-8EB7-4ECC-A4AE-7774AC63DC42@gmail.com> Date: Thu, 26 Feb 2026 13:26:58 -0800 Cc: Enji Cooper , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Message-Id: <2B612FD6-212D-481E-B6CB-92AC5E861903@gmail.com> References: <695c68c6.3ff5d.593fc2c7@gitrepo.freebsd.org> <86342nr4zr.fsf@ltc.des.dev> <9949840A-8EB7-4ECC-A4AE-7774AC63DC42@gmail.com> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= X-Mailer: Apple Mail (2.3826.700.81.1.3) X-Spamd-Result: default: False [-5.59 / 15.00]; SIGNED_PGP(-2.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.994]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; RCVD_TLS_LAST(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::432:from]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ARC_NA(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; HAS_ATTACHMENT(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4fMPg40LDMz3Hrs X-Spamd-Bar: ----- --Apple-Mail=_5974DC08-12B8-4313-AFBE-B25BCA1912DB Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 26, 2026, at 1:20=E2=80=AFPM, Enji Cooper (yaneurabeya) = wrote: >=20 >> On Feb 26, 2026, at 5:47=E2=80=AFAM, Dag-Erling Sm=C3=B8rgrav = wrote: >>=20 >> Enji Cooper writes: >>> commit f224591746bdaf14ad5f63de4738a3146cc2f55f >>> Author: Enji Cooper >>> AuthorDate: 2026-01-04 08:27:57 +0000 >>> Commit: Enji Cooper >>> CommitDate: 2026-01-06 01:43:04 +0000 >>>=20 >>> Add ASMC_DEBUG make option >>>=20 >>> This allows folks to enable debug statements in asmc(4) using = kernel >>> configs via the `options ASMC_DEBUG` directive. >>>=20 >>> While here, remove a duplicate `device vt_efifb` directive in = `NOTES` >>> as it's already handled in the `GENERIC` config >>>=20 >>> MFC after: 1 week >>> Differential Revision: https://reviews.freebsd.org/D54511 >>> --- >>> sys/amd64/conf/NOTES | 7 ++++--- >>> sys/conf/options.amd64 | 3 +++ >>> sys/dev/asmc/asmc.c | 20 +++++++++++--------- >>> sys/modules/asmc/Makefile | 2 +- >>> 4 files changed, 19 insertions(+), 13 deletions(-) >>=20 >> This added asmc to amd64 NOTES even though it's already in x86 NOTES. >=20 > I appreciate the reminder! I=E2=80=99ll send out a differential for = this soon (I removed that entry on one of my git branches). Et voil=C3=A0: https://reviews.freebsd.org/D55544 != --Apple-Mail=_5974DC08-12B8-4313-AFBE-B25BCA1912DB Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEkHfexGRJ3gYRdA2gGpE5DjPsNJgFAmmguqIACgkQGpE5DjPs NJhrSQ/+LjGgQ2PG+g2fOlc++v7KSXI3kQ4TgtwaFfoS6bm24MtD7wnEEwaBohe3 TJOSIwNM30PswIUxf4yKT+mxR2bSCX/cX0zmhF4FKFynuNGfu5jSPqy3CEKT6pQW pMFt2JmTcLIlH2J8FXJvyRe8lq3Be8tjD3xzUBAj2qucbXXBeyxJU/DF4P+0mY31 6R86+HeEeAvJR+WHl6VyEVEMvwRfP4xGg7RMFz4xNJftt7BFnIRIdjkV4TQ48V/9 1YES/U9JIlVC3y1nUS7mOaMuB+VkgjFoOHOhRiR9NiNWgeAr7AaYxhrzexSR5ZLm CLx0IJdAqu1xzyvDeDRjQKh3dauUqxDG2ThHpXuGQpU/NDj67iUqbRIJMQx5Cw7Y 8wKGmXfV6VBwDDYrcmvTBtc7bRw9r3EAVcgGr4LmHLCju/iGNGLpGURvCmJL93pA ltHmsCvy09h49FdfkyICLejgptjwO+/A2EnifFuxyWCgjkVz2lGP6c+90afaqKm6 tTPvJdfdWX/tOtSZnouzQU9U9BpAv6ltlDTUTBlrybXb/Etw+cRDEkFdRr79QMYX m+U79r9ryhz2Fa5QwaS77rMbuZeViw6XErmhmSI/JevKdBVg7pS523PVnMjW34iT alo/tjHODHf3j2ODQElc7FAkWrrrGaQ1tEWBH37HaSvgisJYXfc= =rGgJ -----END PGP SIGNATURE----- --Apple-Mail=_5974DC08-12B8-4313-AFBE-B25BCA1912DB-- From nobody Thu Feb 26 22:47:36 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMRRr3F59z6TdKW for ; Thu, 26 Feb 2026 22:47:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMRRr148xz3VBt for ; Thu, 26 Feb 2026 22:47:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772146056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W8Dw/CPJefLk6suKaeuu5TWu4TbtJekujy05PqViMEM=; b=Snno5BESBLMWKffQzP0b5tiNZ8hCoulEPkX4FgATElyAQ0UG3LyBAABpoRSsWPZnwhcHL+ nAOSWi6KRgNdibbHCED05HJfj0/9TtNeoDNwNUsdzu7HB9yxGhkb5Yy++xpWQJ8rbgkGBC 1TwvvEa6tfi09S+7+K2wADKYleoLeCQvO8bwqAChaDSnL+YasWU+Dvh17cl68Hhkb9ZID5 WsFQ2lEFSJQePYI/Igs7S2asoG+0XXSHWBN5FqzgOy7nNwviX1QGYXWixALypsMuROO5ba UOwrYZ3O6ATfOrqhDQgmpaeOSZK3jjfsACcnIcHlr3AhrgcHKA9agVgd5y8gXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772146056; a=rsa-sha256; cv=none; b=Kb6Bta8RUsmt4tOoBlvFRcEOPJfomPeZyQrERd3JSlh4y96eLzGK8Djj411wVarr6z2g6R 7XsDdY4icJOSRcDsR9EWsR3Rboq+a8QDSEN4w1EL0ZHO6Pr5/9kjI/hsA7ChThX0HMszVx xo89PyfkAQrg9kQlWKl81gHhL89L3euylHIi0aSil6FDBop8ZB0GgO/QtoG9rXq/vsLeuM QM1g8q01eLekntUiy6CD8VhMREOg3yeAiq2PJLq7EnnrzokWCBbzaYSk4C8aNLXr++VhNy 5fuc6yOEMJtkcRhXBsXXBn3wG3cpqi50+tRj1K8QZgCIebW/1O2iLprneuT0ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772146056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=W8Dw/CPJefLk6suKaeuu5TWu4TbtJekujy05PqViMEM=; b=linKG0hX1L42Kw+aA0LRXKC2ryuCjvPh9ZnhhYkGlrugpiwKg1lICXi1k4InamKiZNME6h jZnvK+mAM31HOwcEAo4pdMk5aLd9nMg4q+5N850PAWnn1QxEpbMGVw+CsxsgUA/JCQqtv1 XxvZ+/8VocTTiIqMrIT3JqRMyi9nl+lF8anHmNXY8AkwqJ9w5vBs7U7dnZXQt0U37v2hkT NroZMCnaiwmiHJZ8LEmOJoRkxyj9ZkljyP+C0vlLb8TGRmw5shDADXWrAOcI7qdTkLKY2K dwGEEMBD3qZhI2i3Qh69RfXOPP5FSNHJ0Ti0AaX8oqUVqLk7pGwkFb9RcNspfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMRRr06TTzrVC for ; Thu, 26 Feb 2026 22:47:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a979 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 26 Feb 2026 22:47:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: c944960a5bd7 - main - LinuxKPI: remove dumm header now in common List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c944960a5bd7725e4d5e6805ec1e55b7de147c35 Auto-Submitted: auto-generated Date: Thu, 26 Feb 2026 22:47:36 +0000 Message-Id: <69a0cd88.3a979.34ca3578@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c944960a5bd7725e4d5e6805ec1e55b7de147c35 commit c944960a5bd7725e4d5e6805ec1e55b7de147c35 Author: Bjoern A. Zeeb AuthorDate: 2026-02-26 22:46:08 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 22:46:08 +0000 LinuxKPI: remove dumm header now in common page_pool/helpers.h does exist in common/include/net/page_pool/helpers.h so we can remove the dummy header file. Sponosred by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/dummy/include/net/page_pool/helpers.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/sys/compat/linuxkpi/dummy/include/net/page_pool/helpers.h b/sys/compat/linuxkpi/dummy/include/net/page_pool/helpers.h deleted file mode 100644 index e69de29bb2d1..000000000000 From nobody Fri Feb 27 00:00:05 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMT3V0yfPz6SnVM for ; Fri, 27 Feb 2026 00:00:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMT3T2vpwz3cbN for ; Fri, 27 Feb 2026 00:00:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772150405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QSeSxRjMWGX3RI2v1ei0C9SsEPtYT/PvI+uXBE3tdEA=; b=RrPFrPpgAp72JAjnqm4RtNimET4Bo4QiWhBTLvuTZ/LK9rC7TJXzE4LikPxfU0qzjovW0W I8xctxdsdO6ytMETD0LUT6Za4V/mR7VYGPr3HgmgEto4niqfXlLpON5VMTXO/GEbRHZtn/ wbALQ52FyaHgcirMN70wEzk3HncA1OSclBMIxDh5uyvu/JhmNZlINLoTafUDWMmUugW9ql a2R6EgoGmAgQUx2vv1cKrvtf6tU+QbXFZgJsQXg0nhWl2R+RwWs8zRvg0rzYK2MUeKTGc4 prwTPWLItiYFvKstNxcWYk/gLb3IGtIhVK3LCwJj+jDXWB7VCXgZvtmQnPRs9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772150405; a=rsa-sha256; cv=none; b=s1YrBCc6+yuZv989WM+OFM3X9yxd74lop5OqURknEzNkwsogshaeb+mzc3FC+tqnipqoK/ vwScFRUm+rTonKf5zyuZnfNQEGtLkoc1+sE97m+XnBjDuLUQf2x+6NivUAoNQ1l5A/PdCk khUuWIndbasicfmrlY0o/dcNWlh40H9ILK8ziMnfvBlnPHpCadeOKBvX6f47NXb++ldImW enj3cH7ke2zEVWFgvRmIoDs+0rXJNmuzdRKMXLQMk6Yoc/nQh6YpUGiC64B6Q4SD90e7+l iZQ6/71QBgtkcupbfbuqlHlIczM81gBLtcO0aePTBxhk7CQ6dNaNrqjYmqDnmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772150405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QSeSxRjMWGX3RI2v1ei0C9SsEPtYT/PvI+uXBE3tdEA=; b=NW1ISBfBvTa994rBBp29WA4Um8ChOJyKPFxFgnlUsh3xmIONWpAAgeRFhASLwtvJcHFBmE t58BNGJ9zNuh4+NU2cedAuYbbXB4xuqxrlokk/yu06e15FJgdIzuDS19Bcn5wTGg1pRP4F coc1dclI1M979UK6sAmovrC2zpRKUwx8mzO4yrjOsq1LbsN30ZfCVH+kyaN7hIv0ADYIPk 6/DrQXsKbLSWwO4AfG+2gc4m23Bu10ihgUaryNxXRePvT8cMNXtUTZ3KEhVms/UA/Kh+76 NgaIpP3yAc3ef8Um378BLI+T0iyi2CUnRPs6nJv5qThRfyWHEl3PTiivVsgEow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMT3T1yHjzt5Y for ; Fri, 27 Feb 2026 00:00:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 405e4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 00:00:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 041aa28386d3 - releng/14.4 - 14.4: Update to RC1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.4 X-Git-Reftype: branch X-Git-Commit: 041aa28386d3d78cb549c626702306bb179dc98e Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 00:00:05 +0000 Message-Id: <69a0de85.405e4.780f24de@gitrepo.freebsd.org> The branch releng/14.4 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=041aa28386d3d78cb549c626702306bb179dc98e commit 041aa28386d3d78cb549c626702306bb179dc98e Author: Colin Percival AuthorDate: 2026-02-27 00:00:00 +0000 Commit: Colin Percival CommitDate: 2026-02-27 00:00:00 +0000 14.4: Update to RC1 Approved by: re (implicit) Sponsored by: OpenSats Initiative --- sys/conf/newvers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 905c41c4d0d4..26f4c2a335f0 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="14.4" -BRANCH="BETA3" +BRANCH="RC1" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Fri Feb 27 00:00:04 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMT3Y345pz6SnVR for ; Fri, 27 Feb 2026 00:00:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMT3Y2JLvz3cts for ; Fri, 27 Feb 2026 00:00:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772150409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jBPYBWyv7OqeL/obPEvBAsuvl4vLrm8PvbviDloS+ok=; b=t0kOURFamaacllvYEqA4AqJ8Ah7SNTmxzIc8Rh/5NiLV9n/1BxwK5xI/dWSu3cDOg8z03E C8HN0tu0GQv++h/azi8XH156rMZFFoOwUWtjuu58nLLuuRuesPD7fXCMfm5FujZhYDDLUS c7e8SIbllZ15C5GEdRgPBR1ghoo0/UeGiRT0tA9dgnpbxd7OmpO+GchvtBMhu0D72R1E4z ygrMmb7JXMm2MukXzSzzAipWycmjCIwjMTjQRZm0CGvoFz6WwePuLBbVg/e9ffePI/R4Id yxkCEgFs4OWvT33enrWeFujekoDU9yOroK1gjn9TxHBPm47GZeuf2dCxh15aeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772150409; a=rsa-sha256; cv=none; b=sulLiU6F+8Zj4ktK8bu7uKsWhGPp1IvcJ/ZWcq6IZ1r5h8FxF3tJMM0lg7TyOVpihaudmu LioZUnUikttSlDrzezbpva+KFGY00v70cgiOmzagev3VzhztxphYpPFbG2vC2kxIQLjBao xyiM5cLs1gP7frUmc1SR3RIYAHww2A+KSx5e/7VP61NbZ3BJgxaQZFjo9gqk2ZGObC50o1 cePoUhL39R5mnWzh+0ob0S3TXrjl/mK6Pe3lAdTRs0QR2tJoaPcU44b8+MjZfA8YsLh1CR yw+jaCuT47FU5YQnKi0OG6dRwy4APQ5uexu06s39mugsKO7P0xporJ+mxYqNdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772150409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jBPYBWyv7OqeL/obPEvBAsuvl4vLrm8PvbviDloS+ok=; b=Dsg7FTckv6xRD20U5uAaFxZXt+StNC71hTfPwOJmUMTObrxTIztiaQsTqymWi61VyIPL4O THuEkYmyJV8r24zbJzob3eLYL7ayN8ACXFxc99OgUv6oF6cJcd0qxMmZIOXTlfnYb+xYYH /fDwgfKOROPfoVE7jOw7EDVXp4fPBwSmcTW1N10dtzor+HGgpygEQKxfQTFzxUrEDo7CHr ikEA8p+ZJtTCXMP58Dt+sjkfoDX0WepLUHj9ZBaB6B8PFeokoahpw+xJE6whfdoT2YXtTz kLHsD3NAB8Jr3bjiy2DnxxYDoJx+n7hD2NYPkoKNF97J8ivD6lYS1X8lbHeSow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMT3Y1fNHztkR for ; Fri, 27 Feb 2026 00:00:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 41141 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 00:00:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: 12143e3e3a5c - releng/14.4 - Switch from "quarterly" to "release" pkgs on DVD List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.4 X-Git-Reftype: branch X-Git-Commit: 12143e3e3a5c642449e05c4d048d1aa6eb3f0a80 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 00:00:04 +0000 Message-Id: <69a0de84.41141.a05d061@gitrepo.freebsd.org> The branch releng/14.4 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=12143e3e3a5c642449e05c4d048d1aa6eb3f0a80 commit 12143e3e3a5c642449e05c4d048d1aa6eb3f0a80 Author: Colin Percival AuthorDate: 2026-02-26 22:41:52 +0000 Commit: Colin Percival CommitDate: 2026-02-26 22:41:52 +0000 Switch from "quarterly" to "release" pkgs on DVD Approved by: re (implicit) Sponsored by: OpenSats Initiative --- release/pkg_repos/release-dvd.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/pkg_repos/release-dvd.conf b/release/pkg_repos/release-dvd.conf index 600c309d5979..79f7c4c8dbca 100644 --- a/release/pkg_repos/release-dvd.conf +++ b/release/pkg_repos/release-dvd.conf @@ -1,5 +1,5 @@ release: { - url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly", + url: "pkg+http://pkg.FreeBSD.org/${ABI}/release_4", mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", From nobody Fri Feb 27 00:36:30 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMTsc3BYzz6SsWB for ; Fri, 27 Feb 2026 00:36:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMTsb6pgYz3jqm for ; Fri, 27 Feb 2026 00:36:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772152596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hwtb/T4hwEd0DW7cWiifLAcLFGVHtrAkDqn4uurCdkU=; b=qMP5YwHdGIpRsy/SLgw5nDmJ9eVHjn/U+Td+tunR9PKqg36DFwRHb/r8CoXJSKJ7DAOU1h 1HLVcGncJUiYzwZjG+o2m/kYU1+XbeNOObv5Wuh1kb/AjGm+k514OJQyIOCjZwOlcWZygw zKukgRDRr+yBpF1TWk6ve9v9I7L8mXc8Q6NZYnaOG8M9D0xeUx9v1Ob5qnqxePpK01SK1V BToZYStrM5LzmqTBCBVGYJHjTbylSc/mpUxxHrgT/6peKaPj5mdsDFKACs/k+EK8nwdNUa hHobrdM+sH33k9tf/FDgvPTFEip1elwCLUl66PESlIs+kcFlS5hjouaarLT/fg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772152596; a=rsa-sha256; cv=none; b=WHBr+/c6vN0F//Vr9OfDyl8no3iPAs23PEmQ4RJWRqzQoHHdjQUfxQ/ZTrcxO6rc+Sxoii 9Mz0dvQzejqxDE85N1WaSy4kfaqgoTJFzQH2040MYdfhAW4LgbWkZ2tRHzvrzJNhG/YaEa eqkoHEXWGiVPmo9hSA0/dOpAX7LgC7oUqP3L1IsyyeIF3VND1xTTpTvh60nAHgrDH/qV30 gqHaSSI4jGy+mrakKGTp8U3DzWiBYlVSXNF8j9djbZRfk6Ekahea3/zpmY8mQp1Wwr7CFc ViyRvymeQQo2duJOX5u1bbdCUT14Ay6Jb7C2GObM5LB0O3VOuT2c3sn6MCKdbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772152596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hwtb/T4hwEd0DW7cWiifLAcLFGVHtrAkDqn4uurCdkU=; b=Kbfgd+VUKxCWdCNjQvIt0HCRzBFE9gRu4xwcE4gZ5wvgE+3uRWMZjgU/m790wqfFreQFfd suwECBnykAAKdSkAZDbmjq4303GESs2azpscfR6dR+mvx5PzQAvRKIvbLLDTtLNbgDRnAL FG73deghH4zM+arjjOjW7wHnUQbQlYwjzVSXE/Y83e7sM8azjyBCm3dmZGZ8lTjG8uBqE6 sKbjRw1OZRrV8B9GY+08+hI/wBCroKNMEGohQ0Rf/I/fOvJSe9L1PfPvrStzaQAxaz1LCN myMgUuyFCMVtkIkyRDyEl7y4KRf2HLd+LpIAZuFpSwU1fGx9WG4E5bnT+rawyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMTsb5nTDzvmR for ; Fri, 27 Feb 2026 00:36:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 43edc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 00:36:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Pat Maddox From: Alexander Ziaee Subject: git: 77dc773ecfcf - main - rc.8: Add rc.suspend as an alias List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 77dc773ecfcfd177c26dde4e858feb9a35fd970f Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 00:36:30 +0000 Message-Id: <69a0e70e.43edc.68157459@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=77dc773ecfcfd177c26dde4e858feb9a35fd970f commit 77dc773ecfcfd177c26dde4e858feb9a35fd970f Author: Pat Maddox AuthorDate: 2026-02-24 20:25:15 +0000 Commit: Alexander Ziaee CommitDate: 2026-02-27 00:35:32 +0000 rc.8: Add rc.suspend as an alias Make it consistent with the other lifecycle scripts, thus making it more findable. Reviewed by: ziaee Signed-off-by: Pat Maddox Closes: https://github.com/freebsd/freebsd-src/pull/2047 --- share/man/man8/Makefile | 3 ++- share/man/man8/rc.8 | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/share/man/man8/Makefile b/share/man/man8/Makefile index c408f1b65a80..de06f5b67900 100644 --- a/share/man/man8/Makefile +++ b/share/man/man8/Makefile @@ -25,7 +25,8 @@ RCLINKS= rc.8 rc.d.8 \ rc.8 rc.pccard.8 \ rc.8 rc.resume.8 \ rc.8 rc.serial.8 \ - rc.8 rc.shutdown.8 + rc.8 rc.shutdown.8 \ + rc.8 rc.suspend.8 RCPACKAGE= rc .if ${MK_NIS} != "no" diff --git a/share/man/man8/rc.8 b/share/man/man8/rc.8 index b7bd7b2de1f0..a68878f0a10a 100644 --- a/share/man/man8/rc.8 +++ b/share/man/man8/rc.8 @@ -44,6 +44,7 @@ .Nm rc.resume .Nm rc.shutdown .Nm rc.subr +.Nm rc.suspend .Sh DESCRIPTION The .Nm From nobody Fri Feb 27 00:40:46 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMTyQ68W1z6StG6 for ; Fri, 27 Feb 2026 00:40:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMTyQ5VWxz3lGr for ; Fri, 27 Feb 2026 00:40:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772152846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yjo2JbayUIIx5WCV+MZoWJRq7D8nUE50ZGF+BkKdABI=; b=pGTLiZD8kdXW0AJLqKOo1eErnW+sP9wfBHinUasKPH15B4hnVZwNKtUcOS9V8pWWLa+j2C syGYrN1HLVRAW1ypPkFsVSraQMesQ/TpMg5kh2vTbsHLW7QJHOGbZMEBVgmoWtnkutSZsl GRZkSLCqjcuovP4ft4zgWaFW+LfiMmHNiiFRREFK1ehSPRZ867gIYfnc9sYvBRHbHAHyIB yIsg9VX+AKV4yO4BOfFTQTQ1G2Ps6yuOQKoNdMvvQkwPY4UqPqtxXRXf86iCNPaSX/NiVl DF+dd58s9KSuDjvVZdUlgz3eYR8ZPCvP9NL4D1fzrSBxg3cl05SIL/Sl+yXUhA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772152846; a=rsa-sha256; cv=none; b=kvRCj5iExrND3CxNVfJHqlgLeJt4m4OMpncLzBDLEDny50h2WBg4A8CrBqirW99t/UKkLR HU/ugAgvHxAMnJ/N2rFEfwHxWeSpGlz8zQFv0B81cMXzngGBorgvUzpV9/lR6gdxFSKfJg InN0FiK4LR1xrWeUC6anCilRWQB4HSiQxJxieI7s272ssUcTCkMa9iLJHbsEeUiE4yXVRj yHMzKOQCCUgrIGnbULbyaqHTcFkGAW4SQ/vCYIerSVuavYWPW8F6tctpOLr7vs3SIBiYbk ictIwbWvOO1G6VqdcCXm1bwsFcdGn6v4ZrYYEOyHrWrKincQBVFsSaQkmyGcbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772152846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yjo2JbayUIIx5WCV+MZoWJRq7D8nUE50ZGF+BkKdABI=; b=sUulQDQwc3tX6oFukyTMAog0s8GvIvYyrFJFpqsBeF6E74ddfDdKOj6htwW6SEi6Hl6y8k /qNelZwthshzsovVNWFfaF7xXJOh7M3ZgiDg3pEyNR8Ds5+hmX88CzBolOrPrJkvmct4c4 TZnhDPNcZUV53ihQgpouU5VK7pc7exbmMgqjRFOQz4/1RbsNhxBbW7zJcIp8WYCaKb4Zod ap3YZhkfKqbpH6hA7CzY45F1SMrKuxRf9esW3ki5zjG/jYZyQjovIRo+ZafbbJcD800C7h zc7CFQGAQjcA9B0V3rwqQyUbIH/9SWi+Z8zZsWAe52fpjH1NeFYVEGRoaGB3gQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMTyQ54dBzvSp for ; Fri, 27 Feb 2026 00:40:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 463d2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 00:40:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 7951411672fa - main - sanitize.lua: A tool to extract interfaces from files List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7951411672fab14367d9e785bfc6fe7d9a29668c Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 00:40:46 +0000 Message-Id: <69a0e80e.463d2.1099fb1d@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7951411672fab14367d9e785bfc6fe7d9a29668c commit 7951411672fab14367d9e785bfc6fe7d9a29668c Author: Warner Losh AuthorDate: 2026-02-27 00:40:10 +0000 Commit: Warner Losh CommitDate: 2026-02-27 00:40:32 +0000 sanitize.lua: A tool to extract interfaces from files This is a simple too to remove all comments, extra whitespace and other unnecessary things that may have creative content. What remains can be just the minimal interface described by the header file. When used with care, this can mechanically sanitize files, like some device tree bindings file, that are only #defines that are meant to be used in multiple context (the dts files and in C code to interpret the resulting dtb). Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D55087 --- tools/tools/git/sanitize.lua | 53 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/tools/tools/git/sanitize.lua b/tools/tools/git/sanitize.lua new file mode 100644 index 000000000000..a1c9317f3727 --- /dev/null +++ b/tools/tools/git/sanitize.lua @@ -0,0 +1,53 @@ +-- SPDX-License-Identifier: BSD-2-Clause +-- Copyright 2026 Warner Losh + +-- +-- Removes all comments, blank lines and extra whitespace from a C header file +-- and inserts a generated from comment at the top. Generally, this extracts the +-- smallest subset of the file that describes the interface that is necessary to +-- interoperate with that software. The user of this program should check the +-- results, however, to ensure the result minimally describes the public +-- interface. +-- +-- When applied to device-tree binding files, this will result in the #defines +-- being extracted, which are needed to generate the .dtb files, as well as for +-- code to interpret the .dtb files. The device-tree files must be written this +-- way to be used for this dual purpose. Other header files may not be so +-- constrained, which makes review necessary for those context. +-- + +-- +-- Useage lua sanitize.lua fn description +-- +-- fn will be read in, sanitized and the results printed on stdout. +-- The description will be all remaining args and will be inserted +-- in the first line comment to describe where the source file was +-- obtained from. +-- + +-- Open the file from the command line +local fn = arg[1] +if not fn then + print("Usage: sanitize fn") + os.exit(1) +end + +-- read it all in +local f = assert(io.open(fn)) +local content = f:read("*all") +f:close() + +-- Transform +content = content:gsub("/%*.-%*/", "") -- Remove block comments, .- is lazy, not greed, match +content = content:gsub("//[^\n]*", "") -- Remove single line comments +content = content:gsub("%s*\n", "\n") -- Remove trailing white space +content = content:gsub("\t+", " ") -- Convert blocks of tabs to a space +content = content:gsub("\n+", "\n") -- Remove blank lines +content = content:gsub("\n+$", "") -- Strip blank lines at the end (print adds one) +content = content:gsub("^\n+", "") -- Strip leading blank lines + +print("/* @" .. "generated from the interface found in " .. fn .. " -- result is in public domain */") +if arg[2] then + print("/* from " .. table.concat(table.pack(table.unpack(arg, 2)), ' ') .. " */") +end +print(content) From nobody Fri Feb 27 00:57:37 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMVKz1Z7Pz6SwBS for ; Fri, 27 Feb 2026 00:57:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMVKy4nR5z3mQt for ; Fri, 27 Feb 2026 00:57:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772153862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u8KwWVKkkJVzNRGvG+o7shEhcHAPLo/e+HeQO83IkBc=; b=kn4K2PR9AB9GbbqzS5H6+V4YrxLrs8h2Dcy0mGnNqSZ8gw22uyFc6xZYYL5JTOrgePhkSK GDsaXcLt5deiPVEXmYBkH/sqkBuctdIS1yaqk4ubQhqcjoRuy0ai3NEnOP4GNh9rtScwZW JHMYYQqaTWyOGVHRMjGCAJ14r6Cy2NUm7hKcmbyjK+MwolBSwZMy6dx4Nv+ifMYUM2/gAu EO32jneUzNL+AbSaWlcfAlCzznH8A+Xm2aWnDvnSrsox/AkTTkiTM3C2Wb/OnBdsxKHOO0 ag2OcxVQ3gzKLsb/srzZeWWXR6ZsiCb+H/+InMgKtrDTwafBvrBcbBVgpOKWbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772153862; a=rsa-sha256; cv=none; b=gpWpYok02hI8LsXiCx3VubSd3h+I7IEj2wUwIB04UHVM/qSeTQlhc1NNQvrw250exLfj7Z 0Zop9RX8rs4W+3iffuyBDoCF7/EAI9H1mrY0aPAnLHjbRi0CkxP0ln6xds+r4o2MYzXyRS v815TIj9Jb/E48pVTbTUlv2nHe91VGgmBlCIqMR0C91kwKQu0K/M3teN5xpb/uFw3xRJbW 8rePiEYMhABCXTg5jCLydsHhibLXs9qhS91mTr9DwXVCFAyOOuVj+N46sUZ19CBe405eOe x3s/NsHhYFdGCEEsN/vdbzVQPyF+IAav+YEpgyQ0LGL4ZDCUFyS1XUObY7KTNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772153862; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u8KwWVKkkJVzNRGvG+o7shEhcHAPLo/e+HeQO83IkBc=; b=GRSiR2gBJ0sVvBYlt5K/R13XPKDrChRwXGXgXbp8BMsGKteU1YK5NsBE42t/wUrqSIUZTK bELZRUV6Qz+KhFUgMMldt7gRUlTuZce6XqhgKJfAix/tlydvlU16ccJD0bXI2SgICUGauB DmCV49+KitzH3tGU0VgVnDv7zYmiG1qEHpcATbiEqZp57mjSlmIibO/2TZlVxllMBP9C0z kh9WGbwiyNSmq34H+jk8mMN+Vk/uSkcwOtRZYtbXSPUDINxrLKMUURjGZvVS1O/F1PbG+7 DpXuMbPMFgdilcp0AmAna5PAM+oIVSc+d1Ru1sX0n0Y/62/jUZ3eTFg4StbtLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMVKy3c3GzwGh for ; Fri, 27 Feb 2026 00:57:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 46367 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 00:57:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Felix Johnson From: Alexander Ziaee Subject: git: 86dc5dd0b2a8 - main - newgrp.1: Provide examples List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 86dc5dd0b2a861cf9d8cad18fc17c17dbbfc4465 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 00:57:37 +0000 Message-Id: <69a0ec01.46367.9c02401@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=86dc5dd0b2a861cf9d8cad18fc17c17dbbfc4465 commit 86dc5dd0b2a861cf9d8cad18fc17c17dbbfc4465 Author: Felix Johnson AuthorDate: 2026-02-27 00:45:03 +0000 Commit: Alexander Ziaee CommitDate: 2026-02-27 00:57:20 +0000 newgrp.1: Provide examples "These examples appear to be originally noted thirteen years ago by Mark Saad, contributed by eadler, put into a patch by Felix Johnson, and made into mdoc by myself. Finally, put this bug to rest." ~ziaee PR: 167742 Co-authored-by: eadler, ziaee, Mark Saad Differential Revision: https://reviews.freebsd.org/D48877 --- usr.bin/newgrp/newgrp.1 | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/usr.bin/newgrp/newgrp.1 b/usr.bin/newgrp/newgrp.1 index d9701feef0d7..032aeb72616d 100644 --- a/usr.bin/newgrp/newgrp.1 +++ b/usr.bin/newgrp/newgrp.1 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 8, 2013 +.Dd February 6, 2025 .Dt NEWGRP 1 .Os .Sh NAME @@ -67,6 +67,21 @@ exits >0. Otherwise, the exit status of .Nm is the exit status of the shell. +.Sh EXAMPLES +Create a new group, +.Ar foo , +with +.Xr pw 8 : +.Pp +.Dl pw group add foo +.Pp +Set the group password: +.Pp +.Dl pw group mod foo -h 0 +.Pp +As a non-root user, switch to the group: +.Pp +.Dl newgrp foo .Sh SEE ALSO .Xr csh 1 , .Xr groups 1 , From nobody Fri Feb 27 01:01:54 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMVQp40YPz6Swdp for ; Fri, 27 Feb 2026 01:01:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMVQp3Bmnz3pVX for ; Fri, 27 Feb 2026 01:01:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772154114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L53YHYAEB14kUwTTswOkmmvh2dAfCHRo0J/VLKcMDGY=; b=f8K28iaW1kw5TmHs0TCTXcTewp4wewlpHUKiga0uHX21LruHIaw+T8HgkXW59xg5VGxh+d drUi76hY1Bs8YCzlsKT3qYhQKk3dV1Sg/Wc3C0Nte9L9Tl+T9G/bO2R3yhxwuI/HzcVR4H uCcbNnVTRhTnLKKvfxamLMdJiaoqPxLIDp04Ed7DLOaBQXa7cUTlBwUzTfRxkzZzSVmHrx k7chDEzJ4DSK6PdHRnrl9pO811AMYrZaScUDGkFAihNJvfaWTgFyN1Kwpe92YtKF338Qdd Un0S1jJdrEcOt943cqnLpUURpOm31v64oUq80r/Cxiu+5PRyiI5ci9U/P/U/sw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772154114; a=rsa-sha256; cv=none; b=FWOUSCfU+RS7Ef1vxFsitScee5D2+gefy5kfAIXP4kqxGrRYKynvbcgUs4ODkx3bK5TmxA T/2O1HFvg0vXzYcT86QmdB2p4S/EzKWrE+qdJEACnTLyVLrLgLGo/fb5NF4QFA8Xm3iaGW SWxPqMXhZNz9ZotOWHTz2vkateB217fD0Pt35pmF9uxp2tyqiwkwbByZ1ZsDsgDh7zHcom qxD2LUwcayzt2PFFU/mkvLYgAQxQhAxeAmun3XODimsNu9TQIbNZyrRXBM6DAnDmrqQNOI nJAKaouSqVeHYeOkLD0qzUF5zRZ/PK7MjTZMagNiQFoFfow+dHnLAEoS0snmfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772154114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L53YHYAEB14kUwTTswOkmmvh2dAfCHRo0J/VLKcMDGY=; b=OU9/tkvk7Uz3ayw28cN23BY2SKYKdMkQDRehzVj+DwWRdQvtZFptCQFbyApFbftEl2JfPz 0NQbPgxxisducLmlE3gMAjyCZTe5I8JycCaZj5bUWyEvcW+Jlgfuopr/sPoxlM+oZ1ZI5V SI6rdEoGKjZFOvxlE9zSQ3JsbqnUmpfv/a/eoZnt7+bpM/xsh5/VZcpmZp8TubUDK04roJ yLKVo7ROpp2tby/4iD5xeo7MsOwNTZSAXLJE9OFt8fh89o7SJa6PKunczioGbxK3a/y3qt ZnDKI9GvfCY7wSs9eF0eQMwOH7+hCyZfVYZgi20Q6E4qwrl+4IWXFgoyMAg1VQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMVQp2m1YzwKR for ; Fri, 27 Feb 2026 01:01:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 47d7a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 01:01:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Gleb Smirnoff From: Warner Losh Subject: git: d69fc3a9dc71 - main - loader.efi: try all ZFS pools found by efi_zfs_probe() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d69fc3a9dc71768e125e83d35274f0820063e42d Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 01:01:54 +0000 Message-Id: <69a0ed02.47d7a.427b6404@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d69fc3a9dc71768e125e83d35274f0820063e42d commit d69fc3a9dc71768e125e83d35274f0820063e42d Author: Gleb Smirnoff AuthorDate: 2026-02-27 00:57:26 +0000 Commit: Warner Losh CommitDate: 2026-02-27 01:01:36 +0000 loader.efi: try all ZFS pools found by efi_zfs_probe() Remove global uint64_t pool_guid and instead iterate over all pools that efizfs_get_zfsinfo_list() provides. The global pool_guid used to mark that we have constructed a ZFS pool and the pool label that was used for that was stored on a partition that is the EFI image device handle. First problem here is that it is too restrictive. If the very first device to probe is a spare member of a pool, it will be used to instantiate a pool but (pd->pd_handle == boot_img->DeviceHandle) won't be true, thus global pool_guid won't be populated and ZFS boot won't be tried. Second problem is that potentially we may find several pools, and all should be tried to boot. Note that the code for that is already here - efizfs_get_zfsinfo_list() is imported by efizfs.h but was not used until now. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D55094 --- stand/efi/include/efizfs.h | 2 -- stand/efi/libefi/efizfs.c | 9 +-------- stand/efi/loader/main.c | 9 ++++++--- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/stand/efi/include/efizfs.h b/stand/efi/include/efizfs.h index 45c2ca1c94aa..5f50b7740a55 100644 --- a/stand/efi/include/efizfs.h +++ b/stand/efi/include/efizfs.h @@ -49,8 +49,6 @@ typedef struct zfsinfo uint64_t zi_pool_guid; } zfsinfo_t; -extern uint64_t pool_guid; - void efi_zfs_probe(void); EFI_HANDLE efizfs_get_handle_by_guid(uint64_t); bool efizfs_get_guid_by_handle(EFI_HANDLE, uint64_t *); diff --git a/stand/efi/libefi/efizfs.c b/stand/efi/libefi/efizfs.c index 1c80f1ae26b9..563cf841143a 100644 --- a/stand/efi/libefi/efizfs.c +++ b/stand/efi/libefi/efizfs.c @@ -40,8 +40,6 @@ #ifdef EFI_ZFS_BOOT static zfsinfo_list_t zfsinfo; -uint64_t pool_guid; - zfsinfo_list_t * efizfs_get_zfsinfo_list(void) { @@ -111,13 +109,8 @@ efi_zfs_probe(void) STAILQ_FOREACH(pd, &hd->pd_part, pd_link) { snprintf(devname, sizeof(devname), "%s%dp%d:", efipart_hddev.dv_name, hd->pd_unit, pd->pd_unit); - guid = 0; - if (zfs_probe_dev(devname, &guid, false) == 0) { + if (zfs_probe_dev(devname, &guid, false) == 0) insert_zfs(pd->pd_handle, guid); - if (pd->pd_handle == boot_img->DeviceHandle) - pool_guid = guid; - } - } } } diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 7ff2cf188509..d8508d7d91a0 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -588,6 +588,9 @@ find_currdev(bool do_bootmgr, char *boot_info, size_t boot_info_sz) } #ifdef EFI_ZFS_BOOT + zfsinfo_list_t *zfsinfo = efizfs_get_zfsinfo_list(); + zfsinfo_t *zi; + /* * Did efi_zfs_probe() detect the boot pool? If so, use the zpool * it found, if it's sane. ZFS is the only thing that looks for @@ -595,9 +598,9 @@ find_currdev(bool do_bootmgr, char *boot_info, size_t boot_info_sz) * if we allow specifying which pool to boot from via UEFI variables * rather than the bootenv stuff that FreeBSD uses today. */ - if (pool_guid != 0) { - printf("Trying ZFS pool\n"); - if (probe_zfs_currdev(pool_guid)) + STAILQ_FOREACH(zi, zfsinfo, zi_link) { + printf("Trying ZFS pool 0x%jx\n", zi->zi_pool_guid); + if (probe_zfs_currdev(zi->zi_pool_guid)) return (0); } #endif /* EFI_ZFS_BOOT */ From nobody Fri Feb 27 01:01:55 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMVQq5FL3z6Swm7 for ; Fri, 27 Feb 2026 01:01:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMVQq48rvz3p63 for ; Fri, 27 Feb 2026 01:01:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772154115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0gL/w7hZzq+kWp8fg5aCthOD5jCuKmHhN9qnt4SmDIE=; b=GuEAXgsK5UQSfpETOqw/G0zmS7n93qHYM5OIky5KvzwDsmWxZ2sUriPCFPdWqOJT8vStV8 6Mp6HzeaHQXzLAYetbprDgYDZ68KlD/H3NZKuSxmC90bFZtSW1W+Q7gR2+U+TluCGEJ9Ht iQpuvI/LPOibG1XCOlgcG4xIFGtVAmeC/wLAw4btfaCWMDsN8wPD0xq2uFoHNims9UGnSf ++L7cUrT4RuIzEKroAaDw+HalI8rLjNCm+vinzXZFNjHkni9N/8dzTxYyWROemMFeNYU1V YpON6VUHjP26BIibtR+6njlbc9ZiV5dHaJUXSH2vxe0EexAqq2VC6l5m2csUww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772154115; a=rsa-sha256; cv=none; b=T3RZXcyi30P6izEJSSNPWIaYY8Hgv2Uhyni1tt7M+XNnh+R3XRubaOb2bd04FiIRq4oV9f wzuXRbMsRATRhaKXS53I0tpFUEcqsSzBLFTTbjglhZ3NQHk4zGQ0t2GbJdm7owAfjChbqj GObtVpnsqeT42nt9HOiLWXnUqEIDi6wSCsGBK2Vaze/4mJ1RvBpPdNYxv5dr11lgS7GDXu NqCvwsuRmekxW+n3Bc83K+4xVYAv5XKI6IIMLIozYKZ/2SrWcKkjcTK9lsrTey/kTwT2dl 6dOxMvhDrOuDscP7vult5YTzNJeIHJNLFCe9+MvoN/gQL6vTZVG6OvYh9FTsaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772154115; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0gL/w7hZzq+kWp8fg5aCthOD5jCuKmHhN9qnt4SmDIE=; b=Su12TZdAVbMMbP/6CFwyereumYSXm2RTf3yaHqz0ug7WdKcNEW/wllrjOPweSCVkLQlnsJ 0hEHoVtPdJkBZdoYx4djSqAw1XnwS4R1/HkmA1iHrpe3AvoXAV2aBKEmJWJ0uX0mE8j0rF iZ+1QcCdqzWZz3MQYguaYVW3g7olyH4qkCTCA9z4EF6MENudT/JW/mmDt1TJ+ZKOUSM326 HXxxbNrHdNL82zV/Up6INhNiqoK0optVnPRY4iYWUTX+0i+mUCeii+gCc6BV4nKWkkbI8/ NyuOGgbITzAmXyo1/c1CIeJTntNvQ5XkUU9Gx/TmI3L9g8Vzo3f1yXUnqvwjLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMVQq3DWvzwMt for ; Fri, 27 Feb 2026 01:01:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 45d75 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 01:01:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 784150fd2535 - main - stand/efi: Allow RELAXED or STRICT boot policies List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 784150fd25351f4a38f4d983882f4a26cc5d3272 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 01:01:55 +0000 Message-Id: <69a0ed03.45d75.2a153af5@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=784150fd25351f4a38f4d983882f4a26cc5d3272 commit 784150fd25351f4a38f4d983882f4a26cc5d3272 Author: Warner Losh AuthorDate: 2026-02-27 00:57:39 +0000 Commit: Warner Losh CommitDate: 2026-02-27 01:01:36 +0000 stand/efi: Allow RELAXED or STRICT boot policies The RELAXED boot policy will automatically search for any root filesystem (currently zfs only) on any device. STRICT policy only searches on the boot device. RELEAXED will still prefer the device we booted from, which is the smallest behavior change we should do. STRICT may be needed for releases, though. Sponsored by: Netflix Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D55107 --- stand/efi/libefi/efizfs.c | 10 +++++++--- stand/efi/loader/main.c | 40 +++++++++++++++++++++++++++++++++++----- 2 files changed, 42 insertions(+), 8 deletions(-) diff --git a/stand/efi/libefi/efizfs.c b/stand/efi/libefi/efizfs.c index 563cf841143a..8ad410488b9c 100644 --- a/stand/efi/libefi/efizfs.c +++ b/stand/efi/libefi/efizfs.c @@ -76,7 +76,7 @@ efizfs_get_guid_by_handle(EFI_HANDLE handle, uint64_t *guid) } static void -insert_zfs(EFI_HANDLE handle, uint64_t guid) +insert_zfs(EFI_HANDLE handle, uint64_t guid, bool head) { zfsinfo_t *zi; @@ -84,7 +84,10 @@ insert_zfs(EFI_HANDLE handle, uint64_t guid) if (zi != NULL) { zi->zi_handle = handle; zi->zi_pool_guid = guid; - STAILQ_INSERT_TAIL(&zfsinfo, zi, zi_link); + if (head) + STAILQ_INSERT_HEAD(&zfsinfo, zi, zi_link); + else + STAILQ_INSERT_TAIL(&zfsinfo, zi, zi_link); } } @@ -110,7 +113,8 @@ efi_zfs_probe(void) snprintf(devname, sizeof(devname), "%s%dp%d:", efipart_hddev.dv_name, hd->pd_unit, pd->pd_unit); if (zfs_probe_dev(devname, &guid, false) == 0) - insert_zfs(pd->pd_handle, guid); + insert_zfs(pd->pd_handle, guid, + pd->pd_handle == boot_img->DeviceHandle); } } } diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index d8508d7d91a0..f83db2e0668d 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -143,6 +143,16 @@ UINT16 boot_current; */ EFI_LOADED_IMAGE *boot_img; +enum boot_policies { + STRICT, + RELAXED, +} boot_policy = RELAXED; + +const char *policy_map[] = { + [STRICT] = "strict", + [RELAXED] = "relaxed", +}; + static bool has_keyboard(void) { @@ -592,13 +602,14 @@ find_currdev(bool do_bootmgr, char *boot_info, size_t boot_info_sz) zfsinfo_t *zi; /* - * Did efi_zfs_probe() detect the boot pool? If so, use the zpool - * it found, if it's sane. ZFS is the only thing that looks for - * disks and pools to boot. This may change in the future, however, - * if we allow specifying which pool to boot from via UEFI variables - * rather than the bootenv stuff that FreeBSD uses today. + * First try the zfs pool(s) that were on the boot device, then + * try any other pool if we have a relaxed policy. zfsinfo has + * the pools that had elements on the boot device first. */ STAILQ_FOREACH(zi, zfsinfo, zi_link) { + if (boot_policy == STRICT && + zi->zi_handle != boot_img->DeviceHandle) + continue; printf("Trying ZFS pool 0x%jx\n", zi->zi_pool_guid); if (probe_zfs_currdev(zi->zi_pool_guid)) return (0); @@ -1189,6 +1200,23 @@ efi_smbios_detect(void) (void)smbios_detect(smbios_v2_ptr); } +static void +set_boot_policy(void) +{ + const char *policy; + + if ((policy = getenv("boot_policy")) == NULL) + return; + for (int i = 0; i < nitems(policy_map); i++) { + if (strcmp(policy, policy_map[i]) == 0) { + boot_policy = i; + return; + } + } + printf("Unknown boot_policy '%s', defaulting to %s\n", + policy, policy_map[boot_policy]); +} + EFI_STATUS main(int argc, CHAR16 *argv[]) { @@ -1287,6 +1315,8 @@ main(int argc, CHAR16 *argv[]) read_loader_env("LoaderEnv", "/efi/freebsd/loader.env", false); read_loader_env("NextLoaderEnv", NULL, true); + set_boot_policy(); + /* * We now have two notions of console. howto should be viewed as * overrides. If console is already set, don't set it again. From nobody Fri Feb 27 02:29:13 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMZ0XG3z6T7T3 for ; Fri, 27 Feb 2026 02:29:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXMY5BFmz40Mb for ; Fri, 27 Feb 2026 02: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=1772159353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rcs+Ddw4NLf9e1P9zfFSpg/If6e/dzANY2+kvFKdQa8=; b=WHNoBHaJQn5qlM6f4faFiE9ZZc1oXhZYYD/iJyHmd2qYQ8KnrL7+Kl/bGc/SttBxc08SpZ h7/o9lPSqXKwYUli8qlqVNZVoHAVv46kLb3mwML2p+auMPbdXay53NkrMebdzMBZoswYL0 BYYgUwcBuggVV/Pxv6N3mP5jFPm/RnCs/xxoVPEFw0owaY+Kdxk9wRCxjmbQTh0yffj2+Y HLse1vNz47Wq0PADJWzn8969vhH/EbRtPZz8E0AycXsEGHn62PgZ8QWuRq1T3onutoQQ7g nlxpZ+eMMVibxipyozFFijdOuZ5bPpkQp9q0Hov3Q342Oujj2HQsW5qiK3UPyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159353; a=rsa-sha256; cv=none; b=NbrhLIRVWlb/jdguZsN85hA5VaSvTrfi9yHcUltAl+pbEZvqR5Q2s7jk9jd723XqGPBC9A x+zzopHTQj8lIGI2P8Gd09MqyBeQbIO6bcILQO6U53m3lDMhPpBKBjg/sRSHdatNELK4U0 hiAAqcCeIlP2QgDJkr/zSpy9PKMRtTXf2uDYgkHbNHVhP8WgATK+YdjL90GSjasFIOpupE Yjddd/O6HR6SxaHqoh9ohr06VYTjK3JMVrNmKy37Ds9tcZzGvFe32iWzVv+oea13IV4U4G kk9tuGLE8qBihqHjqOkGGP02ADfv/ZE3tBnok2T6uium7ZztQPPve4/mKPFxJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rcs+Ddw4NLf9e1P9zfFSpg/If6e/dzANY2+kvFKdQa8=; b=Yw2p0gb/eXwv732pEH+eZ7I5trArRUkher5pDuTuTGgF8evtV28Rr3pjRcnXdrgR69I3iT +B3AwoGfiu/3U/QCQCHy5pFFMF9f21f5s4prf41ppc4GWoEMmS9dFislPjZeuv26NTQUw/ nWdwrpWtH18aiGC3f4b166SCMvYPl72v4XeCuRVpSrpSp7uM8YfDzdmvMdHC6r7tsoz7+A xmZR5xlaS3v+jj1j52iRiWtqnLS91L+CbXIJ5t8VkXIIAGbHHwXigLtft2yp7OR+Iczzw1 GuYkfSQ2ZkmuDzgHGzcpFx05mLez0rCk3M6RflQp1h0i/uK/G1/3qiTilfIW0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMY3l9VzxQt for ; Fri, 27 Feb 2026 02:29:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21fac by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: b24e74670c84 - stable/15 - net80211: correct return code for ieee80211_ampdu_request() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b24e74670c84da9c00a999a8ceb1c5906262dec0 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:13 +0000 Message-Id: <69a10179.21fac.eb1b5ae@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b24e74670c84da9c00a999a8ceb1c5906262dec0 commit b24e74670c84da9c00a999a8ceb1c5906262dec0 Author: Bjoern A. Zeeb AuthorDate: 2026-01-20 13:48:11 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 22:57:10 +0000 net80211: correct return code for ieee80211_ampdu_request() We used to return the result of (*ic_send_action) directly but ieee80211_ampdu_request() returns 1 on success and 0 on error, which is contrary to the result of (*ic_send_action). Deal with that accordingly and update the documentation of the function. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D54794 (cherry picked from commit c670af3725d0bb5494caf0846994ae6997175cb6) --- sys/net80211/ieee80211_ht.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c index b22e0cf52a6c..b3c9532764d9 100644 --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -2766,10 +2766,15 @@ ieee80211_ampdu_enable(struct ieee80211_node *ni, return 1; } -/* - * Request A-MPDU tx aggregation. Setup local state and - * issue an ADDBA request. BA use will only happen after +/** + * @brief Request A-MPDU tx aggregation. + * + * Setup local state and issue an ADDBA request. BA use will only happen after * the other end replies with ADDBA response. + * + * @param ni ieee80211_node update + * @param tap tx_ampdu state + * @returns 1 on success and 0 on error */ int ieee80211_ampdu_request(struct ieee80211_node *ni, @@ -2777,7 +2782,7 @@ ieee80211_ampdu_request(struct ieee80211_node *ni, { struct ieee80211com *ic = ni->ni_ic; uint16_t args[5]; - int tid, dialogtoken; + int tid, dialogtoken, error; static int tokens = 0; /* XXX */ /* XXX locking */ @@ -2828,8 +2833,11 @@ ieee80211_ampdu_request(struct ieee80211_node *ni, args[4] = _IEEE80211_SHIFTMASK(tap->txa_start, IEEE80211_BASEQ_START) | _IEEE80211_SHIFTMASK(0, IEEE80211_BASEQ_FRAG) ; - return ic->ic_send_action(ni, IEEE80211_ACTION_CAT_BA, + + error = ic->ic_send_action(ni, IEEE80211_ACTION_CAT_BA, IEEE80211_ACTION_BA_ADDBA_REQUEST, args); + /* Silly return of 1 for success here. */ + return (error == 0); } /* From nobody Fri Feb 27 02:29:14 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMb1SB8z6T7bc for ; Fri, 27 Feb 2026 02: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXMZ5jKPz40KR for ; Fri, 27 Feb 2026 02: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=1772159354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iGP4Dw83AYYDHVsmrNI9lZ4Y0T2Eg4pT5YZKawJXzto=; b=NENnx3JMZeGGVPlpoN8th2VKmWbSresLVYk0GmYBrax6jNZBek6wsCCy7xAif9/I5MxAGL 2cGoOTRVfcP+obgJv7qA7/de0o+g5m52+J2xF4igPZH3M7+yNEpYacfG5mfya/ZMO0LGNa yXOf9McmC1JpeWUFZYf3WO3ka7FbGJvTRCDhypY7mARUBhMzG9KEgWemNF7txZCbKpFl6I px8HnfgK7lC6wMVSUPa2P19GzQOD1Ntt+Zvvfsx/PMuHfzn6kU2GIxjPHYf+V/daSUKrBE BWEOGjKqxWBUUyFAFbSMW3jL9FbHR+xVhBZ8/NrKJT6XWDKLxdhb72y8c0YRzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159354; a=rsa-sha256; cv=none; b=EbpP1aOJcORs/fW/NAqJir7U+FF25Q99G7vQS6ukA8aLf+MAa6p8EsbZfYE0opxjg8lemT xM/skobwvlRYVg2ei+5cmVZBKEP8MD3iWkM9SpRg9tePMq/e78XAFBLc7Bg6hSuVdx4sQ3 UgmYpaggV7vh9qiSpjpDGbv6U/h/roTkESKcD7fWio3RofhXZwkXw1CGVWtyAHhWBQ13lP XnDt1oOAYuDB7xK3rXjbxTsuIkjp0WDsbi7C2/3WD3pqbfH8R+qmUkep1pdPOsUFffCgbL 2G8DbCa9QLRo9U7R1VdXi3rReg8pVvvMviZ5/Nqu1KccSxhR6xolRx8Bh3c/eg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iGP4Dw83AYYDHVsmrNI9lZ4Y0T2Eg4pT5YZKawJXzto=; b=EK+ncXnZjv7kuv0zfo6P/ngnoW9Ki89lYD7BtkLXM02KMnhT9fy4CdJu92/nk6Xj05rAyt McteVw8Pr1hSOnl9a/wxJnEcK8m8C+x1N9Sew6hNOOBeKUG/QdN7ZfrxJPS3uJmwOMYmxK 5V9IhqA3Ur/BfJ7SaLT67GiyeFwWV+sy7k/ZxNT/3VxYEe5M+m0O8Bg19uP24duwml2PCf 8wD0HSCUgbKLwOfwlhpWVyz7KM2WG4Kcd1qd3X5YCMhB/fjTBS5DUnfMsqRLxyC+IM3tGY qbhE6uxLNdLL+/paCAvWNHRsEhJxgZg5nk1BQ7gIsDvpk1xVMMRICFJw+BTcjA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMZ44N7zyZM for ; Fri, 27 Feb 2026 02:29:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21fb0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: 6aae48bed4cb - stable/15 - LinuxKPI: 802.11: Management MIC element can have 8 or 16 octets MIC List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6aae48bed4cbb6267a8d456140504a78d0a90903 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:14 +0000 Message-Id: <69a1017a.21fb0.69839b97@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=6aae48bed4cbb6267a8d456140504a78d0a90903 commit 6aae48bed4cbb6267a8d456140504a78d0a90903 Author: Bjoern A. Zeeb AuthorDate: 2026-01-20 18:55:00 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 22:57:14 +0000 LinuxKPI: 802.11: Management MIC element can have 8 or 16 octets MIC Management MIC element (MME) can have 8 or 16 octets MIC. Add a second structure used by at least iwlwifi and update reference to latest standard version. Sponsored by: The FreeBSD Foundation (cherry picked from commit e4a4841d7acbded7862175d46dfe325b44016495) --- sys/compat/linuxkpi/common/include/linux/ieee80211.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index b5051a9f7d21..c81ddf7d24b2 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2020-2025 The FreeBSD Foundation + * Copyright (c) 2020-2026 The FreeBSD Foundation * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -51,8 +51,16 @@ extern int linuxkpi_debug_80211; #define IMPROVE(fmt, ...) if (linuxkpi_debug_80211 & D80211_IMPROVE) \ printf("%s:%d: XXX LKPI80211 IMPROVE " fmt "\n", __func__, __LINE__, ##__VA_ARGS__) - -/* 9.4.2.55 Management MIC element (CMAC-256, GMAC-128, and GMAC-256). */ +/* 802.11-2024, 9.4.2.53 MME. */ +/* BIP-CMAC-128 */ +struct ieee80211_mmie { + uint8_t element_id; + uint8_t length; + uint16_t key_id; + uint8_t ipn[6]; + uint8_t mic[8]; +}; +/* BIP-CMAC-256, BIP-GMAC-128, BIP-GMAC-256 */ struct ieee80211_mmie_16 { uint8_t element_id; uint8_t length; From nobody Fri Feb 27 02:29:15 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMc259Zz6T7Lb for ; Fri, 27 Feb 2026 02: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXMb5D9Mz40Yk for ; Fri, 27 Feb 2026 02: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=1772159355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hb8Dm+xQ/ejzhtC+LWWTxtNjVzMuW9qb9d5ULtsaKfs=; b=cYyPHNMA+Pf+rXlh+Ckb4fnT6BJzbNzFNRlB1AGpQ4dgG/GtHX/s3IwYXGqJF797/HB3tR zW4C08ZcK0PJI1uobrZvls1VNbU81Au3PMjDrCsG2KIW2AoTD6eND8YnraF0QxDh6I8fik /ZlJVig0ozwDHhwUpHo8z4IRHhgYLFBglyR90Y74JAeFB+raODngjc32+irwL5nqqZNv+V AGhVg4xx2ZX7Go/apylbVCZ83an+yPlGKp+Jm3UDfjgWvYB+wRiZjle04MeIUoflnaWyGn EM5si4P07W3DcxsuUz2RR/mU9Qqr1ap1LNPYgqyAOkCStBdzidG9NqfUpIpbjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159355; a=rsa-sha256; cv=none; b=Zh5v6Acwh3PyaZnG5UL90kCgwjTcu27y/GgUz7EgRcCQa6PklxAQE0mXKSXnZiM9ry99dY ev5Wlu4tAMWJhdAcmMDsptg3JM2XAotz/hnWx/HyjqbIQi4+coRxklTpITOmFU31VyZshm Pt6jSq2VRrrwVWErLB7HUKkREx9eZge3w727BrTUgG4KIxIiEbqIauAl00Xzyly67olmKp z4aoxxdfFB/gS+iGbgqOysoEHWcqZnw627hMK9650KMYF9LAs1tARGCAYAY7BlCeI/+yVl S9j6R1xKPjiqoFut67tdh+Kro/Gr8nGNFvZSnOOjvLWREsHSVVF+JM1gwypDLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hb8Dm+xQ/ejzhtC+LWWTxtNjVzMuW9qb9d5ULtsaKfs=; b=f/tRZ667QN2/64EVMLczxaGDEC1vISAsHq47L/4tRE6q8umtqggVQXazJXix+V4/WdYbc8 wJrnI4UjGjkEO6Dv50zTqjC0TflxOTw7iZ7vfKD0iqCvvRTiyCYKiquaArrg6h/HEbVUkj /bIFxP6viDqjChp/4J3LKCpZByiDRCTKPd9CzusJXYzs775kdzxhAA/Ug8tsg4sj7kQVcP hqk01h1t1WFrORqXKmlhHUK0gLHVEBEfjDkKmADYKW/YoRn4wpDgBYaAKSiPnEow53vy+U UzOOoMAThiqlnLU31ZPDymLAXdBDUj9kDT+juMqxW2wLVYyJEi+Qc4ZYwtfsUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMb4qrvzy6n for ; Fri, 27 Feb 2026 02:29:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2118f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: 4ffe72c6a398 - stable/15 - radiotap: add more EHT definitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4ffe72c6a398e1ffc3d6091d80b1ec8d7e03ba3b Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:15 +0000 Message-Id: <69a1017b.2118f.1277fb54@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4ffe72c6a398e1ffc3d6091d80b1ec8d7e03ba3b commit 4ffe72c6a398e1ffc3d6091d80b1ec8d7e03ba3b Author: Bjoern A. Zeeb AuthorDate: 2026-01-20 18:57:19 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 22:57:37 +0000 radiotap: add more EHT definitions Add more EHT definitions used by at least iwlwifi. Sponsored by: The FreeBSD Foundation (cherry picked from commit 5f7b5dde10518d4436e1ec07a76873bf31d28425) --- sys/net80211/ieee80211_radiotap.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/sys/net80211/ieee80211_radiotap.h b/sys/net80211/ieee80211_radiotap.h index d44f81b68b8c..d729323fce3a 100644 --- a/sys/net80211/ieee80211_radiotap.h +++ b/sys/net80211/ieee80211_radiotap.h @@ -512,8 +512,11 @@ struct ieee80211_radiotap_lsig { uint16_t data1; uint16_t data2; } __packed; + +#define IEEE80211_RADIOTAP_LSIG_DATA1_RATE_KNOWN 0x0001 #define IEEE80211_RADIOTAP_LSIG_DATA1_LENGTH_KNOWN 0x0002 +#define IEEE80211_RADIOTAP_LSIG_DATA2_RATE 0x000F #define IEEE80211_RADIOTAP_LSIG_DATA2_LENGTH 0xFFF0 /* https://www.radiotap.org/fields/MCS.html */ @@ -615,6 +618,24 @@ struct ieee80211_radiotap_eht { #define IEEE80211_RADIOTAP_EHT_DATA4_RU_ALLOC_CC_2_2_2 0x000001ff #define IEEE80211_RADIOTAP_EHT_DATA4_RU_ALLOC_CC_2_2_2_KNOWN 0x00000200 +#define IEEE80211_RADIOTAP_EHT_DATA4_RU_ALLOC_CC_1_2_3 0x0007fc00 +#define IEEE80211_RADIOTAP_EHT_DATA4_RU_ALLOC_CC_1_2_3_KNOWN 0x00080000 +#define IEEE80211_RADIOTAP_EHT_DATA4_RU_ALLOC_CC_2_2_3 0x1ff00000 +#define IEEE80211_RADIOTAP_EHT_DATA4_RU_ALLOC_CC_2_2_3_KNOWN 0x20000000 + +#define IEEE80211_RADIOTAP_EHT_DATA5_RU_ALLOC_CC_1_2_4 0x000001ff +#define IEEE80211_RADIOTAP_EHT_DATA5_RU_ALLOC_CC_1_2_4_KNOWN 0x00000200 +#define IEEE80211_RADIOTAP_EHT_DATA5_RU_ALLOC_CC_2_2_4 0x0007fc00 +#define IEEE80211_RADIOTAP_EHT_DATA5_RU_ALLOC_CC_2_2_4_KNOWN 0x00080000 +#define IEEE80211_RADIOTAP_EHT_DATA5_RU_ALLOC_CC_1_2_5 0x1ff00000 +#define IEEE80211_RADIOTAP_EHT_DATA5_RU_ALLOC_CC_1_2_5_KNOWN 0x20000000 + +#define IEEE80211_RADIOTAP_EHT_DATA6_RU_ALLOC_CC_2_2_5 0x000001ff +#define IEEE80211_RADIOTAP_EHT_DATA6_RU_ALLOC_CC_2_2_5_KNOWN 0x00000200 +#define IEEE80211_RADIOTAP_EHT_DATA6_RU_ALLOC_CC_1_2_6 0x0007fc00 +#define IEEE80211_RADIOTAP_EHT_DATA6_RU_ALLOC_CC_1_2_6_KNOWN 0x00080000 +#define IEEE80211_RADIOTAP_EHT_DATA6_RU_ALLOC_CC_2_2_6 0x1ff00000 +#define IEEE80211_RADIOTAP_EHT_DATA6_RU_ALLOC_CC_2_2_6_KNOWN 0x20000000 #define IEEE80211_RADIOTAP_EHT_DATA7_NSS_S 0x0000f000 #define IEEE80211_RADIOTAP_EHT_DATA7_BEAMFORMED_S 0x00010000 From nobody Fri Feb 27 02:29:16 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMd3t9Mz6T7WS for ; Fri, 27 Feb 2026 02: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXMc663cz40Yw for ; Fri, 27 Feb 2026 02: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=1772159356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I9tO7X7xAix4/P0Ty7Y78AZMBEiZohUIzWtCIqNVUUk=; b=HzPjRjuznLUFtQHjDvDPjQp/DKyCLuDMbkFVwUy7k0j89ZfM81kBDAHHsVvrbueMyIkLvi zAtEdJi62TW96FVBdB7JA34ulTP4d+ge1K9WBHRvGxp5YXbDExCDYLU2tRK39U4QPkyiZv NWIfmMBfO1zRlskFaMbvY23thQxgbAT3IHjiZg4WhuZ1BdLcs/38MPY8LDw/VsVqeC4oqe /A+UecIFYGdkM852unSF4PmstPIlQdZKT0ueH0hFGPWP7Tzj7iKptPsbmxnS53CeFknwNe sln9pjPtNUWTn5Cp1W6T9NYz80XUmqQPPA3qonTrN9HHRrrnM35ERdiqDyBMNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159356; a=rsa-sha256; cv=none; b=xOYy91wTqPOJgIHCj+zvlanosL9owm2aGffIdx4yyvWPtvSCGOn/LE/yaEajCMr1O3TqOh qPI2Hrz5HWDSWvHu/PT2Rz8rJupLvzxTIrrZg67eESrhYEdSjdX1ThoAHnDCKxg2aK3stE SFJEQky+yZJ8WV0CAHY5alMIYOXb/iJUv2fTi8tcB4VXnj1TLXHg9iXpxfbDGZbxYlUTOB 0flNZpHPgea7uvN/aa4UW+4EMrckYddRs7uhvtgVj1iuuDeEPQ/Fa+gJlqwyQdgVmemlw/ VszELTSaWl/Rmb1QVHRGI+O0i7vz8K6RTJHqDWNr0+4KMLVE2t7Qps8pj28DDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I9tO7X7xAix4/P0Ty7Y78AZMBEiZohUIzWtCIqNVUUk=; b=OE0LR2LEk8xCZOdGkVzxmvlH8xz/Nm4TwePCRQqDeRe1AUsIz0ftHLSAdIan2MMZlU0M6h hlz/UaraYxRHlg3hgtypnPGW4Y5hmA5owt6Sn3oOAoLJqNkX5KFCnaBm5n3JH4OPIw9c64 0RcL+mPbq3ck+lILfbFiWtGRhRyiAdCTCc+qWfRjIhWTNWCWDWxWeh8BOpYejInjabdpC3 Lvcz4YQ1OTnoSEFH+N9eB3NylHrsJ0OR/YTX7xwnhHulQCE0kGSKdZlnWNagD0oSVWCeAr TJH31irnbGmcg8koajUUrvQHO/jHTi1TygpzjHBK17FaQU3aF1o/YJ8kXiSviA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMc5ZQDzyV3 for ; Fri, 27 Feb 2026 02:29:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1ecdc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: 6ac1856bc9f0 - stable/15 - LinuxKPI: 802.11: add new field to struct cfg80211_bitrate_mask List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6ac1856bc9f0e0b55e74acf9613db3d0234f41fb Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:16 +0000 Message-Id: <69a1017c.1ecdc.7aadaca2@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=6ac1856bc9f0e0b55e74acf9613db3d0234f41fb commit 6ac1856bc9f0e0b55e74acf9613db3d0234f41fb Author: Bjoern A. Zeeb AuthorDate: 2026-01-20 22:44:43 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 22:57:45 +0000 LinuxKPI: 802.11: add new field to struct cfg80211_bitrate_mask rtw89(4) accesses eht_mcs[]. Add the field to struct cfg80211_bitrate_mask. Sponsored by: The FreeBSD Foundation (cherry picked from commit 18de28308c2916d18fca4e9d8988910176b14951) --- sys/compat/linuxkpi/common/include/net/cfg80211.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h index 4b21f82a0762..a8ca560a1ec1 100644 --- a/sys/compat/linuxkpi/common/include/net/cfg80211.h +++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h @@ -152,6 +152,8 @@ struct linuxkpi_ieee80211_channel { int orig_mpwr; }; +#define NL80211_EHT_NSS_MAX 16 + struct cfg80211_bitrate_mask { /* TODO FIXME */ struct { @@ -159,6 +161,7 @@ struct cfg80211_bitrate_mask { uint8_t ht_mcs[IEEE80211_HT_MCS_MASK_LEN]; uint16_t vht_mcs[8]; uint16_t he_mcs[8]; + 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? */ From nobody Fri Feb 27 02:29:17 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMf2LW7z6T7YQ for ; Fri, 27 Feb 2026 02: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXMd6nTLz40Qp for ; Fri, 27 Feb 2026 02: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=1772159358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H3O2+1Wnahl8M8Gk3S80g3fqIohq5J4C+wxGQamm760=; b=rEvs9Z9MoW20xWC3pL7p0dKrVIb5lD1NhIfUdnuFB6FIOoja7rNa10J4xhFCNaSYKTjkiz siGgskCXeM5aYPpH8nHFF0GNI8hGWP0A9trf9ePUDBC7cWnfRc3rQ5Ciud+q065os15Li/ K7fbEZXIERhimxQKl0nIZzaad8aPLbsnHJ4F93yE3RQl31i43UqHXjQ1ncF0XFTpa6LSS0 E+zSJBDexr99vCWq1Pfxh4qtVvljT2W3k2fa7MQ7sqsKzFDloMdlKIgK/L/OyowkW5BZAo gdxOyyj55jZGWm74tWMBAQdWgknOsshPvV3ilChkKdCzUTFLpDXBbRrGJ70KoA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159358; a=rsa-sha256; cv=none; b=FnILev5R730ASi6WYOEbK3ijzD66qBUnQ6+MlFqpkmmx4CoAub5WIZoa/bhEhpUYoZwiOV dRSpssPgA6YVtxbJ31EmsR/FYdoEWLrg+eSK0ayIBV0nnmeEd5qi/9Hbi+ZjF1Wv0wOTlq VtekICX7F59j9sS3mePQRdh9bGL46TA9fWvbc7GwGZdljaYjlnwMma9P2JLNx3TTGxjsMQ mHPdOA2JiclC90j34MSwGNdYoIGJUGVansE2u4ZO5I68nixViPLo8xpTYcZW2iLHE2vnDZ 1lLh8pm77u91kP9gk3RCydELEmPjEt21QUM4pfgFIF8MVje0bp7vsGpplBq1lQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H3O2+1Wnahl8M8Gk3S80g3fqIohq5J4C+wxGQamm760=; b=NKPqIq7BrEwL7eYJM2OutOjjPmQFnvitHQ5JgGyHIAPGg3WFctjeW2/els5apLQOqix1Mi pc6Kvdy5g87Bmc53M9O5OQyh2RiTaJS5QasxrBqxwAq1p4TSu9SQUq5xsQgLHEIFyjsA8I rQj1jORSzpXKGgtIXEbJCYNDcj1Iaq7TMNSgDlGhI1nqrfEeYbeQvSSJnYqa/mfTxrV5iN iKwi1Cyp2CinElhfFUYA314GeMK/84vDxR4MhMoB7DSs+d2Kt9hy5Fa+RY4IY2otoZj4eu mAc4fRljAKq0YaGVrvpDab61MwmOVD2pBNVSyVto/RfdolqzA2nINNQ/wzS4/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 4fMXMd65Y2zyWx for ; Fri, 27 Feb 2026 02:29:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1fd72 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: 23241046e071 - stable/15 - LinuxKPI: 802.11: rename enum ieee80211_tx_rate_flags and move file List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 23241046e0715a324f06917078322900688f2e32 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:17 +0000 Message-Id: <69a1017d.1fd72.9f59f60@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=23241046e0715a324f06917078322900688f2e32 commit 23241046e0715a324f06917078322900688f2e32 Author: Bjoern A. Zeeb AuthorDate: 2026-01-20 22:47:13 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 22:57:55 +0000 LinuxKPI: 802.11: rename enum ieee80211_tx_rate_flags and move file What we used to call enum ieee80211_tx_rate_flags is now used as enum mac80211_rate_control_flags for the ieee80211_tx_rate.flags in rtw89(4). Rename the enum and move it to mac80211 as it seems to belong there. Sponsonred by: The FreeBSD Foundation (cherry picked from commit b2c90d106c66daf6dc7fb300c250b4ad0aa274f5) --- sys/compat/linuxkpi/common/include/linux/ieee80211.h | 12 ------------ sys/compat/linuxkpi/common/include/net/mac80211.h | 15 +++++++++++++-- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index c81ddf7d24b2..a9033581a315 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -480,18 +480,6 @@ enum ieee80211_tx_control_flags { IEEE80211_TX_CTRL_MLO_LINK = 0xF0000000, /* This is IEEE80211_LINK_UNSPECIFIED on the high bits. */ }; -enum ieee80211_tx_rate_flags { - /* XXX TODO .. right shift numbers */ - IEEE80211_TX_RC_40_MHZ_WIDTH = BIT(0), - IEEE80211_TX_RC_80_MHZ_WIDTH = BIT(1), - IEEE80211_TX_RC_160_MHZ_WIDTH = BIT(2), - IEEE80211_TX_RC_GREEN_FIELD = BIT(3), - IEEE80211_TX_RC_MCS = BIT(4), - IEEE80211_TX_RC_SHORT_GI = BIT(5), - IEEE80211_TX_RC_VHT_MCS = BIT(6), - IEEE80211_TX_RC_USE_SHORT_PREAMBLE = BIT(7), -}; - #define IEEE80211_RNR_TBTT_PARAMS_PSD_RESERVED -128 #define IEEE80211_HT_CTL_LEN 4 diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index 6e2f3f2d8781..8d3d04c9afe5 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2020-2025 The FreeBSD Foundation + * Copyright (c) 2020-2026 The FreeBSD Foundation * Copyright (c) 2020-2025 Bjoern A. Zeeb * * This software was developed by Björn Zeeb under sponsorship from @@ -789,10 +789,21 @@ struct ieee80211_tx_queue_params { struct ieee80211_he_mu_edca_param_ac_rec mu_edca_param_rec; }; +enum mac80211_rate_control_flags { + IEEE80211_TX_RC_40_MHZ_WIDTH = BIT(0), + IEEE80211_TX_RC_80_MHZ_WIDTH = BIT(1), + IEEE80211_TX_RC_160_MHZ_WIDTH = BIT(2), + IEEE80211_TX_RC_GREEN_FIELD = BIT(3), + IEEE80211_TX_RC_MCS = BIT(4), + IEEE80211_TX_RC_SHORT_GI = BIT(5), + IEEE80211_TX_RC_VHT_MCS = BIT(6), + IEEE80211_TX_RC_USE_SHORT_PREAMBLE = BIT(7), +}; + struct ieee80211_tx_rate { uint8_t idx; uint16_t count:5, - flags:11; + flags:11; /* enum mac80211_rate_control_flags */ }; enum ieee80211_vif_driver_flags { From nobody Fri Feb 27 02:29:12 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMf305Jz6T7RB for ; Fri, 27 Feb 2026 02: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXMd564Wz40Qm for ; Fri, 27 Feb 2026 02: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=1772159357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3LGfQLLHNbPt22mNpPK8FVFrMTU7tIprVSjvb54oqH8=; b=Y332Ouh8Zgj/DqKamajUTA5tR1ErPSILVf4/MQz3BN8LHN1TZkrhy4TxfMPKPRyluo0cyQ 8o95ZVrmtqNo2xgCHe+ezoZ3mAsocTGIrk3x4lsZYLORyW+1NH8qOqxMpYWfkJT1Vq4b3O lFF18Z/NPSoMKn+6KzXrYzfs7o02M9RYxZ5edK75GIc0E5+ocAtaaIWzxUa93+kfbHYy0z KYMv6Q8wyUqNaxj1J3Z6/HIsQwDkL4XeJvROzYenV8UtdlD4qKQmQI+J3ED6Om4csjfH5U gg9xVHyWD/biBKxXhkAz1e7T5D1hde8XFYal0Ub3VWxLtq/3DJV/Pk9KTtFHrw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159357; a=rsa-sha256; cv=none; b=l6PFrTqYrSAkoryr5PHiqSiWM1UfuA5pl42J6Ti6pURPQVgPkyj5lNASZV9ExoCCWrNMa9 z2m9pJhv9LIJtq0kA89KA1Vm7Uhc9bxlt0DyslzFfSM87Pb7V/u4+fAhcke1LEk3RDuXtm IlYN4qc8Ts+TuwehrZip56NUWlQHGFKhhchq2r2Omuu1k5HXcJgNSMQVbSzEG48pxEEpLn PBRfV/7guMYWu1R0Jb2289bjtFVzMz8HiKsPzIVAQ/VCkRUsRuTUVDGARl1KOdxZQ/S+jR DZNQLix/UHco/rkKHHDLpfjC8limhBRlrDwP8yNLSsRC2FNoKs/X5L9eQ+dHog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3LGfQLLHNbPt22mNpPK8FVFrMTU7tIprVSjvb54oqH8=; b=SCBFsFiG6CmuRqWUeztISBhK/YYG+RUy+dAoaJFkpVvx03EMJOAZRT1v8zqPCEr9c7ZxJo jYEGaqBg83jqplHXevVOUNdI/9tPTcUzvrnT2YbrUQ4GbJi3kswFeyk4J5PJuFCcna1Mjk nUgESp4wzw7L0zpqjx+Xkzq4K9ni8P1t4ajiCR1GX0bOanfVs1CKHfUbB5BwsVC0fVXK5f T1MzgCY1kfWdkUSwT3xxr89dq8Bc2WTJTVpCo3pmx36qDuFIzavJTgpGgGOTzGUB+V9wIT 2s4cQzGi+rbrT42vjaSh5AOAm7X2ih4Iuvppm1r2P8aX6aEps33S8Bt4Ql72sg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMd4jZ4zxQw for ; Fri, 27 Feb 2026 02:29:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21fab by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: 07c0695d7420 - stable/15 - LinuxKPI: 802.11: factor out rate logic for mandatory channels List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 07c0695d7420fb6e6a3e394b8eaf0e5a96708a9c Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:12 +0000 Message-Id: <69a10178.21fab.1c95adc1@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=07c0695d7420fb6e6a3e394b8eaf0e5a96708a9c commit 07c0695d7420fb6e6a3e394b8eaf0e5a96708a9c Author: Bjoern A. Zeeb AuthorDate: 2026-01-20 13:33:16 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 22:56:57 +0000 LinuxKPI: 802.11: factor out rate logic for mandatory channels I was looking at rate work for another problem and found more flags in ath9k (which we will likely never need). The documentation then revealed the "mandatory" flags as well and with discussions about cfg80211 going on I decided to use the momentum and split our "supp_rates" setup between lkpi_lsta_alloc() and wiphy_register(). There should be no functional change. While there also initialize max_rc_amsdu_len. Sponsored by: The FreeBSD Foundation (cherry picked from commit 768332d619484834a7866fde4bf2695d4262355a) (cherry picked from commit c592d54a24b984f2e23b337a6abeac09b9c357b5) --- .../linuxkpi/common/include/linux/ieee80211.h | 13 ++- sys/compat/linuxkpi/common/include/net/cfg80211.h | 4 +- sys/compat/linuxkpi/common/src/linux_80211.c | 112 ++++++++++++++++----- 3 files changed, 102 insertions(+), 27 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index 12160df43915..b5051a9f7d21 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -108,7 +108,18 @@ struct ieee80211_mmie_16 { #define IEEE80211_QOS_CTL_MESH_CONTROL_PRESENT 0x0100 enum ieee80211_rate_flags { - IEEE80211_RATE_SHORT_PREAMBLE = BIT(0), + IEEE80211_RATE_SHORT_PREAMBLE = BIT(0), /* 2.4Ghz, CCK */ + IEEE80211_RATE_SUPPORTS_5MHZ = BIT(1), + IEEE80211_RATE_SUPPORTS_10MHZ = BIT(2), + IEEE80211_RATE_ERP_G = BIT(3), + + /* + * According to documentation these are flags initialized internally. + * See lkpi_wiphy_band_annotate(). + */ + IEEE80211_RATE_MANDATORY_A = BIT(4), + IEEE80211_RATE_MANDATORY_G = BIT(5), + IEEE80211_RATE_MANDATORY_B = BIT(6), }; enum ieee80211_rate_control_changed_flags { diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h index d7ed2bc97c98..4b21f82a0762 100644 --- a/sys/compat/linuxkpi/common/include/net/cfg80211.h +++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h @@ -1230,6 +1230,7 @@ struct cfg80211_ops { struct wiphy *linuxkpi_wiphy_new(const struct cfg80211_ops *, size_t); void linuxkpi_wiphy_free(struct wiphy *wiphy); +int linuxkpi_80211_wiphy_register(struct wiphy *); void linuxkpi_wiphy_work_queue(struct wiphy *, struct wiphy_work *); void linuxkpi_wiphy_work_cancel(struct wiphy *, struct wiphy_work *); @@ -1749,8 +1750,7 @@ wiphy_net(struct wiphy *wiphy) static __inline int wiphy_register(struct wiphy *wiphy) { - TODO(); - return (0); + return (linuxkpi_80211_wiphy_register(wiphy)); } static __inline void diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 1ac28dfef448..d25b32f1dae8 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -896,41 +896,34 @@ lkpi_lsta_alloc(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN], /* Deflink information. */ for (band = 0; band < NUM_NL80211_BANDS; band++) { struct ieee80211_supported_band *supband; + uint32_t rate_mandatory;; supband = hw->wiphy->bands[band]; if (supband == NULL) continue; + switch (band) { + case NL80211_BAND_2GHZ: + /* We have to assume 11g support here. */ + rate_mandatory = IEEE80211_RATE_MANDATORY_G | + IEEE80211_RATE_MANDATORY_B; + break; + case NL80211_BAND_5GHZ: + rate_mandatory = IEEE80211_RATE_MANDATORY_A; + break; + default: + continue; + } + for (i = 0; i < supband->n_bitrates; i++) { - switch (band) { - case NL80211_BAND_2GHZ: - switch (supband->bitrates[i].bitrate) { - case 240: /* 11g only */ - case 120: /* 11g only */ - case 110: - case 60: /* 11g only */ - case 55: - case 20: - case 10: - sta->deflink.supp_rates[band] |= BIT(i); - break; - } - break; - case NL80211_BAND_5GHZ: - switch (supband->bitrates[i].bitrate) { - case 240: - case 120: - case 60: - sta->deflink.supp_rates[band] |= BIT(i); - break; - } - break; - } + if ((supband->bitrates[i].flags & rate_mandatory) != 0) + sta->deflink.supp_rates[band] |= BIT(i); } } sta->deflink.smps_mode = IEEE80211_SMPS_OFF; sta->deflink.bandwidth = IEEE80211_STA_RX_BW_20; + sta->deflink.agg.max_rc_amsdu_len = IEEE80211_MAX_MPDU_LEN_HT_BA; sta->deflink.rx_nss = 1; sta->deflink.sta = sta; @@ -8028,6 +8021,77 @@ linuxkpi_wiphy_free(struct wiphy *wiphy) kfree(lwiphy); } +static void +lkpi_wiphy_band_annotate(struct wiphy *wiphy) +{ + int band; + + for (band = 0; band < NUM_NL80211_BANDS; band++) { + struct ieee80211_supported_band *supband; + int i; + + supband = wiphy->bands[band]; + if (supband == NULL) + continue; + + switch (band) { + case NL80211_BAND_2GHZ: + case NL80211_BAND_5GHZ: + break; + default: +#ifdef LINUXKPI_DEBUG_80211 + IMPROVE("band %d(%s) not yet supported", + band, lkpi_nl80211_band_name(band)); + /* For bands added here, also check lkpi_lsta_alloc(). */ +#endif + continue; + } + + for (i = 0; i < supband->n_bitrates; i++) { + switch (band) { + case NL80211_BAND_2GHZ: + switch (supband->bitrates[i].bitrate) { + case 110: + case 55: + case 20: + case 10: + supband->bitrates[i].flags |= + IEEE80211_RATE_MANDATORY_B; + /* FALLTHROUGH */ + /* 11g only */ + case 240: + case 120: + case 60: + supband->bitrates[i].flags |= + IEEE80211_RATE_MANDATORY_G; + break; + } + break; + case NL80211_BAND_5GHZ: + switch (supband->bitrates[i].bitrate) { + case 240: + case 120: + case 60: + supband->bitrates[i].flags |= + IEEE80211_RATE_MANDATORY_A; + break; + } + break; + } + } + } +} + +int +linuxkpi_80211_wiphy_register(struct wiphy *wiphy) +{ + TODO("Lots of checks and initialization"); + + lkpi_wiphy_band_annotate(wiphy); + + return (0); +} + static uint32_t lkpi_cfg80211_calculate_bitrate_ht(struct rate_info *rate) { From nobody Fri Feb 27 02:29:18 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMg2tkXz6T7T9 for ; Fri, 27 Feb 2026 02: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXMg0B9Fz40Qv for ; Fri, 27 Feb 2026 02:29:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Blhqr+UfIR+n7BaHxwnxIh5fL/4xGuQoKbtFhTmUKc8=; b=evXDtVRVL0pmSB5n5xfyDl16RwVIYUdpGdKbsKWkaLZp1hYwifxGFPMgbsVGOzrsHxeJRf W5kKRDOHQWAe5lvfBBBVNy9W1YK3HHf6podufjZ9OXaJ02WGqomyVmlZIx0xD6RMDtxVFK Ieh19EPtqJ2mcsH0cXIRf2pEp6TtgPETU5OYtr0CZoFFUChqv1OUHMgMbrbbeBMnYpjSxc lWsl+keZCckdFCWYetqQQLtD2V2O43ffmMCMd7qFZcoI0BB0kcvAtU+ZZY+MUYcrqGbVFE FCYFMyoobQGzddN2crIiffTznpZ95+XYGxrPrS8bLLJ0quIqKNsnn+BG7pMB3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159359; a=rsa-sha256; cv=none; b=XsIBDziZM4kgFoRg2Omx6i91KCvghP8eHgPDhqJDQT8lC8NAoSubUcsqgERRGDzB09asoi boenIpyV2OG21LZOEnYa9EFRrn02rjIvrhAH2pWzy6JpD2asJ5W2LxsoNmFrWBjok+jROc LZ0gnEnv+AFMj2GVsO/jYjH2gJXDfQLu3i9QHaEazJQtqz6baOTTBDvBftkBYC6MspwJ54 rMLTYr4iKkLUx7Tw7nFVZKTh9k7UhsfThU09//33Sr90NMgGQRTqeXDdcdM+prDG+hF/eW cDB1QyM18QrVAfbkT0Dg0zL6CR3W7aklACnWYnn2lveCIU12ls050rtqKnp/kA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Blhqr+UfIR+n7BaHxwnxIh5fL/4xGuQoKbtFhTmUKc8=; b=IeUAo9mMognTzvfn0hqIYjVz0T8TH8+puhHR71mbsCgNeTBsiURH0z7XWSehdL1X4oLAuq tZJPLPlBxhfWuz4aQesg3KXBXDI8bwl9yIv3OmgyLmiH6tdWCyJnXnTOtZ7ttcTdZ7FuxE hZN74H17fAwSFwcBS5iNYBwxBhGfK4TIfOzYWySvwEy4ZjjvaZIOXzOpFhy3uJd5MmNN7S 1DMQ7lt70YsmVPtxKcbypGqLw3O4Qvc6NogC0cBEeZRyEOPObbyMDD7LiUk5kGU57deg2S XiiQfb2lbDw1hvgtba8LpLilZbEYlVPklTNTP82go9PBN4TU4ApCnnjng913aQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMf6s6mzxQy for ; Fri, 27 Feb 2026 02:29:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 219b5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: 8689e14c2fbc - stable/15 - LinuxKPI: skbuff: implement skb_queue_splice() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 8689e14c2fbc2708200ba317368a536984264fc0 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:18 +0000 Message-Id: <69a1017e.219b5.3e5b07a5@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8689e14c2fbc2708200ba317368a536984264fc0 commit 8689e14c2fbc2708200ba317368a536984264fc0 Author: Bjoern A. Zeeb AuthorDate: 2026-01-20 22:49:05 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 22:58:14 +0000 LinuxKPI: skbuff: implement skb_queue_splice() Add skb_queue_splice() and use it in skb_queue_splice_init() which already had that functionality (plus the init bit). The new function is used by rtw89(4). Sponsored by: The FreeBSD Foundation (cherry picked from commit f1d7eea9dc1e78ecd247e060f4e8395ba4e77346) --- sys/compat/linuxkpi/common/include/linux/skbuff.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/skbuff.h b/sys/compat/linuxkpi/common/include/linux/skbuff.h index 2e560a120e41..c43d6daff5ee 100644 --- a/sys/compat/linuxkpi/common/include/linux/skbuff.h +++ b/sys/compat/linuxkpi/common/include/linux/skbuff.h @@ -770,7 +770,7 @@ ___skb_queue_splice(const struct sk_buff_head *from, } static inline void -skb_queue_splice_init(struct sk_buff_head *from, struct sk_buff_head *to) +skb_queue_splice(const struct sk_buff_head *from, struct sk_buff_head *to) { SKB_TRACE2(from, to); @@ -780,6 +780,13 @@ skb_queue_splice_init(struct sk_buff_head *from, struct sk_buff_head *to) ___skb_queue_splice(from, (struct sk_buff *)to, to->next); to->qlen += from->qlen; +} + +static inline void +skb_queue_splice_init(struct sk_buff_head *from, struct sk_buff_head *to) +{ + + skb_queue_splice(from, to); __skb_queue_head_init(from); } From nobody Fri Feb 27 02:29:20 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMh4LFNz6T7NN for ; Fri, 27 Feb 2026 02: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXMh1D0Cz40TY for ; Fri, 27 Feb 2026 02: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=1772159360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wVqUOD7l6qFXhQrbLSXY/gs0oFFYSXZWc+6l3O9fitA=; b=i7t3VEitV6gZgOleANasHMKVZkj3y+bTIueulTPZ7jcdCtox8yzOTOZg8zzvibbX1Fu2wp U4zDXV1R0UGhU9+fKvFuLXZb68JzzNi9b2IVhtPtrhfFBBy9meIapz+mQnKVvSGoaBc9/w HqBGzGF0489AdDAIlKq9nYIVs3XOvd33ZjZUoeoWpUn5n9gcZCKRPBoz6Fmhy2gdAGCZHV uqxqIGcHeaI7S0qSWsUfSjO4CkkGGsp7IhtvoChawpfQXo3e8RXUqdcoGHxDsCRQJr0y4h X5z2yYiMLpHMRI6d5gifnuLvaGP5+baQemFxnTGA0kJOFcipaBXdPBLDKyOxvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159360; a=rsa-sha256; cv=none; b=hE/UFiJT41UiZxvFp5pge9RpzUqw1yA60zfVKHk5+sXViqOqnpuFIwXQXGDaeFYSmX1rrU ZpEhBFVYHptT9kqXL3bJCGJSj2UZincxzwRZJkRY0DCdO4xErbEWB0Hfhp1yGpBPrcsJEh GZVKdG8bN8fe3uUtA4hjq4oFqmF22Ao1+isIoh2KHoSLI5v1/XPfGRjFLgY0Gx+QSVzXHH rqZLVL3o4CwZcKE1rS3Kh/503RUzpWXeT/iM65Fj0HFAFw8hriYfh0e8ySY7mniDRGw6F2 qW9H/C51LyYuQvHH9RwtkYc6HRJJ4MUgrr4KaVp+y40FbUaqOcf8PKElhZsa5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wVqUOD7l6qFXhQrbLSXY/gs0oFFYSXZWc+6l3O9fitA=; b=WbrEb+0osVoaIOA9gUCxBobg86XlI2BrUHeIItLUJo7XgioKpmsg6GScsXZFimTf+ivW2d wQJOMZ1OeLzY5kJV5rtxckMyX2o62cmRUsZmyK4LPYkEoHhP1LqorDDFxYB0XZdzXtVTO0 shKWXYc5cHlgNVQpSRHInl/WR3MDmgAkqWCRbnKggaLIlTBAvo+8MI4PruVksAml0S19VL KkomJ+BFb/l+JLmWJDCU+6ZltqbRRu2a/wkEQop54py7Idt4TEcfqGW8IfOgs5A78BeVJU vYjZsIzfPmIONpaNAWbLqdxVLjo1dHZ3+7S+TLad7/publzpIO+auipT5FWXew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMh0X5TzyHk for ; Fri, 27 Feb 2026 02:29:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2191b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: 0aecbd1540ea - stable/15 - LinuxKPi: 802.11: add more defines List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 0aecbd1540ea8c4c6fa0cc2b6a8ce357666ddbf2 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:20 +0000 Message-Id: <69a10180.2191b.2c995b84@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=0aecbd1540ea8c4c6fa0cc2b6a8ce357666ddbf2 commit 0aecbd1540ea8c4c6fa0cc2b6a8ce357666ddbf2 Author: Bjoern A. Zeeb AuthorDate: 2026-01-21 13:52:04 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 22:58:42 +0000 LinuxKPi: 802.11: add more defines Add more defines and a mac80211 op function pointer used by mt76(4) at Linux v6.19-rc6. Sponsored by: The FreeBSD Foundation (cherry picked from commit d4898c6e01d80850e4a93a1aa805c44b5f8ca63f) --- sys/compat/linuxkpi/common/include/linux/ieee80211.h | 1 + sys/compat/linuxkpi/common/include/net/cfg80211.h | 1 + sys/compat/linuxkpi/common/include/net/mac80211.h | 2 ++ 3 files changed, 4 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index a9033581a315..d1eba94a3ad8 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -219,6 +219,7 @@ enum ieee80211_min_mpdu_start_spacing { #define IEEE80211_FCTL_TODS (IEEE80211_FC1_DIR_TODS << 8) #define IEEE80211_FCTL_MOREFRAGS (IEEE80211_FC1_MORE_FRAG << 8) #define IEEE80211_FCTL_PM (IEEE80211_FC1_PWR_MGT << 8) +#define IEEE80211_FCTL_MOREDATA (IEEE80211_FC1_MORE_DATA << 8) #define IEEE80211_FTYPE_MGMT IEEE80211_FC0_TYPE_MGT #define IEEE80211_FTYPE_CTL IEEE80211_FC0_TYPE_CTL diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h index a8ca560a1ec1..94d34fb9dc0c 100644 --- a/sys/compat/linuxkpi/common/include/net/cfg80211.h +++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h @@ -124,6 +124,7 @@ enum ieee80211_channel_flags { IEEE80211_CHAN_PSD = BIT(12), IEEE80211_CHAN_ALLOW_6GHZ_VLP_AP = BIT(13), IEEE80211_CHAN_CAN_MONITOR = BIT(14), + IEEE80211_CHAN_NO_EHT = BIT(15), }; #define IEEE80211_CHAN_NO_HT40 (IEEE80211_CHAN_NO_HT40MINUS|IEEE80211_CHAN_NO_HT40PLUS) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index 8d3d04c9afe5..18891d035094 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1103,6 +1103,8 @@ struct ieee80211_ops { void (*rfkill_poll)(struct ieee80211_hw *); + int (*net_fill_forward_path)(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_sta *, struct net_device_path_ctx *, struct net_device_path *); + /* #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 *); From nobody Fri Feb 27 02:29:21 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMj6kjKz6T7NQ for ; Fri, 27 Feb 2026 02: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXMj1jGdz40Hr for ; Fri, 27 Feb 2026 02: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=1772159361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XZcGd8lSMW6bPiYezRelGkPjxPoAke/Grv5RsRPGYhU=; b=aSWu3DZOte6NcZXCd47mNyEyeLDELiZVNH4qJBU4WdUGrxdD984RNhOl0k6dyE+b5bHcoY dOk0Ks6OmuE3sty2uHjb2YJm/1k9kxqn2SBVvvTSmc7h9IiMD5EZdPiswhLmsaFhz761Hj o92HexRz31RyW2pV97/9fL6G2tZbV3x7+Vbx3gtot/eMqsQtqUyefazZbW1yyqGWGYMNdj 7M+bvlEKhLapZ5J7AElACw1ZwutrDNplCAdvTfK4K2J5wFf5eK+6P44JyNLCwX6a8Yqyl4 vLxP+YeiKUSGKfcjusSOeofd7BoZyu8bwCj2HgpubaWY1PuXR2MZn1pXXEoM2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159361; a=rsa-sha256; cv=none; b=crkV8o3yYDmS9FCF/cKLalrgtjuzKh577opdswEsJiIUYuq+z0IluMDw5aDDXk97AcG7VM OHBSdKm9FZw2iwpkFfk+Y0G4gdjkHYPHgNJTIax33WyJTQcCZmNtk8l8x0bbd/VXVMMNOG PtiCOM0mI79O4yZnSs88NdMyOT8Z3U5uQApkD4BsxLC2a2fLzRLWE9NKfsA6eWm4cjWFGp DB5TUvhg7YXA6GMkp08AjCrABM8Irvbu9KdoYnqZ9YjaJDWeydWI4LP/3V4dkkX4HayIcl XatAaWhC4HKqz2RruaMm8jKC7SECrLtPuetUPnBKneJVEyICGzfOqS4N9O57EQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159361; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XZcGd8lSMW6bPiYezRelGkPjxPoAke/Grv5RsRPGYhU=; b=lC2n8Y2UXVd5I4re6MSoa2JpbTuTzzCe+RqEf+2T1oN7I/a3ltWn5S52BBljzlIFeYDyrh zSlxwKCLEYTX+Q651hxpHj6j9FTCB801WBwEFMljqAEiYf/GmE5EwRwjtocoGP6NiWtvCA 48ZftRxUrjlrQvqrfKAcacf3b+0P6xqtf7iDeSBOOAHd+hWUryewT0rBhor0LJxxAwz2OX C1ETnQSO4qdAgB1Fj7dJf4SY2x/TfHiTJMZuWNcIMhDZxv54nIlk86OfTDTj4HKxqf6U3N Oj7axk84sot49RSDIHxXqmaiP+fx4BfCdZbOv+PpxEGKH/Ccn+n3PtuJQJ7NdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMj0zgxzy6t for ; Fri, 27 Feb 2026 02:29:21 +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); Fri, 27 Feb 2026 02:29:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 5520beb22d65 - stable/15 - LinuxKPI: netdevice: add structs net_device_path, net_device_path_ctx List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5520beb22d65a4afc8cb75db471b58dfbaba2c7a Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:21 +0000 Message-Id: <69a10181.2191f.77c2cb1c@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5520beb22d65a4afc8cb75db471b58dfbaba2c7a commit 5520beb22d65a4afc8cb75db471b58dfbaba2c7a Author: Bjoern A. Zeeb AuthorDate: 2026-01-21 13:55:28 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 22:58:49 +0000 LinuxKPI: netdevice: add structs net_device_path, net_device_path_ctx mt76(4) is using this along with a mac80211.h functiontion pointer to resolve a path in an offload case. Sponsored by: The FreeBSD Foundation (cherry picked from commit 275c7f513114a8808ba246a1304cbcf7bafbcc21) --- .../linuxkpi/common/include/linux/netdevice.h | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/netdevice.h b/sys/compat/linuxkpi/common/include/linux/netdevice.h index cf27753bcb80..dfed5fbd61b4 100644 --- a/sys/compat/linuxkpi/common/include/linux/netdevice.h +++ b/sys/compat/linuxkpi/common/include/linux/netdevice.h @@ -160,6 +160,30 @@ struct net_device { #define SET_NETDEV_DEV(_ndev, _dev) (_ndev)->dev.parent = _dev; +enum net_device_path_type { + DEV_PATH_MTK_WDMA, +}; + +struct net_device_path { + enum net_device_path_type type; + const struct net_device *dev; + /* We assume there's a struct per type. */ + union { + struct { + uint16_t wcid; + uint8_t wdma_idx; + uint8_t queue; + uint8_t bss; + uint8_t amsdu; + } mtk_wdma; + }; +}; + +struct net_device_path_ctx { + const struct net_device *dev; +}; + + /* -------------------------------------------------------------------------- */ /* According to linux::ipoib_main.c. */ struct netdev_notifier_info { From nobody Fri Feb 27 02:29:22 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMk61tQz6T7RS for ; Fri, 27 Feb 2026 02: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXMk2Hqzz40Lx for ; Fri, 27 Feb 2026 02: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=1772159362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N45NbZMvcerMuu0ffzQTYC67CWd/jVZe7mGg81tjTLE=; b=gPRwCtvA+UfjLtRuAchKSaBgGn+gxF2K3S9C7ZDFzk8NF8aFSywMjQ3irGWp2CIz35dSSr 1AEsbYU/F5UtNpSyNAg4l9bUQnOlrW6ROC2BsaZZPhPsme04kLF/aubw9ht9wvZq6d8wOb rvwHqdhk/eGi9pxLJchLihBLbGChm2z1OX/Ob+SKo9SiyCZ5nU3CUStS1jlbV45d8PtFb1 gAB2Q/XjJjRxKLaHiY+UGAnQjoHdMZy+/f6uCNcmikFiQOCk1ZJAcZNUuI8Hv10bh/qR1h sDYZvyVt/r+HeCfs7OEoM65ovNr9GcPRZCTdbJaaBKhMLqyhb6+1ABdyJo3+LA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159362; a=rsa-sha256; cv=none; b=WrgmbMvf5U9aQdFqlmwu2+h0Y6BxMoJzt1KMa3aySHwserjNMJaD31UBe0Q7Y/P9lD+yQa o0QtPi5K+VdSyXj7Bm4pQAqRUe71kn/HDvPOuvdwPIhJUpj3gWu/MqkUJd8dF+wILU/4VQ 0XYVaEkZr8yD5asUWS4psF5ONVs+86hlv1pwUHfr6YJOzSadH+POE5Senkeq8m9c51YNNc 4LWIdP8sW2SYeAau2vGTjnc24XAFIz7RPknb5HfqDXUn55OahXcKVaQiqgCsaX5tiExyBq XvGnFliu9ShpOU7hS7V+sP5LGZdFzbjKJUwhsUEP0YYyZKUXVVfkj9bOoc7Gfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N45NbZMvcerMuu0ffzQTYC67CWd/jVZe7mGg81tjTLE=; b=x3B90zz4uYE6Csm8Qz20tgCDVp9e3tOqQwunDHSynaaWoRjwYPYZ66iI2uCOLlflgcPYT7 gM2TFSpIEeZc6wHEn3Ve2DmWyowSC+qWXLqI/Vhl7Qe4ReESRmYLZUMrWrxZ6LoC+y2Ezu 2DMljt8gkNesHRmltds/MytUv91/tszdbF89Rmnwei1WJeB0FE1odw6PUsOGJP9iRZ57Rv xAgHKqIFL+pk7h+QAy6Rj0IzAZ1Bdq7oU0Br8E9rTh+ztF+S8ZrsgfmRiD0ryVtRw+wMjY R0Ea0A8VV26Vzop5HM5kovjODhSY/1ostk5cr5AQY70EsThOQPY2NtN5zl/tEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMk1cSmzyZQ for ; Fri, 27 Feb 2026 02:29:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21fb4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: b3d4c75b918d - stable/15 - rtw88: update Realtek's rtw88 driver List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b3d4c75b918d7bcdebe72cb15d6a0e3cd18176a8 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:22 +0000 Message-Id: <69a10182.21fb4.1a1ccc9f@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b3d4c75b918d7bcdebe72cb15d6a0e3cd18176a8 commit b3d4c75b918d7bcdebe72cb15d6a0e3cd18176a8 Author: Bjoern A. Zeeb AuthorDate: 2026-01-20 10:56:33 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 22:58:54 +0000 rtw88: update Realtek's rtw88 driver This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 24d479d26b25bce5faea3ddd9fa8f3a6c3129ea7 ( tag: v6.19-rc6 ). Sponsored by: The FreeBSD Foundation (cherry picked from commit 80ba8933a991d245b3983f9e2ed1171b11ccaf8a) --- sys/contrib/dev/rtw88/bf.c | 8 +++++++- sys/contrib/dev/rtw88/bf.h | 7 +++++++ sys/contrib/dev/rtw88/rtw8822bu.c | 2 ++ sys/contrib/dev/rtw88/rtw8822cu.c | 2 ++ sys/contrib/dev/rtw88/sdio.c | 4 +++- sys/modules/rtw88/Makefile | 2 +- 6 files changed, 22 insertions(+), 3 deletions(-) diff --git a/sys/contrib/dev/rtw88/bf.c b/sys/contrib/dev/rtw88/bf.c index 16c6a1d972e5..8969a1e0cb47 100644 --- a/sys/contrib/dev/rtw88/bf.c +++ b/sys/contrib/dev/rtw88/bf.c @@ -129,8 +129,11 @@ void rtw_bf_init_bfer_entry_mu(struct rtw_dev *rtwdev, void rtw_bf_cfg_sounding(struct rtw_dev *rtwdev, struct rtw_vif *vif, enum rtw_trx_desc_rate rate) { + u8 csi_rsc = CSI_RSC_FOLLOW_RX_PACKET_BW; u32 psf_ctl = 0; - u8 csi_rsc = 0x1; + + if (rtwdev->chip->id == RTW_CHIP_TYPE_8822C) + csi_rsc = CSI_RSC_PRIMARY_20M_BW; psf_ctl = rtw_read32(rtwdev, REG_BBPSF_CTRL) | BIT_WMAC_USE_NDPARATE | @@ -392,6 +395,9 @@ void rtw_bf_cfg_csi_rate(struct rtw_dev *rtwdev, u8 rssi, u8 cur_rate, csi_cfg = rtw_read32(rtwdev, REG_BBPSF_CTRL) & ~BIT_MASK_CSI_RATE; cur_rrsr = rtw_read16(rtwdev, REG_RRSR); + if (rtwdev->chip->id == RTW_CHIP_TYPE_8822C) + csi_cfg |= BIT_CSI_FORCE_RATE; + if (rssi >= 40) { if (cur_rate != DESC_RATE54M) { cur_rrsr |= BIT(DESC_RATE54M); diff --git a/sys/contrib/dev/rtw88/bf.h b/sys/contrib/dev/rtw88/bf.h index 7b40c2c03856..a5d3010e6be6 100644 --- a/sys/contrib/dev/rtw88/bf.h +++ b/sys/contrib/dev/rtw88/bf.h @@ -33,6 +33,7 @@ #define BIT_SHIFT_R_MU_RL 12 #define BIT_SHIFT_WMAC_TXMU_ACKPOLICY 4 #define BIT_SHIFT_CSI_RATE 24 +#define BIT_CSI_FORCE_RATE BIT(15) #define BIT_MASK_R_MU_RL (R_MU_RL << BIT_SHIFT_R_MU_RL) #define BIT_MASK_R_MU_TABLE_VALID 0x3f @@ -48,6 +49,12 @@ #define RTW_SND_CTRL_REMOVE 0x98 #define RTW_SND_CTRL_SOUNDING 0x9B +enum csi_rsc { + CSI_RSC_PRIMARY_20M_BW = 0, + CSI_RSC_FOLLOW_RX_PACKET_BW = 1, + CSI_RSC_DUPLICATE_MODE = 2, +}; + enum csi_seg_len { HAL_CSI_SEG_4K = 0, HAL_CSI_SEG_8K = 1, diff --git a/sys/contrib/dev/rtw88/rtw8822bu.c b/sys/contrib/dev/rtw88/rtw8822bu.c index efda9887cc41..2886f470df71 100644 --- a/sys/contrib/dev/rtw88/rtw8822bu.c +++ b/sys/contrib/dev/rtw88/rtw8822bu.c @@ -79,6 +79,8 @@ static const struct usb_device_id rtw_8822bu_id_table[] = { .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* D-Link DWA-T185 rev. A1 */ { USB_DEVICE_AND_INTERFACE_INFO(0x0411, 0x03d1, 0xff, 0xff, 0xff), .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* BUFFALO WI-U2-866DM */ + { USB_DEVICE_AND_INTERFACE_INFO(0x0411, 0x03d0, 0xff, 0xff, 0xff), + .driver_info = (kernel_ulong_t)&(rtw8822b_hw_spec) }, /* BUFFALO WI-U3-866DHP */ {}, }; MODULE_DEVICE_TABLE(usb, rtw_8822bu_id_table); diff --git a/sys/contrib/dev/rtw88/rtw8822cu.c b/sys/contrib/dev/rtw88/rtw8822cu.c index 90fcbb8ec629..a5f8311c022b 100644 --- a/sys/contrib/dev/rtw88/rtw8822cu.c +++ b/sys/contrib/dev/rtw88/rtw8822cu.c @@ -21,6 +21,8 @@ static const struct usb_device_id rtw_8822cu_id_table[] = { .driver_info = (kernel_ulong_t)&(rtw8822c_hw_spec) }, { USB_DEVICE_AND_INTERFACE_INFO(0x13b1, 0x0043, 0xff, 0xff, 0xff), .driver_info = (kernel_ulong_t)&(rtw8822c_hw_spec) }, /* Alpha - Alpha */ + { USB_DEVICE_AND_INTERFACE_INFO(0x2001, 0x3329, 0xff, 0xff, 0xff), + .driver_info = (kernel_ulong_t)&(rtw8822c_hw_spec) }, /* D-Link AC13U rev. A1 */ {}, }; MODULE_DEVICE_TABLE(usb, rtw_8822cu_id_table); diff --git a/sys/contrib/dev/rtw88/sdio.c b/sys/contrib/dev/rtw88/sdio.c index 99d7c629eac6..e35de52d8eb4 100644 --- a/sys/contrib/dev/rtw88/sdio.c +++ b/sys/contrib/dev/rtw88/sdio.c @@ -144,8 +144,10 @@ static u32 rtw_sdio_to_io_address(struct rtw_dev *rtwdev, u32 addr, static bool rtw_sdio_use_direct_io(struct rtw_dev *rtwdev, u32 addr) { + bool might_indirect_under_power_off = rtwdev->chip->id == RTW_CHIP_TYPE_8822C; + if (!test_bit(RTW_FLAG_POWERON, rtwdev->flags) && - !rtw_sdio_is_bus_addr(addr)) + !rtw_sdio_is_bus_addr(addr) && might_indirect_under_power_off) return false; return !rtw_sdio_is_sdio30_supported(rtwdev) || diff --git a/sys/modules/rtw88/Makefile b/sys/modules/rtw88/Makefile index ee47df54bcf9..0ce6ad3f99bb 100644 --- a/sys/modules/rtw88/Makefile +++ b/sys/modules/rtw88/Makefile @@ -46,7 +46,7 @@ SRCS+= ${LINUXKPI_GENSRCS} SRCS+= opt_wlan.h opt_inet6.h opt_inet.h CFLAGS+= -DKBUILD_MODNAME='"rtw88"' -CFLAGS+= -DLINUXKPI_VERSION=61700 +CFLAGS+= -DLINUXKPI_VERSION=61900 CFLAGS+= -I${DEVRTW88DIR} CFLAGS+= ${LINUXKPI_INCLUDES} From nobody Fri Feb 27 02:29:23 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMm1cTcz6T7RZ for ; Fri, 27 Feb 2026 02: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXMl2yVHz40Nq for ; Fri, 27 Feb 2026 02: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=1772159363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+j3IL+JDRkPAvCw9lIVz+mk1gOtaEtyfnBXjyJQ4ATY=; b=vMJ0KxXdTbjh2YTaXCr4O7WWe73acJXUHFAWGjUfv27WBCn0t2O4Wo2mgZHM85etbPopBm 7Gw0MMR0yjcChgj9NyaCKW8D3ROT4zUvhC790su0gLElhS+DbMGTFUCeyAI3DSEoFYAG5O VVZT4HWhVj19wbYJP5eRD5+l87Lh7wUEBFuqO8u8A8w/him2o9DPbPcLJtSTHHfmZfhcrL uE9Z+rkDrczzgxgBvG+FEv2QuqfcvkOZeBP2jgZF18xP3Icd2gW5anV2MsxkKDKcB6RZkH KEEFgdXjWRr60+dec2Q0CpykcXglPYS89WhGFOeHpvlbs21wBICUzJ1+F0Mykg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159363; a=rsa-sha256; cv=none; b=DvUL+uo5U7A0s7tGusC9CbAWfottsdX97ZfLumev9B8FUIvll5r+X5P1W1Gbs1+rlis/VR Bdny/r4Az1RnGHq9Ej/EiH0jip24k3VODBT9oJduoA3pL33q6npRYi8ipoEssjkETJQ8Qf 0zfus6mJN7jJGtp0wavztq4+h0fCL5y4/y+APwyBWQRk0prvhNOyYwg3nYWjhB7uR9A5Qc lGiM8lWyMtgTMpVnG7BM/a38dCiBLnB9Da7Q6vuhVRUuGaqqf6uGqyChaRV+zSE6t+w6J0 mfV8liWjFGppa+ZUQ9WlZsgrUQpBQn3Q++kilf8IZOw9lAVRGj8K3jYocAqpVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159363; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+j3IL+JDRkPAvCw9lIVz+mk1gOtaEtyfnBXjyJQ4ATY=; b=kOYEDLtIIBecYV18YaIC5/3gHfDFnxaXtETr//3Ht4k7t1ihzCVv73m79vBU3nm2GhlkXM vun7DTfavu9k0grHSk26lnpKtCv1IAek2yu3paglYbdwOBPBso1+SJEAHxytg8iYf5NOa+ 3SlDmrLmbO+p6aHLdbNxh3hOeDjZsjphxNw9V/SXiICj6YLCc21rOanU4Or9Z3KxhpB2+W S5xe4rfjwdyUAPHrxUvfNWizCCkfidBvo/OzOHpuJU+MAeXLDF9LfGnBkN7bdkOpUltT+x utWj/S+mBgHT0jE0lEIl0d4T1qzuU57jXwSHRjNbMFn2mH+N9MDINzDZRa1DcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMl2F2XzyGg for ; Fri, 27 Feb 2026 02:29:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21923 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: 1744c1e71de6 - stable/15 - ath10k: update Atheros/QCA's ath10k driver List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 1744c1e71de6f8cf81643b5e5903d283f245052f Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:23 +0000 Message-Id: <69a10183.21923.6b6c6d37@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=1744c1e71de6f8cf81643b5e5903d283f245052f commit 1744c1e71de6f8cf81643b5e5903d283f245052f Author: Bjoern A. Zeeb AuthorDate: 2026-01-20 10:55:32 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 22:59:00 +0000 ath10k: update Atheros/QCA's ath10k driver This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 24d479d26b25bce5faea3ddd9fa8f3a6c3129ea7 ( tag: v6.19-rc6 ). Sponsored by: The FreeBSD Foundation (cherry picked from commit 6c61f58562b932eb46b2e05b2f5a82d34250435a) --- sys/contrib/dev/athk/ath10k/core.c | 28 ++-- sys/contrib/dev/athk/ath10k/core.h | 6 +- sys/contrib/dev/athk/ath10k/mac.c | 2 +- sys/contrib/dev/athk/ath10k/qmi.c | 2 +- sys/contrib/dev/athk/ath10k/testmode.c | 253 +++++++++++++++++++++++++++---- sys/contrib/dev/athk/ath10k/testmode_i.h | 15 ++ sys/contrib/dev/athk/ath10k/wmi.h | 19 ++- sys/modules/ath10k/Makefile | 1 + 8 files changed, 275 insertions(+), 51 deletions(-) diff --git a/sys/contrib/dev/athk/ath10k/core.c b/sys/contrib/dev/athk/ath10k/core.c index a0407f693659..9ec08b402fd2 100644 --- a/sys/contrib/dev/athk/ath10k/core.c +++ b/sys/contrib/dev/athk/ath10k/core.c @@ -3,7 +3,6 @@ * Copyright (c) 2005-2011 Atheros Communications Inc. * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ @@ -1212,7 +1211,7 @@ static int ath10k_download_fw(struct ath10k *ar) u32 address, data_len; const void *data; int ret; - struct pm_qos_request latency_qos; + struct pm_qos_request latency_qos = {}; address = ar->hw_params.patch_load_addr; @@ -1246,7 +1245,6 @@ static int ath10k_download_fw(struct ath10k *ar) ret); } - memset(&latency_qos, 0, sizeof(latency_qos)); cpu_latency_qos_add_request(&latency_qos, 0); ret = ath10k_bmi_fast_download(ar, address, data, data_len); @@ -2570,8 +2568,9 @@ static int ath10k_init_hw_params(struct ath10k *ar) return 0; } -static bool ath10k_core_needs_recovery(struct ath10k *ar) +static void ath10k_core_recovery_check_work(struct work_struct *work) { + struct ath10k *ar = container_of(work, struct ath10k, recovery_check_work); long time_left; /* Sometimes the recovery will fail and then the next all recovery fail, @@ -2581,7 +2580,7 @@ static bool ath10k_core_needs_recovery(struct ath10k *ar) ath10k_err(ar, "consecutive fail %d times, will shutdown driver!", atomic_read(&ar->fail_cont_count)); ar->state = ATH10K_STATE_WEDGED; - return false; + return; } ath10k_dbg(ar, ATH10K_DBG_BOOT, "total recovery count: %d", ++ar->recovery_count); @@ -2595,27 +2594,24 @@ static bool ath10k_core_needs_recovery(struct ath10k *ar) ATH10K_RECOVERY_TIMEOUT_HZ); if (time_left) { ath10k_warn(ar, "previous recovery succeeded, skip this!\n"); - return false; + return; } /* Record the continuous recovery fail count when recovery failed. */ atomic_inc(&ar->fail_cont_count); /* Avoid having multiple recoveries at the same time. */ - return false; + return; } atomic_inc(&ar->pending_recovery); - - return true; + queue_work(ar->workqueue, &ar->restart_work); } void ath10k_core_start_recovery(struct ath10k *ar) { - if (!ath10k_core_needs_recovery(ar)) - return; - - queue_work(ar->workqueue, &ar->restart_work); + /* Use workqueue_aux to avoid blocking recovery tracking */ + queue_work(ar->workqueue_aux, &ar->recovery_check_work); } EXPORT_SYMBOL(ath10k_core_start_recovery); @@ -3440,7 +3436,7 @@ EXPORT_SYMBOL(ath10k_core_stop); */ static int ath10k_core_probe_fw(struct ath10k *ar) { - struct bmi_target_info target_info; + struct bmi_target_info target_info = {}; int ret = 0; ret = ath10k_hif_power_up(ar, ATH10K_FIRMWARE_MODE_NORMAL); @@ -3451,7 +3447,6 @@ static int ath10k_core_probe_fw(struct ath10k *ar) switch (ar->hif.bus) { case ATH10K_BUS_SDIO: - memset(&target_info, 0, sizeof(target_info)); ret = ath10k_bmi_get_target_info_sdio(ar, &target_info); if (ret) { ath10k_err(ar, "could not get target info (%d)\n", ret); @@ -3463,7 +3458,6 @@ static int ath10k_core_probe_fw(struct ath10k *ar) case ATH10K_BUS_PCI: case ATH10K_BUS_AHB: case ATH10K_BUS_USB: - memset(&target_info, 0, sizeof(target_info)); ret = ath10k_bmi_get_target_info(ar, &target_info); if (ret) { ath10k_err(ar, "could not get target info (%d)\n", ret); @@ -3473,7 +3467,6 @@ static int ath10k_core_probe_fw(struct ath10k *ar) ar->hw->wiphy->hw_version = target_info.version; break; case ATH10K_BUS_SNOC: - memset(&target_info, 0, sizeof(target_info)); ret = ath10k_hif_get_target_info(ar, &target_info); if (ret) { ath10k_err(ar, "could not get target info (%d)\n", ret); @@ -3824,6 +3817,7 @@ struct ath10k *ath10k_core_create(size_t priv_size, struct device *dev, INIT_WORK(&ar->register_work, ath10k_core_register_work); INIT_WORK(&ar->restart_work, ath10k_core_restart); + INIT_WORK(&ar->recovery_check_work, ath10k_core_recovery_check_work); INIT_WORK(&ar->set_coverage_class_work, ath10k_core_set_coverage_class_work); diff --git a/sys/contrib/dev/athk/ath10k/core.h b/sys/contrib/dev/athk/ath10k/core.h index cb250ca6991d..eaf122d4b112 100644 --- a/sys/contrib/dev/athk/ath10k/core.h +++ b/sys/contrib/dev/athk/ath10k/core.h @@ -3,7 +3,6 @@ * Copyright (c) 2005-2011 Atheros Communications Inc. * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. - * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ @@ -1216,6 +1215,7 @@ struct ath10k { struct work_struct register_work; struct work_struct restart_work; + struct work_struct recovery_check_work; struct work_struct bundle_tx_work; struct work_struct tx_complete_work; @@ -1267,9 +1267,13 @@ struct ath10k { struct { /* protected by conf_mutex */ struct ath10k_fw_components utf_mode_fw; + u8 ftm_msgref; /* protected by data_lock */ bool utf_monitor; + u32 data_pos; + u32 expected_seq; + u8 *eventdata; } testmode; struct { diff --git a/sys/contrib/dev/athk/ath10k/mac.c b/sys/contrib/dev/athk/ath10k/mac.c index 6725c2c742bd..e2bda3c0d925 100644 --- a/sys/contrib/dev/athk/ath10k/mac.c +++ b/sys/contrib/dev/athk/ath10k/mac.c @@ -3,7 +3,6 @@ * Copyright (c) 2005-2011 Atheros Communications Inc. * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ @@ -5442,6 +5441,7 @@ static void ath10k_stop(struct ieee80211_hw *hw, bool suspend) cancel_work_sync(&ar->set_coverage_class_work); cancel_delayed_work_sync(&ar->scan.timeout); cancel_work_sync(&ar->restart_work); + cancel_work_sync(&ar->recovery_check_work); } static int ath10k_config_ps(struct ath10k *ar) diff --git a/sys/contrib/dev/athk/ath10k/qmi.c b/sys/contrib/dev/athk/ath10k/qmi.c index f1f33af0170a..8275345631a0 100644 --- a/sys/contrib/dev/athk/ath10k/qmi.c +++ b/sys/contrib/dev/athk/ath10k/qmi.c @@ -986,7 +986,7 @@ static int ath10k_qmi_new_server(struct qmi_handle *qmi_hdl, ath10k_dbg(ar, ATH10K_DBG_QMI, "wifi fw qmi service found\n"); - ret = kernel_connect(qmi_hdl->sock, (struct sockaddr *)&qmi->sq, + ret = kernel_connect(qmi_hdl->sock, (struct sockaddr_unsized *)&qmi->sq, sizeof(qmi->sq), 0); if (ret) { ath10k_err(ar, "failed to connect to a remote QMI service port\n"); diff --git a/sys/contrib/dev/athk/ath10k/testmode.c b/sys/contrib/dev/athk/ath10k/testmode.c index 3fcefc55b74f..d3bd385694d6 100644 --- a/sys/contrib/dev/athk/ath10k/testmode.c +++ b/sys/contrib/dev/athk/ath10k/testmode.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: ISC /* * Copyright (c) 2014-2017 Qualcomm Atheros, Inc. + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ #include "testmode.h" @@ -10,12 +11,17 @@ #include "debug.h" #include "wmi.h" +#include "wmi-tlv.h" #include "hif.h" #include "hw.h" #include "core.h" #include "testmode_i.h" +#define ATH10K_FTM_SEG_NONE ((u32)-1) +#define ATH10K_FTM_SEGHDR_CURRENT_SEQ GENMASK(3, 0) +#define ATH10K_FTM_SEGHDR_TOTAL_SEGMENTS GENMASK(7, 4) + static const struct nla_policy ath10k_tm_policy[ATH10K_TM_ATTR_MAX + 1] = { [ATH10K_TM_ATTR_CMD] = { .type = NLA_U32 }, [ATH10K_TM_ATTR_DATA] = { .type = NLA_BINARY, @@ -25,41 +31,19 @@ static const struct nla_policy ath10k_tm_policy[ATH10K_TM_ATTR_MAX + 1] = { [ATH10K_TM_ATTR_VERSION_MINOR] = { .type = NLA_U32 }, }; -/* Returns true if callee consumes the skb and the skb should be discarded. - * Returns false if skb is not used. Does not sleep. - */ -bool ath10k_tm_event_wmi(struct ath10k *ar, u32 cmd_id, struct sk_buff *skb) +static void ath10k_tm_event_unsegmented(struct ath10k *ar, u32 cmd_id, + struct sk_buff *skb) { struct sk_buff *nl_skb; - bool consumed; int ret; - ath10k_dbg(ar, ATH10K_DBG_TESTMODE, - "testmode event wmi cmd_id %d skb %p skb->len %d\n", - cmd_id, skb, skb->len); - - ath10k_dbg_dump(ar, ATH10K_DBG_TESTMODE, NULL, "", skb->data, skb->len); - - spin_lock_bh(&ar->data_lock); - - if (!ar->testmode.utf_monitor) { - consumed = false; - goto out; - } - - /* Only testmode.c should be handling events from utf firmware, - * otherwise all sort of problems will arise as mac80211 operations - * are not initialised. - */ - consumed = true; - nl_skb = cfg80211_testmode_alloc_event_skb(ar->hw->wiphy, 2 * sizeof(u32) + skb->len, GFP_ATOMIC); if (!nl_skb) { ath10k_warn(ar, "failed to allocate skb for testmode wmi event\n"); - goto out; + return; } ret = nla_put_u32(nl_skb, ATH10K_TM_ATTR_CMD, ATH10K_TM_CMD_WMI); @@ -68,7 +52,7 @@ bool ath10k_tm_event_wmi(struct ath10k *ar, u32 cmd_id, struct sk_buff *skb) "failed to put testmode wmi event cmd attribute: %d\n", ret); kfree_skb(nl_skb); - goto out; + return; } ret = nla_put_u32(nl_skb, ATH10K_TM_ATTR_WMI_CMDID, cmd_id); @@ -77,7 +61,7 @@ bool ath10k_tm_event_wmi(struct ath10k *ar, u32 cmd_id, struct sk_buff *skb) "failed to put testmode wmi event cmd_id: %d\n", ret); kfree_skb(nl_skb); - goto out; + return; } ret = nla_put(nl_skb, ATH10K_TM_ATTR_DATA, skb->len, skb->data); @@ -86,10 +70,122 @@ bool ath10k_tm_event_wmi(struct ath10k *ar, u32 cmd_id, struct sk_buff *skb) "failed to copy skb to testmode wmi event: %d\n", ret); kfree_skb(nl_skb); - goto out; + return; + } + + cfg80211_testmode_event(nl_skb, GFP_ATOMIC); +} + +static void ath10k_tm_event_segmented(struct ath10k *ar, u32 cmd_id, struct sk_buff *skb) +{ + struct wmi_ftm_cmd *ftm = (struct wmi_ftm_cmd *)skb->data; + u8 total_segments, current_seq; + struct sk_buff *nl_skb; + u8 const *buf_pos; + u16 datalen; + u32 data_pos; + int ret; + + if (skb->len < sizeof(*ftm)) { + ath10k_warn(ar, "Invalid ftm event length: %d\n", skb->len); + return; + } + + current_seq = FIELD_GET(ATH10K_FTM_SEGHDR_CURRENT_SEQ, + __le32_to_cpu(ftm->seg_hdr.segmentinfo)); + total_segments = FIELD_GET(ATH10K_FTM_SEGHDR_TOTAL_SEGMENTS, + __le32_to_cpu(ftm->seg_hdr.segmentinfo)); + datalen = skb->len - sizeof(*ftm); + buf_pos = ftm->data; + + if (current_seq == 0) { + ar->testmode.expected_seq = 0; + ar->testmode.data_pos = 0; + } + + data_pos = ar->testmode.data_pos; + + if ((data_pos + datalen) > ATH_FTM_EVENT_MAX_BUF_LENGTH) { + ath10k_warn(ar, "Invalid ftm event length at %u: %u\n", + data_pos, datalen); + ret = -EINVAL; + return; + } + + memcpy(&ar->testmode.eventdata[data_pos], buf_pos, datalen); + data_pos += datalen; + + if (++ar->testmode.expected_seq != total_segments) { + ar->testmode.data_pos = data_pos; + ath10k_dbg(ar, ATH10K_DBG_TESTMODE, "partial data received %u/%u\n", + current_seq + 1, total_segments); + return; + } + + ath10k_dbg(ar, ATH10K_DBG_TESTMODE, "total data length %u\n", data_pos); + + nl_skb = cfg80211_testmode_alloc_event_skb(ar->hw->wiphy, + 2 * sizeof(u32) + data_pos, + GFP_ATOMIC); + if (!nl_skb) { + ath10k_warn(ar, "failed to allocate skb for testmode wmi event\n"); + return; + } + + ret = nla_put_u32(nl_skb, ATH10K_TM_ATTR_CMD, ATH10K_TM_CMD_TLV); + if (ret) { + ath10k_warn(ar, "failed to put testmode wmi event attribute: %d\n", ret); + kfree_skb(nl_skb); + return; + } + + ret = nla_put_u32(nl_skb, ATH10K_TM_ATTR_WMI_CMDID, cmd_id); + if (ret) { + ath10k_warn(ar, "failed to put testmode wmi event cmd_id: %d\n", ret); + kfree_skb(nl_skb); + return; + } + + ret = nla_put(nl_skb, ATH10K_TM_ATTR_DATA, data_pos, &ar->testmode.eventdata[0]); + if (ret) { + ath10k_warn(ar, "failed to copy skb to testmode wmi event: %d\n", ret); + kfree_skb(nl_skb); + return; } cfg80211_testmode_event(nl_skb, GFP_ATOMIC); +} + +/* Returns true if callee consumes the skb and the skb should be discarded. + * Returns false if skb is not used. Does not sleep. + */ +bool ath10k_tm_event_wmi(struct ath10k *ar, u32 cmd_id, struct sk_buff *skb) +{ + bool consumed; + + ath10k_dbg(ar, ATH10K_DBG_TESTMODE, + "testmode event wmi cmd_id %d skb %p skb->len %d\n", + cmd_id, skb, skb->len); + + ath10k_dbg_dump(ar, ATH10K_DBG_TESTMODE, NULL, "", skb->data, skb->len); + + spin_lock_bh(&ar->data_lock); + + if (!ar->testmode.utf_monitor) { + consumed = false; + goto out; + } + + /* Only testmode.c should be handling events from utf firmware, + * otherwise all sort of problems will arise as mac80211 operations + * are not initialised. + */ + consumed = true; + + if (ar->testmode.expected_seq != ATH10K_FTM_SEG_NONE) + ath10k_tm_event_segmented(ar, cmd_id, skb); + else + ath10k_tm_event_unsegmented(ar, cmd_id, skb); out: spin_unlock_bh(&ar->data_lock); @@ -281,12 +377,18 @@ static int ath10k_tm_cmd_utf_start(struct ath10k *ar, struct nlattr *tb[]) goto err_release_utf_mode_fw; } + ar->testmode.eventdata = kzalloc(ATH_FTM_EVENT_MAX_BUF_LENGTH, GFP_KERNEL); + if (!ar->testmode.eventdata) { + ret = -ENOMEM; + goto err_power_down; + } + ret = ath10k_core_start(ar, ATH10K_FIRMWARE_MODE_UTF, &ar->testmode.utf_mode_fw); if (ret) { ath10k_err(ar, "failed to start core (testmode): %d\n", ret); ar->state = ATH10K_STATE_OFF; - goto err_power_down; + goto err_release_eventdata; } ar->state = ATH10K_STATE_UTF; @@ -302,6 +404,10 @@ static int ath10k_tm_cmd_utf_start(struct ath10k *ar, struct nlattr *tb[]) return 0; +err_release_eventdata: + kfree(ar->testmode.eventdata); + ar->testmode.eventdata = NULL; + err_power_down: ath10k_hif_power_down(ar); @@ -341,6 +447,9 @@ static void __ath10k_tm_cmd_utf_stop(struct ath10k *ar) release_firmware(ar->testmode.utf_mode_fw.fw_file.firmware); ar->testmode.utf_mode_fw.fw_file.firmware = NULL; + kfree(ar->testmode.eventdata); + ar->testmode.eventdata = NULL; + ar->state = ATH10K_STATE_OFF; } @@ -424,6 +533,85 @@ out: return ret; } +static int ath10k_tm_cmd_tlv(struct ath10k *ar, struct nlattr *tb[]) +{ + u16 total_bytes, num_segments; + u32 cmd_id, buf_len; + u8 segnumber = 0; + u8 *bufpos; + void *buf; + int ret; + + mutex_lock(&ar->conf_mutex); + + if (ar->state != ATH10K_STATE_UTF) { + ret = -ENETDOWN; + goto out; + } + + buf = nla_data(tb[ATH10K_TM_ATTR_DATA]); + buf_len = nla_len(tb[ATH10K_TM_ATTR_DATA]); + cmd_id = WMI_PDEV_UTF_CMDID; + + ath10k_dbg(ar, ATH10K_DBG_TESTMODE, + "cmd wmi ftm cmd_id %d buffer length %d\n", + cmd_id, buf_len); + ath10k_dbg_dump(ar, ATH10K_DBG_TESTMODE, NULL, "", buf, buf_len); + + bufpos = buf; + total_bytes = buf_len; + num_segments = total_bytes / MAX_WMI_UTF_LEN; + ar->testmode.expected_seq = 0; + + if (buf_len - (num_segments * MAX_WMI_UTF_LEN)) + num_segments++; + + while (buf_len) { + u16 chunk_len = min_t(u16, buf_len, MAX_WMI_UTF_LEN); + struct wmi_ftm_cmd *ftm_cmd; + struct sk_buff *skb; + u32 hdr_info; + u8 seginfo; + + skb = ath10k_wmi_alloc_skb(ar, (chunk_len + + sizeof(struct wmi_ftm_cmd))); + if (!skb) { + ret = -ENOMEM; + goto out; + } + + ftm_cmd = (struct wmi_ftm_cmd *)skb->data; + hdr_info = FIELD_PREP(WMI_TLV_TAG, WMI_TLV_TAG_ARRAY_BYTE) | + FIELD_PREP(WMI_TLV_LEN, (chunk_len + + sizeof(struct wmi_ftm_seg_hdr))); + ftm_cmd->tlv_header = __cpu_to_le32(hdr_info); + ftm_cmd->seg_hdr.len = __cpu_to_le32(total_bytes); + ftm_cmd->seg_hdr.msgref = __cpu_to_le32(ar->testmode.ftm_msgref); + seginfo = FIELD_PREP(ATH10K_FTM_SEGHDR_TOTAL_SEGMENTS, num_segments) | + FIELD_PREP(ATH10K_FTM_SEGHDR_CURRENT_SEQ, segnumber); + ftm_cmd->seg_hdr.segmentinfo = __cpu_to_le32(seginfo); + segnumber++; + + memcpy(&ftm_cmd->data, bufpos, chunk_len); + + ret = ath10k_wmi_cmd_send(ar, skb, cmd_id); + if (ret) { + ath10k_warn(ar, "failed to send wmi ftm command: %d\n", ret); + goto out; + } + + buf_len -= chunk_len; + bufpos += chunk_len; + } + + ar->testmode.ftm_msgref++; + ret = 0; + +out: + mutex_unlock(&ar->conf_mutex); + return ret; +} + int ath10k_tm_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif, void *data, int len) { @@ -439,9 +627,14 @@ int ath10k_tm_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif, if (!tb[ATH10K_TM_ATTR_CMD]) return -EINVAL; + ar->testmode.expected_seq = ATH10K_FTM_SEG_NONE; + switch (nla_get_u32(tb[ATH10K_TM_ATTR_CMD])) { case ATH10K_TM_CMD_GET_VERSION: - return ath10k_tm_cmd_get_version(ar, tb); + if (!tb[ATH10K_TM_ATTR_DATA]) + return ath10k_tm_cmd_get_version(ar, tb); + else /* ATH10K_TM_CMD_TLV */ + return ath10k_tm_cmd_tlv(ar, tb); case ATH10K_TM_CMD_UTF_START: return ath10k_tm_cmd_utf_start(ar, tb); case ATH10K_TM_CMD_UTF_STOP: diff --git a/sys/contrib/dev/athk/ath10k/testmode_i.h b/sys/contrib/dev/athk/ath10k/testmode_i.h index ee1cb27c1d60..1603f5276682 100644 --- a/sys/contrib/dev/athk/ath10k/testmode_i.h +++ b/sys/contrib/dev/athk/ath10k/testmode_i.h @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: ISC */ /* * Copyright (c) 2014,2017 Qualcomm Atheros, Inc. + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ /* "API" level of the ath10k testmode interface. Bump it after every @@ -14,6 +15,7 @@ #define ATH10K_TESTMODE_VERSION_MINOR 0 #define ATH10K_TM_DATA_MAX_LEN 5000 +#define ATH_FTM_EVENT_MAX_BUF_LENGTH 2048 enum ath10k_tm_attr { __ATH10K_TM_ATTR_INVALID = 0, @@ -57,4 +59,17 @@ enum ath10k_tm_cmd { * ATH10K_TM_ATTR_DATA. */ ATH10K_TM_CMD_WMI = 3, + + /* The command used to transmit a test command to the firmware + * and the event to receive test events from the firmware. The data + * received only contain the TLV payload, need to add the tlv header + * and send the cmd to firmware with command id WMI_PDEV_UTF_CMDID. + * The data payload size could be large and the driver needs to + * send segmented data to firmware. + * + * This legacy testmode command shares the same value as the get-version + * command. To distinguish between them, we check whether the data attribute + * is present. + */ + ATH10K_TM_CMD_TLV = ATH10K_TM_CMD_GET_VERSION, }; diff --git a/sys/contrib/dev/athk/ath10k/wmi.h b/sys/contrib/dev/athk/ath10k/wmi.h index 0faefc0a9a40..7f50a1de6b97 100644 --- a/sys/contrib/dev/athk/ath10k/wmi.h +++ b/sys/contrib/dev/athk/ath10k/wmi.h @@ -3,7 +3,7 @@ * Copyright (c) 2005-2011 Atheros Communications Inc. * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. */ #ifndef _WMI_H_ @@ -7418,6 +7418,23 @@ struct wmi_pdev_bb_timing_cfg_cmd { __le32 bb_xpa_timing; } __packed; +struct wmi_ftm_seg_hdr { + __le32 len; + __le32 msgref; + __le32 segmentinfo; + __le32 pdev_id; +} __packed; + +struct wmi_ftm_cmd { + __le32 tlv_header; + struct wmi_ftm_seg_hdr seg_hdr; + u8 data[]; +} __packed; + +#define WMI_TLV_LEN GENMASK(15, 0) +#define WMI_TLV_TAG GENMASK(31, 16) +#define MAX_WMI_UTF_LEN 252 + struct ath10k; struct ath10k_vif; struct ath10k_fw_stats_pdev; diff --git a/sys/modules/ath10k/Makefile b/sys/modules/ath10k/Makefile index 98df270b6791..d8196854b681 100644 --- a/sys/modules/ath10k/Makefile +++ b/sys/modules/ath10k/Makefile @@ -29,6 +29,7 @@ SRCS+= leds.c .endif CFLAGS+= -DKBUILD_MODNAME='"ath10k"' +CFLAGS+= -DLINUXKPI_VERSION=61900 CFLAGS+= -I${DEVATH10KDIR} CFLAGS+= -I${DEVATH10KDIR}/.. From nobody Fri Feb 27 02:29:24 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMn06Tpz6T7Nc for ; Fri, 27 Feb 2026 02: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXMm48tWz40P1 for ; Fri, 27 Feb 2026 02: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=1772159364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LlYhCV8blHTqrfj54Ez21sndW5Xd5iUqK8eVBz+cCOQ=; b=F3rrA59eVHJ5q6WDz3I5eiXi4U5DKRdMNHUBYUx2rPk+D/ZpjRqzq1ukDu22T0Zl4Mfy/h 4hmJMMStf/B5O2nC31rYfeBD4KuO1z92InpYjACrURAKCp28G8TIoZMHbxIQE8zi1Cin8z SE1rOXlre2BuBT6fHP4JG0u0t586gdRjcy4XBxAkuQgLYtP4KFRXO2Cs7TtdyRwGHavCa0 YOmV43MkWryWO/ypef6j8mbw03Zzhf6kutu53QQ6z6/Jgm+yuoMNP7vvqt4GqdPnKpNkN6 qhw6LHLUkTnjCi4hFCmDAr1e2vgzAqQnePv6wQ77PqjmkDnU/RR7hEL6LzzcZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159364; a=rsa-sha256; cv=none; b=oma8U2RHbAIGY8BWnCYQpqivu3N93uO8OIu/fTAz7LkC+OTeZvXs12LoLlrKyPWWesBCDJ Ps8plOlQ3KzOILDhu9XV4PtDXTTiVcuEDoFqoedsvSfHpk7TPV7gVsTTJ/3HNGXe6AsDmw 80swmJG3cuQH9YERM3GRfb1Q21aeXQhLlbSsieLyev8E/kdWBFdXy1nzuOdQzJBw/sBZfY EyqH7HCfYZqHT8H4Vx6ZR0BpKDIM+PeSijqahnVxufvPypwMwTMj9o4zvISK+tmkZ6cIZS DEUc+DsWXbHMfk7ZWRiO3bwIMIl5NKBFYeqpqq+tx+VaC8ZOeQmvqrWyBa7yhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LlYhCV8blHTqrfj54Ez21sndW5Xd5iUqK8eVBz+cCOQ=; b=DHN88tk9ZuYCaCq8YGtZtbuQy16hjqgkj0ksUiiXBQvkd+2Hu8bepYZPmEdFg/ufo4DpSY CbdOKHLSpyDwupZYuWkBPNAJQ+/kF4/wlnACDI5qMmzz79gx45Aa11JyrGSZpn5/2abo+W ElJUJe3bR2Fz/LKCeKf2Sz92wfgJB+HYR3BvuA1aoRpqJZLcJ1EzMWIhru+Yv/bh/O2gF6 xxUinq746bJsU8+xLm6TtGLdnhSGY5Yatt+XP6WY+cjl4SLo6Iuv9YOXFic5ZMWoUp6d/r GlpL8nry4unI9EtOu5qxgzZLD7d4LmYe/+mViIGA2TvijA/rC6sjkPQ7t4rtMw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMm3cjdzyZR for ; Fri, 27 Feb 2026 02:29:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2129f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: 3a2aabbab109 - stable/15 - mt76: update Mediatek's mt76 driver List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3a2aabbab109c5430e2513e6c91ac66eba457255 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:24 +0000 Message-Id: <69a10184.2129f.3669e50f@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=3a2aabbab109c5430e2513e6c91ac66eba457255 commit 3a2aabbab109c5430e2513e6c91ac66eba457255 Author: Bjoern A. Zeeb AuthorDate: 2026-01-23 13:52:47 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 22:59:04 +0000 mt76: update Mediatek's mt76 driver This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 24d479d26b25bce5faea3ddd9fa8f3a6c3129ea7 ( tag: v6.19-rc6 ). Notable change: license got switched from ISC to BSD-3-Clause-Clear. util.h is now imported from upstream given it is no longer GPL-only. See the upstream repository 909675fd4344f73aad5f75f123bd271ada2ab9fb and a96fed2825d8dfb068bf640419c619b5f2df4218. For us the new version should also help with page pools and DMA32. Sponsored by: The FreeBSD Foundation (cherry picked from commit b1bebaaba9b9c0ddfe503c43ca8e9e3917ee2c57) --- .../include/linux/soc/airoha/airoha_offload.h | 48 ++ .../common/include/linux/soc/mediatek/mtk_wed.h | 14 +- sys/contrib/dev/mediatek/mt76/Kconfig | 51 ++ sys/contrib/dev/mediatek/mt76/Makefile | 48 ++ sys/contrib/dev/mediatek/mt76/agg-rx.c | 4 +- sys/contrib/dev/mediatek/mt76/channel.c | 15 +- sys/contrib/dev/mediatek/mt76/debugfs.c | 6 +- sys/contrib/dev/mediatek/mt76/dma.c | 302 ++++++-- sys/contrib/dev/mediatek/mt76/dma.h | 98 ++- sys/contrib/dev/mediatek/mt76/eeprom.c | 87 ++- sys/contrib/dev/mediatek/mt76/mac80211.c | 65 +- sys/contrib/dev/mediatek/mt76/mcu.c | 2 +- sys/contrib/dev/mediatek/mt76/mmio.c | 20 +- sys/contrib/dev/mediatek/mt76/mt76.h | 232 +++++- sys/contrib/dev/mediatek/mt76/mt7603/Kconfig | 12 + sys/contrib/dev/mediatek/mt76/mt7603/Makefile | 7 + sys/contrib/dev/mediatek/mt76/mt7603/beacon.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7603/core.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7603/debugfs.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7603/dma.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7603/eeprom.c | 5 +- sys/contrib/dev/mediatek/mt76/mt7603/eeprom.h | 2 +- sys/contrib/dev/mediatek/mt76/mt7603/init.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7603/mac.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7603/mac.h | 2 +- sys/contrib/dev/mediatek/mt76/mt7603/main.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7603/mcu.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7603/mcu.h | 2 +- sys/contrib/dev/mediatek/mt76/mt7603/mt7603.h | 2 +- sys/contrib/dev/mediatek/mt76/mt7603/pci.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7603/regs.h | 2 +- sys/contrib/dev/mediatek/mt76/mt7603/soc.c | 4 +- sys/contrib/dev/mediatek/mt76/mt7615/Kconfig | 56 ++ sys/contrib/dev/mediatek/mt76/mt7615/Makefile | 2 +- sys/contrib/dev/mediatek/mt76/mt7615/debugfs.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7615/dma.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7615/eeprom.c | 6 +- sys/contrib/dev/mediatek/mt76/mt7615/eeprom.h | 2 +- sys/contrib/dev/mediatek/mt76/mt7615/init.c | 7 +- sys/contrib/dev/mediatek/mt76/mt7615/mac.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7615/mac.h | 2 +- sys/contrib/dev/mediatek/mt76/mt7615/main.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7615/mcu.c | 6 +- sys/contrib/dev/mediatek/mt76/mt7615/mcu.h | 2 +- sys/contrib/dev/mediatek/mt76/mt7615/mmio.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7615/mt7615.h | 2 +- .../dev/mediatek/mt76/mt7615/mt7615_trace.h | 2 +- sys/contrib/dev/mediatek/mt76/mt7615/pci.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7615/pci_init.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7615/pci_mac.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7615/regs.h | 2 +- sys/contrib/dev/mediatek/mt76/mt7615/sdio.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7615/soc.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7615/testmode.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7615/trace.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7615/usb.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7615/usb_sdio.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76_connac.h | 2 +- sys/contrib/dev/mediatek/mt76/mt76_connac2_mac.h | 2 +- sys/contrib/dev/mediatek/mt76/mt76_connac3_mac.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76_connac3_mac.h | 9 +- sys/contrib/dev/mediatek/mt76/mt76_connac_mac.c | 21 +- sys/contrib/dev/mediatek/mt76/mt76_connac_mcu.c | 39 +- sys/contrib/dev/mediatek/mt76/mt76_connac_mcu.h | 4 +- sys/contrib/dev/mediatek/mt76/mt76x0/pci.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x0/pci_mcu.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x0/usb_mcu.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x02.h | 2 +- sys/contrib/dev/mediatek/mt76/mt76x02_beacon.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x02_debugfs.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x02_dfs.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x02_dfs.h | 2 +- sys/contrib/dev/mediatek/mt76/mt76x02_dma.h | 2 +- sys/contrib/dev/mediatek/mt76/mt76x02_eeprom.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x02_eeprom.h | 2 +- sys/contrib/dev/mediatek/mt76/mt76x02_mac.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x02_mac.h | 2 +- sys/contrib/dev/mediatek/mt76/mt76x02_mcu.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x02_mcu.h | 2 +- sys/contrib/dev/mediatek/mt76/mt76x02_mmio.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x02_phy.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x02_phy.h | 2 +- sys/contrib/dev/mediatek/mt76/mt76x02_regs.h | 2 +- sys/contrib/dev/mediatek/mt76/mt76x02_trace.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x02_trace.h | 2 +- sys/contrib/dev/mediatek/mt76/mt76x02_txrx.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x02_usb.h | 2 +- sys/contrib/dev/mediatek/mt76/mt76x02_usb_core.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x02_usb_mcu.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x02_util.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x2/Kconfig | 29 + sys/contrib/dev/mediatek/mt76/mt76x2/Makefile | 15 + sys/contrib/dev/mediatek/mt76/mt76x2/eeprom.c | 6 +- sys/contrib/dev/mediatek/mt76/mt76x2/eeprom.h | 2 +- sys/contrib/dev/mediatek/mt76/mt76x2/init.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x2/mac.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x2/mac.h | 2 +- sys/contrib/dev/mediatek/mt76/mt76x2/mcu.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x2/mcu.h | 2 +- sys/contrib/dev/mediatek/mt76/mt76x2/mt76x2.h | 2 +- sys/contrib/dev/mediatek/mt76/mt76x2/mt76x2u.h | 2 +- sys/contrib/dev/mediatek/mt76/mt76x2/pci.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x2/pci_init.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x2/pci_main.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x2/pci_mcu.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x2/pci_phy.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x2/phy.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x2/usb.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x2/usb_init.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x2/usb_mac.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x2/usb_main.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x2/usb_mcu.c | 2 +- sys/contrib/dev/mediatek/mt76/mt76x2/usb_phy.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7915/Kconfig | 2 +- sys/contrib/dev/mediatek/mt76/mt7915/Makefile | 2 +- sys/contrib/dev/mediatek/mt76/mt7915/coredump.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7915/coredump.h | 2 +- sys/contrib/dev/mediatek/mt76/mt7915/debugfs.c | 76 +- sys/contrib/dev/mediatek/mt76/mt7915/dma.c | 6 +- sys/contrib/dev/mediatek/mt76/mt7915/eeprom.c | 6 +- sys/contrib/dev/mediatek/mt76/mt7915/eeprom.h | 8 +- sys/contrib/dev/mediatek/mt76/mt7915/init.c | 13 +- sys/contrib/dev/mediatek/mt76/mt7915/mac.c | 4 +- sys/contrib/dev/mediatek/mt76/mt7915/mac.h | 2 +- sys/contrib/dev/mediatek/mt76/mt7915/main.c | 4 +- sys/contrib/dev/mediatek/mt76/mt7915/mcu.c | 203 +++-- sys/contrib/dev/mediatek/mt76/mt7915/mcu.h | 8 +- sys/contrib/dev/mediatek/mt76/mt7915/mmio.c | 8 +- sys/contrib/dev/mediatek/mt76/mt7915/mt7915.h | 11 +- sys/contrib/dev/mediatek/mt76/mt7915/pci.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7915/regs.h | 2 +- sys/contrib/dev/mediatek/mt76/mt7915/soc.c | 23 +- sys/contrib/dev/mediatek/mt76/mt7915/testmode.c | 4 +- sys/contrib/dev/mediatek/mt76/mt7915/testmode.h | 2 +- sys/contrib/dev/mediatek/mt76/mt7921/Kconfig | 2 +- sys/contrib/dev/mediatek/mt76/mt7921/Makefile | 2 +- sys/contrib/dev/mediatek/mt76/mt7921/debugfs.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7921/init.c | 8 +- sys/contrib/dev/mediatek/mt76/mt7921/mac.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7921/main.c | 4 +- sys/contrib/dev/mediatek/mt76/mt7921/mcu.c | 4 +- sys/contrib/dev/mediatek/mt76/mt7921/mcu.h | 2 +- sys/contrib/dev/mediatek/mt76/mt7921/mt7921.h | 2 +- sys/contrib/dev/mediatek/mt76/mt7921/pci.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7921/pci_mac.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7921/pci_mcu.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7921/regs.h | 2 +- sys/contrib/dev/mediatek/mt76/mt7921/sdio.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7921/sdio_mac.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7921/sdio_mcu.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7921/testmode.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7921/usb.c | 5 +- sys/contrib/dev/mediatek/mt76/mt7925/Kconfig | 2 +- sys/contrib/dev/mediatek/mt76/mt7925/Makefile | 4 +- sys/contrib/dev/mediatek/mt76/mt7925/debugfs.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7925/init.c | 156 +--- sys/contrib/dev/mediatek/mt76/mt7925/mac.c | 6 +- sys/contrib/dev/mediatek/mt76/mt7925/mac.h | 2 +- sys/contrib/dev/mediatek/mt76/mt7925/main.c | 107 +-- sys/contrib/dev/mediatek/mt76/mt7925/mcu.c | 127 +++- sys/contrib/dev/mediatek/mt76/mt7925/mcu.h | 10 +- sys/contrib/dev/mediatek/mt76/mt7925/mt7925.h | 11 +- sys/contrib/dev/mediatek/mt76/mt7925/pci.c | 41 +- sys/contrib/dev/mediatek/mt76/mt7925/pci_mac.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7925/pci_mcu.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7925/regd.c | 265 +++++++ sys/contrib/dev/mediatek/mt76/mt7925/regd.h | 19 + sys/contrib/dev/mediatek/mt76/mt7925/regs.h | 2 +- sys/contrib/dev/mediatek/mt76/mt7925/testmode.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7925/usb.c | 5 +- sys/contrib/dev/mediatek/mt76/mt792x.h | 5 +- sys/contrib/dev/mediatek/mt76/mt792x_acpi_sar.c | 2 +- sys/contrib/dev/mediatek/mt76/mt792x_acpi_sar.h | 2 +- sys/contrib/dev/mediatek/mt76/mt792x_core.c | 9 +- sys/contrib/dev/mediatek/mt76/mt792x_debugfs.c | 2 +- sys/contrib/dev/mediatek/mt76/mt792x_dma.c | 8 +- sys/contrib/dev/mediatek/mt76/mt792x_mac.c | 2 +- sys/contrib/dev/mediatek/mt76/mt792x_regs.h | 2 +- sys/contrib/dev/mediatek/mt76/mt792x_trace.c | 2 +- sys/contrib/dev/mediatek/mt76/mt792x_trace.h | 2 +- sys/contrib/dev/mediatek/mt76/mt792x_usb.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7996/Kconfig | 9 +- sys/contrib/dev/mediatek/mt76/mt7996/Makefile | 3 +- sys/contrib/dev/mediatek/mt76/mt7996/coredump.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7996/coredump.h | 2 +- sys/contrib/dev/mediatek/mt76/mt7996/debugfs.c | 74 +- sys/contrib/dev/mediatek/mt76/mt7996/dma.c | 343 +++++++-- sys/contrib/dev/mediatek/mt76/mt7996/eeprom.c | 5 +- sys/contrib/dev/mediatek/mt76/mt7996/eeprom.h | 2 +- sys/contrib/dev/mediatek/mt76/mt7996/init.c | 390 +++++++--- sys/contrib/dev/mediatek/mt76/mt7996/mac.c | 836 +++++++++++++++++---- sys/contrib/dev/mediatek/mt76/mt7996/mac.h | 2 +- sys/contrib/dev/mediatek/mt76/mt7996/main.c | 614 +++++++++------ sys/contrib/dev/mediatek/mt76/mt7996/mcu.c | 378 +++++----- sys/contrib/dev/mediatek/mt76/mt7996/mcu.h | 19 +- sys/contrib/dev/mediatek/mt76/mt7996/mmio.c | 113 ++- sys/contrib/dev/mediatek/mt76/mt7996/mt7996.h | 144 +++- sys/contrib/dev/mediatek/mt76/mt7996/pci.c | 10 +- sys/contrib/dev/mediatek/mt76/mt7996/regs.h | 34 +- sys/contrib/dev/mediatek/mt76/pci.c | 2 +- sys/contrib/dev/mediatek/mt76/scan.c | 15 +- sys/contrib/dev/mediatek/mt76/sdio.c | 2 +- sys/contrib/dev/mediatek/mt76/sdio.h | 2 +- sys/contrib/dev/mediatek/mt76/sdio_txrx.c | 2 +- sys/contrib/dev/mediatek/mt76/testmode.c | 2 +- sys/contrib/dev/mediatek/mt76/testmode.h | 2 +- sys/contrib/dev/mediatek/mt76/trace.c | 2 +- sys/contrib/dev/mediatek/mt76/trace.h | 2 +- sys/contrib/dev/mediatek/mt76/tx.c | 11 +- sys/contrib/dev/mediatek/mt76/usb.c | 2 +- sys/contrib/dev/mediatek/mt76/usb_trace.c | 2 +- sys/contrib/dev/mediatek/mt76/usb_trace.h | 2 +- sys/contrib/dev/mediatek/mt76/util.c | 2 +- sys/contrib/dev/mediatek/mt76/util.h | 132 ++-- sys/contrib/dev/mediatek/mt76/wed.c | 20 +- sys/modules/mt76/Makefile.inc | 3 +- sys/modules/mt76/mt7925/Makefile | 2 +- 217 files changed, 4191 insertions(+), 1624 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/soc/airoha/airoha_offload.h b/sys/compat/linuxkpi/common/include/linux/soc/airoha/airoha_offload.h new file mode 100644 index 000000000000..ade0b06d839f --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/soc/airoha/airoha_offload.h @@ -0,0 +1,48 @@ +/*- + * Copyright (c) 2026 Bjoern A. Zeeb + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#ifndef _LINUXKPI_LINUX_SOC_AIROHA_AIROHA_OFFLOAD_H +#define _LINUXKPI_LINUX_SOC_AIROHA_AIROHA_OFFLOAD_H + +#include /* pr_debug */ + +enum airoha_npu_wlan_get_cmd { + __dummy_airoha_npu_wlan_get_cmd, +}; +enum airoha_npu_wlan_set_cmd { + __dummy_airoha_npu_wlan_set_cmd, +}; + +struct airoha_npu { +}; +struct airoha_npu_rx_dma_desc { +}; +struct airoha_npu_tx_dma_desc { +}; + +static __inline int +airoha_npu_wlan_send_msg(void *npu, int ifindex, + enum airoha_npu_wlan_set_cmd cmd, void *val, size_t len, gfp_t gfp) +{ + pr_debug("%s: TODO\n", __func__); + return (-EOPNOTSUPP); +} + +static __inline int +airoha_npu_wlan_get_msg(void *npu, int ifindex, + enum airoha_npu_wlan_get_cmd cmd, void *val, size_t len, gfp_t gfp) +{ + pr_debug("%s: TODO\n", __func__); + return (-EOPNOTSUPP); +} + +static __inline void +airoha_npu_wlan_enable_irq(struct airoha_npu *npu, int q) +{ + pr_debug("%s: TODO\n", __func__); +} + +#endif /* _LINUXKPI_LINUX_SOC_AIROHA_AIROHA_OFFLOAD_H */ diff --git a/sys/compat/linuxkpi/common/include/linux/soc/mediatek/mtk_wed.h b/sys/compat/linuxkpi/common/include/linux/soc/mediatek/mtk_wed.h index 2b9c6ae4911e..64daa8c78c9d 100644 --- a/sys/compat/linuxkpi/common/include/linux/soc/mediatek/mtk_wed.h +++ b/sys/compat/linuxkpi/common/include/linux/soc/mediatek/mtk_wed.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2022-2025 Bjoern A. Zeeb + * Copyright (c) 2022-2026 Bjoern A. Zeeb * * SPDX-License-Identifier: BSD-2-Clause */ @@ -37,7 +37,13 @@ mtk_wed_device_active(struct mtk_wed_device *dev __unused) static inline bool mtk_wed_get_rx_capa(struct mtk_wed_device *dev __unused) { + pr_debug("%s: TODO\n", __func__); + return (false); +} +static inline bool +mtk_wed_is_amsdu_supported(struct mtk_wed_device *dev __unused) +{ pr_debug("%s: TODO\n", __func__); return (false); } @@ -66,6 +72,12 @@ mtk_wed_get_rx_capa(struct mtk_wed_device *dev __unused) { return (false); } + +static inline bool +mtk_wed_is_amsdu_supported(struct mtk_wed_device *dev __unused) +{ + return (false); +} #endif /* CONFIG_NET_MEDIATEK_SOC_WED */ #endif /* _LINUXKPI_LINUX_SOC_MEDIATEK_MTK_WED_H */ diff --git a/sys/contrib/dev/mediatek/mt76/Kconfig b/sys/contrib/dev/mediatek/mt76/Kconfig new file mode 100644 index 000000000000..502303622a53 --- /dev/null +++ b/sys/contrib/dev/mediatek/mt76/Kconfig @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: BSD-3-Clause-Clear +config MT76_CORE + tristate + select PAGE_POOL + +config MT76_LEDS + bool + depends on MT76_CORE + depends on LEDS_CLASS=y || MT76_CORE=LEDS_CLASS + default y + +config MT76_USB + tristate + depends on MT76_CORE + +config MT76_SDIO + tristate + depends on MT76_CORE + +config MT76x02_LIB + tristate + select MT76_CORE + +config MT76x02_USB + tristate + select MT76_USB + +config MT76_CONNAC_LIB + tristate + select MT76_CORE + +config MT792x_LIB + tristate + select MT76_CONNAC_LIB + +config MT792x_USB + tristate + select MT76_USB + +config MT76_NPU + bool + depends on MT76_CORE + +source "drivers/net/wireless/mediatek/mt76/mt76x0/Kconfig" +source "drivers/net/wireless/mediatek/mt76/mt76x2/Kconfig" +source "drivers/net/wireless/mediatek/mt76/mt7603/Kconfig" +source "drivers/net/wireless/mediatek/mt76/mt7615/Kconfig" +source "drivers/net/wireless/mediatek/mt76/mt7915/Kconfig" +source "drivers/net/wireless/mediatek/mt76/mt7921/Kconfig" +source "drivers/net/wireless/mediatek/mt76/mt7996/Kconfig" +source "drivers/net/wireless/mediatek/mt76/mt7925/Kconfig" diff --git a/sys/contrib/dev/mediatek/mt76/Makefile b/sys/contrib/dev/mediatek/mt76/Makefile new file mode 100644 index 000000000000..1d42adfe8030 --- /dev/null +++ b/sys/contrib/dev/mediatek/mt76/Makefile @@ -0,0 +1,48 @@ +# SPDX-License-Identifier: BSD-3-Clause-Clear +obj-$(CONFIG_MT76_CORE) += mt76.o +obj-$(CONFIG_MT76_USB) += mt76-usb.o +obj-$(CONFIG_MT76_SDIO) += mt76-sdio.o +obj-$(CONFIG_MT76x02_LIB) += mt76x02-lib.o +obj-$(CONFIG_MT76x02_USB) += mt76x02-usb.o +obj-$(CONFIG_MT76_CONNAC_LIB) += mt76-connac-lib.o +obj-$(CONFIG_MT792x_LIB) += mt792x-lib.o +obj-$(CONFIG_MT792x_USB) += mt792x-usb.o + +mt76-y := \ + mmio.o util.o trace.o dma.o mac80211.o debugfs.o eeprom.o \ + tx.o agg-rx.o mcu.o wed.o scan.o channel.o + +mt76-$(CONFIG_MT76_NPU) += npu.o +mt76-$(CONFIG_PCI) += pci.o +mt76-$(CONFIG_NL80211_TESTMODE) += testmode.o + +mt76-usb-y := usb.o usb_trace.o +mt76-sdio-y := sdio.o sdio_txrx.o + +CFLAGS_trace.o := -I$(src) +CFLAGS_usb_trace.o := -I$(src) +CFLAGS_mt76x02_trace.o := -I$(src) +CFLAGS_mt792x_trace.o := -I$(src) + +mt76x02-lib-y := mt76x02_util.o mt76x02_mac.o mt76x02_mcu.o \ + mt76x02_eeprom.o mt76x02_phy.o mt76x02_mmio.o \ + mt76x02_txrx.o mt76x02_trace.o mt76x02_debugfs.o \ + mt76x02_dfs.o mt76x02_beacon.o + +mt76x02-usb-y := mt76x02_usb_mcu.o mt76x02_usb_core.o + +mt76-connac-lib-y := mt76_connac_mcu.o mt76_connac_mac.o mt76_connac3_mac.o + +mt792x-lib-y := mt792x_core.o mt792x_mac.o mt792x_trace.o \ + mt792x_debugfs.o mt792x_dma.o +mt792x-lib-$(CONFIG_ACPI) += mt792x_acpi_sar.o +mt792x-usb-y := mt792x_usb.o + +obj-$(CONFIG_MT76x0_COMMON) += mt76x0/ +obj-$(CONFIG_MT76x2_COMMON) += mt76x2/ +obj-$(CONFIG_MT7603E) += mt7603/ +obj-$(CONFIG_MT7615_COMMON) += mt7615/ +obj-$(CONFIG_MT7915E) += mt7915/ +obj-$(CONFIG_MT7921_COMMON) += mt7921/ +obj-$(CONFIG_MT7996E) += mt7996/ +obj-$(CONFIG_MT7925_COMMON) += mt7925/ diff --git a/sys/contrib/dev/mediatek/mt76/agg-rx.c b/sys/contrib/dev/mediatek/mt76/agg-rx.c index 07c386c7b4d0..3d34caf7e4f7 100644 --- a/sys/contrib/dev/mediatek/mt76/agg-rx.c +++ b/sys/contrib/dev/mediatek/mt76/agg-rx.c @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: ISC +// SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (C) 2018 Felix Fietkau */ @@ -173,6 +173,8 @@ void mt76_rx_aggr_reorder(struct sk_buff *skb, struct sk_buff_head *frames) if (ackp == IEEE80211_QOS_CTL_ACK_POLICY_NOACK) return; + if (wcid->def_wcid) + wcid = wcid->def_wcid; tid = rcu_dereference(wcid->aggr[tidno]); if (!tid) return; diff --git a/sys/contrib/dev/mediatek/mt76/channel.c b/sys/contrib/dev/mediatek/mt76/channel.c index 77b75792eb48..2b705bdb7993 100644 --- a/sys/contrib/dev/mediatek/mt76/channel.c +++ b/sys/contrib/dev/mediatek/mt76/channel.c @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: ISC +// SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (C) 2024 Felix Fietkau */ @@ -314,21 +314,24 @@ void mt76_put_vif_phy_link(struct mt76_phy *phy, struct ieee80211_vif *vif, kfree(mlink); } -static void mt76_roc_complete(struct mt76_phy *phy) +void mt76_roc_complete(struct mt76_phy *phy) { struct mt76_vif_link *mlink = phy->roc_link; + struct mt76_dev *dev = phy->dev; if (!phy->roc_vif) return; if (mlink) mlink->mvif->roc_phy = NULL; - if (phy->main_chandef.chan) + if (phy->main_chandef.chan && + !test_bit(MT76_MCU_RESET, &dev->phy.state)) mt76_set_channel(phy, &phy->main_chandef, false); mt76_put_vif_phy_link(phy, phy->roc_vif, phy->roc_link); phy->roc_vif = NULL; phy->roc_link = NULL; - ieee80211_remain_on_channel_expired(phy->hw); + if (!test_bit(MT76_MCU_RESET, &dev->phy.state)) + ieee80211_remain_on_channel_expired(phy->hw); } void mt76_roc_complete_work(struct work_struct *work) @@ -351,6 +354,7 @@ void mt76_abort_roc(struct mt76_phy *phy) mt76_roc_complete(phy); mutex_unlock(&dev->mutex); } +EXPORT_SYMBOL_GPL(mt76_abort_roc); int mt76_remain_on_channel(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_channel *chan, int duration, @@ -368,7 +372,8 @@ int mt76_remain_on_channel(struct ieee80211_hw *hw, struct ieee80211_vif *vif, mutex_lock(&dev->mutex); - if (phy->roc_vif || dev->scan.phy == phy) { + if (phy->roc_vif || dev->scan.phy == phy || + test_bit(MT76_MCU_RESET, &dev->phy.state)) { ret = -EBUSY; goto out; } diff --git a/sys/contrib/dev/mediatek/mt76/debugfs.c b/sys/contrib/dev/mediatek/mt76/debugfs.c index b6a2746c187d..a5ac6ca86735 100644 --- a/sys/contrib/dev/mediatek/mt76/debugfs.c +++ b/sys/contrib/dev/mediatek/mt76/debugfs.c @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: ISC +// SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (C) 2016 Felix Fietkau */ @@ -93,9 +93,9 @@ void mt76_seq_puts_array(struct seq_file *file, const char *str, { int i; - seq_printf(file, "%10s:", str); + seq_printf(file, "%16s:", str); for (i = 0; i < len; i++) - seq_printf(file, " %2d", val[i]); + seq_printf(file, " %4d", val[i]); seq_puts(file, "\n"); } EXPORT_SYMBOL_GPL(mt76_seq_puts_array); diff --git a/sys/contrib/dev/mediatek/mt76/dma.c b/sys/contrib/dev/mediatek/mt76/dma.c index af902a761e42..5c04a0dce1fa 100644 --- a/sys/contrib/dev/mediatek/mt76/dma.c +++ b/sys/contrib/dev/mediatek/mt76/dma.c @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: ISC +// SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (C) 2016 Felix Fietkau */ @@ -11,37 +11,6 @@ #include "mt76.h" #include "dma.h" -#if IS_ENABLED(CONFIG_NET_MEDIATEK_SOC_WED) - -#define Q_READ(_q, _field) ({ \ - u32 _offset = offsetof(struct mt76_queue_regs, _field); \ - u32 _val; \ - if ((_q)->flags & MT_QFLAG_WED) \ - _val = mtk_wed_device_reg_read((_q)->wed, \ - ((_q)->wed_regs + \ - _offset)); \ - else \ - _val = readl(&(_q)->regs->_field); \ - _val; \ -}) - -#define Q_WRITE(_q, _field, _val) do { \ - u32 _offset = offsetof(struct mt76_queue_regs, _field); \ - if ((_q)->flags & MT_QFLAG_WED) \ - mtk_wed_device_reg_write((_q)->wed, \ - ((_q)->wed_regs + _offset), \ - _val); \ - else \ - writel(_val, &(_q)->regs->_field); \ -} while (0) - -#else - -#define Q_READ(_q, _field) readl(&(_q)->regs->_field) -#define Q_WRITE(_q, _field, _val) writel(_val, &(_q)->regs->_field) - -#endif - static struct mt76_txwi_cache * mt76_alloc_txwi(struct mt76_dev *dev) { @@ -189,25 +158,62 @@ mt76_free_pending_rxwi(struct mt76_dev *dev) } EXPORT_SYMBOL_GPL(mt76_free_pending_rxwi); +static void +mt76_dma_queue_magic_cnt_init(struct mt76_dev *dev, struct mt76_queue *q) +{ + if (!mt76_queue_is_wed_rro(q)) + return; + + q->magic_cnt = 0; + if (mt76_queue_is_wed_rro_ind(q)) { + struct mt76_wed_rro_desc *rro_desc; + u32 data1 = FIELD_PREP(RRO_IND_DATA1_MAGIC_CNT_MASK, + MT_DMA_WED_IND_CMD_CNT - 1); + int i; + + rro_desc = (struct mt76_wed_rro_desc *)q->desc; + for (i = 0; i < q->ndesc; i++) { + struct mt76_wed_rro_ind *cmd; + + cmd = (struct mt76_wed_rro_ind *)&rro_desc[i]; + cmd->data1 = cpu_to_le32(data1); + } + } else if (mt76_queue_is_wed_rro_rxdmad_c(q)) { + struct mt76_rro_rxdmad_c *dmad = (void *)q->desc; + u32 data3 = FIELD_PREP(RRO_RXDMAD_DATA3_MAGIC_CNT_MASK, + MT_DMA_MAGIC_CNT - 1); + int i; + + for (i = 0; i < q->ndesc; i++) + dmad[i].data3 = cpu_to_le32(data3); + } +} + static void mt76_dma_sync_idx(struct mt76_dev *dev, struct mt76_queue *q) { Q_WRITE(q, desc_base, q->desc_dma); - if (q->flags & MT_QFLAG_WED_RRO_EN) + if ((q->flags & MT_QFLAG_WED_RRO_EN) && !mt76_npu_device_active(dev)) Q_WRITE(q, ring_size, MT_DMA_RRO_EN | q->ndesc); else Q_WRITE(q, ring_size, q->ndesc); + + if (mt76_queue_is_npu_tx(q)) { + writel(q->desc_dma, &q->regs->desc_base); + writel(q->ndesc, &q->regs->ring_size); + } q->head = Q_READ(q, dma_idx); q->tail = q->head; } -void __mt76_dma_queue_reset(struct mt76_dev *dev, struct mt76_queue *q, - bool reset_idx) +void mt76_dma_queue_reset(struct mt76_dev *dev, struct mt76_queue *q, + bool reset_idx) { if (!q || !q->ndesc) return; - if (!mt76_queue_is_wed_rro_ind(q)) { + if (!mt76_queue_is_wed_rro_ind(q) && + !mt76_queue_is_wed_rro_rxdmad_c(q) && !mt76_queue_is_npu(q)) { int i; /* clear descriptors */ @@ -215,27 +221,26 @@ void __mt76_dma_queue_reset(struct mt76_dev *dev, struct mt76_queue *q, q->desc[i].ctrl = cpu_to_le32(MT_DMA_CTL_DMA_DONE); } + mt76_dma_queue_magic_cnt_init(dev, q); if (reset_idx) { - Q_WRITE(q, cpu_idx, 0); + if (mt76_queue_is_emi(q)) + *q->emi_cpu_idx = 0; + else + Q_WRITE(q, cpu_idx, 0); Q_WRITE(q, dma_idx, 0); } mt76_dma_sync_idx(dev, q); } -void mt76_dma_queue_reset(struct mt76_dev *dev, struct mt76_queue *q) -{ - __mt76_dma_queue_reset(dev, q, true); -} - static int mt76_dma_add_rx_buf(struct mt76_dev *dev, struct mt76_queue *q, struct mt76_queue_buf *buf, void *data) { struct mt76_queue_entry *entry = &q->entry[q->head]; struct mt76_txwi_cache *txwi = NULL; + u32 buf1 = 0, ctrl, info = 0; struct mt76_desc *desc; int idx = q->head; - u32 buf1 = 0, ctrl; int rx_token; if (mt76_queue_is_wed_rro_ind(q)) { @@ -244,6 +249,9 @@ mt76_dma_add_rx_buf(struct mt76_dev *dev, struct mt76_queue *q, rro_desc = (struct mt76_wed_rro_desc *)q->desc; data = &rro_desc[q->head]; goto done; + } else if (mt76_queue_is_wed_rro_rxdmad_c(q)) { + data = &q->desc[q->head]; + goto done; } desc = &q->desc[q->head]; @@ -252,7 +260,7 @@ mt76_dma_add_rx_buf(struct mt76_dev *dev, struct mt76_queue *q, buf1 = FIELD_PREP(MT_DMA_CTL_SDP0_H, buf->addr >> 32); #endif - if (mt76_queue_is_wed_rx(q)) { + if (mt76_queue_is_wed_rx(q) || mt76_queue_is_wed_rro_data(q)) { txwi = mt76_get_rxwi(dev); if (!txwi) return -ENOMEM; @@ -265,12 +273,26 @@ mt76_dma_add_rx_buf(struct mt76_dev *dev, struct mt76_queue *q, buf1 |= FIELD_PREP(MT_DMA_CTL_TOKEN, rx_token); ctrl |= MT_DMA_CTL_TO_HOST; + + txwi->qid = q - dev->q_rx; + } + + if (mt76_queue_is_wed_rro_msdu_pg(q) && + dev->drv->rx_rro_add_msdu_page) { + if (dev->drv->rx_rro_add_msdu_page(dev, q, buf->addr, data)) + return -ENOMEM; + } + + if (q->flags & MT_QFLAG_WED_RRO_EN) { + info |= FIELD_PREP(MT_DMA_MAGIC_MASK, q->magic_cnt); + if ((q->head + 1) == q->ndesc) + q->magic_cnt = (q->magic_cnt + 1) % MT_DMA_MAGIC_CNT; } WRITE_ONCE(desc->buf0, cpu_to_le32(buf->addr)); WRITE_ONCE(desc->buf1, cpu_to_le32(buf1)); WRITE_ONCE(desc->ctrl, cpu_to_le32(ctrl)); - WRITE_ONCE(desc->info, 0); + WRITE_ONCE(desc->info, cpu_to_le32(info)); done: entry->dma_addr[0] = buf->addr; @@ -379,7 +401,10 @@ static void mt76_dma_kick_queue(struct mt76_dev *dev, struct mt76_queue *q) { wmb(); - Q_WRITE(q, cpu_idx, q->head); + if (mt76_queue_is_emi(q)) + *q->emi_cpu_idx = cpu_to_le16(q->head); + else + Q_WRITE(q, cpu_idx, q->head); } static void @@ -399,6 +424,7 @@ mt76_dma_tx_cleanup(struct mt76_dev *dev, struct mt76_queue *q, bool flush) while (q->queued > 0 && q->tail != last) { mt76_dma_tx_cleanup_idx(dev, q, q->tail, &entry); + mt76_npu_txdesc_cleanup(q, q->tail); mt76_queue_tx_complete(dev, q, &entry); if (entry.txwi) { @@ -422,16 +448,62 @@ mt76_dma_tx_cleanup(struct mt76_dev *dev, struct mt76_queue *q, bool flush) wake_up(&dev->tx_wait); } +static void * +mt76_dma_get_rxdmad_c_buf(struct mt76_dev *dev, struct mt76_queue *q, + int idx, int *len, bool *more) +{ + struct mt76_queue_entry *e = &q->entry[idx]; + struct mt76_rro_rxdmad_c *dmad = e->buf; + u32 data1 = le32_to_cpu(dmad->data1); + u32 data2 = le32_to_cpu(dmad->data2); + struct mt76_txwi_cache *t; + u16 rx_token_id; + u8 ind_reason; + void *buf; + + rx_token_id = FIELD_GET(RRO_RXDMAD_DATA2_RX_TOKEN_ID_MASK, data2); + t = mt76_rx_token_release(dev, rx_token_id); + if (!t) + return ERR_PTR(-EAGAIN); + + q = &dev->q_rx[t->qid]; + dma_sync_single_for_cpu(dev->dma_dev, t->dma_addr, + SKB_WITH_OVERHEAD(q->buf_size), + page_pool_get_dma_dir(q->page_pool)); + + if (len) + *len = FIELD_GET(RRO_RXDMAD_DATA1_SDL0_MASK, data1); + if (more) + *more = !FIELD_GET(RRO_RXDMAD_DATA1_LS_MASK, data1); + + buf = t->ptr; + ind_reason = FIELD_GET(RRO_RXDMAD_DATA2_IND_REASON_MASK, data2); + if (ind_reason == MT_DMA_WED_IND_REASON_REPEAT || + ind_reason == MT_DMA_WED_IND_REASON_OLDPKT) { + mt76_put_page_pool_buf(buf, false); + buf = ERR_PTR(-EAGAIN); + } + t->ptr = NULL; + t->dma_addr = 0; + + mt76_put_rxwi(dev, t); + + return buf; +} + static void * mt76_dma_get_buf(struct mt76_dev *dev, struct mt76_queue *q, int idx, - int *len, u32 *info, bool *more, bool *drop) + int *len, u32 *info, bool *more, bool *drop, bool flush) { struct mt76_queue_entry *e = &q->entry[idx]; struct mt76_desc *desc = &q->desc[idx]; u32 ctrl, desc_info, buf1; void *buf = e->buf; - if (mt76_queue_is_wed_rro_ind(q)) + if (mt76_queue_is_wed_rro_rxdmad_c(q) && !flush) + buf = mt76_dma_get_rxdmad_c_buf(dev, q, idx, len, more); + + if (mt76_queue_is_wed_rro(q)) goto done; ctrl = le32_to_cpu(READ_ONCE(desc->ctrl)); @@ -486,20 +558,50 @@ mt76_dma_dequeue(struct mt76_dev *dev, struct mt76_queue *q, bool flush, if (!q->queued) return NULL; - if (mt76_queue_is_wed_rro_data(q)) - return NULL; + if (mt76_queue_is_wed_rro_data(q) || mt76_queue_is_wed_rro_msdu_pg(q)) + goto done; + + if (mt76_queue_is_wed_rro_ind(q)) { + struct mt76_wed_rro_ind *cmd; + u8 magic_cnt; - if (!mt76_queue_is_wed_rro_ind(q)) { + if (flush) + goto done; + + cmd = q->entry[idx].buf; + magic_cnt = FIELD_GET(RRO_IND_DATA1_MAGIC_CNT_MASK, + le32_to_cpu(cmd->data1)); + if (magic_cnt != q->magic_cnt) + return NULL; + + if (q->tail == q->ndesc - 1) + q->magic_cnt = (q->magic_cnt + 1) % MT_DMA_WED_IND_CMD_CNT; + } else if (mt76_queue_is_wed_rro_rxdmad_c(q)) { + struct mt76_rro_rxdmad_c *dmad; + u16 magic_cnt; + + if (flush) + goto done; + + dmad = q->entry[idx].buf; + magic_cnt = FIELD_GET(RRO_RXDMAD_DATA3_MAGIC_CNT_MASK, + le32_to_cpu(dmad->data3)); + if (magic_cnt != q->magic_cnt) + return NULL; + + if (q->tail == q->ndesc - 1) + q->magic_cnt = (q->magic_cnt + 1) % MT_DMA_MAGIC_CNT; + } else { if (flush) q->desc[idx].ctrl |= cpu_to_le32(MT_DMA_CTL_DMA_DONE); else if (!(q->desc[idx].ctrl & cpu_to_le32(MT_DMA_CTL_DMA_DONE))) return NULL; } - +done: q->tail = (q->tail + 1) % q->ndesc; q->queued--; - return mt76_dma_get_buf(dev, q, idx, len, info, more, drop); + return mt76_dma_get_buf(dev, q, idx, len, info, more, drop, flush); } static int @@ -557,6 +659,10 @@ mt76_dma_tx_queue_skb(struct mt76_phy *phy, struct mt76_queue *q, if (test_bit(MT76_RESET, &phy->state)) goto free_skb; + /* TODO: Take into account unlinear skbs */ + if (mt76_npu_device_active(dev) && skb_linearize(skb)) + goto free_skb; + t = mt76_get_txwi(dev); if (!t) goto free_skb; @@ -604,6 +710,9 @@ mt76_dma_tx_queue_skb(struct mt76_phy *phy, struct mt76_queue *q, if (ret < 0) goto unmap; + if (mt76_npu_device_active(dev)) + return mt76_npu_dma_add_buf(phy, q, skb, &tx_info.buf[1], txwi); + return mt76_dma_add_buf(dev, q, tx_info.buf, tx_info.nbuf, tx_info.info, tx_info.skb, t); @@ -650,7 +759,8 @@ mt76_dma_rx_fill_buf(struct mt76_dev *dev, struct mt76_queue *q, void *buf = NULL; int offset; - if (mt76_queue_is_wed_rro_ind(q)) + if (mt76_queue_is_wed_rro_ind(q) || + mt76_queue_is_wed_rro_rxdmad_c(q)) goto done; buf = mt76_get_page_pool_buf(q, &offset, q->buf_size); @@ -680,9 +790,6 @@ int mt76_dma_rx_fill(struct mt76_dev *dev, struct mt76_queue *q, { int frames; - if (!q->ndesc) - return 0; - spin_lock_bh(&q->lock); frames = mt76_dma_rx_fill_buf(dev, q, allow_direct); spin_unlock_bh(&q->lock); @@ -708,27 +815,23 @@ mt76_dma_alloc_queue(struct mt76_dev *dev, struct mt76_queue *q, q->ndesc = n_desc; q->buf_size = bufsize; q->hw_idx = idx; + q->dev = dev; + + if (mt76_queue_is_wed_rro_ind(q)) + size = sizeof(struct mt76_wed_rro_desc); + else if (mt76_queue_is_npu_tx(q)) + size = sizeof(struct airoha_npu_tx_dma_desc); + else if (mt76_queue_is_npu_rx(q)) + size = sizeof(struct airoha_npu_rx_dma_desc); + else + size = sizeof(struct mt76_desc); - size = mt76_queue_is_wed_rro_ind(q) ? sizeof(struct mt76_wed_rro_desc) - : sizeof(struct mt76_desc); q->desc = dmam_alloc_coherent(dev->dma_dev, q->ndesc * size, &q->desc_dma, GFP_KERNEL); if (!q->desc) return -ENOMEM; - if (mt76_queue_is_wed_rro_ind(q)) { - struct mt76_wed_rro_desc *rro_desc; - int i; - - rro_desc = (struct mt76_wed_rro_desc *)q->desc; - for (i = 0; i < q->ndesc; i++) { - struct mt76_wed_rro_ind *cmd; - - cmd = (struct mt76_wed_rro_ind *)&rro_desc[i]; - cmd->magic_cnt = MT_DMA_WED_IND_CMD_CNT - 1; - } - } - + mt76_dma_queue_magic_cnt_init(dev, q); size = q->ndesc * sizeof(*q->entry); q->entry = devm_kzalloc(dev->dev, size, GFP_KERNEL); if (!q->entry) @@ -738,6 +841,7 @@ mt76_dma_alloc_queue(struct mt76_dev *dev, struct mt76_queue *q, if (ret) return ret; + mt76_npu_queue_setup(dev, q); ret = mt76_wed_dma_setup(dev, q, false); if (ret) return ret; @@ -748,7 +852,10 @@ mt76_dma_alloc_queue(struct mt76_dev *dev, struct mt76_queue *q, return 0; } - mt76_dma_queue_reset(dev, q); + /* HW specific driver is supposed to reset brand-new EMI queues since + * it needs to set cpu index pointer. + */ + mt76_dma_queue_reset(dev, q, !mt76_queue_is_emi(q)); return 0; } @@ -762,6 +869,11 @@ mt76_dma_rx_cleanup(struct mt76_dev *dev, struct mt76_queue *q) if (!q->ndesc) return; *** 10208 LINES SKIPPED *** From nobody Fri Feb 27 02:29:25 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMn6Bqgz6T7Wm for ; Fri, 27 Feb 2026 02: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXMn4xQyz40cM for ; Fri, 27 Feb 2026 02: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=1772159365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y7tG64tSYOJllGq67LFvXrGBbo/9UneP+JHoVdNkxbI=; b=jFgh8+N+hpCgxrkL4eMVK5WOw0P28O0ftw5IDXJYnkdtyWMuW7o938X8QazVIkszXucot/ Q7kyHMF2bL2fspDgbX/lgPozoB9fqP36AHGJ/X/utUE/FutMpu58NNPkPpl6gyvqCJdOun 5oI75n+flWATT58zdtgbvE39mhvaVcUA7zoYwvHyTMJYcpAV8n5s9C8XN+bqhenCoNug8f I+DUkROnq6fepQQ87Cg84HHNTj/rat/V950a6dfT6ITp1pu69HNbG9KFPPgZnNddWgVG6c RM6Kt/MkQqTF0cuoApebns5K0f7LCem0eJlNcWmiis2Ony0QBX1wfu1zeU96Bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159365; a=rsa-sha256; cv=none; b=w01Bouifl5LIiMQ3IMTEz7ruR3M6OrKf7gXg9sFvIdJTIU1L7aQEIxH4CDGJPNfnWidod3 FkKSoFpSWjfqj1KbHqX2mnbfJ6hnZiXPimsSgZSYsFV5fAuyoxwdDxRjxjjDHxRyEDxbrV j00cHoVCsn7FSqnwxvDCWhAjcw708X8Yf5tQQWxYov3ShfiaGjJPLbRSQo7vp8DiDf/Z6p P9y2UOe6DeGr4apQkJBZsC3qitgJMic9tRWm7dKBNI+E9VHxkydV04JUvgw/4N+ZpZC5Ip NYHW8a4CSaYeBJOeirXw1J9FL3kVebITBf7U44uRLAZHSy8hNDEFG5DBIawQLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y7tG64tSYOJllGq67LFvXrGBbo/9UneP+JHoVdNkxbI=; b=AgjutkZJInkIP0yUgINuSZy4z6KUYlmGixdV0PBDNG0ggqwackq/gM/q0SKUmA9gWrgC7L NzHl5xBc12yrvlXBbH8H0Y96zLVEQ0MkPGFJOErBGop794Z0A0s1nf/eXZ9vJ7SwW1IwPG lnSTYYI2J41UzqIorFsL2VPvFwGlDlK9IzL/0zoWIYtiGDTXMNPVJsdODUclHHTynqsIXv mFezkdR4x166sWadVPVPjya/aJ4xtp2FCuUMG7lVftX7OrYgjT0p6MclsUlpLO6WIQtf5/ YccVjjQLiecRunX0WxQEpSYkLGF9j/U24CW8575E+w84Km8hzMCekUiXh4a93A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMn4NsYzy6v for ; Fri, 27 Feb 2026 02:29:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 20476 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 18a67c10488a - stable/15 - LinuxKPI: PTP add (*settime64) to struct ptp_clock_info List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 18a67c10488a87297878c9cb6f56a08a55f56995 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:25 +0000 Message-Id: <69a10185.20476.4faf7875@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=18a67c10488a87297878c9cb6f56a08a55f56995 commit 18a67c10488a87297878c9cb6f56a08a55f56995 Author: Bjoern A. Zeeb AuthorDate: 2026-01-20 18:58:22 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 22:59:13 +0000 LinuxKPI: PTP add (*settime64) to struct ptp_clock_info While iwlwifi supportes PTP, LinuxKPI does not and we only add the definitons to avoid mangling upstream drivers. iwlwifi(4) does not even support the (*settime64) callback but only returns -EOPNOTSUPP. Sponosred by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D54802 (cherry picked from commit bf4aa758dd79dcb3f5d5abde79d679d17b18afa0) --- sys/compat/linuxkpi/common/include/linux/ptp_clock_kernel.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/ptp_clock_kernel.h b/sys/compat/linuxkpi/common/include/linux/ptp_clock_kernel.h index aad46cc25b1b..6491cbeab7e2 100644 --- a/sys/compat/linuxkpi/common/include/linux/ptp_clock_kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/ptp_clock_kernel.h @@ -49,6 +49,7 @@ struct ptp_clock_info { int (*adjtime)(struct ptp_clock_info *, s64); int (*getcrosststamp)(struct ptp_clock_info *, struct system_device_crosststamp *); int (*gettime64)(struct ptp_clock_info *, struct timespec *); + int (*settime64)(struct ptp_clock_info *, const struct timespec *); }; static inline struct ptp_clock * From nobody Fri Feb 27 02:29:26 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMp6w0Rz6T7fK for ; Fri, 27 Feb 2026 02:29:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXMp5hbGz40bk for ; Fri, 27 Feb 2026 02:29:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EIKHa518uwXbkKEtXnYFMV8wJnLPO7G4lKuhcAAnKcE=; b=mtXB3E/3/9J8CQTNQPtRa0qCC0gcHiWRZdF302aONZ6BjL4694WAy+krLMGMYX5R6O++XW 6aGCyzPGpBRXQWGxKQB2fmN03d9pcWvvz5s6uYnS+jBKNhhxzLVjwe9bNy3uA8S5wFHp5Q jTuh2JaZTq4aUVHJUcgcLOFH1B15zlggPk+ExOIvoAROjqKShkdNujQIz6mLsJ2hssuXzZ 4DcWm0DK+kVv7ndZUSTzJ2G4+GpUAulSYU9gFpODPnarEHW1+tYDAYR7KXbmFrPq3rIEpQ YYh1q5I2fVb0csYqrZZfGla+yLjO//yiySr83x3b1ecPLSWN+KoptwUH40BAkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159366; a=rsa-sha256; cv=none; b=MaQrRfBL4WVGtSMuEp8auROeZFaak3Cy9X8uHqh6Mu0rB9BdxxqGH2GXXHuPIqRJPoy/FN OpmfAtuiU4DCuxLtb29v1U1RyfNF0D7jvAM3c2AogEbn5N3VaWQGkbv+NXQLl1KhtTG8tE O4gMYetZl8+KU9y4nY3ZNcTwt0u++9qxfBonen5J06z+jnHC88omBTFhWkl8/E3x0mHed0 aN3vQaPEXkZ3yb4zvq3c0QmCiROAhoK/0Hfii9h/Uyfsv25NpBP7fkfMvfXzOg7MNoJCrj JcYINzG/zcmnk9Hh9I8uQOqJVIUtGbxNWeDPWyoj2yw3XxIyYrhnmkvr4Nk73w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EIKHa518uwXbkKEtXnYFMV8wJnLPO7G4lKuhcAAnKcE=; b=wATxOpw4B48m+gbE6A0/835tkyoImdPzn+lJ//PHi07lfZyhX//vK9ys1d+/5qh9JJImCz VBwG3FP3zOP8cYMXLesxjMt1DqX5+YS+mxPUpf6sOdzzld6/1BPVbAk4T/MU+YczbP/k96 JMDronIlKNAWuAFlFazDGBxwQXxmWbohtu+NVPBcomD/AV5NdRHTrV4JR27F3MSF0ryiqB j+Pazbv0d4JC1782Xg7VWZJNqMq2BGWmnWYlPlMFjcE/IWp8o/rzmFsOTYMdTjmTK8RG0V SbGHN865FZNdabunsKm/M1kO3mrjYab3xmU6RMXyFh/SNUf1Vpv9mbKA305Dcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMp5C39zyGm for ; Fri, 27 Feb 2026 02:29:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1ece0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: bd5301f27899 - stable/15 - LinuxKPI: implement dmam_free_coherent() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: bd5301f278993fc1c661f071b4148a7f7fc3e5f3 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:26 +0000 Message-Id: <69a10186.1ece0.63a1e0b7@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=bd5301f278993fc1c661f071b4148a7f7fc3e5f3 commit bd5301f278993fc1c661f071b4148a7f7fc3e5f3 Author: Bjoern A. Zeeb AuthorDate: 2026-01-21 13:57:55 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 22:59:32 +0000 LinuxKPI: implement dmam_free_coherent() dmam_free_coherent() is used by an updated mt76 driver at v6.19-rc6. We need to surgically find the devres information and destroy it before calling dma_free_coherent. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D54810 (cherry picked from commit 0a575891211eff545bab1e4de5e2b7adf4a4c1da) --- .../linuxkpi/common/include/linux/dma-mapping.h | 9 ++++++ sys/compat/linuxkpi/common/src/linux_pci.c | 36 ++++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h index 2d8e1196d3d3..76efbfd51074 100644 --- a/sys/compat/linuxkpi/common/include/linux/dma-mapping.h +++ b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h @@ -96,6 +96,8 @@ void *linux_dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag); void *linuxkpi_dmam_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag); +void linuxkpi_dmam_free_coherent(struct device *dev, size_t size, + void *addr, dma_addr_t dma_handle); dma_addr_t linux_dma_map_phys(struct device *dev, vm_paddr_t phys, size_t len); /* backward compat */ dma_addr_t lkpi_dma_map_phys(struct device *, vm_paddr_t, size_t, enum dma_data_direction, unsigned long); @@ -181,6 +183,13 @@ dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, kmem_free(cpu_addr, size); } +static inline void +dmam_free_coherent(struct device *dev, size_t size, void *addr, + dma_addr_t dma_handle) +{ + linuxkpi_dmam_free_coherent(dev, size, addr, dma_handle); +} + static inline dma_addr_t dma_map_page_attrs(struct device *dev, struct page *page, size_t offset, size_t size, enum dma_data_direction direction, unsigned long attrs) diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index fb3f648df496..cf8a6ffeb46c 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -1796,6 +1796,42 @@ lkpi_dmam_free_coherent(struct device *dev, void *p) dma_free_coherent(dev, dr->size, dr->mem, *dr->handle); } +static int +lkpi_dmam_coherent_match(struct device *dev, void *dr, void *mp) +{ + struct lkpi_devres_dmam_coherent *a, *b; + + a = dr; + b = mp; + + if (a->mem != b->mem) + return (0); + if (a->size != b->size || a->handle != b->handle) + dev_WARN(dev, "for mem %p: size %zu != %zu || handle %#jx != %#jx\n", + a->mem, a->size, b->size, + (uintmax_t)a->handle, (uintmax_t)b->handle); + return (1); +} + +void +linuxkpi_dmam_free_coherent(struct device *dev, size_t size, + void *addr, dma_addr_t dma_handle) +{ + struct lkpi_devres_dmam_coherent match = { + .size = size, + .handle = &dma_handle, + .mem = addr + }; + int error; + + error = devres_destroy(dev, lkpi_dmam_free_coherent, + lkpi_dmam_coherent_match, &match); + if (error != 0) + dev_WARN(dev, "devres_destroy returned %d, size %zu addr %p " + "dma_handle %#jx\n", error, size, addr, (uintmax_t)dma_handle); + dma_free_coherent(dev, size, addr, dma_handle); +} + void * linuxkpi_dmam_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag) From nobody Fri Feb 27 02:29:27 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMr2Fgvz6T7Rf for ; Fri, 27 Feb 2026 02: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXMq6DzFz40ch for ; Fri, 27 Feb 2026 02: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=1772159367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yv7svI8vhFjskmPMe+Kr1rtq2DAEyfsW0QqVB19xyt4=; b=buImMDE4DglPtGthr+LxrFB6iY6ncimlXcceITLE4O0+rsbVNKRqoF6QUdJaz8IIUrJyEh 0FDV2JQA2/88yznIu/PtHBXuhkawDfhCMAwTej7nI2VE40PzQLl7wHOHdTPzlzEaJiNQIt 4DKh5Fn05LsIyivUXrQVCS+rrv/V5zb86EZ/3nQ6hMKx1YRNRS9aTRVi048xm567+IcpbZ XmL6RTs4x0TWcgIOkh5vs33+vfaAPKKp94QSma+CKVJ/fITlX7j1U0h23fDrHX1FVAQeAh 5urPdvMWswWXDPe0aR9zuachqBJSgNyo5KDG0IeD4iAI585+V053eX9Uk5xKxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159367; a=rsa-sha256; cv=none; b=p+8R6CtlWSX1SAPn7m9gq1FrXpxQLqWdVvxqfAsALpmEK/p7oJTpySrrEkWrFfiNMuUBKj ZPyBFRAjOOQJYHWRvXrIHIWlVbNYv5Wcs+BFKVRtXNMBZg9Y+4SQv782qMfwYf83QtAVix MgUEhOgznCHplROEPTKD9LbcwThkNuWaoRsQGo0tRViWkw7eGl/Ll/Nu5jnpRfWbOm+phY +x+VVuOas3EM+W18RV/Yjlr4lmUNcUcsk7yLPQCNqGR/BvH8zQe9wPvfBbvKO1RmcF9yOL dqwNhH/xYx4q8bxIbtpolh/F9svPbNYTOXHs87YR8zmByQLZu6SJUKpkEcObDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yv7svI8vhFjskmPMe+Kr1rtq2DAEyfsW0QqVB19xyt4=; b=g1bnJiwg1IJ1ZcJjoCWLt6dajSvkH/eMznKT8klNORscS2Uo8dfODl9/mpCHz14LyW4lXV V+3oXFsu1B6JI4TgEvxcdt/YfhJL2PvUXAn+o5kT//G7/3kaDBckDfNUeBCPc+w4ncpuYw 9sxDt2SaWGE4w/lwskTB5XhweQIoc3OsbqiXcg1JL0b5V8cAnXx5O01V0CWGE6gjaLf1Yy Y4Ew7oKfGUDlMbR3r5IxWxmUendpVOjDy6l6MrSkK2OXzUMdzUKbzqpqB+Eye4KEgFmrzD zRa0X/LjdCjbFRUnmrjcMpZ4hxTI3o/g3DjPXasWTutrb2inLbI3ugDA0CSLIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMq5lxlzyGn for ; Fri, 27 Feb 2026 02:29:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21ac4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 7ea6a61fb3fa - stable/15 - LinuxKPI: add umin() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7ea6a61fb3fad2f729be106c2d6ad637b200c530 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:27 +0000 Message-Id: <69a10187.21ac4.188b859a@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7ea6a61fb3fad2f729be106c2d6ad637b200c530 commit 7ea6a61fb3fad2f729be106c2d6ad637b200c530 Author: Bjoern A. Zeeb AuthorDate: 2026-01-20 22:43:19 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 22:59:48 +0000 LinuxKPI: add umin() Add a version of umin() simply using MIN() assuming that the Linux upstream code properly check that the arguments are unsigned, etc. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D54807 (cherry picked from commit 44d1153ddaf8f961520a8f33222b65170196b90e) --- 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 d48958f0899f..fb8eb6f704b4 100644 --- a/sys/compat/linuxkpi/common/include/linux/minmax.h +++ b/sys/compat/linuxkpi/common/include/linux/minmax.h @@ -71,4 +71,7 @@ b = _swap_tmp; \ } while (0) +/* XXX would have to make sure both are unsigned. */ +#define umin(x, y) MIN(x, y) + #endif /* _LINUXKPI_LINUX_MINMAX_H_ */ From nobody Fri Feb 27 02:29:28 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMs3wRlz6T7hj for ; Fri, 27 Feb 2026 02: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXMs0Kscz40ty for ; Fri, 27 Feb 2026 02: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=1772159369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=krzFWxKFJreDAwQziefca1tQp+ygJTkL6yY24y8YgwY=; b=HAqQ6T/j5b3smTJXwrZuUpy0OfsixaE1L08C1iGyknIbi54PDFECfuuZv1AQnmyinZxgDh IRmWGoUFhtOiW5jgJoQDJ2SrfaiItunXiKwLDCa21bg0m9VMYgBw+bZGuftdlHS6uHS5fw EAJ3Z/0FNLEJGo4bAA890NThaW4ZzRfNjFso8gULmYZKFVMLwT/T29GtgM+h9TIOBz9kZK 0WUHYw1D5DXfUv2OJgrnDOqxAcrU8LCGzqBSCVocTv5dE/wOY1qybpgEmu3yKUHXWnM2Ku N/KepLEhC+NEYe8zZdprQtdankGKxb1JdFP3N7DB9ukpvKN9OYZYmjliXJnPkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159369; a=rsa-sha256; cv=none; b=hM9uGaZOL6haaOFlfrTUbJSYRH1tz+OJZqkybZ4vssmVue3vU70Kd7QI+icDfCnlUyskAQ q255mXwlVx7e1Xm286OdEUkdra5o9dIEYD2hz0uOUYS7dE6mMfVVtKhZ97ukOr6+wq/72H j0Oyc5r/y8UjKNb9fBs1z6kxvdZCT0K4x7venavjYXtkNK29Ax6+RNF+bgiER0vDOVRzDI s1DAjRKSE9ntk8SxMFsmJmMGaORXa+VGlXTHnN9jdk3mqgRwJwkHQ5OBMa4gVq6jkNYBXy 0OX+nUckzsjiDR+6j0esq/iKyuQu+PaXsY1YPreQ5CSUh0kOH0n1l5QYxlyUaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=krzFWxKFJreDAwQziefca1tQp+ygJTkL6yY24y8YgwY=; b=uqWOh5mTLQPcT+4h7AjMnk+hGrOePPoUf7aDb/g9PVC6e6OCaL3i0ztTupgB++OnYrdkV/ w7u5wmq1ZhvWfQ7bcgGxp31tcTN8axggWsiLpUC74LMb6TilJ5PF+EVP3qCNLQUltTOfeX A34R89XC/t9ze5Gl6DeE9eac8BCwDfOJlJmvptVuCG99AQq20kL7znfDnSQqxNn8pQAPtZ 99yb6Y+T/N5p4H2gU/T68Pg3Fo4yPbwJW5TRN1Hum7mKiPgc0NKQaDCaKZ3McxR8Ym+4Qu c7GDojzDWPfLCaE9r8QnsBIlx/gXWqUshipbnUUicF/fU9W9zPOZz4IWQBTJGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMr6Z2vzyZS for ; Fri, 27 Feb 2026 02:29:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21a1b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 5585c7c36518 - stable/15 - LinuxKPI: improve hweight if complie time constant List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5585c7c365180aecb9ffd82723604ee4cde6ffc9 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:28 +0000 Message-Id: <69a10188.21a1b.22132e06@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5585c7c365180aecb9ffd82723604ee4cde6ffc9 commit 5585c7c365180aecb9ffd82723604ee4cde6ffc9 Author: Bjoern A. Zeeb AuthorDate: 2026-01-20 22:41:12 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 22:59:59 +0000 LinuxKPI: improve hweight if complie time constant rtw89(4) uses a static_assert() with hweight calls. In order to avoid compile time errors, deal with the case when the arguments to hweight are complie time constant. Sponsored by: The FreeBSD Foundation Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D54806 (cherry picked from commit 7e4a2b381dcb5b2bcaf528e010096fd2d14868b1) --- sys/compat/linuxkpi/common/include/linux/bitops.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/bitops.h b/sys/compat/linuxkpi/common/include/linux/bitops.h index 8fac80820f30..e34ba391421a 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitops.h +++ b/sys/compat/linuxkpi/common/include/linux/bitops.h @@ -51,12 +51,6 @@ #define BITS_PER_TYPE(t) (sizeof(t) * BITS_PER_BYTE) #define BITS_TO_BYTES(n) howmany((n), BITS_PER_BYTE) -#define hweight8(x) bitcount((uint8_t)(x)) -#define hweight16(x) bitcount16(x) -#define hweight32(x) bitcount32(x) -#define hweight64(x) bitcount64(x) -#define hweight_long(x) bitcountl(x) - #if __has_builtin(__builtin_popcountg) #define HWEIGHT8(x) (__builtin_popcountg((uint8_t)(x))) #define HWEIGHT16(x) (__builtin_popcountg((uint16_t)(x))) @@ -70,6 +64,12 @@ #define HWEIGHT64(x) (__const_bitcount64((uint64_t)(x))) #endif +#define hweight8(x) (__builtin_constant_p(x) ? HWEIGHT8(x) : bitcount((uint8_t)(x))) +#define hweight16(x) (__builtin_constant_p(x) ? HWEIGHT16(x) : bitcount16(x)) +#define hweight32(x) (__builtin_constant_p(x) ? HWEIGHT32(x) : bitcount32(x)) +#define hweight64(x) (__builtin_constant_p(x) ? HWEIGHT64(x) : bitcount64(x)) +#define hweight_long(x) bitcountl(x) + static inline int __ffs(int mask) { From nobody Fri Feb 27 02:29:29 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMt4NPmz6T7XB for ; Fri, 27 Feb 2026 02: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXMt0T4Kz40rb for ; Fri, 27 Feb 2026 02:29:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=US1HVZE03AOM1Msn5w5u7jg+0uL9x+qnoKj6CYdaOL0=; b=VGjEZ0soxH+MuAqcvguQBNToqni5p099/4rmj0Xtjts8BMb9G7760XSn1Mn/55AoUG6Tip sZvljZYhNoqeo5QxtM6QabTB4v2VZzCUTCNkd1zfK7uQnwaLlwN5dLjFwRl8YMvQZ/S4Tz Uct8ihgmBgTGAOd2QhXFyfEIcc8oQYar/tgAaDaURQlvm8Z3GL0Y4m8RhpsyZtOiBt6y48 zIFAjcbgw/Rq/fbti3dghB8URuhobAiTQf9KOZCN6Oq8LGKUVRUlGI4eWyCZnetwFPRj5J 2rRVTjbZRVuDGNRm0qhwf/9Wmd2pom5dWdf6J+mij2d3vYX3WeK6JwwCQwwmIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159370; a=rsa-sha256; cv=none; b=coaMzqimyf/qUC69CGe4Ncr1rjFEjGwLbAo+2xpNgpCk1723uX4nWKUWVZCL5Zbw7bQVkX BUgOhWO3U68bl9Hlw8rWUhA6qq2wupdwUXIv44qSgu1bXfKGyVgEVMEA5bCv63VLQFR4Sa XvFTvmNauoEW4h6HKvArDjswEJl8kawIy5BffErPwVvERQy92o3Q+cf0bjlsWOE2USnwuz ZQqYoW6hKIxdRCXgr1oqIelKvrMfBZ26t2csWaOC7UJVRhFJse3kqgaIBJ0RLfPrTgZAy/ H6UGamVpsgEV8vwI3w8jDXBoUJwqYEEMZ/7VxoRBuWzqeeRknGltl6IW/m/cGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=US1HVZE03AOM1Msn5w5u7jg+0uL9x+qnoKj6CYdaOL0=; b=bjeOaI2BvJbLJ3UWG7Bb+kQB2BO5voHisWculQCPRFtUt84zblmYNA2YlDbjLl+eycPHV7 ueh/vJvNTQ2PjgHltUkHezRlqcCBgTiNsJ/CPVKcIaSEM0yS1xL/inuewztBmdL1EvJ+qN 0DRg3d1fPpdzFybIGgV2q54enwgv6z06Gh45QSaDdyi1sAluSVpJoeLkck0l3hW6fevjFd d+eXV6fCUeydYvXqVu/1fTgdagBUNGFPfsUIvzS7R1YBdYtTfuxY7mYyfySYptNpGBb3Ho N2/ty4c2mH1u93UT+bxuI/1ui3hzIccpmV+Txz76DIrrMwGA97NRwUiNdYIeNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMt00H6zyGp for ; Fri, 27 Feb 2026 02:29:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 204c7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 2da96ce51cd3 - stable/15 - usb: indentation (whitespace change only) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2da96ce51cd374e619cb53fdf132eb91ccbfb1ef Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:29 +0000 Message-Id: <69a10189.204c7.307fe57e@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=2da96ce51cd374e619cb53fdf132eb91ccbfb1ef commit 2da96ce51cd374e619cb53fdf132eb91ccbfb1ef Author: Bjoern A. Zeeb AuthorDate: 2026-01-29 11:17:52 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:00:12 +0000 usb: indentation (whitespace change only) No functional change. Sponsored by: The FreeBSD Foundation (cherry picked from commit 0762cf10fc5e426700e00f9060518241212e941f) --- sys/dev/usb/usb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/usb/usb.h b/sys/dev/usb/usb.h index a6c3c8030c73..3e972f876c6a 100644 --- a/sys/dev/usb/usb.h +++ b/sys/dev/usb/usb.h @@ -541,7 +541,7 @@ struct usb_endpoint_descriptor { #define UE_XFERTYPE 0x03 #define UE_CONTROL 0x00 #define UE_ISOCHRONOUS 0x01 -#define UE_BULK 0x02 +#define UE_BULK 0x02 #define UE_INTERRUPT 0x03 #define UE_BULK_INTR 0xfe /* for internal use only! */ #define UE_TYPE_ANY 0xff /* for internal use only! */ From nobody Fri Feb 27 02:29:31 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMv3n2Hz6T7cL for ; Fri, 27 Feb 2026 02: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXMv1jBwz40pS for ; Fri, 27 Feb 2026 02: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=1772159371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WqBdYK3LFez8PdCKDMK11RNeExfwoGgxOn4+7Q9UOl8=; b=Cb0S9bYLEFDFM6fACwLZXx30fpxDlMs+hIxxaUAv3nGhUuo8n0dHf96cBsn2CRLHtkAiZ2 SC77mlj0XFkvxCTHdfh38JTMbWZZ3NOyxzZSq96tx+pa5F48BNkjKoj7RnAW/ItaZujkk8 BpzYMDpBTCBq8gh4fLEdTnOJ7Uu8NS3Bx1EJ+l2WCYUivYvexgUlUk/aEcuROel0RAi6TB uIvvQ1uLPh6Xwn8XuIzDTEBtre+c0EXEAZBRybEbJjUXVGRu9rRGHljc9splr1T35EYSWF eFelNpzou+z29uv0z7bxaUl+2ZlMw/llNQ8goZokKfjr+wObPj/HnHJSIlcaXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159371; a=rsa-sha256; cv=none; b=s6EOfhnoEdQfTypyn1YPUrs2q+I8OPeH8c+jdARRHvDoESlJMed935qBinIc6mph2q5QPh S1zOWeIUa2rMtH9G4kP/v241EvxFBpJYWF2d9qguEpFhsR1LfHy5anPrY9HcnRLJWIE7dd 8+G29wCYo3i4UOTlVtUAQinf7KAvoRCv2pZylq02a3hSEqhLx91SeirIh1W5Jb4d7JsRfB cttdWsoK8QSlfiaLZzqR6KGpvSRzbczSILl/ORUaYrFjU5HafVUInGUyRPX1TKK/8oxk3F B71G3FfwtGvOxps9MJ+VwzG0YDEW00d6H4UI//s1zf63oyUYZWp6xD+IZb5NfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WqBdYK3LFez8PdCKDMK11RNeExfwoGgxOn4+7Q9UOl8=; b=yAqKxUaGf5a1nKnARyFH2YHrdqf+Yl8qu5mAZJCYoro25SAIPNRr/eK9Kb/8W2I1ZAx0FT kmrHj1mARJDKsHnehZfXn+Fy+evoJabizq9z3aFdcSk/+NBbSD8Jf+RwdiSFpexSjRDcCQ yPC0sr5p1T6lNSCmyOupnlh8yJUHsACQsgk2g46YkhxpMHD6PZN1lVVHx/NeIJhE1hAyU1 aGGTnWJJwArpA/usoFU8RCOUFdPAKTAGrCDvSyOCZSqgk7ynzd/tdmGjI8rAd+A85M4ak7 7xO50BE9Ugv6hz61mEwN5LdgAyxKKyHMaJDYuLYUCTGwq3rL1VdsfLGRteuIag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMv0gfszxwD for ; Fri, 27 Feb 2026 02:29:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1fd76 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 1ad47b5068ec - stable/15 - LinuxKPI: 802.11: only announce netdev_features if any are set List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 1ad47b5068eccbb86c4459eb095b038abd424058 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:31 +0000 Message-Id: <69a1018b.1fd76.7abf22c5@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=1ad47b5068eccbb86c4459eb095b038abd424058 commit 1ad47b5068eccbb86c4459eb095b038abd424058 Author: Bjoern A. Zeeb AuthorDate: 2026-01-29 11:17:25 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:00:17 +0000 LinuxKPI: 802.11: only announce netdev_features if any are set Printing an empty netdev_features= line makes little sense even under bootverbose. Sponsored by: The FreeBSD Foundation (cherry picked from commit 5cfe09e3a442347fe408fa95126dfbc051d064c3) --- sys/compat/linuxkpi/common/src/linux_80211.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index d25b32f1dae8..4ce0a2094adb 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -6972,7 +6972,9 @@ linuxkpi_ieee80211_ifattach(struct ieee80211_hw *hw) } if (bootverbose) { - ic_printf(ic, "netdev_features %b\n", hw->netdev_features, NETIF_F_BITS); + if (hw->netdev_features != 0) + ic_printf(ic, "netdev_features %b\n", + hw->netdev_features, NETIF_F_BITS); ieee80211_announce(ic); } From nobody Fri Feb 27 02:29:32 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMw4bd4z6T7Rl for ; Fri, 27 Feb 2026 02: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXMw1vtZz40gp for ; Fri, 27 Feb 2026 02: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=1772159372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yXfuTgKByNSj0OQCnBS/pF7CBpymgU0dfdEPi0fAi9w=; b=DjE/n6o2o+dKWyJ7CbLjtObFgp2ULuU9ALgDt4qIT6tUXEqlWz22SezAYUVxTNwfGHVGmz /bO2/iSdNxJZ7uhDE/wVgNjHae79iSkoC36vMEG19FebnwEm4/jB2ys5pTKcTeJ8bR8f0/ FICqFDm06QK5e7zk39/miY8s0YwIKqwvROFauDEnQKjX2qTW4NBwCePOCggf5cd02pz6Is O+Bg+4jezsc+HVrYZPE4uv3Cu1pVVaWhP6uFSMAgiT3busqpnNGxMtrkHIwKhHKUKnUdpl 1ZoxoaTnyupZqsyEa3qgVFxYD2+eywo2bsr9MvBZbw3wEpQTSpKMV0YqNAKsOQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159372; a=rsa-sha256; cv=none; b=xORxQN7ShJsmo0M/76LYLpPNFQ3PPj+MmbRKQ97kLDYko3jOiLoxs5wJ1iQxdXdU4xpQgB q1I9n2P4ZKV5ubCO7LVPAB2oB722TCeNl46mN+GRkJQ0vERqb0A4DEL7Dm9SyTPMKumAq4 MIggq5Ggbm/9IpmFFTRCHhcGUmSWfcu3I/fVX4mlZuBSXh+WM76bAdY7Qw6qkf9qHf0ndG zOpLZMimu6BdjTr57jGWtHyPYapDuG8GqtUGd63eZDPjD/R1FXx7E6K00rMP8Nilus/q+j Kn6d1HM/+IjvMykpIeZSyUIZD24S9JZBFAn6T0jVtA+ACCzz9uR/KnS0Min2zg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yXfuTgKByNSj0OQCnBS/pF7CBpymgU0dfdEPi0fAi9w=; b=SwbdlZXjEkwVZkpmo8fGtdwWcJoGYppTIDuvekk2OycvG8dXWrdrpOMNImV3l+KqP1/vxH 1Ku36IzOxBGeErL+06Zeto08gcpXoa1/X/F4crcdylLTtlPDQ65o3nUG6hKavu/VlsYwYf GR+vhwRKyfyxph4hrdCSh5fznknutryLQl74RaYqfVSC4XxW8Wx6OW0dmGMthO4PLJ7IB/ xo/43w+DBwxtJGynN8ijjGkL16mYLZUDbHXaNKEMiEHKekxKZsI37jBZu7csT7fFV2vGOu qNKUfR9gK52bOjQd5elBJpczrtX+C+TnPmR5mVvW4itnEdPwILShGvE0wShwbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMw1FvhzxR3 for ; Fri, 27 Feb 2026 02:29:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 20f22 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: d4ed839d576e - stable/15 - lindebugfs: check that name is set as otherwise pfs_alloc_node_flags() panics List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d4ed839d576e23168c8522eeb93bd2bf1d02a638 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:32 +0000 Message-Id: <69a1018c.20f22.54448992@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d4ed839d576e23168c8522eeb93bd2bf1d02a638 commit d4ed839d576e23168c8522eeb93bd2bf1d02a638 Author: Bjoern A. Zeeb AuthorDate: 2026-01-29 11:16:50 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:00:23 +0000 lindebugfs: check that name is set as otherwise pfs_alloc_node_flags() panics I have hit the case multiple times that some LinuxKPI field may not be set during driver bringup and lindebugfs would cause a panic. The backtrace goes like: strlen() at strlen+0x54 pfs_create_dir() at pfs_create_dir+0x41 debugfs_create_dir() at debugfs_create_dir+0xa1 ... While the problem is clearly in LinuxKPI or the driver, we likely should at least add an assert to pfs_create_dir() if name is NULL like we have for pfs_add_node() but for lindebugfs at least make this a graceful error and continue without creating the dir instead of panicing. Sponsored by: The FreeBSD Foundation Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D54944 (cherry picked from commit 4b32fdb4a614de602d288ac5a414cb43e9f2163e) --- sys/compat/lindebugfs/lindebugfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/compat/lindebugfs/lindebugfs.c b/sys/compat/lindebugfs/lindebugfs.c index 8cddc6f390bc..857546f61e55 100644 --- a/sys/compat/lindebugfs/lindebugfs.c +++ b/sys/compat/lindebugfs/lindebugfs.c @@ -272,6 +272,9 @@ debugfs_create_dir(const char *name, struct dentry *parent) struct dentry *dnode; struct pfs_node *pnode; + if (name == NULL) + return (NULL); + dm = malloc(sizeof(*dm), M_DFSINT, M_NOWAIT | M_ZERO); if (dm == NULL) return (NULL); From nobody Fri Feb 27 02:29:33 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMx565Vz6T7XL for ; Fri, 27 Feb 2026 02: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXMx2RQBz40js for ; Fri, 27 Feb 2026 02: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=1772159373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5xEHi7gD/ojcJY27HJT7N6ax7fxjp1YOs+n6/zMtOcE=; b=YYgaxcYZpvnVob/EPHPhDXaOx8qwjOUQ2LMSOS54tcbYycdYMASY7Pt/8VuIqaN6L1wN3o JoPp0e9GnlJsrMJ6AvYli5m1Zwb75OXWc5vcBINsEG7C7WJw8u1ZmDB7I2EKOU4X9iD3R9 73hlaJ4yJasPJY1inxB9mCDAo8xcyli0naP3ccQhwBYKuS6Kt4SfkDJOAR+kUyNNuZecyS W3N1U7UlX8r6cnU+oZfAwcmkybzSxzKqo9rkSLggr/XoRhTOAn4iDdtg8HEHL/qPtoRge7 OsLIbHsdPYtij8w/ShbYnT4uamW3q+6j/q+8a3mJH2S+KbUHmwBLmnIY/EjSaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159373; a=rsa-sha256; cv=none; b=sYFB5aW40PVTkcf45y5S+kC7MAWEvMQAjZ4mgr28jROdYX6RVOlulo36X5BYO4wLt0UDjy iA3gLnYw+QXcooMYnJFodA8a7D0Hs7zVA3PnnS9fNxfd2LITIodOIuXI1Ck59CRS7rN0ns eis1nWKVWrGgOvWPm9hkegoN8GTVw0kNnfPJUCIMxBHHYywd4JpctCcIRuoPEPtpxKniwk EiiwxR+h0kH9hwO9fyhliStawnVRlHOzYC+NKBI4qRK/B8gv62GXR7MhCUEcqhru0yFyCt Q+wPt4QesFAPHMRXwcvC9JseUB6noNUpmTDdKpjdz2d93DUfXt8MGcmjV1Em2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5xEHi7gD/ojcJY27HJT7N6ax7fxjp1YOs+n6/zMtOcE=; b=Ke2/uE1o20Ys3RfwpYp3QuBiyJNYLoHBpnW9+y6lKIKzKogXE+iKtxdPW90mCETRcUfWZV u5LBW1/KowxHqfHgrMTGOtPHRl+nQ5ZwHtrLAlMRZeatUtHyEvt55FpUR/7XWrfIyuL89y eHPuzVNp/WmapPKgjqpuFxQO4pUk0e2LHPuRWQFOP/OTzkOegxbLOHlVPQooWTFZVESD32 09r4IUPMIgxrCp2/hfBVLtYVe5jJN/XOLsoRZkI26yZgidASFDwYcw7jan8T+2/eCmjbuL RqWU6YihY+0PZwAx69/Te+dAgoWaLZ0UW0MW63r/nYroDxd/FzUJD8MM6Gn8HA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMx22bHzyZW for ; Fri, 27 Feb 2026 02:29:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21ac8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 5891d50d0ae9 - stable/15 - LinuxKPI: add str_read_write() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5891d50d0ae9daba78741316345d7f9dac229199 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:33 +0000 Message-Id: <69a1018d.21ac8.7cd06164@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5891d50d0ae9daba78741316345d7f9dac229199 commit 5891d50d0ae9daba78741316345d7f9dac229199 Author: Bjoern A. Zeeb AuthorDate: 2026-01-31 23:16:06 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:00:30 +0000 LinuxKPI: add str_read_write() Needed by a wireless driver. Sponsored by: The FreeBSD Foundation Reviewed by: kib, emaste Differential Revision: https://reviews.freebsd.org/D55029 (cherry picked from commit 6ea242cc305b7ec5b44488c9f04d413ebbf0b731) --- sys/compat/linuxkpi/common/include/linux/string_choices.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/string_choices.h b/sys/compat/linuxkpi/common/include/linux/string_choices.h index 74aa3fd019b2..18842dbd86a2 100644 --- a/sys/compat/linuxkpi/common/include/linux/string_choices.h +++ b/sys/compat/linuxkpi/common/include/linux/string_choices.h @@ -68,4 +68,13 @@ str_enable_disable(bool value) #define str_disable_enable(_v) str_enable_disable(!(_v)) +static inline const char * +str_read_write(bool value) +{ + if (value) + return "read"; + else + return "write"; +} + #endif From nobody Fri Feb 27 02:29:34 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMz15SVz6T7Tf for ; Fri, 27 Feb 2026 02: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXMy3d6Cz40hD for ; Fri, 27 Feb 2026 02: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=1772159374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uP50sLB+h1Z4YrU0xkOe5ofl1hMnzpQJUmjc+yrWb9k=; b=wY/eAz9asN40/WF6eGZ0eO4OocL8Cpby3WH9rzxNfMzt0tcpr076GCsf847hI7rUpqwV12 6wPuuw3sG54Sw/N3KqJXNSnbfW++zNunb+UjGToiWVidajrdzJq19URA2zOgoTAQkEWnxa a3FsSk9OquTFFmT7fG6WQBFCojLxDk/4fMx5rRu5uxyAneavKXqgF9zqLanqXKPpF/Bao2 58q4D1ac0gmvcwQoFpfUGplPBENwJAHBL2g3nFfsqAjP3keTX370t3v6wm5M1QYvCxxm9z 4ZuyO2+hu3Ab4ihITKrG9wDWLoCGzBcwTvLrFKALbtJMwD7mivU8wMmfxFuHdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159374; a=rsa-sha256; cv=none; b=sF6mbzEChEI2nfDsCAYZZHyXc9jB2Ml8PayWJODCj2qyP/dxq+V11HXoje91jEHXL3qfSg 4u76ADHY9bI6cim8vX2JlAEhMBFO4tGO4GLwk1UCUkoVCqAuDcBo8G7Z4tf2nRpuswpKAE xcKcyyhhCgJLOo89czWeCU0bTgUWB0HbXLZi1FC4Tx1CJlGuQiy/oV+GUZibRvUbh/8dDj 14eiTk2iNjkPd2hGhFY06iMDXOCAKz7lT95wDcAVXpswaz9JyhrIqff5/2zb6+NDV+zChx iF/yaGa/CRrDL8dWPmgQqB/4z1fIsg2A+4CrmYktYWqgZJPUypMkolrcT0+ZcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uP50sLB+h1Z4YrU0xkOe5ofl1hMnzpQJUmjc+yrWb9k=; b=TLZvePNkKh/1kUKP/4PgKSMCSR/viee2VMGSVoeqRF01G1wKRp3lIiXLdx5BCXK7E2lABg DCt/1fh80Ofu8jj+Lv+lWgoy6w5YnM86RVwFSEASCg+XJQ0pcgaPxrlSZ6FOsdghTXkrMm hLu7STSJAVajfNNCU6cvXzKmgxe3lGjZ2oAVCGGpUUnTtTZRnGo1u01E2B9qbfaXKhXznN asaCUPw4YksgqefIn8A6/KxMc2lI8ls0qXQgKzu9TJsO+xM4asub2I17i9gH5NhAwg9Nbw L1l2vsq/pXHtZ2sqxMhz/OUB2pQN1mkdfE7jEWdXwrSJSKxmj0HSGGeZIpdNfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMy2xZ6zyX2 for ; Fri, 27 Feb 2026 02:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f653 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 9d2e8764e488 - stable/15 - LinuxKPI: string_choices.h: use ternary operator List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 9d2e8764e488ec0a2f7e2fe0a1aa8a21a4e31941 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:34 +0000 Message-Id: <69a1018e.1f653.2c2823ae@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=9d2e8764e488ec0a2f7e2fe0a1aa8a21a4e31941 commit 9d2e8764e488ec0a2f7e2fe0a1aa8a21a4e31941 Author: Bjoern A. Zeeb AuthorDate: 2026-02-03 18:50:00 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:00:37 +0000 LinuxKPI: string_choices.h: use ternary operator Switch from using if () else to a direct return (?:) code. No functional changes. Suggested by: kib (D55029) Sponsored by: The FreeBSD Foundation Reviewed by: emaste (before removing more () as suggested by him) Differential Revision: https://reviews.freebsd.org/D55088 (cherry picked from commit 8df7af9c9ecf7fc0b1c664f3d95893a9fcc16fcd) --- .../linuxkpi/common/include/linux/string_choices.h | 25 +++++----------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/string_choices.h b/sys/compat/linuxkpi/common/include/linux/string_choices.h index 18842dbd86a2..db540d3e7d40 100644 --- a/sys/compat/linuxkpi/common/include/linux/string_choices.h +++ b/sys/compat/linuxkpi/common/include/linux/string_choices.h @@ -33,37 +33,25 @@ static inline const char * str_yes_no(bool value) { - if (value) - return "yes"; - else - return "no"; + return (value ? "yes" : "no"); } static inline const char * str_on_off(bool value) { - if (value) - return "on"; - else - return "off"; + return (value ? "on" : "off"); } static inline const char * str_enabled_disabled(bool value) { - if (value) - return "enabled"; - else - return "disabled"; + return (value ? "enabled" : "disabled"); } static inline const char * str_enable_disable(bool value) { - if (value) - return "enable"; - else - return "disable"; + return (value ? "enable" : "disable"); } #define str_disable_enable(_v) str_enable_disable(!(_v)) @@ -71,10 +59,7 @@ str_enable_disable(bool value) static inline const char * str_read_write(bool value) { - if (value) - return "read"; - else - return "write"; + return (value ? "read" : "write"); } #endif From nobody Fri Feb 27 02:29:35 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXN008wFz6T7XV for ; Fri, 27 Feb 2026 02:29:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXMz4Q4Fz40dp for ; Fri, 27 Feb 2026 02: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=1772159375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wpebL4GkTgfM9QoAPdHCVViiPFPUyYsPJyXGT68bXso=; b=XR6ZdgPDWQu6dRRGPFmmalfGkv+/vWIigJSzvkWAUQvBDJHIgVYqt03qK+t7UVlsibRuoP iwuPp5T+0SBLFfToagYTfPIJFpo5Ebi/JKjZ6wXEPE+Z8tSVErd28b9Js6Iqvn3uayN9Qc 4LoX4tfkMFpFMLtDXOkHAfsm66dXK+YiaWbjbaf/VzcglhO4Pgy9GeMyBtD1Fla2Vn9RaR ydxfrGUJpZDb1VBB9R+EGvKzsGXmICmBibvp4VoeBpLuvFlo/Gw0SsKeUlFyFhJhngWdpt b5HZDms9DX0EiuXFmAd8YO67O92qmUzba9VOE/GuUaRfPL10hSMBn170B4AOqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159375; a=rsa-sha256; cv=none; b=WzZQxdqc1g0r+BonMrp5t3+WAKWWaGTbF4yhhgGj0Gzb+lc0Nzy+OaJArdWMXMqvla6rcJ kO95IoHo6gnD9HYaAekzTuYd53m9eZJcsBCUVeKvOzzn/3iS5uq50mR3Rzan+pPqn9LIRN F/ISYO23a0I4wxoXqP2geO4ivOAaKCyCYrdaKuQFkPPHwUU7zvw3uW5Lj7rwFw5N8n+V7i ewNAuR4rY5BTFo60yUBeUGrO40oDtxgYs6W/y+hw1pNEGK6N49iLCZz7wqRwjjGwRFm2R5 xsFwuW1cR08/po09kFgzcTiR8PJ6xG0LqbUQbnN3mxcRrXzxgei2PjrWbfdwLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wpebL4GkTgfM9QoAPdHCVViiPFPUyYsPJyXGT68bXso=; b=Ky5cVpSR3xqZSPsPc2dKvd6ViiFgz8n5pUzZTlt57ZlLs6mj8Ou+qBs2TY8ZFppMPSmP+o vbGZzHKYVzwv+IKEQrx3tJn6m9BGe+vu0eKQEj0qxv2edMm0R2Is3axqgj1POwT9jLPYp5 TnavxvRMdzgIvEfi+yymrOHVMhsIyAxA6ik4DfhfVocdu3PpP2oI8KW1IMwnATLE+YBdOn Qc3gQO/BIEGO8MuvqeAuDv0nT1oCbk94dvS0BftyTbrJFxri2jDnhiGkwDd5ZKoFk5UcuV N2eF/AOeuaWkfe182xOu97Y8OBJUc1lPQj9gnvYbBBrQRcUZVknX1KwcJmSzyg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXMz3q0szxwF for ; Fri, 27 Feb 2026 02:29:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21017 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 7ff04e620c64 - stable/15 - mt76: sort bus attachments in module Makefiles for pci and usb List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7ff04e620c64e93ee31f30caed037b0a0b822295 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:35 +0000 Message-Id: <69a1018f.21017.1d62ffec@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7ff04e620c64e93ee31f30caed037b0a0b822295 commit 7ff04e620c64e93ee31f30caed037b0a0b822295 Author: Bjoern A. Zeeb AuthorDate: 2026-02-02 01:23:10 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:00:54 +0000 mt76: sort bus attachments in module Makefiles for pci and usb With PCI enabled and USB still disabled add knobs to (i) enabled them manually in the common Makefile.inc and (ii) add bus attachment depend knobs where needed to enable them in individual drivers. For now the focus is in 7921 and 7925. Sponsored by: The FreeBSD Foundation (cherry picked from commit 201fc8a55a4832174b5943e17ac90800aebe5772) --- sys/modules/mt76/Makefile.inc | 6 ++++++ sys/modules/mt76/core/Makefile | 7 +++++++ sys/modules/mt76/mt7921/Makefile | 18 +++++++++++++----- sys/modules/mt76/mt7925/Makefile | 12 +++++++++--- 4 files changed, 35 insertions(+), 8 deletions(-) diff --git a/sys/modules/mt76/Makefile.inc b/sys/modules/mt76/Makefile.inc index e4369564237e..739c85c60dac 100644 --- a/sys/modules/mt76/Makefile.inc +++ b/sys/modules/mt76/Makefile.inc @@ -4,6 +4,12 @@ COMMONDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76 .PATH: ${COMMONDIR} +# Bus attachments. +WITH_PCI= 1 +WITH_USB= 0 +WITH_SDIO= 0 + +# Options. WITH_CONFIG_PM= 0 WITH_DEBUGFS= 0 WITH_SOC_WED= 0 diff --git a/sys/modules/mt76/core/Makefile b/sys/modules/mt76/core/Makefile index c782bf218d93..589063a23229 100644 --- a/sys/modules/mt76/core/Makefile +++ b/sys/modules/mt76/core/Makefile @@ -1,3 +1,5 @@ +.include + KMOD= mt76_core # Basic stuff. @@ -6,10 +8,15 @@ SRCS+= channel.c scan.c wed.c #SRCS+= trace.c # Bus stuff. +# PCI parts; PCI needs to be compiled into the kernel and cannot be loaded. +.if defined(WITH_PCI) && ${WITH_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} SRCS+= pci.c +.endif + .if defined(WITH_USB) && ${WITH_USB} > 0 SRCS+= usb.c # usb_trace.c .endif + #SRCS+= sdio.c sdio_txrx.c # Connac-Lib stuff. diff --git a/sys/modules/mt76/mt7921/Makefile b/sys/modules/mt76/mt7921/Makefile index d3f201997a2d..1b53df04357c 100644 --- a/sys/modules/mt76/mt7921/Makefile +++ b/sys/modules/mt76/mt7921/Makefile @@ -1,3 +1,5 @@ +.include + DEVDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76/mt7921 .PATH: ${DEVDIR} @@ -7,14 +9,20 @@ KMOD= if_mt7921 # Common stuff. SRCS= init.c main.c mac.c mcu.c -# PCI stuff. +# PCI parts; PCI needs to be compiled into the kernel and cannot be loaded. +.if defined(WITH_PCI) && ${WITH_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} SRCS+= pci.c pci_mac.c pci_mcu.c +.endif -# USB stuff. -#SRCS+= usb.c +# USB parts; USB can be loaded and is unconditional on any kernel config. +.if defined(WITH_USB) && ${WITH_USB} > 0 +SRCS+= usb.c +.endif -# SDIO stuff. -#SRCS+= sdio.c sdio_mac.c sdio_mcu.c +# SDIO parts; SDIO depends on an MMCCAM kernel. +.if defined(WITH_SDIO) && ${WITH_SDIO} > 0 && ${KERN_OPTS:MMMCCAM} +SRCS+= sdio.c sdio_mac.c sdio_mcu.c +.endif .if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0 SRCS+= debugfs.c diff --git a/sys/modules/mt76/mt7925/Makefile b/sys/modules/mt76/mt7925/Makefile index dc6de5085d77..ee79f09dba1c 100644 --- a/sys/modules/mt76/mt7925/Makefile +++ b/sys/modules/mt76/mt7925/Makefile @@ -1,3 +1,5 @@ +.include + DEVDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76/mt7925 .PATH: ${DEVDIR} @@ -7,11 +9,15 @@ KMOD= if_mt7925 # Common stuff. SRCS= init.c main.c mac.c mcu.c regd.c -# PCI stuff. +# PCI parts; PCI needs to be compiled into the kernel and cannot be loaded. +.if defined(WITH_PCI) && ${WITH_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} SRCS+= pci.c pci_mac.c pci_mcu.c +.endif -# USB stuff. -#SRCS+= usb.c +# USB parts; USB can be loaded and is unconditional on any kernel config. +.if defined(WITH_USB) && ${WITH_USB} > 0 +SRCS+= usb.c +.endif .if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0 SRCS+= debugfs.c From nobody Fri Feb 27 02:29:36 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXN1235Nz6T7Ry for ; Fri, 27 Feb 2026 02:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXN054XQz40kQ for ; Fri, 27 Feb 2026 02:29:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uNk7yQ3dmfn+b1utv5PAiDI24Fb/Qgqj+V8obvOGi/g=; b=HqZxzgVwEkfS8HXtJ86Kg+RuTB7Eyd5E+dtrT1J5QJZlXs4dGZGxP7XSdYWPloWPQMJVpB 3C7qKhbXEup9atN+fa9UYDhiBpW4BMhBxf0BREJJXBI6AX3WA0eOGFZjgZuDFPcBvUIQrH jkQ020D9zcKYte4x9AjSBFD1eve3bhhStHbXoxuDdRTa9cc3qp9ZBSiyig/ZImuVNkeaz6 hlScN222LmINMRjRQ0uOuedwWBvRDtqmOYfFdgH9sj1U3hI91qFbgkouifw9lpCn6dX2Mf as/DPv8yxATOeLsuVOvYo0vMknVUimF8Xw5Pn1pdvqXLqBiqnVTL4Rm/0xIwEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159376; a=rsa-sha256; cv=none; b=eGfcuQGpyRbBCSYqPIKU2oNoLShbii4nmec6N5M7pmEFVBtd5vl2Im6C9Vo5QElKQGoCi8 iJThp7uNiaYeCmpRK07WrhOlhUTMKq7g7O1D7a6HkbiIa1+L9OC5X6F7O6c1sGMyOwgt+6 72e6yKbjj5wEHG9Ls503IF+VwsVWEiWjVkByFR+b5AbRGYL4RZjEn2K0If65lFuekBHUlb sfkO7+izH3Xf6za0rFrHOTEu1FrR+x5napz8YKgcs7epBNltJZ7uLczeY53ZvbCiDP9h39 MaLvq4U+k6LvZWM0MsFPEWwzJeSvGqAzXfMP1zkybYBUv/WCFJQ9ScgRFjDm3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uNk7yQ3dmfn+b1utv5PAiDI24Fb/Qgqj+V8obvOGi/g=; b=U/Tb/mreVo0xWjFd/p9bBDx29G4c3ii3+vfWhS30nIyBPvSiy8R4XqZBhSO7pX4e9dMV/B j6hKueSinuBHmA4qsbRUOl97+OCKk1HCFzeYJg0dXSCjEy7b/RMeFEe40HnCl65KkZoAjs AaBvMNM6t6HygJ5GjsEnlibz7AFWWIqQqdZPYH4TaLl7/+Cbwgtc6N4A+XagHEc30IOJ8K Zc64rAWLwQ1NpfvCUWEI1zF4Jv/XEISdZAgtseti5lZJUYgLErp8zRRVCedwHa0k6lKvAg ZmSA9fVF3EPfselGOxKKStkRz4znN8d/3/ZaWW3cwxtnBtP372oEESZwhOs6mg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXN04Y42zyHp for ; Fri, 27 Feb 2026 02:29:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21acc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: cd91367dc394 - stable/15 - mt76: module Makefiles fix .PATH List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: cd91367dc39476583fc01676f4d35ccda8aa14c5 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:36 +0000 Message-Id: <69a10190.21acc.364671a9@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=cd91367dc39476583fc01676f4d35ccda8aa14c5 commit cd91367dc39476583fc01676f4d35ccda8aa14c5 Author: Bjoern A. Zeeb AuthorDate: 2026-02-03 18:26:37 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:01:13 +0000 mt76: module Makefiles fix .PATH The common Makefile.inc had the .PATH set for the common code. That .PATH is only needed for the mt76_core module, which shares code for all other drivers. We leave the COMMONDIR variable defined in Makefile.inc as we need it for CFLAGS+= -I for each driver but migrate the .PATH to avoid drivers picking up the wrong files. Sponsored by: The FreeBSD Foundation (cherry picked from commit 03f6b1fd6af0bb43f74b38d8b5373f5485da0e8f) --- sys/modules/mt76/Makefile.inc | 2 -- sys/modules/mt76/core/Makefile | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/modules/mt76/Makefile.inc b/sys/modules/mt76/Makefile.inc index 739c85c60dac..41b18651e985 100644 --- a/sys/modules/mt76/Makefile.inc +++ b/sys/modules/mt76/Makefile.inc @@ -2,8 +2,6 @@ COMMONDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76 -.PATH: ${COMMONDIR} - # Bus attachments. WITH_PCI= 1 WITH_USB= 0 diff --git a/sys/modules/mt76/core/Makefile b/sys/modules/mt76/core/Makefile index 589063a23229..f2aec9dfcf4c 100644 --- a/sys/modules/mt76/core/Makefile +++ b/sys/modules/mt76/core/Makefile @@ -1,5 +1,7 @@ .include +.PATH: ${COMMONDIR} + KMOD= mt76_core # Basic stuff. From nobody Fri Feb 27 02:29:37 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXN23559z6T7P3 for ; Fri, 27 Feb 2026 02:29:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXN15vWxz40kc for ; Fri, 27 Feb 2026 02:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B3I198gj17dWpHFeYqWi6bItuf4a/YdxI961xYMga8Y=; b=KzLaAhy4hHht2iaZdyN/vY+NcOC/zADuVirQDUFSW76DHlwvKr/60cjK4a/HvN7xkXLglg +n8xMumeihI5kakmfSP5LbZTjD4IL9JG1dosdlgMjsgRIdEsUB/lRSKIZ3Ic8UU9mi3qzQ frFY+9J+IL+y6nnYsW94AxNy77FONT52ydMTWlfIE+SgparhCxLMvXYhz8ytpe8rvxOu5F 3SnIxL7jMRMAJYhw+Pa1f2t9B2B4ciB7E3UkOrImG/rIxVZ3bVSI1B1Yd1S9QfZbBikO5l pAZ3Ux+B4oynDLRz9r3BoXya0hi4JFOdXICTJrgfqN+Q+3bEC/G1WhjfaF8IHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159377; a=rsa-sha256; cv=none; b=mR0inoBc6zg+zemMHYdnTLRF2VzYgETSed9lrdf+OxWeVY3bP8auYLNGB8g7STtObOqlHY HyUOnOVCEahzqJyd9ES/tLrxV5Nqc/VpMBzdJ8K/LWuzBf2lEOXtWpoJPbLvqQy5PlgIxH YXc8i7jKufraIsoNdObX7MESmlqu8mc61fi1mLxOTvJeQsz4j3Js5mIdrK9nBjIGJfhsT4 HPX3HES2jG99vAq2zrsiYZX3+5rY7ALJsxuL47qdkISeVFGlNZaGh/ezGhfxIZX7cHomsz HaFaPCb8xJqLIiHArBlyoQ/pj/OB8rIMsky44vHmN8u+X/06+MmUVnTS7fpiqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B3I198gj17dWpHFeYqWi6bItuf4a/YdxI961xYMga8Y=; b=jwEiSnh+FszEZccw2ycSJJk+9KacYWqh0NC76F2ZFUTaHJjKLiZdccaOuayZp6W3asRsLM xXjnp+CnIEktlgn30tgV/T8W6qjP3H7UKR1oFIUd9AchOkS63EnadyoV9LoxXb9Da87oD+ v/fupuIwn9n7enRWQJgUaROpAY2KjhP7ew3QfK+JLGkTa3V5h2II8t7mSsJ8YOzcXFGAmy Xo2C4DcJM033OvqdaHcnI6bxYv/lSISipiOlllHND7NCy1INTtg7fO0fI+t4CT0EcX1LSV H5h5wKqbszVQZwYHS+LsDuW+CKSvo5cMZiPFAcu32Tm1gHtstcr8BXIghad15w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXN15Lr1zxwG for ; Fri, 27 Feb 2026 02:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 20fbb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: a90e903d807f - stable/15 - mt76: sort out MODULE_DEPEND for PCI and USB List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a90e903d807f359da63c9955155ba2487322c3c7 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:37 +0000 Message-Id: <69a10191.20fbb.15d5a329@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a90e903d807f359da63c9955155ba2487322c3c7 commit a90e903d807f359da63c9955155ba2487322c3c7 Author: Bjoern A. Zeeb AuthorDate: 2026-02-02 01:24:07 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:01:19 +0000 mt76: sort out MODULE_DEPEND for PCI and USB It is not enough to depend on mt76_core which then depends on linuxkpi and linuxkpi_wlan. Given each mt76 driver is its own module, each also needs to depend on these linuxkpi modules. In addition the core module usb part also has to depend on linuxkpi_usb. This in addition to the previously sorted PCI drivers, allows (or will allow) the individual chipsets (drivers) to load on systems with USB, if compiled in, as well. Sponsored by: The FreeBSD Foundation (cherry picked from commit b129f79a8985a92cd061afa4ee31311cfe31d285) --- sys/contrib/dev/mediatek/mt76/mt7615/pci.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7915/pci.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7921/pci.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7921/usb.c | 7 +++++++ sys/contrib/dev/mediatek/mt76/mt7925/pci.c | 2 +- sys/contrib/dev/mediatek/mt76/mt7925/usb.c | 7 +++++++ sys/contrib/dev/mediatek/mt76/mt7996/pci.c | 2 +- sys/contrib/dev/mediatek/mt76/usb.c | 3 +++ 8 files changed, 22 insertions(+), 5 deletions(-) diff --git a/sys/contrib/dev/mediatek/mt76/mt7615/pci.c b/sys/contrib/dev/mediatek/mt76/mt7615/pci.c index fe181d269419..ae701dc7d9c3 100644 --- a/sys/contrib/dev/mediatek/mt76/mt7615/pci.c +++ b/sys/contrib/dev/mediatek/mt76/mt7615/pci.c @@ -206,7 +206,7 @@ MODULE_FIRMWARE(MT7663_FIRMWARE_N9); MODULE_FIRMWARE(MT7663_ROM_PATCH); #if defined(__FreeBSD__) MODULE_VERSION(mt7615_pci, 1); +MODULE_DEPEND(mt7615_pci, mt76_core, 1, 1, 1); MODULE_DEPEND(mt7615_pci, linuxkpi, 1, 1, 1); MODULE_DEPEND(mt7615_pci, linuxkpi_wlan, 1, 1, 1); -MODULE_DEPEND(mt7615_pci, mt76_core, 1, 1, 1); #endif diff --git a/sys/contrib/dev/mediatek/mt76/mt7915/pci.c b/sys/contrib/dev/mediatek/mt76/mt7915/pci.c index 4e94a137c077..2eb2b7079057 100644 --- a/sys/contrib/dev/mediatek/mt76/mt7915/pci.c +++ b/sys/contrib/dev/mediatek/mt76/mt7915/pci.c @@ -266,7 +266,7 @@ MODULE_FIRMWARE(MT7916_FIRMWARE_WM); MODULE_FIRMWARE(MT7916_ROM_PATCH); #if defined(__FreeBSD__) MODULE_VERSION(mt7915_pci, 1); +MODULE_DEPEND(mt7915_pci, mt76_core, 1, 1, 1); MODULE_DEPEND(mt7915_pci, linuxkpi, 1, 1, 1); MODULE_DEPEND(mt7915_pci, linuxkpi_wlan, 1, 1, 1); -MODULE_DEPEND(mt7915_pci, mt76_core, 1, 1, 1); #endif diff --git a/sys/contrib/dev/mediatek/mt76/mt7921/pci.c b/sys/contrib/dev/mediatek/mt76/mt7921/pci.c index 30660837077f..46b59c4d0390 100644 --- a/sys/contrib/dev/mediatek/mt76/mt7921/pci.c +++ b/sys/contrib/dev/mediatek/mt76/mt7921/pci.c @@ -595,7 +595,7 @@ MODULE_DESCRIPTION("MediaTek MT7921E (PCIe) wireless driver"); MODULE_LICENSE("Dual BSD/GPL"); #if defined(__FreeBSD__) MODULE_VERSION(mt7921_pci, 1); +MODULE_DEPEND(mt7921_pci, mt76_core, 1, 1, 1); MODULE_DEPEND(mt7921_pci, linuxkpi, 1, 1, 1); MODULE_DEPEND(mt7921_pci, linuxkpi_wlan, 1, 1, 1); -MODULE_DEPEND(mt7921_pci, mt76_core, 1, 1, 1); #endif diff --git a/sys/contrib/dev/mediatek/mt76/mt7921/usb.c b/sys/contrib/dev/mediatek/mt76/mt7921/usb.c index 17057e68bf21..64881ef7cbf4 100644 --- a/sys/contrib/dev/mediatek/mt76/mt7921/usb.c +++ b/sys/contrib/dev/mediatek/mt76/mt7921/usb.c @@ -346,3 +346,10 @@ module_usb_driver(mt7921u_driver); MODULE_DESCRIPTION("MediaTek MT7921U (USB) wireless driver"); MODULE_AUTHOR("Lorenzo Bianconi "); MODULE_LICENSE("Dual BSD/GPL"); +#if defined(__FreeBSD__) +MODULE_VERSION(mt7921_usb, 1); +MODULE_DEPEND(mt7921_usb, mt76_core, 1, 1, 1); +MODULE_DEPEND(mt7921_usb, linuxkpi, 1, 1, 1); +MODULE_DEPEND(mt7921_usb, linuxkpi_wlan, 1, 1, 1); +MODULE_DEPEND(mt7921_usb, linuxkpi_usb, 1, 1, 1); +#endif diff --git a/sys/contrib/dev/mediatek/mt76/mt7925/pci.c b/sys/contrib/dev/mediatek/mt76/mt7925/pci.c index 021f431c9ded..d57e1aacf112 100644 --- a/sys/contrib/dev/mediatek/mt76/mt7925/pci.c +++ b/sys/contrib/dev/mediatek/mt76/mt7925/pci.c @@ -651,7 +651,7 @@ MODULE_DESCRIPTION("MediaTek MT7925E (PCIe) wireless driver"); MODULE_LICENSE("Dual BSD/GPL"); #if defined(__FreeBSD__) MODULE_VERSION(mt7925_pci, 1); +MODULE_DEPEND(mt7925_pci, mt76_core, 1, 1, 1); MODULE_DEPEND(mt7925_pci, linuxkpi, 1, 1, 1); MODULE_DEPEND(mt7925_pci, linuxkpi_wlan, 1, 1, 1); -MODULE_DEPEND(mt7925_pci, mt76_core, 1, 1, 1); #endif diff --git a/sys/contrib/dev/mediatek/mt76/mt7925/usb.c b/sys/contrib/dev/mediatek/mt76/mt7925/usb.c index d9968f03856d..437c073d6a5b 100644 --- a/sys/contrib/dev/mediatek/mt76/mt7925/usb.c +++ b/sys/contrib/dev/mediatek/mt76/mt7925/usb.c @@ -344,3 +344,10 @@ module_usb_driver(mt7925u_driver); MODULE_AUTHOR("Lorenzo Bianconi "); MODULE_DESCRIPTION("MediaTek MT7925U (USB) wireless driver"); MODULE_LICENSE("Dual BSD/GPL"); +#if defined(__FreeBSD__) +MODULE_VERSION(mt7925_usb, 1); +MODULE_DEPEND(mt7925_usb, mt76_core, 1, 1, 1); +MODULE_DEPEND(mt7925_usb, linuxkpi, 1, 1, 1); +MODULE_DEPEND(mt7925_usb, linuxkpi_wlan, 1, 1, 1); +MODULE_DEPEND(mt7925_usb, linuxkpi_usb, 1, 1, 1); +#endif diff --git a/sys/contrib/dev/mediatek/mt76/mt7996/pci.c b/sys/contrib/dev/mediatek/mt76/mt7996/pci.c index 241599dcbc72..5ca3b0819acb 100644 --- a/sys/contrib/dev/mediatek/mt76/mt7996/pci.c +++ b/sys/contrib/dev/mediatek/mt76/mt7996/pci.c @@ -287,7 +287,7 @@ MODULE_FIRMWARE(MT7990_FIRMWARE_WM); MODULE_FIRMWARE(MT7990_ROM_PATCH); #if defined(__FreeBSD__) MODULE_VERSION(mt7996_pci, 1); +MODULE_DEPEND(mt7996_pci, mt76_core, 1, 1, 1); MODULE_DEPEND(mt7996_pci, linuxkpi, 1, 1, 1); MODULE_DEPEND(mt7996_pci, linuxkpi_wlan, 1, 1, 1); -MODULE_DEPEND(mt7996_pci, mt76_core, 1, 1, 1); #endif diff --git a/sys/contrib/dev/mediatek/mt76/usb.c b/sys/contrib/dev/mediatek/mt76/usb.c index 67c976bb9c22..b0d04a465f35 100644 --- a/sys/contrib/dev/mediatek/mt76/usb.c +++ b/sys/contrib/dev/mediatek/mt76/usb.c @@ -1141,3 +1141,6 @@ EXPORT_SYMBOL_GPL(mt76u_init); MODULE_AUTHOR("Lorenzo Bianconi "); MODULE_DESCRIPTION("MediaTek MT76x USB helpers"); MODULE_LICENSE("Dual BSD/GPL"); +#if defined(__FreeBSD__) +MODULE_DEPEND(mt76_core, linuxkpi_usb, 1, 1, 1); +#endif From nobody Fri Feb 27 02:29:38 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXN34yh2z6T7Xd for ; Fri, 27 Feb 2026 02:29:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXN26KdSz413b for ; Fri, 27 Feb 2026 02:29:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4X4bL8/O1/rmOw9A4mpL/FfzptxCmm7FdG+jV2dgNN0=; b=gqPGcyQ+4UcEACXUezYBYEWYhVjHfM429/p2F80F2KmxfOrO8DtUqKcR82R3l+3ujZRrLD mwnWWSf7HrylEmjSgaV8P3GKpT9BEdGZ72fkl4+d6LMKeXMMZ3VpEtaAyTc1NTQfsFi696 bxcUt8vXKJM/5/CQq8XEeMzR7Fxd7x6ycaFLuOMI2mahymEsnK2q/RXrtGnQ743PLFkSSG dgb8oUN44LPjmBltl9mQwhcfRH0BFOe/qVapZUued9RKrAkB24cSpmOAQIYR2PmTZ9bsSg 41brcHERhUDqsER6obhQU3n7f2E7J153NmmkFc/JvJSTUd+Mni+vPQj0WPUedA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159378; a=rsa-sha256; cv=none; b=kF995QG/yDesTrNcr7zaW7eL5/HU4hPEoyvcYJZSfP3Q5JYUMJxRFc+68d6Sh6ErDHdCNd OmY5iufC7SRlFJ11Lgn4M6sNsKH04siq3zT6PRm9s58UEBUYXfDw9CtlACKZzLoKP04/wP ADv3XWIfVe4BRSplBHqUnCxXh0ToQR9AzfOGcjHxN8YTZI1pF1r2a95XML9Qx8X/fvZrsQ ifLXQqjQbllIzXx2dVX7OICDv3XVEaWcYv5t+py9uPqfbbYfa09oUCiHL7CrtVzO4uXVwF y7KHx1bZ4PROG7HRt++0kAPaTiTRkCfT9BBAMEygaG2mCcuH917po2ywRs56KQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4X4bL8/O1/rmOw9A4mpL/FfzptxCmm7FdG+jV2dgNN0=; b=d1g9HA1UYyX4/ApO883pVGNCtZiAy3GhwW3B+3OzakKfOMvVgff5aQzCxMtvZFx9UlhuKv FGwe8+fcR9+ytMaZRQ4XO1IvmQQxkLjrYKDmcU81VJLtifYairY9DPfWKSrr6ZYjpKPIg2 9fREqn/HgQup4RbjoMCCoCMWpgVVBfw+Sx2mU/5QteH9ZEZsr4yJ+EA7FiKc/pEf9lk0+u 89vurrCHF5E48ja8d9UONnDfmMQoDEdYX750h3j5jRVc+2pxK2CUVnZmYmezlu/9pbeJBx qX+hT0P6QUA1Pw44qhzeBSKPJ9wvVm7ILJZ5t92Fw977stu5FxgKuW64IDeKKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXN25j53zyV8 for ; Fri, 27 Feb 2026 02:29:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f657 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 4b312b0bcbd4 - stable/15 - mt76: make USB compile List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4b312b0bcbd4870831104b3063bb792f6933e0a5 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:38 +0000 Message-Id: <69a10192.1f657.237a7c1a@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4b312b0bcbd4870831104b3063bb792f6933e0a5 commit 4b312b0bcbd4870831104b3063bb792f6933e0a5 Author: Bjoern A. Zeeb AuthorDate: 2026-02-03 18:25:02 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:01:23 +0000 mt76: make USB compile This is the mt76-specific changes to make the USB driver targets for 7921 and 7925 compile. Sponsored by: The FreeBSD Foundation (cherry picked from commit 642c8387647daabc2505497cdafef4d3ce82bbf2) --- sys/contrib/dev/mediatek/mt76/mt792x_usb.c | 3 +++ sys/contrib/dev/mediatek/mt76/usb.c | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/sys/contrib/dev/mediatek/mt76/mt792x_usb.c b/sys/contrib/dev/mediatek/mt76/mt792x_usb.c index 552808458138..05879ae232d2 100644 --- a/sys/contrib/dev/mediatek/mt76/mt792x_usb.c +++ b/sys/contrib/dev/mediatek/mt76/mt792x_usb.c @@ -7,6 +7,9 @@ #include #include #include +#if defined(__FreeBSD__) +#include +#endif #include "mt792x.h" #include "mt76_connac2_mac.h" diff --git a/sys/contrib/dev/mediatek/mt76/usb.c b/sys/contrib/dev/mediatek/mt76/usb.c index b0d04a465f35..e658334fe4e4 100644 --- a/sys/contrib/dev/mediatek/mt76/usb.c +++ b/sys/contrib/dev/mediatek/mt76/usb.c @@ -5,6 +5,8 @@ #if defined(__FreeBSD__) #define LINUXKPI_PARAM_PREFIX mt76_usb_ + +#include #endif #include @@ -474,7 +476,11 @@ mt76u_get_rx_entry_len(struct mt76_dev *dev, u8 *data, } static struct sk_buff * +#if defined(__linux__) mt76u_build_rx_skb(struct mt76_dev *dev, void *data, +#elif defined(__FreeBSD__) +mt76u_build_rx_skb(struct mt76_dev *dev, u8 *data, +#endif int len, int buf_size) { int head_room, drv_flags = dev->drv->drv_flags; @@ -495,7 +501,11 @@ mt76u_build_rx_skb(struct mt76_dev *dev, void *data, data += head_room + MT_SKB_HEAD_LEN; page = virt_to_head_page(data); skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, +#if defined(__linux__) page, data - page_address(page), +#elif defined(__FreeBSD__) + page, data - (u8 *)page_address(page), +#endif len - MT_SKB_HEAD_LEN, buf_size); return skb; From nobody Fri Feb 27 02:29:39 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXN41whPz6T7ZT for ; Fri, 27 Feb 2026 02:29:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXN36ZdNz40wp for ; Fri, 27 Feb 2026 02:29:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vR7lvlgOc5Pw3rGHgpnW3/KPYFAYskAjHBlycXOT5TQ=; b=FwhrrCGBbIaJhTnobe3NMhN98+aYGDH83/EHEJR3fAXj2jqFfoVySAqkhNQJKdgDUJsoI9 TMIIXpWwFE90Jy9Le7nQRLGqwnnghUwIVkzlH6nCJQ4/6+u48LmYem2RVbtkHB/Zb0q6QE X247O6L46UXP70ds/XEnMxuyrUIl51EQi31Mm+S/5vc/5v1OjKK+XGEfQkKYq2awHToDw1 Q+LRtkBKQX+fCBqtritBNjiNG2MJ8BL1bwiv7wyi+Q8Ce/m7e9wyKCPO9vbx01V5BWoZ57 wtRQS7XAyVYc1ioe2RPyBygt4mfTiecjOhkwNRcGwluXk7jFXl50shTkZ5orpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159379; a=rsa-sha256; cv=none; b=ayRORYhdlAyb0iXj+IMgUm4EOINqC0BNi+h3bqTrxgMDUFsa4J7pKQFSRxrChiSpvU4xtS cnPNbt9XaVOjRszKFU9eOlOomPQd0rfZkalGjl2mtmojHwaGFLe2qHdyaMhX98Lj9pV3/R aKMpzladpNUThnA5ZxMJ06757CHbhMmpROX96FF1O7Mx63Bf2dJC9d6RRwtYjWLwMmLank 33WPZYrPsi0ntV1SQ7I+5Zd4iAOxQfxX7OitUPcE6lxlZHHi0+ROx9GNEj8LdhOpBRkAwJ X6kuEHOZFNfsS+yzxLgVH+C2U7E9b5NMP1aLxNfm4ecjLMjd6gFwO+lB6xgBlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vR7lvlgOc5Pw3rGHgpnW3/KPYFAYskAjHBlycXOT5TQ=; b=MNpP6m2YNy8XZ8guH1WKHK42Qb9C3hU9bOW68roeapcsx6JoGdEkHxKYiV1Dx5BDmXjr8j Cr31UlMfHHAU0wCVBCk+vmcFg3bGNHnarijZjlKlJQeVhjmDU6F9bN9woCx3HA0v0ZhrlB iRcrZiFdPyOiD6sTphcrRcrtBd9FF52UJaknyiYIFZ0H38eRtBzcjnssijrvASQ57KT3t1 78lfAmQJkh/JsbLyFYMqkHjN/Yre1vFV3a8tG+XpIFi8awd+/rhugQYBQANVWksxg/S5Fb dw1J8silMKi9DvaLv8hvH+2D91bSPleukGdcKMV5AVBKOKo5Be+x2qjqYxVqRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXN3671KzyX3 for ; Fri, 27 Feb 2026 02:29:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1fe70 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: efb9f7d98698 - stable/15 - mt76: mt7925: add missing LINUXKPI_PARAM_PREFIX List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: efb9f7d98698f25ad3a5ec9c9300ab51a6763a1d Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:39 +0000 Message-Id: <69a10193.1fe70.3b23ccdc@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=efb9f7d98698f25ad3a5ec9c9300ab51a6763a1d commit efb9f7d98698f25ad3a5ec9c9300ab51a6763a1d Author: Bjoern A. Zeeb AuthorDate: 2026-02-04 22:20:37 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:01:28 +0000 mt76: mt7925: add missing LINUXKPI_PARAM_PREFIX There is a module_param_named() in the file so we need to set LINUXKPI_PARAM_PREFIX to get it a uniq sysctl name. mt7921 has the exact same option. Without their individual prefixes the names would clash on systems with both chipsets and not work for both. Sponsored by: The FreeBSD Foundation (cherry picked from commit bc820edd2d7906e04e93aef8a6137991ad86f4cc) --- sys/contrib/dev/mediatek/mt76/mt7925/regd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/contrib/dev/mediatek/mt76/mt7925/regd.c b/sys/contrib/dev/mediatek/mt76/mt7925/regd.c index 292087e882d1..73f6f93faf35 100644 --- a/sys/contrib/dev/mediatek/mt76/mt7925/regd.c +++ b/sys/contrib/dev/mediatek/mt76/mt7925/regd.c @@ -1,6 +1,10 @@ // SPDX-License-Identifier: BSD-3-Clause-Clear /* Copyright (C) 2025 MediaTek Inc. */ +#if defined(__FreeBSD__) +#define LINUXKPI_PARAM_PREFIX mt7925_ +#endif + #include "mt7925.h" #include "regd.h" #include "mcu.h" From nobody Fri Feb 27 02:29:40 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXN55PB1z6T7Xj for ; Fri, 27 Feb 2026 02:29:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXN50Gl6z40qs for ; Fri, 27 Feb 2026 02:29:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rsqH22kONSTzSsDBHRQcfVB2rJq5DHp9jFy2uC56kTg=; b=i99h07swvYPpuF0FB5eH18aDHFMx0y5vJxKrcw0isByXGzflrBftuwzGrm/3cC6wjxlNWG 5M+hIwh3kQY2OfTx8qHceOH/FvsTvXmtNDhOo8Pc7hz98MNSEReargguRq0iZgKWTRmRTi qqbXHc2vcmyCQ6ffI22Pba6g4KodiQG+ozsCUDq9OFWWZH1mZVOk1/X6LXp2P9XOXczVYS uRoFQQF494WAM334waLK1m7aDW7Zu5tD2ai5RaveIWTbLXuUNuKmmduyEgQH47WtG88WEb VfR4NZHUC9k2FHjRZ+t1wRRktDcEbJ/bHbxHxHFVdTttz8TOUELjqcCqAx4PSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159381; a=rsa-sha256; cv=none; b=MkNcmAmuzuTlq5cJbS5tafOjB5zbjsrAa62C/6lIVg4Kef9ifqJJqXBicJhuo1kdmOpsxX DDnW/HqnzN9YqWJlYuSY6J4y0DkYgjcQ/j6sUfHKCUtCdLMlGCgpvR1gqW9SgZ2FXaE1rM UKhEEHwyajbFp9gl7IY8vUb2qLC+0BCTV+goTD+HoNma5I2djeEoZdblK/g0nBlebYt7MJ yPq+yFLMKSHXWGj/eXwukKjxgYZwxb4meN5Yf6nqMj2oJcjRHSkJyAeYyLOgjHJHDO4tCw /M/MBrTUk6RF1e0+TBCdKHNvlakYMf7HY0vY5Q1DIkePqiCWME0jPLaXCjsaXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rsqH22kONSTzSsDBHRQcfVB2rJq5DHp9jFy2uC56kTg=; b=wa2PJqjWStxG0KPfpxnO8ja69ifUBF6EQ799cG7H2jnCYl+HgrqX1GZAkWW5R4q8HWqM76 rJbBaisKnbX3ZFrwtxF3+JCRQBimXkkekeeRu6EKXO02RG6k2Sf8hzMdzntNCH4tq4VDID B9AWDRBUlZXrE4giJWPkSj3wv+mQLq7+QZERkq9siOiJta5zLfd4+DKLwJPCBJXfxJ1ifK /VSmIbdREdptmCTyseRa9gyqosAKUWeq+PIMEvNp0LAEdIBO5+6jAypSH5QUgh0M7+6Wzz 5voU5Yf4CqUeoCVPARZ6PCLWZ0zs3lotJeASCyBbxa0kOQ9/EQ+6IFc/uAbvIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXN46y56zxR4 for ; Fri, 27 Feb 2026 02:29:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21383 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 7c8425858944 - stable/15 - mt76: fix a check wrongly giving us random ether addresses all the time List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7c8425858944a20c92164d4dd537ee7a8308072b Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:40 +0000 Message-Id: <69a10194.21383.3ce2c824@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7c8425858944a20c92164d4dd537ee7a8308072b commit 7c8425858944a20c92164d4dd537ee7a8308072b Author: Bjoern A. Zeeb AuthorDate: 2026-02-05 00:20:04 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:01:33 +0000 mt76: fix a check wrongly giving us random ether addresses all the time Do not cover the is_valid_ether_addr() check under CONFIG_OF. Unclear if this is an initial porting or a merging error before the driver hit the FreeBSD src tree. The end result was that we always got a random link-layer address, while the individual drivers may have setup phy->macaddr and this function would only overwride if given in device tree. Only if both, driver and and the OF backup, fail then go and use the random link-layer address. While here adjust printing the random link-layer address using a FreeBSD format specifier and not the unsupported Linux one. Fixes: 6c92544d7c97 Sponsored by: The FreeBSD Foundation (cherry picked from commit 3afe9e12fb331dc698ac62f3b918d82d768a2792) --- sys/contrib/dev/mediatek/mt76/eeprom.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/contrib/dev/mediatek/mt76/eeprom.c b/sys/contrib/dev/mediatek/mt76/eeprom.c index 1d5b95226a16..99e1bca3c19f 100644 --- a/sys/contrib/dev/mediatek/mt76/eeprom.c +++ b/sys/contrib/dev/mediatek/mt76/eeprom.c @@ -186,16 +186,19 @@ mt76_eeprom_override(struct mt76_phy *phy) err = of_get_mac_address(np, phy->macaddr); if (err == -EPROBE_DEFER) return err; +#endif if (!is_valid_ether_addr(phy->macaddr)) { -#endif eth_random_addr(phy->macaddr); dev_info(dev->dev, +#if defined(__linux__) "Invalid MAC address, using random address %pM\n", phy->macaddr); -#if defined(CONFIG_OF) - } +#elif defined(__FreeBSD__) + "Invalid MAC address, using random address %6D\n", + phy->macaddr, ":"); #endif + } return 0; } From nobody Fri Feb 27 02:29:42 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXN63Hmmz6T7Xk for ; Fri, 27 Feb 2026 02:29:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXN61m2hz411T for ; Fri, 27 Feb 2026 02:29:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0suBKrPbRXNtdRo0+Z6dNmumqVz/WaCN7WnySvQ2tso=; b=KmPp0kNGYm73aSxFFZmmLNmwWH4aXufRw11vI1bT2At8s34JBamfxPQeGR5+8EJXQtqEY6 vKPK+qjkyjDJvMJY6anCCQ3sov6ANKcf2mb6pUTAMgdcqKLJfOTOhDHEvTKG3Nkn2xAPSI GWrJru/goLLhbUSmx+kFHbvc08LFIaZ9e+eXwrX08uQ/hqzPV06xtvGUIOGcXb1qbpWytC a7yUgMfSUTaAGi8cbu61oMY6JHlxnkfSKYND+APtdwYzMVJ+94sDxcU1o4TmfU24n5qOck QAxdO4uX4mAdSYgM8Z2SS3SQsMrM4F/vCfunHdFWI8xZzslEAizqD+sJyd4koQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159382; a=rsa-sha256; cv=none; b=sS/t3UoCM6mFylb/XTb7OBIdshBTbFzc0c153g8Oa7lRz7UKeth09RicNB5H4dsfu8xrWK Y7ecJN+E/I+By8lrNZaZq7243ZE+AX76ulFaXqOu+l8N4jjgGNOqOcA4R0igV6GPo0/wXU aWnxNa4SZQTAH2I/BoUTGv9PEnQECdOoSxBUYC371sAAZOHy4wS+s8lWKQzXBtVc+hBdk0 TZWeBdEMYVdqz75OOtp96Wf0U46UM9f/5VbZS7e3Mid0oFNGRHH0BEjmT3kRGyG6HXNVOd MR+Nftf8nbYBIBbIZ5KXqR5parc0at5mWxOmsYk0D+oLx4i91sKSsu+zM158Og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0suBKrPbRXNtdRo0+Z6dNmumqVz/WaCN7WnySvQ2tso=; b=vdJzfmtHi3+fbxRMw4E+xnic5zqUZpY4/GWmmA4VOyMeTBQIOP2DJ0e+DGB60Ho+TUQ432 c0rySX8rKIBho6Lzrw8ee6tt22JEeIdDyZMbG8upw14ViBMoaHkytj/dfwDgLH4Fv50Gc0 v9EeR0WbhAlVW7rTqgy0/RcXRemitKaUjbD8BjMfIrpymTpzc+OfxBdXGNOSMB3iNWHlOM U53AQS+6cLCmQVb68FzJw5kW47IF01j7tbG6OxoZYVHmVZSXN4lvQM15DnIob+Vwlfqpni W2g0HSLyimiNT6PTR2qGCYjpo+6hb06i1t4o0nchJYjgO6Sskq60/vKgSl7ONg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXN60mY7zyHs for ; Fri, 27 Feb 2026 02:29:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2033b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: d16077f48468 - stable/15 - LinuxKPI: 802.11: set extra tx info flag for EAPOL for mt76 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d16077f48468f080902b88d5445f44e5fd8d30f4 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:42 +0000 Message-Id: <69a10196.2033b.60f9ab7a@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d16077f48468f080902b88d5445f44e5fd8d30f4 commit d16077f48468f080902b88d5445f44e5fd8d30f4 Author: Bjoern A. Zeeb AuthorDate: 2026-02-04 22:25:50 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:01:39 +0000 LinuxKPI: 802.11: set extra tx info flag for EAPOL for mt76 mt76 requires IEEE80211_TX_CTL_USE_MINRATE to be set for EAPOL, so add it. Sponsored by: The FreeBSD Foundation (cherry picked from commit c529e1a8f8edb575de6b109981c4ca7ffdd3b81c) --- sys/compat/linuxkpi/common/src/linux_80211.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 4ce0a2094adb..2a56d19adbea 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -5697,8 +5697,10 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m) c = ic->ic_curchan; info->band = lkpi_net80211_chan_to_nl80211_band(c); info->hw_queue = vif->hw_queue[ac]; - if (m->m_flags & M_EAPOL) + if ((m->m_flags & M_EAPOL) != 0) { info->control.flags |= IEEE80211_TX_CTRL_PORT_CTRL_PROTO; + info->flags |= IEEE80211_TX_CTL_USE_MINRATE; /* mt76 */ + } info->control.vif = vif; /* XXX-BZ info->control.rates */ #ifdef __notyet__ From nobody Fri Feb 27 02:29:43 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXN74B8mz6T7jF for ; Fri, 27 Feb 2026 02:29:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXN727Hyz411g for ; Fri, 27 Feb 2026 02:29:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TaPFPqKq55M2/xoCdJawHijo1r6W1pFOVVlxHzJ4xSw=; b=m/7FuIQmMyw6fDngrRsFZWj4D1do1IWB/6et0Rbu2m9xvbk8vmfoG4T28TaYgZLLVBwOrZ 4VYBySF2VWoIRkXM3lCQ9zDj5njNY/RkN2ssbkmisS7NHkPCHZZ4pTCt2INXT6OVm3cKxF T4AIdZ2nxAXDGxfKtaUDiKfT5QJMLHT6gZLVFyloptFUEe5Azk8AebY3m7mKhbRynt1zWE 8IRcnrERjNEBiCUyh5n6pjFyEMg469QqetUgu9XczJ18YWpYgJ/0WeYZaeAXEE3/bW7muj xhZnq5CrpGNOal+L0ATVyUhaMpbFN4i7cAN/mHLkTJMne/06MB7UT3n8FerIKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159383; a=rsa-sha256; cv=none; b=fd+HUgiGTW3ZlH/dhxqrnfQjmCLPGJUyThjczmmugdgB0h6lRuTd3clLsgfNf6wf0SX86a 2QLUEDC1AH39lpmYSrpjo22MpW7rLVfyuZHexHKzDiBdqd40xO89uj6wJX1ROlPOUPwHxS ekRWqlF442rspinJGhBaQHjNvdEBM3pQ5k6dn9HjqPueLwNMTlPTf+rkmVJjw3F9HRr9oA IXAOVB7P9PaLlNd05asWGoU8Ypyc3whCDjsaymJJeyckYkPus7mnROuoH7HTgj5xWOSRMX vkp/Jg94dU85Y80XJXFHS8pVdmYjy3CQzSEcMpWZQvMSr9OSbdbF3oMIA6tnJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TaPFPqKq55M2/xoCdJawHijo1r6W1pFOVVlxHzJ4xSw=; b=JPSMM3cazqhzj0RZRqQ9OT3o1lfjZfsZpPmA/C95OSp7NF46AUilU4NsRiqtADPXttY0TG uzB1Lk0tyW5hmk2aK2s+oT1WYL2OYa2iRWYOrrkNyppBz3W5oLWHr6Oxy3kdRy16LbmjPL 0QceBVUvIYhzhmacMpByEs1WM3b+gimobcKfkfDRX7nbdXAeyGpsJvKGJAoGBTRyW5h2Oz hHzro+w8V6JbafRzAXuwdga13n9vH0lJ5xPd2Zi/p58PTyvNWLwroChT3Qk5ld5z0s30XP e4dmlkTHYyA/Ru5Tl+hjquhYPenKNnBcxD1c7/DI/CV6IYrZX1qZYHgRzOykag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXN71cFdzyHt for ; Fri, 27 Feb 2026 02:29:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 204cb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: d5f1a9f574f9 - stable/15 - LinuxKPI: 802.11: make sure we are scheduled before wake_tx_queue() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d5f1a9f574f9144c86450440ff495e471735ae26 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:43 +0000 Message-Id: <69a10197.204cb.1905cf86@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d5f1a9f574f9144c86450440ff495e471735ae26 commit d5f1a9f574f9144c86450440ff495e471735ae26 Author: Bjoern A. Zeeb AuthorDate: 2026-02-04 22:39:01 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:01:45 +0000 LinuxKPI: 802.11: make sure we are scheduled before wake_tx_queue() If we are not scheduled before calling wake_tx_queue() packets may never go out, which at first will look like EAPOL fails (as wpa_supplicant suggest possibly with a wrong key). Using monitor mode it will be clear what is going on. Pass a flag down to wake_tx_queue() to call ieee80211_schedule_txq() in case (*wake_tx_queue)() is supported or not, which solves the problem for the lkpi_80211_txq_tx_one() which was failing. Sponsored by: The FreeBSD Foundation (cherry picked from commit 7d60647a1a6c19e7be33428c33b77faadfe863a1) --- sys/compat/linuxkpi/common/src/linux_80211.c | 8 ++++---- sys/compat/linuxkpi/common/src/linux_80211.h | 5 +++-- sys/compat/linuxkpi/common/src/linux_80211_macops.c | 10 ++++++++-- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 2a56d19adbea..54571b28e2b8 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2020-2025 The FreeBSD Foundation + * Copyright (c) 2020-2026 The FreeBSD Foundation * Copyright (c) 2020-2025 Bjoern A. Zeeb * * This software was developed by Björn Zeeb under sponsorship from @@ -2150,7 +2150,7 @@ lkpi_wake_tx_queues(struct ieee80211_hw *hw, struct ieee80211_sta *sta, if (no_emptyq && ltxq_empty) continue; - lkpi_80211_mo_wake_tx_queue(hw, sta->txq[tid]); + lkpi_80211_mo_wake_tx_queue(hw, sta->txq[tid], false); } } @@ -5764,7 +5764,7 @@ lkpi_80211_txq_tx_one(struct lkpi_sta *lsta, struct mbuf *m) #endif LKPI_80211_LTXQ_UNLOCK(ltxq); wiphy_lock(hw->wiphy); - lkpi_80211_mo_wake_tx_queue(hw, <xq->txq); + lkpi_80211_mo_wake_tx_queue(hw, <xq->txq, true); wiphy_unlock(hw->wiphy); return; @@ -8751,7 +8751,7 @@ lkpi_ieee80211_wake_queues(struct ieee80211_hw *hw, int hwq) ltxq->stopped = false; if (!skb_queue_empty(<xq->skbq)) - lkpi_80211_mo_wake_tx_queue(hw, sta->txq[tid]); + lkpi_80211_mo_wake_tx_queue(hw, sta->txq[tid], false); } } rcu_read_unlock(); diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index d4f18fcafbba..3d25ab4a857b 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2020-2023 The FreeBSD Foundation + * Copyright (c) 2020-2026 The FreeBSD Foundation * Copyright (c) 2020-2021 Bjoern A. Zeeb * * This software was developed by Björn Zeeb under sponsorship from @@ -481,7 +481,8 @@ void lkpi_80211_mo_mgd_complete_tx(struct ieee80211_hw *, struct ieee80211_vif * struct ieee80211_prep_tx_info *); void lkpi_80211_mo_tx(struct ieee80211_hw *, struct ieee80211_tx_control *, struct sk_buff *); -void lkpi_80211_mo_wake_tx_queue(struct ieee80211_hw *, struct ieee80211_txq *); +void lkpi_80211_mo_wake_tx_queue(struct ieee80211_hw *, struct ieee80211_txq *, + bool); void lkpi_80211_mo_sync_rx_queues(struct ieee80211_hw *); void lkpi_80211_mo_sta_pre_rcu_remove(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_sta *); diff --git a/sys/compat/linuxkpi/common/src/linux_80211_macops.c b/sys/compat/linuxkpi/common/src/linux_80211_macops.c index a85e6d0d0dd7..634cffddea9e 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211_macops.c +++ b/sys/compat/linuxkpi/common/src/linux_80211_macops.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2021-2022 The FreeBSD Foundation + * Copyright (c) 2021-2026 The FreeBSD Foundation * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -644,11 +644,17 @@ lkpi_80211_mo_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *txctrl, } void -lkpi_80211_mo_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *txq) +lkpi_80211_mo_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *txq, + bool schedule) { struct lkpi_hw *lhw; lhw = HW_TO_LHW(hw); + + /* Do the schedule before the check for wake_tx_queue supported! */ + if (schedule) + ieee80211_schedule_txq(hw, txq); + if (lhw->ops->wake_tx_queue == NULL) return; From nobody Fri Feb 27 02:29:44 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXN85djtz6T7Zp for ; Fri, 27 Feb 2026 02:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXN82zc9z411q for ; Fri, 27 Feb 2026 02:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nHzAhlRxaeXlnRlFRi3uJdwbFQswAnin7pTK5DkxkZY=; b=BS6sGatTOJXlsv5qRxancwPqWeM8vpvi+7f46sv4sy7Q4HpDY3or7kRK245oBhty/axRnf pA7XR6Wu16Ud4wdyu8Xozxfuux395pf1tYERiq/w6hAy2D+LEoAmXAuGe1eSU3YhLXujN2 M2miBc2/8+pfrJoJlCyMKT1JoLfNqeGrsTqdGNfMBvQSjzo2owZGhX49rcCNePjfvw7k9o DHG5BWzDQoBXbToKPtTZfgu820xyoRTVVB15HbW3HNfOKFaDHxJJsHnVbBNKEZNmLb56sq Ocq7Voq7GIrec8PAmgs9j0Bixax+E9xLiat+J5Atl2oCy3JKNJ3tWNOG/9jYJQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159384; a=rsa-sha256; cv=none; b=D72kZge74CQPN9+v8lRVJdYhQaqDti2Vrbc3N15BJjXJlNx3duLUU4V4Zl3UTy/6OsvcFh 10/tPjTbpxM0Q3viTZVl3PacT6oQCTE06ADf7QAAr0F/LCTquM3v1GaKdb8ShT/4UMQvj6 xUcN0uU6MrmOIP/GtXQWaBHzlfYJk5Dq8Z9q27jrI0d3VGbak3jjLzyP9NuA/K1dQDOMF1 S2yN1Gz3Xuw8q3haqmPQqQfw/9TRtE10rtscHMfC62IkXN/wd7zOAGxfMWaR2RFueqngeK O+RSbfAns5ou2Oxhqn2XGOV+qlhqXQ8wgUJ9H+ZOMHPuCz7NbxUhGo0kkCg3uA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nHzAhlRxaeXlnRlFRi3uJdwbFQswAnin7pTK5DkxkZY=; b=G3za+M2pgm/9UITBBAPEPS4HJsZUrF5H6vOQbvhw0u6Ic7a5ucxiJ7IHTzddGqJhuRke8L ZTXSG0ExMXb4RE0fHs0EqgPOzMKOzblwqPMALTnrvYQ6ftYHEnes4i8+xPfkAVRDiOPkre 1OPsEza69pkSiHiUF3aOFegXmVT59Xo9SQ4F6AkIMNKgLjPZ82jFzwdTcpBv9qOPSy5Niv UAAJ5nyhHCkG51iZb/d5/rEPS3HIRglbsUswx0bj9DT2EkiGCBFWFAbZU/maIBYBxWv2Qy fSwNyrfnGSZ4xZCUuUAcbM0hKMfEnzZW5g/Q8L6p74hPPQBw5aqVPGE9smHDrg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXN82SVRzyVB for ; Fri, 27 Feb 2026 02:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f6f1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: d89845f449da - stable/15 - LinuxKPI: 802.11: catch possible NULL pointer deref with mt76 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d89845f449da734a3d9893552c5b0da963c90819 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:44 +0000 Message-Id: <69a10198.1f6f1.7641dc28@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d89845f449da734a3d9893552c5b0da963c90819 commit d89845f449da734a3d9893552c5b0da963c90819 Author: Bjoern A. Zeeb AuthorDate: 2026-02-04 22:46:47 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:01:54 +0000 LinuxKPI: 802.11: catch possible NULL pointer deref with mt76 With mt76 we, for the first time, see that txstat->skb or txstat->info may not be filled in linuxkpi_ieee80211_tx_status_ext(). Guard for these cases checking for skb and info to be not NULL and assume a TX failure in case info is NULL. Sponsored by: The FreeBSD Foundation (cherry picked from commit 94be5dbdfd22de4ec9ad699803ae18d9d209d824) --- sys/compat/linuxkpi/common/src/linux_80211.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 54571b28e2b8..0b732cb691c6 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -8304,6 +8304,9 @@ _lkpi_ieee80211_free_txskb(struct ieee80211_hw *hw, struct sk_buff *skb, struct ieee80211_node *ni; struct mbuf *m; + if (skb == NULL) + return; + m = skb->m; skb->m = NULL; @@ -8329,13 +8332,13 @@ linuxkpi_ieee80211_tx_status_ext(struct ieee80211_hw *hw, struct ieee80211_tx_status *txstat) { struct sk_buff *skb; - struct ieee80211_tx_info *info; + struct ieee80211_tx_info *info, _info = { }; struct ieee80211_ratectl_tx_status txs; struct ieee80211_node *ni; int status; skb = txstat->skb; - if (skb->m != NULL) { + if (skb != NULL && skb->m != NULL) { struct mbuf *m; m = skb->m; @@ -8345,7 +8348,13 @@ linuxkpi_ieee80211_tx_status_ext(struct ieee80211_hw *hw, ni = NULL; } + /* + * If we have no info information on tx, set info to an all-zero struct + * to make the code (and debug output) simpler. + */ info = txstat->info; + if (info == NULL) + info = &_info; if (info->flags & IEEE80211_TX_STAT_ACK) { status = 0; /* No error. */ txs.status = IEEE80211_RATECTL_TX_SUCCESS; @@ -8410,7 +8419,8 @@ linuxkpi_ieee80211_tx_status_ext(struct ieee80211_hw *hw, if (txstat->free_list) { _lkpi_ieee80211_free_txskb(hw, skb, status); - list_add_tail(&skb->list, txstat->free_list); + if (skb != NULL) + list_add_tail(&skb->list, txstat->free_list); } else { linuxkpi_ieee80211_free_txskb(hw, skb, status); } From nobody Fri Feb 27 02:29:46 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNC3LZjz6T7lS for ; Fri, 27 Feb 2026 02:29:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNB47mwz41JD for ; Fri, 27 Feb 2026 02:29:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1BumuuwSTixL0nt+qJtEiTvYNRtyaMg6invukKt6Eso=; b=RJZ1EWP9se30K9wOGavllh/YRw5jzVF2ZY0YzgNcxwp5Pwt9SO6N+92dx08tu+1l3XBeav RDu2d7zzhxnukL4pkqhs/K+2Jo0zsSNJ1YpdM2Xz0b0m05JanQvFyKy+Oj7yuRk5UUPkQc jV3jiRbbz3iVZsyTwZ/5inkbdrQdn5T5AdSZaxlBvkYw2Wa+yMi1rbRPMW5eaFCIXrRh/d aJ+tARuvG54MSPqABlvk/73fqW5tDkV/9RXOjpwGK/BbuH3nLsBtIOTxriUeM4W2iMTx38 /FY5uTgcMW0Jk71nZTzNAkflQIfsx3/atYZUAc/5Bmf1+SRpSySawiNNBDc0gA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159386; a=rsa-sha256; cv=none; b=Osy3zRvonKjgebVPBUPy1Hm/zMUKJYP/JpxCUPw8K5H70fndUCmb+8dnb0zvcoPyTvNDdd a0f0nIJDZWw9f2IokxaFJVpyMU183vLs37IQ+Xle0OICTL7l3fY+0bp+eeeWmETkSHOAdS 9xoDh0HQGlwjk2Pp7xyixikLo3m9SS3iwRe+8IJfoPBiw8zf9LheZoBUAWhTAAUrov4Yw3 79JITF5u56pMY63byhPcL6Un9RTXr44Q1CMhTBAAgEyHY9by8HqH8zgmxL8sHwsfUqoAa/ ifALmHUdzsmT8saCimcBSlWPa5X8cOC9J1nRHDOAsQXg/MbYa4WzadG09SvxFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1BumuuwSTixL0nt+qJtEiTvYNRtyaMg6invukKt6Eso=; b=Fyv3+EIuG7UPpen4sM01A4V8I6ijLnzLmL+WyeL1rrQ2nCa9inYu2cgPMl7kEgtkSVoTep OFrUnPyo+aBTdjntoFRu440gJL5or8hkuYRD1OhDUh00hn0RBi3qcAluWPGMpoFL7vTu0x NimmKhsOX7sXMb8BBZh1jSmovQ+sOUJavY0qLfySu82V25/G1YioQj8HZxpmKN4FrTFTZQ W6tj+Ly1GZ+UehAerPvJBSGtSBH/ThSa+51uefoUvodt0CZg3Kz+u4atn5Fpg6BWbo71bE iLpxaZCTmmHKcaNcdP8bAgONTaIBLd8Miq5zqlLH9eBgxdQE34UGiTGt4ElViA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNB3gKhzyX5 for ; Fri, 27 Feb 2026 02:29:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1ece4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: 9c0f88c33ce0 - stable/15 - LinuxKPI: expand dma_sync_single_for_cpu() in lkpi_dma_unmap() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 9c0f88c33ce02d8b842e7e75ba7b0beb7edebcbc Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:46 +0000 Message-Id: <69a1019a.1ece4.7564fa9@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=9c0f88c33ce02d8b842e7e75ba7b0beb7edebcbc commit 9c0f88c33ce02d8b842e7e75ba7b0beb7edebcbc Author: Bjoern A. Zeeb AuthorDate: 2026-01-23 19:14:18 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:02:27 +0000 LinuxKPI: expand dma_sync_single_for_cpu() in lkpi_dma_unmap() In case lkpi_dma_unmap() would call dma_sync_single_for_cpu() we get into a lock recursion which will trigger a panic with debug kernels. It would be hard to provide an internal "locked" version for dma_sync_single_for_cpu(). In the old days this would not have been a problem but (long before we added the missing sync calls) some locks got folded into one in a6619e8d9c1a3. Sponsored by: The FreeBSD Foundation Observed with: iwlwifi mld Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D54841 (cherry picked from commit b615b4805a9ce83b9b86dd66d46a9f220f9f89c6) --- sys/compat/linuxkpi/common/src/linux_pci.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index cf8a6ffeb46c..c8d1989f669b 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -1720,9 +1720,26 @@ lkpi_dma_unmap(struct device *dev, dma_addr_t dma_addr, size_t len, } LINUX_DMA_PCTRIE_REMOVE(&priv->ptree, dma_addr); - if ((attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0) - dma_sync_single_for_cpu(dev, dma_addr, len, direction); + if ((attrs & DMA_ATTR_SKIP_CPU_SYNC) != 0) + goto skip_sync; + /* dma_sync_single_for_cpu() unrolled to avoid lock recursicn. */ + switch (direction) { + case DMA_BIDIRECTIONAL: + bus_dmamap_sync(obj->dmat, obj->dmamap, BUS_DMASYNC_POSTREAD); + bus_dmamap_sync(obj->dmat, obj->dmamap, BUS_DMASYNC_PREREAD); + break; + case DMA_TO_DEVICE: + bus_dmamap_sync(obj->dmat, obj->dmamap, BUS_DMASYNC_POSTWRITE); + break; + case DMA_FROM_DEVICE: + bus_dmamap_sync(obj->dmat, obj->dmamap, BUS_DMASYNC_POSTREAD); + break; + default: + break; + } + +skip_sync: bus_dmamap_unload(obj->dmat, obj->dmamap); bus_dmamap_destroy(obj->dmat, obj->dmamap); DMA_PRIV_UNLOCK(priv); From nobody Fri Feb 27 02:29:45 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNB2dpzz6T7Zr for ; Fri, 27 Feb 2026 02:29:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXN93jxjz41Fm for ; Fri, 27 Feb 2026 02:29:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zwaG3aQBPxv/CnTcm+UYaybmo3Obyr824MB7nCOCsIs=; b=wv8t8I9c5WizXYdpjeGbYUmp1YrTrwbCHrzDtaBQ/dvAqOXt5FeY2DxMnnbd7Q72DmnFUE n6wF7YYc1Yvu2o0RmDVWv/UgoDOh91SbkImJsyhZQPKUpljC3GsZ7SX7rpKsi4EMytcXe9 XpyvMdiZ/W1XtVsEC4pDeEGIJV1EQjKBREwMhpOifvbGRT+rukmF0d/3prM1kmpCkdzxaC iljqOU5mjuLRD6gjg1fCeOiHU0Si2HX1fNNxHzMozhy+YbdKNR6mXQ9X2D8k4BXE8NGiNo jr1mDBBuVEkzuyIcWWFZH0ZE8kQUOPgINHCgxb6NFw5x8AZjNS8IyknRub8jSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159385; a=rsa-sha256; cv=none; b=e1kVKxJRMSkF3eSgABJsTHvwdaZ9iTJ6kkVZ3jXrdpkgq1QZZlW5J5MQncOwOdNDAW3DnN 55ATE6ylMuZqFtcJAopzVKvxwmIjPTNN8cJ7Qh4NK7D/HuJvv2vbjWRQaqBOVThg0Arwo7 y4CEQh9zoNeH61qpyJnvVnA6EfO/0+oO1PZAOMhFZHF3mPUOjN5bl/RdIRm5Cpvxwh6Gq5 EZ76uZdbM82LqPCo4y9wN9891nxcxpAmjCs1y8YG6GYzbYWgbr2+BNqJY8wy2MTbpzjjHi 7CWx4Dxb74naMz/o6aEcpV1Dmn8KbsmXFFcgq8yVNO9oRNkHRrCoP/p0jFLw8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zwaG3aQBPxv/CnTcm+UYaybmo3Obyr824MB7nCOCsIs=; b=nOOc0PoUlgS1oQUNlsdrQEyFR5Z7kn2SmgXhsxWHmYLaqGWWIZKghqKg+OK35ntqwtT+Y+ mbgI8PEw0nfh8PTK97zwIzZLQbb9BEEMD8TLgXICQrm3pBhp++MwKjYvSU728mzlWUiUMI FA8e8vLrbzC//DlqPS2ErWTKk8zYPMTmNQ21zyGGO8A/WNHDSYqE5f/ADL2KP9K4kvB98B cGgoMI2RT12lL+Rz1C94BXQB5tq28Opikl10XEDaiCjyJkeFoNXdIsbxNiGOF+HKBHT2mM +YngYLgu0LlasFltRjl8cJ7aefyWcWB16yqBmRHbCM+TXt3msBQ98L+wVkoJRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXN93GNmzyX4 for ; Fri, 27 Feb 2026 02:29:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 215ca by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: f7d063c451bf - stable/15 - net80211: in net80211_vap_printf() also use vprintf() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f7d063c451bf7fd3b8d6de2296380b471845db09 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:45 +0000 Message-Id: <69a10199.215ca.625a35d0@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f7d063c451bf7fd3b8d6de2296380b471845db09 commit f7d063c451bf7fd3b8d6de2296380b471845db09 Author: Bjoern A. Zeeb AuthorDate: 2026-01-20 13:43:51 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:02:07 +0000 net80211: in net80211_vap_printf() also use vprintf() While everything else uses vprintf() and net80211_vap_printf() vlog() the debug output of wlandebug sessions can be weird. For consistency use vprintf() everywhere to have homogeneous logging. Sponosred by: The FreeBSD Foundation Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D54795 (cherry picked from commit 840f478eed2ab18abd1088aa12587bb708a46b56) --- sys/net80211/ieee80211_freebsd.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/net80211/ieee80211_freebsd.c b/sys/net80211/ieee80211_freebsd.c index e01d0bf20f5e..d324d3769bfd 100644 --- a/sys/net80211/ieee80211_freebsd.c +++ b/sys/net80211/ieee80211_freebsd.c @@ -1352,7 +1352,7 @@ net80211_vap_printf(const struct ieee80211vap *vap, const char *fmt, ...) va_start(ap, fmt); snprintf(if_fmt, sizeof(if_fmt), "%s: %s", if_name(vap->iv_ifp), fmt); - vlog(LOG_INFO, if_fmt, ap); + vprintf(if_fmt, ap); va_end(ap); } @@ -1362,14 +1362,12 @@ net80211_vap_printf(const struct ieee80211vap *vap, const char *fmt, ...) void net80211_ic_printf(const struct ieee80211com *ic, const char *fmt, ...) { + char if_fmt[256]; va_list ap; - /* - * TODO: do the vap_printf stuff above, use vlog(LOG_INFO, ...) - */ - printf("%s: ", ic->ic_name); + snprintf(if_fmt, sizeof(if_fmt), "%s: %s", ic->ic_name, fmt); va_start(ap, fmt); - vprintf(fmt, ap); + vprintf(if_fmt, ap); va_end(ap); } From nobody Fri Feb 27 02:29:47 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNC5vfGz6T7Zw for ; Fri, 27 Feb 2026 02:29:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNC4RTLz41JT for ; Fri, 27 Feb 2026 02:29:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4jrMpghhSErTk+tXv8ddoznwpooCwotgDgPPWa1vbYI=; b=YaxuhUvEDwf2xQiYoMdIvcDf78gdyU0accTGDmJZuXG9ONm0Q/E8zSINHEsx7qbBx+EscA Ql/bneuitCk4R7fxhClqjQ9Ln1gdpmfHSapvDofn5bc0yIqIaD17KRQZ5qx9IpVsKFjUvl tOdmCxXAiKBDsXthL8qWbQlfuk1+MUl6tkYPweDJUTlV8oMKs7M0NfkbO0MOzioJVecsbn ah2kXPq3pO2wTcGKeUBB/lCg4JvOed5G64FC8wPB4sTZD8rJdF8PAGRmpv57vstfX4sK2B zxd0bWhEXESdcXdkFwsNw1/hif57QgL7mQ0PzPqZzUN3vq0no+OGJKtTyWZS3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159387; a=rsa-sha256; cv=none; b=fb3qSOlRe/mt90jmYnXnBYju+eBIWL3C3idrIFha/vJlASbZJyuvc76WcQQmMd3oEhdxyr yfovj7MRYGjiRXd3Qb/8u162fBbOZOi0FP7Yu0OhZV51FmKVtW/c/5bRou1uitvn4VV2pW flphAmPRKCD8VypgTbxvAY6OOP4mquHRcXNLxQqjy4pTerkxjmDfF9hsbqLz6ZvKnRHuN7 Sf1P45eywZM9shi+GLBJycS6LeRl5K8GBWUIRd0WUzHd11ZqQl9k4qffPv2f/MIalfLWru /1KzwwSzaUeRi1Q9IEn+m3+I4l2GbndtnnIDJuzo8oAEWA+R2XIb/Rvcp4mRxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4jrMpghhSErTk+tXv8ddoznwpooCwotgDgPPWa1vbYI=; b=rn14WVfTDzO4IpWl5GNCm7eikQDUcfHECcwV9JjM621sufYfmFFb6FehZ6YYQdX+amy4BF AHdhwVpzZJhDmILYHpFcD7Xu/X2qIjOtJMEXrLxieeM95R2f2D3Qvuy//L8k37oBMHt41u yqkZPqFWOS/XCngAiUtPfWIDqYuXCMuEtWYl4LXhD0GFrR/hL+Tye9Vbf0sVhxEeXWab+v uE6Xs/13lyMX4+DyEnNC756IREBoj6YoYJCRF4pCQlsb378hYFA2BKt66i3Zmx/RK0lNfz JDEMYsndKD4K+FNp6PK0G65liao6rE3as11J8dyNa6XD+9Tu9AlweUQ2WfEkrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNC42QBzyHv for ; Fri, 27 Feb 2026 02:29:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21a1f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: f8713b7f8dda - stable/15 - LinuxKPI: pci: make sure a tailq and lock are initialized List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f8713b7f8dda735e65c3a14a4634f9cc0427ae66 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:47 +0000 Message-Id: <69a1019b.21a1f.12a39a59@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f8713b7f8dda735e65c3a14a4634f9cc0427ae66 commit f8713b7f8dda735e65c3a14a4634f9cc0427ae66 Author: Bjoern A. Zeeb AuthorDate: 2026-01-24 22:16:36 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:02:39 +0000 LinuxKPI: pci: make sure a tailq and lock are initialized Move the initializations of the tailq and lock from linux_pci_attach_device() into lkpifill_pci_dev() so that they are initialized in all cases we create a device (see all the possible callers of lkpifill_pci_dev()). Sponsored by: The FreeBSD Foundation Reviewed by: emaste, dumbbell Differential Revision: https://reviews.freebsd.org/D54861 (cherry picked from commit 1f19fc2632c98cfe653a082b5fcb02d16053ed06) --- sys/compat/linuxkpi/common/src/linux_pci.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index c8d1989f669b..c4f0564c7e35 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -385,14 +385,16 @@ lkpifill_pci_dev(device_t dev, struct pci_dev *pdev) pdev->dev.bsddev = dev; pdev->dev.parent = &linux_root_device; pdev->dev.release = lkpi_pci_dev_release; - INIT_LIST_HEAD(&pdev->dev.irqents); if (pci_msi_count(dev) > 0) pdev->msi_desc = malloc(pci_msi_count(dev) * sizeof(*pdev->msi_desc), M_DEVBUF, M_WAITOK | M_ZERO); + TAILQ_INIT(&pdev->mmio); + spin_lock_init(&pdev->pcie_cap_lock); spin_lock_init(&pdev->dev.devres_lock); INIT_LIST_HEAD(&pdev->dev.devres_head); + INIT_LIST_HEAD(&pdev->dev.irqents); return (0); } @@ -613,9 +615,6 @@ linux_pci_attach_device(device_t dev, struct pci_driver *pdrv, if (error) goto out_dma_init; - TAILQ_INIT(&pdev->mmio); - spin_lock_init(&pdev->pcie_cap_lock); - spin_lock(&pci_lock); list_add(&pdev->links, &pci_devices); spin_unlock(&pci_lock); From nobody Fri Feb 27 02:29:48 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNF0fSCz6T7nc for ; Fri, 27 Feb 2026 02:29:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXND5JXRz417L for ; Fri, 27 Feb 2026 02:29:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e+D1jRdmNWyucFSmLEil4kwVb6sO56E8mOnCgydRB9w=; b=ADsZAhc1nCuEyul/3qW1GRVSiOu2RHhJp1s9mKAPip7WO8BChSadSs2iqlX7eHSSbkxhbz o7Q9qhT4ee0g5mFKhndHyWzHz7/hleH8FBlYrqExC917bMhyA9kibVhvm6SCoKsyP5Xmul KbiShKjvWSCv00LBV/Bc1T7/alpmiphTeoxVS+oGWtEPVte09P7fXvvA6kO5BGMNomIvvT PIrLsRb5cwv26LmjZc8/EB1jdWspjR6xjuaCbIf99m6HH6F3kMHOjKma39cVzS8XSztuAt qdX1/9UUtCP4/G0P+Gj4atq5FO3Yc9y+YWRbT7yoR/BCtzZ77SNf8oJdswNAcw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159388; a=rsa-sha256; cv=none; b=RE6mpxmzaH/c0iMA+Y4vjv1x2Jyhk20AsnMXYEed0vSnEX6FCw+hQXpp7jSnT9WoQuJ7Z3 QebKJI+3Kts/zfR0L8vtsi+wBDh9Lv0shBAHPvTYnkn9UUsgQG4Ueu/yUiKJbOO2QWZvGx /LdGzvd6vVgqXMX1JVkRqpbxSWqxMe7u2gRve7mv5QDrb0siPzIRn70Ht9c8FLpIV/l6nx o8lW2+C47KVaOC6LHhPEXlpWB3lD+Wz994yphffLd9TrOKSWFjIvzrLgNBo0dmyp1hrDvy 5e23G+5tSDEy94xGCXwiAR/gyvsA5+Zkc3TetDsMhRgQ+82lL9fYpKGsd6Hbcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159388; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e+D1jRdmNWyucFSmLEil4kwVb6sO56E8mOnCgydRB9w=; b=hMsWgKVIictIzv+UF/6uXT6qxUmMGE1i6FP+pnQf1ln/Sw7Fib9p2zVuEKAYL5b8er+7/V 96a7Y1/V2NnAl0GeKcl8L+6bv2Oxf106vAM4Zs2RQ5BSjYMT0TWn/oHLSYYhutiCBHybh5 45gSFPe3iWWfdTb89HKzl5pPurvoHtWvYIJkkiwmmHxjgG3ZTjw1V7/WcciA0DoCOxCDMD X+AsHQcqPS9qEY4ksfsMeSTa88gxUywxmBPK84vumSBH4TKxKeQE/AXEK3sleHabfjiykI HOB3QwCsB9TPtoaxhUdC4w8kPWcTk0pHTb6I9/qM2GiMIhmWxeUwnKCB2ySKDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXND4qdFzyHw for ; Fri, 27 Feb 2026 02:29:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 219b9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: 7949253aeb32 - stable/15 - LinuxKPI: move MODULE_DEVICE_TABLE from pci.h to module.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7949253aeb324560dc0a0d5b574e305aad8ec79f Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:48 +0000 Message-Id: <69a1019c.219b9.4043f5aa@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7949253aeb324560dc0a0d5b574e305aad8ec79f commit 7949253aeb324560dc0a0d5b574e305aad8ec79f Author: Bjoern A. Zeeb AuthorDate: 2026-01-26 20:31:24 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:02:50 +0000 LinuxKPI: move MODULE_DEVICE_TABLE from pci.h to module.h Move the MODULE_DEVICE_TABLE macro to module.h where it belongs in preparation for different bus (e.g., USB, SDIO) support. The various struct _device_id, if not elsewhere, should be defined in mod_devicetable.h. This is the next step after 2f5666c1727c. No functional changes. Sponsored by: The FreeBSD Foundation Reviewed by: emaste, dumbbell Differential Revision: https://reviews.freebsd.org/D54900 (cherry picked from commit 1f4fbcf342f41fecc8dff4e0d9a1f9bdb1cdf784) --- sys/compat/linuxkpi/common/include/linux/module.h | 18 ++++++++++++++++++ sys/compat/linuxkpi/common/include/linux/pci.h | 18 ------------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/module.h b/sys/compat/linuxkpi/common/include/linux/module.h index 079dacf8df6c..fbe57cbbed82 100644 --- a/sys/compat/linuxkpi/common/include/linux/module.h +++ b/sys/compat/linuxkpi/common/include/linux/module.h @@ -53,6 +53,24 @@ #define MODULE_SUPPORTED_DEVICE(name) #define MODULE_IMPORT_NS(_name) +/* Linux has an empty element at the end of the ID table -> nitems() - 1. */ +#define MODULE_DEVICE_TABLE(_bus, _table) \ + \ +static device_method_t _ ## _bus ## _ ## _table ## _methods[] = { \ + DEVMETHOD_END \ +}; \ + \ +static driver_t _ ## _bus ## _ ## _table ## _driver = { \ + "lkpi_" #_bus #_table, \ + _ ## _bus ## _ ## _table ## _methods, \ + 0 \ +}; \ + \ +DRIVER_MODULE(lkpi_ ## _table, _bus, _ ## _bus ## _ ## _table ## _driver,\ + 0, 0); \ + \ +MODULE_DEVICE_TABLE_BUS_ ## _bus(_bus, _table) + /* * THIS_MODULE is used to differentiate modules on Linux. We currently * completely stub out any Linux struct module usage, but THIS_MODULE is still diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index cda1cf7dfb5e..9b7699a5ca59 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -76,24 +76,6 @@ struct pci_device_id { MODULE_PNP_INFO("U32:vendor;U32:device;V32:subvendor;V32:subdevice", \ _bus, lkpi_ ## _table, _table, nitems(_table) - 1) -/* Linux has an empty element at the end of the ID table -> nitems() - 1. */ -#define MODULE_DEVICE_TABLE(_bus, _table) \ - \ -static device_method_t _ ## _bus ## _ ## _table ## _methods[] = { \ - DEVMETHOD_END \ -}; \ - \ -static driver_t _ ## _bus ## _ ## _table ## _driver = { \ - "lkpi_" #_bus #_table, \ - _ ## _bus ## _ ## _table ## _methods, \ - 0 \ -}; \ - \ -DRIVER_MODULE(lkpi_ ## _table, _bus, _ ## _bus ## _ ## _table ## _driver,\ - 0, 0); \ - \ -MODULE_DEVICE_TABLE_BUS_ ## _bus(_bus, _table) - #define PCI_ANY_ID -1U #define PCI_DEVFN(slot, func) ((((slot) & 0x1f) << 3) | ((func) & 0x07)) From nobody Fri Feb 27 02:29:49 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNG3nQDz6T7nd for ; Fri, 27 Feb 2026 02:29:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNF6GYfz4131 for ; Fri, 27 Feb 2026 02:29:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dU/LOCbX/NIIxLT8ozqGLFouXirKMRIMeB/1HbtDyEM=; b=eMfLIQJarkow2DEiBtmndIGEBFOC+qaO/CkMTF2jgG0fHigbUeSrfPk18zsPNkeBI7Ecvi tSqfVcxIJf8dMh4rl7j2Kq7hetyOBpuYrIwTD9Zbabso+i5PYHO83oJFGI+pUd1zAiuV9G 3P4H9ZJ34SvFeR4XsvH5WAerihyR7qme5FxZxy9aaq+CYUn9JdPL6gAaiYfJRtxjq6mHRj c6L5pau3UXWiCufPKQGLZ2HhFLjdXbwqW6+bxl6B41gklg/vGS9sPAxdrr4ckLL2ZJDg5I Fj8Ll/XO3hF6Yni0fVmZIWuHxHkW85tn16qmshz8ouiyeh3makDhIHDa/rgh7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159389; a=rsa-sha256; cv=none; b=TVn6NOPPLWqCUZ2ruAC8HM+kFqW1/0GSxQwZRHbQPX/E0lhl9c+6Y+vxdKGC5wXETBOoHU 54/UqzYdiIhO5THDpD8oi7+dnC8OPuJ0cqXiwL+nd2rusFvytEkz95/9xTpZy2Mh+Y97GG AlmpwpmJX+6eAL5hjJ3EVryWLEj+xL4ubAVUMKtzRYwc08Bk54cqtaa49Wu890mLSZVFs9 f5IcAEOJhJIBx1VNDQj6jI7fI+5jpv2QCUH1jEnFse/1rSHRcvHp0i7/4sGr2aDphWIn5Z nZpK0UAyfHyKh9aMOHFIWz5oAw9NZh7PHuMbh2l7+WQs8huxdviUJrahy39eEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dU/LOCbX/NIIxLT8ozqGLFouXirKMRIMeB/1HbtDyEM=; b=HZ4cuFWm1zgxnTnAPWrBXYiz9w7zX6cKQrcxzfwe28MdIyHVJ1rqozpPisXWAIznLRmGD2 jkbCxnij9FNTJDfNIU+ImYzFup/nVzZuKxF7YJPQFRocQ1cwTgGLsgBDxc4JHVP+K8elZA maQE5tTpdMEEg5QuT4loIyyrkFSlO+LjGmd1tJX1+DUavcfn37w8flIjFqduG9vwnGzMxb IMUAC+xBMQ5TeQXwSQ5FKiVIwsXcM0XhPWK8TIh2qrOQ/IwHqhZp4oIwFndZEgrhsk5zNB ua6+KyH3w/YLinnUzxDJMOgNnp+ZEiOrgtgL7kM2YnY49WhEtLcfBT9Qp7BTMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNF5fCbzyVC for ; Fri, 27 Feb 2026 02:29:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 212a3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: 67a064decf92 - stable/15 - LinuxKPI: mod_devicetable, add comment about [future] LinuxKPI USB List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 67a064decf92f5c729856e535a6d51f41023a462 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:49 +0000 Message-Id: <69a1019d.212a3.1ba744df@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=67a064decf92f5c729856e535a6d51f41023a462 commit 67a064decf92f5c729856e535a6d51f41023a462 Author: Bjoern A. Zeeb AuthorDate: 2026-01-26 21:00:24 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:03:38 +0000 LinuxKPI: mod_devicetable, add comment about [future] LinuxKPI USB USB structures are defined with the native USB implementation. Just leave a comment why they are not here. Sponsored by: The FreeBSD Foundation Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D54991 (cherry picked from commit 020ff5e29431f5b55f2e3876c0e4828205e17cd5) --- sys/compat/linuxkpi/common/include/linux/mod_devicetable.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/mod_devicetable.h b/sys/compat/linuxkpi/common/include/linux/mod_devicetable.h index 87bd6ec24bce..df7c2472861b 100644 --- a/sys/compat/linuxkpi/common/include/linux/mod_devicetable.h +++ b/sys/compat/linuxkpi/common/include/linux/mod_devicetable.h @@ -80,4 +80,10 @@ struct dmi_system_id { #define ACPI_ID_LEN 16 +/* ----------------------------------------------------------------------------- + * USB + */ +/* struct usb_device_id is defined in sys/dev/usb/usbdi.h. */ +/* MODULE_DEVICE_TABLE_BUS_usb we have in usb.h. */ + #endif /* __LINUXKPI_LINUX_MOD_DEVICETABLE_H__ */ From nobody Fri Feb 27 02:29:50 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNH34s8z6T7nh for ; Fri, 27 Feb 2026 02:29:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNG6z7Hz41Jv for ; Fri, 27 Feb 2026 02:29:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3FCgokKS5wLqnsQZYKT7IqLWFiQOHIwBfTI0MnFOlQs=; b=FzEHXxCF9glUSjW+o4M9BRi9M8zEyYNHrAbMqJ6ecYanu5UgRZSax4YxIMioh9moUfvlcf KufF6cPIwLcConhEoBaYTdxM4441So9eUiGWfZiNBAkBWGJPjwpTegH7eGUlHdc7YeGKYa Ig+hSj1RzHQkg+g8LHvpparGRL2RSJ97MWHfzN7P7iu0bOj8aaq7EnH59QyFMAMTnyhcKK JFOT1IqV1I140utiZZZ7kSLQkBROblPC9V+1cmzw5oPISTAp64PJSI5UX/3+D/WRL5W+UM J60BoZhmkGfFSO3EI+Tv/dgY4z2klqUFmlUpMaUMsYfmxYVydRVFi/4cOPbrgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159391; a=rsa-sha256; cv=none; b=SHplJ496IeamhIMlQA4iQDynA0taIFq1OtpogkM9tV1Db8zEhp2exIPHdKmiRM62NsEyZI DFOHb1Q5VmbNXuKYZ5056xQdnXrbNce+NA0KxxLFlwtaqfRRnN/YXKM45DNjM4m06e2OZw MTes9/NxQ5CLW4y4Uz3mviJXwdXo7bxTd8Db80N9NfOyuOWDAwb59TEd7zaJ/YGjA9aZ86 BxY8ZUnk/0s+XiH1oQmG9klO6+sd7y56U3knCxkxjqR0EZPeb6K0aN6VZHH2EJZfYwY3oA E7lAoqZByYj2Ccv1Db+niF1Lcg4fhwuXuhjJ9GXmBeC5SY+MxV5Dmq7eMxVVJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3FCgokKS5wLqnsQZYKT7IqLWFiQOHIwBfTI0MnFOlQs=; b=CBbVAOp0tW+alyx9vE7Ru4NRYbp/SEpwRJXfnJJX7goaSkmAHQsXngnXJptSDGGi25yNrf xOi4SnVo4hOC7I4bSwmWlXl8e7rH+G2D/1i8GGTiBBqAVTssZHyq5RBfK49m24CAUCQUsN A20paYcHqaJXxsmDUY5ba/Wi8EK/xLsd9uU/1AgtoPfzss43GkkX7Z2eCtIzcxVOWj2As5 BEPe2v6nj/FQ4EwYpvwWx/4KlVU26dUKsSyJ6mCqrIxazhbJsG8UdeC3nv1H+2ESeeDSZX DxnkJPrBv5fd3Sx4NzstdU1IyIWI1usx8HOQd4dpmZrJD72yZWDCbl7xbbPXqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNG6R67zy70 for ; Fri, 27 Feb 2026 02:29:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21ad0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: aa54113d8e1b - stable/15 - LinuxKPI: add scoped_guard(), spinlock guard support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: aa54113d8e1bfc0442017cff97fcbc1b8c9f5c54 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:50 +0000 Message-Id: <69a1019e.21ad0.8bf1eca@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=aa54113d8e1bfc0442017cff97fcbc1b8c9f5c54 commit aa54113d8e1bfc0442017cff97fcbc1b8c9f5c54 Author: Bjoern A. Zeeb AuthorDate: 2026-01-20 22:54:30 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:05:09 +0000 LinuxKPI: add scoped_guard(), spinlock guard support The "cleanup.h" implementation got a bit more complicated. For one we now use a macro to concatenate a prefix, the name, and a suffix for variable and function declarations. This was triggered by the fact that the "guard_" prefix we used was confusing. We now use a generic "cleanup_" which is only encoded in the single place rather than all over the file. As already indicated by the comment the DEFINE_LOCK_GUARD_0() macro got split up and a _1 version which also takes a type got implemented and is used for a spinlock variant used by rtw89(4) via the new scoped_guard() bits. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54808 (cherry picked from commit 31393810a168b74cf13ace0e1d35dae6b4a12bf5) --- sys/compat/linuxkpi/common/include/linux/cleanup.h | 127 ++++++++++++++++----- .../linuxkpi/common/include/linux/spinlock.h | 10 ++ 2 files changed, 109 insertions(+), 28 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/cleanup.h b/sys/compat/linuxkpi/common/include/linux/cleanup.h index 5bb146f082ed..fb21a81f121b 100644 --- a/sys/compat/linuxkpi/common/include/linux/cleanup.h +++ b/sys/compat/linuxkpi/common/include/linux/cleanup.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2024-2025 The FreeBSD Foundation + * Copyright (c) 2024-2026 The FreeBSD Foundation * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -10,18 +10,26 @@ #ifndef _LINUXKPI_LINUX_CLEANUP_H #define _LINUXKPI_LINUX_CLEANUP_H +#include + +#define CLEANUP_NAME(_n, _s) __CONCAT(__CONCAT(cleanup_, _n), _s) + #define __cleanup(_f) __attribute__((__cleanup__(_f))) +#define DECLARE(_n, _x) \ + CLEANUP_NAME(_n, _t) _x __cleanup(CLEANUP_NAME(_n, _destroy)) = \ + CLEANUP_NAME(_n, _create) + /* * Note: "_T" are special as they are exposed into common code for * statements. Extra care should be taken when changing the code. */ #define DEFINE_GUARD(_n, _dt, _lock, _unlock) \ \ - typedef _dt guard_ ## _n ## _t; \ + typedef _dt CLEANUP_NAME(_n, _t); \ \ static inline _dt \ - guard_ ## _n ## _create( _dt _T) \ + CLEANUP_NAME(_n, _create)( _dt _T) \ { \ _dt c; \ \ @@ -30,7 +38,7 @@ } \ \ static inline void \ - guard_ ## _n ## _destroy(_dt *t) \ + CLEANUP_NAME(_n, _destroy)(_dt *t) \ { \ _dt _T; \ \ @@ -39,9 +47,10 @@ } /* We need to keep these calls unique. */ +#define _guard(_n, _x) \ + DECLARE(_n, _x) #define guard(_n) \ - guard_ ## _n ## _t guard_ ## _n ## _ ## __COUNTER__ \ - __cleanup(guard_ ## _n ## _destroy) = guard_ ## _n ## _create + _guard(_n, guard_ ## _n ## _ ## __COUNTER__) #define DEFINE_FREE(_n, _t, _f) \ static inline void \ @@ -56,38 +65,100 @@ #define __free(_n) __cleanup(__free_##_n) /* - * Given this is a _0 version it should likely be broken up into parts. - * But we have no idead what a _1, _2, ... version would do different - * until we see a call. - * This is used for a not-real-type (rcu). We use a bool to "simulate" - * the lock held. Also _T still special, may not always be used, so tag - * with __unused (or better the LinuxKPI __maybe_unused). + * Our initial version go broken up. Some simplifications like using + * "bool" for the lock had to be changed to a more general type. + * _T is still special and, like other bits, may not always be used, + * so tag with __unused (or better the LinuxKPI __maybe_unused). */ -#define DEFINE_LOCK_GUARD_0(_n, _lock, _unlock, ...) \ +#define _DEFINE_LOCK_GUARD_0(_n, _lock) \ + static inline CLEANUP_NAME(_n, _t) \ + CLEANUP_NAME(_n, _create)(void) \ + { \ + CLEANUP_NAME(_n, _t) _tmp; \ + CLEANUP_NAME(_n, _t) *_T __maybe_unused; \ + \ + _tmp.lock = (void *)1; \ + _T = &_tmp; \ + _lock; \ + return (_tmp); \ + } + +#define _DEFINE_LOCK_GUARD_1(_n, _type, _lock) \ + static inline CLEANUP_NAME(_n, _t) \ + CLEANUP_NAME(_n, _create)(_type *l) \ + { \ + CLEANUP_NAME(_n, _t) _tmp; \ + CLEANUP_NAME(_n, _t) *_T __maybe_unused; \ \ + _tmp.lock = l; \ + _T = &_tmp; \ + _lock; \ + return (_tmp); \ + } + +#define _GUARD_IS_ERR(_v) \ + ({ \ + uintptr_t x = (uintptr_t)(void *)(_v); \ + IS_ERR_VALUE(x); \ + }) + +#define __is_cond_ptr(_n) \ + CLEANUP_NAME(_n, _is_cond) +#define __guard_ptr(_n) \ + CLEANUP_NAME(_n, _ptr) + +#define _DEFINE_CLEANUP_IS_CONDITIONAL(_n, _b) \ + static const bool CLEANUP_NAME(_n, _is_cond) __maybe_unused = _b + +#define _DEFINE_GUARD_LOCK_PTR(_n, _lp) \ + static inline void * \ + CLEANUP_NAME(_n, _lock_ptr)(CLEANUP_NAME(_n, _t) *_T) \ + { \ + void *_p; \ + \ + _p = (void *)(uintptr_t)*(_lp); \ + if (IS_ERR(_p)) \ + _p = NULL; \ + return (_p); \ + } + +#define _DEFINE_UNLOCK_GUARD(_n, _type, _unlock, ...) \ typedef struct { \ - bool lock; \ + _type *lock; \ __VA_ARGS__; \ - } guard_ ## _n ## _t; \ + } CLEANUP_NAME(_n, _t); \ \ static inline void \ - guard_ ## _n ## _destroy(guard_ ## _n ## _t *_T) \ + CLEANUP_NAME(_n, _destroy)(CLEANUP_NAME(_n, _t) *_T) \ { \ - if (_T->lock) { \ + if (!_GUARD_IS_ERR(_T->lock)) { \ _unlock; \ } \ } \ \ - static inline guard_ ## _n ## _t \ - guard_ ## _n ## _create(void) \ - { \ - guard_ ## _n ## _t _tmp; \ - guard_ ## _n ## _t *_T __maybe_unused; \ - \ - _tmp.lock = true; \ - _T = &_tmp; \ - _lock; \ - return (_tmp); \ - } + _DEFINE_GUARD_LOCK_PTR(_n, &_T->lock) + +#define DEFINE_LOCK_GUARD_0(_n, _lock, _unlock, ...) \ + _DEFINE_CLEANUP_IS_CONDITIONAL(_n, false); \ + _DEFINE_UNLOCK_GUARD(_n, void, _unlock, __VA_ARGS__) \ + _DEFINE_LOCK_GUARD_0(_n, _lock) + +/* This allows the type to be set. */ +#define DEFINE_LOCK_GUARD_1(_n, _t, _lock, _unlock, ...) \ + _DEFINE_CLEANUP_IS_CONDITIONAL(_n, false); \ + _DEFINE_UNLOCK_GUARD(_n, _t, _unlock, __VA_ARGS__) \ + _DEFINE_LOCK_GUARD_1(_n, _t, _lock) + +#define _scoped_guard(_n, _l, ...) \ + for (DECLARE(_n, _scoped)(__VA_ARGS__); \ + 1 /*__guard_ptr(_n)(&_scoped) || !__is_cond_ptr(_n) */; \ + ({ goto _l; })) \ + if (0) { \ +_l: \ + break; \ + } else + +#define scoped_guard(_n, ...) \ + _scoped_guard(_n, ___label_ ## __COUNTER__, ##__VA_ARGS__) #endif /* _LINUXKPI_LINUX_CLEANUP_H */ diff --git a/sys/compat/linuxkpi/common/include/linux/spinlock.h b/sys/compat/linuxkpi/common/include/linux/spinlock.h index dc10b0457153..a08edcf8f417 100644 --- a/sys/compat/linuxkpi/common/include/linux/spinlock.h +++ b/sys/compat/linuxkpi/common/include/linux/spinlock.h @@ -36,6 +36,7 @@ #include #include +#include #include #include #include @@ -178,4 +179,13 @@ _atomic_dec_and_lock_irqsave(atomic_t *cnt, spinlock_t *lock, return (0); } +/* + * cleanup.h related pre-defined cases. + */ +DEFINE_LOCK_GUARD_1(spinlock_irqsave, + spinlock_t, + spin_lock_irqsave(_T->lock, _T->flags), + spin_unlock_irqrestore(_T->lock, _T->flags), + unsigned long flags) + #endif /* _LINUXKPI_LINUX_SPINLOCK_H_ */ From nobody Fri Feb 27 02:29:52 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNJ2485z6T7lc for ; Fri, 27 Feb 2026 02: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNJ0bnFz41B8 for ; Fri, 27 Feb 2026 02:29:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159392; h=from:from:reply-to:subject:subject: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+NjODJ+q1OZ0M2hweQr6d6jaC/+bSk4Sb37eEQ3d+E=; b=KLYstyuQFgkWI2KGvQuXqtXYOmh6bbp/SFcQsDy9/4GCzj0c6ZY4CBTFBN+gfSAjFF4w3r ySK1Ws6tWBVaDz8l5qTV7Nf+BZf1vZQNRU2CmttuRY8N1lwytcanlTU7xE41WGYvvWui0U A8TmGQswZKOfj9RB0SWNuAgWggR8ltXFyXYUoP9BpoZzIEF4NMaTHT9ShTVSAtqeI9VQfd LdVlFVlKsDkI8Qx4brITO8D7scTuqW9/cn+C9tM5wZySiQpGlPUEM3X4fuMLb2xn0b4S10 GFlHEMbn+ZL7Pn0Dobdd2RIIqtP2zRJ51v1up048MoeLUWesOxKDB6vntJAKNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159392; a=rsa-sha256; cv=none; b=SaaTJj32UXgXGb3H9lngpga1dC1Qg8kFTub5MLujYa9YcBo1f+jzBbuJlVNydvOfNj02Im toAiDDy8lIkN9Oy4tksNh6BxXtZlx1kSXLCR/xBLcWiRlJgvmSurSQ/FHiN8/i+QELICXK d4TW9J1RYhU2jB/c0MXSFKURfVZjbuAkqyb4hJ3lDJt+r87b53Z7HOGhn2ExBjoaeG9CKj ZEbEhYt4Tm0kxm/HVuZsl8EPh8JfQRN5NBjAdnmc0gFGhrdHdO4nQzWyyAIxwEkKHCYUa5 4IvmnnVa0EEOSarrA59yARXkJMsumMiwDrV34pAnlItbiOI7PZOAu3ZIxo1BmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159392; h=from:from:reply-to:subject:subject: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+NjODJ+q1OZ0M2hweQr6d6jaC/+bSk4Sb37eEQ3d+E=; b=PIjnPjPUcWYON5slExZWoToboxeiH2WLgOOEOyjOjQ7hfIuXgxOgYpVCux+xUbTDoZAeJk DpepvoaTUG0bZBUMM3att4Y0CKTXTH+2taTZs7+rcFRIdmRggvR/cAwSyalQmMQgx9sCEN GVCRZ77Rbml57Q2PoXi4chTBF5/GX7boH8PKxMJa4GkZUbp1dmv8YJBKq/hfxB1NEgsWvV rnosxVWciQik3IZTn+etuBzlDs32S8fI4NqnDi32YozAyRkwZ687rcbqgmAw+2UBTMPqF9 hxhGTclVB4s8U1Ly/QDfT7qgJsWWGLa89dRT1gvkrwHfs8ny9ZizODSQMAXmvw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNJ05h5zxwP for ; Fri, 27 Feb 2026 02:29:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 203f4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: c686a7352c9f - stable/15 - rtw88: set .bsddriver.name for USB chipsets List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c686a7352c9f73966015754c5292b002095a7939 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:52 +0000 Message-Id: <69a101a0.203f4.147c873d@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c686a7352c9f73966015754c5292b002095a7939 commit c686a7352c9f73966015754c5292b002095a7939 Author: Bjoern A. Zeeb AuthorDate: 2026-01-29 11:16:11 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:05:18 +0000 rtw88: set .bsddriver.name for USB chipsets We use the FreeBSD-specifc bsddriver.name to get the device name; set it everywere consistently. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55020 (cherry picked from commit d3c4e8952cd1be2015aa9d83820961283aa4f00c) --- sys/contrib/dev/rtw88/rtw8723du.c | 2 +- sys/contrib/dev/rtw88/rtw8812au.c | 3 +++ sys/contrib/dev/rtw88/rtw8814au.c | 3 +++ sys/contrib/dev/rtw88/rtw8821au.c | 3 +++ sys/contrib/dev/rtw88/rtw8821cu.c | 2 +- sys/contrib/dev/rtw88/rtw8822bu.c | 2 +- sys/contrib/dev/rtw88/rtw8822cu.c | 2 +- 7 files changed, 13 insertions(+), 4 deletions(-) diff --git a/sys/contrib/dev/rtw88/rtw8723du.c b/sys/contrib/dev/rtw88/rtw8723du.c index 064cbb4d9760..1e1b674ca357 100644 --- a/sys/contrib/dev/rtw88/rtw8723du.c +++ b/sys/contrib/dev/rtw88/rtw8723du.c @@ -28,7 +28,7 @@ static struct usb_driver rtw_8723du_driver = { .id_table = rtw_8723du_id_table, .probe = rtw8723du_probe, .disconnect = rtw_usb_disconnect, -#if defined(__FreeBSD__) && defined(__notyet__) +#if defined(__FreeBSD__) .bsddriver.name = KBUILD_MODNAME, #endif }; diff --git a/sys/contrib/dev/rtw88/rtw8812au.c b/sys/contrib/dev/rtw88/rtw8812au.c index dfea89670372..d6693ab4d273 100644 --- a/sys/contrib/dev/rtw88/rtw8812au.c +++ b/sys/contrib/dev/rtw88/rtw8812au.c @@ -86,6 +86,9 @@ static struct usb_driver rtw_8812au_driver = { .id_table = rtw_8812au_id_table, .probe = rtw_usb_probe, .disconnect = rtw_usb_disconnect, +#if defined(__FreeBSD__) + .bsddriver.name = KBUILD_MODNAME, +#endif }; module_usb_driver(rtw_8812au_driver); diff --git a/sys/contrib/dev/rtw88/rtw8814au.c b/sys/contrib/dev/rtw88/rtw8814au.c index 1a0886ec17dd..86158bf381b0 100644 --- a/sys/contrib/dev/rtw88/rtw8814au.c +++ b/sys/contrib/dev/rtw88/rtw8814au.c @@ -46,6 +46,9 @@ static struct usb_driver rtw_8814au_driver = { .id_table = rtw_8814au_id_table, .probe = rtw_usb_probe, .disconnect = rtw_usb_disconnect, +#if defined(__FreeBSD__) + .bsddriver.name = KBUILD_MODNAME, +#endif }; module_usb_driver(rtw_8814au_driver); diff --git a/sys/contrib/dev/rtw88/rtw8821au.c b/sys/contrib/dev/rtw88/rtw8821au.c index 28c281b32978..d07aa0fca68b 100644 --- a/sys/contrib/dev/rtw88/rtw8821au.c +++ b/sys/contrib/dev/rtw88/rtw8821au.c @@ -70,6 +70,9 @@ static struct usb_driver rtw_8821au_driver = { .id_table = rtw_8821au_id_table, .probe = rtw_usb_probe, .disconnect = rtw_usb_disconnect, +#if defined(__FreeBSD__) + .bsddriver.name = KBUILD_MODNAME, +#endif }; module_usb_driver(rtw_8821au_driver); diff --git a/sys/contrib/dev/rtw88/rtw8821cu.c b/sys/contrib/dev/rtw88/rtw8821cu.c index 3386c54f2646..0f42819f787c 100644 --- a/sys/contrib/dev/rtw88/rtw8821cu.c +++ b/sys/contrib/dev/rtw88/rtw8821cu.c @@ -52,7 +52,7 @@ static struct usb_driver rtw_8821cu_driver = { .id_table = rtw_8821cu_id_table, .probe = rtw_8821cu_probe, .disconnect = rtw_usb_disconnect, -#if defined(__FreeBSD__) && defined(__notyet__) +#if defined(__FreeBSD__) .bsddriver.name = KBUILD_MODNAME, #endif }; diff --git a/sys/contrib/dev/rtw88/rtw8822bu.c b/sys/contrib/dev/rtw88/rtw8822bu.c index 2886f470df71..ae595a867339 100644 --- a/sys/contrib/dev/rtw88/rtw8822bu.c +++ b/sys/contrib/dev/rtw88/rtw8822bu.c @@ -96,7 +96,7 @@ static struct usb_driver rtw_8822bu_driver = { .id_table = rtw_8822bu_id_table, .probe = rtw8822bu_probe, .disconnect = rtw_usb_disconnect, -#if defined(__FreeBSD__) && defined(__notyet__) +#if defined(__FreeBSD__) .bsddriver.name = KBUILD_MODNAME, #endif }; diff --git a/sys/contrib/dev/rtw88/rtw8822cu.c b/sys/contrib/dev/rtw88/rtw8822cu.c index a5f8311c022b..2fdb64374e8c 100644 --- a/sys/contrib/dev/rtw88/rtw8822cu.c +++ b/sys/contrib/dev/rtw88/rtw8822cu.c @@ -38,7 +38,7 @@ static struct usb_driver rtw_8822cu_driver = { .id_table = rtw_8822cu_id_table, .probe = rtw8822cu_probe, .disconnect = rtw_usb_disconnect, -#if defined(__FreeBSD__) && defined(__notyet__) +#if defined(__FreeBSD__) .bsddriver.name = KBUILD_MODNAME, #endif }; From nobody Fri Feb 27 02:29:53 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNK4R2rz6T7bH for ; Fri, 27 Feb 2026 02: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNK1qC8z41V1 for ; Fri, 27 Feb 2026 02: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=1772159393; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q/GKwfWxC9kIbZ1sV4UdSuXthTvqoNzFDT/hetwv018=; b=T+LoKhaV4V6ekOv18vdC/fbJ5HpsfBJV9x2ORtGBaKegik5uJFkOzX7hgtdL/ROHFm6YHO AmU7+cXyy+qi5r/BPG/WNQX0dSwYzJlGKgJprLckfp9+GuPCcqi+0feMr2ShjNvrI771ZE w7XH9mSCV8uwIUhHsN+cjYmj/kyNsLEtHHGfMLROQpR7nvzmwzd9l7yUGQExiY0jnoLz1x Ggq5Toy0HuNzl+KFKteict9rm50O4QGP0Jho50H+dZcsrTLv/6L18JKVJpAcoAe2uxffzh 4wVwyU6CFHU34v4gbhu+YiVNTkgzx3dWw3tPSOibT+pamWPonsQadCtan3Udyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159393; a=rsa-sha256; cv=none; b=wjKrXrAb6qdoq/+NUtv/9B8qpRjjsdKwziZHVu/Z0FP8DlwwKjvUh1J3yplkX8EWX8/tUw OZLf+41+jn3FQHRRXoiSu5kMNOEZYwTsNefyreYEbjjSxwL/zxQo79HtHwG11CIgIvWnqE VfaS/RBybGu6QYUGO0ySt0gjuecdMp0NSpmGyL/FHTgCS4duY1wM7/F/LO47rCIyQ7d/Wk ydrg/8UjkIcCOj4GBRiu9ec2i6Y6t93DxTXS8EAPAbKOii9sA0cVHUeO0dg3c9E34H+AFJ GsY6LV2lxfwx0NvgScwnWNDD6ghWYuKjG0f1tLGXZCTPaKyRYFMb+YYspBpQxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159393; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q/GKwfWxC9kIbZ1sV4UdSuXthTvqoNzFDT/hetwv018=; b=FGVGZ//HXHQZEbWAWbCQuT9o5WS5rdAB8JRkIaKnIGKb8KM3Xxwsec/CHvA4DLZzMB8xt3 BNaPVHRuMVPPFFqxMp5BGE8b5mLW0uOxS/EY69oq7YwiajcTVbWIuoMf5FTZrsbUBZkj6f jEUOx7MG78tnsaRogXsGflsDA856PY66S6PPfEXpDEWVFtKJ22+PHYrfXtOzeyVm1lS5RN 1CKVbVVOr5nFp0cz73rjVwCdHlqa1+uN54a/uUX5Ue++Z5tF50VPKlK/bTs6MEmX19aALG +VuWExd2d3ps7a8USakLki2J2wS/2Vg8RMSvmIRxevRXQAKlwUgm9oc0GIlwYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNK0sNRzy72 for ; Fri, 27 Feb 2026 02:29:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 204cf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: 1b52d3124ab0 - stable/15 - ath10k: fix a schedule() call List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 1b52d3124ab0b292c2c56d5d856305bd6cfec004 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:53 +0000 Message-Id: <69a101a1.204cf.406b9a57@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=1b52d3124ab0b292c2c56d5d856305bd6cfec004 commit 1b52d3124ab0b292c2c56d5d856305bd6cfec004 Author: Bjoern A. Zeeb AuthorDate: 2025-12-08 00:00:05 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:05:24 +0000 ath10k: fix a schedule() call Using kern_yield does not seem ideal either for polling here; use a schedule_timeout() call from LinuxKPI instead and use about 100 iterations per second. Improve an error message to include the error code so we have a better idea of what happens. (cherry picked from commit 6387c1135921fbc86ab0f3c1508a3719ca9cac54) --- sys/contrib/dev/athk/ath10k/bmi.c | 5 +++++ sys/contrib/dev/athk/ath10k/pci.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/contrib/dev/athk/ath10k/bmi.c b/sys/contrib/dev/athk/ath10k/bmi.c index 6dd92d29f631..30dded5b6bbb 100644 --- a/sys/contrib/dev/athk/ath10k/bmi.c +++ b/sys/contrib/dev/athk/ath10k/bmi.c @@ -66,7 +66,12 @@ int ath10k_bmi_get_target_info(struct ath10k *ar, ret = ath10k_hif_exchange_bmi_msg(ar, &cmd, cmdlen, &resp, &resplen); if (ret) { +#if defined(__linux__) ath10k_warn(ar, "unable to get target info from device\n"); +#elif defined(__FreeBSD__) + ath10k_warn(ar, "unable to get target info from device: %d\n", + ret); +#endif return ret; } diff --git a/sys/contrib/dev/athk/ath10k/pci.c b/sys/contrib/dev/athk/ath10k/pci.c index e613eaf24797..e9b8573a698b 100644 --- a/sys/contrib/dev/athk/ath10k/pci.c +++ b/sys/contrib/dev/athk/ath10k/pci.c @@ -2340,8 +2340,11 @@ static int ath10k_pci_bmi_wait(struct ath10k *ar, #if defined(__linux__) schedule(); #elif defined(__FreeBSD__) - /* Using LinuxKPI we'll hang for-ever as there's no wake_up */ - kern_yield(PRI_USER); + /* + * Using LinuxKPI's schedule() will hang for-ever as there is + * no wake_up. Poll about 100 times per second until timeout. + */ + schedule_timeout(BMI_COMMUNICATION_TIMEOUT_HZ/300); #endif } From nobody Fri Feb 27 02:29:54 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNL4QHGz6T7tb for ; Fri, 27 Feb 2026 02: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNL228zz41PV for ; Fri, 27 Feb 2026 02: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=1772159394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FeRrLO0z8aoZEIPWATDaNBEEIt/x7OAD098Dhv+uKLg=; b=kdLg+ZeTJxTEJx69QuqgWE+oGOkDmOhAmbpCwzaZ5oR28JpTdz/HBllYiWsLx3B8A/u9Y3 aqzxSR1IgIO4pNdkf5poaAn5mDsYCg/QTLlceqvmMaXFjJWuS3xGSemOKFoxlbZuGF/SnB j1frOdnus08+siC1zlUH4b+ne5SQikShn29lnWfqgCumUVDNCF/fwuqZ4XcPw7WkfyE34U S/GyGHOiuvFW18vLaskguabyynSJa79Nkqi29DtU3qtzODCCFgGzP+KM7DDtAPw9R7zO2r KwmrpFt0i9YJTYsRQfRMhzL0GiWIxIGHQVagt1CzBTXYX6I4LiIjNa0nRlDrpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159394; a=rsa-sha256; cv=none; b=md/CAGdGrzAl0isuqAIZ0mVrnpqeBnrUzL03RvQpcCOhJ217Lf+8tpDxFGx8UquY2kHIQi aOMbjjwk3uv9OigRUTtFWxlYt8DFgl2Vmdu99pomFXsF5ZUA2Prmmdri2jb9vZP/ylLT59 OLvl9sY9BNUwHVn/RE/qHeSm9Zxg5HYDtC3uDRLRUJ6vG1Dz4cLfJdcfZAcKScJmFSYAPI ZbNqzAYRZD3xz3zIpf6ASBJ4dzrlMOVaAgfG1N/jw//ZFxPmaupbPVfc7RVp7HIcsvYZE9 Ibp4DMA7xVKJat71by9UC790E+noOHbd9bDcHVFLqUNDRL7jgcq9hrUYrgzcAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FeRrLO0z8aoZEIPWATDaNBEEIt/x7OAD098Dhv+uKLg=; b=V2Xf5lm26GPB4jLgjHa1eLS+6x/uFjKE01KRMyF8SnQUiHsWAFfvSSypNOOq72CfTGaXns ebL8thdoQe/FsucMkYGM2/lQxagxFsWWC35v//lT+weurr5HsBt2HZOvD0FXK2750y0736 kUH4TjIIK0mfxnpAhjYajtqoOcxgWY/Nqi4iFPlf1iUCVe8xzDF1MGAnn5WkB5Ot1tHfWa 6CxFVyRUVDQwENCyiyFkGf9A/X6RE9ISaTnLAkh2ta5E3yj9z/270fNzsELKZa3eL1uLhg JfZdVFFrToPJSd/UUiJE9PbzOcmBNECj1JgusZC+ryXKB2P0XIhoXdKzlv6ueA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNL1c7bzyX6 for ; Fri, 27 Feb 2026 02:29:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2101b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: 309fb59019f2 - stable/15 - ath10k: add sysctl to turn on/off fwlog List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 309fb59019f2b9b25f90cc15be75d6f0f0d3ea82 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:54 +0000 Message-Id: <69a101a2.2101b.350a16bd@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=309fb59019f2b9b25f90cc15be75d6f0f0d3ea82 commit 309fb59019f2b9b25f90cc15be75d6f0f0d3ea82 Author: Bjoern A. Zeeb AuthorDate: 2025-12-08 18:47:45 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:05:30 +0000 ath10k: add sysctl to turn on/off fwlog FWLOG, if compiled in, was on by default without a way to stop it from printing everything to the console. Add a modparam to enable it with it being disabled by default if available. (cherry picked from commit 717240c95d297711d3bed0bb8b4cc8403ecbfd6a) --- sys/contrib/dev/athk/ath10k/fwlog.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sys/contrib/dev/athk/ath10k/fwlog.c b/sys/contrib/dev/athk/ath10k/fwlog.c index fb1e292fe2e4..9ea4d36c2c7c 100644 --- a/sys/contrib/dev/athk/ath10k/fwlog.c +++ b/sys/contrib/dev/athk/ath10k/fwlog.c @@ -14,10 +14,20 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#if defined(__FreeBSD__) +#define LINUXKPI_PARAM_PREFIX ath10k_fwlog_ +#endif + #include "core.h" #include "debug.h" #if defined(__FreeBSD__) #include "fwlog.h" + +#include /* modparam */ + +static bool enable; +module_param(enable, bool, 0644); +MODULE_PARM_DESC(enable, "Enable firmware loggging."); #endif #define FW_DBGLOG_TIMESTAMP_OFFSET 0 @@ -1526,6 +1536,13 @@ static void ath10k_fwlog_print_work(struct work_struct *work) { void ath10k_handle_fwlog_msg(struct ath10k *ar, struct sk_buff *skb) { +#if defined(__FreeBSD__) + if (!enable) { + dev_kfree_skb(skb); + return; + } +#endif + if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags)) { ath10k_warn(ar, "ignoring fwlog event!!!\n"); dev_kfree_skb(skb); From nobody Fri Feb 27 02:29:55 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNM56MRz6T7gd for ; Fri, 27 Feb 2026 02:29:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNM30y3z41BY for ; Fri, 27 Feb 2026 02:29:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159395; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EpLDNyoyEUyLIB5YSqvc06GeLuK6E/FkRmkSO/RIsPI=; b=kDV9jGU+JtdU8R+Zvaor2yiXUxTZU3Yeny2cYgk4fRxjlASyegoXfPIUmj99u+u3ovrlOA Z29KYjPO0ElPKrSj7mZzfuFwAHa3lXsRoFJy8PxKwA9lf4JLDc/P1TK7UP1PnAhdVm8zGt 2gNB/Q876KKxJZTIuqNbuzRZ1IH55ccPXbvFsXQPyXfI0nB7OO1l1lOb1Gue3wqvSvfFa/ jcOxIPh3JpJ7NXo9WbOSjY8YmnXAntPwtlYCQqhRugga0ACvPhYQgcXHFim0fpr8xsrWSE edVrpSHogYvq1MkRhGycZfiyrck2PZAuQ97VEk8e6SVWa3zh3dZC5umN3YObAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159395; a=rsa-sha256; cv=none; b=YvhyZaR/XRGq0HApMcXbGQcQZXYby752ju7PwEWK+55fD/bVQ99aixmlHsKQi/nwsWT8ip +MkhrmExhjTWitMNVwDPDa4pnt7m3aY+Rt+P/eoUFrvg2EmulFzwr+WalzlNJ6LX/ZmAVf jle5v0NPCXOPEtXh5MEgPuFevVR/kBQGu8fMkr35X9haqASZe+YXs6+3lVSpmDhTP0wJol SKBFkdo9+kd4jYL1Xrh2FbT1jx65VvvM9n39s6AstLUhaP1rXXL2C/aqWn9yc1Ltwh5ybr +qNUMgVxzsCXkAK35WbIeGALTe/8WGevUfH7xtZtw4a8IHDH9FFXIxXY2iIJJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159395; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EpLDNyoyEUyLIB5YSqvc06GeLuK6E/FkRmkSO/RIsPI=; b=ZFJBLfM5uiPZmCDUlIR+r4ISzdS1caP1MLSt8VwD8Xz8ZPJYZZqLeAqnegAJu4LlV8E+54 VaCkv9hSBd09I0AV/pd5RxP50VBhm+pm79CNM1IdS+gNUPfD++ZXBfVGxYsyV5WQT/0nWY 8Ny+unoCU5Wi/4yYDfeFhZMsjFKyg0DgF5erGDFPVFmx925u6w8DiZUt/7sl5nuZUaVkpI JlWxRh/YepGtn0SR1omC76m/u7JF1roi0d5a57/epAiiXa8KrTpdutIBrI2+Z0bfatxfbM dEZXY1H0Y7nTG9Jwg1zoPUC/YscyPjVMsLWZVw5yN2c8zEsY6Uz0t3NgQWEDog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNM2Rv4zy73 for ; Fri, 27 Feb 2026 02:29:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1fe74 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: c2b7d9ae065d - stable/15 - ath10k: cleanup some bits no longer FreeBSD-specific List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c2b7d9ae065d3ff49098aa485d567aa4e3622477 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:55 +0000 Message-Id: <69a101a3.1fe74.da476c8@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c2b7d9ae065d3ff49098aa485d567aa4e3622477 commit c2b7d9ae065d3ff49098aa485d567aa4e3622477 Author: Bjoern A. Zeeb AuthorDate: 2025-12-14 22:28:46 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:05:35 +0000 ath10k: cleanup some bits no longer FreeBSD-specific We have since I did this port in 2023 added ACPI support to LinuxKPI, so we can use it. Also there is a linux/of.h header so we no longer need to guard the #include. (cherry picked from commit db20376a4fc949d6a5b30b11f8bf9146c6b3395d) --- sys/contrib/dev/athk/ath10k/core.c | 4 +--- sys/contrib/dev/athk/ath10k/htt_rx.c | 5 ++--- sys/contrib/dev/athk/ath10k/mac.c | 36 +----------------------------------- sys/modules/ath10k/Makefile | 1 + 4 files changed, 5 insertions(+), 41 deletions(-) diff --git a/sys/contrib/dev/athk/ath10k/core.c b/sys/contrib/dev/athk/ath10k/core.c index 9ec08b402fd2..6167338b5c79 100644 --- a/sys/contrib/dev/athk/ath10k/core.c +++ b/sys/contrib/dev/athk/ath10k/core.c @@ -13,9 +13,7 @@ #include #include #include -#if defined(__linux__) || (defined(__FreeBSD__) && defined(CONFIG_OF)) #include -#endif #include #include #include @@ -2048,7 +2046,7 @@ static int ath10k_download_cal_nvmem(struct ath10k *ar, const char *cell_name) ret = ath10k_download_board_data(ar, buf, len); kfree(buf); #elif defined(__FreeBSD__) - ret = -ENXIO; + ret = -EOPNOTSUPP; #endif if (ret) ath10k_warn(ar, "failed to download calibration data from nvmem-cell '%s': %d\n", diff --git a/sys/contrib/dev/athk/ath10k/htt_rx.c b/sys/contrib/dev/athk/ath10k/htt_rx.c index ad61fad315c5..d73369ffb697 100644 --- a/sys/contrib/dev/athk/ath10k/htt_rx.c +++ b/sys/contrib/dev/athk/ath10k/htt_rx.c @@ -849,9 +849,6 @@ int ath10k_htt_rx_alloc(struct ath10k_htt *htt) timer_setup(timer, ath10k_htt_rx_ring_refill_retry, 0); spin_lock_init(&htt->rx_ring.lock); -#if defined(__FreeBSD__) - spin_lock_init(&htt->tx_fetch_ind_q.lock); -#endif htt->rx_ring.fill_cnt = 0; htt->rx_ring.sw_rd_idx.msdu_payld = 0; @@ -1670,6 +1667,7 @@ static void ath10k_htt_rx_h_undecap_nwifi(struct ath10k *ar, ether_addr_copy(ieee80211_get_DA(hdr), da); ether_addr_copy(ieee80211_get_SA(hdr), sa); #elif defined(__FreeBSD__) + /* ieee80211_get_[DS]A() do not take a const argument. */ hdr2 = (struct ieee80211_hdr *)msdu->data; ether_addr_copy(ieee80211_get_DA(hdr2), da); ether_addr_copy(ieee80211_get_SA(hdr2), sa); @@ -1812,6 +1810,7 @@ static void ath10k_htt_rx_h_undecap_eth(struct ath10k *ar, ether_addr_copy(ieee80211_get_DA(hdr), da); ether_addr_copy(ieee80211_get_SA(hdr), sa); #elif defined(__FreeBSD__) + /* ieee80211_get_[DS]A() do not take a const argument. */ hdr2 = (struct ieee80211_hdr *)msdu->data; ether_addr_copy(ieee80211_get_DA(hdr2), da); ether_addr_copy(ieee80211_get_SA(hdr2), sa); diff --git a/sys/contrib/dev/athk/ath10k/mac.c b/sys/contrib/dev/athk/ath10k/mac.c index e2bda3c0d925..d8e6bd2d277d 100644 --- a/sys/contrib/dev/athk/ath10k/mac.c +++ b/sys/contrib/dev/athk/ath10k/mac.c @@ -13,9 +13,7 @@ #include #include #include -#if defined(__linux__) || (defined(__FreeBSD__) && defined(CONFIG_OF)) #include -#endif #include #include @@ -5130,7 +5128,7 @@ static int __ath10k_fetch_bb_timing_dt(struct ath10k *ar, bb_timing->bb_tx_timing, bb_timing->bb_xpa_timing); return 0; #else - return -EINVAL; + return -ENOENT; #endif } @@ -9914,22 +9912,14 @@ static u32 ath10k_mac_wrdd_get_mcc(struct ath10k *ar, union acpi_object *wrdd) union acpi_object *mcc_value; u32 i; -#if defined(__linux__) if (wrdd->type != ACPI_TYPE_PACKAGE || wrdd->package.count < 2 || wrdd->package.elements[0].type != ACPI_TYPE_INTEGER || wrdd->package.elements[0].integer.value != 0) { -#elif defined(__FreeBSD__) - if (wrdd->Type != ACPI_TYPE_PACKAGE || - wrdd->Package.Count < 2 || - wrdd->Package.Elements[0].Type != ACPI_TYPE_INTEGER || - wrdd->Package.Elements[0].Integer.Value != 0) { -#endif ath10k_warn(ar, "ignoring malformed/unsupported wrdd structure\n"); return 0; } -#if defined(__linux__) for (i = 1; i < wrdd->package.count; ++i) { mcc_pkg = &wrdd->package.elements[i]; @@ -9947,25 +9937,6 @@ static u32 ath10k_mac_wrdd_get_mcc(struct ath10k *ar, union acpi_object *wrdd) mcc_value = &mcc_pkg->package.elements[1]; return mcc_value->integer.value; -#elif defined(__FreeBSD__) - for (i = 1; i < wrdd->Package.Count; ++i) { - mcc_pkg = &wrdd->Package.Elements[i]; - - if (mcc_pkg->Type != ACPI_TYPE_PACKAGE) - continue; - if (mcc_pkg->Package.Count < 2) - continue; - if (mcc_pkg->Package.Elements[0].Type != ACPI_TYPE_INTEGER || - mcc_pkg->Package.Elements[1].Type != ACPI_TYPE_INTEGER) - continue; - - domain_type = &mcc_pkg->Package.Elements[0]; - if (domain_type->Integer.Value != WRDD_WIFI) - continue; - - mcc_value = &mcc_pkg->Package.Elements[1]; - return mcc_value->Integer.Value; -#endif } return 0; } @@ -9997,13 +9968,8 @@ static int ath10k_mac_get_wrdd_regulatory(struct ath10k *ar, u16 *rd) return -EIO; } -#if defined(__linux__) alpha2_code = ath10k_mac_wrdd_get_mcc(ar, wrdd.pointer); kfree(wrdd.pointer); -#elif defined(__FreeBSD__) - alpha2_code = ath10k_mac_wrdd_get_mcc(ar, wrdd.Pointer); - kfree(wrdd.Pointer); -#endif if (!alpha2_code) return -EIO; diff --git a/sys/modules/ath10k/Makefile b/sys/modules/ath10k/Makefile index d8196854b681..93518c66f89f 100644 --- a/sys/modules/ath10k/Makefile +++ b/sys/modules/ath10k/Makefile @@ -38,6 +38,7 @@ CFLAGS+= ${LINUXKPI_INCLUDES} #CFLAGS+= -ferror-limit=0 CFLAGS+= -DCONFIG_ATH10K_DEBUG +CFLAGS+= -DLINUXKPI_WANT_LINUX_ACPI #CFLAGS+= -DCONFIG_ATH10K_AHB #CFLAGS+= -DCONFIG_ATH10K_DEBUGFS From nobody Fri Feb 27 02:29:56 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNP1LBhz6T7dl for ; Fri, 27 Feb 2026 02:29:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNN44t3z41Hn for ; Fri, 27 Feb 2026 02:29:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jcRHIyiYpQLp/ByxCJ3Eyj3iVQRThhGpnXb7JSMBsRk=; b=quRld5HS1zAlbUXT1zLuZNFAM0uYZpANyGvhg4uCPWnYgfSxP4iKptjmllSKC/DhIJ9grv EU1+NAkpK4IKj/ztRC/uS037H7108pSOz8PnvcPKmeYc0NRhD0KhrIjX/oUy2Ne4PLNq60 Bzt2JDb9ovbGtq+n4Nd8PrGo6PlCdfZEZ3TX3Y5FRqEunsjzh1iRlIyYJQAeQzS1p5RyXw 9gbrKFNbEdAE+cGFbr6RZxawgR0SDigNraDltJf5FuNBXF8gk7MVac3wsFcfejupEsBQ9S xc52MDEc498pQjAnxXcGhMej+oMTPfDWTfnuAkWY5bKavC65/HcWvgm41xvvBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159396; a=rsa-sha256; cv=none; b=YfhlU5CzDJST7zfmBU9H22MhKYlDBzVMN66UeM9MmF57y8K5nfy6wbTLaB0dk9lvOk+8ox 4r9bgdy/bJmb9rcEoO/HTjMWWALYU8hbAnOSSsbOLUrFn2JDQcmW8ckGFof9458ME0SB6l FKyN3Axxzc11foV5CdVo+MlW0ZxORNqjontKuH3McOzHFwFo5vgkqRV5P0sdr2WWN96KkA OkTO6voR3myCl0o6zoG5wHNHcPaDMLuddma2m1iM2yEyWoEHiS9QYycSAj3/BHkASAvpx8 1q8j8o3rgYJzAkvqZ052cQMNIpkOD+8RCRzG9mHXDkhrp09lFwlp+e+d79F2wA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jcRHIyiYpQLp/ByxCJ3Eyj3iVQRThhGpnXb7JSMBsRk=; b=UCtP422d17vk4ig11h/tNNlxWAEZXD1bylbjK6Sx6k5SVfIDkbUMP8DFMS5RUD9HdIueJi AopWEiuLqW8nfytlPal1tVPKoPjEDsKpd170KlLCpx2jSmpzOLNkg4elqlLfuZqtJduFfM Fuw+rsGE9R72r3iU5MM8W/JdKVIvNJNPU0QiOIbf+31ywRRkq9We/pViYscj22s5hvzLkn AcMh9VovgF+PCmswM4OM/06bPmXzqA9jwEWaX/TtAdBpT1MWu/9aV4RwKHVeX489mbt5FF KwjOOAHbIGuItmN5CoIQ4VjZ88E8Wys4T26KWLydq8p/GNgtLWr4kPY5Rhnj5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNN3DRKzyg5 for ; Fri, 27 Feb 2026 02:29:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f6f5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: bc1f3a730c0f - stable/15 - ath10k: harmonize all MODULE_DEPEND to ath10k List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: bc1f3a730c0f832efec9374d9305337b64053a3e Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:56 +0000 Message-Id: <69a101a4.1f6f5.454f409c@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=bc1f3a730c0f832efec9374d9305337b64053a3e commit bc1f3a730c0f832efec9374d9305337b64053a3e Author: Bjoern A. Zeeb AuthorDate: 2026-02-07 22:29:44 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:05:47 +0000 ath10k: harmonize all MODULE_DEPEND to ath10k With theoretically multiple bus attachements (unclear if we will ever support anything but PCI) rename the module name to "ath10k" and use it consistently. Move the common depends to core.c and lindebugfs and usb to their respective files. (cherry picked from commit c45b60cab05b47b1d87bf49e58f669d9aaf72765) --- sys/contrib/dev/athk/ath10k/core.c | 6 ++++++ sys/contrib/dev/athk/ath10k/debug.c | 6 ++++++ sys/contrib/dev/athk/ath10k/pci.c | 9 --------- sys/contrib/dev/athk/ath10k/usb.c | 3 +++ 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/sys/contrib/dev/athk/ath10k/core.c b/sys/contrib/dev/athk/ath10k/core.c index 6167338b5c79..a1fd099487fd 100644 --- a/sys/contrib/dev/athk/ath10k/core.c +++ b/sys/contrib/dev/athk/ath10k/core.c @@ -3870,3 +3870,9 @@ EXPORT_SYMBOL(ath10k_core_destroy); MODULE_AUTHOR("Qualcomm Atheros"); MODULE_DESCRIPTION("Core module for Qualcomm Atheros 802.11ac wireless LAN cards."); MODULE_LICENSE("Dual BSD/GPL"); +#if defined(__FreeBSD__) +MODULE_VERSION(ath10k, 1); +MODULE_DEPEND(ath10k, linuxkpi, 1, 1, 1); +MODULE_DEPEND(ath10k, linuxkpi_wlan, 1, 1, 1); +MODULE_DEPEND(ath10k, athk_common, 1, 1, 1); +#endif diff --git a/sys/contrib/dev/athk/ath10k/debug.c b/sys/contrib/dev/athk/ath10k/debug.c index 8a79f5418585..7a9e54cfb23b 100644 --- a/sys/contrib/dev/athk/ath10k/debug.c +++ b/sys/contrib/dev/athk/ath10k/debug.c @@ -2777,3 +2777,9 @@ trace: ; EXPORT_SYMBOL(ath10k_dbg_dump); #endif /* CONFIG_ATH10K_DEBUG */ + +#if defined(__FreeBSD__) +#ifdef CONFIG_ATH10K_DEBUGFS +MODULE_DEPEND(ath10k, debugfs, 1, 1, 1); +#endif +#endif diff --git a/sys/contrib/dev/athk/ath10k/pci.c b/sys/contrib/dev/athk/ath10k/pci.c index e9b8573a698b..f4c9af1e12fc 100644 --- a/sys/contrib/dev/athk/ath10k/pci.c +++ b/sys/contrib/dev/athk/ath10k/pci.c @@ -3933,15 +3933,6 @@ module_exit(ath10k_pci_exit); MODULE_AUTHOR("Qualcomm Atheros"); MODULE_DESCRIPTION("Driver support for Qualcomm Atheros PCIe/AHB 802.11ac WLAN devices"); MODULE_LICENSE("Dual BSD/GPL"); -#if defined(__FreeBSD__) -MODULE_VERSION(ath10k_pci, 1); -MODULE_DEPEND(ath10k_pci, linuxkpi, 1, 1, 1); -MODULE_DEPEND(ath10k_pci, linuxkpi_wlan, 1, 1, 1); -MODULE_DEPEND(ath10k_pci, athk_common, 1, 1, 1); -#ifdef CONFIG_ATH10K_DEBUGFS -MODULE_DEPEND(ath10k_pci, debugfs, 1, 1, 1); -#endif -#endif /* QCA988x 2.0 firmware files */ MODULE_FIRMWARE(QCA988X_HW_2_0_FW_DIR "/" ATH10K_FW_API2_FILE); diff --git a/sys/contrib/dev/athk/ath10k/usb.c b/sys/contrib/dev/athk/ath10k/usb.c index 1732a4f98418..9dfa179ba610 100644 --- a/sys/contrib/dev/athk/ath10k/usb.c +++ b/sys/contrib/dev/athk/ath10k/usb.c @@ -1128,3 +1128,6 @@ module_usb_driver(ath10k_usb_driver); MODULE_AUTHOR("Atheros Communications, Inc."); MODULE_DESCRIPTION("Driver support for Qualcomm Atheros USB 802.11ac WLAN devices"); MODULE_LICENSE("Dual BSD/GPL"); +#if defined(__FreeBSD__) +MODULE_DEPEND(ath10k, linuxkpi_usb, 1, 1, 1); +#endif From nobody Fri Feb 27 02:29:57 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNQ06HBz6T7jl for ; Fri, 27 Feb 2026 02:29:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNP4p2rz41dW for ; Fri, 27 Feb 2026 02:29:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BlVWVEg5LhndkG4mE/6oUGzegFOc4NEUuea5phMkMs0=; b=l7nKPhhIiD/CwIzaRi8mPUMErYJJKxpmSIIkWnsU8ExJWOLopyBE16b+3iiph51cDqC7uH rDRtX8eGb5LW8YO0OV6VSEZtA3jmhecp8Z7JPhCLqlC5hXfrjmyNKJooa7eYq+jTbn93Yj /kH6+q5Mmko5L44dgZ/eu7zFSSmnXEmTk3vez+ouGkCO/Ah0YJC62UAlhMZz3hwNlZkwB3 mvJfyfImwDotaeZ/TqeKwH+Yn71dyFvwP3TaoaOLbpfb2ngKx5pvX77JzOwcjG9bkK8AB8 IY6RaoJ/55kZAkzuAOkM2vz5uAik59WVBzslj1RaEDN50w0bpzd4qC9Iz3vYRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159397; a=rsa-sha256; cv=none; b=EoJa7osyjMILvszvl0QT9xB+058Kez+0FXOgyrWwjEJyPSB2UVQil0gbjfbnVP4XMPEotq NtCRtt7GuQre8ygCOrGWOk41Jnvt3itpgSegpD3f2ZXpCOvyCVeF/rIHLd/oq4e0s5EJ0+ aUc2xFlkw0UHpczSrwZ+E1+9pbQTzjMHoSGxB6mzNtdxWh0pDKPrHi0ZOnozaQ73Lbyakx MU16mS0ocCsvh4hvuByLEIlND13wQhrpjOyC/mwDiUKuh984bvpS93hsaDrZA9jXhCkw5V zIwZRp2wONyMHwF5brrZDemjGQfrVsAQP8s9mkGbYCYaNUEIqCSLDiHT9keqsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BlVWVEg5LhndkG4mE/6oUGzegFOc4NEUuea5phMkMs0=; b=m6bgX2D+wd1KcXdK0DzqWBHyaAhcX+bbOG49IsmR/qVksC5Kk1NS+RDxJbCOIqmDuKQrKO tY5Rs+hOPXFhTsVvDkLaK/DgCl97lSqCsBY6gGCNWbiVUZ3WmSOODCTZlN96V8NFhuiRp+ cYz9DuC5HxWF13a+l23MhuoJ15XTKbSfncKwyAOcrWnArlDNmwXDu9G8wMNYaKwBNvNV3R 2r4oyKZH/WClTFPEw/MC8xcqst6ZAiGVZnOQyrw0j7uTwqOZHpGPBatPnBBjKTDJv7VnwP LoK1tYxFtY9b8SPIwtToPjgQ3V1RHVEroPAHMJ2DVaK0pOzenf7yrYoZJqw6iw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNP427yzyZf for ; Fri, 27 Feb 2026 02:29:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21293 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: 5cbfbd5cd0d5 - stable/15 - ath10k: usb: make compile using [a future] linuxkpi_usb List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5cbfbd5cd0d53d2a396fb6cde8d68cdf62d9f0c1 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:57 +0000 Message-Id: <69a101a5.21293.5d8151d1@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=5cbfbd5cd0d53d2a396fb6cde8d68cdf62d9f0c1 commit 5cbfbd5cd0d53d2a396fb6cde8d68cdf62d9f0c1 Author: Bjoern A. Zeeb AuthorDate: 2026-02-07 22:13:23 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:05:52 +0000 ath10k: usb: make compile using [a future] linuxkpi_usb Make ath10k usb code compile just to gather more USB bits. Currently (and likely forever) it is useless as the ath10k USB implementation never got finished. At the moment it lacks an entry for the USB bus attachment in core.c ath10k_hw_params_list[]. ath10k_usb0 on uhub1 ath10k_usb0: on usbus0 ath10k_usb0: Warning: ath10k USB support is incomplete, don't expect anything to work! ath10k_usb0: Unsupported hardware version: 0x5020001 ath10k_usb0: could not get hw params (-22) ath10k_usb0: could not probe fw (-22) There is another possible hardware [1] which was also never merged upstream. [1] https://lists.infradead.org/pipermail/ath10k/2024-August/016037.html "[PATCH] wifi: ath10k: add USB device ID for Atheros QCA9377-7" (cherry picked from commit ca83c369755bcc205090093e6e0d045fae24714e) --- sys/contrib/dev/athk/ath10k/usb.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/sys/contrib/dev/athk/ath10k/usb.c b/sys/contrib/dev/athk/ath10k/usb.c index 9dfa179ba610..a825d442fe33 100644 --- a/sys/contrib/dev/athk/ath10k/usb.c +++ b/sys/contrib/dev/athk/ath10k/usb.c @@ -842,14 +842,22 @@ static int ath10k_usb_setup_pipe_resources(struct ath10k *ar, ATH10K_USB_IS_DIR_IN (endpoint->bEndpointAddress) ? "rx" : "tx", endpoint->bEndpointAddress, +#if defined(__linux__) le16_to_cpu(endpoint->wMaxPacketSize)); +#elif defined(__FreeBSD__) + UGETW(endpoint->wMaxPacketSize)); +#endif } else if (ATH10K_USB_IS_INT_EP(endpoint->bmAttributes)) { ath10k_dbg(ar, ATH10K_DBG_USB, "usb %s int ep 0x%2.2x maxpktsz %d interval %d\n", ATH10K_USB_IS_DIR_IN (endpoint->bEndpointAddress) ? "rx" : "tx", endpoint->bEndpointAddress, +#if defined(__linux__) le16_to_cpu(endpoint->wMaxPacketSize), +#elif defined(__FreeBSD__) + UGETW(endpoint->wMaxPacketSize), +#endif endpoint->bInterval); } else if (ATH10K_USB_IS_ISOC_EP(endpoint->bmAttributes)) { /* TODO for ISO */ @@ -858,7 +866,11 @@ static int ath10k_usb_setup_pipe_resources(struct ath10k *ar, ATH10K_USB_IS_DIR_IN (endpoint->bEndpointAddress) ? "rx" : "tx", endpoint->bEndpointAddress, +#if defined(__linux__) le16_to_cpu(endpoint->wMaxPacketSize), +#elif defined(__FreeBSD__) + UGETW(endpoint->wMaxPacketSize), +#endif endpoint->bInterval); } @@ -881,8 +893,13 @@ static int ath10k_usb_setup_pipe_resources(struct ath10k *ar, pipe->ar_usb = ar_usb; pipe->logical_pipe_num = pipe_num; +#if defined(__linux__) pipe->ep_address = endpoint->bEndpointAddress; pipe->max_packet_size = le16_to_cpu(endpoint->wMaxPacketSize); +#elif defined(__FreeBSD__) + pipe->ep_address = endpoint->bEndpointAddress & UE_ADDR; + pipe->max_packet_size = UGETW(endpoint->wMaxPacketSize); +#endif if (ATH10K_USB_IS_BULK_EP(endpoint->bmAttributes)) { if (ATH10K_USB_IS_DIR_IN(pipe->ep_address)) { @@ -1017,8 +1034,13 @@ static int ath10k_usb_probe(struct usb_interface *interface, netif_napi_add(ar->napi_dev, &ar->napi, ath10k_usb_napi_poll); usb_get_dev(dev); +#if defined(__linux__) vendor_id = le16_to_cpu(dev->descriptor.idVendor); product_id = le16_to_cpu(dev->descriptor.idProduct); +#elif defined(__FreeBSD__) + vendor_id = UGETW(dev->descriptor.idVendor); + product_id = UGETW(dev->descriptor.idProduct); +#endif ath10k_dbg(ar, ATH10K_DBG_BOOT, "usb new func vendor 0x%04x product 0x%04x\n", From nobody Fri Feb 27 02:29:59 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNS3jQRz6T7tt for ; Fri, 27 Feb 2026 02:30:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNR6xByz41bQ for ; Fri, 27 Feb 2026 02:29:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159399; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Y+QmVCRnriHYxkoVkUwSDfqAJMrIYa/5hxyXZwafgo=; b=lOJxoU8vtgaY1QGgFZGW3heJaiELghgkGtF+zYIwvAW2GpOgO377i3eAh+6EJ52vK08sJQ kGB5A8qg3PNum9imS8KK2Wb6b46UKLlUBKSWklbkBkhhjVtyLNI2tqxFcXZh/y8shiM5tx V2oQoP6/hQit8xd6eRamhgW0NsNH6+tgwFmFxHFiQ+4bqynI9F6iY6kT5/zxhugTe9IYvI H7hBRGBp9+Nkj6fpilgaD2JFcflQhWXuEdLwOl+V/+s2NVfMUO40q7Q55RKEkf0XI+qhls /bxXe1KWHeyVaWDAoe7VoLn4VXia6r0MXNYvXvDlYr3yHrWslMJmgIoZGXzw1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159399; a=rsa-sha256; cv=none; b=BvJWMXQ6qoMIXgX8jwSFU/RDRyBhopCtkOOyLbZnd0oymGT1bXvtPZtuG6yYp+tr4uT9BZ kYpIVdU/C00LZYCUcD0FXztUdogYbD3bmxQ343UQCinoPkkdgayxx8sDG55DFtLoFMjbI5 oM+EomPEH8B5qar+Wq/1C1kdEV5q2Z1cuVOj946Tvn27MrmFbD4n130r3BYUopcvmQNB3/ W0yjCmdvjEkEMjEhexGNFLSzFRxVg39y49VpBkiqjjeKuHiQNwnCxTaDuvd8NRCPRj71xk /NaZ2YIJQ7z8RdSf7mq4WhrFGo5vJa9B+WTFdW1HyIJ1dJcSgxffxBXgrpEIBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159399; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Y+QmVCRnriHYxkoVkUwSDfqAJMrIYa/5hxyXZwafgo=; b=mj5BciX2DaynrxOX9tAnvtb1CSeYo9Be1NbesHe5ai7MwTOYZBZFTdxI+JCFxa3OCcHd21 ypN/r9IiwU/8E2lovDojcrlynzgpCvw8GDqy+0YPefBxgMz+8JEbwt2k72S1A/hpNqJ+kM +Xf7w8k9t4iI9itIFx6id2KwkbRLj2SMysEznbw6j+sjhLn9Zmt7BzjOxM3ptqXpn3j528 v4xUs/YzMyirZwxHyCnzmeEHA/kN/hEHhlDP7iqlXcBMlP9SiVkksNzH9R/GPplHhUbf9B 7Cp+UprN301sH8EnymvsRbEARefjZZmvO3+xlubXGzSHUGw7ldxnz9WF+6qwKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNR681NzyX7 for ; Fri, 27 Feb 2026 02:29:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f6f9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: 0d9a154fe73b - stable/15 - rtw89: update Realtek's rtw89 driver List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 0d9a154fe73ba61951708f277bf9aee992588545 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:59 +0000 Message-Id: <69a101a7.1f6f9.28ce93a2@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=0d9a154fe73ba61951708f277bf9aee992588545 commit 0d9a154fe73ba61951708f277bf9aee992588545 Author: Bjoern A. Zeeb AuthorDate: 2025-12-05 20:48:02 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:06:04 +0000 rtw89: update Realtek's rtw89 driver This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 24d479d26b25bce5faea3ddd9fa8f3a6c3129ea7 ( tag: v6.19-rc6 ). Sponsored by: The FreeBSD Foundation PR: 285228 (cherry picked from commit 10f91d9ff7b827aac6035e224e6ddc2c79f3a0cd) --- sys/contrib/dev/rtw89/Kconfig | 22 + sys/contrib/dev/rtw89/Makefile | 6 + sys/contrib/dev/rtw89/cam.c | 173 +++--- sys/contrib/dev/rtw89/cam.h | 446 ++++------------ sys/contrib/dev/rtw89/chan.c | 11 +- sys/contrib/dev/rtw89/chan.h | 10 +- sys/contrib/dev/rtw89/coex.c | 5 +- sys/contrib/dev/rtw89/core.c | 911 ++++++++++++++++++++++++++++---- sys/contrib/dev/rtw89/core.h | 242 ++++++++- sys/contrib/dev/rtw89/debug.c | 424 ++++++++++++++- sys/contrib/dev/rtw89/debug.h | 1 + sys/contrib/dev/rtw89/fw.c | 353 ++++++++++--- sys/contrib/dev/rtw89/fw.h | 144 ++++- sys/contrib/dev/rtw89/mac.c | 270 ++++++++-- sys/contrib/dev/rtw89/mac.h | 115 +++- sys/contrib/dev/rtw89/mac80211.c | 124 ++++- sys/contrib/dev/rtw89/mac_be.c | 10 +- sys/contrib/dev/rtw89/pci.c | 486 +++++++++++++---- sys/contrib/dev/rtw89/pci.h | 132 ++++- sys/contrib/dev/rtw89/pci_be.c | 18 +- sys/contrib/dev/rtw89/phy.c | 541 +++++++++++++++++-- sys/contrib/dev/rtw89/phy.h | 24 +- sys/contrib/dev/rtw89/phy_be.c | 13 + sys/contrib/dev/rtw89/ps.c | 26 +- sys/contrib/dev/rtw89/reg.h | 80 ++- sys/contrib/dev/rtw89/regd.c | 22 +- sys/contrib/dev/rtw89/rtw8851b.c | 7 + sys/contrib/dev/rtw89/rtw8851b_rfk.c | 167 +++--- sys/contrib/dev/rtw89/rtw8851be.c | 4 + sys/contrib/dev/rtw89/rtw8851bu.c | 27 + sys/contrib/dev/rtw89/rtw8852a.c | 129 ++++- sys/contrib/dev/rtw89/rtw8852a_rfk.c | 16 +- sys/contrib/dev/rtw89/rtw8852ae.c | 4 + sys/contrib/dev/rtw89/rtw8852au.c | 79 +++ sys/contrib/dev/rtw89/rtw8852b.c | 7 + sys/contrib/dev/rtw89/rtw8852b_common.c | 6 +- sys/contrib/dev/rtw89/rtw8852b_rfk.c | 6 +- sys/contrib/dev/rtw89/rtw8852be.c | 4 + sys/contrib/dev/rtw89/rtw8852bt.c | 4 + sys/contrib/dev/rtw89/rtw8852bt_rfk.c | 14 +- sys/contrib/dev/rtw89/rtw8852bte.c | 4 + sys/contrib/dev/rtw89/rtw8852bu.c | 26 + sys/contrib/dev/rtw89/rtw8852c.c | 172 +++++- sys/contrib/dev/rtw89/rtw8852c.h | 2 +- sys/contrib/dev/rtw89/rtw8852c_rfk.c | 69 ++- sys/contrib/dev/rtw89/rtw8852ce.c | 4 + sys/contrib/dev/rtw89/rtw8852cu.c | 69 +++ sys/contrib/dev/rtw89/rtw8922a.c | 26 +- sys/contrib/dev/rtw89/rtw8922ae.c | 4 + sys/contrib/dev/rtw89/sar.c | 15 + sys/contrib/dev/rtw89/sar.h | 1 + sys/contrib/dev/rtw89/ser.c | 5 +- sys/contrib/dev/rtw89/txrx.h | 45 +- sys/contrib/dev/rtw89/usb.c | 115 ++-- sys/contrib/dev/rtw89/usb.h | 12 + sys/contrib/dev/rtw89/wow.c | 87 ++- sys/contrib/dev/rtw89/wow.h | 6 + sys/modules/rtw89/Makefile | 7 +- 58 files changed, 4651 insertions(+), 1101 deletions(-) diff --git a/sys/contrib/dev/rtw89/Kconfig b/sys/contrib/dev/rtw89/Kconfig index 4288c30b400a..44d8a7f32bf2 100644 --- a/sys/contrib/dev/rtw89/Kconfig +++ b/sys/contrib/dev/rtw89/Kconfig @@ -74,6 +74,17 @@ config RTW89_8852AE 802.11ax PCIe wireless network (Wi-Fi 6) adapter +config RTW89_8852AU + tristate "Realtek 8852AU USB wireless network (Wi-Fi 6) adapter" + depends on USB + select RTW89_CORE + select RTW89_USB + select RTW89_8852A + help + Select this option will enable support for 8852AU chipset + + 802.11ax USB wireless network (Wi-Fi 6) adapter + config RTW89_8852BE tristate "Realtek 8852BE PCI wireless network (Wi-Fi 6) adapter" depends on PCI @@ -121,6 +132,17 @@ config RTW89_8852CE 802.11ax PCIe wireless network (Wi-Fi 6E) adapter +config RTW89_8852CU + tristate "Realtek 8852CU USB wireless network (Wi-Fi 6E) adapter" + depends on USB + select RTW89_CORE + select RTW89_USB + select RTW89_8852C + help + Select this option will enable support for 8852CU chipset + + 802.11ax USB wireless network (Wi-Fi 6E) adapter + config RTW89_8922AE tristate "Realtek 8922AE/8922AE-VS PCI wireless network (Wi-Fi 7) adapter" depends on PCI diff --git a/sys/contrib/dev/rtw89/Makefile b/sys/contrib/dev/rtw89/Makefile index 23e43c444f69..1be81f254fca 100644 --- a/sys/contrib/dev/rtw89/Makefile +++ b/sys/contrib/dev/rtw89/Makefile @@ -43,6 +43,9 @@ rtw89_8852a-objs := rtw8852a.o \ obj-$(CONFIG_RTW89_8852AE) += rtw89_8852ae.o rtw89_8852ae-objs := rtw8852ae.o +obj-$(CONFIG_RTW89_8852AU) += rtw89_8852au.o +rtw89_8852au-objs := rtw8852au.o + obj-$(CONFIG_RTW89_8852B_COMMON) += rtw89_8852b_common.o rtw89_8852b_common-objs := rtw8852b_common.o @@ -75,6 +78,9 @@ rtw89_8852c-objs := rtw8852c.o \ obj-$(CONFIG_RTW89_8852CE) += rtw89_8852ce.o rtw89_8852ce-objs := rtw8852ce.o +obj-$(CONFIG_RTW89_8852CU) += rtw89_8852cu.o +rtw89_8852cu-objs := rtw8852cu.o + obj-$(CONFIG_RTW89_8922A) += rtw89_8922a.o rtw89_8922a-objs := rtw8922a.o \ rtw8922a_rfk.o diff --git a/sys/contrib/dev/rtw89/cam.c b/sys/contrib/dev/rtw89/cam.c index 385a238fe5cc..9370cbda945c 100644 --- a/sys/contrib/dev/rtw89/cam.c +++ b/sys/contrib/dev/rtw89/cam.c @@ -236,7 +236,8 @@ static int __rtw89_cam_detach_sec_cam(struct rtw89_dev *rtwdev, if (ret) rtw89_err(rtwdev, "failed to update dctl cam del key: %d\n", ret); - ret = rtw89_fw_h2c_cam(rtwdev, rtwvif_link, rtwsta_link, NULL); + ret = rtw89_fw_h2c_cam(rtwdev, rtwvif_link, rtwsta_link, NULL, + RTW89_ROLE_INFO_CHANGE); if (ret) rtw89_err(rtwdev, "failed to update cam del key: %d\n", ret); } @@ -276,7 +277,8 @@ static int __rtw89_cam_attach_sec_cam(struct rtw89_dev *rtwdev, ret); return ret; } - ret = rtw89_fw_h2c_cam(rtwdev, rtwvif_link, rtwsta_link, NULL); + ret = rtw89_fw_h2c_cam(rtwdev, rtwvif_link, rtwsta_link, NULL, + RTW89_ROLE_INFO_CHANGE); if (ret) { rtw89_err(rtwdev, "failed to update addr cam sec entry: %d\n", ret); @@ -760,7 +762,8 @@ int rtw89_cam_init(struct rtw89_dev *rtwdev, struct rtw89_vif_link *rtwvif_link) int rtw89_cam_fill_bssid_cam_info(struct rtw89_dev *rtwdev, struct rtw89_vif_link *rtwvif_link, - struct rtw89_sta_link *rtwsta_link, u8 *cmd) + struct rtw89_sta_link *rtwsta_link, + struct rtw89_h2c_addr_cam_v0 *h2c) { struct rtw89_bssid_cam_entry *bssid_cam = rtw89_get_bssid_cam_of(rtwvif_link, rtwsta_link); @@ -780,20 +783,19 @@ int rtw89_cam_fill_bssid_cam_info(struct rtw89_dev *rtwdev, rcu_read_unlock(); - FWCMD_SET_ADDR_BSSID_IDX(cmd, bssid_cam->bssid_cam_idx); - FWCMD_SET_ADDR_BSSID_OFFSET(cmd, bssid_cam->offset); - FWCMD_SET_ADDR_BSSID_LEN(cmd, bssid_cam->len); - FWCMD_SET_ADDR_BSSID_VALID(cmd, bssid_cam->valid); - FWCMD_SET_ADDR_BSSID_MASK(cmd, bss_mask); - FWCMD_SET_ADDR_BSSID_BB_SEL(cmd, bssid_cam->phy_idx); - FWCMD_SET_ADDR_BSSID_BSS_COLOR(cmd, bss_color); - - FWCMD_SET_ADDR_BSSID_BSSID0(cmd, bssid_cam->bssid[0]); - FWCMD_SET_ADDR_BSSID_BSSID1(cmd, bssid_cam->bssid[1]); - FWCMD_SET_ADDR_BSSID_BSSID2(cmd, bssid_cam->bssid[2]); - FWCMD_SET_ADDR_BSSID_BSSID3(cmd, bssid_cam->bssid[3]); - FWCMD_SET_ADDR_BSSID_BSSID4(cmd, bssid_cam->bssid[4]); - FWCMD_SET_ADDR_BSSID_BSSID5(cmd, bssid_cam->bssid[5]); + h2c->w12 = le32_encode_bits(bssid_cam->bssid_cam_idx, ADDR_CAM_W12_BSSID_IDX) | + le32_encode_bits(bssid_cam->offset, ADDR_CAM_W12_BSSID_OFFSET) | + le32_encode_bits(bssid_cam->len, ADDR_CAM_W12_BSSID_LEN); + h2c->w13 = le32_encode_bits(bssid_cam->valid, ADDR_CAM_W13_BSSID_VALID) | + le32_encode_bits(bss_mask, ADDR_CAM_W13_BSSID_MASK) | + le32_encode_bits(bssid_cam->phy_idx, ADDR_CAM_W13_BSSID_BB_SEL) | + le32_encode_bits(bss_color, ADDR_CAM_W13_BSSID_BSS_COLOR) | + le32_encode_bits(bssid_cam->bssid[0], ADDR_CAM_W13_BSSID_BSSID0) | + le32_encode_bits(bssid_cam->bssid[1], ADDR_CAM_W13_BSSID_BSSID1); + h2c->w14 = le32_encode_bits(bssid_cam->bssid[2], ADDR_CAM_W14_BSSID_BSSID2) | + le32_encode_bits(bssid_cam->bssid[3], ADDR_CAM_W14_BSSID_BSSID3) | + le32_encode_bits(bssid_cam->bssid[4], ADDR_CAM_W14_BSSID_BSSID4) | + le32_encode_bits(bssid_cam->bssid[5], ADDR_CAM_W14_BSSID_BSSID5); return 0; } @@ -813,18 +815,21 @@ void rtw89_cam_fill_addr_cam_info(struct rtw89_dev *rtwdev, struct rtw89_vif_link *rtwvif_link, struct rtw89_sta_link *rtwsta_link, const u8 *scan_mac_addr, - u8 *cmd) + struct rtw89_h2c_addr_cam_v0 *h2c) { struct ieee80211_vif *vif = rtwvif_link_to_vif(rtwvif_link); struct rtw89_addr_cam_entry *addr_cam = rtw89_get_addr_cam_of(rtwvif_link, rtwsta_link); struct ieee80211_sta *sta = rtwsta_link_to_sta_safe(rtwsta_link); + const struct rtw89_chip_info *chip = rtwdev->chip; struct ieee80211_link_sta *link_sta; const u8 *sma = scan_mac_addr ? scan_mac_addr : rtwvif_link->mac_addr; u8 sma_hash, tma_hash, addr_msk_start; + u8 ver = chip->addrcam_ver; u8 sma_start = 0; u8 tma_start = 0; const u8 *tma; + u8 mac_id; rcu_read_lock(); @@ -845,69 +850,79 @@ void rtw89_cam_fill_addr_cam_info(struct rtw89_dev *rtwdev, sma_hash = rtw89_cam_addr_hash(sma_start, sma); tma_hash = rtw89_cam_addr_hash(tma_start, tma); - FWCMD_SET_ADDR_IDX(cmd, addr_cam->addr_cam_idx); - FWCMD_SET_ADDR_OFFSET(cmd, addr_cam->offset); - FWCMD_SET_ADDR_LEN(cmd, addr_cam->len); - - FWCMD_SET_ADDR_VALID(cmd, addr_cam->valid); - FWCMD_SET_ADDR_NET_TYPE(cmd, rtwvif_link->net_type); - FWCMD_SET_ADDR_BCN_HIT_COND(cmd, rtwvif_link->bcn_hit_cond); - FWCMD_SET_ADDR_HIT_RULE(cmd, rtwvif_link->hit_rule); - FWCMD_SET_ADDR_BB_SEL(cmd, rtwvif_link->phy_idx); - FWCMD_SET_ADDR_ADDR_MASK(cmd, addr_cam->addr_mask); - FWCMD_SET_ADDR_MASK_SEL(cmd, addr_cam->mask_sel); - FWCMD_SET_ADDR_SMA_HASH(cmd, sma_hash); - FWCMD_SET_ADDR_TMA_HASH(cmd, tma_hash); - - FWCMD_SET_ADDR_BSSID_CAM_IDX(cmd, addr_cam->bssid_cam_idx); - - FWCMD_SET_ADDR_SMA0(cmd, sma[0]); - FWCMD_SET_ADDR_SMA1(cmd, sma[1]); - FWCMD_SET_ADDR_SMA2(cmd, sma[2]); - FWCMD_SET_ADDR_SMA3(cmd, sma[3]); - FWCMD_SET_ADDR_SMA4(cmd, sma[4]); - FWCMD_SET_ADDR_SMA5(cmd, sma[5]); - - FWCMD_SET_ADDR_TMA0(cmd, tma[0]); - FWCMD_SET_ADDR_TMA1(cmd, tma[1]); - FWCMD_SET_ADDR_TMA2(cmd, tma[2]); - FWCMD_SET_ADDR_TMA3(cmd, tma[3]); - FWCMD_SET_ADDR_TMA4(cmd, tma[4]); - FWCMD_SET_ADDR_TMA5(cmd, tma[5]); - - FWCMD_SET_ADDR_PORT_INT(cmd, rtwvif_link->port); - FWCMD_SET_ADDR_TSF_SYNC(cmd, rtwvif_link->port); - FWCMD_SET_ADDR_TF_TRS(cmd, rtwvif_link->trigger); - FWCMD_SET_ADDR_LSIG_TXOP(cmd, rtwvif_link->lsig_txop); - FWCMD_SET_ADDR_TGT_IND(cmd, rtwvif_link->tgt_ind); - FWCMD_SET_ADDR_FRM_TGT_IND(cmd, rtwvif_link->frm_tgt_ind); - FWCMD_SET_ADDR_MACID(cmd, rtwsta_link ? rtwsta_link->mac_id : - rtwvif_link->mac_id); + mac_id = rtwsta_link ? rtwsta_link->mac_id : rtwvif_link->mac_id; + + if (ver == 0) + h2c->w1 = le32_encode_bits(addr_cam->addr_cam_idx, ADDR_CAM_W1_IDX) | + le32_encode_bits(addr_cam->offset, ADDR_CAM_W1_OFFSET) | + le32_encode_bits(addr_cam->len, ADDR_CAM_W1_LEN); + else + h2c->w1 = le32_encode_bits(addr_cam->addr_cam_idx, ADDR_CAM_W1_V1_IDX) | + le32_encode_bits(addr_cam->offset, ADDR_CAM_W1_V1_OFFSET) | + le32_encode_bits(addr_cam->len, ADDR_CAM_W1_V1_LEN); + + h2c->w2 = le32_encode_bits(addr_cam->valid, ADDR_CAM_W2_VALID) | + le32_encode_bits(rtwvif_link->net_type, ADDR_CAM_W2_NET_TYPE) | + le32_encode_bits(rtwvif_link->bcn_hit_cond, ADDR_CAM_W2_BCN_HIT_COND) | + le32_encode_bits(rtwvif_link->hit_rule, ADDR_CAM_W2_HIT_RULE) | + le32_encode_bits(rtwvif_link->phy_idx, ADDR_CAM_W2_BB_SEL) | + le32_encode_bits(addr_cam->addr_mask, ADDR_CAM_W2_ADDR_MASK) | + le32_encode_bits(addr_cam->mask_sel, ADDR_CAM_W2_MASK_SEL) | + le32_encode_bits(sma_hash, ADDR_CAM_W2_SMA_HASH) | + le32_encode_bits(tma_hash, ADDR_CAM_W2_TMA_HASH); + h2c->w3 = le32_encode_bits(addr_cam->bssid_cam_idx, ADDR_CAM_W3_BSSID_CAM_IDX); + h2c->w4 = le32_encode_bits(sma[0], ADDR_CAM_W4_SMA0) | + le32_encode_bits(sma[1], ADDR_CAM_W4_SMA1) | + le32_encode_bits(sma[2], ADDR_CAM_W4_SMA2) | + le32_encode_bits(sma[3], ADDR_CAM_W4_SMA3); + h2c->w5 = le32_encode_bits(sma[4], ADDR_CAM_W5_SMA4) | + le32_encode_bits(sma[5], ADDR_CAM_W5_SMA5) | + le32_encode_bits(tma[0], ADDR_CAM_W5_TMA0) | + le32_encode_bits(tma[1], ADDR_CAM_W5_TMA1); + h2c->w6 = le32_encode_bits(tma[2], ADDR_CAM_W6_TMA2) | + le32_encode_bits(tma[3], ADDR_CAM_W6_TMA3) | + le32_encode_bits(tma[4], ADDR_CAM_W6_TMA4) | + le32_encode_bits(tma[5], ADDR_CAM_W6_TMA5); + if (ver == 0) + h2c->w8 = le32_encode_bits(rtwvif_link->port, ADDR_CAM_W8_PORT_INT) | + le32_encode_bits(rtwvif_link->port, ADDR_CAM_W8_TSF_SYNC) | + le32_encode_bits(rtwvif_link->trigger, ADDR_CAM_W8_TF_TRS) | + le32_encode_bits(rtwvif_link->lsig_txop, ADDR_CAM_W8_LSIG_TXOP) | + le32_encode_bits(rtwvif_link->tgt_ind, ADDR_CAM_W8_TGT_IND) | + le32_encode_bits(rtwvif_link->frm_tgt_ind, ADDR_CAM_W8_FRM_TGT_IND) | + le32_encode_bits(mac_id, ADDR_CAM_W8_MACID); + else + h2c->w8 = le32_encode_bits(rtwvif_link->port, ADDR_CAM_W8_V1_PORT_INT) | + le32_encode_bits(rtwvif_link->port, ADDR_CAM_W8_V1_TSF_SYNC) | + le32_encode_bits(rtwvif_link->trigger, ADDR_CAM_W8_V1_TF_TRS) | + le32_encode_bits(rtwvif_link->lsig_txop, ADDR_CAM_W8_V1_LSIG_TXOP) | + le32_encode_bits(mac_id, ADDR_CAM_W8_V1_MACID); + if (rtwvif_link->net_type == RTW89_NET_TYPE_INFRA) - FWCMD_SET_ADDR_AID12(cmd, vif->cfg.aid & 0xfff); + h2c->w9 = le32_encode_bits(vif->cfg.aid & 0xfff, ADDR_CAM_W9_AID12); else if (rtwvif_link->net_type == RTW89_NET_TYPE_AP_MODE) - FWCMD_SET_ADDR_AID12(cmd, sta ? sta->aid & 0xfff : 0); - FWCMD_SET_ADDR_WOL_PATTERN(cmd, rtwvif_link->wowlan_pattern); - FWCMD_SET_ADDR_WOL_UC(cmd, rtwvif_link->wowlan_uc); - FWCMD_SET_ADDR_WOL_MAGIC(cmd, rtwvif_link->wowlan_magic); - FWCMD_SET_ADDR_WAPI(cmd, addr_cam->wapi); - FWCMD_SET_ADDR_SEC_ENT_MODE(cmd, addr_cam->sec_ent_mode); - FWCMD_SET_ADDR_SEC_ENT0_KEYID(cmd, addr_cam->sec_ent_keyid[0]); - FWCMD_SET_ADDR_SEC_ENT1_KEYID(cmd, addr_cam->sec_ent_keyid[1]); - FWCMD_SET_ADDR_SEC_ENT2_KEYID(cmd, addr_cam->sec_ent_keyid[2]); - FWCMD_SET_ADDR_SEC_ENT3_KEYID(cmd, addr_cam->sec_ent_keyid[3]); - FWCMD_SET_ADDR_SEC_ENT4_KEYID(cmd, addr_cam->sec_ent_keyid[4]); - FWCMD_SET_ADDR_SEC_ENT5_KEYID(cmd, addr_cam->sec_ent_keyid[5]); - FWCMD_SET_ADDR_SEC_ENT6_KEYID(cmd, addr_cam->sec_ent_keyid[6]); - - FWCMD_SET_ADDR_SEC_ENT_VALID(cmd, addr_cam->sec_cam_map[0] & 0xff); - FWCMD_SET_ADDR_SEC_ENT0(cmd, addr_cam->sec_ent[0]); - FWCMD_SET_ADDR_SEC_ENT1(cmd, addr_cam->sec_ent[1]); - FWCMD_SET_ADDR_SEC_ENT2(cmd, addr_cam->sec_ent[2]); - FWCMD_SET_ADDR_SEC_ENT3(cmd, addr_cam->sec_ent[3]); - FWCMD_SET_ADDR_SEC_ENT4(cmd, addr_cam->sec_ent[4]); - FWCMD_SET_ADDR_SEC_ENT5(cmd, addr_cam->sec_ent[5]); - FWCMD_SET_ADDR_SEC_ENT6(cmd, addr_cam->sec_ent[6]); + h2c->w9 = le32_encode_bits(sta ? sta->aid & 0xfff : 0, ADDR_CAM_W9_AID12); + + h2c->w9 |= le32_encode_bits(rtwvif_link->wowlan_pattern, ADDR_CAM_W9_WOL_PATTERN) | + le32_encode_bits(rtwvif_link->wowlan_uc, ADDR_CAM_W9_WOL_UC) | + le32_encode_bits(rtwvif_link->wowlan_magic, ADDR_CAM_W9_WOL_MAGIC) | + le32_encode_bits(addr_cam->wapi, ADDR_CAM_W9_WAPI) | + le32_encode_bits(addr_cam->sec_ent_mode, ADDR_CAM_W9_SEC_ENT_MODE) | + le32_encode_bits(addr_cam->sec_ent_keyid[0], ADDR_CAM_W9_SEC_ENT0_KEYID) | + le32_encode_bits(addr_cam->sec_ent_keyid[1], ADDR_CAM_W9_SEC_ENT1_KEYID) | + le32_encode_bits(addr_cam->sec_ent_keyid[2], ADDR_CAM_W9_SEC_ENT2_KEYID) | + le32_encode_bits(addr_cam->sec_ent_keyid[3], ADDR_CAM_W9_SEC_ENT3_KEYID) | + le32_encode_bits(addr_cam->sec_ent_keyid[4], ADDR_CAM_W9_SEC_ENT4_KEYID) | + le32_encode_bits(addr_cam->sec_ent_keyid[5], ADDR_CAM_W9_SEC_ENT5_KEYID) | + le32_encode_bits(addr_cam->sec_ent_keyid[6], ADDR_CAM_W9_SEC_ENT6_KEYID); + h2c->w10 = le32_encode_bits(addr_cam->sec_cam_map[0] & 0xff, ADDR_CAM_W10_SEC_ENT_VALID) | + le32_encode_bits(addr_cam->sec_ent[0], ADDR_CAM_W10_SEC_ENT0) | + le32_encode_bits(addr_cam->sec_ent[1], ADDR_CAM_W10_SEC_ENT1) | + le32_encode_bits(addr_cam->sec_ent[2], ADDR_CAM_W10_SEC_ENT2); + h2c->w11 = le32_encode_bits(addr_cam->sec_ent[3], ADDR_CAM_W11_SEC_ENT3) | + le32_encode_bits(addr_cam->sec_ent[4], ADDR_CAM_W11_SEC_ENT4) | + le32_encode_bits(addr_cam->sec_ent[5], ADDR_CAM_W11_SEC_ENT5) | + le32_encode_bits(addr_cam->sec_ent[6], ADDR_CAM_W11_SEC_ENT6); rcu_read_unlock(); } diff --git a/sys/contrib/dev/rtw89/cam.h b/sys/contrib/dev/rtw89/cam.h index 8fd2d776408e..c46b6f91bbdb 100644 --- a/sys/contrib/dev/rtw89/cam.h +++ b/sys/contrib/dev/rtw89/cam.h @@ -12,345 +12,109 @@ #define RTW89_BSSID_MATCH_ALL GENMASK(5, 0) #define RTW89_BSSID_MATCH_5_BYTES GENMASK(4, 0) -static inline void FWCMD_SET_ADDR_IDX(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 1, value, GENMASK(7, 0)); -} - -static inline void FWCMD_SET_ADDR_OFFSET(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 1, value, GENMASK(15, 8)); -} - -static inline void FWCMD_SET_ADDR_LEN(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 1, value, GENMASK(23, 16)); -} - -static inline void FWCMD_SET_ADDR_VALID(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 2, value, BIT(0)); -} - -static inline void FWCMD_SET_ADDR_NET_TYPE(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 2, value, GENMASK(2, 1)); -} - -static inline void FWCMD_SET_ADDR_BCN_HIT_COND(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 2, value, GENMASK(4, 3)); -} - -static inline void FWCMD_SET_ADDR_HIT_RULE(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 2, value, GENMASK(6, 5)); -} - -static inline void FWCMD_SET_ADDR_BB_SEL(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 2, value, BIT(7)); -} - -static inline void FWCMD_SET_ADDR_ADDR_MASK(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 2, value, GENMASK(13, 8)); -} - -static inline void FWCMD_SET_ADDR_MASK_SEL(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 2, value, GENMASK(15, 14)); -} - -static inline void FWCMD_SET_ADDR_SMA_HASH(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 2, value, GENMASK(23, 16)); -} - -static inline void FWCMD_SET_ADDR_TMA_HASH(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 2, value, GENMASK(31, 24)); -} - -static inline void FWCMD_SET_ADDR_BSSID_CAM_IDX(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 3, value, GENMASK(5, 0)); -} - -static inline void FWCMD_SET_ADDR_SMA0(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 4, value, GENMASK(7, 0)); -} - -static inline void FWCMD_SET_ADDR_SMA1(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 4, value, GENMASK(15, 8)); -} - -static inline void FWCMD_SET_ADDR_SMA2(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 4, value, GENMASK(23, 16)); -} - -static inline void FWCMD_SET_ADDR_SMA3(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 4, value, GENMASK(31, 24)); -} - -static inline void FWCMD_SET_ADDR_SMA4(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 5, value, GENMASK(7, 0)); -} - -static inline void FWCMD_SET_ADDR_SMA5(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 5, value, GENMASK(15, 8)); -} - -static inline void FWCMD_SET_ADDR_TMA0(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 5, value, GENMASK(23, 16)); -} - -static inline void FWCMD_SET_ADDR_TMA1(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 5, value, GENMASK(31, 24)); -} - -static inline void FWCMD_SET_ADDR_TMA2(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 6, value, GENMASK(7, 0)); -} - -static inline void FWCMD_SET_ADDR_TMA3(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 6, value, GENMASK(15, 8)); -} - -static inline void FWCMD_SET_ADDR_TMA4(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 6, value, GENMASK(23, 16)); -} - -static inline void FWCMD_SET_ADDR_TMA5(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 6, value, GENMASK(31, 24)); -} - -static inline void FWCMD_SET_ADDR_MACID(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 8, value, GENMASK(7, 0)); -} - -static inline void FWCMD_SET_ADDR_PORT_INT(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 8, value, GENMASK(10, 8)); -} - -static inline void FWCMD_SET_ADDR_TSF_SYNC(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 8, value, GENMASK(13, 11)); -} - -static inline void FWCMD_SET_ADDR_TF_TRS(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 8, value, BIT(14)); -} - -static inline void FWCMD_SET_ADDR_LSIG_TXOP(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 8, value, BIT(15)); -} - -static inline void FWCMD_SET_ADDR_TGT_IND(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 8, value, GENMASK(26, 24)); -} - -static inline void FWCMD_SET_ADDR_FRM_TGT_IND(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 8, value, GENMASK(29, 27)); -} - -static inline void FWCMD_SET_ADDR_AID12(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 9, value, GENMASK(11, 0)); -} - -static inline void FWCMD_SET_ADDR_AID12_0(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 9, value, GENMASK(7, 0)); -} - -static inline void FWCMD_SET_ADDR_AID12_1(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 9, value, GENMASK(11, 8)); -} - -static inline void FWCMD_SET_ADDR_WOL_PATTERN(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 9, value, BIT(12)); -} - -static inline void FWCMD_SET_ADDR_WOL_UC(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 9, value, BIT(13)); -} - -static inline void FWCMD_SET_ADDR_WOL_MAGIC(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 9, value, BIT(14)); -} - -static inline void FWCMD_SET_ADDR_WAPI(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 9, value, BIT(15)); -} - -static inline void FWCMD_SET_ADDR_SEC_ENT_MODE(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 9, value, GENMASK(17, 16)); -} - -static inline void FWCMD_SET_ADDR_SEC_ENT0_KEYID(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 9, value, GENMASK(19, 18)); -} - -static inline void FWCMD_SET_ADDR_SEC_ENT1_KEYID(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 9, value, GENMASK(21, 20)); -} - -static inline void FWCMD_SET_ADDR_SEC_ENT2_KEYID(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 9, value, GENMASK(23, 22)); -} - -static inline void FWCMD_SET_ADDR_SEC_ENT3_KEYID(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 9, value, GENMASK(25, 24)); -} - -static inline void FWCMD_SET_ADDR_SEC_ENT4_KEYID(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 9, value, GENMASK(27, 26)); -} - -static inline void FWCMD_SET_ADDR_SEC_ENT5_KEYID(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 9, value, GENMASK(29, 28)); -} - -static inline void FWCMD_SET_ADDR_SEC_ENT6_KEYID(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 9, value, GENMASK(31, 30)); -} - -static inline void FWCMD_SET_ADDR_SEC_ENT_VALID(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 10, value, GENMASK(7, 0)); -} - -static inline void FWCMD_SET_ADDR_SEC_ENT0(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 10, value, GENMASK(15, 8)); -} - -static inline void FWCMD_SET_ADDR_SEC_ENT1(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 10, value, GENMASK(23, 16)); -} - -static inline void FWCMD_SET_ADDR_SEC_ENT2(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 10, value, GENMASK(31, 24)); -} - -static inline void FWCMD_SET_ADDR_SEC_ENT3(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 11, value, GENMASK(7, 0)); -} - -static inline void FWCMD_SET_ADDR_SEC_ENT4(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 11, value, GENMASK(15, 8)); -} - -static inline void FWCMD_SET_ADDR_SEC_ENT5(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 11, value, GENMASK(23, 16)); -} - -static inline void FWCMD_SET_ADDR_SEC_ENT6(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 11, value, GENMASK(31, 24)); -} - -static inline void FWCMD_SET_ADDR_BSSID_IDX(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 12, value, GENMASK(7, 0)); -} - -static inline void FWCMD_SET_ADDR_BSSID_OFFSET(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 12, value, GENMASK(15, 8)); -} - -static inline void FWCMD_SET_ADDR_BSSID_LEN(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 12, value, GENMASK(23, 16)); -} - -static inline void FWCMD_SET_ADDR_BSSID_VALID(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 13, value, BIT(0)); -} - -static inline void FWCMD_SET_ADDR_BSSID_BB_SEL(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 13, value, BIT(1)); -} - -static inline void FWCMD_SET_ADDR_BSSID_MASK(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 13, value, GENMASK(7, 2)); -} - -static inline void FWCMD_SET_ADDR_BSSID_BSS_COLOR(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 13, value, GENMASK(13, 8)); -} - -static inline void FWCMD_SET_ADDR_BSSID_BSSID0(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 13, value, GENMASK(23, 16)); -} - -static inline void FWCMD_SET_ADDR_BSSID_BSSID1(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 13, value, GENMASK(31, 24)); -} - -static inline void FWCMD_SET_ADDR_BSSID_BSSID2(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 14, value, GENMASK(7, 0)); -} - -static inline void FWCMD_SET_ADDR_BSSID_BSSID3(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 14, value, GENMASK(15, 8)); -} +struct rtw89_h2c_addr_cam_v0 { + __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; +} __packed; -static inline void FWCMD_SET_ADDR_BSSID_BSSID4(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 14, value, GENMASK(23, 16)); -} +struct rtw89_h2c_addr_cam { + struct rtw89_h2c_addr_cam_v0 v0; + __le32 w15; +} __packed; -static inline void FWCMD_SET_ADDR_BSSID_BSSID5(void *cmd, u32 value) -{ - le32p_replace_bits((__le32 *)(cmd) + 14, value, GENMASK(31, 24)); -} +#define ADDR_CAM_W1_IDX GENMASK(7, 0) +#define ADDR_CAM_W1_OFFSET GENMASK(15, 8) +#define ADDR_CAM_W1_LEN GENMASK(23, 16) +#define ADDR_CAM_W1_V1_IDX GENMASK(9, 0) +#define ADDR_CAM_W1_V1_OFFSET GENMASK(23, 16) +#define ADDR_CAM_W1_V1_LEN GENMASK(31, 24) +#define ADDR_CAM_W2_VALID BIT(0) +#define ADDR_CAM_W2_NET_TYPE GENMASK(2, 1) +#define ADDR_CAM_W2_BCN_HIT_COND GENMASK(4, 3) +#define ADDR_CAM_W2_HIT_RULE GENMASK(6, 5) +#define ADDR_CAM_W2_BB_SEL BIT(7) +#define ADDR_CAM_W2_ADDR_MASK GENMASK(13, 8) +#define ADDR_CAM_W2_MASK_SEL GENMASK(15, 14) +#define ADDR_CAM_W2_SMA_HASH GENMASK(23, 16) +#define ADDR_CAM_W2_TMA_HASH GENMASK(31, 24) +#define ADDR_CAM_W3_BSSID_CAM_IDX GENMASK(5, 0) +#define ADDR_CAM_W4_SMA0 GENMASK(7, 0) +#define ADDR_CAM_W4_SMA1 GENMASK(15, 8) +#define ADDR_CAM_W4_SMA2 GENMASK(23, 16) +#define ADDR_CAM_W4_SMA3 GENMASK(31, 24) +#define ADDR_CAM_W5_SMA4 GENMASK(7, 0) +#define ADDR_CAM_W5_SMA5 GENMASK(15, 8) +#define ADDR_CAM_W5_TMA0 GENMASK(23, 16) +#define ADDR_CAM_W5_TMA1 GENMASK(31, 24) +#define ADDR_CAM_W6_TMA2 GENMASK(7, 0) +#define ADDR_CAM_W6_TMA3 GENMASK(15, 8) +#define ADDR_CAM_W6_TMA4 GENMASK(23, 16) +#define ADDR_CAM_W6_TMA5 GENMASK(31, 24) +#define ADDR_CAM_W8_MACID GENMASK(7, 0) +#define ADDR_CAM_W8_PORT_INT GENMASK(10, 8) +#define ADDR_CAM_W8_TSF_SYNC GENMASK(13, 11) +#define ADDR_CAM_W8_TF_TRS BIT(14) +#define ADDR_CAM_W8_LSIG_TXOP BIT(15) +#define ADDR_CAM_W8_TGT_IND GENMASK(26, 24) +#define ADDR_CAM_W8_FRM_TGT_IND GENMASK(29, 27) +#define ADDR_CAM_W8_V1_MACID GENMASK(9, 0) +#define ADDR_CAM_W8_V1_PORT_INT GENMASK(18, 16) +#define ADDR_CAM_W8_V1_TSF_SYNC GENMASK(21, 19) +#define ADDR_CAM_W8_V1_TF_TRS BIT(22) +#define ADDR_CAM_W8_V1_LSIG_TXOP BIT(23) +#define ADDR_CAM_W8_V1_TB_RANGING BIT(24) +#define ADDR_CAM_W8_V1_TB_SENSING BIT(25) +#define ADDR_CAM_W8_V1_SENS_EN BIT(26) +#define ADDR_CAM_W9_AID12 GENMASK(11, 0) +#define ADDR_CAM_W9_AID12_0 GENMASK(7, 0) +#define ADDR_CAM_W9_AID12_1 GENMASK(11, 8) +#define ADDR_CAM_W9_WOL_PATTERN BIT(12) +#define ADDR_CAM_W9_WOL_UC BIT(13) +#define ADDR_CAM_W9_WOL_MAGIC BIT(14) +#define ADDR_CAM_W9_WAPI BIT(15) +#define ADDR_CAM_W9_SEC_ENT_MODE GENMASK(17, 16) +#define ADDR_CAM_W9_SEC_ENT0_KEYID GENMASK(19, 18) +#define ADDR_CAM_W9_SEC_ENT1_KEYID GENMASK(21, 20) +#define ADDR_CAM_W9_SEC_ENT2_KEYID GENMASK(23, 22) +#define ADDR_CAM_W9_SEC_ENT3_KEYID GENMASK(25, 24) +#define ADDR_CAM_W9_SEC_ENT4_KEYID GENMASK(27, 26) +#define ADDR_CAM_W9_SEC_ENT5_KEYID GENMASK(29, 28) +#define ADDR_CAM_W9_SEC_ENT6_KEYID GENMASK(31, 30) +#define ADDR_CAM_W10_SEC_ENT_VALID GENMASK(7, 0) +#define ADDR_CAM_W10_SEC_ENT0 GENMASK(15, 8) +#define ADDR_CAM_W10_SEC_ENT1 GENMASK(23, 16) +#define ADDR_CAM_W10_SEC_ENT2 GENMASK(31, 24) +#define ADDR_CAM_W11_SEC_ENT3 GENMASK(7, 0) +#define ADDR_CAM_W11_SEC_ENT4 GENMASK(15, 8) +#define ADDR_CAM_W11_SEC_ENT5 GENMASK(23, 16) +#define ADDR_CAM_W11_SEC_ENT6 GENMASK(31, 24) +#define ADDR_CAM_W12_BSSID_IDX GENMASK(7, 0) +#define ADDR_CAM_W12_BSSID_OFFSET GENMASK(15, 8) +#define ADDR_CAM_W12_BSSID_LEN GENMASK(23, 16) +#define ADDR_CAM_W13_BSSID_VALID BIT(0) +#define ADDR_CAM_W13_BSSID_BB_SEL BIT(1) +#define ADDR_CAM_W13_BSSID_MASK GENMASK(7, 2) +#define ADDR_CAM_W13_BSSID_BSS_COLOR GENMASK(13, 8) +#define ADDR_CAM_W13_BSSID_BSSID0 GENMASK(23, 16) +#define ADDR_CAM_W13_BSSID_BSSID1 GENMASK(31, 24) +#define ADDR_CAM_W14_BSSID_BSSID2 GENMASK(7, 0) +#define ADDR_CAM_W14_BSSID_BSSID3 GENMASK(15, 8) +#define ADDR_CAM_W14_BSSID_BSSID4 GENMASK(23, 16) +#define ADDR_CAM_W14_BSSID_BSSID5 GENMASK(31, 24) +#define ADDR_CAM_W15_UPD_MODE GENMASK(2, 0) struct rtw89_h2c_dctlinfo_ud_v1 { __le32 c0; @@ -552,9 +316,10 @@ int rtw89_cam_init_bssid_cam(struct rtw89_dev *rtwdev, void rtw89_cam_deinit_bssid_cam(struct rtw89_dev *rtwdev, struct rtw89_bssid_cam_entry *bssid_cam); void rtw89_cam_fill_addr_cam_info(struct rtw89_dev *rtwdev, - struct rtw89_vif_link *vif, + struct rtw89_vif_link *rtwvif_link, struct rtw89_sta_link *rtwsta_link, - const u8 *scan_mac_addr, u8 *cmd); + const u8 *scan_mac_addr, + struct rtw89_h2c_addr_cam_v0 *h2c); void rtw89_cam_fill_dctl_sec_cam_info_v1(struct rtw89_dev *rtwdev, struct rtw89_vif_link *rtwvif_link, struct rtw89_sta_link *rtwsta_link, @@ -565,7 +330,8 @@ void rtw89_cam_fill_dctl_sec_cam_info_v2(struct rtw89_dev *rtwdev, struct rtw89_h2c_dctlinfo_ud_v2 *h2c); int rtw89_cam_fill_bssid_cam_info(struct rtw89_dev *rtwdev, struct rtw89_vif_link *rtwvif_link, - struct rtw89_sta_link *rtwsta_link, u8 *cmd); + struct rtw89_sta_link *rtwsta_link, + struct rtw89_h2c_addr_cam_v0 *h2c); int rtw89_cam_sec_key_add(struct rtw89_dev *rtwdev, struct ieee80211_vif *vif, struct ieee80211_sta *sta, diff --git a/sys/contrib/dev/rtw89/chan.c b/sys/contrib/dev/rtw89/chan.c index bbdae184a0df..220b0f4988f7 100644 --- a/sys/contrib/dev/rtw89/chan.c +++ b/sys/contrib/dev/rtw89/chan.c @@ -281,6 +281,7 @@ void rtw89_entity_init(struct rtw89_dev *rtwdev) { struct rtw89_hal *hal = &rtwdev->hal; struct rtw89_entity_mgnt *mgnt = &hal->entity_mgnt; + int i, j; hal->entity_pause = false; bitmap_zero(hal->entity_map, NUM_OF_RTW89_CHANCTX); @@ -289,6 +290,11 @@ void rtw89_entity_init(struct rtw89_dev *rtwdev) INIT_LIST_HEAD(&mgnt->active_list); + for (i = 0; i < RTW89_MAX_INTERFACE_NUM; i++) { + for (j = 0; j < __RTW89_MLD_MAX_LINK_NUM; j++) + mgnt->chanctx_tbl[i][j] = RTW89_CHANCTX_IDLE; + } + rtw89_config_default_chandef(rtwdev); } @@ -353,7 +359,7 @@ static void rtw89_normalize_link_chanctx(struct rtw89_dev *rtwdev, const struct rtw89_chan *__rtw89_mgnt_chan_get(struct rtw89_dev *rtwdev, const char *caller_message, - u8 link_index) + u8 link_index, bool nullchk) { struct rtw89_hal *hal = &rtwdev->hal; struct rtw89_entity_mgnt *mgnt = &hal->entity_mgnt; @@ -400,6 +406,9 @@ const struct rtw89_chan *__rtw89_mgnt_chan_get(struct rtw89_dev *rtwdev, return rtw89_chan_get(rtwdev, chanctx_idx); dflt: + if (unlikely(nullchk)) + return NULL; + rtw89_debug(rtwdev, RTW89_DBG_CHAN, "%s (%s): prefetch NULL on link index %u\n", __func__, caller_message ?: "", link_index); diff --git a/sys/contrib/dev/rtw89/chan.h b/sys/contrib/dev/rtw89/chan.h index b1175419f92b..5b22764d5329 100644 --- a/sys/contrib/dev/rtw89/chan.h +++ b/sys/contrib/dev/rtw89/chan.h @@ -180,10 +180,16 @@ void rtw89_chanctx_proceed(struct rtw89_dev *rtwdev, const struct rtw89_chan *__rtw89_mgnt_chan_get(struct rtw89_dev *rtwdev, const char *caller_message, - u8 link_index); + u8 link_index, bool nullchk); #define rtw89_mgnt_chan_get(rtwdev, link_index) \ - __rtw89_mgnt_chan_get(rtwdev, __func__, link_index) + __rtw89_mgnt_chan_get(rtwdev, __func__, link_index, false) + +static inline const struct rtw89_chan * +rtw89_mgnt_chan_get_or_null(struct rtw89_dev *rtwdev, u8 link_index) +{ + return __rtw89_mgnt_chan_get(rtwdev, NULL, link_index, true); +} struct rtw89_mcc_links_info { struct rtw89_vif_link *links[NUM_OF_RTW89_MCC_ROLES]; diff --git a/sys/contrib/dev/rtw89/coex.c b/sys/contrib/dev/rtw89/coex.c index e4e6daf51a1b..0f7ae572ef91 100644 --- a/sys/contrib/dev/rtw89/coex.c +++ b/sys/contrib/dev/rtw89/coex.c @@ -93,7 +93,7 @@ static const struct rtw89_btc_fbtc_slot s_def[] = { [CXST_E2G] = __DEF_FBTC_SLOT(5, 0xea5a5a5a, SLOT_MIX), [CXST_E5G] = __DEF_FBTC_SLOT(5, 0xffffffff, SLOT_ISO), [CXST_EBT] = __DEF_FBTC_SLOT(5, 0xe5555555, SLOT_MIX), - [CXST_ENULL] = __DEF_FBTC_SLOT(5, 0xaaaaaaaa, SLOT_ISO), + [CXST_ENULL] = __DEF_FBTC_SLOT(5, 0x55555555, SLOT_MIX), [CXST_WLK] = __DEF_FBTC_SLOT(250, 0xea5a5a5a, SLOT_MIX), [CXST_W1FDD] = __DEF_FBTC_SLOT(50, 0xffffffff, SLOT_ISO), [CXST_B1FDD] = __DEF_FBTC_SLOT(50, 0xffffdfff, SLOT_ISO), @@ -4153,6 +4153,7 @@ void rtw89_btc_set_policy_v1(struct rtw89_dev *rtwdev, u16 policy_type) s_def[CXST_EBT].cxtbl, s_def[CXST_EBT].cxtype); _slot_set_le(btc, CXST_ENULL, s_def[CXST_ENULL].dur, s_def[CXST_ENULL].cxtbl, s_def[CXST_ENULL].cxtype); + _slot_set_dur(btc, CXST_EBT, dur_2); break; case BTC_CXP_OFFE_DEF2: _slot_set(btc, CXST_E2G, 20, cxtbl[1], SLOT_ISO); @@ -4162,6 +4163,7 @@ void rtw89_btc_set_policy_v1(struct rtw89_dev *rtwdev, u16 policy_type) s_def[CXST_EBT].cxtbl, s_def[CXST_EBT].cxtype); _slot_set_le(btc, CXST_ENULL, s_def[CXST_ENULL].dur, s_def[CXST_ENULL].cxtbl, s_def[CXST_ENULL].cxtype); + _slot_set_dur(btc, CXST_EBT, dur_2); break; case BTC_CXP_OFFE_2GBWMIXB: if (a2dp->exist) @@ -4170,6 +4172,7 @@ void rtw89_btc_set_policy_v1(struct rtw89_dev *rtwdev, u16 policy_type) _slot_set(btc, CXST_E2G, 5, tbl_w1, SLOT_MIX); _slot_set_le(btc, CXST_EBT, cpu_to_le16(40), s_def[CXST_EBT].cxtbl, s_def[CXST_EBT].cxtype); + _slot_set_dur(btc, CXST_EBT, dur_2); break; case BTC_CXP_OFFE_WL: /* for 4-way */ _slot_set(btc, CXST_E2G, 5, cxtbl[1], SLOT_MIX); diff --git a/sys/contrib/dev/rtw89/core.c b/sys/contrib/dev/rtw89/core.c index 1220378d08cf..b1b16dda3304 100644 --- a/sys/contrib/dev/rtw89/core.c +++ b/sys/contrib/dev/rtw89/core.c @@ -7,6 +7,7 @@ #endif #include +#include #include #include "cam.h" @@ -292,17 +293,18 @@ rtw89_get_6ghz_span(struct rtw89_dev *rtwdev, u32 center_freq) return NULL; } -bool rtw89_ra_report_to_bitrate(struct rtw89_dev *rtwdev, u8 rpt_rate, u16 *bitrate) +bool rtw89_legacy_rate_to_bitrate(struct rtw89_dev *rtwdev, u8 legacy_rate, u16 *bitrate) { - struct ieee80211_rate rate; + const struct ieee80211_rate *rate; - if (unlikely(rpt_rate >= ARRAY_SIZE(rtw89_bitrates))) { - rtw89_debug(rtwdev, RTW89_DBG_UNEXP, "invalid rpt rate %d\n", rpt_rate); + if (unlikely(legacy_rate >= ARRAY_SIZE(rtw89_bitrates))) { + rtw89_debug(rtwdev, RTW89_DBG_UNEXP, + "invalid legacy rate %d\n", legacy_rate); return false; } - rate = rtw89_bitrates[rpt_rate]; - *bitrate = rate.bitrate; + rate = &rtw89_bitrates[legacy_rate]; *** 9550 LINES SKIPPED *** From nobody Fri Feb 27 02:29:58 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNQ6wDkz6T7x8 for ; Fri, 27 Feb 2026 02:29:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNQ5Hrkz41SN for ; Fri, 27 Feb 2026 02:29:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d6zoCg9lHgjO1GiZheBY6CiwI0ialdkU+vKfkj+jh18=; b=wH5bhpeXkiiMW0b1HXVmG497v+kXCB9ucZY5xIZnfwr928flPcEhlZmKISl9alUnL3K4RJ nCm4aSEE9pJQ67G3r2UZRqxA5EDgspfu/K/IcVmKCnYjYrf7xAgLviH0vlDn3Jpcfo5acX 1hMRRMMBKjDyZJo9is0r9xXpk6daocj0sZLoi9vqau5OIEUeueWdEVuNhawbCdgY6o0y/j u/J4Msi1lGuahk3eoJDLB+bCGgFPq527d2VphbBKvERfrC9qpLJujhBkWnaHU7mwW/eSZw ir6YiKZREAgXVOav21cQjs4BU86csPhlSH1z6HORyevMVdOg46vvOH5/gI+DRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159398; a=rsa-sha256; cv=none; b=eYgUgFZFvS4dlStgITYB2yUeOIcj7VNzv5HzGtzdLmtHgAN+evP5FT/nY4ddnniJx3MWxO KcRU1o7/9TjKDafsYW0QtAdxgRYH/LX8CLSDdOnE7d1sVa4PePNGX95KytTPqeMDuFFwD0 30M47pMOYGfwsHuoOT+NdHn5BRNxLOwr5OwORQ1tRXO60XkJc7TVgp/yIegI2G15y6E0w2 uByeaPYSMScuPRc0DQhsxe9wQ6rHC5BqcYjsUHqOk+4uah/utzoQK+sOTuBQOJcYwwCMIV j5tvEdYuFdv036Yc0msUHFiqJIGILGMPsXkO09sRCLF4Jni5eM+OUU/kdHtfHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d6zoCg9lHgjO1GiZheBY6CiwI0ialdkU+vKfkj+jh18=; b=BkuAnuvzBttMmWc26+LDHEh1JePSbFGvRGAIf2VNGlZKiOeMuG7A5uLsY1X/6ZqB9cJeSW UfTJslxyraEsop5WhGSKdfD0SSPO8sAEPs/MQ8qeRRrbgNgdbDIWQXfhWEKSa1Btg0jVnt jyN1dqpP1NaTbavwtkTijWuEopBG8Ugu0XcMEEeyVesBIGXAzXs/ytnGeBZrFEGEvskZDO MID6JTzY9s28GnrTfYntfg5kC2O9PSNPRR+2HiwitalQNtKeLpBRraZEiLSbV7VWFpgx/P 4PmsWNrMqxo8LBCYxpQJ6KUbQlggmx3vjxRXebkUIl7gD3W9ScTtrq4gjBCpKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNQ4pFDzyg6 for ; Fri, 27 Feb 2026 02:29:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21a23 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:29: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: 3c6c9a9f043b - stable/15 - ath10k: modules Makefile bus attachments List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3c6c9a9f043b30523329c06bf9e1ec1954ff6831 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:29:58 +0000 Message-Id: <69a101a6.21a23.61c69192@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=3c6c9a9f043b30523329c06bf9e1ec1954ff6831 commit 3c6c9a9f043b30523329c06bf9e1ec1954ff6831 Author: Bjoern A. Zeeb AuthorDate: 2026-02-07 22:31:59 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:05:59 +0000 ath10k: modules Makefile bus attachments Given USB in theory compiles add it to the Makefile. The upstream support was never finished and I see little chances it ever will be so keep USB disabled by default. (cherry picked from commit 32efafda38288848ec71e97eddf085ee0c108109) --- sys/modules/ath10k/Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/modules/ath10k/Makefile b/sys/modules/ath10k/Makefile index 93518c66f89f..16f481116357 100644 --- a/sys/modules/ath10k/Makefile +++ b/sys/modules/ath10k/Makefile @@ -2,6 +2,10 @@ DEVATH10KDIR= ${SRCTOP}/sys/contrib/dev/athk/ath10k .PATH: ${DEVATH10KDIR} +# Bus attachments. +WITH_PCI= 1 +WITH_USB= 0 # Never finished upstream, not working. + WITH_CONFIG_FWLOG= 1 WITH_LEDS= 0 @@ -12,7 +16,15 @@ SRCS+= htc.c htt.c htt_rx.c htt_tx.c SRCS+= txrx.c wmi.c wmi-tlv.c SRCS+= p2p.c swap.c +# PCI parts; PCI needs to be compiled into the kernel and cannot be loaded. +.if defined(WITH_PCI) && ${WITH_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} SRCS+= pci.c +.endif + +# USB parts; USB can be loaded and is unconditional on any kernel config. +.if defined(WITH_USB) && ${WITH_USB} > 0 +SRCS+= usb.c +.endif # Other SRCS+= ${LINUXKPI_GENSRCS} From nobody Fri Feb 27 02:30:01 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNV2xD1z6T7pM for ; Fri, 27 Feb 2026 02:30:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNV0QhSz41hF for ; Fri, 27 Feb 2026 02:30:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159402; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G3clL0NIrPQGBjdxeVKu6wLF8XqKH0u5C3GTwrFs020=; b=ekkI/DvkHOB3HwU31AvhMkj8U+bl17QVS28w/OcJisFQG1ZILzEd1NsE36Y1agwHN8T90H z7T84twJMDlhwi+dFnnoV1hJOrw7QgUlsE5GH7y0DHAtfTnVSsEfjp/b+OZ7xqxY9pGtrm ahPpM+mbYpaFJwYmnc9ODLjuimE0qp5ByAhQjUsKcwqGNu8WYneUU8WvqcmRoCYjPSO+bt YrjHNBuCWfgR4xqSDBVv+Xm+1gB8iV07PCl1U6PgXbtu+C86R3YF3hERHJPCXl16FSNhUe H9BzsYuh/JkeZjezjC9+O6tayQayMTfW968cE7G1d5jIsAtKfInvNuvfFOAcdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159402; a=rsa-sha256; cv=none; b=KiNQLmUaI/Hskg1S05kWiOBC4QBjqBQXSrcYkLbBr3q71f8OxLipsm0dwlbzo6It0T7Gyf zTG1D3/9qkj3D2a5dkzwTqL8sUia8/bWGZ+1O3TXPMfwQKCqYv+GsRH644kJsmRPJrAMlZ 4LyuWMJjl6bDlojT+3QNlbO7WEhZ90yx1m7LxodUT4hCAgK9iaNex5/w72Guce/BuISagf 8QWOiCwDA+kyMN555tj5rjDZxFDrOm/a3MXw27hrE1B3aP8pfYjNLN4jASGVfCwL2Eu4lD qidNQoTy5mPunsNXHzdV//SBlNWcnNHZ4RoU4o8puFkB9QcFjot4+zmYcTL4cQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159402; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G3clL0NIrPQGBjdxeVKu6wLF8XqKH0u5C3GTwrFs020=; b=MEMHfMxFGPuZLMumEZ9PIg/wrAgNZCqVWU6cVTYHg0TuvIIUVhaBxj+A6NJSwt7WIeZcZZ 1qJ6X5PIAm5UQZsMzKNAlHlYvgndvZuSY/ewvBtnvLxRcRa3TVAzZbfaqAWt4FUAQsRLFz sQ3Dtd7I6TYRWNpYXjHggknR+6kEYSgnunSdjiPnv7iOgbW/75k2nGuLCHWUkwZJOWPrj0 j51DAm/QZHw2EswuXx1kEf6cYZygXycUcsX+GcESgdzlUsS7EciqleLwGEZhPD4qMdLsiS blIeF/zJUKqBr5FobxOBfTvmj78JmbcVH8LQfgfJkRtmjnxdvusIaHl4FU4/zA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNT6rC1zxRC for ; Fri, 27 Feb 2026 02:30:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22380 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:30:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: db3daf95e05f - stable/15 - rtw88: Add bus attachments to the module Makefile List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: db3daf95e05fae9149d2779379c4642c12d3968c Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:30:01 +0000 Message-Id: <69a101a9.22380.5414d9c1@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=db3daf95e05fae9149d2779379c4642c12d3968c commit db3daf95e05fae9149d2779379c4642c12d3968c Author: Bjoern A. Zeeb AuthorDate: 2026-01-26 13:19:14 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:06:20 +0000 rtw88: Add bus attachments to the module Makefile In addition to PCIe we will support USB and also prepare for SDIO (still disabled locally). The module SRCS are split up into a common part, which we always add. All three bus parts are guarded by a local variable in the Makefile. In addition the PCI parts require PCI to be compiled into the kernel. We add that check in case of, e.g., SoCs with SDIO but no PCI, which may not have PCI in the kernel config and thus the module would fail to attach. USB has no additional check as it is fully loadable and does not have to be in a kernel config. SDIO depends on an MMCCAM-enabled kernel but is otherwise loadable. While we could, we are not splitting the various bus attachments into individual modules as we generally do not do that in FreeBSD. [1] Sponsored by: The FreeBSD Foundation Discussed with: imp and jhb (2022, 2024), see also 17732dd8f01b [1] OKed by: imp (KERN_OPTS checks initially suggested by jhb) Differential Revision: https://reviews.freebsd.org/D55022 (cherry picked from commit 9e175561196066a09c1a89202fd60e0433b87868) --- sys/modules/rtw88/Makefile | 82 +++++++++++++++++++++++++++++++++------------- 1 file changed, 59 insertions(+), 23 deletions(-) diff --git a/sys/modules/rtw88/Makefile b/sys/modules/rtw88/Makefile index 0ce6ad3f99bb..2347093db1a5 100644 --- a/sys/modules/rtw88/Makefile +++ b/sys/modules/rtw88/Makefile @@ -1,7 +1,15 @@ +.include + DEVRTW88DIR= ${SRCTOP}/sys/contrib/dev/rtw88 .PATH: ${DEVRTW88DIR} +# Bus attachments. +WITH_PCI= 1 +WITH_USB= 0 +WITH_SDIO= 0 + +# Options. WITH_CONFIG_PM= 0 WITH_DEBUGFS= 1 WITH_LEDS= 0 @@ -19,41 +27,69 @@ SRCS+= wow.c CFLAGS+= -DCONFIG_PM=${WITH_CONFIG_PM} .endif -# PCI parts. +# Common +SRCS+= rtw8723x.c # 87x3 common +SRCS+= rtw8703b.c rtw8703b_tables.c # 11n +SRCS+= rtw8723d.c rtw8723d_table.c # 11n +SRCS+= rtw8814a.c rtw8814a_table.c # 11ac +SRCS+= rtw8821c.c rtw8821c_table.c # 11ac +SRCS+= rtw8822b.c rtw8822b_table.c # 11ac +SRCS+= rtw8822c.c rtw8822c_table.c # 11ac + +# PCI parts; PCI needs to be compiled into the kernel and cannot be loaded. +.if defined(WITH_PCI) && ${WITH_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} SRCS+= pci.c -SRCS+= rtw8723x.c # 87x3 common -SRCS+= rtw8703b.c rtw8703b_tables.c # 11n -SRCS+= rtw8723d.c rtw8723d_table.c rtw8723de.c # 11n -SRCS+= rtw8821c.c rtw8821c_table.c rtw8821ce.c # 11ac -SRCS+= rtw8822b.c rtw8822b_table.c rtw8822be.c # 11ac -SRCS+= rtw8822c.c rtw8822c_table.c rtw8822ce.c # 11ac -SRCS+= rtw8814a.c rtw8814a_table.c rtw8814ae.c # 11ac - -# USB parts -#SRCS+= rtw88xxa.c # 88xxa common -#SRCS+= rtw8812a.c rtw8812a_table.c rtw8812au.c -#SRCS+= rtw8814au.c -#SRCS+= rtw8821a.c rtw8821a_table.c rtw8821au.c -#CFLAGS+= -DCONFIG_RTW88_USB +SRCS+= rtw8723de.c +SRCS+= rtw8814ae.c +SRCS+= rtw8821ce.c +SRCS+= rtw8822be.c +SRCS+= rtw8822ce.c +.endif + +# USB parts; USB can be loaded and is unconditional on any kernel config. +.if defined(WITH_USB) && ${WITH_USB} > 0 +SRCS+= usb.c +SRCS+= rtw8723du.c +SRCS+= rtw88xxa.c # 88xxa common +SRCS+= rtw8812a.c rtw8812a_table.c rtw8812au.c +SRCS+= rtw8814au.c +SRCS+= rtw8821a.c rtw8821a_table.c rtw8821au.c +SRCS+= rtw8821cu.c +SRCS+= rtw8822bu.c +SRCS+= rtw8822cu.c + +CFLAGS+= -DCONFIG_RTW88_USB +.endif + +# SDIO parts; SDIO depends on an MMCCAM kernel. +.if defined(WITH_SDIO) && ${WITH_SDIO} > 0 && ${KERN_OPTS:MMMCCAM} +SRCS+= rtw8723cs.c +SRCS+= rtw8723ds.c +SRCS+= rtw8821cs.c +SRCS+= rtw8822bs.c +SRCS+= rtw8822cs.c +.endif .if defined(WITH_LEDS) && ${WITH_LEDS} > 0 CFLAGS+= -DCONFIG_RTW88_LEDS SRCS+= led.c .endif +.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0 +CFLAGS+= -DCONFIG_RTW88_DEBUGFS +.endif + # Other -SRCS+= ${LINUXKPI_GENSRCS} -SRCS+= opt_wlan.h opt_inet6.h opt_inet.h +SRCS+= opt_wlan.h opt_inet6.h opt_inet.h +SRCS+= ${LINUXKPI_GENSRCS} -CFLAGS+= -DKBUILD_MODNAME='"rtw88"' -CFLAGS+= -DLINUXKPI_VERSION=61900 +CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS+= -I${DEVRTW88DIR} -CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS+= -DCONFIG_RTW88_DEBUG -.if defined(WITH_DEBUGFS) && ${WITH_DEBUGFS} > 0 -CFLAGS+= -DCONFIG_RTW88_DEBUGFS -.endif + +CFLAGS+= -DKBUILD_MODNAME='"rtw88"' +CFLAGS+= -DLINUXKPI_VERSION=61900 # Helpful after fresh imports. #CFLAGS+= -ferror-limit=0 From nobody Fri Feb 27 02:30:00 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNT1qtxz6T7tw for ; Fri, 27 Feb 2026 02:30:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNS6whBz41fC for ; Fri, 27 Feb 2026 02:30:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mCD7oQ8yFkGP6Fnov8UmQrViPQd0Sqz6d01D6qaXXq8=; b=uttrwNZT/C9xYghA/KUkwEtWP1IFgOvKUX37U5K+s28Z4zjSgYR4xbYhaRFE4+aGiKtH4k VH7loy2vF56gk8kdSSZobZDu/fSG0YHhJ5SVqynNIjPm4mOvJeVkfq4oh9A+/brUjEx1do qVJaswDXnoz5qgR6V+opLTwOSzgewTdXLFIIur1E0lD11O1scnr6f3CNfRvjG+0kOmkWxc eQDzf/vlWCSrvB7QyjHaUYJrLza9Elzv89G6BUtBMWIaHR+8z7niFSMVixF4rVuzLIVoFU oLJo9MbBwTyMlq+TCkN0N31mHhT/0hI+VQ7RJCg1tb7O5GSzkV2z1qtgrb8jxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159401; a=rsa-sha256; cv=none; b=LiaFf1Kjnnl0k/EMW32U/v9eubh3jH3W3Hkf6/u3aWCN35npvXkgQqk5vPyZNOd9mRbrYC 3Md8/6XPLvknWprPijv2nszYHL3ai4ZOr2r0nYgR7Il0bq1QlUcz2WwBwDcfef0WZG/9q6 6eFyCzatFTotYIbS01bieQ26r9ZLGa+wunMY6B2BnHgsV9ynaDMtJJ6L1GrcVG0BmwMs6T fqfSX8jsPjnu/kcklPZ8PAG88cv2pDTUFCoK6vDASoPYVO9p2bltjl1VqwXRWkFwH1eZpN aIQGOSLCjtN5lpVHogiFZ5RYlsUO890BsBHNHlW48elTOdcIUgrYc7PnJi+IqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mCD7oQ8yFkGP6Fnov8UmQrViPQd0Sqz6d01D6qaXXq8=; b=UvQ2Y20k0oD+mnD9xvIqo/EOy/BTlDQRcGVJEdOGLOTrUU0LgJViYyVYq2xxZyKEqDGHm+ ODNb5UFkH10mIvm+oGVVwBdyeEk8MsUeNVjdYEnqcsw52J5DGclPb+cIfV2bXlOQBG8EWN fAzY2ASDEm8PpoIpfD6tz6ytrn2JKwbhddat0m/O+vnOk5N5+A76GJexeD4UFkxrqVQktG h4yrVR3j+tC1dZ5hqXtsBbmfHYpOTQp9HNfW7Q/V+Bg1B1Gb/DBWB0JCnj2CKDymfq5OJ9 wNab70pqrJaQ9bWwWJGJk1zsFBe3EDZkejhLsndMzCS9ekc5uP69aTz42Kn76A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNS6TqgzxRB for ; Fri, 27 Feb 2026 02:30:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22213 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:30: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: 3e42c294ef76 - stable/15 - rtw88: harmonize all MODULE_DEPEND to rtw88 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3e42c294ef76e5fdfb22bb4cbf0dcc35d61b144d Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:30:00 +0000 Message-Id: <69a101a8.22213.43f4a4cc@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=3e42c294ef76e5fdfb22bb4cbf0dcc35d61b144d commit 3e42c294ef76e5fdfb22bb4cbf0dcc35d61b144d Author: Bjoern A. Zeeb AuthorDate: 2026-01-26 16:18:49 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:06:15 +0000 rtw88: harmonize all MODULE_DEPEND to rtw88 From the time I used to split up the driver into a core part and bus attachment sub-drivers the various bus attachments had their own module name but all is "rtw88" now. Core functionality depends on linuxkpi, linuxkpi_wlan, and for debug.c lindebugfs. Each bus attachment then depends on its own parent layer if needed: PCI gets pull in through linuxkpi, USB: depends on [the future] linuxkpi_usb, and SDIO: depends on [the future] linuxkpi_sdio. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55021 (cherry picked from commit 49c1b388d5a89761980d24aee14f3bd0db7c0dda) --- sys/contrib/dev/rtw88/debug.c | 4 ++++ sys/contrib/dev/rtw88/main.c | 5 +++++ sys/contrib/dev/rtw88/pci.c | 8 -------- sys/contrib/dev/rtw88/usb.c | 5 +---- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/sys/contrib/dev/rtw88/debug.c b/sys/contrib/dev/rtw88/debug.c index 53742a3220f2..1e2b11cf1dd3 100644 --- a/sys/contrib/dev/rtw88/debug.c +++ b/sys/contrib/dev/rtw88/debug.c @@ -1381,3 +1381,7 @@ void rtw_dbg(struct rtw_dev *rtwdev, enum rtw_debug_mask mask, EXPORT_SYMBOL(rtw_dbg); #endif /* CONFIG_RTW88_DEBUG */ + +#ifdef CONFIG_RTW88_DEBUGFS +MODULE_DEPEND(rtw88, lindebugfs, 1, 1, 1); +#endif diff --git a/sys/contrib/dev/rtw88/main.c b/sys/contrib/dev/rtw88/main.c index d9e6e9477dfb..b38709b180fd 100644 --- a/sys/contrib/dev/rtw88/main.c +++ b/sys/contrib/dev/rtw88/main.c @@ -2591,3 +2591,8 @@ void rtw_set_ampdu_factor(struct rtw_dev *rtwdev, struct ieee80211_vif *vif, MODULE_AUTHOR("Realtek Corporation"); MODULE_DESCRIPTION("Realtek 802.11ac wireless core module"); MODULE_LICENSE("Dual BSD/GPL"); +#if defined(__FreeBSD__) +MODULE_VERSION(rtw88, 1); +MODULE_DEPEND(rtw88, linuxkpi, 1, 1, 1); +MODULE_DEPEND(rtw88, linuxkpi_wlan, 1, 1, 1); +#endif diff --git a/sys/contrib/dev/rtw88/pci.c b/sys/contrib/dev/rtw88/pci.c index e4cbaae4646f..1dc4f5915d2d 100644 --- a/sys/contrib/dev/rtw88/pci.c +++ b/sys/contrib/dev/rtw88/pci.c @@ -1964,11 +1964,3 @@ EXPORT_SYMBOL(rtw_pci_shutdown); MODULE_AUTHOR("Realtek Corporation"); MODULE_DESCRIPTION("Realtek PCI 802.11ac wireless driver"); MODULE_LICENSE("Dual BSD/GPL"); -#if defined(__FreeBSD__) -MODULE_VERSION(rtw_pci, 1); -MODULE_DEPEND(rtw_pci, linuxkpi, 1, 1, 1); -MODULE_DEPEND(rtw_pci, linuxkpi_wlan, 1, 1, 1); -#ifdef CONFIG_RTW88_DEBUGFS -MODULE_DEPEND(rtw_pci, lindebugfs, 1, 1, 1); -#endif -#endif diff --git a/sys/contrib/dev/rtw88/usb.c b/sys/contrib/dev/rtw88/usb.c index 9fe00af9fc0e..69a4cb60184f 100644 --- a/sys/contrib/dev/rtw88/usb.c +++ b/sys/contrib/dev/rtw88/usb.c @@ -1379,8 +1379,5 @@ MODULE_AUTHOR("Realtek Corporation"); MODULE_DESCRIPTION("Realtek USB 802.11ac wireless driver"); MODULE_LICENSE("Dual BSD/GPL"); #if defined(__FreeBSD__) -MODULE_VERSION(rtw88_usb, 1); -MODULE_DEPEND(rtw88_usb, rtw88_core, 1, 1, 1); -MODULE_DEPEND(rtw88_usb, linuxkpi, 1, 1, 1); -MODULE_DEPEND(rtw88_usb, linuxkpi_wlan, 1, 1, 1); +MODULE_DEPEND(rtw88, linuxkpi_usb, 1, 1, 1); #endif From nobody Fri Feb 27 02:30:03 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNW6QJVz6T83c for ; Fri, 27 Feb 2026 02:30:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNW0qcRz41fT for ; Fri, 27 Feb 2026 02:30:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eVzRO19+jgD7zt9mCZgchGeOjpySFIx9ns/PYCx2Z6A=; b=V2Kd3RQaiqJykgyaTrr55Fop2yLJa7LNXY5q5RCS81ZPk5J0lz6iEkPq3H2jnkRU6Ds+KC Km5exUabJC4gHcIleHasRAwTBg96aUx/k8kCRfQ8O/r7XwLgQSZquqLoAp+Wt8cCs4gBQA yy6DoW8LM/YAh0Gpb+rl9Ezr7XZo3P00iNXyKJVup1gz30bNwFqR3vae7rhuY0llF4Ivy9 ieP6nHXMEPtH67OxjCEjE8LzS8RMsWOhBXnhXfNnOIvCoCBIE7QyX2Z6DD81etAx1bBceq KHsTynIT9xRnSDij699EMHO1ckzcUxHgB2dxeElUrPiwIzTlIb+XXHMMEsP2cw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159403; a=rsa-sha256; cv=none; b=W/D72NZVbRfvzCBM6cWA+/RlfvpdFhEvKnfRM+4aqP8dLktOwtMhnH7tc8QsuD6VKpIQKP OB0hFonNxIfAjZvyFli/+pn8NCgtHY4MgE09rtLYdf6q3F5N7CT877PTfVOGS6Su3VZbK1 M9ejuaGmaF0xX1ta4+qAlw+vD+KlDQ6VPyH2J1lem80C1clqMaIjjDHTz3nEPqNps6ougW YfMYacHQND7FatI9r1wrt7pq4Mg0Zfw4gftqOILDw1w8v1OvMWSAX/cJjtBsFg91fNZNjy 1aI9JwSpQkBHTIM+41wEi7cI1rXLTdFzSEX0k8W2tqvhIFMYXXWKngeCOai3xA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eVzRO19+jgD7zt9mCZgchGeOjpySFIx9ns/PYCx2Z6A=; b=Sj7RYumIIwgD4bpJwIl3Cf2mq/9Vbax3xqHn+csnbCu4N8Oouim4/mDvvhhoBD2yt2+Aar Sa5VLr1QcOK0NHD7WtLc5aXU+Z9BuenrQ2ffyShQ1rMCz/f38L+XAIw77i38109spAyZ/p uYXO5ofq5HddIvGQbzmW7MCsmaRpwZpzM4dwlkY9GBBwddYs/RHh1MZi02HX3V6f+vZY+M tipQOct/oCuvHsNJI9/OU6ac943Q6FwgtHdTmaz5Dv7pmMdXxBwUAEqJjJu/lyJwnIN0/e +OI+MYkD0f6FMhyjhLPR24WIpsCttZIpZjP0ydsSTBpPKPFObVa4U6F68MYqfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNW08Lvzy77 for ; Fri, 27 Feb 2026 02:30:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22400 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:30: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: e5643f312af2 - stable/15 - rtw89: cleanup static_assert() calls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: e5643f312af2da1e77b3cf90d204e910ee851134 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:30:03 +0000 Message-Id: <69a101ab.22400.478ab5b3@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e5643f312af2da1e77b3cf90d204e910ee851134 commit e5643f312af2da1e77b3cf90d204e910ee851134 Author: Bjoern A. Zeeb AuthorDate: 2026-01-20 22:51:28 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:06:37 +0000 rtw89: cleanup static_assert() calls These days we can use static_assert() without trouble so remove the FreeBSD-specific rtw89_static_assert implementation. This reduces the diff to upstream and will ease future driver updates. Sponsored by: The FreeBSD Foundation (cherry picked from commit 57b839612b7abb891057f1efe380c509664f868b) --- sys/contrib/dev/rtw89/core.h | 6 ------ sys/contrib/dev/rtw89/debug.c | 12 ------------ sys/contrib/dev/rtw89/fw.h | 8 -------- sys/contrib/dev/rtw89/phy.c | 8 -------- sys/contrib/dev/rtw89/rtw8851b.c | 6 ------ sys/contrib/dev/rtw89/rtw8852c.c | 6 ------ sys/contrib/dev/rtw89/rtw8852c_rfk.c | 4 ---- sys/contrib/dev/rtw89/sar.c | 4 ---- sys/contrib/dev/rtw89/ser.c | 4 ---- 9 files changed, 58 deletions(-) diff --git a/sys/contrib/dev/rtw89/core.h b/sys/contrib/dev/rtw89/core.h index a8bfa538515e..b6b810567a35 100644 --- a/sys/contrib/dev/rtw89/core.h +++ b/sys/contrib/dev/rtw89/core.h @@ -7703,10 +7703,4 @@ void rtw89_core_ntfy_btc_event(struct rtw89_dev *rtwdev, enum rtw89_btc_hmsg eve int rtw89_core_mlsr_switch(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif, unsigned int link_id); -#if defined(__linux__) -#define rtw89_static_assert(_x) static_assert(_x) -#elif defined(__FreeBSD__) -#define rtw89_static_assert(_x) _Static_assert(_x, "bad array size") -#endif - #endif diff --git a/sys/contrib/dev/rtw89/debug.c b/sys/contrib/dev/rtw89/debug.c index ad11256fffb7..0db142ba6d89 100644 --- a/sys/contrib/dev/rtw89/debug.c +++ b/sys/contrib/dev/rtw89/debug.c @@ -505,11 +505,7 @@ static const struct txpwr_ent __txpwr_ent_byr_ax[] = { __GEN_TXPWR_ENT4("HEDCM_2NSS", "MCS0 ", "MCS1 ", "MCS3 ", "MCS4 "), }; -#if defined(__linux__) static_assert((ARRAY_SIZE(__txpwr_ent_byr_ax) * 4) == -#elif defined(__FreeBSD__) -rtw89_static_assert((ARRAY_SIZE(__txpwr_ent_byr_ax) * 4) == -#endif (R_AX_PWR_BY_RATE_MAX - R_AX_PWR_BY_RATE + 4)); static const struct txpwr_map __txpwr_map_byr_ax = { @@ -565,11 +561,7 @@ static const struct txpwr_ent __txpwr_ent_lmt_ax[] = { __GEN_TXPWR_ENT2("MCS_2TX_40M_2p5", "NON_BF", "BF"), }; -#if defined(__linux__) static_assert((ARRAY_SIZE(__txpwr_ent_lmt_ax) * 2) == -#elif defined(__FreeBSD__) -rtw89_static_assert((ARRAY_SIZE(__txpwr_ent_lmt_ax) * 2) == -#endif (R_AX_PWR_LMT_MAX - R_AX_PWR_LMT + 4)); static const struct txpwr_map __txpwr_map_lmt_ax = { @@ -597,11 +589,7 @@ static const struct txpwr_ent __txpwr_ent_lmt_ru_ax[] = { "RU106_4", "RU106_5", "RU106_6", "RU106_7"), }; -#if defined(__linux__) static_assert((ARRAY_SIZE(__txpwr_ent_lmt_ru_ax) * 8) == -#elif defined(__FreeBSD__) -rtw89_static_assert((ARRAY_SIZE(__txpwr_ent_lmt_ru_ax) * 8) == -#endif (R_AX_PWR_RU_LMT_MAX - R_AX_PWR_RU_LMT + 4)); static const struct txpwr_map __txpwr_map_lmt_ru_ax = { diff --git a/sys/contrib/dev/rtw89/fw.h b/sys/contrib/dev/rtw89/fw.h index 940a7b39bee1..cedb4a47a769 100644 --- a/sys/contrib/dev/rtw89/fw.h +++ b/sys/contrib/dev/rtw89/fw.h @@ -3608,11 +3608,7 @@ struct rtw89_fw_c2h_attr { static inline struct rtw89_fw_c2h_attr *RTW89_SKB_C2H_CB(struct sk_buff *skb) { -#if defined(__linux__) static_assert(sizeof(skb->cb) >= sizeof(struct rtw89_fw_c2h_attr)); -#elif defined(__FreeBSD__) - rtw89_static_assert(sizeof(skb->cb) >= sizeof(struct rtw89_fw_c2h_attr)); -#endif return (struct rtw89_fw_c2h_attr *)skb->cb; } @@ -3818,11 +3814,7 @@ struct rtw89_mac_mcc_tsf_rpt { u32 tsf_y_high; }; -#if defined(__linux__) static_assert(sizeof(struct rtw89_mac_mcc_tsf_rpt) <= RTW89_COMPLETION_BUF_SIZE); -#elif defined(__FreeBSD__) -rtw89_static_assert(sizeof(struct rtw89_mac_mcc_tsf_rpt) <= RTW89_COMPLETION_BUF_SIZE); -#endif #define RTW89_GET_MAC_C2H_MCC_TSF_RPT_MACID_X(c2h) \ le32_get_bits(*((const __le32 *)(c2h) + 2), GENMASK(7, 0)) diff --git a/sys/contrib/dev/rtw89/phy.c b/sys/contrib/dev/rtw89/phy.c index bbd4e3d7d360..f60753369516 100644 --- a/sys/contrib/dev/rtw89/phy.c +++ b/sys/contrib/dev/rtw89/phy.c @@ -2856,11 +2856,7 @@ rtw89_phy_fill_txpwr_limit_ru_160m_ax(struct rtw89_dev *rtwdev, static const int ofst[] = { -14, -10, -6, -2, 2, 6, 10, 14 }; int i; -#if defined(__linux__) static_assert(ARRAY_SIZE(ofst) == RTW89_RU_SEC_NUM_AX); -#elif defined(__FreeBSD__) - rtw89_static_assert(ARRAY_SIZE(ofst) == RTW89_RU_SEC_NUM_AX); -#endif for (i = 0; i < RTW89_RU_SEC_NUM_AX; i++) { lmt_ru->ru26[i] = rtw89_phy_read_txpwr_limit_ru(rtwdev, band, RTW89_RU26, @@ -7556,11 +7552,7 @@ static void [RTW89_RFK_F_DELAY] = _rfk_delay, }; -#if defined(__linux__) static_assert(ARRAY_SIZE(_rfk_handler) == RTW89_RFK_F_NUM); -#elif defined(__FreeBSD__) -rtw89_static_assert(ARRAY_SIZE(_rfk_handler) == RTW89_RFK_F_NUM); -#endif void rtw89_rfk_parser(struct rtw89_dev *rtwdev, const struct rtw89_rfk_tbl *tbl) diff --git a/sys/contrib/dev/rtw89/rtw8851b.c b/sys/contrib/dev/rtw89/rtw8851b.c index 04246a31cc0e..84b628d23882 100644 --- a/sys/contrib/dev/rtw89/rtw8851b.c +++ b/sys/contrib/dev/rtw89/rtw8851b.c @@ -1825,15 +1825,9 @@ static void rtw8851b_bb_set_tx_shape_dfir(struct rtw89_dev *rtwdev, #define __DFIR_CFG_ADDR(i) (R_TXFIR0 + ((i) << 2)) #define __DFIR_CFG_MASK 0xffffffff #define __DFIR_CFG_NR 8 -#if defined(__linux__) #define __DECL_DFIR_PARAM(_name, _val...) \ static const u32 param_ ## _name[] = {_val}; \ static_assert(ARRAY_SIZE(param_ ## _name) == __DFIR_CFG_NR) -#elif defined(__FreeBSD__) -#define __DECL_DFIR_PARAM(_name, _val...) \ - static const u32 param_ ## _name[] = {_val}; \ - rtw89_static_assert(ARRAY_SIZE(param_ ## _name) == __DFIR_CFG_NR) -#endif __DECL_DFIR_PARAM(flat, 0x023D23FF, 0x0029B354, 0x000FC1C8, 0x00FDB053, diff --git a/sys/contrib/dev/rtw89/rtw8852c.c b/sys/contrib/dev/rtw89/rtw8852c.c index 6f272aab48a5..db99450e9158 100644 --- a/sys/contrib/dev/rtw89/rtw8852c.c +++ b/sys/contrib/dev/rtw89/rtw8852c.c @@ -2085,15 +2085,9 @@ static void rtw8852c_bb_set_tx_shape_dfir(struct rtw89_dev *rtwdev, { #define __DFIR_CFG_MASK 0xffffff #define __DFIR_CFG_NR 8 -#if defined(__linux__) #define __DECL_DFIR_VAR(_prefix, _name, _val...) \ static const u32 _prefix ## _ ## _name[] = {_val}; \ static_assert(ARRAY_SIZE(_prefix ## _ ## _name) == __DFIR_CFG_NR) -#elif defined(__FreeBSD__) -#define __DECL_DFIR_VAR(_prefix, _name, _val...) \ - static const u32 _prefix ## _ ## _name[] = {_val}; \ - rtw89_static_assert(ARRAY_SIZE(_prefix ## _ ## _name) == __DFIR_CFG_NR) -#endif #define __DECL_DFIR_PARAM(_name, _val...) __DECL_DFIR_VAR(param, _name, _val) #define __DECL_DFIR_ADDR(_name, _val...) __DECL_DFIR_VAR(addr, _name, _val) diff --git a/sys/contrib/dev/rtw89/rtw8852c_rfk.c b/sys/contrib/dev/rtw89/rtw8852c_rfk.c index 129b940da62a..cbee484dee30 100644 --- a/sys/contrib/dev/rtw89/rtw8852c_rfk.c +++ b/sys/contrib/dev/rtw89/rtw8852c_rfk.c @@ -2704,11 +2704,7 @@ static void _dpk_cal_select(struct rtw89_dev *rtwdev, bool force, u8 path; bool is_fail = true, reloaded[RTW8852C_DPK_RF_PATH] = {false}; -#if defined(__linux__) static_assert(ARRAY_SIZE(kip_reg) == RTW8852C_DPK_KIP_REG_NUM); -#elif defined(__FreeBSD__) - rtw89_static_assert(ARRAY_SIZE(kip_reg) == RTW8852C_DPK_KIP_REG_NUM); -#endif if (dpk->is_dpk_reload_en) { for (path = 0; path < RTW8852C_DPK_RF_PATH; path++) { diff --git a/sys/contrib/dev/rtw89/sar.c b/sys/contrib/dev/rtw89/sar.c index ed3fa4e6b0a5..ef7feccccd5e 100644 --- a/sys/contrib/dev/rtw89/sar.c +++ b/sys/contrib/dev/rtw89/sar.c @@ -406,11 +406,7 @@ static const struct cfg80211_sar_freq_ranges rtw89_common_sar_freq_ranges[] = { { .start_freq = 6875, .end_freq = 7115, }, }; -#if defined(__linux__) static_assert(RTW89_SAR_SUBBAND_NR == -#elif defined(__FreeBSD__) -rtw89_static_assert(RTW89_SAR_SUBBAND_NR == -#endif ARRAY_SIZE(rtw89_common_sar_freq_ranges)); const struct cfg80211_sar_capa rtw89_sar_capa = { diff --git a/sys/contrib/dev/rtw89/ser.c b/sys/contrib/dev/rtw89/ser.c index 03f56b03875a..f99e179f7ff9 100644 --- a/sys/contrib/dev/rtw89/ser.c +++ b/sys/contrib/dev/rtw89/ser.c @@ -620,11 +620,7 @@ struct __fw_backtrace_info { u32 sp; } __packed; -#if defined(__linux__) static_assert(RTW89_FW_BACKTRACE_INFO_SIZE == -#elif defined(__FreeBSD__) -rtw89_static_assert(RTW89_FW_BACKTRACE_INFO_SIZE == -#endif sizeof(struct __fw_backtrace_info)); static u32 convert_addr_from_wcpu(u32 wcpu_addr) From nobody Fri Feb 27 02:30:05 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNY5yklz6T7rb for ; Fri, 27 Feb 2026 02: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNY2HJdz41YN for ; Fri, 27 Feb 2026 02: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=1772159405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yQriIJp7TMnyGmx+Ed3zscnu6dAbCkgKCE/M9gVS+T4=; b=i6dcongXox900hi1Mo9S/xW5bIOh2deGoWPDmhGWTsMw84+w2JSePG9M99/KbEH7wuzgoo xVi55qSxqniLFTJBg27B6g61bau9B9PDy7r4DEVqf0nrV1T1GbW40cgK1EhPXvw94OeweH RJfJPQcxQGsYPDUXt7dfZwCztzZ0kkKbHUFQI3uLhpwOeKxgCM0Q/eFP9rfalfJuhX9Si5 LnXrgbgvFGsy9akBnTUSKET7XEf8lWx3kU5H+gsGWuwnZS+3QcGhf8CFfupq8cdEilspga K6cWLtGlsYR0gh8Ve0gAlZ6maVzYBgR5hAVMzrv3YL0Bg4cvBMhe0wtLwUXzlA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159405; a=rsa-sha256; cv=none; b=X9T78Y+BUcV3WbtGgNkjqdW7yhF/tuhWG23SH8bjekFN7fD6aGK8GJml8ex8kYVG34swcS SCDM1RYWBoXkWGNkoN+3lftJ6fcRxvVez2eHoU98TUdzugab53YUdh95gLk/hqVOC8WoBg Qzfa/x7I+Sxvr3tkesstqn9LGNgdHpsXRKXClKP2ItCabWwWcMXx/JKMtwnpiURS3Jp3Vb QxQlEOxwbppnaLYzFHGQpe7UpzABOK0Vr+8kikQeN+OLjNcpwjn1qb08VlZrVunswfIMMg Eu91SSEHuufqw8O1U1Uf+9Toa4uUdjvwgM3WGPQ5gQOc6b7l9L7W9FACCe68GA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yQriIJp7TMnyGmx+Ed3zscnu6dAbCkgKCE/M9gVS+T4=; b=da1JRN+qFasxWcBhlbzwS7cVfKCyR1SQeaj7tQmRAh+j+sFcZc+dhJBvzQ1I+R31br7NzK 1GsoldtZIIbUdF9pznk4arI1gBaJiCKxWvzB1ZW1O4xU9rH/T/hOsHlvKkBkbh8rtVDVop 0knSlwSihsT/3op2y27AdHeMWhFPyOyTj4dj5eLgzN6sP4b8kxMmalDiZZr4wdZdVPGLU0 jiXABWuPMpUjqFt4VYJrEljQ7hvugKdF/reP5+X8XslzurlBuxA0yC0/mrGZWlfx+aoGR+ Ey22LuSd7jpzEfBp80ixGN7ybIfnCvmYBsgintky4OkMcgu2rPQaVwXp+YD6XA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNY0tw9zyZk for ; Fri, 27 Feb 2026 02:30:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 20fdf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:30: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: d4270bedae78 - stable/15 - rtw89: module Makefile add USB bus attachments List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d4270bedae78866eab8024cfe71770206a2d7840 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:30:05 +0000 Message-Id: <69a101ad.20fdf.72205a75@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=d4270bedae78866eab8024cfe71770206a2d7840 commit d4270bedae78866eab8024cfe71770206a2d7840 Author: Bjoern A. Zeeb AuthorDate: 2026-01-31 23:16:55 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:06:46 +0000 rtw89: module Makefile add USB bus attachments Sponsored by: The FreeBSD Foundation (cherry picked from commit f19cb3c72b001f5ca2204888bfab50e2f388547d) --- sys/modules/rtw89/Makefile | 43 ++++++++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/sys/modules/rtw89/Makefile b/sys/modules/rtw89/Makefile index 701e40fcb2d7..63032afa6f89 100644 --- a/sys/modules/rtw89/Makefile +++ b/sys/modules/rtw89/Makefile @@ -4,6 +4,12 @@ DEVRTW89DIR= ${SRCTOP}/sys/contrib/dev/rtw89 .PATH: ${DEVRTW89DIR} +# Bus attachments. +WITH_PCI= 1 +WITH_USB= 0 +WITH_SDIO= 0 + +# Options. WITH_CONFIG_PM= 0 WITH_DEBUGFS= 0 .if ${KERN_OPTS:MDEV_ACPI} @@ -12,24 +18,20 @@ WITH_CONFIG_ACPI= 1 KMOD= if_rtw89 +# Core parts. SRCS= core.c -SRCS+= pci.c pci_be.c SRCS+= chan.c mac80211.c mac.c mac_be.c phy.c phy_be.c fw.c SRCS+= cam.c efuse.c efuse_be.c regd.c sar.c coex.c ps.c ser.c SRCS+= util.c -SRCS+= rtw8852a.c rtw8852a_rfk.c rtw8852a_rfk_table.c rtw8852a_table.c -SRCS+= rtw8852ae.c -SRCS+= rtw8852c.c rtw8852c_rfk.c rtw8852c_rfk_table.c rtw8852c_table.c -SRCS+= rtw8852ce.c + +# Common SRCS+= rtw8851b.c rtw8851b_rfk.c rtw8851b_rfk_table.c rtw8851b_table.c -SRCS+= rtw8851be.c +SRCS+= rtw8852a.c rtw8852a_rfk.c rtw8852a_rfk_table.c rtw8852a_table.c SRCS+= rtw8852b_common.c SRCS+= rtw8852b.c rtw8852b_rfk.c rtw8852b_rfk_table.c rtw8852b_table.c -SRCS+= rtw8852be.c SRCS+= rtw8852bt.c rtw8852bt_rfk.c rtw8852bt_rfk_table.c -SRCS+= rtw8852bte.c +SRCS+= rtw8852c.c rtw8852c_rfk.c rtw8852c_rfk_table.c rtw8852c_table.c SRCS+= rtw8922a.c rtw8922a_rfk.c -SRCS+= rtw8922ae.c .if defined(WITH_CONFIG_ACPI) && ${WITH_CONFIG_ACPI} > 0 SRCS.DEV_ACPI+= acpi.c @@ -38,10 +40,25 @@ CFLAGS+= -DCONFIG_ACPI # This needs to always stay on for the LinuxKPI header file. CFLAGS+= -DLINUXKPI_WANT_LINUX_ACPI -# USB parts -#SRCS+= rtw8851bu.c -#SRCS+= rtw8852au.c rtw8852bu.c rtw8852cu.c -#SRCS+= usb.c +# PCI parts; PCI needs to be compiled into the kernel and cannot be loaded. +.if defined(WITH_PCI) && ${WITH_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} +SRCS+= pci.c pci_be.c +SRCS+= rtw8851be.c +SRCS+= rtw8852ae.c +SRCS+= rtw8852be.c +SRCS+= rtw8852bte.c +SRCS+= rtw8852ce.c +SRCS+= rtw8922ae.c +.endif + +# USB parts; USB can be loaded and is unconditional on any kernel config. +.if defined(WITH_USB) && ${WITH_USB} > 0 +SRCS+= usb.c +SRCS+= rtw8851bu.c +SRCS+= rtw8852au.c +SRCS+= rtw8852bu.c +SRCS+= rtw8852cu.c +.endif # CONFIG_RTW89_DEBUG (always on for now) SRCS+= debug.c From nobody Fri Feb 27 02:30:04 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNY5vrHz6T862 for ; Fri, 27 Feb 2026 02: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNX11w2z41WT for ; Fri, 27 Feb 2026 02:30:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159404; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ku4rk+iy5BE1C+YdlNuP7mGEOj5vCIuLzo4f7HPenig=; b=cEa6mk8O4pxPNPzXJY3Cq3bhCFdlVsPQNjyXkAvui5+IzZfUnsQ/zQWRWw+9lFfKH/YmAy u59xMlgdqOusc77tkMVk4v1FDClTx/NZhZ4k515DKt+eL0/KqbBthN68m10Tkv6aRiti0/ TlAPOsBiJUiPnFcqmOb+QkYElGoc2EBEq1dFPcykr5x2tChpucX1i9dJYPjI7qJ+66LtVh M8r9lcGy5MrsY+JSt4J/5sjVxMeW6Dh11o+gHdJRL8dm9PZgZv3UKeD5HNgWvB2TEvwv8Q oM+vmo/5tYullTA5yXhL4YArklafn+RfnB9ZGI8b10I+pHCDe/huSk3c/7C8ow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159404; a=rsa-sha256; cv=none; b=R562pMGujo9YZVKr/QJBAem7TWoqxGT5nPAYCnNf94jihaSqz7t7tYQhevnkMS1rz1A3IT XiWgHs2z/0Mdb83P7ZCXh6mwlydIgviTJuB4ydmfm1KqeYE6IzrCJI7pu0PWkkqbExtrET hteAEq3DypmbhMKBeNRKOGjQIIuRnKU81snUEiCXAViqTXA8enzPFJd91YhdlcYWQbY5px y9SbOMZBrhyeHhcGOuSHZisKllhxBh6z7IujbglwU8jI7kuyMHckMb+P8apE2hougoseMf 1spNiTxjWyYUs4LkmBWCpiY0SNQEOernhvv5ddbL2DYLFro8ktTOaIcztGm/eA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159404; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ku4rk+iy5BE1C+YdlNuP7mGEOj5vCIuLzo4f7HPenig=; b=T3iJY46sOGexUlu76svgYysVXanuyryux4XZy0o6O2qz7Hz5UEEX4ztH+DbVg0V+rf+k5a pooPR7miqtwoDAEZPHZO/NuM7G99Kg0vIImLilwFjQ6RMbjaaNC+aFnOlu/BMLll3kvhcQ /JhScqOuBTx4leX1ev1ugdfHG+vImiWq7Aocze15TZsG5jRQv+RtzQ3p/VjQHAC6eNuPa3 quulE1BU9nhVUrpPp9SnIGrQWMzo0uO+NiWjdig6+1m014T2WS28YD5Zk4XM5gBhXn+Rt/ XNio8VIa2SU5iE9IbRx75V9oorkceGC3GJ7CJIrabPlgF6s/+LbtK81RmOLHyw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNX0XxjzyVH for ; Fri, 27 Feb 2026 02:30:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2036c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:30: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: 6ef309629d2d - stable/15 - rtw89: harmonize all MODULE_DEPEND to rtw89 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6ef309629d2d58efba16234ef3e6ae1bc033f439 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:30:04 +0000 Message-Id: <69a101ac.2036c.187d0f4d@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=6ef309629d2d58efba16234ef3e6ae1bc033f439 commit 6ef309629d2d58efba16234ef3e6ae1bc033f439 Author: Bjoern A. Zeeb AuthorDate: 2026-02-07 18:05:40 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:06:41 +0000 rtw89: harmonize all MODULE_DEPEND to rtw89 rtw89 came like rtw88 was done. Given rtw88 once was split up rtw89 got modelled the same way. Clean this up too. Sponsored by: The FreeBSD Foundation (cherry picked from commit 7fc5c8df4c90a2067c936e3026be6bd6840cd5ec) --- sys/contrib/dev/rtw89/core.c | 5 +++++ sys/contrib/dev/rtw89/debug.c | 5 +++++ sys/contrib/dev/rtw89/pci.c | 8 -------- sys/contrib/dev/rtw89/usb.c | 3 +++ 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/sys/contrib/dev/rtw89/core.c b/sys/contrib/dev/rtw89/core.c index b1b16dda3304..aeaf1c8f80c5 100644 --- a/sys/contrib/dev/rtw89/core.c +++ b/sys/contrib/dev/rtw89/core.c @@ -6723,3 +6723,8 @@ EXPORT_SYMBOL(rtw89_free_ieee80211_hw); MODULE_AUTHOR("Realtek Corporation"); MODULE_DESCRIPTION("Realtek 802.11ax wireless core module"); MODULE_LICENSE("Dual BSD/GPL"); +#if defined(__FreeBSD__) +MODULE_VERSION(rtw89, 1); +MODULE_DEPEND(rtw89, linuxkpi, 1, 1, 1); +MODULE_DEPEND(rtw89, linuxkpi_wlan, 1, 1, 1); +#endif diff --git a/sys/contrib/dev/rtw89/debug.c b/sys/contrib/dev/rtw89/debug.c index 0db142ba6d89..086c1dedf03c 100644 --- a/sys/contrib/dev/rtw89/debug.c +++ b/sys/contrib/dev/rtw89/debug.c @@ -4889,3 +4889,8 @@ void rtw89_debug(struct rtw89_dev *rtwdev, enum rtw89_debug_mask mask, } EXPORT_SYMBOL(rtw89_debug); #endif +#if defined(__FreeBSD__) +#ifdef CONFIG_RTW89_DEBUGFS +MODULE_DEPEND(rtw89, lindebugfs, 1, 1, 1); +#endif +#endif diff --git a/sys/contrib/dev/rtw89/pci.c b/sys/contrib/dev/rtw89/pci.c index e8de0f0e9ad8..aeb6570928f9 100644 --- a/sys/contrib/dev/rtw89/pci.c +++ b/sys/contrib/dev/rtw89/pci.c @@ -4931,11 +4931,3 @@ EXPORT_SYMBOL(rtw89_pci_remove); MODULE_AUTHOR("Realtek Corporation"); MODULE_DESCRIPTION("Realtek PCI 802.11ax wireless driver"); MODULE_LICENSE("Dual BSD/GPL"); -#if defined(__FreeBSD__) -MODULE_VERSION(rtw89_pci, 1); -MODULE_DEPEND(rtw89_pci, linuxkpi, 1, 1, 1); -MODULE_DEPEND(rtw89_pci, linuxkpi_wlan, 1, 1, 1); -#ifdef CONFIG_RTW89_DEBUGFS -MODULE_DEPEND(rtw89_pci, lindebugfs, 1, 1, 1); -#endif -#endif diff --git a/sys/contrib/dev/rtw89/usb.c b/sys/contrib/dev/rtw89/usb.c index d7d968207a39..3282225df4f6 100644 --- a/sys/contrib/dev/rtw89/usb.c +++ b/sys/contrib/dev/rtw89/usb.c @@ -1069,3 +1069,6 @@ EXPORT_SYMBOL(rtw89_usb_disconnect); MODULE_AUTHOR("Bitterblue Smith "); MODULE_DESCRIPTION("Realtek USB 802.11ax wireless driver"); MODULE_LICENSE("Dual BSD/GPL"); +#if defined(__FreeBSD__) +MODULE_DEPEND(rtw89, linuxkpi_usb, 1, 1, 1); +#endif From nobody Fri Feb 27 02:30:06 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNZ3Ypdz6T7xW for ; Fri, 27 Feb 2026 02: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNZ1jjpz41TQ for ; Fri, 27 Feb 2026 02: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=1772159406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zwmIOYK5s0l9GoosHe5t7QCD3l/0sBwIHQZkd5mwlXw=; b=jEtztA4iE2nZkgTNWmQubKXC0UUiOMBzPyzMtTzk6lsDkL7Fe1PtgivSBuAnyqwHgPCxMK oRubbCp/zqsN/k7i5u2SYcM1ACIjrHcLAUj2uFxPK+S5eLAzGuK5dw2KW4BWlTCK6IAsZJ ubv65wb3YIl4IYv9/R0Q2q6HEmj8XUa3apt7/TFssvZU0/2hh/WMoaNNPEq2haIWJQaoZv ieD7soGC+Y2fQTXhzkdzp264Zo4qU5Q9hlfxUUckBAhbuUXqT7PMB1tGxvVFAK1RQwmpP3 A0gygI+Z/lZBmq+Ww1d5U0pWAhPz0ICqitQQ/NBSoEZUCwpiodfA88SWaYBSbw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159406; a=rsa-sha256; cv=none; b=LPq1kmgHwLvb4MN3yNmn0sl71mWDcRLJUbMgLWWwU1bc2lAp0ywSGh6gEqTpUHcQWa1Ne7 D7SgbpPo8Q9sBe3aPL76YiQdTHoX598eXlZhy6VeLtDObKJ6PqgpUCk7lANhzRCVMloNnv TNxCOftPFCYeJrSVO+cUNpEWLg1TxCjV9l6sS9KCPzaFtqun1tE3bOV7V6AfOS30ee6qvx j3fEFosrDByaQkpIIWjKad9ptwgHPDaFMaX30xCGfwGYZSjcvaPx3J7CrlTXOsLnmEc0Oc iTjIf9c4Loy+f1gaRgy5CnsY4HHG4SiAPJW+gU8FZmUuWeOkhao29BwADRRgVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zwmIOYK5s0l9GoosHe5t7QCD3l/0sBwIHQZkd5mwlXw=; b=bK8Msvosvsv4brvM8vvEvtUW04hfhUdEpSJg534kREg1UrmsKLnBWhY6bUjbdoSYuNpj2K gYWV/RK55JHd+mKoKL8u/uUA7+ho1H4nzbpeze/9bgf7Illt7tOpaGNILTbg220BAzZujE OnsUeE0DVLyQG3cOL2/sWkxqHMjKvEiHuDmAcARnY3OLT2JA7Cq1SV6vPCHOXs7NeWEd6n +7vNU+GLfXJQld92B2fvw0kQbZBJrwNGqI/52riy4uCBCbImUCDFYrd+dkuAQ7DlnICB9M zCTjyKJMvYxSMQJuF1O/gEy9oZT9Do9J/Lk6qF0T6ifsW38qVhfL5HdWl/JQyw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNZ1Fklzy79 for ; Fri, 27 Feb 2026 02:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21a52 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:30: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: cacb3a7dd025 - stable/15 - rtw88: remove more references to rtw88fw List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: cacb3a7dd025c2475ea24301ff289552533a000d Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:30:06 +0000 Message-Id: <69a101ae.21a52.4d77309f@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=cacb3a7dd025c2475ea24301ff289552533a000d commit cacb3a7dd025c2475ea24301ff289552533a000d Author: Bjoern A. Zeeb AuthorDate: 2026-02-10 13:30:53 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:06:50 +0000 rtw88: remove more references to rtw88fw When I removed the Realtek rtww8x firmware from base I missed to add rtw88fw.4 to ObsoleteFiles.inc [1]. While adding this, also remove a leftover reference in rtw88.4. Reported by: Herbert J. Skuhra (herbert gojira.at) [1] Fixes: cf94672363d6 (cherry picked from commit 3f4213f00ac5eea0a56cebeb1ba9f64a2489a956) --- ObsoleteFiles.inc | 3 ++- share/man/man4/rtw88.4 | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index e3bc68bdb541..3b7907085f9c 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -1996,8 +1996,9 @@ OLD_FILES+=usr/share/examples/diskless/README.BOOTP OLD_FILES+=usr/share/examples/diskless/README.TEMPLATING OLD_FILES+=usr/share/examples/diskless/clone_root -# 20230905 +# 20230905: Removed rtw8x firmware files from src.git OLD_FILES+=usr/share/doc/legal/realtek_rtw88_firmware.LICENCE +OLD_FILES+=usr/share/man/man4/rtw88fw.4.gz # 20230828 MOVED_LIBS+=usr/lib/librt.so.1 diff --git a/share/man/man4/rtw88.4 b/share/man/man4/rtw88.4 index 4c2cba8311ae..e01f508ef80e 100644 --- a/share/man/man4/rtw88.4 +++ b/share/man/man4/rtw88.4 @@ -1,9 +1,9 @@ .\"- .\" SPDX-License-Identifier: BSD-2-Clause .\" -.\" Copyright (c) 2022-2025 Bjoern A. Zeeb +.\" Copyright (c) 2022-2026 Bjoern A. Zeeb .\" -.Dd June 13, 2025 +.Dd February 10, 2026 .Dt RTW88 4 .Os .Sh NAME @@ -84,7 +84,6 @@ for network buffer memory to the lower 32bit of physical memory and make the driver work. .El .Sh SEE ALSO -.Xr rtw88fw 4 , .Xr wlan 4 , .Xr networking 7 , .Xr fwget 8 , From nobody Fri Feb 27 02:30:07 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNb60Qdz6T7v8 for ; Fri, 27 Feb 2026 02:30:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNb243yz41lP for ; Fri, 27 Feb 2026 02:30:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N83ZZnjauaO66CxnTZqpEhDBIctkxhZaUJ7P2b3RG+A=; b=x2bQEXxeypBE2gW1QXGQwgH/KIAf/faAE1TcavulDr8ntlJtWLpB0X2P9NtAfL7E8LBewJ y+v0kzqQ/v2WgUxugupwKy9VL54KJwRLM2vdM9FDw+0by4FPQw+DWi9gnO/4WcW1xL3JhR Ys3Uyfwh5FcpISEs5ZZkS0amaJbX1mWd7dXFWpQ7OjOIwCqy3HEHi23I2q9HNdKTyRf42J wpzpFwpnLc1j4q0OPafG+l/f8MNp/vAW+jL+CsSGFCxKQE1PitmOXmiGBVIemgBWXAnzmo RUJCSlExLwLt1UqpGEymtgNcLVSFwjVmTrxn+zYsurCa+F13cp1sbumzrvb4Fg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159407; a=rsa-sha256; cv=none; b=Ey0WbHpHYTnAsVTrBgqdJ9y7mEHrt3wHwzJVQSJZgl6kZZ11QHnRKCB5XJ2cysRwXpwAnU FFU+H1hEs7P9VEc6yqcE3VmPtzL2rkToU4TIvxzLtCqCAerlRPE6dUMTfbc4XtknE5g5xK zvoJjQJ3EQW6zbNNlxtR6HeapbNPjemBu2CitIVB4a/88A9ruy5MYvK0Z9BrfeHHYgteHN /qsOSSRw/wDU7d6F2knCsW4kXP/978yGvG0PskT8Ez6Z1r2hOmaPKMbM0dgk3Fw+dTJqYa U15YYGn19SRuDCXqn+K5oZ4LTVOl3J1FPogNG9V2O7h9gij2aAruPwHIXxRukw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N83ZZnjauaO66CxnTZqpEhDBIctkxhZaUJ7P2b3RG+A=; b=D9DIBrtgIlBORb74jiKVad3vDVYkzN4pHTZkaAu/GmTIS/pWe2Q6MrEGAD9RdZQWVWYD/a g7Exv6ttbXvcxE78nahbcVG9pBtrfurINe+9BkqeA5D5bGwemGYoSWI2Vg/8e5tHbGM2/5 hCLDP3p8EWr98dCN8jBDooJdYuTcRwaC6iVGuVkZOgibQHxDGaQZY9ZJwTc9as5YPUjUjW e5Rc044BCj6fE0TNU8c+FzTNuTZYNGvmKEh0Vy4t7Rph4ToyyagxigLsgUfvuf2VVWNhZO QUBDeZHqa03X/XTxgU8KhEEWigWLqzaNqqUHhJhEtob05CS/F8gjXnJRQNsJJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNb1c4bzy7B for ; Fri, 27 Feb 2026 02:30:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 204f1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:30: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: 64681bb96fcf - stable/15 - ath10k: update Atheros/QCA's ath10k driver List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 64681bb96fcf8323bd13801c218847d0560c59fb Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:30:07 +0000 Message-Id: <69a101af.204f1.af3eddd@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=64681bb96fcf8323bd13801c218847d0560c59fb commit 64681bb96fcf8323bd13801c218847d0560c59fb Author: Bjoern A. Zeeb AuthorDate: 2026-02-10 15:12:28 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:06:57 +0000 ath10k: update Atheros/QCA's ath10k driver This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 05f7e89ab9731565d8a62e3b5d1ec206485eeb0b ( tag: v6.19 ). Sponsored by: The FreeBSD Foundation (cherry picked from commit 083f8f33304ab105d0b556bdc244c9fa73068b67) --- sys/contrib/dev/athk/ath10k/ce.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/contrib/dev/athk/ath10k/ce.c b/sys/contrib/dev/athk/ath10k/ce.c index 719957ac87e4..d53ecebcf992 100644 --- a/sys/contrib/dev/athk/ath10k/ce.c +++ b/sys/contrib/dev/athk/ath10k/ce.c @@ -1727,8 +1727,8 @@ static void _ath10k_ce_free_pipe(struct ath10k *ar, int ce_id) (ce_state->src_ring->nentries * sizeof(struct ce_desc) + CE_DESC_RING_ALIGN), - ce_state->src_ring->base_addr_owner_space, - ce_state->src_ring->base_addr_ce_space); + ce_state->src_ring->base_addr_owner_space_unaligned, + ce_state->src_ring->base_addr_ce_space_unaligned); kfree(ce_state->src_ring); } @@ -1737,8 +1737,8 @@ static void _ath10k_ce_free_pipe(struct ath10k *ar, int ce_id) (ce_state->dest_ring->nentries * sizeof(struct ce_desc) + CE_DESC_RING_ALIGN), - ce_state->dest_ring->base_addr_owner_space, - ce_state->dest_ring->base_addr_ce_space); + ce_state->dest_ring->base_addr_owner_space_unaligned, + ce_state->dest_ring->base_addr_ce_space_unaligned); kfree(ce_state->dest_ring); } @@ -1758,8 +1758,8 @@ static void _ath10k_ce_free_pipe_64(struct ath10k *ar, int ce_id) (ce_state->src_ring->nentries * sizeof(struct ce_desc_64) + CE_DESC_RING_ALIGN), - ce_state->src_ring->base_addr_owner_space, - ce_state->src_ring->base_addr_ce_space); + ce_state->src_ring->base_addr_owner_space_unaligned, + ce_state->src_ring->base_addr_ce_space_unaligned); kfree(ce_state->src_ring); } @@ -1768,8 +1768,8 @@ static void _ath10k_ce_free_pipe_64(struct ath10k *ar, int ce_id) (ce_state->dest_ring->nentries * sizeof(struct ce_desc_64) + CE_DESC_RING_ALIGN), - ce_state->dest_ring->base_addr_owner_space, - ce_state->dest_ring->base_addr_ce_space); + ce_state->dest_ring->base_addr_owner_space_unaligned, + ce_state->dest_ring->base_addr_ce_space_unaligned); kfree(ce_state->dest_ring); } From nobody Fri Feb 27 02:30:08 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNd2twyz6T7vB for ; Fri, 27 Feb 2026 02:30:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNd1hDdz41Z3 for ; Fri, 27 Feb 2026 02:30:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nKZxcrDDY/QhA0aac3eWwShrm0ENx8AII2BR6/6XFTg=; b=oPebwWfGborFq8HRRoFxGeHYBWVQ0fannhg/L0pA3E+6ajn/IduUeLfZNRIBXAOL6SQoTU EIMluxllDshgNa9lCdq5va4T6oSYxZ/Ic14XwPYiueJNwt10fosP28nPrVErql8hkhqlWc hqk5py7fqLX/IEjMAAdje0+up0046cqoaMJz05V3QPNZZJp+KNl31XkxAvgrZ0FlRD0d6e 1i3mukbrMErn/LpGny8Zwkz/mQOlUkXzdn1tPNg09367MjVsABYDDLGtPLdeDcw0Qh96pn nlJo81QB5sT5eKDccvfyJFepegzvan3ntIQl2dyoURejbVIRj0x8rmX/5tpY6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159409; a=rsa-sha256; cv=none; b=U13k/04QiAoK8EMCFTGAjhs8b9DAJx2SGXeHw7DAkdaDuYpc1+YlM64uulbIAo/RB6u3bl +oSv1lyropCSP+irut97yxiaBsjmqU49SeIqj1RyGFpDEdWvd8Ri9toW6QwLnDlw2ep3hT jhE4dCDWlRs/inFlt09AjCN6vxYmcOjBDOWJxc99Dg2Bki6Lm7Zq8RszOa7nmVb8ElWyup 750WWiXGsiioWY8LuW1c0wZLhhb7/YXXuMBIB0WMY0HlC9oEWoulY/YZGC4xLghW0O8Kd3 Kkb8/N/iYqMhU6J/gYBtf5RAdtX2scQwUZcntqChn8rARNXuNXTqZH1zpZx0zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nKZxcrDDY/QhA0aac3eWwShrm0ENx8AII2BR6/6XFTg=; b=ETodFQ6Eg5D9xc4+FT5h5iD56yg1YdooFdVuLjjgrSBAjsUhrA6APar8Zi37EtgK7a0uD8 n0++LnfjohBV+qdoGfaM+M7Rc9VoVytwaPeFtOld2tBjuNBNGr8/EX1O1QhqePcQSSRepV /zd29attEJcoyya7F+gxN8d450wAA8to/y59uxuy1y8uuT5tMeZYb/KzxSr7x0q7uBS7g8 eFg8ZFf3MpHEpKj13uZNa60y9yS0DPaHiWc3P4gSH9VXuStyy5YuQcrO2KnevM4+wYgnap Pl3wf0hTPsVBxroL/Uw57gSh7qbul9/j21s7fxhtklbTGMifRVVIW2qX6/D1kw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNd1H32zyVJ for ; Fri, 27 Feb 2026 02:30:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21afa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:30: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: a32802d07dc0 - stable/15 - brcm80211: import Broadcom wireless brcmsmac and brcmfmac drivers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a32802d07dc0ef95854abd892ccba7b016a7490f Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:30:08 +0000 Message-Id: <69a101b0.21afa.61c82ca1@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a32802d07dc0ef95854abd892ccba7b016a7490f commit a32802d07dc0ef95854abd892ccba7b016a7490f Author: Bjoern A. Zeeb AuthorDate: 2026-02-10 21:22:03 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:07:02 +0000 brcm80211: import Broadcom wireless brcmsmac and brcmfmac drivers This version is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git e5f0a698b34ed76002dc5cff3804a61c80233a7a ( tag: v6.17 ). We are likely only going to use the brcmfmac driver but given they come nicely packaged in a directory structure and bwn(9) still uses GPL-only phy files we could use some of the information from brcmsmac and fix that (should it ever still be relevant). (cherry picked from commit b4c3e9b5b09c829b4135aff738bd2893ed052377) --- sys/contrib/dev/broadcom/brcm80211/Makefile | 13 + .../dev/broadcom/brcm80211/brcmfmac/Makefile | 62 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/acpi.c | 51 + .../dev/broadcom/brcm80211/brcmfmac/bca/Makefile | 12 + .../dev/broadcom/brcm80211/brcmfmac/bca/core.c | 39 + .../dev/broadcom/brcm80211/brcmfmac/bca/module.c | 28 + .../dev/broadcom/brcm80211/brcmfmac/bca/vops.h | 11 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcdc.c | 490 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcdc.h | 20 + .../dev/broadcom/brcm80211/brcmfmac/bcmsdh.c | 1269 + .../dev/broadcom/brcm80211/brcmfmac/btcoex.c | 481 + .../dev/broadcom/brcm80211/brcmfmac/btcoex.h | 18 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/bus.h | 342 + .../dev/broadcom/brcm80211/brcmfmac/cfg80211.c | 8477 ++++++ .../dev/broadcom/brcm80211/brcmfmac/cfg80211.h | 498 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/chip.c | 1472 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/chip.h | 92 + .../dev/broadcom/brcm80211/brcmfmac/common.c | 637 + .../dev/broadcom/brcm80211/brcmfmac/common.h | 95 + .../dev/broadcom/brcm80211/brcmfmac/commonring.c | 236 + .../dev/broadcom/brcm80211/brcmfmac/commonring.h | 62 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/core.c | 1576 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/core.h | 228 + .../dev/broadcom/brcm80211/brcmfmac/cyw/Makefile | 12 + .../dev/broadcom/brcm80211/brcmfmac/cyw/core.c | 373 + .../broadcom/brcm80211/brcmfmac/cyw/fwil_types.h | 87 + .../dev/broadcom/brcm80211/brcmfmac/cyw/module.c | 28 + .../dev/broadcom/brcm80211/brcmfmac/cyw/vops.h | 11 + .../dev/broadcom/brcm80211/brcmfmac/debug.c | 56 + .../dev/broadcom/brcm80211/brcmfmac/debug.h | 143 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/dmi.c | 215 + .../dev/broadcom/brcm80211/brcmfmac/feature.c | 385 + .../dev/broadcom/brcm80211/brcmfmac/feature.h | 131 + .../dev/broadcom/brcm80211/brcmfmac/firmware.c | 859 + .../dev/broadcom/brcm80211/brcmfmac/firmware.h | 95 + .../dev/broadcom/brcm80211/brcmfmac/flowring.c | 508 + .../dev/broadcom/brcm80211/brcmfmac/flowring.h | 74 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/fweh.c | 514 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/fweh.h | 401 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/fwil.c | 432 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/fwil.h | 224 + .../dev/broadcom/brcm80211/brcmfmac/fwil_types.h | 1239 + .../dev/broadcom/brcm80211/brcmfmac/fwsignal.c | 2514 ++ .../dev/broadcom/brcm80211/brcmfmac/fwsignal.h | 48 + .../dev/broadcom/brcm80211/brcmfmac/fwvid.c | 200 + .../dev/broadcom/brcm80211/brcmfmac/fwvid.h | 88 + .../dev/broadcom/brcm80211/brcmfmac/msgbuf.c | 1687 ++ .../dev/broadcom/brcm80211/brcmfmac/msgbuf.h | 43 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/of.c | 155 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/of.h | 14 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/p2p.c | 2546 ++ sys/contrib/dev/broadcom/brcm80211/brcmfmac/p2p.h | 179 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/pcie.c | 2785 ++ sys/contrib/dev/broadcom/brcm80211/brcmfmac/pcie.h | 14 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/pno.c | 595 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/pno.h | 72 + .../dev/broadcom/brcm80211/brcmfmac/proto.c | 71 + .../dev/broadcom/brcm80211/brcmfmac/proto.h | 155 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/sdio.c | 4650 +++ sys/contrib/dev/broadcom/brcm80211/brcmfmac/sdio.h | 370 + .../dev/broadcom/brcm80211/brcmfmac/tracepoint.c | 32 + .../dev/broadcom/brcm80211/brcmfmac/tracepoint.h | 144 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/usb.c | 1604 ++ sys/contrib/dev/broadcom/brcm80211/brcmfmac/usb.h | 42 + .../dev/broadcom/brcm80211/brcmfmac/vendor.c | 118 + .../dev/broadcom/brcm80211/brcmfmac/vendor.h | 53 + .../dev/broadcom/brcm80211/brcmfmac/wcc/Makefile | 12 + .../dev/broadcom/brcm80211/brcmfmac/wcc/core.c | 40 + .../dev/broadcom/brcm80211/brcmfmac/wcc/module.c | 28 + .../dev/broadcom/brcm80211/brcmfmac/wcc/vops.h | 11 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/xtlv.c | 84 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/xtlv.h | 31 + .../dev/broadcom/brcm80211/brcmsmac/Makefile | 47 + .../dev/broadcom/brcm80211/brcmsmac/aiutils.c | 707 + .../dev/broadcom/brcm80211/brcmsmac/aiutils.h | 221 + .../dev/broadcom/brcm80211/brcmsmac/ampdu.c | 1097 + .../dev/broadcom/brcm80211/brcmsmac/ampdu.h | 53 + .../dev/broadcom/brcm80211/brcmsmac/antsel.c | 309 + .../dev/broadcom/brcm80211/brcmsmac/antsel.h | 27 + .../brcm80211/brcmsmac/brcms_trace_brcmsmac.h | 102 + .../brcm80211/brcmsmac/brcms_trace_brcmsmac_msg.h | 92 + .../brcm80211/brcmsmac/brcms_trace_brcmsmac_tx.h | 110 + .../brcm80211/brcmsmac/brcms_trace_events.c | 23 + .../brcm80211/brcmsmac/brcms_trace_events.h | 40 + .../dev/broadcom/brcm80211/brcmsmac/channel.c | 771 + .../dev/broadcom/brcm80211/brcmsmac/channel.h | 47 + sys/contrib/dev/broadcom/brcm80211/brcmsmac/d11.h | 1902 ++ .../dev/broadcom/brcm80211/brcmsmac/debug.c | 246 + .../dev/broadcom/brcm80211/brcmsmac/debug.h | 75 + sys/contrib/dev/broadcom/brcm80211/brcmsmac/dma.c | 1556 + sys/contrib/dev/broadcom/brcm80211/brcmsmac/dma.h | 124 + sys/contrib/dev/broadcom/brcm80211/brcmsmac/led.h | 38 + .../dev/broadcom/brcm80211/brcmsmac/mac80211_if.c | 1738 ++ .../dev/broadcom/brcm80211/brcmsmac/mac80211_if.h | 113 + sys/contrib/dev/broadcom/brcm80211/brcmsmac/main.c | 8065 ++++++ sys/contrib/dev/broadcom/brcm80211/brcmsmac/main.h | 670 + .../dev/broadcom/brcm80211/brcmsmac/phy/phy_cmn.c | 2497 ++ .../dev/broadcom/brcm80211/brcmsmac/phy/phy_hal.h | 241 + .../dev/broadcom/brcm80211/brcmsmac/phy/phy_int.h | 1113 + .../dev/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c | 5151 ++++ .../dev/broadcom/brcm80211/brcmsmac/phy/phy_lcn.h | 110 + .../dev/broadcom/brcm80211/brcmsmac/phy/phy_n.c | 28572 +++++++++++++++++++ .../broadcom/brcm80211/brcmsmac/phy/phy_qmath.c | 298 + .../broadcom/brcm80211/brcmsmac/phy/phy_qmath.h | 31 + .../broadcom/brcm80211/brcmsmac/phy/phy_radio.h | 1522 + .../dev/broadcom/brcm80211/brcmsmac/phy/phyreg_n.h | 156 + .../broadcom/brcm80211/brcmsmac/phy/phytbl_lcn.c | 3170 ++ .../broadcom/brcm80211/brcmsmac/phy/phytbl_lcn.h | 44 + .../dev/broadcom/brcm80211/brcmsmac/phy/phytbl_n.c | 10099 +++++++ .../dev/broadcom/brcm80211/brcmsmac/phy/phytbl_n.h | 39 + .../dev/broadcom/brcm80211/brcmsmac/phy_shim.c | 215 + .../dev/broadcom/brcm80211/brcmsmac/phy_shim.h | 172 + sys/contrib/dev/broadcom/brcm80211/brcmsmac/pmu.c | 165 + sys/contrib/dev/broadcom/brcm80211/brcmsmac/pmu.h | 26 + sys/contrib/dev/broadcom/brcm80211/brcmsmac/pub.h | 341 + sys/contrib/dev/broadcom/brcm80211/brcmsmac/rate.c | 514 + sys/contrib/dev/broadcom/brcm80211/brcmsmac/rate.h | 245 + sys/contrib/dev/broadcom/brcm80211/brcmsmac/scb.h | 67 + sys/contrib/dev/broadcom/brcm80211/brcmsmac/stf.c | 437 + sys/contrib/dev/broadcom/brcm80211/brcmsmac/stf.h | 36 + .../dev/broadcom/brcm80211/brcmsmac/types.h | 294 + .../dev/broadcom/brcm80211/brcmsmac/ucode_loader.c | 109 + .../dev/broadcom/brcm80211/brcmsmac/ucode_loader.h | 56 + .../dev/broadcom/brcm80211/brcmutil/Makefile | 10 + sys/contrib/dev/broadcom/brcm80211/brcmutil/d11.c | 247 + .../dev/broadcom/brcm80211/brcmutil/utils.c | 327 + .../dev/broadcom/brcm80211/include/brcm_hw_ids.h | 116 + .../dev/broadcom/brcm80211/include/brcmu_d11.h | 156 + .../dev/broadcom/brcm80211/include/brcmu_utils.h | 216 + .../dev/broadcom/brcm80211/include/brcmu_wifi.h | 247 + .../dev/broadcom/brcm80211/include/chipcommon.h | 311 + sys/contrib/dev/broadcom/brcm80211/include/defs.h | 94 + sys/contrib/dev/broadcom/brcm80211/include/soc.h | 25 + 133 files changed, 116023 insertions(+) diff --git a/sys/contrib/dev/broadcom/brcm80211/Makefile b/sys/contrib/dev/broadcom/brcm80211/Makefile new file mode 100644 index 000000000000..88115d072624 --- /dev/null +++ b/sys/contrib/dev/broadcom/brcm80211/Makefile @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: ISC +# +# Makefile fragment for Broadcom 802.11 Networking Device Driver +# +# Copyright (c) 2010 Broadcom Corporation +# + +# common flags +subdir-ccflags-$(CONFIG_BRCMDBG) += -DDEBUG + +obj-$(CONFIG_BRCMUTIL) += brcmutil/ +obj-$(CONFIG_BRCMFMAC) += brcmfmac/ +obj-$(CONFIG_BRCMSMAC) += brcmsmac/ diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/Makefile b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/Makefile new file mode 100644 index 000000000000..e5ca0f511822 --- /dev/null +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/Makefile @@ -0,0 +1,62 @@ +# SPDX-License-Identifier: ISC +# +# Makefile fragment for Broadcom 802.11 Networking Device Driver +# +# Copyright (c) 2010 Broadcom Corporation +# + +ccflags-y += \ + -I $(src) \ + -I $(src)/../include + +obj-$(CONFIG_BRCMFMAC) += brcmfmac.o +brcmfmac-objs += \ + cfg80211.o \ + chip.o \ + fwil.o \ + fweh.o \ + p2p.o \ + proto.o \ + common.o \ + core.o \ + firmware.o \ + fwvid.o \ + feature.o \ + btcoex.o \ + vendor.o \ + pno.o \ + xtlv.o +brcmfmac-$(CONFIG_BRCMFMAC_PROTO_BCDC) += \ + bcdc.o \ + fwsignal.o +brcmfmac-$(CONFIG_BRCMFMAC_PROTO_MSGBUF) += \ + commonring.o \ + flowring.o \ + msgbuf.o +brcmfmac-$(CONFIG_BRCMFMAC_SDIO) += \ + sdio.o \ + bcmsdh.o +brcmfmac-$(CONFIG_BRCMFMAC_USB) += \ + usb.o +brcmfmac-$(CONFIG_BRCMFMAC_PCIE) += \ + pcie.o +brcmfmac-$(CONFIG_BRCMDBG) += \ + debug.o +brcmfmac-$(CONFIG_BRCM_TRACING) += \ + tracepoint.o +brcmfmac-$(CONFIG_OF) += \ + of.o +brcmfmac-$(CONFIG_DMI) += \ + dmi.o +brcmfmac-$(CONFIG_ACPI) += \ + acpi.o + +ifeq ($(CONFIG_BRCMFMAC),m) +obj-m += wcc/ +obj-m += cyw/ +obj-m += bca/ +else +brcmfmac-$(CONFIG_BRCMFMAC) += wcc/core.o +brcmfmac-$(CONFIG_BRCMFMAC) += cyw/core.o +brcmfmac-$(CONFIG_BRCMFMAC) += bca/core.o +endif diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/acpi.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/acpi.c new file mode 100644 index 000000000000..c4a54861bfb4 --- /dev/null +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/acpi.c @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: ISC +/* + * Copyright The Asahi Linux Contributors + */ + +#include +#include "debug.h" +#include "core.h" +#include "common.h" + +void brcmf_acpi_probe(struct device *dev, enum brcmf_bus_type bus_type, + struct brcmf_mp_device *settings) +{ + acpi_status status; + const union acpi_object *o; + struct acpi_buffer buf = {ACPI_ALLOCATE_BUFFER, NULL}; + struct acpi_device *adev = ACPI_COMPANION(dev); + + if (!adev) + return; + + if (!ACPI_FAILURE(acpi_dev_get_property(adev, "module-instance", + ACPI_TYPE_STRING, &o))) { + brcmf_dbg(INFO, "ACPI module-instance=%s\n", o->string.pointer); + settings->board_type = devm_kasprintf(dev, GFP_KERNEL, + "apple,%s", + o->string.pointer); + } else { + brcmf_dbg(INFO, "No ACPI module-instance\n"); + return; + } + + status = acpi_evaluate_object(adev->handle, "RWCV", NULL, &buf); + o = buf.pointer; + if (!ACPI_FAILURE(status) && o && o->type == ACPI_TYPE_BUFFER && + o->buffer.length >= 2) { + char *antenna_sku = devm_kzalloc(dev, 3, GFP_KERNEL); + + if (antenna_sku) { + memcpy(antenna_sku, o->buffer.pointer, 2); + brcmf_dbg(INFO, "ACPI RWCV data=%*phN antenna-sku=%s\n", + (int)o->buffer.length, o->buffer.pointer, + antenna_sku); + settings->antenna_sku = antenna_sku; + } + + kfree(buf.pointer); + } else { + brcmf_dbg(INFO, "No ACPI antenna-sku\n"); + } +} diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bca/Makefile b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bca/Makefile new file mode 100644 index 000000000000..5e37c638f966 --- /dev/null +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bca/Makefile @@ -0,0 +1,12 @@ +# SPDX-License-Identifier: ISC +# +# Copyright (c) 2022 Broadcom Corporation + +ccflags-y += \ + -I $(src) \ + -I $(src)/.. \ + -I $(src)/../../include + +obj-m += brcmfmac-bca.o +brcmfmac-bca-objs += \ + core.o module.o diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bca/core.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bca/core.c new file mode 100644 index 000000000000..f471c962104a --- /dev/null +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bca/core.c @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: ISC +/* + * Copyright (c) 2022 Broadcom Corporation + */ +#include +#include +#include +#include +#include +#include + +#include "vops.h" + +#define BRCMF_BCA_E_LAST 212 + +static void brcmf_bca_feat_attach(struct brcmf_if *ifp) +{ + /* SAE support not confirmed so disabling for now */ + ifp->drvr->feat_flags &= ~BIT(BRCMF_FEAT_SAE); +} + +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); + if (!fweh) + return -ENOMEM; + + fweh->num_event_codes = BRCMF_BCA_E_LAST; + drvr->fweh = fweh; + return 0; +} + +const struct brcmf_fwvid_ops brcmf_bca_ops = { + .feat_attach = brcmf_bca_feat_attach, + .alloc_fweh_info = brcmf_bca_alloc_fweh_info, +}; diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bca/module.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bca/module.c new file mode 100644 index 000000000000..1e1c79b18c5b --- /dev/null +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bca/module.c @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: ISC +/* + * Copyright (c) 2022 Broadcom Corporation + */ +#include +#include +#include +#include + +#include "vops.h" + +static int __init brcmf_bca_init(void) +{ + return brcmf_fwvid_register_vendor(BRCMF_FWVENDOR_BCA, THIS_MODULE, + &brcmf_bca_ops); +} + +static void __exit brcmf_bca_exit(void) +{ + brcmf_fwvid_unregister_vendor(BRCMF_FWVENDOR_BCA, THIS_MODULE); +} + +MODULE_DESCRIPTION("Broadcom FullMAC WLAN driver plugin for Broadcom AP chipsets"); +MODULE_LICENSE("Dual BSD/GPL"); +MODULE_IMPORT_NS("BRCMFMAC"); + +module_init(brcmf_bca_init); +module_exit(brcmf_bca_exit); diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bca/vops.h b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bca/vops.h new file mode 100644 index 000000000000..7897e6b6eefb --- /dev/null +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bca/vops.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: ISC */ +/* + * Copyright (c) 2022 Broadcom Corporation + */ +#ifndef _BRCMFMAC_BCA_VOPS_H +#define _BRCMFMAC_BCA_VOPS_H + +extern const struct brcmf_fwvid_ops brcmf_bca_ops; +#define BCA_VOPS (&brcmf_bca_ops) + +#endif /* _BRCMFMAC_BCA_VOPS_H */ diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcdc.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcdc.c new file mode 100644 index 000000000000..9ec0c60b6da1 --- /dev/null +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcdc.c @@ -0,0 +1,490 @@ +// SPDX-License-Identifier: ISC +/* + * Copyright (c) 2010 Broadcom Corporation + */ + +/******************************************************************************* + * Communicates with the dongle by using dcmd codes. + * For certain dcmd codes, the dongle interprets string data from the host. + ******************************************************************************/ + +#include +#include + +#include +#include + +#include "core.h" +#include "bus.h" +#include "fwsignal.h" +#include "debug.h" +#include "tracepoint.h" +#include "proto.h" +#include "bcdc.h" + +struct brcmf_proto_bcdc_dcmd { + __le32 cmd; /* dongle command value */ + __le32 len; /* lower 16: output buflen; + * upper 16: input buflen (excludes header) */ + __le32 flags; /* flag defns given below */ + __le32 status; /* status code returned from the device */ +}; + +/* BCDC flag definitions */ +#define BCDC_DCMD_ERROR 0x01 /* 1=cmd failed */ +#define BCDC_DCMD_SET 0x02 /* 0=get, 1=set cmd */ +#define BCDC_DCMD_IF_MASK 0xF000 /* I/F index */ +#define BCDC_DCMD_IF_SHIFT 12 +#define BCDC_DCMD_ID_MASK 0xFFFF0000 /* id an cmd pairing */ +#define BCDC_DCMD_ID_SHIFT 16 /* ID Mask shift bits */ +#define BCDC_DCMD_ID(flags) \ + (((flags) & BCDC_DCMD_ID_MASK) >> BCDC_DCMD_ID_SHIFT) + +/* + * BCDC header - Broadcom specific extension of CDC. + * Used on data packets to convey priority across USB. + */ +#define BCDC_HEADER_LEN 4 +#define BCDC_PROTO_VER 2 /* Protocol version */ +#define BCDC_FLAG_VER_MASK 0xf0 /* Protocol version mask */ +#define BCDC_FLAG_VER_SHIFT 4 /* Protocol version shift */ +#define BCDC_FLAG_SUM_GOOD 0x04 /* Good RX checksums */ +#define BCDC_FLAG_SUM_NEEDED 0x08 /* Dongle needs to do TX checksums */ +#define BCDC_PRIORITY_MASK 0x7 +#define BCDC_FLAG2_IF_MASK 0x0f /* packet rx interface in APSTA */ +#define BCDC_FLAG2_IF_SHIFT 0 + +#define BCDC_GET_IF_IDX(hdr) \ + ((int)((((hdr)->flags2) & BCDC_FLAG2_IF_MASK) >> BCDC_FLAG2_IF_SHIFT)) +#define BCDC_SET_IF_IDX(hdr, idx) \ + ((hdr)->flags2 = (((hdr)->flags2 & ~BCDC_FLAG2_IF_MASK) | \ + ((idx) << BCDC_FLAG2_IF_SHIFT))) + +/** + * struct brcmf_proto_bcdc_header - BCDC header format + * + * @flags: flags contain protocol and checksum info. + * @priority: 802.1d priority and USB flow control info (bit 4:7). + * @flags2: additional flags containing dongle interface index. + * @data_offset: start of packet data. header is following by firmware signals. + */ +struct brcmf_proto_bcdc_header { + u8 flags; + u8 priority; + u8 flags2; + u8 data_offset; +}; + +/* + * maximum length of firmware signal data between + * the BCDC header and packet data in the tx path. + */ +#define BRCMF_PROT_FW_SIGNAL_MAX_TXBYTES 12 + +#define RETRIES 2 /* # of retries to retrieve matching dcmd response */ +#define BUS_HEADER_LEN (16+64) /* Must be atleast SDPCM_RESERVE + * (amount of header tha might be added) + * plus any space that might be needed + * for bus alignment padding. + */ +#define ROUND_UP_MARGIN 2048 + +struct brcmf_bcdc { + u16 reqid; + u8 bus_header[BUS_HEADER_LEN]; + struct brcmf_proto_bcdc_dcmd msg; + unsigned char buf[BRCMF_DCMD_MAXLEN]; + struct brcmf_fws_info *fws; +}; + + +struct brcmf_fws_info *drvr_to_fws(struct brcmf_pub *drvr) +{ + struct brcmf_bcdc *bcdc = drvr->proto->pd; + + return bcdc->fws; +} + +static int +brcmf_proto_bcdc_msg(struct brcmf_pub *drvr, int ifidx, uint cmd, void *buf, + uint len, bool set) +{ + struct brcmf_bcdc *bcdc = (struct brcmf_bcdc *)drvr->proto->pd; + struct brcmf_proto_bcdc_dcmd *msg = &bcdc->msg; + u32 flags; + + brcmf_dbg(BCDC, "Enter\n"); + + memset(msg, 0, sizeof(struct brcmf_proto_bcdc_dcmd)); + + msg->cmd = cpu_to_le32(cmd); + msg->len = cpu_to_le32(len); + flags = (++bcdc->reqid << BCDC_DCMD_ID_SHIFT); + if (set) + flags |= BCDC_DCMD_SET; + flags = (flags & ~BCDC_DCMD_IF_MASK) | + (ifidx << BCDC_DCMD_IF_SHIFT); + msg->flags = cpu_to_le32(flags); + + if (buf) + memcpy(bcdc->buf, buf, len); + + len += sizeof(*msg); + if (len > BRCMF_TX_IOCTL_MAX_MSG_SIZE) + len = BRCMF_TX_IOCTL_MAX_MSG_SIZE; + + /* Send request */ + return brcmf_bus_txctl(drvr->bus_if, (unsigned char *)&bcdc->msg, len); +} + +static int brcmf_proto_bcdc_cmplt(struct brcmf_pub *drvr, u32 id, u32 len) +{ + int ret; + struct brcmf_bcdc *bcdc = (struct brcmf_bcdc *)drvr->proto->pd; + + brcmf_dbg(BCDC, "Enter\n"); + len += sizeof(struct brcmf_proto_bcdc_dcmd); + do { + ret = brcmf_bus_rxctl(drvr->bus_if, (unsigned char *)&bcdc->msg, + len); + if (ret < 0) + break; + } while (BCDC_DCMD_ID(le32_to_cpu(bcdc->msg.flags)) != id); + + return ret; +} + +static int +brcmf_proto_bcdc_query_dcmd(struct brcmf_pub *drvr, int ifidx, uint cmd, + void *buf, uint len, int *fwerr) +{ + struct brcmf_bcdc *bcdc = (struct brcmf_bcdc *)drvr->proto->pd; + struct brcmf_proto_bcdc_dcmd *msg = &bcdc->msg; + void *info; + int ret = 0, retries = 0; + u32 id, flags; + + brcmf_dbg(BCDC, "Enter, cmd %d len %d\n", cmd, len); + + *fwerr = 0; + ret = brcmf_proto_bcdc_msg(drvr, ifidx, cmd, buf, len, false); + if (ret < 0) { + bphy_err(drvr, "brcmf_proto_bcdc_msg failed w/status %d\n", + ret); + goto done; + } + +retry: + /* wait for interrupt and get first fragment */ + ret = brcmf_proto_bcdc_cmplt(drvr, bcdc->reqid, len); + if (ret < 0) + goto done; + + flags = le32_to_cpu(msg->flags); + id = (flags & BCDC_DCMD_ID_MASK) >> BCDC_DCMD_ID_SHIFT; + + if ((id < bcdc->reqid) && (++retries < RETRIES)) + goto retry; + if (id != bcdc->reqid) { + bphy_err(drvr, "%s: unexpected request id %d (expected %d)\n", + brcmf_ifname(brcmf_get_ifp(drvr, ifidx)), id, + bcdc->reqid); + ret = -EINVAL; + goto done; + } + + /* Check info buffer */ + info = (void *)&bcdc->buf[0]; + + /* Copy info buffer */ + if (buf) { + if (ret < (int)len) + len = ret; + memcpy(buf, info, len); + } + + ret = 0; + + /* Check the ERROR flag */ + if (flags & BCDC_DCMD_ERROR) + *fwerr = le32_to_cpu(msg->status); +done: + return ret; +} + +static int +brcmf_proto_bcdc_set_dcmd(struct brcmf_pub *drvr, int ifidx, uint cmd, + void *buf, uint len, int *fwerr) +{ + struct brcmf_bcdc *bcdc = (struct brcmf_bcdc *)drvr->proto->pd; + struct brcmf_proto_bcdc_dcmd *msg = &bcdc->msg; + int ret; + u32 flags, id; + + brcmf_dbg(BCDC, "Enter, cmd %d len %d\n", cmd, len); + + *fwerr = 0; + ret = brcmf_proto_bcdc_msg(drvr, ifidx, cmd, buf, len, true); + if (ret < 0) + goto done; + + ret = brcmf_proto_bcdc_cmplt(drvr, bcdc->reqid, len); + if (ret < 0) + goto done; + + flags = le32_to_cpu(msg->flags); + id = (flags & BCDC_DCMD_ID_MASK) >> BCDC_DCMD_ID_SHIFT; + + if (id != bcdc->reqid) { + bphy_err(drvr, "%s: unexpected request id %d (expected %d)\n", + brcmf_ifname(brcmf_get_ifp(drvr, ifidx)), id, + bcdc->reqid); + ret = -EINVAL; + goto done; + } + + ret = 0; + + /* Check the ERROR flag */ + if (flags & BCDC_DCMD_ERROR) + *fwerr = le32_to_cpu(msg->status); + +done: + return ret; +} + +static void +brcmf_proto_bcdc_hdrpush(struct brcmf_pub *drvr, int ifidx, u8 offset, + struct sk_buff *pktbuf) +{ + struct brcmf_proto_bcdc_header *h; + + brcmf_dbg(BCDC, "Enter\n"); + + /* Push BDC header used to convey priority for buses that don't */ + skb_push(pktbuf, BCDC_HEADER_LEN); + + h = (struct brcmf_proto_bcdc_header *)(pktbuf->data); + + h->flags = (BCDC_PROTO_VER << BCDC_FLAG_VER_SHIFT); + if (pktbuf->ip_summed == CHECKSUM_PARTIAL) + h->flags |= BCDC_FLAG_SUM_NEEDED; + + h->priority = (pktbuf->priority & BCDC_PRIORITY_MASK); + h->flags2 = 0; + h->data_offset = offset; + BCDC_SET_IF_IDX(h, ifidx); + trace_brcmf_bcdchdr(pktbuf->data); +} + +static int +brcmf_proto_bcdc_hdrpull(struct brcmf_pub *drvr, bool do_fws, + struct sk_buff *pktbuf, struct brcmf_if **ifp) +{ + struct brcmf_proto_bcdc_header *h; + struct brcmf_if *tmp_if; + + brcmf_dbg(BCDC, "Enter\n"); + + /* Pop BCDC header used to convey priority for buses that don't */ + if (pktbuf->len <= BCDC_HEADER_LEN) { + brcmf_dbg(INFO, "rx data too short (%d <= %d)\n", + pktbuf->len, BCDC_HEADER_LEN); + return -EBADE; + } + + trace_brcmf_bcdchdr(pktbuf->data); + h = (struct brcmf_proto_bcdc_header *)(pktbuf->data); + + tmp_if = brcmf_get_ifp(drvr, BCDC_GET_IF_IDX(h)); + if (!tmp_if) { + brcmf_dbg(INFO, "no matching ifp found\n"); + return -EBADE; + } + if (((h->flags & BCDC_FLAG_VER_MASK) >> BCDC_FLAG_VER_SHIFT) != + BCDC_PROTO_VER) { + bphy_err(drvr, "%s: non-BCDC packet received, flags 0x%x\n", + brcmf_ifname(tmp_if), h->flags); + return -EBADE; + } + + if (h->flags & BCDC_FLAG_SUM_GOOD) { + brcmf_dbg(BCDC, "%s: BDC rcv, good checksum, flags 0x%x\n", + brcmf_ifname(tmp_if), h->flags); + pktbuf->ip_summed = CHECKSUM_UNNECESSARY; + } + + pktbuf->priority = h->priority & BCDC_PRIORITY_MASK; + + skb_pull(pktbuf, BCDC_HEADER_LEN); + if (do_fws) + brcmf_fws_hdrpull(tmp_if, h->data_offset << 2, pktbuf); + else + skb_pull(pktbuf, h->data_offset << 2); + + if (pktbuf->len == 0) + return -ENODATA; + + if (ifp != NULL) + *ifp = tmp_if; + return 0; +} + +static int brcmf_proto_bcdc_tx_queue_data(struct brcmf_pub *drvr, int ifidx, + struct sk_buff *skb) +{ + struct brcmf_if *ifp = brcmf_get_ifp(drvr, ifidx); + struct brcmf_bcdc *bcdc = drvr->proto->pd; + + if (!brcmf_fws_queue_skbs(bcdc->fws)) + return brcmf_proto_txdata(drvr, ifidx, 0, skb); + + return brcmf_fws_process_skb(ifp, skb); +} + +static int +brcmf_proto_bcdc_txdata(struct brcmf_pub *drvr, int ifidx, u8 offset, + struct sk_buff *pktbuf) +{ + brcmf_proto_bcdc_hdrpush(drvr, ifidx, offset, pktbuf); + return brcmf_bus_txdata(drvr->bus_if, pktbuf); +} + +void brcmf_proto_bcdc_txflowblock(struct device *dev, bool state) +{ + struct brcmf_bus *bus_if = dev_get_drvdata(dev); + struct brcmf_pub *drvr = bus_if->drvr; + + brcmf_dbg(TRACE, "Enter\n"); + + brcmf_fws_bus_blocked(drvr, state); +} + +void +brcmf_proto_bcdc_txcomplete(struct device *dev, struct sk_buff *txp, + bool success) +{ + struct brcmf_bus *bus_if = dev_get_drvdata(dev); + struct brcmf_bcdc *bcdc = bus_if->drvr->proto->pd; + struct brcmf_if *ifp; + + /* await txstatus signal for firmware if active */ + if (brcmf_fws_fc_active(bcdc->fws)) { + brcmf_fws_bustxcomplete(bcdc->fws, txp, success); + } else { + if (brcmf_proto_bcdc_hdrpull(bus_if->drvr, false, txp, &ifp)) + brcmu_pkt_buf_free_skb(txp); + else + brcmf_txfinalize(ifp, txp, success); + } +} + +static void +brcmf_proto_bcdc_configure_addr_mode(struct brcmf_pub *drvr, int ifidx, + enum proto_addr_mode addr_mode) +{ +} + +static void +brcmf_proto_bcdc_delete_peer(struct brcmf_pub *drvr, int ifidx, + u8 peer[ETH_ALEN]) +{ +} + +static void +brcmf_proto_bcdc_add_tdls_peer(struct brcmf_pub *drvr, int ifidx, + u8 peer[ETH_ALEN]) +{ +} + +static void brcmf_proto_bcdc_rxreorder(struct brcmf_if *ifp, + struct sk_buff *skb) +{ + brcmf_fws_rxreorder(ifp, skb); +} + +static void +brcmf_proto_bcdc_add_if(struct brcmf_if *ifp) +{ + brcmf_fws_add_interface(ifp); +} + +static void +brcmf_proto_bcdc_del_if(struct brcmf_if *ifp) +{ + brcmf_fws_del_interface(ifp); +} + +static void +brcmf_proto_bcdc_reset_if(struct brcmf_if *ifp) +{ + brcmf_fws_reset_interface(ifp); +} + +static int +brcmf_proto_bcdc_init_done(struct brcmf_pub *drvr) +{ + struct brcmf_bcdc *bcdc = drvr->proto->pd; + struct brcmf_fws_info *fws; + + fws = brcmf_fws_attach(drvr); + if (IS_ERR(fws)) + return PTR_ERR(fws); + + bcdc->fws = fws; + return 0; +} + +static void brcmf_proto_bcdc_debugfs_create(struct brcmf_pub *drvr) +{ + brcmf_fws_debugfs_create(drvr); +} + +int brcmf_proto_bcdc_attach(struct brcmf_pub *drvr) +{ + struct brcmf_bcdc *bcdc; + + bcdc = kzalloc(sizeof(*bcdc), GFP_ATOMIC); + if (!bcdc) + goto fail; + + /* ensure that the msg buf directly follows the cdc msg struct */ + if ((unsigned long)(&bcdc->msg + 1) != (unsigned long)bcdc->buf) { + bphy_err(drvr, "struct brcmf_proto_bcdc is not correctly defined\n"); + goto fail; + } + + drvr->proto->hdrpull = brcmf_proto_bcdc_hdrpull; + drvr->proto->query_dcmd = brcmf_proto_bcdc_query_dcmd; + drvr->proto->set_dcmd = brcmf_proto_bcdc_set_dcmd; + drvr->proto->tx_queue_data = brcmf_proto_bcdc_tx_queue_data; + drvr->proto->txdata = brcmf_proto_bcdc_txdata; + drvr->proto->configure_addr_mode = brcmf_proto_bcdc_configure_addr_mode; + drvr->proto->delete_peer = brcmf_proto_bcdc_delete_peer; + drvr->proto->add_tdls_peer = brcmf_proto_bcdc_add_tdls_peer; + drvr->proto->rxreorder = brcmf_proto_bcdc_rxreorder; + drvr->proto->add_if = brcmf_proto_bcdc_add_if; + drvr->proto->del_if = brcmf_proto_bcdc_del_if; + drvr->proto->reset_if = brcmf_proto_bcdc_reset_if; + drvr->proto->init_done = brcmf_proto_bcdc_init_done; + drvr->proto->debugfs_create = brcmf_proto_bcdc_debugfs_create; + drvr->proto->pd = bcdc; + + drvr->hdrlen += BCDC_HEADER_LEN + BRCMF_PROT_FW_SIGNAL_MAX_TXBYTES; + drvr->bus_if->maxctl = BRCMF_DCMD_MAXLEN + + sizeof(struct brcmf_proto_bcdc_dcmd) + ROUND_UP_MARGIN; + return 0; + +fail: + kfree(bcdc); + return -ENOMEM; +} + +void brcmf_proto_bcdc_detach(struct brcmf_pub *drvr) +{ + struct brcmf_bcdc *bcdc = drvr->proto->pd; + + drvr->proto->pd = NULL; + brcmf_fws_detach(bcdc->fws); + kfree(bcdc); +} diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcdc.h b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcdc.h new file mode 100644 index 000000000000..b051d2860cd1 --- /dev/null +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcdc.h @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: ISC +/* + * Copyright (c) 2013 Broadcom Corporation + */ +#ifndef BRCMFMAC_BCDC_H +#define BRCMFMAC_BCDC_H + +#ifdef CONFIG_BRCMFMAC_PROTO_BCDC +int brcmf_proto_bcdc_attach(struct brcmf_pub *drvr); +void brcmf_proto_bcdc_detach(struct brcmf_pub *drvr); +void brcmf_proto_bcdc_txflowblock(struct device *dev, bool state); +void brcmf_proto_bcdc_txcomplete(struct device *dev, struct sk_buff *txp, + bool success); +struct brcmf_fws_info *drvr_to_fws(struct brcmf_pub *drvr); +#else +static inline int brcmf_proto_bcdc_attach(struct brcmf_pub *drvr) { return 0; } +static inline void brcmf_proto_bcdc_detach(struct brcmf_pub *drvr) {} +#endif + +#endif /* BRCMFMAC_BCDC_H */ diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcmsdh.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcmsdh.c new file mode 100644 index 000000000000..8ab7d1e34a6e --- /dev/null +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcmsdh.c @@ -0,0 +1,1269 @@ +// SPDX-License-Identifier: ISC +/* + * Copyright (c) 2010 Broadcom Corporation + */ +/* ****************** SDIO CARD Interface Functions **************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include "chip.h" +#include "bus.h" +#include "debug.h" +#include "sdio.h" +#include "core.h" +#include "common.h" + +#define SDIOH_API_ACCESS_RETRY_LIMIT 2 + +#define DMA_ALIGN_MASK 0x03 + *** 115992 LINES SKIPPED *** From nobody Fri Feb 27 02:30:10 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNf55lbz6T86K for ; Fri, 27 Feb 2026 02:30:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNf2QRJz41qf for ; Fri, 27 Feb 2026 02:30:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FipFJ1U1NJ/umWonuLBKMsIrvDIn5xY/UxXSFdKSRbs=; b=NOo1M5fq8Pb97G0VFhV5wLm+hkfeEuDq19cYyosEDO1ZOL69MhbNHQKUc8T8zN8yYdXbqa huaXfUhFaroHkfHzdKR7KuUGjVcceAAe8yHfwzwOOPf75g1gmM82npYrfeiGR2mGkiKi71 rSheTkGbZcJp6AqKHnZTtdMOk+FPWCDYwskTIWlJuGIkkBBws8njmjKUmYaTE7crBq076H wlI7UAJAspxkvSWZmkf8ACDGjIv+Sb/HUc+9VOn4BDAkkTUTzs9SdvyrKjm4eV6sGkemOA 1DE174eUdtBzxPZVZJGWruDtH7zSlgmklJjXQwhn6XRhdcZB1NQPrW80pmI0pg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159410; a=rsa-sha256; cv=none; b=bW4gWM319b2YLifkIr49U7Jeiz3m94ERff958icmDvcIxYzXow/7dEHSHqU4CU8vaPEozL LHXsF/IPOB3PQyifgxH070V1Yz3ob6SvDgBw/lVGchycZuS2e9xCQStTCxS7K/Ux+7h0Bk w0zhjZOT2yafrJ8d1mM8Wo1EKX7dbms3KZfNcl7jYzYNbtUPPt9m8YlbTacSqRxvsIkceW i/taXqd8JfnWGe8ZF7DAtOpp3e36WCHAfJhAzM6kZY+6WW6FwWIpnOma0s7l3CwSbLiHpm 2t6AzrcY3g4mrIjGpZyQ0vbK1cMFSezmahIZg95KrKaI5NbpXU2rGc/Um1ONnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FipFJ1U1NJ/umWonuLBKMsIrvDIn5xY/UxXSFdKSRbs=; b=XalGr/KS1sWiAcyAkfMe+aPnHPQc8U1///C+ejdarumz+IqfPKM4oyOoQPzh1G2b2IObZm oP/3v/DmE48Y+1JrkL4Y8VN24kmJbP/c2u/yqLUYJ9v/PGYqIHWvl8PyNgMf1xNgmyMjGj TPxp9Hy1wa2K4M9GunlKVfMDLMK41jDZtDMo6XyyKVKE0AGdfFzznznDLTYqcsgw1fPXez sa+9r3aQh+2DDesG1dkRHnShkfbn5DY6dNSfHlQK150wcPqWzkbrkfsjzOib9UiGec16HJ /YunH7dtN7xDhA8LE3eXJDHi28eKCEgsqDxevXTq/QdMYWI/TCat48gz/38pvw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNf1pZLzycg for ; Fri, 27 Feb 2026 02:30:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 20f4a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:30: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: a1fd73b3faed - stable/15 - brcm80211: add LinuxKPI files and module Makefiles List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a1fd73b3faed190457a072ad7127a1a860b3e925 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:30:10 +0000 Message-Id: <69a101b2.20f4a.3331ae88@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a1fd73b3faed190457a072ad7127a1a860b3e925 commit a1fd73b3faed190457a072ad7127a1a860b3e925 Author: Bjoern A. Zeeb AuthorDate: 2026-02-10 21:33:09 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:07:18 +0000 brcm80211: add LinuxKPI files and module Makefiles sys/compat/linuxkpi/common/include/linux/platform_data/brcmfmac.h is based on git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git e5f0a698b34ed76002dc5cff3804a61c80233a7a ( tag: v6.17 ). Currently only PCIe is made to compile. It does load firmware (if needed, e.g., on arm64 with an alignment issue fixed), and starts to come up. To make it work there is a cfg80211 layer and netdevice integration to do, so do not hold your breath just yet. (cherry picked from commit 902136e0fe112383ec64d2ef43a446063b5e6417) --- .../linuxkpi/common/include/linux/bcm47xx_nvram.h | 21 +++ .../linuxkpi/common/include/linux/bcma/bcma.h | 29 ++++ .../linuxkpi/common/include/linux/bcma/bcma_regs.h | 17 ++ .../common/include/linux/platform_data/brcmfmac.h | 185 ++++++++++++++++++++ .../linuxkpi/common/include/linux/ssb/ssb_regs.h | 25 +++ .../dev/broadcom/brcm80211/brcmfmac/cfg80211.c | 190 +++++++++++++++++++++ .../dev/broadcom/brcm80211/brcmfmac/common.c | 35 ++++ .../dev/broadcom/brcm80211/brcmfmac/commonring.c | 15 ++ .../dev/broadcom/brcm80211/brcmfmac/debug.c | 8 + .../dev/broadcom/brcm80211/brcmfmac/debug.h | 24 +++ .../dev/broadcom/brcm80211/brcmfmac/firmware.c | 24 +++ .../dev/broadcom/brcm80211/brcmfmac/flowring.c | 24 +++ .../dev/broadcom/brcm80211/brcmfmac/flowring.h | 8 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/fwil.c | 8 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/fwil.h | 4 + .../dev/broadcom/brcm80211/brcmfmac/fwvid.c | 18 ++ .../dev/broadcom/brcm80211/brcmfmac/msgbuf.c | 34 ++++ sys/contrib/dev/broadcom/brcm80211/brcmfmac/p2p.c | 23 +++ sys/contrib/dev/broadcom/brcm80211/brcmfmac/pcie.c | 117 +++++++++++++ sys/contrib/dev/broadcom/brcm80211/brcmfmac/pno.c | 21 +++ .../dev/broadcom/brcm80211/brcmfmac/proto.h | 16 ++ .../dev/broadcom/brcm80211/brcmfmac/tracepoint.h | 18 ++ .../dev/broadcom/brcm80211/brcmfmac/vendor.c | 9 + sys/contrib/dev/broadcom/brcm80211/brcmfmac/xtlv.c | 4 + .../dev/broadcom/brcm80211/brcmutil/utils.c | 9 + sys/modules/brcm80211/Makefile | 4 + sys/modules/brcm80211/brcmfmac/Makefile | 89 ++++++++++ sys/modules/brcm80211/brcmutil/Makefile | 28 +++ 28 files changed, 1007 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/bcm47xx_nvram.h b/sys/compat/linuxkpi/common/include/linux/bcm47xx_nvram.h new file mode 100644 index 000000000000..744101a2f8b1 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/bcm47xx_nvram.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 Bjoern A. Zeeb + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#ifndef _LINUXKPI_LINUX_BCM47XX_NVRAM_H +#define _LINUXKPI_LINUX_BCM47XX_NVRAM_H + +static inline char * +bcm47xx_nvram_get_contents(size_t *x __unused) +{ + return (NULL); +}; + +static inline void +bcm47xx_nvram_release_contents(const char *x __unused) +{ +}; + +#endif /* _LINUXKPI_LINUX_BCM47XX_NVRAM_H */ diff --git a/sys/compat/linuxkpi/common/include/linux/bcma/bcma.h b/sys/compat/linuxkpi/common/include/linux/bcma/bcma.h new file mode 100644 index 000000000000..3840c3a420e5 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/bcma/bcma.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2025 Bjoern A. Zeeb + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#ifndef _LINUXKPI_LINUX_BCMA_BCMA_H +#define _LINUXKPI_LINUX_BCMA_BCMA_H + +#define BCMA_CORE_80211 0x812 +#define BCMA_CORE_ARM_CA7 0x847 +#define BCMA_CORE_ARM_CM3 0x82A +#define BCMA_CORE_ARM_CR4 0x83E +#define BCMA_CORE_CHIPCOMMON 0x800 +#define BCMA_CORE_GCI 0x840 +#define BCMA_CORE_INTERNAL_MEM 0x80E +#define BCMA_CORE_PCIE2 0x83C +#define BCMA_CORE_PMU 0x827 +#define BCMA_CORE_SDIO_DEV 0x829 +#define BCMA_CORE_SYS_MEM 0x849 + +/* XXX not sure where these belong. */ +#define BCMA_CC_CAP_EXT_AOB_PRESENT 0x00000040 +#define BCMA_CC_PMU_CTL_RES_SHIFT 13 +#define BCMA_CC_PMU_CTL_RES_RELOAD 0x2 +#define BCMA_CC_SROM_CONTROL_OTPSEL 0x00000010 +#define BCMA_CC_SROM_CONTROL_OTP_PRESENT 0x00000020 + +#endif /* _LINUXKPI_LINUX_BCMA_BCMA_H */ diff --git a/sys/compat/linuxkpi/common/include/linux/bcma/bcma_regs.h b/sys/compat/linuxkpi/common/include/linux/bcma/bcma_regs.h new file mode 100644 index 000000000000..0a4cdddf7a73 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/bcma/bcma_regs.h @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2025 Bjoern A. Zeeb + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#ifndef _LINUXKPI_LINUX_BCMA_BCMA_REGS_H +#define _LINUXKPI_LINUX_BCMA_BCMA_REGS_H + +#define BCMA_IOCTL 0x0408 +#define BCMA_IOCTL_CLK 0x0001 +#define BCMA_IOCTL_FGC 0x0002 + +#define BCMA_RESET_CTL 0x0800 +#define BCMA_RESET_CTL_RESET 0x0001 + +#endif /* _LINUXKPI_LINUX_BCMA_BCMA_REGS_H */ diff --git a/sys/compat/linuxkpi/common/include/linux/platform_data/brcmfmac.h b/sys/compat/linuxkpi/common/include/linux/platform_data/brcmfmac.h new file mode 100644 index 000000000000..ec99b7b73d1d --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/platform_data/brcmfmac.h @@ -0,0 +1,185 @@ +/* + * Copyright (c) 2016 Broadcom Corporation + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _LINUX_BRCMFMAC_PLATFORM_H +#define _LINUX_BRCMFMAC_PLATFORM_H + + +#define BRCMFMAC_PDATA_NAME "brcmfmac" + +#define BRCMFMAC_COUNTRY_BUF_SZ 4 + + +/* + * Platform specific driver functions and data. Through the platform specific + * device data functions and data can be provided to help the brcmfmac driver to + * operate with the device in combination with the used platform. + */ + + +/** + * Note: the brcmfmac can be loaded as module or be statically built-in into + * the kernel. If built-in then do note that it uses module_init (and + * module_exit) routines which equal device_initcall. So if you intend to + * create a module with the platform specific data for the brcmfmac and have + * it built-in to the kernel then use a higher initcall then device_initcall + * (see init.h). If this is not done then brcmfmac will load without problems + * but will not pickup the platform data. + * + * When the driver does not "detect" platform driver data then it will continue + * without reporting anything and just assume there is no data needed. Which is + * probably true for most platforms. + */ + +/** + * enum brcmf_bus_type - Bus type identifier. Currently SDIO, USB and PCIE are + * supported. + */ +enum brcmf_bus_type { + BRCMF_BUSTYPE_SDIO, + BRCMF_BUSTYPE_USB, + BRCMF_BUSTYPE_PCIE +}; + + +/** + * struct brcmfmac_sdio_pd - SDIO Device specific platform data. + * + * @txglomsz: SDIO txglom size. Use 0 if default of driver is to be + * used. + * @drive_strength: is the preferred drive_strength to be used for the SDIO + * pins. If 0 then a default value will be used. This is + * the target drive strength, the exact drive strength + * which will be used depends on the capabilities of the + * device. + * @oob_irq_supported: does the board have support for OOB interrupts. SDIO + * in-band interrupts are relatively slow and for having + * less overhead on interrupt processing an out of band + * interrupt can be used. If the HW supports this then + * enable this by setting this field to true and configure + * the oob related fields. + * @oob_irq_nr, + * @oob_irq_flags: the OOB interrupt information. The values are used for + * registering the irq using request_irq function. + * @broken_sg_support: flag for broken sg list support of SDIO host controller. + * Set this to true if the SDIO host controller has higher + * align requirement than 32 bytes for each scatterlist + * item. + * @sd_head_align: alignment requirement for start of data buffer. + * @sd_sgentry_align: length alignment requirement for each sg entry. + * @reset: This function can get called if the device communication + * broke down. This functionality is particularly useful in + * case of SDIO type devices. It is possible to reset a + * dongle via sdio data interface, but it requires that + * this is fully functional. This function is chip/module + * specific and this function should return only after the + * complete reset has completed. + */ +struct brcmfmac_sdio_pd { + int txglomsz; + unsigned int drive_strength; + bool oob_irq_supported; + unsigned int oob_irq_nr; + unsigned long oob_irq_flags; + bool broken_sg_support; + unsigned short sd_head_align; + unsigned short sd_sgentry_align; + void (*reset)(void); +}; + +/** + * struct brcmfmac_pd_cc_entry - Struct for translating user space country code + * (iso3166) to firmware country code and + * revision. + * + * @iso3166: iso3166 alpha 2 country code string. + * @cc: firmware country code string. + * @rev: firmware country code revision. + */ +struct brcmfmac_pd_cc_entry { + char iso3166[BRCMFMAC_COUNTRY_BUF_SZ]; + char cc[BRCMFMAC_COUNTRY_BUF_SZ]; + s32 rev; +}; + +/** + * struct brcmfmac_pd_cc - Struct for translating country codes as set by user + * space to a country code and rev which can be used by + * firmware. + * + * @table_size: number of entries in table (> 0) + * @table: array of 1 or more elements with translation information. + */ +struct brcmfmac_pd_cc { + int table_size; + struct brcmfmac_pd_cc_entry table[]; +}; + +/** + * struct brcmfmac_pd_device - Device specific platform data. (id/rev/bus_type) + * is the unique identifier of the device. + * + * @id: ID of the device for which this data is. In case of SDIO + * or PCIE this is the chipid as identified by chip.c In + * case of USB this is the chipid as identified by the + * device query. + * @rev: chip revision, see id. + * @bus_type: The type of bus. Some chipid/rev exist for different bus + * types. Each bus type has its own set of settings. + * @feature_disable: Bitmask of features to disable (override), See feature.c + * in brcmfmac for details. + * @country_codes: If available, pointer to struct for translating country + * codes. + * @bus: Bus specific (union) device settings. Currently only + * SDIO. + */ +struct brcmfmac_pd_device { + unsigned int id; + unsigned int rev; + enum brcmf_bus_type bus_type; + unsigned int feature_disable; + struct brcmfmac_pd_cc *country_codes; + union { + struct brcmfmac_sdio_pd sdio; + } bus; +}; + +/** + * struct brcmfmac_platform_data - BRCMFMAC specific platform data. + * + * @power_on: This function is called by the brcmfmac driver when the module + * gets loaded. This can be particularly useful for low power + * devices. The platform spcific routine may for example decide to + * power up the complete device. If there is no use-case for this + * function then provide NULL. + * @power_off: This function is called by the brcmfmac when the module gets + * unloaded. At this point the devices can be powered down or + * otherwise be reset. So if an actual power_off is not supported + * but reset is supported by the devices then reset the devices + * when this function gets called. This can be particularly useful + * for low power devices. If there is no use-case for this + * function then provide NULL. + */ +struct brcmfmac_platform_data { + void (*power_on)(void); + void (*power_off)(void); + char *fw_alternative_path; + int device_count; + struct brcmfmac_pd_device devices[]; +}; + + +#endif /* _LINUX_BRCMFMAC_PLATFORM_H */ diff --git a/sys/compat/linuxkpi/common/include/linux/ssb/ssb_regs.h b/sys/compat/linuxkpi/common/include/linux/ssb/ssb_regs.h new file mode 100644 index 000000000000..e1c18b6b632a --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/ssb/ssb_regs.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2025 Bjoern A. Zeeb + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#ifndef _LINUXKPI_LINUX_SSB_SSB_REGS_H +#define _LINUXKPI_LINUX_SSB_SSB_REGS_H + +#define SSB_IDHIGH_RCHI 0x00007000 +#define SSB_IDHIGH_RCHI_SHIFT 8 +#define SSB_IDHIGH_RCLO 0x0000000F +#define SSB_IDLOW_INITIATOR 0x00000080 +#define SSB_IMSTATE_BUSY 0x01800000 +#define SSB_IMSTATE_IBE 0x00020000 +#define SSB_IMSTATE_REJECT 0x02000000 +#define SSB_IMSTATE_TO 0x00040000 +#define SSB_TMSHIGH_BUSY 0x00000004 +#define SSB_TMSHIGH_SERR 0x00000001 +#define SSB_TMSLOW_CLOCK 0x00010000 +#define SSB_TMSLOW_FGC 0x00020000 +#define SSB_TMSLOW_REJECT 0x00000002 +#define SSB_TMSLOW_RESET 0x00000001 + +#endif /* _LINUXKPI_LINUX_SSB_SSB_REGS_H */ diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/cfg80211.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/cfg80211.c index 8af402555b5e..35f68b370714 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -5,13 +5,21 @@ /* Toplevel file. Relies on dhd_linux.c to send commands to the dongle. */ +#if defined(__FreeBSD__) +#include +#endif #include #include #include #include +#if defined(__linux__) #include +#endif #include #include +#if defined(__FreeBSD__) +#include +#endif #include #include @@ -36,6 +44,24 @@ #define BRCMF_SCAN_IE_LEN_MAX 2048 +#if defined(__FreeBSD__) +#ifdef WPA_OUI +#undef WPA_OUI +#endif +#ifdef WPA_OUI_TYPE +#undef WPA_OUI_TYPE +#endif +#ifdef RSN_OUI +#undef RSN_OUI +#endif +#ifdef WME_OUI_TYPE +#undef WME_OUI_TYPE +#endif +#ifdef WPS_OUI_TYPE +#undef WPS_OUI_TYPE +#endif +#endif + #define WPA_OUI "\x00\x50\xF2" /* WPA OUI */ #define WPA_OUI_TYPE 1 #define RSN_OUI "\x00\x0F\xAC" /* RSN OUI */ @@ -257,7 +283,11 @@ struct brcmf_vs_tlv { }; struct parsed_vndr_ie_info { +#if defined(__linux__) u8 *ie_ptr; +#elif defined(__FreeBSD__) + const u8 *ie_ptr; +#endif u32 ie_len; /* total length including id & length field */ struct brcmf_vs_tlv vndrie; }; @@ -429,7 +459,11 @@ brcmf_parse_tlvs(const void *buf, int buflen, uint key) if ((elt->id == key) && (totlen >= (len + TLV_HDR_LEN))) return elt; +#if defined(__linux__) elt = (struct brcmf_tlv *)((u8 *)elt + (len + TLV_HDR_LEN)); +#elif defined(__FreeBSD__) + elt = (const struct brcmf_tlv *)((const u8 *)elt + (len + TLV_HDR_LEN)); +#endif totlen -= (len + TLV_HDR_LEN); } @@ -462,7 +496,11 @@ brcmf_tlv_has_ie(const u8 *ie, const u8 **tlvs, u32 *tlvs_len, return false; } +#if defined(__linux__) static struct brcmf_vs_tlv * +#elif defined(__FreeBSD__) +static const struct brcmf_vs_tlv * +#endif brcmf_find_wpaie(const u8 *parse, u32 len) { const struct brcmf_tlv *ie; @@ -470,20 +508,34 @@ brcmf_find_wpaie(const u8 *parse, u32 len) while ((ie = brcmf_parse_tlvs(parse, len, WLAN_EID_VENDOR_SPECIFIC))) { if (brcmf_tlv_has_ie((const u8 *)ie, &parse, &len, WPA_OUI, TLV_OUI_LEN, WPA_OUI_TYPE)) +#if defined(__linux__) return (struct brcmf_vs_tlv *)ie; +#elif defined(__FreeBSD__) + return (const struct brcmf_vs_tlv *)ie; +#endif } return NULL; } +#if defined(__linux__) static struct brcmf_vs_tlv * +#elif defined(__FreeBSD__) +static const struct brcmf_vs_tlv * +#endif brcmf_find_wpsie(const u8 *parse, u32 len) { const struct brcmf_tlv *ie; while ((ie = brcmf_parse_tlvs(parse, len, WLAN_EID_VENDOR_SPECIFIC))) { +#if defined(__linux__) if (brcmf_tlv_has_ie((u8 *)ie, &parse, &len, WPA_OUI, TLV_OUI_LEN, WPS_OUI_TYPE)) return (struct brcmf_vs_tlv *)ie; +#elif defined(__FreeBSD__) + if (brcmf_tlv_has_ie((const u8 *)ie, &parse, &len, + WPA_OUI, TLV_OUI_LEN, WPS_OUI_TYPE)) + return (const struct brcmf_vs_tlv *)ie; +#endif } return NULL; } @@ -1239,8 +1291,13 @@ s32 brcmf_notify_escan_complete(struct brcmf_cfg80211_info *cfg, reqid = brcmf_pno_find_reqid_by_bucket(cfg->pno, bucket); if (!aborted) { +#if defined(__linux__) brcmf_dbg(SCAN, "report results: reqid=%llu\n", reqid); +#elif defined(__FreeBSD__) + brcmf_dbg(SCAN, "report results: reqid=%ju\n", + (uintmax_t)reqid); +#endif cfg80211_sched_scan_results(cfg_to_wiphy(cfg), reqid); } @@ -2413,7 +2470,11 @@ brcmf_cfg80211_connect(struct wiphy *wiphy, struct net_device *ndev, ie = NULL; ie_len = 0; /* find the WPA_IE */ +#if defined(__linux__) wpa_ie = brcmf_find_wpaie((u8 *)sme->ie, sme->ie_len); +#elif defined(__FreeBSD__) + wpa_ie = brcmf_find_wpaie(sme->ie, sme->ie_len); +#endif if (wpa_ie) { ie = wpa_ie; ie_len = wpa_ie->len + TLV_HDR_LEN; @@ -2450,7 +2511,11 @@ brcmf_cfg80211_connect(struct wiphy *wiphy, struct net_device *ndev, chanspec = 0; } +#if defined(__linux__) brcmf_dbg(INFO, "ie (%p), ie_len (%zd)\n", sme->ie, sme->ie_len); +#elif defined(__FreeBSD__) + brcmf_dbg(INFO, "ie (%p), ie_len (%u)\n", sme->ie, sme->ie_len); +#endif err = brcmf_set_wpa_version(ndev, sme); if (err) { @@ -2840,7 +2905,11 @@ brcmf_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev, key = &ifp->vif->profile.key[key_idx]; memset(key, 0, sizeof(*key)); if ((ext_key) && (!is_multicast_ether_addr(mac_addr))) +#if defined(__linux__) memcpy((char *)&key->ea, (void *)mac_addr, ETH_ALEN); +#elif defined(__FreeBSD__) + memcpy((char *)&key->ea, mac_addr, ETH_ALEN); +#endif key->len = params->key_len; key->index = key_idx; memcpy(key->data, params->key, key->len); @@ -2849,9 +2918,15 @@ brcmf_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev, if (params->seq && params->seq_len == 6) { /* rx iv */ +#if defined(__linux__) u8 *ivptr; ivptr = (u8 *)params->seq; +#elif defined(__FreeBSD__) + const u8 *ivptr; + + ivptr = params->seq; +#endif key->rxiv.hi = (ivptr[5] << 24) | (ivptr[4] << 16) | (ivptr[3] << 8) | ivptr[2]; key->rxiv.lo = (ivptr[1] << 8) | ivptr[0]; @@ -3758,8 +3833,13 @@ brcmf_alloc_internal_escan_request(struct wiphy *wiphy, u32 n_netinfo) { req = kzalloc(req_size, GFP_KERNEL); if (req) { req->wiphy = wiphy; +#if defined(__linux__) req->ssids = (void *)(&req->channels[0]) + n_netinfo * sizeof(req->channels[0]); +#elif defined(__FreeBSD__) + req->ssids = (void *)((&req->channels[0]) + + n_netinfo * sizeof(req->channels[0])); +#endif } return req; } @@ -3902,7 +3982,11 @@ brcmf_notify_sched_scan_results(struct brcmf_if *ifp, } netinfo_start = brcmf_get_netinfo_array(pfn_result); +#if defined(__linux__) datalen = e->datalen - ((void *)netinfo_start - (void *)pfn_result); +#elif defined(__FreeBSD__) + datalen = e->datalen - ((u8 *)netinfo_start - (u8 *)pfn_result); +#endif if (datalen < result_count * sizeof(*netinfo)) { bphy_err(drvr, "insufficient event data\n"); goto out_err; @@ -3992,7 +4076,11 @@ static __always_inline void brcmf_delay(u32 ms) cond_resched(); mdelay(ms); } else { +#if defined(__linux__) msleep(ms); +#elif defined(__FreeBSD__) + linux_msleep(ms); +#endif } } @@ -4529,7 +4617,11 @@ static s32 brcmf_configure_opensecurity(struct brcmf_if *ifp) return 0; } +#if defined(__linux__) static bool brcmf_valid_wpa_oui(u8 *oui, bool is_rsn_ie) +#elif defined(__FreeBSD__) +static bool brcmf_valid_wpa_oui(const u8 *oui, bool is_rsn_ie) +#endif { if (is_rsn_ie) return (memcmp(oui, RSN_OUI, TLV_OUI_LEN) == 0); @@ -4553,7 +4645,11 @@ brcmf_configure_wpaie(struct brcmf_if *ifp, u32 gval = 0; u32 wpa_auth = 0; u32 offset; +#if defined(__linux__) u8 *data; +#elif defined(__FreeBSD__) + const u8 *data; +#endif u16 rsn_cap; u32 wme_bss_disable; u32 mfp; @@ -4563,7 +4659,11 @@ brcmf_configure_wpaie(struct brcmf_if *ifp, goto exit; len = wpa_ie->len + TLV_HDR_LEN; +#if defined(__linux__) data = (u8 *)wpa_ie; +#elif defined(__FreeBSD__) + data = (const u8 *)wpa_ie; +#endif offset = TLV_HDR_LEN; if (!is_rsn_ie) offset += VS_IE_FIXED_HDR_LEN; @@ -4786,19 +4886,32 @@ static s32 brcmf_parse_vndr_ies(const u8 *vndr_ie_buf, u32 vndr_ie_len, struct parsed_vndr_ies *vndr_ies) { +#if defined(__linux__) struct brcmf_vs_tlv *vndrie; struct brcmf_tlv *ie; +#elif defined(__FreeBSD__) + const struct brcmf_vs_tlv *vndrie; + const struct brcmf_tlv *ie; +#endif struct parsed_vndr_ie_info *parsed_info; s32 remaining_len; remaining_len = (s32)vndr_ie_len; memset(vndr_ies, 0, sizeof(*vndr_ies)); +#if defined(__linux__) ie = (struct brcmf_tlv *)vndr_ie_buf; +#elif defined(__FreeBSD__) + ie = (const struct brcmf_tlv *)vndr_ie_buf; +#endif while (ie) { if (ie->id != WLAN_EID_VENDOR_SPECIFIC) goto next; +#if defined(__linux__) vndrie = (struct brcmf_vs_tlv *)ie; +#elif defined(__FreeBSD__) + vndrie = (const struct brcmf_vs_tlv *)ie; +#endif /* len should be bigger than OUI length + one */ if (vndrie->len < (VS_IE_FIXED_HDR_LEN - TLV_HDR_LEN + 1)) { brcmf_err("invalid vndr ie. length is too small %d\n", @@ -4816,7 +4929,11 @@ brcmf_parse_vndr_ies(const u8 *vndr_ie_buf, u32 vndr_ie_len, parsed_info = &vndr_ies->ie_info[vndr_ies->count]; /* save vndr ie information */ +#if defined(__linux__) parsed_info->ie_ptr = (char *)vndrie; +#elif defined(__FreeBSD__) + parsed_info->ie_ptr = (const char *)vndrie; +#endif parsed_info->ie_len = vndrie->len + TLV_HDR_LEN; memcpy(&parsed_info->vndrie, vndrie, sizeof(*vndrie)); @@ -4833,14 +4950,22 @@ next: if (remaining_len <= TLV_HDR_LEN) ie = NULL; else +#if defined(__linux__) ie = (struct brcmf_tlv *)(((u8 *)ie) + ie->len + +#elif defined(__FreeBSD__) + ie = (const struct brcmf_tlv *)(((const u8 *)ie) + ie->len + +#endif TLV_HDR_LEN); } return 0; } static u32 +#if defined(__linux__) brcmf_vndr_ie(u8 *iebuf, s32 pktflag, u8 *ie_ptr, u32 ie_len, s8 *add_del_cmd) +#elif defined(__FreeBSD__) +brcmf_vndr_ie(u8 *iebuf, s32 pktflag, const u8 *ie_ptr, u32 ie_len, s8 *add_del_cmd) +#endif { strscpy(iebuf, add_del_cmd, VNDR_IE_CMD_LEN); @@ -5085,11 +5210,19 @@ brcmf_parse_configure_security(struct brcmf_if *ifp, s32 err = 0; /* find the RSN_IE */ +#if defined(__linux__) rsn_ie = brcmf_parse_tlvs((u8 *)settings->beacon.tail, +#elif defined(__FreeBSD__) + rsn_ie = brcmf_parse_tlvs(settings->beacon.tail, +#endif settings->beacon.tail_len, WLAN_EID_RSN); /* find the WPA_IE */ +#if defined(__linux__) wpa_ie = brcmf_find_wpaie((u8 *)settings->beacon.tail, +#elif defined(__FreeBSD__) + wpa_ie = brcmf_find_wpaie(settings->beacon.tail, +#endif settings->beacon.tail_len); if (wpa_ie || rsn_ie) { @@ -5100,9 +5233,16 @@ brcmf_parse_configure_security(struct brcmf_if *ifp, if (err < 0) return err; } else { +#if defined(__linux__) struct brcmf_vs_tlv *tmp_ie; tmp_ie = (struct brcmf_vs_tlv *)rsn_ie; +#elif defined(__FreeBSD__) + const struct brcmf_vs_tlv *tmp_ie; + + tmp_ie = (const struct brcmf_vs_tlv *)rsn_ie; +#endif + /* RSN IE */ err = brcmf_configure_wpaie(ifp, tmp_ie, true); @@ -5155,7 +5295,11 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev, &ifp->vif->is_11d)) { is_11d = supports_11d = false; } else { +#if defined(__linux__) country_ie = brcmf_parse_tlvs((u8 *)settings->beacon.tail, +#elif defined(__FreeBSD__) + country_ie = brcmf_parse_tlvs(settings->beacon.tail, +#endif settings->beacon.tail_len, WLAN_EID_COUNTRY); is_11d = country_ie ? 1 : 0; @@ -5166,7 +5310,11 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev, if (settings->ssid == NULL || settings->ssid_len == 0) { ie_offset = DOT11_MGMT_HDR_LEN + DOT11_BCN_PRB_FIXED_LEN; ssid_ie = brcmf_parse_tlvs( +#if defined(__linux__) (u8 *)&settings->beacon.head[ie_offset], +#elif defined(__FreeBSD__) + &settings->beacon.head[ie_offset], +#endif settings->beacon.head_len - ie_offset, WLAN_EID_SSID); if (!ssid_ie || ssid_ie->len > IEEE80211_MAX_SSID_LEN) @@ -5382,7 +5530,11 @@ static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev, if (ifp->vif->wdev.iftype == NL80211_IFTYPE_AP) { /* Due to most likely deauths outstanding we sleep */ /* first to make sure they get processed by fw. */ +#if defined(__linux__) msleep(400); +#elif defined(__FreeBSD__) + linux_msleep(400); +#endif if (profile->use_fwauth != BIT(BRCMF_PROFILE_FWAUTH_NONE)) { struct cfg80211_crypto_settings crypto = {}; @@ -5504,10 +5656,18 @@ brcmf_cfg80211_change_station(struct wiphy *wiphy, struct net_device *ndev, if (params->sta_flags_set & BIT(NL80211_STA_FLAG_AUTHORIZED)) err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SCB_AUTHORIZE, +#if defined(__linux__) (void *)mac, ETH_ALEN); +#elif defined(__FreeBSD__) + __DECONST(u8 *, mac), ETH_ALEN); +#endif else err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SCB_DEAUTHORIZE, +#if defined(__linux__) (void *)mac, ETH_ALEN); +#elif defined(__FreeBSD__) + __DECONST(u8 *, mac), ETH_ALEN); +#endif if (err < 0) bphy_err(drvr, "Setting SCB (de-)authorize failed, %d\n", err); @@ -5623,8 +5783,13 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, memcpy(action_frame->data, &buf[DOT11_MGMT_HDR_LEN], le16_to_cpu(action_frame->len)); +#if defined(__linux__) brcmf_dbg(TRACE, "Action frame, cookie=%lld, len=%d, channel=%d\n", *cookie, le16_to_cpu(action_frame->len), +#elif defined(__FreeBSD__) + brcmf_dbg(TRACE, "Action frame, cookie=%ju, len=%d, channel=%d\n", + (uintmax_t)*cookie, le16_to_cpu(action_frame->len), +#endif le32_to_cpu(af_params->channel)); ack = brcmf_p2p_send_action_frame(cfg, cfg_to_ndev(cfg), @@ -5815,11 +5980,19 @@ brcmf_notify_tdls_peer_event(struct brcmf_if *ifp, break; case BRCMF_E_REASON_TDLS_PEER_CONNECTED: brcmf_dbg(TRACE, "TDLS Peer Connected\n"); +#if defined(__linux__) brcmf_proto_add_tdls_peer(ifp->drvr, ifp->ifidx, (u8 *)e->addr); +#elif defined(__FreeBSD__) + brcmf_proto_add_tdls_peer(ifp->drvr, ifp->ifidx, e->addr); +#endif break; case BRCMF_E_REASON_TDLS_PEER_DISCONNECTED: brcmf_dbg(TRACE, "TDLS Peer Disconnected\n"); +#if defined(__linux__) brcmf_proto_delete_peer(ifp->drvr, ifp->ifidx, (u8 *)e->addr); +#elif defined(__FreeBSD__) + brcmf_proto_delete_peer(ifp->drvr, ifp->ifidx, e->addr); +#endif break; } @@ -6553,7 +6726,11 @@ brcmf_notify_connect_status(struct brcmf_if *ifp, (e->event_code == BRCMF_E_DEAUTH_IND) || (e->event_code == BRCMF_E_DISASSOC_IND) || ((e->event_code == BRCMF_E_LINK) && (!e->flags))) { +#if defined(__linux__) brcmf_proto_delete_peer(ifp->drvr, ifp->ifidx, (u8 *)e->addr); +#elif defined(__FreeBSD__) + brcmf_proto_delete_peer(ifp->drvr, ifp->ifidx, e->addr); +#endif } if (brcmf_is_apmode(ifp->vif)) { @@ -6640,7 +6817,11 @@ brcmf_notify_mic_status(struct brcmf_if *ifp, else key_type = NL80211_KEYTYPE_PAIRWISE; +#if defined(__linux__) cfg80211_michael_mic_failure(ifp->ndev, (u8 *)&e->addr, key_type, -1, +#elif defined(__FreeBSD__) + cfg80211_michael_mic_failure(ifp->ndev, e->addr, key_type, -1, +#endif NULL, GFP_KERNEL); return 0; @@ -8183,7 +8364,11 @@ brcmf_cfg80211_dump_survey(struct wiphy *wiphy, struct net_device *ndev, goto exit; /* Add 10 ms for IOVAR completion */ +#if defined(__linux__) msleep(ACS_MSRMNT_DELAY + 10); +#elif defined(__FreeBSD__) + linux_msleep(ACS_MSRMNT_DELAY + 10); +#endif /* Issue IOVAR to collect measurement results */ req.msrmnt_query = 1; @@ -8204,8 +8389,13 @@ brcmf_cfg80211_dump_survey(struct wiphy *wiphy, struct net_device *ndev, brcmf_dbg(INFO, "OBSS dump: channel %d: survey duration %d\n", ieee80211_frequency_to_channel(info->channel->center_freq), ACS_MSRMNT_DELAY); +#if defined(__linux__) brcmf_dbg(INFO, "noise(%d) busy(%llu) rx(%llu) tx(%llu)\n", info->noise, info->time_busy, info->time_rx, info->time_tx); +#elif defined(__FreeBSD__) + brcmf_dbg(INFO, "noise(%d) busy(%ju) rx(%ju) tx(%ju)\n", + info->noise, (uintmax_t)info->time_busy, (uintmax_t)info->time_rx, (uintmax_t)info->time_tx); +#endif exit: if (!brcmf_is_apmode(ifp->vif)) diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/common.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/common.c index 688f16c51319..17e408b7fa23 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/common.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/common.c @@ -3,6 +3,10 @@ * Copyright (c) 2010 Broadcom Corporation */ +#if defined(__FreeBSD__) +#define LINUXKPI_PARAM_PREFIX brcmfmac_ +#endif + #include #include #include @@ -24,6 +28,12 @@ MODULE_AUTHOR("Broadcom Corporation"); MODULE_DESCRIPTION("Broadcom 802.11 wireless LAN fullmac driver."); MODULE_LICENSE("Dual BSD/GPL"); +#if defined(__FreeBSD__) +MODULE_DEPEND(brcmfmac, brcmutil, 1, 1, 1); +MODULE_DEPEND(brcmfmac, linuxkpi, 1, 1, 1); +MODULE_DEPEND(brcmfmac, linuxkpi_wlan, 1, 1, 1); +MODULE_DEPEND(brcmfmac, lindebugfs, 1, 1, 1); /* XXX-BZ someone should fix this */ +#endif #define BRCMF_DEFAULT_SCAN_CHANNEL_TIME 40 #define BRCMF_DEFAULT_SCAN_UNASSOC_TIME 40 @@ -118,7 +128,11 @@ static int brcmf_c_download(struct brcmf_if *ifp, u16 flag, } static int brcmf_c_download_blob(struct brcmf_if *ifp, +#if defined(__linux__) const void *data, size_t size, +#elif defined(__FreeBSD__) + const u8 *data, size_t size, +#endif const char *loadvar, const char *statvar) { struct brcmf_pub *drvr = ifp->drvr; @@ -467,10 +481,22 @@ void __brcmf_err(struct brcmf_bus *bus, const char *func, const char *fmt, ...) vaf.fmt = fmt; vaf.va = &args; +#if defined(__linux__) if (bus) dev_err(bus->dev, "%s: %pV", func, &vaf); else pr_err("%s: %pV", func, &vaf); +#elif defined(__FreeBSD__) + { + char *str; + vasprintf(&str, M_KMALLOC, vaf.fmt, args); + if (bus) + dev_err(bus->dev, "ERROR: %s: %s", func, str); + else + pr_err("ERROR: %s: %s", func, str); + free(str, M_KMALLOC); + } +#endif va_end(args); } @@ -487,7 +513,16 @@ void __brcmf_dbg(u32 level, const char *func, const char *fmt, ...) va_start(args, fmt); vaf.va = &args; if (brcmf_msg_level & level) +#if defined(__linux__) pr_debug("%s %pV", func, &vaf); +#elif defined(__FreeBSD__) + { + char *str; + vasprintf(&str, M_KMALLOC, vaf.fmt, args); + pr_debug("%s %s", func, str); + free(str, M_KMALLOC); + } +#endif trace_brcmf_dbg(level, func, &vaf); va_end(args); } diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/commonring.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/commonring.c index e44236cb210e..c0880fa12f57 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/commonring.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/commonring.c @@ -119,8 +119,13 @@ again: available = commonring->r_ptr - commonring->w_ptr; if (available > 1) { +#if defined(__linux__) ret_ptr = commonring->buf_addr + (commonring->w_ptr * commonring->item_len); +#elif defined(__FreeBSD__) + ret_ptr = (void *)((uintptr_t)commonring->buf_addr + + (commonring->w_ptr * commonring->item_len)); +#endif commonring->w_ptr++; if (commonring->w_ptr == commonring->depth) commonring->w_ptr = 0; @@ -155,8 +160,13 @@ again: available = commonring->r_ptr - commonring->w_ptr; if (available > 1) { +#if defined(__linux__) ret_ptr = commonring->buf_addr + (commonring->w_ptr * commonring->item_len); +#elif defined(__FreeBSD__) + ret_ptr = (void *)((uintptr_t)commonring->buf_addr + + (commonring->w_ptr * commonring->item_len)); +#endif *alloced = min_t(u16, n_items, available - 1); if (*alloced + commonring->w_ptr > commonring->depth) *alloced = commonring->depth - commonring->w_ptr; @@ -217,8 +227,13 @@ void *brcmf_commonring_get_read_ptr(struct brcmf_commonring *commonring, if (*n_items == 0) return NULL; +#if defined(__linux__) return commonring->buf_addr + *** 1219 LINES SKIPPED *** From nobody Fri Feb 27 02:30:12 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNh5g78z6T86Q for ; Fri, 27 Feb 2026 02:30:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNh33M4z41tX for ; Fri, 27 Feb 2026 02:30:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dCwZ/FzhhNDY2ePtRWANQ3O+0tMy+vpeUGMnetAuCQc=; b=ItTKtaavSOlaCUb0bZvCJcoIXsTL/1UrH1XYt8NDQC/RFYxHgRHCKDNk9I5TkcEMF7bnIq Vx4dkuFvy4rweT8tscVzVhI0KH0tr5+tKXqSvoJ8kgoK2/2ciDRE3usCid1d7iYEy1z9az KvgSqy64Pb0V2xVfn/KM+lRjEzJ8NYrU0gxWdjk/mL7xeVBcs77x3YHCitQRQZU3X6Mabs XcyG5jUI1Cq4gFwLsJ632ZjJeaRP45rcDaplXPnoeeUvIhVUq7LNN0Im4N2+nZA2WPY0mQ ym9HMdbpwz2iZSIMxEpAb/EeVknUwI1K69fj/6rNS/MoviKyirwRbl8uXE69uA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159412; a=rsa-sha256; cv=none; b=VZpjEazDdWuS5zTKWwPaWrhD+sbOSZYOs4IKrzrz/TNS+HsE7WLtqECiIIUnZuc2zNn/5B gI9uPPzgyLc7wUw4ysM2W2tzeNhXmyX4YDwhik7K/nRr9euE70NrF2S260QtNo8z1fJImK TEryxm4Yz3kHxCYxrF2pjDH1YrHpjsoGjLaRA8MYbX4+LQ+WEuE5aynkPfLQDI6Bzuf3yq xVstZtebRqFyRTNqER/HyaLikJdDmQH+4ooWFTkdrwNxd/yq8pHuYq9auiJnn1xbjeLsWj Tc5RbYBzFeaWOGwjsykV49G6m1gfDbewASNIhwsUfl8nsw/LKecX1mDAroKViw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dCwZ/FzhhNDY2ePtRWANQ3O+0tMy+vpeUGMnetAuCQc=; b=uQ/9UQu11EYyddwX4OSSWIs30RgBL2D01Gs/NhpsKqkPfZWlhrOzHNAidacch2lGL27Xj/ SIegSlrcsVTs0YFSDjwNTINgrBBnx+sF+r8MB0iwTjRotkIOXZDGidylU2eWF/PH0XUOFO RJPrn6jQQ8ks4vjltxoSLcSQmwjZDEVaRmmrIntugRH70oqmtboRQhnSIQIAuOrhgG8WH9 PlJZtPKe0439DY6h9C4Vy5Ej83XhNVSs5UZ2YC7wc8Dl/G1qScVrdMdRDjOWBfRC0XMHQ9 Rwvno1ebVZmy2dUItb+rJpFZleeqCkCjTGJDD66Xhmbcg4ECpFdo8F4fBQkxkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNh2dmrzycj for ; Fri, 27 Feb 2026 02:30:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21a56 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:30: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: 9ec32912dc53 - stable/15 - brcmfmac: deal with bus attachments to the module Makefile List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 9ec32912dc53ac42c0e27b22ac5dd312fe8b7b8d Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:30:12 +0000 Message-Id: <69a101b4.21a56.28b689d3@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=9ec32912dc53ac42c0e27b22ac5dd312fe8b7b8d commit 9ec32912dc53ac42c0e27b22ac5dd312fe8b7b8d Author: Bjoern A. Zeeb AuthorDate: 2026-02-09 01:08:42 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:07:33 +0000 brcmfmac: deal with bus attachments to the module Makefile As with LinuxKPI-based wireless drivers, e.g., rtw88, PCI depends on PCI being compiled into the kernel, SDIO will depend on MMCCAM in the kernel once supported, and USB can always be loaded. Sponsored by: The FreeBSD Foundation (cherry picked from commit 98c44ccb01d9461da477ec8d784c763e4d03fb36) --- sys/modules/brcm80211/brcmfmac/Makefile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/sys/modules/brcm80211/brcmfmac/Makefile b/sys/modules/brcm80211/brcmfmac/Makefile index 67955c96db53..b0c4d75a3d17 100644 --- a/sys/modules/brcm80211/brcmfmac/Makefile +++ b/sys/modules/brcm80211/brcmfmac/Makefile @@ -3,7 +3,7 @@ DEVDIR= ${SRCTOP}/sys/contrib/dev/broadcom/brcm80211/brcmfmac .PATH: ${DEVDIR} # Should split this up into a core driver and 3 more -WITH_PCIE=1 +WITH_PCI=1 WITH_SDIO=0 WITH_USB=0 @@ -20,21 +20,24 @@ SRCS+= fweh.c fwil.c fwvid.c p2p.c pno.c proto.c vendor.c xtlv.c SRCS+= wcc/core.c cyw/core.c bca/core.c -.if defined(WITH_PCIE) && ${WITH_PCIE} > 0 -CFLAGS+= -DCONFIG_BRCMFMAC_PCIE=1 +# PCI parts; PCI needs to be compiled into the kernel and cannot be loaded. +.if defined(WITH_PCI) && ${WITH_PCI} > 0 && ${KERN_OPTS:MDEV_PCI} SRCS+= pcie.c msgbuf.c commonring.c flowring.c +CFLAGS+= -DCONFIG_BRCMFMAC_PCIE=1 .endif -.if defined(WITH_SDIO) && ${WITH_SDIO} > 0 -CFLAGS+= -DCONFIG_BRCMFMAC_SDIO=1 +# SDIO parts; SDIO depends on an MMCCAM kernel. +.if defined(WITH_SDIO) && ${WITH_SDIO} > 0 && ${KERN_OPTS:MMMCCAM} SRCS+= sdio.c bcmsdh.c SRCS+= sdio_if.h SRCS+= sdiodevs.h +CFLAGS+= -DCONFIG_BRCMFMAC_SDIO=1 .endif +# USB parts; USB can be loaded and is unconditional on any kernel config. .if defined(WITH_USB) && ${WITH_USB} > 0 -CFLAGS+= -DCONFIG_BRCMFMAC_USB=1 SRCS+= usb.c +CFLAGS+= -DCONFIG_BRCMFMAC_USB=1 .endif .if (defined(WITH_SDIO) && ${WITH_SDIO} > 0) || \ @@ -74,7 +77,7 @@ CFLAGS+= ${LINUXKPI_INCLUDES} CFLAGS+= -ferror-limit=0 #CFLAGS+= -DCONFIG_BRCM_TRACING=${WITH_TRACING} -CFLAGS+= -DCONFIG_BRCMFMAC_PROTO_MSGBUF=${WITH_PCIE} +CFLAGS+= -DCONFIG_BRCMFMAC_PROTO_MSGBUF=${WITH_PCI} CFLAGS+= -DCONFIG_BRCMDBG=${WITH_DEBUG} #CFLAGS+= -DCONFIG_DMI=${WITH_DMI} From nobody Fri Feb 27 02:30:11 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNg4rD2z6T81m for ; Fri, 27 Feb 2026 02:30:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNg2jvZz41t5 for ; Fri, 27 Feb 2026 02:30:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PTkKof3CAssLbAgZqaZ13MICmKV2tL3H8J9/HBBL6pU=; b=u/y8HUq5Ql/h5FFO5Go4mcenpyvGn8LB3Z6cdEp0If/MRirhA1CfwR2KzHxdfn5AeLTliE nQUohepS9y/EXTR50ABtzHwkD6i+bO75uHIxz62bAOiRlE7AtI9MH4Q2t2Acyx9uMuy6sQ UuYzfml/6tUzmyvmKZjg452nc6s/Sl6Bw3o20DxReqsuKaTc3NC2PHj4TzaYtKx3+SEY08 fo/5MdldXYUl9Pg69g2pA4qoYxgUWlr3wcXi3Dql1ZX5rWd++GgMeIU4MgP94v/HxOod7A sRY1S4liN3k/EkNb5yf4Ye0ctFx3i3kanuN9QoY192634MJt83EUKKMYsRX4YA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159411; a=rsa-sha256; cv=none; b=ubN3EbMz1xWlVvpDyH1dDiKPPpb7NFL1s8e38mBtpQG4rSYB+qw0JPDbqk5WUvH7BiBqmU hAhkWIgEimdo5XiiJQbZz9pbSImwfr0bo4IomxgPwze2+rgQ1O5iwUiN0AnN77WxEnxFmh 0wea6IQVZdDLgUOEtZrrNSmTON7Og6rHtQiC9dkWNOfux9WzX4M1JLWHnwuB7Z5ivOgC3G sPdIzMKpqcwRedunMj1/SMdmrMCqpp8Gw4yT9G6gPhu/SNX/D5SdXeQjs+ZAsI7nV0mcY6 fFNB+3TV8Gu6/Oxk4GJL3MGVhX/qmMWfBDRtsFK0ifQBRteyFVrzVEPHeyLAiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PTkKof3CAssLbAgZqaZ13MICmKV2tL3H8J9/HBBL6pU=; b=CZ1rQu9w6Vz0jBIltRjKK6mPmvYmYz7l6lfg7HNXG7hxgw67EKkYsZsxT3jZWNjJAYt13T vFr7p7KYAaqVtvwesNBGbiff/tN94Yu5RKb7eAB5a75DDgu9onV0mdjmdhdnyEKQZdaa0/ y+F2rh2OzFUaF9yv0ccCwritPrMAcIcnMYFNOiHqKfJu6kL5le94DgEFPe+EtNbqKama94 hce6QDmjoWvYCyRtc3UQ+Vw3JR55yv7hfX4FyCM8qXyx/qfnnT3Nyb44Kvjz/+4u4re8/5 16FugPGZ9OYebj9GbJu8JQaUcrH0TCMMFS+y5oFMLkH5b5wlSbXgyB9Y/0QE8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNg2GFyzygJ for ; Fri, 27 Feb 2026 02:30:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22075 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:30:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: f77e10824dd5 - stable/15 - brcmfmac: make USB parts compile (and not panic right away) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f77e10824dd526652849e39d7e9879cfe3d25597 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:30:11 +0000 Message-Id: <69a101b3.22075.59152bfc@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f77e10824dd526652849e39d7e9879cfe3d25597 commit f77e10824dd526652849e39d7e9879cfe3d25597 Author: Bjoern A. Zeeb AuthorDate: 2026-02-09 01:07:01 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:07:25 +0000 brcmfmac: make USB parts compile (and not panic right away) Fix casts and consts and add one extra error check for a NULL pointer. This will require [a future] linuxkpi_usb. There are very few dongles I know off: - the original Raspberry PI USB dongle [1] - Cisco Linksys AE1200 The reason for making USB compile despite the limited 11n 150/300 Mbit/s adapters is that it is the simplest way to work on cfg80211 while on the road, not requiring a full PCIe slot or another SoC for SDIO. Sponsored by: The FreeBSD Foundation Hardware donated by: Martin Husemann (martin NetBSD.org) [1] (cherry picked from commit 22741535bcf4b003e41c0ecd22cca578359ba434) --- sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcdc.c | 6 +++ sys/contrib/dev/broadcom/brcm80211/brcmfmac/usb.c | 52 ++++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcdc.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcdc.c index 9ec0c60b6da1..7e846cbf5157 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcdc.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcdc.c @@ -387,12 +387,18 @@ brcmf_proto_bcdc_configure_addr_mode(struct brcmf_pub *drvr, int ifidx, static void brcmf_proto_bcdc_delete_peer(struct brcmf_pub *drvr, int ifidx, +#if defined(__FreeBSD__) + const +#endif u8 peer[ETH_ALEN]) { } static void brcmf_proto_bcdc_add_tdls_peer(struct brcmf_pub *drvr, int ifidx, +#if defined(__FreeBSD__) + const +#endif u8 peer[ETH_ALEN]) { } diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/usb.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/usb.c index f0129d10d2b9..46b7cf4380e6 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/usb.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/usb.c @@ -8,6 +8,9 @@ #include #include #include +#if defined(__FreeBSD__) +#include +#endif #include #include @@ -255,7 +258,11 @@ brcmf_usb_send_ctl(struct brcmf_usbdev_info *devinfo, u8 *buf, int len) devinfo->ctl_out_pipe, (unsigned char *) &devinfo->ctl_write, buf, size, +#if defined(__linux__) (usb_complete_t)brcmf_usb_ctlwrite_complete, +#elif defined(__FreeBSD__) + brcmf_usb_ctlwrite_complete, +#endif devinfo); ret = usb_submit_urb(devinfo->ctl_urb, GFP_ATOMIC); @@ -289,7 +296,11 @@ brcmf_usb_recv_ctl(struct brcmf_usbdev_info *devinfo, u8 *buf, int len) devinfo->ctl_in_pipe, (unsigned char *) &devinfo->ctl_read, buf, size, +#if defined(__linux__) (usb_complete_t)brcmf_usb_ctlread_complete, +#elif defined(__FreeBSD__) + brcmf_usb_ctlread_complete, +#endif devinfo); ret = usb_submit_urb(devinfo->ctl_urb, GFP_ATOMIC); @@ -768,7 +779,11 @@ static int brcmf_usb_dl_cmd(struct brcmf_usbdev_info *devinfo, u8 cmd, usb_rcvctrlpipe(devinfo->usbdev, 0), (unsigned char *) &devinfo->ctl_read, (void *) tmpbuf, size, +#if defined(__linux__) (usb_complete_t)brcmf_usb_sync_complete, devinfo); +#elif defined(__FreeBSD__) + brcmf_usb_sync_complete, devinfo); +#endif devinfo->ctl_completed = false; ret = usb_submit_urb(devinfo->ctl_urb, GFP_ATOMIC); @@ -873,7 +888,11 @@ brcmf_usb_dl_send_bulk(struct brcmf_usbdev_info *devinfo, void *buffer, int len) /* Prepare the URB */ usb_fill_bulk_urb(devinfo->bulk_urb, devinfo->usbdev, devinfo->tx_pipe, buffer, len, +#if defined(__linux__) (usb_complete_t)brcmf_usb_sync_complete, devinfo); +#elif defined(__FreeBSD__) + brcmf_usb_sync_complete, devinfo); +#endif devinfo->bulk_urb->transfer_flags |= URB_ZERO_PACKET; @@ -888,10 +907,19 @@ brcmf_usb_dl_send_bulk(struct brcmf_usbdev_info *devinfo, void *buffer, int len) } static int +#if defined(__linux__) brcmf_usb_dl_writeimage(struct brcmf_usbdev_info *devinfo, u8 *fw, int fwlen) +#elif defined(__FreeBSD__) +brcmf_usb_dl_writeimage(struct brcmf_usbdev_info *devinfo, const u8 *fw, int fwlen) +#endif { unsigned int sendlen, sent, dllen; +#if defined(__linux__) char *bulkchunk = NULL, *dlpos; +#elif defined(__FreeBSD__) + char *bulkchunk = NULL; + const u8 *dlpos; +#endif struct rdl_state_le state; u32 rdlstate, rdlbytes; int err = 0; @@ -973,7 +1001,11 @@ fail: return err; } +#if defined(__linux__) static int brcmf_usb_dlstart(struct brcmf_usbdev_info *devinfo, u8 *fw, int len) +#elif defined(__FreeBSD__) +static int brcmf_usb_dlstart(struct brcmf_usbdev_info *devinfo, const u8 *fw, int len) +#endif { int err; @@ -1049,7 +1081,11 @@ brcmf_usb_fw_download(struct brcmf_usbdev_info *devinfo) goto out; err = brcmf_usb_dlstart(devinfo, +#if defined(__linux__) (u8 *)devinfo->image, devinfo->image_len); +#elif defined(__FreeBSD__) + (const u8 *)devinfo->image, devinfo->image_len); +#endif if (err == 0) err = brcmf_usb_dlrun(devinfo); @@ -1080,12 +1116,20 @@ static void brcmf_usb_detach(struct brcmf_usbdev_info *devinfo) static int check_file(const u8 *headers) { +#if defined(__linux__) struct trx_header_le *trx; +#elif defined(__FreeBSD__) + const struct trx_header_le *trx; +#endif int actual_len = -1; brcmf_dbg(USB, "Enter\n"); /* Extract trx header */ +#if defined(__linux__) trx = (struct trx_header_le *) headers; +#elif defined(__FreeBSD__) + trx = (const struct trx_header_le *) headers; +#endif if (trx->magic != cpu_to_le32(TRX_MAGIC)) return -1; @@ -1187,6 +1231,10 @@ static void brcmf_usb_probe_phase2(struct device *dev, int ret, fw = fwreq->items[BRCMF_USB_FW_CODE].binary; kfree(fwreq); +#if defined(__FreeBSD__) + if (fw == NULL) + goto error; +#endif ret = check_file(fw->data); if (ret < 0) { @@ -1602,3 +1650,7 @@ int brcmf_usb_register(void) brcmf_dbg(USB, "Enter\n"); return usb_register(&brcmf_usbdrvr); } + +#if defined(__FreeBSD__) +MODULE_DEPEND(brcmfmac, linuxkpi_usb, 1, 1, 1); +#endif From nobody Fri Feb 27 02:30:14 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNk5YTbz6T7s2 for ; Fri, 27 Feb 2026 02:30:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNk43bQz41ty for ; Fri, 27 Feb 2026 02:30:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rPFLUYb1YLObYh+UNXkk+ZoSaplIQHhviP2JSAMjXxA=; b=avUBPDelE+R7TwH2mVUVo395GzzPeXq8MWhJAg6tDEGU83HrHvjsYjsxOolRy1hUemsY4n dkNhdGopd2t3ZNbBEYswZOocn0xlYcUIbO5ETRtaBG/R7OYHHwIiC2211qNsX+8FPiSdLy So8zEq1GV86JUGRZhM5BLw8EouenfH9f7eDzArUUGkVYJ19atlFS1cDkbQikX2xN5Q4b3d gK7RUYfmeEdiViyo8I9jw4ZvA6fWU8Uj0XPfUerPxOrkZXpHBjqcrCvSeHztCfkHKvj5/2 AWPDEih0ofztQATfGZZqTccTvIyWoSGjJzddAlN6BrLkeNs5ZJo4UTtqA3vTFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159414; a=rsa-sha256; cv=none; b=lwOrZ6sbZKrmdxTUu8I2lqeMJ9moh3t/ovBiYsX5McYeYkR63wq4qY68UtEEgoYdVxfZZN P7kipXjGopQXY2DHvetNLOkCCj7Ns6/6r/y6sg5k+wOHmseb8tUv727kN7/kfM5fxUF/ve kNSeuOrKKcF4qh31O1J9oq7IQktNKNJdcjrP5TjNpkMvHpkBks7KJajZhBbDmLtF3Z4Kb9 t8hXZn6izFdVzmfBKYRCo+FkIt7VVTMX/zY2R4gyJ4w+VY93tQZGhp/YAsESG1FEvVXChf J/vwv7ZaC70pco/4fWrK1CyYi2TSsWxIrCbxSA569kXAnk+tQfb/MCl4Juf1kw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rPFLUYb1YLObYh+UNXkk+ZoSaplIQHhviP2JSAMjXxA=; b=aQggMxNzHH4QjSXKDnEQiLOYGI0dVXHOTZNSa3ZfcrB+M568Xm+CLxFTUK1tyl9qDmz6KJ Od5ID3ndE8Ol5QCR4zTgbDuea3RYzzjhRXunXiSv2XzHQkPjyraPjjqiqvMRxIrh+zlQ2u 9rnGp1jvXIW+3pJeKnS9vcgKVc/8QNrShrHKwGC/miiODtERUTSeG2uGmt/zisr9K/+elA Fy+wXVrEF42cQNiWpuf7lMqeTMVCb95kpdaQUPOr9miLBjmqwP9iiNXdqFMwWtOwSkfvlb RS8L453LzeCZY1Z9jUXVQKUgcdiWgXP/S8Vrwtf5dbt86oS3Bx6me53FdbfDFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNk3d58zyck for ; Fri, 27 Feb 2026 02:30:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 20feb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:30: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: 9291447874e3 - stable/15 - LinuxKPI: 802.11: add cfg80211 (*change_bss) and related structs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 9291447874e33c04e38228d3a5d9080de083f064 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:30:14 +0000 Message-Id: <69a101b6.20feb.2c8ab2a8@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=9291447874e33c04e38228d3a5d9080de083f064 commit 9291447874e33c04e38228d3a5d9080de083f064 Author: Bjoern A. Zeeb AuthorDate: 2026-02-11 00:44:36 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:07:44 +0000 LinuxKPI: 802.11: add cfg80211 (*change_bss) and related structs Needed by brcmfmac v6.19. Sponsored by: The FreeBSD Foundation (cherry picked from commit b02def7c4a10fa3e2b05ebec379c5c634b87484d) --- sys/compat/linuxkpi/common/include/net/cfg80211.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h index 94d34fb9dc0c..5c8c914bdee7 100644 --- a/sys/compat/linuxkpi/common/include/net/cfg80211.h +++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h @@ -1021,6 +1021,14 @@ struct survey_info { /* net80211::struct ieee80211_channel_survey */ struct linuxkpi_ieee80211_channel *channel; }; +enum wiphy_bss_param_flags { + WIPHY_BSS_PARAM_AP_ISOLATE = BIT(0), +}; + +struct bss_parameters { + int ap_isolate; +}; + enum wiphy_vendor_cmd_need_flags { WIPHY_VENDOR_CMD_NEED_NETDEV = 0x01, WIPHY_VENDOR_CMD_NEED_RUNNING = 0x02, @@ -1142,6 +1150,8 @@ struct wiphy { int n_radio; const struct wiphy_radio *radio; + uint32_t bss_param_support; /* enum wiphy_bss_param_flags */ + 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; @@ -1224,7 +1234,7 @@ struct cfg80211_ops { int (*dump_survey)(struct wiphy *, struct net_device *, int, struct survey_info *); int (*external_auth)(struct wiphy *, struct net_device *, struct cfg80211_external_auth_params *); int (*set_cqm_rssi_range_config)(struct wiphy *, struct net_device *, int, int); - + int (*change_bss)(struct wiphy *, struct net_device *, struct bss_parameters *); }; From nobody Fri Feb 27 02:30:13 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNk179Fz6T7px for ; Fri, 27 Feb 2026 02:30:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNj3lnvz41mR for ; Fri, 27 Feb 2026 02:30:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eL8uyPMjQOyKflsNn7YtQ5wmn17kPqvVNv4jIQMookk=; b=unxFL3EwKfFQEROaM1PHxPdUzV0ezG2R936CO+YGqk9M9+w/raJ37XlFrV8MENCIWvsd1/ wg9wqYkkZZGYhlyElsJcJjxQTvgzi/wE7xuaNYEBW/glSze91Pq4UQMRI1nPtSBUVlfS0Y Pz4mOL9RjvSl7KCg7SHMO/yk9V2u8+B8cz4i1Coz0AK+YVyByb3IGyNKlNVoatzvBF47Zd v6e5HTNh/sL2HZtWKTFlPmVxJKM2jr4C5WaOLxBNoGetscRBzSLi5bnlEZbBt3tBD/Jg+1 korSoXbkriPvmX1k1/P/GONL9AOOPQ+ipKVXF1xCJTNA6ANtFySpQzOPqxs4mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159413; a=rsa-sha256; cv=none; b=PlzIRbFGcpdo/Gw9h2T8V3xZbCU+BJ8gAst8gbE8oGeYJyfD8D99shNbZK6cxgMZcDNcKx 0qOru3OVevowx1rA7tPyldvF/Z4H+LQRF1bjm/EjoSSE8pNFAmvCDlxR/hvaJZ6cYC5Eoa WYlyYL60EE2X0/177jF8Qa2COZcPBIqylzhd6XhSNMgJwokMxmez4EUUkhKm9YzT+4ngmm uaI6wZGypmOEF8sNmBVT0Kx/7EKSnShOsnAi4iWIVkIWY31xCmiB8n/SsBT0u8EV0dquTn jeeY2Vlm9cVIgVFVuSkgyyhilNpiJdww+Y2yVd6eDGsKRxXsZeIySYHpi/3GWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eL8uyPMjQOyKflsNn7YtQ5wmn17kPqvVNv4jIQMookk=; b=esNjzDReXxQ68bvHWICoZ9STymErmnweajvCK0PvwI89Ntvy5QT83lXZM0d/OhDIAagDBs T7zC427RYNrWGqiiolNyf013Lz0ETAt9e4lC2usMtcBZItl3SQMrZwZ9+iGtR7ccaIILS9 gOf+7wioEi6dHKpHho83UhxtMt4BM0gy+9Trhx5yTWY2GxwMBu7cHGysOvT7UbqQu4EekE NRWSiqgpBylBJN17cXBHeFsriBDEgxEmpkp6w21HcERyBBVP+NvndxSKk7ac89oaB3+Q3g 8JYAtyYqvxY7cdjy07bVOXMzvaJi7Zlyzi0HRsDM+w83BqVPoJk8tjuq467vKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNj3GlDzyZp for ; Fri, 27 Feb 2026 02:30:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 212de by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:30: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: 927df9ea55a4 - stable/15 - brcm80211: update Broadcom wireless brcmsmac and brcmfmac drivers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 927df9ea55a403bbd7e3a146e23ce9eb1884f2db Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:30:13 +0000 Message-Id: <69a101b5.212de.30203ff6@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=927df9ea55a403bbd7e3a146e23ce9eb1884f2db commit 927df9ea55a403bbd7e3a146e23ce9eb1884f2db Author: Bjoern A. Zeeb AuthorDate: 2026-02-10 23:56:40 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:07:38 +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 24d479d26b25bce5faea3ddd9fa8f3a6c3129ea7 ( tag: v6.19-rc6 ). Sponsored by: The FreeBSD Foundation (cherry picked from commit 9375e11f079d725d42c5b431de33044088ad14f7) --- .../dev/broadcom/brcm80211/brcmfmac/bcmsdh.c | 2 +- .../dev/broadcom/brcm80211/brcmfmac/cfg80211.c | 26 ++++++++++++++++++-- sys/contrib/dev/broadcom/brcm80211/brcmfmac/chip.c | 4 ++-- sys/contrib/dev/broadcom/brcm80211/brcmfmac/dmi.c | 14 +++++++++++ .../dev/broadcom/brcm80211/brcmfmac/firmware.c | 14 +++++++---- sys/contrib/dev/broadcom/brcm80211/brcmfmac/p2p.c | 28 ++++++++-------------- sys/contrib/dev/broadcom/brcm80211/brcmfmac/p2p.h | 3 +-- sys/contrib/dev/broadcom/brcm80211/brcmfmac/sdio.c | 8 +++---- .../dev/broadcom/brcm80211/include/brcm_hw_ids.h | 1 - 9 files changed, 65 insertions(+), 35 deletions(-) diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcmsdh.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcmsdh.c index 8ab7d1e34a6e..6a3f187320fc 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcmsdh.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/bcmsdh.c @@ -997,9 +997,9 @@ static const struct sdio_device_id brcmf_sdmmc_ids[] = { BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4356, WCC), BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_4359, WCC), BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43751, WCC), + BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_43752, WCC), BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_CYPRESS_4373, CYW), BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_CYPRESS_43012, CYW), - BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_CYPRESS_43752, CYW), BRCMF_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_CYPRESS_89359, CYW), CYW_SDIO_DEVICE(SDIO_DEVICE_ID_BROADCOM_CYPRESS_43439, CYW), { /* end: all zeroes */ } diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/cfg80211.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/cfg80211.c index 35f68b370714..43afaa5249a6 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -5792,8 +5792,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, #endif le32_to_cpu(af_params->channel)); - ack = brcmf_p2p_send_action_frame(cfg, cfg_to_ndev(cfg), - af_params); + ack = brcmf_p2p_send_action_frame(vif->ifp, af_params); cfg80211_mgmt_tx_status(wdev, *cookie, buf, len, ack, GFP_KERNEL); @@ -6131,6 +6130,26 @@ static int brcmf_cfg80211_del_pmk(struct wiphy *wiphy, struct net_device *dev, return brcmf_set_pmk(ifp, NULL, 0); } +static int brcmf_cfg80211_change_bss(struct wiphy *wiphy, struct net_device *dev, + struct bss_parameters *params) +{ + struct brcmf_if *ifp = netdev_priv(dev); + int ret = 0; + + /* In AP mode, the "ap_isolate" value represents + * 0 = allow low-level bridging of frames between associated stations + * 1 = restrict low-level bridging of frames to isolate associated stations + * -1 = do not change existing setting + */ + if (params->ap_isolate >= 0) { + ret = brcmf_fil_iovar_int_set(ifp, "ap_isolate", params->ap_isolate); + if (ret < 0) + brcmf_err("ap_isolate iovar failed: ret=%d\n", ret); + } + + return ret; +} + static struct cfg80211_ops brcmf_cfg80211_ops = { .add_virtual_intf = brcmf_cfg80211_add_iface, .del_virtual_intf = brcmf_cfg80211_del_iface, @@ -6178,6 +6197,7 @@ static struct cfg80211_ops brcmf_cfg80211_ops = { .update_connect_params = brcmf_cfg80211_update_conn_params, .set_pmk = brcmf_cfg80211_set_pmk, .del_pmk = brcmf_cfg80211_del_pmk, + .change_bss = brcmf_cfg80211_change_bss, }; struct cfg80211_ops *brcmf_cfg80211_get_ops(struct brcmf_mp_device *settings) @@ -7840,6 +7860,8 @@ static int brcmf_setup_wiphy(struct wiphy *wiphy, struct brcmf_if *ifp) BIT(NL80211_BSS_SELECT_ATTR_BAND_PREF) | BIT(NL80211_BSS_SELECT_ATTR_RSSI_ADJUST); + wiphy->bss_param_support = WIPHY_BSS_PARAM_AP_ISOLATE; + wiphy->flags |= WIPHY_FLAG_NETNS_OK | WIPHY_FLAG_PS_ON_BY_DEFAULT | WIPHY_FLAG_HAVE_AP_SME | diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/chip.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/chip.c index 9074ab49e806..4239f2b21e54 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/chip.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/chip.c @@ -738,8 +738,8 @@ static u32 brcmf_chip_tcm_rambase(struct brcmf_chip_priv *ci) case BRCM_CC_4364_CHIP_ID: case CY_CC_4373_CHIP_ID: return 0x160000; - case CY_CC_43752_CHIP_ID: case BRCM_CC_43751_CHIP_ID: + case BRCM_CC_43752_CHIP_ID: case BRCM_CC_4377_CHIP_ID: return 0x170000; case BRCM_CC_4378_CHIP_ID: @@ -1452,7 +1452,7 @@ bool brcmf_chip_sr_capable(struct brcmf_chip *pub) return (reg & CC_SR_CTL0_ENABLE_MASK) != 0; case BRCM_CC_4359_CHIP_ID: case BRCM_CC_43751_CHIP_ID: - case CY_CC_43752_CHIP_ID: + case BRCM_CC_43752_CHIP_ID: case CY_CC_43012_CHIP_ID: addr = CORE_CC_REG(pmu->base, retention_ctl); reg = chip->ops->read32(chip->ctx, addr); diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/dmi.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/dmi.c index c3a602197662..abe7f6501e5e 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/dmi.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/dmi.c @@ -24,6 +24,10 @@ static const struct brcmf_dmi_data acepc_t8_data = { BRCM_CC_4345_CHIP_ID, 6, "acepc-t8" }; +static const struct brcmf_dmi_data acer_a1_840_data = { + BRCM_CC_43340_CHIP_ID, 2, "acer-a1-840" +}; + /* The Chuwi Hi8 Pro uses the same Ampak AP6212 module as the Chuwi Vi8 Plus * and the nvram for the Vi8 Plus is already in linux-firmware, so use that. */ @@ -91,6 +95,16 @@ static const struct dmi_system_id dmi_platform_data[] = { }, .driver_data = (void *)&acepc_t8_data, }, + { + /* Acer Iconia One 8 A1-840 (non FHD version) */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Insyde"), + DMI_MATCH(DMI_PRODUCT_NAME, "BayTrail"), + /* Above strings are too generic also match BIOS date */ + DMI_MATCH(DMI_BIOS_DATE, "04/01/2014"), + }, + .driver_data = (void *)&acer_a1_840_data, + }, { /* Chuwi Hi8 Pro with D2D3_Hi8Pro.233 BIOS */ .matches = { diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/firmware.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/firmware.c index aa8f05e822a0..0ad9abd67fd6 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/firmware.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/firmware.c @@ -578,12 +578,16 @@ static int brcmf_fw_request_nvram_done(const struct firmware *fw, void *ctx) #endif data_len = fw->size; } else { - if ((data = bcm47xx_nvram_get_contents(&data_len))) + data = bcm47xx_nvram_get_contents(&data_len); + if (data) { free_bcm47xx_nvram = true; - else if ((data = brcmf_fw_nvram_from_efi(&data_len))) - kfree_nvram = true; - else if (!(cur->flags & BRCMF_FW_REQF_OPTIONAL)) - goto fail; + } else { + data = brcmf_fw_nvram_from_efi(&data_len); + if (data) + kfree_nvram = true; + else if (!(cur->flags & BRCMF_FW_REQF_OPTIONAL)) + goto fail; + } } if (data) diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/p2p.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/p2p.c index e34ba5756af1..21237fa7e229 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/p2p.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/p2p.c @@ -1544,6 +1544,7 @@ int brcmf_p2p_notify_action_tx_complete(struct brcmf_if *ifp, /** * brcmf_p2p_tx_action_frame() - send action frame over fil. * + * @ifp: interface to transmit on. * @p2p: p2p info struct for vif. * @af_params: action frame data/info. * @@ -1553,12 +1554,11 @@ int brcmf_p2p_notify_action_tx_complete(struct brcmf_if *ifp, * The WLC_E_ACTION_FRAME_COMPLETE event will be received when the action * frame is transmitted. */ -static s32 brcmf_p2p_tx_action_frame(struct brcmf_p2p_info *p2p, +static s32 brcmf_p2p_tx_action_frame(struct brcmf_if *ifp, + struct brcmf_p2p_info *p2p, struct brcmf_fil_af_params_le *af_params) { struct brcmf_pub *drvr = p2p->cfg->pub; - struct brcmf_cfg80211_vif *vif; - struct brcmf_p2p_action_frame *p2p_af; s32 err = 0; brcmf_dbg(TRACE, "Enter\n"); @@ -1567,14 +1567,7 @@ static s32 brcmf_p2p_tx_action_frame(struct brcmf_p2p_info *p2p, clear_bit(BRCMF_P2P_STATUS_ACTION_TX_COMPLETED, &p2p->status); clear_bit(BRCMF_P2P_STATUS_ACTION_TX_NOACK, &p2p->status); - /* check if it is a p2p_presence response */ - p2p_af = (struct brcmf_p2p_action_frame *)af_params->action_frame.data; - if (p2p_af->subtype == P2P_AF_PRESENCE_RSP) - vif = p2p->bss_idx[P2PAPI_BSSCFG_CONNECTION].vif; - else - vif = p2p->bss_idx[P2PAPI_BSSCFG_DEVICE].vif; - - err = brcmf_fil_bsscfg_data_set(vif->ifp, "actframe", af_params, + err = brcmf_fil_bsscfg_data_set(ifp, "actframe", af_params, sizeof(*af_params)); if (err) { bphy_err(drvr, " sending action frame has failed\n"); @@ -1726,16 +1719,14 @@ static bool brcmf_p2p_check_dwell_overflow(u32 requested_dwell, /** * brcmf_p2p_send_action_frame() - send action frame . * - * @cfg: driver private data for cfg80211 interface. - * @ndev: net device to transmit on. + * @ifp: interface to transmit on. * @af_params: configuration data for action frame. */ -bool brcmf_p2p_send_action_frame(struct brcmf_cfg80211_info *cfg, - struct net_device *ndev, +bool brcmf_p2p_send_action_frame(struct brcmf_if *ifp, struct brcmf_fil_af_params_le *af_params) { + struct brcmf_cfg80211_info *cfg = ifp->drvr->config; struct brcmf_p2p_info *p2p = &cfg->p2p; - struct brcmf_if *ifp = netdev_priv(ndev); struct brcmf_fil_action_frame_le *action_frame; struct brcmf_config_af_params config_af_params; struct afx_hdl *afx_hdl = &p2p->afx_hdl; @@ -1880,7 +1871,7 @@ bool brcmf_p2p_send_action_frame(struct brcmf_cfg80211_info *cfg, linux_msleep(P2P_AF_RETRY_DELAY_TIME); #endif - ack = !brcmf_p2p_tx_action_frame(p2p, af_params); + ack = !brcmf_p2p_tx_action_frame(ifp, p2p, af_params); tx_retry++; dwell_overflow = brcmf_p2p_check_dwell_overflow(requested_dwell, dwell_jiffies); @@ -2240,7 +2231,6 @@ static struct wireless_dev *brcmf_p2p_create_p2pdev(struct brcmf_p2p_info *p2p, WARN_ON(p2p_ifp->bsscfgidx != bsscfgidx); - init_completion(&p2p->send_af_done); INIT_WORK(&p2p->afx_hdl.afx_work, brcmf_p2p_afx_handler); init_completion(&p2p->afx_hdl.act_frm_scan); init_completion(&p2p->wait_next_af); @@ -2536,6 +2526,8 @@ s32 brcmf_p2p_attach(struct brcmf_cfg80211_info *cfg, bool p2pdev_forced) pri_ifp = brcmf_get_ifp(cfg->pub, 0); p2p->bss_idx[P2PAPI_BSSCFG_PRIMARY].vif = pri_ifp->vif; + init_completion(&p2p->send_af_done); + if (p2pdev_forced) { err_ptr = brcmf_p2p_create_p2pdev(p2p, NULL, NULL); if (IS_ERR(err_ptr)) { diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/p2p.h b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/p2p.h index d2ecee565bf2..d3137ebd7158 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/p2p.h +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/p2p.h @@ -168,8 +168,7 @@ int brcmf_p2p_notify_action_frame_rx(struct brcmf_if *ifp, int brcmf_p2p_notify_action_tx_complete(struct brcmf_if *ifp, const struct brcmf_event_msg *e, void *data); -bool brcmf_p2p_send_action_frame(struct brcmf_cfg80211_info *cfg, - struct net_device *ndev, +bool brcmf_p2p_send_action_frame(struct brcmf_if *ifp, struct brcmf_fil_af_params_le *af_params); bool brcmf_p2p_scan_finding_common_channel(struct brcmf_cfg80211_info *cfg, struct brcmf_bss_info_le *bi); diff --git a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/sdio.c b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/sdio.c index 8a0bad5119a0..8cf9d7e7c3f7 100644 --- a/sys/contrib/dev/broadcom/brcm80211/brcmfmac/sdio.c +++ b/sys/contrib/dev/broadcom/brcm80211/brcmfmac/sdio.c @@ -655,10 +655,10 @@ static const struct brcmf_firmware_mapping brcmf_sdio_fwnames[] = { BRCMF_FW_ENTRY(BRCM_CC_4356_CHIP_ID, 0xFFFFFFFF, 4356), BRCMF_FW_ENTRY(BRCM_CC_4359_CHIP_ID, 0xFFFFFFFF, 4359), BRCMF_FW_ENTRY(BRCM_CC_43751_CHIP_ID, 0xFFFFFFFF, 43752), + BRCMF_FW_ENTRY(BRCM_CC_43752_CHIP_ID, 0xFFFFFFFF, 43752), BRCMF_FW_ENTRY(CY_CC_4373_CHIP_ID, 0xFFFFFFFF, 4373), BRCMF_FW_ENTRY(CY_CC_43012_CHIP_ID, 0xFFFFFFFF, 43012), BRCMF_FW_ENTRY(CY_CC_43439_CHIP_ID, 0xFFFFFFFF, 43439), - BRCMF_FW_ENTRY(CY_CC_43752_CHIP_ID, 0xFFFFFFFF, 43752) }; #define TXCTL_CREDITS 2 @@ -3426,8 +3426,8 @@ err: static bool brcmf_sdio_aos_no_decode(struct brcmf_sdio *bus) { if (bus->ci->chip == BRCM_CC_43751_CHIP_ID || - bus->ci->chip == CY_CC_43012_CHIP_ID || - bus->ci->chip == CY_CC_43752_CHIP_ID) + bus->ci->chip == BRCM_CC_43752_CHIP_ID || + bus->ci->chip == CY_CC_43012_CHIP_ID) return true; else return false; @@ -4278,8 +4278,8 @@ static void brcmf_sdio_firmware_callback(struct device *dev, int err, switch (sdiod->func1->device) { case SDIO_DEVICE_ID_BROADCOM_43751: + case SDIO_DEVICE_ID_BROADCOM_43752: case SDIO_DEVICE_ID_BROADCOM_CYPRESS_4373: - case SDIO_DEVICE_ID_BROADCOM_CYPRESS_43752: brcmf_dbg(INFO, "set F2 watermark to 0x%x*4 bytes\n", CY_4373_F2_WATERMARK); brcmf_sdiod_writeb(sdiod, SBSDIO_WATERMARK, diff --git a/sys/contrib/dev/broadcom/brcm80211/include/brcm_hw_ids.h b/sys/contrib/dev/broadcom/brcm80211/include/brcm_hw_ids.h index b39c5c1ee18b..df3b67ba4db2 100644 --- a/sys/contrib/dev/broadcom/brcm80211/include/brcm_hw_ids.h +++ b/sys/contrib/dev/broadcom/brcm80211/include/brcm_hw_ids.h @@ -60,7 +60,6 @@ #define CY_CC_4373_CHIP_ID 0x4373 #define CY_CC_43012_CHIP_ID 43012 #define CY_CC_43439_CHIP_ID 43439 -#define CY_CC_43752_CHIP_ID 43752 /* USB Device IDs */ #define BRCM_USB_43143_DEVICE_ID 0xbd1e From nobody Fri Feb 27 02:30:15 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNl6pxLz6T81w for ; Fri, 27 Feb 2026 02:30:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNl4jV9z41mt for ; Fri, 27 Feb 2026 02:30:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=POZUOwtXGrVWLUuI/tpPym0Xy5OsUEt3cqT8Ep8YYag=; b=cYML4ilLZ9Vvchmw4sbVuz+qeo++t1LkkBsGo9osKoUhzX2G8JitJ7rQAqf7zlBQnz24uT a4KyyqkAgmqFI8bb/TEyIi2ZXQLflvdaj9DaC+Fbi41nEvU4vBda3dc1umKLQpW0ThFtXT 6iqtSg4r4BVNa+ywlRI6blVXV+SZ4fApbftBP5AL+q0Evr2jvCHGLhTZwochA045AznJfW P9jgozkvFOn3gvPW6QkiqZ4QwZiR+C3qqoiYFrw4TVlrITUQe83gPko9tfz9Qxju/lPgr8 U51Fu+Z3GJtk8j3sAKhfOYxHXq/GDCnJI6JIdHoKU73Yql1lmnuViJnI12pRiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159415; a=rsa-sha256; cv=none; b=CzHJOMZR1mkoyC+vB5KLSXAgNb7UywgBp/vpHvs9lkh7mjjmjrTtzMfo0KzgUfVoYrkxmC DyGXAaQ8pxBVjYX2hRJD9dhAlVCEmTEasNYRP7nhEc7xYfXpYAQikjNdVIB46qRyG2ABGS 9dVj6sH45h6KQzLU2bFhDvz8nbYlbaehiNxSlEuREWx+FLREKBfzo1OupP7Z5LTw2sksoZ s2/qpb5u6qN/UFMTdX4CyctjeEyrV21ct4ysKTdB2djVQLSRcJccG8gF2TETjy5p2YbX9i C6tqwOTu+qesPLMkXhfEXUVrAQ8+MuZa8jP0yKHt3IPd8MsjOjRwtrF7Qh0jvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=POZUOwtXGrVWLUuI/tpPym0Xy5OsUEt3cqT8Ep8YYag=; b=tx/6D0uRThx19s/O2qajrZFJ8Iqwh9AC5WQMr651totLVNv06x+s8ZKtLSmxKS4nkTV9ul 5J0JZaCS/T63G/2sDx5nWyx84pzKic3PneIDHSFKZ71JpPBfVoWIh4HuSX3YDyY1Wz+Lw0 vqbIzDmLUB9DcSn44sjvV9tfjK4sHA9RFwtlOtXk2kLsu0YelKbC/+ZJgpPCOVOzr2J/DB SF3iTLWOJFAx44lfZwwQJCRoG1r9OR+s2SniL+RXFe5o+tnMVnw5BUeb5d2YVD8dDtWhgR m5RGotYM6Yb0jYoLuuNs+OjJ9s/W96wze3vKSlXJhaRrGNYq9mXrrGWX+ZY8Jw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNl41txzyXC for ; Fri, 27 Feb 2026 02:30:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21afb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:30: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: 68dceb7b8f0e - stable/15 - qoriq / nxp: fix spelling in device_set_desc() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 68dceb7b8f0e48c0878d3678b93d8625d98f58ef Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:30:15 +0000 Message-Id: <69a101b7.21afb.47032837@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=68dceb7b8f0e48c0878d3678b93d8625d98f58ef commit 68dceb7b8f0e48c0878d3678b93d8625d98f58ef Author: Bjoern A. Zeeb AuthorDate: 2026-02-19 23:10:34 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:08:13 +0000 qoriq / nxp: fix spelling in device_set_desc() The product series is called NXP QorIQ Layerscape. Remove the extra 'e. [1] Fix spelling of NXP, which is not NPX, in two places. [2] Reviewed by: mmel, emaste [1] Reported by: Kevin Bowling (kevin.bowling kev009.com), qoriq_dw_pci.c [2] Differential Revision: https://reviews.freebsd.org/D55388 (cherry picked from commit a4e30909ec983f7986954e6c509ea21422561d84) (cherry picked from commit c3ed2f3e414497ab3cf6ade17e52a87f07a547e6) --- sys/arm64/conf/std.nxp | 2 +- sys/arm64/qoriq/qoriq_dw_pci.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm64/conf/std.nxp b/sys/arm64/conf/std.nxp index b4552fadaff4..367d058bf666 100644 --- a/sys/arm64/conf/std.nxp +++ b/sys/arm64/conf/std.nxp @@ -6,7 +6,7 @@ options SOC_NXP_LS # I2C -device pca954x # NPX I2C bus multiplexer / switches +device pca954x # NXP I2C bus multiplexer / switches device pcf8563 # NXP Real-time clock/calendar device tca64xx # NXP I2C gpio expander device pcf85063 # NXP Real-time clock diff --git a/sys/arm64/qoriq/qoriq_dw_pci.c b/sys/arm64/qoriq/qoriq_dw_pci.c index b6eecba48c39..f4ca024c941f 100644 --- a/sys/arm64/qoriq/qoriq_dw_pci.c +++ b/sys/arm64/qoriq/qoriq_dw_pci.c @@ -176,7 +176,7 @@ qorif_dw_pci_probe(device_t dev) if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) return (ENXIO); - device_set_desc(dev, "NPX Layaerscape PCI-E Controller"); + device_set_desc(dev, "NXP QorIQ Layerscape PCI-E Controller"); return (BUS_PROBE_DEFAULT); } From nobody Fri Feb 27 02:30:16 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNn03ngz6T7xw for ; Fri, 27 Feb 2026 02:30:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNm4xbmz422g for ; Fri, 27 Feb 2026 02:30:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KJzS/Kek9bKa+XAcLE5HBe0PAuw1K4c3mEgUzBTauLI=; b=jzXHaFlwXDlEn9fJssbggEjEFLqP1Mtf+YCLfBAsG8XNYXVTNcomERnHJFMZFPVkq2yM1R y04qRVXjvyKwIVBgot1OXPAAiEOiXR3pjUfnzZDC+Z+WvpZJum6wJ6fHd4SEHxV45803wQ p614Gty8hKj694BOZWsdgTsNJeEIyNiMUzEDqCRcjEbUX8ICaTXMKgjC+wYPnkKM5y4g0D esRyrF5nSoC7MxWPKM83qAKnz1G7P/Z7V7or2A8gMKpOKLIeEA1wlluTxm0Hf8zUidIkut fbDKzr1HR8ZF8smqIvTrgBxg17EXPMzxsgbJFUDmdO0svq/gwdoql5Dq2x7nuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159416; a=rsa-sha256; cv=none; b=snEx42x7GEMJJDI7TZfxotsHvC70BZdUZVetrlKwPjtmJfyivanj0LTK1ygvZrxX1Y+kL7 /c7pjOF37sPzSXa5nHbcowVKSpJUVMje70hm7mvySWuHTCTAdx+Vj6vg5UYnRtdb7MJP3I PIMarddDZmz8q3fyRvcoJ8hlRRbNHvGqb+ESbn0YhuoLnLKiA8bje7RnrkBrsHh+rwUGPO 4u/HsLfq0m0z8ykp+TRBtzqRJ0SCallU3uLwVlMlixD6EHRJ0HXmUcjnM2f330+TGvyOhz O183NvOkx4fzCbZ0Jp0Z57tXWAzaqu6D5z+0lA3NIEHAij3FTpCXoQ2VnDsRkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KJzS/Kek9bKa+XAcLE5HBe0PAuw1K4c3mEgUzBTauLI=; b=J58/vKW++t7GHhqEGXvaPaEP2B9f/KfnGGW4kJCGInwsXYLbABD5gx+qaZL1YBCTlJW+nS lmrKSJm1GIY+cIYPx61mxcWAph0mUOYwauYSgfE64I3BoCvwpoXvXPJfNhwIvPpkoUyxFi U2mv5D0sOJeO6Pyf36QHZDoKb64OPtAhwTGtgFl6syT6I0JAwdWwV665kehQE2b3uz1RRP rzemDhtf+KK5HuMIMot99IErZmgMas0FX3l173VWAXnLwbI5MJNBTGSz6Z4oQXKiqeQ3Od O4LKtsWyU7cFfeXjgrj7yseGdIYWyhyNLmECC2Lw50Umsg/KGoyOOOi3js1vHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNm4N4yzygK for ; Fri, 27 Feb 2026 02:30:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21944 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:30: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: ca1e0f9d60c9 - stable/15 - ofed: reduce usage of struct dma_attrs *dma_attrs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ca1e0f9d60c9328164c7018592fa9de513e65b08 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:30:16 +0000 Message-Id: <69a101b8.21944.7f24b31@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ca1e0f9d60c9328164c7018592fa9de513e65b08 commit ca1e0f9d60c9328164c7018592fa9de513e65b08 Author: Bjoern A. Zeeb AuthorDate: 2026-02-19 23:12:29 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:09:17 +0000 ofed: reduce usage of struct dma_attrs *dma_attrs ib_verbs.h still uses struct dma_attrs *dma_attrs everywhere. It is beyond my knowledge when that struct got deprecated upstream but it is still supported by our LinuxKPI. The problem is that the functions called with that argument (dma_map_single_attrs, dma_unmap_single_attrs, dma_map_sg_attrs, dma_unmap_sg_attrs) so far are #defines in LinuxKPI and drop the last argument (attrs) so it was never a problem. In preparation to pass the attrs to the actual implementation in LinuxKPI, which has gained support for them, we now pass dma_sttrs->flags which is the expected unsigned long bit field. If anyone has serious interest in updating our ofed implementation they could look into this some more and remove the usage of struct dma_attrs entirely. Sponsored by: The FreeBSD Foundation Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D55390 (cherry picked from commit 5edf24aac1d0978d37d62594f42d87c9f118622b) --- sys/ofed/include/rdma/ib_verbs.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/ofed/include/rdma/ib_verbs.h b/sys/ofed/include/rdma/ib_verbs.h index 78aa0af4fa2b..0c40a6f18f7c 100644 --- a/sys/ofed/include/rdma/ib_verbs.h +++ b/sys/ofed/include/rdma/ib_verbs.h @@ -3539,7 +3539,7 @@ static inline u64 ib_dma_map_single_attrs(struct ib_device *dev, struct dma_attrs *dma_attrs) { return dma_map_single_attrs(dev->dma_device, cpu_addr, size, - direction, dma_attrs); + direction, dma_attrs->flags); } static inline void ib_dma_unmap_single_attrs(struct ib_device *dev, @@ -3548,7 +3548,7 @@ static inline void ib_dma_unmap_single_attrs(struct ib_device *dev, struct dma_attrs *dma_attrs) { return dma_unmap_single_attrs(dev->dma_device, addr, size, - direction, dma_attrs); + direction, dma_attrs->flags); } /** @@ -3630,7 +3630,7 @@ static inline int ib_dma_map_sg_attrs(struct ib_device *dev, dma_attrs); else return dma_map_sg_attrs(dev->dma_device, sg, nents, direction, - dma_attrs); + dma_attrs->flags); } static inline void ib_dma_unmap_sg_attrs(struct ib_device *dev, @@ -3643,7 +3643,7 @@ static inline void ib_dma_unmap_sg_attrs(struct ib_device *dev, dma_attrs); else dma_unmap_sg_attrs(dev->dma_device, sg, nents, direction, - dma_attrs); + dma_attrs->flags); } /** * ib_sg_dma_address - Return the DMA address from a scatter/gather entry From nobody Fri Feb 27 02:30:17 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNp19wrz6T7kS for ; Fri, 27 Feb 2026 02:30:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNn5YQrz41vV for ; Fri, 27 Feb 2026 02:30:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OfKeaDtIzxw4x5gW+vcV6AmfK8Brj/LqEdgBakg7OEY=; b=MfxeZTuiKafxYRr7LVfUI/entgtn4OqUOkFP4CV1cYyt/wA1ikkZjacjyRaF0pC7b/bT39 0TqO2C0Lmlz8SVzVA/lyX/XSy+P1OKH/LxeooIqIQ7Yr6+0XsmsKIF+0DjW09938jijlOD Keh4jKJ7z+f7Desbxd6FRJoCGYlgYHhGyozHRjgxnI1Iz6fl4SuoYA3GaJ+R7/IhJhPCz8 QseHNQcv0QqeQ0KLo3ZzK3pfzJh4SkjQYeo1dNghf9yS5whp2mz1z8hk3VWBZeRHy6g0EP CBXKcOZ0riFTe1/c7ogsSQ9vF4M6Q/L8V2Jysotxe+g31pGqa3/hgz+ZprpLUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159417; a=rsa-sha256; cv=none; b=pGDUoCK91lN5/ZGSXoTzEuZNoMv1QLBTyq90VPW85eabaAkFsV9vM6z2146WBsKr7ZcdGu iGpk3KdY4e4tCw2/8bwCd6ozvRKkASBPWa7WAd1GJsh4tgTI6s3PM3D0AYjxicJYZAW6ul vgHC3iHJXOAr3SPt0tEhIbjJgJXROUSEkahEQoGqR0O5/SgtzSpAZshkbSlVhQm5z5/6+1 69VwvI07NS3oDHLszQl31Q7yT8Qrf7eWb7eR8x7C3EyY8B/omK7KD0tZEQXmxa7V0c9JFW jqPXpr6EYlkbtjc3QR0Tl08U6UrVj2BWQZWhXXdf6W2W7m0lhIhKZxjTXYymZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OfKeaDtIzxw4x5gW+vcV6AmfK8Brj/LqEdgBakg7OEY=; b=JOOt0aw87sovoRlZsItexHtHLEMWEUxffrsWTze8Y0O+pgjgmTVxtzo4wdgVS0Xgt/64b0 1QiRXZ7pjyDzcF9I4oh6Kq5boyySiLL5nWObJORL38jjLkSun5OZYIpottfnaqtEu378oh ofJ2kZgiF+fpeZ3fNuu3aeyJeoDQk11hLHnIvXHzpC3lBkH24YVo5zrPBos7mio6botLS1 TPJG+/icDtSePnlKbEg1potWbKoDhB6LRpPnrReJBfaoSwfDMweP0d9h5t7FrYRTiM+f+Q xXQq6p+/atr/pI0rOSO2gJ9CKLs6syouHrZyrtINNb5vL9/WT+rtBs31Ri2cLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNn4pfrzyXD for ; Fri, 27 Feb 2026 02:30:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 204f5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:30: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: b07c75928028 - stable/15 - LinuxKPI: 802.11: do not leak BA sessions when tearing down state List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b07c75928028e5cf6bfc3d76e6ade4123dc052b7 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:30:17 +0000 Message-Id: <69a101b9.204f5.5876fb35@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b07c75928028e5cf6bfc3d76e6ade4123dc052b7 commit b07c75928028e5cf6bfc3d76e6ade4123dc052b7 Author: Bjoern A. Zeeb AuthorDate: 2026-02-24 12:55:48 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:09:28 +0000 LinuxKPI: 802.11: do not leak BA sessions when tearing down state In certain cases we may tear down state of a node with 'ongoing' BA sessions. This can trigger a firmware crash with iwlwifi as reported in [1] when trying to remove the sta from the firmware. 0x2010303A | ADVANCED_SYSASSERT .. 0x00000000 | umac data1 (sta id=0) .. 0x0088030C | last host cmd (STA_RM) [1] https://lists.freebsd.org/archives/freebsd-wireless/2025-November/003901.html I hit the same problem while running regression tests after reworking some LinuxKPI 802.11 sta state machine bits. Add the missing calls to lkpi_sta_run_to_assoc() and lkpi_sta_run_to_init() to make sure (through net80211) we call (*ampdu_action) with IEEE80211_AMPDU_RX_STOP to avoid the firmware crash. Note: this specific patch was not excessively tested. The upcoming change to the state machine including this fix has seen more testing but also only needed the change in one place. The reason for putting this in upfront is to document the case well. Reported by: Mohammad Amin (the.madamin20 gmail.com) [1] Sponsored by: The FreeBSSD Foundation (cherry picked from commit fc9369abef6b6993e79b08de832e1d49f81a17b9) --- sys/compat/linuxkpi/common/src/linux_80211.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 0b732cb691c6..e80cf9436b3a 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -3256,6 +3256,7 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int #if 0 enum ieee80211_bss_changed bss_changed; #endif + struct ieee80211_rx_ampdu *rap; int error; lhw = vap->iv_ic->ic_softc; @@ -3311,6 +3312,16 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int goto outni; } + /* Stop any BA sessions if still active. */ + for (int rapn = 0; rapn < WME_NUM_TID; rapn++) { + rap = &ni->ni_rx_ampdu[rapn]; + + if ((rap->rxa_flags & IEEE80211_AGGR_RUNNING) == 0) + continue; + + vap->iv_ic->ic_ampdu_rx_stop(ni, rap); + } + IEEE80211_UNLOCK(vap->iv_ic); /* Ensure the packets get out. */ @@ -3412,6 +3423,7 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int struct ieee80211_sta *sta; struct ieee80211_prep_tx_info prep_tx_info; enum ieee80211_bss_changed bss_changed; + struct ieee80211_rx_ampdu *rap; int error; lhw = vap->iv_ic->ic_softc; @@ -3467,6 +3479,16 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int goto outni; } + /* Stop any BA sessions if still active. */ + for (int rapn = 0; rapn < WME_NUM_TID; rapn++) { + rap = &ni->ni_rx_ampdu[rapn]; + + if ((rap->rxa_flags & IEEE80211_AGGR_RUNNING) == 0) + continue; + + vap->iv_ic->ic_ampdu_rx_stop(ni, rap); + } + IEEE80211_UNLOCK(vap->iv_ic); /* Ensure the packets get out. */ From nobody Fri Feb 27 02:30:18 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNq1GT4z6T823 for ; Fri, 27 Feb 2026 02:30:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNp5zFVz425N for ; Fri, 27 Feb 2026 02:30:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WFkk/HCSpuPOz4Bk8JBk9nnkZWSxPM87P4phDjeezFM=; b=cIM/y+MNmckIpYqrB998InFfGBSRcfl1lc992muKfGLodKyjxFmm4OOYID1b8I/MpNwZiA OI5F9yRJoEzC+GINEpHZJkJHeHD++Q2qsNTRPf5ygsqA3eyMw6ygzTVyK3ZSiw+KejnMmT 3OMyfyiH3Gt4wL3EI6tsqkruIeQzgYSR/OPHgVZ5ctEElzLj+bSKCl/DojPkAU/vkINb3k dfAsheTL0qs/yOJTxsWsSC+ZXCiSj6Q/5b2XVUTj1o7Ljtp8TaN3uyekULjeU+tDa9mi1N H+ITPoKc1E/6+Buz0tsFLqQ81NVkoZJ0n31N0W7TDsL/JKWcVtRSWQ09/pVETA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159418; a=rsa-sha256; cv=none; b=eOvwWNzk1sWsyrzL3kwVzCHsQCYc8H9WzMvUutyoLcJu3LjGhu2wyoYfnxTilL6/aKjh9a pJebSkc+U3AyJK0KdzzTxeSYwiLANcVh2NlBwrzR78IXrz8ehjBieMY5uwtJ5PT/6PIaTJ gH+lSXTor/DurtYNc6bU4C0ENE5HG/RhlMFoG/LJRR+J0kN5+bz3gT7VgFKE6NI3RJBWD9 u+GGKAHPkaYjd783f92lduoznhd/yvHkAPGc25CSqRlH80IGS/QPuhzEa/Ag8IcY8TGf5/ DiExr5l94wBM4CrcxOADdYfynADqPZpJe+OcSJ0dmvLSvdfZOjsAus2oYsAYTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WFkk/HCSpuPOz4Bk8JBk9nnkZWSxPM87P4phDjeezFM=; b=P/Iv1Rvp5tWdZmm50OCcAgCpiKTbD6Y1emq6x3xxeBWV4eFalCmWKbuSet3xNFoUi+vwKd Byg0QnXFTo0+ugn0/4yrW9FFqdlcF1MAatz7Jh6ObEihE/I560f3Jof45n9Sp+uUZ0+SnP qYAiBT/L3OSaQ9xOz/q9Gf8+/8GJvo4YVGhG4OAOaWbBB0ugq0r+WxPQOIVtNeSrUAM8kv iYHpge+JS3iA1wPZiDRyEc2PUAfXyWOiNJGPYaTr5oIqB6Dy4xHue5rgNrHeUG4bQLPwIg m7cuUkXf0I8eyWmzH6dzhKrGLjTGMaZSzKEu6Tr97V5/tyYiQpP/fmnvLyv/0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNp5HgwzyJ8 for ; Fri, 27 Feb 2026 02:30:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22800 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:30: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: 64af3362df76 - stable/15 - LinuxKPI: 802.11: adjust assoc check before key deletion List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 64af3362df76e0c7cdce5c0f64ff9ccef09bb155 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:30:18 +0000 Message-Id: <69a101ba.22800.7e7800d6@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=64af3362df76e0c7cdce5c0f64ff9ccef09bb155 commit 64af3362df76e0c7cdce5c0f64ff9ccef09bb155 Author: Bjoern A. Zeeb AuthorDate: 2026-02-24 23:51:43 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:09:34 +0000 LinuxKPI: 802.11: adjust assoc check before key deletion There is a discrepancy between the vif assoc state and the sta state (see comment in lkpi_sta_run_to_init()). Adjust the check in lkpi_iv_key_delete() and add it to lkpi_sta_del_keys() so that we can take way the keys after whatever comes first: the sta went away from AUTHORIZED (RUN) or if the vif is no longer marked assoc. This is needed as we may only take the sta down partially back to State 2 (cf. 802.11-2024, Figure 11-23) and key material is no longer valid before the vif gets cleaned up and the sta is removed entirely. Sponsored by: The FreeBSD Foundation (cherry picked from commit 96a57fc4bf4edca9a579cc47f9058253c11f8313) --- sys/compat/linuxkpi/common/src/linux_80211.c | 30 +++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index e80cf9436b3a..550bd417c529 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1373,6 +1373,15 @@ lkpi_sta_del_keys(struct ieee80211_hw *hw, struct ieee80211_vif *vif, return (0); lockdep_assert_wiphy(hw->wiphy); + + if (vif->cfg.assoc && lsta->state == IEEE80211_STA_AUTHORIZED) { + if (linuxkpi_debug_80211 & D80211_TRACE_HW_CRYPTO) + ic_printf(lsta->ni->ni_ic, + "%d %lu %s: vif still assoc; not deleting keys\n", + curthread->td_tid, jiffies, __func__); + return (0); + } + ieee80211_ref_node(lsta->ni); error = 0; @@ -1452,6 +1461,15 @@ lkpi_iv_key_delete(struct ieee80211vap *vap, const struct ieee80211_key *k) */ lockdep_assert_wiphy(hw->wiphy); + ni = ieee80211_ref_node(vap->iv_bss); + lsta = ni->ni_drv_data; + if (lsta == NULL) { + ic_printf(ic, "%s: ni %p (%6D) with lsta NULL\n", + __func__, ni, ni->ni_bssid, ":"); + ieee80211_free_node(ni); + return (0); + } + /* * While we are assoc we may still send packets. We cannot delete the * keys as otherwise packets could go out unencrypted. Some firmware @@ -1462,30 +1480,24 @@ lkpi_iv_key_delete(struct ieee80211vap *vap, const struct ieee80211_key *k) * How to test: run 800Mbit/s UDP traffic and during that restart your * supplicant. You want to survive that. */ - if (vif->cfg.assoc) { + if (vif->cfg.assoc && lsta->state == IEEE80211_STA_AUTHORIZED) { if (linuxkpi_debug_80211 & D80211_TRACE_HW_CRYPTO) ic_printf(ic, "%d %lu %s: vif still assoc; not deleting keys\n", curthread->td_tid, jiffies, __func__); + ieee80211_free_node(ni); return (0); } if (IEEE80211_KEY_UNDEFINED(k)) { ic_printf(ic, "%s: vap %p key %p is undefined: %p %u\n", __func__, vap, k, k->wk_cipher, k->wk_keyix); + ieee80211_free_node(ni); return (0); } if (vap->iv_bss == NULL) { ic_printf(ic, "%s: iv_bss %p for vap %p is NULL\n", __func__, vap->iv_bss, vap); - return (0); - } - - ni = ieee80211_ref_node(vap->iv_bss); - lsta = ni->ni_drv_data; - if (lsta == NULL) { - ic_printf(ic, "%s: ni %p (%6D) with lsta NULL\n", - __func__, ni, ni->ni_bssid, ":"); ieee80211_free_node(ni); return (0); } From nobody Fri Feb 27 02:30:20 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNs1r4rz6T7vv for ; Fri, 27 Feb 2026 02:30:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNr6b5Kz425m for ; Fri, 27 Feb 2026 02:30:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=irlizwx8H5gdpaCsnYdDVmNr7D0fHYJfUy6AK+2DJss=; b=SObFEJWJZkGYlM5L69gWeTXMcSTbb8ST06ERUDJCj2hoAW76j7JiRJz2nmx0nB8/M+SuRa YvLsdiDI5vuuJ3LoF1+hOG5YO4Rz8VgqHxAtSKML74yblsm4huUOkYND/d+Azau3/ar9F6 VJj4LJa6836NgjxvPG2A/rivSQrAOTD/hs2JXPVLnx+AnQdM8MOgVw4Bno0AF0aYSbB8ww VQo4ohOt6XJVLXoWZ/XeqHBWzqFhtOehx7JeKVQypDKR6wwXnixKx9kG4WCDfsMRN10lCM 3VkrVB7tsmsTv/4C5xiL2MBxZBEUi5M63cZcSNlOBW6k68KNkwfLh8uClhmNwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159420; a=rsa-sha256; cv=none; b=Msvk004IE2KM5hLXWRL98yyTP5f4lGIdT9SriDdrjjekHcYmc1eOdTEfXgoYx5Hgj9p/jj 66gjwUKL+vd0a9nqhMTBsTk7m+vuXBMXdFBRNU9OrWr0XeGOy6vfSdoCGjnp29bxrRx1Aw LXo7x0EEbxUKvouLs9bfpKA+0zejM8VEGQLkXIuuBCOQVbsW7nztv65a5rw4Ow4uFU6+Nv fxW/cMraG0d8sWR2OFhaP5i4ZJfWjphzo6vNNzKkYYue6+CYSXj3X7PV1zWqREVIIIhR8j zCs0HNQaisX28pxIdmJW/RyDAHBe7wZ6ZH+VW3z5IPB3wHX8Ly0IoGzJ73e0hg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=irlizwx8H5gdpaCsnYdDVmNr7D0fHYJfUy6AK+2DJss=; b=ng5la+2TfM6L/op9Il9befcapA3dSXsiirLlZsM/Ig3CoBnuaUZn+rYbnz8ugcKbnSIiUI BPJdxObt5ruxMnNYGeZgIiqnqe1f5tZc0zP2hUl6ZCeDZRyRDIdH0tILdXj7qf0sXEJoMe LbgB9H76CG0S2ZIpKUzUS0GvbOl7TuZs89Ondd4e0s7+RZXtwXfNAI9O875E8UDylSsDJT Oqc6AlZlOPhOykCp+1snWCpp//osg1S6sv2Xl4YgmpkuSahFLXvoEx4KrWkGj028cMI0wI fbzrgP+twUcDHj6qh7WMmxAx1W6MGa2JZc/J0cdR7B0q7orfr/MZJLC2Yk+vQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNr67GszxRJ for ; Fri, 27 Feb 2026 02:30:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 220af by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:30: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: c201c9ff5f3d - stable/15 - LinuxKPI: 802.11: fold the sta state machine again List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c201c9ff5f3d2dd5c7614c58b1afb9892d3d1cf5 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:30:20 +0000 Message-Id: <69a101bc.220af.2922828e@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c201c9ff5f3d2dd5c7614c58b1afb9892d3d1cf5 commit c201c9ff5f3d2dd5c7614c58b1afb9892d3d1cf5 Author: Bjoern A. Zeeb AuthorDate: 2026-02-25 00:13:22 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:09:49 +0000 LinuxKPI: 802.11: fold the sta state machine again In and around d9f59799fc3e7 we adjusted the initial sta state machine implementation and unfolded some functions, duplicating code. This version tries to undo some of that as it seems that we can get away with doing it more cleanly these days. There are 5 main functions for the path from INIT to RUN (UP1,2,3.1,3.2,4) and 4 main functions for the path from RUN to INIT (DOWN1,2,3,4). The reason there is one more on the patch up is that we can go directly from AUTH to RUN without going through ASSOC first. In addition there are further functions relying only on these 9 base state change functions in order to implement the remaining possible state transitions net80211 can do (without CSA and SLEEP). Another change is that we no longer take a sta always through INIT/SCAN first and then back up to AUTH, that is, we are no longer deleting the sta from the firmware unless net80211 would also take us down to that state and in a follow-up back up. This is a preparation for another fix to come in order to import a newer version of iwlwifi (v6.19). I have run a few days of mlme_assoc (see tools) and some other basic regression tests. The only thing I managed was to deadlock net80211 for other reasons (ieee80211_waitfor_parent()). But this will need excessive user testing as the various options which may have an effect on the subtle details are great as we learnt in the past years. Sponsored by: The FreeBSD Foundation (cherry picked from commit 48f55a49a1d142c616edbc7ee6745dd6b83393e4) --- sys/compat/linuxkpi/common/src/linux_80211.c | 834 +++++++++------------------ 1 file changed, 278 insertions(+), 556 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 9693e4eec268..48b87ae47751 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2121,7 +2121,7 @@ lkpi_disassoc(struct ieee80211_sta *sta, struct ieee80211_vif *vif, * The caller is responsible for removing the sta gong to * IEEE80211_STA_NOTEXIST and then executing the * bss_info_changed() update. - * See lkpi_sta_run_to_init() for more detailed comment. + * See DOWN4 for more detailed comment. */ lvif = VIF_TO_LVIF(vif); @@ -2248,13 +2248,17 @@ lkpi_remove_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif) static int lkpi_sta_state_do_nada(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { - return (0); } -/* lkpi_iv_newstate() handles the stop scan case generally. */ -#define lkpi_sta_scan_to_init(_v, _n, _a) lkpi_sta_state_do_nada(_v, _n, _a) +/* UP1 */ +static int +lkpi_sta_init_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) +{ + return (lkpi_sta_state_do_nada(vap, nstate, arg)); +} +/* UP2 */ static int lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { @@ -2579,136 +2583,7 @@ out_relocked: return (error); } -static int -lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) -{ - struct lkpi_hw *lhw; - struct ieee80211_hw *hw; - struct lkpi_vif *lvif; - struct ieee80211_vif *vif; - struct ieee80211_node *ni; - struct lkpi_sta *lsta; - struct ieee80211_sta *sta; - struct ieee80211_prep_tx_info prep_tx_info; - enum ieee80211_bss_changed bss_changed; - int error; - - lhw = vap->iv_ic->ic_softc; - hw = LHW_TO_HW(lhw); - lvif = VAP_TO_LVIF(vap); - vif = LVIF_TO_VIF(lvif); - - LKPI_80211_LVIF_LOCK(lvif); -#ifdef LINUXKPI_DEBUG_80211 - /* XXX-BZ KASSERT later; state going down so no action. */ - if (lvif->lvif_bss == NULL) - ic_printf(vap->iv_ic, "%s:%d: lvif %p vap %p iv_bss %p lvif_bss %p " - "lvif_bss->ni %p synched %d\n", __func__, __LINE__, - lvif, vap, vap->iv_bss, lvif->lvif_bss, - (lvif->lvif_bss != NULL) ? lvif->lvif_bss->ni : NULL, - lvif->lvif_bss_synched); -#endif - - lsta = lvif->lvif_bss; - LKPI_80211_LVIF_UNLOCK(lvif); - KASSERT(lsta != NULL && lsta->ni != NULL, ("%s: lsta %p ni %p " - "lvif %p vap %p\n", __func__, - lsta, (lsta != NULL) ? lsta->ni : NULL, lvif, vap)); - ni = lsta->ni; /* Reference held for lvif_bss. */ - sta = LSTA_TO_STA(lsta); - - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - - IEEE80211_UNLOCK(vap->iv_ic); - wiphy_lock(hw->wiphy); - - /* flush, drop. */ - lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), true); - - /* Wake tx queues to get packet(s) out. */ - lkpi_wake_tx_queues(hw, sta, false, true); - - /* flush, no drop */ - lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), false); - - /* End mgd_complete_tx. */ - if (lsta->in_mgd) { - memset(&prep_tx_info, 0, sizeof(prep_tx_info)); - prep_tx_info.success = false; - lkpi_80211_mo_mgd_complete_tx(hw, vif, &prep_tx_info); - lsta->in_mgd = false; - } - - /* sync_rx_queues */ - lkpi_80211_mo_sync_rx_queues(hw); - - /* sta_pre_rcu_remove */ - lkpi_80211_mo_sta_pre_rcu_remove(hw, vif, sta); - - /* Take the station down. */ - - /* Adjust sta and change state (from NONE) to NOTEXIST. */ - KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); - KASSERT(lsta->state == IEEE80211_STA_NONE, ("%s: lsta %p state not " - "NONE: %#x, nstate %d arg %d\n", __func__, lsta, lsta->state, nstate, arg)); - error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_NOTEXIST); - if (error != 0) { - IMPROVE("do we need to undo the chan ctx?"); - ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(NOTEXIST) " - "failed: %d\n", __func__, __LINE__, error); - goto out; - } -#if 0 - lsta->added_to_drv = false; /* mo manages. */ -#endif - - bss_changed = 0; - vif->bss_conf.dtim_period = 0; /* go back to 0. */ - bss_changed |= BSS_CHANGED_BEACON_INFO; - lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, bss_changed); - - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - - LKPI_80211_LVIF_LOCK(lvif); - /* Remove ni reference for this cache of lsta. */ - lvif->lvif_bss = NULL; - lvif->lvif_bss_synched = false; - LKPI_80211_LVIF_UNLOCK(lvif); - lkpi_lsta_remove(lsta, lvif); - - /* conf_tx */ - - lkpi_remove_chanctx(hw, vif); - -out: - wiphy_unlock(hw->wiphy); - IEEE80211_LOCK(vap->iv_ic); - if (error == 0) { - /* - * We do this outside the wiphy lock as net80211::node_free() may call - * into crypto code to delete keys and we have a recursed on - * non-recursive sx panic. Also only do this if we get here w/o error. - * - * The very last release the reference on the ni for the ni/lsta on - * lvif->lvif_bss. Upon return from this both ni and lsta are invalid - * and potentially freed. - */ - ieee80211_free_node(ni); - } - return (error); -} - -static int -lkpi_sta_auth_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) -{ - int error; - - error = lkpi_sta_auth_to_scan(vap, nstate, arg); - if (error == 0) - error = lkpi_sta_scan_to_init(vap, nstate, arg); - return (error); -} - +/* UP3.1 */ static int lkpi_sta_auth_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { @@ -2768,18 +2643,21 @@ lkpi_sta_auth_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, in lsta->in_mgd = false; } - /* Now start assoc. */ + /* Now start assoc. unless nstate=RUN (auth_to_run). */ /* Start mgd_prepare_tx. */ - if (!lsta->in_mgd) { + if (nstate == IEEE80211_S_ASSOC && !lsta->in_mgd) { memset(&prep_tx_info, 0, sizeof(prep_tx_info)); prep_tx_info.duration = PREP_TX_INFO_DURATION; lkpi_80211_mo_mgd_prepare_tx(hw, vif, &prep_tx_info); lsta->in_mgd = true; } +#if 0 + /* We do not yet have a packet to go out. */ /* Wake tx queue to get packet out. */ lkpi_wake_tx_queues(hw, LSTA_TO_STA(lsta), false, true); +#endif /* * .. we end up in "assoc_to_run" @@ -2797,76 +2675,23 @@ out: return (error); } -/* auth_to_auth, assoc_to_assoc. */ +static int lkpi_sta_assoc_to_run(struct ieee80211vap *, enum ieee80211_state, int); + +/* UP3.2 */ static int -lkpi_sta_a_to_a(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) +lkpi_sta_auth_to_run(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { - struct lkpi_hw *lhw; - struct ieee80211_hw *hw; - struct lkpi_vif *lvif; - struct ieee80211_vif *vif; - struct lkpi_sta *lsta; - struct ieee80211_prep_tx_info prep_tx_info; int error; - lhw = vap->iv_ic->ic_softc; - hw = LHW_TO_HW(lhw); - lvif = VAP_TO_LVIF(vap); - vif = LVIF_TO_VIF(lvif); - - IEEE80211_UNLOCK(vap->iv_ic); - wiphy_lock(hw->wiphy); - - LKPI_80211_LVIF_LOCK(lvif); - /* XXX-BZ KASSERT later? */ - if (!lvif->lvif_bss_synched || lvif->lvif_bss == NULL) { -#ifdef LINUXKPI_DEBUG_80211 - ic_printf(vap->iv_ic, "%s:%d: lvif %p vap %p iv_bss %p lvif_bss %p " - "lvif_bss->ni %p synched %d\n", __func__, __LINE__, - lvif, vap, vap->iv_bss, lvif->lvif_bss, - (lvif->lvif_bss != NULL) ? lvif->lvif_bss->ni : NULL, - lvif->lvif_bss_synched); -#endif - LKPI_80211_LVIF_UNLOCK(lvif); - error = ENOTRECOVERABLE; - goto out; - } - lsta = lvif->lvif_bss; - LKPI_80211_LVIF_UNLOCK(lvif); - - KASSERT(lsta != NULL, ("%s: lsta %p! lvif %p vap %p\n", __func__, - lsta, lvif, vap)); - - IMPROVE("event callback?"); - - /* End mgd_complete_tx. */ - if (lsta->in_mgd) { - memset(&prep_tx_info, 0, sizeof(prep_tx_info)); - prep_tx_info.success = false; - lkpi_80211_mo_mgd_complete_tx(hw, vif, &prep_tx_info); - lsta->in_mgd = false; - } - - /* Now start assoc. */ - - /* Start mgd_prepare_tx. */ - if (!lsta->in_mgd) { - memset(&prep_tx_info, 0, sizeof(prep_tx_info)); - prep_tx_info.duration = PREP_TX_INFO_DURATION; - lkpi_80211_mo_mgd_prepare_tx(hw, vif, &prep_tx_info); - lsta->in_mgd = true; - } - - error = 0; -out: - wiphy_unlock(hw->wiphy); - IEEE80211_LOCK(vap->iv_ic); - + error = lkpi_sta_auth_to_assoc(vap, nstate, arg); + if (error == 0) + error = lkpi_sta_assoc_to_run(vap, nstate, arg); return (error); } +/* UP4 */ static int -_lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) +lkpi_sta_assoc_to_run(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { struct lkpi_hw *lhw; struct ieee80211_hw *hw; @@ -2888,15 +2713,19 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i wiphy_lock(hw->wiphy); LKPI_80211_LVIF_LOCK(lvif); + /* XXX-BZ KASSERT later? */ + if (!lvif->lvif_bss_synched || lvif->lvif_bss == NULL) { #ifdef LINUXKPI_DEBUG_80211 - /* XXX-BZ KASSERT later; state going down so no action. */ - if (lvif->lvif_bss == NULL) ic_printf(vap->iv_ic, "%s:%d: lvif %p vap %p iv_bss %p lvif_bss %p " "lvif_bss->ni %p synched %d\n", __func__, __LINE__, lvif, vap, vap->iv_bss, lvif->lvif_bss, (lvif->lvif_bss != NULL) ? lvif->lvif_bss->ni : NULL, lvif->lvif_bss_synched); #endif + LKPI_80211_LVIF_UNLOCK(lvif); + error = ENOTRECOVERABLE; + goto out; + } lsta = lvif->lvif_bss; LKPI_80211_LVIF_UNLOCK(lvif); KASSERT(lsta != NULL && lsta->ni != NULL, ("%s: lsta %p ni %p " @@ -2904,244 +2733,28 @@ _lkpi_sta_assoc_to_down(struct ieee80211vap *vap, enum ieee80211_state nstate, i lsta, (lsta != NULL) ? lsta->ni : NULL, lvif, vap)); ni = lsta->ni; /* Reference held for lvif_bss. */ - sta = LSTA_TO_STA(lsta); - - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - - /* flush, drop. */ - lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), true); - - IMPROVE("What are the proper conditions for DEAUTH_NEED_MGD_TX_PREP?"); - if (ieee80211_hw_check(hw, DEAUTH_NEED_MGD_TX_PREP) && - !lsta->in_mgd) { - memset(&prep_tx_info, 0, sizeof(prep_tx_info)); - prep_tx_info.duration = PREP_TX_INFO_DURATION; - prep_tx_info.was_assoc = true; - lkpi_80211_mo_mgd_prepare_tx(hw, vif, &prep_tx_info); - lsta->in_mgd = true; - } - wiphy_unlock(hw->wiphy); - IEEE80211_LOCK(vap->iv_ic); + IMPROVE("ponder some of this moved to ic_newassoc, scan_assoc_success, " + "and to lesser extend ieee80211_notify_node_join"); - /* Call iv_newstate first so we get potential DEAUTH packet out. */ - error = lvif->iv_newstate(vap, nstate, arg); + /* Finish assoc. (even if this is auth_to_run!) */ + /* Update sta_state (AUTH to ASSOC) and set aid. */ + KASSERT(lsta->state == IEEE80211_STA_AUTH, ("%s: lsta %p state not " + "AUTH: %#x\n", __func__, lsta, lsta->state)); + sta = LSTA_TO_STA(lsta); + sta->aid = IEEE80211_NODE_AID(ni); +#ifdef LKPI_80211_WME + if (vap->iv_flags & IEEE80211_F_WME) + sta->wme = true; +#endif + error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_ASSOC); if (error != 0) { - ic_printf(vap->iv_ic, "%s:%d: iv_newstate(%p, %d, %d) " - "failed: %d\n", __func__, __LINE__, vap, nstate, arg, error); - goto outni; + ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(ASSOC) " + "failed: %d\n", __func__, __LINE__, error); + goto out; } - IEEE80211_UNLOCK(vap->iv_ic); - - /* Ensure the packets get out. */ - lkpi_80211_flush_tx(lhw, lsta); - - wiphy_lock(hw->wiphy); - - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - - /* Wake tx queues to get packet(s) out. */ - lkpi_wake_tx_queues(hw, sta, false, true); - - /* flush, no drop */ - lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), false); - - /* End mgd_complete_tx. */ - if (lsta->in_mgd) { - memset(&prep_tx_info, 0, sizeof(prep_tx_info)); - prep_tx_info.success = false; - prep_tx_info.was_assoc = true; - lkpi_80211_mo_mgd_complete_tx(hw, vif, &prep_tx_info); - lsta->in_mgd = false; - } - - /* sync_rx_queues */ - lkpi_80211_mo_sync_rx_queues(hw); - - /* sta_pre_rcu_remove */ - lkpi_80211_mo_sta_pre_rcu_remove(hw, vif, sta); - - /* Take the station down. */ - - /* Update sta and change state (from AUTH) to NONE. */ - KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); - KASSERT(lsta->state == IEEE80211_STA_AUTH, ("%s: lsta %p state not " - "AUTH: %#x\n", __func__, lsta, lsta->state)); - error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_NONE); - if (error != 0) { - ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(NONE) " - "failed: %d\n", __func__, __LINE__, error); - goto out; - } - - /* See comment in lkpi_sta_run_to_init(). */ - bss_changed = 0; - bss_changed |= lkpi_disassoc(sta, vif, lhw); - -#ifdef LKPI_80211_HW_CRYPTO - /* - * In theory we remove keys here but there must not exist any for this - * state change until we clean them up again into small steps and no - * code duplication. - */ -#endif - - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - - /* Adjust sta and change state (from NONE) to NOTEXIST. */ - KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); - KASSERT(lsta->state == IEEE80211_STA_NONE, ("%s: lsta %p state not " - "NONE: %#x, nstate %d arg %d\n", __func__, lsta, lsta->state, nstate, arg)); - error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_NOTEXIST); - if (error != 0) { - IMPROVE("do we need to undo the chan ctx?"); - ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(NOTEXIST) " - "failed: %d\n", __func__, __LINE__, error); - goto out; - } - - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */ - - IMPROVE("Any bss_info changes to announce?"); - vif->bss_conf.qos = 0; - bss_changed |= BSS_CHANGED_QOS; - vif->cfg.ssid_len = 0; - memset(vif->cfg.ssid, '\0', sizeof(vif->cfg.ssid)); - bss_changed |= BSS_CHANGED_BSSID; - vif->bss_conf.dtim_period = 0; /* go back to 0. */ - bss_changed |= BSS_CHANGED_BEACON_INFO; - lkpi_80211_mo_bss_info_changed(hw, vif, &vif->bss_conf, bss_changed); - - LKPI_80211_LVIF_LOCK(lvif); - /* Remove ni reference for this cache of lsta. */ - lvif->lvif_bss = NULL; - lvif->lvif_bss_synched = false; - LKPI_80211_LVIF_UNLOCK(lvif); - lkpi_lsta_remove(lsta, lvif); - - /* conf_tx */ - - lkpi_remove_chanctx(hw, vif); - - error = EALREADY; -out: - wiphy_unlock(hw->wiphy); - IEEE80211_LOCK(vap->iv_ic); - if (error == EALREADY) { - /* - * We do this outside the wiphy lock as net80211::node_free() may call - * into crypto code to delete keys and we have a recursed on - * non-recursive sx panic. Also only do this if we get here w/o error. - * - * The very last release the reference on the ni for the ni/lsta on - * lvif->lvif_bss. Upon return from this both ni and lsta are invalid - * and potentially freed. - */ - ieee80211_free_node(ni); - } -outni: - return (error); -} - -static int -lkpi_sta_assoc_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) -{ - int error; - - error = _lkpi_sta_assoc_to_down(vap, nstate, arg); - if (error != 0 && error != EALREADY) - return (error); - - /* At this point iv_bss is long a new node! */ - - error |= lkpi_sta_scan_to_auth(vap, nstate, 0); - return (error); -} - -static int -lkpi_sta_assoc_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) -{ - int error; - - error = _lkpi_sta_assoc_to_down(vap, nstate, arg); - return (error); -} - -static int -lkpi_sta_assoc_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) -{ - int error; - - error = _lkpi_sta_assoc_to_down(vap, nstate, arg); - return (error); -} - -static int -lkpi_sta_assoc_to_run(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) -{ - struct lkpi_hw *lhw; - struct ieee80211_hw *hw; - struct lkpi_vif *lvif; - struct ieee80211_vif *vif; - struct ieee80211_node *ni; - struct lkpi_sta *lsta; - struct ieee80211_sta *sta; - struct ieee80211_prep_tx_info prep_tx_info; - enum ieee80211_bss_changed bss_changed; - int error; - - lhw = vap->iv_ic->ic_softc; - hw = LHW_TO_HW(lhw); - lvif = VAP_TO_LVIF(vap); - vif = LVIF_TO_VIF(lvif); - - IEEE80211_UNLOCK(vap->iv_ic); - wiphy_lock(hw->wiphy); - - LKPI_80211_LVIF_LOCK(lvif); - /* XXX-BZ KASSERT later? */ - if (!lvif->lvif_bss_synched || lvif->lvif_bss == NULL) { -#ifdef LINUXKPI_DEBUG_80211 - ic_printf(vap->iv_ic, "%s:%d: lvif %p vap %p iv_bss %p lvif_bss %p " - "lvif_bss->ni %p synched %d\n", __func__, __LINE__, - lvif, vap, vap->iv_bss, lvif->lvif_bss, - (lvif->lvif_bss != NULL) ? lvif->lvif_bss->ni : NULL, - lvif->lvif_bss_synched); -#endif - LKPI_80211_LVIF_UNLOCK(lvif); - error = ENOTRECOVERABLE; - goto out; - } - lsta = lvif->lvif_bss; - LKPI_80211_LVIF_UNLOCK(lvif); - KASSERT(lsta != NULL && lsta->ni != NULL, ("%s: lsta %p ni %p " - "lvif %p vap %p\n", __func__, - lsta, (lsta != NULL) ? lsta->ni : NULL, lvif, vap)); - - ni = lsta->ni; /* Reference held for lvif_bss. */ - - IMPROVE("ponder some of this moved to ic_newassoc, scan_assoc_success, " - "and to lesser extend ieee80211_notify_node_join"); - - /* Finish assoc. */ - /* Update sta_state (AUTH to ASSOC) and set aid. */ - KASSERT(lsta->state == IEEE80211_STA_AUTH, ("%s: lsta %p state not " - "AUTH: %#x\n", __func__, lsta, lsta->state)); - sta = LSTA_TO_STA(lsta); - sta->aid = IEEE80211_NODE_AID(ni); -#ifdef LKPI_80211_WME - if (vap->iv_flags & IEEE80211_F_WME) - sta->wme = true; -#endif - error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_ASSOC); - if (error != 0) { - ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(ASSOC) " - "failed: %d\n", __func__, __LINE__, error); - goto out; - } - - IMPROVE("wme / conf_tx [all]"); + IMPROVE("wme / conf_tx [all]"); /* Update bss info (bss_info_changed) (assoc, aid, ..). */ bss_changed = 0; @@ -3180,7 +2793,7 @@ lkpi_sta_assoc_to_run(struct ieee80211vap *vap, enum ieee80211_state nstate, int * - event_callback */ - /* End mgd_complete_tx. */ + /* End mgd_complete_tx. (we do not have to check ostate == IEEE80211_S_ASSOC). */ if (lsta->in_mgd) { memset(&prep_tx_info, 0, sizeof(prep_tx_info)); prep_tx_info.success = true; @@ -3243,17 +2856,11 @@ out: return (error); } -static int -lkpi_sta_auth_to_run(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) -{ - int error; - - error = lkpi_sta_auth_to_assoc(vap, nstate, arg); - if (error == 0) - error = lkpi_sta_assoc_to_run(vap, nstate, arg); - return (error); -} - +/* + * DOWN1 + * "to assoc" means we are going back to State 2 from State 4[/3]. + * This means ni still is authenticated, so we keep sta, chanctx, .. + */ static int lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { @@ -3276,6 +2883,9 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int lvif = VAP_TO_LVIF(vap); vif = LVIF_TO_VIF(lvif); + IEEE80211_UNLOCK(vap->iv_ic); + wiphy_lock(hw->wiphy); + LKPI_80211_LVIF_LOCK(lvif); #ifdef LINUXKPI_DEBUG_80211 /* XXX-BZ KASSERT later; state going down so no action. */ @@ -3297,9 +2907,6 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - IEEE80211_UNLOCK(vap->iv_ic); - wiphy_lock(hw->wiphy); - /* flush, drop. */ lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), true); @@ -3316,7 +2923,7 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int wiphy_unlock(hw->wiphy); IEEE80211_LOCK(vap->iv_ic); - /* Call iv_newstate first so we get potential DISASSOC packet out. */ + /* Call iv_newstate first so we get potential (RE-)ASSOC/DEAUTH? packet out. */ error = lvif->iv_newstate(vap, nstate, arg); if (error != 0) { ic_printf(vap->iv_ic, "%s:%d: iv_newstate(%p, %d, %d) " @@ -3363,7 +2970,7 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_80211_mo_sync_rx_queues(hw); /* sta_pre_rcu_remove */ - lkpi_80211_mo_sta_pre_rcu_remove(hw, vif, sta); + lkpi_80211_mo_sta_pre_rcu_remove(hw, vif, sta); #endif /* Take the station down. */ @@ -3412,6 +3019,7 @@ lkpi_sta_run_to_assoc(struct ieee80211vap *vap, enum ieee80211_state nstate, int #if 0 /* Update bss info (bss_info_changed) (assoc, aid, ..). */ + /* See comment in DOWN4. */ lkpi_disassoc(sta, vif, lhw); #endif @@ -3423,8 +3031,15 @@ outni: return (error); } +/* + * DOWN2 + * We are in state 2 and go back to state 1 and will try to auth again + * (to IEEE80211_S_AUTH in FreeBSD means "try to auth"). This should be + * like scan_to_auth but that we keep the "ni" and with that chanctx/bssid, + * which essentially makes this "a_to_a" in LinuxKPI. + */ static int -lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) +lkpi_sta_assoc_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { struct lkpi_hw *lhw; struct ieee80211_hw *hw; @@ -3432,10 +3047,6 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int struct ieee80211_vif *vif; struct ieee80211_node *ni; struct lkpi_sta *lsta; - struct ieee80211_sta *sta; - struct ieee80211_prep_tx_info prep_tx_info; - enum ieee80211_bss_changed bss_changed; - struct ieee80211_rx_ampdu *rap; int error; lhw = vap->iv_ic->ic_softc; @@ -3463,53 +3074,81 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lsta, (lsta != NULL) ? lsta->ni : NULL, lvif, vap)); ni = lsta->ni; /* Reference held for lvif_bss. */ - sta = LSTA_TO_STA(lsta); lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - /* flush, drop. */ - lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), true); - - IMPROVE("What are the proper conditions for DEAUTH_NEED_MGD_TX_PREP?"); - if (ieee80211_hw_check(hw, DEAUTH_NEED_MGD_TX_PREP) && - !lsta->in_mgd) { - memset(&prep_tx_info, 0, sizeof(prep_tx_info)); - prep_tx_info.duration = PREP_TX_INFO_DURATION; - prep_tx_info.was_assoc = true; - lkpi_80211_mo_mgd_prepare_tx(hw, vif, &prep_tx_info); - lsta->in_mgd = true; + /* Take the station down. */ + /* Update sta_state (AUTH to NONE). */ + KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); + KASSERT(lsta->state == IEEE80211_STA_AUTH, ("%s: lsta %p state not " + "AUTH: %#x\n", __func__, lsta, lsta->state)); + error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_NONE); + if (error != 0) { + ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(NONE) " + "failed: %d\n", __func__, __LINE__, error); + goto out; } + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); + +out: wiphy_unlock(hw->wiphy); IEEE80211_LOCK(vap->iv_ic); + return (error); +} - /* Call iv_newstate first so we get potential DISASSOC packet out. */ - error = lvif->iv_newstate(vap, nstate, arg); - if (error != 0) { - ic_printf(vap->iv_ic, "%s:%d: iv_newstate(%p, %d, %d) " - "failed: %d\n", __func__, __LINE__, vap, nstate, arg, error); - goto outni; - } - - /* Stop any BA sessions if still active. */ - for (int rapn = 0; rapn < WME_NUM_TID; rapn++) { - rap = &ni->ni_rx_ampdu[rapn]; - - if ((rap->rxa_flags & IEEE80211_AGGR_RUNNING) == 0) - continue; +/* + * DOWN3 + * We are in state 1. Either auth timed out (arg != 0) or we have an internal + * state change forcing us to give up trying to authenticate. + * Cleanup and remove chanctx, sta, ... + */ +static int +lkpi_sta_auth_to_scan(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) +{ + struct lkpi_hw *lhw; + struct ieee80211_hw *hw; + struct lkpi_vif *lvif; + struct ieee80211_vif *vif; + struct ieee80211_node *ni; + struct lkpi_sta *lsta; + struct ieee80211_sta *sta; + struct ieee80211_prep_tx_info prep_tx_info; + enum ieee80211_bss_changed bss_changed; + int error; - vap->iv_ic->ic_ampdu_rx_stop(ni, rap); - } + lhw = vap->iv_ic->ic_softc; + hw = LHW_TO_HW(lhw); + lvif = VAP_TO_LVIF(vap); + vif = LVIF_TO_VIF(lvif); IEEE80211_UNLOCK(vap->iv_ic); + wiphy_lock(hw->wiphy); - /* Ensure the packets get out. */ - lkpi_80211_flush_tx(lhw, lsta); + LKPI_80211_LVIF_LOCK(lvif); +#ifdef LINUXKPI_DEBUG_80211 + /* XXX-BZ KASSERT later; state going down so no action. */ + if (lvif->lvif_bss == NULL) + ic_printf(vap->iv_ic, "%s:%d: lvif %p vap %p iv_bss %p lvif_bss %p " + "lvif_bss->ni %p synched %d\n", __func__, __LINE__, + lvif, vap, vap->iv_bss, lvif->lvif_bss, + (lvif->lvif_bss != NULL) ? lvif->lvif_bss->ni : NULL, + lvif->lvif_bss_synched); +#endif - wiphy_lock(hw->wiphy); + lsta = lvif->lvif_bss; + LKPI_80211_LVIF_UNLOCK(lvif); + KASSERT(lsta != NULL && lsta->ni != NULL, ("%s: lsta %p ni %p " + "lvif %p vap %p\n", __func__, + lsta, (lsta != NULL) ? lsta->ni : NULL, lvif, vap)); + ni = lsta->ni; /* Reference held for lvif_bss. */ + sta = LSTA_TO_STA(lsta); lkpi_lsta_dump(lsta, ni, __func__, __LINE__); + /* flush, drop. */ + lkpi_80211_mo_flush(hw, vif, nitems(sta->txq), true); + /* Wake tx queues to get packet(s) out. */ lkpi_wake_tx_queues(hw, sta, false, true); @@ -3520,7 +3159,6 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int if (lsta->in_mgd) { memset(&prep_tx_info, 0, sizeof(prep_tx_info)); prep_tx_info.success = false; - prep_tx_info.was_assoc = true; lkpi_80211_mo_mgd_complete_tx(hw, vif, &prep_tx_info); lsta->in_mgd = false; } @@ -3528,36 +3166,8 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int /* sync_rx_queues */ lkpi_80211_mo_sync_rx_queues(hw); - /* sta_pre_rcu_remove */ - lkpi_80211_mo_sta_pre_rcu_remove(hw, vif, sta); - - /* Take the station down. */ - - /* Adjust sta and change state (from AUTHORIZED) to ASSOC. */ - KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); - KASSERT(lsta->state == IEEE80211_STA_AUTHORIZED, ("%s: lsta %p state not " - "AUTHORIZED: %#x\n", __func__, lsta, lsta->state)); - error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_ASSOC); - if (error != 0) { - ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(ASSOC) " - "failed: %d\n", __func__, __LINE__, error); - goto out; - } - - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); - #ifdef LKPI_80211_HW_CRYPTO if (lkpi_hwcrypto) { - /* - * In theory we only need to do this if we changed assoc. - * If we were not assoc, there should be no keys and we - * should not be here. - */ -#ifdef notyet - KASSERT((bss_changed & BSS_CHANGED_ASSOC) != 0, ("%s: " - "trying to remove keys but were not assoc: %#010jx, lvif %p\n", - __func__, (uintmax_t)bss_changed, lvif)); -#endif error = lkpi_sta_del_keys(hw, vif, lsta); if (error != 0) { ic_printf(vap->iv_ic, "%s:%d: lkpi_sta_del_keys " @@ -3572,29 +3182,12 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int } #endif - /* Update sta_state (ASSOC to AUTH). */ - KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); - KASSERT(lsta->state == IEEE80211_STA_ASSOC, ("%s: lsta %p state not " - "ASSOC: %#x\n", __func__, lsta, lsta->state)); - error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_AUTH); - if (error != 0) { - ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(AUTH) " - "failed: %d\n", __func__, __LINE__, error); - goto out; - } + /* sta_pre_rcu_remove */ + lkpi_80211_mo_sta_pre_rcu_remove(hw, vif, sta); - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); + synchronize_net(); - /* Update sta and change state (from AUTH) to NONE. */ - KASSERT(lsta != NULL, ("%s: ni %p lsta is NULL\n", __func__, ni)); - KASSERT(lsta->state == IEEE80211_STA_AUTH, ("%s: lsta %p state not " - "AUTH: %#x\n", __func__, lsta, lsta->state)); - error = lkpi_80211_mo_sta_state(hw, vif, lsta, IEEE80211_STA_NONE); - if (error != 0) { - ic_printf(vap->iv_ic, "%s:%d: mo_sta_state(NONE) " - "failed: %d\n", __func__, __LINE__, error); - goto out; - } + /* Take the station down. */ bss_changed = 0; /* @@ -3641,16 +3234,15 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_lsta_remove(lsta, lvif); - lkpi_lsta_dump(lsta, ni, __func__, __LINE__); /* sta no longer save to use. */ + lkpi_lsta_dump(lsta, ni, __func__, __LINE__); IMPROVE("Any bss_info changes to announce?"); - vif->bss_conf.qos = 0; + vif->bss_conf.qos = false; bss_changed |= BSS_CHANGED_QOS; vif->cfg.ssid_len = 0; memset(vif->cfg.ssid, '\0', sizeof(vif->cfg.ssid)); bss_changed |= BSS_CHANGED_BSSID; vif->bss_conf.use_short_preamble = false; - vif->bss_conf.qos = false; /* XXX BSS_CHANGED_???? */ vif->bss_conf.dtim_period = 0; /* go back to 0. */ bss_changed |= BSS_CHANGED_BEACON_INFO; @@ -3666,11 +3258,10 @@ lkpi_sta_run_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int lkpi_remove_chanctx(hw, vif); - error = EALREADY; out: wiphy_unlock(hw->wiphy); IEEE80211_LOCK(vap->iv_ic); - if (error == EALREADY) { + if (error == 0) { /* * We do this outside the wiphy lock as net80211::node_free() may call * into crypto code to delete keys and we have a recursed on @@ -3682,15 +3273,148 @@ out: */ ieee80211_free_node(ni); } -outni: + return (error); +} + +/* DOWN4 */ +static int +lkpi_sta_scan_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) +{ + /* lkpi_iv_newstate() handles the stop scan case in common code. */ + return (lkpi_sta_state_do_nada(vap, nstate, arg)); +} + +/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ + +static int +lkpi_sta_auth_to_init(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) +{ + int error; + + error = lkpi_sta_auth_to_scan(vap, nstate, arg); + if (error == 0) + error = lkpi_sta_scan_to_init(vap, nstate, arg); + return (error); +} + +/* auth_to_auth, assoc_to_assoc. */ +static int +lkpi_sta_a_to_a(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) +{ + struct lkpi_hw *lhw; + struct ieee80211_hw *hw; + struct lkpi_vif *lvif; + struct ieee80211_vif *vif; + struct lkpi_sta *lsta; + struct ieee80211_prep_tx_info prep_tx_info; + int error; + + lhw = vap->iv_ic->ic_softc; + hw = LHW_TO_HW(lhw); + lvif = VAP_TO_LVIF(vap); + vif = LVIF_TO_VIF(lvif); *** 161 LINES SKIPPED *** From nobody Fri Feb 27 02:30:19 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNr1Vy9z6T86j for ; Fri, 27 Feb 2026 02:30:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNq6Hnfz41xG for ; Fri, 27 Feb 2026 02:30:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P8LrD0xo5fR8K5Lw3GMywRsTDyOvn9x1/9bsdrLsA/Y=; b=vYxJKxt7tyP9Lr4yKA+JVlLLmL22qv6sQPBH+ARen3KRfwg69ViBECxCiyEH6xB8TApkgC vc2HalxrdM+eLMw/092+vfqH2YxrlMAThSSaCTlG+LPTqyjASlrFbs00vv4R7ymCrv75io elUBLODqVeHJuq8Ev8t6fTY/1kFQAs8oyqE9oqZ9r3QbiSensx0j/08Lfpanpxzzg937xY ZJuoX3W4Qe6av1uO+cyrfH4sVfby/0RJcDXUAPdihzcRFOf2AeFea6B7VqFKu17JH5V/PU QgRjUlGgSnYS/aMbOfqpi5iuH1tCJYpk11F2iBtDXdwF+xAIxhrcS9EozcZ4aA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159419; a=rsa-sha256; cv=none; b=olhGqVoLMzkH3hzpHinB7s0MlRg9N7QghxW55d/zZpkcRIUa2SYhtWEq7qoDLFHNajuxge zcbDBN+C9SvgRlRvGDkb7MnBI6nVKYRasTkabRNpxkKd8ZQMFDa4LAxhCtwLiaj2g8+2GI cr9+Buk/ff3vDVADq5K0gmlerZjSnn/UhrK2+Nt5WqYkCVh3xqWXmUAuX1cTtk9zeSS/hF /CQVMNVdSujFndtJ4sOdewur5NXX+7uk9k3PjQZAzf/chz2yB5rVqMoS1NyvR/B/+yDaKk Z1MxbSylszePa3j4VK0wzM9mPHeVDGlDS2GOxRyBIgmL4k0hJyDCyuxCq9EEhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P8LrD0xo5fR8K5Lw3GMywRsTDyOvn9x1/9bsdrLsA/Y=; b=luUQ/Dh9wTvII0n5MEhR5J/VqrGAwb0duhFP4pJg9jUO+STYEGanuByiFXrylsWVKfCmhg X6WdeMgxDfCQu1gcx4HdAoUMIwz9Atsh220i5+03IWSXSS+i3HJd9HYgDjJjdqdrE90W+k zz59a/eicUJtiMere2acNRx29cx/d43dG8H93aeBKJk8Uq2n8XiuHngcw7P97Zj62jOYwj 2+F4JP/mDaZFHBSgfYiIWBzrU8hlf9qO9YKR/gME3sB++O9MueIk7dcKLUKP+NCP6vTkSi JYVRuUubLPOiKEqy6AHoq0tr5du/ctyGWzEZQTODHgIO+nP6oJhSHFXFmrFpkw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNq5fGBzyXF for ; Fri, 27 Feb 2026 02:30:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 226eb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:30: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: 7e9c07d5ec62 - stable/15 - LinuxKPI: 802.11: improve crypto debug logging List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7e9c07d5ec621a91d329f5b1d2321be4883468b3 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:30:19 +0000 Message-Id: <69a101bb.226eb.391f5db4@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=7e9c07d5ec621a91d329f5b1d2321be4883468b3 commit 7e9c07d5ec621a91d329f5b1d2321be4883468b3 Author: Bjoern A. Zeeb AuthorDate: 2026-02-25 00:05:36 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:09:41 +0000 LinuxKPI: 802.11: improve crypto debug logging Add a log entry to lkpi_ieee80211_iterate_keys() in order to be able to determine if there are still keys available when a driver calls into this (e.g., iwlwifi does before removing the sta to make sure the keys are gone). Sponsored by: The FreeBSD Foundation (cherry picked from commit acba7a62b92ff62ca4ae831e9c28fc6ed4f6455a) --- sys/compat/linuxkpi/common/src/linux_80211.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 550bd417c529..9693e4eec268 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -7106,6 +7106,14 @@ lkpi_ieee80211_iterate_keys(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *, struct ieee80211_key_conf *, void *), void *arg) { +#ifdef LINUXKPI_DEBUG_80211 + if (linuxkpi_debug_80211 & D80211_TRACE_HW_CRYPTO) + net80211_vap_printf(LVIF_TO_VAP(VIF_TO_LVIF(vif)), + "%s:%d: lsta %6D added_to_drv %d kc[keyix %u] %p\n", + __func__, __LINE__, LSTA_TO_STA(lsta)->addr, ":", + lsta->added_to_drv, keyix, lsta->kc[keyix]); +#endif + if (!lsta->added_to_drv) return; From nobody Fri Feb 27 02:30:21 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNt1y8zz6T7vy for ; Fri, 27 Feb 2026 02:30:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMXNt0107z42DZ for ; Fri, 27 Feb 2026 02:30:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YuBEtoFK1l+pqhc1Y6Ab4595rycXRcNT/ZiB/Vz9mXA=; b=ER1aQnpbnj/tQZLnAP2ueOZgxkT50Ip0L3U13oBkSUDUNW9OMDXxgQ2z3jsD4fesYOensl FCSw5wGNvavY6BvF4uPdyh5gVRj24PAl6hWbGKhvTD2X8r75H0g03IU+XgR4FS2Zo4s32f Q5rhyg7ATV7gTnIQzcNQOhb7wyshSH4rKM02j9+vobqHrJ10NWBXx9m4fPY2VhYSi0cVQ0 QByma9igomYTy0UEyz6t9bZ1s4yDBLzplE0UbCd2MEaYzvblQp5vdMBfsLi2GHa+uppC8u SeVztQvK9KUtA+lGVNqUFciDjBKSf3Sd7a4WxNnOvqwLO7gDMiXLvDKqpj8X0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772159422; a=rsa-sha256; cv=none; b=lNXF7AdRIRP4M/czPI4ivTUi462qM/WD4etQoVYatetpVFitjssB2Nke+i1bLprHJstCCu jIhHsv7tT/NbusHKCXjpxMEELC13an+XGUFcuIOGoYbEhCMiDVGFqJCgizvfRuRET166hQ gJY2xWAuByipe4P4VPc6ETPCou5eY43pXBrGok1SlejgMHn/v/mtkjWH7ksWcIHl4Vz4D9 D4agmaGpaReANmyDjdb9+qX0PGwhUT7A3tc3KMq1TIq99tl1ZPGxJmS23hDn8DaajDODUP 4CGK6LMm6Fe1ad4zav0nB07ixaC2yId5Extdmvqnzl9iCdfp01nNNgglWZhFGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772159422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YuBEtoFK1l+pqhc1Y6Ab4595rycXRcNT/ZiB/Vz9mXA=; b=HG3UQy7RP6p91n5bGWFyxMpeU4uxiJfu/hRP58FoiWmOdwNYdsXYgEMKkRWpzCInMNmrM3 QQ5aW6xTx0SZdaXo5CMhCxYpf3671zjQALcZPhDq2l6xj8j0Xa9YbYtUieHnIgHs86HWra 07hTn75/kSdJGZcki0HBKDxvL6Yhtmd8AzbivI3dwo4K4US9fub25Ctzt7HIyWoSjWySJo FsvEPdEd20RnFaCWk2o0wL12AOPTg4BumHqnVDKd9BY/rPt/DeBFpcXq/sixYfOgIV2a3y ZSjO7TJiWRnAy8jqSRHKEB1YqrtKyyaet0EYqQdl6j/Qb7TJyZbm+SFHW9PYEA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMXNs6T3BzyVM for ; Fri, 27 Feb 2026 02:30:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 211c9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 02:30:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 112e91693f5b - stable/15 - LinuxKPI: remove dummy header now in common List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 112e91693f5b7f6ec59c864c2db55d3a9843499f Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 02:30:21 +0000 Message-Id: <69a101bd.211c9.3b71dd50@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=112e91693f5b7f6ec59c864c2db55d3a9843499f commit 112e91693f5b7f6ec59c864c2db55d3a9843499f Author: Bjoern A. Zeeb AuthorDate: 2026-02-26 22:46:08 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-26 23:09:56 +0000 LinuxKPI: remove dummy header now in common page_pool/helpers.h does exist in common/include/net/page_pool/helpers.h so we can remove the dummy header file. Sponosred by: The FreeBSD Foundation (cherry picked from commit c944960a5bd7725e4d5e6805ec1e55b7de147c35) --- sys/compat/linuxkpi/dummy/include/net/page_pool/helpers.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/sys/compat/linuxkpi/dummy/include/net/page_pool/helpers.h b/sys/compat/linuxkpi/dummy/include/net/page_pool/helpers.h deleted file mode 100644 index e69de29bb2d1..000000000000 From nobody Fri Feb 27 03:46:09 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMZ4g0hT3z6TJb7 for ; Fri, 27 Feb 2026 03:46:27 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMZ4d3YPgz3VdX for ; Fri, 27 Feb 2026 03:46:25 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=XSdzPSlJ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of yaneurabeya@gmail.com designates 2607:f8b0:4864:20::432 as permitted sender) smtp.mailfrom=yaneurabeya@gmail.com Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-8272a56b91cso1460938b3a.1 for ; Thu, 26 Feb 2026 19:46:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772163983; x=1772768783; darn=freebsd.org; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YWeVfPKsu+S6YKhKpcR7kYS6j+apMhjUx03MFLHZOIg=; b=XSdzPSlJlRm22j970iSipr3tmrDzLM9FxHU9R2IxJwE3IKaF8O/xNmnH4SKT1TNlzV 90LhB5VRE6iWtydewKgoBnYubaSZczdceITeMH440t5qdr8DS6oIbNMI8B5mfIuZufNC SYXJO0tfut0j3cGO3Jr7+sZAi1HjUbZpzcDvG9NZp/+OT9iOGIsi46eFAIWva6uXLJff g6sLFi4dyqzmvz1e4IwwYPU8CklItYEdrgCGCLEiiWYn+T/yDL7GrsQeywE27LwOIz1j T2keuoFJqk8ahPbKbuYSr58b2rQEDLeL8KlBY6t29B2TCyl2YZakRTqPhwIFnamwtRoy Pe/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772163983; x=1772768783; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=YWeVfPKsu+S6YKhKpcR7kYS6j+apMhjUx03MFLHZOIg=; b=pcqs5vN7uF/jS0guQeYbQAVsRvL0rWMi1ly4cvUV/2JT5P92NrV3l0lgI6pK5F900X g4KPanljK0p/O1meyyPjJjZt0EQYhp+Ec405z6U8TfWhuGiOzC4DuYrrNpeni9i1Miuh WjtwM4Duw3VAYG5o7cmZgFL7OgSp4CRwEICybT+e19Ziqz7Wl4NsCrl6S87veHE0Xu7d nE+9bDvPb7vNe+MfvIOtTGmg5JVf5+obmylx6lUDFdn7g9bs65ZUXRpPCOiHS7/2bePj nuCgKuNKhhpxpt78naN09YtQ2s+LJpOr1jMNrsjpFl5XMN07+ChsIWGltdKBaF2FQ5hE Z4xQ== X-Forwarded-Encrypted: i=1; AJvYcCU9qaSwgBs/UNS1GrCjmvP0YkMrzIzpwG/gXgtzsUHw/AjJ9UuqtC/oWMFpZE7kYASHNtw8t8LT1b1prpnxTbbNUw36@freebsd.org X-Gm-Message-State: AOJu0YytfenOwPjPRlpyxaXly0nPohKHOufQo+X5591Sy35gj1ryb5SZ 5VLyWrc1oWZtFpvkwuhEuc3Kt2v6zWnD1JBrHGaIZPlagnKEHvpVFlus X-Gm-Gg: ATEYQzxb4BovFmrDgoO/g5sacXvS8+S+kHGUUsc2QeaH/VZUhCuj4uaWOk5PsNc1ukV Cd62UtM9o59USSYSuyEJv6YwtYktcm/D/h/jggaG7+yliLh8ZMXpygk9laZcpxQBEySYwPos1+r +YVMRR9bTqcCQIOkQn5HGXF0dzXaoHknVAQxbgA+hfHThbN7Tz1L75ZA58GdpFeSQW1HSig9yQd y7rK3n0wS/ubOPYaF5qwYWxsWDJASgGf/jgTwowo5w3agAHBPjUtgMXstg/YhqT4MhiBvn9/7Wm 3WureIN++z/fSwNy2+tgDXqtBY3fTFZ0hVAQ5txhVeyLpf8sIPqNj9gHe4x/EtcCoN/FM/34n2t A+6hPSYC3a6j3huXY7inyo7tNdpCdXx8MAMHC3l7FIdYzS7l8MNzKr2yU/yD5/KxHh1QeT5uZ/9 KF00sqpG1db4rGhDJsMyIwjeEkY30YnXQt2/2D8ZhgX3f4N044oDBB X-Received: by 2002:a05:6a20:c6c1:b0:35d:d477:a7e6 with SMTP id adf61e73a8af0-395c3a0c9acmr1595592637.13.1772163983110; Thu, 26 Feb 2026 19:46:23 -0800 (PST) Received: from smtpclient.apple ([185.153.179.83]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c70fa82cf71sm3192208a12.26.2026.02.26.19.46.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Feb 2026 19:46:22 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_8A8090E3-199B-4755-A595-B278A317342D"; protocol="application/pgp-signature"; micalg=pgp-sha256 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81.1.3\)) Subject: Re: git: 454212b9718b - main - sctp: fix so_proto when peeling off a socket From: "Enji Cooper (yaneurabeya)" In-Reply-To: <699ef25d.42e41.7579887f@gitrepo.freebsd.org> Date: Thu, 26 Feb 2026 19:46:09 -0800 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Message-Id: References: <699ef25d.42e41.7579887f@gitrepo.freebsd.org> To: Michael Tuexen X-Mailer: Apple Mail (2.3826.700.81.1.3) X-Spamd-Result: default: False [-5.59 / 15.00]; SIGNED_PGP(-2.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.988]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MV_CASE(0.50)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; RCVD_TLS_LAST(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ARC_NA(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; HAS_ATTACHMENT(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::432:from] X-Rspamd-Queue-Id: 4fMZ4d3YPgz3VdX X-Spamd-Bar: ----- --Apple-Mail=_8A8090E3-199B-4755-A595-B278A317342D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Michael! > On Feb 25, 2026, at 5:00=E2=80=AFAM, Michael Tuexen = wrote: >=20 > The branch main has been updated by tuexen: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D454212b9718b55b43781f81bef252658= e20e0fd3 =E2=80=A6 > @@ -171,7 +173,7 @@ sys_sctp_peeloff(struct thread *td, struct = sctp_peeloff_args *uap) > td->td_retval[0] =3D fd; >=20 > CURVNET_SET(head->so_vnet); > - so =3D sopeeloff(head); > + so =3D sopeeloff(head, &sctp_stream_protosw); This part of the change broke LINT-NOINET because sctp_stream_protosw is = only defined in the INET case. I didn=E2=80=99t dig into the SCTP = syscalls too far, but I think that the right protocol needs to be picked = per the address family, right? Thanks! -Enji= --Apple-Mail=_8A8090E3-199B-4755-A595-B278A317342D Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEkHfexGRJ3gYRdA2gGpE5DjPsNJgFAmmhE4EACgkQGpE5DjPs NJiDNxAAk7DpomOwPWW6ag5cb5943La5OLtCEX+BNUiOgDf1mw6Ysxl3W310V6rH eKQdS3cPgjlQkgeMib+Epxbl3lPmVyVoPLBJKsG+k0iBqhPp3bnRhZ9h7hue7xPc HubfQ2qIePJG/q0lthxMH7352zFT0C8GqtRTjAEOELQnmdV2FIYI+19mFF3mnfCh kVF3AGa8KADuQxPGCpGHlm1CCe4u8qxZLdYQLwemknxAXvwaOVq7AGiZnBGO8EdU yibvNqaCZkd0QdBW5h96zCXUaI4eKo5QPnsUnDIvsC1K/QnpA0LRSly26D7NixeF EB9hG+w0heGG2Al00/vICRVFI/FG7kohJ2sf++p0SvcO/T7ROppEr8A/zdvulzDq QVy5FLG/a5xLW9iTcEepf8wEyaMMarvSfUiA1//e48eFjw4VqCihbF3ozqQfcHZX UJnf7U1TU+N3RPSZTl0ZDeJ3B2RWTklcyfb4l9pmbgiDVgSz210A3mfafGCjwrsv 1OzCwaq62sC8Sx9WBuUIkQDyISLm43lpKAQHGx/odmvXRrf6IVz+ykyv0YYN7hbV aoMC+br29TkOCKLjvaDO55cSc0E2OJs5LzVFOSJ0RFujNwJb3u1bznMVC01KrG+L pKFFEqpn3tU/Xh4u8BnGrWU28DiehLlSA6MInnhQodbhxka5BJY= =haaJ -----END PGP SIGNATURE----- --Apple-Mail=_8A8090E3-199B-4755-A595-B278A317342D-- From nobody Fri Feb 27 04:50:25 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMbVb2DTlz6TRvs for ; Fri, 27 Feb 2026 04:50:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMbVb0LPWz3bPQ for ; Fri, 27 Feb 2026 04:50:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772167831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NpsS+YghLQh44yxvQ0AuJWpuQ5KtdW2GGKRh6rJODAw=; b=VDh9BHNY/oR7nbyrim7df6oG5A/pvNv9dCT/KPf2yUAZpuUTQobuRm3P/pGdq5NBvLzwUd epMuhKTHZ+vz6vNWeh3o6LDpCpGPFdSsj5/M/JsRbuGaBtbfKHnMJqa590TIy5LyA8w3b4 uQ6NZpU9y6D6rOg2BnuGYXLlcMM8Sec+o8eDvGlxlWJoJX5XcJ4tT+kQU+z9f+tJF69GSO +0G9K+Rk+9vxm/qNHp9kCx2HDxgqZrAwcJHMFl62hmIXNyHk5ETlPO0T2LPew1jo7jbkdt 0jeVTigF16TqUyYjp/B8cAwmhHeK/xEiaNPaQP5RYwJX+4pZbP7zd2Z302NBMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772167831; a=rsa-sha256; cv=none; b=dNZ36tkx+mAm0bHtvVvkN8S5mEpwHuSXtqBc/wq3LnzNJOmYN86szREUoqSXsUQUfXvxFH jevPnDwreOPud00CrpDoOen8rvzOSVWE+jfI1hVeDmsKMhjTVkXA1t0vQzImk7kUZ3v48N AwnnFLhl/rf2tsSRMFWHkKZW44ciUk0qdk08GuHJlQ/ZJO8DeBP9nNdtC3AuJKAjs0VHTX W2QRdKrxq4saHXsaoQ9U1WAOmk11Lsd9r8MKd2AXSUBA12SwgcLVvInH0b4o9DBSftsHZg 7Ugo7u8blWtaew/IKhmcE2j663XAtNyunXAA0GIhuiq4DH9x22rhNeHcYhi+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=1772167831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NpsS+YghLQh44yxvQ0AuJWpuQ5KtdW2GGKRh6rJODAw=; b=tv+Ec4BSaLIYAhOKDILV6vzkT93tcQUqadTMAU+JyVSmUaRGWD8AbqzTtgqhcrf8G5CKwh 1+H3WwbPNCXwwRtp9CaoGKSwdC6uxPUGClErDIIZGyoDDFeZasrHpGu5wIjVuBFBdvYXHh IJtVqPlN7P91sJbfcjkSaVvAJKw77Bi7c5EIeTx7iiqJjjuXvHqtN6t/bKMGUDXfBbcDqj LXquKvjhs3TUJ/9iqtJGoJ2hd/drDJljg1kf3XOjxSsxsScpeFC7/IoPaLmq9UAsRARXwa 6WiTVklss3KyoRtv1u260jGjwBJ75M2JfSEdrrukQ3M2oOpqES/Z3041VIfD/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 4fMbVZ73kSz13GW for ; Fri, 27 Feb 2026 04:50:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39386 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 04:50:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: bd758ebac327 - main - divert: unbreak the LINT-NOIP build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bd758ebac3272f720c051570e043e4bc653dcd48 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 04:50:25 +0000 Message-Id: <69a12291.39386.6f086258@gitrepo.freebsd.org> The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=bd758ebac3272f720c051570e043e4bc653dcd48 commit bd758ebac3272f720c051570e043e4bc653dcd48 Author: Enji Cooper AuthorDate: 2026-02-26 23:06:36 +0000 Commit: Enji Cooper CommitDate: 2026-02-27 04:50:05 +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 --- 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 2b85bd4a50bb..39bc9de6ec9f 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 Fri Feb 27 07:11:39 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMfdW2PBJz6Tksh; Fri, 27 Feb 2026 07:11:43 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMfdV5kHwz3ny9; Fri, 27 Feb 2026 07:11:42 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772176302; h=from:from:reply-to:subject:subject: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=rkLaJ7yMollD/mtdApJhzuTky9/ZW5wCH3hir0Ctg5Q=; b=s4mvKkooOLpxW2IARMNvkfbrzUq4OMYOf4+Fky/cO9SdCTHzYeDB79Br67LQ4lxzNKWHzF Cr+s85NdKg8DHY0LTKDc2efnPiyOhmzsqIp1cV/kZKn0QooV3yAcI2WtyJVmgMGw2AO9K6 K+0LnuhM2zcqE0brKnqO+BR5bn2DUi3Z6L7P7wB2kaX/mdw2JviWdzSqNfZDkbFuW8+AG5 EsnkLEbsLrrfXbyxiM1whiAxcwnxT9v22Uj2AXFEBQDpM5GFBx0uitl7ZDaYeujRCyI6QA NR8yZGJLvp8ycbvgOD5QwYjBJBEL5u0y18lFtVWqb1sV9/XGBSUW1w1G01EzCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772176302; a=rsa-sha256; cv=none; b=tUo78I6HR8qxfFptnhiDL2Hj6U4cPP2iSURDYIegcWbSkrSaSNZ8U+iBaNABCbPs8Fv7oO 75Oxn7jwGWNZhc8xqJj9ME67dghY0FqC+voiSYNk/i8iEwdcK2H+2ztFAvn1k64SdfeOvY I6gNO+rKw8mjnQ2iP/xdhzDqGpOuDoEAW8Q+jFbUqTzGqCKLMAn6UzuhXGURYC2J5O0BLM d7xLncbym4QfwT4oM66tPy/0fKlF86sajZCjlaFThea4VJ+4y4VyjXFQh9hP6utWVzS9cj kQenI6vg5hnP4IiOukmAjsIwdUnFRdg+IRdz0xAXFLZ3gX4qMsB6cDtJJQQYTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772176302; h=from:from:reply-to:subject:subject: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=rkLaJ7yMollD/mtdApJhzuTky9/ZW5wCH3hir0Ctg5Q=; b=tLIMUd7UT2CbOVlq8yB2QkzN7Fkbrub/93swy66dY1cFIwXU3XcoBRI26xpPIALvE4GC2p H9LmyrjeL43kA2GZJtgedknOOgmpfAT3ihIfIvczG/NTYDMsvfrUQTqletG/ArO+9tTBzn AAXqlcKD0HPFPqwrrGFDE13pUV0+14q3dR/9SRojpWxMWX1hYBJXpV6kk2+PcbW5j+qp49 YCTkhKBBsCxq6AoqUvUOMhfbazvZY/k2qHOlY95eT51zu9qGQQNu1Y41xKj/fwzdTvK0vu eZSqhZjz/DQvrZBagkwgKaAgW+T3NmeFAo8lgU0wnPbtmhwhsR0otoqOQJ/N/g== Received: from smtpclient.apple (unknown [IPv6:2a02:8109:1101:be00:3cd2:796a:add9:aa81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: tuexen) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fMfdV0RzMz1JY; Fri, 27 Feb 2026 07:11:41 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.400.21\)) Subject: Re: git: 454212b9718b - main - sctp: fix so_proto when peeling off a socket From: Michael Tuexen In-Reply-To: Date: Fri, 27 Feb 2026 08:11:39 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <699ef25d.42e41.7579887f@gitrepo.freebsd.org> To: "Enji Cooper (yaneurabeya)" X-Mailer: Apple Mail (2.3864.400.21) > On 27. Feb 2026, at 04:46, Enji Cooper (yaneurabeya) = wrote: >=20 > Hi Michael! >=20 >> On Feb 25, 2026, at 5:00=E2=80=AFAM, Michael Tuexen = wrote: >>=20 >> The branch main has been updated by tuexen: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D454212b9718b55b43781f81bef252658= e20e0fd3 >=20 > =E2=80=A6 >=20 >> @@ -171,7 +173,7 @@ sys_sctp_peeloff(struct thread *td, struct = sctp_peeloff_args *uap) >> td->td_retval[0] =3D fd; >>=20 >> CURVNET_SET(head->so_vnet); >> - so =3D sopeeloff(head); >> + so =3D sopeeloff(head, &sctp_stream_protosw); >=20 >=20 > This part of the change broke LINT-NOINET because sctp_stream_protosw = is only defined in the INET case. I didn=E2=80=99t dig into the SCTP = syscalls too far, but I think that the right protocol needs to be picked = per the address family, right? Correct. Let me fix that. Thanks for reporting! Best regards Michael > Thanks! > -Enji From nobody Fri Feb 27 07:41:43 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMgJ818ggz6Tnwq for ; Fri, 27 Feb 2026 07:41:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMgJ750Wjz3snM for ; Fri, 27 Feb 2026 07:41:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772178103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RAXTbJt980PohUt1fEKe+AHY2WQTL4IefzWoT4KS1D4=; b=Kd7vb3+P+gyOC3mxlsxEMAD9yQLpAtCprXTzi6+XBJkispkOkLzMDVW9wvZSX8yLs2mVml Z2hOSFrlPDGzbcTmCTbVyWNHMK00TGZD7z2aQsujRLN7HKcWBacyvWk2bfmuvJR4jpcLxs EgwJ24N/gqOSMbENTZpAOZMx9Udq3hOSBVqfNors+Zv1DRR6RNCA8nDCxtWmPV2oxAlqxL 98bvlaoj/wf33rnMsl7lGZShu4WbEMDgy1w5x2L3wHs7aipkIX0idIP9UPBIy4PB0z4Dka JQdwDuvhyri+COpgfrgXXgrBJUPUQGd6jJOnbca/TWZ1Ysr8Rs79mn60a4bJXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772178103; a=rsa-sha256; cv=none; b=QeKyJtheVraQxWbopsPESq0Sy40tG3yyejFzx776E+9YyrWi6Cikkxgni82Zobn08CrEFm X34EMQOrIAZbnLEg7lCiprO5U+pxXrL5bm1HMgyFkum+N3feNF4PAnEe5nGbD95ouBgmuK 9WddFfnYi1gQXfu4mc3B9FJL2mdX3ddOQNlawqAP0D+DEiWYYnOkoKr+SUgaTA9CNtg7Kt kdx3rrx7ry5WIunKFmvCDtzuVU+8U4ZTZKL52PC1+N3ADdZOTHZhGGO2A+OpsDGkVoyvs4 Fp6SagM0stv8ZWC7JbCOPaVkZFDHovOfkKZSpczDReucUv77rY1qtzg+29EI7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772178103; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RAXTbJt980PohUt1fEKe+AHY2WQTL4IefzWoT4KS1D4=; b=JXTgXJEX1S2Gm8Gc60IZ7ntn7TeXU2lzmaFzyWPIjMTP8bgy1v68WVWMCkYx5DWw1bICbn pJqtso/X/havia1OE+skhvdPL4H+MAAVlwX+mIkj3u9D6IxOjgA/ThGQXXlpcTS3b15qgm X7sSjo1g4Gjjw4t3ER57svTCln+zSF8Uglowj6BktsMF+mmng7PW2iZzx+154vydZY8FVT 54Y6YT/8iSXMcy1kjQL8lIUMCyBpDQSC2fJJpSIxHNOewTBXWFgdzcfhG0cxxJslGzuB9I UoMTbBtrqlLgfv+CGSITebNhaQNxylrK0ctu/CtuDrBNVjHK61yrmFrHvHcHIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMgJ73mMgz16wv for ; Fri, 27 Feb 2026 07:41:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1972b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 07:41:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau =?utf-8?Q?Monn=C3=A9?= Subject: git: db16856110cb - main - xen/acpi: implement hook to notify Xen about entering sleep state List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: db16856110cbdbdfdc3c8d44edae1b3a7463198e Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 07:41:43 +0000 Message-Id: <69a14ab7.1972b.1bbdd8ef@gitrepo.freebsd.org> The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=db16856110cbdbdfdc3c8d44edae1b3a7463198e commit db16856110cbdbdfdc3c8d44edae1b3a7463198e Author: Roger Pau Monné AuthorDate: 2026-02-24 20:23:08 +0000 Commit: Roger Pau Monné CommitDate: 2026-02-27 07:39:11 +0000 xen/acpi: implement hook to notify Xen about entering sleep state This is required so that ACPI power-off (entering S5) works as expected, as the ACPI PM1a and PM1b blocks might not be accessible by dom0 directly. Additionally, Xen also needs to do cleanup before entering a sleep state, so it needs to be notified about it. With this patch FreeBSD dom0 now powers off the host correctly: acpi0: Powering system off... (XEN) [ 85.686598] arch/x86/hvm/emulate.c:415:d0v0 fixup p2m mapping for page fedc6 added (XEN) [ 85.687606] arch/x86/hvm/emulate.c:415:d0v0 fixup p2m mapping for page fbc10 added (XEN) [ 85.692357] Preparing system for ACPI S5 state. (XEN) [ 85.692702] Disabling non-boot CPUs ... (XEN) [ 85.694471] Broke affinity for IRQ9, new: {0-7} [...] (XEN) [ 85.903118] Entering ACPI S5 state. Should be a non-functional change when not running as a Xen dom0. Reviewed by: kib Sponsored by: Citrix Systems R&D MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D55504 --- sys/conf/files | 1 + sys/dev/acpica/Osd/OsdHardware.c | 13 +++++++ sys/dev/acpica/acpivar.h | 13 +++++++ sys/dev/xen/acpi/xen-acpi.c | 75 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 102 insertions(+) diff --git a/sys/conf/files b/sys/conf/files index 4913efebf00d..632fddef2cb5 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3578,6 +3578,7 @@ dev/xdma/xdma_mbuf.c optional xdma dev/xdma/xdma_queue.c optional xdma dev/xdma/xdma_sg.c optional xdma dev/xdma/xdma_sglist.c optional xdma +dev/xen/acpi/xen-acpi.c optional xenhvm dev/xen/balloon/balloon.c optional xenhvm dev/xen/blkfront/blkfront.c optional xenhvm dev/xen/blkback/blkback.c optional xenhvm diff --git a/sys/dev/acpica/Osd/OsdHardware.c b/sys/dev/acpica/Osd/OsdHardware.c index fbaf76d2a91a..4252cbc63222 100644 --- a/sys/dev/acpica/Osd/OsdHardware.c +++ b/sys/dev/acpica/Osd/OsdHardware.c @@ -37,6 +37,8 @@ extern int acpi_susp_bounce; +int (*acpi_prepare_sleep)(uint8_t state, uint32_t a, uint32_t b, bool ext); + ACPI_STATUS AcpiOsEnterSleep(UINT8 SleepState, UINT32 RegaValue, UINT32 RegbValue) { @@ -45,6 +47,17 @@ AcpiOsEnterSleep(UINT8 SleepState, UINT32 RegaValue, UINT32 RegbValue) if (acpi_susp_bounce) return (AE_CTRL_TERMINATE); + if (acpi_prepare_sleep != NULL) + { + int ret = acpi_prepare_sleep(SleepState, RegaValue, RegbValue, + ACPI_REDUCED_HARDWARE ? true : AcpiGbl_ReducedHardware); + + if (ret < 0) + return (AE_ERROR); + if (ret > 0) + return (AE_CTRL_TERMINATE); + } + return (AE_OK); } diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index aa8d5bd0971f..b86c6c1aa3c6 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -610,6 +610,19 @@ int acpi_pxm_parse(device_t dev); int acpi_map_pxm_to_vm_domainid(int pxm); bus_get_cpus_t acpi_get_cpus; +/* + * Hook for ACPI sleep routine. + */ +extern int (*acpi_prepare_sleep)(uint8_t state, uint32_t a, uint32_t b, + bool ext); + +static inline void +acpi_set_prepare_sleep( + int (*hook)(uint8_t state, uint32_t a, uint32_t b, bool ext)) +{ + acpi_prepare_sleep = hook; +} + #ifdef __aarch64__ /* * ARM specific ACPI interfaces, relating to IORT table. diff --git a/sys/dev/xen/acpi/xen-acpi.c b/sys/dev/xen/acpi/xen-acpi.c new file mode 100644 index 000000000000..1e46883e2c86 --- /dev/null +++ b/sys/dev/xen/acpi/xen-acpi.c @@ -0,0 +1,75 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2026 Citrix Systems R&D + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include "opt_acpi.h" +#include +#include +#include +#include + +#include + +#include +#include + +#include + +#include + +static int prepare_sleep_state(uint8_t state, uint32_t a, uint32_t b, bool ext) +{ + struct xen_platform_op op = { + .cmd = XENPF_enter_acpi_sleep, + .interface_version = XENPF_INTERFACE_VERSION, + .u.enter_acpi_sleep.val_a = a, + .u.enter_acpi_sleep.val_b = b, + .u.enter_acpi_sleep.sleep_state = state, + .u.enter_acpi_sleep.flags = + ext ? XENPF_ACPI_SLEEP_EXTENDED : 0, + }; + int error; + + error = HYPERVISOR_platform_op(&op); + if (error) + printf("Xen notify ACPI sleep failed - " + "State %#x A %#x B %#x: %d\n", state, a, b, error); + + return (error ? error : 1); +} + +static int init_xen_acpi_sleep(void *arg) +{ + if (!xen_initial_domain()) + return (0); + + acpi_set_prepare_sleep(&prepare_sleep_state); + return (0); +} + +SYSINIT(xen_sleep, SI_SUB_CONFIGURE, SI_ORDER_ANY, init_xen_acpi_sleep, NULL); From nobody Fri Feb 27 07:56:34 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMgdG3XSNz6Tqk1 for ; Fri, 27 Feb 2026 07:56:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMgdG1453z3vmp for ; Fri, 27 Feb 2026 07:56:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772178994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u2qR766iZo713PEfkQnX6cWnGzFTiwHsyxKeS/epWDc=; b=RLdXLRi40JJCrUGE7iLaRh4cUE2SDUdafQSZwrX+PBiKiyfOpWv/zL7s+GzbaQCtzwaoql V88+Nt3BLBWPfP25biSlyehgc6rUwYkCJafO3qjqe6g56UUjbHrTJwEZCFPzTmfD3QwVjl rchCcBd7R+WQIcckb7Ln2qJxrKIw2XXtWH+xGuFoTDs/t1V3/B7EX17ZwlSig06qAa4JHP dr8OFnU3kBgq9bPbwoG/N3Elinu317FLnc5yTqs6F4NtB/NlBLRAUtN+gbQaoMXB2kTOom XxFWeQJpQLvY0lxihEIZSrJbFktJ4LAVHpJvQ+d1UZyfXuKrduAuohbTtvAD5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772178994; a=rsa-sha256; cv=none; b=q0Pcp+RPh9W6JapyXHZhWOUHvtUdAgfXvxSXSL9YZVOlcfEy90pDn+LArdEucUT2cBRgWK IAMf9e4PFIwH8VIDuVEnnZ1V8KqrVGUDeBIwrPbhyNahQlP94uhVT3Au0mUTw9eiwB2hVK rlw0Yp5fXADe0pjOtSTkpefa2eEfmQeS1e9xa4VhyHJtaCTb1TXmcyK+m4DnzAM8Cur1Yx k2m5qlzFdXdhIVnZei9FtknJtaf1y6wTys5YB5UWCF+FHUZcwJcZJv1p5C+WVlqt0Y10SW v4q/UhX5X4sdjIHmMiQt2wGmZwF8X+ko6GCRGU5FNBYzHNcTIBkMNkuhNVDEdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772178994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u2qR766iZo713PEfkQnX6cWnGzFTiwHsyxKeS/epWDc=; b=u+B//JuKIDIdtoKlS0513k+5IqN+5eXhbc1VwPoZNuyZmLdMWopRz6pvWT4LP3NPhu8Vlb NPV+K83tUysSrVtbeAmR/xxYEVZ5Wf4KOeofUwgtuHSslhKCXNjTMmPcxbM+drWXO2BE4l UxqxCqRRLzNrbm4HNSaDMtddStGXq9n59MbMYMBRXvrrY8ok5qk35hPrPFXAHF4a6I0wDN 5frMeIUs2/FsoEhEXxNGQr7Ckyt0He1qBfyI4ZNzMV2j9bVcOFh3NS19XOawbwK5RapOIf Zn+AsR87wNkkesXv1PuKI4+8wfqDgr5ONWs2/7djUzFEKAYKI10t5Derd9W0uw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMgdG0GnFz17WB for ; Fri, 27 Feb 2026 07:56:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 19f22 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 07:56:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 6bd97e9e01ff - main - sctp: fix NOINET build List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6bd97e9e01ff159eef49b2521fdbe67d5db10d95 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 07:56:34 +0000 Message-Id: <69a14e32.19f22.11b1a73c@gitrepo.freebsd.org> The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=6bd97e9e01ff159eef49b2521fdbe67d5db10d95 commit 6bd97e9e01ff159eef49b2521fdbe67d5db10d95 Author: Michael Tuexen AuthorDate: 2026-02-27 07:51:29 +0000 Commit: Michael Tuexen CommitDate: 2026-02-27 07:56:01 +0000 sctp: fix NOINET build Reported by: ngie Fixes: 454212b9718b ("sctp: fix so_proto when peeling off a socket") MFC after: 3 days --- sys/netinet/sctp_syscalls.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/sys/netinet/sctp_syscalls.c b/sys/netinet/sctp_syscalls.c index 01f241d29637..4837925fdfd7 100644 --- a/sys/netinet/sctp_syscalls.c +++ b/sys/netinet/sctp_syscalls.c @@ -29,6 +29,8 @@ */ #include "opt_capsicum.h" +#include "opt_inet.h" +#include "opt_inet6.h" #include "opt_sctp.h" #include "opt_ktrace.h" @@ -77,6 +79,9 @@ #include #include #include +#ifdef INET6 +#include +#endif #include #include @@ -173,7 +178,21 @@ sys_sctp_peeloff(struct thread *td, struct sctp_peeloff_args *uap) td->td_retval[0] = fd; CURVNET_SET(head->so_vnet); - so = sopeeloff(head, &sctp_stream_protosw); + switch (head->so_proto->pr_domain->dom_family) { +#ifdef INET + case AF_INET: + so = sopeeloff(head, &sctp_stream_protosw); + break; +#endif +#ifdef INET6 + case AF_INET6: + so = sopeeloff(head, &sctp6_stream_protosw); + break; +#endif + default: + error = EOPNOTSUPP; + goto noconnection; + } if (so == NULL) { error = ENOMEM; goto noconnection; From nobody Fri Feb 27 07:57:48 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMgfl1lnHz6TqdV; Fri, 27 Feb 2026 07:57:51 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMgfl19yjz3w5L; Fri, 27 Feb 2026 07:57:51 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772179071; h=from:from:reply-to:subject:subject: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=dH+N9p2UJ+1xipaIBUgcLwMCrCj8TdjNIcZ8lHEdp0A=; b=KR7M5pDhvMZNkXIKWbWxWTw/FZuOha28z/nGvdaax1D54GTNAZ1lEt7eqFI3mnULijthrU ygJK9mZKpQX1ei2sCkIzmDtrs1R/QetemvZQZGS7+Xb0/1Nh3qAajFWjZ/Zd5riwo+EmCk njsW/OdIUKWjx8TZZ9y4i9xqGVsExTdaK8+UqvZTG25n6FydqYB577zmmxmvnMYNi1MyxR 1UViCtcpvGq8vHlElDEClB+ayQtUYwuxJWKRDfwA2hzR2GfvCo4lCg8meDU5fA2FoXkfAZ 6ROJaL1EbJ+aeCV1Ai924OpMRc+pFOX1y7043I2XJMrwqNegVOAcR4jO07puyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772179071; a=rsa-sha256; cv=none; b=ixJrmN16l0c1zEzxJ4oO81cc3WfoXY3nKr/ApsZeyAzJ8xzxlatBsRUbMOPR3+2GimUjbL iS9EI+kNrQEdL8t2/YszU8gv+nuJpv2tKGmTbDToUoGVe8OQR8dFa+B5WXo6dlUXi9DHA3 RJ+SgMvPe6R+oinECxSwlXRGCT+7IMNlAp7fn4/Oxee9E8+2tIgZoG3BQpM0T8N4dDXgkL WkA7wBXe6FFV+09yRv97R/p/zXecUrgVl6xSOf5v+J0jSe6UFCF1pR/G0XCTivYuBUhkwv voVx0ErikCSecknI/vIhc6j0dFVseNrL4UBOymOUhZtt0j2T4DbDYF3Xbnm04Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772179071; h=from:from:reply-to:subject:subject: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=dH+N9p2UJ+1xipaIBUgcLwMCrCj8TdjNIcZ8lHEdp0A=; b=xjL+et7z2v765OC1JPNuqpkpl0sGjyoBL83oD1/863rJ0vOwbKOMWtYfMd8mV0r+e/Yakm OwnQvOx6huqdJHSPN960gLxoF9L6Rc0JVPrYi+cBFWBsLDi6eIaCcmK3W49aUxWVqQFgqK JCFpCh+ZwnI4WpEr8oOwBwAU7Xd9m7vUzBDf3TdEctTI3Mcvn4iQ60zdXB5cFDz6GUFsMg 9mahge9CO0ZBGhb0buoPBMKXY3yZD3IwvjGXXEtyE9M7q6/IQyPscY3UyQSXfQ4kv0BvVs /sHs275eEgS6vWzOXRGkg//fJZgm8vVFmJxtYP1DTHqdCGzCxS4cZo8H16hKqw== Received: from smtpclient.apple (unknown [IPv6:2a02:8109:1101:be00:3cd2:796a:add9:aa81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: tuexen) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fMgfk3K6rz3Tj; Fri, 27 Feb 2026 07:57:50 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.400.21\)) Subject: Re: git: 454212b9718b - main - sctp: fix so_proto when peeling off a socket From: Michael Tuexen In-Reply-To: Date: Fri, 27 Feb 2026 08:57:48 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <320FFBF5-040E-4EA7-A960-8DC3A632744B@FreeBSD.org> References: <699ef25d.42e41.7579887f@gitrepo.freebsd.org> To: "Enji Cooper (yaneurabeya)" X-Mailer: Apple Mail (2.3864.400.21) > On 27. Feb 2026, at 04:46, Enji Cooper (yaneurabeya) = wrote: >=20 > Hi Michael! >=20 >> On Feb 25, 2026, at 5:00=E2=80=AFAM, Michael Tuexen = wrote: >>=20 >> The branch main has been updated by tuexen: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D454212b9718b55b43781f81bef252658= e20e0fd3 >=20 > =E2=80=A6 >=20 >> @@ -171,7 +173,7 @@ sys_sctp_peeloff(struct thread *td, struct = sctp_peeloff_args *uap) >> td->td_retval[0] =3D fd; >>=20 >> CURVNET_SET(head->so_vnet); >> - so =3D sopeeloff(head); >> + so =3D sopeeloff(head, &sctp_stream_protosw); >=20 >=20 > This part of the change broke LINT-NOINET because sctp_stream_protosw = is only defined in the INET case. I didn=E2=80=99t dig into the SCTP = syscalls too far, but I think that the right protocol needs to be picked = per the address family, right? Fixed in = https://cgit.FreeBSD.org/src/commit/?id=3D6bd97e9e01ff159eef49b2521fdbe67d= 5db10d95 = Thanks again for reporting and sorry for breaking the build. Best regards Michael > Thanks! > -Enji From nobody Fri Feb 27 08:07:52 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMgtP2rPWz6TrWm for ; Fri, 27 Feb 2026 08: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMgtP1lZ5z3wwl for ; Fri, 27 Feb 2026 08: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=1772179677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+wmCrmr/t1D76wTbZx6Znc5Y3K1+ejkLno3MAhH6bJo=; b=WrmLGe+up0+jPUrmhDCytLr1koKar7o0p/3P33owkL/X9cSXaowZh5xput7ysHGEchGJRv JcL5xnahFCbLZUHDXHVrSiqyBnTzW+5/eMDFdk1X4/D5DMG0GLbj0iclooa4Ul+m3Mv+7j 3L76/4IHvlAvdxWeYqMWcrjPh4Hp/imk5ts93JJkPZTbu/BgyryrZsA8iXjv3jKw9+y4iU LsTZemF2aDT9riafwMs6FpDHMSf4NbfrBSpEB478hacFkaXmE9VE4AHfh+SmW8fWd/2szE HZESc1TMkSYQMzS1+sKP/uGiUfQL7Al8UapTgcipb4vPGh4e/Jvx4trDgHYj7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772179677; a=rsa-sha256; cv=none; b=QEG+v8quTFTf0f0cccKYg3SaA5aHxzg+ouLnVXPT3fOkhJIYhynDOFJsw++bzV6PyF6lNu Z1g8teNMQhUj1TkECsWGokc88nss9PhUGJD/oL53sJ5ykeZs0FjUl/7eaJNh7jCkVvpcnV gH2qeG0pYvWKtuEulKULvCnWmWg2Rqz37sfErgVXp8wiXJX5SRMu+XeibkWqBYjs45mAix 1XsT6x3ZOUdzPg3NGCSCHZgPK1EMGe0XzI82H81X7Cbln2rWowh1S17h3KUv1AHGYojZh4 RCzExmlfCCJvZguadQZmqqrCPK95csAXNWOYJXSWSrmoyRH5W9ccEqI/zHsOHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772179677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+wmCrmr/t1D76wTbZx6Znc5Y3K1+ejkLno3MAhH6bJo=; b=DjNZ+eVh2JlcZIBGalbls3F1h/Ga4bKRjpz+NeagU/JiIay5AHl5Zm0LW6GIQlCgqz9Wgi z/Wln5h++9xy5HuhJwyDGdm3tXJVSN5MBsGiDQqqztpL7PsemzKH5dljpSWZVYtszlJxQ7 jfWI87jFSX9HdDm37kclErIOShdHKPMWEVTHWulg5ionDGeMan7MCIvmMbzGTbhUjMpD5k E3B9tJ2BRex16oAWXJtWp9NeLZkPXQnEkRizD3H0cl98tuHuBy6THqqt9eUGrUU7Pb+BVo hoJC/78VVg1/jCYS8IeWVb3p1k1/CiUQLEX40Vrpak17lscbCl9UKEsF7jU+Sg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMgtP1CcVz18Gg for ; Fri, 27 Feb 2026 08:07:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1cc26 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 08:07:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: c3577fcf3fd0 - main - dpaa2: improve error messages and log requested cluster size List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c3577fcf3fd0494cc992021d4debbca09241a49e Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 08:07:52 +0000 Message-Id: <69a150d8.1cc26.47aab394@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c3577fcf3fd0494cc992021d4debbca09241a49e commit c3577fcf3fd0494cc992021d4debbca09241a49e Author: Bjoern A. Zeeb AuthorDate: 2025-08-20 21:04:49 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-02-27 08:07:26 +0000 dpaa2: improve error messages and log requested cluster size If m_getjcl() fails we want to know the size we requested in order to have a chance to evaluate the problem better. MFC after: 3 days Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D55555 --- sys/dev/dpaa2/dpaa2_buf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/dpaa2/dpaa2_buf.c b/sys/dev/dpaa2/dpaa2_buf.c index 7739eda5d8de..8505b074fe4f 100644 --- a/sys/dev/dpaa2/dpaa2_buf.c +++ b/sys/dev/dpaa2/dpaa2_buf.c @@ -154,7 +154,8 @@ dpaa2_buf_seed_rxb(device_t dev, struct dpaa2_buf *buf, int size, if (__predict_true(buf->m == NULL)) { buf->m = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, size); if (__predict_false(buf->m == NULL)) { - device_printf(dev, "%s: m_getjcl() failed\n", __func__); + device_printf(dev, "%s: m_getjcl(%d) failed\n", + __func__, size); error = ENOMEM; goto fail_mbuf_alloc; } From nobody Fri Feb 27 10:05:54 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMkVV4RLWz6SbpB for ; Fri, 27 Feb 2026 10:05:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMkVV3TmLz4C9k for ; Fri, 27 Feb 2026 10:05:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772186754; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zrlpELvVU8gkHoEKj8QJ6SAmV9INrbczCiQ22eUWbQg=; b=FqaVotN+UrDcZqCfH7foA86sJI8f3mqHQ2dChFlToaD9NMMrluACcKfZ/i2/t+TXrTmAJ1 8rPJDoVz5GGA3ECTxce8wnV2pwbnAX+dB/XurcnfE6z9+ttXF4+F74w5OOYrYDEIzR+IqA QpS55qrObCv8Bwu4FlArLUXTssRjSZwAh15Nv44K2rWOdQHwMaNesnwklUlkKidpAc1oy7 dA2OxuOqzWhQzUnwfAWJfT7AD8Oy6oMowpGdkCL0t5tU8PanAqCXR3T6luvsekQcbem0Yj oD+9h4vxGt/2OSQPRWRByo0/qsWSy4/MgL6+iC8ghk+CKvDft8aDg0towFl8Bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772186754; a=rsa-sha256; cv=none; b=v6kI/hbMexQj0+u/WI6E6dtmmm1V5BClo+WRmbxY40GbItq98+eeXdRsyPyCc1ODrII5YB 6eRp4WvwiKm7UqW3q6hULGu5qYUJnt5ZqpjBTfVlT4kTNDP2E1u3f1sneEKTCv/xAmPSkC 5460JfmKmkGUtk2/c7VmVbVzO0Z+MBYM3lvZu/66mZf8oT48iUbCfD+VaySJDSfYHDYTHu eC+23/lEjXMptAaG7Yyf7vy4mb+0FMwahcEPCh4Xjf3nLX0DXIpGcT+fUaU1rluRqh56tN vHf3dXNyHFzxkzKd85lgIHKYw8qTJjp0d1k16tIiEFz52X0LDIImENQe/1OHgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772186754; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zrlpELvVU8gkHoEKj8QJ6SAmV9INrbczCiQ22eUWbQg=; b=bauBBuImZlQ3SLkiPSA11zWtYh9ZckRq3NfJbUNWFXh0mQNNoN436ADCcbTsnlKTKDz8xg ODRu68/lQ+e96YVriP8rSgmpr2e5k7ZZNHcPOA9NJRgctG8e6K6a6evtqyWEG9IkY2BiVY E57aS2uvknifzPff8SxpyJJgd7909U0kIzJ/PECpI5lEAWWoVR9PAhmGPbxCBmZIN12+dF HBwJQafboamQrgboAPssS6j4hywphWvbIIvN2nw2MCKyrUT4sdLUiATwGtUBL4buQl5DoW yQRzo0swpzW4WU3nfzzdCUJo8RuHXhwDvGTg3unF+qW+0xyYglMvclvAkQDc8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMkVV2lvSz1C1h for ; Fri, 27 Feb 2026 10:05:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 304a1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 10:05:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: David Marker From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: d3f3314359a0 - stable/15 - ngctl.8: fix incorrect synopsis List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d3f3314359a0ee9bf7b2520c45bee5968a6bce62 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 10:05:54 +0000 Message-Id: <69a16c82.304a1.4ccf7359@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d3f3314359a0ee9bf7b2520c45bee5968a6bce62 commit d3f3314359a0ee9bf7b2520c45bee5968a6bce62 Author: David Marker AuthorDate: 2026-02-24 14:27:52 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-27 10:05:26 +0000 ngctl.8: fix incorrect synopsis Tiny manpage bug I caused in D50241 I left a line in the manpage that shouldn't be there. MFC after: 3 days Fixes: 72d01e62b082 ("netgraph: teach ngctl to attach and run itself in a jail") Reviewed by: des, markj Differential Revision: https://reviews.freebsd.org/D55485 (cherry picked from commit 9ed56cd8d6929e3ee733e1e61d2e0c6b81122983) --- usr.sbin/ngctl/ngctl.8 | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.sbin/ngctl/ngctl.8 b/usr.sbin/ngctl/ngctl.8 index 63b8f58ed3df..2fb22fd59646 100644 --- a/usr.sbin/ngctl/ngctl.8 +++ b/usr.sbin/ngctl/ngctl.8 @@ -44,7 +44,6 @@ .Op Fl f Ar filename .Op Fl n Ar nodename .Op Ar command Op Ns Ar argument ... -.Op Ar command ... .Sh DESCRIPTION The .Nm From nobody Fri Feb 27 10:05:53 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMkVZ4sXxz6Sbv8 for ; Fri, 27 Feb 2026 10:05:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMkVZ3tR3z4Cbh for ; Fri, 27 Feb 2026 10:05:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772186758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nSXKT1O6tJ5r10WmV4o5FEHn8NM9mzThjMupWg6T59I=; b=OhJDc3NIwrUCz2QXOcf6c49fXjetgGeuWpqwfkD6YK5wShW2x4lzeDqKPHMwq5A2xtQ4af 6rL+VYMYh6/HvH9jJ31LW+vl9XGV0iFuj3GxQi9Jap6lEYN45jKPunc3xOOSSmM8aor26d iaxpW8zZ+JMHLQfDviYe5KmZBUT8Jgs8wXMjHiwfaHKiLUvgEi+d2zP/rA5+OHcUEtauIa 83re/3WutdYvkXM1TND4jjfPRjP197aHbGSYrKf20zbVin4WaUuQGvwC0mjbsVoRneMX9e Fc6T88pktoFW90h3CkExF+PIHNevgmdTeTjILJdsx5YILjqI/Ett8hzTWz1wNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772186758; a=rsa-sha256; cv=none; b=iTxuvBp42j/fmcj75VSt2g/1Q1cN0hY739dJejzK2xTecxXlp+M13JD41sHtPc/1Rw5Ymw fRh1cWF+nDCctwu6t1Z+K1M5Xy/rKwN4tVeYb416fLsFj7GXXe33qWxGH8W/sBCxT/4eis XHWrlqWNEqE72waoJYaWmORLgNLKmItZPhRBntj00aKEutAqiwHoeQogKUqkOsq3s0gvHc ORIgXokZfkE7IytBOPXMRylg0e/64Zzt2UGflNSPVVvEq6fYonRKyG8tT36h1HSUWwtGgs v5l2DdP/U/wOnPI/k+9CBAShxyBPxJKkXd3kgCgDaPZ99MolT4a3dgKbif44yw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772186758; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nSXKT1O6tJ5r10WmV4o5FEHn8NM9mzThjMupWg6T59I=; b=OALxxdUbbGW8S8UgD2+2ExRQC2wD2gaG8mfeNY4IHwIJTdFnauxqqGhz14loeyyQxFKu8B Kc+JGVi/06ONoeEju5iTizsmCOjUTfexE1Q+m0SFsG0jrwhxJt7/V8hINxh+H6znTdylu+ I0F+tjTUTPqrhkCDBQViR/9GTgBt2jEpP7s7kNW17jd7yS8Q2TgIj7iw+nq0NrZp452SEA q3wHeA+ac2Pf3WslfWbotDqPVFvI/BFJU8+WGChqd3zmcjAMacwG3STD3m8GwB+jfLKwi7 egSLNfz7yJJ3PHG/3oq9RkhNloSBai7datDvneMZQGFfyDQxJmghKii71DzVyA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMkVZ3LQ2z1BQs for ; Fri, 27 Feb 2026 10:05:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30858 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 10:05:53 +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: d851e0070499 - stable/15 - ngctl: Fix getline loop List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d851e0070499b8b34f3cf1efb956aefa6faf6859 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 10:05:53 +0000 Message-Id: <69a16c81.30858.65dde7ed@gitrepo.freebsd.org> The branch stable/15 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d851e0070499b8b34f3cf1efb956aefa6faf6859 commit d851e0070499b8b34f3cf1efb956aefa6faf6859 Author: Dag-Erling Smørgrav AuthorDate: 2026-02-24 14:23:39 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-27 10:05:26 +0000 ngctl: Fix getline loop I misremembered when I wrote this code: getline() returns -1 on EOF, not zero, so the loop condition and the error check are both incorrect (though in practice getline() will never return 0). MFC after: 3 days Fixes: 3cbdcabf714d ("ngctl: Modernize code somewhat") Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D55487 (cherry picked from commit 6c4777c59325c2cfefcce0c466b3bf475404a550) --- usr.sbin/ngctl/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/ngctl/main.c b/usr.sbin/ngctl/main.c index b58de1e042b3..2b711fd4155a 100644 --- a/usr.sbin/ngctl/main.c +++ b/usr.sbin/ngctl/main.c @@ -243,7 +243,7 @@ ReadFile(FILE *fp) unsigned int lineno = 0; int rtn = CMDRTN_OK; - while ((len = getline(&line, &sz, fp)) > 0) { + while ((len = getline(&line, &sz, fp)) >= 0) { lineno++; if (*line == '#') continue; @@ -252,7 +252,7 @@ ReadFile(FILE *fp) break; } } - if (len < 0) + if (ferror(fp)) rtn = CMDRTN_ERROR; free(line); return (rtn); From nobody Fri Feb 27 12:05:37 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMn8f1bKnz6Srvg for ; Fri, 27 Feb 2026 12:05:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMn8d5fjQz3D7T for ; Fri, 27 Feb 2026 12:05:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772193937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hr0gtEPehHdBGO4ycEtblxTYyDKLOrUjMb+Q+Z2FCGc=; b=L5xIxkldjhSqOQtSjBsFfUluzszUxURuEc0C0vDCwDAmUoDY/+W6q0QHxxtScE//Akr1jT dKflgebE4FWx4GDLsMd8+tvl8i1B2i2riq+lEqqNc/T1tRC9Ilo0IFOD+xK/aeyKw9joTK QCtese1su4aCKg/361Hm4REI63WFZ5dV8uRsIWcEC4VVGQWDpfBW5DnmgiOiQTaWvBo6r6 oa8t3AozrGpmvnf/RucQcl3PfxHtoI50bauTA/h/MW8DTtPpmB6BB20ecggAGg7GcAzc5r 7PzrSW4dLRbDmmUPNZ8uv6BpEK3OwD9o4YrOMSYOFaw1te0L4Zn8GdBY/LUBRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772193937; a=rsa-sha256; cv=none; b=lJOLWQfFieDznqiJSwYbmxlbdynZiO2WBA3JSBTLj2Fiwb09TyQmNGq97s7rz10lZPwj9b pzjg4ynglvC7wQLqRkohWOrs06agRjANeirmqO9dUoaLKayg/DECbwHGOcB98d5NMnDmrz UAkZyaFTY+ce4R6FebHmOSvxqynIIACXemgqhh3rGydRy/xYAeuq/KWKTm1oX7myp8spFD i9od1LUtBf5+O1axfRLbOkcua/bnTwAPa5mjcE9iMex4kbwRBjQw82qtln6fAbUS43/XhF 6ItFJ5X+zwghbrGyyzyy+Y8sY9cPY7Tm5ChAcJ2jxb5MqbPtxLRX19B3UUMg+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=1772193937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hr0gtEPehHdBGO4ycEtblxTYyDKLOrUjMb+Q+Z2FCGc=; b=hHx5XPDXqbfgHU/indlUxWNbz8H2Lh6f9TgATljL/pz2ZgywcEnoLLc3xGx4AjjUsyF9q3 rkDAYJBfSP0exOtCUk18qDXSfAoeyJP4+kL+RBJkwgnbXDV8v4k5uIW4WwJR6zLA8HyXE6 slqhPSvvMM8b9UhasYD9RPU4vwD3vmmcPqmLrTTeRpYXAbm6aS04aujcCDIyhwxq/RDvak OrA/ZJPrUFI9LORVl99er4tB3ST/MYg395RvOnRe2vWEuUbLOhe4C59BdCa4Iwc9/E80sH YHJjLtoWF6m8nbdhx6dEutsS4RwkMdnvWbW5hCAXff6i8fXrXRuU/lntk0NcKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMn8d51Nkz1yY for ; Fri, 27 Feb 2026 12:05:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3eb00 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 12:05:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Sreekanth Reddy From: Sumit Saxena Subject: git: b7c72909b4c4 - stable/15 - bnxt_re: Fix active_speed value when two ports are aggregated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ssaxena X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b7c72909b4c4f261ec4971764357c3d4b699727f Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 12:05:37 +0000 Message-Id: <69a18891.3eb00.7a92c287@gitrepo.freebsd.org> The branch stable/15 has been updated by ssaxena: URL: https://cgit.FreeBSD.org/src/commit/?id=b7c72909b4c4f261ec4971764357c3d4b699727f commit b7c72909b4c4f261ec4971764357c3d4b699727f Author: Sreekanth Reddy AuthorDate: 2026-01-23 16:36:02 +0000 Commit: Sumit Saxena CommitDate: 2026-02-27 12:04:38 +0000 bnxt_re: Fix active_speed value when two ports are aggregated Currently driver is not considering the active_lanes while displaying the speed & width of port and hence it showing invalid active_speed and active_width values in the ibv_devinfo command output when two ports are aggregated at hardware level. Fixed the driver to consider the active_lanes while determining the active_speed & active_width values. Reviewed by: ssaxena Differential Revision: https://reviews.freebsd.org/D54523 MFC after: 3 days (cherry picked from commit b7d6334df61a559e98191f90fd5e611e0d077def) --- sys/dev/bnxt/bnxt_en/bnxt.h | 2 + sys/dev/bnxt/bnxt_en/bnxt_hwrm.c | 8 ++- sys/dev/bnxt/bnxt_en/bnxt_ulp.h | 1 + sys/dev/bnxt/bnxt_en/if_bnxt.c | 4 +- sys/dev/bnxt/bnxt_re/bnxt_re.h | 1 + sys/dev/bnxt/bnxt_re/ib_verbs.c | 104 +++++++++++++++++++++++++++++---------- sys/dev/bnxt/bnxt_re/ib_verbs.h | 12 +++++ sys/dev/bnxt/bnxt_re/main.c | 1 + 8 files changed, 103 insertions(+), 30 deletions(-) diff --git a/sys/dev/bnxt/bnxt_en/bnxt.h b/sys/dev/bnxt/bnxt_en/bnxt.h index dc2ea1fdc09e..5556914fb61e 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt.h +++ b/sys/dev/bnxt/bnxt_en/bnxt.h @@ -455,6 +455,7 @@ struct bnxt_link_info { uint16_t req_link_speed; uint8_t module_status; struct hwrm_port_phy_qcfg_output phy_qcfg_resp; + uint8_t active_lanes; }; enum bnxt_phy_type { @@ -1269,6 +1270,7 @@ struct bnxt_softc { #define BNXT_PHY_FL_NO_PAUSE (HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS2_PAUSE_UNSUPPORTED << 8) #define BNXT_PHY_FL_NO_PFC (HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS2_PFC_UNSUPPORTED << 8) #define BNXT_PHY_FL_BANK_SEL (HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS2_BANK_ADDR_SUPPORTED << 8) +#define BNXT_PHY_FL_SPEEDS2 (HWRM_PORT_PHY_QCAPS_OUTPUT_FLAGS2_SPEEDS2_SUPPORTED << 8) struct bnxt_aux_dev *aux_dev; struct net_device *net_dev; struct mtx en_ops_lock; diff --git a/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c b/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c index e540cc74578d..2a79b418fe62 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c +++ b/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c @@ -2917,10 +2917,14 @@ bnxt_hwrm_port_phy_qcfg(struct bnxt_softc *softc) } link_info->duplex_setting = resp->duplex_cfg; - if (link_info->phy_link_status == HWRM_PORT_PHY_QCFG_OUTPUT_LINK_LINK) + if (link_info->phy_link_status == HWRM_PORT_PHY_QCFG_OUTPUT_LINK_LINK) { link_info->link_speed = le16toh(resp->link_speed); - else + if (softc->phy_flags & BNXT_PHY_FL_SPEEDS2) + link_info->active_lanes = resp->active_lanes; + } else { link_info->link_speed = 0; + link_info->active_lanes = 0; + } link_info->force_link_speed = le16toh(resp->force_link_speed); link_info->auto_link_speeds = le16toh(resp->auto_link_speed); link_info->support_speeds = le16toh(resp->support_speeds); diff --git a/sys/dev/bnxt/bnxt_en/bnxt_ulp.h b/sys/dev/bnxt/bnxt_en/bnxt_ulp.h index 04c3f558fd20..7d7ecbd2f536 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_ulp.h +++ b/sys/dev/bnxt/bnxt_en/bnxt_ulp.h @@ -126,6 +126,7 @@ struct bnxt_en_dev { struct bnxt_dbr *en_dbr; struct bnxt_bar_info hwrm_bar; u32 espeed; + uint8_t lanes; }; struct bnxt_en_ops { diff --git a/sys/dev/bnxt/bnxt_en/if_bnxt.c b/sys/dev/bnxt/bnxt_en/if_bnxt.c index af6a4c7b01c1..94775457b7e3 100644 --- a/sys/dev/bnxt/bnxt_en/if_bnxt.c +++ b/sys/dev/bnxt/bnxt_en/if_bnxt.c @@ -4794,9 +4794,11 @@ bnxt_report_link(struct bnxt_softc *softc) const char *duplex = NULL, *flow_ctrl = NULL; const char *signal_mode = ""; - if(softc->edev) + if(softc->edev) { softc->edev->espeed = bnxt_fw_to_ethtool_speed(link_info->link_speed); + softc->edev->lanes = link_info->active_lanes; + } if (link_info->link_up == link_info->last_link_up) { if (!link_info->link_up) diff --git a/sys/dev/bnxt/bnxt_re/bnxt_re.h b/sys/dev/bnxt/bnxt_re/bnxt_re.h index fe7a27f4e216..c0bc11e490b2 100644 --- a/sys/dev/bnxt/bnxt_re/bnxt_re.h +++ b/sys/dev/bnxt/bnxt_re/bnxt_re.h @@ -535,6 +535,7 @@ struct bnxt_re_dev { bool is_virtfn; u32 num_vfs; u32 espeed; + u8 lanes; /* * For storing the speed of slave interfaces. * Same as espeed when bond is not configured diff --git a/sys/dev/bnxt/bnxt_re/ib_verbs.c b/sys/dev/bnxt/bnxt_re/ib_verbs.c index dba0f348c414..37b77c5af909 100644 --- a/sys/dev/bnxt/bnxt_re/ib_verbs.c +++ b/sys/dev/bnxt/bnxt_re/ib_verbs.c @@ -241,50 +241,99 @@ int bnxt_re_modify_device(struct ib_device *ibdev, return 0; } -static void __to_ib_speed_width(u32 espeed, u8 *speed, u8 *width) +static void __to_ib_speed_width(u32 espeed, u8 lanes, u8 *speed, u8 *width) { - switch (espeed) { - case SPEED_1000: - *speed = IB_SPEED_SDR; + if (!lanes) { + switch (espeed) { + case SPEED_1000: + *speed = IB_SPEED_SDR; + *width = IB_WIDTH_1X; + break; + case SPEED_10000: + *speed = IB_SPEED_QDR; + *width = IB_WIDTH_1X; + break; + case SPEED_20000: + *speed = IB_SPEED_DDR; + *width = IB_WIDTH_4X; + break; + case SPEED_25000: + *speed = IB_SPEED_EDR; + *width = IB_WIDTH_1X; + break; + case SPEED_40000: + *speed = IB_SPEED_QDR; + *width = IB_WIDTH_4X; + break; + case SPEED_50000: + *speed = IB_SPEED_EDR; + *width = IB_WIDTH_2X; + break; + case SPEED_100000: + *speed = IB_SPEED_EDR; + *width = IB_WIDTH_4X; + break; + case SPEED_200000: + *speed = IB_SPEED_HDR; + *width = IB_WIDTH_4X; + break; + case SPEED_400000: + *speed = IB_SPEED_NDR; + *width = IB_WIDTH_4X; + break; + default: + *speed = IB_SPEED_SDR; + *width = IB_WIDTH_1X; + break; + } + return; + } + + switch (lanes) { + case 1: *width = IB_WIDTH_1X; break; - case SPEED_10000: - *speed = IB_SPEED_QDR; - *width = IB_WIDTH_1X; + case 2: + *width = IB_WIDTH_2X; break; - case SPEED_20000: - *speed = IB_SPEED_DDR; + case 4: *width = IB_WIDTH_4X; break; - case SPEED_25000: - *speed = IB_SPEED_EDR; + case 8: + *width = IB_WIDTH_8X; + break; + case 12: + *width = IB_WIDTH_12X; + break; + default: *width = IB_WIDTH_1X; + } + + switch (espeed / lanes) { + case SPEED_2500: + *speed = IB_SPEED_SDR; break; - case SPEED_40000: - *speed = IB_SPEED_QDR; - *width = IB_WIDTH_4X; + case SPEED_5000: + *speed = IB_SPEED_DDR; break; - case SPEED_50000: - *speed = IB_SPEED_EDR; - *width = IB_WIDTH_2X; + case SPEED_10000: + *speed = IB_SPEED_FDR10; break; - case SPEED_100000: + case SPEED_14000: + *speed = IB_SPEED_FDR; + break; + case SPEED_25000: *speed = IB_SPEED_EDR; - *width = IB_WIDTH_4X; break; - case SPEED_200000: + case SPEED_50000: *speed = IB_SPEED_HDR; - *width = IB_WIDTH_4X; break; - case SPEED_400000: + case SPEED_100000: *speed = IB_SPEED_NDR; - *width = IB_WIDTH_4X; break; default: *speed = IB_SPEED_SDR; - *width = IB_WIDTH_1X; - break; - } + } } /* Port */ @@ -322,9 +371,10 @@ int bnxt_re_query_port(struct ib_device *ibdev, u8 port_num, port_attr->subnet_timeout = 0; port_attr->init_type_reply = 0; rdev->espeed = rdev->en_dev->espeed; + rdev->lanes = rdev->en_dev->lanes; if (test_bit(BNXT_RE_FLAG_IBDEV_REGISTERED, &rdev->flags)) - __to_ib_speed_width(rdev->espeed, &active_speed, + __to_ib_speed_width(rdev->espeed, rdev->lanes, &active_speed, &active_width); port_attr->active_speed = active_speed; diff --git a/sys/dev/bnxt/bnxt_re/ib_verbs.h b/sys/dev/bnxt/bnxt_re/ib_verbs.h index e8c840f8946a..f3b7f44c828d 100644 --- a/sys/dev/bnxt/bnxt_re/ib_verbs.h +++ b/sys/dev/bnxt/bnxt_re/ib_verbs.h @@ -49,10 +49,22 @@ struct bnxt_re_dev; #define SPEED_1000 1000 #endif +#ifndef SPEED_2500 +#define SPEED_2500 2500 +#endif + +#ifndef SPEED_5000 +#define SPEED_5000 5000 +#endif + #ifndef SPEED_10000 #define SPEED_10000 10000 #endif +#ifndef SPEED_14000 +#define SPEED_14000 14000 +#endif + #ifndef SPEED_20000 #define SPEED_20000 20000 #endif diff --git a/sys/dev/bnxt/bnxt_re/main.c b/sys/dev/bnxt/bnxt_re/main.c index 0e0cc32218bd..eb21c770ca5f 100644 --- a/sys/dev/bnxt/bnxt_re/main.c +++ b/sys/dev/bnxt/bnxt_re/main.c @@ -3818,6 +3818,7 @@ static int bnxt_re_dev_reg(struct bnxt_re_dev **rdev, struct ifnet *netdev, void bnxt_re_get_link_speed(struct bnxt_re_dev *rdev) { rdev->espeed = rdev->en_dev->espeed; + rdev->lanes = rdev->en_dev->lanes; return; } From nobody Fri Feb 27 12:05:36 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMn8c68W4z6Srrv for ; Fri, 27 Feb 2026 12:05:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMn8c4pfvz3DQx for ; Fri, 27 Feb 2026 12:05:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772193936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AVkcW2TUIJEWZo1aPbXkAnJXWcUK9Tlyf+EzwsNC+Ok=; b=GuR4h4nYr2iGXUGPM+BiuuiKJPY/itTuUr1NPIE8/BG0Uhci1axqFMFzLaoTRxgLO1iO1J vlCQ8N5oWG3i6YETf+iK2+wDouiBYMgOHvKnyFplvYg04uY4yhRhXomuUJphj53Sw9TveN FcziDEZEQAgDbxNy1wFnUMxog77D6yEqj9uDV+Mz+SY9XilK3Id+TLdX/oQVoiLBg5eE20 nKxzxfuydKQTiIfJgFTFbkXI1d//HoI5JatkTV8C7lJ33DUfxb2nsKaTdgJPX/li8BvoQc 2Uz3cA5CFYoZUKTrcl+2Zy58jJ8ggvvLsQ1wjv68s9uzNU25mhyKbjlRkqmoZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772193936; a=rsa-sha256; cv=none; b=ijiCYR+uCWhHGFF9glOdUvSOdJWkwbqVi32siDnUyak7E57sqnOCCss4QhlHSi7lUiRA8s rrWRY17D4BG+XyrxyDAbPF2AYlQPmmtizoPVTXF/lknnh49uwFRdTV8sEsV/P6QdIpa7L8 6HqiaYaBELGUqcRgaZEP7hb9XTHvjPwQWI+TOR5GRDkCm14nMsd5GWVhc3zcvZuSltM+51 GtX7Ps98B0lpqKMvVQzT8PD7yGl6yviTyuO8AI1PLORaXJ+AISNpXSx7HQPQlJD+q6T+Pg aVxh97Ns2F/9W/Ro249G5tYB+Ki23ACy6f7uzp9JY7dwo8vHFyUUDxBPJqPyIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772193936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AVkcW2TUIJEWZo1aPbXkAnJXWcUK9Tlyf+EzwsNC+Ok=; b=dNF++ON7Zhxn40CoCV0e1FiSjCmRsDmKgqWwumIxHq7I3qWF/PTkFWMEhG2RCY4hIluJLl UYCSYd83lCaArr9qrrzwWdOAcGesyW7jPRBWWYK6crirKwcL2t1BL+yVbwbfdLIgw+KWkY VHqQlAkPQBk3t3rfGRauGc6FVyLtBT39FC0WDQqhTBrvr5BJaIUNdEMYiek5im12mH/8Ms x3LtLeUVAmi7d08maaVHZVRufY1hNbqH1znyir6CQUq/EKuVYa7FGfC7DNr34d235n7Ca7 auJGWYp3eVgKkRPmpUFmWZ5cnixHcRefmi7goAeZsrpLr3v0GaLZJmY0+a2dGw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMn8c45Yhz2Lr for ; Fri, 27 Feb 2026 12:05: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); Fri, 27 Feb 2026 12:05:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Sreekanth Reddy From: Sumit Saxena Subject: git: 39d9a9c111ec - stable/15 - bnxt_en/re: Use FW defined resource limit for RoCE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ssaxena X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 39d9a9c111ec5e4cfbfdfc2d8848114a73279cd5 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 12:05:36 +0000 Message-Id: <69a18890.3d459.4d5487c5@gitrepo.freebsd.org> The branch stable/15 has been updated by ssaxena: URL: https://cgit.FreeBSD.org/src/commit/?id=39d9a9c111ec5e4cfbfdfc2d8848114a73279cd5 commit 39d9a9c111ec5e4cfbfdfc2d8848114a73279cd5 Author: Sreekanth Reddy AuthorDate: 2026-01-23 16:32:51 +0000 Commit: Sumit Saxena CommitDate: 2026-02-27 12:04:38 +0000 bnxt_en/re: Use FW defined resource limit for RoCE Check FW flags for status of Resource Limits. If bit FUNC_QCAPS_RESP_FLAGS_EXT2_SW_MAX_RESOURCE_LIMITS_SUPPORTED is set, that means FW set the resource limit for L2 and RoCE. We'll then do the following: L2 driver would allocate context memory based on what FW reported. RoCE driver uses FW reported values without capping. These values are the total FW reported value minus L2 and other components shares. For example: FW reported max_qps = 137217 in L2 query, this includes: 5120 for L2 1025 for QP1 131072 for RoCE L2 will allocate backing store memory for the total. In RoCE query, we'll get max_qp = 131072 and use it without further capping. Reviewed by: ssaxena Differential Revision: https://reviews.freebsd.org/D54522 MFC after: 3 days (cherry picked from commit 913e454f306124c83797bfa71681dcdf806532c6) --- sys/dev/bnxt/bnxt_en/bnxt.h | 4 ++++ sys/dev/bnxt/bnxt_en/bnxt_hwrm.c | 3 +++ sys/dev/bnxt/bnxt_en/bnxt_ulp.c | 2 ++ sys/dev/bnxt/bnxt_en/bnxt_ulp.h | 2 ++ sys/dev/bnxt/bnxt_en/if_bnxt.c | 9 +++++++-- sys/dev/bnxt/bnxt_re/qplib_res.h | 7 +++++++ sys/dev/bnxt/bnxt_re/qplib_sp.c | 31 +++++++++++++++++-------------- 7 files changed, 42 insertions(+), 16 deletions(-) diff --git a/sys/dev/bnxt/bnxt_en/bnxt.h b/sys/dev/bnxt/bnxt_en/bnxt.h index 78e98eb23beb..dc2ea1fdc09e 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt.h +++ b/sys/dev/bnxt/bnxt_en/bnxt.h @@ -1250,6 +1250,10 @@ struct bnxt_softc { #define BNXT_FW_CAP_CFA_NTUPLE_RX_EXT_IP_PROTO BIT_ULL(47) #define BNXT_FW_CAP_ENABLE_RDMA_SRIOV BIT_ULL(48) #define BNXT_FW_CAP_RSS_TCAM BIT_ULL(49) + + #define BNXT_FW_CAP_SW_MAX_RESOURCE_LIMITS BIT_ULL(61) + #define BNXT_SW_RES_LMT(bp) ((bp)->fw_cap & BNXT_FW_CAP_SW_MAX_RESOURCE_LIMITS) + uint32_t lpi_tmr_lo; uint32_t lpi_tmr_hi; /* copied from flags and flags2 in hwrm_port_phy_qcaps_output */ diff --git a/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c b/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c index 3e5dc0bf4b6d..e540cc74578d 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c +++ b/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c @@ -1218,6 +1218,9 @@ bnxt_hwrm_func_qcaps(struct bnxt_softc *softc) flags_ext & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT_DBR_PACING_SUPPORTED) softc->fw_cap |= BNXT_FW_CAP_DBR_PACING_SUPPORTED; + if (flags_ext2 & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_SW_MAX_RESOURCE_LIMITS_SUPPORTED) + softc->fw_cap |= BNXT_FW_CAP_SW_MAX_RESOURCE_LIMITS; + if (flags_ext2 & HWRM_FUNC_QCAPS_OUTPUT_FLAGS_EXT2_GENERIC_STATS_SUPPORTED) softc->fw_cap |= BNXT_FW_CAP_GENERIC_STATS; func->fw_fid = le16toh(resp->fid); diff --git a/sys/dev/bnxt/bnxt_en/bnxt_ulp.c b/sys/dev/bnxt/bnxt_en/bnxt_ulp.c index 9950858f0eef..677c9c99b74e 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_ulp.c +++ b/sys/dev/bnxt/bnxt_en/bnxt_ulp.c @@ -458,6 +458,8 @@ static inline void bnxt_set_edev_info(struct bnxt_en_dev *edev, struct bnxt_soft edev->flags |= BNXT_EN_FLAG_ROCEV2_CAP; if (bp->is_asym_q) edev->flags |= BNXT_EN_FLAG_ASYM_Q; + if (BNXT_SW_RES_LMT(bp)) + edev->flags |= BNXT_EN_FLAG_SW_RES_LMT; edev->hwrm_bar = bp->hwrm_bar; edev->port_partition_type = bp->port_partition_type; edev->ulp_version = BNXT_ULP_VERSION; diff --git a/sys/dev/bnxt/bnxt_en/bnxt_ulp.h b/sys/dev/bnxt/bnxt_en/bnxt_ulp.h index bbf16304456a..04c3f558fd20 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_ulp.h +++ b/sys/dev/bnxt/bnxt_en/bnxt_ulp.h @@ -90,8 +90,10 @@ struct bnxt_en_dev { #define BNXT_EN_FLAG_ULP_STOPPED 0x8 #define BNXT_EN_FLAG_ASYM_Q 0x10 #define BNXT_EN_FLAG_MULTI_HOST 0x20 + #define BNXT_EN_FLAG_SW_RES_LMT 0x400 #define BNXT_EN_ASYM_Q(edev) ((edev)->flags & BNXT_EN_FLAG_ASYM_Q) #define BNXT_EN_MH(edev) ((edev)->flags & BNXT_EN_FLAG_MULTI_HOST) +#define BNXT_EN_SW_RES_LMT(edev) ((edev)->flags & BNXT_EN_FLAG_SW_RES_LMT) const struct bnxt_en_ops *en_ops; struct bnxt_ulp ulp_tbl[BNXT_MAX_ULP]; int l2_db_offset; /* Doorbell BAR offset diff --git a/sys/dev/bnxt/bnxt_en/if_bnxt.c b/sys/dev/bnxt/bnxt_en/if_bnxt.c index a34bd1a7e511..af6a4c7b01c1 100644 --- a/sys/dev/bnxt/bnxt_en/if_bnxt.c +++ b/sys/dev/bnxt/bnxt_en/if_bnxt.c @@ -1198,8 +1198,13 @@ static int bnxt_alloc_ctx_mem(struct bnxt_softc *softc) max_srqs = ctxm->max_entries; if (softc->flags & BNXT_FLAG_ROCE_CAP) { pg_lvl = 2; - extra_qps = min_t(u32, 65536, max_qps - l2_qps - qp1_qps); - extra_srqs = min_t(u32, 8192, max_srqs - srqs); + if (BNXT_SW_RES_LMT(softc)) { + extra_qps = max_qps - l2_qps - qp1_qps; + extra_srqs = max_srqs - srqs; + } else { + extra_qps = min_t(uint32_t, 65536, max_qps - l2_qps - qp1_qps); + extra_srqs = min_t(uint32_t, 8192, max_srqs - srqs); + } } ctxm = &ctx->ctx_arr[BNXT_CTX_QP]; diff --git a/sys/dev/bnxt/bnxt_re/qplib_res.h b/sys/dev/bnxt/bnxt_re/qplib_res.h index 914694ee3b8c..59a8a43ecef6 100644 --- a/sys/dev/bnxt/bnxt_re/qplib_res.h +++ b/sys/dev/bnxt/bnxt_re/qplib_res.h @@ -843,4 +843,11 @@ static inline void bnxt_qplib_max_res_supported(struct bnxt_qplib_chip_ctx *cctx break; } } + +static inline u32 bnxt_re_cap_fw_res(u32 fw_val, u32 drv_cap, bool sw_max_en) +{ + if (sw_max_en) + return fw_val; + return min_t(u32, fw_val, drv_cap); +} #endif diff --git a/sys/dev/bnxt/bnxt_re/qplib_sp.c b/sys/dev/bnxt/bnxt_re/qplib_sp.c index 31a0878e421b..8c382c7a645a 100644 --- a/sys/dev/bnxt/bnxt_re/qplib_sp.c +++ b/sys/dev/bnxt/bnxt_re/qplib_sp.c @@ -40,6 +40,7 @@ #include "qplib_res.h" #include "qplib_rcfw.h" #include "qplib_sp.h" +#include "bnxt_ulp.h" const struct bnxt_qplib_gid bnxt_qplib_gid_zero = {{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }}; @@ -79,6 +80,7 @@ static void bnxt_qplib_query_version(struct bnxt_qplib_rcfw *rcfw, char *fw_ver) int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw) { + struct bnxt_qplib_max_res dev_res = {}; struct creq_query_func_resp resp = {}; struct bnxt_qplib_cmdqmsg msg = {}; struct creq_query_func_resp_sb *sb; @@ -86,10 +88,10 @@ int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw) struct bnxt_qplib_dev_attr *attr; struct bnxt_qplib_chip_ctx *cctx; struct cmdq_query_func req = {}; + bool sw_max_en; u8 *tqm_alloc; int i, rc = 0; u32 temp; - u8 chip_gen = BNXT_RE_DEFAULT; cctx = rcfw->res->cctx; attr = rcfw->res->dattr; @@ -110,10 +112,11 @@ int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw) rc = bnxt_qplib_rcfw_send_message(rcfw, &msg); if (rc) goto bail; + bnxt_qplib_max_res_supported(cctx, rcfw->res, &dev_res, false); + sw_max_en = BNXT_EN_SW_RES_LMT(rcfw->res->en_dev); /* Extract the context from the side buffer */ - chip_gen = _get_chip_gen_p5_type(cctx); - attr->max_qp = le32_to_cpu(sb->max_qp); - attr->max_qp = min_t(u32, attr->max_qp, BNXT_RE_MAX_QP_SUPPORTED(chip_gen)); + attr->max_qp = bnxt_re_cap_fw_res(le32_to_cpu(sb->max_qp), + dev_res.max_qp, sw_max_en); /* max_qp value reported by FW does not include the QP1 */ attr->max_qp += 1; attr->max_qp_rd_atom = @@ -142,29 +145,29 @@ int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw) if (_is_chip_gen_p5_p7(cctx) && cctx->modes.wqe_mode == BNXT_QPLIB_WQE_MODE_VARIABLE) attr->max_qp_sges = sb->max_sge_var_wqe; - attr->max_cq = le32_to_cpu(sb->max_cq); - attr->max_cq = min_t(u32, attr->max_cq, BNXT_RE_MAX_CQ_SUPPORTED(chip_gen)); + attr->max_cq = bnxt_re_cap_fw_res(le32_to_cpu(sb->max_cq), + dev_res.max_cq, sw_max_en); attr->max_cq_wqes = le32_to_cpu(sb->max_cqe); attr->max_cq_wqes = min_t(u32, BNXT_QPLIB_MAX_CQ_WQES, attr->max_cq_wqes); attr->max_cq_sges = attr->max_qp_sges; - attr->max_mr = le32_to_cpu(sb->max_mr); - attr->max_mr = min_t(u32, attr->max_mr, BNXT_RE_MAX_MRW_SUPPORTED(chip_gen)); - attr->max_mw = le32_to_cpu(sb->max_mw); - attr->max_mw = min_t(u32, attr->max_mw, BNXT_RE_MAX_MRW_SUPPORTED(chip_gen)); + attr->max_mr = bnxt_re_cap_fw_res(le32_to_cpu(sb->max_mr), + dev_res.max_mr, sw_max_en); + attr->max_mw = bnxt_re_cap_fw_res(le32_to_cpu(sb->max_mw), + dev_res.max_mr, sw_max_en); attr->max_mr_size = le64_to_cpu(sb->max_mr_size); attr->max_pd = BNXT_QPLIB_MAX_PD; attr->max_raw_ethy_qp = le32_to_cpu(sb->max_raw_eth_qp); - attr->max_ah = le32_to_cpu(sb->max_ah); - attr->max_ah = min_t(u32, attr->max_ah, BNXT_RE_MAX_AH_SUPPORTED(chip_gen)); + attr->max_ah = bnxt_re_cap_fw_res(le32_to_cpu(sb->max_ah), + dev_res.max_ah, sw_max_en); attr->max_fmr = le32_to_cpu(sb->max_fmr); attr->max_map_per_fmr = sb->max_map_per_fmr; - attr->max_srq = le16_to_cpu(sb->max_srq); - attr->max_srq = min_t(u32, attr->max_srq, BNXT_RE_MAX_SRQ_SUPPORTED(chip_gen)); + attr->max_srq = bnxt_re_cap_fw_res(le16_to_cpu(sb->max_srq), + dev_res.max_srq, sw_max_en); attr->max_srq_wqes = le32_to_cpu(sb->max_srq_wr) - 1; attr->max_srq_sges = sb->max_srq_sge; attr->max_pkey = 1; From nobody Fri Feb 27 12:05:38 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMn8g1WxJz6Srvk for ; Fri, 27 Feb 2026 12:05:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMn8f6X5Qz3D7V for ; Fri, 27 Feb 2026 12:05:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772193938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xV2ffprkAu4Ufvu+jE7qGzJRMVoR39qFztx/T10oNCI=; b=G+PkVz3ShR6S2mS8Fb4yL06SLmewwoSoMrOqqJsG4KlcwEEG8+X44vvCKdFpGheWYHltdn Z0qTWYjuBYb1JKWyMYz06zVpNCYwDUJp9/afGJdEhzhOuwDHr9WO9iSWLxghAlFecIo6CM yHKT6HiBSK1XPN+4FFqPL0fJp14FoMmuEpzeAdx3V9fPTQr7mMlP5Te0uxegHKlXqECkVe cd+c9KoNcbIdTrXCYUEFlg51xlJvcr4xnNdECJkEx+VdNAzvgo57Sh7Pak0nO24Bf5B5Qn M1LzLwmTkCXoqI3a+lzafyn3egCa2TVvxEFUEG683pJh/b2fwURP7DPzQlOewA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772193938; a=rsa-sha256; cv=none; b=UlycI32Ygr/wMheDuVe4V5F1rYWJV/Dgp0sAyQ2C4k+cBarEHPVQfbt0piRf0+9zuiUs9t 8TL8n9M9ct2GXSA+OxVkWVLRSkm+v6/6tQ0qgSVZJtEHyEB1BsXYW6NG3bMlEvArImL0S6 7WcZeSzwcjyEtsVxV8V8SLSjKIS/ifd5fdvZ8SsVoGyADEsBm0W5Di3Y5qCJXffZcew8+e gOzIBWAwR3GwhPgLyb9YnRJOkA0r+uL6aqb2BJ5XK9xsd9R25lzmEkEYLg6MXRUO2KZ0t3 mCyLeYo26vxPI4aTimQzOX3ET2voNkKkXGg3LKynzj53TC5zLD1iqRYOE446oQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772193938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xV2ffprkAu4Ufvu+jE7qGzJRMVoR39qFztx/T10oNCI=; b=DymiAJN4+anMEd5y1xKkTTBy71fo248PquydBn0UYk74guhkqLMfgKf4phFrwpFAFwKvuB gAtjSRsu/gczIVg4IXBT0u4SxqbqPSbwaD+LexcCpubAyzdeFjMKe6LrvYQgspoEHwQkdc uv+NDBI6wOgOFzKLl+KJyEP1n1VBvrXP1TUZKxw4qbiN5AmcWXiCqEzqdIJH0PxNLpXQGz TWRT9MCsKdzax7FUyp3aELF3Eas9kn9zlhPMO6buH2S8f9DQcW3rvsBqpsv6GV7ZqZ1paC tzcDEX5rHrW995NkK9Q1n3kLWEyJcN+moFIsnNex3vA52eu1bQHCvcgles2vMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMn8f5nWLz2Jm for ; Fri, 27 Feb 2026 12:05:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c153 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 12:05:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Sreekanth Reddy From: Sumit Saxena Subject: git: e68039680868 - stable/15 - bnxt_re: Add support to display board_id in ibv_devinfo output List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ssaxena X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: e68039680868819074734fe8fb90ac27605a5216 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 12:05:38 +0000 Message-Id: <69a18892.3c153.ecce5d9@gitrepo.freebsd.org> The branch stable/15 has been updated by ssaxena: URL: https://cgit.FreeBSD.org/src/commit/?id=e68039680868819074734fe8fb90ac27605a5216 commit e68039680868819074734fe8fb90ac27605a5216 Author: Sreekanth Reddy AuthorDate: 2026-01-23 16:38:02 +0000 Commit: Sumit Saxena CommitDate: 2026-02-27 12:04:38 +0000 bnxt_re: Add support to display board_id in ibv_devinfo output Added support to display board_id in ibv_devinfo output. ibv_devinfo util reads the board_id from below sysctl attribute, so added this sysctl attribute. sys.class.infiniband.bnxt_reX.board_id Reviewed by: ssaxena Differential Revision: https://reviews.freebsd.org/D54524 MFC after: 3 days (cherry picked from commit 3a9565c2a8e4f1b3da698bf6a8af5889dc4fefbd) --- sys/dev/bnxt/bnxt_en/bnxt.h | 1 + sys/dev/bnxt/bnxt_en/bnxt_ulp.c | 1 + sys/dev/bnxt/bnxt_en/bnxt_ulp.h | 2 ++ sys/dev/bnxt/bnxt_en/if_bnxt.c | 7 +++++++ sys/dev/bnxt/bnxt_re/main.c | 21 ++++++++++++++++++++- 5 files changed, 31 insertions(+), 1 deletion(-) diff --git a/sys/dev/bnxt/bnxt_en/bnxt.h b/sys/dev/bnxt/bnxt_en/bnxt.h index 5556914fb61e..64482a656e9d 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt.h +++ b/sys/dev/bnxt/bnxt_en/bnxt.h @@ -1340,6 +1340,7 @@ struct bnxt_softc { unsigned long fw_reset_timestamp; struct bnxt_fw_health *fw_health; + char board_partno[64]; }; struct bnxt_filter_info { diff --git a/sys/dev/bnxt/bnxt_en/bnxt_ulp.c b/sys/dev/bnxt/bnxt_en/bnxt_ulp.c index 677c9c99b74e..c6d862a36a9a 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_ulp.c +++ b/sys/dev/bnxt/bnxt_en/bnxt_ulp.c @@ -463,6 +463,7 @@ static inline void bnxt_set_edev_info(struct bnxt_en_dev *edev, struct bnxt_soft edev->hwrm_bar = bp->hwrm_bar; edev->port_partition_type = bp->port_partition_type; edev->ulp_version = BNXT_ULP_VERSION; + memcpy(edev->board_part_number, bp->board_partno, BNXT_VPD_PN_FLD_LEN - 1); } int bnxt_rdma_aux_device_del(struct bnxt_softc *softc) diff --git a/sys/dev/bnxt/bnxt_en/bnxt_ulp.h b/sys/dev/bnxt/bnxt_en/bnxt_ulp.h index 7d7ecbd2f536..53bb51b07135 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_ulp.h +++ b/sys/dev/bnxt/bnxt_en/bnxt_ulp.h @@ -127,6 +127,8 @@ struct bnxt_en_dev { struct bnxt_bar_info hwrm_bar; u32 espeed; uint8_t lanes; + #define BNXT_VPD_PN_FLD_LEN 32 + char board_part_number[BNXT_VPD_PN_FLD_LEN]; }; struct bnxt_en_ops { diff --git a/sys/dev/bnxt/bnxt_en/if_bnxt.c b/sys/dev/bnxt/bnxt_en/if_bnxt.c index 94775457b7e3..dea6fd68181e 100644 --- a/sys/dev/bnxt/bnxt_en/if_bnxt.c +++ b/sys/dev/bnxt/bnxt_en/if_bnxt.c @@ -2674,6 +2674,13 @@ bnxt_attach_pre(if_ctx_t ctx) softc->state_bv = bit_alloc(BNXT_STATE_MAX, M_DEVBUF, M_WAITOK|M_ZERO); + if (BNXT_PF(softc)) { + const char *part_num; + + if (pci_get_vpd_readonly(softc->dev, "PN", &part_num) == 0) + snprintf(softc->board_partno, sizeof(softc->board_partno), "%s", part_num); + } + return (rc); failed: diff --git a/sys/dev/bnxt/bnxt_re/main.c b/sys/dev/bnxt/bnxt_re/main.c index eb21c770ca5f..dc68854157a0 100644 --- a/sys/dev/bnxt/bnxt_re/main.c +++ b/sys/dev/bnxt/bnxt_re/main.c @@ -2031,11 +2031,30 @@ static ssize_t show_hca(struct device *device, struct device_attribute *attr, return scnprintf(buf, PAGE_SIZE, "%s\n", rdev->ibdev.node_desc); } +static ssize_t show_board_id(struct device *device, struct device_attribute *attr, + char *buf) +{ + struct bnxt_re_dev *rdev = to_bnxt_re_dev(device, ibdev.dev); + char buffer[BNXT_VPD_PN_FLD_LEN] = {}; + + if (!rdev->is_virtfn) + memcpy(buffer, rdev->en_dev->board_part_number, + BNXT_VPD_PN_FLD_LEN - 1); + else + scnprintf(buffer, BNXT_VPD_PN_FLD_LEN, + "0x%x-VF", rdev->en_dev->pdev->device); + + return scnprintf(buf, PAGE_SIZE, "%s\n", buffer); +} + static DEVICE_ATTR(hw_rev, 0444, show_rev, NULL); static DEVICE_ATTR(hca_type, 0444, show_hca, NULL); +static DEVICE_ATTR(board_id, 0444, show_board_id, NULL); + static struct device_attribute *bnxt_re_attributes[] = { &dev_attr_hw_rev, - &dev_attr_hca_type + &dev_attr_hca_type, + &dev_attr_board_id }; int ib_register_device_compat(struct bnxt_re_dev *rdev) From nobody Fri Feb 27 12:05:39 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMn8h1vYTz6Ss9N for ; Fri, 27 Feb 2026 12:05:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMn8h0L73z3DBD for ; Fri, 27 Feb 2026 12:05:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772193940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SMpRrFrdrrEP6ZF/s1d0ctd0xKn9hACxmgmiVxMCqJc=; b=MfJ4ilI32TyWVDWyVlnT/yA9oPvPtir9YMEi1pzYwnm6XFYL20Lq7u38ZoTJp+FA3BhaLY FgA0oTjyNP6frv4UQ+mO6fUb56s/Q3UNuxiSFI7JAzlCUVmNnX2NRArtNvkL+cOVXV3aNr 6zPSzs9+4caRtDv5DpkFa4nk0fraM48l0uq1lgMaOYA58BmYhZff19ZwyXG3szCUGH4kSb S2WTegNJyFNiHNTMUiR0q6WAluT35Z0ZvNMnihaONBAadnry6bBAaNv/IwTlpprvCS0KPP hMbIwr4rID5JZlVKzJmsIK+SzpPykcEN4+2XLMX+H94/fuKEFWXn3Cihrfm93A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772193940; a=rsa-sha256; cv=none; b=RMaiLaQpUmDQpqfsTAOVDHluST8nrQL6WypJn2I4VIeYoqVGwycPgLaq0z4CsMfKxisV0d Lc/EAKVBK8y938vjtF+p45jqnS7VQdM3trdD7MZnH3xS8PKkBEouWz1C5dg834yBVolL67 Q1HthrBNA+VnvpYgercJkj9OHKZqI0s/hpgI2SdudHt3ZRdJbnz+A8UghdLMhvRhnZ6P4r 5/cmPElLYd4gE1mO424j1zUcsrW4Os3s3iSDJXN+lNIqVtBYWsni/jZQUu9fhUfhdKzoe8 i+lhpGsZGSZPSj5uxOQRCDv9WHXzTPYE8KZ8Q7vo7Lkx+8AF0F9yqdATgn7c8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772193940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SMpRrFrdrrEP6ZF/s1d0ctd0xKn9hACxmgmiVxMCqJc=; b=h4hRKmUwTIUBMHKPuRmu3pnPzkcM1GfuSbMy2HkvkgGTVuMywBYc0+zip2C7WqDg60jxN+ 3WBq3lpgl5Ra+H3hGF9bvar+bIa+xX6AY49r/02A/8MZdQZkFAyauMWXfXGcqYBlqc/P2/ QhYqS0oh6vgVjnSlIplXJxL6ofK+4ebcCI7iH/vDVHZ8uAcswvhFN2YiAnBv72HltFPTM+ kSkh2DhnvQLZ0CCWTZ7m5MmGWX5VKqK0EjZ7u42gbXz5W71Ap8KYjAjb0Taa5ty50JlbMQ PVPD+d5Sgu/Qjx+k95W1S6K02+3uQtk2D1sU7pZ76Pvr4qUR0A6FhynHjCxzKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMn8g6lWDz1yc for ; Fri, 27 Feb 2026 12:05:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3eb05 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 12:05:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Sreekanth Reddy From: Sumit Saxena Subject: git: bc9dad93ba5f - stable/15 - bnxt_re/libbnxtre: Add support for Variable WQE on BCM576xx controllers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ssaxena X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: bc9dad93ba5f49508cd809435a46c66a6222798a Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 12:05:39 +0000 Message-Id: <69a18893.3eb05.77033205@gitrepo.freebsd.org> The branch stable/15 has been updated by ssaxena: URL: https://cgit.FreeBSD.org/src/commit/?id=bc9dad93ba5f49508cd809435a46c66a6222798a commit bc9dad93ba5f49508cd809435a46c66a6222798a Author: Sreekanth Reddy AuthorDate: 2026-01-23 16:40:13 +0000 Commit: Sumit Saxena CommitDate: 2026-02-27 12:04:38 +0000 bnxt_re/libbnxtre: Add support for Variable WQE on BCM576xx controllers Variable size WQE means that each send Work Queue Entry to HW can use different WQE sizes as opposed to the static WQE size on the current devices. Set variable WQE mode for BCM576xx devices. Depth of the Queue will be a multiple of slot which is 16 bytes. The number of slots should be a multiple of 256 as per the HW requirement. Initialize the Software shadow queue to hold requests equal to the number of slots. Reviewed by: ssaxena Differential Revision: https://reviews.freebsd.org/D54525 MFC after: 3 days (cherry picked from commit 823f158a01330484f83f69c31d695035c607f8ee) --- contrib/ofed/libbnxtre/abi.h | 10 ++- contrib/ofed/libbnxtre/main.c | 1 + contrib/ofed/libbnxtre/memory.h | 1 + contrib/ofed/libbnxtre/verbs.c | 31 +++++++--- sys/dev/bnxt/bnxt_re/bnxt_re-abi.h | 12 ++-- sys/dev/bnxt/bnxt_re/bnxt_re.h | 11 +++- sys/dev/bnxt/bnxt_re/ib_verbs.c | 123 +++++++++++++++++++++++-------------- sys/dev/bnxt/bnxt_re/ib_verbs.h | 5 ++ sys/dev/bnxt/bnxt_re/main.c | 20 +++--- sys/dev/bnxt/bnxt_re/qplib_fp.c | 74 +++++++++++++++++----- sys/dev/bnxt/bnxt_re/qplib_fp.h | 12 ++++ sys/dev/bnxt/bnxt_re/qplib_sp.c | 16 +++-- sys/dev/bnxt/bnxt_re/qplib_sp.h | 8 +++ 13 files changed, 227 insertions(+), 97 deletions(-) diff --git a/contrib/ofed/libbnxtre/abi.h b/contrib/ofed/libbnxtre/abi.h index e3533c122688..a729c16f4db9 100644 --- a/contrib/ofed/libbnxtre/abi.h +++ b/contrib/ofed/libbnxtre/abi.h @@ -46,7 +46,7 @@ #define __aligned_u64 __attribute__((aligned(8))) u64 -#define BNXT_RE_ABI_VERSION 6 +#define BNXT_RE_ABI_VERSION 7 #define BNXT_RE_MAX_INLINE_SIZE 0x60 #define BNXT_RE_MAX_INLINE_SIZE_VAR_WQE 0x1E0 #define BNXT_RE_MAX_PUSH_SIZE_VAR_WQE 0xD0 @@ -267,12 +267,14 @@ enum { BNXT_RE_COMP_MASK_UCNTX_MQP_EX_SUPPORTED = 0x8, BNXT_RE_COMP_MASK_UCNTX_DBR_PACING_ENABLED = 0x10, BNXT_RE_COMP_MASK_UCNTX_DBR_RECOVERY_ENABLED = 0x20, - BNXT_RE_COMP_MASK_UCNTX_HW_RETX_ENABLED = 0x40 + BNXT_RE_COMP_MASK_UCNTX_HW_RETX_ENABLED = 0x40, + BNXT_RE_COMP_MASK_UCNTX_CMASK_HAVE_MODE = 0x80 }; enum bnxt_re_req_to_drv { BNXT_RE_COMP_MASK_REQ_UCNTX_POW2_SUPPORT = 0x01, - BNXT_RE_COMP_MASK_REQ_UCNTX_RSVD_WQE = 0x02 + BNXT_RE_COMP_MASK_REQ_UCNTX_RSVD_WQE = 0x02, + BNXT_RE_COMP_MASK_REQ_UCNTX_VAR_WQE_SUPPORT = 0x03 }; #define BNXT_RE_WQE_MODES_WQE_MODE_MASK 0x01 @@ -410,6 +412,8 @@ struct bnxt_re_qp_req { __u64 qpsva; __u64 qprva; __u64 qp_handle; + __u64 comp_mask; + __u32 sq_slots; } __attribute__((packed)); struct bnxt_re_qp_resp { diff --git a/contrib/ofed/libbnxtre/main.c b/contrib/ofed/libbnxtre/main.c index 8e1903688a53..ee08f891dd1e 100644 --- a/contrib/ofed/libbnxtre/main.c +++ b/contrib/ofed/libbnxtre/main.c @@ -297,6 +297,7 @@ int bnxt_re_init_context(struct verbs_device *vdev, struct ibv_context *ibvctx, req.comp_mask |= BNXT_RE_COMP_MASK_REQ_UCNTX_POW2_SUPPORT; req.comp_mask |= BNXT_RE_COMP_MASK_REQ_UCNTX_RSVD_WQE; + req.comp_mask |= BNXT_RE_COMP_MASK_REQ_UCNTX_VAR_WQE_SUPPORT; ret = ibv_cmd_get_context(ibvctx, &req.cmd, sizeof(req), &resp.resp, sizeof(resp)); diff --git a/contrib/ofed/libbnxtre/memory.h b/contrib/ofed/libbnxtre/memory.h index fe18f30ad1a5..875d10f3769f 100644 --- a/contrib/ofed/libbnxtre/memory.h +++ b/contrib/ofed/libbnxtre/memory.h @@ -51,6 +51,7 @@ struct bnxt_re_qattr { uint32_t nwr; uint32_t sz_ring; uint32_t sz_shad; + uint32_t sw_nwr; }; /* spin lock wrapper struct */ diff --git a/contrib/ofed/libbnxtre/verbs.c b/contrib/ofed/libbnxtre/verbs.c index 320b374abe7e..602d792a1ce0 100644 --- a/contrib/ofed/libbnxtre/verbs.c +++ b/contrib/ofed/libbnxtre/verbs.c @@ -1224,6 +1224,8 @@ static int bnxt_re_get_rq_slots(struct bnxt_re_dev *rdev, uint8_t qpmode, return slots; } +#define BNXT_VAR_MAX_SLOT_ALIGN 256 + static int bnxt_re_get_sq_slots(struct bnxt_re_dev *rdev, uint8_t qpmode, uint32_t nswr, uint32_t nsge, uint32_t ils, uint32_t *esize) @@ -1235,17 +1237,21 @@ static int bnxt_re_get_sq_slots(struct bnxt_re_dev *rdev, uint32_t ilsize; uint32_t hdr_sz; uint32_t slots; + uint32_t align; hdr_sz = bnxt_re_get_sqe_hdr_sz(); stride = sizeof(struct bnxt_re_sge); + align = hdr_sz; + if (qpmode == BNXT_RE_WQE_MODE_VARIABLE) + align = stride; max_wqesz = bnxt_re_calc_wqe_sz(rdev->devattr.max_sge); - ilsize = get_aligned(ils, hdr_sz); + ilsize = get_aligned(ils, align); wqe_size = bnxt_re_calc_wqe_sz(nsge); if (ilsize) { cal_ils = hdr_sz + ilsize; wqe_size = MAX(cal_ils, wqe_size); - wqe_size = get_aligned(wqe_size, hdr_sz); + wqe_size = get_aligned(wqe_size, align); } if (wqe_size > max_wqesz) return -EINVAL; @@ -1256,6 +1262,8 @@ static int bnxt_re_get_sq_slots(struct bnxt_re_dev *rdev, if (esize) *esize = wqe_size; slots = (nswr * wqe_size) / stride; + if (qpmode == BNXT_RE_WQE_MODE_VARIABLE) + slots = get_aligned(slots, BNXT_VAR_MAX_SLOT_ALIGN); return slots; } @@ -1288,11 +1296,15 @@ static int bnxt_re_get_sqmem_size(struct bnxt_re_context *cntx, qattr->nwr = nswr; qattr->slots = nslots; qattr->esize = esz; + if (mode) + qattr->sw_nwr = nslots; + else + qattr->sw_nwr = nswr; bytes = nslots * sizeof(struct bnxt_re_sge); /* ring */ bytes += npsn * bnxt_re_get_psne_size(cntx); /* psn */ qattr->sz_ring = get_aligned(bytes, cntx->rdev->pg_size); - qattr->sz_shad = nswr * sizeof(struct bnxt_re_wrid); /* shadow */ + qattr->sz_shad = qattr->sw_nwr * sizeof(struct bnxt_re_wrid); /* shadow */ return 0; } @@ -1315,6 +1327,7 @@ static int bnxt_re_get_rqmem_size(struct bnxt_re_context *cntx, qattr->nwr = nrwr; qattr->slots = nslots; qattr->esize = esz; + qattr->sw_nwr = nrwr; bytes = nslots * sizeof(struct bnxt_re_sge); qattr->sz_ring = get_aligned(bytes, cntx->rdev->pg_size); @@ -1406,8 +1419,8 @@ static int bnxt_re_alloc_init_swque(struct bnxt_re_joint_queue *jqq, if (!jqq->swque) return -ENOMEM; jqq->start_idx = 0; - jqq->last_idx = qattr->nwr - 1; - for (indx = 0; indx < qattr->nwr; indx++) + jqq->last_idx = qattr->sw_nwr - 1; + for (indx = 0; indx < qattr->sw_nwr; indx++) jqq->swque[indx].next_idx = indx + 1; jqq->swque[jqq->last_idx].next_idx = 0; jqq->last_idx = 0; @@ -1457,13 +1470,13 @@ static int bnxt_re_alloc_queues(struct bnxt_re_qp *qp, */ que->pad = (que->va + que->depth * que->stride); psn_size = bnxt_re_get_psne_size(qp->cntx); - que->pad_stride_log2 = (uint32_t)bnxt_log2((double)psn_size); + que->pad_stride_log2 = (uint32_t)bnxt_log2((double)(psn_size - 1)); ret = bnxt_re_alloc_init_swque(qp->jsqq, qp->mem, &qattr[indx]); if (ret) goto fail; - qp->cap.max_swr = qattr[indx].nwr; + qp->cap.max_swr = qattr[indx].sw_nwr; qp->jsqq->cntx = qp->cntx; que->dbtail = (qp->qpmode == BNXT_RE_WQE_MODE_VARIABLE) ? &que->tail : &qp->jsqq->start_idx; @@ -1473,7 +1486,7 @@ static int bnxt_re_alloc_queues(struct bnxt_re_qp *qp, goto skip_msn; que->msn = 0; que->msn_tbl_sz = 0; - if (qp->qpmode & BNXT_RE_WQE_MODE_VARIABLE) + if (qp->qpmode == BNXT_RE_WQE_MODE_VARIABLE) que->msn_tbl_sz = roundup_pow_of_two(qattr->slots) / 2; else que->msn_tbl_sz = roundup_pow_of_two(qattr->nwr); @@ -1575,6 +1588,8 @@ struct ibv_qp *bnxt_re_create_qp(struct ibv_pd *ibvpd, req.qpsva = (uint64_t)qp->jsqq->hwque->va; req.qprva = qp->jrqq ? (uint64_t)qp->jrqq->hwque->va : 0; req.qp_handle = (uint64_t)qp; + if (qp->qpmode == BNXT_RE_WQE_MODE_VARIABLE) + req.sq_slots = qattr[BNXT_RE_QATTR_SQ_INDX].slots; if (ibv_cmd_create_qp(ibvpd, &qp->ibvqp, attr, &req.cmd, sizeof(req), &resp.resp, sizeof(resp))) diff --git a/sys/dev/bnxt/bnxt_re/bnxt_re-abi.h b/sys/dev/bnxt/bnxt_re/bnxt_re-abi.h index 8f48609e7f6f..c7ca19f29046 100644 --- a/sys/dev/bnxt/bnxt_re/bnxt_re-abi.h +++ b/sys/dev/bnxt/bnxt_re/bnxt_re-abi.h @@ -34,7 +34,7 @@ #include #include -#define BNXT_RE_ABI_VERSION 6 +#define BNXT_RE_ABI_VERSION 7 enum { BNXT_RE_COMP_MASK_UCNTX_WC_DPI_ENABLED = 0x01, @@ -43,12 +43,14 @@ enum { BNXT_RE_COMP_MASK_UCNTX_MQP_EX_SUPPORTED = 0x08, BNXT_RE_COMP_MASK_UCNTX_DBR_PACING_ENABLED = 0x10, BNXT_RE_COMP_MASK_UCNTX_DBR_RECOVERY_ENABLED = 0x20, - BNXT_RE_COMP_MASK_UCNTX_HW_RETX_ENABLED = 0x40 + BNXT_RE_COMP_MASK_UCNTX_HW_RETX_ENABLED = 0x40, + BNXT_RE_COMP_MASK_UCNTX_CMASK_HAVE_MODE = 0x80, }; enum { BNXT_RE_COMP_MASK_REQ_UCNTX_POW2_SUPPORT = 0x01, - BNXT_RE_COMP_MASK_REQ_UCNTX_RSVD_WQE = 0x02 + BNXT_RE_COMP_MASK_REQ_UCNTX_RSVD_WQE = 0x02, + BNXT_RE_COMP_MASK_REQ_UCNTX_VAR_WQE_SUPPORT = 0x03 }; struct bnxt_re_uctx_req { @@ -66,7 +68,7 @@ struct bnxt_re_uctx_resp { __u32 max_cqd; __u32 chip_id0; __u32 chip_id1; - __u32 modes; + __u32 mode; __aligned_u64 comp_mask; } __attribute__((packed)); @@ -134,6 +136,8 @@ struct bnxt_re_qp_req { __u64 qpsva; __u64 qprva; __u64 qp_handle; + __u64 comp_mask; + __u32 sq_slots; } __attribute__((packed)); struct bnxt_re_qp_resp { diff --git a/sys/dev/bnxt/bnxt_re/bnxt_re.h b/sys/dev/bnxt/bnxt_re/bnxt_re.h index c0bc11e490b2..0afc8566c020 100644 --- a/sys/dev/bnxt/bnxt_re/bnxt_re.h +++ b/sys/dev/bnxt/bnxt_re/bnxt_re.h @@ -717,7 +717,7 @@ void bnxt_re_remove_device(struct bnxt_re_dev *rdev, u8 removal_type, void bnxt_re_destroy_lag(struct bnxt_re_dev **rdev); int bnxt_re_add_device(struct bnxt_re_dev **rdev, struct ifnet *netdev, - u8 qp_mode, u8 op_type, u8 wqe_mode, u32 num_msix_requested, + u8 qp_mode, u8 op_type, u32 num_msix_requested, struct auxiliary_device *aux_dev); void bnxt_re_create_base_interface(bool primary); int bnxt_re_schedule_work(struct bnxt_re_dev *rdev, unsigned long event, @@ -1070,6 +1070,15 @@ static inline void bnxt_re_set_def_do_pacing(struct bnxt_re_dev *rdev) rdev->qplib_res.pacing_data->do_pacing = rdev->dbr_def_do_pacing; } +static inline bool bnxt_re_is_var_size_supported(struct bnxt_re_dev *rdev, + struct bnxt_re_ucontext *uctx) +{ + if (uctx) + return uctx->cmask & BNXT_RE_UCNTX_CAP_VAR_WQE_ENABLED; + else + return rdev->chip_ctx->modes.wqe_mode; +} + static inline void bnxt_re_set_pacing_dev_state(struct bnxt_re_dev *rdev) { rdev->qplib_res.pacing_data->dev_err_state = diff --git a/sys/dev/bnxt/bnxt_re/ib_verbs.c b/sys/dev/bnxt/bnxt_re/ib_verbs.c index 37b77c5af909..32899abab9ff 100644 --- a/sys/dev/bnxt/bnxt_re/ib_verbs.c +++ b/sys/dev/bnxt/bnxt_re/ib_verbs.c @@ -1667,15 +1667,18 @@ static int bnxt_re_setup_swqe_size(struct bnxt_re_qp *qp, align = sizeof(struct sq_send_hdr); ilsize = ALIGN(init_attr->cap.max_inline_data, align); - sq->wqe_size = bnxt_re_get_swqe_size(ilsize, sq->max_sge); - if (sq->wqe_size > _get_swqe_sz(dev_attr->max_qp_sges)) - return -EINVAL; - /* For Cu/Wh and gen p5 backward compatibility mode - * wqe size is fixed to 128 bytes + /* For gen p4 and gen p5 fixed wqe compatibility mode + * wqe size is fixed to 128 bytes - ie 6 SGEs */ - if (sq->wqe_size < _get_swqe_sz(dev_attr->max_qp_sges) && - qplqp->wqe_mode == BNXT_QPLIB_WQE_MODE_STATIC) - sq->wqe_size = _get_swqe_sz(dev_attr->max_qp_sges); + if (qplqp->wqe_mode == BNXT_QPLIB_WQE_MODE_STATIC) { + sq->wqe_size = _get_swqe_sz(BNXT_STATIC_MAX_SGE); + sq->max_sge = BNXT_STATIC_MAX_SGE; + } else { + sq->wqe_size = bnxt_re_get_swqe_size(ilsize, sq->max_sge); + if (sq->wqe_size > _get_swqe_sz(dev_attr->max_qp_sges)) + return -EINVAL; + } + if (init_attr->cap.max_inline_data) { qplqp->max_inline_data = sq->wqe_size - @@ -1728,10 +1731,14 @@ static int bnxt_re_init_user_qp(struct bnxt_re_dev *rdev, sizeof(struct sq_psn_search); if (rdev->dev_attr && _is_host_msn_table(rdev->dev_attr->dev_cap_ext_flags2)) psn_sz = sizeof(struct sq_msn_search); - psn_nume = (qplib_qp->wqe_mode == BNXT_QPLIB_WQE_MODE_STATIC) ? - qplib_qp->sq.max_wqe : - ((qplib_qp->sq.max_wqe * qplib_qp->sq.wqe_size) / - sizeof(struct bnxt_qplib_sge)); + if (cntx && bnxt_re_is_var_size_supported(rdev, cntx)) { + psn_nume = ureq.sq_slots; + } else { + psn_nume = (qplib_qp->wqe_mode == BNXT_QPLIB_WQE_MODE_STATIC) ? + qplib_qp->sq.max_wqe : + ((qplib_qp->sq.max_wqe * qplib_qp->sq.wqe_size) / + sizeof(struct bnxt_qplib_sge)); + } if (rdev->dev_attr && _is_host_msn_table(rdev->dev_attr->dev_cap_ext_flags2)) psn_nume = roundup_pow_of_two(psn_nume); @@ -1912,6 +1919,7 @@ static struct bnxt_re_qp *bnxt_re_create_shadow_qp(struct bnxt_re_pd *pd, /* Shadow QP SQ depth should be same as QP1 RQ depth */ qp->qplib_qp.sq.wqe_size = bnxt_re_get_swqe_size(0, 6); qp->qplib_qp.sq.max_wqe = qp1_qp->rq.max_wqe; + qp->qplib_qp.sq.max_sw_wqe = qp1_qp->rq.max_wqe; qp->qplib_qp.sq.max_sge = 2; /* Q full delta can be 1 since it is internal QP */ qp->qplib_qp.sq.q_full_delta = 1; @@ -1923,6 +1931,7 @@ static struct bnxt_re_qp *bnxt_re_create_shadow_qp(struct bnxt_re_pd *pd, qp->qplib_qp.rq.wqe_size = _max_rwqe_sz(6); /* 128 Byte wqe size */ qp->qplib_qp.rq.max_wqe = qp1_qp->rq.max_wqe; + qp->qplib_qp.rq.max_sw_wqe = qp1_qp->rq.max_wqe; qp->qplib_qp.rq.max_sge = qp1_qp->rq.max_sge; qp->qplib_qp.rq.sginfo.pgsize = PAGE_SIZE; qp->qplib_qp.rq.sginfo.pgshft = PAGE_SHIFT; @@ -1995,6 +2004,7 @@ static int bnxt_re_init_rq_attr(struct bnxt_re_qp *qp, entries = init_attr->cap.max_recv_wr + 1; entries = bnxt_re_init_depth(entries, cntx); rq->max_wqe = min_t(u32, entries, dev_attr->max_qp_wqes + 1); + rq->max_sw_wqe = rq->max_wqe; rq->q_full_delta = 0; rq->sginfo.pgsize = PAGE_SIZE; rq->sginfo.pgshft = PAGE_SHIFT; @@ -2019,10 +2029,11 @@ static void bnxt_re_adjust_gsi_rq_attr(struct bnxt_re_qp *qp) static int bnxt_re_init_sq_attr(struct bnxt_re_qp *qp, struct ib_qp_init_attr *init_attr, - void *cntx) + void *cntx, struct ib_udata *udata) { struct bnxt_qplib_dev_attr *dev_attr; struct bnxt_qplib_qp *qplqp; + struct bnxt_re_qp_req ureq; struct bnxt_re_dev *rdev; struct bnxt_qplib_q *sq; int diff = 0; @@ -2034,35 +2045,53 @@ static int bnxt_re_init_sq_attr(struct bnxt_re_qp *qp, sq = &qplqp->sq; dev_attr = rdev->dev_attr; - sq->max_sge = init_attr->cap.max_send_sge; - if (sq->max_sge > dev_attr->max_qp_sges) { - sq->max_sge = dev_attr->max_qp_sges; - init_attr->cap.max_send_sge = sq->max_sge; + if (udata) { + rc = ib_copy_from_udata(&ureq, udata, + min(udata->inlen, sizeof(ureq))); + if (rc) + return -EINVAL; } - rc = bnxt_re_setup_swqe_size(qp, init_attr); - if (rc) - return rc; - /* - * Change the SQ depth if user has requested minimum using - * configfs. Only supported for kernel consumers. Setting - * min_tx_depth to 4096 to handle iser SQ full condition - * in most of the newer OS distros - */ + + sq->max_sge = init_attr->cap.max_send_sge; entries = init_attr->cap.max_send_wr; - if (!cntx && rdev->min_tx_depth && init_attr->qp_type != IB_QPT_GSI) { + if (cntx && udata && qplqp->wqe_mode == BNXT_QPLIB_WQE_MODE_VARIABLE) { + sq->max_wqe = ureq.sq_slots; + sq->max_sw_wqe = ureq.sq_slots; + sq->wqe_size = sizeof(struct sq_sge); + } else { + if (sq->max_sge > dev_attr->max_qp_sges) { + sq->max_sge = dev_attr->max_qp_sges; + init_attr->cap.max_send_sge = sq->max_sge; + } + rc = bnxt_re_setup_swqe_size(qp, init_attr); + if (rc) + return rc; /* - * If users specify any value greater than 1 use min_tx_depth - * provided by user for comparison. Else, compare it with the - * BNXT_RE_MIN_KERNEL_QP_TX_DEPTH and adjust it accordingly. + * Change the SQ depth if user has requested minimum using + * configfs. Only supported for kernel consumers. Setting + * min_tx_depth to 4096 to handle iser SQ full condition + * in most of the newer OS distros */ - if (rdev->min_tx_depth > 1 && entries < rdev->min_tx_depth) - entries = rdev->min_tx_depth; - else if (entries < BNXT_RE_MIN_KERNEL_QP_TX_DEPTH) - entries = BNXT_RE_MIN_KERNEL_QP_TX_DEPTH; - } - diff = bnxt_re_get_diff(cntx, rdev->chip_ctx); - entries = bnxt_re_init_depth(entries + diff + 1, cntx); - sq->max_wqe = min_t(u32, entries, dev_attr->max_qp_wqes + diff + 1); + + if (!cntx && rdev->min_tx_depth && init_attr->qp_type != IB_QPT_GSI) { + /* + * If users specify any value greater than 1 use min_tx_depth + * provided by user for comparison. Else, compare it with the + * BNXT_RE_MIN_KERNEL_QP_TX_DEPTH and adjust it accordingly. + */ + if (rdev->min_tx_depth > 1 && entries < rdev->min_tx_depth) + entries = rdev->min_tx_depth; + else if (entries < BNXT_RE_MIN_KERNEL_QP_TX_DEPTH) + entries = BNXT_RE_MIN_KERNEL_QP_TX_DEPTH; + } + diff = bnxt_re_get_diff(cntx, rdev->chip_ctx); + entries = bnxt_re_init_depth(entries + diff + 1, cntx); + sq->max_wqe = min_t(u32, entries, dev_attr->max_qp_wqes + diff + 1); + if (qplqp->wqe_mode == BNXT_QPLIB_WQE_MODE_VARIABLE) + sq->max_sw_wqe = bnxt_qplib_get_depth(sq, qplqp->wqe_mode, true); + else + sq->max_sw_wqe = sq->max_wqe; + } sq->q_full_delta = diff + 1; /* * Reserving one slot for Phantom WQE. Application can @@ -2128,11 +2157,6 @@ out: return qptype; } -static int bnxt_re_init_qp_wqe_mode(struct bnxt_re_dev *rdev) -{ - return rdev->chip_ctx->modes.wqe_mode; -} - static int bnxt_re_init_qp_attr(struct bnxt_re_qp *qp, struct bnxt_re_pd *pd, struct ib_qp_init_attr *init_attr, struct ib_udata *udata) @@ -2166,7 +2190,7 @@ static int bnxt_re_init_qp_attr(struct bnxt_re_qp *qp, struct bnxt_re_pd *pd, goto out; } qplqp->type = (u8)qptype; - qplqp->wqe_mode = bnxt_re_init_qp_wqe_mode(rdev); + qplqp->wqe_mode = bnxt_re_is_var_size_supported(rdev, cntx); ether_addr_copy(qplqp->smac, rdev->dev_addr); if (init_attr->qp_type == IB_QPT_RC) { @@ -2213,7 +2237,7 @@ static int bnxt_re_init_qp_attr(struct bnxt_re_qp *qp, struct bnxt_re_pd *pd, bnxt_re_adjust_gsi_rq_attr(qp); /* Setup SQ */ - rc = bnxt_re_init_sq_attr(qp, init_attr, cntx); + rc = bnxt_re_init_sq_attr(qp, init_attr, cntx, udata); if (rc) goto out; if (init_attr->qp_type == IB_QPT_GSI) @@ -2849,6 +2873,7 @@ int bnxt_re_modify_qp(struct ib_qp *ib_qp, struct ib_qp_attr *qp_attr, if (entries > dev_attr->max_qp_wqes) entries = dev_attr->max_qp_wqes; qp->qplib_qp.rq.max_wqe = entries; + qp->qplib_qp.rq.max_sw_wqe = qp->qplib_qp.rq.max_wqe; qp->qplib_qp.rq.q_full_delta = qp->qplib_qp.rq.max_wqe - qp_attr->cap.max_recv_wr; qp->qplib_qp.rq.max_sge = qp_attr->cap.max_recv_sge; @@ -5349,7 +5374,7 @@ int bnxt_re_alloc_ucontext(struct ib_ucontext *uctx_in, } genp5 = _is_chip_gen_p5_p7(cctx); - resp.modes = genp5 ? cctx->modes.wqe_mode : 0; + resp.mode = genp5 ? cctx->modes.wqe_mode : 0; if (rdev->dev_attr && _is_host_msn_table(rdev->dev_attr->dev_cap_ext_flags2)) resp.comp_mask = BNXT_RE_COMP_MASK_UCNTX_HW_RETX_ENABLED; @@ -5384,6 +5409,12 @@ int bnxt_re_alloc_ucontext(struct ib_ucontext *uctx_in, if (bnxt_re_init_rsvd_wqe_flag(&ureq, &resp, genp5)) dev_warn(rdev_to_dev(rdev), "Rsvd wqe in use! Try the updated library.\n"); + if (ureq.comp_mask & BNXT_RE_COMP_MASK_REQ_UCNTX_VAR_WQE_SUPPORT) { + resp.comp_mask |= BNXT_RE_COMP_MASK_UCNTX_CMASK_HAVE_MODE; + resp.mode = rdev->chip_ctx->modes.wqe_mode; + if (resp.mode == BNXT_QPLIB_WQE_MODE_VARIABLE) + resp.comp_mask |= BNXT_RE_UCNTX_CAP_VAR_WQE_ENABLED; + } } else { dev_warn(rdev_to_dev(rdev), "Enabled roundup logic. Update the library!\n"); diff --git a/sys/dev/bnxt/bnxt_re/ib_verbs.h b/sys/dev/bnxt/bnxt_re/ib_verbs.h index f3b7f44c828d..66d15dd2b767 100644 --- a/sys/dev/bnxt/bnxt_re/ib_verbs.h +++ b/sys/dev/bnxt/bnxt_re/ib_verbs.h @@ -508,6 +508,11 @@ static inline int bnxt_re_init_pow2_flag(struct bnxt_re_uctx_req *req, return 0; } +enum { + BNXT_RE_UCNTX_CAP_POW2_DISABLED = 0x1ULL, + BNXT_RE_UCNTX_CAP_VAR_WQE_ENABLED = 0x2ULL, +}; + static inline u32 bnxt_re_init_depth(u32 ent, struct bnxt_re_ucontext *uctx) { return uctx ? (uctx->cmask & BNXT_RE_COMP_MASK_UCNTX_POW2_DISABLED) ? diff --git a/sys/dev/bnxt/bnxt_re/main.c b/sys/dev/bnxt/bnxt_re/main.c index dc68854157a0..01c2710bc3ea 100644 --- a/sys/dev/bnxt/bnxt_re/main.c +++ b/sys/dev/bnxt/bnxt_re/main.c @@ -1101,7 +1101,6 @@ static int bnxt_re_handle_start(struct auxiliary_device *adev) rc = bnxt_re_add_device(&rdev, real_dev, en_info->gsi_mode, BNXT_RE_POST_RECOVERY_INIT, - en_info->wqe_mode, en_info->num_msix_requested, adev); if (rc) { /* Add device failed. Unregister the device. @@ -1435,15 +1434,15 @@ static void bnxt_re_set_db_offset(struct bnxt_re_dev *rdev) return; } -static void bnxt_re_set_drv_mode(struct bnxt_re_dev *rdev, u8 mode) +static void bnxt_re_set_drv_mode(struct bnxt_re_dev *rdev) { struct bnxt_qplib_chip_ctx *cctx; struct bnxt_en_dev *en_dev; en_dev = rdev->en_dev; cctx = rdev->chip_ctx; - cctx->modes.wqe_mode = _is_chip_gen_p5_p7(rdev->chip_ctx) ? - mode : BNXT_QPLIB_WQE_MODE_STATIC; + cctx->modes.wqe_mode = _is_chip_p7(rdev->chip_ctx) ? + BNXT_QPLIB_WQE_MODE_VARIABLE : BNXT_QPLIB_WQE_MODE_STATIC; cctx->modes.te_bypass = false; if (bnxt_re_hwrm_qcaps(rdev)) dev_err(rdev_to_dev(rdev), @@ -1492,7 +1491,7 @@ static void bnxt_re_destroy_chip_ctx(struct bnxt_re_dev *rdev) kfree(chip_ctx); } -static int bnxt_re_setup_chip_ctx(struct bnxt_re_dev *rdev, u8 wqe_mode) +static int bnxt_re_setup_chip_ctx(struct bnxt_re_dev *rdev) { struct bnxt_qplib_chip_ctx *chip_ctx; struct bnxt_en_dev *en_dev; @@ -1527,7 +1526,7 @@ static int bnxt_re_setup_chip_ctx(struct bnxt_re_dev *rdev, u8 wqe_mode) rc = -ENOMEM; goto fail; } - bnxt_re_set_drv_mode(rdev, wqe_mode); + bnxt_re_set_drv_mode(rdev); bnxt_re_set_db_offset(rdev); rc = bnxt_qplib_map_db_bar(&rdev->qplib_res); @@ -3551,7 +3550,7 @@ static void bnxt_re_dev_uninit(struct bnxt_re_dev *rdev, u8 op_type) } } -static int bnxt_re_dev_init(struct bnxt_re_dev *rdev, u8 op_type, u8 wqe_mode) +static int bnxt_re_dev_init(struct bnxt_re_dev *rdev, u8 op_type) { struct bnxt_re_ring_attr rattr = {}; struct bnxt_qplib_creq_ctx *creq; @@ -3566,7 +3565,7 @@ static int bnxt_re_dev_init(struct bnxt_re_dev *rdev, u8 op_type, u8 wqe_mode) } set_bit(BNXT_RE_FLAG_NETDEV_REGISTERED, &rdev->flags); - rc = bnxt_re_setup_chip_ctx(rdev, wqe_mode); + rc = bnxt_re_setup_chip_ctx(rdev); if (rc) { dev_err(rdev_to_dev(rdev), "Failed to get chip context rc 0x%x", rc); bnxt_re_unregister_netdev(rdev); @@ -3879,7 +3878,7 @@ void bnxt_re_remove_device(struct bnxt_re_dev *rdev, u8 op_type, int bnxt_re_add_device(struct bnxt_re_dev **rdev, struct ifnet *netdev, - u8 qp_mode, u8 op_type, u8 wqe_mode, + u8 qp_mode, u8 op_type, u32 num_msix_requested, struct auxiliary_device *aux_dev) { @@ -3952,7 +3951,7 @@ int bnxt_re_add_device(struct bnxt_re_dev **rdev, rtnl_lock(); en_info->rdev = *rdev; rtnl_unlock(); - rc = bnxt_re_dev_init(*rdev, op_type, wqe_mode); + rc = bnxt_re_dev_init(*rdev, op_type); if (rc) { ref_error: bnxt_re_dev_unreg(*rdev); @@ -4401,7 +4400,6 @@ static int bnxt_re_probe(struct auxiliary_device *adev, rc = bnxt_re_add_device(&rdev, en_dev->net, BNXT_RE_GSI_MODE_ALL, BNXT_RE_COMPLETE_INIT, - BNXT_QPLIB_WQE_MODE_STATIC, BNXT_RE_MSIX_FROM_MOD_PARAM, adev); if (rc) { mutex_unlock(&bnxt_re_mutex); diff --git a/sys/dev/bnxt/bnxt_re/qplib_fp.c b/sys/dev/bnxt/bnxt_re/qplib_fp.c index d4b439b05588..19708302198b 100644 --- a/sys/dev/bnxt/bnxt_re/qplib_fp.c +++ b/sys/dev/bnxt/bnxt_re/qplib_fp.c @@ -842,15 +842,15 @@ static int bnxt_qplib_alloc_init_swq(struct bnxt_qplib_q *que) int rc = 0; int indx; - que->swq = kcalloc(que->max_wqe, sizeof(*que->swq), GFP_KERNEL); + que->swq = kcalloc(que->max_sw_wqe, sizeof(*que->swq), GFP_KERNEL); if (!que->swq) { rc = -ENOMEM; goto out; } que->swq_start = 0; - que->swq_last = que->max_wqe - 1; - for (indx = 0; indx < que->max_wqe; indx++) + que->swq_last = que->max_sw_wqe - 1; + for (indx = 0; indx < que->max_sw_wqe; indx++) que->swq[indx].next_idx = indx + 1; que->swq[que->swq_last].next_idx = 0; /* Make it circular */ que->swq_last = 0; @@ -879,19 +879,23 @@ static u32 bnxt_qplib_get_stride(void) return sizeof(struct sq_sge); } -static u32 bnxt_qplib_get_depth(struct bnxt_qplib_q *que) +u32 bnxt_qplib_get_depth(struct bnxt_qplib_q *que, u8 wqe_mode, bool is_sq) { - u8 stride; + u32 slots; - stride = bnxt_qplib_get_stride(); - return (que->wqe_size * que->max_wqe) / stride; + /* Queue depth is the number of slots. */ + slots = (que->wqe_size * que->max_wqe) / sizeof(struct sq_sge); + /* For variable WQE mode, need to align the slots to 256 */ + if (wqe_mode == BNXT_QPLIB_WQE_MODE_VARIABLE && is_sq) + slots = ALIGN(slots, BNXT_VAR_MAX_SLOT_ALIGN); + return slots; } static u32 _set_sq_size(struct bnxt_qplib_q *que, u8 wqe_mode) { /* For Variable mode supply number of 16B slots */ return (wqe_mode == BNXT_QPLIB_WQE_MODE_STATIC) ? - que->max_wqe : bnxt_qplib_get_depth(que); + que->max_wqe : bnxt_qplib_get_depth(que, wqe_mode, true); } static u32 _set_sq_max_slot(u8 wqe_mode) @@ -929,7 +933,7 @@ int bnxt_qplib_create_qp1(struct bnxt_qplib_res *res, struct bnxt_qplib_qp *qp) hwq_attr.res = res; hwq_attr.sginfo = &sq->sginfo; hwq_attr.stride = bnxt_qplib_get_stride(); - hwq_attr.depth = bnxt_qplib_get_depth(sq); + hwq_attr.depth = bnxt_qplib_get_depth(sq, qp->wqe_mode, false); hwq_attr.type = HWQ_TYPE_QUEUE; rc = bnxt_qplib_alloc_init_hwq(&sq->hwq, &hwq_attr); if (rc) @@ -953,7 +957,7 @@ int bnxt_qplib_create_qp1(struct bnxt_qplib_res *res, struct bnxt_qplib_qp *qp) hwq_attr.res = res; hwq_attr.sginfo = &rq->sginfo; hwq_attr.stride = bnxt_qplib_get_stride(); - hwq_attr.depth = bnxt_qplib_get_depth(rq); + hwq_attr.depth = bnxt_qplib_get_depth(rq, qp->wqe_mode, false); hwq_attr.type = HWQ_TYPE_QUEUE; rc = bnxt_qplib_alloc_init_hwq(&rq->hwq, &hwq_attr); if (rc) @@ -1105,7 +1109,7 @@ int bnxt_qplib_create_qp(struct bnxt_qplib_res *res, struct bnxt_qplib_qp *qp) hwq_attr.res = res; hwq_attr.sginfo = &sq->sginfo; hwq_attr.stride = bnxt_qplib_get_stride(); - hwq_attr.depth = bnxt_qplib_get_depth(sq); + hwq_attr.depth = bnxt_qplib_get_depth(sq, qp->wqe_mode, true); hwq_attr.aux_stride = psn_sz; hwq_attr.aux_depth = (psn_sz) ? _set_sq_size(sq, qp->wqe_mode) : 0; @@ -1147,7 +1151,7 @@ int bnxt_qplib_create_qp(struct bnxt_qplib_res *res, struct bnxt_qplib_qp *qp) hwq_attr.res = res; hwq_attr.sginfo = &rq->sginfo; hwq_attr.stride = bnxt_qplib_get_stride(); - hwq_attr.depth = bnxt_qplib_get_depth(rq); + hwq_attr.depth = bnxt_qplib_get_depth(rq, qp->wqe_mode, false); hwq_attr.aux_stride = 0; hwq_attr.aux_depth = 0; hwq_attr.type = HWQ_TYPE_QUEUE; @@ -2878,6 +2882,32 @@ out: return rc; } +static int bnxt_qplib_get_cqe_sq_cons(struct bnxt_qplib_q *sq, u32 cqe_slot) +{ + struct bnxt_qplib_hwq *sq_hwq; + struct bnxt_qplib_swq *swq; + int cqe_sq_cons = -1; + u32 start, last; + + sq_hwq = &sq->hwq; + + start = sq->swq_start; + last = sq->swq_last; + + while (last != start) { + swq = &sq->swq[last]; + if (swq->slot_idx == cqe_slot) { + cqe_sq_cons = swq->next_idx; + dev_err(&sq_hwq->pdev->dev, "%s: Found cons wqe = %d slot = %d\n", + __func__, cqe_sq_cons, cqe_slot); + break; + } + + last = swq->next_idx; + } + return cqe_sq_cons; +} + static int bnxt_qplib_cq_process_req(struct bnxt_qplib_cq *cq, struct cq_req *hwcqe, struct bnxt_qplib_cqe **pcqe, int *budget, @@ -2886,8 +2916,9 @@ static int bnxt_qplib_cq_process_req(struct bnxt_qplib_cq *cq, struct bnxt_qplib_qp *qp; struct bnxt_qplib_q *sq; struct bnxt_qplib_cqe *cqe; - u32 cqe_sq_cons; + u32 cqe_sq_cons, slot_num; struct bnxt_qplib_swq *swq; + int cqe_cons; int rc = 0; qp = (struct bnxt_qplib_qp *)le64_to_cpu(hwcqe->qp_handle); @@ -2899,13 +2930,26 @@ static int bnxt_qplib_cq_process_req(struct bnxt_qplib_cq *cq, } sq = &qp->sq; - cqe_sq_cons = le16_to_cpu(hwcqe->sq_cons_idx) % sq->max_wqe; + cqe_sq_cons = le16_to_cpu(hwcqe->sq_cons_idx) % sq->max_sw_wqe; if (qp->sq.flushed) { dev_dbg(&cq->hwq.pdev->dev, "%s: QPLIB: QP in Flush QP = %p\n", __func__, qp); goto done; } + if (__is_err_cqe_for_var_wqe(qp, hwcqe->status)) { + slot_num = le16_to_cpu(hwcqe->sq_cons_idx); + cqe_cons = bnxt_qplib_get_cqe_sq_cons(sq, slot_num); + if (cqe_cons < 0) { + dev_dbg(&cq->hwq.pdev->dev, "%s: Wrong SQ cons cqe_slot_indx = %d\n", + __func__, slot_num); + goto done; + } + cqe_sq_cons = cqe_cons; + dev_dbg(&cq->hwq.pdev->dev, "%s: cqe_sq_cons = %d swq_last = %d swq_start = %d\n", + __func__, cqe_sq_cons, sq->swq_last, sq->swq_start); + } + /* Require to walk the sq's swq to fabricate CQEs for all previously * signaled SWQEs due to CQE aggregation from the current sq cons * to the cqe_sq_cons @@ -3348,7 +3392,7 @@ static int bnxt_qplib_cq_process_terminal(struct bnxt_qplib_cq *cq, if (cqe_cons == 0xFFFF) goto do_rq; - cqe_cons %= sq->max_wqe; + cqe_cons %= sq->max_sw_wqe; if (qp->sq.flushed) { dev_dbg(&cq->hwq.pdev->dev, "%s: QPLIB: QP in Flush QP = %p\n", __func__, qp); diff --git a/sys/dev/bnxt/bnxt_re/qplib_fp.h b/sys/dev/bnxt/bnxt_re/qplib_fp.h index fd2d8a08c818..542a26782c62 100644 --- a/sys/dev/bnxt/bnxt_re/qplib_fp.h +++ b/sys/dev/bnxt/bnxt_re/qplib_fp.h @@ -300,6 +300,7 @@ struct bnxt_qplib_q { struct bnxt_qplib_sg_info sginfo; struct bnxt_qplib_hwq hwq; u32 max_wqe; + u32 max_sw_wqe; u16 max_sge; u16 wqe_size; u16 q_full_delta; @@ -635,5 +636,16 @@ static inline uint64_t bnxt_re_update_msn_tbl(uint32_t st_idx, uint32_t npsn, ui SQ_MSN_SEARCH_START_PSN_MASK)); } +static inline bool __is_var_wqe(struct bnxt_qplib_qp *qp) +{ + return (qp->wqe_mode == BNXT_QPLIB_WQE_MODE_VARIABLE); +} + +static inline bool __is_err_cqe_for_var_wqe(struct bnxt_qplib_qp *qp, u8 status) +{ + return (status != CQ_REQ_STATUS_OK) && __is_var_wqe(qp); +} + void bnxt_re_schedule_dbq_event(struct bnxt_qplib_res *res); +u32 bnxt_qplib_get_depth(struct bnxt_qplib_q *que, u8 wqe_mode, bool is_sq); #endif diff --git a/sys/dev/bnxt/bnxt_re/qplib_sp.c b/sys/dev/bnxt/bnxt_re/qplib_sp.c index 8c382c7a645a..f876573ce69f 100644 --- a/sys/dev/bnxt/bnxt_re/qplib_sp.c +++ b/sys/dev/bnxt/bnxt_re/qplib_sp.c @@ -129,11 +129,6 @@ int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw) * one extra entry while creating the qp */ attr->max_qp_wqes = le16_to_cpu(sb->max_qp_wr) - 1; - /* Adjust for max_qp_wqes for variable wqe */ - if (cctx->modes.wqe_mode == BNXT_QPLIB_WQE_MODE_VARIABLE) { - attr->max_qp_wqes = (BNXT_MAX_SQ_SIZE) / - (BNXT_MAX_VAR_WQE_SIZE / BNXT_SGE_SIZE) - 1; - } if (!_is_chip_gen_p5_p7(cctx)) { /* * 128 WQEs needs to be reserved for the HW (8916). Prevent @@ -141,10 +136,13 @@ int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw) */ attr->max_qp_wqes -= BNXT_QPLIB_RESERVED_QP_WRS; } - attr->max_qp_sges = sb->max_sge; - if (_is_chip_gen_p5_p7(cctx) && - cctx->modes.wqe_mode == BNXT_QPLIB_WQE_MODE_VARIABLE) - attr->max_qp_sges = sb->max_sge_var_wqe; + + /* Adjust for max_qp_wqes for variable wqe */ + if (cctx->modes.wqe_mode == BNXT_QPLIB_WQE_MODE_VARIABLE) + attr->max_qp_wqes = BNXT_VAR_MAX_WQE - 1; + + attr->max_qp_sges = cctx->modes.wqe_mode == BNXT_QPLIB_WQE_MODE_VARIABLE ? + min_t(u32, sb->max_sge_var_wqe, BNXT_VAR_MAX_SGE) : sb->max_sge; attr->max_cq = bnxt_re_cap_fw_res(le32_to_cpu(sb->max_cq), dev_res.max_cq, sw_max_en); diff --git a/sys/dev/bnxt/bnxt_re/qplib_sp.h b/sys/dev/bnxt/bnxt_re/qplib_sp.h index fa7dd890501c..5a5485dc5250 100644 --- a/sys/dev/bnxt/bnxt_re/qplib_sp.h +++ b/sys/dev/bnxt/bnxt_re/qplib_sp.h @@ -32,6 +32,7 @@ #define __BNXT_QPLIB_SP_H__ #include +#include "bnxt_re-abi.h" #define BNXT_QPLIB_RESERVED_QP_WRS 128 @@ -395,6 +396,13 @@ bool ib_modify_qp_is_ok_compat(enum ib_qp_state cur_state, enum ib_qp_state next #define BNXT_MAX_VAR_WQE_SIZE 512 #define BNXT_SGE_SIZE 16 +#define BNXT_VAR_MAX_WQE 4352 +#define BNXT_VAR_MAX_SLOT_ALIGN 256 +#define BNXT_VAR_MAX_SGE 13 +#define BNXT_RE_MAX_RQ_WQES 65536 + +#define BNXT_STATIC_MAX_SGE 6 + /* PF defines */ #define BNXT_RE_MAX_QP_SUPPORTED(chip_gen) \ chip_gen == BNXT_RE_DEFAULT ? (64 * 1024) : 0 From nobody Fri Feb 27 12:05:35 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMn8h6BXzz6Ss3H for ; Fri, 27 Feb 2026 12:05:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMn8h4tVKz3DJR for ; Fri, 27 Feb 2026 12:05:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772193940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gPNUbnkP6w2ic4Wy1OOGVV7I9xIZeOgLmOrjAEg+CLg=; b=I603LxuNdy3PFgsvkNzc0u1Em31E0z2WeO5mszBnoy55nbjcnL0jV7dYTyYYPFrRqKzSbp w7WxhzqlrAM9YaHi5WTye0uBAKDUQ1bi4DS/PzmFOX9azdg8CXdQhh4hb0Rt5JHgIjLh/A Zd+m4KzJ7z55N11Kqwb2HCS04m+DhArdGu6SDHRYqm6bXB/WmOBzz5IxQD1uGdZ++fMlX2 MoRqBFA5aELAlcAwBWDjh9NQAXQRUmllrcHIYrMAjDT3Wr4E56CFmz7lmh8Gj85W4M/as9 zDEbnuIG34AFf/qRoUecdgj9/O2KCegua/k03FuVpJW4hO/l76sKnxR/ClGvtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772193940; a=rsa-sha256; cv=none; b=JaFhRt8pHoXlFdXjdrj5YB2Gg4/SVOdNIaboc64Fs8boyQ9uSSoO0Q1ndSpoKnkN4uVH0G ++xlxjm/PDKooOFsO2zVISpR5cT3+1oWEBh1dBsEI9Sz1w0RCr3nOOBYU5raoIi36u0/3U EmE93O9iuNu8zE9GJLA4ajEbPI8xPXissi3CspBH8+n8wme3TuM74TBZNMHpCsZ0jsxhIP ljl+OQuF37XMcSHVyiXkjeX2SIdv61A8C92e0I5i7KnabGmBM034V5WN+IrIExHSJTx8eN wqRaMzCQ2O3YPMAgmpSwV3bHjkR+7SQNg5udht1936VRgs7uj5wUfT8rCF2BZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772193940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gPNUbnkP6w2ic4Wy1OOGVV7I9xIZeOgLmOrjAEg+CLg=; b=hYiaBTea3/AHZ85i9zF45AdxFwkIwgrVTNo+pWSHyYwMWX2Wp6ROwUqERh+p1vZmZeMex3 6VpBOT7efXZecQWUGO6cFrBCbntWNm62nOoK3DNnp2j4G6H3qFvUXUI7JGHa2W76ZTf/Ep lW7ZNIkDzZDJ7M/mzAOnDF/icz9+j/QmO6eW2S08HjtObDMoLUWFzNOf1Cs2C1XRG3574d +or/RoMqrSXt24s/p/3ThgtxLEDhvrhUaw1bq6jfgPxlXBVTLKgSL2xawYHOGUlbSnJhM7 CFlAqCaX8sU5NF+F3JlFh+XNyfOGM0h4X0L4AMZOI3pzXLbXLFda7uvogsP4jA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMn8h4HgMz2Jn for ; Fri, 27 Feb 2026 12:05:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3de0c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 12:05:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Sreekanth Reddy From: Sumit Saxena Subject: git: 1ff252f0bb82 - stable/15 - bnxt_re/libbnxtre: Add RoCE support for BCM576xx controllers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ssaxena X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 1ff252f0bb82c4ff5cc4ae2c1074a2f732a3e92a Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 12:05:35 +0000 Message-Id: <69a1888f.3de0c.3fd0bd97@gitrepo.freebsd.org> The branch stable/15 has been updated by ssaxena: URL: https://cgit.FreeBSD.org/src/commit/?id=1ff252f0bb82c4ff5cc4ae2c1074a2f732a3e92a commit 1ff252f0bb82c4ff5cc4ae2c1074a2f732a3e92a Author: Sreekanth Reddy AuthorDate: 2026-01-23 16:27:22 +0000 Commit: Sumit Saxena CommitDate: 2026-02-27 12:04:37 +0000 bnxt_re/libbnxtre: Add RoCE support for BCM576xx controllers Added RoCE support for BCM576xx controllers with below changes, 1. Update the BAR offsets for handling BCM576xx controllers. Use the values populated by the L2 driver for getting the Doorbell offsets. 2. Use msn index instead of tail to pull psn table entry. 3. Temporarily disable dbr pacing feature untill it is fully implemented. 4. Add support for 400G speed. Reviewed by: ssaxena Differential Revision: https://reviews.freebsd.org/D54521 MFC after: 3 days (cherry picked from commit 92ba9b2fe58910b1d2cd6cd34b5ec093f0d9f700) --- contrib/ofed/libbnxtre/abi.h | 1 + contrib/ofed/libbnxtre/db.c | 9 +++++++-- contrib/ofed/libbnxtre/main.h | 1 + contrib/ofed/libbnxtre/verbs.c | 13 +++++++++++-- sys/dev/bnxt/bnxt_en/bnxt.h | 1 + sys/dev/bnxt/bnxt_en/bnxt_hwrm.c | 2 ++ sys/dev/bnxt/bnxt_en/bnxt_ulp.c | 3 ++- sys/dev/bnxt/bnxt_en/bnxt_ulp.h | 3 +++ sys/dev/bnxt/bnxt_re/ib_verbs.c | 19 +++++++++++-------- sys/dev/bnxt/bnxt_re/ib_verbs.h | 8 ++++++++ sys/dev/bnxt/bnxt_re/main.c | 37 +++++++++++++++++++++--------------- sys/dev/bnxt/bnxt_re/qplib_fp.c | 41 +++++++++++++++++++++++++++++----------- sys/dev/bnxt/bnxt_re/qplib_fp.h | 1 + sys/dev/bnxt/bnxt_re/qplib_res.c | 3 ++- sys/dev/bnxt/bnxt_re/qplib_res.h | 12 +++++++++--- sys/dev/bnxt/bnxt_re/qplib_sp.c | 1 + sys/dev/bnxt/bnxt_re/qplib_sp.h | 1 + 17 files changed, 113 insertions(+), 43 deletions(-) diff --git a/contrib/ofed/libbnxtre/abi.h b/contrib/ofed/libbnxtre/abi.h index 390605edb40b..e3533c122688 100644 --- a/contrib/ofed/libbnxtre/abi.h +++ b/contrib/ofed/libbnxtre/abi.h @@ -529,6 +529,7 @@ struct bnxt_re_srq_req { struct bnxt_re_srq_resp { struct ibv_create_srq_resp resp; __u32 srqid; + __u64 srq_page; } __attribute__((packed)); struct bnxt_re_srqe { diff --git a/contrib/ofed/libbnxtre/db.c b/contrib/ofed/libbnxtre/db.c index 8751297c9218..3d416795679c 100644 --- a/contrib/ofed/libbnxtre/db.c +++ b/contrib/ofed/libbnxtre/db.c @@ -38,7 +38,7 @@ #define BNXT_RE_MAX_FIFO_DEPTH_P5 0x2c00 #define BNXT_RE_DB_FIFO_ROOM_MASK_P7 0x3FFF8000 -#define BNXT_RE_MAX_FIFO_DEPTH_P7 0x8000 +#define BNXT_RE_MAX_FIFO_DEPTH_P7 0x7fff #define BNXT_RE_DB_FIFO_ROOM_SHIFT 15 #define BNXT_RE_DB_THRESHOLD 20 @@ -248,10 +248,15 @@ void bnxt_re_ring_srq_db(struct bnxt_re_srq *srq) void bnxt_re_ring_srq_arm(struct bnxt_re_srq *srq) { struct bnxt_re_db_hdr hdr; + uint32_t toggle = 0; + + if (srq->srq_page) + toggle = *(uint32_t *)srq->srq_page; if (bnxt_re_do_pacing(srq->uctx, &srq->rand)) return; - bnxt_re_init_db_hdr(&hdr, srq->cap.srq_limit, 0, srq->srqid, + bnxt_re_init_db_hdr(&hdr, srq->cap.srq_limit, + toggle << BNXT_RE_DB_TOGGLE_SHIFT, srq->srqid, BNXT_RE_QUE_TYPE_SRQ_ARM); bnxt_re_ring_db(srq->udpi, hdr.typ_qid_indx, &srq->shadow_db_key, &srq->dbr_lock); diff --git a/contrib/ofed/libbnxtre/main.h b/contrib/ofed/libbnxtre/main.h index ea258de22abd..06ed4647d68e 100644 --- a/contrib/ofed/libbnxtre/main.h +++ b/contrib/ofed/libbnxtre/main.h @@ -189,6 +189,7 @@ struct bnxt_re_srq { struct xorshift32_state rand; uint8_t dbr_lock; bool arm_req; + void *srq_page; }; struct bnxt_re_joint_queue { diff --git a/contrib/ofed/libbnxtre/verbs.c b/contrib/ofed/libbnxtre/verbs.c index 7054af34b0c7..320b374abe7e 100644 --- a/contrib/ofed/libbnxtre/verbs.c +++ b/contrib/ofed/libbnxtre/verbs.c @@ -342,9 +342,9 @@ struct ibv_cq *_bnxt_re_create_cq(struct ibv_context *ibvctx, int ncqe, } if (resp.comp_mask & BNXT_RE_COMP_MASK_CQ_HAS_CQ_PAGE) { - cq->cq_page = mmap(NULL, dev->pg_size, PROT_WRITE, MAP_SHARED, + cq->cq_page = mmap(NULL, dev->pg_size, PROT_READ | PROT_WRITE, MAP_SHARED, ibvctx->cmd_fd, resp.cq_page); - if (!cq->cq_page) + if (cq->cq_page == MAP_FAILED) fprintf(stderr, DEV "Valid cq_page not mapped\n"); } @@ -2347,6 +2347,13 @@ struct ibv_srq *bnxt_re_create_srq(struct ibv_pd *ibvpd, goto fail; srq->srqid = resp.srqid; + if (resp.srq_page) { + srq->srq_page = mmap(NULL, uctx->rdev->pg_size, PROT_READ, MAP_SHARED, + ibvpd->context->cmd_fd, resp.srq_page); + if (srq->srq_page == MAP_FAILED) + srq->srq_page = NULL; + } + srq->udpi = &uctx->udpi; srq->cap.max_wr = srq->srqq->depth; srq->cap.max_sge = attr->attr.max_sge; @@ -2395,6 +2402,8 @@ int bnxt_re_destroy_srq(struct ibv_srq *ibvsrq) bnxt_re_list_del_node(&srq->dbnode, &srq->uctx->srq_dbr_res.head); pthread_spin_unlock(&srq->uctx->srq_dbr_res.lock); } + if (srq->srq_page) + munmap(srq->srq_page, srq->uctx->rdev->pg_size); ret = ibv_cmd_destroy_srq(ibvsrq); if (ret) { if (_is_db_drop_recovery_enable(srq->uctx)) { diff --git a/sys/dev/bnxt/bnxt_en/bnxt.h b/sys/dev/bnxt/bnxt_en/bnxt.h index 0ba7b5723b91..78e98eb23beb 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt.h +++ b/sys/dev/bnxt/bnxt_en/bnxt.h @@ -1167,6 +1167,7 @@ struct bnxt_softc { struct iflib_dma_info def_nq_ring_mem; struct task def_cp_task; int db_size; + int db_offset; int legacy_db_size; struct bnxt_doorbell_ops db_ops; diff --git a/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c b/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c index 9e7f4614d9f9..3e5dc0bf4b6d 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c +++ b/sys/dev/bnxt/bnxt_en/bnxt_hwrm.c @@ -1309,6 +1309,7 @@ bnxt_hwrm_func_qcfg(struct bnxt_softc *softc) goto end; softc->legacy_db_size = le16_to_cpu(resp->legacy_l2_db_size_kb) * 1024; + softc->db_offset = le16toh(resp->legacy_l2_db_size_kb) * 1024; if (BNXT_CHIP_P5(softc)) { if (BNXT_PF(softc)) @@ -1316,6 +1317,7 @@ bnxt_hwrm_func_qcfg(struct bnxt_softc *softc) else min_db_offset = DB_VF_OFFSET_P5; softc->legacy_db_size = min_db_offset; + softc->db_offset = min_db_offset; } softc->db_size = roundup2(le16_to_cpu(resp->l2_doorbell_bar_size_kb) * diff --git a/sys/dev/bnxt/bnxt_en/bnxt_ulp.c b/sys/dev/bnxt/bnxt_en/bnxt_ulp.c index 3c1f62cb4da3..9950858f0eef 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_ulp.c +++ b/sys/dev/bnxt/bnxt_en/bnxt_ulp.c @@ -125,7 +125,7 @@ static void bnxt_fill_msix_vecs(struct bnxt_softc *bp, struct bnxt_msix_entry *e ent[i].vector = bp->irq_tbl[idx + i].vector; ent[i].ring_idx = idx + i; if (BNXT_CHIP_P5_PLUS(bp)) - ent[i].db_offset = DB_PF_OFFSET_P5; + ent[i].db_offset = bp->db_offset; else ent[i].db_offset = (idx + i) * 0x80; @@ -449,6 +449,7 @@ static inline void bnxt_set_edev_info(struct bnxt_en_dev *edev, struct bnxt_soft edev->pdev = bp->pdev; edev->softc = bp; edev->l2_db_size = bp->db_size; + edev->l2_db_offset = bp->db_offset; mtx_init(&bp->en_ops_lock, "Ethernet ops lock", NULL, MTX_DEF); if (bp->flags & BNXT_FLAG_ROCEV1_CAP) diff --git a/sys/dev/bnxt/bnxt_en/bnxt_ulp.h b/sys/dev/bnxt/bnxt_en/bnxt_ulp.h index 0108293046d7..bbf16304456a 100644 --- a/sys/dev/bnxt/bnxt_en/bnxt_ulp.h +++ b/sys/dev/bnxt/bnxt_en/bnxt_ulp.h @@ -94,6 +94,9 @@ struct bnxt_en_dev { #define BNXT_EN_MH(edev) ((edev)->flags & BNXT_EN_FLAG_MULTI_HOST) const struct bnxt_en_ops *en_ops; struct bnxt_ulp ulp_tbl[BNXT_MAX_ULP]; + int l2_db_offset; /* Doorbell BAR offset + * of non-cacheable. + */ int l2_db_size; /* Doorbell BAR size in * bytes mapped by L2 * driver. diff --git a/sys/dev/bnxt/bnxt_re/ib_verbs.c b/sys/dev/bnxt/bnxt_re/ib_verbs.c index 0383a16757aa..dba0f348c414 100644 --- a/sys/dev/bnxt/bnxt_re/ib_verbs.c +++ b/sys/dev/bnxt/bnxt_re/ib_verbs.c @@ -276,6 +276,10 @@ static void __to_ib_speed_width(u32 espeed, u8 *speed, u8 *width) *speed = IB_SPEED_HDR; *width = IB_WIDTH_4X; break; + case SPEED_400000: + *speed = IB_SPEED_NDR; + *width = IB_WIDTH_4X; + break; default: *speed = IB_SPEED_SDR; *width = IB_WIDTH_1X; @@ -1666,23 +1670,24 @@ static int bnxt_re_init_user_qp(struct bnxt_re_dev *rdev, return rc; bytes = (qplib_qp->sq.max_wqe * qplib_qp->sq.wqe_size); + bytes = PAGE_ALIGN(bytes); /* Consider mapping PSN search memory only for RC QPs. */ if (qplib_qp->type == CMDQ_CREATE_QP_TYPE_RC) { psn_sz = _is_chip_gen_p5_p7(rdev->chip_ctx) ? sizeof(struct sq_psn_search_ext) : sizeof(struct sq_psn_search); - if (rdev->dev_attr && BNXT_RE_HW_RETX(rdev->dev_attr->dev_cap_flags)) + if (rdev->dev_attr && _is_host_msn_table(rdev->dev_attr->dev_cap_ext_flags2)) psn_sz = sizeof(struct sq_msn_search); psn_nume = (qplib_qp->wqe_mode == BNXT_QPLIB_WQE_MODE_STATIC) ? qplib_qp->sq.max_wqe : ((qplib_qp->sq.max_wqe * qplib_qp->sq.wqe_size) / sizeof(struct bnxt_qplib_sge)); - if (BNXT_RE_HW_RETX(rdev->dev_attr->dev_cap_flags)) + if (rdev->dev_attr && _is_host_msn_table(rdev->dev_attr->dev_cap_ext_flags2)) psn_nume = roundup_pow_of_two(psn_nume); bytes += (psn_nume * psn_sz); + bytes = PAGE_ALIGN(bytes); } - bytes = PAGE_ALIGN(bytes); umem = ib_umem_get_compat(rdev, context, udata, ureq.qpsva, bytes, IB_ACCESS_LOCAL_WRITE, 1); if (IS_ERR(umem)) { @@ -5294,11 +5299,9 @@ int bnxt_re_alloc_ucontext(struct ib_ucontext *uctx_in, } genp5 = _is_chip_gen_p5_p7(cctx); - if (BNXT_RE_ABI_VERSION > 5) { - resp.modes = genp5 ? cctx->modes.wqe_mode : 0; - if (rdev->dev_attr && BNXT_RE_HW_RETX(rdev->dev_attr->dev_cap_flags)) - resp.comp_mask = BNXT_RE_COMP_MASK_UCNTX_HW_RETX_ENABLED; - } + resp.modes = genp5 ? cctx->modes.wqe_mode : 0; + if (rdev->dev_attr && _is_host_msn_table(rdev->dev_attr->dev_cap_ext_flags2)) + resp.comp_mask = BNXT_RE_COMP_MASK_UCNTX_HW_RETX_ENABLED; resp.pg_size = PAGE_SIZE; resp.cqe_sz = sizeof(struct cq_base); diff --git a/sys/dev/bnxt/bnxt_re/ib_verbs.h b/sys/dev/bnxt/bnxt_re/ib_verbs.h index cb9f7974e92d..e8c840f8946a 100644 --- a/sys/dev/bnxt/bnxt_re/ib_verbs.h +++ b/sys/dev/bnxt/bnxt_re/ib_verbs.h @@ -77,10 +77,18 @@ struct bnxt_re_dev; #define SPEED_200000 200000 #endif +#ifndef SPEED_400000 +#define SPEED_400000 400000 +#endif + #ifndef IB_SPEED_HDR #define IB_SPEED_HDR 64 #endif +#ifndef IB_SPEED_NDR +#define IB_SPEED_NDR 128 +#endif + #define RDMA_NETWORK_IPV4 1 #define RDMA_NETWORK_IPV6 2 diff --git a/sys/dev/bnxt/bnxt_re/main.c b/sys/dev/bnxt/bnxt_re/main.c index 3d26d21f3fc7..0e0cc32218bd 100644 --- a/sys/dev/bnxt/bnxt_re/main.c +++ b/sys/dev/bnxt/bnxt_re/main.c @@ -1411,12 +1411,14 @@ static void bnxt_re_set_db_offset(struct bnxt_re_dev *rdev) dev_info(rdev_to_dev(rdev), "Couldn't get DB bar size, Low latency framework is disabled\n"); /* set register offsets for both UC and WC */ - if (_is_chip_p7(cctx)) - res->dpi_tbl.ucreg.offset = offset; - else + if (_is_chip_p7(cctx)) { + res->dpi_tbl.ucreg.offset = en_dev->l2_db_offset; + res->dpi_tbl.wcreg.offset = en_dev->l2_db_size; + } else { res->dpi_tbl.ucreg.offset = res->is_vf ? BNXT_QPLIB_DBR_VF_DB_OFFSET : BNXT_QPLIB_DBR_PF_DB_OFFSET; - res->dpi_tbl.wcreg.offset = res->dpi_tbl.ucreg.offset; + res->dpi_tbl.wcreg.offset = res->dpi_tbl.ucreg.offset; + } /* If WC mapping is disabled by L2 driver then en_dev->l2_db_size * is equal to the DB-Bar actual size. This indicates that L2 @@ -3592,19 +3594,24 @@ static int bnxt_re_dev_init(struct bnxt_re_dev *rdev, u8 op_type, u8 wqe_mode) goto release_rtnl; } + set_bit(BNXT_RE_FLAG_NET_RING_ALLOC, &rdev->flags); + if (!rdev->chip_ctx) goto release_rtnl; - /* Program the NQ ID for DBQ notification */ - if (rdev->chip_ctx->modes.dbr_pacing_v0 || - bnxt_qplib_dbr_pacing_en(rdev->chip_ctx) || - bnxt_qplib_dbr_pacing_ext_en(rdev->chip_ctx)) { - rc = bnxt_re_initialize_dbr_pacing(rdev); - if (!rc) - rdev->dbr_pacing = true; - else - rdev->dbr_pacing = false; - dev_dbg(rdev_to_dev(rdev), "%s: initialize db pacing ret %d\n", - __func__, rc); + + if (!(_is_chip_p7(rdev->chip_ctx))) { + /* Program the NQ ID for DBQ notification */ + if (rdev->chip_ctx->modes.dbr_pacing_v0 || + bnxt_qplib_dbr_pacing_en(rdev->chip_ctx) || + bnxt_qplib_dbr_pacing_ext_en(rdev->chip_ctx)) { + rc = bnxt_re_initialize_dbr_pacing(rdev); + if (!rc) + rdev->dbr_pacing = true; + else + rdev->dbr_pacing = false; + dev_dbg(rdev_to_dev(rdev), "%s: initialize db pacing ret %d\n", + __func__, rc); + } } vec = rdev->nqr.msix_entries[BNXT_RE_AEQ_IDX].vector; diff --git a/sys/dev/bnxt/bnxt_re/qplib_fp.c b/sys/dev/bnxt/bnxt_re/qplib_fp.c index 3f1b02406f7f..d4b439b05588 100644 --- a/sys/dev/bnxt/bnxt_re/qplib_fp.c +++ b/sys/dev/bnxt/bnxt_re/qplib_fp.c @@ -388,10 +388,14 @@ static void bnxt_qplib_service_nq(unsigned long data) struct bnxt_qplib_srq *srq; struct nq_srq_event *nqsrqe = (struct nq_srq_event *)nqe; + u8 toggle; q_handle = le32_to_cpu(nqsrqe->srq_handle_low); q_handle |= (u64)le32_to_cpu(nqsrqe->srq_handle_high) << 32; srq = (struct bnxt_qplib_srq *)q_handle; + toggle = (le16_to_cpu(nqe->info10_type) & NQ_CN_TOGGLE_MASK) + >> NQ_CN_TOGGLE_SFT; + srq->dbinfo.toggle = toggle; bnxt_qplib_armen_db(&srq->dbinfo, DBC_DBC_TYPE_SRQ_ARMENA); if (!nq->srqn_handler(nq, @@ -1075,8 +1079,11 @@ int bnxt_qplib_create_qp(struct bnxt_qplib_res *res, struct bnxt_qplib_qp *qp) u32 sqsz; qp->cctx = res->cctx; - if (res->dattr) + if (res->dattr) { qp->dev_cap_flags = res->dattr->dev_cap_flags; + qp->is_host_msn_tbl = _is_host_msn_table(res->dattr->dev_cap_ext_flags2); + } + /* General */ req.type = qp->type; req.dpi = cpu_to_le32(qp->dpi->dpi); @@ -1087,7 +1094,7 @@ int bnxt_qplib_create_qp(struct bnxt_qplib_res *res, struct bnxt_qplib_qp *qp) psn_sz = _is_chip_gen_p5_p7(qp->cctx) ? sizeof(struct sq_psn_search_ext) : sizeof(struct sq_psn_search); - if (BNXT_RE_HW_RETX(qp->dev_cap_flags)) { + if (qp->is_host_msn_tbl) { psn_sz = sizeof(struct sq_msn_search); qp->msn = 0; } @@ -1103,7 +1110,7 @@ int bnxt_qplib_create_qp(struct bnxt_qplib_res *res, struct bnxt_qplib_qp *qp) hwq_attr.aux_depth = (psn_sz) ? _set_sq_size(sq, qp->wqe_mode) : 0; /* Update msn tbl size */ - if (BNXT_RE_HW_RETX(qp->dev_cap_flags) && psn_sz) { + if (qp->is_host_msn_tbl && psn_sz) { if (qp->wqe_mode == BNXT_QPLIB_WQE_MODE_STATIC) hwq_attr.aux_depth = roundup_pow_of_two(_set_sq_size(sq, qp->wqe_mode)); else @@ -1131,8 +1138,7 @@ int bnxt_qplib_create_qp(struct bnxt_qplib_res *res, struct bnxt_qplib_qp *qp) req.sq_pg_size_sq_lvl = pg_sz_lvl; req.sq_fwo_sq_sge = cpu_to_le16(((0 << CMDQ_CREATE_QP_SQ_FWO_SFT) & CMDQ_CREATE_QP_SQ_FWO_MASK) | - ((BNXT_RE_HW_RETX(qp->dev_cap_flags)) ? - BNXT_MSN_TBLE_SGE : sq->max_sge & + (sq->max_sge & CMDQ_CREATE_QP_SQ_SGE_MASK)); req.scq_cid = cpu_to_le32(qp->scq->id); @@ -1764,7 +1770,7 @@ static void bnxt_qplib_fill_psn_search(struct bnxt_qplib_qp *qp, return; /* Handle MSN differently on cap flags */ - if (BNXT_RE_HW_RETX(qp->dev_cap_flags)) { + if (qp->is_host_msn_tbl) { bnxt_qplib_fill_msn_search(qp, wqe, swq); return; } @@ -1897,7 +1903,7 @@ static u16 _translate_q_full_delta(struct bnxt_qplib_q *que, u16 wqe_bytes) } static void bnxt_qplib_pull_psn_buff(struct bnxt_qplib_qp *qp, struct bnxt_qplib_q *sq, - struct bnxt_qplib_swq *swq, bool hw_retx) + struct bnxt_qplib_swq *swq, bool is_host_msn_tbl) { struct bnxt_qplib_hwq *sq_hwq; u32 pg_num, pg_indx; @@ -1909,8 +1915,11 @@ static void bnxt_qplib_pull_psn_buff(struct bnxt_qplib_qp *qp, struct bnxt_qplib return; tail = swq->slot_idx / sq->dbinfo.max_slot; - if (hw_retx) + if (is_host_msn_tbl) { + /* For HW retx use qp msn index */ + tail = qp->msn; tail %= qp->msn_tbl_sz; + } pg_num = (tail + sq_hwq->pad_pgofft) / (PAGE_SIZE / sq_hwq->pad_stride); pg_indx = (tail + sq_hwq->pad_pgofft) % (PAGE_SIZE / sq_hwq->pad_stride); buff = (void *)(sq_hwq->pad_pg[pg_num] + pg_indx * sq_hwq->pad_stride); @@ -1935,6 +1944,7 @@ int bnxt_qplib_post_send(struct bnxt_qplib_qp *qp, struct bnxt_qplib_swq *swq; bool sch_handler = false; u16 slots_needed; + bool msn_update; void *base_hdr; void *ext_hdr; __le32 temp32; @@ -1976,7 +1986,7 @@ int bnxt_qplib_post_send(struct bnxt_qplib_qp *qp, sw_prod = sq_hwq->prod; swq = bnxt_qplib_get_swqe(sq, &wqe_idx); swq->slot_idx = sw_prod; - bnxt_qplib_pull_psn_buff(qp, sq, swq, BNXT_RE_HW_RETX(qp->dev_cap_flags)); + bnxt_qplib_pull_psn_buff(qp, sq, swq, qp->is_host_msn_tbl); swq->wr_id = wqe->wr_id; swq->type = wqe->type; @@ -2010,6 +2020,9 @@ int bnxt_qplib_post_send(struct bnxt_qplib_qp *qp, wqe->num_sge, &sw_prod); if (data_len < 0) goto queue_err; + /* Make sure we update MSN table only for wired wqes */ + msn_update = true; + /* Specifics */ switch (wqe->type) { case BNXT_QPLIB_SWQE_TYPE_SEND: @@ -2064,6 +2077,7 @@ int bnxt_qplib_post_send(struct bnxt_qplib_qp *qp, ext_sqe->avid = cpu_to_le32(wqe->send.avid & SQ_SEND_AVID_MASK); sq->psn = (sq->psn + 1) & BTH_PSN_MASK; + msn_update = false; } else { sqe->length = cpu_to_le32(data_len); if (qp->mtu) @@ -2157,6 +2171,7 @@ int bnxt_qplib_post_send(struct bnxt_qplib_qp *qp, "\tflags = 0x%x\n" "\tinv_l_key = 0x%x\n", sqe->wqe_type, sqe->flags, sqe->inv_l_key); + msn_update = false; break; } case BNXT_QPLIB_SWQE_TYPE_FAST_REG_MR: @@ -2207,6 +2222,7 @@ int bnxt_qplib_post_send(struct bnxt_qplib_qp *qp, sqe->zero_based_page_size_log, sqe->l_key, *(u32 *)sqe->length, sqe->numlevels_pbl_page_size_log, ext_sqe->pblptr, ext_sqe->va); + msn_update = false; break; } case BNXT_QPLIB_SWQE_TYPE_BIND_MW: @@ -2236,6 +2252,7 @@ int bnxt_qplib_post_send(struct bnxt_qplib_qp *qp, sqe->wqe_type, sqe->flags, sqe->access_cntl, sqe->mw_type_zero_based, sqe->parent_l_key, sqe->l_key, sqe->va, ext_sqe->length_lo); + msn_update = false; break; } default: @@ -2243,8 +2260,10 @@ int bnxt_qplib_post_send(struct bnxt_qplib_qp *qp, rc = -EINVAL; goto done; } - swq->next_psn = sq->psn & BTH_PSN_MASK; - bnxt_qplib_fill_psn_search(qp, wqe, swq); + if (!qp->is_host_msn_tbl || msn_update) { + swq->next_psn = sq->psn & BTH_PSN_MASK; + bnxt_qplib_fill_psn_search(qp, wqe, swq); + } queue_err: bnxt_qplib_swq_mod_start(sq, wqe_idx); diff --git a/sys/dev/bnxt/bnxt_re/qplib_fp.h b/sys/dev/bnxt/bnxt_re/qplib_fp.h index 527c377f0aa5..fd2d8a08c818 100644 --- a/sys/dev/bnxt/bnxt_re/qplib_fp.h +++ b/sys/dev/bnxt/bnxt_re/qplib_fp.h @@ -390,6 +390,7 @@ struct bnxt_qplib_qp { u32 msn_tbl_sz; /* get devflags in PI code */ u16 dev_cap_flags; + bool is_host_msn_tbl; }; diff --git a/sys/dev/bnxt/bnxt_re/qplib_res.c b/sys/dev/bnxt/bnxt_re/qplib_res.c index f527af031176..9051f4c9f2b7 100644 --- a/sys/dev/bnxt/bnxt_re/qplib_res.c +++ b/sys/dev/bnxt/bnxt_re/qplib_res.c @@ -1139,7 +1139,8 @@ int bnxt_qplib_map_db_bar(struct bnxt_qplib_res *res) ucreg->bar_id = RCFW_DBR_PCI_BAR_REGION; ucreg->bar_base = pci_resource_start(res->pdev, ucreg->bar_id); - ucreg->offset = 65536; + if (_is_chip_gen_p5(res->cctx)) + ucreg->offset = 65536; ucreg->len = ucreg->offset + PAGE_SIZE; diff --git a/sys/dev/bnxt/bnxt_re/qplib_res.h b/sys/dev/bnxt/bnxt_re/qplib_res.h index 6468207a49aa..914694ee3b8c 100644 --- a/sys/dev/bnxt/bnxt_re/qplib_res.h +++ b/sys/dev/bnxt/bnxt_re/qplib_res.h @@ -616,6 +616,12 @@ static inline bool _is_hw_retx_supported(u16 dev_cap_flags) /* Disable HW_RETX */ #define BNXT_RE_HW_RETX(a) _is_hw_retx_supported((a)) +static inline bool _is_host_msn_table(u16 dev_cap_ext_flags2) +{ + return (dev_cap_ext_flags2 & CREQ_QUERY_FUNC_RESP_SB_REQ_RETRANSMISSION_SUPPORT_MASK) == + CREQ_QUERY_FUNC_RESP_SB_REQ_RETRANSMISSION_SUPPORT_HOST_MSN_TABLE; +} + static inline bool _is_cqe_v2_supported(u16 dev_cap_flags) { return dev_cap_flags & @@ -650,7 +656,7 @@ static inline void bnxt_qplib_ring_db32(struct bnxt_qplib_db_info *info, #define BNXT_QPLIB_INIT_DBHDR(xid, type, indx, toggle) \ (((u64)(((xid) & DBC_DBC_XID_MASK) | DBC_DBC_PATH_ROCE | \ (type) | BNXT_QPLIB_DBR_VALID) << 32) | (indx) | \ - ((toggle) << (BNXT_QPLIB_DBR_TOGGLE_SHIFT))) + (((u32)(toggle)) << (BNXT_QPLIB_DBR_TOGGLE_SHIFT))) static inline void bnxt_qplib_write_db(struct bnxt_qplib_db_info *info, u64 key, void __iomem *db, @@ -724,7 +730,7 @@ static inline void bnxt_qplib_armen_db(struct bnxt_qplib_db_info *info, u64 key = 0; u8 toggle = 0; - if (type == DBC_DBC_TYPE_CQ_ARMENA) + if (type == DBC_DBC_TYPE_CQ_ARMENA || type == DBC_DBC_TYPE_SRQ_ARMENA) toggle = info->toggle; /* Index always at 0 */ key = BNXT_QPLIB_INIT_DBHDR(info->xid, type, 0, toggle); @@ -746,7 +752,7 @@ static inline void bnxt_qplib_srq_arm_db(struct bnxt_qplib_db_info *info) u64 key = 0; /* Index always at 0 */ - key = BNXT_QPLIB_INIT_DBHDR(info->xid, DBC_DBC_TYPE_SRQ_ARM, 0, 0); + key = BNXT_QPLIB_INIT_DBHDR(info->xid, DBC_DBC_TYPE_SRQ_ARM, 0, info->toggle); bnxt_qplib_write_db(info, key, info->priv_db, &info->shadow_key); } diff --git a/sys/dev/bnxt/bnxt_re/qplib_sp.c b/sys/dev/bnxt/bnxt_re/qplib_sp.c index c414718a816f..31a0878e421b 100644 --- a/sys/dev/bnxt/bnxt_re/qplib_sp.c +++ b/sys/dev/bnxt/bnxt_re/qplib_sp.c @@ -185,6 +185,7 @@ int bnxt_qplib_get_dev_attr(struct bnxt_qplib_rcfw *rcfw) attr->page_size_cap = BIT_ULL(28) | BIT_ULL(21) | BIT_ULL(12); bnxt_qplib_query_version(rcfw, attr->fw_ver); + attr->dev_cap_ext_flags2 = le16_to_cpu(sb->dev_cap_ext_flags_2); for (i = 0; i < MAX_TQM_ALLOC_REQ / 4; i++) { temp = le32_to_cpu(sb->tqm_alloc_reqs[i]); diff --git a/sys/dev/bnxt/bnxt_re/qplib_sp.h b/sys/dev/bnxt/bnxt_re/qplib_sp.h index e306db3b9d8e..fa7dd890501c 100644 --- a/sys/dev/bnxt/bnxt_re/qplib_sp.h +++ b/sys/dev/bnxt/bnxt_re/qplib_sp.h @@ -71,6 +71,7 @@ struct bnxt_qplib_dev_attr { u32 l2_db_size; u8 tqm_alloc_reqs[MAX_TQM_ALLOC_REQ]; u8 is_atomic; + u16 dev_cap_ext_flags2; u16 dev_cap_flags; u64 page_size_cap; u32 max_dpi; From nobody Fri Feb 27 12:05:41 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMn8j4JFjz6Ss0K for ; Fri, 27 Feb 2026 12:05:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMn8j0yWYz3D7Z for ; Fri, 27 Feb 2026 12:05:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772193941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=omnNPN8rk/cM/FKu09xdYSy0bWAyOz1MdcltdK027DA=; b=yP0JOPHxtoLl2b321gJ4vvFnU4BbV+tu6aHkETTww0F7hg/oCpU5GHwpcrAsQuq0H3jqDX HJiBukNegq3Uc8dZXZllp3cbE2gErrM9fjTA8BaLhQdLkCwccCa7btZZqb5UW+VHjnD/gQ 66pCTJ4TC2zZ+jQKtWC5AA67px+OFbd4GIyFr51hkFJaoh8eSpcWn13/g4oXfNvCFPovQI YtDaIG/ykaP/b3rsAsPLOkRSU7JMEIZYxIAtGXGVinU758xzoMP5nIUSPH83pT6P5PRUlY vyTw5v8UKrJK5d1nHKtGgKT/uNvpruQFllG/khuIZ1afeP/iM3RBxcprvLNlkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772193941; a=rsa-sha256; cv=none; b=i26uKRQsXsoIEvOZH10WWGk5xmTvu/i9UXhkrOa0TLH7dOt270YiPVAHgUBylxWC/JC9cp DwltiKayl805nniiryOldgaCfoiH30tofIoL/MoSZKpo94nm5TH55neE3BtOeoInyYOKEg wpK62KivyJbWkMk0QLzBdVhrB5DK+gg9QsK1LtxWQblt7iuyveIiwqZE654cHlNYZ+H1qI XcIHiV4yy77Ezi4ZoVJJgHWrc2VqKNUV0fMGeAvQmdAGxMvxWkmb4h97MiiRZ6tjCtoRzZ 55ovX9r5h4qDgp9P4yRWZzKjkhEdZfMn0eckYW1Aimk2Nfup9FsPQZN1TFBH+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=1772193941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=omnNPN8rk/cM/FKu09xdYSy0bWAyOz1MdcltdK027DA=; b=CKLXvOV9NLS8ApcSBtRJVv6LnWHnt2H1Sb6lGV2Q0qxaxH0DYkqspvWX6Ae9dUKLQ6QY7p 7VCK8YRnon84Xn7KNkYbwpM+cq7+5cLVVFDS9MV0lgTvd0amY/GXmQfoo8eU7gyYBSbs0E eLNVSpHkPKACK1Wv4rpo2WeFUsTo6QAm7VCSDr5d6m8AL3wPu2yblwYEmZLgTc3lZVqR3z OHN1eTuJFpulVIVuqx5As/9Jx6qRdt8Po2DukZWUb8GFQMZX4i/zx5FwcnbvbCR79ldRkO vLY5nOFwzZ/rRFVBOOFW/Z3CtJGQonJXELM5RREkTFiCx9ppLocHhCzQcujo1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMn8j0Q4mz2Lt for ; Fri, 27 Feb 2026 12:05:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3dd1a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 12:05:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Sumit Saxena Subject: git: d7d5ddb27a37 - stable/15 - share/mk: Include libbnxtre entry in bsd.libnames.mk List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ssaxena X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d7d5ddb27a37f4ef1ee36a547a5389b4f557a65f Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 12:05:41 +0000 Message-Id: <69a18895.3dd1a.3ff6ee38@gitrepo.freebsd.org> The branch stable/15 has been updated by ssaxena: URL: https://cgit.FreeBSD.org/src/commit/?id=d7d5ddb27a37f4ef1ee36a547a5389b4f557a65f commit d7d5ddb27a37f4ef1ee36a547a5389b4f557a65f Author: Sumit Saxena AuthorDate: 2025-12-03 11:21:10 +0000 Commit: Sumit Saxena CommitDate: 2026-02-27 12:04:39 +0000 share/mk: Include libbnxtre entry in bsd.libnames.mk Add libbnxtre entry in bsd.libnames.mk file. MFC-After: 3 days Reviewed-by: sumit.saxena@broadcom.com Differential-Revision: https://reviews.freebsd.org/D49603 (cherry picked from commit b42fda6be3fde001cdbe1623cc89b1dc9faf1b93) --- lib/ofed/Makefile | 1 + share/mk/bsd.libnames.mk | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/ofed/Makefile b/lib/ofed/Makefile index a16e93adc149..5421e2e43cd1 100644 --- a/lib/ofed/Makefile +++ b/lib/ofed/Makefile @@ -10,6 +10,7 @@ SUBDIR= \ libcxgb4 \ libmlx4 \ libmlx5 \ + libbnxtre \ libirdma \ libibnetdisc \ libopensm diff --git a/share/mk/bsd.libnames.mk b/share/mk/bsd.libnames.mk index 54bdfd301cd3..955e3c4ebdef 100644 --- a/share/mk/bsd.libnames.mk +++ b/share/mk/bsd.libnames.mk @@ -118,6 +118,7 @@ LIBMENU?= ${LIBDESTDIR}${LIBDIR_BASE}/libmenu.a LIBMILTER?= ${LIBDESTDIR}${LIBDIR_BASE}/libmilter.a LIBMLX4?= ${LIBDESTDIR}${LIBDIR_BASE}/libmlx4.a LIBMLX5?= ${LIBDESTDIR}${LIBDIR_BASE}/libmlx5.a +LIBBNXTRE?= ${LIBDESTDIR}${LIBDIR_BASE}/libbnxtre.a LIBMP?= ${LIBDESTDIR}${LIBDIR_BASE}/libmp.a LIBMT?= ${LIBDESTDIR}${LIBDIR_BASE}/libmt.a LIBNCURSES?= ${LIBDESTDIR}${LIBDIR_BASE}/libncurses.a From nobody Fri Feb 27 12:05:42 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMn8k3bMRz6Ss3Q for ; Fri, 27 Feb 2026 12:05:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMn8k1jjxz3D7h for ; Fri, 27 Feb 2026 12:05:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772193942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sc0FHnokMzVxPSI77Q7huSLjLjzAZ/ImyOXH48uiueE=; b=x1LvSNYAv27R3ZdHIEQY/fTHoDPkBSSGuXmsucO8s35nq1jDs4iAc1K77OPC6W1v49mISW VCqR5dOTgVUJXiG3fyKKZYsEnJ1b7P57UWsE2OHY5X6kE6llDZIxMHqPqJ2bDoyTiFzzAT PEKzreFb2HKT1vSfpjYruRI7bivEI66DSgN+WUMffwQ6CBwbDgQMwnGtA6S6qKaSc65Tiq onnghXEnaL8aCZTZ61m0FCnM3LdDuJ8b3ruWnILrr4+dupfNFIcVb4AczXdy7ncfVF8buA jpQNyD1ytnfnQGiZ4qnVhg6MMdPc7AK6woB9bs8Vik82ymIKiulXoxVVitpYJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772193942; a=rsa-sha256; cv=none; b=BBGItCfVj3vnX71epl1Qw1SOUHTPAF6u634wmDFR/Idxqlan8w5kI8luPby8b1vLzrraI8 DOwYRBC3OBAneRLkA9hDBBfmYdlaUiJbiZCIHXi6jKT6NxJ1Tvklb76GaDfW6O4ACdP+Lp crmJpIICqPpHS2PwwWf6UAmpey4IuSw/EOC8ZIhViHzPz5EunfLKq6S5lAIXcxnIBvlEJV NQE2AcTe0T4r/s/hfPvB0zPHw3sc/Fq+SGisbZ4KboaZSWyICudYUixXOZeduXpYP9ruLy l6OV6iydtFjt/avYL6/DUK0fFVuCTgWO3UmysQSh0i6B6gK3pTOLWvo+aB89pQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772193942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sc0FHnokMzVxPSI77Q7huSLjLjzAZ/ImyOXH48uiueE=; b=cgL8bdVitvbLCcaK5W+WwQ9Sg0+f9WCc9f+70AeTodO9jE83SkZeaSUw1nvAmEax0bYlxx jmIGcbtnzNQgcfDQw5U1zEhB8FHTKWUUCQDmPXL8a+D/2WI+O1/dEC07BrcgzceMnrh+Cs vyUzM5H7lRoBbwRZiZ2JQKIFEWapAws+363EIWjjW9JynLVlHJA9+C8kTYCJRR8cRRrq7m 9pc+BEojXDJhybBVYv8v+n9quFXKmg3sgUa8/HChqxq9wY+YyEMBP6zrnlQrvkc4wWsSXT t3SCgJiBCYskTBWssVJ6y9ytETaWgwnpCaS/Flq6epnAlfc47QjI087tiF55hg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMn8k1CRvz1kQ for ; Fri, 27 Feb 2026 12:05:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3dad3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 12:05:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Mark Johnston From: Sumit Saxena Subject: git: cb2852147edf - stable/15 - ofed: Define SUBDIR_DEPEND_libbnxtre List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ssaxena X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: cb2852147edf66eb77143102549d57689ff29a47 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 12:05:42 +0000 Message-Id: <69a18896.3dad3.5e5cdb51@gitrepo.freebsd.org> The branch stable/15 has been updated by ssaxena: URL: https://cgit.FreeBSD.org/src/commit/?id=cb2852147edf66eb77143102549d57689ff29a47 commit cb2852147edf66eb77143102549d57689ff29a47 Author: Mark Johnston AuthorDate: 2025-12-03 14:21:07 +0000 Commit: Sumit Saxena CommitDate: 2026-02-27 12:04:39 +0000 ofed: Define SUBDIR_DEPEND_libbnxtre Fixes: b42fda6be3fd ("share/mk: Include libbnxtre entry in bsd.libnames.mk") (cherry picked from commit 962ad7c1984decda1f16b079cd09ca9310e7f7ce) --- lib/ofed/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ofed/Makefile b/lib/ofed/Makefile index 5421e2e43cd1..a3265813f7d2 100644 --- a/lib/ofed/Makefile +++ b/lib/ofed/Makefile @@ -19,6 +19,7 @@ SUBDIR_DEPEND_libibcm= libibverbs SUBDIR_DEPEND_librdmacm= libibverbs SUBDIR_DEPEND_libibmad= libibumad SUBDIR_DEPEND_libvendor= libibumad +SUBDIR_DEPEND_libbnxtre= libibverbs SUBDIR_DEPEND_libcxgb4= libibverbs SUBDIR_DEPEND_libmlx4= libibverbs SUBDIR_DEPEND_libmlx5= libibverbs From nobody Fri Feb 27 12:05:43 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMn8l6hgHz6Ss7J for ; Fri, 27 Feb 2026 12:05:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMn8l2TDnz3DTf for ; Fri, 27 Feb 2026 12:05:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772193943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IzxlJrgPblfnfKZonMRFpIAE1oY58EpdkeSyYgSp/lw=; b=beY8aVx0lDwo2JqK4/vmjTF8gREzYSAgr88lAoGCm/NitLHmA7R3KFvQM4qP1490JYM+Li eOGytp++ekmh2ltZN1d++WJo3b3WQsS/3dYwtAoZiAAhEZLU+qjEJh+IFYndOGMDgb/SMK Wp44i7/sCe6dwf6OZT8VZKMRun95jzwsnnb6D8i8ruMir0nredcK/PacWE2A2SWZvkyDdF TlmJPCZ3UwcISq+Vg74O5T3Gm2JbrtK0tA4ZzgPmFEn4TIszZDgVo+YPvRCgTbhJwcGQVz jv2P2G0oEaqFpkitGSYnzPgtRzywLgq/U9kURrUB33WqRgzVZVJljRgjRnNw3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772193943; a=rsa-sha256; cv=none; b=lcQcg3huUpl6NhgiKUjzjQHiZZxzhPb3JtS6IRf/XYk3fBVfC/kOGG3oZriD8vnPjQO4S4 7wWJK3pwIOUQipdCHHx33neE0rUKVRhWMGmWg6rFS+6NL0sFDbWUcJliYqxMw/QPwRGo3q wOTYh7nM47MQPvToVRYd2XyxSmLCiOCdVLer1J/X0+wHnO0q73Ph+CuVAghYsvPmcEtNIZ tmHq0HV0P31cpIbZAxDk/tQxojVsXCHZDw5wkwMG0K1VfeGuuftjKt8GMDyeASx9n4cW0t 4xIiewD1CqAOj7veuR2702Vr1ux1tP9mF+rtZ5NzTERQC/qKEk1+6Ml0FRt4aA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772193943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IzxlJrgPblfnfKZonMRFpIAE1oY58EpdkeSyYgSp/lw=; b=RGAdJT9leut4lCfExGPoSV3oLEnnQGVSgxqbDvxus3nal6jGFCmGbnlZgcdx5fTwRsju3J gJ31rqUeiR02J6RWzBzOuaPQhiy5+b2GGv7tyVEBsuWCfC2loZtY4jnVhhazeMkk3p2Tnh JY7Bddby5xewNk7jBW8zclGGzPvFAkPea2a7BO6qITtYcLyDhm9JbujL9bLHBvuQ7jjyA5 /eWAFbs99Ygd5ze5cMjcTpOUYEOzNqd1oXSwkxCuC5enQ8TCSxgRNBeSFG7zqsjqwYahC7 UhXIjwLUVT7V1HspVZHe3ybxeNB2LdKWyK/+eP9CXTFv5dK674mErqIlUl84Kw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMn8l1jr2z1yf for ; Fri, 27 Feb 2026 12:05:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3cbc1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 12:05:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Mark Johnston From: Sumit Saxena Subject: git: c5b8c66fe1ae - stable/15 - libpcap: Fix dependency definitions for libpcap List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ssaxena X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c5b8c66fe1ae042fe964c173ad58f633c30ffa44 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 12:05:43 +0000 Message-Id: <69a18897.3cbc1.5e904c73@gitrepo.freebsd.org> The branch stable/15 has been updated by ssaxena: URL: https://cgit.FreeBSD.org/src/commit/?id=c5b8c66fe1ae042fe964c173ad58f633c30ffa44 commit c5b8c66fe1ae042fe964c173ad58f633c30ffa44 Author: Mark Johnston AuthorDate: 2025-12-03 14:26:50 +0000 Commit: Sumit Saxena CommitDate: 2026-02-27 12:04:39 +0000 libpcap: Fix dependency definitions for libpcap Commit 35dd53a9e132 ("librdmacm/libibverbs: Statically bound libbnxtre.so.1 to rping") causes a build failure, since src.libnames.mk declares a depencency on libbnxtre.so, but the libpcap Makefile and prebuild lib dependencies were not updated accordingly. Fix the declarations. Fixes: 35dd53a9e132 ("librdmacm/libibverbs: Statically bound libbnxtre.so.1 to rping") Reviewed by: ssaxena Differential Revision: https://reviews.freebsd.org/D54048 (cherry picked from commit 73e8fe62466a8ae5576473d9be4c6df9a6eedab0) --- Makefile.inc1 | 2 ++ lib/libpcap/Makefile | 1 + 2 files changed, 3 insertions(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index e3e0409c8e4e..72ca2e69c7f7 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -3421,10 +3421,12 @@ _prebuild_libs+= \ lib/ofed/libibmad \ lib/ofed/libibumad \ lib/ofed/complib \ + lib/ofed/libbnxtre \ lib/ofed/libmlx5 lib/ofed/libibmad__L: lib/ofed/libibumad__L lib/ofed/complib__L: lib/libthr__L +lib/ofed/libbnxt__L: lib/ofed/libibverbs__L lib/libthr__L lib/ofed/libmlx5__L: lib/ofed/libibverbs__L lib/libthr__L .endif diff --git a/lib/libpcap/Makefile b/lib/libpcap/Makefile index c4bd175b502a..7f8d8e65d79c 100644 --- a/lib/libpcap/Makefile +++ b/lib/libpcap/Makefile @@ -151,6 +151,7 @@ CFLAGS+= -DPCAP_SUPPORT_NETMAP .if ${MK_OFED} != "no" SRCS+= pcap-rdmasniff.c LIBADD+= ibverbs +LIBADD+= bnxtre LIBADD+= mlx5 CFLAGS+= -DPCAP_SUPPORT_RDMASNIFF .endif From nobody Fri Feb 27 12:05:44 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMn8m63w5z6Ss0S for ; Fri, 27 Feb 2026 12:05:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMn8m3K1Vz3DMB for ; Fri, 27 Feb 2026 12:05:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772193944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lyh1BcHC3KnoiVypk2x90BkUL8RHJFN+zyrYz9UdJGQ=; b=mjeIOP2c0tTYKw1RALpAWDR2MPSL93Yurv540/kTxqpgSH7G/16LqDyJmDr5N/2qE6XW/c luu8aI/FRMMHLJ88xMU6R9YYk+VHShPp7XMs4d3mAe22JR+CgCQLTCvTsdmM+R+UHyQ4R7 ZIY9mFm7JbZ9hF5kZvjxQw0WTT6Z8MmG8Q085FxjuVQkinGVRfGdzIuLqv37y39cCIqvsR 7Jb8G+2Stcy59G7hUH6C/wtXWgLlslieLiTn0t7ztk8GmUwroiYumvf49hmQdAAeP4Zevs 4rxNUdBHxPFYsdsJbr/ZGlvtU6vIK14x30BSK8CPMW2WdTO7iwe23VvjgckqLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772193944; a=rsa-sha256; cv=none; b=cg4d9ROMm0Ls0ZeRef0d/t+G8K2u71uvCTAoogKTRoTLQTJPUtMJDutZLy4d57HPFvIf2q b7lfey/8cJvPBUEbssyFW7pkwTPKpt2H1bgbf4l5ldrY0d3iqo00nnsYSNdpjJKvu+UfV0 Zk7/BNzo71oJkOYET5eEzvG37qtEtmqgxe+XXIJymzo9appUQLaTK17zvgthKXS7Qdsr3M xPSG78TvhqKvrEcRV2JeFMf+RkpCHkrteVLE/0nn8XcvL5zzN4gyWJJv0j0Occ3ZCJEpT0 EG2m+Dy3a9fWJplHONGdz9P43u81C0ntwEcVlyMfnuNqJBppMNPqYfrhZxvRwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772193944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lyh1BcHC3KnoiVypk2x90BkUL8RHJFN+zyrYz9UdJGQ=; b=V6Wr7NCYGJeACg6Tpiq3eHvz1Iht5HmvNDDfmu2h4MvYH3zTYJz86BQqVDf748snLcqCrz QpsWkW9WTLY/2VP1n5M56a5sWoV/5OQoGdwZih6aLHXjX87hACRi/N2gfX1xmQnKFW/h/U hoU3NhH0951IkAYLKbnbEzNUbfitBHu6ORkMuq+8iknutBay0lkF24OJzs4VK3OkwYZW90 UyUEUUPbU3+5UYP6CKd3N75iRWr/gY+zA7Wfz0cuf63a3riJYd4g16nyG4hphdDPI6rocr pI9t5nQ4aRIDAkEuHQdGEZQ0XIIw3g61Tx9wCD4Q08VQthW4bK7PeUosprZxmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMn8m2W02z1wj for ; Fri, 27 Feb 2026 12:05:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d45e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 12:05:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Mark Johnston From: Sumit Saxena Subject: git: 4243e2e99654 - stable/15 - Makefile.inc1: Fix the libbnxtre dependency target List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ssaxena X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4243e2e996541a4e4b2e81eef66aafa0c2b07809 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 12:05:44 +0000 Message-Id: <69a18898.3d45e.267a0260@gitrepo.freebsd.org> The branch stable/15 has been updated by ssaxena: URL: https://cgit.FreeBSD.org/src/commit/?id=4243e2e996541a4e4b2e81eef66aafa0c2b07809 commit 4243e2e996541a4e4b2e81eef66aafa0c2b07809 Author: Mark Johnston AuthorDate: 2025-12-03 15:06:54 +0000 Commit: Sumit Saxena CommitDate: 2026-02-27 12:04:39 +0000 Makefile.inc1: Fix the libbnxtre dependency target Reported by: Jenkins Fixes: 73e8fe62466a ("libpcap: Fix dependency definitions for libpcap") (cherry picked from commit e19230d49ffc02944d93645800da934b7aeee078) --- Makefile.inc1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 72ca2e69c7f7..e65021c356c5 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -3426,7 +3426,7 @@ _prebuild_libs+= \ lib/ofed/libibmad__L: lib/ofed/libibumad__L lib/ofed/complib__L: lib/libthr__L -lib/ofed/libbnxt__L: lib/ofed/libibverbs__L lib/libthr__L +lib/ofed/libbnxtre__L: lib/ofed/libibverbs__L lib/libthr__L lib/ofed/libmlx5__L: lib/ofed/libibverbs__L lib/libthr__L .endif From nobody Fri Feb 27 12:05:45 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMn8p4bHKz6Ss52 for ; Fri, 27 Feb 2026 12:05:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMn8n4315z3DMN for ; Fri, 27 Feb 2026 12:05:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772193945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DDRio30+nKNG0dHECnY2D/zDtFWd4O0gGY91xzgK1/s=; b=rCQuaaQAWHbOGD6gTwn0lyPwvthUrRQ4PreGDIjn4vUkvAJfNqJZCahKkFKTBg09hSQgY3 fZgsGE5mQF4w9kUivpPjf13o4qcTLud1+ea6P9+77Ob9Ud4yDkxjK8aBur+Q3hsRxi/oPI Jz6mfUEbNcONsWeXtTis0QERCHxB5oAN5+vDErHqs55A5Kci6YtJwShfl02XX2trVLgvKB GYJ/a/sKlJqSgASiZWHRcLabOu8kMna+HMFacNVIsnBMFaYTDDvM/oUaWFunnvVZlUb1ae 7hG3B97PQc+80LDDvGp1IO8tjn17J4pwbYad0s9wuEdpoJXLnSqzi3TCWWu6Cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772193945; a=rsa-sha256; cv=none; b=MxHcpqkY0KoAqZ8iULZ2/36WZ0q4sXZHQklMVjJFykm6/w3JtjGX799FWgxnuHCEWO+d6/ 3XilKtmFK3QmRP5uwUYZO+61jbTRlIWa7BgFqHu6aONlkNW8Sa++E59mA3PhCIiQxzKZPc L391F5Zh5jcUAxgNHQvUWvknlAZ6h3AwXQqZHj6bo/SBViS1IMKDlRb1eOP2yd8O1bE5wY 2urfknc0QZt9xEq3FzWBdZbraZkRFhpS5e7zdnFXPywlQSbwJwgOB4r4YbPl3SJKQRMypU mC/Qu8XYBzt3pl4f8cTMrIpqiw6MP3V6egO5D0Lc4WvLLm4RKPzofSo7J6XkPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772193945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DDRio30+nKNG0dHECnY2D/zDtFWd4O0gGY91xzgK1/s=; b=Ccq3bb6zr+8aqFFYL0SrXSeILmDX5mweLYstw5Khg2eFq8Bs0XWGgosC+wRNInPTkHlwIg vq37BIXRj8p2u4qtz5/znUGKuTapOG2p46VyryYE2TqCtn8dZ14aIS5sq3MNxF8z9a1BRg BRDolKAuPg19VQksTjD1mRsA0muBV9cdIfiLXO+hBB4tCYkuMpY2vW4fURcB2pR2JYPtyQ 2HbtUwJio5PMnsif2uuhXn3F64RzhGGj49k5P0uiWISmIVxwpc9L84xE66uzJ4nUc5Zc7r 239vh30JtSRsjwt7vdao0aH8UbE+GlggdPZLDLj1BKcC0DDOeHi0VJaSExHiiw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMn8n3N2vz1yh for ; Fri, 27 Feb 2026 12:05:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3db2b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 12:05:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Sreekanth Reddy From: Sumit Saxena Subject: git: 6032b83fa4ea - stable/15 - librdmacm/libibverbs: Add bnxtre RDMA provider to OFED build infrastructure List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ssaxena X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6032b83fa4ea1cb48fe78adf5498ee24a19a4f45 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 12:05:45 +0000 Message-Id: <69a18899.3db2b.621e9891@gitrepo.freebsd.org> The branch stable/15 has been updated by ssaxena: URL: https://cgit.FreeBSD.org/src/commit/?id=6032b83fa4ea1cb48fe78adf5498ee24a19a4f45 commit 6032b83fa4ea1cb48fe78adf5498ee24a19a4f45 Author: Sreekanth Reddy AuthorDate: 2026-01-09 11:34:43 +0000 Commit: Sumit Saxena CommitDate: 2026-02-27 12:04:39 +0000 librdmacm/libibverbs: Add bnxtre RDMA provider to OFED build infrastructure Extend the FreeBSD OFED build framework to include the Broadcom bnxtre RDMA provider library. This change: -Registers libbnxtre in src.libnames.mk so it is built and installed as part of the OFED libraries. -Adds bnxtre to the OFED pcap dependency set when MK_OFED is enabled. -Declares proper dependency mappings for bnxtre (ibverbs, pthread). -Introduces LIBBNXTREDIR for consistent object directory handling. -Updates libibverbs and librdmacm build rules to link against libbnxtre, enabling Broadcom RoCE device support at runtime. -libbnxtre library uses below constructor to register with the libibverbs, static attribute((constructor)) void bnxt_re_register_driver(void) These updates ensure that applications using libibverbs and librdmacm can discover and use Broadcom bnxt RDMA devices on FreeBSD. Reviewed by: markj, ssaxena Differential Revision: https://reviews.freebsd.org/D54368 MFC after: 3 days (cherry picked from commit 821c6c43a33d5b72290ee7f896d28438a3b789e1) --- share/mk/src.libnames.mk | 7 +++++-- usr.bin/ofed/libibverbs/Makefile.inc | 2 +- usr.bin/ofed/librdmacm/Makefile.inc | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index f066e7bbdd94..00dd8b9e5d4d 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -286,6 +286,7 @@ _LIBRARIES+= \ irdma \ mlx4 \ mlx5 \ + bnxtre \ rdmacm \ osmcomp \ opensm \ @@ -361,7 +362,7 @@ _DP_cap_sysctl= nv _DP_cap_syslog= nv _DP_crypt= md .if ${MK_OFED} != "no" -_DP_pcap= ibverbs mlx5 +_DP_pcap= ibverbs mlx5 bnxtre .endif _DP_pjdlog= util _DP_usb= pthread @@ -511,11 +512,12 @@ _DP_cxgb4= ibverbs pthread _DP_ibcm= ibverbs _DP_ibmad= ibumad _DP_ibnetdisc= osmcomp ibmad ibumad -_DP_ibumad= +_DP_ibumad= _DP_ibverbs= _DP_irdma= ibverbs pthread _DP_mlx4= ibverbs pthread _DP_mlx5= ibverbs pthread +_DP_bnxtre= ibverbs pthread _DP_rdmacm= ibverbs _DP_osmcomp= pthread _DP_opensm= pthread @@ -810,6 +812,7 @@ LIBIBVERBSDIR= ${_LIB_OBJTOP}/lib/ofed/libibverbs LIBIRDMADIR= ${_LIB_OBJTOP}/lib/ofed/libirdma LIBMLX4DIR= ${_LIB_OBJTOP}/lib/ofed/libmlx4 LIBMLX5DIR= ${_LIB_OBJTOP}/lib/ofed/libmlx5 +LIBBNXTREDIR= ${_LIB_OBJTOP}/lib/ofed/libbnxtre LIBRDMACMDIR= ${_LIB_OBJTOP}/lib/ofed/librdmacm LIBOSMCOMPDIR= ${_LIB_OBJTOP}/lib/ofed/complib LIBOPENSMDIR= ${_LIB_OBJTOP}/lib/ofed/libopensm diff --git a/usr.bin/ofed/libibverbs/Makefile.inc b/usr.bin/ofed/libibverbs/Makefile.inc index 616c9bd54707..f8301c3d1073 100644 --- a/usr.bin/ofed/libibverbs/Makefile.inc +++ b/usr.bin/ofed/libibverbs/Makefile.inc @@ -3,6 +3,6 @@ _spath=${SRCTOP}/contrib/ofed/libibverbs BINDIR?= /usr/bin CFLAGS+= -I${_spath} -LIBADD+= ibverbs mlx4 mlx5 cxgb4 irdma pthread +LIBADD+= ibverbs mlx4 mlx5 bnxtre cxgb4 irdma pthread WARNS?= 2 diff --git a/usr.bin/ofed/librdmacm/Makefile.inc b/usr.bin/ofed/librdmacm/Makefile.inc index 74f32fe08b42..66fcf2ac267b 100644 --- a/usr.bin/ofed/librdmacm/Makefile.inc +++ b/usr.bin/ofed/librdmacm/Makefile.inc @@ -3,6 +3,6 @@ _spath=${SRCTOP}/contrib/ofed/librdmacm BINDIR?= /usr/bin CFLAGS+= -I${SRCTOP}/contrib/ofed -LIBADD+= ibverbs rdmacm irdma mlx4 mlx5 cxgb4 pthread +LIBADD+= ibverbs rdmacm irdma mlx4 mlx5 bnxtre cxgb4 pthread WARNS?= 0 From nobody Fri Feb 27 16:56:19 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMvc94893z6TSSS for ; Fri, 27 Feb 2026 16: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMvc91nVzz3xxm for ; Fri, 27 Feb 2026 16: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=1772211385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1vcJYjmEzGolfSDyRD1MLEVJ7UzQBgkrytAfVi1ZFSY=; b=Y7bCupcC4DmGs9Ap/z87jdWBgt6eF1T3nFvW+C0tp2xeeK/XWrM7d8nGmfz+OgkuppPOMd 0gxaHwAYwmSm97cWiU/VdjVPXnsISR/lxD9GTZfe8F7w7UbSWRMozhlPLe+kZhg4Lb7IR/ bdlCr1HWth54vavN16Vq1s1EgnctXQS6xJnXu8Vw6luqiPaHR14eGClJnsu//MA2KVdLYF B07Kw+pI/4nALngyTuP0AIli1+Luo5/aWfNTfYpFOP64+KJlObXgzgJOSXsAa6nKkzKN05 UUe8EYP3kYFrKT24Rg7wVeIfaEdHYG+Ykrz3bxmQrl2HUOku6JdtjWwnCeGw3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772211385; a=rsa-sha256; cv=none; b=ApENUFVyXKYWbZbOqRb0ojGGmE9x8Faec69ssszPKWf/2vhis5wOw2AH8Hq4Q8+MXI2BNt aLNXbVp/6du6GM879Xo5Wn2ieyTz0qEkyCwE/ltelQs3HljGdxeCWLQRSwsjo4ezHXpuDi oAs6GS0L+/tFEu9WY78dSxcA/BpgP9GuHqS7Bcf+cgAkA3JPRlSlW2zWAsohn0QiiKAkbB aHLXZ86bq1jGbvXt4jPX/WFs65dIn1QF8AUErUoVFjcqtAFbzaHLU29y9LkkjvAXQ0eQTQ q5KKvX2u2KdzNMJhHBjkmPzILq4ePh2eNxoZ/AjmjJSwdepuq0Un+L1Sn7DB2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772211385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1vcJYjmEzGolfSDyRD1MLEVJ7UzQBgkrytAfVi1ZFSY=; b=YHaGtINIKuMzXsBXFpYBZswdeGAhw3EB0uwlIUcfmtvARi6zHVRu1thExB3oetA/CPk1wS UKU9Fz/dDhG59WPdbSrccIK3quOYAVFwRvD2VtGGzjAkSAfLDFOdHOOnaxedSodTofZDYx 5tM9d6KsACats/ahRjipw6O3jV/FkkxyAyzEz8MIZYeJeGW5aa05FTpxGyw3Jezc4+CnYy SPH4C4o1RoUcGuK07w9kiZpZGXilKKRX0wVmh3JfeFcbOJUBthL9IvQjPduyhoVx5qWtAU 5XSlwJZ95GnDwlVljZXZ4Vtrp7dzOuQO2GTWMUPMwMMQsMMSDUDkfPjoSmoEpg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMvc91KNpz8yk for ; Fri, 27 Feb 2026 16:56:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d510 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 16:56:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Mark Johnston Subject: git: e9fd63676d1e - internal/admin - Release fuz@ from mentorship List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/internal/admin X-Git-Reftype: branch X-Git-Commit: e9fd63676d1e9d14a3716dab45b0af4ca92f8c04 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 16:56:19 +0000 Message-Id: <69a1ccb3.3d510.52b7a4b2@gitrepo.freebsd.org> The branch internal/admin has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e9fd63676d1e9d14a3716dab45b0af4ca92f8c04 commit e9fd63676d1e9d14a3716dab45b0af4ca92f8c04 Author: Mark Johnston AuthorDate: 2026-02-27 16:55:24 +0000 Commit: Mark Johnston CommitDate: 2026-02-27 16:55:24 +0000 Release fuz@ from mentorship Approved by: srcmgr (implicit) --- mentors | 1 - 1 file changed, 1 deletion(-) diff --git a/mentors b/mentors index 25c0776586dc..bc048e0b90ff 100644 --- a/mentors +++ b/mentors @@ -15,7 +15,6 @@ bms glebius Co-mentor: imp brd allanjude Co-mentor: bapt bryanv grehan def oshogbo -fuz markj jaeyoon imp jrhall imp js asomers From nobody Fri Feb 27 17:18:36 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMw5m6xlHz6Sm3v for ; Fri, 27 Feb 2026 17:18:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMw5m6Pfdz43V6 for ; Fri, 27 Feb 2026 17:18:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772212716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=thPzq9CealSElZOEj2hg0f6dox8yg9tSknt5VpB/bUk=; b=C8zcfHyOqpFjJU4E9AciVjl9+rDaBtY47T9ZtUCMYruMys/tE/8MvJiZEmUJraqAALWRuj c8Kz0zlTrzJ0yk0I8VfZ1OgLb/cq35OXXC+Ng1RHLvQTXZYVaKC3w3ykL73uaEPmMsRz3b /1BgA8LWs3DpgpnvHDxe66jynCOyEHUdzyijRPHLvJMnnlQoEBZlke1Nd5rElvGf8FfW+w /eHoBDBxXP0LM5g871EqoV+bKj+wiSatZaTvEGtFWprorst/QdaMRxY9llT5BMPXLWszdR wFl+KnhshWohnal/LCtSWrO171S+RrAi+A08ZI0oBbeMfOqLXN7v3zYgw5fm7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772212716; a=rsa-sha256; cv=none; b=KRy8t3fLZy2krV5+rjiOqPmmEjOnGCmDkDuFMG0O3RROOW8/jCGYPmyNgCQJ2Xx0XfJJvm fiH/uogyzd20j9h8dTNrQDhSeBGhV7220gmlOp2XJOmuCikj1O7aM+xF5170MNT2JaWgh1 9FVcwMfvExbYR6Mnwbs4VAVygDWPY22eGXIKrndtfAud/7/cb9QiTEikzVMhO6AxtFcxCh nnqKQBNPCBugkSAcs0MALOs3ilYDvnIDryPcYfF4Q0ogbBAWu/3K5k2Eil8vGus9OFL/56 JAFlR6Mql0AmRBVpSPm5an4VUIVBr4W8HejLUe611NZbrCg8KXGypHm+YgIQlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772212716; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=thPzq9CealSElZOEj2hg0f6dox8yg9tSknt5VpB/bUk=; b=ZqUOwRQ9y/qRQcRJJMueDO57xRzLyPvFG4/tc0oYyEx3DCmiIRTMgSoYgV52CxG+rirHt3 8lU9/1vDTfUFXeNwBOZiFyn2odh8U/KgcmMlnzL5tNblVJEpKi5AJTyNvUI2xwIKbpJpRG yQaQA4zEzsiSP/PLEoyBtyoKRWlDBrq75ly8INEX5EMWroehzHd9trdgFyRp0vLISVDFWw ZWzEilUM6caijIozI3Bch4UExhqhwbo70yqWv8/g9/QDdVqgrBP8DJjSb/lSA2YeSKh4Tf JDdlFweejPLVWXLF+zm3dAVk6i4hQ8knAnLJRUFn3EkMguR40Fa1hwWjwjo16Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMw5m5ShbzB2k for ; Fri, 27 Feb 2026 17:18:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f3b3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 17:18:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Joseph Mingrone Subject: git: 75d9de99aec2..759433479b95 - vendor/tcpdump - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrm X-Git-Repository: src X-Git-Refname: refs/heads/vendor/tcpdump X-Git-Reftype: branch X-Git-Commit: 759433479b9549a0c247a8ff0bdd9521354a429c X-Git-Oldrev: 75d9de99aec2d9f3bdc495c91bbd6d7a2392e2a3 X-Git-Newrev: 759433479b9549a0c247a8ff0bdd9521354a429c Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 17:18:36 +0000 Message-Id: <69a1d1ec.3f3b3.4286ec81@gitrepo.freebsd.org> The branch vendor/tcpdump has been updated by jrm: URL: https://cgit.FreeBSD.org/src/log/?id=75d9de99aec2..759433479b95 759433479b95 Import tcpdump 4.99.6 From nobody Fri Feb 27 17:18:36 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMw5n2HPjz6Slvl for ; Fri, 27 Feb 2026 17:18:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMw5n03c0z43ND for ; Fri, 27 Feb 2026 17:18:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772212717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LNMXSxRt8NGMWJS2n6Ayx8LaVucVSJKpgGp52ftgdZ8=; b=oj9zTrurh1a7ISFFzgbYnlf/Gdhm5OnqHj7I9lnp9G19x2nXRYtMEeYIlZGkcExFNZJ7wy 4R7rWM3Qm1SP5KzEZTaosfPyCUAeuDx7wBmjw8CLY4cLk/H/0ZD1wGbBMRQLpZ4wrvyazJ icxOykZ4tjlZ8OTdoQ678569BZmidIbsSrrawu1jf6lyQT34qlL9aq2W4dx4bO12VHgEOQ rBU1b4NKb27OHW4IxakmH5Yw1Ka80TRycfgfNyMzO928X5hdCvJNPR7MH3XqOBAYAHNZai Y1OGw8r35OyN9JIeOI1RWgdr8XxAsvDTcMFWt6xuvX6BR1D/u6xuHiEzqMFpgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772212717; a=rsa-sha256; cv=none; b=XdZvYVRX7kDSqiiZSJ0/TQgnDue1uV1EkgNCytDwi5T8YYRpSGo1PDf7/TPn31nV7ixIbB pv+korXi3lfOHfyC9121RQV6306wYQCrtypMhPXEWDbSRa44Xs7eZnKOwq6xD8QCAR25N2 OtummdPv6praxqnvLlOgXfT/2fQusYrenep+TK5F+OZkBLYeI86/NrrylroXu8hOmGI4On xe3MauQHYkIQGZd0WpDJGGgUxHvXteDAbyPMtXACM6hlPy4KRawYUKeGhh/nZquzd+4obH XTKVkC44MywBn/I5xGPIHpVFv9M/GzXhkScoPCGCQ7IkG8r2aWqSCeLhyckFlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772212717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LNMXSxRt8NGMWJS2n6Ayx8LaVucVSJKpgGp52ftgdZ8=; b=cliIksBjMOEVpRXmhB2v9EjyyHR+yS91549C9M1r/Jk/pjrnpv96NtwRFMoSbBkT+Ijxb8 ZRPPcNBpEUYYHXILU8K23H8ezuNcuIRBCHj5/qr5nuKVcE+eXEcLJmucR0g3j94T0VhD3h uN2CeulyN9+fh3W7TUbK1bibOdUczkj3KHg0GS0Y3CCaGY5N21jep0zXLFofpMGNLYyEG1 d9DVIuF5cC1oYduMwmFIB6NitHxWz/Ahzj8gyhQvMM9cvctpQUYPl1E6MyJLDtTFxoj8XI d1ckTJlweTx6XQ0ymKFhnYCryRhlnZByADbPlgK3qh9WTONKrAFLlaC0xKSBZg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMw5m5lXFz9v2 for ; Fri, 27 Feb 2026 17:18:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ee2b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 17:18:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Joseph Mingrone Subject: git: e41ee40401a6 - Create tag vendor/tcpdump/4.99.6 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrm X-Git-Repository: src X-Git-Refname: refs/tags/vendor/tcpdump/4.99.6 X-Git-Reftype: annotated tag X-Git-Commit: e41ee40401a6f7bfcdd5c48acc5b17c646df53fb Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 17:18:36 +0000 Message-Id: <69a1d1ec.3ee2b.51b920f9@gitrepo.freebsd.org> The annotated tag vendor/tcpdump/4.99.6 has been created by jrm: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/tcpdump/4.99.6 tag vendor/tcpdump/4.99.6 Tagger: Joseph Mingrone TaggerDate: 2026-02-27 17:14:56 +0000 Tag tcpdump 4.99.6. commit 759433479b9549a0c247a8ff0bdd9521354a429c Author: Joseph Mingrone AuthorDate: 2026-02-27 17:14:29 +0000 Commit: Joseph Mingrone CommitDate: 2026-02-27 17:14:29 +0000 Import tcpdump 4.99.6 From nobody Fri Feb 27 17:27:44 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMwJL0nsKz6SnFD; Fri, 27 Feb 2026 17:27:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMwJL0DHkz45bc; Fri, 27 Feb 2026 17:27:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772213266; h=from:from:reply-to:subject:subject: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=c5/E9LrUYy1kLVkdI7YZG4Um67LBCFZsEQ5XiRopeTA=; b=Oc6XSQoZ9Lidbn6p/XmF8ORpFH5kpq+5+hx8QPj+lH61DuoBU5wQGtD88zlFz9zGZImuUD RaSnO57EB2/BbPHMOnqPNduFcvYoFmAqB/Qe17VdQo9QXid+z/Q8oA9YkcuYSN9K17q0Tg Vueuy0eI6UVl2YcZZs/UEdXqtRiGrCmVxGjXahOMZhnuWUeRwG6i5D6XUQ9sqqtlwwrM0s qPsPXckUj7c/x5r7SjKdqYesSbrgEF0Zmu5FruNo1zGpbwqvq4+JscntOdYfjGfU0+B6Kp cuL0TMN6nPsbzbLxY3Z/eY9DL3KHlKDvNJ43Zr4TCtphHSuy75GlTC6AOT8rDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772213266; a=rsa-sha256; cv=none; b=ebrNDjnhIRN/nTrzUPJvK4Iq7Mp1nyiIo3qg6N+VPlIuGjWNOmiS4mdM+IhZGYLfPIGFX4 w/gVNVNHHwbIUyr/tIt9qchLwE4cUWRI3j8EKUz9xKJZLpzfNiroAcycAGn67ct76DdqoS 0Xp/HIeFDFkqKt0uqesWueXROCppNmGP7fu/pAIeWOoz150oOR52DBaVnDO/y+hadxFmGa yXtG0IBY+gPLggW//kowVPk+detCvVjDrLnF4v8G2/Y5A9QKEQdTwUOKmDZkMZJIOaC/qc B0r0OcU+BumKOjFX9wKu+geMv79NbaMsAdHX8z9tt36T+nNDNXzNrjkEuqdDvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772213266; h=from:from:reply-to:subject:subject: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=c5/E9LrUYy1kLVkdI7YZG4Um67LBCFZsEQ5XiRopeTA=; b=RXDfy3KpRpvv+MRdpfPHOpFaIg6a+Cn+tCOeUOvI8TD2DIv6aFRD42wBwM0xhKWnKjcT+t ImkTmbDWK5mlGE5LCjbyWcyRWQs4ZddTMtZR0miRAGVVXd6RyMpDs/h3vRK7ckBALtDz4v nGY6O4PQj2Y7YNN7cd2w0XVJlPh0HQKR9gc6w8HbHugiMqY36mnI8NLKUWq76p0MaMqCyl 404ufyHzTvxzd5pAcFErNUI1s3Lv01dBPIQZFKBUs0O1Jc1sP0MzPMS/bM59Cs5S1OJZK8 /4tKRxQ4TxxDY23cySD+C90GJ96qMYmmjcVhHKPboXX5HsPCvPgajGjCuZeVWA== Received: from [IPV6:2601:5c0:4202:5670:f561:a422:8150:b740] (unknown [IPv6:2601:5c0:4202:5670:f561:a422:8150:b740]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fMwJK4LgpzGcC; Fri, 27 Feb 2026 17:27:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <23acebb1-f71c-46e6-9eea-3fa44316335d@FreeBSD.org> Date: Fri, 27 Feb 2026 12:27:44 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: ee73475119ff - main - llvm: Link private LLVM libraries against compiler_rt for aarch64 Content-Language: en-US From: John Baldwin To: Jessica Clarke Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" , Andrew Turner References: <698a0b1e.1d294.40e36519@gitrepo.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2/9/26 11:47, John Baldwin wrote: > On 2/9/26 11:40, Jessica Clarke wrote: >> On 9 Feb 2026, at 16:28, John Baldwin wrote: >>> >>> The branch main has been updated by jhb: >>> >>> URL: https://cgit.FreeBSD.org/src/commit/?id=ee73475119ff7aa98bd11828625d524f6ab87f06 >>> >>> commit ee73475119ff7aa98bd11828625d524f6ab87f06 >>> Author: John Baldwin >>> AuthorDate: 2026-02-09 16:26:52 +0000 >>> Commit: John Baldwin >>> CommitDate: 2026-02-09 16:26:52 +0000 >>> >>> llvm: Link private LLVM libraries against compiler_rt for aarch64 >>> >>> This is required for GCC which uses libcalls for outlined atomics. >> >> This doesn’t seem right, they’re provided by libgcc.a, so why aren’t >> they being pulled in? libcompiler_rt.a doesn’t even have the symbols. > > My guess is that we don't link libraries against libgcc by default, only > binaries (maybe this is a GCC feature/bug vs clang)? I have another review > open for a couple of google test libraries which similarly fail to link. So after some more digging (along with Jessica), it seems that GCC only uses -lgcc_s (and not -lgcc) for C++ (but not C) on both Linux and FreeBSD. clang's FreeBSD toolchain driver is supposed to mimic GCC but doesn't, it applies the C rules even for C++ linking, so clang is implicitly adding both -lgcc and -lgcc_s for C++. On Linux, libgcc.so is a linker script that includes both the dynamic library and -lgcc which is how the static libgcc (including outline atomics for aarch64) is effectively linked into C++ shared libraries on Linux. (Note: libgcc.so is a linker script on seemingly all arches on Linux, not just aarch64) So I think we have a couple of choices here. I can patch the devel/freebsd-gccN ports to stop passing -shared-libgcc to cc1plus which will cause GCC to follow the same rules as clang on FreeBSD (passing -lgcc -as-needed -lgcc_s -no-as-needed instead of -lgcc_s), or we could change libgcc.so to be a linker script to match Linux (and then eventually fix the FreeBSD driver in clang to only pass -lgcc_s for C++ linking) (I think Andrew already has a review to make libgcc.so a linker script). I can see arguments both ways. Using a linker script seems kind of dumb given all the hoops GCC goes to internally to decide whether or not to link only shared or static or both. (Esp given libgcc is in theory part of the compiler, so the compiler should know that libgcc_s should depend on libgcc and be able to encode that in the default drivers.) OTOH, the linker script approach would mean we would more closely align with Linux. I think Jess favors patching GCC. Does anyone else have any strong opinions? -- John Baldwin From nobody Fri Feb 27 18:43:29 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMxzp4DwQz6Sxwb for ; Fri, 27 Feb 2026 18:43:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMxzp3SRTz3JZ0 for ; Fri, 27 Feb 2026 18:43:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772217814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JVkLcrdQZ7k5rTkcZAczvdMy2RfCAlVUb0L082+e6yQ=; b=fZP7pbUMHBq9U/EuwjT1fAa+Vai/hgAKi65/QmcG7jpYieGEjAuMhbnDm8PfXEqMOyKXZ9 Uh9EdeqijOGwbva82OZef4sBk2qVPP5VI/ORzmS/mm6jtHhRfrhY9LrQl5RVblDXpUsvhF brJnLeIj2FdVkhlaLQdw7tOZtD0UHGZnnmpfhURyIw9zOilgfnIS9npyzaI1+f/genG7IA n/96T/XctOWMQQGF+Q1nW9afnD/5ztiLRGKBbwY6S6AxAUGp3uZ64vta1ljNhu/g7MBw1V Qa43cjvrJ4r7huFhwH/s4rL5EeLgdQP/tdWA0WrO3DBFi/TGXVxmJcuusgOCWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772217814; a=rsa-sha256; cv=none; b=wXB2MnopyexIS6P3hf7Hq7fw32wjJRFmjd2zET37grr1ljb1xojTVHLkNM1zH0a+47g4+3 hhFpNSOZ6x44HLqhn4mnCMbNzK84leq82aCWlwZTaOBXjlnmlDXR64tj5XlAAznHBAKgLF vAtmJitP8KQkn2BldaGR444ZY1YMLYzLMm8oroYCOnqKN/eV+rVrtLkVYn8I/vSumGe9O0 kFORK2AXZJllPb6rDnWWx4Um8jcf9JVY3x647RqnmLLIWDu0Kraq346ID2g2J37rL3HjwW S26w3m1DuORiqlVqRRvO8jRSnZZ1Sf8sQfgVIK+ua9D+JbJY9PnnigR44ap2Hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772217814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JVkLcrdQZ7k5rTkcZAczvdMy2RfCAlVUb0L082+e6yQ=; b=VPdnplXtVzay5n0UEM7k++uZA4RRXukHJQ2uJvrktUYbKdxtj4m471x0Xrx7Pv6KieD0Bm palzvI2GC2q52n5tpzJZcbR7Xuww2PwCFUHFEzAC8P6nylGQ7BO4w9Gbv2ab3fBYi8Q5PI Rwwrw4WJf+BSl4pM0KnTyT2C2lQZISqdBIDIfQyCqdBcpEr5FfO2/kG3242dCEVC4EiySI yfPTjt4ZpwXqvwaxYXtSj9R/zwXIf8j5iShx3MWYEKDSBiJxFUxFXSilw6qg0oIJkxZ5WS z2jt+cjtzkT21QxJIaihxN67wLwZ1SrLQ/stj0S85ymafSS3rwQx6+JyhSokSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMxzp2rYwzTTl for ; Fri, 27 Feb 2026 18:43:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 46c4b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 18:43:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: afbfc2a617ee - main - gre: unbreak LINT-NOINET List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: afbfc2a617ee16b4c3bafef869690b594f812690 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 18:43:29 +0000 Message-Id: <69a1e5d1.46c4b.27ac4081@gitrepo.freebsd.org> The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=afbfc2a617ee16b4c3bafef869690b594f812690 commit afbfc2a617ee16b4c3bafef869690b594f812690 Author: Enji Cooper AuthorDate: 2026-02-26 21:31:25 +0000 Commit: Enji Cooper CommitDate: 2026-02-27 18:43:20 +0000 gre: unbreak LINT-NOINET - Move some of the braces under their respective conditionals to make the statements more self-encapsulated and only define the `aliasreq` union in the event either INET or INET6 is defined. - Fix a copy-paste error: `in_gre_ioctl` should be `in6_gre_ioctl` in the INET6 case. Reported by: tinderbox Fixes: e1e18cc12e68 ("if_gre: Add netlink support with tests") Differential Revision: https://reviews.freebsd.org/D55546 --- sys/net/if_gre.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c index 758f25ccb859..f8036bf4446d 100644 --- a/sys/net/if_gre.c +++ b/sys/net/if_gre.c @@ -327,10 +327,10 @@ gre_clone_dump_nl(struct ifnet *ifp, struct nl_writer *nw) #endif } else if (sc->gre_family == AF_INET6) { #ifdef INET6 - if (in_gre_ioctl(sc, SIOCGIFPSRCADDR_IN6, (caddr_t)&ifr) == 0) + if (in6_gre_ioctl(sc, SIOCGIFPSRCADDR_IN6, (caddr_t)&ifr) == 0) nlattr_add_in6_addr(nw, IFLA_GRE_LOCAL, (const struct in6_addr *)&ifr.ifr_addr); - if (in_gre_ioctl(sc, SIOCGIFPDSTADDR_IN6, (caddr_t)&ifr) == 0) + if (in6_gre_ioctl(sc, SIOCGIFPDSTADDR_IN6, (caddr_t)&ifr) == 0) nlattr_add_in6_addr(nw, IFLA_GRE_LOCAL, (const struct in6_addr *)&ifr.ifr_dstaddr); #endif @@ -1041,10 +1041,16 @@ static int gre_set_addr_nl(struct gre_softc *sc, struct nl_pstate *npt, struct sockaddr *src, struct sockaddr *dst) { +#if defined(INET) || defined(INET6) union { +#ifdef INET struct in_aliasreq in; +#endif +#ifdef INET6 struct in6_aliasreq in6; +#endif } aliasreq; +#endif int error; /* XXX: this sanity check runs again in in[6]_gre_ioctl */ @@ -1057,16 +1063,18 @@ gre_set_addr_nl(struct gre_softc *sc, struct nl_pstate *npt, sx_xlock(&gre_ioctl_sx); error = in_gre_ioctl(sc, SIOCSIFPHYADDR, (caddr_t)&aliasreq.in); sx_xunlock(&gre_ioctl_sx); + } #endif #ifdef INET6 - } else if (src->sa_family == AF_INET6) { + else if (src->sa_family == AF_INET6) { memcpy(&aliasreq.in6.ifra_addr, src, sizeof(struct sockaddr_in6)); memcpy(&aliasreq.in6.ifra_dstaddr, dst, sizeof(struct sockaddr_in6)); sx_xlock(&gre_ioctl_sx); error = in6_gre_ioctl(sc, SIOCSIFPHYADDR_IN6, (caddr_t)&aliasreq.in6); sx_xunlock(&gre_ioctl_sx); + } #endif - } else + else error = EAFNOSUPPORT; if (error == EADDRNOTAVAIL) From nobody Fri Feb 27 19:11:40 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMycK4F4pz6T1kT for ; Fri, 27 Feb 2026 19:11:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMycK3KQsz3Mm9 for ; Fri, 27 Feb 2026 19:11:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772219505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NqyULnfe+Wvjikp1R6tPQEHnNMNQ18yQnb3xWq0VdV4=; b=cTrCa0XiZBj3WyPrtSF9dBn+EDqguTYaaqSUf9duQJ4anvhkWg2GtbIfvaDb4+XsovWVri CyzwdsYSDaik9+9MLgb2uY6a91YZr0ywz68GBQrYNC1xPTHbYyV/P54dStLGnRxauiuvhA 4r6bkeBmXb0RAUfk2DyIwms6mYfxnZ6aXhhnslbFAYiwT3WMI7ocVYqnxhmMQ4dSGS2MBv bp4riHsKTJ9gb9poae0qB4Id5SQsBh993dsZWUjdCNKYxlr/TSNUz2vY9HVTKTlp2WfJNB qyJkH7HiOdcSdb5XMY1uEY3/WUZGE9OsF3oyJpfv+P3Fat65Rc5A36CCkeCbiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772219505; a=rsa-sha256; cv=none; b=lEzp98/itk7yOSWiS96uLVPnQEEz3b2qPqDhM6O7f74a52hYaaOhFlayl0ahq55n/UNplK xilfcuw0leHJpfvdXLdohtEMNsyl2StWrlh6T9Nqq6S82Hlh5d8aqB6Dxp2zlV0krUCRaq /qqR1NSHXFFfrUefkuQgbwdI874Jb+Ofxdglc7cCXVvJ8+NKY6nPVhPnPHH+Ddcn3oR+/L BnIToEJ6Vtn7JEGddKZ7s0MkroDu0QT3U3KMGVeqQtmplQcJcwPZ+OLErqmzVGs9YHD8ML ZkPRL8GRjWG8ywnu1TzRZcw3LMZJ8/djlrirAx9fVcIhK3P90+2NMFKRxN3xbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772219505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NqyULnfe+Wvjikp1R6tPQEHnNMNQ18yQnb3xWq0VdV4=; b=efOdH2JYN78kTP6t9+TkbfK6sETf/PJ9NhQJ4x+hXOyNu7N0X8Ihkto7CEGG/avZiUhVHx RmcD2CcvyUwTUk1LbHPvzSaflTdrLqtwAo8CweGxrtzuMPedr0H1onawSAd5zqBAR3yCUh ACftaABt5RqN/A48oAubEadTcp/WqiTLAusOJOMf+h7c8gn7Q97QwoHsmH1Ncs3azufI+G gflHpXlJEwjhdakrZr2oW798hgJvVyNh5o87lTNCO06lG2+sDG80Xxdj+RbxFsqJohl+H6 2wlJR8ie8ZED/oxS0TBWax1yPPl73ye5Ux+0sHa7kbclFVtyf0Gz2Yh/Bs3u7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMycK2tcXzVfb for ; Fri, 27 Feb 2026 19:11:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1c232 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 19:11:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 960409d66048 - main - vmimage.subr: skip -dbg sets for WITHOUT_DEBUG_FILES/WITHOUT_KERNEL_SYMBOLS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 960409d660486c823615dc4cb2ff91793337ef20 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 19:11:40 +0000 Message-Id: <69a1ec6c.1c232.5547b73e@gitrepo.freebsd.org> The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=960409d660486c823615dc4cb2ff91793337ef20 commit 960409d660486c823615dc4cb2ff91793337ef20 Author: Navdeep Parhar AuthorDate: 2026-02-27 02:04:16 +0000 Commit: Navdeep Parhar CommitDate: 2026-02-27 19:05:14 +0000 vmimage.subr: skip -dbg sets for WITHOUT_DEBUG_FILES/WITHOUT_KERNEL_SYMBOLS This matches non-pkgbase behavior as installworld/installkernel skip the debug bits if these knobs are set. MFC after: 1 week Sponsored by: Chelsio Communications Reviewed by: cperciva Differential Revision: https://reviews.freebsd.org/D55572 --- release/tools/vmimage.subr | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index 3975e94913c9..97bf52205c93 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -72,14 +72,14 @@ vm_base_packages_list() { # Output a list of package sets equivalent to what we get from # "installworld installkernel distribution", aka. the full base # system. - for S in base kernels; do - echo FreeBSD-set-$S - echo FreeBSD-set-$S-dbg - done + echo FreeBSD-set-base + [ -z "${WITHOUT_DEBUG_FILES}" ] && echo FreeBSD-set-base-dbg + echo FreeBSD-set-kernels + [ -z "${WITHOUT_KERNEL_SYMBOLS}" ] && echo FreeBSD-set-kernels-dbg case ${TARGET_ARCH} in amd64 | aarch64 | powerpc64) echo FreeBSD-set-lib32 - echo FreeBSD-set-lib32-dbg + [ -z "${WITHOUT_DEBUG_FILES}" ] && echo FreeBSD-set-lib32-dbg esac echo FreeBSD-set-tests # Also install pkg, since systems with a packaged base system should From nobody Fri Feb 27 19:44:14 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMzKp6Dmpz6T5bk for ; Fri, 27 Feb 2026 19:44:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMzKp3q92z3Sq7 for ; Fri, 27 Feb 2026 19:44:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772221454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ADDI/Cq2/KC/ds83DdXs5saJy2KQ3u9GBkIZRgbjvVA=; b=QKncrEnFbb5ICuaR6UPCkYYFzva2aqbsJXCFaFyW9Yw+kQ9Zodfwo4Tx6oDSKKJs17zxwc 1BEbsNKyaVRkEFD2lde0TCk4V1XJPxuEvlEo3FbjB63F+DY1T3Tnj/a5QW4NFRW8BY9qJ1 BUz/KQ71xehS1e6r0y/whYeeHZ43SZdYSZLenpfc7vTFWdKUnbTM67y6lCiJjs0/udgtmA NWRtNPkI5K1f2wHQmifyY6E7oC+Ev4VnfmslNIkW3y3WbdY0r21bQhL+rWfqifXUowLX35 8XnkwiXQIA5/K5DV9krFAjtLGlVLANA/RWc6or4jEBVuW3AIttvg/LZU9VKozA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772221454; a=rsa-sha256; cv=none; b=YjqCzHCby7a9YF9l84GtJMi9NL5DYTdpPbNeALhyfI6MgXC45XjkKy11SF7YW1C75Tpt/g EhpRIY+R+TdpIN88AkUa+rItlNSUpzZRpytnJYhm3H7KSffnbQAhbhoqt2FSuPrfIlykrC Vhmu/HOvyoPPk/dd/FhbXi5ad4McjsUiEe0kZmK9SO1Htm2+kxZzi3/tpfIMbnExDzewTz LeIkDoUBPykeykZF2q1/kh4/u/GrNW15K8zobNSxP1aHC2FCPtKlw/dkyyiVHOhUj8GnOE ZDpP+jjPHnIaQwlmzxxXAbKEcsmGppM4l93koCzclUDZELMFSaoYVDG9Z2lPqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772221454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ADDI/Cq2/KC/ds83DdXs5saJy2KQ3u9GBkIZRgbjvVA=; b=HN0GxG5KReAeZwK0gDOz3eJK3RyXvRRZ/z++RftGejxtcG94o/3c8HM+av/tEGFnHgDKja +q0vAVi1RtfKzba+m2pxIEm2iRfz2eH9TI29yCc8XET89gP8wkIttHK0qgbcB+g5hYFBlm V9ul8VmvxAumhcURVfx0c1z2p0OYGHp7+Iipi95mqfUKTf3r2X1Kbm9fhBUcbRbGFyvuMw SOECH3cRqozi9ZCGxrQG7EbLEiN313pgzpxBRnuE4uex/QIHn6PRFuuFTZuiVjaNmmrG7r 6Qhz67Zc6icSWrE7WYymCOkMZPFlH0AxyogcSFr7aBn5Rbm6gw22lzYI9PNn/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 4fMzKp15LZzXTb for ; Fri, 27 Feb 2026 19:44:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1eb9e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 19:44:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: 1f2f5eba24aa - main - asmc(4): pull 32-bit support for the driver List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1f2f5eba24aa53e180a4eb46b772410e5a782469 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 19:44:14 +0000 Message-Id: <69a1f40e.1eb9e.56768185@gitrepo.freebsd.org> The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=1f2f5eba24aa53e180a4eb46b772410e5a782469 commit 1f2f5eba24aa53e180a4eb46b772410e5a782469 Author: Enji Cooper AuthorDate: 2026-01-05 03:36:55 +0000 Commit: Enji Cooper CommitDate: 2026-02-27 19:44:08 +0000 asmc(4): pull 32-bit support for the driver The asmc(4) driver should work for 32-bit Intel-based Macs, in theory, if the model details were added to the detection list. That being said, 32-bit Intel Macs were only released and available to the general public for 8 months [1], so the value in maintaining i386 support in the driver is reduced due to limited hardware access. Remove 32-bit support for the driver officially to make it clear its use is not supported. This should fix building `NOTES.i386` by proxy as well. Relnotes: yes MFC after: 2 weeks Fixes: f224591746b ("Add ASMC_DEBUG make option") Fixes: 8342d9f7b5f ("asmc(4): Stop building it on i386, as...") Differential Revision: https://reviews.freebsd.org/D55544 --- sys/x86/conf/NOTES | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/x86/conf/NOTES b/sys/x86/conf/NOTES index 643105096be2..501d4159b129 100644 --- a/sys/x86/conf/NOTES +++ b/sys/x86/conf/NOTES @@ -525,7 +525,6 @@ device ntb_hw_plx # PLX NTB hardware driver # pbio: Parallel (8255 PPI) basic I/O (mode 0) port (e.g. Advantech PCL-724) # smbios: DMI/SMBIOS entry point (requires EFIRT option) # vpd: Vital Product Data kernel interface -# asmc: Apple System Management Controller # si: Specialix International SI/XIO or SX intelligent serial card # tpm: Trusted Platform Module @@ -541,7 +540,6 @@ envvar hint.pbio.0.at="isa" envvar hint.pbio.0.port="0x360" device smbios device vpd -device asmc device tpm device rdrand_rng # Intel Bull Mountain RNG device aesni # AES-NI OpenCrypto module From nobody Fri Feb 27 19:59:21 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fMzgM3xV6z6T6tm for ; Fri, 27 Feb 2026 19:59:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fMzgL6Rqvz3V32 for ; Fri, 27 Feb 2026 19:59:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772222366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a2jV2DJHTm1LTNeAPtCfV0ByWpLWEexzI42BvOBx170=; b=xmNINJ5AT2jxBwQl7xcodiJTJkOQ2uetk2VKpYDN3O1uT2z+xChml9BRldzA8zn7pclwk6 JA0i1Khz0xnlv14YjYIM+lKaYtyyES5oDKx2r0b0sW6MnZbT0c/sgw9qJF9RiKRZVuWlcd mjHSt9Sx2FT+LfaEf0cWt1mOjor4po/UecblbKs1kDlOATY7XPCG9vUtDGD0EBp9viEFrW 17ZV9HmMDnX1wu1K3Vmh9tCvTM9vFZONi7/urATMZ80ViR3DoONExCYU5uc2fzYzdxOLZ5 QJRk3ZvwgNtnhzpM057CudqDshSGTfO0Ts5pfnR6tfxdgZXW9kjF/vjnozaNTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772222366; a=rsa-sha256; cv=none; b=ZazD0e7BUyWDoW1S3KWy2NNAQqULgcxjlO9/wZQGX8b5T1nY/2ZBMl7DXchUMf2Cm5raa9 aOmrJokz4U1jK90MyhzPunF/KgfDEISeI0w2LEC9jL6fJ7AtyIqueBePdVQjGetZHtOYPR uyW7v+qRbqwwHFYVVhXy7dNtk6/fufIUxPaVxZVzkcSmzvVHiNtG+dTK5+7q5IpXi4Cg/8 nL3vzKDvUXfBC2hIjjrlJiGws9f6enjt9TOWWMqHaLwdjqemFoskuoxWgyxPInYS5J3cIQ 7QspHgkDWu+2OXS1aZT6Q+Nq7VFqkGaLRLKOdWGatZ/Bc18M0138XzCygvHscA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772222366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a2jV2DJHTm1LTNeAPtCfV0ByWpLWEexzI42BvOBx170=; b=l0iriR8eYWON2RNexai3/nwgt3fyHDRc78Z5g2hDh9GXFj6i54wFTpte24WYVMtaAQA8nG xdg3EcJVdQHU8gyStZlIzsVpCw8OgoHS7qWe7C3t64N+GwYS+V+0piK5Uoo4Zw1fjFqqU9 Or4AuzS/nC7QqLq+sS+unDbffzjVlIG8r1ZYoAWFGCotOvHcZiZVPnmXyeK7KPm8aXd9EH C/BgiUqVoIXq24TuicdyRPDg24vLSmJG6lnYFOYxKs6g24jacBnAvuoQtXw14DpvKUDL2Q 5MHTWvtvMydGr7cujTHKzrXN4Ulf5uHnN+EbvOCgZQ/ityvronejhaXkR5eCuw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fMzgL5Nd8zXjM for ; Fri, 27 Feb 2026 19:59:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 205b6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 19:59:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: d37214da968b - stable/15 - freebsd-update: Error for -b basedir without UNAME_r set List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d37214da968b8f381e7b67f80607e0865d873f5e Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 19:59:21 +0000 Message-Id: <69a1f799.205b6.5f6d8dee@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d37214da968b8f381e7b67f80607e0865d873f5e commit d37214da968b8f381e7b67f80607e0865d873f5e Author: Ed Maste AuthorDate: 2024-12-10 13:47:34 +0000 Commit: Ed Maste CommitDate: 2026-02-27 19:59:04 +0000 freebsd-update: Error for -b basedir without UNAME_r set freebsd-update sets the currently running release from UNAME -r, which can be overridden via the --currently-running commandline option (or by setting UNAME_r in the environment). This may be invalid if -b is used to specify a basedir other than /, so error out if -b is specified without setting the currently running version. PR: 283229 Reviewed by: cperciva Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48016 (cherry picked from commit 097458ac665db732cc91a22279da4cc14f694da2) --- usr.sbin/freebsd-update/freebsd-update.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index d9db4fa4bf6b..c77f4b18fc61 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -755,6 +755,10 @@ fetchupgrade_check_params () { esac chmod 700 ${WORKDIR} cd ${WORKDIR} || exit 1 + if [ "$BASEDIR" != / ] && [ -z "$UNAME_r" ]; then + echo "$(basename $0): -b basedir requires --currently-running to be specified." + exit 1 + fi # Generate release number. The s/SECURITY/RELEASE/ bit exists # to provide an upgrade path for FreeBSD Update 1.x users, since From nobody Fri Feb 27 20:44:34 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fN0gh6vP9z6TD2m for ; Fri, 27 Feb 2026 20:44:48 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fN0gh4dTBz3ZkJ for ; Fri, 27 Feb 2026 20:44:48 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-824ba8f0acaso1342073b3a.1 for ; Fri, 27 Feb 2026 12:44:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772225086; x=1772829886; darn=freebsd.org; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=pHhrj6GUHyFKYRprAuFlqe5aE76c6L+BjZ3IB5idvC8=; b=BLNud+ADQ/X3Y4cc6ZnA/71YAlCf/Qc9QkdIClZZxIzCLQxULm5rAtd23vYbdUpG1Q uhwZ6b8s0N6cqJqVzXVaptdcRsjSnbuTk5Qoe5MGxJvhd/FiArYb18tOlf4znMFbO80x cy4ItH6p3nOxGWK+qdktGUlhnaoihP0T0Jjqq8hlw5vAtDNdeK5Mgzkz6Vijbj8dWxph X/rHbjZyaZOyxXnLSzCqolPkA5ni1MUVaK4GhPQL7fS1ErHOOLUplQS1jfdYOtKbEs8X jZgGY0r5BBsdbx3jDKBSluRDq4Ju4t8h1aAW6rHiYulR2FPii5yM9rLa9Lzp6uMW9CnU Gr1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772225086; x=1772829886; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=pHhrj6GUHyFKYRprAuFlqe5aE76c6L+BjZ3IB5idvC8=; b=ngUvWSd3ZQ6bnOB+TawB8Q1NBH6terS00tcD0kwjcwEyrUtQeivybvaQFP9L+nALFe oOvSKar7Qk2nw4wbj+h+sN39Ki0QCNLBqqRXYPLAT63A0wTty+4H2vVDzyFAG4wNUBrr QH39muLFCnfRfiwt2lsxkVztTqxk4iy0BtGHXgaws+JIgwUh/N5OpS2u224RS5oWRnxo +bsAbgPiBVhjim7zj7OZJjgB75RCwSASAZZFER5JZsFMX2AoBNYMrpOptNLeKIbP4Rpb tVR/8I4yQTR4kjq362dfzNSvQVRUk8iE538Cvv7wp7XTMAkjh4lyowWnGWQwd4m8IV8E 0vbA== X-Forwarded-Encrypted: i=1; AJvYcCXUxdoVvADpI+ty0oUkvW3Y3bXCnG4r6qpEyJPAHoZveArjaOtUj6CGoWsCyrBNokXqooFRb6nQtrcW+c+5MaBz3Q1D@freebsd.org X-Gm-Message-State: AOJu0YxRWsU/WdG/+ipFDcV/BzDiVyNtV8dp9ZlQP4SUEjLZjBZNWFph 5AsbNhvS+eZFFyVSuJ8m1IUtGu9KG8nM6wFRjaOgy7cimKMkUF3Eceu1 X-Gm-Gg: ATEYQzyfQXFD/HWrp30omg36GgDUgKzrx70pEzc4u0afaec86Yslh5ryO2pkuKcny6c olk9WqRi4FcSt6UiV9lXGyBrhxp0beB1Gy4Qycyk+LoQ0ZColZaYb51WGb0x/xg6S1P8Rr97gBC OOjQmvSU/Rqu4htVqXrK0ljlOaTl+357b7Q/LrAzKXD9Gmyd1gSvC00BBjAlRETarDehS5FXjFW gBlQdyPHbpxHz9LuRwk2zXz8csBwB8dLR+1J6QC2bqmEQPkEiizUCxAhYcZmm9dqoaNlicJEmk6 EoD8qDOs/mM+kqwPR5Arh3GaKn1yrlzrt+XNg0/+cyYhkO2PR9LiSpuUdRvg3j5KdsII7bb0X37 NEygnH5hZMUQHuC+EZ3MvavgD4FRDu3rqzCY2jj0E1GXcC93bfn5WIQcRea4LFH1oA1TMeHejfO mWPe3iBei1FO+GuJdcgPmYPFhkKTC/6YzWUsDcItDKY0LWf/3EHprsxA== X-Received: by 2002:a05:6a21:670f:b0:393:7f50:f3b1 with SMTP id adf61e73a8af0-395c3ac7486mr3412225637.39.1772225086067; Fri, 27 Feb 2026 12:44:46 -0800 (PST) Received: from smtpclient.apple ([185.153.179.131]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c70fa8059bcsm5574599a12.18.2026.02.27.12.44.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Feb 2026 12:44:45 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_C3F01D47-4A65-45D9-810A-0DA7EF7A7B55"; protocol="application/pgp-signature"; micalg=pgp-sha256 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81.1.3\)) Subject: Re: git: 454212b9718b - main - sctp: fix so_proto when peeling off a socket From: "Enji Cooper (yaneurabeya)" In-Reply-To: <320FFBF5-040E-4EA7-A960-8DC3A632744B@FreeBSD.org> Date: Fri, 27 Feb 2026 12:44:34 -0800 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Message-Id: References: <699ef25d.42e41.7579887f@gitrepo.freebsd.org> <320FFBF5-040E-4EA7-A960-8DC3A632744B@FreeBSD.org> To: Michael Tuexen X-Mailer: Apple Mail (2.3826.700.81.1.3) X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4fN0gh4dTBz3ZkJ X-Spamd-Bar: ---- --Apple-Mail=_C3F01D47-4A65-45D9-810A-0DA7EF7A7B55 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 26, 2026, at 11:57=E2=80=AFPM, Michael Tuexen = wrote: >=20 >> On 27. Feb 2026, at 04:46, Enji Cooper (yaneurabeya) = wrote: >>=20 >> Hi Michael! >>=20 >>> On Feb 25, 2026, at 5:00=E2=80=AFAM, Michael Tuexen = wrote: >>>=20 >>> The branch main has been updated by tuexen: >>>=20 >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D454212b9718b55b43781f81bef252658= e20e0fd3 >>=20 >> =E2=80=A6 >>=20 >>> @@ -171,7 +173,7 @@ sys_sctp_peeloff(struct thread *td, struct = sctp_peeloff_args *uap) >>> td->td_retval[0] =3D fd; >>>=20 >>> CURVNET_SET(head->so_vnet); >>> - so =3D sopeeloff(head); >>> + so =3D sopeeloff(head, &sctp_stream_protosw); >>=20 >>=20 >> This part of the change broke LINT-NOINET because sctp_stream_protosw = is only defined in the INET case. I didn=E2=80=99t dig into the SCTP = syscalls too far, but I think that the right protocol needs to be picked = per the address family, right? > Fixed in > = https://cgit.FreeBSD.org/src/commit/?id=3D6bd97e9e01ff159eef49b2521fdbe67d= 5db10d95 = >=20 > Thanks again for reporting and sorry for breaking the build. No problemo! Thank you for fixing the issue so promptly :)!!! Hopefully `make tinderbox` is clean again now (on amd64/arm64 at least) = :D.. -Enji= --Apple-Mail=_C3F01D47-4A65-45D9-810A-0DA7EF7A7B55 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEkHfexGRJ3gYRdA2gGpE5DjPsNJgFAmmiAjIACgkQGpE5DjPs NJiBTg/+PhtLgpUnJedbK+kWQr/McI/XKz8Ua5k9nAFQ+5mCJhM8xIQW33SZBq5f Ad51yfoyjfnDuTpU7i4QaOGfGZTwcPW2TCeqNlxLpUsWTf5Fn5WwIZMe4nkkIibG ua8+3N+8rWYMvR0XNEaGhLSqfQUXo62unuR7dM7dnRBAhlrFtemaEsP/gSDgtUwJ RuUc0wxPpR3NqBa6+6rWgRI9DR1ERLPfBPedGFA5OfiAX/sILLsqqo5WbunBIbym Duqr99PWcBW1VeOu9XcQpjaEcH5P6Sg6H65HBokXkNwAAaQIdsH4miT9YEZ/2b0T vtpAxVq4g9Srz8tOpfUTrlFwzjczm3cZ8KL3TNUfdp0E9nJuKQ9sCR6kJGn8kqiq vwS8BMv1n3rd+4jsiOPGooL0PpOi2oXya8UD/vtA6vv+m3NFWbpt4ZNBNwZXYcOb CY4FMxm23O4tGyp6U6bTHKhjYfST93rCEYJmxpKHBhwD13p6Ma+iKED8gPOy2+B2 lZPjnUVfTo+nT4JT3WZbgR4hLKU/YUisppbb1LHMflzELc0u+FWIl+cKjtQp6/Ny 8TQznn/pBi5q+Ql2DL/TvplQRSXFTgdb/q5XQiDBJH9R+zLQlgbWe3KAVmvVmItu 5RsFXfznDlWsq8ZZezON5t9TB0YbpTyi4QtveUSqH6drRLdtQuI= =zNhk -----END PGP SIGNATURE----- --Apple-Mail=_C3F01D47-4A65-45D9-810A-0DA7EF7A7B55-- From nobody Fri Feb 27 20:46:47 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fN0jz6Mf8z6TDLm for ; Fri, 27 Feb 2026 20:46:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fN0jz3sYyz3bDb for ; Fri, 27 Feb 2026 20:46:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772225207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=14dbfPCueqdbOn2WpPiPZJsEvIJTm8JbETMoB84IiuE=; b=LjT/oY4S6+/DO304/fXC7HfNlthCoBjIYViuuwkV7RVt0dGqwTczAYXJXV0en1KGFz36B1 Bpg+ywG3Gsg/EF/SR/9EEKlU8jltovsW+Nr2yV6cdhkSBjmSqKmRxNM3DJ1dAcJw62dLkp TS8+D95QS2PcXGJ3DCFVrWBts+ywoVSHnT1ns6oOFMXpzdeokPNfVtUEVv1r5pbT9mcvpx /TnfL1rvLtKn+p+QApv6h1Vo3ONKZ1ZMzXtOpgg9f+2yUmHDJKGVL85RYd4n5K8k8g3sot 9IcEcSFb3JrAuhFI6QJzUsjt/QKE1hjISq928wlH2TgV0LIx9TfXiyzCQ+xE4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772225207; a=rsa-sha256; cv=none; b=Zavu7TSCUmBFrXPrKJdPM/UcsQBV20hjOlzEIGV88LV6qvjf7T15PLRs8aIgXB0EULEkjA DzmLt87o6sYbtAptKCLP3bWYZxkdiPrSC4qyHX80yxDer6iSb4l/S/hM1mvebCSLRh5u4B lP1C1G+fYGJdZ+Yrc+lQDsZGluoQSVxiVT2yyG1+F4qAvqeZyTozp+eH6ee2t+jAcnnVeQ 87KtDHO64Jv3dBUm1/5XZJuyYNVE0RGi1nv5fpbOfDjl3BVtsrK36eq4QxvqN666WS2Cdg Soa33T7hU+7YkuJV/YNlbe5HdcFdwB/KQnRJsyKk+MVsavudmbsWvgKyCU4RCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772225207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=14dbfPCueqdbOn2WpPiPZJsEvIJTm8JbETMoB84IiuE=; b=s3GW21AqI8LD9EENUS0KT7ceME1WkFtAaqJPiyv8ZRT2j7IUyVZa20fX27Sa8Gd/MwI5xA EjJdVoIlhn5cMms3yQ9krQlSD1dX8CyRonNX+zC/qt8KF14xpiHFUC2skjfWuFLZ/qa6/0 MQ4GGDVs1Nf+/kvA3xhm8/ZerukJd2aiW8JN4UKjuanoG2qhFOuHjuEyh0IS9TgmXkcgXH b/n59lSMRfUXrqL2bnuTp/E90CebGSx2tMaSPKsc7i2Dq1o03LzmKMHwsQ0obeMrmMkqRS e+nCjWdNOYQx8uUrsV7pLF4MRKpu0xswC8+yFrOH70iJAvozPtYWjXvFpu4QUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fN0jz2XVZzZdd for ; Fri, 27 Feb 2026 20:46:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 248cf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 20:46:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pouria Mousavizadeh Tehrani Subject: git: 82069fae3ff9 - main - snl: Remove duplicate rta_expires member in route parser List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 82069fae3ff956ecf833d239864e34a3efc3356e Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 20:46:47 +0000 Message-Id: <69a202b7.248cf.1ecf4d92@gitrepo.freebsd.org> The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=82069fae3ff956ecf833d239864e34a3efc3356e commit 82069fae3ff956ecf833d239864e34a3efc3356e Author: Pouria Mousavizadeh Tehrani AuthorDate: 2026-02-27 20:41:51 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-02-27 20:42:35 +0000 snl: Remove duplicate rta_expires member in route parser There is no user for `rta_expires` member and it's duplicate of `rta_expire`. Reviewed By: melifaro Differential Revision: https://reviews.freebsd.org/D55445 --- sys/netlink/netlink_snl_route_parsers.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/netlink/netlink_snl_route_parsers.h b/sys/netlink/netlink_snl_route_parsers.h index 70a12ad3ad74..7e5eaceb18e1 100644 --- a/sys/netlink/netlink_snl_route_parsers.h +++ b/sys/netlink/netlink_snl_route_parsers.h @@ -113,7 +113,6 @@ struct snl_parsed_route { struct sockaddr *rta_gw; struct nlattr *rta_metrics; struct rta_mpath rta_multipath; - uint32_t rta_expires; uint32_t rta_oif; uint32_t rta_expire; uint32_t rta_table; From nobody Fri Feb 27 20:55:40 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fN0wR5gLCz6TFQn for ; Fri, 27 Feb 2026 20:55:51 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic305-21.consmr.mail.gq1.yahoo.com (sonic305-21.consmr.mail.gq1.yahoo.com [98.137.64.84]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4fN0wR0TsYz3cKl for ; Fri, 27 Feb 2026 20:55:50 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1772225742; bh=3idFX0p5l0Kmq+7QjKEevF2hm/ITNr2KdtgEV6KeDfk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From:Subject:Reply-To; b=YBZMEd+Jt6z37JaBoD92wnl4r82osMyeIQxf1GvkmGHb8nxWjb27kgmMd+ykhmr3sRPaRWi9BDAGG6DOmyPgffRp6zjsN8q+radrVx0KSRcWQvK8apFQvEnuExy0lt+5kDYwcbM1Sadlx/X9ejEBRWGFFuKuO/uXblUqS4mTGWvrMB9qLhVx4RqGPuNa7jlQoY6z2W+zt8yhLWiO8EVLiLXTKHKsLwXZ1/g6qsG8mvZO38td66gVfmLYwDIAxkr9KTkKzwOtx8OF87lQJg7qWOKGHo4railqCXvvnHDLbbVifoeu0CpSn9RWNhlCDB9PBs0aCGABW4VMi2YZ3pWQow== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1772225742; bh=ATb/8sorAv99pZxeHqz5YebVku8YlHevxOB5d+BPQ03=; h=X-Sonic-MF:Date:Subject:To:From:From:Subject; b=O2zh6mqyI5QCYUYVzBhalgQM7YoIN9ezi4sMhfIYcLMq/MDd2gzVhsvcEIwp6ZkWDDgpI64ypKlupWO0qA1W5K28UAwrr9r+5QdIAnb//IXeg35zL6YCXjGwR25IUbYWvV8PKcUxyRI7YNOc9RUAEvSZ6DGliHlxbhDuej44syqAui8AsCFbgpmi+iPN11aiBSX0+ChOAJpSTm1yrZ0LADkqIf497i+t6Gff/A0puxYCyqPFM0peQl92Nz7HYoiN/Lw8ptz6Yw/Ll+0Gcmvdlok9rb6jjeTLd9Ad/0MU6hP4OER4ol9ujdJNZvcaSqFpgcjm1WdCbmpddO+X9TPYSw== X-YMail-OSG: kCtpluoVM1mx1aKBhp2wf.e1k2EsbpDo.CjcqFv3JyFCEO7NWbNlYyzFHnPBGgz aDYsyZbvDwMZ4djANy5yW_0vmhCcH_YrGqVDgz_RR_WB1KHFXCe5K4v9dA3dZvQr6GK40JS6twDf hh4iSxnAhVJ1uQL8xgdGpGjQThQDynLm0rNkgLO2aogtXgO.owOkrdQ.yhZifXfoAyT8m02s1_6T sdMfRIubynNkWUk7GCWOZ4JA_q2aIa.wGiKm71rdz2BR13bJ3F_AU5HiNiUcjaFtOf1Xmwv.BkTI 2d3r3BalprzmcF4muCQO8mhR24tXSL9FYnHB.l.lo8W536Ys6yycJgBzk0l5aOYdCRVZk4kGbvjc _Kd6Tpp.QleOYi9YfTvMfeN.qVez5FhOdx9SyOp0ebN7oxDEkU0eJ7mmY7YTPIxO.9tB9xthgsM2 34_j7JcM.6LDWOhv9XTGaA54FAUV1VGHMBb9GawF3csTPL71WajeVV42yirmKhDefUzddYT5R3ZI 7wV3nP9lOECDScned3oqmWfqn6YZoHBJ7En3dRrxKfHo7r2Rcjg8_8vYsuf7Y3ifMyxDJeP2oalx eF0AeCHeWKziTPDVVewu4p238XCbqWPCSDY6Ps4.aspOkk1KBxrtam0SnvxZwINW5sGauZMuyTKK vwc1z6gRGDIWLLMHDz.Ua4ZLu4PGAM.9aw0I5cSnJN0MdlzzaJV1E92I8rCwbYJjlWWwNoWP2C4N kc2.BDD28G10KoVzs0OiqL0JUNpVJQLuzRbYghLWWpyTdQaufbTpYtwEc3O4v9ZA2Qnqy1ozwDUf ZJtzo5iQR46lYUyNnvTXNNtto7gp5LGbMP8NlE9nWGhVMbhGye.UFNvDvQu1hEjlAleb3mW5jHY1 ll3b11j8GTTm4XKIXczqqYSCXmIsSweWXo7VMPeE5u4o8.JNkGdqgoffWyD7LFOaO_fhGWyOgryY eJkQh2K1.EvaKMTcYJ1MMBoXHm9piIQTEET..jz.gIZqX6rgsDfkBbTgo8B48ez9383GiOu0O.y7 AVw9SGdWjiVOEtnmh94854kW9ACi69uyxp251XXIXjrEW3YIUB6YTAv4cABGrW981L4wgxm1Q4Re bAj_L7DooHHiW1ugSM1w_1IlimWnEGThb58rf3Gb4qFdsXWpmnh8FJZc7vqwIsJwRClOfRkKK7mS NfE9vnXw5aX_2tT2f_9BJas3702iZSDhmPOtL3IN0nOCU3mVe1uWb7FIixiCSEY_TN6qxb0_HJ5B fXYzBvxpVkKRN.PoqzqyMujhgkG0w2GgZzXQF3dn7oBWIOGuchrcRgBHFGlEZYw3GBxHNtJ_GHOG gixBuksSXHgt3klG_eddCgpZX1c9TMHDSotZ9rc9LSrLILD05QSIWSfudL_QNC9QLjlmvxqKJPPn i6.2Pwb9mm0sm2KFM93ZN3aU.dzMQ81RkxWZxVKcVm3rTFv9XED6tFosyBKNjfqCo16KSJXVLlkL MrNYNTO3lQHvbxkG10xr5oN_J3SCdIG8_VCiE1NpsYO3qM9gUFFLEDDlbIq0i6DaU7NMm5572CJD v9uQmPRVbqAcwPOdYNDGkO1xPyOFVx6whBBvvIIzRVk24YAHbN9OgSWSs8ZNPv1QYUScot2zSUKL X9iBZXQbopXQvMFpdB3aRVggw1pImMw9Le1NCWukU5Mnmqyl38q_zkUj7XL.IKZKH28XW9jLVc9L ekz__necbAO2TUfXPVE._r.8pxRzdRGHkHnclTeXHxal3t3CRmlu6fF4jpD5mN6s9Dna5PL8oTb8 Ac.wtQsXhqF3Snuip9Hnb5WvZuwAynikyYfyaPvw.YDtDk2OUpY2AXZIubI8COrx6P4diGpg6W1A GYi_jY_23ZUMOIp9ATlzhJ1hKLgpn18edDpMpWD3iCgNXWnVb31_76._9zpeDmqUx4VEsn5sUeFa 5Hv7PskchVPJX9jCP8QeFV_V11g.Kf2.fPZwNWxPk.25w8AoPI6LcN06hKPUcWdSaxDs6Kpxi9yQ fom8PboPZzTMPwAuvO7KoYJ9XQjZ52dOlbB8NqFqQRXDXAJjN40f8N6XWRLfxAss612IyFNG.km9 yofwhhGKXd5vsTIZGkQJgrAIqaIGq2T0WJU5TV1h7.UemEePZld.SHq9dJabFJxver4_JQU6DkyJ 4fZXikH9ymbXGkorB2taAtzMLnimdOJ8JF3iie.w50P_d7zZFcNxdGkSZ9qHeV73ctGc3V68wDui zQqqfn_Zdq28jhQ_DPGhNTz_E9ilXRna4U1BvG5HGbtEktqwVgnSKmwQ.ys9WdkBio28nsJqUDMZ jLkwSx0CFnG4TwjMPPjhHHqKEggZq.qM4QlPJht7c1dBgVLxGcw-- X-Sonic-MF: X-Sonic-ID: b2e59341-e11c-4115-be40-2ae2734ee0f7 Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.gq1.yahoo.com with HTTP; Fri, 27 Feb 2026 20:55:42 +0000 Received: by hermes--production-gq1-6dfcf9f8b-w5q67 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID eda8e9d00c566dc1045b0c6471b1e65e; Fri, 27 Feb 2026 20:55:41 +0000 (UTC) Message-ID: <720e4cb6-fd13-4686-93d9-ef095ad611c2@yahoo.com> Date: Fri, 27 Feb 2026 12:55:40 -0800 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: ee73475119ff - main - llvm: Link private LLVM libraries against compiler_rt for aarch64 To: John Baldwin , Jessica Clarke Cc: "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" , Andrew Turner References: <698a0b1e.1d294.40e36519@gitrepo.freebsd.org> <23acebb1-f71c-46e6-9eea-3fa44316335d@FreeBSD.org> Content-Language: en-US From: Mark Millard In-Reply-To: <23acebb1-f71c-46e6-9eea-3fa44316335d@FreeBSD.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailer: WebService/1.1.25198 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] X-Rspamd-Queue-Id: 4fN0wR0TsYz3cKl X-Spamd-Bar: ---- On 2/27/26 09:27, John Baldwin wrote: > On 2/9/26 11:47, John Baldwin wrote: >> On 2/9/26 11:40, Jessica Clarke wrote: >>> On 9 Feb 2026, at 16:28, John Baldwin wrote: >>>> >>>> The branch main has been updated by jhb: >>>> >>>> URL: https://cgit.FreeBSD.org/src/commit/? >>>> id=ee73475119ff7aa98bd11828625d524f6ab87f06 >>>> >>>> commit ee73475119ff7aa98bd11828625d524f6ab87f06 >>>> Author:     John Baldwin >>>> AuthorDate: 2026-02-09 16:26:52 +0000 >>>> Commit:     John Baldwin >>>> CommitDate: 2026-02-09 16:26:52 +0000 >>>> >>>>      llvm: Link private LLVM libraries against compiler_rt for aarch64 >>>> >>>>      This is required for GCC which uses libcalls for outlined atomics. >>> >>> This doesn’t seem right, they’re provided by libgcc.a, so why aren’t >>> they being pulled in? libcompiler_rt.a doesn’t even have the symbols. >> >> My guess is that we don't link libraries against libgcc by default, only >> binaries (maybe this is a GCC feature/bug vs clang)?  I have another >> review >> open for a couple of google test libraries which similarly fail to link. > > So after some more digging (along with Jessica), it seems that GCC only > uses -lgcc_s (and not -lgcc) for C++ (but not C) on both Linux and FreeBSD. > clang's FreeBSD toolchain driver is supposed to mimic GCC but doesn't, it > applies the C rules even for C++ linking, so clang is implicitly adding > both -lgcc and -lgcc_s for C++. > > On Linux, libgcc.so is a linker script that includes both the dynamic > library and -lgcc which is how the static libgcc (including outline atomics > for aarch64) is effectively linked into C++ shared libraries on Linux. > (Note: libgcc.so is a linker script on seemingly all arches on Linux, not > just aarch64) > > So I think we have a couple of choices here.  I can patch the devel/ > freebsd-gccN > ports to stop passing -shared-libgcc to cc1plus which will cause GCC to > follow > the same rules as clang on FreeBSD (passing -lgcc -as-needed -lgcc_s - > no-as-needed > instead of -lgcc_s), or we could change libgcc.so to be a linker script > to match > Linux (and then eventually fix the FreeBSD driver in clang to only pass > -lgcc_s for C++ linking) (I think Andrew already has a review to make > libgcc.so > a linker script). > > I can see arguments both ways.  Using a linker script seems kind of dumb > given > all the hoops GCC goes to internally to decide whether or not to link only > shared or static or both.  (Esp given libgcc is in theory part of the > compiler, > so the compiler should know that libgcc_s should depend on libgcc and be > able > to encode that in the default drivers.)  OTOH, the linker script > approach would > mean we would more closely align with Linux.  I think Jess favors > patching GCC. > Does anyone else have any strong opinions? > Is the question limited to devel/freebsd-gcc* ? Or does it span lang/gcc* use as well? -- === Mark Millard marklmi at yahoo.com From nobody Fri Feb 27 21:24:13 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fN1YC5SCXz6TJ1b; Fri, 27 Feb 2026 21:24:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fN1YC4tW5z3gQf; Fri, 27 Feb 2026 21:24:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772227455; h=from:from:reply-to:subject:subject: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=rT+dRurGsTQaonuV+2cdjMiUAKADmWy3AW0XQ5icPsw=; b=vFrduwWSjU6dxtjpgCdG5ITWGuWyEz3YngOrbhMbP+elbrQz9b8mwo8WmISJv4tXTEjOIX YY3nLPkARM2BfX9OvnCMWbcyCG/e8e9g5F8+dUo8gra2ZTZRNCVrwaORSzgxegljFaYwng PuY2PZsqmaB7e6rrx/vKbaCQbd+j/JegAIkzkKhR30YudtnnWIZljODXIJ0nPFnfno7mif Fr7AFDBJb5anje/LirRzsB9TmtnyFn5Gmzoq1xfGkCC57YQQDbpWL/NDwnSc/iLncTzW3n b9HIRc6j6DjZVWPhkHs2LupIQxdwe2NukSW0mpN8WyiWxfp58Z8AGsiPg/KsNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772227455; a=rsa-sha256; cv=none; b=i+R7ZGfQcy2ToZg8ELAxdwfnFzVpNAH8jB+Qc233syA+yrN/D4ni8uKPh6DvdR7E2nZBt9 5pzQtJp4DwC/V3fUzo3/65A7Z1vgq8SEtWtGhmPVQIoV4TLgjTfLewe7LG5lDY+7pfCirB f7sIwtwv6WlD2gSmzfiuPodkeEHJUN4v5IqFJBF5b8p8h3djRX8Zf3l0P1z+HVKK3bfQ0R bNRN0ADBCgjBYiw5PeTT+cJ+W6ks39xx4BI9hxmhMPo7nCPId6+tyGgb+IB7oktBDkD53i T2Ijdt/1jbgLHUps040Nn8FweuunwYCqvc5aB3Tab1uSLuQ8cmx0PP5fFiB6rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772227455; h=from:from:reply-to:subject:subject: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=rT+dRurGsTQaonuV+2cdjMiUAKADmWy3AW0XQ5icPsw=; b=TApskIc25K5eEh/J5i/khPZsZbrcPSbZCL2O0uyBVzcrxoZBLPDx02epcXYYDEYSr31/JB rPH4PYCQmROWDq21kEia349IjbptqN6lXycfY/8V7DWWTWvl3X9khlfeYaUOlSRpZ+qbad QIDGxHYCWReK7hx+sLzwCPHgvxFiNIhrgk977RGVfugGJ4F08kAXaTxvDkwb5XynUQ+vJ4 0gW9gMz2JHOz0Dggu9szhR8NEfcUuo8KFOo+z2ZGqGaKoeQ6fkqRK2cByuvlU6lttK9NCI OhnNlYbWlDAZe7goD2AsHKOZrw2/CaYjvWFlVcL/gENoLuYjIMRZtJewI4Hy0A== Received: from [IPV6:2601:5c0:4202:5670:f561:a422:8150:b740] (unknown [IPv6:2601:5c0:4202:5670:f561:a422:8150:b740]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fN1YC228jzLpZ; Fri, 27 Feb 2026 21:24:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Fri, 27 Feb 2026 16:24:13 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: ee73475119ff - main - llvm: Link private LLVM libraries against compiler_rt for aarch64 Content-Language: en-US To: Mark Millard , Jessica Clarke Cc: "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" , Andrew Turner References: <698a0b1e.1d294.40e36519@gitrepo.freebsd.org> <23acebb1-f71c-46e6-9eea-3fa44316335d@FreeBSD.org> <720e4cb6-fd13-4686-93d9-ef095ad611c2@yahoo.com> From: John Baldwin In-Reply-To: <720e4cb6-fd13-4686-93d9-ef095ad611c2@yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2/27/26 15:55, Mark Millard wrote: > On 2/27/26 09:27, John Baldwin wrote: >> On 2/9/26 11:47, John Baldwin wrote: >>> On 2/9/26 11:40, Jessica Clarke wrote: >>>> On 9 Feb 2026, at 16:28, John Baldwin wrote: >>>>> >>>>> The branch main has been updated by jhb: >>>>> >>>>> URL: https://cgit.FreeBSD.org/src/commit/? >>>>> id=ee73475119ff7aa98bd11828625d524f6ab87f06 >>>>> >>>>> commit ee73475119ff7aa98bd11828625d524f6ab87f06 >>>>> Author:     John Baldwin >>>>> AuthorDate: 2026-02-09 16:26:52 +0000 >>>>> Commit:     John Baldwin >>>>> CommitDate: 2026-02-09 16:26:52 +0000 >>>>> >>>>>      llvm: Link private LLVM libraries against compiler_rt for aarch64 >>>>> >>>>>      This is required for GCC which uses libcalls for outlined atomics. >>>> >>>> This doesn’t seem right, they’re provided by libgcc.a, so why aren’t >>>> they being pulled in? libcompiler_rt.a doesn’t even have the symbols. >>> >>> My guess is that we don't link libraries against libgcc by default, only >>> binaries (maybe this is a GCC feature/bug vs clang)?  I have another >>> review >>> open for a couple of google test libraries which similarly fail to link. >> >> So after some more digging (along with Jessica), it seems that GCC only >> uses -lgcc_s (and not -lgcc) for C++ (but not C) on both Linux and FreeBSD. >> clang's FreeBSD toolchain driver is supposed to mimic GCC but doesn't, it >> applies the C rules even for C++ linking, so clang is implicitly adding >> both -lgcc and -lgcc_s for C++. >> >> On Linux, libgcc.so is a linker script that includes both the dynamic >> library and -lgcc which is how the static libgcc (including outline atomics >> for aarch64) is effectively linked into C++ shared libraries on Linux. >> (Note: libgcc.so is a linker script on seemingly all arches on Linux, not >> just aarch64) >> >> So I think we have a couple of choices here.  I can patch the devel/ >> freebsd-gccN >> ports to stop passing -shared-libgcc to cc1plus which will cause GCC to >> follow >> the same rules as clang on FreeBSD (passing -lgcc -as-needed -lgcc_s - >> no-as-needed >> instead of -lgcc_s), or we could change libgcc.so to be a linker script >> to match >> Linux (and then eventually fix the FreeBSD driver in clang to only pass >> -lgcc_s for C++ linking) (I think Andrew already has a review to make >> libgcc.so >> a linker script). >> >> I can see arguments both ways.  Using a linker script seems kind of dumb >> given >> all the hoops GCC goes to internally to decide whether or not to link only >> shared or static or both.  (Esp given libgcc is in theory part of the >> compiler, >> so the compiler should know that libgcc_s should depend on libgcc and be >> able >> to encode that in the default drivers.)  OTOH, the linker script >> approach would >> mean we would more closely align with Linux.  I think Jess favors >> patching GCC. >> Does anyone else have any strong opinions? >> > > Is the question limited to devel/freebsd-gcc* ? Or does it span > lang/gcc* use as well? We don't really support building the base system with lang/gcc* (it's why devel/freebsd-gcc* exist) as the base system builds require various changes like kernel printf support, defaulting to libc++, etc. -- John Baldwin From nobody Fri Feb 27 21:45:03 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fN21Z1bzNz6TMNV for ; Fri, 27 Feb 2026 21:45:22 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fN21Y5bRWz3jNg for ; Fri, 27 Feb 2026 21:45:16 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-43991064db8so2555823f8f.2 for ; Fri, 27 Feb 2026 13:45:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772228715; x=1772833515; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=2ye6tXD7zZVpPE136iNUh5Bxu4/pOGU32xkcdk0l9Gg=; b=NSknBaTO88TiV6dQeJu3zqmn5/rpNIWm/7jmALz16N9tJunjU7e3R7+1UPNTnOyUCn I/GTC153WXfcwMsocsO5OGpcdlgvOTtGp81TxSbPF+YsGWTygpwKOCY6MQ1zpBgXsZOd clDqcS1NRXVyupVsuONJSP1JxRke0Ns1B3ThjfCBT+XoIczSuR7DNoxij65nArWJJ8Vj jCumIOQeCK3GSIS5Br3ykNeY6tuGCCrxDh8qZ7x9QWbR+gBth/KWo4ucAZ9hTCnBkizJ TFOJn5BZWnoxjnHNwu/qui1fsXuNkj5ns9CFZqgOAdp1fi6gnpGx4Xo7xRnwfk3pl3Ws bmKw== X-Forwarded-Encrypted: i=1; AJvYcCUhIuq15xbvsYV/gQ3LB1M8FSpdXJGjko4k+Zc4fxwWSzfHE1JpheJfo226dE3g4I5F1GFxjI9aTzAUCXjzEF61o2jE@freebsd.org X-Gm-Message-State: AOJu0Yy0TOAa9wvTv91FaSKaKWhP1fNonn3q/n7COrTn6K7e8SIySrw+ POm+6GzdRKfSXkES3JM8QBL8VhmLo9nGwZXpAdvoIdjNUhhGVzzpeugb43TLDd+QBHY= X-Gm-Gg: ATEYQzwqCPiVuID/DDkV4HElMjGyB7a1OQ1W6e7E3kdm6XHJBjF68IodOQaXvBWW/cR WjMc+nwV0knPzNxp5FM78bnRi8pzKRtUD0cFCASvZhvQJWZIJZtrlJNKHiz1CSI4sxTZ7ZuzJ6s Mp0SplEzetDXfzuuAoIWs3yDbXUW/KomFT7T4SlabG49hxtv2aebzy0VQREOc3269g3L7LMVlbz oO1YJerQVdE18SJbDVE/iq/6yoCJ3wuA6xvrFfLiSlC+uvqfkd59vkUQil4c5niq2qt0MjqcfsA Vwzw3XIYF9kvG9SV9NsOKwhQLoGy8WInFwSoww7GRoLLHS6kfSMGLPVC7DdnYP4g3ZWta1uOnBP RcuM+vFai3VO3r7r1hagpbFR3N1VHHxOdGwJbhnHvy6ATkgO9FW42GgNY+TAe4vPrIDf3D3w6gW aMKOQ3UjUnCQB3alrVHZLJ7MQbIAU0Tk45FUxUO2XFLsWo0mkqx/dZr4hnQjYq2xlr X-Received: by 2002:a05:6000:2c10:b0:439:9225:3378 with SMTP id ffacd0b85a97d-4399ddfc322mr7096342f8f.24.1772228714464; Fri, 27 Feb 2026 13:45:14 -0800 (PST) Received: from smtpclient.apple (nat-184-7.net.cam.ac.uk. [131.111.184.7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4399c71b498sm9663359f8f.15.2026.02.27.13.45.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Feb 2026 13:45:13 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.400.21\)) Subject: Re: git: ee73475119ff - main - llvm: Link private LLVM libraries against compiler_rt for aarch64 From: Jessica Clarke In-Reply-To: Date: Fri, 27 Feb 2026 21:45:03 +0000 Cc: Mark Millard , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" , Andrew Turner Content-Transfer-Encoding: quoted-printable Message-Id: References: <698a0b1e.1d294.40e36519@gitrepo.freebsd.org> <23acebb1-f71c-46e6-9eea-3fa44316335d@FreeBSD.org> <720e4cb6-fd13-4686-93d9-ef095ad611c2@yahoo.com> To: John Baldwin X-Mailer: Apple Mail (2.3864.400.21) X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4fN21Y5bRWz3jNg X-Spamd-Bar: ---- On 27 Feb 2026, at 21:24, John Baldwin wrote: > On 2/27/26 15:55, Mark Millard wrote: >> On 2/27/26 09:27, John Baldwin wrote: >>> On 2/9/26 11:47, John Baldwin wrote: >>>> On 2/9/26 11:40, Jessica Clarke wrote: >>>>> On 9 Feb 2026, at 16:28, John Baldwin wrote: >>>>>>=20 >>>>>> The branch main has been updated by jhb: >>>>>>=20 >>>>>> URL: https://cgit.FreeBSD.org/src/commit/? >>>>>> id=3Dee73475119ff7aa98bd11828625d524f6ab87f06 >>>>>>=20 >>>>>> commit ee73475119ff7aa98bd11828625d524f6ab87f06 >>>>>> Author: John Baldwin >>>>>> AuthorDate: 2026-02-09 16:26:52 +0000 >>>>>> Commit: John Baldwin >>>>>> CommitDate: 2026-02-09 16:26:52 +0000 >>>>>>=20 >>>>>> llvm: Link private LLVM libraries against compiler_rt for = aarch64 >>>>>>=20 >>>>>> This is required for GCC which uses libcalls for outlined = atomics. >>>>>=20 >>>>> This doesn=E2=80=99t seem right, they=E2=80=99re provided by = libgcc.a, so why aren=E2=80=99t >>>>> they being pulled in? libcompiler_rt.a doesn=E2=80=99t even have = the symbols. >>>>=20 >>>> My guess is that we don't link libraries against libgcc by default, = only >>>> binaries (maybe this is a GCC feature/bug vs clang)? I have = another >>>> review >>>> open for a couple of google test libraries which similarly fail to = link. >>>=20 >>> So after some more digging (along with Jessica), it seems that GCC = only >>> uses -lgcc_s (and not -lgcc) for C++ (but not C) on both Linux and = FreeBSD. >>> clang's FreeBSD toolchain driver is supposed to mimic GCC but = doesn't, it >>> applies the C rules even for C++ linking, so clang is implicitly = adding >>> both -lgcc and -lgcc_s for C++. >>>=20 >>> On Linux, libgcc.so is a linker script that includes both the = dynamic >>> library and -lgcc which is how the static libgcc (including outline = atomics >>> for aarch64) is effectively linked into C++ shared libraries on = Linux. >>> (Note: libgcc.so is a linker script on seemingly all arches on = Linux, not >>> just aarch64) >>>=20 >>> So I think we have a couple of choices here. I can patch the devel/ >>> freebsd-gccN >>> ports to stop passing -shared-libgcc to cc1plus which will cause GCC = to >>> follow >>> the same rules as clang on FreeBSD (passing -lgcc -as-needed -lgcc_s = - >>> no-as-needed >>> instead of -lgcc_s), or we could change libgcc.so to be a linker = script >>> to match >>> Linux (and then eventually fix the FreeBSD driver in clang to only = pass >>> -lgcc_s for C++ linking) (I think Andrew already has a review to = make >>> libgcc.so >>> a linker script). >>>=20 >>> I can see arguments both ways. Using a linker script seems kind of = dumb >>> given >>> all the hoops GCC goes to internally to decide whether or not to = link only >>> shared or static or both. (Esp given libgcc is in theory part of = the >>> compiler, >>> so the compiler should know that libgcc_s should depend on libgcc = and be >>> able >>> to encode that in the default drivers.) OTOH, the linker script >>> approach would >>> mean we would more closely align with Linux. I think Jess favors >>> patching GCC. >>> Does anyone else have any strong opinions? >>>=20 >> Is the question limited to devel/freebsd-gcc* ? Or does it span >> lang/gcc* use as well? >=20 > We don't really support building the base system with lang/gcc* > (it's why devel/freebsd-gcc* exist) as the base system builds require > various changes like kernel printf support, defaulting to libc++, etc. Third-party software still needs to be buildable with it though. Jessica From nobody Fri Feb 27 22:01:17 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fN2N72J1lz6TP38 for ; Fri, 27 Feb 2026 22:01:27 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic314-20.consmr.mail.gq1.yahoo.com (sonic314-20.consmr.mail.gq1.yahoo.com [98.137.69.83]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4fN2N64q1cz3l1G for ; Fri, 27 Feb 2026 22:01:26 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1772229679; bh=yg4Ih7gHMMmfwu8CzrkuB31pg1RUf4yg4Rq7JKwgOQo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From:Subject:Reply-To; b=WOX0VQ2T3/h/mJfCLvOcj2fWDQRa+GHghyksDk8Kz19ULpuDYvEC8Gbji2Y8oeUtFsDZRYWLYf8xqHjpSRzy5N83bnNjbqDXubRashKwxDRI1atqjfERtLFJ11FGuCxl+ECpebLWr63RmQzM7ieiyAXK7n+QPxwk+Xh17KbQUaXJDu+qO/WR4RK2q1MdKFCmtpexti7lWZYEJ1oQhgu+oRsPlEyM8Hd7Wp73aH7KwXY6M+9RyQhmA3f6DbEpGJLKk7k0RlFDB8zimdMq+hVW3EIOSOA2ZSxCZvmnlmgG2VFnYGgIbGSj2qQxhnYvW6A1SFDp4Lh9mOwh0FqPXVcSug== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1772229679; bh=guODkmT0GGdzFPJJM7wEAZ2dXezuVT90pWdG4I+jL93=; h=X-Sonic-MF:Date:Subject:To:From:From:Subject; b=DLB87TnDRCPpC+VH+C3ogfgAGbUXZFIvAMjf2CMy6EQyPUGHZGtcycGgIDtbRTn6zGlCoUOJghDf6crDXuH1WX97fh3Eh3pwSPZCbb4kLsGv4smiR1sULYyK9TBB2ntp1L8n8TeQXYP/N5yKkhtxg5bcq4/bCQR5WPWOuCDSPNXMiMTTbWhNTvVK4yD6zxrA449vN2ciqGLhhj2oX+NqQnW1p8H67SXTrj173QB7fHTmzF/ABMVBnhIaiEyNVKC7txlQhbX1tZwMsk5nWqyXhvWLKFfmYiOZtRdWGiqNvycwn0atEcZreg0bvi7YJUDbxTFFX6PLemH/9EPrMFvVxg== X-YMail-OSG: lN8mVKwVM1kchpdck4FYbRP84fZ6h2ezr1PiwhaSViNxcAnApXVDHbJoIrh_zta OHrsmFz0guWbQPkKmjpwTo.b_RGVBWyJq6iKyxotA_WHcfGdtKAw_9dPV6lWjJOQ.RHJuOb492DF JUE1INLAl.CCDYMxnGKHQ9c._XtTqU8AvZgoZnF_AJbINNDxfAh.oBr91inzFb29IfTvaZbANSYj 1x4v_ZjV1xnV3EzZtNF.CXJxmWycY8OgUSKlhc7io3k2zHz4wdUbMldIXrJz9XpHNVYX6gbImBxW kiTfcbPuUadseJBvsBMTkZ4RxzEKMq3qWTxXxfmksAz1rydyZ3QQWKsNKB33GtEXol24tiMaAlcS 3Y6ORtqckke.faLzACQAMESI90G7SzI2dkgXiBrXhk.AV2qZ1Jeh4t6qSW9sneUGq.DMDZMpQ.37 8bMMZUQIo0beCB4dvOBWenj5ovgE0j6wXJAg4oMQJ92fR.9Xc2VEANABAsKVOHK966qbfAN7N6i. HlKY6ryacAIz4YfFWspt6ISaEuH.d9GoJV_Za.SB_xHB.aH0oBZ.74It50cZMjX2bR8Mqt3396Qg GmwCKaw8drC3HaKXv8FhM.wmklujwuesKvSthVtruUmXxMzm1lMNMF_udi4mJtosXx_ib7MVdiR4 Xqh6r2o.B8ccGUEO50HwDLgQdPaKQxlUWXmvdULNLy2NS4vvQuv63Y9wNo9.a9dwygY.E21H4gJ7 PE8Cnn_jLuLtSuHPPrfHZ5m3RO5z1X9ZzqyklCKyzcrjg32R_paG97sDA2OS7dPv7kRNDvzLwXF9 xwoluJbkN_6JVaHRU4WcJgGlBAYkGIbNkAqdezDjpwvPxd8PXW6nh3TZkp8mIyYCnPwiHW7IkU_c gv4QOMlOkjmZv5XMC6U0YeOkAfxbdyRTHjKfDoxnIixZItoILfz6_q6AluJZvu0vHACtOL4nRYXb QmxibYO.Jx9nlC4a3AvPKT0NroB8gMIXREPnCbIF5VJP3rGWee5lXeJRfRTBDDT8vFVjrF2FV_p3 2lWHbydMcHtSB5usYbHPnT1CYgwsvAJkA_GRT90sXczsPfaQxnjrVTdxcQKbk4ei.hCRPZnaQfs. isT.D6gY.RffT6fDZK54qM8B8A1.r_cyY_YjIwMdnI2aBxsLhWNJCYwOeKWKoJWAYdda7vkUKv_K 549ejbGJroW0gtDca2pbBk33Fw73mSbpi46M4JDscZgGbdIVNObcChs4QV8lSxc4bBl0ZMDz77Ie B2ppKCLgfag7Xz882QXwXQv7e2I1HME696xfYEVvXAbgZmeaPqv.KLhELkG9n_p.YIedIR.88OFX LPm.X95AckBSi1virCCPaTV93u5MN4oQutxL4toJyuIZ7aRHEP7Ivqr2Mv4YoxThiJmJHPeToNuB 81wq5.8Eke0D3xUQFrGXzEH.7NJ4aFCOlo2CXoDVlXpQyhQX_o3jGhyI73o3PEIjVGZAoBWKEz7C zOU4OksTp.muiR0hS10VRfWa6TuixNc75X4gOWX8Rf1x2leA_DB9NTF1kEDS8HLMyKw4Koe135ID wcPsNEScnCL4IzSvBmQygyAflRDPU1ETlUvt36xjlTxZyAYN28oe_o_879ynukPzkRkpHokZFeSe 708ZMzyjSI4gTTzjgyvAZGenPN_0V4zhsVRpsrm89TRZsIwY2Vn1xMe.zeEcHNohkhrXgyhq5HWd Kk3sS1xrTZkRZZMyh04R.OevPwP4bu5CUuBf9tt4ikbYI_58UKdCZy93bo9WSoXkGywBwHHHbYc_ kdbvQroNLy0wY1iiJMy7zmjp8q73S8i2zS2C2GDXdj8SBSOW1Cyu5wFxlk.EczuCx1RUbZEDLyg5 ZbI0dOdzfEjWPMQ8aWfjlqGJQa83HBxVLarj0GC5FwDjWQdL9wE9C.OoLW0munAKOw10nV8ARKF9 VrDbioymmLLCogxc.aRZCtFJuYwcT5YnS8R8ltYM2hwWy2o2EbSrjX3gUTOFIx2V5iAt_VjSawPB 88p.3P.8IMgyuQOae6aAyrdj5pBXGjLsVCLnutv1l0tvSAu7krMQ7GjZQI3zy0my7gMDpUBhhgF1 6dXn5gj47ONuPfRbfdkNBHY6vWKgC8MIdCiTvum1CeAsjNVnxUnAaUBire9V8h3k3eCDdh9rK5IG K3IhHdtncm4el0f5RMemkHOL2pzhr8x87L9FS29uhwadAzK7HASMFsP.eUe2_.K5bpXn3d3Xh8Pz o7h2yKzwi5TTBSuKl80vXcO74AYGV3p5y1XC.yLKYAOXvU5h6bZSvYSb9j_tvScm3ADXvMTc2dMO _qI_It5iw6JFh1XeFGWWvHJFXrPY3xi9._656VYpmvF_WlIftPg-- X-Sonic-MF: X-Sonic-ID: d46b7342-5997-43c3-8ba4-519d6225d0ae Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.gq1.yahoo.com with HTTP; Fri, 27 Feb 2026 22:01:19 +0000 Received: by hermes--production-gq1-6dfcf9f8b-82g65 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 601d5302bbf9ea35dc23bfdae888d64e; Fri, 27 Feb 2026 22:01:17 +0000 (UTC) Message-ID: <4514bc7c-49c0-46af-b67a-3e4565a7e8cd@yahoo.com> Date: Fri, 27 Feb 2026 14:01:17 -0800 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: ee73475119ff - main - llvm: Link private LLVM libraries against compiler_rt for aarch64 To: John Baldwin , Jessica Clarke Cc: "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" , Andrew Turner References: <698a0b1e.1d294.40e36519@gitrepo.freebsd.org> <23acebb1-f71c-46e6-9eea-3fa44316335d@FreeBSD.org> <720e4cb6-fd13-4686-93d9-ef095ad611c2@yahoo.com> Content-Language: en-US From: Mark Millard In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailer: WebService/1.1.25198 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] X-Rspamd-Queue-Id: 4fN2N64q1cz3l1G X-Spamd-Bar: ---- On 2/27/26 13:24, John Baldwin wrote: > On 2/27/26 15:55, Mark Millard wrote: >> On 2/27/26 09:27, John Baldwin wrote: >>> On 2/9/26 11:47, John Baldwin wrote: >>>> On 2/9/26 11:40, Jessica Clarke wrote: >>>>> On 9 Feb 2026, at 16:28, John Baldwin wrote: >>>>>> >>>>>> The branch main has been updated by jhb: >>>>>> >>>>>> URL: https://cgit.FreeBSD.org/src/commit/? >>>>>> id=ee73475119ff7aa98bd11828625d524f6ab87f06 >>>>>> >>>>>> commit ee73475119ff7aa98bd11828625d524f6ab87f06 >>>>>> Author:     John Baldwin >>>>>> AuthorDate: 2026-02-09 16:26:52 +0000 >>>>>> Commit:     John Baldwin >>>>>> CommitDate: 2026-02-09 16:26:52 +0000 >>>>>> >>>>>>       llvm: Link private LLVM libraries against compiler_rt for >>>>>> aarch64 >>>>>> >>>>>>       This is required for GCC which uses libcalls for outlined >>>>>> atomics. >>>>> >>>>> This doesn’t seem right, they’re provided by libgcc.a, so why aren’t >>>>> they being pulled in? libcompiler_rt.a doesn’t even have the symbols. >>>> >>>> My guess is that we don't link libraries against libgcc by default, >>>> only >>>> binaries (maybe this is a GCC feature/bug vs clang)?  I have another >>>> review >>>> open for a couple of google test libraries which similarly fail to >>>> link. >>> >>> So after some more digging (along with Jessica), it seems that GCC only >>> uses -lgcc_s (and not -lgcc) for C++ (but not C) on both Linux and >>> FreeBSD. >>> clang's FreeBSD toolchain driver is supposed to mimic GCC but >>> doesn't, it >>> applies the C rules even for C++ linking, so clang is implicitly adding >>> both -lgcc and -lgcc_s for C++. >>> >>> On Linux, libgcc.so is a linker script that includes both the dynamic >>> library and -lgcc which is how the static libgcc (including outline >>> atomics >>> for aarch64) is effectively linked into C++ shared libraries on Linux. >>> (Note: libgcc.so is a linker script on seemingly all arches on Linux, >>> not >>> just aarch64) >>> >>> So I think we have a couple of choices here.  I can patch the devel/ >>> freebsd-gccN >>> ports to stop passing -shared-libgcc to cc1plus which will cause GCC to >>> follow >>> the same rules as clang on FreeBSD (passing -lgcc -as-needed -lgcc_s - >>> no-as-needed >>> instead of -lgcc_s), or we could change libgcc.so to be a linker script >>> to match >>> Linux (and then eventually fix the FreeBSD driver in clang to only pass >>> -lgcc_s for C++ linking) (I think Andrew already has a review to make >>> libgcc.so >>> a linker script). >>> >>> I can see arguments both ways.  Using a linker script seems kind of dumb >>> given >>> all the hoops GCC goes to internally to decide whether or not to link >>> only >>> shared or static or both.  (Esp given libgcc is in theory part of the >>> compiler, >>> so the compiler should know that libgcc_s should depend on libgcc and be >>> able >>> to encode that in the default drivers.)  OTOH, the linker script >>> approach would >>> mean we would more closely align with Linux.  I think Jess favors >>> patching GCC. >>> Does anyone else have any strong opinions? >>> >> >> Is the question limited to devel/freebsd-gcc* ? Or does it span >> lang/gcc* use as well? > > We don't really support building the base system with lang/gcc* > (it's why devel/freebsd-gcc* exist) as the base system builds require > various changes like kernel printf support, defaulting to libc++, etc. > Likely more food for thought than you were originally trying to deal with for aarch64 contexts. I was not trying to indicate that any devel/freebsd-gcc* commit vs. lang/gcc* commit would/should be the same commit. More like . . . Are all of the potentially involved linking issues/techniques limited to that aarch64 system context and the use of devel/freebsd-gcc* ? Or are there, for example, "uses libcalls for outlined atomics" issues also for lang/gcc* g++* use, especially when it is told to use -stdlib=libc++ ( the system libc++ ) instead of using libstdc++ ? Do any issues and techniques generalize beyond devel/freebsd-gcc* use in any meaningful way? Even without committing anything for lang/gcc* , notes might prove useful later for someone, depending on the answers to the above. -- === Mark Millard marklmi at yahoo.com From nobody Fri Feb 27 22:08:46 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fN2Xb2FfWz6TPjn for ; Fri, 27 Feb 2026 22: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fN2Xb10H5z3llG for ; Fri, 27 Feb 2026 22: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=1772230127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MtAaM7EkAMDYZGgDNyq9KPNPRZMP5G3a2II60/vYSQk=; b=Lv7Rh/FZM8qPWlfFBspCfdHuJwb3EwZ9HAP3Y0XXwdkMJpooTYbV8/SZLzX8tTppbajrnI dhdDgzXcT+BDs+fuHuvn2jav9X4wu5a01wdmG4PIMORA2daghVSKgeXIkiIpsbqyjkXFXA A3g1DB56ti7vehjq4OpRTzgXbD9yawZ62Zr2Xn4AY2Rx3cVVG4E/5FTf85WWK51RdKXiV+ AF1WiCAXaPh7pzm/bWAv7vZStp4ksa+5PF4cZgEA3zIFAa4YpvuAqdpSv5aBFctjwoNmW9 5GFSN1BLNUiZgXKjwZR4Vg1aJsxe5zeTsLwmQAIfaXCXzGKG4MK7b9qkCov0mA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772230127; a=rsa-sha256; cv=none; b=Cdr5zKQdi5W4ifyw1HVu7Bg5Mhi5kVCkjpyjBJIaHUki7KEkCUXQSmgWP9lnBPNiyrR+Us QDuNJqbEaKQMSiV2JBlXhsEhTNEY9rfZkQUOovdHGhkbP8fignnxWtsjm3P+uD7J5/HWtl 7rRBcLCpeuclRoFTHUbC4snf8dHeWtZG/0PB+H6/MbHOVkXKk2+6dGZnc+x+ts7BqhzFT/ 2T8iz/0z2gmSyTsVOICXFNBFObTTBbxNIwaMRnGA6zceaIAKMXm/l49Qv3Z1ui8imfvbze 8/7NgOPMxkAKyK6cvPGUPxkFKdeuR6fOC29RR1fUydwyxkjKoINDysQmq5jZfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772230127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MtAaM7EkAMDYZGgDNyq9KPNPRZMP5G3a2II60/vYSQk=; b=kq+92crYJjgaScj837kObUZr6wl1pa3wwBwtpcYaMuRVoVrZ1QnSh0IFx5ondcZA5ExP+a 6/2nHmwlXbYlv56a0nj9taGfW9tHn7WgthTlMfCfNZQ3e6+Lv7U5EQ3i/o2aqDMYQiojlv hU7cRE11ua1Q9+lIaT/gxWVoOezOGgTmySvR5FOk1FIpFNgbShnm5QMjmO+ib5wlw1X6o4 ZWYRbxyLZFsjlNfpBXs7s0muZ/wWEe6faaJRkLYFDZZdx6h6tie63NmFs0mcpR/Uxhf3dQ 7lgCvBakOrvwWnL4BmosXeLYUGFBK+WwD18VUIt9Ojd3SL+U2Fv7p2BeaVp6xQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fN2XZ6gdwzcWJ for ; Fri, 27 Feb 2026 22:08:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34056 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 22:08:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Ali Mashtizadeh From: Warner Losh Subject: git: e51ef8ae490f - main - hwpmc: Initial support for AMD IBS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e51ef8ae490fc9f73191f33e7ad388c2511c454a Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 22:08:46 +0000 Message-Id: <69a215ee.34056.b6b1ce8@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e51ef8ae490fc9f73191f33e7ad388c2511c454a commit e51ef8ae490fc9f73191f33e7ad388c2511c454a Author: Ali Mashtizadeh AuthorDate: 2026-01-30 09:12:17 +0000 Commit: Warner Losh CommitDate: 2026-02-27 21:22:16 +0000 hwpmc: Initial support for AMD IBS This patch adds support for AMD IBS. It adds a new class of performance counter that cotains two events: ibs-fetch and ibs-op events. Unlike most existing sampled events, IBS events provide a number of values containing extra information regarding the sample. To support this we use the existing callchain event, and introduce a new flag for multipart payloads. The first 8 bytes of the pc_sample contains a header that defines up to four payloads. Sponsored by: Netflix Reviewed by: imp,mhorne Pull Request: https://github.com/freebsd/freebsd-src/pull/2022 --- lib/libpmc/libpmc.c | 64 ++++- sys/amd64/include/pmc_mdep.h | 5 + sys/conf/files.x86 | 1 + sys/dev/hwpmc/hwpmc_amd.c | 25 +- sys/dev/hwpmc/hwpmc_ibs.c | 614 +++++++++++++++++++++++++++++++++++++++++ sys/dev/hwpmc/hwpmc_ibs.h | 176 ++++++++++++ sys/dev/hwpmc/hwpmc_mod.c | 96 ++++++- sys/dev/hwpmc/pmc_events.h | 13 +- sys/i386/include/pmc_mdep.h | 5 + sys/modules/hwpmc/Makefile | 4 +- sys/sys/pmc.h | 19 +- sys/sys/pmclog.h | 14 + sys/x86/x86/local_apic.c | 27 +- usr.sbin/pmcstat/pmcstat_log.c | 99 ++++++- 14 files changed, 1130 insertions(+), 32 deletions(-) diff --git a/lib/libpmc/libpmc.c b/lib/libpmc/libpmc.c index 10e357f55935..155da7cf6a7b 100644 --- a/lib/libpmc/libpmc.c +++ b/lib/libpmc/libpmc.c @@ -50,8 +50,8 @@ #if defined(__amd64__) || defined(__i386__) static int k8_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); -#endif -#if defined(__amd64__) || defined(__i386__) +static int ibs_allocate_pmc(enum pmc_event _pe, char *_ctrspec, + struct pmc_op_pmcallocate *_pmc_config); static int tsc_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); #endif @@ -132,6 +132,7 @@ struct pmc_class_descr { PMC_CLASSDEP_TABLE(iaf, IAF); PMC_CLASSDEP_TABLE(k8, K8); +PMC_CLASSDEP_TABLE(ibs, IBS); PMC_CLASSDEP_TABLE(armv7, ARMV7); PMC_CLASSDEP_TABLE(armv8, ARMV8); PMC_CLASSDEP_TABLE(cmn600_pmu, CMN600_PMU); @@ -201,8 +202,7 @@ static const struct pmc_class_descr NAME##_class_table_descr = \ #if defined(__i386__) || defined(__amd64__) PMC_CLASS_TABLE_DESC(k8, K8, k8, k8); -#endif -#if defined(__i386__) || defined(__amd64__) +PMC_CLASS_TABLE_DESC(ibs, IBS, ibs, ibs); PMC_CLASS_TABLE_DESC(tsc, TSC, tsc, tsc); #endif #if defined(__arm__) @@ -691,9 +691,49 @@ k8_allocate_pmc(enum pmc_event pe, char *ctrspec, return (0); } -#endif +static int +ibs_allocate_pmc(enum pmc_event pe, char *ctrspec, + struct pmc_op_pmcallocate *pmc_config) +{ + char *e, *p, *q; + uint64_t ctl; + + pmc_config->pm_caps |= + (PMC_CAP_SYSTEM | PMC_CAP_EDGE | PMC_CAP_PRECISE); + pmc_config->pm_md.pm_ibs.ibs_ctl = 0; + + /* setup parsing tables */ + switch (pe) { + case PMC_EV_IBS_FETCH: + pmc_config->pm_md.pm_ibs.ibs_type = IBS_PMC_FETCH; + break; + case PMC_EV_IBS_OP: + pmc_config->pm_md.pm_ibs.ibs_type = IBS_PMC_OP; + break; + default: + return (-1); + } + + /* parse parameters */ + while ((p = strsep(&ctrspec, ",")) != NULL) { + if (KWPREFIXMATCH(p, "ctl=")) { + q = strchr(p, '='); + if (*++q == '\0') /* skip '=' */ + return (-1); + + ctl = strtoull(q, &e, 0); + if (e == q || *e != '\0') + return (-1); + + pmc_config->pm_md.pm_ibs.ibs_ctl |= ctl; + } else { + return (-1); + } + } + + return (0); +} -#if defined(__i386__) || defined(__amd64__) static int tsc_allocate_pmc(enum pmc_event pe, char *ctrspec, struct pmc_op_pmcallocate *pmc_config) @@ -1268,6 +1308,10 @@ pmc_event_names_of_class(enum pmc_class cl, const char ***eventnames, ev = k8_event_table; count = PMC_EVENT_TABLE_SIZE(k8); break; + case PMC_CLASS_IBS: + ev = ibs_event_table; + count = PMC_EVENT_TABLE_SIZE(ibs); + break; case PMC_CLASS_ARMV7: switch (cpu_info.pm_cputype) { default: @@ -1471,6 +1515,10 @@ pmc_init(void) case PMC_CLASS_K8: pmc_class_table[n++] = &k8_class_table_descr; break; + + case PMC_CLASS_IBS: + pmc_class_table[n++] = &ibs_class_table_descr; + break; #endif case PMC_CLASS_SOFT: @@ -1676,7 +1724,9 @@ _pmc_name_of_event(enum pmc_event pe, enum pmc_cputype cpu) if (pe >= PMC_EV_K8_FIRST && pe <= PMC_EV_K8_LAST) { ev = k8_event_table; evfence = k8_event_table + PMC_EVENT_TABLE_SIZE(k8); - + } else if (pe >= PMC_EV_IBS_FIRST && pe <= PMC_EV_IBS_LAST) { + ev = ibs_event_table; + evfence = ibs_event_table + PMC_EVENT_TABLE_SIZE(ibs); } else if (pe >= PMC_EV_ARMV7_FIRST && pe <= PMC_EV_ARMV7_LAST) { switch (cpu) { case PMC_CPU_ARMV7_CORTEX_A8: diff --git a/sys/amd64/include/pmc_mdep.h b/sys/amd64/include/pmc_mdep.h index 5c20d8473855..24b785312a16 100644 --- a/sys/amd64/include/pmc_mdep.h +++ b/sys/amd64/include/pmc_mdep.h @@ -41,6 +41,7 @@ struct pmc_mdep; #include #include +#include #include #include @@ -51,6 +52,7 @@ struct pmc_mdep; */ #define PMC_MDEP_CLASS_INDEX_TSC 1 #define PMC_MDEP_CLASS_INDEX_K8 2 +#define PMC_MDEP_CLASS_INDEX_IBS 3 #define PMC_MDEP_CLASS_INDEX_P4 2 #define PMC_MDEP_CLASS_INDEX_IAP 2 #define PMC_MDEP_CLASS_INDEX_IAF 3 @@ -62,6 +64,7 @@ struct pmc_mdep; * * TSC The timestamp counter * K8 AMD Athlon64 and Opteron PMCs in 64 bit mode. + * IBS AMD IBS * PIV Intel P4/HTT and P4/EMT64 * IAP Intel Core/Core2/Atom CPUs in 64 bits mode. * IAF Intel fixed-function PMCs in Core2 and later CPUs. @@ -71,6 +74,7 @@ struct pmc_mdep; union pmc_md_op_pmcallocate { struct pmc_md_amd_op_pmcallocate pm_amd; + struct pmc_md_ibs_op_pmcallocate pm_ibs; struct pmc_md_iap_op_pmcallocate pm_iap; struct pmc_md_ucf_op_pmcallocate pm_ucf; struct pmc_md_ucp_op_pmcallocate pm_ucp; @@ -85,6 +89,7 @@ union pmc_md_op_pmcallocate { union pmc_md_pmc { struct pmc_md_amd_pmc pm_amd; + struct pmc_md_ibs_pmc pm_ibs; struct pmc_md_iaf_pmc pm_iaf; struct pmc_md_iap_pmc pm_iap; struct pmc_md_ucf_pmc pm_ucf; diff --git a/sys/conf/files.x86 b/sys/conf/files.x86 index fabcd5d9ebe5..8a7e0b78feb4 100644 --- a/sys/conf/files.x86 +++ b/sys/conf/files.x86 @@ -114,6 +114,7 @@ dev/hptrr/hptrr_osm_bsd.c optional hptrr dev/hptrr/hptrr_config.c optional hptrr dev/hptrr/$M-elf.hptrr_lib.o optional hptrr dev/hwpmc/hwpmc_amd.c optional hwpmc +dev/hwpmc/hwpmc_ibs.c optional hwpmc dev/hwpmc/hwpmc_intel.c optional hwpmc dev/hwpmc/hwpmc_core.c optional hwpmc dev/hwpmc/hwpmc_uncore.c optional hwpmc diff --git a/sys/dev/hwpmc/hwpmc_amd.c b/sys/dev/hwpmc/hwpmc_amd.c index b34cbffcffa8..cf44f9362a72 100644 --- a/sys/dev/hwpmc/hwpmc_amd.c +++ b/sys/dev/hwpmc/hwpmc_amd.c @@ -543,6 +543,10 @@ amd_intr(struct trapframe *tf) pac = amd_pcpu[cpu]; + retval = pmc_ibs_intr(tf); + if (retval) + goto done; + /* * look for all PMCs that have interrupted: * - look for a running, sampling PMC which has overflowed @@ -613,6 +617,7 @@ amd_intr(struct trapframe *tf) } } +done: if (retval) counter_u64_add(pmc_stats.pm_intr_processed, 1); else @@ -760,7 +765,7 @@ pmc_amd_initialize(void) struct pmc_classdep *pcd; struct pmc_mdep *pmc_mdep; enum pmc_cputype cputype; - int error, i, ncpus; + int error, i, ncpus, nclasses; int family, model, stepping; int amd_core_npmcs, amd_l3_npmcs, amd_df_npmcs; struct amd_descr *d; @@ -884,10 +889,16 @@ pmc_amd_initialize(void) M_WAITOK | M_ZERO); /* - * These processors have two classes of PMCs: the TSC and - * programmable PMCs. + * These processors have two or three classes of PMCs: the TSC, + * programmable PMCs, and AMD IBS. */ - pmc_mdep = pmc_mdep_alloc(2); + if ((amd_feature2 & AMDID2_IBS) != 0) { + nclasses = 3; + } else { + nclasses = 2; + } + + pmc_mdep = pmc_mdep_alloc(nclasses); ncpus = pmc_cpu_max(); @@ -927,6 +938,12 @@ pmc_amd_initialize(void) PMCDBG0(MDP, INI, 0, "amd-initialize"); + if (nclasses >= 3) { + error = pmc_ibs_initialize(pmc_mdep, ncpus); + if (error != 0) + goto error; + } + return (pmc_mdep); error: diff --git a/sys/dev/hwpmc/hwpmc_ibs.c b/sys/dev/hwpmc/hwpmc_ibs.c new file mode 100644 index 000000000000..66d3260cf040 --- /dev/null +++ b/sys/dev/hwpmc/hwpmc_ibs.c @@ -0,0 +1,614 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2026, Ali Jose Mashtizadeh + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* Support for the AMD IBS */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#define IBS_STOP_ITER 50 /* Stopping iterations */ + +/* AMD IBS PMCs */ +struct ibs_descr { + struct pmc_descr pm_descr; /* "base class" */ +}; + +/* + * Globals + */ +static uint64_t ibs_features; + +/* + * Per-processor information + */ +#define IBS_CPU_RUNNING 1 +#define IBS_CPU_STOPPING 2 +#define IBS_CPU_STOPPED 3 + +struct ibs_cpu { + int pc_status; + struct pmc_hw pc_ibspmcs[IBS_NPMCS]; +}; +static struct ibs_cpu **ibs_pcpu; + +/* + * Read a PMC value from the MSR. + */ +static int +ibs_read_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t *v) +{ + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[ibs,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < IBS_NPMCS, + ("[ibs,%d] illegal row-index %d", __LINE__, ri)); + KASSERT(ibs_pcpu[cpu], + ("[ibs,%d] null per-cpu, cpu %d", __LINE__, cpu)); + + /* read the IBS ctl */ + switch (ri) { + case IBS_PMC_FETCH: + *v = rdmsr(IBS_FETCH_CTL); + break; + case IBS_PMC_OP: + *v = rdmsr(IBS_OP_CTL); + break; + } + + PMCDBG2(MDP, REA, 2, "ibs-read id=%d -> %jd", ri, *v); + + return (0); +} + +/* + * Write a PMC MSR. + */ +static int +ibs_write_pmc(int cpu, int ri, struct pmc *pm, pmc_value_t v) +{ + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[ibs,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < IBS_NPMCS, + ("[ibs,%d] illegal row-index %d", __LINE__, ri)); + + PMCDBG3(MDP, WRI, 1, "ibs-write cpu=%d ri=%d v=%jx", cpu, ri, v); + + return (0); +} + +/* + * Configure hardware PMC according to the configuration recorded in 'pm'. + */ +static int +ibs_config_pmc(int cpu, int ri, struct pmc *pm) +{ + struct pmc_hw *phw; + + PMCDBG3(MDP, CFG, 1, "cpu=%d ri=%d pm=%p", cpu, ri, pm); + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[ibs,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < IBS_NPMCS, + ("[ibs,%d] illegal row-index %d", __LINE__, ri)); + + phw = &ibs_pcpu[cpu]->pc_ibspmcs[ri]; + + KASSERT(pm == NULL || phw->phw_pmc == NULL, + ("[ibs,%d] pm=%p phw->pm=%p hwpmc not unconfigured", + __LINE__, pm, phw->phw_pmc)); + + phw->phw_pmc = pm; + + return (0); +} + +/* + * Retrieve a configured PMC pointer from hardware state. + */ +static int +ibs_get_config(int cpu, int ri, struct pmc **ppm) +{ + + *ppm = ibs_pcpu[cpu]->pc_ibspmcs[ri].phw_pmc; + + return (0); +} + +/* + * Check if a given PMC allocation is feasible. + */ +static int +ibs_allocate_pmc(int cpu __unused, int ri, struct pmc *pm, + const struct pmc_op_pmcallocate *a) +{ + uint64_t caps, config; + + KASSERT(ri >= 0 && ri < IBS_NPMCS, + ("[ibs,%d] illegal row index %d", __LINE__, ri)); + + /* check class match */ + if (a->pm_class != PMC_CLASS_IBS) + return (EINVAL); + if (a->pm_md.pm_ibs.ibs_type != ri) + return (EINVAL); + + caps = pm->pm_caps; + + PMCDBG2(MDP, ALL, 1, "ibs-allocate ri=%d caps=0x%x", ri, caps); + + if ((caps & PMC_CAP_SYSTEM) == 0) + return (EINVAL); + + config = a->pm_md.pm_ibs.ibs_ctl; + pm->pm_md.pm_ibs.ibs_ctl = config; + + PMCDBG2(MDP, ALL, 2, "ibs-allocate ri=%d -> config=0x%x", ri, config); + + return (0); +} + +/* + * Release machine dependent state associated with a PMC. This is a + * no-op on this architecture. + */ +static int +ibs_release_pmc(int cpu, int ri, struct pmc *pmc __unused) +{ + struct pmc_hw *phw __diagused; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[ibs,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < IBS_NPMCS, + ("[ibs,%d] illegal row-index %d", __LINE__, ri)); + + PMCDBG1(MDP, ALL, 1, "ibs-release ri=%d", ri); + + phw = &ibs_pcpu[cpu]->pc_ibspmcs[ri]; + + KASSERT(phw->phw_pmc == NULL, + ("[ibs,%d] PHW pmc %p non-NULL", __LINE__, phw->phw_pmc)); + + return (0); +} + +/* + * Start a PMC. + */ +static int +ibs_start_pmc(int cpu __diagused, int ri, struct pmc *pm) +{ + uint64_t config; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[ibs,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < IBS_NPMCS, + ("[ibs,%d] illegal row-index %d", __LINE__, ri)); + + PMCDBG2(MDP, STA, 1, "ibs-start cpu=%d ri=%d", cpu, ri); + + /* + * This is used to handle spurious NMIs. All that matters is that it + * is not in the stopping state. + */ + atomic_store_int(&ibs_pcpu[cpu]->pc_status, IBS_CPU_RUNNING); + + /* + * Turn on the ENABLE bit. Zeroing out the control register eliminates + * stale valid bits from spurious NMIs and it resets the counter. + */ + switch (ri) { + case IBS_PMC_FETCH: + wrmsr(IBS_FETCH_CTL, 0); + config = pm->pm_md.pm_ibs.ibs_ctl | IBS_FETCH_CTL_ENABLE; + wrmsr(IBS_FETCH_CTL, config); + break; + case IBS_PMC_OP: + wrmsr(IBS_OP_CTL, 0); + config = pm->pm_md.pm_ibs.ibs_ctl | IBS_OP_CTL_ENABLE; + wrmsr(IBS_OP_CTL, config); + break; + } + + return (0); +} + +/* + * Stop a PMC. + */ +static int +ibs_stop_pmc(int cpu __diagused, int ri, struct pmc *pm) +{ + int i; + uint64_t config; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[ibs,%d] illegal CPU value %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < IBS_NPMCS, + ("[ibs,%d] illegal row-index %d", __LINE__, ri)); + + PMCDBG1(MDP, STO, 1, "ibs-stop ri=%d", ri); + + /* + * Turn off the ENABLE bit, but unfortunately there are a few quirks + * that generate excess NMIs. Workaround #420 in the Revision Guide + * for AMD Family 10h Processors 41322 Rev. 3.92 March 2012. requires + * that we clear the count before clearing enable. + * + * Even after clearing the counter spurious NMIs are still possible so + * we use a per-CPU atomic variable to notify the interrupt handler we + * are stopping and discard spurious NMIs. We then retry clearing the + * control register for 50us. This gives us enough time and ensures + * that the valid bit is not accidently stuck after a spurious NMI. + */ + config = pm->pm_md.pm_ibs.ibs_ctl; + + atomic_store_int(&ibs_pcpu[cpu]->pc_status, IBS_CPU_STOPPING); + + switch (ri) { + case IBS_PMC_FETCH: + wrmsr(IBS_FETCH_CTL, config & ~IBS_FETCH_CTL_MAXCNTMASK); + DELAY(1); + config &= ~IBS_FETCH_CTL_ENABLE; + wrmsr(IBS_FETCH_CTL, config); + break; + case IBS_PMC_OP: + wrmsr(IBS_FETCH_CTL, config & ~IBS_FETCH_CTL_MAXCNTMASK); + DELAY(1); + config &= ~IBS_OP_CTL_ENABLE; + wrmsr(IBS_OP_CTL, config); + break; + } + + for (i = 0; i < IBS_STOP_ITER; i++) { + DELAY(1); + + switch (ri) { + case IBS_PMC_FETCH: + wrmsr(IBS_FETCH_CTL, 0); + break; + case IBS_PMC_OP: + wrmsr(IBS_OP_CTL, 0); + break; + } + } + + atomic_store_int(&ibs_pcpu[cpu]->pc_status, IBS_CPU_STOPPED); + + return (0); +} + +static void +pmc_ibs_process_fetch(struct pmc *pm, struct trapframe *tf, uint64_t config) +{ + struct pmc_multipart mpd; + + if (pm == NULL) + return; + + if (pm->pm_state != PMC_STATE_RUNNING) + return; + + memset(&mpd, 0, sizeof(mpd)); + + mpd.pl_type = PMC_CC_MULTIPART_IBS_FETCH; + mpd.pl_length = 4; + mpd.pl_mpdata[PMC_MPIDX_FETCH_CTL] = config; + if (ibs_features) { + mpd.pl_mpdata[PMC_MPIDX_FETCH_EXTCTL] = rdmsr(IBS_FETCH_EXTCTL); + } + mpd.pl_mpdata[PMC_MPIDX_FETCH_CTL] = config; + mpd.pl_mpdata[PMC_MPIDX_FETCH_LINADDR] = rdmsr(IBS_FETCH_LINADDR); + if ((config & IBS_FETCH_CTL_PHYSADDRVALID) != 0) { + mpd.pl_mpdata[PMC_MPIDX_FETCH_PHYSADDR] = + rdmsr(IBS_FETCH_PHYSADDR); + } + + pmc_process_interrupt_mp(PMC_HR, pm, tf, &mpd); +} + +static void +pmc_ibs_process_op(struct pmc *pm, struct trapframe *tf, uint64_t config) +{ + struct pmc_multipart mpd; + + if (pm == NULL) + return; + + if (pm->pm_state != PMC_STATE_RUNNING) + return; + + memset(&mpd, 0, sizeof(mpd)); + + mpd.pl_type = PMC_CC_MULTIPART_IBS_OP; + mpd.pl_length = 8; + mpd.pl_mpdata[PMC_MPIDX_OP_CTL] = config; + mpd.pl_mpdata[PMC_MPIDX_OP_RIP] = rdmsr(IBS_OP_RIP); + mpd.pl_mpdata[PMC_MPIDX_OP_DATA] = rdmsr(IBS_OP_DATA); + mpd.pl_mpdata[PMC_MPIDX_OP_DATA2] = rdmsr(IBS_OP_DATA2); + mpd.pl_mpdata[PMC_MPIDX_OP_DATA3] = rdmsr(IBS_OP_DATA3); + mpd.pl_mpdata[PMC_MPIDX_OP_DC_LINADDR] = rdmsr(IBS_OP_DC_LINADDR); + mpd.pl_mpdata[PMC_MPIDX_OP_DC_PHYSADDR] = rdmsr(IBS_OP_DC_PHYSADDR); + + pmc_process_interrupt_mp(PMC_HR, pm, tf, &mpd); + + wrmsr(IBS_OP_CTL, pm->pm_md.pm_ibs.ibs_ctl | IBS_OP_CTL_ENABLE); +} + +/* + * Interrupt handler. This function needs to return '1' if the + * interrupt was this CPU's PMCs or '0' otherwise. It is not allowed + * to sleep or do anything a 'fast' interrupt handler is not allowed + * to do. + */ +int +pmc_ibs_intr(struct trapframe *tf) +{ + struct ibs_cpu *pac; + struct pmc *pm; + int retval, cpu; + uint64_t config; + + cpu = curcpu; + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[ibs,%d] out of range CPU %d", __LINE__, cpu)); + + PMCDBG3(MDP, INT, 1, "cpu=%d tf=%p um=%d", cpu, tf, TRAPF_USERMODE(tf)); + + retval = 0; + + pac = ibs_pcpu[cpu]; + + config = rdmsr(IBS_FETCH_CTL); + if ((config & IBS_FETCH_CTL_VALID) != 0) { + pm = pac->pc_ibspmcs[IBS_PMC_FETCH].phw_pmc; + + retval = 1; + + pmc_ibs_process_fetch(pm, tf, config); + } + + config = rdmsr(IBS_OP_CTL); + if ((retval == 0) && ((config & IBS_OP_CTL_VALID) != 0)) { + pm = pac->pc_ibspmcs[IBS_PMC_OP].phw_pmc; + + retval = 1; + + pmc_ibs_process_op(pm, tf, config); + } + + if (retval == 0) { + // Lets check for a stray NMI when stopping + if (atomic_load_int(&pac->pc_status) == IBS_CPU_STOPPING) { + return (1); + } + } + + + if (retval) + counter_u64_add(pmc_stats.pm_intr_processed, 1); + else + counter_u64_add(pmc_stats.pm_intr_ignored, 1); + + PMCDBG1(MDP, INT, 2, "retval=%d", retval); + + return (retval); +} + +/* + * Describe a PMC. + */ +static int +ibs_describe(int cpu, int ri, struct pmc_info *pi, struct pmc **ppmc) +{ + struct pmc_hw *phw; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[ibs,%d] illegal CPU %d", __LINE__, cpu)); + KASSERT(ri >= 0 && ri < IBS_NPMCS, + ("[ibs,%d] row-index %d out of range", __LINE__, ri)); + + phw = &ibs_pcpu[cpu]->pc_ibspmcs[ri]; + + if (ri == IBS_PMC_FETCH) { + strlcpy(pi->pm_name, "IBS-FETCH", sizeof(pi->pm_name)); + pi->pm_class = PMC_CLASS_IBS; + pi->pm_enabled = true; + *ppmc = phw->phw_pmc; + } else { + strlcpy(pi->pm_name, "IBS-OP", sizeof(pi->pm_name)); + pi->pm_class = PMC_CLASS_IBS; + pi->pm_enabled = true; + *ppmc = phw->phw_pmc; + } + + return (0); +} + +/* + * Processor-dependent initialization. + */ +static int +ibs_pcpu_init(struct pmc_mdep *md, int cpu) +{ + struct ibs_cpu *pac; + struct pmc_cpu *pc; + struct pmc_hw *phw; + int first_ri, n; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[ibs,%d] insane cpu number %d", __LINE__, cpu)); + + PMCDBG1(MDP, INI, 1, "ibs-init cpu=%d", cpu); + + ibs_pcpu[cpu] = pac = malloc(sizeof(struct ibs_cpu), M_PMC, + M_WAITOK | M_ZERO); + + /* + * Set the content of the hardware descriptors to a known + * state and initialize pointers in the MI per-cpu descriptor. + */ + pc = pmc_pcpu[cpu]; + first_ri = md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IBS].pcd_ri; + + KASSERT(pc != NULL, ("[ibs,%d] NULL per-cpu pointer", __LINE__)); + + for (n = 0, phw = pac->pc_ibspmcs; n < IBS_NPMCS; n++, phw++) { + phw->phw_state = PMC_PHW_FLAG_IS_ENABLED | + PMC_PHW_CPU_TO_STATE(cpu) | PMC_PHW_INDEX_TO_STATE(n); + phw->phw_pmc = NULL; + pc->pc_hwpmcs[n + first_ri] = phw; + } + + return (0); +} + +/* + * Processor-dependent cleanup prior to the KLD being unloaded. + */ +static int +ibs_pcpu_fini(struct pmc_mdep *md, int cpu) +{ + struct ibs_cpu *pac; + struct pmc_cpu *pc; + int first_ri, i; + + KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), + ("[ibs,%d] insane cpu number (%d)", __LINE__, cpu)); + + PMCDBG1(MDP, INI, 1, "ibs-cleanup cpu=%d", cpu); + + /* + * Turn off IBS. + */ + wrmsr(IBS_FETCH_CTL, 0); + wrmsr(IBS_OP_CTL, 0); + + /* + * Free up allocated space. + */ + if ((pac = ibs_pcpu[cpu]) == NULL) + return (0); + + ibs_pcpu[cpu] = NULL; + + pc = pmc_pcpu[cpu]; + KASSERT(pc != NULL, ("[ibs,%d] NULL per-cpu state", __LINE__)); + + first_ri = md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IBS].pcd_ri; + + /* + * Reset pointers in the MI 'per-cpu' state. + */ + for (i = 0; i < IBS_NPMCS; i++) + pc->pc_hwpmcs[i + first_ri] = NULL; + + free(pac, M_PMC); + + return (0); +} + +/* + * Initialize ourselves. + */ +int +pmc_ibs_initialize(struct pmc_mdep *pmc_mdep, int ncpus) +{ + u_int regs[4]; + struct pmc_classdep *pcd; + + /* + * Allocate space for pointers to PMC HW descriptors and for + * the MDEP structure used by MI code. + */ + ibs_pcpu = malloc(sizeof(struct ibs_cpu *) * pmc_cpu_max(), M_PMC, + M_WAITOK | M_ZERO); + + /* Initialize AMD IBS handling. */ + pcd = &pmc_mdep->pmd_classdep[PMC_MDEP_CLASS_INDEX_IBS]; + + pcd->pcd_caps = IBS_PMC_CAPS; + pcd->pcd_class = PMC_CLASS_IBS; + pcd->pcd_num = IBS_NPMCS; + pcd->pcd_ri = pmc_mdep->pmd_npmc; + pcd->pcd_width = 0; + + pcd->pcd_allocate_pmc = ibs_allocate_pmc; + pcd->pcd_config_pmc = ibs_config_pmc; + pcd->pcd_describe = ibs_describe; + pcd->pcd_get_config = ibs_get_config; + pcd->pcd_pcpu_fini = ibs_pcpu_fini; + pcd->pcd_pcpu_init = ibs_pcpu_init; + pcd->pcd_release_pmc = ibs_release_pmc; + pcd->pcd_start_pmc = ibs_start_pmc; + pcd->pcd_stop_pmc = ibs_stop_pmc; + pcd->pcd_read_pmc = ibs_read_pmc; + pcd->pcd_write_pmc = ibs_write_pmc; + + pmc_mdep->pmd_npmc += IBS_NPMCS; + + if (cpu_exthigh >= CPUID_IBSID) { + do_cpuid(CPUID_IBSID, regs); + ibs_features = regs[0]; + } else { + ibs_features = 0; + } + + PMCDBG0(MDP, INI, 0, "ibs-initialize"); + + return (0); +} + +/* + * Finalization code for AMD CPUs. + */ +void +pmc_ibs_finalize(struct pmc_mdep *md) +{ + PMCDBG0(MDP, INI, 1, "ibs-finalize"); + + for (int i = 0; i < pmc_cpu_max(); i++) + KASSERT(ibs_pcpu[i] == NULL, + ("[ibs,%d] non-null pcpu cpu %d", __LINE__, i)); + + free(ibs_pcpu, M_PMC); + ibs_pcpu = NULL; +} diff --git a/sys/dev/hwpmc/hwpmc_ibs.h b/sys/dev/hwpmc/hwpmc_ibs.h new file mode 100644 index 000000000000..4449b44c8368 --- /dev/null +++ b/sys/dev/hwpmc/hwpmc_ibs.h @@ -0,0 +1,176 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2026, Ali Jose Mashtizadeh + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _DEV_HWPMC_IBS_H_ +#define _DEV_HWPMC_IBS_H_ 1 + +#define IBS_NPMCS 2 +#define IBS_PMC_FETCH 0 +#define IBS_PMC_OP 1 + +/* + * All of the CPUID definitions come from AMD PPR Vol 1 for AMD Family 1Ah + * Model 02h C1 (57238) 2024-09-29 Revision 0.24. + */ +#define CPUID_IBSID 0x8000001B +#define CPUID_IBSID_IBSFFV 0x00000001 /* IBS Feature Flags Valid */ +#define CPUID_IBSID_FETCHSAM 0x00000002 /* IBS Fetch Sampling */ +#define CPUID_IBSID_OPSAM 0x00000004 /* IBS Execution Sampling */ +#define CPUID_IBSID_RDWROPCNT 0x00000008 /* RdWr Operationg Counter */ +#define CPUID_IBSID_OPCNT 0x00000010 /* Operation Counter */ +#define CPUID_IBSID_BRNTRGT 0x00000020 /* Branch Target Address */ +#define CPUID_IBSID_OPCNTEXT 0x00000040 /* Extend Counter */ +#define CPUID_IBSID_RIPINVALIDCHK 0x00000080 /* Invalid RIP Indication */ +#define CPUID_IBSID_OPFUSE 0x00000010 /* Fused Branch Operation */ +#define CPUID_IBSID_IBSFETCHCTLEXTD 0x00000020 /* IBS Fetch Control Ext */ +#define CPUID_IBSID_IBSOPDATA4 0x00000040 /* IBS OP DATA4 */ +#define CPUID_IBSID_ZEN4IBSEXTENSIONS 0x00000080 /* IBS Zen 4 Extensions */ +#define CPUID_IBSID_IBSLOADLATENCYFILT 0x00000100 /* Load Latency Filtering */ +#define CPUID_IBSID_IBSUPDTDDTLBSTATS 0x00080000 /* Simplified DTLB Stats */ + +/* + * All of these definitions here come from AMD64 Architecture Programmer's + * Manual Volume 2: System Programming (24593) 2025-07-02 Version 3.43. with + * the following exceptions: + * + * OpData4 and fields come from the BKDG for AMD Family 15h Model 70-7Fh + * (55072) 2018-06-20 Revision 3.09. + */ + +/* IBS MSRs */ +#define IBS_CTL 0xC001103A /* IBS Control */ +#define IBS_CTL_LVTOFFSETVALID (1ULL << 8) +#define IBS_CTL_LVTOFFSETMASK 0x0000000F + +/* IBS Fetch Control */ +#define IBS_FETCH_CTL 0xC0011030 /* IBS Fetch Control */ +#define IBS_FETCH_CTL_L3MISS (1ULL << 61) /* L3 Cache Miss */ +#define IBS_FETCH_CTL_OPCACHEMISS (1ULL << 60) /* Op Cache Miss */ +#define IBS_FETCH_CTL_L3MISSONLY (1ULL << 59) /* L3 Miss Filtering */ +#define IBS_FETCH_CTL_RANDOMIZE (1ULL << 57) /* Randomized Tagging */ +#define IBS_FETCH_CTL_L1TLBMISS (1ULL << 55) /* L1 TLB Miss */ +// Page size 54:53 +#define IBS_FETCH_CTL_PHYSADDRVALID (1ULL << 52) /* PHYSADDR Valid */ +#define IBS_FETCH_CTL_ICMISS (1ULL << 51) /* Inst. Cache Miss */ +#define IBS_FETCH_CTL_COMPLETE (1ULL << 50) /* Complete */ *** 650 LINES SKIPPED *** From nobody Fri Feb 27 22:08:48 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fN2Xc1n7Bz6TQ9Q for ; Fri, 27 Feb 2026 22: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fN2Xc0tG9z3lZJ for ; Fri, 27 Feb 2026 22: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=1772230128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hKAqqFRGof7OrLBLZbzyydUSlZA39LpQPEhgoQGBxxk=; b=iRMss9orQ4AOukL4/w/r25NBL07SzhPA8rkYcd/WWRX//xanVLDYu9Bwy1mjepH4FOHJJK wVUbkBUdZsn5mprGMLlbnjgSSrPNRj39n+5yllSJ4bL936JqYPVDLqcVNqsWarlRoa+6h7 MkrQ+FKD+q5r4MMOsh7vLJzdXjcGmo1/VoA8UwrVnUuqYa/YPrBibCkGYnfTmWWryJ1eFj DyXujDxNtWGUY0pceYrXjshL+TC2IoVbpSAT9xZkAVe0kEq31X0deElag7Lm3Z3HhaVvwi c0dbkJvhbU+LbQz9Fy81Yv5Cw4KO/lrtrhOzf3ChAH9IceM670/MZH2unxtsvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772230128; a=rsa-sha256; cv=none; b=tohVGrMBuDGJwHROZaKB5zrVG7mugyavd413wrYe3sjXBZJ9rMIQNVhQoryEsy2xojy0/m 9zn4CSdlmUptKeV7kzXC0cAYOgjvz+0Jw/v4BLDYtNFm+2JtTA1AaR/EVzU3p1doqFFhO7 HpTx2+xm6hTjyJKBKtXgzZ2XHpupv0DgLtrll29/cQ7lXvXUXohDmMJyBG4cPVGKSOIZhA dfJGxgeWvZAeVLjVjZ6d8yIP/iCc5MpPanpwgM8bJvjwaKAt3q6I3IeWWiLfoo82iVARiQ PQWqbxTUutq1TC5fhoPVVpOFJ2bBcT0Fwn8N1Q5p2GWD006uWMsK3SyDKZCZmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772230128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hKAqqFRGof7OrLBLZbzyydUSlZA39LpQPEhgoQGBxxk=; b=Cl1dW9WZ47Lf60PKhUS0BHw0YbusKs5fWjenyHRxebuRTIlOhNhAERkwDuFLVhIKbUwiIn WG+ug/NI5KE6xVE7tH2Ebv5LDJWGvAp3C/5usiK3obwpa2MtL5U0Bg+VlrGbHc+kwRn4o7 dfVHp+4A4hDXi/viKzUYZIsBiCttTW6rQXUXS5vHR6w1DjM4kd8TZILGzwJMj4jNlq5GsP vfDHvSs676qmXZDOEJ5jWgVNf1RoVkNaRlIbkBuiEyxmcnkr+MpHkYl2lU+nGAQPqMctLi KE8LkZFGUPY2Ysl792ETLtCfRAIf/HWU2vqS7K94kWpWn9IIEGxlsWDCj+D4zQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fN2Xc0D4qzcc5 for ; Fri, 27 Feb 2026 22:08:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3423b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 22:08:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Ali Mashtizadeh From: Warner Losh Subject: git: 3ce3e896acf6 - main - libpmc: Update event definitions for AMD Zen List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3ce3e896acf6cd504514ee44fc3aedcdc48a199c Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 22:08:48 +0000 Message-Id: <69a215f0.3423b.3bc7cd10@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3ce3e896acf6cd504514ee44fc3aedcdc48a199c commit 3ce3e896acf6cd504514ee44fc3aedcdc48a199c Author: Ali Mashtizadeh AuthorDate: 2026-02-24 15:36:03 +0000 Commit: Warner Losh CommitDate: 2026-02-27 21:26:34 +0000 libpmc: Update event definitions for AMD Zen The pmu event definitions for AMD Zen 5 was updated since it was imported into the tree. As a bonus I also updated the recommended json counters for Zen 1-3 even though we do not use that file yet. Sponsored by: Netflix Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2048 --- lib/libpmc/pmu-events/arch/x86/amdzen1/recommended.json | 3 ++- lib/libpmc/pmu-events/arch/x86/amdzen2/recommended.json | 3 ++- lib/libpmc/pmu-events/arch/x86/amdzen3/recommended.json | 3 ++- lib/libpmc/pmu-events/arch/x86/amdzen5/load-store.json | 6 +++--- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen1/recommended.json b/lib/libpmc/pmu-events/arch/x86/amdzen1/recommended.json index bf5083c1c260..4d28177325a0 100644 --- a/lib/libpmc/pmu-events/arch/x86/amdzen1/recommended.json +++ b/lib/libpmc/pmu-events/arch/x86/amdzen1/recommended.json @@ -169,8 +169,9 @@ }, { "MetricName": "nps1_die_to_dram", - "BriefDescription": "Approximate: Combined DRAM B/bytes of all channels on a NPS1 node (die) (may need --metric-no-group)", + "BriefDescription": "Approximate: Combined DRAM B/bytes of all channels on a NPS1 node (die)", "MetricExpr": "dram_channel_data_controller_0 + dram_channel_data_controller_1 + dram_channel_data_controller_2 + dram_channel_data_controller_3 + dram_channel_data_controller_4 + dram_channel_data_controller_5 + dram_channel_data_controller_6 + dram_channel_data_controller_7", + "MetricConstraint": "NO_GROUP_EVENTS", "MetricGroup": "data_fabric", "PerPkg": "1", "ScaleUnit": "6.1e-5MiB" diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen2/recommended.json b/lib/libpmc/pmu-events/arch/x86/amdzen2/recommended.json index a71694a043ba..60e19456d4c8 100644 --- a/lib/libpmc/pmu-events/arch/x86/amdzen2/recommended.json +++ b/lib/libpmc/pmu-events/arch/x86/amdzen2/recommended.json @@ -169,8 +169,9 @@ }, { "MetricName": "nps1_die_to_dram", - "BriefDescription": "Approximate: Combined DRAM B/bytes of all channels on a NPS1 node (die) (may need --metric-no-group)", + "BriefDescription": "Approximate: Combined DRAM B/bytes of all channels on a NPS1 node (die)", "MetricExpr": "dram_channel_data_controller_0 + dram_channel_data_controller_1 + dram_channel_data_controller_2 + dram_channel_data_controller_3 + dram_channel_data_controller_4 + dram_channel_data_controller_5 + dram_channel_data_controller_6 + dram_channel_data_controller_7", + "MetricConstraint": "NO_GROUP_EVENTS", "MetricGroup": "data_fabric", "PerPkg": "1", "ScaleUnit": "6.1e-5MiB" diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen3/recommended.json b/lib/libpmc/pmu-events/arch/x86/amdzen3/recommended.json index 988cf68ae825..3e9e1781812e 100644 --- a/lib/libpmc/pmu-events/arch/x86/amdzen3/recommended.json +++ b/lib/libpmc/pmu-events/arch/x86/amdzen3/recommended.json @@ -205,10 +205,11 @@ }, { "MetricName": "nps1_die_to_dram", - "BriefDescription": "Approximate: Combined DRAM B/bytes of all channels on a NPS1 node (die) (may need --metric-no-group)", + "BriefDescription": "Approximate: Combined DRAM B/bytes of all channels on a NPS1 node (die)", "MetricExpr": "dram_channel_data_controller_0 + dram_channel_data_controller_1 + dram_channel_data_controller_2 + dram_channel_data_controller_3 + dram_channel_data_controller_4 + dram_channel_data_controller_5 + dram_channel_data_controller_6 + dram_channel_data_controller_7", "MetricGroup": "data_fabric", "PerPkg": "1", + "MetricConstraint": "NO_GROUP_EVENTS", "ScaleUnit": "6.1e-5MiB" } ] diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen5/load-store.json b/lib/libpmc/pmu-events/arch/x86/amdzen5/load-store.json index ff6627a77805..06bbaea15925 100644 --- a/lib/libpmc/pmu-events/arch/x86/amdzen5/load-store.json +++ b/lib/libpmc/pmu-events/arch/x86/amdzen5/load-store.json @@ -70,19 +70,19 @@ "EventName": "ls_mab_alloc.load_store_allocations", "EventCode": "0x41", "BriefDescription": "Miss Address Buffer (MAB) entries allocated by a Load-Store (LS) pipe for load-store allocations.", - "UMask": "0x3f" + "UMask": "0x07" }, { "EventName": "ls_mab_alloc.hardware_prefetcher_allocations", "EventCode": "0x41", "BriefDescription": "Miss Address Buffer (MAB) entries allocated by a Load-Store (LS) pipe for hardware prefetcher allocations.", - "UMask": "0x40" + "UMask": "0x08" }, { "EventName": "ls_mab_alloc.all_allocations", "EventCode": "0x41", "BriefDescription": "Miss Address Buffer (MAB) entries allocated by a Load-Store (LS) pipe for all types of allocations.", - "UMask": "0x7f" + "UMask": "0x0f" }, { "EventName": "ls_dmnd_fills_from_sys.local_l2", From nobody Fri Feb 27 22:08:49 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fN2Xd38NHz6TQ07 for ; Fri, 27 Feb 2026 22: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fN2Xd1Nyrz3lcR for ; Fri, 27 Feb 2026 22: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=1772230129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MKnlOmZ5mpqBdLijLPcW6UdNYAkSygrPz6pL1m1IFSo=; b=E47ANRjvHu2wTjHf0NgobmQNPCDnT2NE33ry9JPhOFUkrxsTOfi4cVnzMwQLF0FlLeIPLS pHLuzx9fL2Fif7P1trtgxXPnR4DroSlPKIM4WhuztB6gkarqwWPp1jsN83uGTLolfx2tpg D5euI9ZFbNSNg/NXS5DUcFlrg6pugCluSnLiiTwK99bJkViRXGZCF9DY2zJVH3Jatni4vT MY2XlQn+SlhA3ClcdvNQbCCQWspIqDJXX4mQEJYyXOD+8AbcMbnJHOKxCtwl0xrlTM2xL8 dwAkB3G52buIK5AlCHHqmGi43vT6bSRSaWUYI3GH8jmeDMv4dmsdqd3o0bBn9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772230129; a=rsa-sha256; cv=none; b=qji0utqn/RWPPCNyP57uAIOClmwLyzDxSnGjUWcJKlXIRvuhmzjDWsv6OPUVUS+bURNU0v JUygGfsZGiuCPBtS+3rpR9Zmx2iNL7qd4T4VCte43cV0lzXo/qKJ553KR/niSc3B0iVbG2 dGIVjaa7qOmVXkpgG/prD7Kc1YAFzDS6Ldcp5l6jpr6E89PCvjID41D9fjr6ACe72YIUFA 5m+xAfYJIfq1Qxob8LFFKHB+9m/UKnZ0ymyHpO6lZO9smx2T0a9RdLFjcV1uE0jgxOLYP5 M4v+mgzUcHfuVekQ1yCRkMbtRsoiMMakvjESOWD/RjUqic0NGlUeK3u0Upwggw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772230129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MKnlOmZ5mpqBdLijLPcW6UdNYAkSygrPz6pL1m1IFSo=; b=Zbt9zWCYdVc5wv7WT5Fl0hG/bZFzOIVtcO8LGjXXLjX92SP4kvljKJCy4o+WFtl6bWC6Hf Ntn9ZrL/t4TVFcAcmj1wxQRezSayvx/qmIcgVRQ/PcHTNkSUg4lmdqeXCY84pGazon4INl sr7wPi8QqTtQNxWbyzEm5xMK4hKzNFbBPE9SZBLJmN6wxhE0UQ5Vxqi6XChYaiLAyvZhNQ X/9mOxmYuPz9lFtwTqhkSQAa5xXfX6siBWQf/hETxOr71Z8ZwVuLdF61I1TDrR5UBcuZyt AVpKi4VxE+7JlItlFxs1anoAcNd1poF/lRyJzUb2jkPwXmykb6wGUcmlN05oWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fN2Xd10JGzbKQ for ; Fri, 27 Feb 2026 22:08:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3227b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 22:08:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Ali Mashtizadeh From: Warner Losh Subject: git: 178d0b5b8da7 - main - libpmc: Import AMD Zen 6 PMU events. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 178d0b5b8da7480f455273aedf40dd8f1e785d3f Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 22:08:49 +0000 Message-Id: <69a215f1.3227b.5e050122@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=178d0b5b8da7480f455273aedf40dd8f1e785d3f commit 178d0b5b8da7480f455273aedf40dd8f1e785d3f Author: Ali Mashtizadeh AuthorDate: 2026-02-24 15:52:00 +0000 Commit: Warner Losh CommitDate: 2026-02-27 21:27:35 +0000 libpmc: Import AMD Zen 6 PMU events. Sponsored by: Netflix Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2049 --- .../arch/x86/amdzen6/branch-prediction.json | 93 ++ lib/libpmc/pmu-events/arch/x86/amdzen6/decode.json | 139 +++ .../pmu-events/arch/x86/amdzen6/execution.json | 192 ++++ .../arch/x86/amdzen6/floating-point.json | 1106 ++++++++++++++++++++ .../pmu-events/arch/x86/amdzen6/inst-cache.json | 120 +++ .../pmu-events/arch/x86/amdzen6/l2-cache.json | 326 ++++++ .../pmu-events/arch/x86/amdzen6/l3-cache.json | 177 ++++ .../pmu-events/arch/x86/amdzen6/load-store.json | 523 +++++++++ .../arch/x86/amdzen6/memory-controller.json | 101 ++ .../pmu-events/arch/x86/amdzen6/pipeline.json | 99 ++ .../pmu-events/arch/x86/amdzen6/recommended.json | 339 ++++++ lib/libpmc/pmu-events/arch/x86/mapfile.csv | 3 +- 12 files changed, 3217 insertions(+), 1 deletion(-) diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen6/branch-prediction.json b/lib/libpmc/pmu-events/arch/x86/amdzen6/branch-prediction.json new file mode 100644 index 000000000000..dd70069f68ed --- /dev/null +++ b/lib/libpmc/pmu-events/arch/x86/amdzen6/branch-prediction.json @@ -0,0 +1,93 @@ +[ + { + "EventName": "bp_l1_tlb_miss_l2_tlb_hit", + "EventCode": "0x84", + "BriefDescription": "Instruction fetches that miss in the L1 ITLB but hit in the L2 ITLB." + }, + { + "EventName": "bp_l1_tlb_miss_l2_tlb_miss.if4k", + "EventCode": "0x85", + "BriefDescription": "Instruction fetches that miss in both the L1 and L2 ITLBs (page-table walks requested) for 4k pages.", + "UMask": "0x01" + }, + { + "EventName": "bp_l1_tlb_miss_l2_tlb_miss.if2m", + "EventCode": "0x85", + "BriefDescription": "Instruction fetches that miss in both the L1 and L2 ITLBs (page-table walks requested) for 2M pages.", + "UMask": "0x02" + }, + { + "EventName": "bp_l1_tlb_miss_l2_tlb_miss.if1g", + "EventCode": "0x85", + "BriefDescription": "Instruction fetches that miss in both the L1 and L2 ITLBs (page-table walks requested) for 1G pages.", + "UMask": "0x04" + }, + { + "EventName": "bp_l1_tlb_miss_l2_tlb_miss.coalesced_4k", + "EventCode": "0x85", + "BriefDescription": "Instruction fetches that miss in both the L1 and L2 ITLBs (page-table walks requested) for coalesced pages (16k pages created from four adjacent 4k pages).", + "UMask": "0x08" + }, + { + "EventName": "bp_l1_tlb_miss_l2_tlb_miss.all", + "EventCode": "0x85", + "BriefDescription": "Instruction fetches that miss in both the L1 and L2 ITLBs (page-table walks requested) for all page sizes.", + "UMask": "0x0f" + }, + { + "EventName": "bp_pipe_correct", + "EventCode": "0x8b", + "BriefDescription": "Branch predictor pipeline flushes due to internal conditions such as a second level prediction structure." + }, + { + "EventName": "bp_var_target_pred", + "EventCode": "0x8e", + "BriefDescription": "Indirect predictions (branch used the indirect predictor to make a prediction)." + }, + { + "EventName": "bp_early_redir", + "EventCode": "0x91", + "BriefDescription": "Early redirects sent to branch predictor. This happens when either the decoder or dispatch logic is able to detect that the branch predictor needs to be redirected." + }, + { + "EventName": "bp_l1_tlb_fetch_hit.if4k", + "EventCode": "0x94", + "BriefDescription": "Instruction fetches that hit in the L1 ITLB for 4k or coalesced pages (16k pages created from four adjacent 4k pages).", + "UMask": "0x01" + }, + { + "EventName": "bp_l1_tlb_fetch_hit.if2m", + "EventCode": "0x94", + "BriefDescription": "Instruction fetches that hit in the L1 ITLB for 2M pages.", + "UMask": "0x02" + }, + { + "EventName": "bp_l1_tlb_fetch_hit.if1g", + "EventCode": "0x94", + "BriefDescription": "Instruction fetches that hit in the L1 ITLB for 1G pages.", + "UMask": "0x04" + }, + { + "EventName": "bp_l1_tlb_fetch_hit.all", + "EventCode": "0x94", + "BriefDescription": "Instruction fetches that hit in the L1 ITLB for all page sizes.", + "UMask": "0x07" + }, + { + "EventName": "bp_fe_redir.resync", + "EventCode": "0x9f", + "BriefDescription": "Redirects of the pipeline frontend caused by resyncs. These are retire time pipeline restarts.", + "UMask": "0x01" + }, + { + "EventName": "bp_fe_redir.ex_redir", + "EventCode": "0x9f", + "BriefDescription": "Redirects of the pipeline frontend caused by mispredicts. These are used for branch direction correction and handling indirect branch target mispredicts.", + "UMask": "0x02" + }, + { + "EventName": "bp_fe_redir.all", + "EventCode": "0x9f", + "BriefDescription": "Redirects of the pipeline frontend caused by any reason." + } +] diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen6/decode.json b/lib/libpmc/pmu-events/arch/x86/amdzen6/decode.json new file mode 100644 index 000000000000..c5d37fbac948 --- /dev/null +++ b/lib/libpmc/pmu-events/arch/x86/amdzen6/decode.json @@ -0,0 +1,139 @@ +[ + { + "EventName": "de_op_queue_empty", + "EventCode": "0xa9", + "BriefDescription": "Cycles where the op queue is empty. Such cycles indicate that the frontend is not delivering instructions fast enough." + }, + { + "EventName": "de_src_op_disp.x86_decoder", + "EventCode": "0xaa", + "BriefDescription": "Ops dispatched from x86 decoder.", + "UMask": "0x01" + }, + { + "EventName": "de_src_op_disp.op_cache", + "EventCode": "0xaa", + "BriefDescription": "Ops dispatched from op cache.", + "UMask": "0x02" + }, + { + "EventName": "de_src_op_disp.all", + "EventCode": "0xaa", + "BriefDescription": "Ops dispatched from any source.", + "UMask": "0x07" + }, + { + "EventName": "de_dis_ops_from_decoder.any_fp", + "EventCode": "0xab", + "BriefDescription": "Ops dispatched from the decoder to a floating-point unit.", + "UMask": "0x04" + }, + { + "EventName": "de_dis_ops_from_decoder.any_int", + "EventCode": "0xab", + "BriefDescription": "Ops dispatched from the decoder to an integer unit.", + "UMask": "0x08" + }, + { + "EventName": "de_disp_stall_cycles_dynamic_tokens_part1.int_phy_reg_file_rsrc_stall", + "EventCode": "0xae", + "BriefDescription": "Cycles where a dispatch group is valid but does not get dispatched due to integer physical register file resource stalls.", + "UMask": "0x01" + }, + { + "EventName": "de_dispatch_stall_cycle_dynamic_tokens_part1.load_queue_rsrc_stall", + "EventCode": "0xae", + "BriefDescription": "Cycles where a dispatch group is valid but does not get dispatched due to load queue token stalls.", + "UMask": "0x02" + }, + { + "EventName": "de_dispatch_stall_cycle_dynamic_tokens_part1.store_queue_rsrc_stall", + "EventCode": "0xae", + "BriefDescription": "Cycles where a dispatch group is valid but does not get dispatched due to store queue token stalls.", + "UMask": "0x04" + }, + { + "EventName": "de_dispatch_stall_cycle_dynamic_tokens_part1.taken_brnch_buffer_rsrc", + "EventCode": "0xae", + "BriefDescription": "Cycles where a dispatch group is valid but does not get dispatched due to taken branch buffer resource stalls.", + "UMask": "0x10" + }, + { + "EventName": "de_dispatch_stall_cycle_dynamic_tokens_part1.fp_sch_rsrc_stall", + "EventCode": "0xae", + "BriefDescription": "Cycles where a dispatch group is valid but does not get dispatched due to floating-point non-schedulable queue token stalls.", + "UMask": "0x40" + }, + { + "EventName": "de_dispatch_stall_cycle_dynamic_tokens_part2.int_sq0", + "EventCode": "0xaf", + "BriefDescription": "Cycles where a dispatch group is valid but does not get dispatched due to unavailability of integer scheduler 0 tokens.", + "UMask": "0x01" + }, + { + "EventName": "de_dispatch_stall_cycle_dynamic_tokens_part2.int_sq1", + "EventCode": "0xaf", + "BriefDescription": "Cycles where a dispatch group is valid but does not get dispatched due to unavailability of integer scheduler 1 tokens.", + "UMask": "0x02" + }, + { + "EventName": "de_dispatch_stall_cycle_dynamic_tokens_part2.int_sq2", + "EventCode": "0xaf", + "BriefDescription": "Cycles where a dispatch group is valid but does not get dispatched due to unavailability of integer scheduler 2 tokens.", + "UMask": "0x04" + }, + { + "EventName": "de_dispatch_stall_cycle_dynamic_tokens_part2.int_sq3", + "EventCode": "0xaf", + "BriefDescription": "Cycles where a dispatch group is valid but does not get dispatched due to unavailability of integer scheduler 3 tokens.", + "UMask": "0x08" + }, + { + "EventName": "de_dispatch_stall_cycle_dynamic_tokens_part2.int_sq4", + "EventCode": "0xaf", + "BriefDescription": "Cycles where a dispatch group is valid but does not get dispatched due to unavailability of integer scheduler 4 tokens.", + "UMask": "0x10" + }, + { + "EventName": "de_dispatch_stall_cycle_dynamic_tokens_part2.int_sq5", + "EventCode": "0xaf", + "BriefDescription": "Cycles where a dispatch group is valid but does not get dispatched due to unavailability of integer scheduler 5 tokens.", + "UMask": "0x20" + }, + { + "EventName": "de_dispatch_stall_cycle_dynamic_tokens_part2.ret_q", + "EventCode": "0xaf", + "BriefDescription": "Cycles where a dispatch group is valid but does not get dispatched due to unavailability of retire queue tokens.", + "UMask": "0x80" + }, + { + "EventName": "de_dispatch_stall_cycle_dynamic_tokens_part2.all", + "EventCode": "0xaf", + "BriefDescription": "Cycles where a dispatch group is valid but does not get dispatched due to any token stalls.", + "UMask": "0xbf" + }, + { + "EventName": "de_no_dispatch_per_slot.no_ops_from_frontend", + "EventCode": "0x1a0", + "BriefDescription": "Dispatch slots in each cycle that were empty because the frontend did not supply ops.", + "UMask": "0x01" + }, + { + "EventName": "de_no_dispatch_per_slot.backend_stalls", + "EventCode": "0x1a0", + "BriefDescription": "Dispatch slots in each cycle that were unused because of backend stalls.", + "UMask": "0x1e" + }, + { + "EventName": "de_no_dispatch_per_slot.smt_contention", + "EventCode": "0x1a0", + "BriefDescription": "Dispatch slots in each cycle that were unused because the dispatch cycle was granted to the other SMT thread.", + "UMask": "0x60" + }, + { + "EventName": "de_additional_resource_stalls.dispatch_stalls", + "EventCode": "0x1a2", + "BriefDescription": "Counts additional cycles where dispatch is stalled due to a lack of dispatch resources.", + "UMask": "0x30" + } +] diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen6/execution.json b/lib/libpmc/pmu-events/arch/x86/amdzen6/execution.json new file mode 100644 index 000000000000..1b80acc89b6f --- /dev/null +++ b/lib/libpmc/pmu-events/arch/x86/amdzen6/execution.json @@ -0,0 +1,192 @@ +[ + { + "EventName": "ex_ret_instr", + "EventCode": "0xc0", + "BriefDescription": "Retired instructions." + }, + { + "EventName": "ex_ret_ops", + "EventCode": "0xc1", + "BriefDescription": "Retired macro-ops." + }, + { + "EventName": "ex_ret_brn", + "EventCode": "0xc2", + "BriefDescription": "Retired branch instructions (all types of architectural control flow changes, including exceptions and interrupts)." + }, + { + "EventName": "ex_ret_brn_misp", + "EventCode": "0xc3", + "BriefDescription": "Retired branch instructions that were mispredicted." + }, + { + "EventName": "ex_ret_brn_tkn", + "EventCode": "0xc4", + "BriefDescription": "Retired taken branch instructions (all types of architectural control flow changes, including exceptions and interrupts)." + }, + { + "EventName": "ex_ret_brn_tkn_misp", + "EventCode": "0xc5", + "BriefDescription": "Retired taken branch instructions that were mispredicted." + }, + { + "EventName": "ex_ret_brn_far", + "EventCode": "0xc6", + "BriefDescription": "Retired far control transfers (far call, far jump, far return, IRET, SYSCALL and SYSRET, plus exceptions and interrupts). Far control transfers are not subject to branch prediction." + }, + { + "EventName": "ex_ret_near_ret", + "EventCode": "0xc8", + "BriefDescription": "Retired near returns (RET or RET Iw)." + }, + { + "EventName": "ex_ret_near_ret_mispred", + "EventCode": "0xc9", + "BriefDescription": "Retired near returns that were mispredicted. Each misprediction incurs the same penalty as that of a mispredicted conditional branch instruction." + }, + { + "EventName": "ex_ret_brn_ind_misp", + "EventCode": "0xca", + "BriefDescription": "Retired indirect branch instructions that were mispredicted (only EX mispredicts). Each misprediction incurs the same penalty as that of a mispredicted conditional branch instruction." + }, + { + "EventName": "ex_ret_brn_ind", + "EventCode": "0xcc", + "BriefDescription": "Retired indirect branch instructions." + }, + { + "EventName": "ex_ret_brn_cond", + "EventCode": "0xd1", + "BriefDescription": "Retired conditional branch instructions." + }, + { + "EventName": "ex_div_busy", + "EventCode": "0xd3", + "BriefDescription": "Cycles where the divider is busy." + }, + { + "EventName": "ex_div_count", + "EventCode": "0xd4", + "BriefDescription": "Divide ops executed." + }, + { + "EventName": "ex_no_retire.empty", + "EventCode": "0xd6", + "BriefDescription": "Cycles where the thread does not retire any ops due to a lack of valid ops in the retire queue (may be caused by front-end bottlenecks or pipeline redirects).", + "UMask": "0x01" + }, + { + "EventName": "ex_no_retire.not_complete", + "EventCode": "0xd6", + "BriefDescription": "Cycles where the thread does not retire any ops as the oldest retire slot is waiting to be marked as completed.", + "UMask": "0x02" + }, + { + "EventName": "ex_no_retire.other", + "EventCode": "0xd6", + "BriefDescription": "Cycles where the thread does not retire any ops due to other reasons (retire breaks, traps, faults, etc.).", + "UMask": "0x08" + }, + { + "EventName": "ex_no_retire.thread_not_selected", + "EventCode": "0xd6", + "BriefDescription": "Cycles where the thread does not retire any ops as thread arbitration did not select the current thread.", + "UMask": "0x10" + }, + { + "EventName": "ex_no_retire.load_not_complete", + "EventCode": "0xd6", + "BriefDescription": "Cycles where the thread does not retire any ops due to missing load completion.", + "UMask": "0xa2" + }, + { + "EventName": "ex_ret_ucode_instr", + "EventCode": "0x1c1", + "BriefDescription": "Retired microcoded instructions." + }, + { + "EventName": "ex_ret_ucode_ops", + "EventCode": "0x1c2", + "BriefDescription": "Retired microcode ops." + }, + { + "EventName": "ex_ret_brn_cond_misp", + "EventCode": "0x1c7", + "BriefDescription": "Retired conditional branch instructions that were mispredicted due to direction mismatch." + }, + { + "EventName": "ex_ret_brn_uncond_ind_near_misp", + "EventCode": "0x1c8", + "BriefDescription": "Retired unconditional indirect near branch instructions that were mispredicted." + }, + { + "EventName": "ex_ret_brn_uncond", + "EventCode": "0x1c9", + "BriefDescription": "Retired unconditional branch instructions." + }, + { + "EventName": "ex_tagged_ibs_ops.tagged", + "EventCode": "0x1cf", + "BriefDescription": "Execution IBS tagged ops.", + "UMask": "0x01" + }, + { + "EventName": "ex_tagged_ibs_ops.tagged_ret", + "EventCode": "0x1cf", + "BriefDescription": "Execution IBS tagged ops that retired.", + "UMask": "0x02" + }, + { + "EventName": "ex_tagged_ibs_ops.rollovers", + "EventCode": "0x1cf", + "BriefDescription": "Execution IBS periodic counter rollovers due to a previous tagged op not being IBS complete.", + "UMask": "0x04" + }, + { + "EventName": "ex_tagged_ibs_ops.filtered", + "EventCode": "0x1cf", + "BriefDescription": "Execution IBS tagged ops that retired but were discarded due to IBS filtering.", + "UMask": "0x08" + }, + { + "EventName": "ex_tagged_ibs_ops.valid", + "EventCode": "0x1cf", + "BriefDescription": "Execution IBS tagged ops that resulted in a valid sample and an IBS interrupt.", + "UMask": "0x10" + }, + { + "EventName": "ex_ret_fused_instr", + "EventCode": "0x1d0", + "BriefDescription": "Retired fused instructions." + }, + { + "EventName": "ex_mprof_ibs_ops.tagged", + "EventCode": "0x2c0", + "BriefDescription": "Memory Profiler IBS tagged ops.", + "UMask": "0x01" + }, + { + "EventName": "ex_mprof_ibs_ops.tagged_ret", + "EventCode": "0x2c0", + "BriefDescription": "Memory Profiler IBS tagged ops that retired.", + "UMask": "0x02" + }, + { + "EventName": "ex_mprof_ibs_ops.rollovers", + "EventCode": "0x2c0", + "BriefDescription": "Memory Profiler IBS periodic counter rollovers due to a previous tagged op not being IBS complete.", + "UMask": "0x04" + }, + { + "EventName": "ex_mprof_ibs_ops.filtered", + "EventCode": "0x2c0", + "BriefDescription": "Memory Profiler IBS tagged ops that retired but were discarded due to IBS filtering.", + "UMask": "0x08" + }, + { + "EventName": "ex_mprof_ibs_ops.valid", + "EventCode": "0x2c0", + "BriefDescription": "Memory Profiler IBS tagged ops that resulted in a valid sample and an IBS interrupt.", + "UMask": "0x10" + } +] diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen6/floating-point.json b/lib/libpmc/pmu-events/arch/x86/amdzen6/floating-point.json new file mode 100644 index 000000000000..03cb039434de --- /dev/null +++ b/lib/libpmc/pmu-events/arch/x86/amdzen6/floating-point.json @@ -0,0 +1,1106 @@ +[ + { + "EventName": "fp_ret_x87_fp_ops.add_sub_ops", + "EventCode": "0x02", + "BriefDescription": "Retired x87 floating-point add and subtract uops.", + "UMask": "0x01" + }, + { + "EventName": "fp_ret_x87_fp_ops.mul_ops", + "EventCode": "0x02", + "BriefDescription": "Retired x87 floating-point multiply uops.", + "UMask": "0x02" + }, + { + "EventName": "fp_ret_x87_fp_ops.div_sqrt_ops", + "EventCode": "0x02", + "BriefDescription": "Retired x87 floating-point divide and square root uops.", + "UMask": "0x04" + }, + { + "EventName": "fp_ret_x87_fp_ops.all", + "EventCode": "0x02", + "BriefDescription": "Retired x87 floating-point uops of all types.", + "UMask": "0x07" + }, + { + "EventName": "fp_ret_sse_avx_ops.add_sub_flops", + "EventCode": "0x03", + "BriefDescription": "Retired SSE and AVX add and subtract FLOPs.", + "UMask": "0x01" + }, + { + "EventName": "fp_ret_sse_avx_ops.mult_flops", + "EventCode": "0x03", + "BriefDescription": "Retired SSE and AVX multiply FLOPs.", + "UMask": "0x02" + }, + { + "EventName": "fp_ret_sse_avx_ops.div_flops", + "EventCode": "0x03", + "BriefDescription": "Retired SSE and AVX divide and square root FLOPs.", + "UMask": "0x04" + }, + { + "EventName": "fp_ret_sse_avx_ops.mac_flops", + "EventCode": "0x03", + "BriefDescription": "Retired SSE and AVX multiply-accumulate FLOPs (each operation is counted as 2 FLOPs, bfloat operations are not included).", + "UMask": "0x08" + }, + { + "EventName": "fp_ret_sse_avx_ops.bfloat16_flops", + "EventCode": "0x03", + "BriefDescription": "Retired SSE and AVX bfloat16 FLOPs.", + "UMask": "0x20" + }, + { + "EventName": "fp_ret_sse_avx_ops.scalar_single_flops", + "EventCode": "0x03", + "BriefDescription": "Retired SSE and AVX scalar single-precision (FP32) FLOPs.", + "UMask": "0x40" + }, + { + "EventName": "fp_ret_sse_avx_ops.packed_single_flops", + "EventCode": "0x03", + "BriefDescription": "Retired SSE and AVX packed single-precision (FP32) FLOPs.", + "UMask": "0x60" + }, + { + "EventName": "fp_ret_sse_avx_ops.scalar_double_flops", + "EventCode": "0x03", + "BriefDescription": "Retired SSE and AVX scalar double-precision (FP64) FLOPs.", + "UMask": "0x80" + }, + { + "EventName": "fp_ret_sse_avx_ops.packed_double_flops", + "EventCode": "0x03", + "BriefDescription": "Retired SSE and AVX packed double-precision (FP64) FLOPs.", + "UMask": "0xa0" + }, + { + "EventName": "fp_ret_sse_avx_ops.scalar_half_flops", + "EventCode": "0x03", + "BriefDescription": "Retired SSE and AVX scalar half-precision (FP16) FLOPs.", + "UMask": "0xa0" + }, + { + "EventName": "fp_ret_sse_avx_ops.packed_half_flops", + "EventCode": "0x03", + "BriefDescription": "Retired SSE and AVX packed half-precision (FP16) FLOPs.", + "UMask": "0xa0" + }, + { + "EventName": "fp_ret_sse_avx_ops.all", + "EventCode": "0x03", + "BriefDescription": "Retired SSE and AVX FLOPs of all types.", + "UMask": "0x0f" + }, + { + "EventName": "fp_ops_ret_by_width.x87", + "EventCode": "0x08", + "BriefDescription": "Retired x87 floating-point uops.", + "UMask": "0x01" + }, + { + "EventName": "fp_ops_ret_by_width.mmx", + "EventCode": "0x08", + "BriefDescription": "Retired MMX floating-point uops.", + "UMask": "0x02" + }, + { + "EventName": "fp_ops_ret_by_width.scalar", + "EventCode": "0x08", + "BriefDescription": "Retired scalar floating-point uops.", + "UMask": "0x04" + }, + { + "EventName": "fp_ops_ret_by_width.pack_128", + "EventCode": "0x08", + "BriefDescription": "Retired packed 128-bit floating-point uops.", + "UMask": "0x08" + }, + { + "EventName": "fp_ops_ret_by_width.pack_256", + "EventCode": "0x08", + "BriefDescription": "Retired packed 256-bit floating-point uops.", + "UMask": "0x10" + }, + { + "EventName": "fp_ops_ret_by_width.pack_512", + "EventCode": "0x08", + "BriefDescription": "Retired packed 512-bit floating-point uops.", + "UMask": "0x20" + }, + { + "EventName": "fp_ops_ret_by_width.all", + "EventCode": "0x08", + "BriefDescription": "Retired floating-point uops of all widths.", + "UMask": "0x3f" + }, + { + "EventName": "fp_ops_ret_by_type.scalar_add", + "EventCode": "0x0a", + "BriefDescription": "Retired scalar floating-point add uops.", + "UMask": "0x01" + }, + { + "EventName": "fp_ops_ret_by_type.scalar_sub", + "EventCode": "0x0a", + "BriefDescription": "Retired scalar floating-point subtract uops.", + "UMask": "0x02" + }, + { + "EventName": "fp_ops_ret_by_type.scalar_mul", + "EventCode": "0x0a", + "BriefDescription": "Retired scalar floating-point multiply uops.", + "UMask": "0x03" + }, + { + "EventName": "fp_ops_ret_by_type.scalar_mac", + "EventCode": "0x0a", + "BriefDescription": "Retired scalar floating-point multiply-accumulate uops.", + "UMask": "0x04" + }, + { + "EventName": "fp_ops_ret_by_type.scalar_div", + "EventCode": "0x0a", + "BriefDescription": "Retired scalar floating-point divide uops.", + "UMask": "0x05" + }, + { + "EventName": "fp_ops_ret_by_type.scalar_sqrt", + "EventCode": "0x0a", + "BriefDescription": "Retired scalar floating-point square root uops.", + "UMask": "0x06" + }, + { + "EventName": "fp_ops_ret_by_type.scalar_cmp", + "EventCode": "0x0a", + "BriefDescription": "Retired scalar floating-point compare uops.", + "UMask": "0x07" + }, + { + "EventName": "fp_ops_ret_by_type.scalar_cvt", + "EventCode": "0x0a", + "BriefDescription": "Retired scalar floating-point convert uops.", + "UMask": "0x08" + }, + { + "EventName": "fp_ops_ret_by_type.scalar_blend", + "EventCode": "0x0a", + "BriefDescription": "Retired scalar floating-point blend uops.", + "UMask": "0x09" + }, + { + "EventName": "fp_ops_ret_by_type.scalar_move", + "EventCode": "0x0a", + "BriefDescription": "Retired scalar floating-point move uops.", + "UMask": "0x0a" + }, + { + "EventName": "fp_ops_ret_by_type.scalar_shuffle", + "EventCode": "0x0a", + "BriefDescription": "Retired scalar floating-point shuffle uops (may include instructions not necessarily thought of as including shuffles e.g. horizontal add, dot product, and certain MOV instructions).", + "UMask": "0x0b" + }, + { + "EventName": "fp_ops_ret_by_type.scalar_bfloat", + "EventCode": "0x0a", + "BriefDescription": "Retired scalar floating-point bfloat uops.", + "UMask": "0x0c" + }, + { + "EventName": "fp_ops_ret_by_type.scalar_logical", + "EventCode": "0x0a", + "BriefDescription": "Retired scalar floating-point move uops.", + "UMask": "0x0d" + }, + { + "EventName": "fp_ops_ret_by_type.scalar_other", + "EventCode": "0x0a", + "BriefDescription": "Retired scalar floating-point uops of other types.", + "UMask": "0x0e" + }, + { + "EventName": "fp_ops_ret_by_type.scalar_all", + "EventCode": "0x0a", + "BriefDescription": "Retired scalar floating-point uops of all types.", + "UMask": "0x0f" + }, + { + "EventName": "fp_ops_ret_by_type.vector_add", + "EventCode": "0x0a", + "BriefDescription": "Retired vector floating-point add uops.", + "UMask": "0x10" + }, + { + "EventName": "fp_ops_ret_by_type.vector_sub", + "EventCode": "0x0a", + "BriefDescription": "Retired vector floating-point subtract uops.", + "UMask": "0x20" + }, + { + "EventName": "fp_ops_ret_by_type.vector_mul", + "EventCode": "0x0a", + "BriefDescription": "Retired vector floating-point multiply uops.", + "UMask": "0x30" + }, + { + "EventName": "fp_ops_ret_by_type.vector_mac", + "EventCode": "0x0a", + "BriefDescription": "Retired vector floating-point multiply-accumulate uops.", + "UMask": "0x40" + }, + { + "EventName": "fp_ops_ret_by_type.vector_div", + "EventCode": "0x0a", + "BriefDescription": "Retired vector floating-point divide uops.", + "UMask": "0x50" + }, + { + "EventName": "fp_ops_ret_by_type.vector_sqrt", + "EventCode": "0x0a", + "BriefDescription": "Retired vector floating-point square root uops.", + "UMask": "0x60" + }, + { + "EventName": "fp_ops_ret_by_type.vector_cmp", + "EventCode": "0x0a", + "BriefDescription": "Retired vector floating-point compare uops.", + "UMask": "0x70" + }, + { + "EventName": "fp_ops_ret_by_type.vector_cvt", + "EventCode": "0x0a", + "BriefDescription": "Retired vector floating-point convert uops.", + "UMask": "0x80" + }, + { + "EventName": "fp_ops_ret_by_type.vector_blend", + "EventCode": "0x0a", + "BriefDescription": "Retired vector floating-point blend uops.", + "UMask": "0x90" + }, + { + "EventName": "fp_ops_ret_by_type.vector_move", + "EventCode": "0x0a", + "BriefDescription": "Retired vector floating-point move uops.", + "UMask": "0xa0" + }, + { + "EventName": "fp_ops_ret_by_type.vector_shuffle", + "EventCode": "0x0a", + "BriefDescription": "Retired vector floating-point shuffle uops (may include instructions not necessarily thought of as including shuffles e.g. horizontal add, dot product, and certain MOV instructions).", + "UMask": "0xb0" + }, + { + "EventName": "fp_ops_ret_by_type.vector_bfloat", + "EventCode": "0x0a", + "BriefDescription": "Retired vector floating-point bfloat uops.", + "UMask": "0xc0" + }, + { + "EventName": "fp_ops_ret_by_type.vector_logical", + "EventCode": "0x0a", + "BriefDescription": "Retired vector floating-point logical uops.", + "UMask": "0xd0" + }, + { + "EventName": "fp_ops_ret_by_type.vector_other", + "EventCode": "0x0a", + "BriefDescription": "Retired vector floating-point uops of other types.", + "UMask": "0xe0" + }, + { + "EventName": "fp_ops_ret_by_type.vector_all", + "EventCode": "0x0a", + "BriefDescription": "Retired vector floating-point uops of all types.", + "UMask": "0xf0" + }, + { + "EventName": "fp_ops_ret_by_type.all", + "EventCode": "0x0a", + "BriefDescription": "Retired floating-point uops of all types.", + "UMask": "0xff" + }, + { + "EventName": "fp_sse_avx_ops_ret.mmx_add", + "EventCode": "0x0b", + "BriefDescription": "Retired MMX integer add uops.", + "UMask": "0x01" + }, + { + "EventName": "fp_sse_avx_ops_ret.mmx_sub", + "EventCode": "0x0b", + "BriefDescription": "Retired MMX integer subtract uops.", + "UMask": "0x02" + }, + { + "EventName": "fp_sse_avx_ops_ret.mmx_mul", + "EventCode": "0x0b", + "BriefDescription": "Retired MMX integer multiply uops.", + "UMask": "0x03" + }, + { + "EventName": "fp_sse_avx_ops_ret.mmx_mac", + "EventCode": "0x0b", + "BriefDescription": "Retired MMX integer multiply-accumulate uops.", + "UMask": "0x04" + }, + { + "EventName": "fp_sse_avx_ops_ret.mmx_aes", + "EventCode": "0x0b", + "BriefDescription": "Retired MMX integer AES uops.", + "UMask": "0x05" + }, + { + "EventName": "fp_sse_avx_ops_ret.mmx_sha", + "EventCode": "0x0b", + "BriefDescription": "Retired MMX integer SHA uops.", + "UMask": "0x06" + }, + { + "EventName": "fp_sse_avx_ops_ret.mmx_cmp", + "EventCode": "0x0b", + "BriefDescription": "Retired MMX integer compare uops.", + "UMask": "0x07" + }, + { + "EventName": "fp_sse_avx_ops_ret.mmx_cvt", + "EventCode": "0x0b", + "BriefDescription": "Retired MMX integer convert or pack uops.", + "UMask": "0x08" + }, + { + "EventName": "fp_sse_avx_ops_ret.mmx_shift", + "EventCode": "0x0b", + "BriefDescription": "Retired MMX integer shift or rotate uops.", + "UMask": "0x09" + }, + { + "EventName": "fp_sse_avx_ops_ret.mmx_mov", + "EventCode": "0x0b", + "BriefDescription": "Retired MMX integer move uops.", + "UMask": "0x0a" + }, + { + "EventName": "fp_sse_avx_ops_ret.mmx_shuffle", + "EventCode": "0x0b", + "BriefDescription": "Retired MMX integer shuffle uops (may include instructions not necessarily thought of as including shuffles e.g. horizontal add, dot product, and certain MOV instructions).", + "UMask": "0x0b" + }, + { + "EventName": "fp_sse_avx_ops_ret.mmx_vnni", + "EventCode": "0x0b", + "BriefDescription": "Retired MMX integer VNNI uops.", + "UMask": "0x0c" + }, + { + "EventName": "fp_sse_avx_ops_ret.mmx_logical", + "EventCode": "0x0b", + "BriefDescription": "Retired MMX integer logical uops.", + "UMask": "0x0d" + }, + { + "EventName": "fp_sse_avx_ops_ret.mmx_other", + "EventCode": "0x0b", + "BriefDescription": "Retired MMX integer multiply uops of other types.", + "UMask": "0x0e" + }, + { + "EventName": "fp_sse_avx_ops_ret.mmx_all", + "EventCode": "0x0b", + "BriefDescription": "Retired MMX integer uops of all types.", + "UMask": "0x0f" + }, + { + "EventName": "fp_sse_avx_ops_ret.sse_avx_add", + "EventCode": "0x0b", + "BriefDescription": "Retired SSE and AVX integer add uops.", + "UMask": "0x10" + }, + { + "EventName": "fp_sse_avx_ops_ret.sse_avx_sub", + "EventCode": "0x0b", + "BriefDescription": "Retired SSE and AVX integer subtract uops.", + "UMask": "0x20" + }, + { + "EventName": "fp_sse_avx_ops_ret.sse_avx_mul", + "EventCode": "0x0b", + "BriefDescription": "Retired SSE and AVX integer multiply uops.", + "UMask": "0x30" + }, + { + "EventName": "fp_sse_avx_ops_ret.sse_avx_mac", + "EventCode": "0x0b", + "BriefDescription": "Retired SSE and AVX integer multiply-accumulate uops.", + "UMask": "0x40" + }, + { + "EventName": "fp_sse_avx_ops_ret.sse_avx_aes", + "EventCode": "0x0b", + "BriefDescription": "Retired SSE and AVX integer AES uops.", + "UMask": "0x50" + }, + { + "EventName": "fp_sse_avx_ops_ret.sse_avx_sha", + "EventCode": "0x0b", + "BriefDescription": "Retired SSE and AVX integer SHA uops.", + "UMask": "0x60" + }, + { + "EventName": "fp_sse_avx_ops_ret.sse_avx_cmp", + "EventCode": "0x0b", + "BriefDescription": "Retired SSE and AVX integer compare uops.", + "UMask": "0x70" + }, + { + "EventName": "fp_sse_avx_ops_ret.sse_avx_cvt", + "EventCode": "0x0b", + "BriefDescription": "Retired SSE and AVX integer convert or pack uops.", + "UMask": "0x80" + }, + { + "EventName": "fp_sse_avx_ops_ret.sse_avx_shift", + "EventCode": "0x0b", + "BriefDescription": "Retired SSE and AVX integer shift or rotate uops.", + "UMask": "0x90" + }, + { + "EventName": "fp_sse_avx_ops_ret.sse_avx_mov", + "EventCode": "0x0b", + "BriefDescription": "Retired SSE and AVX integer move uops.", + "UMask": "0xa0" + }, + { + "EventName": "fp_sse_avx_ops_ret.sse_avx_shuffle", + "EventCode": "0x0b", + "BriefDescription": "Retired SSE and AVX integer shuffle uops (may include instructions not necessarily thought of as including shuffles e.g. horizontal add, dot product, and certain MOV instructions).", + "UMask": "0xb0" + }, + { + "EventName": "fp_sse_avx_ops_ret.sse_avx_vnni", + "EventCode": "0x0b", + "BriefDescription": "Retired SSE and AVX integer VNNI uops.", + "UMask": "0xc0" + }, + { + "EventName": "fp_sse_avx_ops_ret.sse_avx_logical", + "EventCode": "0x0b", + "BriefDescription": "Retired SSE and AVX integer logical uops.", + "UMask": "0xd0" + }, + { + "EventName": "fp_sse_avx_ops_ret.sse_avx_other", + "EventCode": "0x0b", + "BriefDescription": "Retired SSE and AVX integer uops of other types.", + "UMask": "0xe0" + }, + { + "EventName": "fp_sse_avx_ops_ret.sse_avx_all", + "EventCode": "0x0b", + "BriefDescription": "Retired SSE and AVX integer uops of all types.", + "UMask": "0xf0" + }, + { + "EventName": "fp_sse_avx_ops_ret.all", *** 2338 LINES SKIPPED *** From nobody Fri Feb 27 22:08:45 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fN2Xg5yXKz6TPsB for ; Fri, 27 Feb 2026 22: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fN2Xg1LGFz3lld for ; Fri, 27 Feb 2026 22: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=1772230131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hlCOIGhuG1XGKutVgxVT68aBhwyKDc6ajwdM1tw57gw=; b=yXGG39cxmqKTsy6KD3kxRpWgKSbVRfIb3lZTQpbNiiQYmnDkHxiSCO4ZoGyOlPCq/KWYgT 9/0dIuV7CMW8xuu+inYW6ElNdC8FaGX/uTRpmQWaaooLQMYp5/+eM6eLP/hZcLW0QnZjay /hibVTOhAc1jEvexsOmVi3tNEi2Nsdg/rQhFLdGAS25y5ycxS6N5u5WZCEs6RLeAfrH8JV MgzaiGv0nDLrtBKIGwWGYh7PvmY3TaDYOoihib13n59XRGKEP6MfKfCP7/F5nq2eoStQeS 3qSst0zMkczSwl3tjRH6UdJtHIgg7I8maBL05VjVygkrclDedX/C/1q4raYnkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772230131; a=rsa-sha256; cv=none; b=PteHiVN6EhgclskIFwYGTHLpeStdjwjNSb/uvsOdjQ9UzIYw511opD9Zlx5h/FwtNRvAwp N7mdjfp7kibQtsZaTHLxJMP6WvDal3rg1bdfDGD2o7lzJygV7vsDHW8VA+kD4f8jqerqCE MbisZOvHri0a7RV+LXsFjFo0tQVjDVrvJtMjv8tV+vY/6eb0tItofAcgSi87U0A8BvscI1 4t2p6AyUIUrcAy7C4tOyOC3x/SpvEfXLeT1A8dt4jc5vfkH5cXRzKYNwQDGDftSnjnSZY0 fiRmcWZCZ3dGrcQlnPcMYvuKbFcVR2z1T+XT1HYgKxawgINMBZReKgnPGPFNUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772230131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hlCOIGhuG1XGKutVgxVT68aBhwyKDc6ajwdM1tw57gw=; b=FKR2+THnb5u2l6OVKwtOLGpwiMUfWe+wUNeImkCy+j5GCQ+EMrSgekAMbl6Vy2KzuxYipt 1cfrT1Zg4guAmHsCWX2ACaMCnVYUiro5OHSHZA0aF0UjLlbj9aMBcXi88tz6lsFk5mPozB 2iFnpq9Udz6Vm0/0AoLdP+sQzCrPQCsj9/+o5klQKHO9wW3xElCMU4HWFd4YO79C4Ul8IA ndvNT38AjVeM7eqXg0fQI7sf3UYhmcNZ6QcK6zzmkhNmtCpYGCZEgmei15A0FjUr/ztgLX h2fNf5DdH5XG+rBRjqB0fQic+C78wrRiLz5UaIQ5QaJER2GTY2Asqbl7Oy1drw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fN2Xg0lqczcSB for ; Fri, 27 Feb 2026 22:08:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 342b2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 22:08:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Ali Mashtizadeh From: Warner Losh Subject: git: 00c0a1f0bf6c - main - hwpmc: Fix PMC flags for AMD Zen cores List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 00c0a1f0bf6c07e63384a389060dfc10924c0ed6 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 22:08:45 +0000 Message-Id: <69a215ed.342b2.2e815130@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=00c0a1f0bf6c07e63384a389060dfc10924c0ed6 commit 00c0a1f0bf6c07e63384a389060dfc10924c0ed6 Author: Ali Mashtizadeh AuthorDate: 2026-02-21 19:07:26 +0000 Commit: Warner Losh CommitDate: 2026-02-27 21:19:40 +0000 hwpmc: Fix PMC flags for AMD Zen cores The PMC flags available for DF and L3 counters were not all implemented. More importantly, the field encodings for the L3 counters changed in an incompatible way between Family 17h and Family 19h. Similarly, the field encodings for the DF coutners changed between Family 19h and 1Ah. I also added the precise retire flag for the 3rd core counter. Lastly, I added a warning in the jevent parser because ignoring the unknown fields results in counters incorrectly programmed. We should not just ignore that. Sponsored by: Netflix Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/2040 --- lib/libpmc/libpmc_pmu_util.c | 71 ++++++++++++++++++++++++++++--- lib/libpmc/pmu-events/jevents.c | 40 +++++++++++++++++- lib/libpmc/pmu-events/json.c | 14 +++++++ lib/libpmc/pmu-events/json.h | 1 + sys/dev/hwpmc/hwpmc_amd.c | 19 ++++++++- sys/dev/hwpmc/hwpmc_amd.h | 93 +++++++++++++++++++++++++++++------------ 6 files changed, 204 insertions(+), 34 deletions(-) diff --git a/lib/libpmc/libpmc_pmu_util.c b/lib/libpmc/libpmc_pmu_util.c index de642aa71a18..0832ab32e2f1 100644 --- a/lib/libpmc/libpmc_pmu_util.c +++ b/lib/libpmc/libpmc_pmu_util.c @@ -121,6 +121,24 @@ pmu_events_mfr(void) return (mfr); } +static int +pmu_events_x86_family(void) +{ + char buf[PMC_CPUID_LEN]; + size_t s = sizeof(buf); + char *cpuid, *family; + + if (sysctlbyname("kern.hwpmc.cpuid", buf, &s, + (void *)NULL, 0) == -1) + return (-1); + cpuid = &buf[0]; + + strsep(&cpuid, "-"); + family = strsep(&cpuid, "-"); + + return (strtol(family, NULL, 10)); +} + /* * The Intel fixed mode counters are: * "inst_retired.any", @@ -208,6 +226,10 @@ struct pmu_event_desc { uint64_t ped_offcore_rsp; uint64_t ped_l3_thread; uint64_t ped_l3_slice; + uint32_t ped_sourceid; + uint32_t ped_coreid; + uint32_t ped_allsources; + uint32_t ped_allcores; uint32_t ped_event; uint32_t ped_frontend; uint32_t ped_ldlat; @@ -347,6 +369,14 @@ pmu_parse_event(struct pmu_event_desc *ped, const char *eventin) ped->ped_l3_thread = strtol(value, NULL, 16); else if (strcmp(key, "l3_slice_mask") == 0) ped->ped_l3_slice = strtol(value, NULL, 16); + else if (strcmp(key, "sourceid") == 0) + ped->ped_sourceid = strtol(value, NULL, 16); + else if (strcmp(key, "coreid") == 0) + ped->ped_coreid = strtol(value, NULL, 16); + else if (strcmp(key, "allcores") == 0) + ped->ped_allcores = strtol(value, NULL, 10); + else if (strcmp(key, "allsources") == 0) + ped->ped_allsources = strtol(value, NULL, 10); else { debug = getenv("PMUDEBUG"); if (debug != NULL && strcmp(debug, "true") == 0 && value != NULL) @@ -486,20 +516,23 @@ static int pmc_pmu_amd_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm, struct pmu_event_desc *ped) { + int cpu_family; struct pmc_md_amd_op_pmcallocate *amd; const struct pmu_event *pe; int idx = -1; + cpu_family = pmu_events_x86_family(); + amd = &pm->pm_md.pm_amd; if (ped->ped_umask > 0) { pm->pm_caps |= PMC_CAP_QUALIFIER; - amd->pm_amd_config |= AMD_PMC_TO_UNITMASK(ped->ped_umask); } pm->pm_class = PMC_CLASS_K8; pe = pmu_event_get(NULL, event_name, &idx); if (pe->pmu == NULL) { amd->pm_amd_config |= AMD_PMC_TO_EVENTMASK(ped->ped_event); + amd->pm_amd_config |= AMD_PMC_TO_UNITMASK(ped->ped_umask); amd->pm_amd_sub_class = PMC_AMD_SUB_CLASS_CORE; if ((pm->pm_caps & (PMC_CAP_USER|PMC_CAP_SYSTEM)) == 0 || (pm->pm_caps & (PMC_CAP_USER|PMC_CAP_SYSTEM)) == @@ -515,14 +548,42 @@ pmc_pmu_amd_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm, amd->pm_amd_config |= AMD_PMC_INVERT; if (pm->pm_caps & PMC_CAP_INTERRUPT) amd->pm_amd_config |= AMD_PMC_INT; + if (pm->pm_caps & PMC_CAP_PRECISE) + amd->pm_amd_config |= AMD_PMC_PRECISERETIRE; } else if (strcmp("amd_l3", pe->pmu) == 0) { - amd->pm_amd_config |= AMD_PMC_TO_EVENTMASK(ped->ped_event); + amd->pm_amd_config |= AMD_PMC_L3_TO_EVENTMASK(ped->ped_event); + amd->pm_amd_config |= AMD_PMC_L3_TO_UNITMASK(ped->ped_umask); amd->pm_amd_sub_class = PMC_AMD_SUB_CLASS_L3_CACHE; - amd->pm_amd_config |= AMD_PMC_TO_L3SLICE(ped->ped_l3_slice); - amd->pm_amd_config |= AMD_PMC_TO_L3CORE(ped->ped_l3_thread); + if (cpu_family <= 0x17) { + amd->pm_amd_config |= + AMD_PMC_L31_TO_SLICE(ped->ped_l3_slice); + amd->pm_amd_config |= + AMD_PMC_L31_TO_CORE(ped->ped_l3_thread); + } else { + amd->pm_amd_config |= + AMD_PMC_L32_TO_THREAD(ped->ped_l3_thread); + amd->pm_amd_config |= + AMD_PMC_L32_TO_SOURCEID(ped->ped_sourceid); + amd->pm_amd_config |= + AMD_PMC_L32_TO_COREID(ped->ped_coreid); + if (ped->ped_allcores) + amd->pm_amd_config |= AMD_PMC_L32_ALLCORES; + if (ped->ped_allsources) + amd->pm_amd_config |= AMD_PMC_L32_ALLSOURCES; + } } else if (strcmp("amd_df", pe->pmu) == 0) { - amd->pm_amd_config |= AMD_PMC_TO_EVENTMASK_DF(ped->ped_event); amd->pm_amd_sub_class = PMC_AMD_SUB_CLASS_DATA_FABRIC; + if (cpu_family <= 19) { + amd->pm_amd_config |= + AMD_PMC_DF1_TO_EVENTMASK(ped->ped_event); + amd->pm_amd_config |= + AMD_PMC_DF1_TO_UNITMASK(ped->ped_umask); + } else { + amd->pm_amd_config |= + AMD_PMC_DF2_TO_EVENTMASK(ped->ped_event); + amd->pm_amd_config |= + AMD_PMC_DF2_TO_UNITMASK(ped->ped_umask); + } } else { printf("PMC pmu '%s' is not supported!\n", pe->pmu); return (EOPNOTSUPP); diff --git a/lib/libpmc/pmu-events/jevents.c b/lib/libpmc/pmu-events/jevents.c index 628ed26c6f9d..4e4f53a0c0d0 100644 --- a/lib/libpmc/pmu-events/jevents.c +++ b/lib/libpmc/pmu-events/jevents.c @@ -560,6 +560,10 @@ static int json_events(const char *fn, jsmntok_t *obj = tok++; bool configcode_present = false; char *umask = NULL; + char *allcores = NULL; + char *allslices = NULL; + char *sliceid = NULL; + char *threadmask = NULL; char *cmask = NULL; char *inv = NULL; char *any = NULL; @@ -585,6 +589,22 @@ static int json_events(const char *fn, /* match_field */ if (json_streq(map, field, "UMask") && nz) { addfield(map, &umask, "", "umask=", val); + } else if (json_streq(map, field, "EnAllCores") && nz) { + addfield(map, &allcores, "", "allcores=", val); + } else if (json_streq(map, field, "EnAllSlices") && nz) { + addfield(map, &allslices, "", "allslices=", val); + } else if (json_streq(map, field, "SliceId") && nz) { + /* + * We use sourceid because there's a + * descripency where the JSON from linux calls + * it a SliceId, which is not the name used by + * AMD in the PPRs. The field name from Family + * 19h and below that calls it slicemask see + * the references in hwpmc_amd.h. + */ + addfield(map, &sliceid, "", "sourceid=", val); + } else if (json_streq(map, field, "ThreadMask") && nz) { + addfield(map, &threadmask, "", "l3_thread_mask=", val); } else if (json_streq(map, field, "CounterMask") && nz) { addfield(map, &cmask, "", "cmask=", val); } else if (json_streq(map, field, "Invert") && nz) { @@ -675,8 +695,14 @@ static int json_events(const char *fn, addfield(map, &arch_std, "", "", val); for (s = arch_std; *s; s++) *s = tolower(*s); + } else { + /* + * We shouldn't ignore unknown fields that + * makes the counter invalid! + */ + json_copystr(map, field, buf, sizeof(buf)); + fprintf(stderr, "Unknown field '%s'!\n", buf); } - /* ignore unknown fields */ } if (precise && je.desc && !strstr(je.desc, "(Precise Event)")) { if (json_streq(map, precise, "2")) @@ -707,6 +733,14 @@ static int json_events(const char *fn, addfield(map, &event, ",", period, NULL); if (umask) addfield(map, &event, ",", umask, NULL); + if (allcores) + addfield(map, &event, ",", allcores, NULL); + if (allslices) + addfield(map, &event, ",", allslices, NULL); + if (sliceid) + addfield(map, &event, ",", sliceid, NULL); + if (threadmask) + addfield(map, &event, ",", threadmask, NULL); if (je.desc && extra_desc) addfield(map, &je.desc, " ", extra_desc, NULL); @@ -737,6 +771,10 @@ static int json_events(const char *fn, err = func(data, &je); free_strings: free(umask); + free(allcores); + free(allslices); + free(sliceid); + free(threadmask); free(cmask); free(inv); free(any); diff --git a/lib/libpmc/pmu-events/json.c b/lib/libpmc/pmu-events/json.c index 89cafbc04fb6..66eaf0a74ba6 100644 --- a/lib/libpmc/pmu-events/json.c +++ b/lib/libpmc/pmu-events/json.c @@ -160,3 +160,17 @@ int json_streq(char *map, jsmntok_t *t, const char *s) unsigned len = json_len(t); return len == strlen(s) && !strncasecmp(map + t->start, s, len); } + +int json_copystr(char *map, jsmntok_t *t, char *s, int len) +{ + int jlen; + + jlen = json_len(t); + if (jlen > len) + jlen = len - 1; + + memcpy(s, map + t->start, jlen); + s[jlen] = '\0'; + + return (jlen); +} diff --git a/lib/libpmc/pmu-events/json.h b/lib/libpmc/pmu-events/json.h index 278ebd32cfb6..89b9c2fba617 100644 --- a/lib/libpmc/pmu-events/json.h +++ b/lib/libpmc/pmu-events/json.h @@ -9,6 +9,7 @@ int json_line(char *map, jsmntok_t *t); const char *json_name(jsmntok_t *t); int json_streq(char *map, jsmntok_t *t, const char *s); int json_len(jsmntok_t *t); +int json_copystr(char *map, jsmntok_t *t, char *s, int len); extern int verbose; diff --git a/sys/dev/hwpmc/hwpmc_amd.c b/sys/dev/hwpmc/hwpmc_amd.c index 801b75b39595..b34cbffcffa8 100644 --- a/sys/dev/hwpmc/hwpmc_amd.c +++ b/sys/dev/hwpmc/hwpmc_amd.c @@ -347,6 +347,10 @@ amd_allocate_pmc(int cpu __unused, int ri, struct pmc *pm, caps = pm->pm_caps; + if (((caps & PMC_CAP_PRECISE) != 0) && + ((pd->pd_caps & PMC_CAP_PRECISE) == 0)) + return (EINVAL); + PMCDBG2(MDP, ALL, 1,"amd-allocate ri=%d caps=0x%x", ri, caps); /* Validate sub-class. */ @@ -360,6 +364,9 @@ amd_allocate_pmc(int cpu __unused, int ri, struct pmc *pm, return (0); } + /* + * Everything below this is for supporting older processors. + */ pe = a->pm_ev; /* map ev to the correct event mask code */ @@ -817,6 +824,14 @@ pmc_amd_initialize(void) "K8-%d", i); d->pm_descr.pd_class = PMC_CLASS_K8; d->pm_descr.pd_caps = AMD_PMC_CAPS; + /* + * Zen 5 can precisely count retire events. + * + * Refer to PPR Vol 1 for AMD Family 1Ah Model 02h C1 57238 + * Rev. 0.24 September 29, 2024. + */ + if ((family >= 0x1a) && (i == 2)) + d->pm_descr.pd_caps |= PMC_CAP_PRECISE; d->pm_descr.pd_width = 48; if ((amd_feature2 & AMDID2_PCXC) != 0) { d->pm_evsel = AMD_PMC_CORE_BASE + 2 * i; @@ -836,7 +851,7 @@ pmc_amd_initialize(void) snprintf(d->pm_descr.pd_name, PMC_NAME_MAX, "K8-L3-%d", i); d->pm_descr.pd_class = PMC_CLASS_K8; - d->pm_descr.pd_caps = AMD_PMC_CAPS; + d->pm_descr.pd_caps = AMD_PMC_L3_CAPS; d->pm_descr.pd_width = 48; d->pm_evsel = AMD_PMC_L3_BASE + 2 * i; d->pm_perfctr = AMD_PMC_L3_BASE + 2 * i + 1; @@ -852,7 +867,7 @@ pmc_amd_initialize(void) snprintf(d->pm_descr.pd_name, PMC_NAME_MAX, "K8-DF-%d", i); d->pm_descr.pd_class = PMC_CLASS_K8; - d->pm_descr.pd_caps = AMD_PMC_CAPS; + d->pm_descr.pd_caps = AMD_PMC_DF_CAPS; d->pm_descr.pd_width = 48; d->pm_evsel = AMD_PMC_DF_BASE + 2 * i; d->pm_perfctr = AMD_PMC_DF_BASE + 2 * i + 1; diff --git a/sys/dev/hwpmc/hwpmc_amd.h b/sys/dev/hwpmc/hwpmc_amd.h index be484a1111a2..6d8ab8203942 100644 --- a/sys/dev/hwpmc/hwpmc_amd.h +++ b/sys/dev/hwpmc/hwpmc_amd.h @@ -62,21 +62,10 @@ #define AMD_PMC_CORE_DEFAULT 6 #define AMD_PMC_CORE_MAX 16 -/* L3 */ -#define AMD_PMC_L3_BASE 0xC0010230 -#define AMD_PMC_L3_DEFAULT 6 -#define AMD_PMC_L3_MAX 6 - -/* DF */ -#define AMD_PMC_DF_BASE 0xC0010240 -#define AMD_PMC_DF_DEFAULT 4 -#define AMD_PMC_DF_MAX 64 - -#define AMD_NPMCS_K8 4 -#define AMD_NPMCS_MAX (AMD_PMC_CORE_MAX + AMD_PMC_L3_MAX + \ - AMD_PMC_DF_MAX) - #define AMD_PMC_COUNTERMASK 0xFF000000 +#define AMD_PMC_PRECISERETIRE (1ULL << 43) /* Only valid for PERF_CTL2 */ +#define AMD_PMC_HOST (1ULL << 41) +#define AMD_PMC_GUEST (1ULL << 40) #define AMD_PMC_TO_COUNTER(x) (((x) << 24) & AMD_PMC_COUNTERMASK) #define AMD_PMC_INVERT (1 << 23) #define AMD_PMC_ENABLE (1 << 22) @@ -85,24 +74,13 @@ #define AMD_PMC_EDGE (1 << 18) #define AMD_PMC_OS (1 << 17) #define AMD_PMC_USR (1 << 16) -#define AMD_PMC_L3SLICEMASK (0x000F000000000000) -#define AMD_PMC_L3COREMASK (0xFF00000000000000) -#define AMD_PMC_TO_L3SLICE(x) (((x) << 48) & AMD_PMC_L3SLICEMASK) -#define AMD_PMC_TO_L3CORE(x) (((x) << 56) & AMD_PMC_L3COREMASK) - -#define AMD_PMC_UNITMASK_M 0x10 -#define AMD_PMC_UNITMASK_O 0x08 -#define AMD_PMC_UNITMASK_E 0x04 -#define AMD_PMC_UNITMASK_S 0x02 -#define AMD_PMC_UNITMASK_I 0x01 -#define AMD_PMC_UNITMASK_MOESI 0x1F #define AMD_PMC_UNITMASK 0xFF00 #define AMD_PMC_EVENTMASK 0xF000000FF #define AMD_PMC_TO_UNITMASK(x) (((x) << 8) & AMD_PMC_UNITMASK) #define AMD_PMC_TO_EVENTMASK(x) (((x) & 0xFF) | (((uint64_t)(x) & 0xF00) << 24)) -#define AMD_PMC_TO_EVENTMASK_DF(x) (((x) & 0xFF) | (((uint64_t)(x) & 0x0F00) << 24)) | (((uint64_t)(x) & 0x3000) << 47) + #define AMD_VALID_BITS (AMD_PMC_COUNTERMASK | AMD_PMC_INVERT | \ AMD_PMC_ENABLE | AMD_PMC_INT | AMD_PMC_PC | AMD_PMC_EDGE | \ AMD_PMC_OS | AMD_PMC_USR | AMD_PMC_UNITMASK | AMD_PMC_EVENTMASK) @@ -111,6 +89,69 @@ PMC_CAP_SYSTEM | PMC_CAP_EDGE | PMC_CAP_THRESHOLD | \ PMC_CAP_READ | PMC_CAP_WRITE | PMC_CAP_INVERT | PMC_CAP_QUALIFIER) +/* L3 */ +#define AMD_PMC_L3_BASE 0xC0010230 +#define AMD_PMC_L3_DEFAULT 6 +#define AMD_PMC_L3_MAX 6 + +/* + * L3 counters change their encoding slightly between Family 17h and Family 19h + * processors. + * + * Refer to the following documents for the L3 fields: + * PPR for AMD Family 17h Model 20h A1 55772-A1 Rev. 3.08 April 14, 2021 + * PPR for AMD Family 19h Model 51h A1 56569-A1 Rev. 3.03 September 21, 2021 + * PPR for AMD Family 1Ah Model 02h C1 57238 Rev. 0.24 September 29, 2024 + */ +#define AMD_PMC_L31_SLICEMASK (0x000F000000000000ULL) +#define AMD_PMC_L31_COREMASK (0xFF00000000000000ULL) + +#define AMD_PMC_L31_TO_SLICE(x) (((uint64_t)(x) << 48) & AMD_PMC_L31_SLICEMASK) +#define AMD_PMC_L31_TO_CORE(x) (((uint64_t)(x) << 56) & AMD_PMC_L31_COREMASK) + +#define AMD_PMC_L32_THREADMASK (0x0F00000000000000ULL) +#define AMD_PMC_L32_SOURCEMASK (0x0007000000000000ULL) +#define AMD_PMC_L32_ALLCORES (1ULL << 47) +#define AMD_PMC_L32_ALLSOURCES (1ULL << 46) +#define AMD_PMC_L32_COREMASK (0x00001C0000000000ULL) + +#define AMD_PMC_L32_TO_THREAD(x) (((uint64_t)(x) << 56) & AMD_PMC_L32_THREADMASK) +#define AMD_PMC_L32_TO_SOURCEID(x) (((uint64_t)(x) << 48) & AMD_PMC_L32_SOURCEMASK) +#define AMD_PMC_L32_TO_COREID(x) (((uint64_t)(x) << 42) & AMD_PMC_L32_COREMASK) + +#define AMD_PMC_L3_TO_UNITMASK(x) (((x) << 8) & AMD_PMC_UNITMASK) +#define AMD_PMC_L3_TO_EVENTMASK(x) ((x) & 0xFF) + +#define AMD_PMC_L3_CAPS (PMC_CAP_READ | PMC_CAP_WRITE | \ + PMC_CAP_QUALIFIER | PMC_CAP_DOMWIDE) + +/* DF */ +#define AMD_PMC_DF_BASE 0xC0010240 +#define AMD_PMC_DF_DEFAULT 4 +#define AMD_PMC_DF_MAX 64 + +#define AMD_PMC_DF_CAPS (PMC_CAP_READ | PMC_CAP_WRITE | \ + PMC_CAP_QUALIFIER | PMC_CAP_DOMWIDE) + +/* + * DF counters change their encoding between Family 19h and Family 1Ah + * processors. + * + * Refer to the same documents as the L3 counters. + */ +#define AMD_PMC_DF1_TO_EVENTMASK(x) (((x) & 0xFF) | \ + (((uint64_t)(x) & 0x0F00) << 24) | (((uint64_t)(x) & 0x3000) << 47)) +#define AMD_PMC_DF1_TO_UNITMASK(x) (((x) & 0xFF) << 8) + +#define AMD_PMC_DF2_TO_EVENTMASK(x) (((x) & 0xFF) | \ + (((uint64_t)(x) & 0x7F00) << 24)) +#define AMD_PMC_DF2_TO_UNITMASK(x) ((((x) & 0xFF) << 8) | \ + (((uint64_t)(x) & 0x0F00) << 16)) + +#define AMD_NPMCS_K8 4 +#define AMD_NPMCS_MAX (AMD_PMC_CORE_MAX + AMD_PMC_L3_MAX + \ + AMD_PMC_DF_MAX) + #define AMD_PMC_IS_STOPPED(evsel) ((rdmsr((evsel)) & AMD_PMC_ENABLE) == 0) #define AMD_PMC_HAS_OVERFLOWED(pmc) ((rdpmc(pmc) & (1ULL << 47)) == 0) From nobody Fri Feb 27 23:09:40 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fN3tx3JfKz6TWy6 for ; Fri, 27 Feb 2026 23:09:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fN3tx2ccNz3sM3 for ; Fri, 27 Feb 2026 23:09:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772233785; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x7VNPP2SezaEMEF01uoH+ebhcCArajgzYSDRXJ78e24=; b=eGD9stfv9x0h9YCeipD3aMWluB3ageIhRlnwETCXvu8DR1QsUUAW6mZeSsvOYP0HqZbKbJ MEFkcn3dkedRdKSry2utsGQ/PazhME8EF5OynBXbk6A+Re8WDeapIBZXmGQ7CqglMVrhZ+ ZlciuKgOP3G76wQodB2XbQGJEwnA3wn78CBouYZMoqOhxH581oU1O3BngcibU2CgLqIvWj NWtqwAiDHyFWNdOqf+IMo0SqcbpUiBfahcVSy79CTEFEaVflDu2c+PHnf5v81IO4+53yvl b2QMpKQoWyU0XfnVvH7LR6Y/jXCzGJdMRN1Df/xCvzQl+5sUhLqHTN7Jo/7arg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772233785; a=rsa-sha256; cv=none; b=poqTBivaHtBBGAXQFxF32IdRAgpOvhRUNZaXssh0UK83Wcpkw2tTC/WBrLgszT44H5PmZi ie9hW6o1U8OIp2RrHHIGSCMlGttGYPGFJpXuKB4HjzgWEeSlQi1a81CgewVbffwyW94O++ ihc/S0Z/xts2z4p2hAuhXOHAqaRMz3KpdWH25czklq0lF7KiygO2V9Vu0ggHc9+D3VqD+0 2vh6uGNfOr9nGbdwMcuiWc7mBITPgXYCWL6Eay0K+TJm8XC2TpEyaDcDqWoFGllq2MjX82 ab6c4yEogo6vaPWJMMVnBdiIEm2TubcMf01a0UwINNesCWfkCYQCkjpnzMjqRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772233785; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x7VNPP2SezaEMEF01uoH+ebhcCArajgzYSDRXJ78e24=; b=TnHZkgxtlu757g0Yg7UHVOoTnvLmEGMTBwCT3kpRLFXB4eGpKFqZMPAHy6oMFl2UEkyQ1d suVXWwfU3yLBJ4VHiFw7D6QIqnoZ1Cl57WiBBlyXZbgYDb4KlSDZq9BQef8Y7JYVCSDAOS tW2MgeAk5deL9mMGEHnBbs3ybf6GDwP2t4V8y7n39pshtmJNFqwbsbWO0yVLwHxpOwo5LJ j8LD3a1wuwWPTai02hQFX3fzo4pscKuFJu/Dsh/eaoah7DxNAjmBnlfM8jFzZocr6FiWoY Q86k4km8dnMu2NQXltviZn8Lec2ObJ7ATLQV2L4T9WWCwFGlsgSe27TLDDvOVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fN3tx23XGzf3C for ; Fri, 27 Feb 2026 23:09:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3bc9b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 23:09:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: b24dc842e1db - stable/15 - e1000: Increase FC pause/refresh time on PCH2 and newer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b24dc842e1db573c894a20e6c0f14c6b13b15b8b Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 23:09:40 +0000 Message-Id: <69a22434.3bc9b.5467d900@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=b24dc842e1db573c894a20e6c0f14c6b13b15b8b commit b24dc842e1db573c894a20e6c0f14c6b13b15b8b Author: Kevin Bowling AuthorDate: 2026-02-13 06:30:22 +0000 Commit: Kevin Bowling CommitDate: 2026-02-27 23:09:28 +0000 e1000: Increase FC pause/refresh time on PCH2 and newer This corresponds to Linux f74dc880098b4a29f76d756b888fb31d81ad9a0c That commit does not provide any public background detail, but it's been in use for over 5 years and corresponds to previous chip bugs w.r.t. automatic generation of PAUSE frames. Reviewed by: kgalazka Differential Revision: https://reviews.freebsd.org/D54555 (cherry picked from commit 2bdec2ee73be7dbafce9982b0dc5c273918a5443) --- sys/dev/e1000/if_em.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 49adc8caa325..23b7e3ff116b 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -3225,8 +3225,8 @@ em_reset(if_ctx_t ctx) case e1000_pch_ptp: hw->fc.high_water = 0x5C20; hw->fc.low_water = 0x5048; - hw->fc.pause_time = 0x0650; - hw->fc.refresh_time = 0x0400; + hw->fc.pause_time = 0xFFFF; + hw->fc.refresh_time = 0xFFFF; /* Jumbos need adjusted PBA */ if (if_getmtu(ifp) > ETHERMTU) E1000_WRITE_REG(hw, E1000_PBA, 12); From nobody Fri Feb 27 23:10:39 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fN3w03DBVz6TX3v for ; Fri, 27 Feb 2026 23:10:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fN3vz6DpSz3sLy for ; Fri, 27 Feb 2026 23:10:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772233839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gbKwm7tn/24XUImkli5dq9G0tSbhSMBc57U4dqbvN7Y=; b=ElDwlYtRvqSNeP++zwrA3+LnloY+CYZDe5zJlmDtjUORW16HA01EQ7/AMc1r33PvMZZBr8 z7M6t3VKs0YniTNrCDvfKyj8fQ7pWzLIchw4CdBkEnHxtMELNi95pizFFxLhYEHJzel2PW 3K1GiQNiRsHq8FFMATGapkKgyK9VetX9HUwaFAhIp4f0zkj5ABsPw+3xBsHLBeo/GeUyEQ YNBR/L6A7B9XvD1//IQPBo9z80yyjHQ3L5J1abjMZNtpAaLhqkGfdTvu05awmPdr8IOyVX sbaMdTZNNINSDcADr/BYyaOxirOfebL5Ky/a3PJRm8QWpuI3ZDThKLVLRr3uzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772233839; a=rsa-sha256; cv=none; b=bWSxN+PMsPUAPu1O92AaAPDEY1hbe2eYr8H9qsXqEibkF+uryhMgRFPAXdAGU7YErpmwzi ckNHZiLQyRy4LFe0Tqd1c+21N3w46l//Uha0j1DoIF3VCvwIo+eyMXAdr0atOcWj8XKWLm ItAqTr0HSmoIKIyhatBrf8Q64mBrOKjQaZUJ1nN0+HP3d71Kdb0II7ZvQyurq+gNYbPACm bifE7ZVxYLuiwVFOCI7RMCcD7fPEqemb0xOUr7ZST4U/kXYpolNNAf60MdWl24IX7NOmZU i9ntSOG89VgRZRSgNcel3mTZVwOMKQsSnSIiqmqSKJIXldJRkkNBrHl1dAa9Gg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772233839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gbKwm7tn/24XUImkli5dq9G0tSbhSMBc57U4dqbvN7Y=; b=oy/UEDPOT2nGM9Od9mXhucyfTDTycr1cn2QlKOOIjDcm6/i4wU/b1RNBr/EUNtDKcCYhUU P7+w4j4QmEMzAM8UfHlKvT7wu2eCaC5QnYLca+cFIhfdh8/ZfYMhoKPNs/UbCT5XpRBJRL ZAtZHESJeqdq+8sN4xNEgIAdTF72u/xe0i18p9EihQbgMeIRuEItIwUueU728tHNoNJzG0 /E3d1WzJvEt7plWPJm3Kx7ergz8Ke41m99rxOoi2jg2mMETxHKsVRLA/hIoB8/NLYi9xns 0pX8kPy4+ZSx1UVGq2hN4gfKOAYlFOHd6JM6dVTg4D+L8JwAKOUbvOalgI96Jw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fN3vz5SXkzf5Z for ; Fri, 27 Feb 2026 23:10:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d12d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 23:10:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 2244269424ae - stable/14 - e1000: Increase FC pause/refresh time on PCH2 and newer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2244269424ae439f0234d238c2674a95c0b459a3 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 23:10:39 +0000 Message-Id: <69a2246f.3d12d.495160ef@gitrepo.freebsd.org> The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=2244269424ae439f0234d238c2674a95c0b459a3 commit 2244269424ae439f0234d238c2674a95c0b459a3 Author: Kevin Bowling AuthorDate: 2026-02-13 06:30:22 +0000 Commit: Kevin Bowling CommitDate: 2026-02-27 23:10:13 +0000 e1000: Increase FC pause/refresh time on PCH2 and newer This corresponds to Linux f74dc880098b4a29f76d756b888fb31d81ad9a0c That commit does not provide any public background detail, but it's been in use for over 5 years and corresponds to previous chip bugs w.r.t. automatic generation of PAUSE frames. Reviewed by: kgalazka Differential Revision: https://reviews.freebsd.org/D54555 (cherry picked from commit 2bdec2ee73be7dbafce9982b0dc5c273918a5443) --- sys/dev/e1000/if_em.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 318620c944a3..248d14f5974c 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -3218,8 +3218,8 @@ em_reset(if_ctx_t ctx) case e1000_pch_ptp: hw->fc.high_water = 0x5C20; hw->fc.low_water = 0x5048; - hw->fc.pause_time = 0x0650; - hw->fc.refresh_time = 0x0400; + hw->fc.pause_time = 0xFFFF; + hw->fc.refresh_time = 0xFFFF; /* Jumbos need adjusted PBA */ if (if_getmtu(ifp) > ETHERMTU) E1000_WRITE_REG(hw, E1000_PBA, 12); From nobody Fri Feb 27 23:11:21 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fN3wn2vhmz6TWyY for ; Fri, 27 Feb 2026 23:11:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fN3wn2DkGz3snM for ; Fri, 27 Feb 2026 23:11:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772233881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2rEYhOH9GDCRL6QfdQUfKuc4VPWeYNmgNc9I3DqZ9xo=; b=n5FimlWbK/GU2du1rS3CA95Ub0NgcMS99PScQkb+06EcX2b66YOGiWvfdhe96/HI7IMNHd GU6rXFQQiC1ZjfFhTp+Clq+Bx0FvR49u1eNZS5SNFrE1EfQZ1+1dr0ZlcSWS29CbH7xHt2 p//je8sFOpBWpFVlAY5+5X6pzNhoWUaal2EC4ZJXmEJRZaL5vyPQvdpD1ncl3agzxlDDgs SVOdph4I+a/ZEx1a69gJRvCT7MKSTz5Y2VCwKDGZ40UVCPF/n70ysq1fMK3MaJf1VnrkFU Q83hurrXa581w/by7H5bb7Nzcci4hx4GNdpyR+WRKeIgZAiNVq6b7vg+DUVORg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772233881; a=rsa-sha256; cv=none; b=pGesXKds+36Y58dlxSzHN71xdyrn/EfNX+otGzCPdYK9y3EYqW8Kd+xVWyo2GGf5jOukxR XVhv3l5blmwwKpLqLDfPNN8/QBUJfja74HF12mR7VSjNQ9Fwq6OLCTuo4rHB6H22rxKRGR oA714aCNdXhFaVU5a5a6OmSE3qKcbjx2REI9Ka7SIiotX9f9RDvMfupE4o5tw8o+vLAyuR IEg8LmuvEsKKsQxZqy/p56HWmGblMsmJcuijHvTtqZ4F/2uyd3+nY9giQAhRGJhhGWIPLY HmZ691bR8WJD1UOu06RE2yH86gUc/K2G7GToUoMy8ImbsJ7/IZV5erH7kHeaJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772233881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2rEYhOH9GDCRL6QfdQUfKuc4VPWeYNmgNc9I3DqZ9xo=; b=lWrZic1/A9+xsKOkdjn8eMIw+3pDkfMG71qyzeEYzXDnxDMLfg0UwHjNLxOO+Zjhs+58P7 o36AztBrhmiqplvGG89t+vMSsax7/3fxliqJYKiluNrbYezXEOkbEPxTXt311zhZ0GBUfX 3q4u4ZIK6P5sTIaRj91daLmBl7u3w9d5Qi3Orl9ISHXXBfNdpJ5tzzB6nCJSO/AlAkHAvZ wkG/pdeI5m2S6NBEOTdStcFDJ49QkVS+tQGreOlk4DCxVpXqqgM7167ytbBLf44Px0+lcW LH3y7HQIy2OAYzSrjP153XK9Q6YIQQgVNrQhOsj/eo09nGyD+XVqsxr1Dt7ybg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fN3wn1rJCzfBJ for ; Fri, 27 Feb 2026 23:11:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d06d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Feb 2026 23:11:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 55eff489d9cd - stable/13 - e1000: Increase FC pause/refresh time on PCH2 and newer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 55eff489d9cdae5620bf60bb79d996a059404ed2 Auto-Submitted: auto-generated Date: Fri, 27 Feb 2026 23:11:21 +0000 Message-Id: <69a22499.3d06d.1451af0@gitrepo.freebsd.org> The branch stable/13 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=55eff489d9cdae5620bf60bb79d996a059404ed2 commit 55eff489d9cdae5620bf60bb79d996a059404ed2 Author: Kevin Bowling AuthorDate: 2026-02-13 06:30:22 +0000 Commit: Kevin Bowling CommitDate: 2026-02-27 23:11:11 +0000 e1000: Increase FC pause/refresh time on PCH2 and newer This corresponds to Linux f74dc880098b4a29f76d756b888fb31d81ad9a0c That commit does not provide any public background detail, but it's been in use for over 5 years and corresponds to previous chip bugs w.r.t. automatic generation of PAUSE frames. Reviewed by: kgalazka Differential Revision: https://reviews.freebsd.org/D54555 (cherry picked from commit 2bdec2ee73be7dbafce9982b0dc5c273918a5443) --- sys/dev/e1000/if_em.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index 3244dc9fa348..92874e43fd3d 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -3206,8 +3206,8 @@ em_reset(if_ctx_t ctx) case e1000_pch_ptp: hw->fc.high_water = 0x5C20; hw->fc.low_water = 0x5048; - hw->fc.pause_time = 0x0650; - hw->fc.refresh_time = 0x0400; + hw->fc.pause_time = 0xFFFF; + hw->fc.refresh_time = 0xFFFF; /* Jumbos need adjusted PBA */ if (if_getmtu(ifp) > ETHERMTU) E1000_WRITE_REG(hw, E1000_PBA, 12); From nobody Sat Feb 28 01:33:14 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fN74W1CsQz6Tp1L for ; Sat, 28 Feb 2026 01:33:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fN74W0M6Mz47Ks for ; Sat, 28 Feb 2026 01:33:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772242395; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xWpTp2PThCEXMwwZhCOqqggAgRTHXOXQy5AQI+LF8EA=; b=GIjnJvqs9vHNzIW6hR5H+KHNXDHrVkEbNMzW3VaF1rPV8hLzb9mgDNcs2Yg43r32icBG/y D2riLBoTt7sgSWcVlFQKofQZ2BmGkwdvC8nsl8oWho/dS07/jfcMxtOoequpTMAcI1IZk4 yVezq6EOuDBLqK4GL/13RyKWbITIvLzwBT4vfuq0mRQteRWaOA01hegVWkTm++AHOvZ61T 4t6a7Sxujfl5WPLOPoUB2AntPJ12Ma40Abr6pFVoPbsSjEsTSIg4h+jqD8jyJp5FKjpe1Y OERHV4mLMueVl42ZteF9it6niqxLjQrVcF1zFgVOkoD1pJfLaDhvzG1uAjc4eA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772242395; a=rsa-sha256; cv=none; b=J4oA/33RsfqltLmlcYzIcWhmyRhpGWl9qYsyfKapM8avdXdwXR2XwV2srefaXkGauRBkmt /isVub4f5WfzksnZGgaZ7m+rMVC1OFHeamYC9dlNcaOm9JGdjwZDfLv0a/Bjj3AvHL6Ckg 9vfIXTHXYF6nQnymmgCmcuthU8RivbXCYDRkwMJBM4vRBrX0O+R08e5FTZyKvHoJCoamPW lbs+EYyj/dK6DAiJfEgVXzV1renUFybCp5wX2xuLuCqGgGTv4fM5gs1w71b/eNxwEIvyWA 6s04WZYYWOALHARrodQlmQVs3eb20J0ig+MOLIEX8caJ8nEu7cJYAm/QrKlwwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772242395; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xWpTp2PThCEXMwwZhCOqqggAgRTHXOXQy5AQI+LF8EA=; b=cYHDxi86V4wcgEkxFjtwWnbFpYl1+S9jh75SNJ7iiSYwBS8HwfUMzstBj1AR/7obLy/d1x NcxR/Wrja3RAcgAWlx6lb4x0gO0hNZI0d/lOUsmvsNThbETYyCbk4XrQkD0wlbVAQAWrgA IT5x6rHXDJ16NRNEZlQjy/KrtIv3LdVOl/mrWLRAAC0YqLI2ORkQBJ7A+9HYJbPTxRAmS0 IjtShETum/qzcjiMXR4ABoAFlldMv030BIxnhZzkDhpDXIdc9bw0W64op1WqBKB3xuGFuj 0MZUtV90u5iAMKt0aTfxPNn7Ekx9i5mmVHlIPurSdAIiP2K0TelcD2eRvKw6ew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fN74V6kfXzjbf for ; Sat, 28 Feb 2026 01:33:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 19cd4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 28 Feb 2026 01:33:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Ruslan Bukin From: Konstantin Belousov Subject: git: e0dbeabeee7a - stable/15 - iommu_gas: Fix assertion. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: e0dbeabeee7a5f8fb7617b22b272c70c5618907c Auto-Submitted: auto-generated Date: Sat, 28 Feb 2026 01:33:14 +0000 Message-Id: <69a245da.19cd4.607b9313@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e0dbeabeee7a5f8fb7617b22b272c70c5618907c commit e0dbeabeee7a5f8fb7617b22b272c70c5618907c Author: Ruslan Bukin AuthorDate: 2026-02-19 13:56:36 +0000 Commit: Konstantin Belousov CommitDate: 2026-02-28 01:32:24 +0000 iommu_gas: Fix assertion. (cherry picked from commit 7e8284c6ad95bb7a0fc84d4d945ee98737efdd36) --- sys/dev/iommu/iommu_gas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iommu/iommu_gas.c b/sys/dev/iommu/iommu_gas.c index 80e37341b3dc..306649db445f 100644 --- a/sys/dev/iommu/iommu_gas.c +++ b/sys/dev/iommu/iommu_gas.c @@ -282,7 +282,7 @@ iommu_gas_fini_domain(struct iommu_domain *domain) entry = RB_MIN(iommu_gas_entries_tree, &domain->rb_root); KASSERT(entry->start == 0, ("start entry start %p", domain)); - KASSERT(entry->end == IOMMU_PAGE_SIZE, ("start entry end %p", domain)); + KASSERT(entry->end == 0, ("start entry end %p", domain)); KASSERT(entry->flags == (IOMMU_MAP_ENTRY_PLACE | IOMMU_MAP_ENTRY_UNMAPPED), ("start entry flags %p", domain)); From nobody Sat Feb 28 01:33:16 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fN74X2Kt9z6TnYF for ; Sat, 28 Feb 2026 01:33:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fN74X0qYlz47Kt for ; Sat, 28 Feb 2026 01:33:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772242396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IxlNTudpjl+yWUNZFCgA1Glqkod9+8hZrHKlZ/W0owc=; b=MtLShUpjsbnm2Q/AcpBgpA5zHslgI/i2TfIuQt3wUWErJk3B+SiCf8adzO3CpC2qUv/+u/ HKoEq9TTY5WPGsbJOTsgU/4yYucLscuob4FZUqk2ymDYj7aVp536d4kDWAw36kdBGi9Hvx Zxp0s688dLxv+zmrE+EcznYnH7fWCXyknQnCwP7r3qLAJBWXGdc6pUxaIr7xnSgh7qbdpe T/vnmh+++OxVfYgP8/Y5haJKpNLXuZNyfKtz8C8buHc5Dz8OWE2arSBHG3+StECMUk+8+W s4kBnTAgIpFqKeJmRVkzHRRky2f9NzUDXeyiGSczNkYhkAvmN7C0f48Gh6jmHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772242396; a=rsa-sha256; cv=none; b=ql08Mc+dPo8MhTIs6yaUGKPL6QTHPjwmo9MlGL0pCeg+55Qge+Arf7pMKgWrcoQ3/X/xOS huv0ZAlg8Yzw4lzWs9K0VLr/Rc6GT17SCuB3wvDlujpVf4Cs+vMq3wWM/0fyRHvhkDNMyk j3j1XIuko0uCoXtfrM/PHBwp6FfiRTGgDCkgXA1C6l8tqW6bGJRSN7A6JH0rRCYGnU5ysE HGjeM7P2V/H+cW3LVvFepAA+JR85toB50NQOceGKsVxi0YqW+TewJU4emlGGtN7XUB3o7A N5GNf0nCt7YlJaqI1xiKb5Mn32olppcg4gWIBNhdywQflvZRGqJH1kEYQEw33w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772242396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IxlNTudpjl+yWUNZFCgA1Glqkod9+8hZrHKlZ/W0owc=; b=Q44mcdwOUABS/FSE+lhVFkgN33+yxzT75D4g1yC3hHp47vLDI57KEj98cLvIcyfOpCUunk 4ByyPMKcwo9hIlgGN3fsmZBQd+ZjQhV4PD0PCkuL6JPduHb7SLSidXRM/07/Jx3GL4fEXo 2N6Lln1bHilyuvdhr7mezw+oCxxdw6JtVpfNgnw4A33+0k2mtSVqHo3rjxt/09OQ5+A5CW J2WDEVXutvDpUdDMkkwaf3ds4BUxE6MVuVCdYUX0zH4tg55/8xcxEeyEMGn4q3ridyoHeG SHEVwU5130yOBpQjaBtNb87yvpItW8DvYQzaflEGF7JDF9G2VuIGsMQ8DsqY4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fN74X0QQzzjQD for ; Sat, 28 Feb 2026 01:33:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 19cd9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 28 Feb 2026 01:33:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 08f95c4938d3 - stable/15 - procctl(PROC_REAP_KILL): use pgrp pg_killsx sx to sync with fork List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 08f95c4938d301a9e00e69b97d1dea3cacd98ac5 Auto-Submitted: auto-generated Date: Sat, 28 Feb 2026 01:33:16 +0000 Message-Id: <69a245dc.19cd9.310916a9@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=08f95c4938d301a9e00e69b97d1dea3cacd98ac5 commit 08f95c4938d301a9e00e69b97d1dea3cacd98ac5 Author: Konstantin Belousov AuthorDate: 2026-02-15 11:05:36 +0000 Commit: Konstantin Belousov CommitDate: 2026-02-28 01:32:24 +0000 procctl(PROC_REAP_KILL): use pgrp pg_killsx sx to sync with fork PR: 290844 (cherry picked from commit be140717a0a4bbfa7176d334c36364d34a0b1bc5) --- sys/kern/kern_procctl.c | 142 +++++++++++++++++++----------------------------- 1 file changed, 56 insertions(+), 86 deletions(-) diff --git a/sys/kern/kern_procctl.c b/sys/kern/kern_procctl.c index 96365e192d3c..04c47d086677 100644 --- a/sys/kern/kern_procctl.c +++ b/sys/kern/kern_procctl.c @@ -43,7 +43,6 @@ #include #include #include -#include #include #include @@ -256,68 +255,73 @@ struct reap_kill_proc_work { ksiginfo_t *ksi; struct procctl_reaper_kill *rk; int *error; - struct task t; }; static void reap_kill_proc_locked(struct reap_kill_proc_work *w) { - int error1; - bool need_stop; + int error; PROC_LOCK_ASSERT(w->target, MA_OWNED); PROC_ASSERT_HELD(w->target); - error1 = cr_cansignal(w->cr, w->target, w->rk->rk_sig); - if (error1 != 0) { + error = cr_cansignal(w->cr, w->target, w->rk->rk_sig); + if (error != 0) { if (*w->error == ESRCH) { w->rk->rk_fpid = w->target->p_pid; - *w->error = error1; + *w->error = error; } return; } - /* - * The need_stop indicates if the target process needs to be - * suspended before being signalled. This is needed when we - * guarantee that all processes in subtree are signalled, - * avoiding the race with some process not yet fully linked - * into all structures during fork, ignored by iterator, and - * then escaping signalling. - * - * The thread cannot usefully stop itself anyway, and if other - * thread of the current process forks while the current - * thread signals the whole subtree, it is an application - * race. - */ - if ((w->target->p_flag & (P_KPROC | P_SYSTEM | P_STOPPED)) == 0) - need_stop = thread_single(w->target, SINGLE_ALLPROC) == 0; - else - need_stop = false; - (void)pksignal(w->target, w->rk->rk_sig, w->ksi); w->rk->rk_killed++; - *w->error = error1; - - if (need_stop) - thread_single_end(w->target, SINGLE_ALLPROC); + *w->error = error; } static void -reap_kill_proc_work(void *arg, int pending __unused) +reap_kill_proc(struct reap_kill_proc_work *w) { - struct reap_kill_proc_work *w; - - w = arg; - PROC_LOCK(w->target); - if ((w->target->p_flag2 & P2_WEXIT) == 0) - reap_kill_proc_locked(w); - PROC_UNLOCK(w->target); - - sx_xlock(&proctree_lock); - w->target = NULL; - wakeup(&w->target); - sx_xunlock(&proctree_lock); + struct pgrp *pgrp; + int xlocked; + + sx_assert(&proctree_lock, SX_LOCKED); + xlocked = sx_xlocked(&proctree_lock); + PROC_LOCK_ASSERT(w->target, MA_OWNED); + PROC_ASSERT_HELD(w->target); + + /* Sync with forks. */ + for (;;) { + /* + * Short-circuit handling of the exiting process, do + * not wait for it to single-thread (hold prevents it + * from exiting further). This avoids + * locking pg_killsx for it, and reduces the + * proctree_lock contention. + */ + if ((w->target->p_flag2 & P2_WEXIT) != 0) + return; + + pgrp = w->target->p_pgrp; + if (pgrp == NULL || sx_try_xlock(&pgrp->pg_killsx)) + break; + + PROC_UNLOCK(w->target); + sx_unlock(&proctree_lock); + /* This is safe because pgrp zone is nofree. */ + sx_xlock(&pgrp->pg_killsx); + sx_xunlock(&pgrp->pg_killsx); + if (xlocked) + sx_xlock(&proctree_lock); + else + sx_slock(&proctree_lock); + PROC_LOCK(w->target); + } + + reap_kill_proc_locked(w); + + if (pgrp != NULL) + sx_xunlock(&pgrp->pg_killsx); } struct reap_kill_tracker { @@ -388,8 +392,7 @@ reap_kill_subtree_once(struct thread *td, struct proc *p, struct proc *reaper, struct reap_kill_tracker_head tracker; struct reap_kill_tracker *t; struct proc *p2; - int r, xlocked; - bool res, st; + bool res; res = false; TAILQ_INIT(&tracker); @@ -432,53 +435,21 @@ reap_kill_subtree_once(struct thread *td, struct proc *p, struct proc *reaper, (P2_REAPKILLED | P2_WEXIT)) != 0) continue; - if (p2 == td->td_proc) { - if ((p2->p_flag & P_HADTHREADS) != 0 && - (p2->p_flag2 & P2_WEXIT) == 0) { - xlocked = sx_xlocked(&proctree_lock); - sx_unlock(&proctree_lock); - st = true; - } else { - st = false; - } - PROC_LOCK(p2); + PROC_LOCK(p2); + if ((p2->p_flag2 & P2_WEXIT) == 0) { + _PHOLD(p2); + /* * sapblk ensures that only one thread * in the system sets this flag. */ p2->p_flag2 |= P2_REAPKILLED; - if (st) - r = thread_single(p2, SINGLE_NO_EXIT); - (void)pksignal(p2, w->rk->rk_sig, w->ksi); - w->rk->rk_killed++; - if (st && r == 0) - thread_single_end(p2, SINGLE_NO_EXIT); - PROC_UNLOCK(p2); - if (st) { - if (xlocked) - sx_xlock(&proctree_lock); - else - sx_slock(&proctree_lock); - } - } else { - PROC_LOCK(p2); - if ((p2->p_flag2 & P2_WEXIT) == 0) { - _PHOLD(p2); - p2->p_flag2 |= P2_REAPKILLED; - PROC_UNLOCK(p2); - w->target = p2; - taskqueue_enqueue(taskqueue_thread, - &w->t); - while (w->target != NULL) { - sx_sleep(&w->target, - &proctree_lock, PWAIT, - "reapst", 0); - } - PROC_LOCK(p2); - _PRELE(p2); - } - PROC_UNLOCK(p2); + + w->target = p2; + reap_kill_proc(w); + _PRELE(p2); } + PROC_UNLOCK(p2); res = true; } reap_kill_sched_free(t); @@ -572,7 +543,6 @@ reap_kill(struct thread *td, struct proc *p, void *data) w.ksi = &ksi; w.rk = rk; w.error = &error; - TASK_INIT(&w.t, 0, reap_kill_proc_work, &w); reap_kill_subtree(td, p, reaper, &w); crfree(w.cr); } From nobody Sat Feb 28 01:33:17 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fN74Y3HYKz6Tp1P for ; Sat, 28 Feb 2026 01:33:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fN74Y1qSMz47Hx for ; Sat, 28 Feb 2026 01:33:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772242397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5mMGG2aHOwWlOPxNEvumDcoaC1ToRsG1Hg04JydVdC0=; b=qnSJBMIwqFOyXebWF0nGnPXfO/3zbSGNWaUhwOCfjPhv1fWzMzwQ35Aydd3ut9XZrSxdrc qJuiW7b8WpXhOZnCcQqV1wnxEiQ8J5B7iw4ht7MPjttN/2dNoaRM8/QqHUlCHuY1Xg+IxR SJ9opdf4ibPsgkffqCfqlDwPw5NjsAOp7ATWR07knHjvPKz3Su6vYALgfOyeBBWjrbhZQf E7jr9u4qxgiEJ7zKkRlbvcmCr9KBsYS94Z8ar/KeAU55Ik/z6KEXMC6lrumw/Afxh6MdvB MDp1IwWCGO1FpIgnkCab1kR7uo5WI8gIH4TFA48UZEmqQSpDkIuAVzTLyhSi7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772242397; a=rsa-sha256; cv=none; b=hW81LiqaeO5KY9waF1JveNXvpEyTpw1+HdqprUmFCRtnHVeFpqrJtkrhx2mWgN0Fd1bW3s 00Okd9OKvstHWmxZU0rYz18E5B1SR7AFpCflqGXcpmm3AQurSrg1eB6tY36rZmESXfwSJ9 koizSMES0N2s9YH2Y55ZeolOaLJOBnvNL665CoY7czmS0lFlrAz1cyB9obUfv3r3i9HY6q 3EDZL01cAUxLw6jKxra0EaQUphRpvUD+it+fTiwdR+L+MCBmJGf6v6f4dYs99CWxWPcF4a b+q5J+Ft59bButc6LS2WxKB19B5mm7VZU4vz/Gmo6JgYs5FoR+teb9wAmq9GNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772242397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5mMGG2aHOwWlOPxNEvumDcoaC1ToRsG1Hg04JydVdC0=; b=ovPHOAkMraps0DtBKqHCnTWylw/9jWI2OvrOgWG3rIo0WqT9Yq4mtUXIwrabRRihFw1VlO sEz19nnT4Nb2f6OKNASL50O3O2opdyPWF71mDwkPibMWeOEyzp3JE67IhkS2WaS4mOG0Gf 570zv0UoCALN0HA3MkdwnKW/SBNvCfdkOyUkbaX+Sxi7aX8gKaADiz5Pz1RPnx0GRWGt/F Liro75z4Z66v8+/+h6DD/NvrOTnKmQOb9k2rF5x/MrGsGBUZi6mvJUyWlRGVMQrQtK1Pm0 m15lIbu/I3NTARw7B2uhbnJhvzm3rHfT5/hCxy3KkUu0mJO85tSTkeA0NV5IoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fN74Y1FT4zjhd for ; Sat, 28 Feb 2026 01:33:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1bea1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 28 Feb 2026 01:33:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: cf64824a3e95 - stable/15 - reap_kill_subtree_once(): reap_kill_proc_work() might drop proctree_lock List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: cf64824a3e95777834233064dfbf6ed9f8a1c663 Auto-Submitted: auto-generated Date: Sat, 28 Feb 2026 01:33:17 +0000 Message-Id: <69a245dd.1bea1.c3430f5@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=cf64824a3e95777834233064dfbf6ed9f8a1c663 commit cf64824a3e95777834233064dfbf6ed9f8a1c663 Author: Konstantin Belousov AuthorDate: 2026-02-16 15:20:02 +0000 Commit: Konstantin Belousov CommitDate: 2026-02-28 01:32:24 +0000 reap_kill_subtree_once(): reap_kill_proc_work() might drop proctree_lock (cherry picked from commit 0e67c3f675eab3a9c00b76e3886ace7700ef1bd4) --- sys/kern/kern_procctl.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_procctl.c b/sys/kern/kern_procctl.c index 04c47d086677..30ab37d56877 100644 --- a/sys/kern/kern_procctl.c +++ b/sys/kern/kern_procctl.c @@ -280,7 +280,7 @@ reap_kill_proc_locked(struct reap_kill_proc_work *w) } static void -reap_kill_proc(struct reap_kill_proc_work *w) +reap_kill_proc(struct reap_kill_proc_work *w, bool *proctree_dropped) { struct pgrp *pgrp; int xlocked; @@ -311,6 +311,7 @@ reap_kill_proc(struct reap_kill_proc_work *w) /* This is safe because pgrp zone is nofree. */ sx_xlock(&pgrp->pg_killsx); sx_xunlock(&pgrp->pg_killsx); + *proctree_dropped = true; if (xlocked) sx_xlock(&proctree_lock); else @@ -392,7 +393,7 @@ reap_kill_subtree_once(struct thread *td, struct proc *p, struct proc *reaper, struct reap_kill_tracker_head tracker; struct reap_kill_tracker *t; struct proc *p2; - bool res; + bool proctree_dropped, res; res = false; TAILQ_INIT(&tracker); @@ -400,6 +401,7 @@ reap_kill_subtree_once(struct thread *td, struct proc *p, struct proc *reaper, while ((t = TAILQ_FIRST(&tracker)) != NULL) { TAILQ_REMOVE(&tracker, t, link); +again: /* * Since reap_kill_proc() drops proctree_lock sx, it * is possible that the tracked reaper is no longer. @@ -435,6 +437,7 @@ reap_kill_subtree_once(struct thread *td, struct proc *p, struct proc *reaper, (P2_REAPKILLED | P2_WEXIT)) != 0) continue; + proctree_dropped = false; PROC_LOCK(p2); if ((p2->p_flag2 & P2_WEXIT) == 0) { _PHOLD(p2); @@ -446,11 +449,13 @@ reap_kill_subtree_once(struct thread *td, struct proc *p, struct proc *reaper, p2->p_flag2 |= P2_REAPKILLED; w->target = p2; - reap_kill_proc(w); + reap_kill_proc(w, &proctree_dropped); _PRELE(p2); } PROC_UNLOCK(p2); res = true; + if (proctree_dropped) + goto again; } reap_kill_sched_free(t); } From nobody Sat Feb 28 01:33:18 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fN74b0g1nz6Tp1S for ; Sat, 28 Feb 2026 01:33:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fN74Z2VzTz47c1 for ; Sat, 28 Feb 2026 01:33:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772242398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hFCiKeqWGMlk5bLphAIB6xpulDDxeGcfPWkklbuoVWk=; b=NiN7z0BT7dg0QrAnRKV45QY00rDfVmbZL2VEnf1QUg8VnSQlfJzO5NBCpoHRniU+ImRbfj NcIdycBg5zHJqVr4EVzq/eKvZcs6RFjJcsR+pZfZxCRiZFTgfuFxr+5UDBQxUi96e6HN0F kCFm+3i1zPFuZwcXM1dnrFlMQB4G3Exf0labxOJ9WEZAoTQRuUaBMDFP32xtxiNlIm2GFK Mb3qkt3175lg5CEbBW1TJwMJQ8/Tjk2MqGypp3G/Hh06DtHewsYoAM8PmSnqCWWYxzhj23 yOBawDic/5Jrt02vquGCkB0YW5VGsLpGOa93xJf/UnYos5vHPvJuSeQbZ/ezEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772242398; a=rsa-sha256; cv=none; b=N/v3ZRorCDyd4FXXpP4PrsF1aQYnkOalbfNGPPsYStqyXaPH9EWEuJTxGSR/SBw4pU1sLD hQWzQ5llSYrhua9nKbVyucQnxSUXBRwvCU/65kyB5qZWIoppBBvgzHQEmpiGBh/M/MFvHU ndl5Ayfq//8oh/WdWSaOkmshi2NV157rk4+epeIyTPgW7KZfHg8rp2VHuhUy6mj96dg9qK 1Sxfy0r22v6IuQMdqRl/5Gx1VQ69Rwmq3rWYIJ02vMulAz/ykHmQjvdLl9OZkcX9zvZznq nhq+W15SmCJDtpFpYlwKLbwhrgQRPnH2poVKI1AOlI6+0e5yUXzLMIAhgimBxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772242398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hFCiKeqWGMlk5bLphAIB6xpulDDxeGcfPWkklbuoVWk=; b=v4C8sSbAdCdropogVnhz9n71AihFTiukTUyug+gaeuvk+sH/i7wZgHQazcpKuJiniDgCar sZ6WIWFN9WrjuiRTaJH0+YEcvO3QkLGUpRRZyGjhb7H1646DdmgWTjPv1ro5mSjFKU8DHb SR4MGZKSPMsF2gMSHDzSxQ43rxO2Hfz8iCoEQ25IWuq07NZMr9UbSdnSJhQVk0PiSw5FsG GLNXTRwpC0smVNaG3BUTXHc1sLk5W+kfAA6tfLR+Mb97U/GerB6aywuWYxgANGEj+JGf0p /58vFZiv5SetdcIBlWZVRLEpyNaNmhb66wsZY3M3YAQlkWi9c06W8VgcFhZEYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fN74Z23Gkzjdp for ; Sat, 28 Feb 2026 01:33:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1982e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 28 Feb 2026 01:33:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: fe90ad2d2444 - stable/15 - procctl(PROC_REAP_KILL): align error reporting with pgkill(2) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: fe90ad2d2444616d01d0d5396c0687635d637364 Auto-Submitted: auto-generated Date: Sat, 28 Feb 2026 01:33:18 +0000 Message-Id: <69a245de.1982e.3acadada@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=fe90ad2d2444616d01d0d5396c0687635d637364 commit fe90ad2d2444616d01d0d5396c0687635d637364 Author: Konstantin Belousov AuthorDate: 2026-02-18 08:22:51 +0000 Commit: Konstantin Belousov CommitDate: 2026-02-28 01:32:25 +0000 procctl(PROC_REAP_KILL): align error reporting with pgkill(2) (cherry picked from commit 5c8af592f69a31da94c45722dcd74afcf0ab375e) --- sys/kern/kern_procctl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_procctl.c b/sys/kern/kern_procctl.c index 30ab37d56877..b1539c5cec4f 100644 --- a/sys/kern/kern_procctl.c +++ b/sys/kern/kern_procctl.c @@ -267,7 +267,11 @@ reap_kill_proc_locked(struct reap_kill_proc_work *w) error = cr_cansignal(w->cr, w->target, w->rk->rk_sig); if (error != 0) { - if (*w->error == ESRCH) { + /* + * Hide ESRCH errors to ensure that this function + * cannot be used as an oracle for process visibility. + */ + if (error != ESRCH && *w->error == 0) { w->rk->rk_fpid = w->target->p_pid; *w->error = error; } From nobody Sat Feb 28 01:44:45 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fN7Ks61Kvz6TpqQ; Sat, 28 Feb 2026 01:44:49 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fN7Ks5T9pz3BqL; Sat, 28 Feb 2026 01:44:49 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772243089; h=from:from:reply-to:subject:subject: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=pawD+ZI0lcu/MNedTwjxFA4gA/OseMJ1aNyPOs3j1do=; b=oFfhtF5jZ+OAhLMaio4L1Gbgp40LYR9tYNHmcADE8IkHjb5A2lsXs+cLs37Jw4Y45HFmgx j8yx3vhJLhThsll57m9BpKOOxdu0oGu3KOgx/YXrBmkKfu/je6bXsONn4DgkF0saUJhMoT WglCEJpdUgguQhfD7dHhgtIVPJSHXsuXz2DOGdj0+18Mc0wHtHDl0aObFFSMHyPHzjTAzk apbY+ACoT9zZ0grbRmcO2SSLb3oOO5Sqt/fsSBhptEoqFHOkBHr1YtGDML34xb+NhMW+mg lPWtKS8cU0YcP3ZSFdoC9QwxrmNSe55yvtYlZR/oxIMUKj022ZXX26YaeSvnSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772243089; a=rsa-sha256; cv=none; b=n+wsFExVskRFHkBealDMTi3IcroYYMapsuGP4wc9CDu68UlRngdT2Igfse4iVwOgzcxt48 8lnFFo8PgnOS/IS7IFsNHm2PRWkWHcudKO1XYyCWKHZRVoqwRfRZPYRR7N/f6nk1vRb1bt 5cutwu3BRdlPlsJ3Po8zshZzUg3tIwuqM5Vb675rabFMmUPCj6BdcOdQX0P17xp0JI4OCw 9+2H/FufMImUolx4rc30WOjsEEnkCSVXGxQYmOkgmY+82zJ0RORMAfx0QozSRul5VIhtOv /Gv8wDdfMJf2vMxDZtRqIUp16l9v0KO8cGaAVDv6fQ1jvNq+FQLh3P5EqrzEog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772243089; h=from:from:reply-to:subject:subject: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=pawD+ZI0lcu/MNedTwjxFA4gA/OseMJ1aNyPOs3j1do=; b=KseI8jLUmtnDG5Se65nRtRkrxb2VQZjWooSD6bZNAjC72AMS/XRBwTmHFVJAR7AmEvqmXu SL7/2+iiNkTGEkINGhaxhCP+pME3xh7mFmhXSqRCul64spdyZII/CdbUDFdETaLObNVuMP wCq6tD4j+hUMitPncC3Mo/+r+5t9xbKc/gwhlflS0j9TtMQ/U1vzQ2M95TrODfXJ8e9yPQ KCst5+JnRc5P+aPU0InnoleQeWrcsne9DgHoy+oXgsMyj3B0P8Goo1ZQbPVHCk0fjg0IdB aIRs8gAeURI/DrkqvjfDDEi8tcE1i+3yXUsL6YUbRTPRtxXwz5+124gXZ+uJfg== Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fN7Ks0BghzZ9Q; Sat, 28 Feb 2026 01:44:48 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Fri, 27 Feb 2026 17:44:45 -0800 From: Gleb Smirnoff To: Michael Tuexen Cc: "Enji Cooper (yaneurabeya)" , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 454212b9718b - main - sctp: fix so_proto when peeling off a socket Message-ID: References: <699ef25d.42e41.7579887f@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Fri, Feb 27, 2026 at 08:11:39AM +0100, Michael Tuexen wrote: M> >> - so = sopeeloff(head); M> >> + so = sopeeloff(head, &sctp_stream_protosw); M> > M> > This part of the change broke LINT-NOINET because sctp_stream_protosw is only defined in the INET case. I didn’t dig into the SCTP syscalls too far, but I think that the right protocol needs to be picked per the address family, right? btw, I tried to move the function to sctp_syscalls.c and this required exposing soattach() and soalloc() outside. After weighting in and out decided to leave it the way it is. -- Gleb Smirnoff From nobody Sat Feb 28 06:50:21 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fNG6T4rKFz6Sy4g; Sat, 28 Feb 2026 06:50:25 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fNG6T269tz3jpX; Sat, 28 Feb 2026 06:50:25 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772261425; h=from:from:reply-to:subject:subject: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=PVLubbqJ+3+0hNiLwnR4Xsy8Hy7p/H0Z5rzaKdU+ap4=; b=pp2UM8sV2cKYYrj6Zw3NNyEhICQOtPSwKfO4bMpd455p40hY9uuu7bslSJbov6qyTpOmWO JSVU7nXC37SIT6Pl+5Amd/s1957/lzFs/1Yl1ezAe4kPt3OmG/hCyV4w0qSpOZ6axxGHkO k5i+peypbn3+FjRDQkKhrIuwS2OIszyJDjI89/w+yM/N6GDmCIgpn8cNTqLPNwig1pKlUJ Gi4InVZM976vzGpxlLcb9v9G0ujxo2zxgOFKeoEvPLygbN5l8HWY2vDGUfH3H82ls6X5Lh O1+M5DHSG1TO5jW1hy5Fc7r1q2g3dY/lX/Pa/TrpA3KITHbPIeHeChHiAE9k0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772261425; a=rsa-sha256; cv=none; b=EWiJDJvrDVg2l8fPaf+3xOBGIdC5HQgSgMdHI/RakjhjVisSHvkCZNXGz/PK85OUkYwTkO oiX+XcDBlCDjp89ek+oaseOA5B7rxve89y5GccN5kDv5dT+pzFXFtyAYEWYTF70tniSgsf mcK0rj2/yrrKrM8a6XG/3Zyf+VrxhFBGJ14Z3/sK3kvL88FyMCwOJRauyhjSYvKsPwMCAR k1jW0a531X7OaMMq8Inn3DfWYvlycUdQY1OLXcuvjgr+dxUwHm+z9NXkB4VL1+bkFsmMqO 6xwI49MG5yMtTQ3HiLXaLTDYL1bM0bjntX1GBhCsFmbKxQOgFy1Jvo5zGahG6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772261425; h=from:from:reply-to:subject:subject: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=PVLubbqJ+3+0hNiLwnR4Xsy8Hy7p/H0Z5rzaKdU+ap4=; b=obOHBMvFT28TdksryLUSpLmyDBFaHp74B16J5Ha0017lnSeyu2m/ru/Kvf6hyrcdZEDkSC VjLmUESLkSfL7xHUH8If3sw11AVwvztej4U1E8fAMP5J9TcTYIQEyGDUnaVT8VvlO/bkj1 VED4+xtzq7Y+isfZG+PF6sbpkM9KwE2A4nT9UN3QYpexiYsU4PFigTpjlqujNIwuX/gVw1 hyxbojA7FFINUti5EbNWDD5ZGEEYrALNmT7J6Id0MfXlVnCJLFU+Yy83DgOmgz/kWEKgdv kxTCEZm2blUgLiNE2Cfy+v+twPnmeX1xOVyDQEITDtKK3HuUIM2uVyghy+K4Cg== Received: from smtpclient.apple (unknown [IPv6:2a02:8109:1101:be00:3cd2:796a:add9:aa81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: tuexen) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fNG6S3hdtzpQW; Sat, 28 Feb 2026 06:50:24 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.400.21\)) Subject: Re: git: 454212b9718b - main - sctp: fix so_proto when peeling off a socket From: Michael Tuexen In-Reply-To: Date: Sat, 28 Feb 2026 07:50:21 +0100 Cc: "Enji Cooper (yaneurabeya)" , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <699ef25d.42e41.7579887f@gitrepo.freebsd.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.3864.400.21) > On 28. Feb 2026, at 02:44, Gleb Smirnoff wrote: >=20 > On Fri, Feb 27, 2026 at 08:11:39AM +0100, Michael Tuexen wrote: > M> >> - so =3D sopeeloff(head); > M> >> + so =3D sopeeloff(head, &sctp_stream_protosw); > M> >=20 > M> > This part of the change broke LINT-NOINET because = sctp_stream_protosw is only defined in the INET case. I didn=E2=80=99t = dig into the SCTP syscalls too far, but I think that the right protocol = needs to be picked per the address family, right? >=20 > btw, I tried to move the function to sctp_syscalls.c and this required = exposing > soattach() and soalloc() outside. After weighting in and out decided = to leave > it the way it is. I tried that also and came to the same conclusion. That is why I added = the parameter to sopeeloff(). Best regards Michael >=20 > --=20 > Gleb Smirnoff From nobody Sat Feb 28 10:03:17 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fNLP11fR0z6TLYd for ; Sat, 28 Feb 2026 10: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fNLP10bNmz43PJ for ; Sat, 28 Feb 2026 10:03:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772272997; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FQt3tvUIsjtSpmuqdo1iyrwdKNXPB8iVSOxu8pNAkWg=; b=gEqMYXOH10g+W7TakONcKHEb0v+JfW3dfmp06E8R3Ebnes/Bjk/SMWsl6q2m8hmVrC0SfB b0vQRh3pIaekHM4eyYCRlf1h58DKoeWx9h/dZGDE1JtHqvJo6y9ocdfpnkxcAJEDDkVF27 FPCjFpdruBG/7KQK5SUs/BEcd2pFNM94S/P5ed7GTOr5mtIhlMu6NTCwrG2veUQcCAM6W2 J6yuALygnpX7lUm96iaT7JcK/FuSlNPg128gg6RExmqSdgcPJ2Gq0H6hGlFDVySg3Npbau sozYWz0rJmKNInMMBbyQN5GlX0ffz/XMQ9ZrADV38ezfDyKSBrMz8al7EpzH8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772272997; a=rsa-sha256; cv=none; b=Cq4/O/kc2RmBOKXhlGfImVKGuoSJmHT6uIAFqLGXY4vzi5zM6aQL/gnj/p8JckxYZFd9yN hZPLCsG9LB2UqXwkrR5SJGbaSod2vPIhFQQrHWPHTzQEffCgiELG0Wp7mswFJdcng855sD RgOJvUiNo7AqHhoHDvfd8TQxAGPJNzjcwCMkosXeXREKxNhtCg3BJO6QmMTMQIjrSJ4MGR 4aMP2WBOli1LExJjj0zkaTAK/alRupKWhD8VwXzIsaxQWp38nGlP025plcHKST0tHDfTei kGkNqrkOn95QfLyJJUsWyPhVc6+Zijv0QxP73V4PmVj+VkAt9LVgu+oQu+S6yA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772272997; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FQt3tvUIsjtSpmuqdo1iyrwdKNXPB8iVSOxu8pNAkWg=; b=TNqb8Ual8JXOZykiTrpxHFag/2uKUwA7nNc86VzTd81TzUH86lzjkzUXAedjI5D5Fr0UeQ rLQmWK6U9ddBAylqmJ0Ogv+wGIpEj7H3TxO2vESiurNavaXUfq/7J8LkazF34Kicg01PJv KKw1bn4vx56tTeFoiyn+8D+u972J2YI/EDujLPvSFdCw4ulXUzCY6IqxZcrPKxAEQUnnyd 62Jd1cIsHFWNdtESjVnwZNDk0ipQIWDAssD4stTL2aGO+Awcfa7MWPel/7WSX46yTse3wo W8pfSuOf8UJ/L727GMd7YvlJ8RrsC33JulfG5/FQ+ulA4/smrhYlkjSbiN2EUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fNLP106rZzyFs for ; Sat, 28 Feb 2026 10:03:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31628 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 28 Feb 2026 10:03:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Philip Paeps Subject: git: d44d79e577ea - main - bsdinstall: remove ftp.at.freebsd.org List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d44d79e577eab3e66b993c783b969b82678792d1 Auto-Submitted: auto-generated Date: Sat, 28 Feb 2026 10:03:17 +0000 Message-Id: <69a2bd65.31628.f92e8be@gitrepo.freebsd.org> The branch main has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=d44d79e577eab3e66b993c783b969b82678792d1 commit d44d79e577eab3e66b993c783b969b82678792d1 Author: Philip Paeps AuthorDate: 2026-02-28 09:56:23 +0000 Commit: Philip Paeps CommitDate: 2026-02-28 09:56:23 +0000 bsdinstall: remove ftp.at.freebsd.org After ~13 years of running the ftp.at.freebsd.org community mirror is shutting down at the end of March. Remove it from the mirrorselect script. Reported by: Klaus P. Ohrhallinger --- usr.sbin/bsdinstall/scripts/mirrorselect | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/mirrorselect b/usr.sbin/bsdinstall/scripts/mirrorselect index 05eff9fee56e..65a662b2df62 100755 --- a/usr.sbin/bsdinstall/scripts/mirrorselect +++ b/usr.sbin/bsdinstall/scripts/mirrorselect @@ -44,7 +44,6 @@ MIRROR=`bsddialog --backtitle "$OSNAME Installer" \ ftp://ftp.freebsd.org "Main Site (GeoDNS, FTP)"\ http://ftp.au.freebsd.org "Australia - IPv6"\ ftp://ftp3.au.freebsd.org "Australia #3"\ - ftp://ftp.at.freebsd.org "Austria - IPv6"\ ftp://ftp2.br.freebsd.org "Brazil #2"\ ftp://ftp3.br.freebsd.org "Brazil #3"\ ftp://ftp.bg.freebsd.org "Bulgaria - IPv6"\ From nobody Sat Feb 28 11:36:25 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fNNSb1nHPz6T3MC for ; Sat, 28 Feb 2026 11:36:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fNNSZ6JxTz4Q9D for ; Sat, 28 Feb 2026 11:36:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772278590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PUq2ZSw6zOlRj0JTzReVJf6LbqLiH+tLv3pwwrC0WGg=; b=WAvv8efE36hyM7kTScroOUBxW4MSyjXpH3LH4U//8rub8nEt231GuLnM9+QfYY5y/2j337 KH4tdH4RDCKM9tG9qc0S1pmbmCekH7NWTe+0yltwxQQvr8j3Pyq4ul0+ASCtyjyl7y4M0s hbhsdit4obJC0aA4YM/VSToLcRUJYlLp7a+kah8B4b0RLtsTaM4B9/DVt61t/2SUroxyhM FvUz6dWS6F2gRUPywd008dQlECcI2+bZcqJLYbQyN78EsrECkYapVybHj7y6Q5MGO8sKBS TJ4iF9ttimoqpJEvX3rtVzY0Y2RWF2oZZQhufbtdr/9JqfGzXTsAOcl+yL0zig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772278590; a=rsa-sha256; cv=none; b=bEYUNLUIaHW8ZgpuBJwL/FEafJdrFJh+fQuqBv69TIgw1DVUo0TwdSQ/iEQfiVsnvDJc52 AXnAQf98tuwdujnkuGgok1LcVrPAQRWnGPIo6lkKewqiLDnnUoYNsvNg2L5681rb77QXiO uKD3WLLH7ptXqb19Lp1TZcc8ofX+9prI80wpnZHgVFohbPsjV6L5HSFcQoWf8NnULIOfpU Th0wOE0JUJYlhYqkqtOo0JIDkGf87KfG1tKJkdB8Bi6CfwLsGHGmZGOhsFeQsN6YiUlmr4 CCRTYpLm9v2TB5it+zn68mil1l4OQl8glzw+PAlWinBzD0Qt2607LZde28K4wA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772278590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PUq2ZSw6zOlRj0JTzReVJf6LbqLiH+tLv3pwwrC0WGg=; b=dptgARE4vUZ/ctKtO0iWs42GxYCgWwUgXc+65IQ2tTn50HUQ+7dxkBTnoNr6epX32SNoqk io7+9WxiImn0ZLO8Tzo+8lqEKJYxOlfyz/EDMVImvF3HYYN1G3vHnjJpOC/eRaqXNFDcTo QOkscwu7yg13jFsFntUOqdbJ1BnklP672oRL1PrTyZHoWs53N5jpmxWD+TJF4Qhn7HsELt hOHdZ5qIbOWiMZqL0IR5g327AAzTVdejVtYyhNPTtRW2UUNQwApnuxlZLmfvG0WXANI3s2 fw+pqm4vn+RX+pND7QzQD+ASix6DX6hh1uqZS7lWv6eVLdJa8ComaaBFgxA1AA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fNNSZ5KMyz11xN for ; Sat, 28 Feb 2026 11:36:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a904 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 28 Feb 2026 11:36:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 32beb3ae71cb - main - vnet: Ensure the space allocated by vnet_data_alloc() is sufficent aligned List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 32beb3ae71cb320dbe4190a01c036943d99083b3 Auto-Submitted: auto-generated Date: Sat, 28 Feb 2026 11:36:25 +0000 Message-Id: <69a2d339.3a904.194fb5c8@gitrepo.freebsd.org> The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=32beb3ae71cb320dbe4190a01c036943d99083b3 commit 32beb3ae71cb320dbe4190a01c036943d99083b3 Author: Zhenlei Huang AuthorDate: 2026-02-28 11:35:42 +0000 Commit: Zhenlei Huang CommitDate: 2026-02-28 11:35:42 +0000 vnet: Ensure the space allocated by vnet_data_alloc() is sufficent aligned Some 32-bit architectures, e.g., armv7, require strict 8-byte alignment while doing atomic 64-bit access. Hence aligning to the pointer type (4-byte alignment) does not meet the requirement on those architectures. Make the space allocated by vnet_data_alloc() sufficent aligned to avoid unaligned access. PR: 265639 Diagnosed by: markj Reviewed by: jhb, markj Co-authored-by: jhb MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D55560 --- sys/net/vnet.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sys/net/vnet.c b/sys/net/vnet.c index a2b827052dd3..5ef68d11227a 100644 --- a/sys/net/vnet.c +++ b/sys/net/vnet.c @@ -171,11 +171,17 @@ static MALLOC_DEFINE(M_VNET_DATA, "vnet_data", "VNET data"); #define VNET_MODMIN (8 * PAGE_SIZE) #define VNET_SIZE roundup2(VNET_BYTES, PAGE_SIZE) +/* + * Ensure space allocated by vnet_data_alloc() is suitably aligned for any + * object. + */ +#define VNET_DATAALIGN _Alignof(__max_align_t) + /* * Space to store virtualized global variables from loadable kernel modules, * and the free list to manage it. */ -VNET_DEFINE_STATIC(char, modspace[VNET_MODMIN] __aligned(__alignof(void *))); +VNET_DEFINE_STATIC(char, modspace[VNET_MODMIN] __aligned(VNET_DATAALIGN)); /* * A copy of the initial values of all virtualized global variables. @@ -385,7 +391,7 @@ vnet_data_alloc(int size) void *s; s = NULL; - size = roundup2(size, sizeof(void *)); + size = roundup2(size, VNET_DATAALIGN); sx_xlock(&vnet_data_free_lock); TAILQ_FOREACH(df, &vnet_data_free_head, vnd_link) { if (df->vnd_len < size) @@ -403,6 +409,8 @@ vnet_data_alloc(int size) } sx_xunlock(&vnet_data_free_lock); + KASSERT(((uintptr_t)s & (VNET_DATAALIGN - 1)) == 0, + ("unaligned vnet alloc %p", s)); return (s); } @@ -417,7 +425,7 @@ vnet_data_free(void *start_arg, int size) uintptr_t start; uintptr_t end; - size = roundup2(size, sizeof(void *)); + size = roundup2(size, VNET_DATAALIGN); start = (uintptr_t)start_arg; end = start + size; /* From nobody Sat Feb 28 13:24:11 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fNQrx3W1Hz6TGnP; Sat, 28 Feb 2026 13:24:17 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fNQrx2Z7Yz3MDQ; Sat, 28 Feb 2026 13:24:17 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772285057; h=from:from:reply-to:subject:subject: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=wpJI+f1aFO6FsVmrtderoWJwmhAd/loNseBP28Rc9tY=; b=VoXT0zl5yiymNVzG5dZt0CHHNNGAxh5x5muRtEc7j6JA4qtFgxveKKAN/9wBe0QV55IA6j 0fmGN6smi7xHC+zBuv952+tpg8Z9jgBkJkBmF6I7yLSskl1V4PaTlhHffHYn6R7vG3hGKv 2G2x8kkFImyKZ9SzgkyqFua/CS6UD2Fk+HV6XYC8j9lzCtZAegxlAOYSQgngYnd57LcUtp ZMlr69Acnbe2YHT/fsZN9JZdaciTlaZvlPBJMSKgaS2CBSROtgImyswyooq7t4GEcS1alK nWebVQbnQMcgqUaK7lPBJRcwA+LsSgsTqo1xJx/5UdGqLADMz8U4iCDwBsg8BA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772285057; a=rsa-sha256; cv=none; b=qRcisIf9HEm28uzACVUqWnnNNj1Ap8fMCyCOW+69GcllXMjllZRQxBwICF/p92j78xn7z/ Shw5jAuzKh37lad9t9USyG662odrAd0Y2RGjpPOQd/NdmaawiWozPa9iXCuIikQF15pNOK 8cHLyyhPt8PKvY4q5+/f0nVpaCH1Ep4fyBeQMt3LXnWfCVvGVIZm6/3MLuhskrlq5xr1Dw rYbQTQoFDKTIdAbGrNTJjzHYxaBN/HC1hJhLlsUNMOEHfbf/CMRT2CZ3T8kvaKyIvZEGV2 mx4l/6ksHFdToUBu/HZ4su+SdF+603lx2mdCUc3xovaeJsNPKDHecJWxkF28mQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772285057; h=from:from:reply-to:subject:subject: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=wpJI+f1aFO6FsVmrtderoWJwmhAd/loNseBP28Rc9tY=; b=h9Dy5hehxeryA5+S9jw2VNeCAqpD70EX8/Npy0mm0eM78cREOSe6ddWO7k/3VPIhhWag1t D2pnpwaDfTFY113fDsOxUwSSv9ljXiw/Sr+WzOWQRTwLs4LsVUqCSafmhXlSbzOzra2piD et32UW2yXpOAca9hExpmBN2O6Hir9OfCbE1jBc0Am7/nsFjy2GuZ9hVKq4HuZrPdo2z2lz Md1Ez60/z4cqz5WKULgHmhUd5s5eLL+4uEJ5koxAM77le4m4wARbdwlHJwUydK/yvnmEPd J5RgMC/ypKO0QIQkd8/4e4GNTFwbdUjwp1W+X3mCz8fCudyscu4jyvaC4TcxhQ== Received: from ltc.des.dev (2a01cb0585090500922e16fffef1acef.ipv6.abo.wanadoo.fr [IPv6:2a01:cb05:8509:500:922e:16ff:fef1:acef]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fNQrx1TnrzxQV; Sat, 28 Feb 2026 13:24:17 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 1B730F7351; Sat, 28 Feb 2026 14:24:11 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Enji Cooper Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 1f2f5eba24aa - main - asmc(4): pull 32-bit support for the driver In-Reply-To: <69a1f40e.1eb9e.56768185@gitrepo.freebsd.org> (Enji Cooper's message of "Fri, 27 Feb 2026 19:44:14 +0000") References: <69a1f40e.1eb9e.56768185@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Sat, 28 Feb 2026 14:24:11 +0100 Message-ID: <86y0kdngqs.fsf@ltc.des.dev> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Enji Cooper writes: > commit 1f2f5eba24aa53e180a4eb46b772410e5a782469 > Author: Enji Cooper > AuthorDate: 2026-01-05 03:36:55 +0000 > Commit: Enji Cooper > CommitDate: 2026-02-27 19:44:08 +0000 > > asmc(4): pull 32-bit support for the driver >=20=20=20=20=20 > The asmc(4) driver should work for 32-bit Intel-based Macs, in theory= , if > the model details were added to the detection list. That being said, > 32-bit Intel Macs were only released and available to the general pub= lic > for 8 months [1], so the value in maintaining i386 support in the dri= ver is > reduced due to limited hardware access. >=20=20=20=20=20 > Remove 32-bit support for the driver officially to make it clear its = use is > not supported. >=20=20=20=20=20 > This should fix building `NOTES.i386` by proxy as well. >=20=20=20=20=20 > Relnotes: yes > MFC after: 2 weeks > Fixes: f224591746b ("Add ASMC_DEBUG make option") > Fixes: 8342d9f7b5f ("asmc(4): Stop building it on i386, as..= .") > Differential Revision: https://reviews.freebsd.org/D55544 Please remember that the bugs this fixes have already been merged to stable/15 and stable/14. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Sat Feb 28 14:02:47 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fNRjM6vytz6TMMT for ; Sat, 28 Feb 2026 14:02:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fNRjM5yZ8z3Qgs for ; Sat, 28 Feb 2026 14:02:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772287367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u5H7lJzz21eQvWZQpD/mDyCZaphz9gGQMZl+4v0z9Kw=; b=AwmZ1JRaOdnKj8Edcz8ah4BYCjxCAgU94osMGgrvB3VHfj2tkZCBaV3t9T5mJq+EmdobyU vF/gjfSEpLnslkc+anK9colbZSnPRuFYmCaK9dNTe6EaEBcPgBJy6SAm81CSFaZFcpo/+b RkHqo2WZwATOEopiWi9Q4MKVl8rw79fRAOjDBF/Zn6YOSooefe45Ue7URrpkFxTijnNa2L 5dulWdeLrloqkFsr6+SGKrG+xCEeGKYSBPIBELkbeGRjbgTmj7tAeF72oix7sVIQrQuysb nvhxtjvlJq1SHb/NdwD9wv/BccADL6Q4BUYI/wcqGDdfl4LL/gjzoZ9hS8OgEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772287367; a=rsa-sha256; cv=none; b=lKO1JONl2czIcnbnNcl7qCfJH1lD712jYtfdg3eN8aWCCydsJ5T/JETf3nbvsdkJL3z02Y XffibO2ZVQVfA99TKLJ2XJNbjEaqu9dGENfeWH7a73SDpHcrftaoJjdGWpfyXgOxXcdN1g qysVaR5nN/GgDJWBZzB2vXqfHnIt2twmuzVemAjPOXiRHsqCSQ6RR9V9M1P2a+orTEn+Xg XpLxy0/Os1YXaweLxBZJc3Kh+jl8NNmxC6FU/HOaj2sJSJ31lIVjch6IDpYcgzIHMhAbsU LcM7edhN4lAxJYAhH0Lb+hbPe8Ly1T/JbEKPa/jjkbV6OB/BReyNjGgk9t0qGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772287367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u5H7lJzz21eQvWZQpD/mDyCZaphz9gGQMZl+4v0z9Kw=; b=lLA8xwon1HQvSJt/mM3iNEjgekrLAC6e6oAgNouO8/n9m0JdJ5bfn9L6lh0geJK/4LGvve 61YZ0ypFXlZu5tr5g1zfGSgODqwYOAaRnOvbxx66lahE6HMAw0yKWEfu4Z9+2hSPoc6NaT sqmRcxZvtwLZ7rAibU/ZjPJctoO/+fW70IGUzdTHDdM8GF/KL6DH91oca3mhVP0oG+hRFN 8U3QsGAZGZuQCfDGxQnAYu9hTh5hnMePMkLIgWIpcv/C7GHLdZWE1TMO4qn4Md7cHE1xLZ RBBYMKOUlgZex9feDfekfPRtMsIRa38q51dWRL2Mh5qoXbWcVPgJYB4f4XHWqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fNRjM5J7Qz14qX for ; Sat, 28 Feb 2026 14:02:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2247a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 28 Feb 2026 14:02:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: a9f454a9c798 - stable/15 - sound: Detect unsupported formats List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a9f454a9c79810d60261d03dbec73c29396bf128 Auto-Submitted: auto-generated Date: Sat, 28 Feb 2026 14:02:47 +0000 Message-Id: <69a2f587.2247a.16865864@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=a9f454a9c79810d60261d03dbec73c29396bf128 commit a9f454a9c79810d60261d03dbec73c29396bf128 Author: Christos Margiolis AuthorDate: 2026-02-21 11:36:58 +0000 Commit: Christos Margiolis CommitDate: 2026-02-28 14:02:39 +0000 sound: Detect unsupported formats This way we can avoid edge-cases like 8af6aee96ed609456900c6dd92dafabac5e89c0a ("virtual_oss(8): Remove floating point formats from preference list"). Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D55403 (cherry picked from commit 3deae7b786743193531f4e69527e789de52644c5) --- sys/dev/sound/pcm/channel.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 011dc1427c2e..b74f76fd21ca 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -2092,9 +2092,23 @@ chn_setspeed(struct pcm_channel *c, uint32_t speed) int chn_setformat(struct pcm_channel *c, uint32_t format) { - uint32_t oldformat, oldspeed; + uint32_t oldformat, oldspeed, x; int ret; + /* + * Detect unsupported formats. This checks if the format is supported + * in the first place, and that no more than 1 format is specified at + * the same time. + */ + x = format & AFMT_CONVERTIBLE; + if ((x & (x - 1)) != 0) { + if (snd_verbose > 3) { + device_printf(c->dev, "%s(): Unsupported format: " + "0x%08x\n", __func__, format); + } + return (EINVAL); + } + /* XXX force stereo */ if ((format & AFMT_PASSTHROUGH) && AFMT_CHANNEL(format) < 2) { format = SND_FORMAT(format, AFMT_PASSTHROUGH_CHANNEL, From nobody Sat Feb 28 16:56:14 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fNWYc0rSpz6Thg0 for ; Sat, 28 Feb 2026 16: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fNWYb6Fhbz3nmG for ; Sat, 28 Feb 2026 16: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=1772297779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xo6hGX3dgiCj9+WmixsmxNCZ4+s/XSjrKSFg2N5JNU4=; b=fNABxcJyD57vmD0/SkSsYaYxQ1LOOcLwGjMN18RZBtVR/TFCtBXKACuX5P1cJdsTWbpzPA 8TvAq3AzoHeSzw5jRwlvVh0X0Qn8YL0Gd8KttH/T1vSE6Y9IoQkOWQOxpb5aRIn8lJEmdv JiXbMZ4vb7y77eG7Zb1vuxwsGvT8IWmjoVFui3RrukRbr81I47/obn+s3SboLoBEf/smAH TQJdxs40OCy6G4JIofJVdJ3BFttRXHYRyOhmUsKAmMIx6aRpE3jtblpFOKaiSNdhG1OR8Z Z5DK2H8/Ongt5C8LhMHW6zfoO4BWhslej05sOZdg/igJ/tYXcvLuvxMwbF32Ew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772297779; a=rsa-sha256; cv=none; b=Tm0avssXHa9dZ2Jh7htlnqD1M8RYnQjO743zYxnXI4ui9vz+3tsr09lmqtA194TB0R85z9 VvdJDXq1Cn2y2fu1fL1AsrncjUWgao+KVt7HDHHbdupahn4Y2mr5EDL2CRmzPnkBg9SPnH dwJeY3e06Xcg30OCjsR7YI0XSyxGEq6emdbuyw7kU2tUPpbhrxYbBKPp3BDb/95i17MDDa ZUSclUVzjflUv94bEINZv4tX+hOp56vD1I/KuTuSjl7pn64nDkoFASOFUI13CC9Owb4Fqx xmrZbluf2dqBTjt8a2puKJelte7x9JxG/YMKaLOfJUuOuPtXwotFdZ8nvRpTRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772297779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xo6hGX3dgiCj9+WmixsmxNCZ4+s/XSjrKSFg2N5JNU4=; b=iEY5nlapY7VcWSvhx/e9D+x/+Tp8EZjbOPkVoNWq5s/ShULIHp+7rEFjyojvPCrHRzqQhp pDbVaLccRLTKskudtDRW1sFFXzOQKAmSt7tpVlbGzOuChs8BCH0OdkoDOT/Sw7Ju8oUwfD 3GWi22334mfsFtWAQrdNcCVJwA3vBpN1F+6Qpkf63xSuz/FsmLeRHKJcJ5ZyReI9ts5oP5 PCBSPQoCxYO1qaQCYrWzxW3DpZr86MeF0upBbd8NNccDx0Mda3yJ/yWDLJp8OC8mgTWMXy 1sz9BRplbBEkLRMu8NEsgd9aUK5Q0gSJhp5Xgkyb9YV+qtgf7MuD4gxPnoF0lw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fNWYb5mxyz19qy for ; Sat, 28 Feb 2026 16:56:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c9c9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 28 Feb 2026 16:56:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: df5014f71cff - main - nuageinit.7: Fix a couple of minor errors List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df5014f71cff2c02f46afa8823370d7f61494bdb Auto-Submitted: auto-generated Date: Sat, 28 Feb 2026 16:56:14 +0000 Message-Id: <69a31e2e.3c9c9.56232d08@gitrepo.freebsd.org> The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=df5014f71cff2c02f46afa8823370d7f61494bdb commit df5014f71cff2c02f46afa8823370d7f61494bdb Author: Navdeep Parhar AuthorDate: 2026-02-26 23:01:47 +0000 Commit: Navdeep Parhar CommitDate: 2026-02-28 16:52:40 +0000 nuageinit.7: Fix a couple of minor errors Use the correct key name in the chpasswd section. Remove a stray line to fix the description of 'password'. MFC after: 1 week Sponsored by: Chelsio Communications Reviewed by: maxim Differential Revision: https://reviews.freebsd.org/D55547 --- libexec/nuageinit/nuageinit.7 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libexec/nuageinit/nuageinit.7 b/libexec/nuageinit/nuageinit.7 index 35e1d6024105..9651abba868f 100644 --- a/libexec/nuageinit/nuageinit.7 +++ b/libexec/nuageinit/nuageinit.7 @@ -3,7 +3,7 @@ .\" Copyright (c) 2025 Baptiste Daroussin .\" Copyright (c) 2025 Jesús Daniel Colmenares Oviedo .\" -.Dd January 6, 2026 +.Dd February 26, 2026 .Dt NUAGEINIT 7 .Os .Sh NAME @@ -340,11 +340,10 @@ Boolean to force the user to change their password on first login. .It Ic users An array of objects: .Bl -tag -width "password" -.It Ic user +.It Ic name Specify the user whose password will be changed. .It Ic password Specify a text line with the new password or -specify the user whose password will be changed. .Qq Cm RANDOM to assign the password randomly. If the textline starts with From nobody Sat Feb 28 18:11:37 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fNYDT2ZCWz6TqhF for ; Sat, 28 Feb 2026 18:11:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fNYDT1B9fz400F for ; Sat, 28 Feb 2026 18:11:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772302297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IJ/rX1AUtAT3m+ukRsBqjAFABPyWYm2uQwFMs51/iTY=; b=GMO+i98UwccCWh8FvPEHR2M8UydP/08gMUrQL3wrCdgbZifWZCqaQOtkWy11z8Ja8KMDV5 l/DnH+g9Y1KUGa7frjoh7qsfBEWtGUh4XGrGKRmhGXWoB5rCq3lPn2ltDIku/XVfPTot9u nE4NDrD4NZQn1mCgotegxw8Ffe5evuoS4JqQ6JtSGqxvRb7xuow3lG/viVGQ7NRDFjOU0K 65DEt+swBCBG6wtMwmNmevbOtv8rzSuAE9bgWL6Q05Nlf9LzcfUO6d6zFRiFrTu+mc2MKi sGJOuFkl93WeZW8oR1DoctmVbpGvYqHGGUluk8jFv+c3aOACVNmXws5f5V+s2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772302297; a=rsa-sha256; cv=none; b=WdTeG5wkpkdMnARHZWkRzLu0c4Z5Cz3T40pNPMebSclOW+vHdw+i2KN9GIcoIefFiey+A5 94oaxQpgKs7A80tRe5i1nIl6rdVRK/EWhoPTD+V16JKs2sIHe/QC3+NoVDKMhBZbjml4B3 3q8kZrb7wmfFCPc3Z+U/XmSrNT/oB5g66D5vw9XoXBTQ4UY4di9UsM7DN4VjpEVn+aOTti Bhc0mj07EQQDLQ7HClsreS71aRWEkpzC1bBdEruk1wP6giEC9Cl3TIumhCG6Y6bzKf0Z6z pZ+yW2QTSKhwCNJtXdAaL8ehc+BwS9GWeFrczmMrVVWUdzoeM18RuLxdNNLing== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772302297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IJ/rX1AUtAT3m+ukRsBqjAFABPyWYm2uQwFMs51/iTY=; b=KN+G4mZH/eiq9d6MJbf5MOI7XHGeG9xXi1Ocejs8Ezcdcad6MAZGH3a43t2oafQs+lbCiN 1ooJuke0ktMmRbIXBW/pOdrUqAuwE7sKxGEWoi5JQD524gBrjqtqp7iuy0risqbufg1nV8 TSZka1hSJeISLiOBvv5i2czWUmzDU/MvpkfYVSVAsWpDtYtsWQJilB6spzK2/WcRiNPy0e QmpjEpqG121PnkfXCjkJg+GvIHvZQ4Bde4LZz27iRPtqS7Nvf3STLQysJ0OqAE4fWW7Ly6 n9iP5egZt+Ay8e9DUBn+vlGTNu6zG4uc8LvrXamq+AIWVRYsik7BucbVUwtivQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fNYDT0Wr4z1ClY for ; Sat, 28 Feb 2026 18:11:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 43d40 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 28 Feb 2026 18:11:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 05ca4837a3e9 - main - libiscsiutil: Record dependency on libmd List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 05ca4837a3e9a413aabcf005abb14fff35088476 Auto-Submitted: auto-generated Date: Sat, 28 Feb 2026 18:11:37 +0000 Message-Id: <69a32fd9.43d40.521522d1@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=05ca4837a3e9a413aabcf005abb14fff35088476 commit 05ca4837a3e9a413aabcf005abb14fff35088476 Author: Dag-Erling Smørgrav AuthorDate: 2026-02-28 18:11:10 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-28 18:11:10 +0000 libiscsiutil: Record dependency on libmd MFC after: 3 days Fixes: 6378393308bc ("Add an internal libiscsiutil library.") Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D55596 --- lib/libiscsiutil/Makefile | 2 +- share/mk/src.libnames.mk | 1 + usr.sbin/ctld/Makefile | 2 +- usr.sbin/iscsid/Makefile | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/libiscsiutil/Makefile b/lib/libiscsiutil/Makefile index d9762302fd40..d34ffd83aaed 100644 --- a/lib/libiscsiutil/Makefile +++ b/lib/libiscsiutil/Makefile @@ -2,8 +2,8 @@ LIB= iscsiutil INTERNALLIB= INCS= libiscsiutil.h - SRCS= chap.c connection.c keys.c log.c pdu.c text.c utils.c CFLAGS+= -I${SRCTOP}/sys/dev/iscsi +LIBADD= md .include diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 2d451fcdbc1a..75a857ba2cff 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -501,6 +501,7 @@ _DP_netmap= _DP_ifconfig= m _DP_pfctl= nv _DP_krb5ss= edit +_DP_iscsiutil= md # OFED support .if ${MK_OFED} != "no" diff --git a/usr.sbin/ctld/Makefile b/usr.sbin/ctld/Makefile index 61efe8a05cfb..097e6c6f89b1 100644 --- a/usr.sbin/ctld/Makefile +++ b/usr.sbin/ctld/Makefile @@ -20,7 +20,7 @@ NO_WCAST_ALIGN= CXXWARNFLAGS.gcc= -Wno-shadow MAN= ctld.8 ctl.conf.5 -LIBADD= bsdxml iscsiutil nvmf md sbuf util ucl m nv util++ +LIBADD= bsdxml iscsiutil nvmf sbuf util ucl m nv util++ YFLAGS+= -v CLEANFILES= y.tab.c y.tab.h y.output diff --git a/usr.sbin/iscsid/Makefile b/usr.sbin/iscsid/Makefile index 4403e796f89d..650096d137e7 100644 --- a/usr.sbin/iscsid/Makefile +++ b/usr.sbin/iscsid/Makefile @@ -8,6 +8,6 @@ CFLAGS+= -I${SRCTOP}/lib/libiscsiutil CFLAGS+= -DICL_KERNEL_PROXY MAN= iscsid.8 -LIBADD= iscsiutil md util +LIBADD= iscsiutil util .include From nobody Sat Feb 28 18:15:49 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fNYKR478yz6TrFQ for ; Sat, 28 Feb 2026 18:15:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fNYKR0Sc5z40tB for ; Sat, 28 Feb 2026 18:15:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772302555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S+1Z36BYOEwpcVBJn05AqdyUwndbEK9haGyXuVfWlNA=; b=hc3AtXCZsMZF/vl1bfZ+GfzWhDeV20kGSNuMvcS1CsxxjZpDav4S//cDtn0hSdE+1p4XLk 0lnkxfapnyRUeNU2haWtxTsPEuvF92foEKcHhYd0S/fCk/zADqYceNEyrbTOPdr7QzsG58 ClJfNJTWHB6/QGbbqj1jNyaIZlbLa8sVSE03rNMvBL/rY04EB4wpsFnrNIYA4ImS/qVNr0 btiKleK14XMRx5ZTJG8lHaU0kwvSz9NTHqi3QUEx16C/96NGDTEh7Ml/IwQ90/3PGVPM5u NG0GtewUHBsop0tMXnW5w4S/ZBPRnYsRBOvC6NzjOBRXAzd9aTnIjDYRbEgLJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772302555; a=rsa-sha256; cv=none; b=L89Cyga038ZWsby+/o5lmfDO6RSjVnqTFaLXFxZmwZr5DFmAFjiwhUL55yhhye1VNke73U uA0+jKcGCN/oVBge1i/CmvXfRWqqoC5PLNKIOB7lWU6XNEMK5Heem+y20VvGQKs5SjAzOc qESW95STS7TKP7oQrzyFEMX2sF6InVNKCiSDfif0Xus0COw2a3OVPJvziyMB+/L65GvfxM x5EDbk92c5nudFkezguNBgGecT7bxx7NOpS7C1VzCshN09rxtuI28zo+qsUYuYhTRY5OWt esnUN4/a96Fcel1L/eTQffQfWI1Nl/jvloH+aN4Qs2SXi02sApk931rfbuUFxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772302555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S+1Z36BYOEwpcVBJn05AqdyUwndbEK9haGyXuVfWlNA=; b=raxfcNvMEHQclfgbIFCkkgjHkkr24pKwQ45NH7QDAsFmsvpK2CTlbfwd+cFbFkJbZhKSnf gsEoobHyXAUwn7zavJ6CBTkaXnV0Gj3X1KkOFRGzVNGhz1MxhRQiHQ7x+ATRV9H6u01w7i AHOjOdYjwVBw8Xz4FgpZzHlovq1mJp10wlAaTPBE6AIVh3N6Re9Ndn0T7EWVQlT5LG5Q3V FRGrAJiNzMFqfGdFe/H8C/eNFtIIcDZ+0NG0YPX/U/65RKFONxaYaap120UWfLpWnWpv+s 0RCSctAi35JSUI+HD9ICLs2G3iJAF7PwfJkqEQLv7bsA+ddjqiOn0tsKgpcSdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fNYKQ6qN3z1CrM for ; Sat, 28 Feb 2026 18:15:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 44fd2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 28 Feb 2026 18:15:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: c2dee7786bf3 - main - diff3: Code cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c2dee7786bf32cb66cedec226e42e79e06457c51 Auto-Submitted: auto-generated Date: Sat, 28 Feb 2026 18:15:49 +0000 Message-Id: <69a330d5.44fd2.56809847@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c2dee7786bf32cb66cedec226e42e79e06457c51 commit c2dee7786bf32cb66cedec226e42e79e06457c51 Author: Dag-Erling Smørgrav AuthorDate: 2026-02-28 18:15:23 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-28 18:15:23 +0000 diff3: Code cleanup * Order includes. * Turn the diff type into an enum. * Turn an unreachable error message into an assertion. * Remove unused debugging code. * Remove some dead assignments. * Consistently use 1 instead of EXIT_FAILURE. * Turn a return from main() into an exit(). MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D55517 --- usr.bin/diff3/diff3.c | 48 +++++++++++++++++++----------------------------- 1 file changed, 19 insertions(+), 29 deletions(-) diff --git a/usr.bin/diff3/diff3.c b/usr.bin/diff3/diff3.c index 9a01951e60ab..c33e3275d006 100644 --- a/usr.bin/diff3/diff3.c +++ b/usr.bin/diff3/diff3.c @@ -62,19 +62,20 @@ * SUCH DAMAGE. */ +#include #include #include -#include #include +#include #include #include #include #include +#include +#include #include #include -#include -#include #include #include @@ -87,14 +88,15 @@ struct range { int to; }; +enum difftype { + DIFF_NONE, + DIFF_TYPE1, + DIFF_TYPE2, + DIFF_TYPE3, +}; + struct diff { -#define DIFF_TYPE1 1 -#define DIFF_TYPE2 2 -#define DIFF_TYPE3 3 - int type; -#if DEBUG - char *line; -#endif /* DEBUG */ + enum difftype type; /* Ranges as lines */ struct range old; @@ -137,7 +139,7 @@ static const char *newmark = ">>>>>>>"; static const char *divider = "======="; static bool duplicate(struct range *, struct range *); -static int edit(struct diff *, bool, int, int); +static int edit(struct diff *, bool, int, enum difftype); static char *getchange(FILE *); static char *get_line(FILE *, size_t *); static int readin(int fd, struct diff **); @@ -256,9 +258,6 @@ readin(int fd, struct diff **dd) for (i = 0; (p = getchange(f)) != NULL; i++) { if ((size_t)i >= szchanges - 1) increase(); -#if DEBUG - (*dd)[i].line = strdup(p); -#endif /* DEBUG */ a = b = strtoi(p, &p); if (*p == ',') @@ -565,7 +564,7 @@ skip(int i, int from, const char *pr) for (n = 0; cline[i] < from - 1; n += j) { if ((line = get_line(fp[i], &j)) == NULL) - errx(EXIT_FAILURE, "logic error"); + errx(1, "logic error"); if (pr != NULL) printf("%s%s", Tflag == 1 ? "\t" : pr, line); cline[i]++; @@ -596,7 +595,7 @@ duplicate(struct range *r1, struct range *r2) if (c == -1 && d == -1) break; if (c == -1 || d == -1) - errx(EXIT_FAILURE, "logic error"); + errx(1, "logic error"); nchar++; if (c != d) { repos(nchar); @@ -621,7 +620,7 @@ repos(int nchar) * collect an editing script for later regurgitation */ static int -edit(struct diff *diff, bool dup, int j, int difftype) +edit(struct diff *diff, bool dup, int j, enum difftype difftype) { if (!(eflag == EFLAG_UNMERGED || (!dup && eflag == EFLAG_OVERLAP ) || @@ -634,10 +633,6 @@ edit(struct diff *diff, bool dup, int j, int difftype) overlapcnt++; de[j].type = difftype; -#if DEBUG - de[j].line = strdup(diff->line); -#endif /* DEBUG */ - de[j].old.from = diff->old.from; de[j].old.to = diff->old.to; de[j].new.from = diff->new.from; @@ -657,7 +652,7 @@ printrange(FILE *p, struct range *r) return; if (r->from > r->to) - errx(EXIT_FAILURE, "invalid print range"); + errx(1, "invalid print range"); /* * XXX-THJ: We read through all of the file for each range printed. @@ -872,8 +867,7 @@ mergescript(int i, int f1f3delta) } break; default: - printf("Error: Unhandled diff type - exiting\n"); - exit(EXIT_FAILURE); + __assert_unreachable(); } if (de[n].type == DIFF_TYPE2) @@ -886,11 +880,7 @@ mergescript(int i, int f1f3delta) * Print from the final range to the end of 'myfile'. Any deletions or * additions to this file should have been handled by now. */ - new = &de[n-1].new; - old = &de[n-1].old; - r.from -= f1f3delta; - r.to = INT_MAX; printrange(fp[2], &r); exit(overlapcnt > 0); @@ -1109,5 +1099,5 @@ main(int argc, char **argv) merge(m, n); - return (EXIT_SUCCESS); + exit(0); } From nobody Sun Mar 1 01:20:11 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fNkkz5QvSz6Sk39 for ; Sun, 01 Mar 2026 01:20:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fNkkz4vzDz3lxQ for ; Sun, 01 Mar 2026 01:20:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772328011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9NqjHrg8a3TxIu96sEAUxIn+fqkLpTSTkA8cfg4mFtk=; b=VQJteRDSHCX3cwSaFv51b4PbsIRcNfaozrnrFBr9lW0zbJOxrktK9tukMPVneshs/Kv+K7 WsDCfxPDfFg1MnUH7eop8SjhIjJk6H4zYisZsuDiDMs/3SAnX0UrqO3oy7URb12q6uCi+e tf5kJECSVCTSalkZwd+pJTlEFwSFe97Qb4HwJbW+IUfFLfyMaoSKkoOezQpODORsb+t0Zi 18CTd89TsgkW7MlraPfebEx33MCBIGk8tDMxhiWBXNhSNmtLV7ChjVRKfK51tYS9ftQmSK pjNbU7KsKkgVDAY9G/YFseeZ4nYKNt9hx5Aa5tmRPe+rejZWtdgJ8b+Bzi1JMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772328011; a=rsa-sha256; cv=none; b=ARAl0E0BRYg5HzdnU5kPry2xDWo4sjFY0uGyVgPsFa+aUVaLCBrCy7VAkrdavXJ+F2Uoaz fGJEbRJ2vXEbkeRksOV6HMJcSZdIrnda9sIYOt5xXl+nob61iZ1/BFt1NvLkZokQgJ/Xzh 8+ehKfvOnM7W4VPzT7CnlDmzLkMaXrT7fiuMrq5LAQNfKzpY9TAeIZzeBD9tCAx/2mp6Z5 dxXEiCGwo/FUZmXhcnYwaJXPGqmGOAeOFc+pNdv5GdlH2S2YfMKj3MGmKpCzyZbudVN4op h+2mj5z5q7fHGg6TdXJbOJGuxDMzTd0AYI4dPrEvdnEZAN04fXC7D4XFVnxcFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772328011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9NqjHrg8a3TxIu96sEAUxIn+fqkLpTSTkA8cfg4mFtk=; b=hwVJZGv6qnSb7u6KUxwEp1hjKCZZdYYLhzNcbz949xHi20YpjeF8TOmv+6ckGfWyPPWYdc nvCt9L0MeHyQQl4FNvmNcmgKm2uugLrWAxNPuAqIzXyhHSinHDWfQ1thg/F1t5dXjgbGU1 Fv/KCcA7fqJQieaXCS9P5V89805G1jvWtCvWj7zEcFepvyYHo1w+rIKUs7kxeeTnABTQPu 8db1l3UTBU0pysQHt5haO9BTQ9rCfHray6P+pK3qUbrUU4lN/p2P3pK4g62U9gJKDeGZYz KR5tmdMwDnbL0Y2v+dbt2ppFQyr8+gVZMuHoNsVCS0WMtfey+tHglhcH1AiDmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fNkkz3xCrzCJX for ; Sun, 01 Mar 2026 01:20:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 185c4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 01 Mar 2026 01:20:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 6099b4600256 - main - amd64 initializecpu(): use 64bit type for rcr4() result List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6099b4600256552fc6f664c82b7dd0325a4b5b19 Auto-Submitted: auto-generated Date: Sun, 01 Mar 2026 01:20:11 +0000 Message-Id: <69a3944b.185c4.37a3fbe0@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6099b4600256552fc6f664c82b7dd0325a4b5b19 commit 6099b4600256552fc6f664c82b7dd0325a4b5b19 Author: Konstantin Belousov AuthorDate: 2026-03-01 01:00:28 +0000 Commit: Konstantin Belousov CommitDate: 2026-03-01 01:19:53 +0000 amd64 initializecpu(): use 64bit type for rcr4() result Right now %cr4 defined bits fit into the low word, but this is not true with FRED. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/amd64/amd64/initcpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/amd64/initcpu.c b/sys/amd64/amd64/initcpu.c index 4c57c27596ad..7161cf631508 100644 --- a/sys/amd64/amd64/initcpu.c +++ b/sys/amd64/amd64/initcpu.c @@ -276,7 +276,7 @@ void initializecpu(void) { uint64_t msr; - uint32_t cr4; + uint64_t cr4; TSENTER(); cr4 = rcr4(); From nobody Sun Mar 1 03:24:16 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fNnV84ccsz6SvLY for ; Sun, 01 Mar 2026 03: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fNnV83b8sz43FS for ; Sun, 01 Mar 2026 03: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=1772335456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5kUKXU2ACmU6HPlHy9aPVctLl/icUXPu655uVkzrOk0=; b=RTq3in886MBa28NO7MSVLhhbZVsAB3HtL7i7QOQP2+XK6gVgTo4qDio118AT8X5sa+BAGU kQD2qiicM6PzL0mm9TF2CGG/JIMMRtEQGeKxWuBx1+YuIy+CGNQgdbj6pubZOAm1l1F0KP EqAqmDHIAoiK8BTKtHGrUs6AcjLIlXW1A0iNVRP5gBGyRJgr9+4ivwtpyRQRq1L8M4IrN/ 44sn7RxRGKhLQOhJihuKu1+4sgILqAUAhnsO8pxFpz8Bm+S486bRRUg1cOxjagQNRzgMrK UYKAoltVB3o2pqzyqRPjC18bANKY609o6606SVRJu93IIVVgtRYnXmoZg+35CA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772335456; a=rsa-sha256; cv=none; b=jKJs0hV7AfBzie650DxxaAv3eslh+I0JxKOE3jee9egCZHkk0gxWUrsje14XD9/Sr1A3Oc 2h84j/bM3TZPxzfcAsSryycEHKu3nznP/uazDrlSVSGWxOFiIcQFQNgH3t3KNGnMI50N+G qbp8+75p2PxdygeaEgQkEvWMEgFcbnaQvgwEgldwPjATAlPxLyYLk9EIN0eZW53besvXka +Tg4+b8cS65EU+D+qUqM/FHCBTI+sCXqYEU0Zgbt/1kx1gg0Som5nPQiqh6AW4yO/RHtMY nKGLQs2phrItWYIMAK/7P7fUxT9B8t7GAn8/gDtYjEVSxiH0RRm9OzCFeLgnAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772335456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5kUKXU2ACmU6HPlHy9aPVctLl/icUXPu655uVkzrOk0=; b=tHLtU8vBkBK1UkP9NbnE7bJOlCEQE5CGApStLwdpiQrS8CvYHctyh0KUlOCzwfs5mKa3Wy 4OBxDIIU12GjxO/g56012wsBG3QamPiZUNETrsn7jhOwRgcjNE+xWlIcniNYku+5hAS7R4 m4fFakKtT6T6cAUjIdsjk299p141B/LgjSMHtS8eCmLSUOZQpbndGq9aoP2iPkPgPF/Z1J oM6k2B+RoYrJq69t8Lm5x8IZmynLfg6DtL2jus5NBfKMQ/xHuHt73x+qARU0Cad2t9faVu 4pxYRYiSRQX6eyFir0JID5WsXxaQNSGkbIxl6EMdMpsMFfEjfvelxp9VejXYNQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fNnV839vmzX2F for ; Sun, 01 Mar 2026 03:24:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 264d7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 01 Mar 2026 03:24:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 6da9d465c54b - main - bhyveload: simplify cb_open() and eliminate minor TOCTOU List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6da9d465c54bf2e3496e83db025c5d22f3b3cc17 Auto-Submitted: auto-generated Date: Sun, 01 Mar 2026 03:24:16 +0000 Message-Id: <69a3b160.264d7.32722ca9@gitrepo.freebsd.org> The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=6da9d465c54bf2e3496e83db025c5d22f3b3cc17 commit 6da9d465c54bf2e3496e83db025c5d22f3b3cc17 Author: Kyle Evans AuthorDate: 2026-03-01 03:23:59 +0000 Commit: Kyle Evans CommitDate: 2026-03-01 03:23:59 +0000 bhyveload: simplify cb_open() and eliminate minor TOCTOU It's not at all clear why I wrote it like this, but we can do better. I wouldn't think this really has any meaningful security implications since the hierarchy in question can't really be modified by the guest scripts, but it would seem to make it a little more robust. Fixes: 6779d44bd878e3c ("bhyveload: use a dirfd to support -h") Reviewed by: bnovkov, markj Differential Revision: https://reviews.freebsd.org/D55379 --- usr.sbin/bhyveload/bhyveload.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/usr.sbin/bhyveload/bhyveload.c b/usr.sbin/bhyveload/bhyveload.c index 2b1bfec9a62d..4cc566f334c3 100644 --- a/usr.sbin/bhyveload/bhyveload.c +++ b/usr.sbin/bhyveload/bhyveload.c @@ -169,11 +169,9 @@ cb_open(void *arg __unused, const char *filename, void **hp) { struct cb_file *cf; struct stat sb; - int fd, flags; + int fd; cf = NULL; - fd = -1; - flags = O_RDONLY | O_RESOLVE_BENEATH; if (hostbase_fd == -1) return (ENOENT); @@ -185,20 +183,21 @@ cb_open(void *arg __unused, const char *filename, void **hp) if (filename[0] == '\0') filename = "."; - if (fstatat(hostbase_fd, filename, &sb, AT_RESOLVE_BENEATH) < 0) - return (errno); - - if (!S_ISDIR(sb.st_mode) && !S_ISREG(sb.st_mode)) - return (EINVAL); - - if (S_ISDIR(sb.st_mode)) - flags |= O_DIRECTORY; - /* May be opening the root dir */ - fd = openat(hostbase_fd, filename, flags); + fd = openat(hostbase_fd, filename, O_RDONLY | O_RESOLVE_BENEATH); if (fd < 0) return (errno); + if (fstat(fd, &sb) < 0) { + int serrno = errno; + + close(fd); + return (serrno); + } else if (!S_ISDIR(sb.st_mode) && !S_ISREG(sb.st_mode)) { + close(fd); + return (EINVAL); + } + cf = malloc(sizeof(struct cb_file)); if (cf == NULL) { close(fd); @@ -217,7 +216,6 @@ cb_open(void *arg __unused, const char *filename, void **hp) return (ENOMEM); } } else { - assert(S_ISREG(cf->cf_stat.st_mode)); cf->cf_isdir = 0; cf->cf_u.fd = fd; } From nobody Sun Mar 1 07:48:21 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fNvMD0jxlz6TFxr for ; Sun, 01 Mar 2026 07:48:40 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fNvMC3M5Mz3VBb for ; Sun, 01 Mar 2026 07:48:39 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-c70bc5b4e86so1344566a12.0 for ; Sat, 28 Feb 2026 23:48:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772351313; x=1772956113; darn=freebsd.org; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=vTFqQv9A9FpWM1bZcPsUmOCFq+S//eKjMt/CqacZ7pE=; b=Dze1a8WYSCQ70YYjBz/Wp/xeThOnDaJgTZQ36UTgOBaHM285/EvNaD9SEcXm8i72BW 55lK5z70rtcVnJ4ytOroZ73jx3ivFdwPY0lQvY/w2WQCcSWQ+qfTMqnrZZADN4aFnGSf 3tbOeJrkfS8J1/nbft1MvM0krGhhC2nQsoZvctJxXvNWwkStMz5/yimlS+V1k835xroS 9bXeHy42KzW09GKnDny76K4RnuiyqQBMJHQpbGxB77Omb+z/XOll2tnCioziPuD2MvHc wN7f9HhFv9EOHvVfbpQtg4Jh+vlIZqtKs4H0as/n3m0E5fsQa+HssuCTYwPo1FUgTcDv 6d2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772351313; x=1772956113; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=vTFqQv9A9FpWM1bZcPsUmOCFq+S//eKjMt/CqacZ7pE=; b=lfO+jTpLvzA2TMWWrMf0S2AWa50e62UcOGSF7ysuNsc8Vf9Y9yKcSpG4LQPIvbMSPN j1ZdTuBeYSEBB5gjW3WtUCJBen7l9rRfiU0xVqctmImNXKP6m91zj2AYAfNphFg1nLoQ B1plrTesPRwzDns6htGOCA9ccM5Uac8y+wMndXWHF+gtZKw/aRQcMFnP3XuNdBAyb3Yc sXt4Hz+QyHegz2ruSiKixGnle4V0hnjCUpIKDe+ZToXLVWAF248fh+FtKD9zVmUsuBAv RB3W6it4g2AFMoFK3X0IFd8BAMcPQLLsbFt1GwH1v5i3AlNG+f3uhiVc6m0tZegstTEl OhFw== X-Forwarded-Encrypted: i=1; AJvYcCWzont93waF8PfbASBBfLfNNWbwycqWeiHJQRg+nZInq5IepMX7zWAYmHmBM8b7fXA0c3AF96CmNB5RyHlbZinoI2MJ@freebsd.org X-Gm-Message-State: AOJu0YwHV0A0Q6kOsGe8+UAAPF+xAwASZhcIDe01aSnkYjWXRi+mM2Si CjK88pdY4oXJfwNivIX+QIgvr0kNX458fnVoH0u0dqioYCV0TmZVCV/l X-Gm-Gg: ATEYQzyxNBZU0UVj46NhyfplW5mQpoWRl8l9tnjppTPWTIlOpAapvVSXrr8bIlRHkuM imR5+qMBXv8ByoIyGTs2D5rWvEnIbsGX2xfwo0wtVwkWEh7QCis7qsqncE4PSo/hTHtOB302vqu vxcDG1YGMIkzsKo9Qj04IifeyHaITuDolwyQmwvd9etowyP27nhTA+PHeRJg/7XeidQhZacH1l0 E4rekvDM/BCusZa5QCufZ5i2ha8m+QDDzuos4Tkyv1ZrwhGJtLTSABjOVltF4YwWYVt1ZEN1l+/ DobDykWkyK4hqSpM7OOz8sI6u/V032oJ20du3QcDGwHcTTb9XeFsl6kQFjWu5J+NV6k2OoG/8Uf 0i/h0uyv2tOM0wRsMSGhlbaRsiln+k0p4PJSAG0+Gkw1Di+lkaKBwvOu2Av994XXOISJNWxcY2v LQrc+5ad/1ZeKSYr7waY7p0D7VeAX6s/+4QZGskTQTicw= X-Received: by 2002:a05:6300:85:b0:370:73c1:6a87 with SMTP id adf61e73a8af0-395c3b0dccfmr7398791637.58.1772351312921; Sat, 28 Feb 2026 23:48:32 -0800 (PST) Received: from smtpclient.apple ([185.219.141.153]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3593dda3a4dsm9148013a91.10.2026.02.28.23.48.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Feb 2026 23:48:32 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_D2E0B433-D30B-44E1-A3FC-2B179EC2CDA3"; protocol="application/pgp-signature"; micalg=pgp-sha256 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81.1.3\)) Subject: Re: git: c2dee7786bf3 - main - diff3: Code cleanup From: "Enji Cooper (yaneurabeya)" In-Reply-To: <69a330d5.44fd2.56809847@gitrepo.freebsd.org> Date: Sat, 28 Feb 2026 23:48:21 -0800 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Message-Id: <5A228777-56E5-49AA-9F20-99543F397059@gmail.com> References: <69a330d5.44fd2.56809847@gitrepo.freebsd.org> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= X-Mailer: Apple Mail (2.3826.700.81.1.3) X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4fNvMC3M5Mz3VBb X-Spamd-Bar: ---- --Apple-Mail=_D2E0B433-D30B-44E1-A3FC-2B179EC2CDA3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 28, 2026, at 10:15=E2=80=AFAM, Dag-Erling Sm=C3=B8rgrav = wrote: >=20 > The branch main has been updated by des: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dc2dee7786bf32cb66cedec226e42e79e= 06457c51 >=20 > commit c2dee7786bf32cb66cedec226e42e79e06457c51 > Author: Dag-Erling Sm=C3=B8rgrav > AuthorDate: 2026-02-28 18:15:23 +0000 > Commit: Dag-Erling Sm=C3=B8rgrav > CommitDate: 2026-02-28 18:15:23 +0000 >=20 > diff3: Code cleanup >=20 > * Order includes. >=20 > * Turn the diff type into an enum. >=20 > * Turn an unreachable error message into an assertion. >=20 > * Remove unused debugging code. >=20 > * Remove some dead assignments. >=20 > * Consistently use 1 instead of EXIT_FAILURE. >=20 > * Turn a return from main() into an exit(). >=20 > MFC after: 1 week > Sponsored by: Klara, Inc. > Reviewed by: bapt > Differential Revision: https://reviews.freebsd.org/D55517 Hi des@, It looks like the diff3(1) code came from OpenBSD (at one point = in time). Are there any plans to converge/merge with that codebase in = the future? Thanks! -Enji= --Apple-Mail=_D2E0B433-D30B-44E1-A3FC-2B179EC2CDA3 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEkHfexGRJ3gYRdA2gGpE5DjPsNJgFAmmj70UACgkQGpE5DjPs NJgJHA//TmBhKFPjNOvztpWtghUfkXE9ZpRmRbhRvcHc/0lupljkuMMiiTz2CVVF 5TvV+JHm83oBAO9pogsoqpjIKxYtvfKgluYSzDlog99bNbFLnNtMv4kEeW1smM9I m2aDvwEF+sNHGUBD1OoJ51d/aMpA8+WAN/8J9qiGtpnt3/IysusZVxhG/Uz5kgmL qhptseL6bVtN8JwK+KJbKaswOPVR7hqVE10mY9umNzjIPap/FKTObmKBl4JURQdy od6uIzNml9ZuYNYBcHGSfnbXDihB2bLZnyHkARLDUyz9QOJdP5gDxzm5bVqdFCrr u0zMQHD5jEV8YlG2CL7QGCEQKZ0oztO9qLwwtL36YOWeaVERAMR/J+a/x8QTUKQP gUa4eg730bdi/w947wNuxhusPyQ7W7h5OjfXAt+MJv1JOahdkZzXBNHycH0gcGXT NEdgKf2KMvYltUb8FznJMFWNlJAA7Pc7KdrTy2+LSHBa+DTEd5WNn4b2OhcSEmF6 XNwf+w6SG9WeyI/MEsSt/gGkumR8+tz+qQJnnYNc0nP8pcZEnAlVz3/59AKmVufj Osd4UG/3+BxC6ChSSECitpCoRJror1hu22jJTvFXwebgp5ju2irvamQvxAg5XM3T GBUujKHW5QixZbOGXiOsXw0vkSZSpIbdM1kXZXNPBUe+zZWs3q8= =4jYQ -----END PGP SIGNATURE----- --Apple-Mail=_D2E0B433-D30B-44E1-A3FC-2B179EC2CDA3-- From nobody Sun Mar 1 07:49:41 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fNvNg3Prhz6TFqY for ; Sun, 01 Mar 2026 07:49:55 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fNvNg1KgTz3Vhv for ; Sun, 01 Mar 2026 07:49:55 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-2ae46fc8ec1so2260315ad.3 for ; Sat, 28 Feb 2026 23:49:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772351393; x=1772956193; darn=freebsd.org; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=tOaF3+kjUVZ8ou7IPHKo3znc1KF7ELipeBXS4/OLRnk=; b=jk+IN8m+E1U+76VGhpQLy3BeCDlZ8MMcm9/0jDrmCSCR0rFTNi9bdzgLgqfhCkoXVL uPZLHLEUEsqezfrFyxYdhBad8JTE7mtOS1ZDIxvPxhcAACq25qJTBl25R2aYhfnanuzu 1tW8tt7JsMobubruoZEcpuwfedoW0rn9n56MkTCfBKJB16KPtIcfLHn4LaxSjeSPq/Wn uiBi2FuEzkih8XCxuNGu3ruFDD79NNJD1/0glsbfdwvME1fMDY2lqVR8TsgznnZ1fF4K vKgOEqiggc1DmwQumZBS2MXsmrV6/7pyzA8FIe/Scrq3TlqDH4SxTNWnFIoKP1O9RlJS Sz9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772351393; x=1772956193; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=tOaF3+kjUVZ8ou7IPHKo3znc1KF7ELipeBXS4/OLRnk=; b=RgAqGiAonNi1QGdUlypP+iXp4YPWYr96POdaVQ9GCWhZyuShgyk0FcEjm3baHIaGo/ wcXjvRtmMXwP7BTisFCst7L2n/c9zhCCq9yrEOVSGX8o8tN39GYWY64X9wMwfLINZz8X 2imt+qyAKZPH58PrPza4DQn5WvYI+Sh8qFaKoUvumuQU+s0tskowrXMDHMPjXyPOqCNO bwsmZ1k9EJsjJkgJAl++L8qqEry0qg8Vm8/rWEdhG3kMnJ0ONxZw/yKERqrxt5JhE5P/ 8ejtEhuWiyWRye/8FP2L6YrOXl4gmmZp1unUC0dPKo4jVjIayk0+s75uHQ4rdeToeaxS 0vig== X-Forwarded-Encrypted: i=1; AJvYcCVoEJfMBffEXPl7FDQ4+LfWQheIhRM5QQQp9OXLR6CPXCYGhTwFh4VRswmcuPm2ECArvW//6ZXHiMtF22FeC0cX5xtK@freebsd.org X-Gm-Message-State: AOJu0YzAqOtXnKyh/K7zlpdTJ8fGo6QT2fIsi4fxfaAwQPPdtUs8q6FR x7lHjxEQP2GxoUGL88SpkQrq/yw02VafoqulythXXA6Ehm+UbAMzAjkh X-Gm-Gg: ATEYQzzMvZcpW4WCvfhgY+mjTnU524+ESFYHq8BAxRzhCKrzLhRczcWFrvx3cP4pEbE +06yY3YuD/Qdq2ntEgZ7TNu3H+whuWThSX5FqfywzE90Z0ZogAUZyi9GlU+n/EuPze7NHjfuKhu 9AHrDFdUO605AZFu92RFfnpe2r0q5T8iOML/yT0XPrY0USJKJgy7UWvvc4u5VcLc8m6vyrkp9fq u81WdNbM9hwNRBq4DbGb1x8rx6/18h6REydkoEjsVQaMV2RS9kllJWDcAuQDnuD8rT7zgIE1OVW h9DEReAPSiOhxJHKTB6V8aQKtzJ4kFplxQKTGEe7iAaiUeg/2ButfqsrApgowX5wRy3JWQHzFRf qbtI+ZEUBFzQO8McJwPFe9rQ4JNXUVGdlxf2G3+tz+Lt+NWKiW5ZM6syt81z+X+QvfLC3TT0YQ1 r4bL3bOJ+maYhbgZi8NTXJNjFIZw/DL/dlMh4uyXU9qBI= X-Received: by 2002:a17:902:ec8b:b0:2a7:c2d5:bcd7 with SMTP id d9443c01a7336-2ae2e3f0474mr70879435ad.20.1772351392684; Sat, 28 Feb 2026 23:49:52 -0800 (PST) Received: from smtpclient.apple ([185.219.141.153]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8273a0107f5sm9322195b3a.45.2026.02.28.23.49.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Feb 2026 23:49:52 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_A57004A8-E579-44B6-9550-BF9AD07BF702"; protocol="application/pgp-signature"; micalg=pgp-sha256 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81.1.3\)) Subject: Re: git: 1f2f5eba24aa - main - asmc(4): pull 32-bit support for the driver From: "Enji Cooper (yaneurabeya)" In-Reply-To: <86y0kdngqs.fsf@ltc.des.dev> Date: Sat, 28 Feb 2026 23:49:41 -0800 Cc: Enji Cooper , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Message-Id: <4A796B89-DBE0-4845-947E-65C5B95C0650@gmail.com> References: <69a1f40e.1eb9e.56768185@gitrepo.freebsd.org> <86y0kdngqs.fsf@ltc.des.dev> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= X-Mailer: Apple Mail (2.3826.700.81.1.3) X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4fNvNg1KgTz3Vhv X-Spamd-Bar: ---- --Apple-Mail=_A57004A8-E579-44B6-9550-BF9AD07BF702 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Feb 28, 2026, at 5:24=E2=80=AFAM, Dag-Erling Sm=C3=B8rgrav = wrote: >=20 > Enji Cooper writes: >> commit 1f2f5eba24aa53e180a4eb46b772410e5a782469 >> Author: Enji Cooper >> AuthorDate: 2026-01-05 03:36:55 +0000 >> Commit: Enji Cooper >> CommitDate: 2026-02-27 19:44:08 +0000 >>=20 >> asmc(4): pull 32-bit support for the driver >>=20 >> The asmc(4) driver should work for 32-bit Intel-based Macs, in = theory, if >> the model details were added to the detection list. That being = said, >> 32-bit Intel Macs were only released and available to the general = public >> for 8 months [1], so the value in maintaining i386 support in the = driver is >> reduced due to limited hardware access. >>=20 >> Remove 32-bit support for the driver officially to make it clear = its use is >> not supported. >>=20 >> This should fix building `NOTES.i386` by proxy as well. >>=20 >> Relnotes: yes >> MFC after: 2 weeks >> Fixes: f224591746b ("Add ASMC_DEBUG make option") >> Fixes: 8342d9f7b5f ("asmc(4): Stop building it on i386, = as...") >> Differential Revision: https://reviews.freebsd.org/D55544 >=20 > Please remember that the bugs this fixes have already been merged to > stable/15 and stable/14. Oof =E2=80=94 fair. I=E2=80=99ll wait a 3 days instead of 2 weeks and = merge. -Enji= --Apple-Mail=_A57004A8-E579-44B6-9550-BF9AD07BF702 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEkHfexGRJ3gYRdA2gGpE5DjPsNJgFAmmj75UACgkQGpE5DjPs NJj0kw//QN7+H0sA4d5e8wBBkrq5NM6JOae5saXuafBSD3UvnKaolXEFUhA0u7Kl U/hu2/S3A7M8nIgmbNPecukXhcY0aq0ivnY2Is4skTANd46yf909T649Faty8724 1O7k4PkGK2bqRUyFsGJ8SufqSwlnsoYddXYhrNQY95WEwXncb5+zsuKsGXffljC5 hCzvlQE9YvRm819B+V0IkvnA3zlsH3LWgX4aYng1cotNa2rCR+/M4G7KdbR8h+To ub8NelSVzjD+jZiN/yjEnnT/rthUDnxYaCk4zgKWvQbZk/x8H4jBjloy72a73nzv +gJ4e3na7/LYkZNdnRwpWdtN1fUYE8LvGgMR58oy2ZS7YlAxvk7Zh0N4W7HiCigD YCEPxmVbmyakrb9R+OBvXRI/EmDhUlG+1z+8KsL7saNB0dwksDZjksseRnJwZ+QY wywqq8PwfyY1CKBm+yxbMKuYBcvjuTFFcG2xgG7yxr03adLghV8JaDFD2FLv/Hca gRpONYO9AiSm/3VF+6GVqZwha3cylu1cl4B0BKM5u7rxuHCiEAZ0PS83ZM3zFevu ZSsP73BDrR7I08caczIxpE52S1XWZjWZi/L2DdT0oRgcPPVZXTaum+w4VJT3Ukbm gat0ZaA4B9h0PU2zSyUqEBKhZ66KUY+Oj0REKu+SLm707kBIaic= =zpdf -----END PGP SIGNATURE----- --Apple-Mail=_A57004A8-E579-44B6-9550-BF9AD07BF702-- From nobody Sun Mar 1 08:46:23 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fNwdx235Vz6TL5Q for ; Sun, 01 Mar 2026 08:46:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fNwdx1Ls0z3YmJ for ; Sun, 01 Mar 2026 08:46:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772354789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5zaPEhLAkT+UsY3d0xdwViuMEai7mbEwryBrGPdhulc=; b=tXHb3VDniiD+DErvc4/K8BwrHyqilQZ+elxElajPScXQzzyMJfZXbZ2KGor5n+Z3nzIC0U 7/iyYhU4LShurDdSntN/r7rIhDtdnTQ1jp1fhv2PVrKaYbCKTDNt6/q6Y6gXkgwLA2gb6O PTFLMsBYMFnMqsUrFbUaBJWqAYfRhIqustIP9XzJQF2336ojcgVxRz/EMVcDllLAdEj/Ou DqjLPKZTOD2vyIhqxptwD9stFhaslBfVck9CeU39y7x7iFZOLUZCfEUAUI/i/8kFU7FYaX LS3UnYzYvTE9GWkBRoA7XKFf31P+FAV0rZvdff+8zYeeXMWu4oGBqdpv9lqgOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772354789; a=rsa-sha256; cv=none; b=rXKNaT5qMBQzQZEA3EbGgARiTlkq41rVONotBKbLV4jEm64UiYgOS6N8wME8uA/8HN0F/Y 4tRUOaIMv2AsSTjxBRmBIuzJV6oTv2Xi/EshHVHEebv5cfDkvzvwBICvu18/SA3ZodhlPu egIkHQ9IV24OJ6wrJQjsTPdVwbdgYzQGDIuamgI6YQuqD2Vx5n0wS/7NlgBck5eEX5LlGw 8Fe/AXgSqkYNWvig/YjcfwWUPcUn6w75zUEfh0wgJFJ4elNY/6RHW0/VVbdPO83zHqjGcf Kv+lUcitjifOciRmFvT5oxUL6mGfBPzB8xzIRDPx3NZusdP7VvSw3ImhdA0+yA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772354789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5zaPEhLAkT+UsY3d0xdwViuMEai7mbEwryBrGPdhulc=; b=UuHfWYHOwEnVdIfxvraO+1med1OUqwt9ISa5084HbUrJwry1xSNP36Xn0VOyvG97wUz2wY 1uCITbWi3azgQkW/Dc8TDzltGYsQdk3PO+ksZS9F+E/8izZlyLnSJbMO422ZGCvq/9rwIL WqEPMYJuIFNtNR8BpEBfK8ETEMDaEyny1An/qpitA7PnxP3R3hVajw+2cI5eMTg7FjwAcL 9wji2GOTg4dT3xZe6sYJhcPgtE6GruIEWU9E8BZ5ZOaEC+h71F11dKTU5sF6/SN7mvxgjK bBnzGZnINTEYGVTeOZkZzxc9ut2FiThecm4BLP0Crb4e07IKCxR8F/eaoKCNzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fNwdx0hbYzjFR for ; Sun, 01 Mar 2026 08:46:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f4c6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 01 Mar 2026 08:46:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: 7e33476a7c83..f8e5af53e92f - vendor/openzfs/master - vendor branch updated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/vendor/openzfs/master X-Git-Reftype: branch X-Git-Commit: f8e5af53e92fa7c03393fbd4922cb9c1d0c15920 X-Git-Oldrev: 7e33476a7c838eefafe4a8a6ecd1da5220cfacfa X-Git-Newrev: f8e5af53e92fa7c03393fbd4922cb9c1d0c15920 Auto-Submitted: auto-generated Date: Sun, 01 Mar 2026 08:46:23 +0000 Message-Id: <69a3fcdf.1f4c6.4c274919@gitrepo.freebsd.org> The branch vendor/openzfs/master has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=7e33476a7c83..f8e5af53e92f 07ae463d1a5c Added support for multiple homes in pam_zfs_key module (#18084) 3523b5f3f9a7 L2ARC: Implement even-depth multi-sublist scanning 2f41b9d86586 L2ARC: Implement persistent markers with consistent tail scanning b8610c3d93fe L2ARC: Reorder header destruction for in-flight L2 writes 825dc41ad4bf L2ARC: Preserve L2HDR in arc_release() for in-flight writes b525525b44cd L2ARC: Implement per-device feed threads for parallel writes d1f290f1eaed L2ARC: Implement DWPD-based rate limiting with adaptive feed intervals 48d3f7fac9d3 man: Update L2ARC tunables for DWPD and parallel writes 13552d754f5e ZTS: Add L2ARC DWPD and parallel writes tests 6f17052743b7 cache_012_pos: disable compression to ensure L2ARC wrap 00d69b0f724c arc: remove unused l2df_size and l2df_type from l2arc_data_free_t 21bbe7cb676b Improve caching for dbuf prefetches 20f94ef24ad4 pyzfs: remove unimplemented libzfs_core functions from pyzfs 4f180e095a42 Fix activating large_microzap on receive a9564b1787aa mmp: further restrict mmp exported pool check 62a1bf7d19df mmp: move "Starting import" log message 2f048ced4d68 mmp: add spa_load_name() for tryimport 20176224eefe mmp: claim sequence id before final import 731ff0a5ac91 zhack: add -G option to dump debug buffer d4c0e5218863 zhack: add "action idle" subcommand ae488e496f7d ZTS: update the relevant mmp test cases 15fbf534c65f AUTHORS: add names of recent new contributors 2646bd558533 Allow rewrite skip cloned and snapshotted blocks 64bae56b00dd Include missing newline in 'man' error 1412bdc6c292 zfs_vnops_os.c: Move a vput() to after zfs_setattr_dir() aa29455dd720 Restrict cloning with different properties e601a1fb774b CI: Test build Lustre against ZFS 040ba7a7ca81 libzfs: improve error message for zpool create with ENXIO fdd70565cb20 Linux 6.19 compat: META 3463d40779fb ZTS: Fix zed_synchronous_zedlet cc184fe98b37 Fix `send:raw` permission for send `-w -I` cdf89f413c72 Flush RRD only when TXGs contain data ba970eb20288 Cleanup allocation class selection 0f9564e85b01 Simplify dnode_level_is_l2cacheable() bee53d8c102d Linux 6.19 compat: in-tree build: fix duplicate GCM assembly functions bfb276e55c76 freebsd: Fix TIMESPEC_OVERFLOW for PowerPC d4896772803f ICP: AES-GCM VAES-AVX2: fix typos and document source files 370570890f43 Remove parent ZIO from dbuf_prefetch() c8a72a27e562 ICP: AES-GCM assembly: remove unused Gmul functions 640a217fafd7 CI: Test & fix Linux ZFS built-in build d06a1d9ac30d Fix available space accounting for special/dedup (#18222) b291d9aa2267 get_cpu_freq: handle CPUs with variable frequency aeb9fb3828a3 sha2_test: do correctness checks for all implementations b021cb60aaa2 ZTS: make get_same_blocks() fail harder if zdb fails 9f874ad09285 zdb: don't try to load key for unencrypted dataset d11c661544ed zdb: handle key load/derive failures a bit more gracefully 168023b60316 Linux 7.0: explicitly set setlease handler to kernel implementation d2f5cb3a50d5 Move range_tree, btree, highbit64 to common code 4975430cf594 Add vdev property to disable vdev scheduler bbf0106c6b60 build: get objtool from $kernelbuild 6a717f31e67d Improve misleading error messages for ZPOOL_STATUS_CORRUPT_POOL 7744f04962a6 SIMD: libspl: test the correct CPUID bit for AVX512VL 204de946ebd1 Linux 7.0: blk_queue_nonrot() renamed to blk_queue_rot() d34fd6cff3ac Linux 7.0: posix_acl_to_xattr() now allocates memory 0f608aa6ca32 Linux 7.0: add shims for the fs_context-based mount API 3408332d7154 zhack: Fix importing large allocation profiles on small pools (#18256) 991fc56faec5 Introduce dedupused/dedupsaved pool properties 4da3f059a388 CI: Remove deprecated Fedora 41 6495dafd58b9 range_tree: use zfs_panic_recover() for partial-overlap remove 3547a358fdb2 simd: detect and surface support for Intel SHA512 extensions 09c27a14a3bb icp: add SHA512 implementation using Intel SHA512 extensions f3d4c7949622 zpl_super: prefer "new" mount API when available f8457fbdc403 Fix deadlock on dmu_tx_assign() from vdev_rebuild() f8e5af53e92f Fix redundant declaration of dsl_pool_t From nobody Sun Mar 1 11:29:00 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fP0FS6s7Yz6SnZq for ; Sun, 01 Mar 2026 11: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fP0FS3zVLz3srL for ; Sun, 01 Mar 2026 11: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=1772364540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Igtu86OiRk7VNAX0qXm1LBrK68m5paYOv6sLAQIX3BM=; b=UAzDPm/o0fr3gMK6hh0UWKa1MGmWQ/C4NrT9uaNVKQ7LAVC82ol/83vR1U+ndtyR3gkjvV Px1mgFO1b9t+BD3FzD5ClqUqHBjIsPvBHHQcJK4CdJYtQ6buA47XsdwtJG6F2w9nTUrXWJ KbSqmOJQYbBnKkT2ID0CjRB6QyXyOsKlmY7oYuxjC2GTODcDSotGTtbhFH2l9tyuAUMudQ 4AiSQCWJtk2Z9N5USPUyYQY9eGxhieSD34v3wvqCiHr+zU3vlABxvZ6dilnn74gI/vgN1G qHWW14/kn4dmKgw93m6/mHYAdL/4/ibxceQx0TqXy6uxbhP7hyXdtihkKP10UQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772364540; a=rsa-sha256; cv=none; b=pvAlL1cXqU3NNhVhw3wVHNM6nJbxpGNfnk+ZxYDyGPJ9FIVPl2DI7hLT11mQUWdpPILU70 Q9cRfxmWGohopkxaxuHiB8wQM3dBm8thF5KED8GRixmpLJzhTPJg/51fs0y7+7CScU7CU9 KkHfK5MYYwOGu7rGDzxAk0c3nrWShih1Xvamfq/N5EvCtuGCtE+fCzWvw1mJ7hLVbzd5Ze zGDiSR13t0EGlqkXDrb9fFeI48jxg5jNZ2c3gMs1XFhiRqA8N5GiRb7rLjRHF+aST8CEXT n75+NFPpP0+s9KJd2srTkJDLB7DJYzBGmpCjSAqhII98vmEDZgMQtCOETmwrQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772364540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Igtu86OiRk7VNAX0qXm1LBrK68m5paYOv6sLAQIX3BM=; b=Lsfg5usHka3Xjp9YNC1b2Y8l4K+cJa+vSBzb6xUFnK/H7GDyeqB6dJbTfIfT4WvtUidM6z GjklnxbnXPS4hFO4Xg+PoKhsRAEKI1IVVF3wY7o0BjfTu1EyDh5WKKVVa52EMH7f/xdpjI 9qp/OHDzcrvPSyHJivSf+RiqJEW05nn/oQ6AnkR2a82GOdJOEpKSDiByoxERnXO1uRtMTT RNdKMZHRu01/lxH5hjs89tvvLA2Rg+5w5JIWWP3tED6HYzQUTuyDKYcZPDlfqGlteMNevL QaYyCNSCl/DQ+DIpZ0qhMy3JnH76MTZoPJjMmhVqA22d0dTrlx5WzDjF0nCt0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fP0FS35NvznHQ for ; Sun, 01 Mar 2026 11:29:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39a3b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 01 Mar 2026 11:29:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 5df6aca10906 - main - ed: add unicode support for the l (list) command List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5df6aca10906f669bc7095ff735eba6b8fe95ff0 Auto-Submitted: auto-generated Date: Sun, 01 Mar 2026 11:29:00 +0000 Message-Id: <69a422fc.39a3b.73b7b4c1@gitrepo.freebsd.org> The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=5df6aca10906f669bc7095ff735eba6b8fe95ff0 commit 5df6aca10906f669bc7095ff735eba6b8fe95ff0 Author: Baptiste Daroussin AuthorDate: 2026-02-17 15:25:46 +0000 Commit: Baptiste Daroussin CommitDate: 2026-03-01 11:28:29 +0000 ed: add unicode support for the l (list) command Use mbrtowc()/iswprint()/wcwidth() in put_tty_line() so that the l command displays valid multibyte characters as-is instead of escaping each byte as octal. Column wrapping now correctly accounts for character display width (including double-width CJK characters). Invalid or incomplete UTF-8 sequences and non-printable characters are still escaped as octal. Differential Revision: https://reviews.freebsd.org/D55365 --- bin/ed/ed.h | 2 ++ bin/ed/io.c | 70 +++++++++++++++++++++++++++++++++++++++++++++---------------- 2 files changed, 54 insertions(+), 18 deletions(-) diff --git a/bin/ed/ed.h b/bin/ed/ed.h index e1e41cf3fe40..fdfaf47acb4f 100644 --- a/bin/ed/ed.h +++ b/bin/ed/ed.h @@ -36,6 +36,8 @@ #include #include #include +#include +#include #define ERR (-2) #define EMOD (-3) diff --git a/bin/ed/io.c b/bin/ed/io.c index b3262ea9e217..3a1b6d8bb443 100644 --- a/bin/ed/io.c +++ b/bin/ed/io.c @@ -298,13 +298,49 @@ put_tty_line(const char *s, int l, long n, int gflag) int col = 0; int lc = 0; char *cp; + wchar_t wc; + mbstate_t mbs; + size_t clen; + int w; if (gflag & GNP) { printf("%ld\t", n); col = 8; } - for (; l--; s++) { - if ((gflag & GLS) && ++col > cols) { + for (; l > 0;) { + if (!(gflag & GLS)) { + putchar(*s++); + l--; + continue; + } + /* GLS mode: try to decode a multibyte character */ + memset(&mbs, 0, sizeof(mbs)); + clen = mbrtowc(&wc, s, l, &mbs); + if (clen != (size_t)-1 && clen != (size_t)-2 && + clen > 1 && iswprint(wc) && (w = wcwidth(wc)) >= 0) { + /* printable multibyte character */ + if (col + w > cols) { + fputs("\\\n", stdout); + col = 0; +#ifndef BACKWARDS + if (!scripted && !isglobal && ++lc > rows) { + lc = 0; + fputs("Press to continue... ", + stdout); + fflush(stdout); + if (get_tty_line() < 0) + return ERR; + } +#endif + } + col += w; + fwrite(s, 1, clen, stdout); + s += clen; + l -= clen; + continue; + } + /* single byte: ASCII printable, escape sequence, or octal */ + if (++col > cols) { fputs("\\\n", stdout); col = 1; #ifndef BACKWARDS @@ -317,24 +353,22 @@ put_tty_line(const char *s, int l, long n, int gflag) } #endif } - if (gflag & GLS) { - if (31 < *s && *s < 127 && *s != '\\') - putchar(*s); + if (31 < *s && *s < 127 && *s != '\\') + putchar(*s); + else { + putchar('\\'); + col++; + if (*s && (cp = strchr(ESCAPES, *s)) != NULL) + putchar(ESCCHARS[cp - ESCAPES]); else { - putchar('\\'); - col++; - if (*s && (cp = strchr(ESCAPES, *s)) != NULL) - putchar(ESCCHARS[cp - ESCAPES]); - else { - putchar((((unsigned char) *s & 0300) >> 6) + '0'); - putchar((((unsigned char) *s & 070) >> 3) + '0'); - putchar(((unsigned char) *s & 07) + '0'); - col += 2; - } + putchar((((unsigned char) *s & 0300) >> 6) + '0'); + putchar((((unsigned char) *s & 070) >> 3) + '0'); + putchar(((unsigned char) *s & 07) + '0'); + col += 2; } - - } else - putchar(*s); + } + s++; + l--; } #ifndef BACKWARDS if (gflag & GLS) From nobody Sun Mar 1 11:28:59 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fP0FX5yLxz6SnDS for ; Sun, 01 Mar 2026 11: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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fP0FX4Cqsz3sXs for ; Sun, 01 Mar 2026 11: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=1772364544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MZBBIHPmwoOzK6kQq6a1AR9x82e0OdoWYjFnjf8WMxs=; b=UXH6wlfp0bXD928qaTcfn8bOsWlKzrIoCCDwppsrTpoPuKoVe/fby50/kdGYG1l1ROcDJW lAEkTnr+7iujmkR6NDtlqaKC9cTm2qT/nsTUSbGSa/75F411DL6ZhE8tIESLp6i2Cfoohs CZe3T78oD8IpUTWLs/QTht2oiyvqk5bJ6qCX+h3Fpow0jz7gDiXqqx6ERAMGb+HMznxJWj 3Y1E9gX7IePslS2w6IPDr5UqvWm9SbA5EplNT1IjBR9HN4dRxdG2nL8AQS/NqEYZyh6B2C JsgkNZOxD7/Gnk8+s0GXnWK6i/ZtDDRMpsgMMCv5t/a/rgpo05Tw2xWHy/wgHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772364544; a=rsa-sha256; cv=none; b=GXPwizyBxqZJEQa7ENfDfiKy2P0PZW+OGyGB6IN7M72jbicWQCq3ffWreJ/G5nCcJKcccn vEknWowA/MHB+6xrdfBZxSox3TaOl0BufBYCO+M30Ohxg9VQvN6R2oKgbBoNHKT/fZz3iN JLKGCMsmmZfs7mpltVdFXDx+pNBqFdCosMFxuO9JEFovDmvBvRlkkiiQoiDqQKDkUsbv+V QJ2G22QAF2WN1sCBwC9195/KrF97oOuPeUkPn1Sd6Rr2c81fs4fpA9UEZeFRMU7qF49RLM SShK1IOBJcJIXhXBmwWGSefmDt+xKyDoYMzypYF770b3jox335UEa1hSSmvFlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772364544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MZBBIHPmwoOzK6kQq6a1AR9x82e0OdoWYjFnjf8WMxs=; b=JFsaaQjItjAyv/heYZsKuf+99b3K/oBTtufsDiLS+oNMOH4PXF2DT1OL167m7eIj0fjin6 kolCYfDqQ/VJ52n0Q9ecXGn6SNojTBgtvIwQ/bNXQqcepcP2KAjxXITGyyDdCQT6ksW45m oJi7uV4BBnZTwidN7WCtTmlA+hy8Ozb3tHT0/UqByaEij0UVSbQoUu3Qcg/+7aZFVvca9P xrL8/eY/e0kRaWRnGCUmkRRDZ+kt/bK1716xQi6IinWn7oaESxsB3KBwwZw+XZm4kaLTC5 IQn6ih3iNcFjARlWGBOI4hn2X+Vq5vMiQ/rGca6givIcC6gxX/lkXtbpn02gtQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fP0FX2tjvzmx5 for ; Sun, 01 Mar 2026 11:29:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 398e4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 01 Mar 2026 11:28:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 7c2c2c2a2253 - main - ed: add unicode test cases to ATF test suite List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7c2c2c2a2253370c88fe428cf1c0ecebd68fe864 Auto-Submitted: auto-generated Date: Sun, 01 Mar 2026 11:28:59 +0000 Message-Id: <69a422fb.398e4.1e4447d5@gitrepo.freebsd.org> The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=7c2c2c2a2253370c88fe428cf1c0ecebd68fe864 commit 7c2c2c2a2253370c88fe428cf1c0ecebd68fe864 Author: Baptiste Daroussin AuthorDate: 2026-02-17 16:38:29 +0000 Commit: Baptiste Daroussin CommitDate: 2026-03-01 11:25:16 +0000 ed: add unicode test cases to ATF test suite Including examples in Cyrillic suggested by kib@ Differential Revusion: https://reviews.freebsd.org/D55364 --- bin/ed/tests/ed_test.sh | 333 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 333 insertions(+) diff --git a/bin/ed/tests/ed_test.sh b/bin/ed/tests/ed_test.sh index c67df8ae9f65..d4b18fa92ca0 100755 --- a/bin/ed/tests/ed_test.sh +++ b/bin/ed/tests/ed_test.sh @@ -1687,6 +1687,322 @@ z CMDS } +# --------------------------------------------------------------------------- +# Unicode support +# --------------------------------------------------------------------------- +atf_test_case unicode_list_multibyte +unicode_list_multibyte_head() +{ + atf_set "descr" "l command displays multibyte UTF-8 as-is"; +} +unicode_list_multibyte_body() +{ + + export LC_CTYPE=C.UTF-8 + printf 'café\n' > input.txt + atf_check -o inline:'café$\n' ed -s - <<'CMDS' +H +r input.txt +l +Q +CMDS +} + +atf_test_case unicode_list_cjk +unicode_list_cjk_head() +{ + atf_set "descr" "l command displays CJK characters as-is"; +} +unicode_list_cjk_body() +{ + + export LC_CTYPE=C.UTF-8 + printf '日本語テスト\n' > input.txt + atf_check -o inline:'日本語テスト$\n' ed -s - <<'CMDS' +H +r input.txt +l +Q +CMDS +} + +atf_test_case unicode_list_mixed +unicode_list_mixed_head() +{ + atf_set "descr" "l command displays mixed ASCII/UTF-8 correctly"; +} +unicode_list_mixed_body() +{ + + export LC_CTYPE=C.UTF-8 + printf 'hello café 世界\n' > input.txt + atf_check -o inline:'hello café 世界$\n' ed -s - <<'CMDS' +H +r input.txt +l +Q +CMDS +} + +atf_test_case unicode_list_invalid +unicode_list_invalid_head() +{ + atf_set "descr" "l command escapes invalid UTF-8 as octal"; +} +unicode_list_invalid_body() +{ + + export LC_CTYPE=C.UTF-8 + printf '\200\201\376\377\n' > input.txt + atf_check -o inline:'\\200\\201\\376\\377$\n' ed -s - <<'CMDS' +H +r input.txt +l +Q +CMDS +} + +atf_test_case unicode_list_wrap_cjk +unicode_list_wrap_cjk_head() +{ + atf_set "descr" "l command wraps correctly around double-width CJK"; +} +unicode_list_wrap_cjk_body() +{ + + export LC_CTYPE=C.UTF-8 + # 69 A's + 日本 (2 CJK chars): 69 + 2 = 71 cols for 日 (fits), + # 71 + 2 = 73 for 本 (exceeds 72), so 本 wraps to next line. + printf 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA日本\n' > input.txt + ed -s - <<'CMDS' > output.txt +H +r input.txt +l +Q +CMDS + printf 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA日\\\n本$\n' > expected.txt + atf_check cmp output.txt expected.txt +} + +atf_test_case unicode_print +unicode_print_head() +{ + atf_set "descr" "p command passes through UTF-8 correctly"; +} +unicode_print_body() +{ + + export LC_CTYPE=C.UTF-8 + printf 'café 日本語\n' > input.txt + atf_check -o inline:'café 日本語\n' ed -s - <<'CMDS' +H +r input.txt +p +Q +CMDS +} + +atf_test_case unicode_number +unicode_number_head() +{ + atf_set "descr" "n command displays line number with UTF-8"; +} +unicode_number_body() +{ + + export LC_CTYPE=C.UTF-8 + printf 'café 日本語\n' > input.txt + atf_check -o inline:'1\tcafé 日本語\n' ed -s - <<'CMDS' +H +r input.txt +n +Q +CMDS +} + +atf_test_case unicode_regex +unicode_regex_head() +{ + atf_set "descr" "Regex search matches UTF-8 characters"; +} +unicode_regex_body() +{ + + export LC_CTYPE=C.UTF-8 + printf 'café\ntest\nüber\n' > input.txt + atf_check -o inline:'café\n' ed -s - <<'CMDS' +H +r input.txt +g/é/p +Q +CMDS +} + +atf_test_case unicode_regex_charclass +unicode_regex_charclass_head() +{ + atf_set "descr" "Regex character classes work with UTF-8"; +} +unicode_regex_charclass_body() +{ + + export LC_CTYPE=C.UTF-8 + printf 'café123\ntest456\n' > input.txt + atf_check -o inline:'café123\n' ed -s - <<'CMDS' +H +r input.txt +g/[[:alpha:]]*é/p +Q +CMDS +} + +atf_test_case unicode_substitute +unicode_substitute_head() +{ + atf_set "descr" "Substitute replaces UTF-8 characters"; +} +unicode_substitute_body() +{ + + export LC_CTYPE=C.UTF-8 + printf 'café\n' > input.txt + ed -s - <<'CMDS' +H +r input.txt +s/é/e/ +w output.txt +Q +CMDS + printf 'cafe\n' > expected.txt + atf_check cmp output.txt expected.txt +} + +atf_test_case unicode_substitute_cjk +unicode_substitute_cjk_head() +{ + atf_set "descr" "Substitute replaces CJK characters"; +} +unicode_substitute_cjk_body() +{ + + export LC_CTYPE=C.UTF-8 + printf 'hello 世界\n' > input.txt + ed -s - <<'CMDS' +H +r input.txt +s/世界/world/ +w output.txt +Q +CMDS + printf 'hello world\n' > expected.txt + atf_check cmp output.txt expected.txt +} + +atf_test_case unicode_global_substitute +unicode_global_substitute_head() +{ + atf_set "descr" "Global substitute works with UTF-8"; +} +unicode_global_substitute_body() +{ + + export LC_CTYPE=C.UTF-8 + printf 'à la carte\nà bientôt\nhello\n' > input.txt + ed -s - <<'CMDS' +H +r input.txt +g/à/s/à/a/ +w output.txt +Q +CMDS + cat > expected.txt <<'EOF' +a la carte +a bientôt +hello +EOF + atf_check cmp output.txt expected.txt +} + +atf_test_case unicode_join +unicode_join_head() +{ + atf_set "descr" "Join preserves UTF-8 content"; +} +unicode_join_body() +{ + + export LC_CTYPE=C.UTF-8 + printf 'café\n世界\n' > input.txt + ed -s - <<'CMDS' +H +r input.txt +1,2j +w output.txt +Q +CMDS + printf 'café世界\n' > expected.txt + atf_check cmp output.txt expected.txt +} + +atf_test_case unicode_append +unicode_append_head() +{ + atf_set "descr" "Append preserves UTF-8 text"; +} +unicode_append_body() +{ + + export LC_CTYPE=C.UTF-8 + ed -s - <<'CMDS' +H +a +première +deuxième +. +w output.txt +Q +CMDS + cat > expected.txt <<'EOF' +première +deuxième +EOF + atf_check cmp output.txt expected.txt +} + +atf_test_case unicode_cyrillic +unicode_cyrillic_head() +{ + atf_set "descr" "Cyrillic: append, substitute, print, regex search"; +} +unicode_cyrillic_body() +{ + + export LC_CTYPE=C.UTF-8 + ed -s - <<'CMDS' > output.txt +H +a +Привет +. +s/ривет/ока/ +1p +a +Строка +. +1 +/а/p +1,$p +Q +CMDS + cat > expected.txt <<'EOF' +Пока +Пока +Строка +Пока +Строка +EOF + atf_check cmp output.txt expected.txt +} + # --------------------------------------------------------------------------- # Registration # --------------------------------------------------------------------------- @@ -1735,6 +2051,23 @@ atf_init_test_cases() atf_add_test_case newline_insert atf_add_test_case newline_search + # Unicode support + atf_add_test_case unicode_list_multibyte + atf_add_test_case unicode_list_cjk + atf_add_test_case unicode_list_mixed + atf_add_test_case unicode_list_invalid + atf_add_test_case unicode_list_wrap_cjk + atf_add_test_case unicode_print + atf_add_test_case unicode_number + atf_add_test_case unicode_regex + atf_add_test_case unicode_regex_charclass + atf_add_test_case unicode_substitute + atf_add_test_case unicode_substitute_cjk + atf_add_test_case unicode_global_substitute + atf_add_test_case unicode_join + atf_add_test_case unicode_append + atf_add_test_case unicode_cyrillic + # Error tests atf_add_test_case err_append_suffix atf_add_test_case err_addr_out_of_range From nobody Sun Mar 1 11:38:16 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fP0SF5ynnz6Sp8h for ; Sun, 01 Mar 2026 11:38:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fP0SF4QpBz3v2p for ; Sun, 01 Mar 2026 11:38:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772365101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wpDKo/HeC0lU0r1QJZ/LoNXkm+u6etFw2CdRdFxfOMk=; b=c4yX2ZW8jF6da0QYH0EN15fQitydU4Mfg/haMvFMC2cRjscCPaMfybBk26DBaBVS1HKZr7 rzl2sxHrBPUouoeZEN9ItAQIJTNdn3MCPrV1kPHASjSynRuVoQ14vDAQen9flbQGmNrrhP fpuhpVHPg6opUmb44TUqu4glP0o8a42Mx4ghfjjwabqX2cO9NJQ15Gnc+Jp9WYY7sxgG+G mZ42cy4UnS3XF26uwuKmmqHwOQkBN4fVdA2/ukeQ0dnb8e4NSbxrJHXFQmYPIbg2Z8BawU ijOOeNvwqxMN0/2U5N0tYWE0oBo9n4hzblWHyKv1hTsAGTu4moctVkA+fqcaUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772365101; a=rsa-sha256; cv=none; b=lqkum/mG67HqR4mdjVGB13gXJt2UMu7sy64ByKYhZl2CEKfCmTryJMzQUlnKBkJsOehgOB TX2oRyQfj1hpOw7qliugybZmZTbbASdwcar1HdAH+drgrYtouX8henZNdpaUjdC+vE0aHf Dpm6AENJ9LYZ+bL9va921Fnc9MV4MLg+TipfmiH/0rQg4dNN+4xjxnawi/oywtAHbt8a5t 7waXX8k4Mei8iERyUe/aLV3lv+fz1bXluMzo2LeaHflPWPqxpkRnibDEGrjCFy7p0Lq1bq nRIc4v93RQjpLUZ8BG7+iOOEsBWzgFo4j68oIyZ5IBKmJ8Vn98HoCgg6A+1gOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772365101; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wpDKo/HeC0lU0r1QJZ/LoNXkm+u6etFw2CdRdFxfOMk=; b=xGain1radX59J6TeCGchNFKI8CUPHviQ5On6SvcNrAOd2GOZxscL01TjWQh1ye2EenQFq6 XoRiRt4iPjwhdWd3ZXEMvVapJvHioZlNxxfGfWLx0MPcu9Pm9kInaw819q6smhXUZC2JHU Avk40Jhhh3R3170N9jqYGDSzP+QKTcfgT1l2jHpZgnUtA5ElCihEmgD7sTm3HeN4VR/eF8 OmtRUIcEKdXiPUBEA3zKMX4uW9MLBAAU8sErBDsktq1ME8D/InXfyv62t/x3TqBFd7wOoV 95HN1iJaZ5nkmmunc1uhS5mFnWrz129nlNYBiLKOT6lGFVbQTuJRQg2DrlqryQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fP0SF3kjZznlq for ; Sun, 01 Mar 2026 11:38:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a434 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 01 Mar 2026 11:38:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 5ddfd1db271c - main - diff3: bump version to the date when the GNU diff3 compat was reached List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5ddfd1db271cc675997a942da599c342ccb53afa Auto-Submitted: auto-generated Date: Sun, 01 Mar 2026 11:38:16 +0000 Message-Id: <69a42528.3a434.6dec3867@gitrepo.freebsd.org> The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=5ddfd1db271cc675997a942da599c342ccb53afa commit 5ddfd1db271cc675997a942da599c342ccb53afa Author: Baptiste Daroussin AuthorDate: 2026-03-01 11:37:24 +0000 Commit: Baptiste Daroussin CommitDate: 2026-03-01 11:37:24 +0000 diff3: bump version to the date when the GNU diff3 compat was reached --- usr.bin/diff3/diff3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/diff3/diff3.c b/usr.bin/diff3/diff3.c index c33e3275d006..fce4d353af69 100644 --- a/usr.bin/diff3/diff3.c +++ b/usr.bin/diff3/diff3.c @@ -157,7 +157,7 @@ static void increase(void); static void usage(void); static void printrange(FILE *, struct range *); -static const char diff3_version[] = "FreeBSD diff3 20240925"; +static const char diff3_version[] = "FreeBSD diff3 20260213"; enum { DIFFPROG_OPT, From nobody Sun Mar 1 11:48:16 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fP0gl0jVWz6SqJZ; Sun, 01 Mar 2026 11:48:19 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fP0gk75Nxz3vyT; Sun, 01 Mar 2026 11:48:18 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772365699; h=from:from:reply-to:subject:subject: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=DzSNYQtUSciN+400OBVCHzF0R0qbJkOjZUozLAN7TPg=; b=Q/gHrdunR5bfcGU/xFTd3WSBdKe3kmdohcSj79PeacFs4HhMYfgzaGM6rzfjm69YwM4kKG N31poBPBG+TGPXo06BM+EbHW6d+R2pf6uoRHVZ0MemTJ0mc+j9rM47W8Kq+5eDARa1n0PY hYhSPhDu+mUi2YNeUiGzNOA/ssPxEfnUGu3JFmcHa26GXHaUEoWHTVdqj6pi2Q+7jnrXfO pLXjmcBAfpE1vqKb5dY4Kg+CwadVPlh+IpoAmMDIgBmN5wFKaJdfXe/cXo5gBTlW0K20E8 foL+IDkVCloliBG1IjHl/e+NCnQGVxK9Wfg+ETO39nBN91l+RdGLsSnIvqVrAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772365699; a=rsa-sha256; cv=none; b=uWcDEUn/XFrP29/rqjsndld3WyGN0WyrBY9+ZXxhifouOL3nekKBWh1rIMlPZSZ2ZWyvDU NXqK1Mc9PBGsMCVmyNeyb2LUtYBYCweOgGShAL6JRnPPgyTVa2dX5A2m3XhjRWUdQYrtY/ AZR5dX52xYpwmVW6024/Pxaq/9kMoPGIIgSdgcIfHJ3BvMFfxvqFFMG6BFSIKYwIlvkeW+ vhshxIeQwxcDOR1FF3cfZt9v8K5IbY1L+7Z8AmkesmYcOeoQbwjfirwZMXXTjvV4OjVsCD 7EwPPqoSPMm47Bw1U9zhcdWFCSWRJ6GAFypJydb/noALipih+AB+TvOu/wTfkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772365699; h=from:from:reply-to:subject:subject: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=DzSNYQtUSciN+400OBVCHzF0R0qbJkOjZUozLAN7TPg=; b=SCsIIZxkTddsPX+I50f/IKiR6+WE5pq49d9GW6dablGnscCY26iVqLl3qFujcknICW15XO qHBR3IHgHhW1cClXPIsMZNoq5F2v31I053hnISaATlVofMlUgTCSuo067xujQj38HGuH9E 1wXDwJeL8ZkqcqiojmboAED2dCbscS/ALeamCXB3VS/R4iioh1PTq7pc6/S5ptcxCn/waZ Sd7mPp6D1SskBiDqLT3ljcRlyoubsYCeTIhczdHlw44kBIzc373Rv0M4TMuwNEo8DS/xY0 lfnmJjTSvAUn9f59PNJsOdDrVCTwT1Tqi3EGjFgCNxAv7mzum3dmUNCpx6K6og== Received: from ltc.des.dev (lfbn-nan-1-698-103.w86-236.abo.wanadoo.fr [86.236.35.103]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fP0gk5SHNzDcM; Sun, 01 Mar 2026 11:48:18 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 01DA4F76A1; Sun, 01 Mar 2026 12:48:16 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Enji Cooper (yaneurabeya)" Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: c2dee7786bf3 - main - diff3: Code cleanup In-Reply-To: <5A228777-56E5-49AA-9F20-99543F397059@gmail.com> (Enji Cooper's message of "Sat, 28 Feb 2026 23:48:21 -0800") References: <69a330d5.44fd2.56809847@gitrepo.freebsd.org> <5A228777-56E5-49AA-9F20-99543F397059@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Sun, 01 Mar 2026 12:48:16 +0100 Message-ID: <86tsuzojnj.fsf@ltc.des.dev> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable "Enji Cooper (yaneurabeya)" writes: > It looks like the diff3(1) code came from OpenBSD (at one point in > time). Are there any plans to converge/merge with that codebase in the > future? Theirs doesn't work. Ours does, and that took a lot of work. They're welcome to merge our improvements. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Sun Mar 1 16:36:29 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fP74F6CjJz6TFxb for ; Sun, 01 Mar 2026 16:36:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fP74F4nMnz3XZ9 for ; Sun, 01 Mar 2026 16:36:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772382989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aQIz2+qpxo2YYCLpag+jInYKLdH2eLa2gC9QhJjLKsA=; b=pnW6g3bqOym5/3dew8qBn2zBYPH7XKEx341e8V7TLS68e6Y8d0MRhwOm1USaPHv4xVxYeg xRkQeMAUSRDzSTtMyMnwAZFNV1mlXvR7sbMzDAMA1foA1N1Z+Lz9vbUZEpAxJTtcTH3o40 mFYoznsXTkyEKphjIGsVOCMgMDzUEcNH2XxzWZcN4ojNSCd1xWGsI30AhzyqorvAIL6cmN I2l78TNQ421UjAtvtbdwnJOMvAnB7O0iHWKhoCC7k4hPRHQo6bwkwZSyMpp2RdYmbZUrHy wHkbWQy7t9251asjZTbDvPU49Z2/PGXZxQthwsQNGmCiVhB8p3XT9kK5jQYG2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772382989; a=rsa-sha256; cv=none; b=Znmshm8xI54Jk/fMgJvL5hwXFlJuZ+LNY3q2FrAm6W06cqWfCNoRUjbaeQ1vGkfkbvbjpO W7DqLyjtFSR/7zeY8ExQVYrfzL1uVqHb5ZrfvJpocqnziJI4mEoNj4nnOprkvzDw9rKwb4 nnHwy1HCXt/TlBh3/COgFPqIhHdtfvNzBYwFPHTg1KDi+vd0Imgab0NpcuIHSW/HMrGSmr yGjcCi7LKQ+wHHDIcnzOB4HdsFB/bpQ4Y2r4qFoMXyvZV9tlNq9SilxNYiqakAnmlRVtxy tCxLK/yAIUZHMKYTRZyd9QAE8IcZVCpxCzaGllKBXXXu1l4RdJkSWpngQ25X8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772382989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aQIz2+qpxo2YYCLpag+jInYKLdH2eLa2gC9QhJjLKsA=; b=nieKKeRWoNSTuIY2ascYcYxBQQNrTt3aHVYHeUlCSW1tf7Tf5wYTp6+BasZb/RyolyrJY2 jJAvMjauTPZJDLGOolUF7MdlH5tcururDrVyts+k8LDLzMDreOMVowoRwW5wtI9+M275wq CvrTlP8S/qHuXs52ygg6s23ZBVTJgX3PNdfyeVVq8df8yar8Xw6XKzL6338meqo/u56aTH DGeAktwX5hldrkRUiSL1zKA2pBAo77hi1Y2/Al85z3yjsMH5Bw7SIaUfcni8sE+Sp0JOQZ FmG4qlq4kWvCYpEHtTvRTXvelkeen8oG2ntKNpwY+aEIrJX8umwWkABIqYphJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fP74F3XkWzxQc for ; Sun, 01 Mar 2026 16:36:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a5ab by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 01 Mar 2026 16:36:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Faraz Vahedi From: Warner Losh Subject: git: 4ba5c9d015f0 - main - paste(1): Utilise STAILQ from in lieu of the home-rolled linked-list List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4ba5c9d015f02eb1fda30de26c23690dd41731fc Auto-Submitted: auto-generated Date: Sun, 01 Mar 2026 16:36:29 +0000 Message-Id: <69a46b0d.3a5ab.5275dbf3@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4ba5c9d015f02eb1fda30de26c23690dd41731fc commit 4ba5c9d015f02eb1fda30de26c23690dd41731fc Author: Faraz Vahedi AuthorDate: 2024-10-08 09:41:42 +0000 Commit: Warner Losh CommitDate: 2026-03-01 16:36:15 +0000 paste(1): Utilise STAILQ from in lieu of the home-rolled linked-list Signed-off-by: Faraz Vahedi Reviewed by: imp, oshogbo Pull Request: https://github.com/freebsd/freebsd-src/pull/1443 --- usr.bin/paste/paste.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/usr.bin/paste/paste.c b/usr.bin/paste/paste.c index 8114a85a869a..fa8be54ebe53 100644 --- a/usr.bin/paste/paste.c +++ b/usr.bin/paste/paste.c @@ -33,6 +33,7 @@ */ #include +#include #include #include @@ -106,43 +107,43 @@ main(int argc, char *argv[]) } typedef struct _list { - struct _list *next; + STAILQ_ENTRY(_list) entries; FILE *fp; int cnt; char *name; } LIST; +static STAILQ_HEAD(head, _list) lh; + static int parallel(char **argv) { + struct head lh; LIST *lp; int cnt; wint_t ich; wchar_t ch; char *p; - LIST *head, *tmp; int opencnt, output; - for (cnt = 0, head = tmp = NULL; (p = *argv); ++argv, ++cnt) { + STAILQ_INIT(&lh); + + for (cnt = 0; (p = *argv); ++argv, ++cnt) { if ((lp = malloc(sizeof(LIST))) == NULL) err(1, NULL); if (p[0] == '-' && !p[1]) lp->fp = stdin; else if (!(lp->fp = fopen(p, "r"))) err(1, "%s", p); - lp->next = NULL; lp->cnt = cnt; lp->name = p; - if (!head) - head = tmp = lp; - else { - tmp->next = lp; - tmp = lp; - } + + STAILQ_INSERT_TAIL(&lh, lp, entries); } for (opencnt = cnt; opencnt;) { - for (output = 0, lp = head; lp; lp = lp->next) { + output = 0; + STAILQ_FOREACH(lp, &lh, entries) { if (!lp->fp) { if (output && lp->cnt && (ch = delim[(lp->cnt - 1) % delimcnt])) From nobody Sun Mar 1 16:36:30 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fP74G5dqZz6TFpV for ; Sun, 01 Mar 2026 16:36:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fP74G4KD2z3XLX for ; Sun, 01 Mar 2026 16:36:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772382990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ztmBm38jg4NyTlikWH5wg1uyDbmAJUzdCS4uJBPdWgs=; b=grNWTMbn1Aj6bon8Jb74IJKU9ju4nrDEz62QwA9jlRSFidh1q0BcKfGpj7NKyRg5TF6M5R +cOoySpFNsG4Vfw5cjRBU4yNsOBpe2Ont8i8QC+U9TajRvTFRnPqeWifcvPqUOQn/RjQDU auxke0QGdP2nceFrfPILj9u2tD4YqREx/BjSxwyavq3FjCask72loAihli8t2FwiYiW3QC HRDRnOzN6lwWWSUHszPKZjrncortBS0Z9V3Ls0VtkngUDsdJ4vb4Wcu1C/1VrQ2gVnLdVd PsZHZEe368sD9zKkRXpE0iXc54BFiL9585u0ytje8x/kuWUAoTYnQ6QkwRs2sQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772382990; a=rsa-sha256; cv=none; b=A/1bCD8gvBSxb2MXnGYHRKTHJJiiIaTrQLhzU/48q37kpoWeefLvMNMTOXKQRUrEg+mUaa b6cCCIkWsFUHsz/EXyWe2oSudkWtSRFYVah7Ozd70Kywsdwk5UJKelyYic/35Qy42ZUmJx lYp1frGnnhUaJ+aAmm0tBou2pa5OfOGcDq6x7AZUv9vzEMfAfjmIwApF/my1J48mcThWXk JxniGozsGsxNi2U41rU4gZm1Cdck7AnqN8JsKQmpcJzVS5/rMeViuGgxqSqlROPpimGPxE 24PneahFA+Z+2Zl+r8I5v1yNjP+6gaq2uFvNu+vxvBCCyb8vuWf9WgBSr6lTHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772382990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ztmBm38jg4NyTlikWH5wg1uyDbmAJUzdCS4uJBPdWgs=; b=BY59kOZCiCzP5vO52oiiSxXHGqh+yHH8bvFC6xbJQrJrL9cb7ZxHG/UbDUMJYzTnXK6wit DwE6OG+XlN5n+3upyK+FExztvhbedDNp2DI/3JRK1H/Etw0WV4mLrTxVNAJboAcH78rtkF cT3Il1bsPih/Fu6BA4TDk5ekyapPO2Y3WPGeb5ftFRHdu7YCfaDY3jJAMOoEm4cgwJBSlT k6OpxzluBSkFq2yd6IA5BG41mMvZFfp1Giw/VrPeV/BSC8kiT5zXcPaO8/mDA5gdeSe1jO YQyr5a3WSZXHPycRClCiFZJ+ziOT37zjKbtGBk1RTeKiAUSHCjdc7EXqvtCX6Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fP74G3tLKzwtT for ; Sun, 01 Mar 2026 16:36:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a995 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 01 Mar 2026 16:36:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Faraz Vahedi From: Warner Losh Subject: git: 2e01fc43f23f - main - paste(1): Make small modifications to improve readability List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e01fc43f23f0e960dc08984ffaff2d1e6ad5cea Auto-Submitted: auto-generated Date: Sun, 01 Mar 2026 16:36:30 +0000 Message-Id: <69a46b0e.3a995.5c297bcd@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2e01fc43f23f0e960dc08984ffaff2d1e6ad5cea commit 2e01fc43f23f0e960dc08984ffaff2d1e6ad5cea Author: Faraz Vahedi AuthorDate: 2024-10-08 18:09:39 +0000 Commit: Warner Losh CommitDate: 2026-03-01 16:36:15 +0000 paste(1): Make small modifications to improve readability Signed-off-by: Faraz Vahedi Reviewed by: imp, oshogbo Pull Request: https://github.com/freebsd/freebsd-src/pull/1443 --- usr.bin/paste/paste.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/usr.bin/paste/paste.c b/usr.bin/paste/paste.c index fa8be54ebe53..39e2577200bb 100644 --- a/usr.bin/paste/paste.c +++ b/usr.bin/paste/paste.c @@ -99,10 +99,8 @@ main(int argc, char *argv[]) delim = tab; } - if (seq) - rval = sequential(argv); - else - rval = parallel(argv); + rval = seq ? sequential(argv) : parallel(argv); + exit(rval); } @@ -118,7 +116,6 @@ static STAILQ_HEAD(head, _list) lh; static int parallel(char **argv) { - struct head lh; LIST *lp; int cnt; wint_t ich; @@ -244,7 +241,8 @@ tr(wchar_t *arg) default: *arg = ch; break; - } else + } + else *arg = ch; if (!cnt) From nobody Sun Mar 1 16:36:31 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fP74K156Cz6TFxf for ; Sun, 01 Mar 2026 16:36:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fP74J4rZwz3XXX for ; Sun, 01 Mar 2026 16:36:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772382992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HCxszVFOsMCwHEZLlCZswBBfY2OBE7UWzwB92wSktiU=; b=u2ukrDUct+cY7H8CNTJBqrvxw/a9GHgGiG3ZjLigxNbRhMNVht2JNoTXH0V3IhjDfyvdX0 rEjQhAwRl+j48wDos21ZjexrQAO6gIGXCEtoQkHBN4k42V+PjVd+TsTz5k0FCiJ13tJtLr wHfsc4lVGfFTFOo97h+t5pAEgSmMBPaYMw1/qO4XaucCtvk4I3v/bTaDA5eu8x+H6RA6vm HSB2AQlGnbkHQbPv/PfWnkkHjDR5r+K4DYFEEbLMSyQin21Dk2ytEVI3LpT8fqzlOoeyvg W/ZUVOgFPKP8kffCbs9uOHkz+5h6cjgaDwBAmyZZHHRSFnvNes+N7Tb3fgN0Ew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772382992; a=rsa-sha256; cv=none; b=rfqgXpX13/MWrbiLlu8H8zdENA+4sMmYb616LeEl44vius2q4MtWv9qgKaFOxUEq2B3Z70 Eot9om0jcOGFicC/CVJluuUNLpgKxVsgFuJcZnyEgxpMTtgYElpuBYxL+ujWmCYYSBxszE jtI9FjalwQiVXAPAgrscxC5IWQwY2T8ly3boUiajt/rPnl+EIknuRBXmgZGIMD2IXy4n3q rEtxpCmclnJl3m36BIWyco24nF43aPxg1h9UMl8+1ls7rD7Z4ZrIbldzbi/ZdzTJzOxQqi FZHmGxPhK8onbseHG7tEy1N7p/+R4RgCP+8T6j2F0qQ5Msvc1MUrxhOCZsbYTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772382992; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HCxszVFOsMCwHEZLlCZswBBfY2OBE7UWzwB92wSktiU=; b=EpYUXUD7q9NumvnKzfAa9bQ5R/SrfGL1iy4ZESp2bFHvcLUKo52h6CWsxl53EWZBMSHrjD NWrcT9ox9HMNlFuMOb/IGohhvnXposd+KKFlBajjm0yRNWIX1whD6QtHcyBPHj8lHW5ldy 224jIgcKubOeLJ0P3GHMw4JbYp/THTuExIobS12pm2sQcvsNU4YYFk+WrTXhCgvrwr8ijg ho3rsOT6mWEUwuxUiCxWcla0a1Kl6zLkb8XS97+4ZMF4dEKQ8zSQZRBb4wGfGa8YXvzJRZ Viq1NajlJxUz9Co9Vn9pCzcTa1cQJ0NPoLgiWMH3ovZkw//URTB7q97nD59xcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fP74H4j7Pzwyw for ; Sun, 01 Mar 2026 16:36:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a99a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 01 Mar 2026 16:36:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Faraz Vahedi From: Warner Losh Subject: git: 452ee04d62e2 - main - paste(1): Capsicumise List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 452ee04d62e22fe923a0b616076715dad0166c98 Auto-Submitted: auto-generated Date: Sun, 01 Mar 2026 16:36:31 +0000 Message-Id: <69a46b0f.3a99a.a05274e@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=452ee04d62e22fe923a0b616076715dad0166c98 commit 452ee04d62e22fe923a0b616076715dad0166c98 Author: Faraz Vahedi AuthorDate: 2025-08-06 13:31:06 +0000 Commit: Warner Losh CommitDate: 2026-03-01 16:36:15 +0000 paste(1): Capsicumise Signed-off-by: Faraz Vahedi Reviewed by: imp, oshogbo Pull Request: https://github.com/freebsd/freebsd-src/pull/1443 --- usr.bin/paste/Makefile | 8 ++++++++ usr.bin/paste/paste.c | 32 +++++++++++++++++++++++++------- 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/usr.bin/paste/Makefile b/usr.bin/paste/Makefile index e4f9e6d817b5..33fcb91db84d 100644 --- a/usr.bin/paste/Makefile +++ b/usr.bin/paste/Makefile @@ -1,3 +1,11 @@ +.include + PROG= paste +.if ${MK_CASPER} != "no" && !defined(RESCUE) +LIBADD+= casper +LIBADD+= cap_fileargs +CFLAGS+= -DWITH_CASPER +.endif + .include diff --git a/usr.bin/paste/paste.c b/usr.bin/paste/paste.c index 39e2577200bb..cc029e20ea9c 100644 --- a/usr.bin/paste/paste.c +++ b/usr.bin/paste/paste.c @@ -34,9 +34,12 @@ #include #include +#include +#include #include #include +#include #include #include #include @@ -45,11 +48,14 @@ #include #include +#include +#include + static wchar_t *delim; static int delimcnt; -static int parallel(char **); -static int sequential(char **); +static int parallel(char **, fileargs_t *); +static int sequential(char **, fileargs_t *); static int tr(wchar_t *); static void usage(void) __dead2; @@ -62,6 +68,8 @@ main(int argc, char *argv[]) wchar_t *warg; const char *arg; size_t len; + fileargs_t *fa; + cap_rights_t rights; setlocale(LC_CTYPE, ""); @@ -99,8 +107,18 @@ main(int argc, char *argv[]) delim = tab; } - rval = seq ? sequential(argv) : parallel(argv); + fa = fileargs_init(argc, argv, O_RDONLY, 0, + cap_rights_init(&rights, CAP_READ, CAP_FSTAT, CAP_FCNTL), FA_OPEN); + if (fa == NULL) + err(1, "unable to open system.fileargs service"); + + caph_cache_catpages(); + if (caph_enter_casper() < 0) + err(1, "unable to enter capability mode"); + + rval = seq ? sequential(argv, fa) : parallel(argv, fa); + fileargs_free(fa); exit(rval); } @@ -114,7 +132,7 @@ typedef struct _list { static STAILQ_HEAD(head, _list) lh; static int -parallel(char **argv) +parallel(char **argv, fileargs_t *fa) { LIST *lp; int cnt; @@ -130,7 +148,7 @@ parallel(char **argv) err(1, NULL); if (p[0] == '-' && !p[1]) lp->fp = stdin; - else if (!(lp->fp = fopen(p, "r"))) + else if (!(lp->fp = fileargs_fopen(fa, p, "r"))) err(1, "%s", p); lp->cnt = cnt; lp->name = p; @@ -181,7 +199,7 @@ parallel(char **argv) } static int -sequential(char **argv) +sequential(char **argv, fileargs_t *fa) { FILE *fp; int cnt, failed, needdelim; @@ -192,7 +210,7 @@ sequential(char **argv) for (; (p = *argv); ++argv) { if (p[0] == '-' && !p[1]) fp = stdin; - else if (!(fp = fopen(p, "r"))) { + else if (!(fp = fileargs_fopen(fa, p, "r"))) { warn("%s", p); failed = 1; continue; From nobody Sun Mar 1 17:06:28 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fP7kr5YxNz6TJGX for ; Sun, 01 Mar 2026 17:06:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fP7kr3867z3dD7 for ; Sun, 01 Mar 2026 17:06:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772384788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Herdu/JSLr6GBcN8Hhd/dsfu3/sBzlw8596Ta6m821U=; b=iBVP6efsc4qAuZ7Fsxr0xX5CYvmbW9fjzHAayhfNI+kwhlplvLfd59jawCOULVyNt1UtRo svnHwDJFjgQMwTIHmdtn27sa4bOs7tynZZJ93RxCfDyq4iz3U9qeppFfgiml2/q3pRtNy4 t2HhvbOIcdOkc3vhJFwhcZUV22qnM9C6PqnyKpp2uB8Rn4wBxgmQaB4ppzHUPLncU3O3mn vcps9Ks1spJBB5k6z+dk2bt7nI5KEPBvRN3y/9hWf4QumFvoQSlp1WSduGGUkHv0E3bGzb 4M+LUNOwWFrgtEF8FXZHvV78L5LB7lTO/zeY8KXn/c2iRAmgZfw35hevIHMJsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772384788; a=rsa-sha256; cv=none; b=DELKNGiGmV9+GDGZ0+w3sx1ifEEmyRtJPc3BRM8gpshNTYX/7muD+2maY9Z6GAizJQgydM Pao8hMDlWYxk/rNa7gs7sQb3c/wk+1NNsEsySTmwNQH5eEHJprQDKgZFvmZUbyWNKWrkyT UCgbbHQa2CU7W77i4Q/Z9+tBzyZoKehCb3xqzw/y0p4npv5bmRlu5UdNiuJ0rOcruECU/9 b+MlGdN6gwbwVvE+/4A0CiptZsS5HoqmRjxrw1KapMZigT46/hgLqdliLABbr1ACEFmjgl DCFh8q+szMkk8xAMwtiIE0FW2TXichiYrqCVq/W5ufvUmKzfBVhx8TWzNwOEZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772384788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Herdu/JSLr6GBcN8Hhd/dsfu3/sBzlw8596Ta6m821U=; b=XAfDQlJ7YYSXS/iSLmnQOsde38b48UdfihXqOVnwS1bwntlTW7ATAcsNpeZasa0XZRItwq uU0DNzudQZ0536sFTQviPDEIP5Bcx0eQIHgKO6V/dhH0q87xG34f5MXAX/yFJUstJYdGII l1oQLKNmQHTDaP71mbajaGdQqzec+BIBzGLMruFSWKFszvjRc7EPcnCnuPuuXGDIt6XbHl vzpr45S+EtckSOfiTcOQx5X1CiUHBQmhBj9DIRAUHCpedpntoNev4/NLq5hubna9yPZc7i xg7iSv7du1RdyimqJXOtaHRav/8S9MwR9gHX86YZ73mELJ9MCI8o5vs9o6Gb9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fP7kr2JTWzxTM for ; Sun, 01 Mar 2026 17:06:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ce5e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 01 Mar 2026 17:06:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Faraz Vahedi From: Mariusz Zaborski Subject: git: 4a4c88533712 - main - from(1): Capsicumise List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4a4c88533712f98a6b8fa04acb319f26aecccc3c Auto-Submitted: auto-generated Date: Sun, 01 Mar 2026 17:06:28 +0000 Message-Id: <69a47214.3ce5e.51938112@gitrepo.freebsd.org> The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=4a4c88533712f98a6b8fa04acb319f26aecccc3c commit 4a4c88533712f98a6b8fa04acb319f26aecccc3c Author: Faraz Vahedi AuthorDate: 2024-11-01 11:03:56 +0000 Commit: Mariusz Zaborski CommitDate: 2026-03-01 17:03:13 +0000 from(1): Capsicumise Signed-off-by: Faraz Vahedi Reviewed by: imp, oshogbo, markj (previous version) Pull Request: https://github.com/freebsd/freebsd-src/pull/1491 --- usr.bin/from/from.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr.bin/from/from.c b/usr.bin/from/from.c index fb194dcc72d0..da9c6a7583ca 100644 --- a/usr.bin/from/from.c +++ b/usr.bin/from/from.c @@ -31,6 +31,7 @@ #include +#include #include #include #include @@ -102,6 +103,9 @@ main(int argc, char **argv) else if ((mbox = fopen(file, "r")) == NULL) { errx(EXIT_FAILURE, "can't read %s", file); } + if (caph_limit_stdio() < 0 || caph_enter() < 0) { + err(EXIT_FAILURE, "capsicum"); + } for (newline = 1; fgets(buf, sizeof(buf), mbox);) { if (*buf == '\n') { newline = 1; From nobody Sun Mar 1 17:06:29 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fP7ks4QtLz6THVd for ; Sun, 01 Mar 2026 17:06:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fP7ks3KLhz3dLh for ; Sun, 01 Mar 2026 17:06:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772384789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rme+xbaLX2T7YMAs3F06iQmdm/X7DeJQVEKEjXbeUjE=; b=owZuQ32txYKSlTa9nDyeBmOWGG4tBaJsrOmv2JtrICN4kB8Ce/RPeWuu388cj2gw30raJT oBnvk16JsyzyooEQfCVfiemkC+7lzRnpaeIkNJPMAGSgcedfya51TrolE+0cmMMioeZw/+ REmrWioaN7jcY91UI3SsNJwY9MjlHuxZfpNa+j/C+PLKuLrTav6AemAVhiIK4duUjIbwbK KU9ZQIj+RvYsvNDvMcxiB4GvWVjSEUEP4j2ue+TYHJWAgxWCOGUchYwRhwM9o0d2Vz7R8x tkdnbefe4bnAqOUfKBCseQP1uj3PCj50j9ihXLP0Uz2A0KoaNPT2x1R+errM6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772384789; a=rsa-sha256; cv=none; b=G80JhPGYgNLCO/RHceVd6YFWhVMFSIuF5/n/4xob+kzIYJAeYtTbPG55DOwSMUgfpbpILS WFWc+F6FG3ENwU3LGluVFyPvFi6QpdaQeMZpSetwoP7UR+jBDoMwCFHhJTn5oXPexyTeY3 r3eXTMLSaNqtDKvO4rF+BjxsiQpEtHNJpAQwH5fWIqcQPn+SBoJKxL7K0c6JxRXR52IOOQ S3ZReOcNrYY8loUIcO53+Yx5XfSFSMxUEHOU1D/3zoUS6eJ3bx5vM+6YdAwxUz5PzcTdHL 4TMtUkDHaMpHrlElTbU+a37AP95azW3rUxMRqj52Gp2cNE0s7IpXSi09P0UU2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772384789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rme+xbaLX2T7YMAs3F06iQmdm/X7DeJQVEKEjXbeUjE=; b=ieXnzuDNW2jGAf9wsKD4nJUuDi3Kdj8PmtQeTt2g+3ZNj79JKqpkmmzxQuSox6eDquVE8r xINHOBHY1LmQBO9DH9Q2QGWSO+/G68GH5Une5wau03SbaJuAm9KOiasRTfd6GIWeJltB41 M3bcrGK28iqblVI6rAcd8+/2XLZAGMbnnFEJLjH+2f9GbmtIDyZ9kBuHSeZaVvbPaoM5jB DwEuCMQUYsVhTJyh8p5kNI+kR36e0O6VfxGWBXTA9Gqcdg3NLsMhV7GuIBWcaI7kuA8UNx vlwaSyA5AKpMspm08HiEw+FNvyVFF8Jrov3W4HD3x5gExEPSUBlCR8aice3VuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fP7ks2tkXzxwL for ; Sun, 01 Mar 2026 17:06:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3da88 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 01 Mar 2026 17:06:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: ffe7d45d295c - main - from(1): style fixes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ffe7d45d295c553ed90ad3b5cc67111450063741 Auto-Submitted: auto-generated Date: Sun, 01 Mar 2026 17:06:29 +0000 Message-Id: <69a47215.3da88.34c22ad3@gitrepo.freebsd.org> The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=ffe7d45d295c553ed90ad3b5cc67111450063741 commit ffe7d45d295c553ed90ad3b5cc67111450063741 Author: Mariusz Zaborski AuthorDate: 2026-03-01 16:56:37 +0000 Commit: Mariusz Zaborski CommitDate: 2026-03-01 17:03:13 +0000 from(1): style fixes No functional changes. --- usr.bin/from/from.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.bin/from/from.c b/usr.bin/from/from.c index da9c6a7583ca..63eb69daf36a 100644 --- a/usr.bin/from/from.c +++ b/usr.bin/from/from.c @@ -99,7 +99,7 @@ main(int argc, char **argv) /* read from stdin */ if (strcmp(file, "-") == 0) { mbox = stdin; - } + } else if ((mbox = fopen(file, "r")) == NULL) { errx(EXIT_FAILURE, "can't read %s", file); } @@ -122,7 +122,7 @@ main(int argc, char **argv) } if (count != -1) printf("There %s %d message%s in your incoming mailbox.\n", - count == 1 ? "is" : "are", count, count == 1 ? "" : "s"); + count == 1 ? "is" : "are", count, count == 1 ? "" : "s"); fclose(mbox); exit(EXIT_SUCCESS); } @@ -142,14 +142,14 @@ match(const char *line, const char *sender) for (first = *sender++;;) { if (isspace(ch = *line)) - return(0); + return (0); ++line; ch = tolower(ch); if (ch != first) continue; for (p = sender, t = line;;) { if (!(pch = *p++)) - return(1); + return (1); ch = tolower(*t); t++; if (ch != pch) From nobody Sun Mar 1 17:06:27 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fP7kw72l5z6TJ80 for ; Sun, 01 Mar 2026 17:06:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fP7kw4mg3z3d89 for ; Sun, 01 Mar 2026 17:06:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772384792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ySY3wWKSQIUfL1VbaoDeyR/J7SPrZhvI4UCBkJenqY8=; b=UV/q9YxtK+47FR87aQMCkJYQ74DB2NoXquFm87VcvtuJ1NZozQKm1oF68hibpTUU6l8/37 urR3Crt0oGVm439HsWDObJnOLho6Bl2K622sTzZCORZI+5uhQ/MFsAAzc2I9osV4SjyDJV rr6OEcp9Vyj22Au7I1eEdkUb+ZvS53H7rw1wmguX3Gj/xAqOogbZsFRzL+ji+VG57QoRJs HE+jYUtc9DX+Lq/qw62kbIo/Tl0O5mqfBqXc7djRcq50Dx2ZA3GYt4OcdP6iB3I/LpYj53 01ZaHXcZER3e9PklK69GzYBKGsHN5K7aniGTBv315Xokq+i+VlqVlPonfgHAsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772384792; a=rsa-sha256; cv=none; b=D+7hKB5H+Xs2M5VUmljMSVgutB1rQIaFU0zpDv0pkMXzuenn4xLZysCSjrNBfvxA77cLa/ uuJoE0+WQWkjXCcByECpIAqeikj2OcC2mhk2EUcBkP9Q8BALwR/NSQ2LY5XSaUn2SRF/Ho zpBkex4TFBQya4T8/dQzUpOIrii20e2ZCRRI/B8k3r1yboLvOtUVkvH1BAlfA1x7TC0s1T OnI8/KpJEYOIEkzVV7tGrCcyIxpVRhnOl4mODaelbuFvkNOOjj/2rCrFJvkEBOEyr/Xth4 Owduq9WXxKo3lsWHW29x/zG/a5/YvQYwFAzDibq60LO5N3r5r0sphRVQcNzUgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772384792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ySY3wWKSQIUfL1VbaoDeyR/J7SPrZhvI4UCBkJenqY8=; b=E6yY7IxPS7wXg6l6DjLB2rLPuQvRiwZs3PI8BxVk09IdapEHi/4s1LUt2eOTcVnOwvY+uv A8bzBFC60DhO2mlyJMtypgFwKDW33FZxAar4EZvp7oqYQLSyKx6P2IHVUT48fq47ZpgQIc Rtao76SYvAciFf8xJ5xIroCDKhszDKX0wHkgWlsg5QsxLMgoKH/bhLzR2CaYM4Idqus+Di /RXMlE6CnTY/wdgdq1ryy7QJpuoIp9eOdQSpe6O1InJ/Rv72y9ktxt2u4h2g8Jz4dGf97s 5q5BqNwlGqb5GMNtMpxImMEaKdHfkD2Z11O3xhhs+6hs/jnIJparoN6K1N/RgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fP7kw35JKzy5X for ; Sun, 01 Mar 2026 17:06:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3dbbd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 01 Mar 2026 17:06:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Faraz Vahedi From: Mariusz Zaborski Subject: git: dde5113f470a - main - from(1): Replace magic exit codes with standard macros List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dde5113f470af34bf917ca2690d89c94dc8d6db0 Auto-Submitted: auto-generated Date: Sun, 01 Mar 2026 17:06:27 +0000 Message-Id: <69a47213.3dbbd.32c6f3f7@gitrepo.freebsd.org> The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=dde5113f470af34bf917ca2690d89c94dc8d6db0 commit dde5113f470af34bf917ca2690d89c94dc8d6db0 Author: Faraz Vahedi AuthorDate: 2024-10-26 15:28:07 +0000 Commit: Mariusz Zaborski CommitDate: 2026-03-01 17:03:12 +0000 from(1): Replace magic exit codes with standard macros Signed-off-by: Faraz Vahedi With minor changes from committer. Reviewed by: imp, oshogbo, markj (previous version) Pull Request: https://github.com/freebsd/freebsd-src/pull/1491 --- usr.bin/from/from.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/usr.bin/from/from.c b/usr.bin/from/from.c index 031803ebae16..fb194dcc72d0 100644 --- a/usr.bin/from/from.c +++ b/usr.bin/from/from.c @@ -30,6 +30,7 @@ */ #include + #include #include #include @@ -99,7 +100,7 @@ main(int argc, char **argv) mbox = stdin; } else if ((mbox = fopen(file, "r")) == NULL) { - errx(1, "can't read %s", file); + errx(EXIT_FAILURE, "can't read %s", file); } for (newline = 1; fgets(buf, sizeof(buf), mbox);) { if (*buf == '\n') { @@ -119,14 +120,14 @@ main(int argc, char **argv) printf("There %s %d message%s in your incoming mailbox.\n", count == 1 ? "is" : "are", count, count == 1 ? "" : "s"); fclose(mbox); - exit(0); + exit(EXIT_SUCCESS); } static void usage(void) { fprintf(stderr, "usage: from [-c] [-f file] [-s sender] [user]\n"); - exit(1); + exit(EXIT_FAILURE); } static int From nobody Sun Mar 1 18:07:29 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fP95P6zdWz6TRNP for ; Sun, 01 Mar 2026 18:07:37 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fP95P5f90z3lk1 for ; Sun, 01 Mar 2026 18:07:37 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-824a829f9bbso1634125b3a.0 for ; Sun, 01 Mar 2026 10:07:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772388450; x=1772993250; darn=freebsd.org; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=SFZXgfDPp2goYleTOPmGRGo3YmCTEYJxbhm00F+yfYg=; b=R0xr/tT1SpnOFzeJ9Egqjv8/ub9be3sMIvOvFhCgDYcDmL/5NnFOF/a/xHnbu1+H5G kEzmd8z9AzKtZOZAc+SejgDYfGcLPT3s8p1P2sD0jOeHDw349BljGIxPeu3+lT+p6gNb GyS4Yw3teUab0OW5qYwi26noeVXr0IuPta0Bbcli0CDlnFDnl+VQLTntME9sdDDW2/EN 4z2CF+ifrQKLncZeReaqOqmdIE4B3ylh9cSmAVT0cFSvOTzXuLkC/C3qCKAFv8rNuBHx ZiVrFW/RpUTqBpQFHt0xAYdw5sFxgi5jshhAvRgPcMH9g/kkTbmNkSobn1j/jrT19vx8 QvFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772388450; x=1772993250; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=SFZXgfDPp2goYleTOPmGRGo3YmCTEYJxbhm00F+yfYg=; b=JkBM9GcbnVM1mS8YeQvzLuIAxs6HV5VBqD++xsahTkuDUJTxfNKZQY4Y7bEtGLKWgI hqaC5rEMtxm/DKK++BfYVzbxGIodMcRDqt7a5ra+MESXOP5aWguQXml5KYBJ0w+GgHzs omj3fONbtDwSDsOpPik/jeTufiR40w77rJXW8tjiKPBjzcNqgw6o+NJPrzV1kqIMu0Uh UA0KqsBJX0ZZy6lAewxbVRJtI0a4rO2uiwFB0NrfzpfRrOrUX6DH8uU7v+Lc7Fdr2CS0 A2JQXmdO6ko5HXAnPFy32amB9fV25nkYqXzhp9FwvuOozBreoAgD6gQ7KXN1s9hMfzXf kpCQ== X-Forwarded-Encrypted: i=1; AJvYcCWOYmD4RMbHrCR7e9lqinhooH0zYKOR1/5ujqgkRCDMc2ypOlWqYzJQ4tYN1Sko0b5Y5IAy2CdoczShy+Q7AIINlGxe@freebsd.org X-Gm-Message-State: AOJu0Yz629THQkOl05cSyNXF4aXlQevaWpODt2+/3Iu8LoxB9w39zdBu f63UZkG7oqUq6XeGSnLTmL1T36j0l7OspSwB6qw/KeAzjVJWWdPM0xn2d7gYioes X-Gm-Gg: ATEYQzxo387hQAP7KB+CApmah7q6pzwTIF0NLCMl8v3FvbLZOIQ/xzRgg/5/DlWh5Cd Xu2i2LVlFvfaBs0tfLRWwN2PAHRGthQJjjZSd2WO3iRqDeIJWpXNrz5ExuLNGkxjDfjPX+U/hwX +EOxoWIARvnrL69WFctApQhTQmOg4cmWMwocVxGlhYEGWWYw6YS4GyeP2Yxt0sgb89uh+lhS25H hGDDgId6cR5RfrK93iLmid3cQa6B/CPj4C0UEDJgPI9wD9cRAlF4yRxxbncc4VQmrfOk6vUonIy PjvxGzy7ZRM0c2vWAf5FLwwYgWdlkUYN8NDZMp3A+JwTs4BclBXVrzMSgcGlKQBieedJOI2Zpwk QmaW1T1ZXOpgixsycOJIQlibTmkH5IGSX38NIWF24RFC4wix+w3u2/EVbXk2kUYIukjFa/NJ8v4 4Eu1wdYyqXXcU/xQ5hHoF/EerV5n1j2k1bQ7dlQvISONl69Q== X-Received: by 2002:a05:6a00:3e1e:b0:823:f74:662f with SMTP id d2e1a72fcca58-8274da093aemr8620723b3a.51.1772388450032; Sun, 01 Mar 2026 10:07:30 -0800 (PST) Received: from smtpclient.apple ([162.118.1.182]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82739d8805esm11308424b3a.16.2026.03.01.10.07.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Mar 2026 10:07:29 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Enji Cooper List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (1.0) Subject: Re: git: c2dee7786bf3 - main - diff3: Code cleanup Date: Sun, 1 Mar 2026 10:07:29 -0800 Message-Id: <5AF72509-9232-4B17-853D-A12D9862C422@gmail.com> References: <86tsuzojnj.fsf@ltc.des.dev> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org In-Reply-To: <86tsuzojnj.fsf@ltc.des.dev> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= X-Mailer: iPhone Mail (23D127) X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4fP95P5f90z3lk1 X-Spamd-Bar: ---- > On Mar 1, 2026, at 03:48, Dag-Erling Sm=C3=B8rgrav wrote= : >=20 > =EF=BB=BF"Enji Cooper (yaneurabeya)" writes: >> It looks like the diff3(1) code came from OpenBSD (at one point in >> time). Are there any plans to converge/merge with that codebase in the >> future? >=20 > Theirs doesn't work. Ours does, and that took a lot of work. They're > welcome to merge our improvements. Thank you very much for the reply, the explanation, and all of the hard work= making core utilities like this function. I wasn=E2=80=99t aware that their version didn=E2=80=99t really work; the RC= S Id in the file was ancient, hence the question about reconciling with Open= BSD (I thought there was a chance that we could maybe leverage some of their= code/fixes in the future to reduce maintenance effort). About the sysexits change: is there a reason why it was made? I=E2=80=99m as= king because another recent change made by an external contributor introduce= d sysexits use, whereas this change removed it. I want to understand more of your thought process and which way userspace co= de should be moving in for the sake of consistency, so I can follow similar r= ules as needed, enforce them in reviews, etc. I don=E2=80=99t want to clash w= ith other developers unnecessarily (I remember sysexits being a point of con= tention with some developers in the past). Cheers! -Enji= From nobody Sun Mar 1 19:03:47 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fPBLD1B0kz6TWQy for ; Sun, 01 Mar 2026 19:03:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fPBLC75XZz3rDy for ; Sun, 01 Mar 2026 19:03:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772391828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vKNy/pbPnCHtUnIWMWcUkBQYXC+kvXJ/arYiJATPI4I=; b=gjsWbba+XnzoegUh9XQqDwtqcxXVXvniBiNhAAO0yEw6f6chftGNZ3YttBUqow9EE8Ot89 GKf6E/GBK17QZtyRjBo83/hV5H5hD93rBPRNUGJhLstZdKe8hw1tpbMPXh2wYiE/R21xER Qqm+72gnN0XEJRe/rkikcp0S+7QOyMVHrtN0fdoAXfUJm8YrPUnpz+5TlhbOxWf56guNdN vCMHwfZ5wl9SqNXlD2UYjBvFhxYQJ8uMH3CgnmscNw/c/6nwS/6eHUNqnAlXaVTVGz5OeM 7iYf+1Vsx9z+N8vZ/183v27gy9+4HrJoHXTZRAraxe5KvobUZY1ibo7T3KE7dw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772391828; a=rsa-sha256; cv=none; b=hRzP1GtxVMIqTS4OdZNr2ToHuwUFeAd/XH21t94Kz2BsUrab4dWVoi1n5nx2j/Q/fBAoJF 49CT5akPZEZf6JRM3XhRdt3ffKMMyE+BjyRlIGNclAyx6p+PtFjUnx1UiVm3YuySSfOFfK qRrqfGKdkzvLcKFwEZOpuGIhyQLX9OTJX5oj4W3ODSRZk2wnnX4Y3cYXfE0VImgnkV25r3 6J0nIKt0MHchqi0O4mWV1Be2PKZeh8JJD5Qbbj9BB0glwEtOTSiTfIR1KjvLWpj28D2Drs 4UICzg5fPxcqr10x8SEC4hKnghdKYG5rupMrcCHjGET8qA+8W6yoXNG2sNotqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772391828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vKNy/pbPnCHtUnIWMWcUkBQYXC+kvXJ/arYiJATPI4I=; b=mZ7BROtE8foR32rKaPS3FE1KnXeE9noVK5n9RQwXTboAUqiCfwk2jtMEMJmK/5X7UnGcVM YC6wBNfEZIAe/8VH0JBNzB6KR4gz4jszrzCsuNbvHsYp48Ikk0JZU4TZ+yKMuIIDUj1vfl 2fLmJPBU7dQekiJE+iRB+TCrj7pHb5TEyzj6PjGjh7TcYrqIQX6AQg7kvcFmjAMxzjLavt YjMuB0TcMPrXsA1kudkuU7498bYlt+ogsB/OTPbn0v2rzOxpS6ysk8DSfbfg9Co2MT2wYL uMFdNOvpCTWSnvNuygUzBD2S+2ihp+om/SUyL8P65aXFSoadbPqli80E7L+QUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fPBLC6hnkz11pT for ; Sun, 01 Mar 2026 19:03:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1965b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 01 Mar 2026 19:03:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: e81e724358e4 - main - asmc: output the SMC firmware revision on attach List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: e81e724358e43dcf951e244a9df9df3eaa983fe9 Auto-Submitted: auto-generated Date: Sun, 01 Mar 2026 19:03:47 +0000 Message-Id: <69a48d93.1965b.3c23c832@gitrepo.freebsd.org> The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=e81e724358e43dcf951e244a9df9df3eaa983fe9 commit e81e724358e43dcf951e244a9df9df3eaa983fe9 Author: Enji Cooper AuthorDate: 2026-03-01 18:54:56 +0000 Commit: Enji Cooper CommitDate: 2026-03-01 19:03:38 +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 --- 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 cf977071cc69..726d52874026 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -51,6 +51,7 @@ #include #include +#include #include @@ -935,11 +936,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; @@ -1039,10 +1046,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 97e5076455c9..5afc1012849c 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 Sun Mar 1 19:05:46 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fPBNc1K3Xz6TWPm for ; Sun, 01 Mar 2026 19:05:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fPBNc0WP1z3rVh for ; Sun, 01 Mar 2026 19:05:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772391952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o6lcWvRbYE5eOBcjRAVHXEvObLuCWxOn/q8ZtR0D4BU=; b=szY8hveFuoMyABfOsIu5DrGOkHLGtltHhf/NgB54Z8Dl8hY10k4gAHdM/tMOKzcacis2aa 3zRTiw99cJeGBEWaNGXsLrmUiWxJTgPaP5Tjl8v4ZPCTe/Jd5TM+kMnNNLNjUK8v63TG6z v6G6YYk21BqciLGrzE99qtB4030W2e8OmraIEF3ZDU6kJiajkefi3RG/cXr9Nk3g2OFDos 7TyB+zJewEM2+zgaSMQm5VXX8R3wx0IBPCwXAlcwiryGLQIzExFhoZrUhSbTwP4cHFczI+ Fx4PO3qylCHdi1DX4nT8PG4y6toPV0OiYCT7Suj72lfZoyII6ozyA3aMBVVNCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772391952; a=rsa-sha256; cv=none; b=k77odcoh9xf0eU6AIPEHZD08dY1QdP5BW9oAeKzC7k+ntmoffVjBVNXvq9yKDpRYkjlR0W NLwIqFvXsCrFufqyFNwQrQjz7obLN1ja13FW3+AsVWKGqLsC0syBjXV4YGJAIZgjgFgjSB Jhrd03bvp67VqdWGJByMH0bYJyKboxs7cKic3g2k+bRV2RAB0cF1Qo1mBD/JXRS/p4PfL6 lssdsBd8Bsn+3U8cYfuecS54zIjzdSv/TPBNmmVVEWl9CbZJceZSbXh0oAs3921cjXIUCe AZgMxzRyJHasz0VKetF52JJ8H87u+hgSjOp07qVySg79crjnVL7gmFRiaQ3zsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772391952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o6lcWvRbYE5eOBcjRAVHXEvObLuCWxOn/q8ZtR0D4BU=; b=Nj+TjR3gDqoh95c58Gt/ttgnf4t9tUSuVbaasXhVHkNn751f1vlvW8yXVuisepNC/ySHC5 tLjIcGRfj3nZiKmPSqLqHrHsDmRC53ojHV84f0tLB+MPt8a1HYzuEg2VazL3D0pVDPglaT Ehzds6uwgEoKsfI1QXYDSrDiMYUR418BRyFJXpnvyMCibNxG0P4dRGA7whWfGNEAqlzrLk B7XKLnG0ez6fuwuMxo7w7ks0dpkjW8c9Sf7h5Umsy1SyDQH5sR+wGnBM9hdeEporCx2o6w 4xw7Nnd0VVOP4MUz3HuMdwgUknSsOW/WCwzbyPRONiMCHnbrePr7ncGKvEblPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fPBNb6g0fz11pV for ; Sun, 01 Mar 2026 19:05:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1803f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 01 Mar 2026 19:05:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Boris Lytochkin From: Andrey V. Elsukov Subject: git: 32cd3ee5901e - main - ipfw: add support for masked ip-address lookups List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 32cd3ee5901ea33d41ff550e5f40ce743c8d4165 Auto-Submitted: auto-generated Date: Sun, 01 Mar 2026 19:05:46 +0000 Message-Id: <69a48e0a.1803f.584a95d@gitrepo.freebsd.org> The branch main has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=32cd3ee5901ea33d41ff550e5f40ce743c8d4165 commit 32cd3ee5901ea33d41ff550e5f40ce743c8d4165 Author: Boris Lytochkin AuthorDate: 2026-03-01 18:54:24 +0000 Commit: Andrey V. Elsukov CommitDate: 2026-03-01 19:04:58 +0000 ipfw: add support for masked ip-address lookups Current radix-based implementation of lookup tables in ipfw does not support non-contiguous prefixes while this type of lookup is needed to write CPU-effective firewall configurations. For some of the cases we can reach the goal using a masked table lookup by adding masked (e.g. zero non-significant bits) records into a table and then zero non-significant bits in lookup key prior to making a table lookup. Obtained from: Yandex LLC MFC after: 3 weeks Relnotes: yes Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D53694 --- sbin/ipfw/ipfw.8 | 151 ++++++-- sbin/ipfw/ipfw2.c | 193 ++++++++-- sbin/ipfw/tests/test_add_rule.py | 243 +++++++++++- sys/netinet/ip_fw.h | 81 +++- sys/netpfil/ipfw/ip_fw2.c | 231 ++++++----- sys/netpfil/ipfw/ip_fw_sockopt.c | 32 ++ sys/netpfil/ipfw/ip_fw_table.c | 26 +- tests/atf_python/sys/netpfil/ipfw/insn_headers.py | 37 +- tests/atf_python/sys/netpfil/ipfw/insns.py | 179 ++++++++- tests/atf_python/sys/netpfil/ipfw/ioctl.py | 1 + tests/atf_python/sys/netpfil/ipfw/ioctl_headers.py | 41 +- tests/sys/netpfil/common/utils.subr | 3 + tests/sys/netpfil/ipfw/Makefile | 4 +- tests/sys/netpfil/ipfw/lookup.sh | 428 +++++++++++++++++++++ tests/sys/netpfil/ipfw/lookup_inetd.conf | 1 + 15 files changed, 1417 insertions(+), 234 deletions(-) diff --git a/sbin/ipfw/ipfw.8 b/sbin/ipfw/ipfw.8 index 867a43868ecc..2d3b0722cc42 100644 --- a/sbin/ipfw/ipfw.8 +++ b/sbin/ipfw/ipfw.8 @@ -1,5 +1,5 @@ .\" -.Dd December 29, 2025 +.Dd March 1, 2026 .Dt IPFW 8 .Os .Sh NAME @@ -1428,8 +1428,7 @@ The second format with multiple addresses) is provided for convenience only and its use is discouraged. .It Ar addr : Oo Cm not Oc Bro -.Cm any | me | me6 | -.Cm table Ns Pq Ar name Ns Op , Ns Ar value +.Cm any | me | me6 | Ar table-ref .Ar | addr-list | addr-set .Brc .Bl -tag -width indent @@ -1441,26 +1440,32 @@ Matches any IP address configured on an interface in the system. Matches any IPv6 address configured on an interface in the system. The address list is evaluated at the time the packet is analysed. -.It Cm table Ns Pq Ar name Ns Op , Ns Ar value +.El +.It Ar table-ref : +A table lookup can be specified in one of the following ways: +.Bl -tag -width indent +.It table Ns Pq Ar name Ns Matches any IPv4 or IPv6 address for which an entry exists in the lookup table .Ar number . -If an optional 32-bit unsigned +.It table Ns Pq Ar name , Ns Ar value +Matches any IPv4 or IPv6 address for which an entry exists in the lookup table +.Ar number +and 32-bit unsigned .Ar value -is also specified, an entry will match only if it has this value. -If +specified matchess entry value. +.It table Ns Pq Ar name , Ns Ar value-type Ns = Ns Ar value +Matches any IPv4 or IPv6 address for which an entry exists in the lookup table +.Ar number +and 32-bit unsigned .Ar value -is specified in form -.Ar valtype=value , -then specified value type field will be checked. -It can be -.Ar skipto, pipe, fib, nat, dscp, tag, divert, netgraph, limit, nh4 -and -.Ar mark. - +specified matches corresponding +.Ar value-type +field for the record found. +.El +.Pp See the .Sx LOOKUP TABLES section below for more information on lookup tables. -.El .It Ar addr-list : ip-addr Ns Op , Ns Ar addr-list .It Ar ip-addr : A host or subnet address specified in one of the following ways: @@ -1681,9 +1686,9 @@ and IPsec encapsulating security payload headers .It Cm fib Ar fibnum Matches a packet that has been tagged to use the given FIB (routing table) number. -.It Cm flow Ar table Ns Pq Ar name Ns Op , Ns Ar value -Search for the flow entry in lookup table -.Ar name . +.It Cm flow Ar table-ref +Search for the flow entry in lookup table specified by +.Ar table-ref . If not found, the match fails. Otherwise, the match succeeds and .Cm tablearg @@ -1699,16 +1704,16 @@ Matches IPv6 packets containing any of the flow labels given in .Ar labels . .Ar labels is a comma separated list of numeric flow labels. -.It Cm dst-mac Ar table Ns Pq Ar name Ns Op , Ns Ar value -Search for the destination MAC address entry in lookup table -.Ar name . +.It Cm dst-mac Ar table-ref +Search for the destination MAC address entry in lookup table specified by +.Ar table-ref . If not found, the match fails. Otherwise, the match succeeds and .Cm tablearg is set to the value extracted from the table. -.It Cm src-mac Ar table Ns Pq Ar name Ns Op , Ns Ar value -Search for the source MAC address entry in lookup table -.Ar name . +.It Cm src-mac Ar table-ref +Search for the source MAC address entry in lookup table specified by +.Ar table-ref . If not found, the match fails. Otherwise, the match succeeds and .Cm tablearg @@ -1926,8 +1931,10 @@ set of parameters as specified in the rule. One or more of source and destination addresses and ports can be specified. -.It Cm lookup Bro Cm dst-ip | dst-port | dst-mac | src-ip | src-port | src-mac | uid | -.Cm jail | dscp | mark | rulenum Brc Ar name +.It Cm lookup Bro Cm dst-ip | dst-ip4 | dst-ip6 | dst-port | dst-mac | src-ip | +.Cm src-ip4 | src-ip6 | src-port | src-mac | uid | jail | dscp | mark | +.Cm rulenum +.Brc Ns Oo : Ns Ar bitmask Oc Ar name Search an entry in lookup table .Ar name that matches the field specified as argument. @@ -1936,8 +1943,56 @@ Otherwise, the match succeeds and .Cm tablearg is set to the value extracted from the table. .Pp +If an optional +.Ar bitmask +is specified, value of the field is altered by bitwize AND with +.Ar bitmask +and resulting value is being searched instead of the original one. +The +.Ar bitmask +is accepted in the following formats: +.Bl -enum -width indent +.It +In a dotted-quad form, e.g. 127.88.34.0. +This form can be used for IPv4 lookups as well as for all numeric lookup +types. +.It +As a 32-bit number, e.g. 0xf00baa1 or 255. +This form can be used for IPv4 lookups as well as for all numeric lookup +types. +.It +As an IPv6 address when specified alongwith +.Cm dst-ip6 +or +.Cm src-ip6 +field. +If used, the rule will match IPv6 packets only. +Example: src-ip6:afff:ff00:ffff:ffff:0:0:0:0f0f. +.It +As a Ethernet mac address when specified alongwith +.Cm dst-mac +or +.Cm src-mac +field. E.g. 00:11:22:33:44:55. +.El +.Pp +The +.Ar bitmask +can not be specified for +.Cm dst-ip +or +.Cm src-ip +as these field specifiers lookup both IPv4 and IPv6 addresses. +.Pp This option can be useful to quickly dispatch traffic based on certain packet fields. +The +.Ar bitmask +allows to implement wildcard lookups by inserting into table masked prefix and +appying +.Ar bitmask +upon each lookup. +.Pp See the .Sx LOOKUP TABLES section below for more information on lookup tables. @@ -2000,7 +2055,7 @@ However, this option doesn't imply an implicit .Cm check-state in contrast to .Cm keep-state . -.It Cm recv | xmit | via Brq Ar ifX | Ar ifmask | Ar table Ns Po Ar name Ns Oo , Ns Ar value Oc Pc | Ar ipno | Ar any +.It Cm recv | xmit | via Brq Ar ifX | Ar ifmask | Ar table-ref | Ar ipno | Ar any Matches packets received, transmitted or going through, respectively, the interface specified by exact name .Po Ar ifX Pc , @@ -2018,8 +2073,8 @@ See also the .Sx EXAMPLES section. .Pp -Table -.Ar name +A lookup table specified by +.Ar table-ref may be used to match interface by its kernel ifindex. See the .Sx LOOKUP TABLES @@ -4350,7 +4405,8 @@ Capture messages from .Xr route 4 socket, that were logged using rules with .Cm log Cm logdst Ar rtsock -opcode. Optional +opcode. +Optional .Ar filter-comment can be specified to show only those messages, that were logged by rules with specific rule comment. @@ -4705,10 +4761,41 @@ In the following example per-interface firewall is created: The following example illustrate usage of flow tables: .Pp .Dl "ipfw table fl create type flow:src-ip,proto,dst-ip,dst-port" -.Dl "ipfw table fl add 2a02:6b8:77::88,tcp,2a02:6b8:77::99,80 11" +.Dl "ipfw table fl add 2001:db8:77::88,tcp,2001:db8:77::99,80 11" .Dl "ipfw table fl add 10.0.0.1,udp,10.0.0.2,53 12" .Dl ".." .Dl "ipfw add 100 allow ip from any to any flow 'table(fl,11)' recv ix0" +.Pp +The following example illustrate masked table lookups to aid uniform client +distribution among multiple NAT instances: +.Bd -literal -offset indent +# Configure NAT instances +ipfw nat 10 config ip 192.0.2.0 +ipfw nat 11 config ip 192.0.2.1 +ipfw nat 12 config ip 192.0.2.2 +ipfw nat 13 config ip 192.0.2.3 + +ipfw table mynats create type addr valtype nat +# Map external NAT address to NAT instance +ipfw table mynats add 192.0.2.0 10 +ipfw table mynats add 192.0.2.1 11 +ipfw table mynats add 192.0.2.2 12 +ipfw table mynats add 192.0.2.3 13 + +# Map last 2 bits of client's IP address to NAT instance +ipfw table mynats add 0.0.0.0 10 +ipfw table mynats add 0.0.0.1 11 +ipfw table mynats add 0.0.0.2 12 +ipfw table mynats add 0.0.0.3 13 + +# In -> Out NAT, zero out all bits in a client's IP exept +# 2 least significant prior to table lookup +ipfw add nat tablearg ip from 10.0.0.0/24 to any + lookup src-ip4:0.0.0.3 mynats +# Out -> In NAT +ipfw add nat tablearg ip from any to 192.0.2.0/30 + lookup dst-ip mynats +.Ed .Ss SETS OF RULES To add a set of rules atomically, e.g.\& set 18: .Pp diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c index 26baa596cc89..e0e1339a1dce 100644 --- a/sbin/ipfw/ipfw2.c +++ b/sbin/ipfw/ipfw2.c @@ -313,6 +313,10 @@ static struct _s_x rule_action_params[] = { static struct _s_x lookup_keys[] = { { "dst-ip", LOOKUP_DST_IP }, { "src-ip", LOOKUP_SRC_IP }, + { "dst-ip6", LOOKUP_DST_IP6 }, + { "src-ip6", LOOKUP_SRC_IP6 }, + { "dst-ip4", LOOKUP_DST_IP4 }, + { "src-ip4", LOOKUP_SRC_IP4 }, { "dst-port", LOOKUP_DST_PORT }, { "src-port", LOOKUP_SRC_PORT }, { "dst-mac", LOOKUP_DST_MAC }, @@ -338,6 +342,7 @@ static struct _s_x tvalue_names[] = { { "fib", TVALUE_FIB }, { "nat", TVALUE_NAT }, { "nh4", TVALUE_NH4 }, + { "nh6", TVALUE_NH6 }, { "dscp", TVALUE_DSCP }, { "limit", TVALUE_LIMIT }, { "mark", TVALUE_MARK }, @@ -1311,12 +1316,27 @@ print_flags(struct buf_pr *bp, char const *name, const ipfw_insn *cmd, } static void -print_tvalue(struct buf_pr *bp, const ipfw_insn_table *cmd) +print_tvalue(struct buf_pr *bp, const ipfw_insn_lookup *cmd) { + char maskbuf[INET6_ADDRSTRLEN]; const char *name; name = match_value(tvalue_names, IPFW_TVALUE_TYPE(&cmd->o)); - bprintf(bp, ",%s=%u", name != NULL ? name: "", cmd->value); + switch(IPFW_TVALUE_TYPE(&cmd->o)) { + case TVALUE_NH6: + if (inet_ntop(AF_INET6, &insntoc(&cmd->o, lookup)->ip6, + maskbuf, sizeof(maskbuf)) == NULL) + strcpy(maskbuf, ""); + bprintf(bp, ",%s=%s", name != NULL ? name: "", + maskbuf); + return; + case TVALUE_NH4: + bprintf(bp, ",%s=%s", name != NULL ? name: "", + inet_ntoa(cmd->ip4)); + return; + } + bprintf(bp, ",%s=%u", name != NULL ? name: "", + cmd->u32); } @@ -1327,11 +1347,14 @@ static void print_ip(struct buf_pr *bp, const struct format_opts *fo, const ipfw_insn_ip *cmd) { + char maskbuf[INET6_ADDRSTRLEN]; + const uint32_t *a = insntoc(cmd, u32)->d; struct hostent *he = NULL; const struct in_addr *ia; - const uint32_t *a = ((const ipfw_insn_u32 *)cmd)->d; - uint32_t len = F_LEN(&cmd->o); + const ipfw_insn_lookup *l = insntoc(cmd, lookup); + const char *key; char *t; + uint32_t len = F_LEN(&cmd->o); bprintf(bp, " "); switch (cmd->o.opcode) { @@ -1340,32 +1363,65 @@ print_ip(struct buf_pr *bp, const struct format_opts *fo, bprintf(bp, "me"); return; - case O_IP_DST_LOOKUP: - if ((len == F_INSN_SIZE(ipfw_insn_kidx) || - len == F_INSN_SIZE(ipfw_insn_table)) && - IPFW_LOOKUP_TYPE(&cmd->o) != LOOKUP_NONE) { - const char *key; - - key = match_value(lookup_keys, - IPFW_LOOKUP_TYPE(&cmd->o)); - t = table_search_ctlv(fo->tstate, - insntoc(&cmd->o, kidx)->kidx); - if (len == F_INSN_SIZE(ipfw_insn_table)) { - bprintf(bp, "lookup %s:%#x %s", - (key != NULL ? key : ""), - insntoc(&cmd->o, table)->value, t); - } else - bprintf(bp, "lookup %s %s", key != NULL ? key: - "", t); + case O_TABLE_LOOKUP: { + key = match_value(lookup_keys, + IPFW_LOOKUP_TYPE(&cmd->o)); + t = table_search_ctlv(fo->tstate, + insntoc(&cmd->o, kidx)->kidx); + if (IPFW_LOOKUP_MASKING(&cmd->o) == 0 || + len != F_INSN_SIZE(ipfw_insn_lookup)) { + bprintf(bp, "lookup %s %s", + (key != NULL ? key : ""), t); return; } - /* FALLTHROUGH */ + switch (IPFW_LOOKUP_TYPE(&cmd->o)) { + case LOOKUP_DST_IP6: + case LOOKUP_SRC_IP6: + if (inet_ntop(AF_INET6, &l->ip6, + maskbuf, sizeof(maskbuf)) == NULL) + strcpy(maskbuf, ""); + bprintf(bp, "lookup %s:%s %s", key, maskbuf, t); + break; + case LOOKUP_DST_IP: + case LOOKUP_SRC_IP: + case LOOKUP_DST_IP4: + case LOOKUP_SRC_IP4: + bprintf(bp, "lookup %s:%s %s", key, + inet_ntoa(l->ip4), t); + break; + case LOOKUP_DST_MAC: + case LOOKUP_SRC_MAC: + bprintf(bp, "lookup %s:%s %s", key, + ether_ntoa((const struct ether_addr *)&l->mac), t); + break; + default: + bprintf(bp, "lookup %s:%#x %s", + (key != NULL ? key : ""), + l->u32, t); + } + return; + } + case O_IP_DST_LOOKUP: case O_IP_SRC_LOOKUP: t = table_search_ctlv(fo->tstate, insntoc(&cmd->o, kidx)->kidx); + /* + * XXX: compatibility layer, to be removed. + * Properly show rules loaded into new kernel modules by + * an old ipfw binary. + */ + if (IPFW_LOOKUP_MASKING(&cmd->o) != 0 && + len == F_INSN_SIZE(ipfw_insn_table)) { + key = match_value(lookup_keys, + IPFW_LOOKUP_TYPE(&cmd->o)); + bprintf(bp, "lookup %s:%#x %s", + (key != NULL ? key : ""), + insntoc(&cmd->o, table)->value, t); + return; + } bprintf(bp, "table(%s", t); - if (len == F_INSN_SIZE(ipfw_insn_table)) - print_tvalue(bp, insntoc(&cmd->o, table)); + if (IPFW_LOOKUP_MATCH_TVALUE(&cmd->o) != 0) + print_tvalue(bp, l); bprintf(bp, ")"); return; } @@ -1470,15 +1526,14 @@ static void print_mac_lookup(struct buf_pr *bp, const struct format_opts *fo, const ipfw_insn *cmd) { - uint32_t len = F_LEN(cmd); char *t; bprintf(bp, " "); t = table_search_ctlv(fo->tstate, insntoc(cmd, kidx)->kidx); bprintf(bp, "table(%s", t); - if (len == F_INSN_SIZE(ipfw_insn_table)) - print_tvalue(bp, insntoc(cmd, table)); + if (IPFW_LOOKUP_MATCH_TVALUE(cmd) != 0) + print_tvalue(bp, insntoc(cmd, lookup)); bprintf(bp, ")"); } @@ -1643,6 +1698,8 @@ print_instruction(struct buf_pr *bp, const struct format_opts *fo, case O_IP_SRC_SET: if (state->flags & HAVE_SRCIP) bprintf(bp, " src-ip"); + /* FALLTHROUGH */ + case O_TABLE_LOOKUP: print_ip(bp, fo, insntoc(cmd, ip)); break; case O_IP_DST: @@ -1767,8 +1824,8 @@ print_instruction(struct buf_pr *bp, const struct format_opts *fo, s = table_search_ctlv(fo->tstate, insntoc(cmd, kidx)->kidx); bprintf(bp, " flow table(%s", s); - if (F_LEN(cmd) == F_INSN_SIZE(ipfw_insn_table)) - print_tvalue(bp, insntoc(cmd, table)); + if (IPFW_LOOKUP_MATCH_TVALUE(cmd) != 0) + print_tvalue(bp, insntoc(cmd, lookup)); bprintf(bp, ")"); break; case O_IPID: @@ -3304,8 +3361,11 @@ pack_table(struct tidx *tstate, const char *name) return (pack_object(tstate, name, IPFW_TLV_TBL_NAME)); } +/* + * Parse table(NAME, value) and table(NAME,key=value) + */ static void -fill_table_value(ipfw_insn *cmd, char *s) +fill_table_value(ipfw_insn_lookup *cmd, char *s) { char *p; int i; @@ -3322,8 +3382,20 @@ fill_table_value(ipfw_insn *cmd, char *s) p = s; } - IPFW_SET_TVALUE_TYPE(cmd, i); - insntod(cmd, table)->value = strtoul(p, NULL, 0); + IPFW_SET_TVALUE_TYPE(&cmd->o, i); + + if (i == TVALUE_NH6) { + if (inet_pton(AF_INET6, p, &cmd->ip6) != 1) + errx(EX_USAGE, "invalid IPv6 address provided"); + /* mask in a dotted-quad notation */ + } else if (strchr(p, '.') != NULL) { + if (inet_aton(p, &cmd->ip4) != 1) + errx(EX_USAGE, "invalid IPv4 address provided"); + if (i == TVALUE_NH4) + return; + cmd->u32 = ntohl(cmd->u32); + } else + cmd->u32 = strtoul(p, NULL, 0); } void @@ -3344,9 +3416,11 @@ fill_table(ipfw_insn *cmd, char *av, uint8_t opcode, struct tidx *tstate) cmd->opcode = opcode; if (p) { - cmd->len |= F_INSN_SIZE(ipfw_insn_table); - fill_table_value(cmd, p); + cmd->len |= F_INSN_SIZE(ipfw_insn_lookup); + IPFW_SET_LOOKUP_MATCH_TVALUE(cmd, 1); + fill_table_value(insntod(cmd, lookup), p); } else { + /* table(NAME) */ IPFW_SET_LOOKUP_TYPE(cmd, LOOKUP_NONE); cmd->len |= F_INSN_SIZE(ipfw_insn_kidx); } @@ -4126,6 +4200,38 @@ get_divert_port(const char *arg, const char *action) return (ntohs(s->s_port)); } +static void +get_lookup_bitmask(int ltype, ipfw_insn_lookup *cmd, const char *src) +{ + struct ether_addr *mac; + const char *macset = "0123456789abcdefABCDEF:"; + + if (ltype == LOOKUP_SRC_IP6 || ltype == LOOKUP_DST_IP6) { + if (inet_pton(AF_INET6, src, &cmd->ip6) != 1) + errx(EX_USAGE, "invalid IPv6 mask provided"); + return; + } else if (ltype == LOOKUP_SRC_MAC || ltype == LOOKUP_DST_MAC) { + if (strspn(src, macset) != strlen(src) || + (mac = ether_aton(src)) == NULL) + errx(EX_DATAERR, "Incorrect MAC address"); + + bcopy(mac, cmd->mac, ETHER_ADDR_LEN); + return; + /* mask in a dotted-quad notation */ + } else if (strchr(src, '.') != NULL) { + if (inet_aton(src, &cmd->ip4) != 1) + errx(EX_USAGE, "invalid dotted-quad mask provided"); + switch (ltype) { + case LOOKUP_SRC_IP4: + case LOOKUP_DST_IP4: + return; + } + cmd->u32 = ntohl(cmd->u32); + return; + } + cmd->u32 = strtoul(src, NULL, 0); +} + /* * Parse arguments and assemble the microinstructions which make up a rule. * Rules are added into the 'rulebuf' and then copied in the correct order @@ -5448,13 +5554,13 @@ read_options: case TOK_LOOKUP: { /* optional mask for some LOOKUP types */ - ipfw_insn_table *c = insntod(cmd, table); + ipfw_insn_lookup *c = insntod(cmd, lookup); char *lkey; if (!av[0] || !av[1]) errx(EX_USAGE, "format: lookup argument tablenum"); - cmd->opcode = O_IP_DST_LOOKUP; + cmd->opcode = O_TABLE_LOOKUP; lkey = strsep(av, ":"); i = match_token(lookup_keys, lkey); @@ -5471,18 +5577,21 @@ read_options: case LOOKUP_DSCP: case LOOKUP_MARK: case LOOKUP_RULENUM: + case LOOKUP_SRC_MAC: + case LOOKUP_DST_MAC: + case LOOKUP_SRC_IP6: + case LOOKUP_DST_IP6: + case LOOKUP_SRC_IP4: + case LOOKUP_DST_IP4: break; default: errx(EX_USAGE, "masked lookup is not supported " "for %s", lkey); } - cmd->len |= F_INSN_SIZE(ipfw_insn_table); - c->value = strtoul(*av, NULL, 0); - if (c->value == 0) - errx(EX_USAGE, - "all-zeroes bitmask for lookup " - "is meaningless"); + cmd->len |= F_INSN_SIZE(ipfw_insn_lookup); + IPFW_SET_LOOKUP_MASKING(cmd, 1); + get_lookup_bitmask(i, c, *av); } else { cmd->len |= F_INSN_SIZE(ipfw_insn_kidx); } diff --git a/sbin/ipfw/tests/test_add_rule.py b/sbin/ipfw/tests/test_add_rule.py index c2c4bf0b360c..4360c5f87c15 100755 --- a/sbin/ipfw/tests/test_add_rule.py +++ b/sbin/ipfw/tests/test_add_rule.py @@ -37,7 +37,11 @@ from atf_python.sys.netpfil.ipfw.insns import InsnProto from atf_python.sys.netpfil.ipfw.insns import InsnReject from atf_python.sys.netpfil.ipfw.insns import InsnTable from atf_python.sys.netpfil.ipfw.insns import InsnU32 +from atf_python.sys.netpfil.ipfw.insns import InsnKidx +from atf_python.sys.netpfil.ipfw.insns import InsnLookup from atf_python.sys.netpfil.ipfw.insns import IpFwOpcode +from atf_python.sys.netpfil.ipfw.insn_headers import IpFwTableLookupType +from atf_python.sys.netpfil.ipfw.insn_headers import IpFwTableValueType from atf_python.sys.netpfil.ipfw.ioctl import CTlv from atf_python.sys.netpfil.ipfw.ioctl import CTlvRule from atf_python.sys.netpfil.ipfw.ioctl import IpFwTlvType @@ -153,14 +157,226 @@ class TestAddRule(BaseTest): NTlv(IpFwTlvType.IPFW_TLV_TBL_NAME, idx=2, name="BBB"), ], "insns": [ - InsnU32(IpFwOpcode.O_IP_SRC_LOOKUP, u32=1), - InsnU32(IpFwOpcode.O_IP_DST_LOOKUP, u32=2), + InsnKidx(IpFwOpcode.O_IP_SRC_LOOKUP, kidx=1), + InsnKidx(IpFwOpcode.O_IP_DST_LOOKUP, kidx=2), InsnEmpty(IpFwOpcode.O_ACCEPT), ], }, }, id="test_tables", ), + pytest.param( + { + "in": "add allow ip from table(AAA) to any lookup dst-ip BBB", + "out": { + "objs": [ + NTlv(IpFwTlvType.IPFW_TLV_TBL_NAME, idx=1, name="AAA"), + NTlv(IpFwTlvType.IPFW_TLV_TBL_NAME, idx=2, name="BBB"), + ], + "insns": [ + InsnKidx(IpFwOpcode.O_IP_SRC_LOOKUP, kidx=1), + InsnLookup(IpFwOpcode.O_TABLE_LOOKUP, + kidx=2, + arg1=InsnLookup.compile_arg1(lookup_type=IpFwTableLookupType.LOOKUP_DST_IP), + ), + InsnEmpty(IpFwOpcode.O_ACCEPT), + ], + }, + }, + id="test_tables_lookup_no_mask", + ), + pytest.param( + { + "in": "add allow ip from table(AAA) to any lookup mark:0xf00baa1 BBB", + "out": { + "objs": [ + NTlv(IpFwTlvType.IPFW_TLV_TBL_NAME, idx=1, name="AAA"), + NTlv(IpFwTlvType.IPFW_TLV_TBL_NAME, idx=2, name="BBB"), + ], + "insns": [ + InsnKidx(IpFwOpcode.O_IP_SRC_LOOKUP, kidx=1), + InsnLookup(IpFwOpcode.O_TABLE_LOOKUP, + kidx=2, + arg1=InsnLookup.compile_arg1(lookup_type=IpFwTableLookupType.LOOKUP_MARK, bitmask=True), + bitmask=0xf00baa1), + InsnEmpty(IpFwOpcode.O_ACCEPT), + ], + }, + }, + id="test_tables_lookup_u32_mask", + ), + pytest.param( + { + "in": "add allow ip from table(AAA) to any lookup src-mac:1a:2b:3c:4d:5e:6f BBB", + "out": { + "objs": [ + NTlv(IpFwTlvType.IPFW_TLV_TBL_NAME, idx=1, name="AAA"), + NTlv(IpFwTlvType.IPFW_TLV_TBL_NAME, idx=2, name="BBB"), + ], + "insns": [ + InsnKidx(IpFwOpcode.O_IP_SRC_LOOKUP, kidx=1), + InsnLookup(IpFwOpcode.O_TABLE_LOOKUP, + kidx=2, + arg1=InsnLookup.compile_arg1(lookup_type=IpFwTableLookupType.LOOKUP_SRC_MAC, bitmask=True), + bitmask="1a:2b:3c:4d:5e:6f"), + InsnEmpty(IpFwOpcode.O_ACCEPT), + ], + }, + }, + id="test_tables_lookup_mac_mask", + ), + pytest.param( + { + "in": "add allow ip from table(AAA) to any lookup dst-ip4:1715004 BBB", + "out": { + "objs": [ + NTlv(IpFwTlvType.IPFW_TLV_TBL_NAME, idx=1, name="AAA"), + NTlv(IpFwTlvType.IPFW_TLV_TBL_NAME, idx=2, name="BBB"), + ], + "insns": [ + InsnKidx(IpFwOpcode.O_IP_SRC_LOOKUP, kidx=1), + InsnLookup(IpFwOpcode.O_TABLE_LOOKUP, + kidx=2, + arg1=InsnLookup.compile_arg1(lookup_type=IpFwTableLookupType.LOOKUP_DST_IP4, bitmask=True), + bitmask="60.43.26.0"), + InsnEmpty(IpFwOpcode.O_ACCEPT), + ], + }, + }, + id="test_tables_lookup_dst_ip4_numeric", + ), + pytest.param( + { + "in": "add allow ip from table(AAA) to any lookup src-ip4:0.0.0.255 BBB", + "out": { + "objs": [ + NTlv(IpFwTlvType.IPFW_TLV_TBL_NAME, idx=1, name="AAA"), + NTlv(IpFwTlvType.IPFW_TLV_TBL_NAME, idx=2, name="BBB"), + ], + "insns": [ + InsnKidx(IpFwOpcode.O_IP_SRC_LOOKUP, kidx=1), + InsnLookup(IpFwOpcode.O_TABLE_LOOKUP, + kidx=2, + arg1=InsnLookup.compile_arg1(lookup_type=IpFwTableLookupType.LOOKUP_SRC_IP4, bitmask=True), + bitmask="0.0.0.255"), + InsnEmpty(IpFwOpcode.O_ACCEPT), + ], + }, + }, + id="test_tables_lookup_src_ip4_addr", + ), + pytest.param( + { + "in": "add allow ip from table(AAA) to any lookup jail:0.0.252.128 BBB", + "out": { + "objs": [ + NTlv(IpFwTlvType.IPFW_TLV_TBL_NAME, idx=1, name="AAA"), + NTlv(IpFwTlvType.IPFW_TLV_TBL_NAME, idx=2, name="BBB"), + ], + "insns": [ + InsnKidx(IpFwOpcode.O_IP_SRC_LOOKUP, kidx=1), + InsnLookup(IpFwOpcode.O_TABLE_LOOKUP, + kidx=2, + arg1=InsnLookup.compile_arg1(lookup_type=IpFwTableLookupType.LOOKUP_JAIL, bitmask=True), + bitmask=64640), + InsnEmpty(IpFwOpcode.O_ACCEPT), + ], + }, + }, + id="test_tables_lookup_jail_addr", + ), + pytest.param( + { + "in": "add allow ip from table(AAA) to any lookup dst-ip6:ffff:ffff:f00:baaa:b00c:: BBB", + "out": { + "objs": [ + NTlv(IpFwTlvType.IPFW_TLV_TBL_NAME, idx=1, name="AAA"), + NTlv(IpFwTlvType.IPFW_TLV_TBL_NAME, idx=2, name="BBB"), + ], + "insns": [ + InsnKidx(IpFwOpcode.O_IP_SRC_LOOKUP, kidx=1), + InsnLookup(IpFwOpcode.O_TABLE_LOOKUP, + kidx=2, + arg1=InsnLookup.compile_arg1(lookup_type=IpFwTableLookupType.LOOKUP_DST_IP6, bitmask=True), + bitmask="ffff:ffff:f00:baaa:b00c::"), + InsnEmpty(IpFwOpcode.O_ACCEPT), + ], + }, + }, + id="test_tables_lookup_dst_ip6", + ), + pytest.param( + { + "in": "add allow ip from table(AAA,16777215) to any", + "out": { + "objs": [ + NTlv(IpFwTlvType.IPFW_TLV_TBL_NAME, idx=1, name="AAA"), + ], + "insns": [ + InsnLookup(IpFwOpcode.O_IP_SRC_LOOKUP, + kidx=1, + arg1=InsnLookup.compile_arg1(value_type=IpFwTableValueType.TVALUE_TAG), + value=16777215), + InsnEmpty(IpFwOpcode.O_ACCEPT), + ], + }, + }, + id="test_tables_check_value_legacy", + ), + pytest.param( + { + "in": "add allow ip from table(AAA,nat=1231) to any", + "out": { + "objs": [ + NTlv(IpFwTlvType.IPFW_TLV_TBL_NAME, idx=1, name="AAA"), + ], + "insns": [ + InsnLookup(IpFwOpcode.O_IP_SRC_LOOKUP, + kidx=1, + arg1=InsnLookup.compile_arg1(value_type=IpFwTableValueType.TVALUE_NAT), + value=1231), + InsnEmpty(IpFwOpcode.O_ACCEPT), + ], + }, + }, + id="test_tables_check_value_nat", + ), + pytest.param( + { + "in": "add allow ip from table(AAA,nh4=10.20.30.40) to any", + "out": { + "objs": [ + NTlv(IpFwTlvType.IPFW_TLV_TBL_NAME, idx=1, name="AAA"), + ], + "insns": [ + InsnLookup(IpFwOpcode.O_IP_SRC_LOOKUP, + kidx=1, + arg1=InsnLookup.compile_arg1(value_type=IpFwTableValueType.TVALUE_NH4), + value="10.20.30.40"), + InsnEmpty(IpFwOpcode.O_ACCEPT), + ], + }, + }, + id="test_tables_check_value_nh4", + ), + pytest.param( + { + "in": "add allow ip from table(AAA,nh6=ff02:1234:b00c::abcd) to any", + "out": { + "objs": [ + NTlv(IpFwTlvType.IPFW_TLV_TBL_NAME, idx=1, name="AAA"), + ], + "insns": [ + InsnLookup(IpFwOpcode.O_IP_SRC_LOOKUP, + kidx=1, + arg1=InsnLookup.compile_arg1(value_type=IpFwTableValueType.TVALUE_NH6), + value="ff02:1234:b00c::abcd"), + InsnEmpty(IpFwOpcode.O_ACCEPT), + ], + }, + }, + id="test_tables_check_value_nh6", + ), pytest.param( { "in": "add allow ip from any to 1.2.3.4 // test comment", @@ -183,7 +399,7 @@ class TestAddRule(BaseTest): ], "insns": [ InsnIp(IpFwOpcode.O_IP_DST, ip="1.2.3.4"), - InsnU32(IpFwOpcode.O_EXTERNAL_ACTION, u32=1), + InsnKidx(IpFwOpcode.O_EXTERNAL_ACTION, kidx=1), Insn(IpFwOpcode.O_EXTERNAL_DATA, arg1=123), ], }, @@ -192,20 +408,20 @@ class TestAddRule(BaseTest): ), pytest.param( { - "in": "add eaction ntpv6 AAA ip from any to 1.2.3.4", + "in": "add eaction nptv6 AAA ip from any to 1.2.3.4", "out": { "objs": [ - NTlv(IpFwTlvType.IPFW_TLV_EACTION, idx=1, name="ntpv6"), + NTlv(IpFwTlvType.IPFW_TLV_EACTION, idx=1, name="nptv6"), NTlv(0, idx=2, name="AAA"), ], "insns": [ InsnIp(IpFwOpcode.O_IP_DST, ip="1.2.3.4"), - InsnU32(IpFwOpcode.O_EXTERNAL_ACTION, u32=1), - InsnU32(IpFwOpcode.O_EXTERNAL_INSTANCE, u32=2), + InsnKidx(IpFwOpcode.O_EXTERNAL_ACTION, kidx=1), + InsnKidx(IpFwOpcode.O_EXTERNAL_INSTANCE, kidx=2), ], }, }, - id="test_eaction_ntp", + id="test_eaction_nptv6", ), pytest.param( { @@ -228,7 +444,7 @@ class TestAddRule(BaseTest): ], "insns": [ InsnComment(comment="test comment"), - InsnU32(IpFwOpcode.O_CHECK_STATE, u32=1), + InsnKidx(IpFwOpcode.O_CHECK_STATE, kidx=1), ], }, }, @@ -242,9 +458,9 @@ class TestAddRule(BaseTest): NTlv(IpFwTlvType.IPFW_TLV_STATE_NAME, idx=1, name="OUT"), ], "insns": [ - InsnU32(IpFwOpcode.O_PROBE_STATE, u32=1), + InsnKidx(IpFwOpcode.O_PROBE_STATE, kidx=1), Insn(IpFwOpcode.O_PROTO, arg1=6), - InsnU32(IpFwOpcode.O_KEEP_STATE, u32=1), + InsnKidx(IpFwOpcode.O_KEEP_STATE, kidx=1), InsnEmpty(IpFwOpcode.O_ACCEPT), ], }, @@ -260,7 +476,7 @@ class TestAddRule(BaseTest): ], "insns": [ Insn(IpFwOpcode.O_PROTO, arg1=6), - InsnU32(IpFwOpcode.O_KEEP_STATE, u32=1), + InsnKidx(IpFwOpcode.O_KEEP_STATE, kidx=1), InsnEmpty(IpFwOpcode.O_ACCEPT), ], }, @@ -373,6 +589,9 @@ class TestAddRule(BaseTest): pytest.param( ("skipto 42", InsnU32(IpFwOpcode.O_SKIPTO, u32=42)), id="skipto_42" ), + pytest.param( + ("skipto 4200", InsnU32(IpFwOpcode.O_SKIPTO, u32=4200)), id="skipto_4200" + ), pytest.param( ("netgraph 42", Insn(IpFwOpcode.O_NETGRAPH, arg1=42)), id="netgraph_42" ), diff --git a/sys/netinet/ip_fw.h b/sys/netinet/ip_fw.h index f3b2dc051c7d..f7372f41a48a 100644 --- a/sys/netinet/ip_fw.h +++ b/sys/netinet/ip_fw.h @@ -216,8 +216,8 @@ enum ipfw_opcodes { /* arguments (4 byte each) */ O_VERREVPATH = 36, /* none */ O_VERSRCREACH = 37, /* none */ - O_PROBE_STATE = 38, /* v0:arg1=kidx, v1:kidx=kidx */ - O_KEEP_STATE = 39, /* v0:arg1=kidx, v1:kidx=kidx */ + O_PROBE_STATE = 38, /* kidx=kidx */ + O_KEEP_STATE = 39, /* kidx=kidx */ O_LIMIT = 40, /* ipfw_insn_limit */ O_LIMIT_PARENT = 41, /* dyn_type, not an opcode. */ @@ -228,13 +228,12 @@ enum ipfw_opcodes { /* arguments (4 byte each) */ O_LOG = 42, /* ipfw_insn_log */ O_PROB = 43, /* u32 = match probability */ - O_CHECK_STATE = 44, /* v0:arg1=kidx, v1:kidx=kidx */ + O_CHECK_STATE = 44, /* kidx=kidx */ O_ACCEPT = 45, /* none */ O_DENY = 46, /* none */ O_REJECT = 47, /* arg1=icmp arg (same as deny) */ O_COUNT = 48, /* none */ - O_SKIPTO = 49, /* v0:arg1=next rule number */ - /* v1:kidx= next rule number */ + O_SKIPTO = 49, /* u32= next rule number */ O_PIPE = 50, /* arg1=pipe number */ O_QUEUE = 51, /* arg1=queue number */ O_DIVERT = 52, /* arg1=port number */ @@ -248,10 +247,12 @@ enum ipfw_opcodes { /* arguments (4 byte each) */ * More opcodes. */ O_IPSEC = 58, /* has ipsec history */ - O_IP_SRC_LOOKUP = 59, /* v0:arg1=table number, u32=value */ - /* v1:kidx=name, u32=value, arg1=key */ - O_IP_DST_LOOKUP = 60, /* arg1=table number, u32=value */ - /* v1:kidx=name, u32=value, arg1=key */ + O_IP_SRC_LOOKUP = 59, /* kidx=name */ + /* lookup: kidx=name, arg1=key */ + /* and flags, bitmask */ + O_IP_DST_LOOKUP = 60, /* kidx=name */ + /* lookup: kidx=name, arg1=key */ + /* and flags, bitmask */ O_ANTISPOOF = 61, /* none */ O_JAIL = 62, /* u32 = id */ O_ALTQ = 63, /* u32 = altq classif. qid */ @@ -286,31 +287,36 @@ enum ipfw_opcodes { /* arguments (4 byte each) */ *** 1425 LINES SKIPPED *** From nobody Sun Mar 1 19:07:14 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fPBQF6Wxqz6TWZn; Sun, 01 Mar 2026 19:07:17 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fPBQF5wgPz3rsy; Sun, 01 Mar 2026 19:07:17 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772392037; h=from:from:reply-to:subject:subject: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=I3Sj7eSWHX/Tuszk1jdhB46RdgYowo7kdEoCmtjurVQ=; b=ma7wq62iD5Y7ycvqs9u2ss7OOO5Xk6zWBWksksyZGjKT9d5aeKQiRNZIYM1oTFlh2E5SUv t5GJSGoP71O/XYMrCgeBsSdOw6K+XKPXP9nPotsuq0538LLbPRBarz1SGfcCScTxRFFYzb q1ljLVdEH4BcVNlNYqmVG2C+dEcynyr9uLuoCORCI6Qw9TG577PwcbifMabXflADLVKtN7 sOAlksQMYMGLxAeVarllEc8QqNUwWfyjMFGNjWTZSgVK0I98Gbr0K5I5rwTseRYHtOwjn5 6NUOLBTwgi3fJlkmu4622hVhuSAYC+JyBMej+tGfVtkWf3nNe6UQyWv7OSl3Kw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772392037; a=rsa-sha256; cv=none; b=pc+1Z+4m/aeAjwD0aQoN/EBF9UR9/wetj9H0qV2+S+tDk10MuZTHhfgFx4y7B8WWr6ydIp /M3XEio9aH1ucE0LTp8FjqrDfALqao4VTO8FFTBowhB1O/t89MiS5iS7jeRQlay9HbP4gK s/qUO+AVGulNWOjh0dVrcEUFwxbICGifQ7xpU1H5TybNZsBgki8EEVPky3KL/R7ChpCLB2 0BItyo/NGwsrnDWfxDPfMVAMokxwusc2igPAFGLPeYCvFmUDb2MZFXbhiyGLQMrapALVSF 3D1w5DOZozf6J1HZO5Cygylr/lGbOw18l47Vx/Qcg/JnPIoW5taZAKiAuMbntA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772392037; h=from:from:reply-to:subject:subject: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=I3Sj7eSWHX/Tuszk1jdhB46RdgYowo7kdEoCmtjurVQ=; b=mozUIiXuGcBFMIXoF+WZQ8ueBintz8xpHCf7UjcrKYM8xr4C5f8j7s3CjMIt/FV62MrIdk OcAvUAUKDEwarpHKTcQdMtuSSkcX33wwXY1nG3xx2uVJzu2BIL+xkiK1eDy1hRH6/9TdaG mz6Cvop8s2XTWyC6T6FD/eLw5kuwWJKhon/zJpixZ3KR4fFyFmAJtMTV0xf4JzYXIoBmSq 7czVebeVUmlgeCeJZBPns0X06sNdoWX16Tq4V0MVtKZkYfJjC3WD0nTQvs8V+R9d+9EU/9 fq0XpH6fiGFzL+oitpdf4IS2o9LNp/2teoDo6bVTdUoxj1eTetY2ASfnvckg9Q== Received: from ltc.des.dev (2a01cb0585090500922e16fffef1acef.ipv6.abo.wanadoo.fr [IPv6:2a01:cb05:8509:500:922e:16ff:fef1:acef]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fPBQF4W3dzNN8; Sun, 01 Mar 2026 19:07:17 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 825DAF7536; Sun, 01 Mar 2026 20:07:14 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Enji Cooper Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c2dee7786bf3 - main - diff3: Code cleanup In-Reply-To: <5AF72509-9232-4B17-853D-A12D9862C422@gmail.com> (Enji Cooper's message of "Sun, 1 Mar 2026 10:07:29 -0800") References: <86tsuzojnj.fsf@ltc.des.dev> <5AF72509-9232-4B17-853D-A12D9862C422@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Sun, 01 Mar 2026 20:07:14 +0100 Message-ID: <86pl5nnzbx.fsf@ltc.des.dev> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Enji Cooper writes: > I wasn=E2=80=99t aware that their version didn=E2=80=99t really work; the= RCS Id in > the file was ancient, hence the question about reconciling with > OpenBSD (I thought there was a chance that we could maybe leverage > some of their code/fixes in the future to reduce maintenance effort). I think the opposite would be more likely. The only functional changes to OpenBSD's diff3 since the version recorded in our copy was to fix issues with inputs that don't end in a newline. > About the sysexits change: is there a reason why it was made? I=E2=80=99m > asking because another recent change made by an external contributor > introduced sysexits use, whereas this change removed it. EXIT_SUCCESS and EXIT_FAILURE are not sysexits, they are ISO C aliases for 0 and 1. They were only used in three places, while the rest of the code used 0, 1, or 2. I'm not opposed to switching to sysexits, but I don't really see any benefit. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Sun Mar 1 19:22:25 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fPBm31MqKz6TXN1 for ; Sun, 01 Mar 2026 19:22:43 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fPBm26NHzz3t1l for ; Sun, 01 Mar 2026 19:22:42 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-82746ed8cdcso2048449b3a.3 for ; Sun, 01 Mar 2026 11:22:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772392957; cv=none; d=google.com; s=arc-20240605; b=aDx0eJS7jb+j9MaXEika2ASSrBxbWRBE7+eRvyRgIviECDvZRvbc2HavOMlWxturtI mBwDLtCoutfg1TS5nSth94qfXXGJS4ahFD1pEcCuLZbyoM66fR1h4WiBqyxSrcMAHxkf rmGQO0YLC20avy38d4ZgnmgT16zBcY6lHwY27+UcMbMVekQVexQsoIVpNvkkZzRw36l4 54SvI6YWHnayGRpnPviWiB2mZfP4OgmvsKeEfbGZKdKVZOv6OqeX3ZZo+LR/sY9r/+Lr Z7CAOksPRm/CNqMh0iJXZzoaGpxAF2Z0MSh5N71NGfjFpB+LYRDKcStt5ytssxSUzc/O JY/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=ufrLQuvpX00unka40YT9ori0Ua8cLA1FyH9er7qzPfY=; fh=MnxTQWN5px+FebpB1m5BOKhYUIO0gG9jGBKlN59lQLQ=; b=fH9ExHGIGhaojMCoAhk6PtGE363uCjT+asmEhkuDTKnqldggFZ4Ci5eKMyooArCKwa B+JBi/Q25pnYqk/90EqijGxE5+JGLT17QGJT081We3iGxEN9qZPBW1I3Pr16NUtTbIav jipd6KuDKOxWVzw3fn3a5w6GPytqfCjuiZFYi8lwRhMQMbFSzR981OSh+yrwwaDNWzyT NiXAzfZHJfSgAihC48+ZJeUi8nZxC7HUDjNahwUQ72mrNQpiPd+H8JE/ii1MZC+aMLta NT0Cw2sA1Maf1QeOOWcVzXk/03ltXHdKcOWBRdzUGiUy/0RlnOEHLFXdxJpD804SCOZl fK3A==; darn=freebsd.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1772392957; x=1772997757; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ufrLQuvpX00unka40YT9ori0Ua8cLA1FyH9er7qzPfY=; b=y49jUsIysF5LHBHnVVatY97U6UzrApOR50lipIr1Nz2n6DNaLO96Akv0SZChTveCOZ tfTQIsSDS9UTb2SpDjWmYRugZt0lKevTkv42GQ/ic9AX2YcO/N0gyGe1yzlIpm6KhUB+ adcOICncGkNs2+r9lZqoHgFTBkCAHU/N21Rf8jjYH20vbeAx/IuYwUeaqVr6rjUw3toz zCHY3F7OY5nU3U8D0hjNpscqD+YxElYXERgXJmqPpjivHtgFwPzPPbWTXqNvijaOFzCQ wGkbpNTeqqbqYhlscxtnQ4JNrFs+66swR4tgDTgKrMzjmyQPvVbuD5daaon9p7MYOIeG fcYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772392957; x=1772997757; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ufrLQuvpX00unka40YT9ori0Ua8cLA1FyH9er7qzPfY=; b=XTvl8Hrrl1Y2sWveXDvdLmkgcmdaph8ukM5kTQC65yUifOMCqVhB050/c993Z2+vKF zM28DOK9qQ3OuSf8cFYkDMP5WIs+y2oFPLLnqeUaXGv2pf4SFNRZLvLczGYnOyrLnneP geI9JWze/gaWMxCsNpOMMvULZr0Me5+MvpRJD2eFmuANP5yQTTn8g2PB8gqQbALXWWF7 0ceD++8B18UF+KndS4JenUaYY8GDTYmniq3s+hw7KdwJrTjukiQ5ZDMNwvWA7lJI2LVe glUg0Q1weaZth3coml1QQkcG+y51vFT5N6q6BZUuL8WkPdgGD/oJ1Cy9L92BdrnVCoUp iIGw== X-Forwarded-Encrypted: i=1; AJvYcCVSmxOmOPlcLSDRY2OWOPBJwk02XfcEnH2qamaXea3Vgfe0Brq4/T3pZyCHh1Lk3WFG8WdEueRdq1chg0xaOKHLtsU/@freebsd.org X-Gm-Message-State: AOJu0YywTohpisetvrkVDnoTnGoWt8/H2C7dbhkaVsWd23qkFcXA/07W iS2hm10Q6+Weg7gJ8dEslbCBYPBtMoeQT8d6mAR6iMERl8//yGqPvmbOmeXH885Q+LeXg27wFBp atYYHOk7asSQ6Op8Di45TpJcIAzTK+4V7sjU8xshJ6w== X-Gm-Gg: ATEYQzx+kEMz1yyShiK2cnIGAFPd5nWnBfavCTcl3F3t8c03be+yYY7CH4UA7oxsRvK C8pkxdNQ25mknKFKTsEW2N41NWHzS4gNqN/faFQQIxxwVxd9B+Ycgn5GKB2fJlNGZ8Rs2Xn0jGh YXpFuINXO/wuZH+pxQiUshT3iVaHGSC+xmJbXURAQc/3tcrdmZzz6LKAWgI1Hqgy15BPQ+ORgND I+rhAglOagwSYustQXlZMXvIZS0yZgQcHIwi3oZsCdnTp1vnjEZYsG/0Moa/tjzBT7SS9QR18CC kZRwF3zlXsRvGFbW7g== X-Received: by 2002:a05:6a20:3946:b0:366:14ac:8c70 with SMTP id adf61e73a8af0-395c3b50264mr9453152637.70.1772392956751; Sun, 01 Mar 2026 11:22:36 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <86tsuzojnj.fsf@ltc.des.dev> <5AF72509-9232-4B17-853D-A12D9862C422@gmail.com> <86pl5nnzbx.fsf@ltc.des.dev> In-Reply-To: <86pl5nnzbx.fsf@ltc.des.dev> From: Warner Losh Date: Sun, 1 Mar 2026 12:22:25 -0700 X-Gm-Features: AaiRm509KK0UvuYImE-L0MGQM8CpurerVVlE6aJ0DQugi7S4fBMFPTFcSIY1QWk Message-ID: Subject: Re: git: c2dee7786bf3 - main - diff3: Code cleanup To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Cc: Enji Cooper , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000096febf064bfb64e5" X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4fPBm26NHzz3t1l X-Spamd-Bar: ---- --00000000000096febf064bfb64e5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Mar 1, 2026 at 12:07=E2=80=AFPM Dag-Erling Sm=C3=B8rgrav wrote: > Enji Cooper writes: > > I wasn=E2=80=99t aware that their version didn=E2=80=99t really work; t= he RCS Id in > > the file was ancient, hence the question about reconciling with > > OpenBSD (I thought there was a chance that we could maybe leverage > > some of their code/fixes in the future to reduce maintenance effort). > > I think the opposite would be more likely. The only functional changes > to OpenBSD's diff3 since the version recorded in our copy was to fix > issues with inputs that don't end in a newline. > > > About the sysexits change: is there a reason why it was made? I=E2=80= =99m > > asking because another recent change made by an external contributor > > introduced sysexits use, whereas this change removed it. > > EXIT_SUCCESS and EXIT_FAILURE are not sysexits, they are ISO C aliases > for 0 and 1. They were only used in three places, while the rest of the > code used 0, 1, or 2. I'm not opposed to switching to sysexits, but I > don't really see any benefit. > Nor I. Aren't the current valutes mandated by POSIX or by what POSIX mandates diff return though? Switching to sysexits would make that harder since they don't align well with POSIX requirements. Warner --00000000000096febf064bfb64e5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sun, Mar 1, = 2026 at 12:07=E2=80=AFPM Dag-Erling Sm=C3=B8rgrav <des@freebsd.org> wrote:
Enji Cooper <yaneurabeya@gmail.com> writes:
> I wasn=E2=80=99t aware that their version didn=E2=80=99t really work; = the RCS Id in
> the file was ancient, hence the question about reconciling with
> OpenBSD (I thought there was a chance that we could maybe leverage
> some of their code/fixes in the future to reduce maintenance effort).<= br>
I think the opposite would be more likely.=C2=A0 The only functional change= s
to OpenBSD's diff3 since the version recorded in our copy was to fix issues with inputs that don't end in a newline.

> About the sysexits change: is there a reason why it was made? I=E2=80= =99m
> asking because another recent change made by an external contributor > introduced sysexits use, whereas this change removed it.

EXIT_SUCCESS and EXIT_FAILURE are not sysexits, they are ISO C aliases
for 0 and 1.=C2=A0 They were only used in three places, while the rest of t= he
code used 0, 1, or 2.=C2=A0 I'm not opposed to switching to sysexits, b= ut I
don't really see any benefit.

Nor I= . Aren't the current valutes mandated by POSIX or by what POSIX mandate= s
diff return though? Switching to sysexits would make that harde= r since they don't
align well with POSIX requirements.
<= div>
Warner=C2=A0
--00000000000096febf064bfb64e5-- From nobody Sun Mar 1 19:31:33 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fPByH03L8z6TXrG; Sun, 01 Mar 2026 19:31:35 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fPByG6V2Zz3v2M; Sun, 01 Mar 2026 19:31:34 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772393494; h=from:from:reply-to:subject:subject: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=ZDQywyY6j3doTdwZ7f5PpbeuFsvuqCX2YtJ8U4WyOno=; b=AtH4jWG0VZHAku1T9SuSC/hDpWx4Yfnv0YCjnxPFsSZz0UEMn13bKPCriM/X4h9nhr/MSh 5EN6M691IaWBwEhIoiBWE/av+w4+woTEYwpS9OAZku79ICOC/Cu6qjd4HAUU4wG3WECkoT CeNF8PH2DcJNgQEruLz/6CytfD7D3UUzkudBKyQD8/0+M9q3cYtcpyHwfpEZsQ/z7qZO8Z 7JUVdxYqBk7UGsbI44u4zTO+CX3o8fFGJe1GdrNGA03K3eOwQIt23D8pBzYpgegwLkquHC O2fa/twumb2AAH+xmIpdDTuoxDuYIJSIYbyEg/tOeKNyCPM/txqhKRoh0mit7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772393494; a=rsa-sha256; cv=none; b=JHjpmOx+cmS6DazXGfk4s5eHssSLAVRmh/+STbHxC8Y6NK4ONLyu/asLscsJGg5RP1GWG4 a9874hFJ2TPDxOax/GRwNQ6nLEUknaqCFsYZTB5XwXrOPTPq3d1g9Km1TRtPeL8F+XM8UB JhYyTidvC288zQQTYJNK3+ubiLr0e47nhOLfrbIFoXg8DJ78xeEWY4RXeCn5EcP0NXTjwJ XIkjti8VQdnZJRXX3E8OqCc3i2w4y1z2Rjug/wibZTFOBBLoCvdGzIEGLoEZyIKgVv8NDu Nnx5YdIt9gnLJXygNMrvm7ackVLA70Tq3Q9iZqPY5Umfpb6jFWoJ9QX5Wn4Bww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1772393494; h=from:from:reply-to:subject:subject: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=ZDQywyY6j3doTdwZ7f5PpbeuFsvuqCX2YtJ8U4WyOno=; b=whZH2YZEKV1TrkD/qpsjO6wATqfN/DUD9tStRFKISFzT9BUORTcf6iE51VVAvNdXKaNLCX yR2gLQ8i3rdWipCYX/P0Yar+ct4Hh0HqX9XcU3MUzrzDtIB7Cf9Pws6q5W78ZJCF56QU0P xtYt4wBcX74bvhep69MqnRroRO45ed0IgzI6QfZAfNk0ebfMH52uPNZDxIyy/kuU6CVv4v NF9+TAUO7h2zRX0VfJPKW3DcKYw22RcrzuMjhkxjUOpI1UuayEcc4UiEST8V2dRtphyaVi 414GGCqCo4pMbPUdDQeBGqYS8UVdp6fBin9cxKvFGl03hWgzQTIxplRggU4N4Q== Received: from ltc.des.dev (2a01cb0585090500922e16fffef1acef.ipv6.abo.wanadoo.fr [IPv6:2a01:cb05:8509:500:922e:16ff:fef1:acef]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fPByG4y7dzNNM; Sun, 01 Mar 2026 19:31:34 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 6F62DF703A; Sun, 01 Mar 2026 20:31:33 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Warner Losh Cc: Enji Cooper , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c2dee7786bf3 - main - diff3: Code cleanup In-Reply-To: (Warner Losh's message of "Sun, 1 Mar 2026 12:22:25 -0700") References: <86tsuzojnj.fsf@ltc.des.dev> <5AF72509-9232-4B17-853D-A12D9862C422@gmail.com> <86pl5nnzbx.fsf@ltc.des.dev> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Sun, 01 Mar 2026 20:31:33 +0100 Message-ID: <86ldgbny7e.fsf@ltc.des.dev> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Warner Losh writes: > Dag-Erling Sm=C3=B8rgrav writes: > > EXIT_SUCCESS and EXIT_FAILURE are not sysexits, they are ISO C aliases > > for 0 and 1. They were only used in three places, while the rest of the > > code used 0, 1, or 2. I'm not opposed to switching to sysexits, but I > > don't really see any benefit. > Nor I. Aren't the current valutes mandated by POSIX or by what POSIX > mandates diff return though? Switching to sysexits would make that > harder since they don't align well with POSIX requirements. This is diff3, not diff, and is not covered by POSIX. If we want to be fully compatible with GNU diff3, we should change all our error exits to 2 (they are currently a mix of 1 and 2), and exit 1 if and only if we successfully found differences between the files. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Sun Mar 1 19:43:47 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fPCDf47m0z6TYZm for ; Sun, 01 Mar 2026 19:44:02 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fPCDd6DQDz3wDb for ; Sun, 01 Mar 2026 19:44:01 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-c7103601c8cso1627041a12.2 for ; Sun, 01 Mar 2026 11:44:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772394239; x=1772999039; darn=freebsd.org; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9rQsp5T60QgurXgWN5H9xC0vamO0UUsU36o4thf/tdI=; b=jKYyKsNrRsPiuBKEx9rq3v5L8CQ/QAdmuvuy+NRd0BNEybmRdXslH5IQtfGpTjgfV9 DSR/gdSEu6JYOBiYs2NPH3rRCWLazT9gYwGxNsKH1c1nXlbtZQ+xw9vY66fVf4coXhMa QyyO44pseF7rrULRl8GUyedjvN+JTBX3zKrqIX/C0o71CiUufjv9uBoQgWMcdGYz2YLO QQcgfLXO41aTLAU7yNa0qO7SPFBAgP3WQ34Xowcq2CfeipOl/0nXSh20FZE2+birfTUh /DGMquuhcZVAT75Lwge/BnGKtN/QDOSmgiKcJHLVK9tW9YrzRxYZxKoOTNKeEraGsNYA qkug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772394239; x=1772999039; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=9rQsp5T60QgurXgWN5H9xC0vamO0UUsU36o4thf/tdI=; b=t4RszU7Ourjp2CUDc+ZKjQJM/gbRcaQyEk+ljmEKN4SnD65N/zy4URWs7uUlu1+fpT svaTIYkBQzrAtYAMbMIuSJE+xLAJWVXFHXB/6QUOEIP30INlO52nWEQinbv+U4svGSCE e92udNITTdTeI+PA0R0lytU95N8KEf1Oau5QxC/T0bdBQ8j0N1Oa98piuFYLSyi/EPEf aH+pzmPqUo9gbg2ldVYf6cOGB+oOR5XseosZ13tK07qQt5WYWN3sMKEwhcCWJoV1KjJ5 kncfL3ZZdO7hg6N6cMykfbprOidh4hIy+qdGCoEm68beet50XK1dFs9hSbsrQ6K6EUPe GbVw== X-Forwarded-Encrypted: i=1; AJvYcCWLsHHfaQWtvgoYWd9oduqGFtxhNf3QxhiYEz3sZv41WcP7UastYEP/IlWHgtf9kPQrHU6xb4PW6bJYoLET3lsCdnEc@freebsd.org X-Gm-Message-State: AOJu0YwQkFSRTdYkKKkC4FRN1kMnAISFg0oUBny3uhke2O+1beaN6u1G If2meN3bvZFBMQwL+sg8N9W7h3rx9RZBivRCu8VwsVZTzINqwF5c3SX1rKD04oms X-Gm-Gg: ATEYQzzEPFnbrwDtwr1x7ubEBUb4gpDXFUKIdxEfZOj8JhP8ahNqCeOl5d7ko5dnj+3 KNX+ANq6Mn8/nAdluRC/bTUR+2pIFW9gKG646fsQzQREZblgzw0wuBc+h67pQ0a6BtuUu/gXvnH B2NBWfeNE1boYyUNUGwNnd2N+I6oOJkEintAxjO/EScJYuiYFCbqYz0ivZccUnhgjUw1OPfFTYT q6GrxCKO8/yf+horwScxhg5qntSpbtBRO2mXi0qT9+90KjkdyJJ25xk3yYpjZRATlm1wmtuPzJW zx3U1+MzIFPdp6+bC41DmmOrBBS955quEY3Htk0nB7WdqEJTXu6OMFmaYpohq/z+nwvjm5VJuYD 2/b4yevK2Kaf3N6D43xID7mfqwoTcZCQIn/NdWXNThWWRg2IcpOBu2U1BW0l5MitTcExvl24rsG emsQ98kLqm38fAfneavruR3mnhCFwenghreMCCyKafvuI= X-Received: by 2002:a05:6a20:56a3:b0:38d:efcb:2e8a with SMTP id adf61e73a8af0-395c3b41486mr8297043637.68.1772394239054; Sun, 01 Mar 2026 11:43:59 -0800 (PST) Received: from smtpclient.apple ([185.219.141.150]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3593dda3a4dsm10357809a91.10.2026.03.01.11.43.58 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Mar 2026 11:43:58 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_78667708-B488-4AA4-BD1F-6C9BD2D71E76"; protocol="application/pgp-signature"; micalg=pgp-sha256 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81.1.3\)) Subject: Re: git: c2dee7786bf3 - main - diff3: Code cleanup From: "Enji Cooper (yaneurabeya)" In-Reply-To: <86ldgbny7e.fsf@ltc.des.dev> Date: Sun, 1 Mar 2026 11:43:47 -0800 Cc: Warner Losh , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Message-Id: <3464A20F-B0F2-456E-8826-A43006457CC4@gmail.com> References: <86tsuzojnj.fsf@ltc.des.dev> <5AF72509-9232-4B17-853D-A12D9862C422@gmail.com> <86pl5nnzbx.fsf@ltc.des.dev> <86ldgbny7e.fsf@ltc.des.dev> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= X-Mailer: Apple Mail (2.3826.700.81.1.3) X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4fPCDd6DQDz3wDb X-Spamd-Bar: ---- --Apple-Mail=_78667708-B488-4AA4-BD1F-6C9BD2D71E76 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 1, 2026, at 11:31=E2=80=AFAM, Dag-Erling Sm=C3=B8rgrav = wrote: >=20 > Warner Losh writes: >> Dag-Erling Sm=C3=B8rgrav writes: >>> EXIT_SUCCESS and EXIT_FAILURE are not sysexits, they are ISO C = aliases >>> for 0 and 1. They were only used in three places, while the rest of = the >>> code used 0, 1, or 2. I'm not opposed to switching to sysexits, but = I >>> don't really see any benefit. >> Nor I. Aren't the current valutes mandated by POSIX or by what POSIX >> mandates diff return though? Switching to sysexits would make that >> harder since they don't align well with POSIX requirements. >=20 > This is diff3, not diff, and is not covered by POSIX. If we want to = be > fully compatible with GNU diff3, we should change all our error exits = to > 2 (they are currently a mix of 1 and 2), and exit 1 if and only if we > successfully found differences between the files. You=E2=80=99re right: please ignore this part of my earlier reply = because it=E2=80=99s not relevant to what you did in this change. Thanks, -Enji PS Please don=E2=80=99t change the diff3 code to sysexits(3). Like you = and Warner pointed out it doesn=E2=80=99t make sense to apply them to = this utility.= --Apple-Mail=_78667708-B488-4AA4-BD1F-6C9BD2D71E76 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEkHfexGRJ3gYRdA2gGpE5DjPsNJgFAmmklvMACgkQGpE5DjPs NJhhCg//e4C2UgFIdhWkTnJn+ckn8bZCzVq4RMmkKZR2IUc7HuzTyYlG0VmLrTaT 7VXG6BNra8nBgmwqdClvMrFcRZ2Zy+OpW/pMHgnqXzuRlWasyQbrPHjRKkV0Y6V7 I6JYOe7XumngSFyuujCzC604KhGTAjM1nKXewfXnw55xouHzi7NG0yigjYi4bDBm dleb2d7n5Xz5lwXrDewqYuKj501eNNj5JA+54Sc46+FDSH/geurjh5J1ihTr63vJ v8fhMGVzsjYjDwxRyKJmZs55ytQopwQV2LEDGxJygOOabiNweWJnYl852yy/jf0n QXxuhOu3RdCEU5FN00NuYecvsGneMZBsxB563rcR/rbRQGMR7/JPD3qTu7Bk47bQ TQSbWS5sm07BNXXLfqGhiXhJ4yTYiM4Sl2zSZYkJJyDw8yFSiosOADfhpRgZVqfV XbmASgJUQwMCuZiH5yEwPWnvIjSt0nMMGVyJrA3od+KNG0RA7R+uTUTt2ZuP1Blo tC8oOQX28OPe2ZMkJH/MOvV+0fB7GOuLq4qNWpWhTQTCEKqKJgd+e4jXAIvkXoNK meBypKr4e3aUkRX6d6mCxPYg9wTnjF50W1+MCj8lme/lKHBPGhUi0bvatAYn4R/q 3oPPPGeei6s/glxgaxyXXKy2sV4C/zKGtFhqQ3yscgftYf9E3Zo= =4KCo -----END PGP SIGNATURE----- --Apple-Mail=_78667708-B488-4AA4-BD1F-6C9BD2D71E76-- From nobody Sun Mar 1 19:52:12 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fPCQ43Knnz6TZhk for ; Sun, 01 Mar 2026 19:52:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fPCQ42XwWz3y5t for ; Sun, 01 Mar 2026 19: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=1772394732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6F81ysaG52/kxcszLZZm7eoQtLOHjVWHSutAcpizCrE=; b=UH138MjrlP4/8KUEQlwE5RaoweeZqMAuPdmxHOE4IuBncbB6orpaZxvGi48EgK4A/XeDXl KRGyunTQcSVklctxk/pX9wOZYucGA9L8W/UWNOtG0ecPYYHSoGam0J9Uu0atrVXd5gwGNS KBTvBKVmAgx7R6oZghoaT3V21vaf3h19a4YD9qvJagXCPr4ucJUhpprad9582QtI+3LFNq CMSk8wonttITuR1t05/WPu6B2IkBf1iuFvEYuG9LK7yg1pc6zQOD1rMEuLTgsx4QrfEgbe IBzDhetmvpMXAULEp4/xxaxmlxSmp7QyxPKofNhVdtRisE9xhyQTKOzBBQa0Cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1772394732; a=rsa-sha256; cv=none; b=JmHADUYUD8bf65uC1dIDVGJ49IotE0zZ4MLVHP+mqz74jmYDNhCwSZhxKITNclE9UW7yam MKFGBtl9+Eic80CELCcCWyuSGWO11KxV6aTV0bOrGI8y3ydGSlQAsw/QGXjp4YNmKAQg8V 9TwDA+gZ+4cua+Oz4IF3gk+0yCUC3dFanzQ2i7rghIeTWzGwJ1hulW67X6/nS5FTlBzbmb Reopimj6IRSW6svYotZjcGdiRj8U/2RUfaWu4iQlH2xKyRollvb3m/qMw/RM9dtAKbOZj1 hbdnqxTQzePY18+xn9nIXqaMES+RyZdU24zDI43Mu3sf9mx7twWtESWPN0yY+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=1772394732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6F81ysaG52/kxcszLZZm7eoQtLOHjVWHSutAcpizCrE=; b=Npmqb3zrTUJRqLU19ZsGopkZoq0mgB5fkAsPLlGInBTHTYGxZc6Mv5PYf079Lfb0ekHKv4 PMpBBJxnN30fA7Pt9vg7NaC9Au4HA+LR4Bd3nRPV+0hjKecyKudSBqIoMmXRwq7f9+Rpjg 5L5bHg9T+OLiGY2RNrZWOenQM/ycpCOA05NFmAhyT3j9HU8eEpSy27q4UTWSWi6njpE6nW qWu7mcDvLJ32055q5w1FktF1n5AD6nW1uH2d458fNR0MS7M4Vj9tq6dC4uTaiEaiw+MpjA 9R52scCPVW4gRxPfDYN7lnTfl1304oc8uaHM1NTUU1eQfDJQiM5lziZwPRInlw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fPCQ424rCz135d for ; Sun, 01 Mar 2026 19:52:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1f3da by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 01 Mar 2026 19:52:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Joseph Mingrone Subject: git: 5d9b185c33ae - main - share/mk/src.libnames.mk: Sort _DP entries List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5d9b185c33ae137d4690a02504d94c3315c71a60 Auto-Submitted: auto-generated Date: Sun, 01 Mar 2026 19:52:12 +0000 Message-Id: <69a498ec.1f3da.436d1ce6@gitrepo.freebsd.org> The branch main has been updated by jrm: URL: https://cgit.FreeBSD.org/src/commit/?id=5d9b185c33ae137d4690a02504d94c3315c71a60 commit 5d9b185c33ae137d4690a02504d94c3315c71a60 Author: Joseph Mingrone AuthorDate: 2026-02-28 22:40:45 +0000 Commit: Joseph Mingrone CommitDate: 2026-03-01 19:46:33 +0000 share/mk/src.libnames.mk: Sort _DP entries Requested by: des Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55598 --- share/mk/src.libnames.mk | 240 +++++++++++++++++++++++++---------------------- 1 file changed, 129 insertions(+), 111 deletions(-) diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 75a857ba2cff..388f9372abb0 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -319,167 +319,185 @@ _DP_9p+= casper cap_pwd cap_grp .if ${.MAKE.OS} == "FreeBSD" || !defined(BOOTSTRAPPING) _DP_archive= z bz2 lzma bsdxml zstd .endif +_DP_atf_cxx= atf_c _DP_avl= spl +_DP_be= zfs spl nvpair zfsbootenv _DP_bsddialog= ncursesw tinfow -_DP_zstd= pthread -.if ${MK_BLACKLIST} != "no" -_DP_blacklist+= pthread -.endif -.if ${MK_BLOCKLIST} != "no" -_DP_blocklist+= pthread -.endif -_DP_crypto= pthread -# See comment by _DP_archive above -.if ${.MAKE.OS} == "FreeBSD" || !defined(BOOTSTRAPPING) -.if ${MK_OPENSSL} != "no" -_DP_archive+= crypto -.else -_DP_archive+= md -.endif -.endif -_DP_sqlite3= pthread -_DP_ssl= pthread crypto -_DP_ssh= crypto crypt z -.if ${MK_LDNS} != "no" -_DP_ssh+= ldns -.endif -_DP_edit= tinfow .if ${MK_OPENSSL} != "no" _DP_bsnmp= crypto .endif -_DP_geom= bsdxml sbuf +# The libc dependencies are not strictly needed but are defined to make the +# assert happy. +_DP_c= compiler_rt sys +# Use libssp_nonshared only on i386 and power*. Other archs emit direct calls +# to __stack_chk_fail, not __stack_chk_fail_local provided by libssp_nonshared. +.if ${MK_SSP} != "no" && \ + (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH:Mpower*} != "") +_DP_c+= ssp_nonshared +.endif _DP_cam= sbuf -_DP_kldelf= elf -_DP_kvm= elf -_DP_casper= nv _DP_cap_dns= nv _DP_cap_fileargs= nv _DP_cap_grp= nv _DP_cap_pwd= nv _DP_cap_sysctl= nv _DP_cap_syslog= nv -_DP_crypt= md -.if ${MK_OFED} != "no" -_DP_pcap= ibverbs mlx5 bnxtre -.endif -_DP_pjdlog= util -_DP_usb= pthread -_DP_unbound= ssl crypto pthread -_DP_rt= pthread -.if ${MK_OPENSSL} == "no" -_DP_radius= md +_DP_casper= nv +# See comment by _DP_archive above +.if ${.MAKE.OS} == "FreeBSD" || !defined(BOOTSTRAPPING) +.if ${MK_OPENSSL} != "no" +_DP_archive+= crypto .else -_DP_radius= crypto +_DP_archive+= md .endif -_DP_rtld_db= elf procstat -_DP_procstat= kvm util elf -_DP_proc= cxxrt -.if ${MK_CDDL} != "no" -_DP_proc+= ctf .endif -_DP_proc+= elf procstat rtld_db util z -_DP_mp= crypto -_DP_memstat= kvm -_DP_magic= z -_DP_mt= sbuf bsdxml -_DP_nvmf= nv -_DP_ldns= ssl crypto -_DP_lua= m -_DP_lutok= lua +_DP_ctf= spl z +_DP_crypt= md +_DP_crypto= pthread +_DP_cuse= pthread +.if ${MK_BLACKLIST} != "no" +_DP_blacklist+= pthread +.endif +.if ${MK_BLOCKLIST} != "no" +_DP_blocklist+= pthread +.endif +_DP_devstat= kvm +_DP_dialog= tinfow ncursesw m +_DP_dpv= dialog figpar util tinfow ncursesw +_DP_dtrace= ctf elf proc pthread rtld_db xo +_DP_dwarf= elf z +_DP_edit= tinfow +_DP_execinfo= elf .if ${MK_OPENSSL} != "no" _DP_fetch= ssl crypto .else _DP_fetch= md .endif -_DP_execinfo= elf -_DP_dwarf= elf z -_DP_dpv= dialog figpar util tinfow ncursesw -_DP_dialog= tinfow ncursesw m -_DP_cuse= pthread -_DP_atf_cxx= atf_c -_DP_gtest= pthread regex +.if ${MK_OPENSSH} != "no" +_DP_fido2+= crypto z +.endif +_DP_fifolog= z +_DP_formw= ncursesw +_DP_geom= bsdxml sbuf _DP_gmock= gtest _DP_gmock_main= gmock +_DP_gtest= pthread regex _DP_gtest_main= gtest -_DP_devstat= kvm +_DP_ifconfig= m +_DP_ipf= kvm +_DP_iscsiutil= md +_DP_kldelf= elf +_DP_krb5ss= edit +_DP_kvm= elf +_DP_ldns= ssl crypto +_DP_lua= m +_DP_lutok= lua +_DP_lzma= md pthread +_DP_magic= z +_DP_memstat= kvm +_DP_mp= crypto +_DP_mt= sbuf bsdxml +_DP_ncursesw= tinfow +_DP_netmap= +_DP_nvmf= nv +_DP_nvpair= spl +_DP_opencsd= cxxrt +_DP_panelw= ncursesw _DP_pam= radius tacplus md util .if ${MK_KERBEROS} != "no" && ${MK_MITKRB5} != "no" _DP_pam+= krb5 .endif .if ${MK_OPENSSH} != "no" -_DP_fido2+= crypto z _DP_pam+= ssh .endif .if ${MK_NIS} != "no" _DP_pam+= ypclnt .endif +_DP_pfctl= nv +_DP_pjdlog= util +_DP_proc= cxxrt +.if ${MK_CDDL} != "no" +_DP_proc+= ctf +.endif +_DP_proc+= elf procstat rtld_db util z +_DP_procstat= kvm util elf +.if ${MK_OPENSSL} == "no" +_DP_radius= md +.else +_DP_radius= crypto +.endif +_DP_rt= pthread +_DP_rtld_db= elf procstat +_DP_smb= kiconv +_DP_sqlite3= pthread +_DP_ssl= pthread crypto +_DP_ssh= crypto crypt z +.if ${MK_LDNS} != "no" +_DP_ssh+= ldns +.endif +_DP_stats= sbuf pthread +_DP_stdthreads= pthread +_DP_sys= compiler_rt +# Use libssp_nonshared only on i386 and power*. Other archs emit direct calls +# to __stack_chk_fail, not __stack_chk_fail_local provided by libssp_nonshared. +.if ${MK_SSP} != "no" && \ + (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH:Mpower*} != "") +_DP_sys+= ssp_nonshared +.endif +.if !defined(BOOTSTRAPPING) +_DP_thr= c sys +_DP_pthread= ${_DP_thr} +.endif +_DP_tacplus= md pam +_DP_ucl= m +_DP_ulog= md +_DP_unbound= ssl crypto pthread +_DP_usb= pthread +_DP_uvmem= pthread +_DP_vmmapi= util +_DP_xo= util +_DP_zfs= md pthread rt umem util m avl bsdxml crypto geom nvpair \ + z zfs_core zutil +_DP_zfs_core= nvpair spl zutil +_DP_zfsbootenv= zfs nvpair +_DP_zpool= md pthread z icp spl nvpair avl umem +_DP_zstd= pthread +_DP_ztest= geom m nvpair umem zpool pthread avl zfs_core spl zutil zfs icp +_DP_zutil= avl geom m + +# Kerberos support .if ${MK_KERBEROS} != "no" .if ${MK_MITKRB5} != "no" # _DP_krb5support= no dependencies except for libc # _DP_verto= no dependencies except for libc # _DP_apputils= no dependencies except for libc _DP_com_err= krb5support -_DP_k5crypto= com_err krb5support crypto _DP_gssapi_krb5= krb5 k5crypto com_err krb5profile krb5support +_DP_gssrpc= gssapi_krb5 krb5 k5crypto com_err krb5support +_DP_k5crypto= com_err krb5support crypto _DP_kadm5clnt_mit= gssrpc gssapi_krb5 krb5 k5crypto krb5support com_err krb5profile _DP_kadm5srv_mit= krb5profile gssrpc gssapi_krb5 kdb5 krb5 k5crypto krb5support com_err _DP_kdb5= gssrpc krb5 k5crypto com_err krb5support gssapi_krb5 krb5profile _DP_krad= krb5 k5crypto com_err krb5profile krb5support verto _DP_krb5= krb5profile k5crypto com_err krb5support -_DP_gssrpc= gssapi_krb5 krb5 k5crypto com_err krb5support .else -_DP_roken= crypt -_DP_kadm5clnt= com_err krb5 roken -_DP_kadm5srv= com_err hdb krb5 roken -_DP_heimntlm= crypto com_err krb5 roken -_DP_hx509= asn1 com_err crypto roken wind -_DP_hdb= asn1 com_err krb5 roken sqlite3 heimbase _DP_asn1= com_err roken -_DP_kdc= roken hdb hx509 krb5 heimntlm asn1 crypto -_DP_wind= com_err roken +_DP_gssapi_krb5= gssapi krb5 crypto roken asn1 com_err +_DP_hdb= asn1 com_err krb5 roken sqlite3 heimbase _DP_heimbase= pthread _DP_heimipcc= heimbase roken pthread _DP_heimipcs= heimbase roken pthread +_DP_heimntlm= crypto com_err krb5 roken +_DP_hx509= asn1 com_err crypto roken wind +_DP_kadm5clnt= com_err krb5 roken +_DP_kadm5srv= com_err hdb krb5 roken _DP_kafs5= asn1 krb5 roken +_DP_kdc= roken hdb hx509 krb5 heimntlm asn1 crypto _DP_krb5= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc -_DP_gssapi_krb5= gssapi krb5 crypto roken asn1 com_err -.endif -.endif -_DP_lzma= md pthread -_DP_ucl= m -_DP_vmmapi= util -_DP_opencsd= cxxrt -_DP_ctf= spl z -_DP_dtrace= ctf elf proc pthread rtld_db xo -_DP_xo= util -_DP_ztest= geom m nvpair umem zpool pthread avl zfs_core spl zutil zfs icp -# The libc dependencies are not strictly needed but are defined to make the -# assert happy. -_DP_c= compiler_rt sys -# Use libssp_nonshared only on i386 and power*. Other archs emit direct calls -# to __stack_chk_fail, not __stack_chk_fail_local provided by libssp_nonshared. -.if ${MK_SSP} != "no" && \ - (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH:Mpower*} != "") -_DP_c+= ssp_nonshared +_DP_roken= crypt +_DP_wind= com_err roken .endif -_DP_stats= sbuf pthread -_DP_stdthreads= pthread -_DP_sys= compiler_rt -# Use libssp_nonshared only on i386 and power*. Other archs emit direct calls -# to __stack_chk_fail, not __stack_chk_fail_local provided by libssp_nonshared. -.if ${MK_SSP} != "no" && \ - (${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH:Mpower*} != "") -_DP_sys+= ssp_nonshared .endif -.if !defined(BOOTSTRAPPING) -_DP_thr= c sys -_DP_pthread= ${_DP_thr} -.endif -_DP_tacplus= md pam -_DP_ncursesw= tinfow -_DP_formw= ncursesw -_DP_nvpair= spl -_DP_panelw= ncursesw .if ${MK_MITKRB5} == "no" _DP_rpcsec_gss= gssapi .else @@ -501,10 +519,10 @@ _DP_netmap= _DP_ifconfig= m _DP_pfctl= nv _DP_krb5ss= edit -_DP_iscsiutil= md # OFED support .if ${MK_OFED} != "no" +_DP_bnxtre= ibverbs pthread _DP_cxgb4= ibverbs pthread _DP_ibcm= ibverbs _DP_ibmad= ibumad @@ -514,11 +532,11 @@ _DP_ibverbs= _DP_irdma= ibverbs pthread _DP_mlx4= ibverbs pthread _DP_mlx5= ibverbs pthread -_DP_bnxtre= ibverbs pthread -_DP_rdmacm= ibverbs -_DP_osmcomp= pthread _DP_opensm= pthread +_DP_osmcomp= pthread _DP_osmvendor= ibumad pthread +_DP_pcap= ibverbs mlx5 bnxtre +_DP_rdmacm= ibverbs .endif # Define special cases