From nobody Mon Dec 8 00:35:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dPjhD077Bz6JbQR; Mon, 08 Dec 2025 00:35:56 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dPjhC6kCTz3CJ6; Mon, 08 Dec 2025 00:35:55 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765154155; h=from:from:reply-to:subject:subject: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=auypdqukW1hd8IH3rM6Hp9dpHQgwUDEzQGSCcvReoK4=; b=rW0HUI2wLbKYM9TXdv5KgqjaH4tgqVn10BL3NYuwZueuCQwDa8Ga75IxOeGBkwuOg85TRN M2beN6fwzFCWNsxzT9jlyECiQ/4RpISKTnp+Tp8Yb9+I4oSUMksxP9ls4yTMrtm9JnMS7y 20XB5peHb99BeX5Z/+orJBal3VWmAZ5zXjZsjn3Z71/Q7FfJ9o9R5eCgdcDpkeB8UDaHEk zAGTCQOpRozdJSI7W/K65Im1C2KkE1/kBEoTwikvhDj2xlTaaqytCNgEaeGERXy81QJPXx kkD2mHudke9vhjusXeFFW8oS8iTcVAIcX282mrDUwkzNBF7nDjDjJZ9sApPw8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765154155; h=from:from:reply-to:subject:subject: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=auypdqukW1hd8IH3rM6Hp9dpHQgwUDEzQGSCcvReoK4=; b=rnm3/SiYaT72weh2RwiL6aEtBYgjsZbu4U40EomBEey3jDfpezBFKJJA8mKkzsAumpIx7j gtL0gcTw513Csrzd7+PfErHwShJssybVsi8nfLHV8fGzU2HDz3X9I8maeQmy+pstEwHjm8 VqIEJbIwX7VmzLbCj52CAd5VndwjZefG046koT6xUCScuF3SjKly8ciPCKYcT4GZjY/Wce fbW0AOA5o4c4tOSx77Mry5DfEl1WTepk6uMRwB1qqcMKM7QS2MXnSUyzuHruvPml1Sw1kF 7MpwhKgXo6xVpXxD1+fGbsybtKhpGMk4LQcTpWoMXFiStuSQZwUlN7hcOfttXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765154155; a=rsa-sha256; cv=none; b=E2mdgzIxn3bkf5RUxvdp6NH4+znHcSRYVKlRp0CI2dZlKjhiHKyM6ML3U9O50xOA11sgEH +ACJtWil47zNoLId4jcW+gg27S5Fo1tGbzc9yxOkzpFyOgaTjhbMDXpiYxvZWGA82s7NS3 qS5W2xQwooAnyBIV5y/oRLDYrgdxIDAN/05bS6RB5i0FyCagvHnoEyaD7FGdPwFPUIgOSz WfZ+Cna8ZWI3yslw8e+iuY+/fwv4rZRD1ELM34XxD6G68OkaCjt51BgvTnlILYJFmdRhhE VRt2Zkdosmia20MseylWNyNjT3Exd1UdpQS2IXF5AW7UltCHD+D/6hckCc2t3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4dPjhC5L56znlX; Mon, 08 Dec 2025 00:35:55 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 57AF28EE23; Mon, 08 Dec 2025 01:35:54 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Martin Matuska Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 8b78d412aec7 - main - zfs: world changes after 89f729dcc merge In-Reply-To: <69360983.adf3.7d6e4650@gitrepo.freebsd.org> (Martin Matuska's message of "Sun, 07 Dec 2025 23:10:59 +0000") References: <69360983.adf3.7d6e4650@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Mon, 08 Dec 2025 01:35:54 +0100 Message-ID: <868qfdhkt1.fsf@ltc.des.dev> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Martin Matuska writes: > zfs: world changes after 89f729dcc merge >=20=20=20=20=20 > Remove, unbind and obsolete libuutil and libtpool > Update zfs_configh and zfs_gitrev.h I am unable to buildworld after this commit: ld: error: undefined reference: libspl_assertf >>> referenced by /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libzutil.so (dis= allowed by --no-allow-shlib-undefined) ld: error: undefined reference: taskq_create >>> referenced by /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libzutil.so (dis= allowed by --no-allow-shlib-undefined) ld: error: undefined reference: taskq_dispatch >>> referenced by /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libzutil.so (dis= allowed by --no-allow-shlib-undefined) ld: error: undefined reference: taskq_wait >>> referenced by /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libzutil.so (dis= allowed by --no-allow-shlib-undefined) ld: error: undefined reference: taskq_destroy >>> referenced by /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/libzutil.so (dis= allowed by --no-allow-shlib-undefined) c++: error: linker command failed with exit code 1 (use -v to see invocatio= n) *** [zfsd.full] Error code 1 DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Mon Dec 8 03:16:53 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dPnFx3rLdz6Jp6G for ; Mon, 08 Dec 2025 03:16:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dPnFx3FL7z3gFx for ; Mon, 08 Dec 2025 03:16:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765163813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wf47KDcoI6K827YRDggGlUmTEmC3PxeERQrofqXAB44=; b=tY52vtJI2xTFE/SGILOCjP65cghfQVVg4ftoEeUUkvrUymGYn7RpjKienjVuHnuTNfjfSa QKqUcTMwvQDE01tAZNVPQQfhwG2DdWmqjjuFaqItGo4H2wsndvvhrMBa3QJsmbR6FE8u+v La880uycPdhHuqs0C0veFdFikUrrfMmIkGjOnC0zcYb4uJt1ZjMnzj5efCteFqlbWIAtfA om+SBv+WF3sOtFiGzxc8IuKu2QtcUrmHTHVSWDc7S6E7TvOStxu3E8F128X58/XylL5oRC stQJ0f/Vqx5k5wHj5fxJWiNw3TWk9IxDUBLM1Zk1GF6bZV6SYHBEoy7dDmckpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765163813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wf47KDcoI6K827YRDggGlUmTEmC3PxeERQrofqXAB44=; b=Fx8PGoqIg/BTYAKKpp02xsWu1W2K64XPlbgCZKnczSeBogKpn3SEj1hbLb8GKzubCRjo/X cHjV2fTcI7CU1bPVOe24+qX6ExNkUtL4fo95wK2b2E0o5oevk46ygr6OPLicY/QX4aJK/S vLPL7HlIBmmopv7c6CSCtS1gf92a2EAawyzG3gAZ6ncvYwKRF9tYWn8uccdX0EDp+QKVyC zzY7YcB6mDyIq+XCHlQiBU6JIg+VXSsbzkHuYeOIYrxXenjidRsMUGTcRN001uNg2lI5Hm LuIQlJLtD4R/LwurnRieNhT1ZnnqmYuDqxEmvF1yq/TtZPkJ2OJ8yXOfSJTEpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765163813; a=rsa-sha256; cv=none; b=D95wM3sdS3R6uRWxOWP8kWkYozr6gBMMMVAoIh2IS+ozvx33kjgucf9VqayR1x80kAcJQY xUtFMco7PRaeD/rk2CjKdvCLZ2EBqhnmel9b5ly3ls5hsKoF57drwA1Zeln4+tcXAwBSZ5 Lc7BEir9S2/ltxAnPMcE6sEDXdmRkS2VpWTnRYpdpkGN6heLjr8rkUtuFpQI5tC8uWY/Kg kFKBdDa4LOmxqGi2DfSs5yhNXZsIVTAx4IcHltLj5wcUZdDPf1UkFKa/mQmIjGD4ijtfVI XM5AeiKbd2z6OI34QYkNgcoMasV4TRe7QwBNNYZ0CnEJ2pyTN9Kw3s9fe/W9AQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dPnFx22gWz19Ss for ; Mon, 08 Dec 2025 03:16:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 327fe by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 08 Dec 2025 03:16:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: f0ea85922984 - main - iwmfw(4): fix spelling of the iwm8000C firmware. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: f0ea859229843affe07ac94db915489756f87096 Auto-Submitted: auto-generated Date: Mon, 08 Dec 2025 03:16:53 +0000 Message-Id: <69364325.327fe.12cdda67@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f0ea859229843affe07ac94db915489756f87096 commit f0ea859229843affe07ac94db915489756f87096 Author: Bjoern A. Zeeb AuthorDate: 2025-12-08 03:03:14 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-12-08 03:16:00 +0000 iwmfw(4): fix spelling of the iwm8000C firmware. When migrating the firmware to be installed as plain firmware files to /boot/firmware the iwm8000C firmware lost its "fw" suffix that iwm(4) expects. The follow-up change to defaults/loader.conf is also consistently missing the "fw". Fix both places, and add the wrongly spelt version to ObsoleteFiles.inc (entirely untested). PR: 291403 Reported by: Augustin Hoffmann (avgwst tutanota.de) Fixes: af0a81b6470aba4af4a24ae9804053722846ded4 Fixes: a0f06dfb0d188966bee7265ec7d9f20093186bb6 MFC after: 3 days --- ObsoleteFiles.inc | 3 +++ share/firmwares/iwm/Makefile | 2 +- stand/defaults/loader.conf | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 96af7d6205b5..1e7271c39385 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20251208: Rename iwm8000C to correct name. +OLD_FILES+=boot/firmware/iwm8000C + # 20251207: removed libuutil and libtpool OLD_LIBS+= lib/libuutil.so.2 OLD_LIBS+= lib/libtpool.so.2 diff --git a/share/firmwares/iwm/Makefile b/share/firmwares/iwm/Makefile index c44f401c315e..0a242513fa3d 100644 --- a/share/firmwares/iwm/Makefile +++ b/share/firmwares/iwm/Makefile @@ -41,7 +41,7 @@ iwm7265DMODE= 644 iwm7265DPACKAGE= firmware-iwm iwm8000C= ${SRCTOP}/sys/contrib/dev/iwm/iwm-8000C-22.fw -iwm8000CNAME= iwm8000C +iwm8000CNAME= iwm8000Cfw iwm8000CDIR= /boot/firmware iwm8000CMODE= 644 iwm8000CPACKAGE= firmware-iwm diff --git a/stand/defaults/loader.conf b/stand/defaults/loader.conf index 036479d22285..71fb052cd21b 100644 --- a/stand/defaults/loader.conf +++ b/stand/defaults/loader.conf @@ -195,5 +195,5 @@ iwm8265fw_type="firmware" iwm9260fw_type="firmware" iwm3168fw_type="firmware" iwm7265Dfw_type="firmware" -iwm8000C_type="firmware" +iwm8000Cfw_type="firmware" iwm9000fw_type="firmware" From nobody Mon Dec 8 10:31:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dPyv22TYsz6KJfF for ; Mon, 08 Dec 2025 10:31:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dPyv21pShz4LVj for ; Mon, 08 Dec 2025 10:31:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765189870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H2trFvAj5plDV3+eTBS6o5iudVLonDslxLOfy0Go4NE=; b=Bt6CQ66i5YvnOwLm2WymZRny7000ivqyh4Q94iLdpQLpGTzRax6ZVgW/0D45mVLR67S4eQ 5TmPcq1t3+eM5/DJvL1zu/4OAZnaWIAa7REJ7ZDpv6jL7y8qMVex5kJgFxr0YA7Lq70PpM rE7ljaYmFGcYU6d0Ex0U36peQ/UZxgIlV1HUMT5I+ZsdYPZzizR8msdsKWM1mN288lwN+6 biQkZNf6veRPtNIy1wF64tvvRUsP2B4A4e4S1QMfe+3rJUDrv6S9jm09uiV/FrnAK/Ogt5 VJmUtr1gs11L13hDQWF2/jf5R+Xy8zcZAGzVey5pfhLfjuM9gDWkrXTzFUC2XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765189870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H2trFvAj5plDV3+eTBS6o5iudVLonDslxLOfy0Go4NE=; b=MNFCZMOGrfsO+Uyb1ia+r6dvzJ9jFIh/UDkMTOPzM25tuZNpyeff1ZeGPIgO9T5XBxjuC2 S3aYHCj2KVAXxnomcbDi8uOB2fAJSdo/y8Yjc7QL9d2VUQPajZObXkD9hDy2Yh+2h8L1Nh 22brlaepQCJaq5RRByZ06jUSe2i+dJxXjZ72w2qerLVP2KsvM0GhpQcjfuRguPkhWl4GRm ldz7nElgYKI9HWzW3FB/He66bj6wp+2VAadPQTqQnKsvDn+wkwNVzYNfmdW6OirE7NqlvC lhjy9VSP9OM7OMjQh/POTksOU47F3HzZ5dERoTiKQS3M3u0DUushikfxzR+ErQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765189870; a=rsa-sha256; cv=none; b=tr/2iqxQClTltDKCiLUk04uOZ8vYPIs75QXozpR+4pu/HeIZqoyZLKdaQ8yvHHEByeC0JC gdDBDUWbv3oYUsuI9UwH6b/DzwFdVVHObSuHY6RfV4UCkvMBdlqLHjr43xZmTHzk73Till 42IkcDD0bjGljnQu5CgxYvFq1zu6+MORb+io+GZD7lEfsksI5PYxSpZMDw0XOC5t2YpgZT LzwA1dlqK6b3Z99prE4AcA/DbcSRi1bYlxERfGg1rFdeqmuf4SZa0yy+VXxVgTS26QHZNE zlHkFtS1CIiKaJn5Zh79wdN3oHgibPjmNMPUUQu1ir0FXmy/I9uOBKeh54/RTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dPyv21CP5z1N3c for ; Mon, 08 Dec 2025 10:31:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37ebb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 08 Dec 2025 10:31:10 +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: 6ce227d62748 - main - cleanvar: Fix startup order List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 6ce227d6274869a95150746d2f2d8c8c5ed9a266 Auto-Submitted: auto-generated Date: Mon, 08 Dec 2025 10:31:10 +0000 Message-Id: <6936a8ee.37ebb.6eceb52a@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=6ce227d6274869a95150746d2f2d8c8c5ed9a266 commit 6ce227d6274869a95150746d2f2d8c8c5ed9a266 Author: Dag-Erling Smørgrav AuthorDate: 2025-12-08 10:30:05 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-12-08 10:30:05 +0000 cleanvar: Fix startup order Instead of having FILESYSTEMS require cleanvar, which doesn't really make semantic sense, say that cleanvar needs to run before FILESYSTEMS. MFC after: 3 days Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D54118 --- libexec/rc/rc.d/FILESYSTEMS | 2 +- libexec/rc/rc.d/cleanvar | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libexec/rc/rc.d/FILESYSTEMS b/libexec/rc/rc.d/FILESYSTEMS index 1bf52077be8e..d93d65153e41 100755 --- a/libexec/rc/rc.d/FILESYSTEMS +++ b/libexec/rc/rc.d/FILESYSTEMS @@ -3,7 +3,7 @@ # # PROVIDE: FILESYSTEMS -# REQUIRE: root mountcritlocal cleanvar tmp +# REQUIRE: root mountcritlocal tmp var # This is a dummy dependency, for services which require filesystems # to be mounted before starting. It also serves as the default early / diff --git a/libexec/rc/rc.d/cleanvar b/libexec/rc/rc.d/cleanvar index dce5baa6875b..daae456fbe71 100755 --- a/libexec/rc/rc.d/cleanvar +++ b/libexec/rc/rc.d/cleanvar @@ -4,6 +4,7 @@ # PROVIDE: cleanvar # REQUIRE: var +# BEFORE: FILESYSTEMS . /etc/rc.subr From nobody Mon Dec 8 10:31:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dPyv34TQKz6KJnD for ; Mon, 08 Dec 2025 10:31:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dPyv32hNKz4LdM for ; Mon, 08 Dec 2025 10:31:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765189871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HRFMP9+JbMtgMvca00sLwwMea/dYPKVGQtHC+DaqeeQ=; b=FWZdMaRoNg/OTe5oWLLA3nDXAALL2QPR1M/C/a+jaTv2d93hhif++uLFE7GS9nMgth3FWk Maes3C5unVdUSKVPaYPEYIjzKUsbr3tQzj5oQ3tGl1exaX0eUAIZ2i+Cmjr8zuCl4QGyHA qBmQYZygdmdxl/7KDDXE4Y9nJnJaHjsSBXwYJNYorDg7TMODL5Hkal+lGUtBOYFf57J3eT tKDG5gkcpnspwiN3jnbRYIZR5JsJH7SWvSU60loXRZnjeyRyckcsUSaliIIRIsVNb67GQQ P+W2BPgarwFxGVlGcW735sZMcCE99BY2UuXyuNj+VgT5jbFi/zgJWUL7YEtY8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765189871; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HRFMP9+JbMtgMvca00sLwwMea/dYPKVGQtHC+DaqeeQ=; b=cNWnjVseN7OULtK6/4hw7PiFIYXTXXZvm9H6Ij1vC2qmRlvczC83JnC0SSt90WtDx8PLkC LxEKsplIN1hoUkvkNlPp/aKxrOkuJwDXHc93VPFxOPq8cDbfdVklTA2EZWDFXFU11KQEVY mOVVIsQVJzPAxAQXinrZkHAW4ISUa6lKd1z+QhZ0VpYkAV95pcyDFp9Ys5YX9LMcTNYct+ vTuaFh//3If6yYRxBe6S/H7Pj/Yt3JMupBZUU7wxYkOBQEvx7hC/UNPLwVtLwKmZTjiMfU 4vaXA150CmkYrwnwJvE7a27Jn7d1Ge7QwEjo0KtLbkzkM6FojiPZ97Uq1eF6kw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765189871; a=rsa-sha256; cv=none; b=LWuGus0/zK+hyvTBEtcXzf1zQThjMaIise0p3KNA0esbiEN6sn3FAqnGsP6xuAvel4D/Ix of0JBRHWeaqGXbTN7BPuCkMbBCnb6iQMgML2dY1tYPq4O/5UDvvpkAKznqf/Payq7nI0k9 uz+DMZKcPxZXeZroxX0GCfpp0q9zviHYoxxeWKeVld2bmfQGkNYuMAwnbi9oWfIU46lxXX POQw/OT6NbjkwbJsOqhFNapQhp7YSnlWpuGn67NJ7YoCj98FpKiWyDWMBueRl9uE3iQnHe V+eJT1iNMKYxKn376ESYlV/QhyonwqYfKfUzAPzUlVCgjnuq511DIrVC7IS0VQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dPyv322tdz1MnT for ; Mon, 08 Dec 2025 10:31:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8021 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 08 Dec 2025 10:31:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: e540e8b2c04f - main - noshutdown: Fix startup order List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: e540e8b2c04f03b4210a3bf2f421c05b918d1b51 Auto-Submitted: auto-generated Date: Mon, 08 Dec 2025 10:31:11 +0000 Message-Id: <6936a8ef.8021.5692874d@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=e540e8b2c04f03b4210a3bf2f421c05b918d1b51 commit e540e8b2c04f03b4210a3bf2f421c05b918d1b51 Author: Dag-Erling Smørgrav AuthorDate: 2025-12-08 10:30:10 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-12-08 10:30:10 +0000 noshutdown: Fix startup order This rc script exists solely to create a file, so have it explicitly require FILESYSTEMS. In its current form, it was as likely as not to end up running before cleanvar, which would undo its work. MFC after: 3 days Fixes: 384d976725a5 ("rc.d: Add precious_machine rc.conf knob to create /var/run/noshutdown") Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D54119 --- libexec/rc/rc.d/noshutdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.d/noshutdown b/libexec/rc/rc.d/noshutdown index 54924310a6c7..4c2ae9a3f488 100755 --- a/libexec/rc/rc.d/noshutdown +++ b/libexec/rc/rc.d/noshutdown @@ -3,7 +3,7 @@ # # PROVIDE: noshutdown -# REQUIRE: var +# REQUIRE: FILESYSTEMS # BEFORE: LOGIN . /etc/rc.subr From nobody Mon Dec 8 10:31:12 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dPyv45tsQz6KJTD for ; Mon, 08 Dec 2025 10:31:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dPyv44RWqz4Lfy for ; Mon, 08 Dec 2025 10:31:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765189872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JtTN6ymOFN1V0EGcvmY04Y+PGQmkhvR68WMW54oo5UI=; b=kuqidG5w82jVP4coj7GSEgrDIrRouAv14kHqaMmWc3+TfxapUE2t3/Oi1XfPioWDusjkXN OPfInbuW7AUIU3rKCR/qvfrePPFbtpSNiy8YnDHtcASRZ5bPG2ho3ywPYnpfuymD2OeyHD lHeIZAEhstSFCBA8nZCn1dOSV6Fdk8xg1UpnFVUe4SmsXkfLffz4b0/IqqaIZrileHvQgl fvNq+TYrIEDChiY0mvM6bElPsDcPd01H6eGw2ap/VWSkPrdSKFuuSRby9A1tknEaUVM/gb xlgT3TegRViRoGtKrzMnfnypBJP9UNKHTRK+d8wZ+SN2uDdNt56O1U+ZBPwq3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765189872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JtTN6ymOFN1V0EGcvmY04Y+PGQmkhvR68WMW54oo5UI=; b=F5PZghEwAa8FytHF79efEbmrSi4USiSirLQXRTl89Z1MzCQ9WUnsQ9NrLFfZpoObVjoVzG exXtpIu16dk8nE92EMJEKCQwR5LlOZXIbWZlUvEmNDIWAg7a9LjA5Xr7rfvSCvntzJhl2r O0PbNpLo7GGzH32xQdCtnbFOsZDd+xjpnBUIO4rOYXhsQjKXvEC6LE2ebR29JqC/KZ4MRg DstkrQh2GB1/ZBxmxZpma2UbNTVbVFb8TuVNiO+HC2jJ1xt58HrpdbbKZaL4zYc1fmucWO I9ob6Xs1Tf+Ebul524nwc9zOcGPunuLoHYARKz5lvIXZ5iOpwCW5/5DSqU8ZgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765189872; a=rsa-sha256; cv=none; b=golS70J7bc318Hz3mkR9NUpRAMcOcKj4IeGVM35OHlI/vsx4UIPnJvBazrlj45Bxyy2MG2 9MfFrjDFUn4XnfQgISd/PwQbI2qZ8dBzzdK+MTy7uyi20TiC88TWHPSSpTkE59tlAp7KGf 6U05HgPar21M2PRVd3bOGseialxC/042qfX7LRmhZ2y05j0kxrTptCCMkSVPRXSehLCwnu eBoCluPlezB54Xyotk564rI5SEGc9bmN4WM7xbeILhEkJPiqKZ5+Oz6MmriKCwFDh6fnH/ ygEKdFfapea28kqPaxM36JBa9xD4llw9IVrlCEePwcnj1VizyQqKJnvJiZPxdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dPyv42lwSz1NLD for ; Mon, 08 Dec 2025 10:31:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36f77 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 08 Dec 2025 10:31:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: de670c611b17 - main - nextboot: Reimplement missing -a option List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: de670c611b17939712a81dc56f73a3ff84f6c178 Auto-Submitted: auto-generated Date: Mon, 08 Dec 2025 10:31:12 +0000 Message-Id: <6936a8f0.36f77.3976cdf6@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=de670c611b17939712a81dc56f73a3ff84f6c178 commit de670c611b17939712a81dc56f73a3ff84f6c178 Author: Dag-Erling Smørgrav AuthorDate: 2025-12-08 10:30:17 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-12-08 10:30:17 +0000 nextboot: Reimplement missing -a option * Reimplement the -a option which was available in the original shell script and is still documented. * Print the correct usage string when invoked as nextboot. * Add the -D option to the manual page synopsis. MFC after: 1 week Fixes: fd6d47375a78 ("rescue,nextboot: Install nextboot as a link to reboot, rm nextboot.sh") Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D54120 --- sbin/reboot/nextboot.8 | 4 ++-- sbin/reboot/reboot.c | 44 ++++++++++++++++++++++++++++++++++---------- 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/sbin/reboot/nextboot.8 b/sbin/reboot/nextboot.8 index 188063dbfd3b..52f77bb75ebd 100644 --- a/sbin/reboot/nextboot.8 +++ b/sbin/reboot/nextboot.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 29, 2022 +.Dd December 8, 2025 .Dt NEXTBOOT 8 .Os .Sh NAME @@ -30,7 +30,7 @@ .Nd "specify an alternate kernel and boot flags for the next reboot" .Sh SYNOPSIS .Nm -.Op Fl af +.Op Fl aDf .Op Fl e Ar variable=value .Op Fl k Ar kernel .Op Fl o Ar options diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c index f6065e80fb66..59ae83ef6f6a 100644 --- a/sbin/reboot/reboot.c +++ b/sbin/reboot/reboot.c @@ -112,12 +112,13 @@ zfsbootcfg(const char *pool, bool force) } static void -write_nextboot(const char *fn, const char *env, bool force) +write_nextboot(const char *fn, const char *env, bool append, bool force) { char tmp[PATH_MAX]; FILE *fp; struct statfs sfs; - int tmpfd; + ssize_t ret; + int fd, tmpfd; bool supported = false; bool zfs = false; @@ -145,6 +146,7 @@ write_nextboot(const char *fn, const char *env, bool force) E("Path too long %s", fn); if (strlcat(tmp, ".XXXXXX", sizeof(tmp)) >= sizeof(tmp)) E("Path too long %s", fn); + tmpfd = mkstemp(tmp); if (tmpfd == -1) E("mkstemp %s", tmp); @@ -153,6 +155,21 @@ write_nextboot(const char *fn, const char *env, bool force) if (fp == NULL) E("fdopen %s", tmp); + if (append) { + if ((fd = open(fn, O_RDONLY)) < 0) { + if (errno != ENOENT) + E("open %s", fn); + } else { + do { + ret = copy_file_range(fd, NULL, tmpfd, NULL, + SSIZE_MAX, 0); + if (ret < 0) + E("copy %s to %s", fn, tmp); + } while (ret > 0); + close(fd); + } + } + if (fprintf(fp, "%s%s", supported ? "nextboot_enable=\"YES\"\n" : "", env != NULL ? env : "") < 0) { @@ -216,7 +233,7 @@ add_env(char **env, const char *key, const char *value) * Different options are valid for different programs. */ #define GETOPT_REBOOT "cDde:fk:lNno:pqr" -#define GETOPT_NEXTBOOT "De:fk:o:" +#define GETOPT_NEXTBOOT "aDe:fk:o:" int main(int argc, char *argv[]) @@ -225,7 +242,7 @@ main(int argc, char *argv[]) const struct passwd *pw; struct stat st; int ch, howto = 0, i, sverrno; - bool Dflag, fflag, lflag, Nflag, nflag, qflag; + bool aflag, Dflag, fflag, lflag, Nflag, nflag, qflag; uint64_t pageins; const char *user, *kernel = NULL, *getopts = GETOPT_REBOOT; char *env = NULL, *v; @@ -240,9 +257,12 @@ main(int argc, char *argv[]) /* reboot */ howto = 0; } - Dflag = fflag = lflag = Nflag = nflag = qflag = false; + aflag = Dflag = fflag = lflag = Nflag = nflag = qflag = false; while ((ch = getopt(argc, argv, getopts)) != -1) { switch(ch) { + case 'a': + aflag = true; + break; case 'c': howto |= RB_POWERCYCLE; break; @@ -363,7 +383,7 @@ main(int argc, char *argv[]) } if (env != NULL) - write_nextboot(PATH_NEXTBOOT, env, fflag); + write_nextboot(PATH_NEXTBOOT, env, aflag, fflag); if (donextboot) exit (0); @@ -483,10 +503,14 @@ restart: static void usage(void) { - - (void)fprintf(stderr, dohalt ? - "usage: halt [-clNnpq] [-k kernel]\n" : - "usage: reboot [-cdlNnpqr] [-k kernel]\n"); + if (donextboot) { + fprintf(stderr, "usage: nextboot [-aDf] " + "[-e name=value] [-k kernel] [-o options]\n"); + } else { + fprintf(stderr, dohalt ? + "usage: halt [-clNnpq] [-k kernel]\n" : + "usage: reboot [-cdlNnpqr] [-k kernel]\n"); + } exit(1); } From nobody Mon Dec 8 12:29:09 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQ1WB2GRYz6Jk0J for ; Mon, 08 Dec 2025 12:29:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQ1W96TV6z3TJ8 for ; Mon, 08 Dec 2025 12:29:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765196949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n4jZgPa4vWsVYHaxc6TSyJYZSQopj0/jdUVTQTRKIx0=; b=WuSHOVZ4IboKGdK3KvieKeNN8X2mATJNiOtXmzREop+cCQBuynQeDPDYGBqdMlhu3d+fs1 LRV63xIJrVAQbJwBRuyjJ5l2niHq0iD9EqqH3pGS3JtGCETyna74WZl6vyBGPGVclRSjEO A388hygUoCXbKenneNkaP0EoeyGm1W8NX12XSi+vQHLYc0WWFbDekiIjhBdYgQ3mr6xvLR yKTZRbKHWBkzHcWu6g7knN5c5N/NvDpZi+U6Pa4g5aVV7FOVFDnhDhfqFTO9k4rrZViVsq LD3XunwCeh+R+vn5Og4zQT5t2S/Zu6rTmXQGF6IIMgPOU0dqUZPAIGkIC+d9NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765196949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n4jZgPa4vWsVYHaxc6TSyJYZSQopj0/jdUVTQTRKIx0=; b=wSnhgVKU2v09/xPrc3C8JREDHpMieljJNCNov3oGmstqTX+v3rwO6uZxDiqqcEO6GGTPCS xXHAH+fd7rvfoGZfB/Eafgw7z+O5aeX5HhkVdN7GkWMBAD3nqwt5hl1MKdZWR3GXfLvsTh WsPc3ymk2Menkrch92l6JVdL8uTjrxC3j3yJSUG+iktFkL+6S2Pr5wVR2HSYRQ+0ZS1Iqg SmiMU8cmZxAW4lCL4TAueaIW4nVQRMntbkxKs4AIOADAeH75oiinIS7RCVK7gdk3i4G5SQ ZJZkSogSjCtnVewSDPeysJ4GOZcIqb5gTRw4JSrzs9RReBpexw4ZhNcVcx4knQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765196949; a=rsa-sha256; cv=none; b=CUdPplJeHzXis9mxaAwuxU0UkFBrUsjikzFfK+Sqb6s/EHjmb/J2+feRkBf9LVa6Ls0NOk ztrxiYJpz4mOalClAPLhKWYMjOlgE3O7VfnFFoe029Twt3FwPb3zFLdjmVb4LWGl5EmN7e eg7+tewsBPPuhL/zzuF9UmqrhDx/p9vT16XWvB9Ffck+lGJrcBZYo5raTxJpqfDieR5e7M qwPgXqaMrS17u+NT9DxyXKY6qhxlYFPghEbGosPkLMHzioaQkrAnztMdecsfTOjGGouo4f k+RyHCzfTX0qJVmhHpvNI607F1H/zb3AHUvCwNaxvLCmWLUIoutEIv8l1Yw0gQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQ1W95MnNz1QnD for ; Mon, 08 Dec 2025 12:29:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24e13 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 08 Dec 2025 12:29:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 2f6c77cd6f08 - main - zfs: unbreak build after 89f729dcc merge List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2f6c77cd6f08b9bb646e038e3211b0ad21a2c012 Auto-Submitted: auto-generated Date: Mon, 08 Dec 2025 12:29:09 +0000 Message-Id: <6936c495.24e13.745784d0@gitrepo.freebsd.org> The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=2f6c77cd6f08b9bb646e038e3211b0ad21a2c012 commit 2f6c77cd6f08b9bb646e038e3211b0ad21a2c012 Author: Martin Matuska AuthorDate: 2025-12-08 12:21:26 +0000 Commit: Martin Matuska CommitDate: 2025-12-08 12:21:26 +0000 zfs: unbreak build after 89f729dcc merge Link zfsd against spl and pthread --- cddl/usr.sbin/zfsd/Makefile.common | 2 +- cddl/usr.sbin/zfsd/Makefile.depend | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cddl/usr.sbin/zfsd/Makefile.common b/cddl/usr.sbin/zfsd/Makefile.common index 1bade90d140f..b8d5db0ee6e2 100644 --- a/cddl/usr.sbin/zfsd/Makefile.common +++ b/cddl/usr.sbin/zfsd/Makefile.common @@ -25,7 +25,7 @@ CFLAGS+= -I${SRCTOP}/cddl/usr.sbin CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -DHAVE_EXECVPE -LIBADD+= devdctl zfs util geom bsdxml sbuf nvpair avl zutil +LIBADD+= devdctl zfs util geom bsdxml sbuf nvpair avl zutil spl pthread cscope: find ${.CURDIR} -type f -a \( -name "*.[ch]" -o -name "*.cc" \) \ diff --git a/cddl/usr.sbin/zfsd/Makefile.depend b/cddl/usr.sbin/zfsd/Makefile.depend index 64528ed3f4cb..9c040a0e10af 100644 --- a/cddl/usr.sbin/zfsd/Makefile.depend +++ b/cddl/usr.sbin/zfsd/Makefile.depend @@ -16,6 +16,7 @@ DIRDEPS = \ lib/libexpat \ lib/libgeom \ lib/libsbuf \ + lib/libspl \ lib/libutil \ lib/msun \ From nobody Mon Dec 8 13:31:17 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQ2ts4FJKz6JnJk for ; Mon, 08 Dec 2025 13:31:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQ2ts2jQ7z3fV9 for ; Mon, 08 Dec 2025 13:31:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765200677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gWUPwEx7DkZ5YUCuE5Gw+SJlUBFPC9NNHfcdsDEAC2w=; b=LR7X0HIEz005Ccs1gbKFgCjMcfI+WckIxAHcJZzGG+slgVdUPRqo/6VBUe7evI2kFErtVI xwSj9AN2r/8jB/4dZrUKLcSVu4c2eXzoCcHHJG726Lc2Pht3C2giA/wR0GXy02W0JJm1fH kNV84SYoeCgMI6kN1qaN/4m9Gbn9v02/P3FpbGVTjDJNqy2a89/BKft3NeR2D69L1SdbBX jZbb9ImLPXHm5DKCmcVcj32FbrWzcTmgwqRHASJl3KfVyZJNXVoU2m/g+GewUw9AmrZMnt GlqUgRkv0FtCMiwXqjhEMH6LbmNe/ahhGP64VBk+Yp/YLAo3CaPAga6qQlXvKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765200677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gWUPwEx7DkZ5YUCuE5Gw+SJlUBFPC9NNHfcdsDEAC2w=; b=bKRyfc7kEetLFNjpG6gHKZvo1kiKJyOALFttggg8NwQlR8sQCSNyyMmAB/7TE8Hi6VICmw Jt7fWIi/cij23VXWkr/Zg08FroAsrrtenwlt62bp9MuVGV+/PqezczbkpIPnJ8JnySgfnr ggzEIX5wcb98Yk4ms1HrGZpQBG+n7j/FT3vo6gQxhz5P2kflIGwKs3ZPnD/ufdigxeel/R eJjxqPqSImzWu6rldK6jWxZB8YmfT4BtPBM0RfVedbPQY3dVkd1RE5Cmwy1UM+1z7woH/h vIAHhiK/4OXl38twQV0KbZ9SxK26rE0+IZqBlyeoyfDXYVLa9sXa1fpbTjWEGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765200677; a=rsa-sha256; cv=none; b=AzymXDXgQ8fudgeRKJf6oHnEGteEzpzsAvNKAnHGX9xhv6cieLd9EQiOl5/rCmaKCQLg45 3iOMaeXvUONyZuD6uDsqYuOyL/V1LG6Woo6ZLKNHwT6BnX9JilYMvNl7PafwJQFpvhJtLy rVYvNvzA3qBD2ygDaa58igONmJp9+iDLpa+kCy6M50JSNqB2OZD+hlXZVdHPWKg5HSmSUR +JwJedA37yczTsJhzKCxSdyQ0Ph7TNPJZy+sn1kQ6/DJoMqyAsVZf2/GShLEa72IN1A1GC RuF5q+LugcWRjVkk+KTYTBM6bVaptG/16E4SQscFduTqsHWb1FDtR40Sm2p1xA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQ2ts2GX6zJD for ; Mon, 08 Dec 2025 13:31:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2ccdf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 08 Dec 2025 13:31:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 97a24b350c4b - main - prepare-commit-msg: Add missing tabs to Fixes: and Event: List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 97a24b350c4b9400749e5b199d563e2ed3dfbe6d Auto-Submitted: auto-generated Date: Mon, 08 Dec 2025 13:31:17 +0000 Message-Id: <6936d325.2ccdf.16174640@gitrepo.freebsd.org> The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=97a24b350c4b9400749e5b199d563e2ed3dfbe6d commit 97a24b350c4b9400749e5b199d563e2ed3dfbe6d Author: Jessica Clarke AuthorDate: 2025-12-08 13:26:00 +0000 Commit: Jessica Clarke CommitDate: 2025-12-08 13:26:00 +0000 prepare-commit-msg: Add missing tabs to Fixes: and Event: Although these line up when prefixed with "# ", once the comment prefix is deleted they no longer do. Add an extra tab to each to compensate, just like "Obtained from:". --- tools/tools/git/hooks/prepare-commit-msg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tools/git/hooks/prepare-commit-msg b/tools/tools/git/hooks/prepare-commit-msg index e8e0e2887c3f..007f0f8cbbd8 100755 --- a/tools/tools/git/hooks/prepare-commit-msg +++ b/tools/tools/git/hooks/prepare-commit-msg @@ -48,11 +48,11 @@ $(awk '1;/^#$/{exit}' $1) # Tested by: # Approved by: # Obtained from: -# Fixes: +# Fixes: # MFC after: # Relnotes: # Security: -# Event: +# Event: # Sponsored by: # Pull Request: /pull/###> # Differential Revision: From nobody Mon Dec 8 14:11:59 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQ3nr07hlz6Js1S for ; Mon, 08 Dec 2025 14:12:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQ3nq6ZWZz3nJj for ; Mon, 08 Dec 2025 14:11:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765203119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IyBKUodvNWsHEHClsfo+zJxj+zsElpZKjClOB1LdlCY=; b=oT/11BiMbie5E4N5qpGLBTN861W0+EVUX6IvxEuVDWUL96YrCR4g2b1KMqIXhuKs9eEPtz 6xTisvsvJKYkYgdoExrppKvxacaZ/uKmasCxr2DCfbUV2P9VOKqsha35vXp9l5HYH12IPF wwl405JSLBLvFKRREXjpkU9EK3ztCJaZHhoG+RbevxHHZCOtveKR6drwJb4mHNkmdhFbf+ JqsrohTLZ593uZ+y3DnKHct8HVR2FpsWElwyXrI1aQrUUUnwgNOsn8k1CFTufzako6Atcz 8GP6g8UiK1iUt+BMhbJ6M528WEtfl7AWLJttzhxblJ7VO/KMZCX7IY61WJAJ4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765203119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IyBKUodvNWsHEHClsfo+zJxj+zsElpZKjClOB1LdlCY=; b=p/ECxVwUuAByg7po9MhjrV84rRSPmWKAItu0POcDjLpfFQrSrAdPcX6iqUwP2JYxczfUke NiTv7mJf8YLm2qlvqBEVNw3p9Z101rbDXpXspN8dZlnLIOGo4CrR6U+0zNRezFYBHLl4tZ fG4euYdbgjd3V/KCnhXAt6GgyAYS6Rlnvtu2PGoUu/7U6SdVKoblGMhzZzbm5Y60w6zjQ5 43aWBKRHXyGdPKx987/kspO/eVinYCLuXx4yRUbQ78dAukGujvXHgZiUZ94yZhuzdiy530 S0XLLruAOgK5DEAYCo8/uwmGaGxm3tITGtzt6i4PAZpAz/REN1aRvrDXhPusLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765203119; a=rsa-sha256; cv=none; b=O1tPXSxj4pG2uGd9QQPvMU5/GW5am84rFBRf3xExA3pjQuqRQkDRhJ6mA97qrpmRid6qCA Q3DBbTjZa0XVijEi1magqR6JwATrIppD4Y/Nz66c/sBEc7EbmUD0erg5t3s3Q/Azh4/3Sd 1dLZkkffWXSeFST/2fOqKRjVL+x1dzTEw1PfTTBXjAB0JwqELGqwTbXNXk2pDgiwC6LCiJ 0g/d8xa9df4tt8w5vhHqmr92JuKgfEZ2E01VhpbimggJkvSr9s4W5IJL7vy/gh+oZkixNd CzDRO+uOYkr64tD3BJpnkHkRRLcH5dVaxck6g4j1kGC1slQpbRkmmJqQyViqWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQ3nq660mz19v for ; Mon, 08 Dec 2025 14:11:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2f1ad by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 08 Dec 2025 14:11:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 0795e9b53cf5 - main - pf: Fix an off-by-one in pf_handle_getcreators() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 0795e9b53cf5be68955b49dce87f4800fdfd4a89 Auto-Submitted: auto-generated Date: Mon, 08 Dec 2025 14:11:59 +0000 Message-Id: <6936dcaf.2f1ad.6e2e0beb@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0795e9b53cf5be68955b49dce87f4800fdfd4a89 commit 0795e9b53cf5be68955b49dce87f4800fdfd4a89 Author: Mark Johnston AuthorDate: 2025-12-05 21:36:02 +0000 Commit: Mark Johnston CommitDate: 2025-12-08 14:08:13 +0000 pf: Fix an off-by-one in pf_handle_getcreators() Reviewed by: kp Reported by: Kevin Day MFC after: 1 week Fixes: a7191e5d7b62 ("pf: add a way to list creator ids") Differential Revision: https://reviews.freebsd.org/D54083 --- sys/netpfil/pf/pf_nl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index 7a3775b97b3a..bd49d0a1850f 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -363,7 +363,7 @@ pf_handle_getcreators(struct nlmsghdr *hdr, struct nl_pstate *npt) bzero(creators, sizeof(creators)); - for (int i = 0; i < V_pf_hashmask; i++) { + for (int i = 0; i <= V_pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; struct pf_kstate *s; From nobody Mon Dec 8 14:12:00 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQ3ns2HqZz6JrVD for ; Mon, 08 Dec 2025 14:12:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQ3ns0T5nz3nP9 for ; Mon, 08 Dec 2025 14:12:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765203121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k5ZNITD9Wf8LdyUQh42MaejFq+p5/5O+owk+dfuL7tU=; b=fxvcuimxXis9UU71Fb92iGo9QBnVbM/dby6f7zW3tLgkZjV5PVdU4n5UnTMWUgQYQFRO/9 AmXRSNn9XLlFyczhGDgR61LSC8W402ZqkPqgtHeEgXSfjfJ4C7Qzj9QbqGoU/Ww/XI7JcH fXMX4Gpy/CKyAyO9VWlFCWJOJ4jMO8e0/C/HazCdEjeBNK3ejXhN3CoUTi3KH0VioMPy7l 2YYUTkQz6vloRTpo3BBDk4WXdxdciUtP99G3cQKKjJZEJa3V4tQgmC4/Ajx1kSXqfGqFF8 VzxrTlK5u6oJAdFyRLZYU/NN/kq43GMqPCm1iGVdd0msFDqnofWrcuTBvU4gCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765203121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k5ZNITD9Wf8LdyUQh42MaejFq+p5/5O+owk+dfuL7tU=; b=EU0WFTp22F6nZlWAx90Cb88zHu+9UqMjPMzi2lpO9J+p0Sl2HwPnkMdT9J62txgO0a5sR5 Jou9heBOp8fEZfbEV/1nxVc/QBBVCkDFLBXxsT2xtZd5dVVIsrxqQb0CqfL71tJzlkZGWO ziG6/H+RG86JEftc0B9Q857S9cov96eTB0iF0PP6566AEmFm22g2PRCXrXm2usT5+YYHSn 4X4qx2Wp0T2dPq3HOwqRuoBQMnB51QIaB2/t9Oq74PY5YlEvjIwKEKHnXBsBccxgjqztYS C7HjKUC4EKSMVOj0veC4sv2w7czEPsvbivff8cgc4uVVd+kVeemUbD2lWRaeRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765203121; a=rsa-sha256; cv=none; b=oEHZZiugUHVwg0Odi/B+KWNSOGv2FJN+iMT06D5kWrbTA+CHoJP+TY7CFdYNXRr3LtsBCI QzN1ltxXnBQC0zSuk3EsWi48bVoL7FBbcG+HEPDg7Nz67Wq1OsgtcQ+PP25sBm6VUGER9+ En7FuOhPv4kW4Psov1gGp/Z1c7WR7z7WK6KVxDEGDpNeXgogAxXi+NxZZFYTXuB1joBC3u eVftREzvI2/3rvRAxUqS7Fdn0zan8volMeWQlukMbcYoKlpmV409wY59FAZ9+AIDyyYRfX OJQZv0NnbeHbtwPYwGON02jYv2PoiGU/hxhIaBN6cpSKAgjrj4RzylWCjXn7ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQ3nr6vTYz1QQ for ; Mon, 08 Dec 2025 14:12:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2fe40 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 08 Dec 2025 14:12:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 792221630bf4 - main - rtsold: Fix a buffer leak if we fail to read the default router sysctl List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 792221630bf4e58fcd923547bab689f4497613d8 Auto-Submitted: auto-generated Date: Mon, 08 Dec 2025 14:12:00 +0000 Message-Id: <6936dcb0.2fe40.4932bc03@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=792221630bf4e58fcd923547bab689f4497613d8 commit 792221630bf4e58fcd923547bab689f4497613d8 Author: Mark Johnston AuthorDate: 2025-12-04 15:00:46 +0000 Commit: Mark Johnston CommitDate: 2025-12-08 14:08:13 +0000 rtsold: Fix a buffer leak if we fail to read the default router sysctl MFC after: 1 week Reported by: Kevin Day --- usr.sbin/rtsold/cap_sendmsg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.sbin/rtsold/cap_sendmsg.c b/usr.sbin/rtsold/cap_sendmsg.c index 6e7f156fbe62..36c68b7ba78d 100644 --- a/usr.sbin/rtsold/cap_sendmsg.c +++ b/usr.sbin/rtsold/cap_sendmsg.c @@ -151,8 +151,10 @@ probe_defrouters(uint32_t ifindex, uint32_t linkid) buf = malloc(len); if (buf == NULL) return (-1); - if (sysctl(mib, nitems(mib), buf, &len, NULL, 0) < 0) + if (sysctl(mib, nitems(mib), buf, &len, NULL, 0) < 0) { + free(buf); return (-1); + } ep = (struct in6_defrouter *)(void *)(buf + len); for (p = (struct in6_defrouter *)(void *)buf; p < ep; p++) { if (ifindex != p->if_index) From nobody Mon Dec 8 14:12:02 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQ3nt2YYhz6Jrmx for ; Mon, 08 Dec 2025 14:12:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQ3nt11PMz3ng6 for ; Mon, 08 Dec 2025 14:12:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765203122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Eqe18KFaRmyH9ztW4KjmBArNEazlEEOxdouuEhuLdKw=; b=AaS5aOUFn6sGUXfnkqEVBhmu/ABxgF6xAifNN/1SqDrOhyVGQsGeRn6YfWeThu2AYFpm0h OOr28jWfRKPVrI8nYc0+xB5TpInKxXOgpt5Y1zpyLFDdOHESNGhHSIggPe62nHxZYV5p36 ibxvWTziaezrG/e/lmB7Ht4UsmtXk7Iyh79JyE8gMrQqsyawO9IQfmTIG53nbF6jFrGJIq 7ww4UZ0gYxBMXe7mpdq3EODTLGT5HRB5AU4LZNFr4r9xIm+nrCbSMlgcwQAXDQwtUpqLSM lp6v2DycWFCbaivN1T1LHH1nFqYtP/e2rM62On+0xVNXi5t49I5A2SEXqswZbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765203122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Eqe18KFaRmyH9ztW4KjmBArNEazlEEOxdouuEhuLdKw=; b=BP3IlBgO8dsUDfcRsEzMHRE5FSyiwavUcT6Vb3bI8B73aDe+SCTgOtBs6IHFZOI3XsFdqV gF4tRyZAqRTvHoo0hH0y/sha9AUn/Ho/LYE4lzEuE8xUFqe6IqSar9A/RlozlodGCd9KV/ buONJhqqBBYUgfnLXtEQuzzcGgL8GtfXPYs71Tu7ZW5EYMsxwIIeMx42EDgzS/3pIXbGsU Uc1FHTr4INm2QgCg1Xr7w+GBMJlkNxYTHvUerI+0fo8R5RoDannySRgAAIiY2nJSyVo8Zp eyO7Z29W1H72w/GYSJsMmcM2eW20wDZBunZ579as++DMzTCEGRZ/yzhb+UDX6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765203122; a=rsa-sha256; cv=none; b=A6CFR65UtYMSTAeDlVi/8W5X8RzKze9UlndQQy6Q59W+Qh5nr8iFq3Ks4KGl/3aZ0n601n ggGrn2oQNMxXNcm0dixrI73gARPsWFS/ah7fK2JMTXXc0QH+x3cHJKtbMoJqMlaRVVM5IF CCZ5GbwyQ6TybChOkwZWE23/IHpeTPx9bAMxx+vb5zbGvnEt6/Op9RhRJgmorBjJM8r0gf HSL3NVGMbSGnCI7koc4vftsOx64LFl55utO2H9CU4P60NX+70HIqMWHAKv6nArhXiZidJg sI6dEN2vJGMdVYUcJ9cZnCfTytWayNaLgxfiyZ6Bs5SWidjQ3sqVk0TkI//LlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQ3nt0cwQz19y for ; Mon, 08 Dec 2025 14:12:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2fea8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 08 Dec 2025 14:12:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 73586fcea630 - main - libkern: Avoid a one-byte OOB access in strndup() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 73586fcea630c2c4fb83e966920c039aee8a5fc9 Auto-Submitted: auto-generated Date: Mon, 08 Dec 2025 14:12:02 +0000 Message-Id: <6936dcb2.2fea8.5fcd778@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=73586fcea630c2c4fb83e966920c039aee8a5fc9 commit 73586fcea630c2c4fb83e966920c039aee8a5fc9 Author: Mark Johnston AuthorDate: 2025-12-08 14:08:22 +0000 Commit: Mark Johnston CommitDate: 2025-12-08 14:08:22 +0000 libkern: Avoid a one-byte OOB access in strndup() If the length of the string is maxlen, we would end up copying maxlen+1 bytes, which violates the contract of the function. The result is the same since that extra byte is overwritten. Reported by: Kevin Day Reviewed by: imp, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54093 --- sys/libkern/strndup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/libkern/strndup.c b/sys/libkern/strndup.c index 75b33339e1c7..1fbcfd28cae4 100644 --- a/sys/libkern/strndup.c +++ b/sys/libkern/strndup.c @@ -40,9 +40,9 @@ strndup(const char *string, size_t maxlen, struct malloc_type *type) size_t len; char *copy; - len = strnlen(string, maxlen) + 1; - copy = malloc(len, type, M_WAITOK); + len = strnlen(string, maxlen); + copy = malloc(len + 1, type, M_WAITOK); memcpy(copy, string, len); - copy[len - 1] = '\0'; + copy[len] = '\0'; return (copy); } From nobody Mon Dec 8 14:12:03 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQ3nv3X0Hz6Jrqm for ; Mon, 08 Dec 2025 14:12:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQ3nv1pMyz3nPM for ; Mon, 08 Dec 2025 14:12:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765203123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oTQb7dE6GAvjBcbY+TVYK9qEFvMKQyjQ0/l+KRSCGsg=; b=XOieDJh/MEt2cATALSeGd/psv2dVzPuoil7mQsM34uTPt1FQLfTXIrFa+QmlcZHaAss/Jo RSULjQjMi0rGOHrygXJkaazqyvtIzAH5IBngYiay/9sc+sqYjFQrhBGqKcWom7T3xolmdX 3MzaNQ49Vo+2ZTVJSHXiHOFM3TxLrpnUEb2GH+z/VkaBvtGsXEo8pDuLjrlnQFXFKULy7j zpGl4fAy1zIoPaKGLuo2k3T0861rK4zBpcDUT7qaa8dZDc+OLatoycHUFvmNZL47z/7g4g +xf193CqkzW0gBzlJEvp4Y1rOZagwO+qMTCCen5X1yDtUaqIaEMcEENqgid8Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765203123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oTQb7dE6GAvjBcbY+TVYK9qEFvMKQyjQ0/l+KRSCGsg=; b=NRNZ0BmF/sQErQIWxxlO4hndkXGt5kpNub9r2Ih9nOyZKau4o4USDv8Zb/rOef6RFTt7dF oVCkIdBCkah31LVjOb7l1//+jZ3oaxvhqbBmX8dXVrofSuiXfxaOCDFv7FrkPdhrbg9bkw Eje1wTtAsfdew/bgqK5WKeez8j95KTTxg4GJQjcsFENh0u95WAXqeiDW6mc1i2sDm1Ge9p E+Bk6OAC3AxdkCwueQsqJIUUgqB5swP+Ood970SehkqaqOd2MNcG+OmD1AFrVD6iw4q0RT l+MsgWr2I/W9LSwzJtOYl648lN5wqiKdxWhxotKS7NOMe8rR+UfGrPHsqmvAqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765203123; a=rsa-sha256; cv=none; b=bjjd9w4LseSoXJ9WxL7uK79aFIm5ILroK9H+lYL7WUn48R+hROHT0fF7w+26ugbhAQcNg7 eGHoLgjTS0wCgZTdcEWVcULHTfdLN1vs2aQi/1svO5I5iMuwPlnBlt+VpSIu68y/jlI6c0 oMJAG+XCuGXGyyRalUFNrjhxrWi6IfFSk/p6Edji018p33MIeGvtA1qvGohmB9deVrjS31 Um7JmAyjo+tIbZ4L0jGlFowSECHjNLSDEUg3DpSCE7s6Nao4N/B+XxVG/g28g+tZjDcKk7 FuBSpZibsx+P53Jz0ULMAZEaWhLHIugxDRDZrKEuwHJToWjQGFgb+qWNela49w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQ3nv1PKpz1QT for ; Mon, 08 Dec 2025 14:12:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 302f0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 08 Dec 2025 14:12:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 0f0662c6b4cc - main - pf: Fix error handling in pf_handle_get_tstats() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 0f0662c6b4cc611d6e400f823656f908ffce5c04 Auto-Submitted: auto-generated Date: Mon, 08 Dec 2025 14:12:03 +0000 Message-Id: <6936dcb3.302f0.33fce989@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0f0662c6b4cc611d6e400f823656f908ffce5c04 commit 0f0662c6b4cc611d6e400f823656f908ffce5c04 Author: Mark Johnston AuthorDate: 2025-12-08 14:09:02 +0000 Commit: Mark Johnston CommitDate: 2025-12-08 14:09:02 +0000 pf: Fix error handling in pf_handle_get_tstats() - pfr_table_count() can return an error. - We must check for failure from mallocarray(M_NOWAIT). Fixes: 9e8d2962aad3 ("pf: convert DIOCRGETTSTATS to netlink") Reported by: Kevin Day Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54094 --- sys/netpfil/pf/pf_nl.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index bd49d0a1850f..8d0c7a2cf543 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -1954,8 +1954,18 @@ pf_handle_get_tstats(struct nlmsghdr *hdr, struct nl_pstate *npt) PF_RULES_RLOCK(); n = pfr_table_count(&attrs.pfrio_table, attrs.pfrio_flags); + if (n < 0) { + PF_RULES_RUNLOCK(); + PF_TABLE_STATS_UNLOCK(); + return (EINVAL); + } pfrtstats = mallocarray(n, sizeof(struct pfr_tstats), M_PF, M_NOWAIT | M_ZERO); + if (pfrtstats == NULL) { + PF_RULES_RUNLOCK(); + PF_TABLE_STATS_UNLOCK(); + return (ENOMEM); + } error = pfr_get_tstats(&attrs.pfrio_table, pfrtstats, &n, attrs.pfrio_flags | PFR_FLAG_USERIOCTL); From nobody Mon Dec 8 14:24:55 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQ44n6BT9z6JssP; Mon, 08 Dec 2025 14:24:57 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQ44n5jjYz3vtv; Mon, 08 Dec 2025 14:24:57 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765203897; h=from:from:reply-to:subject:subject: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=EWaDMLk2ZMovCISm0EWJM4pwRB+3wunuoQ1zc5J/tYI=; b=O7hGw4BapH3848ku+yKjAMNaTz15iIcZROLNp/N7MAMyM0HyvYtj7qTOFkcR6zt4YeLC9n iQmwtMQIPeO+o3UqbKO26fHZfV+gPEAFbQT3j7h82odmDNlaeh6op7RFgVItastWM7MTm4 qdXVqLGmoTnSoCBrXeRaYaoLAjdXXaKoBBHZG4brtXNbWKgrysvbGCy0yOZ5O0FtBvrZGy L4yXgIIiYcfkKMUFysZX4dri5KzJRwfQjIqWBrwax3mXCiOhn17HeNO4S/ZjSADZFrn/nc PiQWYclGEg/YAH0eRO16Ctgc+vZRhVU7WpjZE1REaQ4em6g9P+hD0jParh+iUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765203897; h=from:from:reply-to:subject:subject: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=EWaDMLk2ZMovCISm0EWJM4pwRB+3wunuoQ1zc5J/tYI=; b=TqfwzHACpD4UN0QmYYYmGvMjkUSW5NRzILx4HRTgqAjhUta8a1+Av0OB8Gvr3xIHSFJQy2 7q56Fwtbkga3ymgP9/1j+D8Qei7M48/U6vtq+IHOlJve/nEQWg3w08IybrKJkGXi4AiRuc 0cK1kkndPy6SsVNjW79jNmYO8vgOc8/XaLBdd+wXD8P53/9keX2J1cqNz1mBttvRHhwBzb WYZp6dc1ayZgRyDHmmXuRX/gGTWYwws2hDCRtD8XvsKPPHrrgnlZrlG9ScqOuNVbOdC/Sx Z7irogeQC35K3pV5HLqbl8Fu5BnoaPoXtz/eK/MUdlbxl5TgAqRpmIssCLEXXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765203897; a=rsa-sha256; cv=none; b=SVIFuLLw+26DYKD7t0OM62fbsIfbbb1umv6J01QPaeREEkRcNqirT5ENSrSpdbxCJ0kOhM bD22v/u6sv/2qcuoEU03ZaYjZQw80rj+f1foiv7ClDm1IpU+7uw7WV9h1iywWaDdZuD5nB jCq9DWpAVbUeQy0sVkDNygVwSvija0/2Rd4FYjegYbOhb1TY+F6o1H2SaCpRLQUJNrln73 CZOo5a0dkDg6adjttPFoBf8dqaR3J1EgpXuz05JDUyDi1Nlyz0nVxN5jnSHVBvFN6Bi+rS B8wy9gdsn5Lr4Ohl3pf8HAb93XMo81Nzvz/pqKaj+D4ZMAsx6nxN8Uj33OEZWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4dQ44n4Fl0z15lw; Mon, 08 Dec 2025 14:24:57 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id CECF48F7E1; Mon, 08 Dec 2025 15:24:55 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Martin Matuska Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 2f6c77cd6f08 - main - zfs: unbreak build after 89f729dcc merge In-Reply-To: <6936c495.24e13.745784d0@gitrepo.freebsd.org> (Martin Matuska's message of "Mon, 08 Dec 2025 12:29:09 +0000") References: <6936c495.24e13.745784d0@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Mon, 08 Dec 2025 15:24:55 +0100 Message-ID: <86ikehf3uw.fsf@ltc.des.dev> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Martin Matuska writes: > commit 2f6c77cd6f08b9bb646e038e3211b0ad21a2c012 > Author: Martin Matuska > AuthorDate: 2025-12-08 12:21:26 +0000 > Commit: Martin Matuska > CommitDate: 2025-12-08 12:21:26 +0000 > > zfs: unbreak build after 89f729dcc merge >=20=20=20=20=20 > Link zfsd against spl and pthread Thank you for fixing this. In the future, please include Fixes: lines with the correct commit hash (not the bogus one you put in the subject line) when you fix an issue that can be traced to specific commits: Fixes: 66e85755595a ("zfs: merge openzfs/zfs@89f729dcc") Fixes: 8b78d412aec7 ("zfs: world changes after 89f729dcc merge") By the way, there was no reason to split the merge in two commits. It only makes life more difficult for people trying to bisect a bug. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Mon Dec 8 16:15:25 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQ6XG0Gf8z6K2RW for ; Mon, 08 Dec 2025 16:15:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQ6XF6Q6Dz3G5s for ; Mon, 08 Dec 2025 16:15:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765210525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D1kr5G5cnhnTZpcWPqEzu1rQ7H5AhFg6nr0iJo0gZIs=; b=uhsc4FYraoKJ44UXNCYzbu1CJCMX/3BlU5n8bMaYq/neeI50h9lHZ7aECzRt2qL2u1Pvfz 5BJ/pW1zxXge62t6iEcM83Q/+f14yURj3ffXUcyYXuaiJnPZcRXQ3V+CVRM0EqrWUgcTFr vndtaLSHMbW/3t7ZQ0mDbPsLYYWAMM+xpns/F/d1suZIfyudv5dVl346K9U5QoVQaXMb9b KQhqxYvx7qahoaSqrXLTedw3vbJOa4LAeqRYqDFTdHS9QE3S3RVZiN4wTCCIX6UUXQfCRN gMGeTX1rQh7ijpFDCpAFoMTelL5nSrYrEizA7W0BljUBO+dYTQB20+rJovoURg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765210525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D1kr5G5cnhnTZpcWPqEzu1rQ7H5AhFg6nr0iJo0gZIs=; b=oI4MypQDilQryzSxunBzN9yn22FyKJ+ZIfyYqhh2bWGY0+V0vzTEpOPYkBrF05LLMRq299 YSDkJQ6kYnjLuxymiuIsVAdXKUexio4zJqYI9kUr4tk1gBDM/IGZ+NGbt+miWRzZFh4V9t fayh37NBPbFEa88KEVr1BzySoe4KBxGn77vEANcalfTeSBBjFWa425jji9zmleT+qGR2SC +o8JcQJn+4QriWnzgYdMVsP3DvE8MFfz8238E5d85KjM1mIJxS79a2BHSNshISFVnJQs3t dOS0a4PYML38x2B9xuS1t4D/iwUgat57ALYgxsv4GURf8KWUpGitnIXjZrbuZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765210525; a=rsa-sha256; cv=none; b=SKQocWOpbNbc0g/XLXsC/z4Uhp0hlyKCv3Mm6pKLtttbwpZsB5LaX1VehfphMYbOvLmTG+ i/oNaj8XU37Hiuvv2abTw/2sGR0pHU7+I1Qa0Fltt6Cl/BMCkZiU32pkM2zYXTmjIQj8qA 1j9KNaALvCc2sHp9yE1uNdzK6QLMF4T+GMfLVpJg8y0n2a7E4cgUNZ3VAwSTfE2tJSUbmA GRMy0gvq+t4WzJJfL+RWltV/Dpjltqk76CjyFdYj3kcSHn/kdjYDYFeeOQbMarfHG9N6j8 p/CRWDGKDU5w6cQ8uDBMI2Rr6OfFwZIxYH76k5NQgPmhSFkubtwvdW3/F80lEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQ6XF5nfRz4Yq for ; Mon, 08 Dec 2025 16:15:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ab3f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 08 Dec 2025 16:15:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: d9788eabffa4 - main - ipfilter: Restrict ipfilter within a jail List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d9788eabffa4b67fc534685fc3d9b8e3334af196 Auto-Submitted: auto-generated Date: Mon, 08 Dec 2025 16:15:25 +0000 Message-Id: <6936f99d.3ab3f.185d9547@gitrepo.freebsd.org> The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=d9788eabffa4b67fc534685fc3d9b8e3334af196 commit d9788eabffa4b67fc534685fc3d9b8e3334af196 Author: Cy Schubert AuthorDate: 2025-10-29 18:29:39 +0000 Commit: Cy Schubert CommitDate: 2025-12-08 16:15:18 +0000 ipfilter: Restrict ipfilter within a jail Add a sysctl/tunable (net.inet.ipf.jail_allowed) to control whether a jail can manage its own ipfilter rules, pools, and settings. A jail's control over its own ipfilter rules and settings may not be desireable. The default is jail access to ipfilter is denied. The host system can stil manage a jail's rules by attaching the rules, using the on keyword, limiting the rule to the jail's interface. Or the sysctl/tunable can be enabled to allow a jail control over its own ipfilter rules and settings. Implementation note: Rather than store the jail_allowed variable, referenced by sysctl(9), in a global area, storing the variable in the ipfilter softc is consistent with ipfilter's use of its softc. Discussed with: emaste, jrm MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53623 --- sbin/ipf/libipf/interror.c | 1 + sys/netpfil/ipfilter/netinet/fil.c | 1 + sys/netpfil/ipfilter/netinet/ip_fil.h | 1 + sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 15 +++++++++++++++ sys/netpfil/ipfilter/netinet/mlfk_ipl.c | 1 + 5 files changed, 19 insertions(+) diff --git a/sbin/ipf/libipf/interror.c b/sbin/ipf/libipf/interror.c index 6d5391f58ba2..2bbecaa154e6 100644 --- a/sbin/ipf/libipf/interror.c +++ b/sbin/ipf/libipf/interror.c @@ -531,6 +531,7 @@ log" }, { 130016, "finding pfil head failed" }, { 130017, "ipfilter is already initialised and running" }, { 130018, "ioctl denied in jail without VNET" }, + { 130019, "ioctl denied in jail" }, }; diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 0c5e22517dc4..242affeff000 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -9096,6 +9096,7 @@ ipf_main_soft_create(void *arg) softc->ipf_icmpminfragmtu = 68; softc->ipf_max_namelen = 128; softc->ipf_flags = IPF_LOGGING; + softc->ipf_jail_allowed = 0; #ifdef LARGE_NAT softc->ipf_large_nat = 1; diff --git a/sys/netpfil/ipfilter/netinet/ip_fil.h b/sys/netpfil/ipfilter/netinet/ip_fil.h index 7b070f0d6867..24d4f9695322 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil.h +++ b/sys/netpfil/ipfilter/netinet/ip_fil.h @@ -1550,6 +1550,7 @@ typedef struct ipf_main_softc_s { u_int ipf_icmpacktimeout; u_int ipf_iptimeout; u_int ipf_large_nat; + u_int ipf_jail_allowed; u_long ipf_ticks; u_long ipf_userifqs; u_long ipf_rb_no_mem; diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c index 6eb6cf2a7a47..43b590cc0204 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c @@ -88,6 +88,7 @@ VNET_DEFINE(ipf_main_softc_t, ipfmain) = { .ipf_running = -2, }; #define V_ipfmain VNET(ipfmain) +#define V0_ipfmain VNET_VNET(vnet0,ipfmain) #include #include @@ -254,6 +255,20 @@ ipfioctl(struct cdev *dev, ioctlcmd_t cmd, caddr_t data, return (EPERM); } + /* + * Remember, the host system (with its vnet0) controls + * whether a jail is allowed to use ipfilter or not. + * The default is ipfilter cannot be used by a jail + * unless the sysctl allows it. + */ + if (V0_ipfmain.ipf_jail_allowed == 0) { + if (jailed(p->p_cred)) { + V_ipfmain.ipf_interror = 130019; + CURVNET_RESTORE(); + return (EOPNOTSUPP); + } + } + if (jailed_without_vnet(p->p_cred)) { V_ipfmain.ipf_interror = 130018; CURVNET_RESTORE(); diff --git a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c index d558b2d24b2c..139fe1f766d3 100644 --- a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c +++ b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c @@ -136,6 +136,7 @@ SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_chksrc, CTLFLAG_RW, &VNET_NAME(ipfmain.ip SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_minttl), 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, large_nat, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &VNET_NAME(ipfmain.ipf_large_nat), 0, "large_nat"); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_max_namelen, CTLFLAG_RWTUN, &VNET_NAME(ipfmain.ipf_max_namelen), 0, "max_namelen"); +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, jail_allowed, CTLFLAG_RWTUN, &VNET_NAME(ipfmain.ipf_jail_allowed), 0, "jail_allowed"); #define CDEV_MAJOR 79 #include From nobody Mon Dec 8 16:15:26 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQ6XH1yP5z6K28j for ; Mon, 08 Dec 2025 16:15:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQ6XH0Kvxz3GQN for ; Mon, 08 Dec 2025 16:15:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765210527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2z8JUrfdCpQiEHQ+TregmugBF5FFYGJpYnDj4QbU25w=; b=yzqy+NaXUCuv1ArrNm/eYcGYxttqALf3iyNuXRmPcvhB25Jcyum5irg8Y5NNQVIq3H6OAP Iys13NnYT4OzFkezPG8xvNWU8lN15shd1SxhI9u9+ShGbQvSa0cll/uvs+mZPg3UyvR7M2 +up5kJ6rpjTQT4h1GQTX6BmkwKTXMBZkKPpHhw7n+/1adPTBz6M54xMK8uqmgOfZz3I3bc ryk/Ca+9OqZx/ERfHvoAzdcor6ugSpHVLWBthyu+Y8tder5fW0sl5oUT8rGXNQ6vy7GxbS 855HF3sAQfn0ebd8pCvJNiJnK7StYHSbS8EcBnwAjSYYg08V7fevP2kE5wEBag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765210527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2z8JUrfdCpQiEHQ+TregmugBF5FFYGJpYnDj4QbU25w=; b=bEa9lmHBAz80D/PsivdJ8+MXQvqL5jEipFSChibIwvyDq84JUIYSyin2wBvN8fUM2i3Lk5 qo/p6UQltnTk+IUK5Yg8OxpByk1ILTjedLhdlGCETryT+2MSnb+dwt3Zr0ce7s22CEJGzp RdCFuQIsN2ioHlVGXYHKVaWyQVYX4IIHQd0TrbUAFrbd+7V8AD54O+FnC06KNnEdIA+dNr c5jTfSOGJC1hSUQpWdpu/PlIzmOn70gYdXmCp80X7NWae4Aix/hJmfzFCbv1EzFYGgPaWj 46oQ08RPHEhgz7w9f4DMq1oy2af/xbth80zjq7PNtYYx1DBreTyrROIZCtqMVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765210527; a=rsa-sha256; cv=none; b=rX0PbNCx+6Y4k5InJ7EIo7mbtFbX8IKk+I5jtSrOaVAPq59yNLdkkVXTPDmR29gqEzUCeW /tnJQ/YWt0fF4iedvUYMszhTgEO2yHqoBgAW2dhhHjhwsj4LWkOU2LgIJ9ygBGBOLq+2Bn SM+oaOcUR3cTEVd6kKcDfu1cewtw2igrOYMll14H8sTKqnYaalXvPDSbnuJ7cgqWDb2ajZ U1ypK3gQvl1xvHNO6+xIm6owINuctewBuThvmVNEVEConKMaW4a9/q6GJdjsqxDwJiGkYS uDeltz0S6UjElZr+N5x9LkPON+rx54Bjo0Gck0HvBPTYiR+v6MbJ/vg6N9Z8cw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQ6XG6hTWz4NP for ; Mon, 08 Dec 2025 16:15:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3bf1f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 08 Dec 2025 16:15:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 0ff0c19e7f70 - main - ipfilter: Disable ipfs(8) by default List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0ff0c19e7f70bc4d3f98196a8ad43de635cf13e5 Auto-Submitted: auto-generated Date: Mon, 08 Dec 2025 16:15:26 +0000 Message-Id: <6936f99e.3bf1f.51b4da29@gitrepo.freebsd.org> The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=0ff0c19e7f70bc4d3f98196a8ad43de635cf13e5 commit 0ff0c19e7f70bc4d3f98196a8ad43de635cf13e5 Author: Cy Schubert AuthorDate: 2025-11-16 07:39:19 +0000 Commit: Cy Schubert CommitDate: 2025-12-08 16:15:18 +0000 ipfilter: Disable ipfs(8) by default At the moment ipfs(8) is a tool that can be easily abused. Though the concept is sound the implementation needs some work. ipfs(8) should be considered experimental at the moment. This commit also makes ipfs support in the kernel optional. Reviewed by: emaste, glebius MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53787 --- sbin/ipf/Makefile | 7 ++++++- share/mk/src.opts.mk | 1 + sys/conf/NOTES | 1 + sys/conf/options | 1 + sys/modules/ipfilter/Makefile | 7 +++++++ sys/netpfil/ipfilter/netinet/ip_nat.c | 5 ++++- sys/netpfil/ipfilter/netinet/ip_state.c | 4 ++++ tools/build/mk/OptionalObsoleteFiles.inc | 4 ++++ 8 files changed, 28 insertions(+), 2 deletions(-) diff --git a/sbin/ipf/Makefile b/sbin/ipf/Makefile index 1b0a18d3d9c3..b64b09584b48 100644 --- a/sbin/ipf/Makefile +++ b/sbin/ipf/Makefile @@ -1,5 +1,10 @@ +.include + SUBDIR= libipf .WAIT -SUBDIR+= ipf ipfs ipfstat ipmon ipnat ippool +SUBDIR+= ipf ipfstat ipmon ipnat ippool +.if ${MK_IPFILTER_IPFS} != "no" +SUBDIR+= ipfs +.endif # XXX Temporarily disconnected. # SUBDIR+= ipftest ipresend ipsend SUBDIR_PARALLEL= diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index e10455cd4e82..4109edc90f2f 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -209,6 +209,7 @@ __DEFAULT_NO_OPTIONS = \ DTRACE_TESTS \ EXPERIMENTAL \ HESIOD \ + IPFILTER_IPFS \ LOADER_VERBOSE \ LOADER_VERIEXEC_PASS_MANIFEST \ LLVM_FULL_DEBUGINFO \ diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 2ba211fa45c9..8d413fb4f583 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -1046,6 +1046,7 @@ options IPFILTER #ipfilter support options IPFILTER_LOG #ipfilter logging options IPFILTER_LOOKUP #ipfilter pools options IPFILTER_DEFAULT_BLOCK #block all packets by default +options IPFILTER_IPFS #enable experimental ipfs(8) support options IPSTEALTH #support for stealth forwarding options PF_DEFAULT_TO_DROP #drop everything by default options TCP_BLACKBOX diff --git a/sys/conf/options b/sys/conf/options index 2437c2c6908a..c86560491faf 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -449,6 +449,7 @@ IPFILTER opt_ipfilter.h IPFILTER_DEFAULT_BLOCK opt_ipfilter.h IPFILTER_LOG opt_ipfilter.h IPFILTER_LOOKUP opt_ipfilter.h +IPFILTER_IPFS opt_ipfilter.h IPFIREWALL opt_ipfw.h IPFIREWALL_DEFAULT_TO_ACCEPT opt_ipfw.h IPFIREWALL_NAT opt_ipfw.h diff --git a/sys/modules/ipfilter/Makefile b/sys/modules/ipfilter/Makefile index 6c5fc140f36c..969df7dfad84 100644 --- a/sys/modules/ipfilter/Makefile +++ b/sys/modules/ipfilter/Makefile @@ -1,3 +1,5 @@ +.include + .PATH: ${SRCTOP}/sys/netpfil/ipfilter/netinet KMOD= ipl @@ -9,6 +11,11 @@ SRCS+= opt_bpf.h opt_inet6.h opt_kern_tls.h CFLAGS+= -I${SRCTOP}/sys/netpfil/ipfilter CFLAGS+= -DIPFILTER=1 -DIPFILTER_LKM -DIPFILTER_LOG -DIPFILTER_LOOKUP + +.if ${MK_IPFILTER_IPFS} != "no" +CFLAGS+= -DIPFILTER_IPFS +.endif + # # If you don't want log functionality remove -DIPFILTER_LOG # diff --git a/sys/netpfil/ipfilter/netinet/ip_nat.c b/sys/netpfil/ipfilter/netinet/ip_nat.c index b8602db91820..bf091e3b0e12 100644 --- a/sys/netpfil/ipfilter/netinet/ip_nat.c +++ b/sys/netpfil/ipfilter/netinet/ip_nat.c @@ -1337,6 +1337,7 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, error = ipf_proxy_ioctl(softc, data, cmd, mode, ctx); break; +#ifdef IPFILTER_IPFS case SIOCSTLCK : if (!(mode & FWRITE)) { IPFERROR(60015); @@ -1372,6 +1373,7 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, error = EACCES; } break; +#endif /* IPFILTER_IPFS */ case SIOCGENITER : { @@ -1679,7 +1681,7 @@ ipf_nat_siocdelnat(ipf_main_softc_t *softc, ipf_nat_softc_t *softn, ipnat_t *n, } } - +#ifdef IPFILTER_IPFS /* ------------------------------------------------------------------------ */ /* Function: ipf_nat_getsz */ /* Returns: int - 0 == success, != 0 is the error value. */ @@ -2247,6 +2249,7 @@ junkput: } return (error); } +#endif /* IPFILTER_IPFS */ /* ------------------------------------------------------------------------ */ diff --git a/sys/netpfil/ipfilter/netinet/ip_state.c b/sys/netpfil/ipfilter/netinet/ip_state.c index 36fdf23cd062..8a21e7593995 100644 --- a/sys/netpfil/ipfilter/netinet/ip_state.c +++ b/sys/netpfil/ipfilter/netinet/ip_state.c @@ -709,6 +709,7 @@ ipf_state_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, IPFOBJ_STATESTAT); break; +#ifdef IPFILTER_IPFS /* * Lock/Unlock the state table. (Locking prevents any changes, which * means no packets match). @@ -745,6 +746,7 @@ ipf_state_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, } error = ipf_state_getent(softc, softs, data); break; +#endif /* IPFILTER_IPFS */ case SIOCGENITER : { @@ -801,6 +803,7 @@ ipf_state_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, } +#ifdef IPFILTER_IPFS /* ------------------------------------------------------------------------ */ /* Function: ipf_state_getent */ /* Returns: int - 0 == success, != 0 == failure */ @@ -1005,6 +1008,7 @@ ipf_state_putent(ipf_main_softc_t *softc, ipf_state_softc_t *softs, return (error); } +#endif /* IPFILTER_IPFS */ /* ------------------------------------------------------------------------ */ diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 7cf742616e63..e0bc47492f7d 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -2627,6 +2627,10 @@ OLD_FILES+=usr/share/man/man8/ipnat.8.gz OLD_FILES+=usr/share/man/man8/ippool.8.gz .endif +.if ${MK_IPFILTER_IPFS} == no +OLD_FILES+=sbin/ipfs +.endif + .if ${MK_IPFW} == no OLD_FILES+=etc/rc.d/ipfw OLD_FILES+=etc/rc.d/natd From nobody Mon Dec 8 16:16:32 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQ6YX74ZYz6K2PN for ; Mon, 08 Dec 2025 16: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQ6YX6ZQbz3H1L for ; Mon, 08 Dec 2025 16: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=1765210592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZoxkXAu58ziwzl4ybgvk/aClPhaleqGq0Srn0XnEJEQ=; b=FFN9986P7v6Vw89maoJqw80fOVqEDb6ZCLKS+OPNLtzY5jIp/b7D0q/hOOZpcyxkopy7HR AUrz0S5Q+xCUYPViiwEymU5uss6ZWZXEbPlnwTEqnsgCyjJ4aLJGBouX/pzkRKNUqHXkFD MaglwU+RUIRzm5JK4nfCbuPmrvW+xmcqCJ5oVd6Zw28Y1qSw+/pgfvex2H4/UgzFBpdJ8i 5caGRRxsrGIhTqYthNSZ9jP+NxcPTu8baUyW+/fYUGwpn1++zcumzunSO2ZFjcUo0HHttE D0qKfi50/rXyZYuBTMsaRSLuJn8RVhSgAWrDkgIJ/817p3bzeL7f7HHiQMDP2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765210592; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZoxkXAu58ziwzl4ybgvk/aClPhaleqGq0Srn0XnEJEQ=; b=SY8gatNpGWlGiYz/ofs5YngfifhZEXNkLH4pST1zP6gcICPWFr3VLFYCjMJ37PDIci0PRj Tv7LGJrm1KApp7FQ/AGT2hBhdjcuvwhXM1SejiKpyjV6GShZ/rADFyXWzSJHMZIgMcczTW YZya0wPQRl99iNoABeODYpCyn6zr2e6mtiNnqkR0SMnGNbPHYL5ST2E8p9x6EZVXNhAWDZ j8SibdbLe9YdqD/8+Q6d8cmmz5lVDHZwC+eK+uISqM4wjUcnyg/jZv+tdku8Ah6Keq2Bo2 NuqyPpVggbMsjmdFmkfXiiJKp1AYAH17OYeW9muXrPbeKpcmCBhtmMQFhlzIlQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765210592; a=rsa-sha256; cv=none; b=kl9tNt5ZPcVlRf3iwO3QyZNBSrDOu4QCXnbcH+6NmMeMm2bsG7AVtDrQTmR2DUvsgE6xn8 4zpara/LFkkAn1OwwnP0O29O0VVoZJQanlGdwbZ2SngeqH4CQdxJdLsayoYW/NItySMTPG E9fUxWaw8X/skvbc7anP8yUI0Xa7FQ396J2C4HNaaeu3R7h7F0gQKbSz3+HWI8Oa4CEtaw xlFwayIZ8vJ9Y3nGPHQ3H1mhmVJ6Oe4wPAZ7Bfx4aE21WYfEqIdPHiadfVaBKlbK94wh65 Jr4VNKYIKzEJqbTAUrM9kmx9y1xGIPJZqQEXUpow+Oq6e698CFxyzZHyHskmoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQ6YX5tlrz4Bp for ; Mon, 08 Dec 2025 16:16:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a8b7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 08 Dec 2025 16:16:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 3f8ed605dbd0 - main - ruxreset: Add an inline function to reset all the stats in rusage_ext List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 3f8ed605dbd0ee211ce8fe59c0c072b916d6311c Auto-Submitted: auto-generated Date: Mon, 08 Dec 2025 16:16:32 +0000 Message-Id: <6936f9e0.3a8b7.62869968@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3f8ed605dbd0ee211ce8fe59c0c072b916d6311c commit 3f8ed605dbd0ee211ce8fe59c0c072b916d6311c Author: John Baldwin AuthorDate: 2025-12-08 16:15:20 +0000 Commit: John Baldwin CommitDate: 2025-12-08 16:16:13 +0000 ruxreset: Add an inline function to reset all the stats in rusage_ext Use it in proc0_post to reset per-process CPU usage. Suggested by: olce Reviewed by: olce, kib Differential Revision: https://reviews.freebsd.org/D54049 --- sys/kern/init_main.c | 5 +---- sys/sys/proc.h | 12 ++++++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 3075b2224963..6495340578da 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -660,10 +660,7 @@ proc0_post(void *dummy __unused) microuptime(&p->p_stats->p_start); PROC_STATLOCK(p); rufetch(p, &ru); /* Clears thread stats */ - p->p_rux.rux_runtime = 0; - p->p_rux.rux_uticks = 0; - p->p_rux.rux_sticks = 0; - p->p_rux.rux_iticks = 0; + ruxreset(&p->p_rux); PROC_STATUNLOCK(p); FOREACH_THREAD_IN_PROC(p, td) { td->td_runtime = 0; diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 23b052e21063..b27b67999e8b 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1326,6 +1326,18 @@ td_get_sched(struct thread *td) return ((struct td_sched *)&td[1]); } +static __inline void +ruxreset(struct rusage_ext *rux) +{ + rux->rux_runtime = 0; + rux->rux_uticks = 0; + rux->rux_sticks = 0; + rux->rux_iticks = 0; + rux->rux_uu = 0; + rux->rux_su = 0; + rux->rux_tu = 0; +} + #define PROC_ID_PID 0 #define PROC_ID_GROUP 1 #define PROC_ID_SESSION 2 From nobody Mon Dec 8 16:16:33 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQ6YZ10xmz6K2Rj for ; Mon, 08 Dec 2025 16:16:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQ6YY6xtBz3H1M for ; Mon, 08 Dec 2025 16:16:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765210594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jpU0Y+irHG9yuPVvtfCeL/W3+KwCJU0m1NjADyMt8K4=; b=rZV4+8xbTuqiaE1V5V2DLAqNC8jU+Jk6k0+ZmyrJII8OyVK8JPyjK/EUFSf1Y9ye2ckaQQ rcMP+S710ix7htg7WdPw/OZlJe3M21LeBljGBQuDPfSe5jIoC/PdtYV+ZScpyNuPYFl63K 81TizbPd1Oed2SB5rr4XCGXKRm0gLOeNINYVHKbA0fAMu1f0GYfCfwkw9HVgysxyKxy6Y2 iMUDkdhrHGqIj8PQ63cTWjVmMDxhKYB/xldurRsyITcpfYYpBmLoCZVSuI2YVUxoGxPxwD 4jbuvk4lkD2qCR5vZWewI1wN2+BTjPHX9H0tkNRehYn/f8xDr33AhFfK7yZ/ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765210594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jpU0Y+irHG9yuPVvtfCeL/W3+KwCJU0m1NjADyMt8K4=; b=bykP6NnuVdQszEFWxzRkdamXBgBae3f9ckE/wVkdWLVXPS23wd+wpMJh8X47NJ7DCd1KgM uUWbAy99ub0UO98mJD3ovGxq9+/r0DyptATgPYDDpI4fCmQemQkTn4vWK0Tp55j8sKyW1M ecR0fKvttRNL0GUZL9I2UFoEnruraACg/tlyWYj2vKbPLAIlAfh9Ye2ecXrtOXfrSQTepN retf/sKiWAVNE8hYF3tBmMV4CgGZvgjGvyXOukSO+e0Oky5FOLO1WtpllNrN+6IBWY6AlC Qdy0/r0Qgx7KWxFFEiPQlIykyll6ShNZO4lGlPaQnkVxF2naOQtlAd5j3/Xv2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765210594; a=rsa-sha256; cv=none; b=o7tAjfidswFHpZZ6HDQaswMOLoQ5P7qiZ2HZLleaBYCqqrClPqW6sAtQyLNXSMhgVlamIr pWElPX9D86KwUkYkH9dKkI5AmsktP4XDS4EieXsjeVpL6tUjvVuCEQ30PrqBAMuPvr+1UX WAOF/5HifbKst2r5VgLI3AX18K7RYoguDH/5CYz60Hq/E8Qjdskqk3ihPOVm1AZRTujXnT YLg9rlEzhUjdxyJMJAwOX/Ua8g69huRqPidEEeRWa9aM1gjDFlCOavrd2qNE97HayUEijD jK/CrU802swDLelNSXouFvIacASZtp6hBLWYwu0EFNyoYccpOqS3VYR+w76IbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQ6YY6H4tz48D for ; Mon, 08 Dec 2025 16:16:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b936 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 08 Dec 2025 16:16:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: dafe50ebd874 - main - thread0: Clear td_rux stats in proc0_post List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: dafe50ebd874ca3ccd5908c441cee9f478c501f0 Auto-Submitted: auto-generated Date: Mon, 08 Dec 2025 16:16:33 +0000 Message-Id: <6936f9e1.3b936.43b92bf4@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=dafe50ebd874ca3ccd5908c441cee9f478c501f0 commit dafe50ebd874ca3ccd5908c441cee9f478c501f0 Author: John Baldwin AuthorDate: 2025-12-08 16:15:36 +0000 Commit: John Baldwin CommitDate: 2025-12-08 16:16:13 +0000 thread0: Clear td_rux stats in proc0_post proc0_post aims to reset the CPU usage accounting for all threads and processes in the system to zero once the time of day is verified. However, not all of the per-thread stats were not being cleared, resulting in over-reported time for thread0 post-boot. Reviewed by: olce, kib, markj Fixes: bed4c5241663 ("Implement RUSAGE_THREAD. Add td_rux...") Differential Revision: https://reviews.freebsd.org/D54040 --- sys/kern/init_main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 6495340578da..8d1ee7b0fd99 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -648,7 +648,8 @@ proc0_post(void *dummy __unused) /* * Now we can look at the time, having had a chance to verify the - * time from the filesystem. Pretend that proc0 started now. + * time from the filesystem. Pretend that all current threads + * started now. */ sx_slock(&allproc_lock); FOREACH_PROC_IN_SYSTEM(p) { @@ -661,10 +662,13 @@ proc0_post(void *dummy __unused) PROC_STATLOCK(p); rufetch(p, &ru); /* Clears thread stats */ ruxreset(&p->p_rux); - PROC_STATUNLOCK(p); FOREACH_THREAD_IN_PROC(p, td) { td->td_runtime = 0; + thread_lock(td); + ruxreset(&td->td_rux); + thread_unlock(td); } + PROC_STATUNLOCK(p); PROC_UNLOCK(p); } sx_sunlock(&allproc_lock); From nobody Mon Dec 8 16:16:34 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQ6Yb2vQcz6K26y for ; Mon, 08 Dec 2025 16:16:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQ6Yb0KbSz3GyK for ; Mon, 08 Dec 2025 16:16:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765210595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZO8QEQyzbXmaJzQ7faa2tL+HVHqbMjO4/77zjXHTPAM=; b=UqV5ZHc2k36hFIlB89OKMWNx6dSiSmxcvjM58z5ypn8nEf89RZrLmNCKBKpy+zhF85XFdv 3ho5vKfRRNbiPaYKhNWcmVO1ZkcikRZ5S+xLnZnw9stGo3cY4woJrH7AnfICInFKvdmu5C RpsRg4n0ucNsNm0xk+tsXuNJmO/N6kDOSKzysIezjW48CiTzm68ZFr7X79Q+QV308ysrAm 52aNhVdlvN0T5m96TnxHNN2Y//xURSKpfWRysFbU0v/YxaGXVzcpIMdXxQdUQSr4DFpRap rckx/PwU3nBCCFjk9DrtxyM08b4I4TS4bt1zSseWHk/h77Sm8EdeugFX4DvdlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765210595; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZO8QEQyzbXmaJzQ7faa2tL+HVHqbMjO4/77zjXHTPAM=; b=BGAiNHUyfEfILcW29dB6pAW6qDtZl+b//pLAMXz6RpAVIdKfGq0hsyPgImDDcGH/bvS2qt YS25bg0CY8ctUiQouh/91NWs+gsuyQA7ucIHhIWY2XoZJXHZTzPgBHWWsvWekty4C/IqK6 Or09l3ErGmpJBGUWuYCfZIuqsfYeTngS6CyckUJGbHA0CpyMGylA+8TSPf08bWovpvac+i ezvBZuEF8DMbvBl43AdiRAezrn8uvy2ZNir21EhWWNhzk9FcxRMQCRqjs9Jr9/VvTfqY7g eSYaG6ucnUJDTk/nmruI6jWVU3GpYfZRqK34FHHA4Y+NJJnuYDA9VhzRqWU0GQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765210595; a=rsa-sha256; cv=none; b=iMrBYiXU2toP7FMHsOFnrNjWtfkZ9U3pjlTC4+OE90u6dMbLCwlQDoWySeJLb0PnPyO3RA 43GDX9MaNIdommRdtLUx7gZO5ZiYPzxU+N2Gv0Qy/oWV/F/UFfnzLoUnOm/qBtjQLB3iPQ SRAuP1j/YFNUxxvB4HTPywti0Y4OnQd+9AygHVQpAJcJqGVxhZ9rycDUu61E+19XQymheQ c9Ed20ipXGku2r7pEbTxOfIrreR9yiVy4OO6FHU6o8rn99n+FJsfnlnGhbjIS53B7f8dGC ltRDuMozg0M7HXNG6eJAHbcdtZGwcRCUt8wHPN3JQaw5339fYasqEDlEg5yIbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQ6YZ72vfz4Br for ; Mon, 08 Dec 2025 16:16:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c34e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 08 Dec 2025 16:16:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: acd02443a952 - main - proc0_post: Clear relevant thread stats directly List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: acd02443a952b1f5412d35d03f081ad48bae34d7 Auto-Submitted: auto-generated Date: Mon, 08 Dec 2025 16:16:34 +0000 Message-Id: <6936f9e2.3c34e.1012df44@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=acd02443a952b1f5412d35d03f081ad48bae34d7 commit acd02443a952b1f5412d35d03f081ad48bae34d7 Author: John Baldwin AuthorDate: 2025-12-08 16:15:52 +0000 Commit: John Baldwin CommitDate: 2025-12-08 16:16:14 +0000 proc0_post: Clear relevant thread stats directly rufetch() has several other effects besides clearing these per-thread stats most of which are explicitly discarded by the subsequent calls to ruxreset(). Just clear the relevant stats directly instead. Reviewed by: olce, kib, markj Differential Revision: https://reviews.freebsd.org/D54050 --- sys/kern/init_main.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 8d1ee7b0fd99..4144297d674c 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -643,7 +643,6 @@ static void proc0_post(void *dummy __unused) { struct proc *p; - struct rusage ru; struct thread *td; /* @@ -660,11 +659,15 @@ proc0_post(void *dummy __unused) } microuptime(&p->p_stats->p_start); PROC_STATLOCK(p); - rufetch(p, &ru); /* Clears thread stats */ ruxreset(&p->p_rux); FOREACH_THREAD_IN_PROC(p, td) { - td->td_runtime = 0; thread_lock(td); + td->td_incruntime = 0; + td->td_runtime = 0; + td->td_pticks = 0; + td->td_sticks = 0; + td->td_iticks = 0; + td->td_uticks = 0; ruxreset(&td->td_rux); thread_unlock(td); } From nobody Mon Dec 8 17:20:46 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQ7zg0VxNz6K6ST for ; Mon, 08 Dec 2025 17:20:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQ7zf4LbPz3SND for ; Mon, 08 Dec 2025 17:20:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765214446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fDALOEX67YVbeDrYBtgFtXgEk5P34bR4ilKq3ApzQ9o=; b=pqP9ada6HduvYDXIxlOzkTcesCfuNoxbKg5HZrZX3CoiR4XYn2N/edTHNvJOCqAV6MWcF/ Bc4IDvqIYbyvAtTlAv3BGnLLgPmeLE0WXabF+p4IZjLk3TY8xHSa+RLuc/aVAwRKoERQLj Uc23jlVIirJQDsdJ10UMIM0PrnFDs+hI4OSySuUWMOH4A7QrShC3YWk+TREx8cfk0XjvkA 7ooihXC42PmroIYbOk6JqsIIHiR5gW7O9bGENGBvrxMnFMln90BWbqsaLSJLBudxjSbcDW Hcur8DGZFJtUW4mrbUm3/UCh8HvLtPvI3baMGVOytecchmWCUTmMUnZmKeekBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765214446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fDALOEX67YVbeDrYBtgFtXgEk5P34bR4ilKq3ApzQ9o=; b=a96Gq8I72qAdvEuwegFoCW/YeGNaPXgDJkMgynIVstnIkYApHgPy1vwyjaPGyGIXblA9Pz gQFYIyENVa4pmUB0KVhWiWO4auFa9olb808z3gkJL3XhTCakdhYFx7UVgRFO5M3ZKTKfBH Ma2V/UQshhWMyF6lJxg808l8RGw8jcX9dgVI1qYdd4IAMENv4N9spsLTv6FM/ZWLNp9PHN aAjdxs67GCxGWpOwtOcbvAiMD+kmFJt0ymkhxXf99VjaBPEf9mrIxiWXqJLIBEN/xCqbkN 6QEq7LEePTGm/WOXdjJA7bz5KHEj/GgCsHnHj/hiOQtVENDdW6GHH7n4eQVUlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765214446; a=rsa-sha256; cv=none; b=i80VtblzNXDx0Izd/TKTZSLNNXipYo2G5S7NtHuTDPBlfEXPFJr64/qef9QngeeK+tFPQP 46/Eur5wzZiXy+WxzPJLGy+/s+L0sOVDQG5aCyDYygdxFVaVzmR7i4ctRd9zZqaD5tFo8/ J70bSTC6sv9fjZGnzxsfJg1tUuxrz/6iAueS9WRtReqIQECf9GoYNTxLppl7SAg3X3Fjri 47JaPKdAxmNhZW/RqKKWPphcEJstcKAKgLgJm7h2ewiLh44FiNufSNz94V2B2wXizoqaE3 GC0i3wMSRSezLWJCD2n9q5GuKsD+VYJNyXGyoSHwaGmhVGyIrEMzjcyajLKwXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQ7zf3cslz68t for ; Mon, 08 Dec 2025 17:20:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id a597 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 08 Dec 2025 17:20:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: fbf05d2147b1 - main - linux: separate all ifnet(9) related code into linux_ifnet.c List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: fbf05d2147b1add8b760be166c4b1fd4499ebce8 Auto-Submitted: auto-generated Date: Mon, 08 Dec 2025 17:20:46 +0000 Message-Id: <693708ee.a597.722a351a@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=fbf05d2147b1add8b760be166c4b1fd4499ebce8 commit fbf05d2147b1add8b760be166c4b1fd4499ebce8 Author: Gleb Smirnoff AuthorDate: 2025-12-08 17:20:14 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-08 17:20:14 +0000 linux: separate all ifnet(9) related code into linux_ifnet.c Remove linux_use_real_ifname(). It is no longer used outside of the file since 3ab3c9c29cf0. There is no functional change. Reviewed by: melifaro, dchagin Differential Revision: https://reviews.freebsd.org/D54076 --- sys/compat/linux/linux.c | 278 +--------------------------------- sys/compat/linux/linux.h | 10 -- sys/compat/linux/linux_if.c | 310 ++++++++++++++++++++++++++++++++++++++ sys/modules/linux_common/Makefile | 3 +- 4 files changed, 312 insertions(+), 289 deletions(-) diff --git a/sys/compat/linux/linux.c b/sys/compat/linux/linux.c index a40f110634f7..da2f641bb791 100644 --- a/sys/compat/linux/linux.c +++ b/sys/compat/linux/linux.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -39,12 +40,7 @@ #include #include -#include -#include -#include -#include #include - #include #include @@ -53,17 +49,11 @@ #include #include -_Static_assert(LINUX_IFNAMSIZ == IFNAMSIZ, "Linux IFNAMSIZ"); _Static_assert(sizeof(struct sockaddr) == sizeof(struct l_sockaddr), "Linux struct sockaddr size"); _Static_assert(offsetof(struct sockaddr, sa_data) == offsetof(struct l_sockaddr, sa_data), "Linux struct sockaddr layout"); -static bool use_real_ifnames = false; -SYSCTL_BOOL(_compat_linux, OID_AUTO, use_real_ifnames, CTLFLAG_RWTUN, - &use_real_ifnames, 0, - "Use FreeBSD interface names instead of generating ethN aliases"); - static int bsd_to_linux_sigtbl[LINUX_SIGTBLSZ] = { LINUX_SIGHUP, /* SIGHUP */ LINUX_SIGINT, /* SIGINT */ @@ -242,265 +232,6 @@ bsd_to_linux_sigset(sigset_t *bss, l_sigset_t *lss) } } -/* - * Translate a FreeBSD interface name to a Linux interface name - * by interface name, and return the number of bytes copied to lxname. - */ -int -ifname_bsd_to_linux_name(const char *bsdname, char *lxname, size_t len) -{ - struct epoch_tracker et; - struct ifnet *ifp; - int ret; - - CURVNET_ASSERT_SET(); - - ret = 0; - NET_EPOCH_ENTER(et); - ifp = ifunit(bsdname); - if (ifp != NULL) - ret = ifname_bsd_to_linux_ifp(ifp, lxname, len); - NET_EPOCH_EXIT(et); - return (ret); -} - -/* - * Translate a FreeBSD interface name to a Linux interface name - * by interface index, and return the number of bytes copied to lxname. - */ -int -ifname_bsd_to_linux_idx(u_int idx, char *lxname, size_t len) -{ - struct epoch_tracker et; - struct ifnet *ifp; - int ret; - - ret = 0; - CURVNET_SET(TD_TO_VNET(curthread)); - NET_EPOCH_ENTER(et); - ifp = ifnet_byindex(idx); - if (ifp != NULL) - ret = ifname_bsd_to_linux_ifp(ifp, lxname, len); - NET_EPOCH_EXIT(et); - CURVNET_RESTORE(); - return (ret); -} - -/* - * Translate a FreeBSD interface name to a Linux interface name, - * and return the number of bytes copied to lxname, 0 if interface - * not found, -1 on error. - */ -struct ifname_bsd_to_linux_ifp_cb_s { - struct ifnet *ifp; - int ethno; - char *lxname; - size_t len; -}; - -static int -ifname_bsd_to_linux_ifp_cb(if_t ifp, void *arg) -{ - struct ifname_bsd_to_linux_ifp_cb_s *cbs = arg; - - if (ifp == cbs->ifp) - return (snprintf(cbs->lxname, cbs->len, "eth%d", cbs->ethno)); - if (IFP_IS_ETH(ifp)) - cbs->ethno++; - return (0); -} - -int -ifname_bsd_to_linux_ifp(struct ifnet *ifp, char *lxname, size_t len) -{ - struct ifname_bsd_to_linux_ifp_cb_s arg = { - .ifp = ifp, - .ethno = 0, - .lxname = lxname, - .len = len, - }; - - NET_EPOCH_ASSERT(); - - /* - * Linux loopback interface name is lo (not lo0), - * we translate lo to lo0, loX to loX. - */ - if (IFP_IS_LOOP(ifp) && strncmp(if_name(ifp), "lo0", IFNAMSIZ) == 0) - return (strlcpy(lxname, "lo", len)); - - /* Short-circuit non ethernet interfaces. */ - if (!IFP_IS_ETH(ifp) || linux_use_real_ifname(ifp)) - return (strlcpy(lxname, if_name(ifp), len)); - - /* Determine the (relative) unit number for ethernet interfaces. */ - return (if_foreach(ifname_bsd_to_linux_ifp_cb, &arg)); -} - -/* - * Translate a Linux interface name to a FreeBSD interface name, - * and return the associated ifnet structure - * bsdname and lxname need to be least IFNAMSIZ bytes long, but - * can point to the same buffer. - */ -struct ifname_linux_to_ifp_cb_s { - bool is_lo; - bool is_eth; - int ethno; - int unit; - const char *lxname; - if_t ifp; -}; - -static int -ifname_linux_to_ifp_cb(if_t ifp, void *arg) -{ - struct ifname_linux_to_ifp_cb_s *cbs = arg; - - NET_EPOCH_ASSERT(); - - /* - * Allow Linux programs to use FreeBSD names. Don't presume - * we never have an interface named "eth", so don't make - * the test optional based on is_eth. - */ - if (strncmp(if_name(ifp), cbs->lxname, LINUX_IFNAMSIZ) == 0) - goto out; - if (cbs->is_eth && IFP_IS_ETH(ifp) && cbs->unit == cbs->ethno) - goto out; - if (cbs->is_lo && IFP_IS_LOOP(ifp)) - goto out; - if (IFP_IS_ETH(ifp)) - cbs->ethno++; - return (0); - -out: - cbs->ifp = ifp; - return (1); -} - -struct ifnet * -ifname_linux_to_ifp(struct thread *td, const char *lxname) -{ - struct ifname_linux_to_ifp_cb_s arg = { - .ethno = 0, - .lxname = lxname, - .ifp = NULL, - }; - int len; - char *ep; - - NET_EPOCH_ASSERT(); - - for (len = 0; len < LINUX_IFNAMSIZ; ++len) - if (!isalpha(lxname[len]) || lxname[len] == '\0') - break; - if (len == 0 || len == LINUX_IFNAMSIZ) - return (NULL); - /* - * Linux loopback interface name is lo (not lo0), - * we translate lo to lo0, loX to loX. - */ - arg.is_lo = (len == 2 && strncmp(lxname, "lo", LINUX_IFNAMSIZ) == 0); - arg.unit = (int)strtoul(lxname + len, &ep, 10); - if ((ep == NULL || ep == lxname + len || ep >= lxname + LINUX_IFNAMSIZ) && - arg.is_lo == 0) - return (NULL); - arg.is_eth = (len == 3 && strncmp(lxname, "eth", len) == 0); - - if_foreach(ifname_linux_to_ifp_cb, &arg); - return (arg.ifp); -} - -int -ifname_linux_to_bsd(struct thread *td, const char *lxname, char *bsdname) -{ - struct epoch_tracker et; - struct ifnet *ifp; - - CURVNET_SET(TD_TO_VNET(td)); - NET_EPOCH_ENTER(et); - ifp = ifname_linux_to_ifp(td, lxname); - if (ifp != NULL && bsdname != NULL) - strlcpy(bsdname, if_name(ifp), IFNAMSIZ); - NET_EPOCH_EXIT(et); - CURVNET_RESTORE(); - return (ifp != NULL ? 0 : EINVAL); -} - -unsigned short -linux_ifflags(struct ifnet *ifp) -{ - unsigned short flags; - - NET_EPOCH_ASSERT(); - - flags = if_getflags(ifp) | if_getdrvflags(ifp); - return (bsd_to_linux_ifflags(flags)); -} - -unsigned short -bsd_to_linux_ifflags(int fl) -{ - unsigned short flags = 0; - - if (fl & IFF_UP) - flags |= LINUX_IFF_UP; - if (fl & IFF_BROADCAST) - flags |= LINUX_IFF_BROADCAST; - if (fl & IFF_DEBUG) - flags |= LINUX_IFF_DEBUG; - if (fl & IFF_LOOPBACK) - flags |= LINUX_IFF_LOOPBACK; - if (fl & IFF_POINTOPOINT) - flags |= LINUX_IFF_POINTOPOINT; - if (fl & IFF_DRV_RUNNING) - flags |= LINUX_IFF_RUNNING; - if (fl & IFF_NOARP) - flags |= LINUX_IFF_NOARP; - if (fl & IFF_PROMISC) - flags |= LINUX_IFF_PROMISC; - if (fl & IFF_ALLMULTI) - flags |= LINUX_IFF_ALLMULTI; - if (fl & IFF_MULTICAST) - flags |= LINUX_IFF_MULTICAST; - return (flags); -} - -static u_int -linux_ifhwaddr_cb(void *arg, struct ifaddr *ifa, u_int count) -{ - struct sockaddr_dl *sdl = (struct sockaddr_dl *)ifa->ifa_addr; - struct l_sockaddr *lsa = arg; - - if (count > 0) - return (0); - if (sdl->sdl_type != IFT_ETHER) - return (0); - bzero(lsa, sizeof(*lsa)); - lsa->sa_family = LINUX_ARPHRD_ETHER; - bcopy(LLADDR(sdl), lsa->sa_data, LINUX_IFHWADDRLEN); - return (1); -} - -int -linux_ifhwaddr(struct ifnet *ifp, struct l_sockaddr *lsa) -{ - - NET_EPOCH_ASSERT(); - - if (IFP_IS_LOOP(ifp)) { - bzero(lsa, sizeof(*lsa)); - lsa->sa_family = LINUX_ARPHRD_LOOPBACK; - return (0); - } - if (!IFP_IS_ETH(ifp)) - return (ENOENT); - if (if_foreach_addr_type(ifp, AF_LINK, linux_ifhwaddr_cb, lsa) > 0) - return (0); - return (ENOENT); -} - sa_family_t linux_to_bsd_domain(sa_family_t domain) { @@ -888,10 +619,3 @@ bsd_to_linux_poll_events(short bev, short *lev) *lev = bits; } - -bool -linux_use_real_ifname(const struct ifnet *ifp) -{ - - return (use_real_ifnames); -} diff --git a/sys/compat/linux/linux.h b/sys/compat/linux/linux.h index 6d276b8a69f4..625aee2be127 100644 --- a/sys/compat/linux/linux.h +++ b/sys/compat/linux/linux.h @@ -359,16 +359,6 @@ struct l_statx { ktrstruct("l_sigset_t", (s), l) #endif -/* - * Criteria for interface name translation - */ -#define IFP_IS_ETH(ifp) (if_gettype(ifp) == IFT_ETHER) -#define IFP_IS_LOOP(ifp) (if_gettype(ifp) == IFT_LOOP) - -struct ifnet; - -bool linux_use_real_ifname(const struct ifnet *); - void linux_netlink_register(void); void linux_netlink_deregister(void); diff --git a/sys/compat/linux/linux_if.c b/sys/compat/linux/linux_if.c new file mode 100644 index 000000000000..29e86d71aa5a --- /dev/null +++ b/sys/compat/linux/linux_if.c @@ -0,0 +1,310 @@ +/*- + * Copyright (c) 2015 Dmitry Chagin + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +_Static_assert(LINUX_IFNAMSIZ == IFNAMSIZ, "Linux IFNAMSIZ"); + +static bool use_real_ifnames = false; +SYSCTL_BOOL(_compat_linux, OID_AUTO, use_real_ifnames, CTLFLAG_RWTUN, + &use_real_ifnames, 0, + "Use FreeBSD interface names instead of generating ethN aliases"); + +/* + * Criteria for interface name translation + */ +#define IFP_IS_ETH(ifp) (if_gettype(ifp) == IFT_ETHER) +#define IFP_IS_LOOP(ifp) (if_gettype(ifp) == IFT_LOOP) + +/* + * Translate a FreeBSD interface name to a Linux interface name + * by interface name, and return the number of bytes copied to lxname. + */ +int +ifname_bsd_to_linux_name(const char *bsdname, char *lxname, size_t len) +{ + struct epoch_tracker et; + struct ifnet *ifp; + int ret; + + CURVNET_ASSERT_SET(); + + ret = 0; + NET_EPOCH_ENTER(et); + ifp = ifunit(bsdname); + if (ifp != NULL) + ret = ifname_bsd_to_linux_ifp(ifp, lxname, len); + NET_EPOCH_EXIT(et); + return (ret); +} + +/* + * Translate a FreeBSD interface name to a Linux interface name + * by interface index, and return the number of bytes copied to lxname. + */ +int +ifname_bsd_to_linux_idx(u_int idx, char *lxname, size_t len) +{ + struct epoch_tracker et; + struct ifnet *ifp; + int ret; + + ret = 0; + CURVNET_SET(TD_TO_VNET(curthread)); + NET_EPOCH_ENTER(et); + ifp = ifnet_byindex(idx); + if (ifp != NULL) + ret = ifname_bsd_to_linux_ifp(ifp, lxname, len); + NET_EPOCH_EXIT(et); + CURVNET_RESTORE(); + return (ret); +} + +/* + * Translate a FreeBSD interface name to a Linux interface name, + * and return the number of bytes copied to lxname, 0 if interface + * not found, -1 on error. + */ +struct ifname_bsd_to_linux_ifp_cb_s { + struct ifnet *ifp; + int ethno; + char *lxname; + size_t len; +}; + +static int +ifname_bsd_to_linux_ifp_cb(if_t ifp, void *arg) +{ + struct ifname_bsd_to_linux_ifp_cb_s *cbs = arg; + + if (ifp == cbs->ifp) + return (snprintf(cbs->lxname, cbs->len, "eth%d", cbs->ethno)); + if (IFP_IS_ETH(ifp)) + cbs->ethno++; + return (0); +} + +int +ifname_bsd_to_linux_ifp(struct ifnet *ifp, char *lxname, size_t len) +{ + struct ifname_bsd_to_linux_ifp_cb_s arg = { + .ifp = ifp, + .ethno = 0, + .lxname = lxname, + .len = len, + }; + + NET_EPOCH_ASSERT(); + + /* + * Linux loopback interface name is lo (not lo0), + * we translate lo to lo0, loX to loX. + */ + if (IFP_IS_LOOP(ifp) && strncmp(if_name(ifp), "lo0", IFNAMSIZ) == 0) + return (strlcpy(lxname, "lo", len)); + + /* Short-circuit non ethernet interfaces. */ + if (!IFP_IS_ETH(ifp) || use_real_ifnames) + return (strlcpy(lxname, if_name(ifp), len)); + + /* Determine the (relative) unit number for ethernet interfaces. */ + return (if_foreach(ifname_bsd_to_linux_ifp_cb, &arg)); +} + +/* + * Translate a Linux interface name to a FreeBSD interface name, + * and return the associated ifnet structure + * bsdname and lxname need to be least IFNAMSIZ bytes long, but + * can point to the same buffer. + */ +struct ifname_linux_to_ifp_cb_s { + bool is_lo; + bool is_eth; + int ethno; + int unit; + const char *lxname; + if_t ifp; +}; + +static int +ifname_linux_to_ifp_cb(if_t ifp, void *arg) +{ + struct ifname_linux_to_ifp_cb_s *cbs = arg; + + NET_EPOCH_ASSERT(); + + /* + * Allow Linux programs to use FreeBSD names. Don't presume + * we never have an interface named "eth", so don't make + * the test optional based on is_eth. + */ + if (strncmp(if_name(ifp), cbs->lxname, LINUX_IFNAMSIZ) == 0) + goto out; + if (cbs->is_eth && IFP_IS_ETH(ifp) && cbs->unit == cbs->ethno) + goto out; + if (cbs->is_lo && IFP_IS_LOOP(ifp)) + goto out; + if (IFP_IS_ETH(ifp)) + cbs->ethno++; + return (0); + +out: + cbs->ifp = ifp; + return (1); +} + +struct ifnet * +ifname_linux_to_ifp(struct thread *td, const char *lxname) +{ + struct ifname_linux_to_ifp_cb_s arg = { + .ethno = 0, + .lxname = lxname, + .ifp = NULL, + }; + int len; + char *ep; + + NET_EPOCH_ASSERT(); + + for (len = 0; len < LINUX_IFNAMSIZ; ++len) + if (!isalpha(lxname[len]) || lxname[len] == '\0') + break; + if (len == 0 || len == LINUX_IFNAMSIZ) + return (NULL); + /* + * Linux loopback interface name is lo (not lo0), + * we translate lo to lo0, loX to loX. + */ + arg.is_lo = (len == 2 && strncmp(lxname, "lo", LINUX_IFNAMSIZ) == 0); + arg.unit = (int)strtoul(lxname + len, &ep, 10); + if ((ep == NULL || ep == lxname + len || ep >= lxname + LINUX_IFNAMSIZ) && + arg.is_lo == 0) + return (NULL); + arg.is_eth = (len == 3 && strncmp(lxname, "eth", len) == 0); + + if_foreach(ifname_linux_to_ifp_cb, &arg); + return (arg.ifp); +} + +int +ifname_linux_to_bsd(struct thread *td, const char *lxname, char *bsdname) +{ + struct epoch_tracker et; + struct ifnet *ifp; + + CURVNET_SET(TD_TO_VNET(td)); + NET_EPOCH_ENTER(et); + ifp = ifname_linux_to_ifp(td, lxname); + if (ifp != NULL && bsdname != NULL) + strlcpy(bsdname, if_name(ifp), IFNAMSIZ); + NET_EPOCH_EXIT(et); + CURVNET_RESTORE(); + return (ifp != NULL ? 0 : EINVAL); +} + +unsigned short +linux_ifflags(struct ifnet *ifp) +{ + unsigned short flags; + + NET_EPOCH_ASSERT(); + + flags = if_getflags(ifp) | if_getdrvflags(ifp); + return (bsd_to_linux_ifflags(flags)); +} + +unsigned short +bsd_to_linux_ifflags(int fl) +{ + unsigned short flags = 0; + + if (fl & IFF_UP) + flags |= LINUX_IFF_UP; + if (fl & IFF_BROADCAST) + flags |= LINUX_IFF_BROADCAST; + if (fl & IFF_DEBUG) + flags |= LINUX_IFF_DEBUG; + if (fl & IFF_LOOPBACK) + flags |= LINUX_IFF_LOOPBACK; + if (fl & IFF_POINTOPOINT) + flags |= LINUX_IFF_POINTOPOINT; + if (fl & IFF_DRV_RUNNING) + flags |= LINUX_IFF_RUNNING; + if (fl & IFF_NOARP) + flags |= LINUX_IFF_NOARP; + if (fl & IFF_PROMISC) + flags |= LINUX_IFF_PROMISC; + if (fl & IFF_ALLMULTI) + flags |= LINUX_IFF_ALLMULTI; + if (fl & IFF_MULTICAST) + flags |= LINUX_IFF_MULTICAST; + return (flags); +} + +static u_int +linux_ifhwaddr_cb(void *arg, struct ifaddr *ifa, u_int count) +{ + struct sockaddr_dl *sdl = (struct sockaddr_dl *)ifa->ifa_addr; + struct l_sockaddr *lsa = arg; + + if (count > 0) + return (0); + if (sdl->sdl_type != IFT_ETHER) + return (0); + bzero(lsa, sizeof(*lsa)); + lsa->sa_family = LINUX_ARPHRD_ETHER; + bcopy(LLADDR(sdl), lsa->sa_data, LINUX_IFHWADDRLEN); + return (1); +} + +int +linux_ifhwaddr(struct ifnet *ifp, struct l_sockaddr *lsa) +{ + + NET_EPOCH_ASSERT(); + + if (IFP_IS_LOOP(ifp)) { + bzero(lsa, sizeof(*lsa)); + lsa->sa_family = LINUX_ARPHRD_LOOPBACK; + return (0); + } + if (!IFP_IS_ETH(ifp)) + return (ENOENT); + if (if_foreach_addr_type(ifp, AF_LINK, linux_ifhwaddr_cb, lsa) > 0) + return (0); + return (ENOENT); +} diff --git a/sys/modules/linux_common/Makefile b/sys/modules/linux_common/Makefile index f9f4c791e9d1..291fc6d25f8c 100644 --- a/sys/modules/linux_common/Makefile +++ b/sys/modules/linux_common/Makefile @@ -5,7 +5,7 @@ KMOD= linux_common SRCS= linux_common.c linux_mib.c linux_mmap.c linux_util.c linux_emul.c \ - linux_dummy.c linux_errno.c linux_netlink.c \ + linux_dummy.c linux_errno.c linux_netlink.c linux_if.c \ linux.c device_if.h vnode_if.h bus_if.h opt_inet6.h opt_inet.h .if ${MACHINE_CPUARCH} == "amd64" @@ -15,7 +15,6 @@ SRCS+= linux_x86.c linux_vdso_selector_x86.c EXPORT_SYMS= EXPORT_SYMS+= linux_get_osname EXPORT_SYMS+= linux_get_osrelease -EXPORT_SYMS+= linux_use_real_ifname .if !defined(KERNBUILDDIR) .warning Building Linuxulator outside of a kernel does not make sense From nobody Mon Dec 8 17:20:47 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQ7zg5vbgz6K6HF for ; Mon, 08 Dec 2025 17:20:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQ7zg4wTrz3SdT for ; Mon, 08 Dec 2025 17:20:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765214447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rTtGVi67ugpmsq5bz177mOXh7NBAczgY0+tBTgV3GuE=; b=snpMig4YpYjcmhPgqsRCYyN6uEn8NrIl/bzUg1tq4fmocpDkodfulnsyFL93832u5/2mS+ qW11QOg07QnnxfGwCAMqgEBZHdEnMD/SOFVmCJmp3pqGm4UVeFD3IZr3DbY5h8IikcWKtP xM57JnFAi67ZBbADImaIiNlF7O9Y2BSnMdfyWuKGB7oASuUPNFuj5JPikNWD8FulDMq20l 04q7rZidAdSXGFMtyVFwRfTlWcrdPjEUIGXzBuwQOZcksZOz4ae7Ovy/CaLcMobpXPdsz9 TrgTAwNqZvVl6+owymCh8fQhB/w0xnEpThji9PcDC5pUetdmpzOlf3qK0E5C0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765214447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rTtGVi67ugpmsq5bz177mOXh7NBAczgY0+tBTgV3GuE=; b=eh64FKdsbDWdlJr31GZCvcDbJ5eKc8YcmC2nXtdwDKC0O4LBip3+4g2aAg8E1T4Bi7XTk3 UEWnewQ1YSeVczEgToEK7f3l/V/VrZOFYtuD7l4BpEFdavnWuqnubc8NWQklcwRV0aHwp3 AT2WJUONkQgHQLHOkiPx3qzNFAbOflkrrGIGSuKsGHJ/HXjTqS38Y4PKp11S3GbR4Ad58R Lstz4+g1Fo05Hohnci/efwV+8QjlGHDpPS+tKMRPIgvuIPfJxMwW2gr3cXFIN+kHPOtRmq t9KQNvVyLOgFbQ0LlQunbvfKtOb/vrgBtlREb+hUXyq7LSmNl6mxmAEV9KmKTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765214447; a=rsa-sha256; cv=none; b=E9fEELkh0o+bRNqCR44/psHXsnfILKithex2Sfm+6DiBnVsAHHPwaXVP65Lp8fV49xsLxh 8LvJRR5BYlUgcEdpFWm9EZb8Cxm0h5f8w8gJQjdRPwsATw/LbQeKq5bBEpXj4mJVILBpWk XobdocuKNYpoXlO6rQB+mIWWppTdvGMgtuaMXvBjFigndPN9QFhWWNeTpecF1hIw5q1INa cHPEjhfR+kXgAhcnYNIjS5IwSplbmjAxSDm0xiGBx5VxxxcqljG7xNKFB1OqifpOSoF3FM x+mz6f2hsAbiu7UV03IUDcWfhnP1CDS5mBCTZdZ3dJWkuaQp1NA9gBGNSik8fA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQ7zg4S4Fz68v for ; Mon, 08 Dec 2025 17:20:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id a59b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 08 Dec 2025 17:20:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 607f11055d2d - main - linux: store Linux Ethernet interface number in struct ifnet List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 607f11055d2d421770963162a4d9a99cdd136152 Auto-Submitted: auto-generated Date: Mon, 08 Dec 2025 17:20:47 +0000 Message-Id: <693708ef.a59b.6cdc5d75@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=607f11055d2d421770963162a4d9a99cdd136152 commit 607f11055d2d421770963162a4d9a99cdd136152 Author: Gleb Smirnoff AuthorDate: 2025-12-08 17:20:22 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-08 17:20:22 +0000 linux: store Linux Ethernet interface number in struct ifnet The old approach where we go through the list of interfaces and count them has bugs. One obvious bug with this dynamic translation is that once an Ethernet interface in the middle of the list goes away, all interfaces following it would change their Linux names. A bigger problem is the ifnet arrival and departure times. For example linsysfs has event handler for ifnet_arrival_event, and of course it wants to resolve the name. This accidentially works, due to a bug in if_attach() where we call if_link_ifnet() before invoking all the event handlers. Once the bug is fixed linsysfs won't be able to resolve the old way. The other side is ifnet_departure_event, where there is no bug, the eventhandlers are called after the if_unlink_ifnet(). This means old translation won't work for departure event handlers. One example is netlink. This change gives the Netlink a chance to emit a proper Linux interface departure message. However, there is another problem in Netlink, that the ifnet pointer is lost in the Netlink translation layer. Plug this with a cookie in netlink writer structure that can be set by the route layer and used by the Netlink Linux translation layer. This part of the diff seems unrelated, but it is hard to make it a separate change, as the old KPI goes away and to use the new one we need the pointer. Differential Revision: https://reviews.freebsd.org/D54077 --- sys/compat/linsysfs/linsysfs_net.c | 12 ++-- sys/compat/linux/linux.h | 2 + sys/compat/linux/linux_common.c | 2 + sys/compat/linux/linux_common.h | 5 +- sys/compat/linux/linux_if.c | 135 ++++++++++++++++++----------------- sys/compat/linux/linux_netlink.c | 7 +- sys/net/if_private.h | 1 + sys/netlink/netlink_io.c | 2 +- sys/netlink/netlink_linux.h | 3 +- sys/netlink/netlink_message_writer.h | 2 + sys/netlink/route/iface.c | 2 + 11 files changed, 95 insertions(+), 78 deletions(-) diff --git a/sys/compat/linsysfs/linsysfs_net.c b/sys/compat/linsysfs/linsysfs_net.c index 751dbb5b3713..7439b0b4fdc0 100644 --- a/sys/compat/linsysfs/linsysfs_net.c +++ b/sys/compat/linsysfs/linsysfs_net.c @@ -90,7 +90,7 @@ linsysfs_if_addr(PFS_FILL_ARGS) CURVNET_SET(TD_TO_VNET(td)); NET_EPOCH_ENTER(et); - ifp = ifname_linux_to_ifp(td, pn->pn_parent->pn_name); + ifp = ifname_linux_to_ifp(pn->pn_parent->pn_name); if (ifp != NULL && (error = linux_ifhwaddr(ifp, &lsa)) == 0) error = sbuf_printf(sb, "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx\n", lsa.sa_data[0], lsa.sa_data[1], lsa.sa_data[2], @@ -119,7 +119,7 @@ linsysfs_if_flags(PFS_FILL_ARGS) CURVNET_SET(TD_TO_VNET(td)); NET_EPOCH_ENTER(et); - ifp = ifname_linux_to_ifp(td, pn->pn_parent->pn_name); + ifp = ifname_linux_to_ifp(pn->pn_parent->pn_name); if (ifp != NULL) error = sbuf_printf(sb, "0x%x\n", linux_ifflags(ifp)); else @@ -138,7 +138,7 @@ linsysfs_if_ifindex(PFS_FILL_ARGS) CURVNET_SET(TD_TO_VNET(td)); NET_EPOCH_ENTER(et); - ifp = ifname_linux_to_ifp(td, pn->pn_parent->pn_name); + ifp = ifname_linux_to_ifp(pn->pn_parent->pn_name); if (ifp != NULL) error = sbuf_printf(sb, "%u\n", if_getindex(ifp)); else @@ -157,7 +157,7 @@ linsysfs_if_mtu(PFS_FILL_ARGS) CURVNET_SET(TD_TO_VNET(td)); NET_EPOCH_ENTER(et); - ifp = ifname_linux_to_ifp(td, pn->pn_parent->pn_name); + ifp = ifname_linux_to_ifp( pn->pn_parent->pn_name); if (ifp != NULL) error = sbuf_printf(sb, "%u\n", if_getmtu(ifp)); else @@ -186,7 +186,7 @@ linsysfs_if_type(PFS_FILL_ARGS) CURVNET_SET(TD_TO_VNET(td)); NET_EPOCH_ENTER(et); - ifp = ifname_linux_to_ifp(td, pn->pn_parent->pn_name); + ifp = ifname_linux_to_ifp(pn->pn_parent->pn_name); if (ifp != NULL && (error = linux_ifhwaddr(ifp, &lsa)) == 0) error = sbuf_printf(sb, "%d\n", lsa.sa_family); else @@ -207,7 +207,7 @@ linsysfs_if_visible(PFS_VIS_ARGS) visible = 0; CURVNET_SET(TD_TO_VNET(td)); NET_EPOCH_ENTER(et); - ifp = ifname_linux_to_ifp(td, pn->pn_name); + ifp = ifname_linux_to_ifp(pn->pn_name); if (ifp != NULL) { TAILQ_FOREACH_SAFE(nq, &ifp_nodes_q, ifp_nodes_next, nq_tmp) { if (nq->ifp == ifp && nq->vnet == curvnet) { diff --git a/sys/compat/linux/linux.h b/sys/compat/linux/linux.h index 625aee2be127..67acd726a503 100644 --- a/sys/compat/linux/linux.h +++ b/sys/compat/linux/linux.h @@ -359,6 +359,8 @@ struct l_statx { ktrstruct("l_sigset_t", (s), l) #endif +void linux_ifnet_init(void); +void linux_ifnet_uninit(void); void linux_netlink_register(void); void linux_netlink_deregister(void); diff --git a/sys/compat/linux/linux_common.c b/sys/compat/linux/linux_common.c index e22e29ff2b24..d39054a647f7 100644 --- a/sys/compat/linux/linux_common.c +++ b/sys/compat/linux/linux_common.c @@ -56,6 +56,7 @@ linux_common_modevent(module_t mod, int type, void *data) linux_osd_jail_register(); SET_FOREACH(ldhp, linux_device_handler_set) linux_device_register_handler(*ldhp); + linux_ifnet_init(); linux_netlink_register(); break; case MOD_UNLOAD: @@ -63,6 +64,7 @@ linux_common_modevent(module_t mod, int type, void *data) linux_osd_jail_deregister(); SET_FOREACH(ldhp, linux_device_handler_set) linux_device_unregister_handler(*ldhp); + linux_ifnet_uninit(); linux_netlink_deregister(); break; default: diff --git a/sys/compat/linux/linux_common.h b/sys/compat/linux/linux_common.h index 814c183b338a..44ba63c44278 100644 --- a/sys/compat/linux/linux_common.h +++ b/sys/compat/linux/linux_common.h @@ -28,10 +28,9 @@ #ifndef _LINUX_COMMON_H_ #define _LINUX_COMMON_H_ -int ifname_bsd_to_linux_ifp(struct ifnet *, char *, size_t); +int ifname_bsd_to_linux_ifp(const struct ifnet *, char *, size_t); int ifname_bsd_to_linux_idx(u_int, char *, size_t); -int ifname_bsd_to_linux_name(const char *, char *, size_t); -struct ifnet *ifname_linux_to_ifp(struct thread *, const char *); +struct ifnet *ifname_linux_to_ifp( const char *); int ifname_linux_to_bsd(struct thread *, const char *, char *); unsigned short linux_ifflags(struct ifnet *); diff --git a/sys/compat/linux/linux_if.c b/sys/compat/linux/linux_if.c index 29e86d71aa5a..7c55ab9fd49c 100644 --- a/sys/compat/linux/linux_if.c +++ b/sys/compat/linux/linux_if.c @@ -24,7 +24,9 @@ */ #include +#include #include +#include #include #include #include @@ -32,6 +34,8 @@ #include #include #include +#include +#include #include #include @@ -44,33 +48,67 @@ SYSCTL_BOOL(_compat_linux, OID_AUTO, use_real_ifnames, CTLFLAG_RWTUN, &use_real_ifnames, 0, "Use FreeBSD interface names instead of generating ethN aliases"); -/* - * Criteria for interface name translation - */ -#define IFP_IS_ETH(ifp) (if_gettype(ifp) == IFT_ETHER) -#define IFP_IS_LOOP(ifp) (if_gettype(ifp) == IFT_LOOP) +VNET_DEFINE_STATIC(struct unrhdr *, linux_eth_unr); +#define V_linux_eth_unr VNET(linux_eth_unr) -/* - * Translate a FreeBSD interface name to a Linux interface name - * by interface name, and return the number of bytes copied to lxname. - */ -int -ifname_bsd_to_linux_name(const char *bsdname, char *lxname, size_t len) +static eventhandler_tag ifnet_arrival_tag; +static eventhandler_tag ifnet_departure_tag; + +static void +linux_ifnet_arrival(void *arg __unused, struct ifnet *ifp) { - struct epoch_tracker et; - struct ifnet *ifp; - int ret; + if (ifp->if_type == IFT_ETHER) + ifp->if_linux_ethno = alloc_unr(V_linux_eth_unr); +} - CURVNET_ASSERT_SET(); +static void +linux_ifnet_departure(void *arg __unused, struct ifnet *ifp) +{ + if (ifp->if_type == IFT_ETHER) + free_unr(V_linux_eth_unr, ifp->if_linux_ethno); +} - ret = 0; +void +linux_ifnet_init(void) +{ + ifnet_arrival_tag = EVENTHANDLER_REGISTER(ifnet_arrival_event, + linux_ifnet_arrival, NULL, EVENTHANDLER_PRI_FIRST); + ifnet_departure_tag = EVENTHANDLER_REGISTER(ifnet_departure_event, + linux_ifnet_departure, NULL, EVENTHANDLER_PRI_LAST); +} + +void +linux_ifnet_uninit(void) +{ + EVENTHANDLER_DEREGISTER(ifnet_arrival_event, ifnet_arrival_tag); + EVENTHANDLER_DEREGISTER(ifnet_departure_event, ifnet_departure_tag); +} + +static void +linux_ifnet_vnet_init(void *arg __unused) +{ + struct epoch_tracker et; + struct if_iter it; + if_t ifp; + + V_linux_eth_unr = new_unrhdr(0, INT_MAX, NULL); NET_EPOCH_ENTER(et); - ifp = ifunit(bsdname); - if (ifp != NULL) - ret = ifname_bsd_to_linux_ifp(ifp, lxname, len); + for (ifp = if_iter_start(&it); ifp != NULL; ifp = if_iter_next(&it)) + linux_ifnet_arrival(NULL, ifp); NET_EPOCH_EXIT(et); - return (ret); } +VNET_SYSINIT(linux_ifnet_vnet_init, SI_SUB_PROTO_IF, SI_ORDER_ANY, + linux_ifnet_vnet_init, NULL); + +#ifdef VIMAGE +static void +linux_ifnet_vnet_uninit(void *arg __unused) +{ + delete_unrhdr(V_linux_eth_unr); +} +VNET_SYSUNINIT(linux_ifnet_vnet_uninit, SI_SUB_PROTO_IF, SI_ORDER_ANY, + linux_ifnet_vnet_uninit, NULL); +#endif /* * Translate a FreeBSD interface name to a Linux interface name @@ -99,50 +137,23 @@ ifname_bsd_to_linux_idx(u_int idx, char *lxname, size_t len) * and return the number of bytes copied to lxname, 0 if interface * not found, -1 on error. */ -struct ifname_bsd_to_linux_ifp_cb_s { - struct ifnet *ifp; - int ethno; - char *lxname; - size_t len; -}; - -static int -ifname_bsd_to_linux_ifp_cb(if_t ifp, void *arg) -{ - struct ifname_bsd_to_linux_ifp_cb_s *cbs = arg; - - if (ifp == cbs->ifp) - return (snprintf(cbs->lxname, cbs->len, "eth%d", cbs->ethno)); - if (IFP_IS_ETH(ifp)) - cbs->ethno++; - return (0); -} - int -ifname_bsd_to_linux_ifp(struct ifnet *ifp, char *lxname, size_t len) +ifname_bsd_to_linux_ifp(const struct ifnet *ifp, char *lxname, size_t len) { - struct ifname_bsd_to_linux_ifp_cb_s arg = { - .ifp = ifp, - .ethno = 0, - .lxname = lxname, - .len = len, - }; - - NET_EPOCH_ASSERT(); - /* * Linux loopback interface name is lo (not lo0), * we translate lo to lo0, loX to loX. */ - if (IFP_IS_LOOP(ifp) && strncmp(if_name(ifp), "lo0", IFNAMSIZ) == 0) + if (ifp->if_type == IFT_LOOP && + strncmp(ifp->if_xname, "lo0", IFNAMSIZ) == 0) return (strlcpy(lxname, "lo", len)); /* Short-circuit non ethernet interfaces. */ - if (!IFP_IS_ETH(ifp) || use_real_ifnames) - return (strlcpy(lxname, if_name(ifp), len)); + if (ifp->if_type != IFT_ETHER || use_real_ifnames) + return (strlcpy(lxname, ifp->if_xname, len)); /* Determine the (relative) unit number for ethernet interfaces. */ - return (if_foreach(ifname_bsd_to_linux_ifp_cb, &arg)); + return (snprintf(lxname, len, "eth%d", ifp->if_linux_ethno)); } /* @@ -154,7 +165,6 @@ ifname_bsd_to_linux_ifp(struct ifnet *ifp, char *lxname, size_t len) struct ifname_linux_to_ifp_cb_s { bool is_lo; bool is_eth; - int ethno; int unit; const char *lxname; if_t ifp; @@ -174,12 +184,11 @@ ifname_linux_to_ifp_cb(if_t ifp, void *arg) */ if (strncmp(if_name(ifp), cbs->lxname, LINUX_IFNAMSIZ) == 0) goto out; - if (cbs->is_eth && IFP_IS_ETH(ifp) && cbs->unit == cbs->ethno) + if (cbs->is_eth && ifp->if_type == IFT_ETHER && + ifp->if_linux_ethno == cbs->unit) goto out; - if (cbs->is_lo && IFP_IS_LOOP(ifp)) + if (cbs->is_lo && ifp->if_type == IFT_LOOP) goto out; - if (IFP_IS_ETH(ifp)) - cbs->ethno++; return (0); out: @@ -188,12 +197,10 @@ out: } struct ifnet * -ifname_linux_to_ifp(struct thread *td, const char *lxname) +ifname_linux_to_ifp(const char *lxname) { struct ifname_linux_to_ifp_cb_s arg = { - .ethno = 0, .lxname = lxname, - .ifp = NULL, }; int len; char *ep; @@ -228,7 +235,7 @@ ifname_linux_to_bsd(struct thread *td, const char *lxname, char *bsdname) CURVNET_SET(TD_TO_VNET(td)); NET_EPOCH_ENTER(et); - ifp = ifname_linux_to_ifp(td, lxname); + ifp = ifname_linux_to_ifp(lxname); if (ifp != NULL && bsdname != NULL) strlcpy(bsdname, if_name(ifp), IFNAMSIZ); NET_EPOCH_EXIT(et); @@ -297,12 +304,12 @@ linux_ifhwaddr(struct ifnet *ifp, struct l_sockaddr *lsa) NET_EPOCH_ASSERT(); - if (IFP_IS_LOOP(ifp)) { + if (ifp->if_type == IFT_LOOP) { bzero(lsa, sizeof(*lsa)); lsa->sa_family = LINUX_ARPHRD_LOOPBACK; return (0); } - if (!IFP_IS_ETH(ifp)) + if (ifp->if_type != IFT_ETHER) return (ENOENT); if (if_foreach_addr_type(ifp, AF_LINK, linux_ifhwaddr_cb, lsa) > 0) return (0); diff --git a/sys/compat/linux/linux_netlink.c b/sys/compat/linux/linux_netlink.c index 6aeafe84adc6..6dd2ad7ad8b0 100644 --- a/sys/compat/linux/linux_netlink.c +++ b/sys/compat/linux/linux_netlink.c @@ -249,9 +249,9 @@ nlmsg_translate_ifname_nla(struct nlattr *nla, struct nl_writer *nw) { char ifname[LINUX_IFNAMSIZ]; - if (ifname_bsd_to_linux_name((char *)(nla + 1), ifname, - sizeof(ifname)) <= 0) + if (nw->ifp == NULL) return (false); + (void)ifname_bsd_to_linux_ifp(nw->ifp, ifname, sizeof(ifname)); return (nlattr_add_string(nw, IFLA_IFNAME, ifname)); } @@ -564,7 +564,7 @@ nlmsg_to_linux(struct nlmsghdr *hdr, struct nlpcb *nlp, struct nl_writer *nw) } static struct nl_buf * -nlmsgs_to_linux(struct nl_buf *orig, struct nlpcb *nlp) +nlmsgs_to_linux(struct nl_buf *orig, struct nlpcb *nlp, const struct ifnet *ifp) { struct nl_writer nw; u_int offset, msglen; @@ -573,6 +573,7 @@ nlmsgs_to_linux(struct nl_buf *orig, struct nlpcb *nlp) orig->datalen + SCRATCH_BUFFER_SIZE, nlp, false))) return (NULL); + nw.ifp = ifp; /* Assume correct headers. Buffer IS mutable */ for (offset = 0; offset + sizeof(struct nlmsghdr) <= orig->datalen; diff --git a/sys/net/if_private.h b/sys/net/if_private.h index 3da529e6b22e..b8cd0722eba6 100644 --- a/sys/net/if_private.h +++ b/sys/net/if_private.h @@ -65,6 +65,7 @@ struct ifnet { void *if_linkmib; /* link-type-specific MIB data */ size_t if_linkmiblen; /* length of above data */ u_int if_refcount; /* reference count */ + u_int if_linux_ethno; /* linux name id for IFT_ETHER */ /* These fields are shared with struct if_data. */ uint8_t if_type; /* ethernet, tokenring, etc */ diff --git a/sys/netlink/netlink_io.c b/sys/netlink/netlink_io.c index 2391d8ea752c..882c2181d24f 100644 --- a/sys/netlink/netlink_io.c +++ b/sys/netlink/netlink_io.c @@ -217,7 +217,7 @@ nl_send(struct nl_writer *nw, struct nlpcb *nlp) } if (nlp->nl_linux && linux_netlink_p != NULL) { - nb = linux_netlink_p->msgs_to_linux(nw->buf, nlp); + nb = linux_netlink_p->msgs_to_linux(nw->buf, nlp, nw->ifp); nl_buf_free(nw->buf); nw->buf = NULL; if (nb == NULL) diff --git a/sys/netlink/netlink_linux.h b/sys/netlink/netlink_linux.h index 794065692901..e9a25a04bb2b 100644 --- a/sys/netlink/netlink_linux.h +++ b/sys/netlink/netlink_linux.h @@ -37,7 +37,8 @@ struct nlpcb; struct nl_pstate; struct nl_writer; -typedef struct nl_buf * msgs_to_linux_cb_t(struct nl_buf *, struct nlpcb *); +typedef struct nl_buf * msgs_to_linux_cb_t(struct nl_buf *, struct nlpcb *, + const struct ifnet *); typedef int msg_from_linux_cb_t(int netlink_family, struct nlmsghdr **hdr, struct nl_pstate *npt); diff --git a/sys/netlink/netlink_message_writer.h b/sys/netlink/netlink_message_writer.h index ad2099a4d636..be3f349ce9f6 100644 --- a/sys/netlink/netlink_message_writer.h +++ b/sys/netlink/netlink_message_writer.h @@ -39,6 +39,7 @@ struct nl_buf; struct nl_writer; +struct ifnet; typedef bool nl_writer_cb(struct nl_writer *nw); struct nl_writer { @@ -53,6 +54,7 @@ struct nl_writer { int priv; } group; }; + const struct ifnet *ifp; /* Used by Linux translation only */ u_int num_messages; /* Number of messages in the buffer */ int malloc_flag; /* M_WAITOK or M_NOWAIT */ bool ignore_limit; /* If true, ignores RCVBUF limit */ diff --git a/sys/netlink/route/iface.c b/sys/netlink/route/iface.c index 9beb80792af4..70ec5e688c57 100644 --- a/sys/netlink/route/iface.c +++ b/sys/netlink/route/iface.c @@ -363,6 +363,8 @@ dump_iface(struct nl_writer *nw, if_t ifp, const struct nlmsghdr *hdr, ifc_dump_ifp_nl(ifp, nw); + nw->ifp = ifp; + if (nlmsg_end(nw)) return (true); From nobody Mon Dec 8 17:21:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQ80918vmz6K6N7 for ; Mon, 08 Dec 2025 17:21:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQ8074t23z3TFW for ; Mon, 08 Dec 2025 17:21:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765214471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+3kJzb4W5eyeyjlhD6UKwmqBAOltdMns2iEu1A7/91g=; b=TqRhwh6zlM2RvqCQPBr/vzAVkv5xtJC6nFo/YHFwsvv+OBDzLuXq0jpAZFvLJdZQRXtCvo Bkeow6R/LMX1Yj0A772Gjq3Lytd8qksv+oRsofjyS+qpsyzcL3eHpKmh0CuGh8lN8IDojv Nc0xyJ9jmkbwuAYLC9ILaaR/otq3PGHMPsC/mMej++cA+HZ/IgT7hUjIggxnp7BlFFUQqe pZkZUQ/GR+RLJ4X1eWMejH0ZSwyJ/h/V99gdKEZF1KYgwLfHaGGry7r3QZdObgph+mAcqX jwasD7J/efKIC5xF9szFRNlDs01eopYmU/LO6CVv/ot/6fe4MObrQ4bI+I57gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765214471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+3kJzb4W5eyeyjlhD6UKwmqBAOltdMns2iEu1A7/91g=; b=M33yzddfzqyxHQB5OAAus49+riUMbBXlEpA/7Y/mFzkstzytDU/BahYsIkpSlKE6RFiJ2z oQuilWKFCrVwbiTv/8I26F6D+fIu8qgXnoae8DkZuZVrfT7Xehgx2CjYDxNgwOTfptrekY fHRtjQOAS3GZJ+X4SLEoT6oUlIX1/Xv/Sbi1Fg1d/HMTu5IfB751UG4ENWFVKhecA1Jf9l Q7O0LIIfzykyfED0pBzIDUp677taoax3jm8c/HBf3dupnoIs5BXPGsy7U9ncDKXvyHbgtR Tqhkm9jmpZL5Kg1mJDkRrx866AdbVa2YkD9AhYShcHrDBHJX1Kee4Wz/TtE+pA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765214471; a=rsa-sha256; cv=none; b=Z1QczQLnalypr4LA5wvgWikkjUwVB8dN2n57I6guiDNQWlADpd9S4pLKae4I3J9ws/afrr tod1fv4l8jTfRx+W5QM3FaGbkTJ8io3tLSP0GTVbyio7+NRir9r9PEVXxO8vA1f+ddARkS wmhX2Ag8BnfdAPWmvATPel+fqn8Zsfbq0mmckh8h5wdtfkQu8YEZDyKXXBPn5aGwalroSn AGkWfl14fDBZw0wbeVv1u5pbjSijOqifjOeHjlSLt4/qKCr+ejZXNfN+AadQyPWgWiAdh5 4ar4JJHCK0eycLKkasvzCbm0ogjZoAA7tEjOgu+LAe4t2SCFMkz0bLY1WrHhPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQ80746GGz6cp for ; Mon, 08 Dec 2025 17:21:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id a981 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 08 Dec 2025 17:21:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: b986aa05a84d - main - lltable: use own lock List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: b986aa05a84db8d942e58ac9d0ce3df43b68fdcb Auto-Submitted: auto-generated Date: Mon, 08 Dec 2025 17:21:11 +0000 Message-Id: <69370907.a981.5d60e298@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=b986aa05a84db8d942e58ac9d0ce3df43b68fdcb commit b986aa05a84db8d942e58ac9d0ce3df43b68fdcb Author: Gleb Smirnoff AuthorDate: 2025-12-08 17:20:56 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-08 17:20:56 +0000 lltable: use own lock Add struct mtx to struct lltable and stop using IF_AFDATA_LOCK, that was created for a completely different purpose. No functional change intended. Reviewed by: zlei, melifaro Differential Revision: https://reviews.freebsd.org/D54086 --- sys/net/if_llatbl.c | 50 +++++++++++++++++++++++------------------------ sys/net/if_llatbl.h | 9 ++++++++- sys/netinet/if_ether.c | 16 +++++++-------- sys/netinet/in.c | 4 ++-- sys/netinet6/in6.c | 12 +++++------- sys/netinet6/mld6.c | 8 ++++---- sys/netinet6/nd6.c | 25 ++++++++++++------------ sys/netlink/route/neigh.c | 5 ++--- 8 files changed, 65 insertions(+), 64 deletions(-) diff --git a/sys/net/if_llatbl.c b/sys/net/if_llatbl.c index f6bfeff8a9b0..2a80372e6fe5 100644 --- a/sys/net/if_llatbl.c +++ b/sys/net/if_llatbl.c @@ -206,7 +206,7 @@ htable_link_entry(struct lltable *llt, struct llentry *lle) if ((lle->la_flags & LLE_LINKED) != 0) return (0); - IF_AFDATA_WLOCK_ASSERT(llt->llt_ifp); + LLTABLE_LOCK_ASSERT(llt); if (llt->llt_maxentries > 0 && llt->llt_entries >= llt->llt_maxentries) @@ -233,7 +233,7 @@ htable_unlink_entry(struct llentry *lle) return (0); llt = lle->lle_tbl; - IF_AFDATA_WLOCK_ASSERT(llt->llt_ifp); + LLTABLE_LOCK_ASSERT(llt); KASSERT(llt->llt_entries > 0, ("%s: lltable %p (%s) entries %d <= 0", __func__, llt, if_name(llt->llt_ifp), llt->llt_entries)); @@ -283,12 +283,12 @@ htable_prefix_free(struct lltable *llt, const struct sockaddr *addr, pmd.flags = flags; CK_LIST_INIT(&pmd.dchain); - IF_AFDATA_WLOCK(llt->llt_ifp); + LLTABLE_LOCK(llt); /* Push matching lles to chain */ lltable_foreach_lle(llt, htable_prefix_free_cb, &pmd); llentries_unlink(llt, &pmd.dchain); - IF_AFDATA_WUNLOCK(llt->llt_ifp); + LLTABLE_UNLOCK(llt); CK_LIST_FOREACH_SAFE(lle, &pmd.dchain, lle_chain, next) lltable_free_entry(llt, lle); @@ -298,6 +298,7 @@ static void htable_free_tbl(struct lltable *llt) { + mtx_destroy(&llt->llt_lock); free(llt->lle_head, M_LLTABLE); free(llt, M_LLTABLE); } @@ -357,14 +358,12 @@ lltable_set_entry_addr(struct ifnet *ifp, struct llentry *lle, * On failure, false is returned and lle wlock is still held. */ bool -lltable_acquire_wlock(struct ifnet *ifp, struct llentry *lle) +lltable_trylock(struct llentry *lle) { NET_EPOCH_ASSERT(); - /* Perform real LLE update */ - /* use afdata WLOCK to update fields */ LLE_WUNLOCK(lle); - IF_AFDATA_WLOCK(ifp); + LLTABLE_LOCK(lle->lle_tbl); LLE_WLOCK(lle); /* @@ -372,7 +371,7 @@ lltable_acquire_wlock(struct ifnet *ifp, struct llentry *lle) * this lle. Check and return */ if ((lle->la_flags & LLE_DELETED) != 0) { - IF_AFDATA_WUNLOCK(ifp); + LLTABLE_UNLOCK(lle->lle_tbl); return (false); } @@ -392,13 +391,13 @@ lltable_try_set_entry_addr(struct ifnet *ifp, struct llentry *lle, const char *linkhdr, size_t linkhdrsize, int lladdr_off) { - if (!lltable_acquire_wlock(ifp, lle)) + if (!lltable_trylock(lle)) return (0); /* Update data */ lltable_set_entry_addr(ifp, lle, linkhdr, linkhdrsize, lladdr_off); - IF_AFDATA_WUNLOCK(ifp); + LLTABLE_UNLOCK(lle->lle_tbl); return (1); } @@ -630,9 +629,9 @@ lltable_update_ifaddr(struct lltable *llt) if (llt->llt_ifp->if_flags & IFF_LOOPBACK) return; - IF_AFDATA_WLOCK(llt->llt_ifp); + LLTABLE_LOCK(llt); lltable_foreach_lle(llt, llentry_update_ifaddr, llt->llt_ifp); - IF_AFDATA_WUNLOCK(llt->llt_ifp); + LLTABLE_UNLOCK(llt); } /* @@ -696,11 +695,11 @@ lltable_free(struct lltable *llt) lltable_unlink(llt); CK_LIST_INIT(&dchain); - IF_AFDATA_WLOCK(llt->llt_ifp); + LLTABLE_LOCK(llt); /* Push all lles to @dchain */ lltable_foreach_lle(llt, lltable_free_cb, &dchain); llentries_unlink(llt, &dchain); - IF_AFDATA_WUNLOCK(llt->llt_ifp); + LLTABLE_UNLOCK(llt); CK_LIST_FOREACH_SAFE(lle, &dchain, lle_chain, next) { llentry_free(lle); @@ -722,24 +721,22 @@ lltable_delete_addr(struct lltable *llt, u_int flags, const struct sockaddr *l3addr) { struct llentry *lle; - struct ifnet *ifp; - ifp = llt->llt_ifp; - IF_AFDATA_WLOCK(ifp); + LLTABLE_LOCK(llt); lle = lla_lookup(llt, LLE_SF(l3addr->sa_family, LLE_EXCLUSIVE), l3addr); if (lle == NULL) { - IF_AFDATA_WUNLOCK(ifp); + LLTABLE_UNLOCK(llt); return (ENOENT); } if ((lle->la_flags & LLE_IFADDR) != 0 && (flags & LLE_IFADDR) == 0) { - IF_AFDATA_WUNLOCK(ifp); + LLTABLE_UNLOCK(llt); LLE_WUNLOCK(lle); return (EPERM); } lltable_unlink_entry(llt, lle); - IF_AFDATA_WUNLOCK(ifp); + LLTABLE_UNLOCK(llt); llt->llt_delete_entry(llt, lle); @@ -798,10 +795,10 @@ lltable_delete_conditional(struct lltable *llt, llt_match_cb_t *func, lmd.func = func; lmd.farg = farg; - IF_AFDATA_WLOCK(llt->llt_ifp); + LLTABLE_LOCK(llt); lltable_foreach_lle(llt, lltable_delete_conditional_cb, &lmd); llentries_unlink(llt, &lmd.dchain); - IF_AFDATA_WUNLOCK(llt->llt_ifp); + LLTABLE_UNLOCK(llt); CK_LIST_FOREACH_SAFE(lle, &lmd.dchain, lle_chain, next) llt->llt_delete_entry(llt, lle); @@ -817,6 +814,7 @@ lltable_allocate_htbl(uint32_t hsize) llt->llt_hsize = hsize; llt->lle_head = malloc(sizeof(struct llentries) * hsize, M_LLTABLE, M_WAITOK | M_ZERO); + mtx_init(&llt->llt_lock, "lltable", NULL, MTX_DEF); for (i = 0; i < llt->llt_hsize; i++) CK_LIST_INIT(&llt->lle_head[i]); @@ -1021,13 +1019,13 @@ lla_rt_output(struct rt_msghdr *rtm, struct rt_addrinfo *info) /* Try to link new entry */ lle_tmp = NULL; - IF_AFDATA_WLOCK(ifp); + LLTABLE_LOCK(llt); LLE_WLOCK(lle); lle_tmp = lla_lookup(llt, LLE_EXCLUSIVE, dst); if (lle_tmp != NULL) { /* Check if we are trying to replace immutable entry */ if ((lle_tmp->la_flags & LLE_IFADDR) != 0) { - IF_AFDATA_WUNLOCK(ifp); + LLTABLE_UNLOCK(llt); LLE_WUNLOCK(lle_tmp); lltable_free_entry(llt, lle); return (EPERM); @@ -1036,7 +1034,7 @@ lla_rt_output(struct rt_msghdr *rtm, struct rt_addrinfo *info) lltable_unlink_entry(llt, lle_tmp); } lltable_link_entry(llt, lle); - IF_AFDATA_WUNLOCK(ifp); + LLTABLE_UNLOCK(llt); if (lle_tmp != NULL) { EVENTHANDLER_INVOKE(lle_event, lle_tmp,LLENTRY_EXPIRED); diff --git a/sys/net/if_llatbl.h b/sys/net/if_llatbl.h index 53f5a7cf7002..e79fe8798a7d 100644 --- a/sys/net/if_llatbl.h +++ b/sys/net/if_llatbl.h @@ -174,6 +174,7 @@ struct lltable { int llt_maxentries; struct llentries *lle_head; struct ifnet *llt_ifp; + struct mtx llt_lock; llt_lookup_t *llt_lookup; llt_alloc_t *llt_alloc_entry; @@ -192,6 +193,12 @@ struct lltable { llt_post_resolved_t *llt_post_resolved; }; +#define LLTABLE_LOCK(llt) mtx_lock(&(llt)->llt_lock) +#define LLTABLE_UNLOCK(llt) mtx_unlock(&(llt)->llt_lock) +#define LLTABLE_LOCK_ASSERT(llt) mtx_assert(&(llt)->llt_lock, MA_OWNED) +#define LLTABLE_RLOCK_ASSERT(llt) MPASS(in_epoch(net_epoch_preempt) || \ + mtx_owned(&(llt)->llt_lock)) + MALLOC_DECLARE(M_LLTABLE); /* @@ -261,7 +268,7 @@ void lltable_fill_sa_entry(const struct llentry *lle, struct sockaddr *sa); struct ifnet *lltable_get_ifp(const struct lltable *llt); int lltable_get_af(const struct lltable *llt); -bool lltable_acquire_wlock(struct ifnet *ifp, struct llentry *lle); +bool lltable_trylock(struct llentry *lle); int lltable_foreach_lle(struct lltable *llt, llt_foreach_cb_t *f, void *farg); diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index ff60803f4517..7b223f1f2f11 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -288,7 +288,7 @@ arptimer(void *arg) /* XXX: LOR avoidance. We still have ref on lle. */ LLE_WUNLOCK(lle); - IF_AFDATA_LOCK(ifp); + LLTABLE_LOCK(LLTABLE(ifp)); LLE_WLOCK(lle); /* Guard against race with other llentry_free(). */ @@ -296,7 +296,7 @@ arptimer(void *arg) LLE_REMREF(lle); lltable_unlink_entry(lle->lle_tbl, lle); } - IF_AFDATA_UNLOCK(ifp); + LLTABLE_UNLOCK(LLTABLE(ifp)); size_t pkts_dropped = llentry_free(lle); @@ -488,13 +488,13 @@ arpresolve_full(struct ifnet *ifp, int is_gw, int flags, struct mbuf *m, return (EINVAL); } - IF_AFDATA_WLOCK(ifp); + LLTABLE_LOCK(LLTABLE(ifp)); LLE_WLOCK(la); la_tmp = lla_lookup(LLTABLE(ifp), LLE_EXCLUSIVE, dst); /* Prefer ANY existing lle over newly-created one */ if (la_tmp == NULL) lltable_link_entry(LLTABLE(ifp), la); - IF_AFDATA_WUNLOCK(ifp); + LLTABLE_UNLOCK(LLTABLE(ifp)); if (la_tmp != NULL) { lltable_free_entry(LLTABLE(ifp), la); la = la_tmp; @@ -961,7 +961,7 @@ match: lltable_set_entry_addr(ifp, la, linkhdr, linkhdrsize, lladdr_off); - IF_AFDATA_WLOCK(ifp); + LLTABLE_LOCK(LLTABLE(ifp)); LLE_WLOCK(la); la_tmp = lla_lookup(LLTABLE(ifp), LLE_EXCLUSIVE, dst); @@ -983,7 +983,7 @@ match: */ if (la_tmp == NULL) lltable_link_entry(LLTABLE(ifp), la); - IF_AFDATA_WUNLOCK(ifp); + LLTABLE_UNLOCK(LLTABLE(ifp)); if (la_tmp == NULL) { arp_mark_lle_reachable(la, ifp); @@ -1301,7 +1301,7 @@ arp_add_ifa_lle(struct ifnet *ifp, const struct sockaddr *dst) return; } - IF_AFDATA_WLOCK(ifp); + LLTABLE_LOCK(LLTABLE(ifp)); LLE_WLOCK(lle); /* Unlink any entry if exists */ lle_tmp = lla_lookup(LLTABLE(ifp), LLE_EXCLUSIVE, dst); @@ -1309,7 +1309,7 @@ arp_add_ifa_lle(struct ifnet *ifp, const struct sockaddr *dst) lltable_unlink_entry(LLTABLE(ifp), lle_tmp); lltable_link_entry(LLTABLE(ifp), lle); - IF_AFDATA_WUNLOCK(ifp); + LLTABLE_UNLOCK(LLTABLE(ifp)); if (lle_tmp != NULL) EVENTHANDLER_INVOKE(lle_event, lle_tmp, LLENTRY_EXPIRED); diff --git a/sys/netinet/in.c b/sys/netinet/in.c index 19ab485bc75f..e824c937af8e 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -1546,7 +1546,7 @@ in_lltable_free_entry(struct lltable *llt, struct llentry *lle) /* Unlink entry from table if not already */ if ((lle->la_flags & LLE_LINKED) != 0) { - IF_AFDATA_WLOCK_ASSERT(llt->llt_ifp); + LLTABLE_LOCK_ASSERT(llt); lltable_unlink_entry(llt, lle); } @@ -1728,7 +1728,7 @@ in_lltable_lookup(struct lltable *llt, u_int flags, const struct sockaddr *l3add const struct sockaddr_in *sin = (const struct sockaddr_in *)l3addr; struct llentry *lle; - IF_AFDATA_LOCK_ASSERT(llt->llt_ifp); + LLTABLE_RLOCK_ASSERT(llt); KASSERT(l3addr->sa_family == AF_INET, ("sin_family %d", l3addr->sa_family)); KASSERT((flags & (LLE_UNLOCKED | LLE_EXCLUSIVE)) != diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 0456ec5decf1..f64b9292e4b5 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -2253,15 +2253,13 @@ in6_lltable_match_prefix(const struct sockaddr *saddr, static void in6_lltable_free_entry(struct lltable *llt, struct llentry *lle) { - struct ifnet *ifp __diagused; LLE_WLOCK_ASSERT(lle); KASSERT(llt != NULL, ("lltable is NULL")); /* Unlink entry from table */ if ((lle->la_flags & LLE_LINKED) != 0) { - ifp = llt->llt_ifp; - IF_AFDATA_WLOCK_ASSERT(ifp); + LLTABLE_LOCK_ASSERT(llt); lltable_unlink_entry(llt, lle); } @@ -2421,7 +2419,7 @@ in6_lltable_lookup(struct lltable *llt, u_int flags, int family = flags >> 16; struct llentry *lle; - IF_AFDATA_LOCK_ASSERT(llt->llt_ifp); + LLTABLE_RLOCK_ASSERT(llt); KASSERT(l3addr->sa_family == AF_INET6, ("sin_family %d", l3addr->sa_family)); KASSERT((flags & (LLE_UNLOCKED | LLE_EXCLUSIVE)) != @@ -2445,7 +2443,7 @@ in6_lltable_lookup(struct lltable *llt, u_int flags, LLE_RLOCK(lle); /* - * If the afdata lock is not held, the LLE may have been unlinked while + * If the lltable lock is not held, the LLE may have been unlinked while * we were blocked on the LLE lock. Check for this case. */ if (__predict_false((lle->la_flags & LLE_LINKED) == 0)) { @@ -2743,9 +2741,9 @@ in6_purge_proxy_ndp(struct ifnet *ifp) return; llt = LLTABLE6(ifp); - IF_AFDATA_WLOCK(ifp); + LLTABLE_LOCK(llt); need_purge = ((llt->llt_flags & LLT_ADDEDPROXY) != 0); - IF_AFDATA_WUNLOCK(ifp); + LLTABLE_UNLOCK(llt); /* * Ever added proxy ndp entries, leave solicited node multicast diff --git a/sys/netinet6/mld6.c b/sys/netinet6/mld6.c index fd0a1503a6e5..8e2bbf8adc01 100644 --- a/sys/netinet6/mld6.c +++ b/sys/netinet6/mld6.c @@ -165,8 +165,8 @@ static int sysctl_mld_ifinfo(SYSCTL_HANDLER_ARGS); * scope ID is only used by MLD to select the outgoing interface. * * During interface attach and detach, MLD will take MLD_LOCK *after* - * the IF_AFDATA_LOCK. - * As in6_setscope() takes IF_AFDATA_LOCK then SCOPE_LOCK, we can't call + * the LLTABLE_LOCK. + * As in6_setscope() takes LLTABLE_LOCK then SCOPE_LOCK, we can't call * it with MLD_LOCK held without triggering an LOR. A netisr with indirect * dispatch could work around this, but we'd rather not do that, as it * can introduce other races. @@ -182,7 +182,7 @@ static int sysctl_mld_ifinfo(SYSCTL_HANDLER_ARGS); * calls in6_setscope() internally whilst MLD_LOCK is held. This will * trigger a LOR warning in WITNESS when the ifnet is detached. * - * The right answer is probably to make IF_AFDATA_LOCK an rwlock, given + * The right answer is probably to make LLTABLE_LOCK an rwlock, given * how it's used across the network stack. Here we're simply exploiting * the fact that MLD runs at a similar layer in the stack to scope6.c. * @@ -553,7 +553,7 @@ mld_ifdetach(struct ifnet *ifp, struct in6_multi_head *inmh) * Hook for domifdetach. * Runs after link-layer cleanup; free MLD state. * - * SMPng: Normally called with IF_AFDATA_LOCK held. + * SMPng: Normally called with LLTABLE_LOCK held. */ void mld_domifdetach(struct ifnet *ifp) diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index a62b26d27250..ecf368327833 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -1217,7 +1217,7 @@ nd6_lookup(const struct in6_addr *addr6, int flags, struct ifnet *ifp) sin6.sin6_family = AF_INET6; sin6.sin6_addr = *addr6; - IF_AFDATA_LOCK_ASSERT(ifp); + LLTABLE_RLOCK_ASSERT(LLTABLE6(ifp)); ln = lla_lookup(LLTABLE6(ifp), flags, (struct sockaddr *)&sin6); @@ -1342,7 +1342,7 @@ nd6_is_addr_neighbor(const struct sockaddr_in6 *addr, struct ifnet *ifp) int rc = 0; NET_EPOCH_ASSERT(); - IF_AFDATA_UNLOCK_ASSERT(ifp); + if (nd6_is_new_addr_neighbor(addr, ifp)) return (1); @@ -1414,10 +1414,10 @@ nd6_try_set_entry_addr(struct ifnet *ifp, struct llentry *lle, char *lladdr) NET_EPOCH_ASSERT(); LLE_WLOCK_ASSERT(lle); - if (!lltable_acquire_wlock(ifp, lle)) + if (!lltable_trylock(lle)) return (false); bool ret = nd6_try_set_entry_addr_locked(ifp, lle, lladdr); - IF_AFDATA_WUNLOCK(ifp); + LLTABLE_UNLOCK(lle->lle_tbl); return (ret); } @@ -1556,7 +1556,7 @@ nd6_free(struct llentry **lnp, int gc) * free(9) in llentry_free() if someone else holds one as well. */ LLE_WUNLOCK(ln); - IF_AFDATA_LOCK(ifp); + LLTABLE_LOCK(ln->lle_tbl); LLE_WLOCK(ln); /* Guard against race with other llentry_free(). */ if (ln->la_flags & LLE_LINKED) { @@ -1564,7 +1564,7 @@ nd6_free(struct llentry **lnp, int gc) LLE_REMREF(ln); lltable_unlink_entry(ln->lle_tbl, ln); } - IF_AFDATA_UNLOCK(ifp); + LLTABLE_UNLOCK(ln->lle_tbl); nd6_free_children(ln); @@ -1969,7 +1969,6 @@ nd6_cache_lladdr(struct ifnet *ifp, struct in6_addr *from, char *lladdr, int lladdr_off; NET_EPOCH_ASSERT(); - IF_AFDATA_UNLOCK_ASSERT(ifp); KASSERT(ifp != NULL, ("%s: ifp == NULL", __func__)); KASSERT(from != NULL, ("%s: from == NULL", __func__)); @@ -2011,13 +2010,13 @@ nd6_cache_lladdr(struct ifnet *ifp, struct in6_addr *from, char *lladdr, lladdr_off); } - IF_AFDATA_WLOCK(ifp); + LLTABLE_LOCK(LLTABLE6(ifp)); LLE_WLOCK(ln); /* Prefer any existing lle over newly-created one */ ln_tmp = nd6_lookup(from, LLE_SF(AF_INET6, LLE_EXCLUSIVE), ifp); if (ln_tmp == NULL) lltable_link_entry(LLTABLE6(ifp), ln); - IF_AFDATA_WUNLOCK(ifp); + LLTABLE_UNLOCK(LLTABLE6(ifp)); if (ln_tmp == NULL) { /* No existing lle, mark as new entry (6,7) */ is_newentry = 1; @@ -2337,7 +2336,7 @@ nd6_get_llentry(struct ifnet *ifp, const struct in6_addr *addr, int family) return (NULL); } - IF_AFDATA_WLOCK(ifp); + LLTABLE_LOCK(LLTABLE6(ifp)); LLE_WLOCK(lle); /* Prefer any existing entry over newly-created one */ lle_tmp = nd6_lookup(addr, LLE_SF(AF_INET6, LLE_EXCLUSIVE), ifp); @@ -2363,7 +2362,7 @@ nd6_get_llentry(struct ifnet *ifp, const struct in6_addr *addr, int family) LLE_WUNLOCK(lle); lle = child_lle; } - IF_AFDATA_WUNLOCK(ifp); + LLTABLE_UNLOCK(LLTABLE6(ifp)); return (lle); } @@ -2610,14 +2609,14 @@ nd6_add_ifa_lle(struct in6_ifaddr *ia) if (ln == NULL) return (ENOBUFS); - IF_AFDATA_WLOCK(ifp); + LLTABLE_LOCK(LLTABLE6(ifp)); LLE_WLOCK(ln); /* Unlink any entry if exists */ ln_tmp = lla_lookup(LLTABLE6(ifp), LLE_SF(AF_INET6, LLE_EXCLUSIVE), dst); if (ln_tmp != NULL) lltable_unlink_entry(LLTABLE6(ifp), ln_tmp); lltable_link_entry(LLTABLE6(ifp), ln); - IF_AFDATA_WUNLOCK(ifp); + LLTABLE_UNLOCK(LLTABLE6(ifp)); if (ln_tmp != NULL) EVENTHANDLER_INVOKE(lle_event, ln_tmp, LLENTRY_EXPIRED); diff --git a/sys/netlink/route/neigh.c b/sys/netlink/route/neigh.c index 9eaaae263254..d3170e7a33ef 100644 --- a/sys/netlink/route/neigh.c +++ b/sys/netlink/route/neigh.c @@ -37,7 +37,6 @@ #include #include -#include #include #include #include @@ -431,7 +430,7 @@ rtnl_handle_newneigh(struct nlmsghdr *hdr, struct nlpcb *nlp, struct nl_pstate * lle->la_expire = attrs.ndaf_next_ts - time_second + time_uptime; /* llentry created, try to insert or update */ - IF_AFDATA_WLOCK(attrs.nda_ifp); + LLTABLE_LOCK(llt); LLE_WLOCK(lle); struct llentry *lle_tmp = lla_lookup(llt, LLE_EXCLUSIVE, attrs.nda_dst); if (lle_tmp != NULL) { @@ -454,7 +453,7 @@ rtnl_handle_newneigh(struct nlmsghdr *hdr, struct nlpcb *nlp, struct nl_pstate * else error = ENOENT; } - IF_AFDATA_WUNLOCK(attrs.nda_ifp); + LLTABLE_UNLOCK(llt); if (error != 0) { /* throw away the newly allocated llentry */ From nobody Mon Dec 8 17:21:36 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQ80c40fFz6K6Hb for ; Mon, 08 Dec 2025 17:21:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQ80c1ttXz3Ty9 for ; Mon, 08 Dec 2025 17:21:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765214496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3fQeMfhOHiD+zqMBZ1Cs9JCxmKIVsBLHuUfrdN9WV9M=; b=M/7isChEQVFHOFoeuRgP+yvRASJmimM2ZDT5EA4jssWReAUxYMfCQ8sFo/B/NuS21cFcY2 cO6zxN5n/SAlaVIIwdzT5DW/aj2KTQ1CLquDrHKegR0tVhP9biVREkrNAYXEBs0E3yFeFe /9WahMV3xcQ6jq/uC9fwqo37wka28v6Wwnku2mh1rHgi6Po61UTvSc6sds6ijjSNTBo8ql Tc7aJM8ypzSo3ld35LNn2mdBbBpU4QJBULw0BqFfrg9vBLR6OXsb6z/fCLvkUCsTYOiY8g cAg5nWQ/hDpG1AunRvfNxn50WjNYBe5EX2fVlbCKwU9atTA/vU6s88Rbqeao0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765214496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3fQeMfhOHiD+zqMBZ1Cs9JCxmKIVsBLHuUfrdN9WV9M=; b=ZaUW+ESSrCRmGK8efNdlWS0ln+CHyCK4Ofcpm83R/p5/+pXCPQGWwo4e6FQlJJz5mJVd/h tWe9iA9BdfOvn8wJvvhA3xvxjTx/h+neo8BtiCvhnmxObJylW2Sjzu/C0aMxU6tR1rpVAJ 9CTyBo6L03o7gWug81JmDRR4f101ev8bei4Esv8kgVq9S9RjCNtUgb8daMKIYpjvOycPOZ sJm4yDGZ8j+APE4UxK9p7KtwuGFcW1OBIyrfNy5wmpghi4vT9eTE11HTut1Hvn0kLLzKJn Tki/HlVmKVePm9cq74X4AgUVyFomrGbziO68V1Xj+XMtuuPAfNxMwzIAWqwnKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765214496; a=rsa-sha256; cv=none; b=N4tylvH+he8EuPg1E3VrpA7BoVgDZDkQBwiKv3PLHjRKweiUgseYUOOD3DhJK4sv+xg0NR z0w4wOOBe3JZUukQ87dlXRs3FbX0hjN8c8V8irNjRVOrV1Gq1B+uMkNUUfSJFqMmV2suqv qMdE+7jmknqFQcLgBrEEMPNMd7CzYVBhNwCi9aLgyGT/dkyw8LK5C929qlWQhDjDVYQMrj GQ07zYumhVKsP5TMrWKb3Ezdciy89vkpSn1J4POT5FPvsYW0XwsZHD9UyXMALY/Fm/iQod ezyBpfOXRiI1AxRF4CuIuVGT+l06wRlLqd1HvPJdP3GttPmLHayzY39Rch0oBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQ80c18Knz6PY for ; Mon, 08 Dec 2025 17:21:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ad32 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 08 Dec 2025 17:21:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Goran=?utf-8?Q? Meki=C4=87?= From: Christos Margiolis Subject: git: ebe7b241662b - main - sound examples: Check if setting property was successful List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: ebe7b241662be3941e462be9f228fcad1b67073a Auto-Submitted: auto-generated Date: Mon, 08 Dec 2025 17:21:36 +0000 Message-Id: <69370920.ad32.225d24c8@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=ebe7b241662be3941e462be9f228fcad1b67073a commit ebe7b241662be3941e462be9f228fcad1b67073a Author: Goran Mekić AuthorDate: 2025-12-08 17:20:34 +0000 Commit: Christos Margiolis CommitDate: 2025-12-08 17:21:30 +0000 sound examples: Check if setting property was successful MFC after: 1 week Reviewed by: christos Differential Revision: https://reviews.freebsd.org/D54038 --- share/examples/sound/oss.h | 22 ++++++++++++++++++---- share/examples/sound/simple.c | 4 ++++ 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/share/examples/sound/oss.h b/share/examples/sound/oss.h index e1ba4165810f..cf38b8de2b0c 100644 --- a/share/examples/sound/oss.h +++ b/share/examples/sound/oss.h @@ -112,16 +112,28 @@ oss_init(struct config *config) } /* Set sample format */ - if (ioctl(config->fd, SNDCTL_DSP_SETFMT, &config->format) < 0) + tmp = config->format; + if (ioctl(config->fd, SNDCTL_DSP_SETFMT, &tmp) < 0) err(1, "Unable to set sample format"); + if (tmp != config->format) + warnx("Format: requested=%08x, got=%08x", config->format, tmp); + config->format = tmp; /* Set sample channels */ - if (ioctl(config->fd, SNDCTL_DSP_CHANNELS, &config->audio_info.max_channels) < 0) + tmp = config->audio_info.max_channels; + if (ioctl(config->fd, SNDCTL_DSP_CHANNELS, &tmp) < 0) err(1, "Unable to set channels"); + if (tmp != config->audio_info.max_channels) + warnx("Channels: requested=%d, got=%d", config->audio_info.max_channels, tmp); + config->audio_info.max_channels = tmp; /* Set sample rate */ + tmp = config->sample_rate; if (ioctl(config->fd, SNDCTL_DSP_SPEED, &config->sample_rate) < 0) err(1, "Unable to set sample rate"); + if (tmp != config->sample_rate) + warnx("Sample rate: requested=%d, got=%d", config->sample_rate, tmp); + config->sample_rate = tmp; /* Calculate sample size */ switch (config->format) { @@ -197,10 +209,12 @@ oss_init(struct config *config) config->chsamples = config->sample_count / config->audio_info.max_channels; printf("bytes: %d, fragments: %d, fragsize: %d, fragstotal: %d, " - "samples: %d\n", + "samples: %d, channels: %d, sample size: %d, sample rate: %d, " + "format: %08x\n", config->buffer_info.bytes, config->buffer_info.fragments, config->buffer_info.fragsize, config->buffer_info.fragstotal, - config->sample_count); + config->sample_count, config->audio_info.max_channels, + config->sample_size, config->sample_rate, config->format); /* Set trigger direction and mmap protection */ switch (config->mode & O_ACCMODE) { diff --git a/share/examples/sound/simple.c b/share/examples/sound/simple.c index e458841f596a..78f9d848bcec 100644 --- a/share/examples/sound/simple.c +++ b/share/examples/sound/simple.c @@ -29,6 +29,7 @@ * SUCH DAMAGE. */ +#include #include "oss.h" /* @@ -115,6 +116,9 @@ main(int argc, char *argv[]) int rc, bytes; oss_init(&config); + if (config.format != AFMT_S32_NE) + errx(1, "Device doesn't support signed 32bit samples. " + "Check with 'sndctl' if it can be configured for 's32le' format."); bytes = config.buffer_info.bytes; channels = malloc(bytes); From nobody Mon Dec 8 17:31:44 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQ8DP6dD1z6K76J for ; Mon, 08 Dec 2025 17:31:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQ8DP5dgrz3XPr for ; Mon, 08 Dec 2025 17:31:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765215109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=50FqIwXmzjYIZk5bOJD5ViDxyG6S7SaRDuX8sVw7NII=; b=WrAg5O/YymtvrsfzZCF0idp39oaeEksM0p3lC106EzmNU4y49ekDFV3X+YhoWGAU6aNFWZ eVA+XOqoiuDNSl2ZNdn3L6yb2rMi5ez+HTlyHa4lIl/uOfnGN39t6UtU0E3V3+1eukxPQx 4E1tQlY4uWs3NWyWxgbOkJbXrl4K7QbnUnCfh6qrZBzA+YL5s8gDvjpV9VkhL88WwLFme2 k54IJiwzL+5McKrQzkMM0Mcl74LJDZmcH0VLB/gaSwXRQQjVT2yKffNMTJCfYLFYFcCHnz juNN8iYlrPkryjUvpUOB2ma3GNlXM/33XXeg9zVglMjvFRgMfUkUpdCHDEuz+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765215109; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=50FqIwXmzjYIZk5bOJD5ViDxyG6S7SaRDuX8sVw7NII=; b=Jpo8IfiZNDlAjuGnyit6OIknEBPOr8ZNMC9ng1nLGpkZE8BGvGrcAr+s05gB84jElwzIJl aB4roiQ+hkKFIkkF0HuMuy5z6xk96jJtIVY+HaCO113XAWicoqAo1QOD0MjqTkglVuPrxE 9JCWhJRRID7MLuCMEG/eT7tRsH3vhGWZgRVQrIGHk4b3dDWcHsXQhK5hZQozanndCI58FM ov3yY9gcFdJpm/4dkhArFKWVjnlU5AY4Z8G9YASmySKLX4rG3twz8rkIMc5t6Xz+7MTrOT PS4WCqJ/YplKq2A5s9YoExtHIe1XqF5sV5ltTsEA3/VOktzB1btrXd5kTMs2FA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765215109; a=rsa-sha256; cv=none; b=v5R+J63OIYjPiDLQ2oleyAM+5jVWW5SoWJtMGbmfG3u2S4iYOoz879raOCoNhpSHtFhw9A GF7FFrG4U2/bxbg6P+4Y8TnslqgXZG82jp5O2Fu40/R5lYBnHe0ooQ5u/Ebkwg28+4mR6S 7lGWHU8eDsGW2B2Jyaf7zh54B6yUvIrH9O9zxyFGqXy+3Ad+htY8KidiTtpBPfbt5lpf+N f7F8/mKooklCp6slxpOsT3YrTeXNaK9nsDWw8OLEKJeoVj52uwIm7FgUPjwrtsqoTRW16w ok+8mrE0CBt24I6c0DVyE3cxbE9wxny1L6kpaVVpVFOMxLENEpG8h/aHPWL7iQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQ8DP4xNFz6ds for ; Mon, 08 Dec 2025 17:31:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id adcf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 08 Dec 2025 17:31:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Seth Hoffert From: Alexander Ziaee Subject: git: 0140dc4a68ac - main - man typos: Fix pf.conf.5 and jail.2 typos List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 0140dc4a68ac25c70300ed2a418e7ca441638bdb Auto-Submitted: auto-generated Date: Mon, 08 Dec 2025 17:31:44 +0000 Message-Id: <69370b80.adcf.3153f72@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=0140dc4a68ac25c70300ed2a418e7ca441638bdb commit 0140dc4a68ac25c70300ed2a418e7ca441638bdb Author: Seth Hoffert AuthorDate: 2025-12-08 15:53:58 +0000 Commit: Alexander Ziaee CommitDate: 2025-12-08 17:31:06 +0000 man typos: Fix pf.conf.5 and jail.2 typos MFC after: 3 days Signed-off-by: Seth Hoffert Closes: https://github.com/freebsd/freebsd-src/pull/1919 --- lib/libsys/jail.2 | 2 +- share/man/man5/pf.conf.5 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libsys/jail.2 b/lib/libsys/jail.2 index ee4e5b03d38e..4c8530ca7733 100644 --- a/lib/libsys/jail.2 +++ b/lib/libsys/jail.2 @@ -334,7 +334,7 @@ descriptor jail. The system calls .Fn jail_attach_jd and -.Fn jail_aremove_jd +.Fn jail_remove_jd work the same as .Fn jail_attach and diff --git a/share/man/man5/pf.conf.5 b/share/man/man5/pf.conf.5 index c22d983d33e8..33097000310d 100644 --- a/share/man/man5/pf.conf.5 +++ b/share/man/man5/pf.conf.5 @@ -1429,7 +1429,7 @@ translated to 198.51.100.100. .Pp The current implementation will only extract IPv4 addresses from the IPv6 addresses with a prefix length of /96 and greater. -.It Ar binat +.It Ar binat-to A .Ar binat-to rule specifies a bidirectional mapping between an external IP netblock From nobody Mon Dec 8 18:44:57 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQ9rt2BNrz6KByj for ; Mon, 08 Dec 2025 18:45:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQ9rt1nCgz3fsK for ; Mon, 08 Dec 2025 18:45:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765219502; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PGgdXtDSjWpW1H/3PWYYw0I5RJNE5HJ7Tq3Kpn01LRo=; b=InZUVVIZM37VDLNs33elC1ELQta8lLdLin+JgXyZnl91h3jQxLTuANmn9z9DMq95uq9OM0 UeEQDCRy1SbFMx+YgYvw8RvJtVFuGV7PqTkl1GiUss66HYsvUU+z0c55yB1gOB05y3EFBO X0ISd+S5hKrZzDfEPONP2Pl0oQtXf+d4P+C5SHApRNHpqF5yd8kzd0Lh4p/J1dwk5q1ZAU EQ+s8bFUSXCmN5k1ubrOjGSwhJjxXE+4QIPiATsFJyyxPzDLc1EHB9k+QnAZgKJckl2Dyv tUA+D0bNpaaoBOhi4OxI/8vs9Z2nRwgW6jiPv6mew1MNnyzjebSSxGX0r23Z1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765219502; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PGgdXtDSjWpW1H/3PWYYw0I5RJNE5HJ7Tq3Kpn01LRo=; b=wTsXSbRSlL5aD5AK6NK+Pv467zgO8+sBR5BpDIP8SxiUZ5kASlWaGi1aDMQMB9XlYN6jGy f4wrNxH3yq86JUIhYrLFj4zf1pWeRJfh1Nicy/nueYOJRDk1ijat/9gKgg/gZl0kFH8VTQ C2XQ6oNL4SZJgBTXpS+azQiJX8zjPeDYpxKG8hJjxJD8uavD/Qw5QCrDvq/7dKNoZfla8a sdi3Je8lQrspnrrt8Ah38FxZ8mQHPrkzHAq6o2XDmvYN2Du9y6ShD9qurKBEfX7qGWHUmq DcWPtC1eYWfB/qiOhCDATHJBpidcVQS3CundR/gVS4yGT7SCu54jtjWP25EcLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765219502; a=rsa-sha256; cv=none; b=G9tAn1VRgwcu1zfcqGB+0uu6VLxIjHSIhsHWC7A4Xlv2fhz89YPTl53tEOGmXqzfu6Kd0r 1f2fXVKAjhYw9hOf6665HT6w1jarHEjgaXd46pxVOr6YfroyBkZZgRc+pWcJIeTTwSm0Tn Yr7OsD032gyVScb21FIJqGpeKNb2ElyPxoMubNdojrkCTJg/hSb+jSSwkPwdW1gVjhLuQ7 QAmhjs8V/MWr7W/c0VKcH8VO1gl11kWI2URwuTHBVh+ntPDQT/072FZtqIINteJ2Vu8Bfs dCjKCRI4r29hXBJj/N0XYWwlQTKaaJ8QLk41dmVwVgqnP1v4Itgy7tQpeVVcTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQ9rt1Cjhz8lJ for ; Mon, 08 Dec 2025 18:45:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 218e3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 08 Dec 2025 18:44:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 2cfd9fe87b90 - main - locale: make install Unicode 17.0.0/CLDR 48 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2cfd9fe87b90eddb9d0b3df3459d923092c491fb Auto-Submitted: auto-generated Date: Mon, 08 Dec 2025 18:44:57 +0000 Message-Id: <69371ca9.218e3.68beb643@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=2cfd9fe87b90eddb9d0b3df3459d923092c491fb commit 2cfd9fe87b90eddb9d0b3df3459d923092c491fb Author: Jose Luis Duran AuthorDate: 2025-12-08 18:44:21 +0000 Commit: Jose Luis Duran CommitDate: 2025-12-08 18:44:21 +0000 locale: make install Unicode 17.0.0/CLDR 48 Unicode 17.0 adds 4803 characters, for a total of 159,801 characters. The new additions include 4 new scripts: - Sidetic - Tolong Siki - Beria Erfe - Tai Yo https://www.unicode.org/versions/Unicode17.0.0/ --- share/colldef_unicode/Makefile | 2 +- share/colldef_unicode/af_ZA.UTF-8.src | 4545 +- share/colldef_unicode/am_ET.UTF-8.src | 1300 +- share/colldef_unicode/ar_SA.UTF-8.src | 3139 +- share/colldef_unicode/be_BY.UTF-8.src | 1724 +- share/colldef_unicode/ca_AD.UTF-8.src | 4549 +- share/colldef_unicode/cs_CZ.UTF-8.src | 4637 +- share/colldef_unicode/da_DK.UTF-8.src | 4729 +- share/colldef_unicode/el_GR.UTF-8.src | 1252 +- share/colldef_unicode/en_US.UTF-8.src | 4549 +- share/colldef_unicode/es_MX.UTF-8.src | 4553 +- share/colldef_unicode/et_EE.UTF-8.src | 4577 +- share/colldef_unicode/fa_AF.UTF-8.src | 3243 +- share/colldef_unicode/fa_IR.UTF-8.src | 3229 +- share/colldef_unicode/fi_FI.UTF-8.src | 4545 +- share/colldef_unicode/fr_CA.UTF-8.src | 4549 +- share/colldef_unicode/he_IL.UTF-8.src | 720 +- share/colldef_unicode/hi_IN.UTF-8.src | 1060 +- share/colldef_unicode/hu_HU.UTF-8.src | 5669 +- share/colldef_unicode/hy_AM.UTF-8.src | 718 +- share/colldef_unicode/is_IS.UTF-8.src | 4581 +- share/colldef_unicode/ja_JP.UTF-8.src | 17042 ++--- share/colldef_unicode/kk_KZ.UTF-8.src | 1724 +- share/colldef_unicode/ko_KR.UTF-8.src | 40058 ++++++------ share/colldef_unicode/lt_LT.UTF-8.src | 4561 +- share/colldef_unicode/lv_LV.UTF-8.src | 4605 +- share/colldef_unicode/nn_NO.UTF-8.src | 4729 +- share/colldef_unicode/pl_PL.UTF-8.src | 4585 +- share/colldef_unicode/ro_RO.UTF-8.src | 4569 +- share/colldef_unicode/ru_RU.UTF-8.src | 1716 +- share/colldef_unicode/se_NO.UTF-8.src | 4585 +- share/colldef_unicode/sk_SK.UTF-8.src | 4645 +- share/colldef_unicode/sl_SI.UTF-8.src | 4569 +- share/colldef_unicode/sr_RS.UTF-8.src | 1712 +- share/colldef_unicode/sr_RS.UTF-8@latin.src | 4619 +- share/colldef_unicode/sv_SE.UTF-8.src | 4549 +- share/colldef_unicode/tr_TR.UTF-8.src | 4569 +- share/colldef_unicode/uk_UA.UTF-8.src | 1732 +- share/colldef_unicode/zh_CN.UTF-8.src | 86373 ++++++++++++------------- share/colldef_unicode/zh_TW.UTF-8.src | 5208 +- share/ctypedef/C.UTF-8.src | 5771 +- share/monetdef_unicode/Makefile | 8 +- share/monetdef_unicode/af_ZA.UTF-8.src | 68 - share/monetdef_unicode/bg_BG.UTF-8.src | 68 - share/monetdef_unicode/en_ZA.UTF-8.src | 4 +- share/monetdef_unicode/hu_HU.UTF-8.src | 4 +- share/monetdef_unicode/it_CH.UTF-8.src | 2 +- share/numericdef_unicode/Makefile | 2 +- share/numericdef_unicode/it_CH.UTF-8.src | 2 +- tools/tools/locale/etc/final-maps/map.UTF-8 | 9988 +++ tools/tools/locale/etc/final-maps/widths.txt | 61 + 51 files changed, 152537 insertions(+), 137461 deletions(-) diff --git a/share/colldef_unicode/Makefile b/share/colldef_unicode/Makefile index 16fd2fc92e34..0a76b605502e 100644 --- a/share/colldef_unicode/Makefile +++ b/share/colldef_unicode/Makefile @@ -7,7 +7,7 @@ FILESNAME= LC_COLLATE .SUFFIXES: .src .LC_COLLATE MAPLOC= ${.CURDIR}/../../tools/tools/locale/etc/final-maps -CLDR_VERSION= "45.0" +CLDR_VERSION= "48" .include diff --git a/share/colldef_unicode/af_ZA.UTF-8.src b/share/colldef_unicode/af_ZA.UTF-8.src index 0861ec5cf5fa..c3758c2ef890 100644 --- a/share/colldef_unicode/af_ZA.UTF-8.src +++ b/share/colldef_unicode/af_ZA.UTF-8.src @@ -34,7 +34,6 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol collating-symbol collating-symbol collating-symbol @@ -78,438 +77,441 @@ collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol collating-symbol collating-symbol collating-symbol collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol -collating-symbol +collating-symbol collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol collating-symbol +collating-symbol collating-symbol collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol -collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol +collating-symbol order_start forward;forward;forward;forward @@ -539,7 +541,6 @@ order_start forward;forward;forward;forward - @@ -583,438 +584,441 @@ order_start forward;forward;forward;forward - - - + + - *** 317072 LINES SKIPPED *** From nobody Mon Dec 8 21:34:57 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQFd23kpCz6KQKQ for ; Mon, 08 Dec 2025 21: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQFd237tRz49gT for ; Mon, 08 Dec 2025 21: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=1765229702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1c+xMHnXIK9dlfVwULEeHcY0jXXKzpFqn4VF/GzXIJA=; b=ThZ/Aq7wB09gagt41bxlpoVOdW8nG07fQHOeMAom7SiuXBp0nNWaGx96lVUA1kjgAKYAvs wxQ46RBO0GixqNtYF55jnLTNpIYzvUhd+zMyTlYarCFx+O0MVmTSg1YcHPBUHVrNWbBDwC IEFlIj092qket5COXtEm1LrFRnMydbO9v1h38dN0taYF4IyihHd2yuOjYblLP3sd1OOEw4 OupNMfk2cKIuQ/cvpmPTcJbvfndDRU4Jh4mQIC3Kse5C7piAENhOTUq4t1xk0E5mnAjWP5 7m9XEiG7E7kvG1YnRyyjj+nUObNsmGMO5drG+Ch1Nr1nms6FNKY8K8t/l6nfiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765229702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1c+xMHnXIK9dlfVwULEeHcY0jXXKzpFqn4VF/GzXIJA=; b=H3bOGVKvzMUyaYqnY7ttLBKQHDu6Px3WxmG0+sR2/deabM6Ez3FVObzR82ZFyeFwLdL9AZ 0jQfCqg2qsycXCgh5M6Uxla/jMe5C2EBJ8xG1lqersuHdUmox2yM20LEUu/8JFyDGhWhVU a9fa0xe5oqqt4yO9uHHQxNLK10Ek/0lIS3iQ5rcLo+248gUWa5Kfv+RU3I73TYfB0i1tls 8jhmrvIec808mnmSJlVlPoJ8CKgXBBHxfVXFL8wC9KLAKcLYk7+TQuVccBibsyTgnoFMlP pG+s7YyXYfVAJSodMGGndv3VsK26RCd+5qSJ64XogpoHGqXw1IjANu9B0hXgNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765229702; a=rsa-sha256; cv=none; b=quHDW63vnSEDxNb2RUa7EqVpJIKnGMTpFQ07cmE6glJhT39TC4jvnDPFM7CVDLF4rM/yFE MLGhtDg8wBGT4nsjzEN/4aBGE4wm1sUUZl15e6Cifds1iV1IdOg6bfcwWoOJK8U3lWtgXo bmmUNCG476m0YI6KjJ1IJR270YwAadatxnVDlKhgbr+YVbk0Rzld2GX4xcYz6Q1lBDwhqF i+5D8ODTdrKOdiAhiMb5W1mSuwJTSHdPd20lI400sNFOuaBuYBJ9GYDC+gy/xydC9DlKgV w42BvcRm7+7SVF2q9wBJlfGDwxpleGoVp8Ibd29f/ckyq8QaaCDwmioVQ0sHoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQFd22lCgzTdW for ; Mon, 08 Dec 2025 21:35:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33abc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 08 Dec 2025 21:34:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: f63a8c0a0915 - main - bsdinstall: Mount /dev and /packages after using the shell to partition disks List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: f63a8c0a0915a3eceac179d4d18b2c03b1319fa2 Auto-Submitted: auto-generated Date: Mon, 08 Dec 2025 21:34:57 +0000 Message-Id: <69374481.33abc.559cbaeb@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f63a8c0a0915a3eceac179d4d18b2c03b1319fa2 commit f63a8c0a0915a3eceac179d4d18b2c03b1319fa2 Author: John Baldwin AuthorDate: 2025-12-08 21:33:30 +0000 Commit: John Baldwin CommitDate: 2025-12-08 21:33:30 +0000 bsdinstall: Mount /dev and /packages after using the shell to partition disks Normally after partitions are created by the installer, the 'mount' script is used to mount the target disk partitions under /mnt. The tail end of this script also mounts a couple of additional filesystems under /mnt so that chrooted programs can work such as devfs and /packages. When the "Shell" option is used to permit the user to manually mount the destination filesystem, the "mount" script is not used as the user is instructed to mount the target filesystems and construct /mnt/etc/fstab, etc. However, this means that the user is responsible for mounting devfs (which is not included in /etc/fstab) and /packages as well. The help message for the "Shell" option doesn't mention these requirements, so users may not know to do so. This can lead to confusing errors as chrooted commands can fail to find needed /dev entries. For example, running fwget to fetch wireless firmware fails because /dev/pci doesn't exist. To make this less painful for users using this option, split out the bottom half of the 'mount' script that mounts these non-fstab-related filesystems into a separate 'mount_aux' script. Invoke 'mount_aux' after using "Shell" to create the filesystem to ensure that these filesystems are always present. PR: 290901 Reported by: Peter Tested by: Peter Differential Revision: https://reviews.freebsd.org/D53770 --- tools/build/mk/OptionalObsoleteFiles.inc | 1 + usr.sbin/bsdinstall/scripts/Makefile | 1 + usr.sbin/bsdinstall/scripts/auto | 1 + usr.sbin/bsdinstall/scripts/mount | 10 +------- usr.sbin/bsdinstall/scripts/mount_aux | 39 ++++++++++++++++++++++++++++++++ 5 files changed, 43 insertions(+), 9 deletions(-) diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index e0bc47492f7d..0551074f0bce 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -434,6 +434,7 @@ OLD_FILES+=usr/libexec/bsdinstall/jail OLD_FILES+=usr/libexec/bsdinstall/keymap OLD_FILES+=usr/libexec/bsdinstall/mirrorselect OLD_FILES+=usr/libexec/bsdinstall/mount +OLD_FILES+=usr/libexec/bsdinstall/mount_aux OLD_FILES+=usr/libexec/bsdinstall/netconfig OLD_FILES+=usr/libexec/bsdinstall/netconfig_ipv4 OLD_FILES+=usr/libexec/bsdinstall/netconfig_ipv6 diff --git a/usr.sbin/bsdinstall/scripts/Makefile b/usr.sbin/bsdinstall/scripts/Makefile index 4fd59e49d506..92a455d8e9e3 100644 --- a/usr.sbin/bsdinstall/scripts/Makefile +++ b/usr.sbin/bsdinstall/scripts/Makefile @@ -16,6 +16,7 @@ SCRIPTS=auto \ keymap \ mirrorselect \ mount \ + mount_aux \ netconfig \ netconfig_ipv4 \ netconfig_ipv6 \ diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto index 5fefc07e4c07..2204b33ae105 100755 --- a/usr.sbin/bsdinstall/scripts/auto +++ b/usr.sbin/bsdinstall/scripts/auto @@ -405,6 +405,7 @@ case "$PARTMODE" in clear echo "Use this shell to set up partitions for the new system. When finished, mount the system at $BSDINSTALL_CHROOT and place an fstab file for the new system at $PATH_FSTAB. Then type 'exit'. You can also enter the partition editor at any time by entering 'bsdinstall partedit'." sh 2>&1 + bsdinstall mount_aux || error "Failed to mount auxiliary filesystems" ;; "$msg_manual") # Manual if f_isset debugFile; then diff --git a/usr.sbin/bsdinstall/scripts/mount b/usr.sbin/bsdinstall/scripts/mount index fd13e13c6a77..a432ccd5dfe5 100755 --- a/usr.sbin/bsdinstall/scripts/mount +++ b/usr.sbin/bsdinstall/scripts/mount @@ -52,12 +52,4 @@ for i in $FILESYSTEMS; do fi done -# User might want a shell and require devfs, so mount it -mkdir $BSDINSTALL_CHROOT/dev 2>/dev/null -mount -t devfs devfs $BSDINSTALL_CHROOT/dev - -# If installing from the DVD, mount packages where they'll be accessible -if [ -d /packages ]; then - mkdir -p $BSDINSTALL_CHROOT/dist/packages - mount -t nullfs /packages $BSDINSTALL_CHROOT/dist/packages -fi +bsdinstall mount_aux diff --git a/usr.sbin/bsdinstall/scripts/mount_aux b/usr.sbin/bsdinstall/scripts/mount_aux new file mode 100755 index 000000000000..21def9b6e8c0 --- /dev/null +++ b/usr.sbin/bsdinstall/scripts/mount_aux @@ -0,0 +1,39 @@ +#!/bin/sh +#- +# Copyright (c) 2011 Nathan Whitehorn +# 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. +# + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 + +# User might want a shell and require devfs, so mount it +mkdir $BSDINSTALL_CHROOT/dev 2>/dev/null +mount -t devfs devfs $BSDINSTALL_CHROOT/dev + +# If installing from the DVD, mount packages where they'll be accessible +if [ -d /packages ]; then + mkdir -p $BSDINSTALL_CHROOT/dist/packages + mount -t nullfs /packages $BSDINSTALL_CHROOT/dist/packages +fi From nobody Mon Dec 8 22:33:21 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQGwL02Hvz6KV5Y for ; Mon, 08 Dec 2025 22:33:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQGwK6Qxjz3Ktg for ; Mon, 08 Dec 2025 22:33:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765233201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yd0jaUnHAqunefY+2aRd0sEuAqTqk6msRGoUWg9EK4s=; b=spjLrFVDojGECeEQYW49CBZApxrkpToIoRHAt/tO2VHkUfzgP1LaMgW3QZakPmJnR4giZp Eodvo35bKWJdWiLgw+RS3ztiBJOJy5DgxtC3BnU31c6IICaKaNo+1RjrIQs5XjG5+oTSYt 5Wc/imzFH3U60mYlDm10kIAIzYPnR85zB5jYFnAhPZ+9sGM1f4wSktgdLn6YQvpoSTk2F5 N2W8yIh26TW1xe9cd7CijBA+6EdR1TrsK5I3GpNCT3FMI0ESHH9ptNknG0RB5xkL/1NNmL JtsVc9VNUFRhNJY4+OSL+qRTLvKXchtONJZamezsi8dG6n2IE/74O8joyHv+fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765233201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yd0jaUnHAqunefY+2aRd0sEuAqTqk6msRGoUWg9EK4s=; b=noxRWu5AxstkndYcqSDS59wE9m7b1bd8j0l5fKKfEsw5LBp8QoJWPhPPHjnPNGUaYXJPI4 iMw4SHzbeaMI+sJEVvNb9qnoSu22ykTjQMP2GLbB9fIvIhngAP3klyeerVrsviqZd6QwsG qteYWtJCDKyRqvIqABpujlT7cNKp5WH7TWIXc7AU7ggYXImhVOZApkQfMPMNmjtWtyjE22 EbHvijzbPR0vq9cKYNUoUP5tAKGmTNck6srTOLl0QQ7c4R9XkxWH2dB/3VzUbdowkircrL QH+gBD2fs/xdTNEG/PC6vwly/Dd2TPum/4EFWnj8yA0qhHbTywRNxI3wO0rCqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765233201; a=rsa-sha256; cv=none; b=PDo99oEWZO9xatm6u9oeyM1pApLpKuXvHsx7Kz82T+mg76YZslRlThqHiS6VyLI3o6NoSG ajAhhPoJsAFfQ23KXO74b7sSuohM5UhunqhuFDhCBB4GFjBy90gEhISeNbBNkbQ8s2BBOg ev2uGj8pLyLMCxCrpK7WdPk6y/arTN7XlHKO3yrflyj5MEHxI8bvuSn2hOndYdKXvxb1dX EKu7QaPIemh+DVeeSAmZ1fEY2Q2fRh6bX+7DmIwTPJFUez1oaiVC/JL/roQ+o3TuKZ01fb QhJoWu02AmQh9uwEXzH+Dsl8hdqIV8MZtfL6yhSqhgeCHiWMR7F901335v2TIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQGwK5zz0zXX5 for ; Mon, 08 Dec 2025 22:33:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39dcb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 08 Dec 2025 22:33:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: cff67bc43df1 - main - vm_fault: only rely on PG_ZERO when the page was newly allocated List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: cff67bc43df14d492ccc08ec92fddceadd069953 Auto-Submitted: auto-generated Date: Mon, 08 Dec 2025 22:33:21 +0000 Message-Id: <69375231.39dcb.1c4fcec@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=cff67bc43df14d492ccc08ec92fddceadd069953 commit cff67bc43df14d492ccc08ec92fddceadd069953 Author: Konstantin Belousov AuthorDate: 2025-11-28 15:57:22 +0000 Commit: Konstantin Belousov CommitDate: 2025-12-08 22:30:15 +0000 vm_fault: only rely on PG_ZERO when the page was newly allocated If the fs->m page was found invalid on the object queue, PG_ZERO flag is stale. Track the source of the page in the new fault state variable m_needs_zero, and ignore PG_ZERO if the page did not came from the allocator. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53963 --- sys/vm/vm_fault.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 3bf16778d987..f7318f96f709 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -138,6 +138,7 @@ struct faultstate { vm_object_t object; vm_pindex_t pindex; vm_page_t m; + bool m_needs_zeroing; /* Top-level map object. */ vm_object_t first_object; @@ -273,6 +274,7 @@ static void vm_fault_deallocate(struct faultstate *fs) { + fs->m_needs_zeroing = true; vm_fault_page_release(&fs->m_cow); vm_fault_page_release(&fs->m); vm_object_pip_wakeup(fs->object); @@ -1219,7 +1221,7 @@ vm_fault_zerofill(struct faultstate *fs) /* * Zero the page if necessary and mark it valid. */ - if ((fs->m->flags & PG_ZERO) == 0) { + if (fs->m_needs_zeroing) { pmap_zero_page(fs->m); } else { #ifdef INVARIANTS @@ -1352,6 +1354,7 @@ vm_fault_allocate(struct faultstate *fs, struct pctrie_iter *pages) vm_waitpfault(dset, vm_pfault_oom_wait * hz); return (FAULT_RESTART); } + fs->m_needs_zeroing = (fs->m->flags & PG_ZERO) == 0; fs->oom_started = false; return (FAULT_CONTINUE); @@ -1686,6 +1689,7 @@ vm_fault(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, fs.fault_flags = fault_flags; fs.map = map; fs.lookup_still_valid = false; + fs.m_needs_zeroing = true; fs.oom_started = false; fs.nera = -1; fs.can_read_lock = true; From nobody Mon Dec 8 22:33:20 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQGwQ0CNqz6KTg9 for ; Mon, 08 Dec 2025 22: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQGwP6MCRz3KvV for ; Mon, 08 Dec 2025 22: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=1765233205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8dkTzBEOlR9sB7CQJIDsZ6WU4xIPkurUnogTI/evlW8=; b=PTVawcdgnA7aL53nZqKGDzoRYwQucidF5ZZOB5cfJRo8YEJnG1C/uk3Zwrd9WZZ7aRCKcT /29+Hx117LG7BZqAX5TvvWNrowpMqo5KasPXHXRFMKggLGKwrKTeHNBQIwrikHpzmEuHOJ qa5yQTLcHMVkZr63qvsmXiCjA23lALR+qH0TdmndmmRm1QqUCINIcjsp49w6vojtaOHW3U zdDDE2sX0SgvvkQT8CxmuSMNtesEoAX9iIU50YN2XKOYZ8hvl2ldOKcCAOqY1P+m2WL6Rj Ypsd4dgoqn6ckTvJHE8BiVECAHvpi/5zvCNrlWz05+ioMQowyT/wxpiLXaS4AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765233205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8dkTzBEOlR9sB7CQJIDsZ6WU4xIPkurUnogTI/evlW8=; b=brTzooHHX7g4ZFGmH3cVUw6s2B6eDirUI+FvFb0hqewsTmLLTan4NmNFZU3hb7+RgF1xBE M37RMDRcgljpUXc7AOJ+LHD2lYAAc/vSq1kRK02/k/tNpsMeJiWiE3yjA7kmP4nRWIqu0Q DIpn8cTYh612oLYSTQ5lBi4iELHE/sMDQv9//+AecEzFSF9nkhD2hmYIQgouF3sfFZLhJI frVsPewYytepplSYk2GnqRC/OpcxlDSs6eLFz2RqQWMTQsU6XaVhvMcxDUHo76DRA/YtnY lJYx/lA/Ivdh1MIonMvzUyzHRMxc2EQ8pwN5PC3anplu1q1awt897VGZMjTeug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765233205; a=rsa-sha256; cv=none; b=ZN8GQM7xWUOvOceFG75yh3cBMl2L+LZCCyeWLQtWUTqrgyqLRrjm3kEY4C7FNoBypLjs3z NuoI7LlxJteLDuV3aqa/VIFtfTsFXEMJuVbeHSIv3gW4p5cFfDpm+r+KkJbQuvfAFrQULw ILuxYQz1S+CfgJNjYNbhgO5ECi6NHmYDbSJDY8iPl8fRmJcBIF8I4Mmqu5+vVDPMZJxL+d 4WX/o5Cb/brkMLBJYSUqmmupe3boG31UZeaHIgtlSzbAu5C7kDgW44pEx0QHO8wB1NZ4ER ikRO6NO3NJkHnDB4bVQvNqJXhhZldYT+cqoXuWVinZLjnrIO6+zAHdMnBxgV4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQGwP5Q8yzXhw for ; Mon, 08 Dec 2025 22:33:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a71a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 08 Dec 2025 22:33:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 636ee0269db0 - main - vm_page.h: remove no longer defined (P) locking annotation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 636ee0269db04ce22a0f5e32723bab79be69443d Auto-Submitted: auto-generated Date: Mon, 08 Dec 2025 22:33:20 +0000 Message-Id: <69375230.3a71a.1abcbe1e@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=636ee0269db04ce22a0f5e32723bab79be69443d commit 636ee0269db04ce22a0f5e32723bab79be69443d Author: Konstantin Belousov AuthorDate: 2025-11-27 20:39:45 +0000 Commit: Konstantin Belousov CommitDate: 2025-12-08 22:30:10 +0000 vm_page.h: remove no longer defined (P) locking annotation Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53963 --- sys/vm/vm_page.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index 8f2d5aee3cd4..0a143544e907 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -230,7 +230,7 @@ struct vm_page { } uma; } plinks; vm_object_t object; /* which object am I in (O) */ - vm_pindex_t pindex; /* offset into object (O,P) */ + vm_pindex_t pindex; /* offset into object (O) */ vm_paddr_t phys_addr; /* physical address of page (C) */ struct md_page md; /* machine dependent stuff */ u_int ref_count; /* page references (A) */ @@ -238,7 +238,7 @@ struct vm_page { union vm_page_astate a; /* state accessed atomically (A) */ uint8_t order; /* index of the buddy queue (F) */ uint8_t pool; /* vm_phys freepool index (F) */ - uint8_t flags; /* page PG_* flags (P) */ + uint8_t flags; /* page PG_* flags */ uint8_t oflags; /* page VPO_* flags (O) */ int8_t psind; /* pagesizes[] index (O) */ int8_t segind; /* vm_phys segment index (C) */ From nobody Tue Dec 9 00:21:03 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQKJb6YMkz6Jcbd for ; Tue, 09 Dec 2025 00:21:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQKJb5Htjz3Vtc for ; Tue, 09 Dec 2025 00:21:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765239663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/2ZBQSmVZZnngGeDKLIx56TCYNtnDqUgxPH01wQtNcw=; b=L6RocsAjnpilYtPZQGKxVqzMqPV7yqXH5uBDeYZXHYT4wM1ArRoBF51SmDDVW0EwIeUzxd MdFzR83f0mTKtDssJ6H2kpA9NsA3jJjQgnigSV+CXmznk/rn4BZE5O1DxwSj7U5sqvuBNg YkcUlaa1L7U7EK5lD54b4PiyaMR0+QAxSTS3plsiUfZAheNrDtZgS4iXzSZfhldQPuUYWC 7e67iR0jhRP2M/OdAk+/jx8TTli1S+gH8MtBedQ4Dk6QqLSK27huT5pLaW07uWXI8VQU3r KG1T66usEBtYBqeZERHjGIkfhuL+jwruiNNxpkUbxt9N4heOuorWrsNJmYNI4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765239663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/2ZBQSmVZZnngGeDKLIx56TCYNtnDqUgxPH01wQtNcw=; b=VMM/3HoMSVqOsxqJGAH+7YlfGsHsij1PsfOkj+2t5E1Dsqah5jCcgzWGBGmtekwk5mSQeD ohFE3Wx7jp9GPYB/ChVYrKs1/xNdc4qLBiIrtWqWBChvOSNw0nB+w+3Ze99gykGsisQrZ5 +ePxKOamc3LNedqKPqCZsJhK6f5qFhDXZShjVjMw8yc2U6+W4wDhGBSLNh5A/kynuQCIPD ECoQzIfMjxz8hFaP15ipG6NAEqKrNMEpXJTnZJMzXx+JthtZnwNHpOtyTiTHLx0m60nLqv m6WkcKbTLaxTg/8sGPMbOgqgLKO/LUkeamcwvpbQv3PfnjvI9tPekNIDGb2ReA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765239663; a=rsa-sha256; cv=none; b=L/HE22MfSVROsvDp1MvRBWfIZBt3nFxr8hwEtJdpu4WAJIz9Mf9CJ4D2EaeL/iP01oNEvI tt6DIog6f+tV3Qk5RSrX2Dx9yAhMueVzr90WQ4mWtdtEZe4NjKRf3GcgjSUjZVYTc7Hb/2 Hoh+id//U0aEAbbRZ5xdAnUxNLzX7INZtYYUn1gF/xh7+gvz5ltgJKhgN6rtvFTdWZR8SF u0Hr6rSSs0Qs7EP2nuLKpTBp6/JvDFoxg04I5odbtQO79ni0LtkylEDKIcc/kZdiblOB5r u5HGeAIi006EIZtUiYDfi4QfgLDG8D+G0lDq/HxcJ/opyQaghhyLteI0gDDBsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQKJb4s4lzb9N for ; Tue, 09 Dec 2025 00:21:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id cea3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 00:21:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: a98e5d785001 - main - libc/string: add strdupa(3) and strndupa(3) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: a98e5d78500193dc7aa352e1f60ac2c6529e2c38 Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 00:21:03 +0000 Message-Id: <69376b6f.cea3.4e475826@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a98e5d78500193dc7aa352e1f60ac2c6529e2c38 commit a98e5d78500193dc7aa352e1f60ac2c6529e2c38 Author: Konstantin Belousov AuthorDate: 2025-12-03 23:56:26 +0000 Commit: Konstantin Belousov CommitDate: 2025-12-08 22:34:57 +0000 libc/string: add strdupa(3) and strndupa(3) Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D54066 --- include/string.h | 28 ++++++++++++++++++++++++++++ lib/libc/string/Makefile.inc | 4 +++- lib/libc/string/strdup.3 | 34 +++++++++++++++++++++++++++++++++- 3 files changed, 64 insertions(+), 2 deletions(-) diff --git a/include/string.h b/include/string.h index a3fa96ebb449..e9aa1b55281a 100644 --- a/include/string.h +++ b/include/string.h @@ -154,6 +154,34 @@ void swab(const void * __restrict, void * __restrict, ssize_t); int timingsafe_bcmp(const void *, const void *, size_t); int timingsafe_memcmp(const void *, const void *, size_t); + +#if __has_builtin(__builtin_alloca) +#define strdupa(_Str) (__extension__({ \ + const char *_Str1; \ + size_t _Len; \ + char *_Copy; \ + \ + _Str1 = (_Str); \ + _Len = strlen(_Str1) + 1; \ + _Copy = (char *)__builtin_alloca(_Len); \ + memcpy(_Copy, _Str1, _Len); \ + _Copy; \ +})) + +#define strndupa(_Str, _Maxlen) (__extension__({ \ + const char *_Str1; \ + char *_Copy; \ + size_t _Len; \ + \ + _Str1 = (_Str); \ + _Len = strnlen((_Str1), (_Maxlen)); \ + _Copy = __builtin_alloca(_Len + 1); \ + (void)memcpy(_Copy, _Str1, _Len); \ + _Copy[_Len] = '\0'; \ + _Copy; \ +})) +#endif + #endif /* __BSD_VISIBLE */ #if __POSIX_VISIBLE >= 200112 || defined(_XLOCALE_H_) diff --git a/lib/libc/string/Makefile.inc b/lib/libc/string/Makefile.inc index 13cff22b9a32..dfe4b4b55bec 100644 --- a/lib/libc/string/Makefile.inc +++ b/lib/libc/string/Makefile.inc @@ -174,7 +174,9 @@ MLINKS+=strcoll.3 strcoll_l.3 MLINKS+=strcpy.3 stpcpy.3 \ strcpy.3 stpncpy.3 \ strcpy.3 strncpy.3 -MLINKS+=strdup.3 strndup.3 +MLINKS+=strdup.3 strndup.3 \ + strdup.3 strdupa.3 \ + strdup.3 strndupa.3 MLINKS+=strerror.3 perror.3 \ strerror.3 strerror_l.3 \ strerror.3 strerror_r.3 \ diff --git a/lib/libc/string/strdup.3 b/lib/libc/string/strdup.3 index 576fa122b8d6..5968289f5002 100644 --- a/lib/libc/string/strdup.3 +++ b/lib/libc/string/strdup.3 @@ -30,7 +30,9 @@ .Os .Sh NAME .Nm strdup , -.Nm strndup +.Nm strdupa , +.Nm strndup , +.Nm strndupa .Nd save a copy of a string .Sh LIBRARY .Lb libc @@ -39,7 +41,11 @@ .Ft char * .Fn strdup "const char *str" .Ft char * +.Fn strdupa "const char *str" +.Ft char * .Fn strndup "const char *str" "size_t len" +.Ft char * +.Fn strndupa "const char *str" "size_t len" .Sh DESCRIPTION The .Fn strdup @@ -63,6 +69,19 @@ characters from the string always .Dv NUL terminating the copied string. +.Pp +The +.Fn strdupa +function is identical to +.Fn strdup +but allocates the memory with +.Xr alloca 3 . +Similarly, the +.Fn strndupa +function is identical to +.Fn strndup , +but allocates the memory with +.Xr alloca 3 . .Sh RETURN VALUES If insufficient memory is available, NULL is returned and .Va errno @@ -72,6 +91,7 @@ Otherwise, the .Fn strdup family of functions return a pointer to the copied string. .Sh SEE ALSO +.Xr alloca 3 , .Xr free 3 , .Xr malloc 3 , .Xr wcsdup 3 @@ -84,6 +104,12 @@ The .Fn strndup function is specified by .St -p1003.1-2008 . +The +.Fn strdupa +and +.Fn strndupa +functions are extensions, +taken from glibc. .Sh HISTORY The .Fn strdup @@ -93,3 +119,9 @@ The .Fn strndup function was added in .Fx 7.2 . +The +.Fn strdupa +and +.Fn strndupa +functions were added in +.Fx 15.1 . From nobody Tue Dec 9 00:21:04 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQKJd0g0Yz6Jcbg for ; Tue, 09 Dec 2025 00:21:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQKJc6596z3Vtg for ; Tue, 09 Dec 2025 00:21:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765239664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jRbToryEYhLJGWib1Z/t9ztM/YikyxNJG5r2EmrrCSw=; b=YmxJtYUv8SQEBkAGDvPdy3dFOPMCs+jzvQetlc3uRJ3Ir1KwblwakSEARm9anEJowygMWr 37W5VEB7VGg+caWyAPiofsvo6y7pHzeH0vW8Eat44g2yHgKqYCxt8Afi8kGsGpQYBbbp4R 6/HRSC4zVCeqCbtgnGfx25XzslSUejJPMlZv5ofBprkUgh2TzasPoJkKI7JcYunneqrMSg TCJs825c82ku5ZFWbhjMGxvGgWHOuaQC5IEKZ9FD2ROwoufITW9AAB7X2DVse/1bMZfIpM 1v80GtbhNm1bRN3dyAtazNSttYZ0zcXlOJg+d7nVzPEea3ilgAGHwIw3JMK57g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765239664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jRbToryEYhLJGWib1Z/t9ztM/YikyxNJG5r2EmrrCSw=; b=Jep6uDRhcz7fbiwGu8kZiOnXlI7SqNt4gw/rUyPYCk9BBcWDCkkXFmKM2v3YJBJDipdaz7 qPLu8V/bcDa8rCvHQZsCEEmMIE58+Hxu7QPM4B6aM5ydrrpr+rsmjSVgegFEwmPBHN5xKH K3Wi6e/Zymz71Ruj2iprzXisJ2cKLjZ34dkfL/aff49cI5NOhqesUWUdszA4LFkF1W+qs2 UKIvm7WPRqm3rIrdvqIasDQWcB+JOppgtfqaQsAZvYnfkNk/BTy3cbSaZuM007A9CXyyec MKW/wU9BvSbiaXt5OhwMgFY0OmBQgBh7zcBAiCC7l9/n78h6ccN33j03hR+DyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765239664; a=rsa-sha256; cv=none; b=qDcYbGX8WGLJJ3Da2RhmZcCyyaVTDjQEzARMAniduslTMVDTEgPnag5nhpm6hNIhjpkhdk aVHZQB0QqE7ZfTPDnNcO7LyKwrYaGO55O5jqy2vwNc8hYpVZSvKQhAzOTS9yVSgETc58Lz PamHTft7XBYSOxRwmFOiSD8Wa7F9M+jeTzOV6VmyuOxqyHnLCoMv8uMoQDY4yZGngGihJS By+6B4e27z7tm+YrKakjHQesTRzf3wr+NOPvrbM7KXrRWYUJfNmT2dB2k/uHvuEB3KMiF0 tSXVm9cePCqR086/dflvYTmyZznVXzj/3qxA27aBYs9CvzvvyalLfy/cKITYNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQKJc5h2nzbqT for ; Tue, 09 Dec 2025 00:21:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ce4e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 00:21:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 6a75e3951506 - main - ofed/libibverbs: remove strdupa() hack from config.h List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 6a75e3951506c12b42428a47710d07cadcdd723e Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 00:21:04 +0000 Message-Id: <69376b70.ce4e.303fa65b@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6a75e3951506c12b42428a47710d07cadcdd723e commit 6a75e3951506c12b42428a47710d07cadcdd723e Author: Konstantin Belousov AuthorDate: 2025-12-08 22:38:48 +0000 Commit: Konstantin Belousov CommitDate: 2025-12-09 00:20:42 +0000 ofed/libibverbs: remove strdupa() hack from config.h It is now provided by regular string.h. While there, remove stale $FreeBSD$ svn tag, and add include guards. Sponsored by: NVidia networking MFC after: 1 week --- contrib/ofed/libibverbs/config.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/ofed/libibverbs/config.h b/contrib/ofed/libibverbs/config.h index 88722ee1cde1..ee0ff8fb020e 100644 --- a/contrib/ofed/libibverbs/config.h +++ b/contrib/ofed/libibverbs/config.h @@ -1,6 +1,5 @@ -/* $FreeBSD$ */ - -#include "alloca.h" +#ifndef _OFED_IBVERBS_CONFIG_H_ +#define _OFED_IBVERBS_CONFIG_H_ #define memalign(align, size) ({ \ void *__ptr; \ @@ -39,3 +38,4 @@ #define MADV_DOFORK MADV_NORMAL #define SWITCH_FALLTHROUGH (void)0 +#endif /* _OFED_IBVERBS_CONFIG_H_ */ From nobody Tue Dec 9 00:21:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQKJg0cQSz6JcXf for ; Tue, 09 Dec 2025 00:21:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQKJf1d0wz3Vtm for ; Tue, 09 Dec 2025 00:21:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765239666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ZT/0tvL8wahaORZrXbtTPghA05vUg8z1HLOapQlHTA=; b=yFVR3APHXuXLWYs/bgHUCBad0QJi8feVI4DyPt9pYIZOIiArqvNomEr57rl16t1TfvKa3i BMF7SIXzZPDdpjWJzIL9elPNLevkCNyC6erKgN5W6d22M/xu8kNz//hvtQhMkfZ8pGwhEW k6kY+5s5plpTX4O71Jz0Qyt0/OqX2VBd7LsZPAA/CPqlw9JCI6AXk6BtDFB7xySg7RQ9Jb EBkmOgFV73ZGGfzpt7wZQB0PYjWZw/XMVVhU1ym8gaHp41xiPNcdEtODEmi5ACywciqNmW S4ndC70GQrZzvS1181TEywl4uSP/fHf7dO6IZM6ZogENIT8eqbPicuiOYBAKVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765239666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ZT/0tvL8wahaORZrXbtTPghA05vUg8z1HLOapQlHTA=; b=RO0LIBv8+PT1j9SnSmHK7s25I4xeci/uGGtsBDY2rOu9qOUv75kBkcIYgwMTmgT54KI1v4 RyG76d6y+PVKp0gIqKC8oDA49Z1QniOnm9HVlfkZG7EyHZAk/zfcZ584D497PrE4BvJstu 5fGF5fRUG0f9Lwce/ASj9bZCxXsmwxcimz0W0Xjdb7ecueixtnVSaSfL6yuZZj8dNWcFfz UszffEX4KFRRj0sHcw9VAQlmw0NU8Klu43i5aXpaB7tXYY5Bm/9icXiQ9MKhqhlRTaK0Kl CxPo3qmxCnxSzW4DSMPq4yHZDokNibU+/Tms1uLJKUGZHRfRB7pszEg561Q7kQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765239666; a=rsa-sha256; cv=none; b=optVt0ztQLOkyXhU990ZwEQHOXYsf0XhR7btCJECvBmqzOjtY87NlUB1ybgiclx7IF+vFt ug9t6663AF3mJndhDdDVsj51SzV2AZIcziRMG3H33zoBiiIPpyz27yYuUBRg0mDubfdvqq 7H8DLlgktUqN3+VMV6BiQWen8NCkFxNfFDgQIDE9cEo/5B80YdS0RNTQWhZskZSoGjQemq KuC74m3mX0N6WMdcKjM99M2LoOFdKbggZXIn37wbwWYHWfJAQY0yyZtlgW91qwo3Bb5TRO fiFvrgiRgyQSHqQh93RAKAWFaRwlpmIpQiaEq68WojeTvTBIALZ2zjj6CUCOWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQKJd6Brdzb9P for ; Tue, 09 Dec 2025 00:21:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ce52 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 00:21:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 70edd3c126a5 - main - ofed/libibverbs: remove no longer needed local alloca.h List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 70edd3c126a591dec129958d3e103521de84746d Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 00:21:05 +0000 Message-Id: <69376b71.ce52.5a82609@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=70edd3c126a591dec129958d3e103521de84746d commit 70edd3c126a591dec129958d3e103521de84746d Author: Konstantin Belousov AuthorDate: 2025-12-08 23:10:07 +0000 Commit: Konstantin Belousov CommitDate: 2025-12-09 00:20:48 +0000 ofed/libibverbs: remove no longer needed local alloca.h Sponsored by: NVidia networking MFC after: 1 week --- contrib/ofed/libibverbs/alloca.h | 18 ------------------ contrib/ofed/libibverbs/cmd.c | 1 - contrib/ofed/libibverbs/compat-1_0.c | 1 - contrib/ofed/libibverbs/device.c | 1 - 4 files changed, 21 deletions(-) diff --git a/contrib/ofed/libibverbs/alloca.h b/contrib/ofed/libibverbs/alloca.h deleted file mode 100644 index b0311c066275..000000000000 --- a/contrib/ofed/libibverbs/alloca.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef _LIBIBVERBS_ALLOCA_H_ -#define _LIBIBVERBS_ALLOCA_H_ -#include -#include -#include - -#define strdupa(_s) \ -({ \ - char *_d; \ - int _len; \ - \ - _len = strlen(_s) + 1; \ - _d = alloca(_len); \ - if (_d) \ - memcpy(_d, _s, _len); \ - _d; \ -}) -#endif /* _LIBIBVERBS_ALLOCA_H_ */ diff --git a/contrib/ofed/libibverbs/cmd.c b/contrib/ofed/libibverbs/cmd.c index df6af3933e36..af2ff7f21f64 100644 --- a/contrib/ofed/libibverbs/cmd.c +++ b/contrib/ofed/libibverbs/cmd.c @@ -38,7 +38,6 @@ #include #include #include -#include #include #include "ibverbs.h" diff --git a/contrib/ofed/libibverbs/compat-1_0.c b/contrib/ofed/libibverbs/compat-1_0.c index d63bd55cc09d..73170756ef65 100644 --- a/contrib/ofed/libibverbs/compat-1_0.c +++ b/contrib/ofed/libibverbs/compat-1_0.c @@ -36,7 +36,6 @@ #include #include #include -#include #include "ibverbs.h" diff --git a/contrib/ofed/libibverbs/device.c b/contrib/ofed/libibverbs/device.c index 6ea7fc241ed8..c840be7cb140 100644 --- a/contrib/ofed/libibverbs/device.c +++ b/contrib/ofed/libibverbs/device.c @@ -40,7 +40,6 @@ #include #include #include -#include #include #include "ibverbs.h" From nobody Tue Dec 9 00:21:02 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQKJh0ctyz6JcTL for ; Tue, 09 Dec 2025 00:21:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQKJg4x7Zz3WHv for ; Tue, 09 Dec 2025 00:21:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765239667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PdK3WauxDLo47W1s/rxBNqElYgJKH/gmkWYX/ozeit4=; b=UbdJBqT15NbSJKkbjXT8FB3Nq0BraOHMms7r86zudU+K7nlqoYPIaiPuCrROQA3noPATm6 eF6sog4AFROb08aDn62LEOoGqfylY3gLHRqBmzgpBfNzBCb4rzhC/nZu2HnYCvjn02MUdn 1972zanjYPdgIAHQKs/ySiKitRzhXOPG/tslIHzFQBt3vEPX3+TICQ2smVV7e8fgDL4Uka x0ktDvRkYrzl58gl2JI7QnCCxGJOOihICLC/k73axrDhz/NJKrO5kOtItmm1ZpJScgfmis iJyedk+UaCYIU2rkqG8L7JAiSJ7cq7FfTA7w3Y656J+myKqu8lLJh379KaWumA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765239667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PdK3WauxDLo47W1s/rxBNqElYgJKH/gmkWYX/ozeit4=; b=bJ1v9x3Xz3pSRxhvE8ELydCB1bAIqxezVxIdV5x/S3wRVssjUlHxepaqnCqLkwqGEUP1xq f6fUJq44N4wV1eaOtphRg3OiZiF7e3/dW+VF94hc/PqpaSstBQmmtSMBM4gzePKpKJnwV5 rE2yf6Jx5rV+lcRljRljL8rBjQIAvbDoZucTy5L0SLom1Qd7sIa/seTWmPfxc6h0f04FW7 gy4I0vpO0/sDTnHk+Tjmo53jEj3lsb1yPj0/SfjFfpEXYw0ztJc3sbOdV2QNiVtUqMQofD dv5gGmEAnY2dAghVRqsUA9RKdgV8jzU1t6+sOJGYnNEZ8sHihLlGWGb/eY9zgg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765239667; a=rsa-sha256; cv=none; b=n2s/4v5NtQR0KESwaQIRoC6Y9LvRwjlIJszFuLIMYrkTgaiVv8mqTfDd+syPQsI5R8E6cG +0kerPMhLEu/6jdv6pDKC6AsYEM4LkHf5+G3x37oPj9p8/vs16AmIzH9T3TlsCiPzCBDtB uLK0Ep/0agZhuv+HMv0+UV0NnDp5+hcaQ7BCQ4dsXDAxz9IJ9q9FXJLN5I/hfZN4VmQMSA +2wypWpVOXj0ZElh7CbtkASuJ3snOh+LVRtlSPPnYiHjnBTURszICxIdZ4EXbMDwOHOSfE vI4vgF/PyWvRg9zcMPTBQFFxg6E78DGi7lHWMY7p0gWxnWh6vjXbd21JRmuI9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQKJg45k4zb9Q for ; Tue, 09 Dec 2025 00:21:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d292 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 00:21:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 98b7cca0186d - main - libc/string: put source files list one item per line List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 98b7cca0186dddfc775582a32b39052d05840858 Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 00:21:02 +0000 Message-Id: <69376b6e.d292.73e0f1b1@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=98b7cca0186dddfc775582a32b39052d05840858 commit 98b7cca0186dddfc775582a32b39052d05840858 Author: Konstantin Belousov AuthorDate: 2025-12-03 23:51:15 +0000 Commit: Konstantin Belousov CommitDate: 2025-12-08 22:34:57 +0000 libc/string: put source files list one item per line Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D54066 --- lib/libc/string/Makefile.inc | 144 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 121 insertions(+), 23 deletions(-) diff --git a/lib/libc/string/Makefile.inc b/lib/libc/string/Makefile.inc index 5d4a9a6e3eed..13cff22b9a32 100644 --- a/lib/libc/string/Makefile.inc +++ b/lib/libc/string/Makefile.inc @@ -7,26 +7,93 @@ CFLAGS+= -I${LIBC_SRCTOP}/locale # machine-independent string sources -MISRCS+=bcmp.c bcopy.c bzero.c explicit_bzero.c \ - ffs.c ffsl.c ffsll.c fls.c flsl.c flsll.c \ - memccpy.c memchr.c memrchr.c memcmp.c \ - memcpy.c memmem.c memmove.c mempcpy.c memset.c memset_s.c \ +MISRCS+=bcmp.c \ + bcopy.c \ + bzero.c \ + explicit_bzero.c \ + ffs.c \ + ffsl.c \ + ffsll.c \ + fls.c \ + flsl.c \ + flsll.c \ + memccpy.c \ + memchr.c \ + memrchr.c \ + memcmp.c \ + memcpy.c \ + memmem.c \ + memmove.c \ + mempcpy.c \ + memset.c \ + memset_s.c \ memset_explicit.c \ - stpcpy.c stpncpy.c strcasecmp.c \ - strcat.c strcasestr.c strchr.c strchrnul.c strcmp.c strcoll.c strcpy.c\ - strcspn.c strdup.c strerror.c strlcat.c strlcpy.c strlen.c strmode.c \ - strncat.c strncmp.c strncpy.c strndup.c strnlen.c strnstr.c \ - strpbrk.c strrchr.c strsep.c strsignal.c strspn.c strstr.c strtok.c \ - strverscmp.c strxfrm.c swab.c \ + stpcpy.c \ + stpncpy.c \ + strcasecmp.c \ + strcat.c \ + strcasestr.c \ + strchr.c \ + strchrnul.c \ + strcmp.c \ + strcoll.c \ + strcpy.c\ + strcspn.c \ + strdup.c \ + strerror.c \ + strlcat.c \ + strlcpy.c \ + strlen.c \ + strmode.c \ + strncat.c \ + strncmp.c \ + strncpy.c \ + strndup.c \ + strnlen.c \ + strnstr.c \ + strpbrk.c \ + strrchr.c \ + strsep.c \ + strsignal.c \ + strspn.c \ + strstr.c \ + strtok.c \ + strverscmp.c \ + strxfrm.c \ + swab.c \ timingsafe_bcmp.c \ timingsafe_memcmp.c \ - wcpcpy.c wcpncpy.c wcscasecmp.c wcscat.c \ - wcschr.c wcscmp.c wcscoll.c wcscpy.c wcscspn.c wcsdup.c \ - wcslcat.c wcslcpy.c wcslen.c wcsncasecmp.c wcsncat.c wcsncmp.c \ - wcsncpy.c wcsnlen.c wcspbrk.c \ - wcsrchr.c wcsspn.c wcsstr.c wcstok.c wcswidth.c wcsxfrm.c wmemchr.c \ + wcpcpy.c \ + wcpncpy.c \ + wcscasecmp.c \ + wcscat.c \ + wcschr.c \ + wcscmp.c \ + wcscoll.c \ + wcscpy.c \ + wcscspn.c \ + wcsdup.c \ + wcslcat.c \ + wcslcpy.c \ + wcslen.c \ + wcsncasecmp.c \ + wcsncat.c \ + wcsncmp.c \ + wcsncpy.c \ + wcsnlen.c \ + wcspbrk.c \ + wcsrchr.c \ + wcsspn.c \ + wcsstr.c \ + wcstok.c \ + wcswidth.c \ + wcsxfrm.c \ + wmemchr.c \ wmemcmp.c \ - wmemcpy.c wmemmove.c wmempcpy.c wmemset.c + wmemcpy.c \ + wmemmove.c \ + wmempcpy.c \ + wmemset.c SYM_MAPS+= ${LIBC_SRCTOP}/string/Symbol.map @@ -45,14 +112,45 @@ CFLAGS.memchr.c+= -fno-sanitize=address .sinclude "${LIBC_SRCTOP}/${LIBC_ARCH}/string/Makefile.inc" .endif -MAN+= bcmp.3 bcopy.3 bstring.3 bzero.3 ffs.3 index.3 memccpy.3 memchr.3 \ - memcmp.3 memcpy.3 memmem.3 memmove.3 memset.3 strcasecmp.3 strcat.3 \ - strchr.3 strcmp.3 strcoll.3 strcpy.3 strdup.3 strerror.3 \ - string.3 strlcpy.3 strlen.3 strmode.3 strpbrk.3 strsep.3 \ - strspn.3 strstr.3 strtok.3 strverscmp.3 strxfrm.3 swab.3 \ +MAN+= bcmp.3 \ + bcopy.3 \ + bstring.3 \ + bzero.3 \ + ffs.3 \ + index.3 \ + memccpy.3 \ + memchr.3 \ + memcmp.3 \ + memcpy.3 \ + memmem.3 \ + memmove.3 \ + memset.3 \ + strcasecmp.3 \ + strcat.3 \ + strchr.3 \ + strcmp.3 \ + strcoll.3 \ + strcpy.3 \ + strdup.3 \ + strerror.3 \ + string.3 \ + strlcpy.3 \ + strlen.3 \ + strmode.3 \ + strpbrk.3 \ + strsep.3 \ + strspn.3 \ + strstr.3 \ + strtok.3 \ + strverscmp.3 \ + strxfrm.3 \ + swab.3 \ timingsafe_bcmp.3 \ - wcscoll.3 wcstok.3 \ - wcswidth.3 wcsxfrm.3 wmemchr.3 + wcscoll.3 \ + wcstok.3 \ + wcswidth.3 \ + wcsxfrm.3 \ + wmemchr.3 MLINKS+=bzero.3 explicit_bzero.3 MLINKS+=ffs.3 ffsl.3 \ From nobody Tue Dec 9 05:47:45 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQSYY3Lwmz6K2Kt for ; Tue, 09 Dec 2025 05:47:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQSYY2jYkz465Q for ; Tue, 09 Dec 2025 05:47:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765259265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YO0wBNZGwPdZX6SHJ3cvLMk74huh84LoziCI8tvZ/Is=; b=CSrFYWVR8AelD1Rn9vXTf7wnty2ShrEcW7fNDUwEaqZHIVBwhiiHB5HtDvKdwEziXqc6lI vB9iZlXUk0JWLzoMU+EbuBDHhJFcpWatUnKcAn4+HcdI7nXlnwsUK39PlTZvu74mK03sze 8I2SFtKxGYsFn3KHl5zVDmVl2Yf/+I+751psRBp3LUB338nL/xNXHv6ar6ZV+DAk8XWlL4 DDAVGyozJuSHLtmr/cpGgcI5jvNegBxgj7y8sEweic0MMmDBd+Koa2mZmDYQJYpHnpW342 1aq070WeGUz38pknW8KT5RRLNucJWeFQJ7sKp5Rvvaf/q4trresL/nIpvbSV5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765259265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YO0wBNZGwPdZX6SHJ3cvLMk74huh84LoziCI8tvZ/Is=; b=P9o7By39GZd3piF8ooIPDkxkpjV++8iAvN80alsDHjNs4Yzi1paUx8c+rsKeK1cE5jpAFd EDjPVyfX9sJT5ZkMA545hBQdrTE5A5Iak+k+Tu5uWW7ReDV4g0eDZi/K4hEEjS79ON48F0 O5vF2gzIb9Z0+Ypj3q6Wu18sBZ9cgj7V33jLfQrPqtZkWQ4EgBtspEUKw67vKvqYp1056X fIdUjD4yVx08rUfTYLB/j17mhQT4vy5RHQ+0NkajKp3zIgE6gBZnsmy+oPAdc4x6OfUKcQ mi/NOTgRPkXnBp3EInfrEWgkAlTPMJa1nsjQ49s5LUFR4l8l4Bmcdu3VTCUT7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765259265; a=rsa-sha256; cv=none; b=SglvgCLNbmiBsaybMzVmGR+4Y8i8OShw4yw5PPxOVBaEmCrNIyM3HIpyB5yX1QUrYnE3ag Rh3xTY/lLqKUbcst647UByjwEFFYf87SSb+rXZu8BIk6hZlN6Z2OWojLJp5J4kNlgjL7qs tNWP1t2MspWZCeb0HhFwYedwTZxAF+0uzU0gLcct8n5O0IZRz2z69310DX5wZhrDojg5EK YeHZCHHBtn+eYbmIpj488mcRr+5od/Sn2ohquUuX8G/PNilxxoauQdoAqgQvosN7z4oESy abuCQ8uRcR/r8uWoM31pWxnf9255LslUtk55R5W137s9mH/S1AtRRGoCyKoM4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQSYY2H9wzmFH for ; Tue, 09 Dec 2025 05:47:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id e793 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 05:47:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: f9500e75791c - main - shutdown(8): Document additional formats supported by the code. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f9500e75791cf793904c80ca4a52433afd585a23 Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 05:47:45 +0000 Message-Id: <6937b801.e793.1b8d6d17@gitrepo.freebsd.org> The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=f9500e75791cf793904c80ca4a52433afd585a23 commit f9500e75791cf793904c80ca4a52433afd585a23 Author: Xin LI AuthorDate: 2025-12-09 05:46:24 +0000 Commit: Xin LI CommitDate: 2025-12-09 05:46:24 +0000 shutdown(8): Document additional formats supported by the code. MFC after: 1 week --- sbin/shutdown/shutdown.8 | 62 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 47 insertions(+), 15 deletions(-) diff --git a/sbin/shutdown/shutdown.8 b/sbin/shutdown/shutdown.8 index ed44ac36aef6..2f09f5d524a9 100644 --- a/sbin/shutdown/shutdown.8 +++ b/sbin/shutdown/shutdown.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 4, 2024 +.Dd December 8, 2025 .Dt SHUTDOWN 8 .Os .Sh NAME @@ -99,10 +99,10 @@ system multi-user with logins disabled (for all but super-user). If one of the .Fl c , .Fl h , -.Fl p +.Fl p , or .Fl r -options are specified, +options is specified, .Nm will execute .Xr halt 8 @@ -135,23 +135,42 @@ may be the case-insensitive word .Ar now (indicating an immediate shutdown) or a future time in one of two formats: -.Ar +number , -or -.Ar yymmddhhmm , -where the year, month, and day may be defaulted -to the current system values. +.Ar +number +or an absolute time specification. The first form brings the system down in .Ar number -minutes and the second at the absolute time specified. +time units (defaulting to minutes), and the second at the absolute time specified. +.Pp +An absolute time may be specified in one of the following formats, +where unspecified parts default to the current date: +.Bl -tag -width "YYMMDDhhmm" +.It Ar hhmm +Hour and minute. +.It Ar DDhhmm +Day, hour, and minute. +.It Ar MMDDhhmm +Month, day, hour, and minute. +.It Ar YYMMDDhhmm +Year (within the century), month, day, hour, and minute. +.El +.Pp +The year +.Ar YY +is interpreted relative to the current century, with a one-year tolerance +for values slightly in the past (to accommodate entry at year boundaries). .Ar +number may be specified in units other than minutes by appending the corresponding suffix: .Dq Li s , .Dq Li sec , +.Dq Li secs , .Dq Li m , .Dq Li min , +.Dq Li mins , .Dq Li h , -.Dq Li hour . +.Dq Li hour , +.Dq Li hours . +The unit suffixes are case-insensitive. .Pp If an absolute time is specified, but not a date, and that time today has already passed, @@ -174,7 +193,7 @@ At intervals, becoming more frequent as apocalypse approaches and starting at ten hours before shutdown, warning messages are displayed on the terminals of all users logged in. Five minutes before -shutdown, or immediately if shutdown is in less than 5 minutes, +shutdown, or immediately if shutdown is in less than five minutes, logins are disabled by creating .Pa /var/run/nologin and copying the @@ -192,7 +211,7 @@ At shutdown time a message is written to the system log, containing the time of shutdown, the person who initiated the shutdown and the reason. The corresponding signal is then sent to .Xr init 8 -to respectively halt, reboot or bring the system down to single-user state +to respectively halt, reboot, or bring the system down to single-user state (depending on the above options). The time of the shutdown and the warning message are placed in @@ -220,7 +239,7 @@ exits without executing any action on the system. .Pp When run without options, the .Nm -utility will place the system into single user mode at the +utility will place the system into single-user mode at the .Ar time specified. .Pp @@ -235,7 +254,7 @@ shutdown -p now .It Pa /var/run/nologin tells .Xr login 1 -not to let anyone log in +not to let anyone log in. .It Pa /var/run/noshutdown prevents .Nm @@ -249,9 +268,22 @@ Reboot the system in 30 minutes and display a warning message on the terminals of all users currently logged in: .Pp .Dl # shutdown -r +30 \&"System will reboot\&" +.Pp +Halt the system at 23:30 (using either format): +.Pp +.Dl # shutdown -h 2330 +.Dl # shutdown -h 23:30 +.Pp +Power off the system on June 15th at 10:00: +.Pp +.Dl # shutdown -p 06151000 .Sh COMPATIBILITY -The hours and minutes in the second time format may be separated by +The hours and minutes in any absolute time format may be separated by a colon (``:'') for backward compatibility. +For example, +.Ar hh:mm +is accepted as equivalent to +.Ar hhmm . .Sh SEE ALSO .Xr kill 1 , .Xr login 1 , From nobody Tue Dec 9 10:35:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQZxB2G1Kz6KMX7 for ; Tue, 09 Dec 2025 10:35:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQZxB1XK0z3Qpk for ; Tue, 09 Dec 2025 10:35:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765276510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S71MvmOkUnMCB2M1SWDq0hBJtMdaWSzl2Qc/hjQtBo4=; b=kILXrn28z3+K6sSyIrT0cWMWKLDK7L0PAXIqkgM4OMDWsxI4w6vZrnT0Xfu9aFdobwdCp1 xaNjkwbW3ReKcEjmmhao1uoEdkpzFqkQopOLci5y6oZquEgXwDgV2cstUUVG+p04vCdLer kb3h4n0K77KgtKj+Tbfsf4FIIM16Q1pUOkBAa2TkrugLzeqly8rhstS+hiI+JdKmX1yU9P BYjWvgkc3qhVcxt9MuMEzt6Nql4s2jJm/22kp+jID1iiSbGQT/74znEOpxWmRkS+Ii1Ndr rqdwSe5G92CaiiYaZbZoE//J9ze+OhJ9CDN8QWKiiVvJI1tPGfFvehXE+axtfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765276510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S71MvmOkUnMCB2M1SWDq0hBJtMdaWSzl2Qc/hjQtBo4=; b=ltGZMwlsGUOHb7DbMcJ8Bk12GGcDyvrwpCcKaDRSKjl4pZ22fUG+NgrQ23NQUcB0+WGdRv pt+CuWxXms07+iO7WPqAicAdVKMOhx1LY8ny9DARr4uA6RH+N9sUnFhElJ9phvpUF/In04 WwrhubcPEc7CWIjyrEMoJGZhztR+rN82/GJP2m4X37GWO4xgiAi0Z7YNlEhQCMKYl2D9Op g01PqhEi4G+o0JuNgt/MjWhGUAwz7fCrnWN9onNZ7MP/rxe5xYE035M8ibM0XlDWG5yQXW r0JcNcwbbg7TWH5S35ZdvdJ/8OLYf2IOyGqfM9TmmdbVIddOxa9iyEnExBkQaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765276510; a=rsa-sha256; cv=none; b=jdILdvBW7+N7czHpkZWwssy9gl0SpMmCbdhVVMSN82IdH6X2w/iS6UXv/KQNz+xwqkFnLv JkFyBmoA/qVvEhmmdf/GyaUpH2BMCKR0Daaoq7uJynhGYqaUi29ACl/5/qZYeLboSYMXjI fyaoy60u8RqY+B6sZpjLKPuYlvzz75E/Q6t3Ak5xbZB5HO+360koJqknLvTBa0xhI1gJKv pfKipA9qM8SB6u0fRD2t0vvcuxpWsOWaPAADHWhNyfl9CxnKamTrrTJZrPtqL7R1FJjcYB XiTadMsKWfud3p3DnI5Vhy+v6Apw8vARlSMrHdBxc7a32wKl2Hn3eYWg1cdBwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQZxB0pWKzvRn for ; Tue, 09 Dec 2025 10:35:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c72a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 10:35:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: f88300a7b56e - main - stress2: Added a regression test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f88300a7b56e32808e91fc893e7f1afc67ce72fd Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 10:35:10 +0000 Message-Id: <6937fb5e.3c72a.51e8553a@gitrepo.freebsd.org> The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=f88300a7b56e32808e91fc893e7f1afc67ce72fd commit f88300a7b56e32808e91fc893e7f1afc67ce72fd Author: Peter Holm AuthorDate: 2025-12-09 10:33:09 +0000 Commit: Peter Holm CommitDate: 2025-12-09 10:34:44 +0000 stress2: Added a regression test --- tools/test/stress2/misc/pg_zero.sh | 191 +++++++++++++++++++++++++++++++++++++ 1 file changed, 191 insertions(+) diff --git a/tools/test/stress2/misc/pg_zero.sh b/tools/test/stress2/misc/pg_zero.sh new file mode 100755 index 000000000000..4d34a59616e1 --- /dev/null +++ b/tools/test/stress2/misc/pg_zero.sh @@ -0,0 +1,191 @@ +#!/bin/sh + +# Regression test for: +# D53963: vm_fault: only rely on PG_ZERO when the page was newly allocated +# Test scenario suggestions by: kib + +# Problem seen: +# b[0] is 4. Expected 0 +# b[0] is 4. Expected 0 + +. ../default.cfg + +set -u +prog=$(basename "$0" .sh) +cat > /tmp/$prog.c < +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +static int debug = 0; +static int fail, fd, ok, parallel; +static volatile int done, go; +static char *buf; +static char *path = "/dev/md$mdstart"; + +#define PARALLEL 3 +#define RUNTIME 180 + +void * +wr(void *arg __unused) +{ + int n; + + while (done != 1) { + while (go == 0) { + usleep(10); + } + go = 2; + n = write(fd, buf, 512); + if (n == -1 && errno != EFAULT) + warn("write()"); + if (debug == 1) { + if (n == -1) + fail++; + else + ok++; + } + } + + return (NULL); +} + +int +test(void) +{ + size_t len; + int i, pagesize; + char *a, *b, *c, *p; + + pagesize = sysconf(_SC_PAGESIZE); + len = 3 * pagesize; + if ((p = mmap(NULL, len, PROT_READ | PROT_WRITE, + MAP_ANON | MAP_SHARED, -1, 0)) == MAP_FAILED) + err(1, "mmap(%ld pages", len); + if (mlock(p, len) == -1) + err(1, "mlock()"); + + a = p; + b = a + pagesize; + buf = b; + c = b + pagesize; + + memset(a, 2, pagesize); + memset(b, 4, pagesize); + memset(c, 8, pagesize); + + if (munlock(b, pagesize) == -1) + err(1, "munlock(b)"); + go = 1; + while (go == 1) + usleep(10); + if (munmap(b, pagesize) == -1) + err(1, "munmap(b)"); + + if (mmap(b, pagesize, PROT_READ | PROT_WRITE, + MAP_ANON | MAP_FIXED, -1, 0) == MAP_FAILED) + err(1, "mmap(%d pages", pagesize); + + for (i = 0; i < pagesize; i++) { + if (b[i] != 0) { + fprintf(stderr, "b[%d] is %d. Expected 0\n", i, (int)b[i]); + return (1); + } + } + go = 0; + + if (munmap(p, len) == -1) + err(1, "Final munmap()"); + + return (0); +} + +int +run(void) +{ + pthread_t tid; + time_t start; + int e; + + ok = fail = 0; + go = 0; + e = pthread_create(&tid, NULL, wr, NULL); + if (e) + errc(1, e, "pthread_create()"); + fail = ok = 0; + start = time(NULL); + while ((time(NULL) - start) < 30) { + if (lseek(fd, 0, SEEK_SET) == -1) + err(1, "lseek(0)"); + if (fsync(fd) != 0) + err(1, "fsync()"); + if ((e = test()) != 0) + break; + } + done = 1; + pthread_join(tid, NULL); + if (debug == 1) + fprintf(stderr, "Fail = %3d, OK = %5d, parallel = %d\n", fail, ok, parallel); + _exit(e); +} + +int +main(void) +{ + pid_t pids[PARALLEL]; + time_t start; + int e, i, status; + + if ((fd = open(path, O_WRONLY)) == -1) + err(1, "open(%s)", path); + e = 0; + start = time(NULL); + while ((time(NULL) - start) < RUNTIME && e == 0) { + parallel = arc4random() % PARALLEL + 1; + for (i = 0; i < parallel; i++) { + if ((pids[i] = fork()) == 0) + run(); + if (pids[i] == -1) + err(1, "fork()"); + } + for (i = 0; i < parallel; i++) { + if (waitpid(pids[i], &status, 0) == -1) + err(1, "waitpid(%d)", pids[i]); + if (status != 0) { + if (WIFSIGNALED(status)) + fprintf(stderr, + "pid %d exit signal %d\n", + pids[i], WTERMSIG(status)); + } + e += status == 0 ? 0 : 1; + } + } + close(fd); + + return (e); +} +EOF + +mycc -o /tmp/$prog -Wall -Wextra -O0 -g /tmp/$prog.c -pthread || exit 1 + +mdconfig -l | grep -q md$mdstart && mdconfig -d -u $mdstart +truncate -s 2g $diskimage +mdconfig -a -t vnode -f $diskimage -u $mdstart +../testcases/swap/swap -t 3m -i 20 -l 100 > /dev/null & +sleep 3 +cd /tmp; ./$prog; s=$?; cd - +pkill swap +wait +rm -f /tmp/$prog.c /tmp/$prog $diskimage +mdconfig -d -u $mdstart +exit $s From nobody Tue Dec 9 13:16:59 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQfWv26kLz6Kc2x for ; Tue, 09 Dec 2025 13:16:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQfWv18rPz3X9Y for ; Tue, 09 Dec 2025 13:16:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765286219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OQ/SvRQkM0smlu8VocZ91W/a883VnjwJqLvRsBijazE=; b=apgGcKYAoSCJaG+QaMpST/CE6hPXOq52v8TaAZFsvYGkFZkuTci/xkV3Y5pqZUap57LNPa 2iO2HY7GrqGjYukrjMl3qthqGSnXoFSgm8jXj8Q+YoRaTPepXxD+AEpZlcVW+6X9kVheV0 0Cy+6UVMKYBZsRhrc0XrV48dk/GHcJOqHF9MgFrkOabL2wE06vcZ1QWpZwp0P4RRvHea/7 nOAsXU6P556WsNv8WDiuJkWw4cUf1KjuehVsMPVaOmTG5Twqx71g+HFk1X2PydpmZL9P8s mfLIsk2Y1sKgl7z2zCPoRxO3IeS52Y8/A0qjjbi7RpShL+NATYyxy0qYwbCb+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765286219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OQ/SvRQkM0smlu8VocZ91W/a883VnjwJqLvRsBijazE=; b=sE5rLOAUKCvJx8y/qqJB6MC9Sv7hb6E/TeKOiMCeRKXx2WLIJcrxjWvCBQWgxUaPlxPgKZ 7bAKmlU6TVHg0UCkUrg49YBlDM+n9N+xOry0RS1vSThtbNu51x63NrUBg8xR6PHld1WAo1 HoxSd691jnfBh4sf7yLbs5HZWtZDI4E7TeNuVdxV0z5fWEnupAjeeXummTr91SqN/4L3dy AViw91WKnTizSPPsEpcW6KuWiQXlQRvVbeDgR0pBIoqwa9vVH9dpxt7Wi+dahSJyge6SyV EQDWYw9uedRZFkSCt9GH+7HC18oeHN6Jbami/M4cUK7N8DcOhl5kdmZnuS+REA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765286219; a=rsa-sha256; cv=none; b=fHf6zxDlBq+n+o2McTdzH+HN8vFnJWEPon8wex/mttUueF1ApdBA9qcNroWMvVqSTeItVE GpH/8SCdWqGhAC8hbTXXdYWyx5c2lIdhBDXwuQs2tZYP32EXPbn49yyZUQPPmjqY/j4iLv R9YvEh77PkalwZ3J4ygLX/vBAKZq9C9ihYK3lXuOm1I8fUYS0oja4BrNDhp5RnjYiudmSe 8eGjkDyXEWROe2jeWWww4degBVSStcSHwDpO1yAhGKZuwVHm7oqKPOthZat0/3YeDBPNep skQRLN/cmO5fQKMzevY4+47Q9swcaZK7K2+g56RaJCr8F6Fc1R01H7gFJIMjeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQfWv0bz0z10v9 for ; Tue, 09 Dec 2025 13:16:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24ae3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 13:16:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 66129def7bda - main - sys/_types.h: recognise char8_t as a builtin type in C++20 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 66129def7bdaf8a0447aba55e736d27687204555 Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 13:16:59 +0000 Message-Id: <6938214b.24ae3.389d5191@gitrepo.freebsd.org> The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=66129def7bdaf8a0447aba55e736d27687204555 commit 66129def7bdaf8a0447aba55e736d27687204555 Author: Robert Clausecker AuthorDate: 2025-12-07 23:49:05 +0000 Commit: Robert Clausecker CommitDate: 2025-12-09 13:16:31 +0000 sys/_types.h: recognise char8_t as a builtin type in C++20 Unlike in C23 where it's a typedef, char8_t is a built in type in C++20. Recognise it as such. PR: 291449 Reported by: Tomoaki AOKI Approved by: markj (mentor) Reviewed by: imp Fixes: f0e541118c374869a8226eaa1320bb6eda248a20 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54124 --- sys/sys/_types.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/sys/_types.h b/sys/sys/_types.h index 4e217704ceb6..2e622090e81d 100644 --- a/sys/sys/_types.h +++ b/sys/sys/_types.h @@ -207,6 +207,10 @@ typedef __uint_least32_t __char32_t; #define _CHAR16_T_DECLARED #define _CHAR32_T_DECLARED #endif +/* and so is char8_t in C++20 */ +#if defined(__cplusplus) && __cplusplus >= 202002L +#define _CHAR8_T_DECLARED +#endif typedef struct { long long __max_align1 From nobody Tue Dec 9 14:19:51 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQgwS0sgNz6Kh81 for ; Tue, 09 Dec 2025 14:19:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQgwR4j1Cz3gwt for ; Tue, 09 Dec 2025 14:19:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765289991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z2LvuF6DH38Ha/rvzVhXGfSqgDQVN4QlZsSoXJxAbpw=; b=KvaBHOkLW6+HcJL+jg3Qys7Q1h5YocmRJN3LQNaMP3r1r3/bCqysqdf8L1QYXHYw+5RyHK rMdLEfCrU4ntiPU0u7PUfEatn7D9mKhnOMgQlMI/HoHYCGulW1UjmR+sovyjezACTqsRcI qO/fuXMYVTLU6nJ6UnOCH/V4WiRbVqXfwW9+HlCoQ4Z3VmLyMp/MF5i25p+Fx1KCMoQUEx /Q/WKMbNFY4vMbW+bDTE2jgSrm6nNvoKy7DsjdTKe9RXQUeW8pqpQxmV8kOT/0CXgye3QA KvQ6m7cMD8dhF22K+MZegqRvHzwvqsP1nuhatahWd6YaJ4mAVx+VgeWnjz1IMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765289991; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z2LvuF6DH38Ha/rvzVhXGfSqgDQVN4QlZsSoXJxAbpw=; b=OvYCkodF3e8NAOyHCuZLq/H/tC/fRyIPLj/t/+HkE8mo2cAAfR+8oD46ZoYgx1fyUIUOWt 7FaCYH4+maWLtnjqB66Y1wkkKa9vAuymq8+h7waYkG81V/T+ge+ufbW2OyDOgccfhKfe0t S+xK6oPHp+D+V/FuWOBVx9bKhcFcWi2Eplvali+SiPLmolCyZ29Z0XEpd9JLB9MPDpwoyv x+vXXqDWbotktvexdRvtK1kYb9eRyYcmKNRK6kXbGvqF8Hh0wTDW3gFBAUXXR4TBudwuoH Xx/U4W+2fwNzSU7ycLrcx/nC2h+bADTtuWsNAKWRs2wO01f08+YjkiTCTKdX6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765289991; a=rsa-sha256; cv=none; b=DuSoSW3pffYvrudu3mEFONAlAMpOWgcf7v0Q6XolfeLWLZgI637DfWnwezPp79OAw1Q1cp icuiEHFh+x0SzTz+NbNl1mnFWl3NkYnfNvnX8xxBc8wYesCWu3Vq752JweKe3OdCU8zRRy 1sUT6eXb5ZPETyTKPFPxI6bFcO9DL73bbv5JrLELQlqYXLxsoFvYG2GUm9JoSnVeATDo0x g8Oc5YI18p5Tw0oqFck+8pSQl8mJYe0TPhbemkph23ij7OhqFVXpDD4p/kWJHY+hFd269h NTWmuexN453tGZmtPLhtgftNgUikSOrSTAKA+U6Tz6p+OTq3cQfkozDsycdUIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQgwR3llsz12Rb for ; Tue, 09 Dec 2025 14:19:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 282ee by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 14:19:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 5e2bbfe387f7 - main - if_ovpn: use epoch to free peers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5e2bbfe387f7eac8f802c4b6ad2114f0e17bb5f2 Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 14:19:51 +0000 Message-Id: <69383007.282ee.46025830@gitrepo.freebsd.org> The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=5e2bbfe387f7eac8f802c4b6ad2114f0e17bb5f2 commit 5e2bbfe387f7eac8f802c4b6ad2114f0e17bb5f2 Author: Kristof Provost AuthorDate: 2025-12-09 10:55:30 +0000 Commit: Kristof Provost CommitDate: 2025-12-09 14:17:48 +0000 if_ovpn: use epoch to free peers Avoid a possible use-after-free in the rx path. ovpn_decrypt_rx_cb() calls ovpn_finish_rx() which releases the lock, but continues to use the peer. Ensure that the peer cannot be freed until we're sure all potential users have stopped using it (i.e. have left net_epoch). Reported by: Kevin Day MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/if_ovpn.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c index 674df4d17eb4..ae09a1ce9db8 100644 --- a/sys/net/if_ovpn.c +++ b/sys/net/if_ovpn.c @@ -161,6 +161,7 @@ struct ovpn_kpeer { struct callout ping_rcv; counter_u64_t counters[OVPN_PEER_COUNTER_SIZE]; + struct epoch_context epoch_ctx; }; struct ovpn_counters { @@ -568,6 +569,15 @@ ovpn_notify_float(struct ovpn_softc *sc, uint32_t peerid, return (0); } +static void +_ovpn_free_peer(struct epoch_context *ctx) { + struct ovpn_kpeer *peer = __containerof(ctx, struct ovpn_kpeer, + epoch_ctx); + + uma_zfree_pcpu(pcpu_zone_4, peer->last_active); + free(peer, M_OVPN); +} + static void ovpn_peer_release_ref(struct ovpn_kpeer *peer, bool locked) { @@ -606,8 +616,8 @@ ovpn_peer_release_ref(struct ovpn_kpeer *peer, bool locked) callout_stop(&peer->ping_send); callout_stop(&peer->ping_rcv); - uma_zfree_pcpu(pcpu_zone_4, peer->last_active); - free(peer, M_OVPN); + + NET_EPOCH_CALL(_ovpn_free_peer, &peer->epoch_ctx); if (! locked) OVPN_WUNLOCK(sc); From nobody Tue Dec 9 14:53:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQhgP1Tslz6KlHQ for ; Tue, 09 Dec 2025 14:53:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQhgP0cyDz3pKF for ; Tue, 09 Dec 2025 14:53:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765292017; h=from:from:reply-to:subject:subject: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/lcaf0+JrVW6kMKK7qc2f/bozDauF5Xwj/OB4N3mBs=; b=T4/O09toXtNsmYKaczQEntOpQoyLIuieoSdLqR1GTIW/DtGiISEU+c0vHFdlyd232C1UkY i2jDl4GgMZJqcm4ujl1M7yxMTGmLKA//onf0uMd5FsHeLCz6n7tB1PIaC7fehXCOQ0tm09 F/eshz9m3KPtdUrDJlPlWn6uoVGh+I/nHqHTsTd7zEVNtZMFfEQRRxSdNLiFVUnSvNEIx6 crqYc561SRBZF8u9LfHYRsvqQyxfwrD8zbY1iBgP8zhcKboSLA8jVX7cv4pcL12bj8kxwK UYXSI89BGSb2ZK4EQrMptafTeCiLoZoMDtQbzudRpJVcGDO6KqQ1ElEAJX1aYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765292017; h=from:from:reply-to:subject:subject: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/lcaf0+JrVW6kMKK7qc2f/bozDauF5Xwj/OB4N3mBs=; b=LVm94Cf9dGMPq0VTZHOf21owrZqnYqpPClViQh0KMlk+zHB03gluj9frSfedNRwIz11tBL sPNrLABbCNoBIJoineDRxd/H27LP9aEc4f4FP5C1aDxpm8tWX+iuL8NB5waY/wWHGgOgI2 NrSa2Hi4UgBspW6Qt+mfuT21fDL03bFDPiZo6gcJNVyYQaHXFbhj8qrwumF+KfvNYGz/zz bBwkL7vjmSTNAuGtSq0KtmYy5rkttEqE+31hsts4hGakRYLqudjabXfvjUGkvQdoF0Ze+3 379U8nmn/TqsRS5qZi/97+jWjYA4/v+8UXcMeYQcXNQB5mxxTDfHjNaiUxNOuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765292017; a=rsa-sha256; cv=none; b=wJQMCb0X8pO0ZfTvnS4kDrmLeFKq8YEO7V22WztQ1Y3jPX5Ofmle6r0jGQL/wxV/bSCODM YfW2BIUgLVtLp8gnFBhT6AmGFKOhiiGzRSgpfYRofGBw9g9s7dLwMZwPbfHAQ77tfiMYPq oekGIQ2GsnmlCGu6cY7XmxdZ384fcR1pLozGoOukyEhN5KTAFxykSWhT0vMJhx5incC37R Rf8nVWHi/jeUTl1anYjXFDvpYOG7FgxSMvE96l1fyMTPx4rPr7Mw4+QFHQ3+i3B0VinZkZ NQN1bdcg2EgMdf/FzRobG4OW4nN/IRbnY5ik3BRUG1Qb8QUVSTOsvY0gLSjj5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQhgP03m6z13kw for ; Tue, 09 Dec 2025 14:53:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2fa7a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 14:53:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eugene Grosbein Subject: git: dbc4a1c69191 - main - trim.8: minor update for manual page List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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/main X-Git-Reftype: branch X-Git-Commit: dbc4a1c69191909a7210cad6da46b755557d0d34 Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 14:53:37 +0000 Message-Id: <693837f1.2fa7a.12451ad8@gitrepo.freebsd.org> The branch main has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=dbc4a1c69191909a7210cad6da46b755557d0d34 commit dbc4a1c69191909a7210cad6da46b755557d0d34 Author: Eugene Grosbein AuthorDate: 2025-12-09 14:47:26 +0000 Commit: Eugene Grosbein CommitDate: 2025-12-09 14:47:26 +0000 trim.8: minor update for manual page Further explain that trim(8) is not for trimming free blocks in populated file systems/ZFS pools, as people still take it wrong sometimes. MFc after: 1 week --- usr.sbin/trim/trim.8 | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/usr.sbin/trim/trim.8 b/usr.sbin/trim/trim.8 index eef369703715..7c8f3b36d520 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 October 1, 2025 +.Dd December 9, 2025 .Dt TRIM 8 .Os .Sh NAME @@ -51,11 +51,21 @@ utility erases specified region of the device. It is mostly relevant for a storage that implements trim (like flash based, or thinly provisioned storage). .Sy All erased data is lost. -Alternatively, refer to the +.Pp +The +.Nm +utility should not be used upon mounted file system or active devices +being a part of imported ZFS pool or other software RAID, and the kernel +does not permit such usage generally. +If used upon not mounted file system +of inactive device, the +.Nm +utility erases blocks non-selectively, whether a block is occupied or not. +Refer to the .Xr fsck_ffs 8 command having a flag .Fl E -to trim populated UFS, and to the +to trim free blocks inside populated UFS, and to the .Xr zpool-trim 8 command to trim existing ZFS pool. .Pp From nobody Tue Dec 9 14:58:57 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQhnY2vztz6Kl4q for ; Tue, 09 Dec 2025 14:58:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQhnY0fsjz3qRx for ; Tue, 09 Dec 2025 14:58:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765292337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TeEdqn8aaej0p/vgmBK+p/65S7ECMH9yfJIOXME4Gpw=; b=oGbcHCMrkgRH4HOZxNertpzcanxRJ6C7yqgwaz0sQwQ4rVL+eO2ZWECXZbOGz5RIfHDLGm kFenmzMxpn07slEcY2uKCn0ZmaP4p9PUZW+qDt/e/Q1TAi/STYd6Ee0XpM70HbqBTqWA4z E4hKOAvdcAyezruNRHU0KZMhkmt/UtVjZFxnwrMaXYV8jY4PX+EwIKb5/2whBVXuH4Y+ax bLY0AzuM6q1Io3QOEfgp6xeqwLCx7ivrO+eeztCELQIMVVfrsjDdb+gzc7jW5UgErmUHag XL0ElmZy2gh8hjB83fs2lRvaOB9tqy2fldOl9MhRT1rHwP57172jlt83qdqc+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765292337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TeEdqn8aaej0p/vgmBK+p/65S7ECMH9yfJIOXME4Gpw=; b=N8dafa+/iZ1TqskCtjW2fbAzNvzsnIl1LkBbhijZuW3yCvq2WB2EGR3ctOHccVOG13C6ff lDiOzdDN1mwGuVNORkD0cHD635e1sRVUX/6pSUSXGkslPxJNmSfEPqA+tiesRGIv7R1JV0 bBETjdRduDoVCuyY0CzwjXRouTtAu4/vkJtVEQYwlklA7WsB04EwlJ6jhPdrNKoYgoRP78 crc4W6pm38LWB2WydIN/Gyqvwrjpi9eLOVMMN6w+mbHCp+PNfJkc7WSjroEE9nA3voz1y9 eToQiMJBHn2GYgOi6KDCOF1txZbcGpOGZq/Qs1mSWOcxrvGsbRLo7zQ/KHJO/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765292337; a=rsa-sha256; cv=none; b=WVAmTw6MU4q5srtv2JQFMuSyQ6ra8TyqpzSO1m2CQrG8Dkmkup7uAGzUP5lva7QETKPu71 RIVyYYSn33uLayfMMdCUhuiUsafROrH2lJgVgmQhmbprko8p5DwSg85DtcAyMZ+TNCx0QM PFo4Lx/53BarI0eCOnC6PTTpsWGassdiBMlW9krv4wBCU9k9WZCVmxPIQ0eth4/RUB4JnR nj9Xm84r/2xFr8XbzFAnHKkE4E4QMvLyCmA228OJ3CWy+Om1jh9dqfj607HvVqC4LWoh9S 2RFlpuPmniNCBut9LeuPxAJwifXIELiGrAnWt2sZBwm/lXZ4uA6kWSp9UzT0UQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQhnY0BVQz13lX for ; Tue, 09 Dec 2025 14:58:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2f319 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 14:58:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eugene Grosbein Subject: git: b2f8d46d898f - main - trim.8: fix misprint List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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/main X-Git-Reftype: branch X-Git-Commit: b2f8d46d898fb50222aefca47d687a852c647b2f Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 14:58:57 +0000 Message-Id: <69383931.2f319.65b187a@gitrepo.freebsd.org> The branch main has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=b2f8d46d898fb50222aefca47d687a852c647b2f commit b2f8d46d898fb50222aefca47d687a852c647b2f Author: Eugene Grosbein AuthorDate: 2025-12-09 14:57:10 +0000 Commit: Eugene Grosbein CommitDate: 2025-12-09 14:57:10 +0000 trim.8: fix misprint Grammar fix after previous commit. MFC after: 1 week X-MFC-with: dbc4a1c69191909a7210cad6da46b755557d0d34 --- usr.sbin/trim/trim.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/trim/trim.8 b/usr.sbin/trim/trim.8 index 7c8f3b36d520..caef15d98c13 100644 --- a/usr.sbin/trim/trim.8 +++ b/usr.sbin/trim/trim.8 @@ -58,7 +58,7 @@ utility should not be used upon mounted file system or active devices being a part of imported ZFS pool or other software RAID, and the kernel does not permit such usage generally. If used upon not mounted file system -of inactive device, the +or inactive device, the .Nm utility erases blocks non-selectively, whether a block is occupied or not. Refer to the From nobody Tue Dec 9 15:54:32 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQk1h6WN7z6Kpqy for ; Tue, 09 Dec 2025 15:54:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQk1h33Mdz44Z5 for ; Tue, 09 Dec 2025 15:54:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765295672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AFdUztDBUPcYbPFrHQ9ZZFr+kl2+ujNcJB0O5TZI5po=; b=ssBml4CRpmL4bDN5fK4BBsD3FV7kCDbVbhG2I3/hMq3R18hnSolLP5SGebfognviFQbdBw 5JR4lUfjxadbiG44KM9AWbVlk3Gr2MP27bwJTISRHBJCQozs34nFePZSUSTjBaJsm/CpZi IA31CjiEISzYl/Iq82JW/6H2mJS2hv0EeMjfR/CunwoqKnJmA+oHjlNON5+Oqh//kAZ2AY 5OCz/ofIzsBQ3CGRuAaDZj9kqfeNA7qLQjZ6/R6mCHWv5GB6iPclhvTHk6q8NA0/PFPjCt +EElWjqnzohYMlvL/fkfUuhiu2EvYnmaOZhiGsgOfQR5bmgVsB4i2Sl3JpsJQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765295672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AFdUztDBUPcYbPFrHQ9ZZFr+kl2+ujNcJB0O5TZI5po=; b=K1JwyLVTBuBDWpe3m2oyHtbYEb8IO1hXqjqM8AQU8W0XK7kLimmAHDq3YrWCBc0S8NV9kt 3uUB2iyQIeqppzkrKwBSZxisPMvVAhcKO0EGZErVCOmMVfZEFEu6Op9NjPuGqPtE9Qm5KD Ksne94wjVUylugK9RomZt/ncWZid5+70eRVpKRfgSrjD6rVJWAmHW2+YW/GaFetPKsjyZR XzBwPf6S/AaAROaB4dcoZJHPdoydkWALMQsF7Fe88c39xp6Uayzl1BRd8QTzkZ0YmRX/0e WbOQrhcHp5dwQgJ/kXCWGdJLpXI399s52R3t6pbWlTmsQ9EPMg0DGyD3HCZHhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765295672; a=rsa-sha256; cv=none; b=quvUnccEYIYjkDzgXzEUBfZ+r2dZyogzeNkNy545QDPezrcOmmFETL+Y3VbjuXqAbG2KvF YMRHvwQgG74ThBd7+W6S060AElWctmzkGBmByNjsiCcb4xQjYkS7tNG9zZTObMN9Hkw4gZ GS94S57ei2K1l/gvOqnUbj6eFs+KsXQAkYVoNOK9se1dvvLJMronkXD/rkxeS0Nr/2qTTG M/8jDdehGDrp18I1dM8xF2TuAV/7CG4Z5LMQbuDN2jtDhPd1ijTv6zDFelqgrX5XZNpbw1 I0581iLlAIG/zrjmW9rDzfL4NGM2eWnUbmx0BrpdTQRI/YnuC2jBZa0iVz4NgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQk1h2byhz1566 for ; Tue, 09 Dec 2025 15:54:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35291 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 15:54:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: bc2b10a59314 - main - cxgbe: Stop using bus_space_tag/handle directly List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: bc2b10a5931442bb39653cd8d5712b2d7195cf46 Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 15:54:32 +0000 Message-Id: <69384638.35291.72c2c01b@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bc2b10a5931442bb39653cd8d5712b2d7195cf46 commit bc2b10a5931442bb39653cd8d5712b2d7195cf46 Author: John Baldwin AuthorDate: 2025-12-09 15:46:55 +0000 Commit: John Baldwin CommitDate: 2025-12-09 15:47:35 +0000 cxgbe: Stop using bus_space_tag/handle directly Reviewed by: np, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D53030 --- sys/dev/cxgbe/adapter.h | 18 ++++++++---------- sys/dev/cxgbe/t4_iov.c | 6 +----- sys/dev/cxgbe/t4_main.c | 6 ++---- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index 38875b535067..24a482b74dfb 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -963,8 +963,6 @@ struct adapter { struct resource *regs_res; int msix_rid; struct resource *msix_res; - bus_space_handle_t bh; - bus_space_tag_t bt; bus_size_t mmio_len; int udbs_rid; struct resource *udbs_res; @@ -1276,7 +1274,7 @@ t4_read_reg(struct adapter *sc, uint32_t reg) { if (hw_off_limits(sc)) MPASS(curthread == sc->reset_thread); - return bus_space_read_4(sc->bt, sc->bh, reg); + return bus_read_4(sc->regs_res, reg); } static inline void @@ -1284,7 +1282,7 @@ t4_write_reg(struct adapter *sc, uint32_t reg, uint32_t val) { if (hw_off_limits(sc)) MPASS(curthread == sc->reset_thread); - bus_space_write_4(sc->bt, sc->bh, reg, val); + bus_write_4(sc->regs_res, reg, val); } static inline uint64_t @@ -1293,10 +1291,10 @@ t4_read_reg64(struct adapter *sc, uint32_t reg) if (hw_off_limits(sc)) MPASS(curthread == sc->reset_thread); #ifdef __LP64__ - return bus_space_read_8(sc->bt, sc->bh, reg); + return bus_read_8(sc->regs_res, reg); #else - return (uint64_t)bus_space_read_4(sc->bt, sc->bh, reg) + - ((uint64_t)bus_space_read_4(sc->bt, sc->bh, reg + 4) << 32); + return (uint64_t)bus_read_4(sc->regs_res, reg) + + ((uint64_t)bus_read_4(sc->regs_res, reg + 4) << 32); #endif } @@ -1307,10 +1305,10 @@ t4_write_reg64(struct adapter *sc, uint32_t reg, uint64_t val) if (hw_off_limits(sc)) MPASS(curthread == sc->reset_thread); #ifdef __LP64__ - bus_space_write_8(sc->bt, sc->bh, reg, val); + bus_write_8(sc->regs_res, reg, val); #else - bus_space_write_4(sc->bt, sc->bh, reg, val); - bus_space_write_4(sc->bt, sc->bh, reg + 4, val>> 32); + bus_write_4(sc->regs_res, reg, val); + bus_write_4(sc->regs_res, reg + 4, val>> 32); #endif } diff --git a/sys/dev/cxgbe/t4_iov.c b/sys/dev/cxgbe/t4_iov.c index 452ebaaf0172..9ccf63fd6516 100644 --- a/sys/dev/cxgbe/t4_iov.c +++ b/sys/dev/cxgbe/t4_iov.c @@ -54,8 +54,6 @@ struct t4iov_softc { int pf; int regs_rid; struct resource *regs_res; - bus_space_handle_t bh; - bus_space_tag_t bt; }; struct { @@ -147,7 +145,7 @@ static inline uint32_t t4iov_read_reg(struct t4iov_softc *sc, uint32_t reg) { - return bus_space_read_4(sc->bt, sc->bh, reg); + return bus_read_4(sc->regs_res, reg); } static int t4iov_attach_child(device_t dev); @@ -249,8 +247,6 @@ t4iov_attach(device_t dev) device_printf(dev, "cannot map registers.\n"); return (ENXIO); } - sc->bt = rman_get_bustag(sc->regs_res); - sc->bh = rman_get_bushandle(sc->regs_res); pl_rev = t4iov_read_reg(sc, A_PL_REV); whoami = t4iov_read_reg(sc, A_PL_WHOAMI); diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 5e02b47da8d9..3237c6649713 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -2660,8 +2660,8 @@ reset_adapter_with_pl_rst(struct adapter *sc) { /* This is a t4_write_reg without the hw_off_limits check. */ MPASS(sc->error_flags & HW_OFF_LIMITS); - bus_space_write_4(sc->bt, sc->bh, A_PL_RST, - F_PIORSTMODE | F_PIORST | F_AUTOPCIEPAUSE); + bus_write_4(sc->regs_res, A_PL_RST, + F_PIORSTMODE | F_PIORST | F_AUTOPCIEPAUSE); pause("pl_rst", 1 * hz); /* Wait 1s for reset */ return (0); } @@ -3997,8 +3997,6 @@ t4_map_bars_0_and_4(struct adapter *sc) device_printf(sc->dev, "cannot map registers.\n"); return (ENXIO); } - sc->bt = rman_get_bustag(sc->regs_res); - sc->bh = rman_get_bushandle(sc->regs_res); sc->mmio_len = rman_get_size(sc->regs_res); setbit(&sc->doorbells, DOORBELL_KDB); From nobody Tue Dec 9 15:58:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQk5v6mG9z6Kpyn for ; Tue, 09 Dec 2025 15:58:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQk5v63ZSz44pb for ; Tue, 09 Dec 2025 15:58:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765295891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hNqSNXT52if/SqtYmvteBOxucYHOfDCYlTIG102TbhU=; b=Bb8d7t7VTIetcp3XD9+3091kIKA2D33WFh7j+qnn6SB6CnF5t6Fly9gBYphrzRCtfU+maP 6YAxSYyoPekYayo5eN6ZQK4bUg8sY8/14jr1v+QNQThB9BLlj1uJkkxjL8ukpKHptxwokO P9yJ8PhJyEJxOiXaA6hEYT2CvLmXI7cZemX4o0SihSt5TEbkjmObByIi9RHBWptwSvVLAr dbjzIQ53jRluUga4wvlohDaBPzMX67gKgjxKh0ZH/Txnh6h8ED58Nvj1dqVaAsp5AoRZaA uVSbw4EYRC1QEjSLm6U14WkvhQ9kwTgZJj/Lx2KfG6YeUFIpFy4GNgiV56fO0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765295891; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hNqSNXT52if/SqtYmvteBOxucYHOfDCYlTIG102TbhU=; b=HVan1MNSTo649ILTFReV3MQOG5XqifvVPC2nImU8ZsfolwFSSiHZ1P4BnVhayAAPg+exvG W65SDEeNITNTwx7EH1i4x1aSMDH31XuygZ8B/cU3TGB6EHQa7vNWri8w6EfGFXDESRL92f wzN7dOeygRV8rzcRDbjHldJZSOqMZxwf/FevuPCINZ52oIFMRi8CO8LCWWIV7j6nrB2RI5 xyjVdzl+f24tNiJ3XW/nMoygt0aCN8NwqBow93wawWjghOtpV7d65dqbLH5Suo5b2guj9O yTCXEjTVPX/QQ0U+JijxR+dmJPvUE/9N1vImLYWrwet+RUoB1yj5Hx9kUR983w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765295891; a=rsa-sha256; cv=none; b=GX5mNVly2rvHDIPxWa+HY9uoPslApukKXMY/QNh3k/4To/Qp6y8r3oJgt5vPS+YXD2WRk6 OQT/Z/qSip48pzwXhvBmU4h+BjSF172ciJ+cR6N29/Z1Mmt/m9NzHcLAF9jJ1Jj27iRX+F rJD8jxtAuuMPPJQJHqkvDsdla2eOlZg3VFUN6z5nMRtfw7MLd1lV6CrpTRMuj6ca1R5zPE ugIus7kGrZ722TcaYqbOby4Vu3JIFStvEC3YiORZh9hvNki7AD6xS7QOC4v3CFAzxCxZE/ QMtHjCHAm2DYA6V6CuMJdllv4s/mnC3/FnSak8FJhCT1AULv0EJpmoKO7KnExQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQk5v5903z15B9 for ; Tue, 09 Dec 2025 15:58:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3485f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 15:58:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: d8556d2bad40 - main - nvmf_tcp.4: Don't quote the document description given to .Nd List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: d8556d2bad4074258fb11c0c7ee997ad78dadf87 Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 15:58:11 +0000 Message-Id: <69384713.3485f.7054e90b@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d8556d2bad4074258fb11c0c7ee997ad78dadf87 commit d8556d2bad4074258fb11c0c7ee997ad78dadf87 Author: John Baldwin AuthorDate: 2025-12-09 15:57:16 +0000 Commit: John Baldwin CommitDate: 2025-12-09 15:57:16 +0000 nvmf_tcp.4: Don't quote the document description given to .Nd Reported by: ziaee --- share/man/man4/nvmf_tcp.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/nvmf_tcp.4 b/share/man/man4/nvmf_tcp.4 index 0a650e342f0e..a781abaa7ad9 100644 --- a/share/man/man4/nvmf_tcp.4 +++ b/share/man/man4/nvmf_tcp.4 @@ -8,7 +8,7 @@ .Os .Sh NAME .Nm nvmf_tcp -.Nd "TCP transport for NVM Express over Fabrics" +.Nd TCP transport for NVM Express over Fabrics .Sh SYNOPSIS To compile the module into the kernel, place the following line in the From nobody Tue Dec 9 15:58:12 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQk5w75BCz6Kpyq for ; Tue, 09 Dec 2025 15:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQk5w5VvFz451C for ; Tue, 09 Dec 2025 15:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765295892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eKriZpqbIrSWhu/k9ft3VFuTbb1GRtVTLpujoxoJqWY=; b=lRkBpPmFqVjIC9z/l3Ts8XglO/Kt4iG6ZvAU4hpaum7abQ203unVb2T2iLDDlHf5Q1ckga 8+BpOedfTn3mIUjcDwk0IFSW7WfnykUkPsb7gB1G2jfreEtd9gJYrqoK0TDXiUVAi8bVUw Q54aOK6jGijpoC2BqSSYvlK3dGy0zmbKiTQjbg/w2WwnfQNdx2s+3PL1ZrE6BGYS7xVymv p63pyPqtP0dYGTQSE7hgSh+gD29Rq4949R9GHb7p6NKQhsQjoGQN69EqHw6ARZdY9ELriW +EZHd+dBTqFmB6DDUUwPEj0HPxo6guaQqquDszFzDgV5m47dtADVv2sHbq41DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765295892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eKriZpqbIrSWhu/k9ft3VFuTbb1GRtVTLpujoxoJqWY=; b=D1xUY6IMK4bLlB/Skzmqbi52ACVqXL/ec4roBva+MI94CaVriS4Ftld0dPY+dD3C3shnAP JYVjfKRhDY8D4Zd23hB3WsYyO+CMFXQaNqoZhSNyl2CavReFZoH6HSnHLYT6mgYQyh80Vv 658SoE8PKEkuc1rJh+uHcYByU1esX53Rgu4Kiaz382VJV69KmbJMCETpwyrEZJ2OYMM7DX XTyl1d/qU035YQMlY1a3U+0dTTmeQgA/6k55zWfMzTxQ3R1oezcqwwl629cWBpgXBRYc3s T68wUE7BJikhVXEsoYdHk6Ig1rNGhz1T2XBUSWB1hYX/jwA5d2Wo2PojXijdeg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765295892; a=rsa-sha256; cv=none; b=XQ16sRR7BsnZKkjBuDjmyb9rzIwgI5QEETJOjDjnlADBOLXsrPFqQpb8ZtB7p9XJFlJyjO 93TO7WNb66/k3dxyjd8ZmDkVmSJQ4noxEDecPtV4+qxDaaw3DLMd0K8WkFlMkSFZBy0/49 RGvbwm4+fvdvTPv2ubXFPnQrerXC9DZa2V26OvJrY07ew5rkMZcyL6dWJ/k3nk7xBHV/bW IEQUsQ7o+3mdaGCOHzDtbKHD6QaQzPNXibnX+yabeFF+nIiJ360ewwa+TqWqAQyfiexHcK 3uKFG1nM0ys/ZyY7uWWCrZaFgeiSGOKKqEpYetyvjtwpQk+GomuFW2XSYVRqbA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQk5w54xBz15HD for ; Tue, 09 Dec 2025 15:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35ba6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 15:58:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: e2b8be511e90 - main - nvmf_che: Add a manual page for the Chelsio NVMe/TCP PDU offload driver List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: e2b8be511e9064de29a847e7c1cfc9200e69394b Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 15:58:12 +0000 Message-Id: <69384714.35ba6.6608b41c@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e2b8be511e9064de29a847e7c1cfc9200e69394b commit e2b8be511e9064de29a847e7c1cfc9200e69394b Author: John Baldwin AuthorDate: 2025-12-09 15:57:44 +0000 Commit: John Baldwin CommitDate: 2025-12-09 15:57:44 +0000 nvmf_che: Add a manual page for the Chelsio NVMe/TCP PDU offload driver Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D53764 --- share/man/man4/Makefile | 1 + share/man/man4/nvmf_che.4 | 80 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 722ee2bc9334..4084fa55dc69 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -442,6 +442,7 @@ MAN= aac.4 \ ${_nvdimm.4} \ nvme.4 \ nvmf.4 \ + nvmf_che.4 \ nvmf_tcp.4 \ nvmft.4 \ ${_nvram.4} \ diff --git a/share/man/man4/nvmf_che.4 b/share/man/man4/nvmf_che.4 new file mode 100644 index 000000000000..8960cda9c506 --- /dev/null +++ b/share/man/man4/nvmf_che.4 @@ -0,0 +1,80 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2025 Chelsio Communications, Inc. +.\" +.Dd November 14, 2025 +.Dt NVMF_CHE 4 +.Os +.Sh NAME +.Nm nvmf_che +.Nd TCP transport for NVM Express over Fabrics on Chelsio NICs +.Sh SYNOPSIS +In +.Xr loader.conf 5 : +.Bd -literal -offset indent +nvmf_che_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +module implements the a TCP/IP transport for NVM Express over Fabrics +using PDU offload on Chelsio T7 adapters. +It can be used by either the in-kernel NVMeoF host driver or controller. +In order to use PDU offload, +the initial socket connection must be using the TCP offload engine (TOE) +on a supported network interface. +In addition, +controller connections must negotiate a suitable +.Dv MAXH2CDATA +limit to ensure that received PDUs do not exceeed the maximum size +supported by the adapter. +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width indent +.It Va kern.nvmf.che.max_transmit_pdu +The maximum size of a transmitted PDU including all headers, payload, +and checksums. +This is an upper limit enforced when queues are created. +Individual adapters may empose a smaller limit. +The default size is 32 kilobytes. +.It Va kern.nvmf.che.max_receive_pdu +As above, but for received PDUs. +.It Va kern.nvmf.che.use_dsgl +Enable the use of a S/G list for large writes into adapter memory when +writing control structures for DDP (not used for PDU payload data). +S/G lists are enabled by default. +.It Va kern.nvmf.che.inline_threshold +Writes of control structures into adapter memory use a S/G list instead +of immediate data placed in work requests. +The default threshold is 256 bytes. +.It Va kern.nvmf.che.ddp_tags_per_qp +The number of STAGs reserved for use by DDP buffers for each queue pair. +Each command sent on a queue that requests data from the remote peer can +use DDP to place received data directly into the associated data buffer. +Each buffer requires a STAG to enable DDP. +If an STAG is not available when command requesting remote data is sent, +the data will be received in free list buffers and copied into the data +buffer by the driver instead. +The default size is 256 kilobytes. +.El +.Sh SEE ALSO +.Xr cxgbe 4 , +.Xr nvmf 4 , +.Xr nvmf_tcp 4 , +.Xr nvmft 4 +.Sh HISTORY +The +.Nm +module first appeared in +.Fx 16.0 . +.Sh AUTHORS +The +.Nm +module was developed by +.An John Baldwin Aq Mt jhb@FreeBSD.org +under sponsorship from Chelsio Communications, Inc. From nobody Tue Dec 9 15:59:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQk7t1QlQz6Kq52 for ; Tue, 09 Dec 2025 15:59:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQk7t0bf7z45nS for ; Tue, 09 Dec 2025 15:59:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765295994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GqTKKH7L1OySE1tb+hAJyrPmeeF/CMDjlxpDZ+WK8Co=; b=OtBKO09vC78lLC2JSkquXcwYFQxdV+5e1m6kl/59rvzDtEv8YQ51I/rqnsoXlwkCD7gVtF Gdced3Vgk2TwtjdMHa/tCydM0FpCA2DrKHIi89PFxDOV/Pwn4P2kaxj1wpev7au+RKiEEJ vRG9h/k3ZcUtCxLGuvtHzaTXDGIlksV60Z/HbzByIonhDcqeeQUGyAJ/s2AV5zzfecrW+5 cbtM/+QeK5QT+kVDshUg/ggh22xstJZcuNrhxA4kY40u0CXXwQ+YJY2A4kaU6p+0OGdda+ j0jTxNTvRHZQg1FmriAF35eEdtn49E/TuOGfIuEClib1omE07W7a5qQxgAeapA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765295994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GqTKKH7L1OySE1tb+hAJyrPmeeF/CMDjlxpDZ+WK8Co=; b=ReMjqkj/zLIFNGaBVuswQrU6R6KmCgttLSB3WLcXOm5uhcLYS8VyiCThPac9vIB7zOAM8l NM6b5gt3R9yN8bzoo5x6v8TL32eVZLnfGlaJaPTi9V6VUldI6uc9b006wceJQdnRJlWB+E 8EfwyGdtk1uj247VwhxbcO13CS40y+M5afw2KZ6BP6GUdFFVZMpU2JnsQp7yq8pjyxYl2P slXishOF4zAyrMUYaKEHi1K+AmcxLwXC1hGLGxTVDDmRwec4ghe7h0exY7ZJ+p1a5jehjt d7qMWqNz4rrnzL8ajRHCNXE70Ab9oSL3lH0K1E3DwtoNapd0Vjbu1aA5EKfKMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765295994; a=rsa-sha256; cv=none; b=R6qe3WmCyTOUqmcqvgkNcHNTK16eqyy3v5Nit+qwndDy6V47YBziVTPngvG8tvPClY0R/c ZBbXqTFU9CJh7EClsRhuHwSAI9pc+SbwP8S43OTB9D4cA6LMN31qmvgknhjjhhntrC7vek wgGN4w6wIRj2HnpAbwZpicMPttDEyNV3H5w14AI/eQiQaz/xCSN9qWw9ZCc7sH1RXb4bvm pyr+4ckYYPNePvTHjsxzlue25MrzhWrWw2BgbCA9ArM9I8BosPUFlVoaTjpMI8XI5Yq5d+ S9rTtLuT5Pa1o9tzQNDSgnrhvR/UAEdR8vLNkC6169wPNAHA4/SXNdURDq3alg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQk7t04zTz14Ws for ; Tue, 09 Dec 2025 15:59:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 355ef by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 15:59:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: a35eae89cbdd - main - rman: Simplify initialization of internal globals List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: a35eae89cbddaac73d3b6c2b5c1b90e3a0c00997 Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 15:59:54 +0000 Message-Id: <6938477a.355ef.423ec863@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a35eae89cbddaac73d3b6c2b5c1b90e3a0c00997 commit a35eae89cbddaac73d3b6c2b5c1b90e3a0c00997 Author: John Baldwin AuthorDate: 2025-12-09 15:59:19 +0000 Commit: John Baldwin CommitDate: 2025-12-09 15:59:19 +0000 rman: Simplify initialization of internal globals Use TAILQ_HEAD_INITIALIZER and MTX_SYSINIT to remove the 'once' code from rman_init. Reviewed by: des Differential Revision: https://reviews.freebsd.org/D54142 --- sys/kern/subr_rman.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c index dbb09850d049..b8528104ba28 100644 --- a/sys/kern/subr_rman.c +++ b/sys/kern/subr_rman.c @@ -102,8 +102,10 @@ SYSCTL_INT(_debug, OID_AUTO, rman_debug, CTLFLAG_RWTUN, static MALLOC_DEFINE(M_RMAN, "rman", "Resource manager"); -struct rman_head rman_head; +struct rman_head rman_head = TAILQ_HEAD_INITIALIZER(rman_head); static struct mtx rman_mtx; /* mutex to protect rman_head */ +MTX_SYSINIT(rman_mtx, &rman_mtx, "rman head", MTX_DEF); + static int int_rman_release_resource(struct rman *rm, struct resource_i *r); static __inline struct resource_i * @@ -121,14 +123,6 @@ int_alloc_resource(int malloc_flag) int rman_init(struct rman *rm) { - static int once = 0; - - if (once == 0) { - once = 1; - TAILQ_INIT(&rman_head); - mtx_init(&rman_mtx, "rman head", NULL, MTX_DEF); - } - if (rm->rm_start == 0 && rm->rm_end == 0) rm->rm_end = ~0; if (rm->rm_type == RMAN_UNINIT) From nobody Tue Dec 9 15:59:55 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQk7v3YjDz6Kq75 for ; Tue, 09 Dec 2025 15:59:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQk7v1PDPz45g8 for ; Tue, 09 Dec 2025 15:59:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765295995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A7H+o+epioIgWPDWCYeGIT1iiXcuGiMIiAxNZfHnrw0=; b=lCQfXY2fn02BgCIQGb8fBdAEZW8HyOmKi5HoFxUGwe3vDfl076v4YtPk821QypQqJgqHnz 7O9xdKgVtbmuovgc2EZtfOviL4TcvJnjx5U15jp/6Gfqj+3b9gn4mtO6Y92w81kP2FRqN1 k6hQEHzj5/JE/hivVgoPN1slSD9jC6TS3jxfM6mSLzbBT68Thtt1JL6mr95ZRlLoork1xY //uwEwXkA+fTeRXwWYt7X/bxbz5wb9iiXqRsgIJsqqqRiRs4M3B8xs9wT7ZSDYKB/vZxzf AHroyEVrzTuweOLn3YGC9cgKVnfCLHIxldtG9QsFdMPw3LKudNVf2KDsM9tSew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765295995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A7H+o+epioIgWPDWCYeGIT1iiXcuGiMIiAxNZfHnrw0=; b=u+mQdRL5sbcBZI21nvyMp01kbdW2SgUgCTAXLB/ysALJumgf3ifBzTZrZPOl3wgSoZ0zS5 Zt5o/TU7n7lPUgA//OOj28xuEJGAPstHdJD3BzzTM+L/GrOljsopsIY/S375EJXx40wtIz 7vJT4XAJBdrgR00UROm8tdy8/10go09n3h7WEW9J8qYpD8nNLXvLkUfQMkAupc5nxv8IJ4 uArleEeVeiLdkyc1SMuGlAlv4ERWm8xmMvNQIxXBWg91yYXDvXJC8U2FNKobW0mNuv8xeO 9Pk45SaBUzC6nozW22VVJKONJf0sPvHueUDS15JE7QjuQIQLQKlwJTBZY4zOTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765295995; a=rsa-sha256; cv=none; b=DHin0sB53TIgel2/mj0MNCbHvYJYqP/Map/69TOVsFRHl1gj20zPCftZFI+vxeAcQCUY8h LPTFyKH77bbin1uR6K1SNMm7Wh7+Y+m887ySEGGYdIbHRzmp5HDKxTuKSdxZatlY2xNv6Y 8Q8k2f0M+OCx6wFGt85Zx4uLmBqT5ViNhAR1/k5HdPkunbRv4EUhUK7ySyanDJhiZGVT9K hkfzdmfX0btjHszr7Gt1dFaCuqudCKi9GyG1Um7mQK2BEN2j1w6Bnit7SIybS27F9VY1t6 GSUDOxuk7pL4MJIoF12A2m2DEI+bMeTtRDvxrwDXqeG3+jhnJ/yD+GmFGkDx+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQk7v0vHBz14Wt for ; Tue, 09 Dec 2025 15:59:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 350ae by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 15:59:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 305f85a3d6f2 - main - rman: Embed the mutex in struct rman instead of using a separate allocation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 305f85a3d6f2ec32ee8178413a716de7c0a73eaa Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 15:59:55 +0000 Message-Id: <6938477b.350ae.527f6dd@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=305f85a3d6f2ec32ee8178413a716de7c0a73eaa commit 305f85a3d6f2ec32ee8178413a716de7c0a73eaa Author: John Baldwin AuthorDate: 2025-12-09 15:59:30 +0000 Commit: John Baldwin CommitDate: 2025-12-09 15:59:30 +0000 rman: Embed the mutex in struct rman instead of using a separate allocation This used a separate allocation when rman was first imported (back when the lock was a pre-SMPng "simplelock" instead of a mutex). Reported by: des Reviewed by: des Differential Revision: https://reviews.freebsd.org/D54143 --- sys/kern/subr_rman.c | 68 +++++++++++++++++++++++++--------------------------- sys/sys/rman.h | 3 ++- 2 files changed, 34 insertions(+), 37 deletions(-) diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c index b8528104ba28..e09ca10f0a2e 100644 --- a/sys/kern/subr_rman.c +++ b/sys/kern/subr_rman.c @@ -131,10 +131,7 @@ rman_init(struct rman *rm) panic("implement RMAN_GAUGE"); TAILQ_INIT(&rm->rm_list); - rm->rm_mtx = malloc(sizeof *rm->rm_mtx, M_RMAN, M_NOWAIT | M_ZERO); - if (rm->rm_mtx == NULL) - return ENOMEM; - mtx_init(rm->rm_mtx, "rman", NULL, MTX_DEF); + mtx_init(&rm->rm_mtx, "rman", NULL, MTX_DEF); mtx_lock(&rman_mtx); TAILQ_INSERT_TAIL(&rman_head, rm, rm_link); @@ -159,7 +156,7 @@ rman_manage_region(struct rman *rm, rman_res_t start, rman_res_t end) r->r_end = end; r->r_rm = rm; - mtx_lock(rm->rm_mtx); + mtx_lock(&rm->rm_mtx); /* Skip entries before us. */ TAILQ_FOREACH(s, &rm->rm_list, r_link) { @@ -216,7 +213,7 @@ rman_manage_region(struct rman *rm, rman_res_t start, rman_res_t end) } } out: - mtx_unlock(rm->rm_mtx); + mtx_unlock(&rm->rm_mtx); return rv; } @@ -235,10 +232,10 @@ rman_fini(struct rman *rm) { struct resource_i *r; - mtx_lock(rm->rm_mtx); + mtx_lock(&rm->rm_mtx); TAILQ_FOREACH(r, &rm->rm_list, r_link) { if (r->r_flags & RF_ALLOCATED) { - mtx_unlock(rm->rm_mtx); + mtx_unlock(&rm->rm_mtx); return EBUSY; } } @@ -252,12 +249,11 @@ rman_fini(struct rman *rm) TAILQ_REMOVE(&rm->rm_list, r, r_link); free(r, M_RMAN); } - mtx_unlock(rm->rm_mtx); + mtx_unlock(&rm->rm_mtx); mtx_lock(&rman_mtx); TAILQ_REMOVE(&rman_head, rm, rm_link); mtx_unlock(&rman_mtx); - mtx_destroy(rm->rm_mtx); - free(rm->rm_mtx, M_RMAN); + mtx_destroy(&rm->rm_mtx); return 0; } @@ -267,16 +263,16 @@ rman_first_free_region(struct rman *rm, rman_res_t *start, rman_res_t *end) { struct resource_i *r; - mtx_lock(rm->rm_mtx); + mtx_lock(&rm->rm_mtx); TAILQ_FOREACH(r, &rm->rm_list, r_link) { if (!(r->r_flags & RF_ALLOCATED)) { *start = r->r_start; *end = r->r_end; - mtx_unlock(rm->rm_mtx); + mtx_unlock(&rm->rm_mtx); return (0); } } - mtx_unlock(rm->rm_mtx); + mtx_unlock(&rm->rm_mtx); return (ENOENT); } @@ -285,16 +281,16 @@ rman_last_free_region(struct rman *rm, rman_res_t *start, rman_res_t *end) { struct resource_i *r; - mtx_lock(rm->rm_mtx); + mtx_lock(&rm->rm_mtx); TAILQ_FOREACH_REVERSE(r, &rm->rm_list, resource_head, r_link) { if (!(r->r_flags & RF_ALLOCATED)) { *start = r->r_start; *end = r->r_end; - mtx_unlock(rm->rm_mtx); + mtx_unlock(&rm->rm_mtx); return (0); } } - mtx_unlock(rm->rm_mtx); + mtx_unlock(&rm->rm_mtx); return (ENOENT); } @@ -323,7 +319,7 @@ rman_adjust_resource(struct resource *rr, rman_res_t start, rman_res_t end) * allocated resource. */ rm = r->r_rm; - mtx_lock(rm->rm_mtx); + mtx_lock(&rm->rm_mtx); #ifdef INVARIANTS TAILQ_FOREACH(s, &rm->rm_list, r_link) { if (s == r) @@ -345,12 +341,12 @@ rman_adjust_resource(struct resource *rr, rman_res_t start, rman_res_t end) */ if (start < r->r_start && (s == NULL || (s->r_flags & RF_ALLOCATED) || s->r_start > start)) { - mtx_unlock(rm->rm_mtx); + mtx_unlock(&rm->rm_mtx); return (EBUSY); } if (end > r->r_end && (t == NULL || (t->r_flags & RF_ALLOCATED) || t->r_end < end)) { - mtx_unlock(rm->rm_mtx); + mtx_unlock(&rm->rm_mtx); return (EBUSY); } @@ -380,7 +376,7 @@ rman_adjust_resource(struct resource *rr, rman_res_t start, rman_res_t end) } else t->r_start = end + 1; } - mtx_unlock(rm->rm_mtx); + mtx_unlock(&rm->rm_mtx); /* * Handle the shrinking cases that require allocating a new @@ -392,7 +388,7 @@ rman_adjust_resource(struct resource *rr, rman_res_t start, rman_res_t end) new->r_start = r->r_start; new->r_end = start - 1; new->r_rm = rm; - mtx_lock(rm->rm_mtx); + mtx_lock(&rm->rm_mtx); r->r_start = start; s = TAILQ_PREV(r, resource_head, r_link); if (s != NULL && !(s->r_flags & RF_ALLOCATED)) { @@ -400,14 +396,14 @@ rman_adjust_resource(struct resource *rr, rman_res_t start, rman_res_t end) free(new, M_RMAN); } else TAILQ_INSERT_BEFORE(r, new, r_link); - mtx_unlock(rm->rm_mtx); + mtx_unlock(&rm->rm_mtx); } if (end < r->r_end) { new = int_alloc_resource(M_WAITOK); new->r_start = end + 1; new->r_end = r->r_end; new->r_rm = rm; - mtx_lock(rm->rm_mtx); + mtx_lock(&rm->rm_mtx); r->r_end = end; t = TAILQ_NEXT(r, r_link); if (t != NULL && !(t->r_flags & RF_ALLOCATED)) { @@ -415,7 +411,7 @@ rman_adjust_resource(struct resource *rr, rman_res_t start, rman_res_t end) free(new, M_RMAN); } else TAILQ_INSERT_AFTER(&rm->rm_list, r, new, r_link); - mtx_unlock(rm->rm_mtx); + mtx_unlock(&rm->rm_mtx); } return (0); } @@ -441,7 +437,7 @@ rman_reserve_resource(struct rman *rm, rman_res_t start, rman_res_t end, ("invalid flags %#x", flags)); new_rflags = (flags & ~RF_FIRSTSHARE) | RF_ALLOCATED; - mtx_lock(rm->rm_mtx); + mtx_lock(&rm->rm_mtx); r = TAILQ_FIRST(&rm->rm_list); if (r == NULL) @@ -628,7 +624,7 @@ rman_reserve_resource(struct rman *rm, rman_res_t start, rman_res_t end, */ out: - mtx_unlock(rm->rm_mtx); + mtx_unlock(&rm->rm_mtx); return (rv == NULL ? NULL : &rv->r_r); } @@ -640,9 +636,9 @@ rman_activate_resource(struct resource *re) r = re->__r_i; rm = r->r_rm; - mtx_lock(rm->rm_mtx); + mtx_lock(&rm->rm_mtx); r->r_flags |= RF_ACTIVE; - mtx_unlock(rm->rm_mtx); + mtx_unlock(&rm->rm_mtx); return 0; } @@ -652,9 +648,9 @@ rman_deactivate_resource(struct resource *r) struct rman *rm; rm = r->__r_i->r_rm; - mtx_lock(rm->rm_mtx); + mtx_lock(&rm->rm_mtx); r->__r_i->r_flags &= ~RF_ACTIVE; - mtx_unlock(rm->rm_mtx); + mtx_unlock(&rm->rm_mtx); return 0; } @@ -761,9 +757,9 @@ rman_release_resource(struct resource *re) r = re->__r_i; rm = r->r_rm; - mtx_lock(rm->rm_mtx); + mtx_lock(&rm->rm_mtx); rv = int_rman_release_resource(rm, r); - mtx_unlock(rm->rm_mtx); + mtx_unlock(&rm->rm_mtx); return (rv); } @@ -991,7 +987,7 @@ sysctl_rman(SYSCTL_HANDLER_ARGS) /* * Find the indexed resource and return it. */ - mtx_lock(rm->rm_mtx); + mtx_lock(&rm->rm_mtx); TAILQ_FOREACH(res, &rm->rm_list, r_link) { if (res->r_sharehead != NULL) { LIST_FOREACH(sres, res->r_sharehead, r_sharelink) @@ -1003,7 +999,7 @@ sysctl_rman(SYSCTL_HANDLER_ARGS) else if (res_idx-- == 0) goto found; } - mtx_unlock(rm->rm_mtx); + mtx_unlock(&rm->rm_mtx); return (ENOENT); found: @@ -1028,7 +1024,7 @@ found: ures.r_size = res->r_end - res->r_start + 1; ures.r_flags = res->r_flags; - mtx_unlock(rm->rm_mtx); + mtx_unlock(&rm->rm_mtx); error = SYSCTL_OUT(req, &ures, sizeof(ures)); return (error); } diff --git a/sys/sys/rman.h b/sys/sys/rman.h index 323da4a62201..2479942c3217 100644 --- a/sys/sys/rman.h +++ b/sys/sys/rman.h @@ -35,6 +35,7 @@ #ifndef _KERNEL #include #else +#include #include #include #endif @@ -112,7 +113,7 @@ TAILQ_HEAD(resource_head, resource_i); struct rman { struct resource_head rm_list; - struct mtx *rm_mtx; /* mutex used to protect rm_list */ + struct mtx rm_mtx; /* mutex used to protect rm_list */ TAILQ_ENTRY(rman) rm_link; /* link in list of all rmans */ rman_res_t rm_start; /* index of globally first entry */ rman_res_t rm_end; /* index of globally last entry */ From nobody Tue Dec 9 16:00:33 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQk8f2SL7z6Kq5R for ; Tue, 09 Dec 2025 16:00:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQk8f0YdZz46kG for ; Tue, 09 Dec 2025 16:00:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765296034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K9oh3NVwo2pNdL4N0SHCJHJchQ9vanT56W3wmY6ZGOA=; b=lwyhOq5b0QD0nRXW3Xhsv6g9JBfJ8JNxVd3yOH8Lag7aXGBUirNawMxjOfj1co0pG5xMiz 239lCsGzkbuv2LiMF33mcc0icQuzBsnLVIhmErX5zJHkBW+rS9yiHP6Y3kDlON5Iw7qZdN fLCbWVp0yU4JHsVTA1FE5h4YbFNawE2fWLYQ4JTxW8xgsZ2Jb7IAl6EU1wcfInFiRom9RN nyPmanbDB1eGHQGMfj4P45FWsYPbTM+WEfXoBvIqYotTZqkVdxaRBKdeyNEcD4W/UDfutq i8sEJxb+os2WezTQSzxz2GReSWDI6r/mNYuhsjp6rOzTdc/SNdvOVRP3zC7O2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765296034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K9oh3NVwo2pNdL4N0SHCJHJchQ9vanT56W3wmY6ZGOA=; b=szhXJFrUdsdim76SE1GDQx0BqJ0SyAgsRrJmP80sDRJMt1RMHJKNrRM+pbOzDUnMdQ4dHj IkMBAh2rPrf1XRBYJEpkATx5P6j6/9x0ahlylHZliNq5AdHTIvt32fcOAeNdcv0fNS+hL6 5V28gHBEhIdO9qXdxIdyAviVYoWS2Ck/7wd7gdyWPdUqbCOo2wsyUNKy9F9EAhWljgkVkr Vuda1blpp4hN9fzfVjlAj2cgdGd93R+qzQ6Jk5p6mBW7vRFEtlHrMaLosVCIkVHH9VanVB lbIPUUJMb613sUAl95WwtJeVaKq4PCboar4VdgES9qeYqbo+StPWQh6MkciZRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765296034; a=rsa-sha256; cv=none; b=ijZ1xI+9Ova+SKDhejZmgDVHFhowju++DHUFnZXTAKjpRyoMFdqkZy3bcdwpcQEFvIh8cP kh12pei1DW4JiC9JcU6GwU/qhlAy7NPryR8ctQt3qULeIZWACMBnu3G5fPML0Pmr5umQkW Vh4tFmKYgNMem6l7O5SmK+1NjS7IgvPcd/WiLbVrUH95TqzXzXqVyyNXCax6GXy3ebwCCm iKKHq+xF8VdshSvm0TQsLddHZcIzp7+UtVu5iZwlnfS4PjX0Gh8wwrx7TjEwEQlNqoqDm/ 2vHLsSMnpA7nJ1YmM84pW+nN2ldZVwVF89o9HM/i8qTXDnLhQMAQP4NyCVhfkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQk8d6tpZz15Gc for ; Tue, 09 Dec 2025 16:00:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 350d7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 16:00:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 701e4b36b451 - main - zfs: Reuse ZINCDIR variable from kmod.mk List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 701e4b36b4510c8cf26155ec3ab5aca9b7ba9406 Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 16:00:33 +0000 Message-Id: <693847a1.350d7.13f68bc8@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=701e4b36b4510c8cf26155ec3ab5aca9b7ba9406 commit 701e4b36b4510c8cf26155ec3ab5aca9b7ba9406 Author: John Baldwin AuthorDate: 2025-12-09 16:00:20 +0000 Commit: John Baldwin CommitDate: 2025-12-09 16:00:20 +0000 zfs: Reuse ZINCDIR variable from kmod.mk Reviewed by: brooks, imp Differential Revision: https://reviews.freebsd.org/D54147 --- sys/modules/zfs/Makefile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sys/modules/zfs/Makefile b/sys/modules/zfs/Makefile index 7a4d0bb51376..2751bb465258 100644 --- a/sys/modules/zfs/Makefile +++ b/sys/modules/zfs/Makefile @@ -1,5 +1,4 @@ SRCDIR=${SRCTOP}/sys/contrib/openzfs/module -INCDIR=${SRCTOP}/sys/contrib/openzfs/include KMOD= zfs @@ -27,11 +26,11 @@ KMOD= zfs ${SRCDIR}/zstd/lib/compress \ ${SRCDIR}/zstd/lib/decompress -CFLAGS+= -I${INCDIR} +CFLAGS+= -I${ZINCDIR} CFLAGS+= -I${SRCDIR}/icp/include -CFLAGS+= -I${INCDIR}/os/freebsd -CFLAGS+= -I${INCDIR}/os/freebsd/spl -CFLAGS+= -I${INCDIR}/os/freebsd/zfs +CFLAGS+= -I${ZINCDIR}/os/freebsd +CFLAGS+= -I${ZINCDIR}/os/freebsd/spl +CFLAGS+= -I${ZINCDIR}/os/freebsd/zfs CFLAGS+= -I${SRCDIR}/zstd/include CFLAGS+= -I${.CURDIR} @@ -388,7 +387,7 @@ SRCS+= zfs_zstd.c \ .include CFLAGS+= -include ${SRCTOP}/sys/cddl/compat/opensolaris/sys/debug_compat.h -CFLAGS+= -include ${INCDIR}/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -include ${ZINCDIR}/os/freebsd/spl/sys/ccompile.h CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/static_ccompile.h CFLAGS.sysctl_os.c= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h From nobody Tue Dec 9 17:42:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQmQR3J1cz6JH7Z for ; Tue, 09 Dec 2025 17:42:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQmQR2P57z3Xm8 for ; Tue, 09 Dec 2025 17:42:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765302159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rqf4U+71/1ZqZC89cAoxA5E+nTc13p9GGQxpj72X1O4=; b=oltTtT42yJPaGJoGlgtsdTNt3ujNeGYG7skz3erExaOGk9jYONRTveYmbyLd9G5rknRsaM nnW1eSndHp6KSgmN2x/FZzJm0Ljaf9udy83UKQWYgvK2BGGp1IFcVWMW5MS65QQNEGMwjv ZaeRGKW14KvALSfxsdXnP3zbf0J2nzkMTEIgkTPSzkD12SLsFWwW4iT6tOdPcM+wenRGve yQ8+fUGrpJ+LCL6bkKZ9YsRRQ/cgjsvnlw+zibVz0O9XKluh7R2lAN0QLhva4GBnpO8wAh wqUqfg2VBqTf15fv+AB9wNjsis5MeGcqtdP1h4YNSYuS9iTWsgKOTmN28tQ77Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765302159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rqf4U+71/1ZqZC89cAoxA5E+nTc13p9GGQxpj72X1O4=; b=XzPYkIZQIM6H+Nnw/vSOirBJaRXyL/B+aC1mN2nnMpVz3jPlTzYfH3/Q9dR/iH6y0RPZWS SiQ2//NuS+ZwStdKumEepDlgT8BDZR6IW4zLH///Beo3gwqaDL/aoB2FiIm3kLoJ8zgVuz IV25Gh2qlV9xu4ioNimJgvLKlIQ5AuqY7fDvrBbY+vNr1AJ87LmwDuA7IYOC33rPb8EoTX BYkom3wl/BweCY358JpqTUXaWam1Dmp4UgYyWfmuZzKVYmvh7NQTnhUz2jWFUEv5LpEP6R BglWXmsySCrmjGvRHKOmdqoen6GKUSWK37Pxm18UZeaTHAacSrOcIpYj+vOQjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765302159; a=rsa-sha256; cv=none; b=EcVoeAO/QxbLcKWLMQ/xRsBzScMzdGIQ4VXkWd0mf8SEmjlOE220fXPdF75f2ssQzLIdR3 ekJN37OZAX0udWsmgqe6VHxI4I9CHSIeptQPYT7I5GcqfddEDrDvNB3fZN/FdKynQIu9// yrWmVG6MVCKIfdxiTZuN4PmdjSr0N8UARZeKzvFgfZ6cira/KLTC+KUs2dgs8xziPHR6Dg aOFzviwuK2oQ34kl2ZkfPIGLkbDtmdWiOWGnZXfy7fX8dgWmmMHTuWgWmXh5tYNZsgMlPm o5CQNuztc2bgEZa0CtEsMl83U942twrM+gXTZZLAaPH+ZedeFwWfSmBAS+aQgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQmQR1rB9z17xm for ; Tue, 09 Dec 2025 17:42:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ed52 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 17:42:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 0f12ee8ae1a8 - main - linux: fix build without VIMAGE List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 0f12ee8ae1a81598541b703ba25b250dedff7803 Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 17:42:39 +0000 Message-Id: <69385f8f.ed52.541dbe85@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=0f12ee8ae1a81598541b703ba25b250dedff7803 commit 0f12ee8ae1a81598541b703ba25b250dedff7803 Author: Gleb Smirnoff AuthorDate: 2025-12-09 17:42:19 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-09 17:42:19 +0000 linux: fix build without VIMAGE Fixes: fbf05d2147b1add8b760be166c4b1fd4499ebce8 --- sys/compat/linux/linux_if.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linux/linux_if.c b/sys/compat/linux/linux_if.c index 7c55ab9fd49c..1281207c1c84 100644 --- a/sys/compat/linux/linux_if.c +++ b/sys/compat/linux/linux_if.c @@ -25,6 +25,7 @@ #include #include +#include #include #include #include From nobody Tue Dec 9 18:16:38 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQn9f4BrMz6JKFF for ; Tue, 09 Dec 2025 18:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQn9f3Vvxz3c5K for ; Tue, 09 Dec 2025 18:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765304198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dI+cgp1Ipzw4EPT4JktUFgGNasiJtMdZ8gn0v4hd2hU=; b=kNt+SiQ0sXEyONC4Ykmkytrxdn1YkjNhJDJ1aFraxVW+Hkr9aSiv5iGwVAio5hIo9s9Zqs xjzQFfW/8vVhv2pE74O+B64xpVfJ0+gX2oBsHNQ1IAkZfWft86y4BxejT5WyXHecTXLgjm kUzxEjc/UZv1aIbqKyJL6Wz91jqzuaxSu4i6n1M1d+bEQSUoljicQiqzsCRy+YxKO4vlBC nSxaV9s751mGa3oq2rjrRRN/Dmj9XS6zT5KXI1N5Fw4FATPlPjvUyN8tCkYJUgToznBl72 5IeP1NHNXAIGy4ibY5ey6qZJYJ55f3y8kdJhPeXNGZNbGsA8QmCTo9MAIFForQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765304198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dI+cgp1Ipzw4EPT4JktUFgGNasiJtMdZ8gn0v4hd2hU=; b=PNmQgfJV8q0+O5UWK3w1iiAtD/uSkl/AsumRoMyO6XFP0tPXSC9eLH1UpQgH1Ss+Qjzg8u IIY3Ex5YOZjU8Pi1LgA1OBmh7R1GlkKeedVMn0OqMpDSa48vHYos/0WOAwtAfu0MNTFhTu OweiSwU5U5DVS2rne3veQCnNYrfPDsxJ4rYd0VzT8wdc5TdrOsy/GsOkfAtlollcdW0X3A yCFulHegccmHXMbYqKSYxrgr/YbWZ4feSeuaEQMCa4vSJkt7e0fWF74qbG8bpI2pRGwA2H AXHM4TSpZShEBLxuO2yfeoXdb2raSeenL0BzJn2oYDTS9byYoR82l32XPaXBXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765304198; a=rsa-sha256; cv=none; b=PVXqHLsBGPfbYajoB+I6cmK/nYx43eXson5F1yzFZo1cesHW3hixauniu+vhSyvYpY2VeV l9IgyNLJb2rkLR/1ZZfePvWUOoJ55Asd8gmGeXkVoIO3667YJBXCLBx1w0QlDLOJ/JAwa3 jFGuFud+6JXgJ6ueLcjIbNMMwNYEB6AOGnywYjkxSM0eUiNI9wcBQXzOiMTyRPky302uwG Tj8T6t84P4qU/O/ddehKadhJ7+T+ho0QR/9rftULfX3ktu9LaPdkxFNq9qF/o/rixjw/UK 2MV4WvdZVHsPNcTiyV5D/rL8BYL17i3ocR6fCiGdSDbQw9Yy7Ty+wb3iFfYRcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQn9f2q6bz18w7 for ; Tue, 09 Dec 2025 18:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24471 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 18:16:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Jean-=?utf-8?Q?S=C3=A9bast?==?utf-8?Q?ien P=C3=A9?=dron From: Ed Maste Subject: git: cf39b51d36d8 - main - linuxkpi: Take const root in read-only radix tree functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: cf39b51d36d82214ebdfd03055d321ddd2d85274 Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 18:16:38 +0000 Message-Id: <69386786.24471.48db54c3@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=cf39b51d36d82214ebdfd03055d321ddd2d85274 commit cf39b51d36d82214ebdfd03055d321ddd2d85274 Author: Jean-Sébastien Pédron AuthorDate: 2025-09-07 16:40:49 +0000 Commit: Ed Maste CommitDate: 2025-12-09 18:16:16 +0000 linuxkpi: Take const root in read-only radix tree functions This is a preparation step for a future addition to this file. This is also closer to what Linux does. Reviewed by: emaste Sponsored by: The FreeBSD Foundation --- sys/compat/linuxkpi/common/include/linux/radix-tree.h | 4 ++-- sys/compat/linuxkpi/common/src/linux_radix.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/radix-tree.h b/sys/compat/linuxkpi/common/include/linux/radix-tree.h index ea75836c26fb..1019697303db 100644 --- a/sys/compat/linuxkpi/common/include/linux/radix-tree.h +++ b/sys/compat/linuxkpi/common/include/linux/radix-tree.h @@ -74,11 +74,11 @@ radix_tree_exception(void *arg) return ((uintptr_t)arg & RADIX_TREE_ENTRY_MASK); } -void *radix_tree_lookup(struct radix_tree_root *, unsigned long); +void *radix_tree_lookup(const struct radix_tree_root *, unsigned long); void *radix_tree_delete(struct radix_tree_root *, unsigned long); int radix_tree_insert(struct radix_tree_root *, unsigned long, void *); int radix_tree_store(struct radix_tree_root *, unsigned long, void **); -bool radix_tree_iter_find(struct radix_tree_root *, struct radix_tree_iter *, void ***); +bool radix_tree_iter_find(const struct radix_tree_root *, struct radix_tree_iter *, void ***); void radix_tree_iter_delete(struct radix_tree_root *, struct radix_tree_iter *, void **); #endif /* _LINUXKPI_LINUX_RADIX_TREE_H_ */ diff --git a/sys/compat/linuxkpi/common/src/linux_radix.c b/sys/compat/linuxkpi/common/src/linux_radix.c index af53d8bff366..ee6b3a63c370 100644 --- a/sys/compat/linuxkpi/common/src/linux_radix.c +++ b/sys/compat/linuxkpi/common/src/linux_radix.c @@ -41,7 +41,7 @@ static MALLOC_DEFINE(M_RADIX, "radix", "Linux radix compat"); static inline unsigned long -radix_max(struct radix_tree_root *root) +radix_max(const struct radix_tree_root *root) { return ((1UL << (root->height * RADIX_TREE_MAP_SHIFT)) - 1UL); } @@ -64,7 +64,7 @@ radix_tree_clean_root_node(struct radix_tree_root *root) } void * -radix_tree_lookup(struct radix_tree_root *root, unsigned long index) +radix_tree_lookup(const struct radix_tree_root *root, unsigned long index) { struct radix_tree_node *node; void *item; @@ -85,8 +85,8 @@ out: } bool -radix_tree_iter_find(struct radix_tree_root *root, struct radix_tree_iter *iter, - void ***pppslot) +radix_tree_iter_find(const struct radix_tree_root *root, + struct radix_tree_iter *iter, void ***pppslot) { struct radix_tree_node *node; unsigned long index = iter->index; From nobody Tue Dec 9 19:59:12 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQqS10n2qz6JjdC for ; Tue, 09 Dec 2025 19:59:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQqS102k9z3sZh for ; Tue, 09 Dec 2025 19:59:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765310353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=my7rUxY41Q/0RVx/MY/WS/GEiAqXl9cadZgZEgVW/QY=; b=jud+NebyqwopXKPM+WS6hR08JvR8fHZ7Fv/a265214kTq7M+/n0R1eKR896LucF2NtBLVX ZpJ5pOzrUh4jk3Z5Dm/PC+u1FZl04PwhVKd4GjniH2jQ+bW4MhWf83bCc+BQw8qlP5PFjB nXI2Kvz79ibPerrhUIEsea6HT6kYdIv0bftQdi9gWzFpvtak7f4rlg8mH9TxEnbtl/Lmpg B1al86Mt0ifqoE5m0cjZ1nDa/D7ASSFGQF8fYmb7L41UiiZ1b4os0xwFVy1NpuPNYiqGXU fGqvxK86JkBR+YQIySMj+E7JELNj43yppayypZ1/SRTDtS/zBwePt0JOU36eVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765310353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=my7rUxY41Q/0RVx/MY/WS/GEiAqXl9cadZgZEgVW/QY=; b=D4vp7arrElmEhHhB6lii/T5zzP6PblNYe/sLowUHd/bXQ3EZs+mVPxUFcgOmHoamGEAbwR pi+8X3fhF1yEOYmENfXfZLwneIUevsuqm7Kk/lMLv9qV/e1G/rXdDZ/gEIPniiMUrCkuhi S4SHYjWS4zbHX6RafVXqk2kzvz7oNR4r2SIJjAXUMwDjgRa+lE68rvH3jszY3JKCMNnMD2 1oZs4m3+FV/lpCyYf4+/9pfKby5a8GPfjbSNvLe51TOIE/ylzmhAm5M8aqzoDxNahYUUvw Uge05aRDdZL8XVeuarE0XpAoC7ZewIb511MDmP4G6skvOlycAqhXm4oemHM9uA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765310353; a=rsa-sha256; cv=none; b=GWh8OtWEy+6psIrY+teklzc+B6Dl51lu0Ue72/U8Iqvl9kHKokfLEo57U7dWKEc98qleUz oSCl62wJzeL7+IyrteRj72Gul43juibiD/nKezIP6DXliZDITSBt1SUVCP4HOR/63HFCuf ThmbQ0yKX5U1wM5gZpGYm6+J4s4J7fk2ccj01zKrWBrs9hSLwVM5FLgkcjanYDXB8J/k8d Bap9EJ/ge0NdaJRhWcLGV6QmMOcNFh9WARg3ZHB9BmMq+XdK1vZ4PHdbSetQFA40kalusq tr0ggKi5zZZnzH3L8zbJvCBhzuganLbFLNlw1H/eLESFuS0GpXguibK0QvP9UQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQqS06llwz1BbF for ; Tue, 09 Dec 2025 19:59:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2e589 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 19:59:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 12165ac8407c - main - Revert "netlink: Fix overallocation of netlink message buffers" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 12165ac8407cef2c0b96035a1a956e3a7fe48cec Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 19:59:12 +0000 Message-Id: <69387f90.2e589.323f82c3@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=12165ac8407cef2c0b96035a1a956e3a7fe48cec commit 12165ac8407cef2c0b96035a1a956e3a7fe48cec Author: John Baldwin AuthorDate: 2025-12-09 19:55:46 +0000 Commit: John Baldwin CommitDate: 2025-12-09 19:55:46 +0000 Revert "netlink: Fix overallocation of netlink message buffers" This patch was based on an incorrect assumption that the linear buffer chain for an snl_writer only contained the netlink message body. This reverts commit 828df4d36d9d5a6ca0dcc294d65572b4a0474142. Sponsored by: AFRL, DARPA --- sys/netlink/netlink_snl.h | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/sys/netlink/netlink_snl.h b/sys/netlink/netlink_snl.h index 1e560e029718..57f7e1e29d08 100644 --- a/sys/netlink/netlink_snl.h +++ b/sys/netlink/netlink_snl.h @@ -1082,7 +1082,6 @@ snl_init_writer(struct snl_state *ss, struct snl_writer *nw) static inline bool snl_realloc_msg_buffer(struct snl_writer *nw, size_t sz) { - void *new_base; uint32_t new_size = nw->size * 2; while (new_size < nw->size + sz) @@ -1091,27 +1090,23 @@ snl_realloc_msg_buffer(struct snl_writer *nw, size_t sz) if (nw->error) return (false); - new_base = snl_allocz(nw->ss, new_size); - if (new_base == NULL) { + if (snl_allocz(nw->ss, new_size) == NULL) { nw->error = true; return (false); } + nw->size = new_size; - if (new_base == nw->ss->lb->base) { - /* Claim the entire linear buffer. */ - nw->size = nw->ss->lb->size; - nw->ss->lb->offset = nw->ss->lb->size; - } else - nw->size = new_size; - - memcpy(new_base, nw->base, nw->offset); - if (nw->hdr != NULL) { - int hdr_off = (char *)(nw->hdr) - nw->base; + void *new_base = nw->ss->lb->base; + if (new_base != nw->base) { + memcpy(new_base, nw->base, nw->offset); + if (nw->hdr != NULL) { + int hdr_off = (char *)(nw->hdr) - nw->base; - nw->hdr = (struct nlmsghdr *) - (void *)((char *)new_base + hdr_off); + nw->hdr = (struct nlmsghdr *) + (void *)((char *)new_base + hdr_off); + } + nw->base = (char *)new_base; } - nw->base = (char *)new_base; return (true); } From nobody Tue Dec 9 20:12:32 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQqlN5SLkz6JkmY for ; Tue, 09 Dec 2025 20:12:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQqlN3nXlz3wQV for ; Tue, 09 Dec 2025 20:12:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765311152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SHHnHqpDbkALY7jhvrwG5z1uPE3FIU2yWdi3N1UIUL4=; b=CcbPljJ7qEayVTJsi1e1MJpR6uZ/fEN5K/HeiKiseyce62yKIEmJqvymRk5JEl/SHroupU 4znvEyOQlwzhwoprjfLelAb3SrJsmBWacDOB36iVlyf+C4Me44QkS1MLR9Lpq0xWjk0imN Zs+tMZJzSLQosgKRkPlPougEovknit6uhZAUkffv5zBonP2RZCx308rbUzA2WEglzxgsQm hXLWJTHlbEAYTtQIrhxExpuejAENDaO5MkSfCzyAbVfaGfjLL3MJW8DvmwQxUTV75CKWri 1EggQ/T2pH+TEHDc4iZksBqYOTFg46QnHvgknC99buIIHVTwEmXmDywZXXiAWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765311152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SHHnHqpDbkALY7jhvrwG5z1uPE3FIU2yWdi3N1UIUL4=; b=DEI4VD5mUP4AZeYP3q3sPykw0oNcm2ZN2DgPrGNm3SGBZNeFilwqyR51CNqNHuCGs32SnW poGXt5wtdvD/MlVQkvA7BlFewBvMtYrJOd1CNb14naNci6QDGHZYkSzBoKcCuC8w1Zrn0e PUMgvkuo02IpyN7JXX/Mt8GHQ7O1c2pyNeyn0nar5mPdvuu+Fz3y6nqOPwIcGmXNtYact/ dyGylG8vhzLTlGiWcXFDJgVzJJpELRgUsYRQwin5dPrBONTTEhjXMv1NRLcx0xEwVgArxE UAuciHRTfiOskJH/jfK5GaLwbMmzQSkpl25buZvN/QlThWl0zy2s/hvcK0EsIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765311152; a=rsa-sha256; cv=none; b=nCvIy+JzchaH/mqKnjaqojN2ehAI3dwpxVgxBGjkkuhJYJyNodAZoAYvNRLXz/DO6AiQNL SQpHQfZGsawFTClczAfHIWpw3tbvbLxL7yCT7Ed846XUsfdjg5sfiGdo3mrCW9tHqETvIj 589PycBQhIiXWN/joizkU1+xYPs3Q0n5gJIjUm9NSX4k1xlv7iZMDNFVSmQahVf/SQe6Cy sd+Vw/8pFw+jIvbJnM5cyyL7QPdkI9JcokwS30DuEKVHko3a8FVOPA992HSulZjZrnN9Ry fNGGnaoksbtvXIbI20t8/ofmhGAPIEUAq+29SR2ABX2MPusS878hbHYkebu9lQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQqlN3KxYz1CxM for ; Tue, 09 Dec 2025 20:12:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2e750 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 20:12:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: e279724ae5a7 - main - resource_list_reserve: Pass rid by value List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: e279724ae5a720c84cd86f1ce6fdac31fb94e735 Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 20:12:32 +0000 Message-Id: <693882b0.2e750.56f0c6cd@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e279724ae5a720c84cd86f1ce6fdac31fb94e735 commit e279724ae5a720c84cd86f1ce6fdac31fb94e735 Author: John Baldwin AuthorDate: 2025-12-09 20:00:20 +0000 Commit: John Baldwin CommitDate: 2025-12-09 20:00:20 +0000 resource_list_reserve: Pass rid by value Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D53403 --- sys/dev/acpica/acpi.c | 2 +- sys/dev/dpaa2/dpaa2_rc.c | 2 +- sys/dev/pci/pci.c | 23 +++++++++++------------ sys/kern/subr_bus.c | 6 +++--- sys/sys/bus.h | 2 +- 5 files changed, 17 insertions(+), 18 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index a40ee709e762..408570f53a21 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -1525,7 +1525,7 @@ acpi_reserve_resources(device_t dev) * acpi_alloc_resource() will sub-alloc from the system * resource. */ - resource_list_reserve(rl, dev, children[i], rle->type, &rle->rid, + resource_list_reserve(rl, dev, children[i], rle->type, rle->rid, rle->start, rle->end, rle->count, 0); } } diff --git a/sys/dev/dpaa2/dpaa2_rc.c b/sys/dev/dpaa2/dpaa2_rc.c index c360b6fcc929..36cacd1daa4b 100644 --- a/sys/dev/dpaa2/dpaa2_rc.c +++ b/sys/dev/dpaa2/dpaa2_rc.c @@ -3321,7 +3321,7 @@ dpaa2_rc_add_res(device_t rcdev, device_t child, enum dpaa2_dev_type devtype, /* Reserve a newly added DPAA2 resource. */ res = resource_list_reserve(&dinfo->resources, rcdev, child, devtype, - rid, (rman_res_t) dpaa2_dev, (rman_res_t) dpaa2_dev, 1, + *rid, (rman_res_t) dpaa2_dev, (rman_res_t) dpaa2_dev, 1, flags & ~RF_ACTIVE); if (!res) { device_printf(rcdev, "%s: failed to reserve %s (rid=%d) for: %s " diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 6d929b2f236c..d42388a15a04 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -3481,7 +3481,7 @@ pci_add_map(device_t bus, device_t dev, int reg, struct resource_list *rl, * driver for this device will later inherit this resource in * pci_alloc_resource(). */ - res = resource_list_reserve(rl, bus, dev, type, ®, start, end, count, + res = resource_list_reserve(rl, bus, dev, type, reg, start, end, count, flags); if ((pci_do_realloc_bars || pci_has_quirk(pci_get_devid(dev), PCI_QUIRK_REALLOC_BAR)) @@ -3494,7 +3494,7 @@ pci_add_map(device_t bus, device_t dev, int reg, struct resource_list *rl, */ resource_list_delete(rl, type, reg); resource_list_add(rl, type, reg, 0, ~0, count); - res = resource_list_reserve(rl, bus, dev, type, ®, 0, ~0, + res = resource_list_reserve(rl, bus, dev, type, reg, 0, ~0, count, flags); } if (res == NULL) { @@ -3553,11 +3553,11 @@ pci_ata_maps(device_t bus, device_t dev, struct resource_list *rl, int force, } else { rid = PCIR_BAR(0); resource_list_add(rl, type, rid, 0x1f0, 0x1f7, 8); - (void)resource_list_reserve(rl, bus, dev, type, &rid, 0x1f0, + (void)resource_list_reserve(rl, bus, dev, type, rid, 0x1f0, 0x1f7, 8, 0); rid = PCIR_BAR(1); resource_list_add(rl, type, rid, 0x3f6, 0x3f6, 1); - (void)resource_list_reserve(rl, bus, dev, type, &rid, 0x3f6, + (void)resource_list_reserve(rl, bus, dev, type, rid, 0x3f6, 0x3f6, 1, 0); } if (progif & PCIP_STORAGE_IDE_MODESEC) { @@ -3568,11 +3568,11 @@ pci_ata_maps(device_t bus, device_t dev, struct resource_list *rl, int force, } else { rid = PCIR_BAR(2); resource_list_add(rl, type, rid, 0x170, 0x177, 8); - (void)resource_list_reserve(rl, bus, dev, type, &rid, 0x170, + (void)resource_list_reserve(rl, bus, dev, type, rid, 0x170, 0x177, 8, 0); rid = PCIR_BAR(3); resource_list_add(rl, type, rid, 0x376, 0x376, 1); - (void)resource_list_reserve(rl, bus, dev, type, &rid, 0x376, + (void)resource_list_reserve(rl, bus, dev, type, rid, 0x376, 0x376, 1, 0); } pci_add_map(bus, dev, PCIR_BAR(4), rl, force, @@ -3815,7 +3815,7 @@ pci_reserve_secbus(device_t bus, device_t dev, pcicfgregs *cfg, struct resource *res; char *cp; rman_res_t start, end, count; - int rid, sec_bus, sec_reg, sub_bus, sub_reg, sup_bus; + int sec_bus, sec_reg, sub_bus, sub_reg, sup_bus; switch (cfg->hdrtype & PCIM_HDRTYPE) { case PCIM_HDRTYPE_BRIDGE: @@ -3895,8 +3895,7 @@ pci_reserve_secbus(device_t bus, device_t dev, pcicfgregs *cfg, if (pci_clear_buses) goto clear; - rid = 0; - res = resource_list_reserve(rl, bus, dev, PCI_RES_BUS, &rid, + res = resource_list_reserve(rl, bus, dev, PCI_RES_BUS, 0, start, end, count, 0); if (res != NULL) return; @@ -3945,7 +3944,7 @@ pci_alloc_secbus(device_t dev, device_t child, int rid, rman_res_t start, if (resource_list_find(rl, PCI_RES_BUS, rid) == NULL) resource_list_add(rl, PCI_RES_BUS, rid, start, end, count); if (!resource_list_reserved(rl, PCI_RES_BUS, rid)) { - res = resource_list_reserve(rl, dev, child, PCI_RES_BUS, &rid, + res = resource_list_reserve(rl, dev, child, PCI_RES_BUS, rid, start, end, count, flags & ~RF_ACTIVE); if (res == NULL) { resource_list_delete(rl, PCI_RES_BUS, rid); @@ -4106,7 +4105,7 @@ pci_add_resources_ea(device_t bus, device_t dev, int alloc_iov) continue; resource_list_add(rl, type, rid, start, end, count); - res = resource_list_reserve(rl, bus, dev, type, &rid, start, end, count, + res = resource_list_reserve(rl, bus, dev, type, rid, start, end, count, flags); if (res == NULL) { resource_list_delete(rl, type, rid); @@ -5591,7 +5590,7 @@ pci_reserve_map(device_t dev, device_t child, int type, int *rid, * appropriate BAR for that resource. */ resource_list_add(rl, type, *rid, start, end, count); - res = resource_list_reserve(rl, dev, child, type, rid, start, end, + res = resource_list_reserve(rl, dev, child, type, *rid, start, end, count, flags & ~RF_ACTIVE); if (res == NULL) { resource_list_delete(rl, type, *rid); diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 86538ac8b9d8..d2363d6c625e 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -3096,7 +3096,7 @@ resource_list_delete(struct resource_list *rl, int type, int rid) */ struct resource * resource_list_reserve(struct resource_list *rl, device_t bus, device_t child, - int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) + int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource_list_entry *rle = NULL; int passthrough = (device_get_parent(child) != bus); @@ -3109,10 +3109,10 @@ resource_list_reserve(struct resource_list *rl, device_t bus, device_t child, panic( "resource_list_reserve() should only reserve inactive resources"); - r = resource_list_alloc(rl, bus, child, type, *rid, start, end, count, + r = resource_list_alloc(rl, bus, child, type, rid, start, end, count, flags); if (r != NULL) { - rle = resource_list_find(rl, type, *rid); + rle = resource_list_find(rl, type, rid); rle->flags |= RLE_RESERVED; } return (r); diff --git a/sys/sys/bus.h b/sys/sys/bus.h index 96e3da3498ea..10f596654150 100644 --- a/sys/sys/bus.h +++ b/sys/sys/bus.h @@ -393,7 +393,7 @@ int resource_list_release_active(struct resource_list *rl, struct resource * resource_list_reserve(struct resource_list *rl, device_t bus, device_t child, - int type, int *rid, + int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); int resource_list_unreserve(struct resource_list *rl, From nobody Tue Dec 9 20:12:33 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQqlQ0Lhxz6JkY2 for ; Tue, 09 Dec 2025 20:12:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQqlP4LmHz3wQZ for ; Tue, 09 Dec 2025 20:12:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765311153; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J713WTXvITnv93bRGkGmE869Wcgm2mbDotNjvbRQoZQ=; b=btmVEg4pPokRlZKzeF232Z79+cfMuEqJ6TFx+NbD09BAJ9y/xyVGshYRvr2dLipASJUbpX Ab7+cGYBd+8dqa3nMbj23xMN2AFyg9R5nsdLWvjPIIveIqq8xKB7vKxR7gebSwQA3p0o1P wPtWLiPNCb3toyWUnFNJipwlNMV3Ki0S6JzpRNrj029FELremwTM6jsph8ylnBTa3K8g/S V8k1HCnQNZ4INibOZCneU+INP8mMbZiJvIQNpNMO+u9XVaIImkPrcn2+ji3d/5pr0XM6YW UObpnwctcHCIWq68OawPYoud7nyVOOpCkgkU7RVBR6OyDTqC8QRGtOkBOYBHxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765311153; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J713WTXvITnv93bRGkGmE869Wcgm2mbDotNjvbRQoZQ=; b=OfR0/KcKpTt90BiN11fNGe9YF5zsLwIHPonUQLseAqjbSrnynJBAyy1/ySJHSp8G7Bd0dh Vsn2LR15M8VlFkuocwYWEQaNIFAqVLQltO7O0F2Hl7gXJ0IT8169mCYlp/PwJaG5arMiog TkTph145ly4+7jn8kaMVDRfJUG9ETGtAYOYMF+3K4rzPenPPAYYnC5f0VitdiApXPToQWe PF09Z4OKsYNP0vvo/SVi8bE1cRCOW+PX3Yq7jkRRbrS4fTkFL5yBC2yYN4eOehsVMnV7g5 gxDEn3PcTqoetZspTMqE2UhzUh1VhE9sTWjmw23B5K4bHyTzYosqP0bjGmOIRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765311153; a=rsa-sha256; cv=none; b=DK21HLlIbVeEIXLzuq4fnasTnhtciqSl7eKULmXTxq0dOO2qDprU6DcO8nkuJhx9Ndb5EV zLIsbJdA1IJGW9qbWYNeJ+7Hsho7eyu0a50+vCqZzqyXzJhnIo66TCzIqQA95+5z8A+6Mf 1CMzPvJfYqQJOSUPeegWb9TrtGZdhlI2WEnGkX8772BP5Rzl4m5ZQgnwILivlETKiLgg0P RLP9JCJRTBOZAjAHd/70WgfBpakAWcfkywBTb+dYT4H2VxftM51jQYWLqCk+v+ZvYxHQyK 5O5dN9xQwPBbJCXGnHPEUGbjHMxWDOeIHxk2KN2Xx2IpcF4tRphzOzYZF9dWZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQqlP3t8Bz1CxN for ; Tue, 09 Dec 2025 20:12:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30b27 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 20:12:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: d9f1922a33ee - main - pci_reserve_map: Pass rid by value List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: d9f1922a33eeea6b9eed29b158acaf4387568485 Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 20:12:33 +0000 Message-Id: <693882b1.30b27.449b5b87@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d9f1922a33eeea6b9eed29b158acaf4387568485 commit d9f1922a33eeea6b9eed29b158acaf4387568485 Author: John Baldwin AuthorDate: 2025-12-09 20:02:33 +0000 Commit: John Baldwin CommitDate: 2025-12-09 20:02:33 +0000 pci_reserve_map: Pass rid by value Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D53404 --- sys/compat/linuxkpi/common/src/linux_pci.c | 2 +- sys/dev/pci/pci.c | 30 +++++++++++++++--------------- sys/dev/pci/pci_private.h | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index fb3f648df496..df5255d8a6ca 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -547,7 +547,7 @@ linux_pci_reserve_bar(struct pci_dev *pdev, struct resource_list *rl, dev = pdev->pdrv != NULL && pdev->pdrv->isdrm ? device_get_parent(pdev->dev.bsddev) : pdev->dev.bsddev; - res = pci_reserve_map(device_get_parent(dev), dev, type, &rid, 0, ~0, + res = pci_reserve_map(device_get_parent(dev), dev, type, rid, 0, ~0, 1, 1, 0); if (res == NULL) return (NULL); diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index d42388a15a04..a46813cc155a 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -5505,7 +5505,7 @@ DB_SHOW_COMMAND_FLAGS(pciregs, db_pci_dump, DB_CMD_MEMSAFE) #endif /* DDB */ struct resource * -pci_reserve_map(device_t dev, device_t child, int type, int *rid, +pci_reserve_map(device_t dev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int num, u_int flags) { @@ -5520,10 +5520,10 @@ pci_reserve_map(device_t dev, device_t child, int type, int *rid, res = NULL; /* If rid is managed by EA, ignore it */ - if (pci_ea_is_enabled(child, *rid)) + if (pci_ea_is_enabled(child, rid)) goto out; - pm = pci_find_bar(child, *rid); + pm = pci_find_bar(child, rid); if (pm != NULL) { /* This is a BAR that we failed to allocate earlier. */ mapsize = pm->pm_size; @@ -5537,28 +5537,28 @@ pci_reserve_map(device_t dev, device_t child, int type, int *rid, * have a atapci device in legacy mode and it fails * here, that other code is broken. */ - pci_read_bar(child, *rid, &map, &testval, NULL); + pci_read_bar(child, rid, &map, &testval, NULL); /* * Determine the size of the BAR and ignore BARs with a size * of 0. Device ROM BARs use a different mask value. */ - if (PCIR_IS_BIOS(&dinfo->cfg, *rid)) + if (PCIR_IS_BIOS(&dinfo->cfg, rid)) mapsize = pci_romsize(testval); else mapsize = pci_mapsize(testval); if (mapsize == 0) goto out; - pm = pci_add_bar(child, *rid, map, mapsize); + pm = pci_add_bar(child, rid, map, mapsize); } - if (PCI_BAR_MEM(map) || PCIR_IS_BIOS(&dinfo->cfg, *rid)) { + if (PCI_BAR_MEM(map) || PCIR_IS_BIOS(&dinfo->cfg, rid)) { if (type != SYS_RES_MEMORY) { if (bootverbose) device_printf(dev, "child %s requested type %d for rid %#x," " but the BAR says it is an memio\n", - device_get_nameunit(child), type, *rid); + device_get_nameunit(child), type, rid); goto out; } } else { @@ -5567,7 +5567,7 @@ pci_reserve_map(device_t dev, device_t child, int type, int *rid, device_printf(dev, "child %s requested type %d for rid %#x," " but the BAR says it is an ioport\n", - device_get_nameunit(child), type, *rid); + device_get_nameunit(child), type, rid); goto out; } } @@ -5589,20 +5589,20 @@ pci_reserve_map(device_t dev, device_t child, int type, int *rid, * Allocate enough resource, and then write back the * appropriate BAR for that resource. */ - resource_list_add(rl, type, *rid, start, end, count); - res = resource_list_reserve(rl, dev, child, type, *rid, start, end, + resource_list_add(rl, type, rid, start, end, count); + res = resource_list_reserve(rl, dev, child, type, rid, start, end, count, flags & ~RF_ACTIVE); if (res == NULL) { - resource_list_delete(rl, type, *rid); + resource_list_delete(rl, type, rid); device_printf(child, "%#jx bytes of rid %#x res %d failed (%#jx, %#jx).\n", - count, *rid, type, start, end); + count, rid, type, start, end); goto out; } if (bootverbose) device_printf(child, "Lazy allocation of %#jx bytes rid %#x type %d at %#jx\n", - count, *rid, type, rman_get_start(res)); + count, rid, type, rman_get_start(res)); /* Disable decoding via the CMD register before updating the BAR */ cmd = pci_read_config(child, PCIR_COMMAND, 2); @@ -5680,7 +5680,7 @@ pci_alloc_multi_resource(device_t dev, device_t child, int type, int rid, /* Reserve resources for this BAR if needed. */ rle = resource_list_find(rl, type, rid); if (rle == NULL) { - res = pci_reserve_map(dev, child, type, &rid, start, end, + res = pci_reserve_map(dev, child, type, rid, start, end, count, num, flags); if (res == NULL) return (NULL); diff --git a/sys/dev/pci/pci_private.h b/sys/dev/pci/pci_private.h index 262ce30ad023..da8f9c02088e 100644 --- a/sys/dev/pci/pci_private.h +++ b/sys/dev/pci/pci_private.h @@ -147,7 +147,7 @@ struct pci_map *pci_add_bar(device_t dev, int reg, pci_addr_t value, pci_addr_t size); struct resource *pci_reserve_map(device_t dev, device_t child, int type, - int *rid, rman_res_t start, rman_res_t end, + int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int num, u_int flags); struct resource *pci_alloc_multi_resource(device_t dev, device_t child, From nobody Tue Dec 9 20:12:34 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQqlR1N1Jz6JkkQ for ; Tue, 09 Dec 2025 20:12:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQqlQ5GhNz3wHv for ; Tue, 09 Dec 2025 20:12:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765311154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yo6lM9fQlujTyrrjmQosWcBqHmkZE/E2BSCqsSAQubQ=; b=tGltmxPYZmR4XmDWyFkeAJhvGZtZBTrc/WkC6foySsfTl25VCx7u+bYNnPrcgRHbugH7XX Woe4wfr7otZPorLLD272xQJ36Je15ztiGDWZOHy/M7Rv2Ss3KFw0Q9D3yn2/vRl128panU x4McnFShy8ss2RAnrMD+YJXo5XhsiBMEiDzEwYikHjUIlPvddsXhFfKy3JRV0ceHJfPZwZ GadoEHcm6gwWaGdAqB2mrUjdj0Jwamiky2DXYiwLE1GSR8lE2EZfIID9p4VZEOsgcflhoV i+RAsouCQVb/N4+YCkhPKGJ1rtCuNtHhsKb9xBwORgabWBoSstXvwNYQRSLFgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765311154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yo6lM9fQlujTyrrjmQosWcBqHmkZE/E2BSCqsSAQubQ=; b=X7ySTT3yWBBLdLK+qFsU5IUYrTtIdgKWv7llkPvH+PAYiiP5lYTZlTwGLS/mm9NlXS+edb 6MDGwcDfUbRTNU0JNRHcFvdh6Bk6RFW3vTLt3Pk5hq7Vl1BLpHxpP1njbVCBMuNfWOcCUV vp0lOZ+oDI38dwCp3/azcfbThGEKUT6WALTSHlZLAhZlYGjXmIh5ZDaE8vAv5E/hwQZlRY Z1BLmVhuQ/KZtEjIoy3Y7gjj2btiZSxOTHG+LmW+o7qlYvV6V3+2olTWzewYqfUp784gus qSY+hWrjrXGndeIM78RZ7hSt9NcjePEa43wWDk6+38ednVeH9kdFsRN3kKfP9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765311154; a=rsa-sha256; cv=none; b=fLI3nChL58fnpe625/WWVsEtSF6Ty0+pBxOm5dWwu2ZfYxhK8MXOO9y07g3aNwEkOJMdgy xLx6xMLFldTngMzj6k0edNUu38J59TB93pPMYJvuCiApJLB4WCR4SkV6sVO56TgLJUIIeB +/v032qBqPCiumHF6M3TYagJ3FgOzkRDm4/J+b743H8dLqkwFDbnvp4y0rUzJTbdB4PG/S MGnz0BFWJ0b9XnDQZu2s/VqtllAPK5EB6OWm15PthfgfznCgcHhxvU6MG0DZO7yx1bLGsI e+l2aN3Vef2LgL+jUsFBsK200Wywd642g2d+A7MtziIJ6CNcpDUQZLPUCvH9Tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQqlQ4hQcz1CxQ for ; Tue, 09 Dec 2025 20:12:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2f5d0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 20:12:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 2a23faee4f12 - main - acpi_bus_alloc_gas: Pass rid by value List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 2a23faee4f12cebf57fd1716bf846a53cc737c3b Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 20:12:34 +0000 Message-Id: <693882b2.2f5d0.173cf137@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2a23faee4f12cebf57fd1716bf846a53cc737c3b commit 2a23faee4f12cebf57fd1716bf846a53cc737c3b Author: John Baldwin AuthorDate: 2025-12-09 20:02:43 +0000 Commit: John Baldwin CommitDate: 2025-12-09 20:02:43 +0000 acpi_bus_alloc_gas: Pass rid by value Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D53405 --- sys/dev/acpica/acpi.c | 8 ++++---- sys/dev/acpica/acpi_apei.c | 4 ++-- sys/dev/acpica/acpi_cpu.c | 4 ++-- sys/dev/acpica/acpi_package.c | 2 +- sys/dev/acpica/acpi_throttle.c | 4 ++-- sys/dev/acpica/acpivar.h | 2 +- sys/dev/wdatwd/wdatwd.c | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 408570f53a21..d2ccdfbf6535 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -1770,13 +1770,13 @@ acpi_unmap_resource(device_t bus, device_t child, struct resource *r, /* Allocate an IO port or memory resource, given its GAS. */ int -acpi_bus_alloc_gas(device_t dev, int *type, int *rid, ACPI_GENERIC_ADDRESS *gas, +acpi_bus_alloc_gas(device_t dev, int *type, int rid, ACPI_GENERIC_ADDRESS *gas, struct resource **res, u_int flags) { int error, res_type; error = ENOMEM; - if (type == NULL || rid == NULL || gas == NULL || res == NULL) + if (type == NULL || gas == NULL || res == NULL) return (EINVAL); /* We only support memory and IO spaces. */ @@ -1802,14 +1802,14 @@ acpi_bus_alloc_gas(device_t dev, int *type, int *rid, ACPI_GENERIC_ADDRESS *gas, if (gas->Address == 0 || gas->BitWidth == 0) return (EINVAL); - bus_set_resource(dev, res_type, *rid, gas->Address, + bus_set_resource(dev, res_type, rid, gas->Address, gas->BitWidth / 8); *res = bus_alloc_resource_any(dev, res_type, rid, RF_ACTIVE | flags); if (*res != NULL) { *type = res_type; error = 0; } else - bus_delete_resource(dev, res_type, *rid); + bus_delete_resource(dev, res_type, rid); return (error); } diff --git a/sys/dev/acpica/acpi_apei.c b/sys/dev/acpica/acpi_apei.c index 624c81ad1b4f..0d23b504cb60 100644 --- a/sys/dev/acpica/acpi_apei.c +++ b/sys/dev/acpica/acpi_apei.c @@ -700,7 +700,7 @@ apei_attach(device_t dev) rid = 0; TAILQ_FOREACH(ge, &sc->ges, link) { ge->res_rid = rid++; - acpi_bus_alloc_gas(dev, &ge->res_type, &ge->res_rid, + acpi_bus_alloc_gas(dev, &ge->res_type, ge->res_rid, &ge->v1.ErrorStatusAddress, &ge->res, 0); if (ge->res) { ge->buf = pmap_mapdev_attr(READ8(ge->res, 0), @@ -710,7 +710,7 @@ apei_attach(device_t dev) } if (ge->v1.Header.Type == ACPI_HEST_TYPE_GENERIC_ERROR_V2) { ge->res2_rid = rid++; - acpi_bus_alloc_gas(dev, &ge->res2_type, &ge->res2_rid, + acpi_bus_alloc_gas(dev, &ge->res2_type, ge->res2_rid, &ge->v2.ReadAckRegister, &ge->res2, RF_SHAREABLE); if (ge->res2 == NULL) device_printf(dev, "Can't allocate ack resource.\n"); diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c index 2cd6c8bd4758..37246890fd79 100644 --- a/sys/dev/acpica/acpi_cpu.c +++ b/sys/dev/acpica/acpi_cpu.c @@ -732,7 +732,7 @@ acpi_cpu_generic_cx_probe(struct acpi_cpu_softc *sc) if (AcpiGbl_FADT.C2Latency <= 100) { gas.Address = sc->cpu_p_blk + 4; cx_ptr->res_rid = 0; - acpi_bus_alloc_gas(sc->cpu_dev, &cx_ptr->res_type, &cx_ptr->res_rid, + acpi_bus_alloc_gas(sc->cpu_dev, &cx_ptr->res_type, cx_ptr->res_rid, &gas, &cx_ptr->p_lvlx, RF_SHAREABLE); if (cx_ptr->p_lvlx != NULL) { cx_ptr->type = ACPI_STATE_C2; @@ -749,7 +749,7 @@ acpi_cpu_generic_cx_probe(struct acpi_cpu_softc *sc) if (AcpiGbl_FADT.C3Latency <= 1000 && !(cpu_quirks & CPU_QUIRK_NO_C3)) { gas.Address = sc->cpu_p_blk + 5; cx_ptr->res_rid = 1; - acpi_bus_alloc_gas(sc->cpu_dev, &cx_ptr->res_type, &cx_ptr->res_rid, + acpi_bus_alloc_gas(sc->cpu_dev, &cx_ptr->res_type, cx_ptr->res_rid, &gas, &cx_ptr->p_lvlx, RF_SHAREABLE); if (cx_ptr->p_lvlx != NULL) { cx_ptr->type = ACPI_STATE_C3; diff --git a/sys/dev/acpica/acpi_package.c b/sys/dev/acpica/acpi_package.c index 4e64fdbbab2b..e0a3b40e507e 100644 --- a/sys/dev/acpica/acpi_package.c +++ b/sys/dev/acpica/acpi_package.c @@ -126,7 +126,7 @@ acpi_PkgGas(device_t dev, ACPI_OBJECT *res, int idx, int *type, int *rid, memcpy(&gas, obj->Buffer.Pointer + 3, sizeof(gas)); - return (acpi_bus_alloc_gas(dev, type, rid, &gas, dst, flags)); + return (acpi_bus_alloc_gas(dev, type, *rid, &gas, dst, flags)); } int diff --git a/sys/dev/acpica/acpi_throttle.c b/sys/dev/acpica/acpi_throttle.c index 8b2919c71073..ce8b7c411859 100644 --- a/sys/dev/acpica/acpi_throttle.c +++ b/sys/dev/acpica/acpi_throttle.c @@ -275,7 +275,7 @@ acpi_throttle_evaluate(struct acpi_throttle_softc *sc) return (ENXIO); } memcpy(&gas, obj.Buffer.Pointer + 3, sizeof(gas)); - acpi_bus_alloc_gas(sc->cpu_dev, &sc->cpu_p_type, &thr_rid, + acpi_bus_alloc_gas(sc->cpu_dev, &sc->cpu_p_type, thr_rid, &gas, &sc->cpu_p_cnt, 0); if (sc->cpu_p_cnt != NULL && bootverbose) { device_printf(sc->cpu_dev, "P_CNT from _PTC %#jx\n", @@ -295,7 +295,7 @@ acpi_throttle_evaluate(struct acpi_throttle_softc *sc) gas.Address = sc->cpu_p_blk; gas.SpaceId = ACPI_ADR_SPACE_SYSTEM_IO; gas.BitWidth = 32; - acpi_bus_alloc_gas(sc->cpu_dev, &sc->cpu_p_type, &thr_rid, + acpi_bus_alloc_gas(sc->cpu_dev, &sc->cpu_p_type, thr_rid, &gas, &sc->cpu_p_cnt, 0); if (sc->cpu_p_cnt != NULL) { if (bootverbose) diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index 71d8e46ab310..4da1a5a35a41 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -419,7 +419,7 @@ int acpi_parse_prw(ACPI_HANDLE h, struct acpi_prw_data *prw); ACPI_STATUS acpi_Startup(void); void acpi_UserNotify(const char *subsystem, ACPI_HANDLE h, uint8_t notify); -int acpi_bus_alloc_gas(device_t dev, int *type, int *rid, +int acpi_bus_alloc_gas(device_t dev, int *type, int rid, ACPI_GENERIC_ADDRESS *gas, struct resource **res, u_int flags); void acpi_walk_subtables(void *first, void *end, diff --git a/sys/dev/wdatwd/wdatwd.c b/sys/dev/wdatwd/wdatwd.c index c67e37281307..8873dd74103c 100644 --- a/sys/dev/wdatwd/wdatwd.c +++ b/sys/dev/wdatwd/wdatwd.c @@ -612,7 +612,7 @@ wdatwd_probe(device_t dev) int type, rid = 0; struct resource *res; - if (acpi_bus_alloc_gas(dev, &type, &rid, + if (acpi_bus_alloc_gas(dev, &type, rid, &((ACPI_WDAT_ENTRY *)(wdat + 1))->RegisterRegion, &res, 0)) return (ENXIO); From nobody Tue Dec 9 20:12:35 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQqlS2VdSz6Jl3R for ; Tue, 09 Dec 2025 20:12:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQqlR6YqRz3wR1 for ; Tue, 09 Dec 2025 20:12:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765311156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=84g6cH6FQt1T0LXnqNZFPKDhjtIFLTH8bolvJdV5RlA=; b=a+NSrJUrkNSmnKGxmRBPbYrsSf9Xj6FG1tWNUobDTnh9GOkjhR+JFnUYo5etzWZbQswA2l bmKClLdlWN4rIft8PgIQvdWBPQdmtBu30iSE1AdEpjQCStBNGWQZD/+nzbvXHgDTZ4TWtW d6theOeqHvLLieSX6Z37keZbE/PIYTv/OGY0SImTFwtzYDWNlW1UT3R4NLLh6tw8Hi8YO4 1lUSs2nyeDnM20RJ52QniSXkWWJOjc8gL54972F6E1GE+LX4XlznCsrYap7fRE5s+Pkiks dTmLYU8RRuoGbwDLBItIjvxRY2XDhSM3KhApYvM4BO2GMCT5+NytAMYE6sNtug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765311155; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=84g6cH6FQt1T0LXnqNZFPKDhjtIFLTH8bolvJdV5RlA=; b=l8GDuRhhWGzlV7DiVVfu7Ju8dIB/6B2XrJwUYVxjyh9DB2KnP1IqVdSyLV3Yw7lO7IOC3T HdUWBn4lt38GJznDBSPNHlX87nkxVHQ8fssw9xRG78AIpy1muT26N/TsfrtdqpagaGJQ49 T5azGMQdxGK6aRh1vCzrMshrYR0clbNkHgQWCU/r6dV4pO9Fc9OQFVyH5mJK1KylDtdi/h EWO28LUf8MBe2WtkXvedKJy+Ubj4/M0RFjNDOI5tBeWwZ/3+tZDudjuPRy2aBIGqtULnFI iTmoGqMJOgDx5pOKe0/U7Nu/AVoioG6ymFfC2O6teVoMvuZ0684sX9+/k99Jtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765311155; a=rsa-sha256; cv=none; b=DBFWgs6nAouuiVTxS0wvrbNotWF2JbCAPehUZ5CwD0hcmqnY6X3YR+b5Br+9QogE8CthnN NFPYN3hnJBnP7XJVd4RYXLwSd1x94utBi3n2iuusTXGH2qtRHGvyv2Aw6txOKhgzsvDGTV 3kmy4fo5Uvyz6eoJqsDgr0R7GenYAxPu/ZLIl+3RllYMABqI43BiHfl6D/ajWiwRJ3zJ1A U7OhMmn/HI8dCnJEJTJ/sppcm1FLJ/uvq2hT6WTN4J59mSXNy9jOL1ETMR/NGOGPYCRXI9 /3AJEAGbCymIfNlGsE7lpWgzCxtstRJG8lFI7jnRtP1iAWr6NsmTLRpfRIAfQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQqlR5QNDz1CnH for ; Tue, 09 Dec 2025 20:12:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2d6f0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 20:12:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 10568445de92 - main - acpi_PkgGas: Pass rid by value List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 10568445de92d59379e1c59fcdc7566065332453 Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 20:12:35 +0000 Message-Id: <693882b3.2d6f0.78be18b0@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=10568445de92d59379e1c59fcdc7566065332453 commit 10568445de92d59379e1c59fcdc7566065332453 Author: John Baldwin AuthorDate: 2025-12-09 20:02:51 +0000 Commit: John Baldwin CommitDate: 2025-12-09 20:02:51 +0000 acpi_PkgGas: Pass rid by value Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D53406 --- sys/dev/acpica/acpi_cpu.c | 2 +- sys/dev/acpica/acpi_package.c | 4 ++-- sys/dev/acpica/acpi_perf.c | 6 +++--- sys/dev/acpica/acpivar.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/dev/acpica/acpi_cpu.c b/sys/dev/acpica/acpi_cpu.c index 37246890fd79..6eb364db276b 100644 --- a/sys/dev/acpica/acpi_cpu.c +++ b/sys/dev/acpica/acpi_cpu.c @@ -926,7 +926,7 @@ acpi_cpu_cx_cst(struct acpi_cpu_softc *sc) { cx_ptr->res_rid = sc->cpu_cx_count; acpi_PkgGas(sc->cpu_dev, pkg, 0, &cx_ptr->res_type, - &cx_ptr->res_rid, &cx_ptr->p_lvlx, RF_SHAREABLE); + cx_ptr->res_rid, &cx_ptr->p_lvlx, RF_SHAREABLE); if (cx_ptr->p_lvlx) { cx_ptr->do_mwait = false; ACPI_DEBUG_PRINT((ACPI_DB_INFO, diff --git a/sys/dev/acpica/acpi_package.c b/sys/dev/acpica/acpi_package.c index e0a3b40e507e..2ee439c64b8c 100644 --- a/sys/dev/acpica/acpi_package.c +++ b/sys/dev/acpica/acpi_package.c @@ -113,7 +113,7 @@ acpi_PkgStr(ACPI_OBJECT *res, int idx, void *dst, size_t size) } int -acpi_PkgGas(device_t dev, ACPI_OBJECT *res, int idx, int *type, int *rid, +acpi_PkgGas(device_t dev, ACPI_OBJECT *res, int idx, int *type, int rid, struct resource **dst, u_int flags) { ACPI_GENERIC_ADDRESS gas; @@ -126,7 +126,7 @@ acpi_PkgGas(device_t dev, ACPI_OBJECT *res, int idx, int *type, int *rid, memcpy(&gas, obj->Buffer.Pointer + 3, sizeof(gas)); - return (acpi_bus_alloc_gas(dev, type, *rid, &gas, dst, flags)); + return (acpi_bus_alloc_gas(dev, type, rid, &gas, dst, flags)); } int diff --git a/sys/dev/acpica/acpi_perf.c b/sys/dev/acpica/acpi_perf.c index ee7a4355f32a..6889dae3ad7f 100644 --- a/sys/dev/acpica/acpi_perf.c +++ b/sys/dev/acpica/acpi_perf.c @@ -191,7 +191,7 @@ acpi_perf_probe(device_t dev) pkg = (ACPI_OBJECT *)buf.Pointer; if (ACPI_PKG_VALID(pkg, 2)) { rid = 0; - error = acpi_PkgGas(dev, pkg, 0, &type, &rid, &res, 0); + error = acpi_PkgGas(dev, pkg, 0, &type, rid, &res, 0); switch (error) { case 0: bus_release_resource(dev, type, rid, res); @@ -326,7 +326,7 @@ acpi_perf_evaluate(device_t dev) goto out; } - error = acpi_PkgGas(sc->dev, pkg, 0, &sc->perf_ctrl_type, &sc->px_rid, + error = acpi_PkgGas(sc->dev, pkg, 0, &sc->perf_ctrl_type, sc->px_rid, &sc->perf_ctrl, 0); if (error) { /* @@ -342,7 +342,7 @@ acpi_perf_evaluate(device_t dev) } sc->px_rid++; - error = acpi_PkgGas(sc->dev, pkg, 1, &sc->perf_sts_type, &sc->px_rid, + error = acpi_PkgGas(sc->dev, pkg, 1, &sc->perf_sts_type, sc->px_rid, &sc->perf_status, 0); if (error) { if (error == EOPNOTSUPP) { diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index 4da1a5a35a41..6db55b10570d 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -573,7 +573,7 @@ int acpi_PkgInt32(ACPI_OBJECT *res, int idx, uint32_t *dst); int acpi_PkgInt16(ACPI_OBJECT *res, int idx, uint16_t *dst); int acpi_PkgStr(ACPI_OBJECT *res, int idx, void *dst, size_t size); int acpi_PkgGas(device_t dev, ACPI_OBJECT *res, int idx, int *type, - int *rid, struct resource **dst, u_int flags); + int rid, struct resource **dst, u_int flags); int acpi_PkgFFH_IntelCpu(ACPI_OBJECT *res, int idx, int *vendor, int *class, uint64_t *address, int *accsize); ACPI_HANDLE acpi_GetReference(ACPI_HANDLE scope, ACPI_OBJECT *obj); From nobody Tue Dec 9 20:12:36 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQqlV00wSz6Jl60 for ; Tue, 09 Dec 2025 20:12:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQqlS6qsPz3wJ9 for ; Tue, 09 Dec 2025 20:12:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765311157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8NG6MeYpB1OY/psHaKa1oQx66D+rqaveqyC0ZwjdxBs=; b=JFLA+tuDZ16D9+PQumNHVMODjPH3FkvyjgiqbLH8XSWp/fHDiUjfVGgdHkhnr05wciLNWA oArZv5TRCDL5yuptBp6nv36rljbroF4BKOgWlVfnR9wz/BI+tUQxsfbGaHb2YSwPM28KHn punwCkWGldIBgiVTqC4s+oznbLYLSC/PdVFWh8wctVP/S20zhIUpn5HiA78KR2mlvy9y2y eUwnOT2X4Jvg98tiyDI9wisnbpWHw4IFlLBsIWfoBzjQcUbweBby5cDjMZ7O02T9+uo5tc E5W6ksRR+2byImUSK9p8gYK9zVV6Q5YhG5sVdfUoOPX4tFrnddFeY1mgtUTM7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765311157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8NG6MeYpB1OY/psHaKa1oQx66D+rqaveqyC0ZwjdxBs=; b=oGWH37oxCzwUGsunTJFmBYETWcBIKZ1VD6onzvo/lhcLJg7dz7xcQ93v0SthmVUpdkRiYf urw9IMOksG7srGAJB7/j4eTdrW+OXd8Re3/t5QJ7e83fVTUaKlVlOt4tblKsDC3/3rnGEM TKqesL9ygyXC6e+kduF10hGOlWhW/nqTljJXkE2+YPxqP7/Ey129QZYmeqejTyPZJTi7wP hWmtInJ9nlQOiX5Gt9VdOC83OY8E1kMLAGDkctjDEtzl3F4lA500lM8j85QkOcyaOJDf8f SGQ5f+q/+wdmrQ6i/uY0xkyHWFdUL20P6/LHsTYBb2y8qxBtio1loxTZep5gpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765311157; a=rsa-sha256; cv=none; b=LuOK6oVuezhcm/rny2Kar+nvQMlxoy7R+WEfKHxwsKubeg4URPcap8gVcPjLZBq3wAnhqm IBFl4/z1B7wpYJ+Uis5ldbRNgp878pQGXtt6MDgF5u/1oryitZ4yt1f/wUqwxBmOJA/O7f tuKanBVvO6aVTtZJNAK+KYltrx7AJxwipHO+CscIS5F4U41DE5mTkmSbMqwZJ7X9bYe+8n ZgH+LxT1AGmqM7F1gkZNZmQW9UzagHxskcq8lb3Ymd+OqcBoGvlRTLq9zMMohcJnJTUR6o 0tnymLgw7p4QMW0S0AzFF4BLlkCIiFy8IHcvilcjJBHKX7UJZHJwWM9bLMw2IA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQqlS6CGKzn for ; Tue, 09 Dec 2025 20:12:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 312d9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 20:12:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 01dcb4e6645f - main - gpio_alloc_intr_resource: Pass rid by value List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 01dcb4e6645f1a551e52763d58ba4375efbc5428 Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 20:12:36 +0000 Message-Id: <693882b4.312d9.7a40d6a@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=01dcb4e6645f1a551e52763d58ba4375efbc5428 commit 01dcb4e6645f1a551e52763d58ba4375efbc5428 Author: John Baldwin AuthorDate: 2025-12-09 20:03:03 +0000 Commit: John Baldwin CommitDate: 2025-12-09 20:03:03 +0000 gpio_alloc_intr_resource: Pass rid by value Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D53407 --- sys/dev/gpio/gpioaei.c | 2 +- sys/dev/gpio/gpiobus.c | 4 ++-- sys/dev/gpio/gpiobusvar.h | 2 +- sys/dev/gpio/gpioc.c | 2 +- sys/dev/gpio/gpiokeys.c | 2 +- sys/dev/gpio/gpiopps.c | 2 +- sys/dev/mmc/mmc_fdt_helpers.c | 2 +- sys/dev/sdhci/sdhci_fdt_gpio.c | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/dev/gpio/gpioaei.c b/sys/dev/gpio/gpioaei.c index 7b97277aaf61..9a769a793e5a 100644 --- a/sys/dev/gpio/gpioaei.c +++ b/sys/dev/gpio/gpioaei.c @@ -167,7 +167,7 @@ gpio_aei_enumerate(ACPI_RESOURCE * res, void * context) ctx->intr_rid = 0; ctx->intr_res = gpio_alloc_intr_resource(sc->dev, - &ctx->intr_rid, RF_ACTIVE, ctx->gpio, + ctx->intr_rid, RF_ACTIVE, ctx->gpio, flags & GPIO_INTR_MASK); if (ctx->intr_res == NULL) { device_printf(sc->dev, diff --git a/sys/dev/gpio/gpiobus.c b/sys/dev/gpio/gpiobus.c index 848abe025f52..3563435965de 100644 --- a/sys/dev/gpio/gpiobus.c +++ b/sys/dev/gpio/gpiobus.c @@ -92,7 +92,7 @@ static int gpiobus_pin_toggle(device_t, device_t, uint32_t); #ifdef INTRNG struct resource * -gpio_alloc_intr_resource(device_t consumer_dev, int *rid, u_int alloc_flags, +gpio_alloc_intr_resource(device_t consumer_dev, int rid, u_int alloc_flags, gpio_pin_t pin, uint32_t intr_mode) { u_int irq; @@ -116,7 +116,7 @@ gpio_alloc_intr_resource(device_t consumer_dev, int *rid, u_int alloc_flags, } #else struct resource * -gpio_alloc_intr_resource(device_t consumer_dev, int *rid, u_int alloc_flags, +gpio_alloc_intr_resource(device_t consumer_dev, int rid, u_int alloc_flags, gpio_pin_t pin, uint32_t intr_mode) { diff --git a/sys/dev/gpio/gpiobusvar.h b/sys/dev/gpio/gpiobusvar.h index 0528efe45525..22a10ad2abc2 100644 --- a/sys/dev/gpio/gpiobusvar.h +++ b/sys/dev/gpio/gpiobusvar.h @@ -166,7 +166,7 @@ int gpio_pin_getcaps(gpio_pin_t pin, uint32_t *caps); int gpio_pin_is_active(gpio_pin_t pin, bool *active); int gpio_pin_set_active(gpio_pin_t pin, bool active); int gpio_pin_setflags(gpio_pin_t pin, uint32_t flags); -struct resource *gpio_alloc_intr_resource(device_t consumer_dev, int *rid, +struct resource *gpio_alloc_intr_resource(device_t consumer_dev, int rid, u_int alloc_flags, gpio_pin_t pin, uint32_t intr_mode); int gpio_check_flags(uint32_t, uint32_t); diff --git a/sys/dev/gpio/gpioc.c b/sys/dev/gpio/gpioc.c index 517f7752daad..d26821395e55 100644 --- a/sys/dev/gpio/gpioc.c +++ b/sys/dev/gpio/gpioc.c @@ -208,7 +208,7 @@ gpioc_allocate_pin_intr(struct gpioc_softc *sc, goto error_exit; intr_conf->intr_res = gpio_alloc_intr_resource(sc->sc_dev, - &intr_conf->intr_rid, RF_ACTIVE, intr_conf->pin, flags); + intr_conf->intr_rid, RF_ACTIVE, intr_conf->pin, flags); if (intr_conf->intr_res == NULL) { err = ENXIO; goto error_pin; diff --git a/sys/dev/gpio/gpiokeys.c b/sys/dev/gpio/gpiokeys.c index a3180f046c58..deb5a0ab16a4 100644 --- a/sys/dev/gpio/gpiokeys.c +++ b/sys/dev/gpio/gpiokeys.c @@ -334,7 +334,7 @@ gpiokeys_attach_key(struct gpiokeys_softc *sc, phandle_t node, return; } - key->irq_res = gpio_alloc_intr_resource(sc->sc_dev, &key->irq_rid, + key->irq_res = gpio_alloc_intr_resource(sc->sc_dev, key->irq_rid, RF_ACTIVE, key->pin, GPIO_INTR_EDGE_BOTH); if (!key->irq_res) { device_printf(sc->sc_dev, "<%s> cannot allocate interrupt\n", key_name); diff --git a/sys/dev/gpio/gpiopps.c b/sys/dev/gpio/gpiopps.c index 82620a50a798..c2252e947dd0 100644 --- a/sys/dev/gpio/gpiopps.c +++ b/sys/dev/gpio/gpiopps.c @@ -218,7 +218,7 @@ gpiopps_fdt_attach(device_t dev) * Transform our 'gpios' property into an interrupt resource and set up * the interrupt. */ - if ((sc->ires = gpio_alloc_intr_resource(dev, &sc->irid, RF_ACTIVE, + if ((sc->ires = gpio_alloc_intr_resource(dev, sc->irid, RF_ACTIVE, sc->gpin, edge)) == NULL) { device_printf(dev, "Cannot allocate an IRQ for the GPIO\n"); gpiopps_detach(dev); diff --git a/sys/dev/mmc/mmc_fdt_helpers.c b/sys/dev/mmc/mmc_fdt_helpers.c index 980785464a00..086b91f20ef3 100644 --- a/sys/dev/mmc/mmc_fdt_helpers.c +++ b/sys/dev/mmc/mmc_fdt_helpers.c @@ -212,7 +212,7 @@ cd_setup(struct mmc_helper *helper, phandle_t node) /* * Create an interrupt resource from the pin and set up the interrupt. */ - if ((helper->cd_ires = gpio_alloc_intr_resource(dev, &helper->cd_irid, + if ((helper->cd_ires = gpio_alloc_intr_resource(dev, helper->cd_irid, RF_ACTIVE, helper->cd_pin, GPIO_INTR_EDGE_BOTH)) == NULL) { if (bootverbose) device_printf(dev, "Cannot allocate an IRQ for card " diff --git a/sys/dev/sdhci/sdhci_fdt_gpio.c b/sys/dev/sdhci/sdhci_fdt_gpio.c index e71c5e3eaf93..7e7e461e76b0 100644 --- a/sys/dev/sdhci/sdhci_fdt_gpio.c +++ b/sys/dev/sdhci/sdhci_fdt_gpio.c @@ -128,7 +128,7 @@ cd_setup(struct sdhci_fdt_gpio *gpio, phandle_t node) /* * Create an interrupt resource from the pin and set up the interrupt. */ - if ((gpio->cd_ires = gpio_alloc_intr_resource(dev, &gpio->cd_irid, + if ((gpio->cd_ires = gpio_alloc_intr_resource(dev, gpio->cd_irid, RF_ACTIVE, gpio->cd_pin, GPIO_INTR_EDGE_BOTH)) == NULL) { if (bootverbose) device_printf(dev, "Cannot allocate an IRQ for card " From nobody Tue Dec 9 20:12:31 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQqlS5yXSz6Jkmh for ; Tue, 09 Dec 2025 20:12:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQqlS3m0tz3wLD for ; Tue, 09 Dec 2025 20:12:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765311156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CPXh4Bin1EquweCHYH4sIufhd+p+Guox2QLGqNkiyHk=; b=t+CMVXB9PG1lDvsbBrvTHmrM2X+x/e55F8WOnw7JrgG/L5AopwHiR5ATabw+FDijwyaq/h liQXrBW8oZV8hNHO8K7+nrRAzz03iIcYwr8v7DRNagPfil4uCyLEdLWG9j+7MVe1azYImm 5Xmh4FN04ZDC2D2N+CtTC03Og4Du3lZcV68SJFufsSQ2ljgd9ZnKRlPrSQWJ+jqy7b6H3a 0lX6/TuWCCtbU3uCOocCqYH5Qi5jDItlJuenSqkB/CSFYYp0Hx0BE864ULecCLOj2rII10 AZWoUIY0lMV6+xzxDNSlQzJHLEy6FYc44+Tw/+zXCgR80Hl6LUoTA3DkOoLcAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765311156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CPXh4Bin1EquweCHYH4sIufhd+p+Guox2QLGqNkiyHk=; b=AUEiFgHhaiuVx9m4bMztgAcfS1ACN5IQmHorsb/9AAmnL0S3sNhG/Ye99GMf4jjSA0JHlv BSwEk8RQ60dDDiIGg6kYJIl9afqsAzc4df5NdOHiejaChCXLG2B4VNXN3YOocBQhKnZU/u ltzoF64f3MkqXSo4lnCesC9eF+amEsNDO0aAYk71OFQE4LenTxjkI3mcr0WCdkndn6Gb04 100xyQdKQTFSq28y2cthjj7X4lJ/TBQDvUhYMSWrAqbweCjkTCGp8h9ALLSlOGMIS87bw1 lbLFZtu1nbuY56Oq1/PF7UdzPO6LOgnuMbZekhPuYUS0+3qYp9tB13/VHU2rnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765311156; a=rsa-sha256; cv=none; b=Q7pI7x3QYfWUzmo9knGUt5A0blWVm3oLC4oRPxFg7iIqxEBSoPVM/vmOW777shWJF+2DKh 4cZm5EhV/v+v/IU9UejBv4G7ztseWn63IBjMrUvBGuP73op767vHzIyHEkdQDcibRawcVk OLLpgiyPC8E7I+EXloP24NUDGNJLy1V91EMEKq9Qmoemmao6kGuR4y4F3k/cd2rVZ+j9hF Z2KhOSxwnHovPcEf/FViSWkpCzdTID9zS4qhEoz4qF3+bQg7tdJiIv9zJ1LXe77F5kamB2 5yvzgoRNn40cDUVl7aVJcS1mJdnqHAbQ/XY7lpmMQOMW2lL414XdOEC/xV4dBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQqlS2vVzz1CxS for ; Tue, 09 Dec 2025 20:12:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2fecd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 20:12:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 575639548cef - main - bus_alloc_resource: Pass rid by value to BUS_ALLOC_RESOURCE DEVMETHOD List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 575639548cef58590a1d70c29e47aae0e8d44153 Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 20:12:31 +0000 Message-Id: <693882af.2fecd.1848e0d9@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=575639548cef58590a1d70c29e47aae0e8d44153 commit 575639548cef58590a1d70c29e47aae0e8d44153 Author: John Baldwin AuthorDate: 2025-12-09 19:59:21 +0000 Commit: John Baldwin CommitDate: 2025-12-09 20:00:06 +0000 bus_alloc_resource: Pass rid by value to BUS_ALLOC_RESOURCE DEVMETHOD The wrapper functions such as bus_alloc_resource_any() still support passing the rid by value or pointer, but the underlying implementation now passes by value. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D53402 --- sys/arm/arm/gic.c | 6 ++--- sys/arm/mv/mv_pci.c | 4 ++-- sys/arm/mv/mv_pci_ctrl.c | 6 ++--- sys/arm64/arm64/gic_v3.c | 4 ++-- sys/arm64/arm64/nexus.c | 4 ++-- sys/arm64/cavium/thunder_pcie_common.c | 4 ++-- sys/arm64/cavium/thunder_pcie_common.h | 2 +- sys/arm64/cavium/thunder_pcie_fdt.c | 6 ++--- sys/arm64/cavium/thunder_pcie_pem.c | 6 ++--- sys/dev/acpica/acpi.c | 10 ++++---- sys/dev/acpica/acpi_pcib_acpi.c | 6 ++--- sys/dev/agp/agp_i810.c | 2 +- sys/dev/ahci/ahci.c | 10 ++++---- sys/dev/ahci/ahci.h | 2 +- sys/dev/ata/ata-pci.c | 12 +++++----- sys/dev/ata/ata-pci.h | 2 +- sys/dev/atkbdc/atkbdc_isa.c | 6 ++--- sys/dev/bhnd/bhnd_subr.c | 2 +- sys/dev/bhnd/bhndb/bhndb.c | 14 +++++------ sys/dev/bhnd/cores/chipc/chipc.c | 8 +++---- sys/dev/dpaa/fman.c | 8 +++---- sys/dev/dpaa/fman.h | 2 +- sys/dev/dpaa2/dpaa2_mc.c | 4 ++-- sys/dev/dpaa2/dpaa2_mc.h | 2 +- sys/dev/dpaa2/dpaa2_rc.c | 6 ++--- sys/dev/exca/exca.c | 8 +++---- sys/dev/fdt/simplebus.c | 8 +++---- sys/dev/gpio/gpiobus.c | 4 ++-- sys/dev/hyperv/pcib/vmbus_pcib.c | 4 ++-- sys/dev/hyperv/vmbus/vmbus.c | 6 ++--- sys/dev/mvs/mvs_pci.c | 4 ++-- sys/dev/mvs/mvs_soc.c | 4 ++-- sys/dev/ofw/ofw_pcib.c | 4 ++-- sys/dev/ofw/ofwbus.c | 6 ++--- sys/dev/pccbb/pccbb.c | 22 ++++++++--------- sys/dev/pccbb/pccbb_pci.c | 2 +- sys/dev/pccbb/pccbbvar.h | 2 +- sys/dev/pci/hostb_pci.c | 2 +- sys/dev/pci/isa_pci.c | 6 ++--- sys/dev/pci/pci.c | 28 +++++++++++----------- sys/dev/pci/pci_host_generic.c | 4 ++-- sys/dev/pci/pci_host_generic.h | 2 +- sys/dev/pci/pci_iov.c | 14 +++++------ sys/dev/pci/pci_pci.c | 18 +++++++------- sys/dev/pci/pci_private.h | 4 ++-- sys/dev/pci/pci_subr.c | 8 +++---- sys/dev/pci/pcib_private.h | 6 ++--- sys/dev/pci/vga_pci.c | 10 ++++---- sys/dev/ppc/ppc.c | 4 ++-- sys/dev/ppc/ppcvar.h | 2 +- sys/dev/puc/puc.c | 4 ++-- sys/dev/puc/puc_bfe.h | 2 +- sys/dev/quicc/quicc_bfe.h | 2 +- sys/dev/quicc/quicc_core.c | 4 ++-- sys/dev/scc/scc_bfe.h | 2 +- sys/dev/scc/scc_core.c | 3 +-- sys/dev/siis/siis.c | 4 ++-- sys/dev/sound/pci/csa.c | 8 +++---- sys/dev/sound/pci/fm801.c | 4 ++-- sys/dev/spibus/acpi_spibus.c | 4 ++-- sys/dev/vmd/vmd.c | 8 +++---- sys/dev/vnic/mrml_bridge.c | 6 ++--- sys/isa/isa_common.c | 2 +- sys/isa/isa_common.h | 2 +- sys/kern/bus_if.m | 11 ++++----- sys/kern/subr_bus.c | 22 ++++++++--------- sys/powerpc/mpc85xx/isa.c | 8 +++---- sys/powerpc/mpc85xx/lbc.c | 14 ++++------- sys/powerpc/powermac/macgpio.c | 4 ++-- sys/powerpc/powermac/macio.c | 10 ++++---- sys/powerpc/powermac/uninorth.c | 10 ++++---- sys/powerpc/ps3/ps3bus.c | 10 ++++---- sys/powerpc/psim/ata_iobus.c | 12 +++++----- sys/powerpc/psim/iobus.c | 4 ++-- sys/riscv/riscv/nexus.c | 4 ++-- sys/sys/bus.h | 44 +++++++++++++++++----------------- sys/sys/param.h | 2 +- sys/x86/include/legacyvar.h | 2 +- sys/x86/isa/isa.c | 16 ++++++------- sys/x86/pci/pci_bus.c | 2 +- sys/x86/pci/qpi.c | 2 +- sys/x86/x86/mptable_pci.c | 2 +- sys/x86/x86/nexus.c | 4 ++-- 83 files changed, 276 insertions(+), 282 deletions(-) diff --git a/sys/arm/arm/gic.c b/sys/arm/arm/gic.c index c1b2cf626ed8..e33bda4886b9 100644 --- a/sys/arm/arm/gic.c +++ b/sys/arm/arm/gic.c @@ -436,7 +436,7 @@ arm_gic_print_child(device_t bus, device_t child) } static struct resource * -arm_gic_alloc_resource(device_t bus, device_t child, int type, int *rid, +arm_gic_alloc_resource(device_t bus, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct arm_gic_softc *sc; @@ -458,11 +458,11 @@ arm_gic_alloc_resource(device_t bus, device_t child, int type, int *rid, if (type == SYS_RES_IOPORT) type = SYS_RES_MEMORY; - rle = resource_list_find(rl, type, *rid); + rle = resource_list_find(rl, type, rid); if (rle == NULL) { if (bootverbose) device_printf(bus, "no default resources for " - "rid = %d, type = %d\n", *rid, type); + "rid = %d, type = %d\n", rid, type); return (NULL); } start = rle->start; diff --git a/sys/arm/mv/mv_pci.c b/sys/arm/mv/mv_pci.c index 5983076d6be8..e34794b2b109 100644 --- a/sys/arm/mv/mv_pci.c +++ b/sys/arm/mv/mv_pci.c @@ -343,7 +343,7 @@ static int mv_pcib_probe(device_t); static int mv_pcib_attach(device_t); static struct rman *mv_pcib_get_rman(device_t, int, u_int); -static struct resource *mv_pcib_alloc_resource(device_t, device_t, int, int *, +static struct resource *mv_pcib_alloc_resource(device_t, device_t, int, int, rman_res_t, rman_res_t, rman_res_t, u_int); static int mv_pcib_adjust_resource(device_t, device_t, struct resource *, rman_res_t, rman_res_t); @@ -905,7 +905,7 @@ mv_pcib_get_rman(device_t dev, int type, u_int flags) } static struct resource * -mv_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, +mv_pcib_alloc_resource(device_t dev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct mv_pcib_softc *sc = device_get_softc(dev); diff --git a/sys/arm/mv/mv_pci_ctrl.c b/sys/arm/mv/mv_pci_ctrl.c index 902c0e129dbb..ca32531274a7 100644 --- a/sys/arm/mv/mv_pci_ctrl.c +++ b/sys/arm/mv/mv_pci_ctrl.c @@ -54,7 +54,7 @@ static int mv_pcib_ctrl_attach(device_t); static device_t mv_pcib_ctrl_add_child(device_t, u_int, const char *, int); static const struct ofw_bus_devinfo * mv_pcib_ctrl_get_devinfo(device_t, device_t); static struct resource * mv_pcib_ctrl_alloc_resource(device_t, device_t, int, - int *, rman_res_t, rman_res_t, rman_res_t, u_int); + int, rman_res_t, rman_res_t, rman_res_t, u_int); void mv_pcib_ctrl_init(device_t, phandle_t); static int mv_pcib_ofw_bus_attach(device_t); @@ -236,7 +236,7 @@ mv_pcib_ctrl_add_child(device_t dev, u_int order, const char *name, int unit) } static struct resource * -mv_pcib_ctrl_alloc_resource(device_t bus, device_t child, int type, int *rid, +mv_pcib_ctrl_alloc_resource(device_t bus, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct mv_pcib_ctrl_devinfo *di; @@ -251,7 +251,7 @@ mv_pcib_ctrl_alloc_resource(device_t bus, device_t child, int type, int *rid, return (NULL); /* Find defaults for this rid */ - rle = resource_list_find(&di->di_rl, type, *rid); + rle = resource_list_find(&di->di_rl, type, rid); if (rle == NULL) return (NULL); diff --git a/sys/arm64/arm64/gic_v3.c b/sys/arm64/arm64/gic_v3.c index d74cdc20dd20..3d9f5f2628fb 100644 --- a/sys/arm64/arm64/gic_v3.c +++ b/sys/arm64/arm64/gic_v3.c @@ -543,7 +543,7 @@ gic_v3_write_ivar(device_t dev, device_t child, int which, uintptr_t value) } static struct resource * -gic_v3_alloc_resource(device_t bus, device_t child, int type, int *rid, +gic_v3_alloc_resource(device_t bus, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct gic_v3_softc *sc; @@ -563,7 +563,7 @@ gic_v3_alloc_resource(device_t bus, device_t child, int type, int *rid, return (NULL); /* Find defaults for this rid */ - rle = resource_list_find(rl, type, *rid); + rle = resource_list_find(rl, type, rid); if (rle == NULL) return (NULL); diff --git a/sys/arm64/arm64/nexus.c b/sys/arm64/arm64/nexus.c index 012bf859eb3c..d2e152b2a0c0 100644 --- a/sys/arm64/arm64/nexus.c +++ b/sys/arm64/arm64/nexus.c @@ -246,7 +246,7 @@ nexus_get_rman(device_t bus, int type, u_int flags) * child of one of our descendants, not a direct child of nexus0. */ static struct resource * -nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, +nexus_alloc_resource(device_t bus, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct nexus_device *ndev = DEVTONX(child); @@ -261,7 +261,7 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, if (RMAN_IS_DEFAULT_RANGE(start, end) && (count == 1)) { if (device_get_parent(child) != bus || ndev == NULL) return (NULL); - rle = resource_list_find(&ndev->nx_resources, type, *rid); + rle = resource_list_find(&ndev->nx_resources, type, rid); if (rle == NULL) return (NULL); start = rle->start; diff --git a/sys/arm64/cavium/thunder_pcie_common.c b/sys/arm64/cavium/thunder_pcie_common.c index 1fe6b1a683be..410e8600c0ab 100644 --- a/sys/arm64/cavium/thunder_pcie_common.c +++ b/sys/arm64/cavium/thunder_pcie_common.c @@ -169,7 +169,7 @@ thunder_pcie_identify_ecam(device_t dev, int *ecam) #ifdef THUNDERX_PASS_1_1_ERRATA struct resource * -thunder_pcie_alloc_resource(device_t dev, device_t child, int type, int *rid, +thunder_pcie_alloc_resource(device_t dev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { pci_addr_t map, testval; @@ -183,7 +183,7 @@ thunder_pcie_alloc_resource(device_t dev, device_t child, int type, int *rid, if (((type == SYS_RES_IOPORT) || (type == SYS_RES_MEMORY)) && RMAN_IS_DEFAULT_RANGE(start, end)) { /* Read BAR manually to get resource address and size */ - pci_read_bar(child, *rid, &map, &testval, NULL); + pci_read_bar(child, rid, &map, &testval, NULL); /* Mask the information bits */ if (PCI_BAR_MEM(map)) diff --git a/sys/arm64/cavium/thunder_pcie_common.h b/sys/arm64/cavium/thunder_pcie_common.h index 49cb7be62027..2e0fc9a2f309 100644 --- a/sys/arm64/cavium/thunder_pcie_common.h +++ b/sys/arm64/cavium/thunder_pcie_common.h @@ -39,7 +39,7 @@ uint64_t range_addr_pci_to_phys(struct pcie_range *, uint64_t); int thunder_pcie_identify_ecam(device_t, int *); #ifdef THUNDERX_PASS_1_1_ERRATA struct resource *thunder_pcie_alloc_resource(device_t, - device_t, int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); + device_t, int, int, rman_res_t, rman_res_t, rman_res_t, u_int); #endif #endif /* _CAVIUM_THUNDER_PCIE_COMMON_H_ */ diff --git a/sys/arm64/cavium/thunder_pcie_fdt.c b/sys/arm64/cavium/thunder_pcie_fdt.c index 87dc113ad781..a95a0f2c1563 100644 --- a/sys/arm64/cavium/thunder_pcie_fdt.c +++ b/sys/arm64/cavium/thunder_pcie_fdt.c @@ -55,7 +55,7 @@ #ifdef THUNDERX_PASS_1_1_ERRATA static struct resource * thunder_pcie_fdt_alloc_resource(device_t, device_t, - int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); + int, int, rman_res_t, rman_res_t, rman_res_t, u_int); static int thunder_pcie_fdt_release_resource(device_t, device_t, struct resource*); #endif @@ -228,7 +228,7 @@ thunder_pcie_fdt_get_id(device_t pci, device_t child, enum pci_id_type type, #ifdef THUNDERX_PASS_1_1_ERRATA struct resource * thunder_pcie_fdt_alloc_resource(device_t dev, device_t child, int type, - int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) + int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct generic_pcie_fdt_softc *sc; struct thunder_pcie_ofw_devinfo *di; @@ -253,7 +253,7 @@ thunder_pcie_fdt_alloc_resource(device_t dev, device_t child, int type, type = SYS_RES_MEMORY; /* Find defaults for this rid */ - rle = resource_list_find(&di->di_rl, type, *rid); + rle = resource_list_find(&di->di_rl, type, rid); if (rle == NULL) return (NULL); diff --git a/sys/arm64/cavium/thunder_pcie_pem.c b/sys/arm64/cavium/thunder_pcie_pem.c index b01dfecb347e..04b892b91c56 100644 --- a/sys/arm64/cavium/thunder_pcie_pem.c +++ b/sys/arm64/cavium/thunder_pcie_pem.c @@ -124,7 +124,7 @@ static int thunder_pem_activate_resource(device_t, device_t, struct resource *); static int thunder_pem_adjust_resource(device_t, device_t, struct resource *, rman_res_t, rman_res_t); static struct resource * thunder_pem_alloc_resource(device_t, device_t, int, - int *, rman_res_t, rman_res_t, rman_res_t, u_int); + int, rman_res_t, rman_res_t, rman_res_t, u_int); static int thunder_pem_alloc_msi(device_t, device_t, int, int, int *); static int thunder_pem_release_msi(device_t, device_t, int, int *); static int thunder_pem_alloc_msix(device_t, device_t, int *); @@ -651,7 +651,7 @@ thunder_pem_write_config(device_t dev, u_int bus, u_int slot, } static struct resource * -thunder_pem_alloc_resource(device_t dev, device_t child, int type, int *rid, +thunder_pem_alloc_resource(device_t dev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct thunder_pem_softc *sc = device_get_softc(dev); @@ -694,7 +694,7 @@ thunder_pem_alloc_resource(device_t dev, device_t child, int type, int *rid, if (res == NULL && bootverbose) { device_printf(dev, "%s FAIL: type=%d, rid=%d, " "start=%016lx, end=%016lx, count=%016lx, flags=%x\n", - __func__, type, *rid, start, end, count, flags); + __func__, type, rid, start, end, count, flags); } return (res); diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 54e0d7be7920..a40ee709e762 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -1562,7 +1562,7 @@ acpi_set_resource(device_t dev, device_t child, int type, int rid, } static struct resource * -acpi_alloc_resource(device_t bus, device_t child, int type, int *rid, +acpi_alloc_resource(device_t bus, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { #ifndef INTRNG @@ -1590,8 +1590,8 @@ acpi_alloc_resource(device_t bus, device_t child, int type, int *rid, * add the resource before allocating it. Note that these * resources will not be reserved. */ - if (!isdefault && resource_list_find(rl, type, *rid) == NULL) - resource_list_add(rl, type, *rid, start, end, count); + if (!isdefault && resource_list_find(rl, type, rid) == NULL) + resource_list_add(rl, type, rid, start, end, count); res = resource_list_alloc(rl, bus, child, type, rid, start, end, count, flags); #ifndef INTRNG @@ -1604,7 +1604,7 @@ acpi_alloc_resource(device_t bus, device_t child, int type, int *rid, * * XXX: Should we handle the lookup failing? */ - if (ACPI_SUCCESS(acpi_lookup_irq_resource(child, *rid, res, &ares))) + if (ACPI_SUCCESS(acpi_lookup_irq_resource(child, rid, res, &ares))) acpi_config_intr(child, &ares); } #endif @@ -1616,7 +1616,7 @@ acpi_alloc_resource(device_t bus, device_t child, int type, int *rid, * system resource regions. */ if (res == NULL && isdefault) { - rle = resource_list_find(rl, type, *rid); + rle = resource_list_find(rl, type, rid); if (rle != NULL) { start = rle->start; end = rle->end; diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c index 2fadd6cd32ee..eb23460ee358 100644 --- a/sys/dev/acpica/acpi_pcib_acpi.c +++ b/sys/dev/acpica/acpi_pcib_acpi.c @@ -90,7 +90,7 @@ static int acpi_pcib_map_msi(device_t pcib, device_t dev, static int acpi_pcib_alloc_msix(device_t pcib, device_t dev, int *irq); static struct resource *acpi_pcib_acpi_alloc_resource(device_t dev, - device_t child, int type, int *rid, + device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); static int acpi_pcib_acpi_adjust_resource(device_t dev, @@ -423,7 +423,7 @@ acpi_pcib_acpi_attach(device_t dev) sc->ap_bus = start; else { rid = 0; - bus_res = pci_domain_alloc_bus(sc->ap_segment, dev, &rid, 0, + bus_res = pci_domain_alloc_bus(sc->ap_segment, dev, rid, 0, PCI_BUSMAX, 1, 0); if (bus_res == NULL) { device_printf(dev, @@ -605,7 +605,7 @@ acpi_pcib_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, } struct resource * -acpi_pcib_acpi_alloc_resource(device_t dev, device_t child, int type, int *rid, +acpi_pcib_acpi_alloc_resource(device_t dev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct acpi_hpcib_softc *sc; diff --git a/sys/dev/agp/agp_i810.c b/sys/dev/agp/agp_i810.c index 9d955745f673..371eac691916 100644 --- a/sys/dev/agp/agp_i810.c +++ b/sys/dev/agp/agp_i810.c @@ -2025,7 +2025,7 @@ agp_i915_chipset_flush_alloc_page(device_t dev, uint64_t start, uint64_t end) vga = device_get_parent(dev); sc->sc_flush_page_rid = 100; sc->sc_flush_page_res = BUS_ALLOC_RESOURCE(device_get_parent(vga), dev, - SYS_RES_MEMORY, &sc->sc_flush_page_rid, start, end, PAGE_SIZE, + SYS_RES_MEMORY, sc->sc_flush_page_rid, start, end, PAGE_SIZE, RF_ACTIVE); if (sc->sc_flush_page_res == NULL) { device_printf(dev, "Failed to allocate flush page at 0x%jx\n", diff --git a/sys/dev/ahci/ahci.c b/sys/dev/ahci/ahci.c index 4ef3259dd10f..4275131d6396 100644 --- a/sys/dev/ahci/ahci.c +++ b/sys/dev/ahci/ahci.c @@ -576,7 +576,7 @@ ahci_intr_one_edge(void *data) } struct resource * -ahci_alloc_resource(device_t dev, device_t child, int type, int *rid, +ahci_alloc_resource(device_t dev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct ahci_controller *ctlr = device_get_softc(dev); @@ -606,14 +606,14 @@ ahci_alloc_resource(device_t dev, device_t child, int type, int *rid, size = 128; } else if ((ctlr->caps & AHCI_CAP_EMS) == 0) { break; - } else if (*rid == 0) { + } else if (rid == 0) { offset = AHCI_EM_CTL; size = 4; } else { offset = (ctlr->emloc & 0xffff0000) >> 14; size = (ctlr->emloc & 0x0000ffff) << 2; - if (*rid != 1) { - if (*rid == 2 && (ctlr->capsem & + if (rid != 1) { + if (rid == 2 && (ctlr->capsem & (AHCI_EM_XMT | AHCI_EM_SMB)) == 0) offset += size; else @@ -634,7 +634,7 @@ ahci_alloc_resource(device_t dev, device_t child, int type, int *rid, } break; case SYS_RES_IRQ: - if (*rid == ATA_IRQ_RID) + if (rid == ATA_IRQ_RID) res = ctlr->irqs[0].r_irq; break; } diff --git a/sys/dev/ahci/ahci.h b/sys/dev/ahci/ahci.h index 8b51b1e0b3ae..d72e332fab79 100644 --- a/sys/dev/ahci/ahci.h +++ b/sys/dev/ahci/ahci.h @@ -654,7 +654,7 @@ int ahci_attach(device_t dev); int ahci_detach(device_t dev); int ahci_setup_interrupt(device_t dev); int ahci_print_child(device_t dev, device_t child); -struct resource *ahci_alloc_resource(device_t dev, device_t child, int type, int *rid, +struct resource *ahci_alloc_resource(device_t dev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); int ahci_release_resource(device_t dev, device_t child, struct resource *r); int ahci_setup_intr(device_t dev, device_t child, struct resource *irq, diff --git a/sys/dev/ata/ata-pci.c b/sys/dev/ata/ata-pci.c index cb44f98c406d..9ac9da092bc7 100644 --- a/sys/dev/ata/ata-pci.c +++ b/sys/dev/ata/ata-pci.c @@ -216,7 +216,7 @@ ata_pci_write_config(device_t dev, device_t child, int reg, } struct resource * -ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, +ata_pci_alloc_resource(device_t dev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { @@ -228,7 +228,7 @@ ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, int myrid; if (type == SYS_RES_IOPORT) { - switch (*rid) { + switch (rid) { case ATA_IOADDR_RID: if (controller->legacy) { start = (unit ? ATA_SECONDARY : ATA_PRIMARY); @@ -237,7 +237,7 @@ ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, } myrid = PCIR_BAR(0) + (unit << 3); res = BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, - SYS_RES_IOPORT, &myrid, + SYS_RES_IOPORT, myrid, start, end, count, flags); break; case ATA_CTLADDR_RID: @@ -249,12 +249,12 @@ ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, } myrid = PCIR_BAR(1) + (unit << 3); res = BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, - SYS_RES_IOPORT, &myrid, + SYS_RES_IOPORT, myrid, start, end, count, flags); break; } } - if (type == SYS_RES_IRQ && *rid == ATA_IRQ_RID) { + if (type == SYS_RES_IRQ && rid == ATA_IRQ_RID) { if (controller->legacy) { int irq = (unit == 0 ? 14 : 15); @@ -265,7 +265,7 @@ ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, } } else { if (type == SYS_RES_IRQ) { - if (*rid != ATA_IRQ_RID) + if (rid != ATA_IRQ_RID) return (NULL); res = controller->r_irq; } else { diff --git a/sys/dev/ata/ata-pci.h b/sys/dev/ata/ata-pci.h index cad9441a21ae..630d0184c820 100644 --- a/sys/dev/ata/ata-pci.h +++ b/sys/dev/ata/ata-pci.h @@ -537,7 +537,7 @@ void ata_pci_write_config(device_t dev, device_t child, int reg, uint32_t val, int width); int ata_pci_print_child(device_t dev, device_t child); int ata_pci_child_location(device_t dev, device_t child, struct sbuf *sb); -struct resource * ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); +struct resource * ata_pci_alloc_resource(device_t dev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); int ata_pci_release_resource(device_t dev, device_t child, struct resource *r); int ata_pci_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, driver_filter_t *filter, driver_intr_t *function, void *argument, void **cookiep); int ata_pci_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie); diff --git a/sys/dev/atkbdc/atkbdc_isa.c b/sys/dev/atkbdc/atkbdc_isa.c index 057ebbc7ec0d..062c5fc491e8 100644 --- a/sys/dev/atkbdc/atkbdc_isa.c +++ b/sys/dev/atkbdc/atkbdc_isa.c @@ -50,7 +50,7 @@ static int atkbdc_isa_attach(device_t dev); static device_t atkbdc_isa_add_child(device_t bus, u_int order, const char *name, int unit); static struct resource *atkbdc_isa_alloc_resource(device_t dev, device_t child, - int type, int *rid, rman_res_t start, rman_res_t end, + int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); static int atkbdc_isa_release_resource(device_t dev, device_t child, struct resource *r); @@ -293,13 +293,13 @@ atkbdc_isa_add_child(device_t bus, u_int order, const char *name, int unit) } struct resource * -atkbdc_isa_alloc_resource(device_t dev, device_t child, int type, int *rid, +atkbdc_isa_alloc_resource(device_t dev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { atkbdc_softc_t *sc; sc = *(atkbdc_softc_t **)device_get_softc(dev); - if (type == SYS_RES_IRQ && *rid == KBDC_RID_KBD && sc->irq != NULL) + if (type == SYS_RES_IRQ && rid == KBDC_RID_KBD && sc->irq != NULL) return (sc->irq); return (bus_generic_rl_alloc_resource(dev, child, type, rid, start, end, count, flags)); diff --git a/sys/dev/bhnd/bhnd_subr.c b/sys/dev/bhnd/bhnd_subr.c index 4818fffd5659..ac4f69db8cae 100644 --- a/sys/dev/bhnd/bhnd_subr.c +++ b/sys/dev/bhnd/bhnd_subr.c @@ -2201,7 +2201,7 @@ bhnd_bus_generic_alloc_resource(device_t dev, device_t child, int type, res = NULL; /* Allocate the real bus resource (without activating it) */ - res = BUS_ALLOC_RESOURCE(dev, child, type, rid, start, end, count, + res = BUS_ALLOC_RESOURCE(dev, child, type, *rid, start, end, count, (flags & ~RF_ACTIVE)); if (res == NULL) return (NULL); diff --git a/sys/dev/bhnd/bhndb/bhndb.c b/sys/dev/bhnd/bhndb/bhndb.c index f9d56a9b9226..90ae719787dc 100644 --- a/sys/dev/bhnd/bhndb/bhndb.c +++ b/sys/dev/bhnd/bhndb/bhndb.c @@ -937,7 +937,7 @@ bhndb_get_service_registry(device_t dev, device_t child) */ static struct resource * bhndb_alloc_resource(device_t dev, device_t child, int type, - int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) + int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct bhndb_softc *sc; struct resource_list_entry *rle; @@ -964,11 +964,11 @@ bhndb_alloc_resource(device_t dev, device_t child, int type, if (!passthrough && isdefault) { /* Fetch the resource list entry. */ rle = resource_list_find(BUS_GET_RESOURCE_LIST(dev, child), - type, *rid); + type, rid); if (rle == NULL) { device_printf(dev, "default resource %#x type %d for child %s " - "not found\n", *rid, type, + "not found\n", rid, type, device_get_nameunit(child)); return (NULL); @@ -977,7 +977,7 @@ bhndb_alloc_resource(device_t dev, device_t child, int type, if (rle->res != NULL) { device_printf(dev, "resource entry %#x type %d for child %s is busy\n", - *rid, type, device_get_nameunit(child)); + rid, type, device_get_nameunit(child)); return (NULL); } @@ -997,17 +997,17 @@ bhndb_alloc_resource(device_t dev, device_t child, int type, if (rv == NULL) return (NULL); - rman_set_rid(rv, *rid); + rman_set_rid(rv, rid); rman_set_type(rv, type); /* Activate */ if (flags & RF_ACTIVE) { - error = bus_activate_resource(child, type, *rid, rv); + error = bus_activate_resource(child, type, rid, rv); if (error) { device_printf(dev, "failed to activate entry %#x type %d for " "child %s: %d\n", - *rid, type, device_get_nameunit(child), error); + rid, type, device_get_nameunit(child), error); rman_release_resource(rv); diff --git a/sys/dev/bhnd/cores/chipc/chipc.c b/sys/dev/bhnd/cores/chipc/chipc.c index 24697a8f0b17..8d62bbcc4712 100644 --- a/sys/dev/bhnd/cores/chipc/chipc.c +++ b/sys/dev/bhnd/cores/chipc/chipc.c @@ -765,7 +765,7 @@ chipc_get_rman(device_t dev, int type, u_int flags) static struct resource * chipc_alloc_resource(device_t dev, device_t child, int type, - int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) + int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct chipc_softc *sc; struct chipc_region *cr; @@ -793,11 +793,11 @@ chipc_alloc_resource(device_t dev, device_t child, int type, if (!passthrough && isdefault) { /* Fetch the resource list entry. */ rle = resource_list_find(BUS_GET_RESOURCE_LIST(dev, child), - type, *rid); + type, rid); if (rle == NULL) { device_printf(dev, "default resource %#x type %d for child %s " - "not found\n", *rid, type, + "not found\n", rid, type, device_get_nameunit(child)); return (NULL); } @@ -806,7 +806,7 @@ chipc_alloc_resource(device_t dev, device_t child, int type, device_printf(dev, "resource entry %#x type %d for child %s is busy " "[%d]\n", - *rid, type, device_get_nameunit(child), + rid, type, device_get_nameunit(child), rman_get_flags(rle->res)); return (NULL); diff --git a/sys/dev/dpaa/fman.c b/sys/dev/dpaa/fman.c index 6f63e50f3a14..393c28487ba9 100644 --- a/sys/dev/dpaa/fman.c +++ b/sys/dev/dpaa/fman.c @@ -148,7 +148,7 @@ fman_release_resource(device_t bus, device_t child, struct resource *res) } struct resource * -fman_alloc_resource(device_t bus, device_t child, int type, int *rid, +fman_alloc_resource(device_t bus, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct fman_softc *sc; @@ -166,7 +166,7 @@ fman_alloc_resource(device_t bus, device_t child, int type, int *rid, KASSERT(!(isdefault && passthrough), ("%s: passthrough of default allocation", __func__)); if (!passthrough) { - rle = resource_list_find(rl, type, *rid); + rle = resource_list_find(rl, type, rid); if (rle == NULL) return (NULL); KASSERT(rle->res == NULL, @@ -189,10 +189,10 @@ fman_alloc_resource(device_t bus, device_t child, int type, int *rid, end, count, flags & ~RF_ACTIVE, child); if (res == NULL) return (NULL); - rman_set_rid(res, *rid); + rman_set_rid(res, rid); rman_set_type(res, type); if ((flags & RF_ACTIVE) != 0 && bus_activate_resource( - child, type, *rid, res) != 0) { + child, type, rid, res) != 0) { rman_release_resource(res); return (NULL); } diff --git a/sys/dev/dpaa/fman.h b/sys/dev/dpaa/fman.h index 4c30a633ae3e..a2ada5e16ffb 100644 --- a/sys/dev/dpaa/fman.h +++ b/sys/dev/dpaa/fman.h @@ -54,7 +54,7 @@ struct fman_softc { * @{ */ struct resource * fman_alloc_resource(device_t bus, device_t child, int type, - int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); + int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); int fman_activate_resource(device_t bus, device_t child, struct resource *res); int fman_release_resource(device_t bus, device_t child, struct resource *res); diff --git a/sys/dev/dpaa2/dpaa2_mc.c b/sys/dev/dpaa2/dpaa2_mc.c index 8abfc3bfe1cc..9702bdbe13ba 100644 --- a/sys/dev/dpaa2/dpaa2_mc.c +++ b/sys/dev/dpaa2/dpaa2_mc.c @@ -300,7 +300,7 @@ dpaa2_mc_detach(device_t dev) */ struct resource * -dpaa2_mc_alloc_resource(device_t mcdev, device_t child, int type, int *rid, +dpaa2_mc_alloc_resource(device_t mcdev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource *res; @@ -333,7 +333,7 @@ dpaa2_mc_alloc_resource(device_t mcdev, device_t child, int type, int *rid, return (res); fail: device_printf(mcdev, "%s() failed: type=%d, rid=%d, start=%#jx, " - "end=%#jx, count=%#jx, flags=%x\n", __func__, type, *rid, start, end, + "end=%#jx, count=%#jx, flags=%x\n", __func__, type, rid, start, end, count, flags); return (NULL); } diff --git a/sys/dev/dpaa2/dpaa2_mc.h b/sys/dev/dpaa2/dpaa2_mc.h index 5ddac7aa2720..416b77a11351 100644 --- a/sys/dev/dpaa2/dpaa2_mc.h +++ b/sys/dev/dpaa2/dpaa2_mc.h @@ -181,7 +181,7 @@ int dpaa2_mc_detach(device_t dev); struct rman *dpaa2_mc_rman(device_t mcdev, int type, u_int flags); struct resource * dpaa2_mc_alloc_resource(device_t mcdev, device_t child, - int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, + int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); int dpaa2_mc_adjust_resource(device_t mcdev, device_t child, struct resource *r, rman_res_t start, rman_res_t end); diff --git a/sys/dev/dpaa2/dpaa2_rc.c b/sys/dev/dpaa2/dpaa2_rc.c index 3cb2fdfeaa2e..c360b6fcc929 100644 --- a/sys/dev/dpaa2/dpaa2_rc.c +++ b/sys/dev/dpaa2/dpaa2_rc.c @@ -225,7 +225,7 @@ dpaa2_rc_delete_resource(device_t rcdev, device_t child, int type, int rid) } static struct resource * -dpaa2_rc_alloc_multi_resource(device_t rcdev, device_t child, int type, int *rid, +dpaa2_rc_alloc_multi_resource(device_t rcdev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource_list *rl; @@ -243,7 +243,7 @@ dpaa2_rc_alloc_multi_resource(device_t rcdev, device_t child, int type, int *rid * dedicated software portal interrupt wire. * See registers SWP_INTW0_CFG to SWP_INTW3_CFG for details. */ - if (type == SYS_RES_IRQ && *rid == 0) + if (type == SYS_RES_IRQ && rid == 0) return (NULL); return (resource_list_alloc(rl, rcdev, child, type, rid, @@ -251,7 +251,7 @@ dpaa2_rc_alloc_multi_resource(device_t rcdev, device_t child, int type, int *rid } static struct resource * -dpaa2_rc_alloc_resource(device_t rcdev, device_t child, int type, int *rid, +dpaa2_rc_alloc_resource(device_t rcdev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { if (device_get_parent(child) != rcdev) diff --git a/sys/dev/exca/exca.c b/sys/dev/exca/exca.c index 44cb399cd49e..27a439f2598c 100644 --- a/sys/dev/exca/exca.c +++ b/sys/dev/exca/exca.c @@ -858,7 +858,7 @@ exca_deactivate_resource(struct exca_softc *exca, device_t child, #if 0 static struct resource * -exca_alloc_resource(struct exca_softc *sc, device_t child, int type, int *rid, +exca_alloc_resource(struct exca_softc *sc, device_t child, int type, int rid, u_long start, u_long end, u_long count, uint flags) { struct resource *res = NULL; @@ -895,10 +895,10 @@ exca_alloc_resource(struct exca_softc *sc, device_t child, int type, int *rid, start, end, count, flags & ~RF_ACTIVE); if (res == NULL) return (NULL); - cbb_insert_res(sc, res, type, *rid); + cbb_insert_res(sc, res, type, rid); if (flags & RF_ACTIVE) { - if (bus_activate_resource(child, type, *rid, res) != 0) { - bus_release_resource(child, type, *rid, res); + if (bus_activate_resource(child, type, rid, res) != 0) { + bus_release_resource(child, type, rid, res); return (NULL); } } diff --git a/sys/dev/fdt/simplebus.c b/sys/dev/fdt/simplebus.c index 3e77f13104ff..3ad6515ed3b7 100644 --- a/sys/dev/fdt/simplebus.c +++ b/sys/dev/fdt/simplebus.c @@ -48,7 +48,7 @@ */ static int simplebus_probe(device_t dev); static struct resource *simplebus_alloc_resource(device_t, device_t, int, - int *, rman_res_t, rman_res_t, rman_res_t, u_int); + int, rman_res_t, rman_res_t, rman_res_t, u_int); static void simplebus_probe_nomatch(device_t bus, device_t child); static int simplebus_print_child(device_t bus, device_t child); static device_t simplebus_add_child(device_t dev, u_int order, @@ -460,7 +460,7 @@ simplebus_get_property(device_t bus, device_t child, const char *propname, } static struct resource * -simplebus_alloc_resource(device_t bus, device_t child, int type, int *rid, +simplebus_alloc_resource(device_t bus, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct simplebus_softc *sc; @@ -478,11 +478,11 @@ simplebus_alloc_resource(device_t bus, device_t child, int type, int *rid, if ((di = device_get_ivars(child)) == NULL) return (NULL); - rle = resource_list_find(&di->rl, type, *rid); + rle = resource_list_find(&di->rl, type, rid); if (rle == NULL) { if (bootverbose) device_printf(bus, "no default resources for " - "rid = %d, type = %d\n", *rid, type); + "rid = %d, type = %d\n", rid, type); return (NULL); } start = rle->start; diff --git a/sys/dev/gpio/gpiobus.c b/sys/dev/gpio/gpiobus.c index 596e468d35f3..848abe025f52 100644 --- a/sys/dev/gpio/gpiobus.c +++ b/sys/dev/gpio/gpiobus.c @@ -864,7 +864,7 @@ gpiobus_get_rman(device_t bus, int type, u_int flags) } static struct resource * -gpiobus_alloc_resource(device_t bus, device_t child, int type, int *rid, +gpiobus_alloc_resource(device_t bus, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource_list *rl; @@ -876,7 +876,7 @@ gpiobus_alloc_resource(device_t bus, device_t child, int type, int *rid, rl = BUS_GET_RESOURCE_LIST(bus, child); if (rl == NULL) return (NULL); - rle = resource_list_find(rl, type, *rid); + rle = resource_list_find(rl, type, rid); if (rle == NULL) return (NULL); start = rle->start; diff --git a/sys/dev/hyperv/pcib/vmbus_pcib.c b/sys/dev/hyperv/pcib/vmbus_pcib.c index 7b755e5f9c63..c90d1e1fb028 100644 --- a/sys/dev/hyperv/pcib/vmbus_pcib.c +++ b/sys/dev/hyperv/pcib/vmbus_pcib.c @@ -1663,7 +1663,7 @@ vmbus_pcib_write_ivar(device_t dev, device_t child, int which, uintptr_t val) } static struct resource * -vmbus_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, +vmbus_pcib_alloc_resource(device_t dev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { unsigned int bar_no; @@ -1687,7 +1687,7 @@ vmbus_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, if (!hpdev) return (NULL); - bar_no = PCI_RID2BAR(*rid); + bar_no = PCI_RID2BAR(rid); if (bar_no >= MAX_NUM_BARS) return (NULL); diff --git a/sys/dev/hyperv/vmbus/vmbus.c b/sys/dev/hyperv/vmbus/vmbus.c index 115d4af599ee..15683f21ea6a 100644 --- a/sys/dev/hyperv/vmbus/vmbus.c +++ b/sys/dev/hyperv/vmbus/vmbus.c @@ -92,7 +92,7 @@ static int vmbus_read_ivar(device_t, device_t, int, uintptr_t *); static int vmbus_child_pnpinfo(device_t, device_t, struct sbuf *); static struct resource *vmbus_alloc_resource(device_t dev, - device_t child, int type, int *rid, + device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); static int vmbus_alloc_msi(device_t bus, device_t dev, @@ -1062,7 +1062,7 @@ vmbus_sysctl_version(SYSCTL_HANDLER_ARGS) * For the release function, we can use bus_generic_release_resource(). */ static struct resource * -vmbus_alloc_resource(device_t dev, device_t child, int type, int *rid, +vmbus_alloc_resource(device_t dev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { device_t parent = device_get_parent(dev); @@ -1346,7 +1346,7 @@ vmbus_fb_mmio_res(device_t dev) fb_start, fb_count, fb_height * fb_width); hv_fb_res = pcib_host_res_alloc(&sc->vmbus_mmio_res, dev, - SYS_RES_MEMORY, &rid, fb_start, fb_end, fb_count, + SYS_RES_MEMORY, rid, fb_start, fb_end, fb_count, RF_ACTIVE | rman_make_alignment_flags(PAGE_SIZE)); if (hv_fb_res && bootverbose) diff --git a/sys/dev/mvs/mvs_pci.c b/sys/dev/mvs/mvs_pci.c index f0df709db732..322da77968cf 100644 --- a/sys/dev/mvs/mvs_pci.c +++ b/sys/dev/mvs/mvs_pci.c @@ -389,7 +389,7 @@ mvs_intr(void *data) } static struct resource * -mvs_alloc_resource(device_t dev, device_t child, int type, int *rid, +mvs_alloc_resource(device_t dev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { @@ -415,7 +415,7 @@ mvs_alloc_resource(device_t dev, device_t child, int type, int *rid, } break; case SYS_RES_IRQ: - if (*rid == ATA_IRQ_RID) + if (rid == ATA_IRQ_RID) res = ctlr->irq.r_irq; break; } diff --git a/sys/dev/mvs/mvs_soc.c b/sys/dev/mvs/mvs_soc.c index 5bafc07847b4..8dc5ed7a3034 100644 --- a/sys/dev/mvs/mvs_soc.c +++ b/sys/dev/mvs/mvs_soc.c @@ -329,7 +329,7 @@ mvs_intr(void *data) } static struct resource * -mvs_alloc_resource(device_t dev, device_t child, int type, int *rid, +mvs_alloc_resource(device_t dev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct mvs_controller *ctlr = device_get_softc(dev); @@ -354,7 +354,7 @@ mvs_alloc_resource(device_t dev, device_t child, int type, int *rid, } break; case SYS_RES_IRQ: - if (*rid == ATA_IRQ_RID) + if (rid == ATA_IRQ_RID) res = ctlr->irq.r_irq; break; } diff --git a/sys/dev/ofw/ofw_pcib.c b/sys/dev/ofw/ofw_pcib.c index 0cfddd155e52..268fff0f9074 100644 --- a/sys/dev/ofw/ofw_pcib.c +++ b/sys/dev/ofw/ofw_pcib.c @@ -66,7 +66,7 @@ */ static struct rman *ofw_pcib_get_rman(device_t, int, u_int); static struct resource * ofw_pcib_alloc_resource(device_t, device_t, - int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); + int, int, rman_res_t, rman_res_t, rman_res_t, u_int); static int ofw_pcib_release_resource(device_t, device_t, struct resource *); static int ofw_pcib_activate_resource(device_t, device_t, struct resource *); static int ofw_pcib_deactivate_resource(device_t, device_t, struct resource *); @@ -419,7 +419,7 @@ ofw_pcib_nranges(phandle_t node, struct ofw_pci_cell_info *info) } static struct resource * -ofw_pcib_alloc_resource(device_t bus, device_t child, int type, int *rid, +ofw_pcib_alloc_resource(device_t bus, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct ofw_pci_softc *sc; diff --git a/sys/dev/ofw/ofwbus.c b/sys/dev/ofw/ofwbus.c index d66befcb7314..d03107e53391 100644 *** 1629 LINES SKIPPED *** From nobody Tue Dec 9 20:12:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQqlV3Sbwz6JkY5 for ; Tue, 09 Dec 2025 20:12:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQqlV1GYBz3wLW for ; Tue, 09 Dec 2025 20:12:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765311158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EtfUucct5mEYKQS6+r5CWCCk4RIVwLJUZEQRCSKd9JA=; b=ffX3aGmj6LOIz3rysOrZK9UJ0RoFlrBbZLzjmw4iap7lWtd8Q/6FjdvysOqO0wgVokVkmh WujQU4bhJoF5Ll6SouEfOh7qorG+QoZFNA7occf3LwWc1QNzU8DPHfCbGG+b7r6bXfknbV KKy/RzQ3wXooS05twnSHw81LpvK01ujaaTMjbromDiOqg4EIuMig2iuRnSM/bO8tz2cIFV oFrZuLbXQ8O9+eIZXq/4Ou4kpzV8TiEzw23I2rv5tmTySduaQ5bXMM6tcyTS0s2wfRgwLZ Bc6u5Mzm9I5AX2gGRu54x8w76yYOPNKbP5SUUDCO5zS3fhbedXAhvEij3nbrPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765311158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EtfUucct5mEYKQS6+r5CWCCk4RIVwLJUZEQRCSKd9JA=; b=kL29VfkzBIAxTN89BAdnKLhuBT3Jb5siDxpFU6zhJ6JfafcRdZDiDxXFZuj8s8mrtzNkLc ZuF3IarBG4vPNaPuszb6uuoJIcrMnk6Wtgh+inI2D4lzdw1qrETF3WkIGWA3cXqB6m3VP4 iSPRDKC4IXJXhxJg08vusvUcQx4+CS5/yTlm4RDxxU1H+hYhj1pqrKmT0UljQLCT/97MoR Zicjw6hM/FqM6Ed3mQGnoeTUZbA/KYCf1160L1vNcLaib7t0ruWQ5WvvQtPRX5i7X0sBnh LuKyJNDOUugwr6PuI0BDIqYQsbmFeoFLNxgFk2AnvIDHfzARtaG6YAwaNE4Oug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765311158; a=rsa-sha256; cv=none; b=U+ZUxkEhYcTjmgOSGKDMsAM063+HCnU7l0wURwNdJH+pcp107LH7TdTjeBojvD4sdr93tL btm5YhTOpWcsBSfDAcAzCHrVOYSALvu4/DjUyLloI+S/NZE2nv9XAM1ibWE2luJk6VBT2e Ip2MfoQv9mqxM24fWHzhnGhLd5jL267frsJgtLpVNdnOj76lYzn0+0G3w7m4Fo8wpGxGDf 8ZWpmPVFeMgWAIz3u0biOIsDMFEJQJdDZLQXR4EPOPVW8jmizkSuGMBM+tIdzWWeoHMSYg RFjEV5O1viJhR4o6N97cHq0hgJrx6O5LlM9srqgUYZdv9l0mLvxEem+b088LDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQqlT6w5pz2j for ; Tue, 09 Dec 2025 20:12:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2e9e3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 20:12:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: d08fac086f7c - main - dpaa2_rc_add_res: Pass rid by value List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: d08fac086f7cc6d300e037ba3f959365315c2967 Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 20:12:37 +0000 Message-Id: <693882b5.2e9e3.768a8c67@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d08fac086f7cc6d300e037ba3f959365315c2967 commit d08fac086f7cc6d300e037ba3f959365315c2967 Author: John Baldwin AuthorDate: 2025-12-09 20:03:15 +0000 Commit: John Baldwin CommitDate: 2025-12-09 20:03:15 +0000 dpaa2_rc_add_res: Pass rid by value Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D53408 --- sys/dev/dpaa2/dpaa2_rc.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/sys/dev/dpaa2/dpaa2_rc.c b/sys/dev/dpaa2/dpaa2_rc.c index 36cacd1daa4b..5e4346ad6969 100644 --- a/sys/dev/dpaa2/dpaa2_rc.c +++ b/sys/dev/dpaa2/dpaa2_rc.c @@ -79,7 +79,7 @@ static int dpaa2_rc_add_managed_child(struct dpaa2_rc_softc *, static int dpaa2_rc_enable_irq(struct dpaa2_mcp *, struct dpaa2_cmd *, uint8_t, bool, uint16_t); static int dpaa2_rc_configure_irq(device_t, device_t, int, uint64_t, uint32_t); -static int dpaa2_rc_add_res(device_t, device_t, enum dpaa2_dev_type, int *, int); +static int dpaa2_rc_add_res(device_t, device_t, enum dpaa2_dev_type, int, int); static int dpaa2_rc_print_type(struct resource_list *, enum dpaa2_dev_type); static struct dpaa2_mcp *dpaa2_rc_select_portal(device_t, device_t); @@ -2890,7 +2890,7 @@ dpaa2_rc_add_child(struct dpaa2_rc_softc *sc, struct dpaa2_cmd *cmd, const char *devclass; int dpio_n = 0; /* to limit DPIOs by # of CPUs */ int dpcon_n = 0; /* to limit DPCONs by # of CPUs */ - int rid, error; + int error; rcdev = sc->dev; rcinfo = device_get_ivars(rcdev); @@ -2944,7 +2944,6 @@ dpaa2_rc_add_child(struct dpaa2_rc_softc *sc, struct dpaa2_cmd *cmd, for (; res_spec && res_spec->type != -1; res_spec++) { if (res_spec->type < DPAA2_DEV_MC) continue; /* Skip non-DPAA2 resource. */ - rid = res_spec->rid; /* Limit DPIOs and DPCONs by number of CPUs. */ if (res_spec->type == DPAA2_DEV_IO && dpio_n >= mp_ncpus) { @@ -2956,8 +2955,8 @@ dpaa2_rc_add_child(struct dpaa2_rc_softc *sc, struct dpaa2_cmd *cmd, continue; } - error = dpaa2_rc_add_res(rcdev, dev, res_spec->type, &rid, - res_spec->flags); + error = dpaa2_rc_add_res(rcdev, dev, res_spec->type, + res_spec->rid, res_spec->flags); if (error) device_printf(rcdev, "%s: dpaa2_rc_add_res() failed: " "error=%d\n", __func__, error); @@ -2993,7 +2992,7 @@ dpaa2_rc_add_managed_child(struct dpaa2_rc_softc *sc, struct dpaa2_cmd *cmd, const char *devclass; uint64_t start, end, count; uint32_t flags = 0; - int rid, error; + int error; rcdev = sc->dev; child = sc->dev; @@ -3088,10 +3087,9 @@ dpaa2_rc_add_managed_child(struct dpaa2_rc_softc *sc, struct dpaa2_cmd *cmd, for (; res_spec && res_spec->type != -1; res_spec++) { if (res_spec->type < DPAA2_DEV_MC) continue; /* Skip non-DPAA2 resource. */ - rid = res_spec->rid; - error = dpaa2_rc_add_res(rcdev, dev, res_spec->type, &rid, - res_spec->flags); + error = dpaa2_rc_add_res(rcdev, dev, res_spec->type, + res_spec->rid, res_spec->flags); if (error) device_printf(rcdev, "%s: dpaa2_rc_add_res() failed: " "error=%d\n", __func__, error); @@ -3285,7 +3283,7 @@ dpaa2_rc_wait_for_cmd(struct dpaa2_mcp *mcp, struct dpaa2_cmd *cmd) */ static int dpaa2_rc_add_res(device_t rcdev, device_t child, enum dpaa2_dev_type devtype, - int *rid, int flags) + int rid, int flags) { device_t dpaa2_dev; struct dpaa2_devinfo *dinfo = device_get_ivars(child); @@ -3297,7 +3295,7 @@ dpaa2_rc_add_res(device_t rcdev, device_t child, enum dpaa2_dev_type devtype, error = DPAA2_MC_GET_FREE_DEV(rcdev, &dpaa2_dev, devtype); if (error && !(flags & RF_SHAREABLE)) { device_printf(rcdev, "%s: failed to obtain a free %s (rid=%d) " - "for: %s (id=%u)\n", __func__, dpaa2_ttos(devtype), *rid, + "for: %s (id=%u)\n", __func__, dpaa2_ttos(devtype), rid, dpaa2_ttos(dinfo->dtype), dinfo->id); return (error); } @@ -3308,7 +3306,7 @@ dpaa2_rc_add_res(device_t rcdev, device_t child, enum dpaa2_dev_type devtype, if (error) { device_printf(rcdev, "%s: failed to obtain a shared " "%s (rid=%d) for: %s (id=%u)\n", __func__, - dpaa2_ttos(devtype), *rid, dpaa2_ttos(dinfo->dtype), + dpaa2_ttos(devtype), rid, dpaa2_ttos(dinfo->dtype), dinfo->id); return (error); } @@ -3316,16 +3314,16 @@ dpaa2_rc_add_res(device_t rcdev, device_t child, enum dpaa2_dev_type devtype, } /* Add DPAA2 device to the resource list of the child device. */ - resource_list_add(&dinfo->resources, devtype, *rid, + resource_list_add(&dinfo->resources, devtype, rid, (rman_res_t) dpaa2_dev, (rman_res_t) dpaa2_dev, 1); /* Reserve a newly added DPAA2 resource. */ res = resource_list_reserve(&dinfo->resources, rcdev, child, devtype, - *rid, (rman_res_t) dpaa2_dev, (rman_res_t) dpaa2_dev, 1, + rid, (rman_res_t) dpaa2_dev, (rman_res_t) dpaa2_dev, 1, flags & ~RF_ACTIVE); if (!res) { device_printf(rcdev, "%s: failed to reserve %s (rid=%d) for: %s " - "(id=%u)\n", __func__, dpaa2_ttos(devtype), *rid, + "(id=%u)\n", __func__, dpaa2_ttos(devtype), rid, dpaa2_ttos(dinfo->dtype), dinfo->id); return (EBUSY); } @@ -3336,7 +3334,7 @@ dpaa2_rc_add_res(device_t rcdev, device_t child, enum dpaa2_dev_type devtype, if (error) { device_printf(rcdev, "%s: failed to reserve a shared " "%s (rid=%d) for: %s (id=%u)\n", __func__, - dpaa2_ttos(devtype), *rid, dpaa2_ttos(dinfo->dtype), + dpaa2_ttos(devtype), rid, dpaa2_ttos(dinfo->dtype), dinfo->id); return (error); } From nobody Tue Dec 9 20:12:40 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQqlX5y1Hz6Jl8m for ; Tue, 09 Dec 2025 20:12:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQqlX2t1Gz3wRW for ; Tue, 09 Dec 2025 20:12:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765311160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UNJgr7B4UW9uZiiPV8WVIUK9VL221UGOWLpJVOnZAd8=; b=CyR1kpOXN07BXpc/tncefxyggm/Wjl7veaTmGXFa5xfPg2HhnMEyxVteT0bBPnshop+zjO mIo6bNMnsywmUUBE2297Sq3fHskKWKzqgfSpNOuBjMNny8Gd7B2PbO2a7GXKm2Y5iNoc6g bDJKG2maf161fkN/IP/iQ7YZDa4lNepTQ0dRY/CRdyvqQujWkBSgkY87QrVnLYicHVjt3D mBgtBRW0TrFsPmX4hkHU9+HwBYy/SWcA09K5lNe+N/KMG5aOm+0ST1g7vOs2Ixn8tpMblt 2DGW4ZvJQHTeu3sm8AeV5wCTzLW2O+Y7TAWhhkYvyDLudG2wFmO645E95MNiQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765311160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UNJgr7B4UW9uZiiPV8WVIUK9VL221UGOWLpJVOnZAd8=; b=yO5DRVSXAEstYZOxFNZeu0IjZ1CK/lhbAxkzxODZmQb9+i0Ku8UaHemjbzBtc4AjwxVnrO wEWfmZSrbzizifmDdJnIidPeDMU1d/uzg6ZE7QMboV1ngwtGObjduku4RINaFqpLT5GFWI EWGPQnJYPHkMlr/Ef5aN7BjrWtes13lgwyruGmmTTpuNCP713UI/yPO2pl1gyVEYi1Sqh0 psRLniWvIJ89Z6h0uADeVsl4lybC/Ljwik0/l1IByhuiRvEUpty8oCBCSHIYQ6OFQ3OjM0 MVwHBaTyvmONQsNTNsKJOe2GO+CAjx9758IWlh31GgWLWltgEw3Zt3erQb88fg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765311160; a=rsa-sha256; cv=none; b=uUeECpPp4ES6x1zyaClYBUj9zoP7XkqWmSzbBvtoZE8oXI/gVeoBLszhxD+15JO61wLLD3 nFcSKCKVtNBq/Peqv7Z4USY9i06tET7/dCrwXK+kCgLqkK2tF8Rdc6TfKg9jElM8yF794/ Ckcg6X4F2yB53IJIMMmhSLWutS1vUL+bCMYrfBfM87qM2Vm3LdCk8/FSn5NgHTZKlt5B8G DvTXYgsMec8n9dEQH+zXPD2GtoEOlo2/EpD/+Jr+3mUMS3lhJIvRscZ/DuhHwaLItmLI3v IHOSgbcfVv57l9hzw0Fa3U3AziouEIueAzcp5Y3lBxST4qY78CvWesbgTGMBVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQqlX1W2vz1CxW for ; Tue, 09 Dec 2025 20:12:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3094e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 20:12:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: ca942ab4b2b6 - main - bhnd_bus_*_resource: Remove redundant type and rid arguments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: ca942ab4b2b665e5375cc72afc4930d3b33b14f9 Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 20:12:40 +0000 Message-Id: <693882b8.3094e.74bb171d@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ca942ab4b2b665e5375cc72afc4930d3b33b14f9 commit ca942ab4b2b665e5375cc72afc4930d3b33b14f9 Author: John Baldwin AuthorDate: 2025-12-09 20:03:42 +0000 Commit: John Baldwin CommitDate: 2025-12-09 20:03:42 +0000 bhnd_bus_*_resource: Remove redundant type and rid arguments Remove type and rid arguments from bhnd_bus_(activate|deactivate|release)_resource. This should have been done earlier to match the changes made to bus_release_resource, etc. While fixing up the callers, remove rid members from softc structures since the only time a value is needed is as a constant input to bhnd_bus_alloc_resource*. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D53410 --- sys/dev/bhnd/bcma/bcma_subr.c | 10 ++++------ sys/dev/bhnd/bcma/bcmavar.h | 1 - sys/dev/bhnd/bhnd.h | 33 +++++++++---------------------- sys/dev/bhnd/bhnd_bus_if.m | 6 ------ sys/dev/bhnd/bhnd_erom.c | 14 +++---------- sys/dev/bhnd/bhnd_subr.c | 20 +++++++++---------- sys/dev/bhnd/bhndb/bhndb.c | 10 +++++----- sys/dev/bhnd/cores/chipc/chipc.c | 9 ++++----- sys/dev/bhnd/cores/chipc/chipc_gpio.c | 8 +++----- sys/dev/bhnd/cores/chipc/chipc_gpiovar.h | 1 - sys/dev/bhnd/cores/chipc/chipc_private.h | 1 - sys/dev/bhnd/cores/chipc/chipc_subr.c | 16 ++++++--------- sys/dev/bhnd/cores/pci/bhnd_pci.c | 4 ++-- sys/dev/bhnd/cores/pci/bhnd_pcivar.h | 1 - sys/dev/bhnd/cores/pcie2/bhnd_pcie2.c | 4 ++-- sys/dev/bhnd/cores/pcie2/bhnd_pcie2_var.h | 1 - sys/dev/bhnd/cores/pmu/bhnd_pmu_core.c | 9 +++------ sys/dev/bhnd/cores/pmu/bhnd_pmuvar.h | 1 - sys/dev/bhnd/nvram/bhnd_sprom.c | 8 +++----- sys/dev/bhnd/siba/siba.c | 6 +++--- sys/dev/bhnd/siba/siba_subr.c | 5 +---- sys/dev/bhnd/siba/sibavar.h | 1 - 22 files changed, 58 insertions(+), 111 deletions(-) diff --git a/sys/dev/bhnd/bcma/bcma_subr.c b/sys/dev/bhnd/bcma/bcma_subr.c index 9e442ce911d4..fceca807df9c 100644 --- a/sys/dev/bhnd/bcma/bcma_subr.c +++ b/sys/dev/bhnd/bcma/bcma_subr.c @@ -214,7 +214,7 @@ bcma_dinfo_init_agent(device_t bus, device_t child, struct bcma_devinfo *dinfo) bhnd_addr_t addr; bhnd_size_t size; rman_res_t r_start, r_count, r_end; - int error; + int error, rid_agent; KASSERT(dinfo->res_agent == NULL, ("double allocation of agent")); @@ -237,9 +237,9 @@ bcma_dinfo_init_agent(device_t bus, device_t child, struct bcma_devinfo *dinfo) r_count = size; r_end = r_start + r_count - 1; - dinfo->rid_agent = BCMA_AGENT_RID(dinfo); + rid_agent = BCMA_AGENT_RID(dinfo); dinfo->res_agent = BHND_BUS_ALLOC_RESOURCE(bus, bus, SYS_RES_MEMORY, - dinfo->rid_agent, r_start, r_end, r_count, RF_ACTIVE|RF_SHAREABLE); + rid_agent, r_start, r_end, r_count, RF_ACTIVE|RF_SHAREABLE); if (dinfo->res_agent == NULL) { device_printf(bus, "failed allocating agent register block for " "core %u\n", BCMA_DINFO_COREIDX(dinfo)); @@ -332,7 +332,6 @@ bcma_alloc_dinfo(device_t bus) dinfo->corecfg = NULL; dinfo->res_agent = NULL; - dinfo->rid_agent = -1; STAILQ_INIT(&dinfo->intrs); dinfo->num_intrs = 0; @@ -434,8 +433,7 @@ bcma_free_dinfo(device_t bus, device_t child, struct bcma_devinfo *dinfo) /* Release agent resource, if any */ if (dinfo->res_agent != NULL) { - bhnd_release_resource(bus, SYS_RES_MEMORY, dinfo->rid_agent, - dinfo->res_agent); + bhnd_release_resource(bus, dinfo->res_agent); } /* Clean up interrupt descriptors */ diff --git a/sys/dev/bhnd/bcma/bcmavar.h b/sys/dev/bhnd/bcma/bcmavar.h index 1a019b62970a..496a87946b3e 100644 --- a/sys/dev/bhnd/bcma/bcmavar.h +++ b/sys/dev/bhnd/bcma/bcmavar.h @@ -180,7 +180,6 @@ struct bcma_devinfo { struct bhnd_resource *res_agent; /**< Agent (wrapper) resource, or NULL. Not * all bcma(4) cores have or require an agent. */ - int rid_agent; /**< Agent resource ID, or -1 */ u_int num_intrs; /**< number of interrupt descriptors. */ struct bcma_intr_list intrs; /**< interrupt descriptors */ diff --git a/sys/dev/bhnd/bhnd.h b/sys/dev/bhnd/bhnd.h index da1686f4d6c9..1a29b922d491 100644 --- a/sys/dev/bhnd/bhnd.h +++ b/sys/dev/bhnd/bhnd.h @@ -621,14 +621,11 @@ struct bhnd_resource *bhnd_bus_generic_alloc_resource (device_t dev, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); int bhnd_bus_generic_release_resource (device_t dev, - device_t child, int type, int rid, - struct bhnd_resource *r); + device_t child, struct bhnd_resource *r); int bhnd_bus_generic_activate_resource (device_t dev, - device_t child, int type, int rid, - struct bhnd_resource *r); + device_t child, struct bhnd_resource *r); int bhnd_bus_generic_deactivate_resource (device_t dev, - device_t child, int type, int rid, - struct bhnd_resource *r); + device_t child, struct bhnd_resource *r); uintptr_t bhnd_bus_generic_get_intr_domain(device_t dev, device_t child, bool self); @@ -1323,8 +1320,6 @@ bhnd_alloc_resource_any(device_t dev, int type, int rid, u_int flags) * Activate a previously allocated bhnd resource. * * @param dev The device holding ownership of the allocated resource. - * @param type The type of the resource. - * @param rid The bus-specific handle identifying the resource. * @param r A pointer to the resource returned by bhnd_alloc_resource or * BHND_BUS_ALLOC_RESOURCE. * @@ -1332,19 +1327,15 @@ bhnd_alloc_resource_any(device_t dev, int type, int rid, u_int flags) * @retval non-zero an error occurred while activating the resource. */ static inline int -bhnd_activate_resource(device_t dev, int type, int rid, - struct bhnd_resource *r) +bhnd_activate_resource(device_t dev, struct bhnd_resource *r) { - return BHND_BUS_ACTIVATE_RESOURCE(device_get_parent(dev), dev, type, - rid, r); + return BHND_BUS_ACTIVATE_RESOURCE(device_get_parent(dev), dev, r); } /** * Deactivate a previously activated bhnd resource. * * @param dev The device holding ownership of the activated resource. - * @param type The type of the resource. - * @param rid The bus-specific handle identifying the resource. * @param r A pointer to the resource returned by bhnd_alloc_resource or * BHND_BUS_ALLOC_RESOURCE. * @@ -1352,19 +1343,15 @@ bhnd_activate_resource(device_t dev, int type, int rid, * @retval non-zero an error occurred while activating the resource. */ static inline int -bhnd_deactivate_resource(device_t dev, int type, int rid, - struct bhnd_resource *r) +bhnd_deactivate_resource(device_t dev, struct bhnd_resource *r) { - return BHND_BUS_DEACTIVATE_RESOURCE(device_get_parent(dev), dev, type, - rid, r); + return BHND_BUS_DEACTIVATE_RESOURCE(device_get_parent(dev), dev, r); } /** * Free a resource allocated by bhnd_alloc_resource(). * * @param dev The device holding ownership of the resource. - * @param type The type of the resource. - * @param rid The bus-specific handle identifying the resource. * @param r A pointer to the resource returned by bhnd_alloc_resource or * BHND_ALLOC_RESOURCE. * @@ -1372,11 +1359,9 @@ bhnd_deactivate_resource(device_t dev, int type, int rid, * @retval non-zero an error occurred while activating the resource. */ static inline int -bhnd_release_resource(device_t dev, int type, int rid, - struct bhnd_resource *r) +bhnd_release_resource(device_t dev, struct bhnd_resource *r) { - return BHND_BUS_RELEASE_RESOURCE(device_get_parent(dev), dev, type, - rid, r); + return BHND_BUS_RELEASE_RESOURCE(device_get_parent(dev), dev, r); } /** diff --git a/sys/dev/bhnd/bhnd_bus_if.m b/sys/dev/bhnd/bhnd_bus_if.m index 62c34404e87f..6ae56ceeb196 100644 --- a/sys/dev/bhnd/bhnd_bus_if.m +++ b/sys/dev/bhnd/bhnd_bus_if.m @@ -939,8 +939,6 @@ METHOD struct bhnd_resource * alloc_resource { METHOD int release_resource { device_t dev; device_t child; - int type; - int rid; struct bhnd_resource *res; } DEFAULT bhnd_bus_generic_release_resource; @@ -953,8 +951,6 @@ METHOD int release_resource { METHOD int activate_resource { device_t dev; device_t child; - int type; - int rid; struct bhnd_resource *r; } DEFAULT bhnd_bus_generic_activate_resource; @@ -967,8 +963,6 @@ METHOD int activate_resource { METHOD int deactivate_resource { device_t dev; device_t child; - int type; - int rid; struct bhnd_resource *r; } DEFAULT bhnd_bus_generic_deactivate_resource; diff --git a/sys/dev/bhnd/bhnd_erom.c b/sys/dev/bhnd/bhnd_erom.c index 2c4af61438fe..a8d6afe4b7f9 100644 --- a/sys/dev/bhnd/bhnd_erom.c +++ b/sys/dev/bhnd/bhnd_erom.c @@ -73,7 +73,6 @@ struct bhnd_erom_iores { device_t owner; /**< device from which we'll allocate resources */ int owner_rid; /**< rid to use when allocating new mappings */ struct bhnd_resource *mapped; /**< current mapping, or NULL */ - int mapped_rid; /**< resource ID of current mapping, or -1 */ }; /** @@ -390,7 +389,6 @@ bhnd_erom_iores_new(device_t dev, int rid) iores->owner = dev; iores->owner_rid = rid; iores->mapped = NULL; - iores->mapped_rid = -1; return (&iores->eio); } @@ -420,19 +418,15 @@ bhnd_erom_iores_map(struct bhnd_erom_io *eio, bhnd_addr_t addr, } /* Otherwise, we need to drop the existing mapping */ - bhnd_release_resource(iores->owner, SYS_RES_MEMORY, - iores->mapped_rid, iores->mapped); + bhnd_release_resource(iores->owner, iores->mapped); iores->mapped = NULL; - iores->mapped_rid = -1; } /* Try to allocate the new mapping */ - iores->mapped_rid = iores->owner_rid; iores->mapped = bhnd_alloc_resource(iores->owner, SYS_RES_MEMORY, - iores->mapped_rid, addr, addr+size-1, size, + iores->owner_rid, addr, addr+size-1, size, RF_ACTIVE|RF_SHAREABLE); if (iores->mapped == NULL) { - iores->mapped_rid = -1; return (ENXIO); } @@ -481,10 +475,8 @@ bhnd_erom_iores_fini(struct bhnd_erom_io *eio) /* Release any mapping */ if (iores->mapped) { - bhnd_release_resource(iores->owner, SYS_RES_MEMORY, - iores->mapped_rid, iores->mapped); + bhnd_release_resource(iores->owner, iores->mapped); iores->mapped = NULL; - iores->mapped_rid = -1; } free(eio, M_BHND); diff --git a/sys/dev/bhnd/bhnd_subr.c b/sys/dev/bhnd/bhnd_subr.c index 299388d51626..9274b2386728 100644 --- a/sys/dev/bhnd/bhnd_subr.c +++ b/sys/dev/bhnd/bhnd_subr.c @@ -1044,7 +1044,7 @@ bhnd_release_resources(device_t dev, const struct resource_spec *rs, if (res[i] == NULL) continue; - bhnd_release_resource(dev, rs[i].type, rs[i].rid, res[i]); + bhnd_release_resource(dev, res[i]); res[i] = NULL; } } @@ -2216,7 +2216,7 @@ bhnd_bus_generic_alloc_resource(device_t dev, device_t child, int type, /* Attempt activation */ if (flags & RF_ACTIVE) { - error = BHND_BUS_ACTIVATE_RESOURCE(dev, child, type, rid, br); + error = BHND_BUS_ACTIVATE_RESOURCE(dev, child, br); if (error) goto failed; } @@ -2238,8 +2238,8 @@ failed: * the backing resource to BUS_RELEASE_RESOURCE(). */ int -bhnd_bus_generic_release_resource(device_t dev, device_t child, int type, - int rid, struct bhnd_resource *r) +bhnd_bus_generic_release_resource(device_t dev, device_t child, + struct bhnd_resource *r) { int error; @@ -2262,8 +2262,8 @@ bhnd_bus_generic_release_resource(device_t dev, device_t child, int type, * to a parent bhnd bus or bridge. */ int -bhnd_bus_generic_activate_resource(device_t dev, device_t child, int type, - int rid, struct bhnd_resource *r) +bhnd_bus_generic_activate_resource(device_t dev, device_t child, + struct bhnd_resource *r) { int error; bool passthrough; @@ -2273,7 +2273,7 @@ bhnd_bus_generic_activate_resource(device_t dev, device_t child, int type, /* Try to delegate to the parent */ if (device_get_parent(dev) != NULL) { error = BHND_BUS_ACTIVATE_RESOURCE(device_get_parent(dev), - child, type, rid, r); + child, r); } else { error = ENODEV; } @@ -2282,7 +2282,7 @@ bhnd_bus_generic_activate_resource(device_t dev, device_t child, int type, * parent, try falling back on standard resource activation. */ if (error && !passthrough) { - error = bus_activate_resource(child, type, rid, r->res); + error = bus_activate_resource(child, r->res); if (!error) r->direct = true; } @@ -2298,11 +2298,11 @@ bhnd_bus_generic_activate_resource(device_t dev, device_t child, int type, */ int bhnd_bus_generic_deactivate_resource(device_t dev, device_t child, - int type, int rid, struct bhnd_resource *r) + struct bhnd_resource *r) { if (device_get_parent(dev) != NULL) return (BHND_BUS_DEACTIVATE_RESOURCE(device_get_parent(dev), - child, type, rid, r)); + child, r)); return (EINVAL); } diff --git a/sys/dev/bhnd/bhndb/bhndb.c b/sys/dev/bhnd/bhndb/bhndb.c index 90ae719787dc..6ee5a698987d 100644 --- a/sys/dev/bhnd/bhndb/bhndb.c +++ b/sys/dev/bhnd/bhndb/bhndb.c @@ -1503,7 +1503,7 @@ bhndb_get_resource_list(device_t dev, device_t child) */ static int bhndb_activate_bhnd_resource(device_t dev, device_t child, - int type, int rid, struct bhnd_resource *r) + struct bhnd_resource *r) { struct bhndb_softc *sc; struct bhndb_region *region; @@ -1522,7 +1522,7 @@ bhndb_activate_bhnd_resource(device_t dev, device_t child, /* Delegate directly to BUS_ACTIVATE_RESOURCE() if the requested * resource type isn't handled locally. */ - if (bhndb_get_rman(sc, child, type) == NULL) { + if (bhndb_get_rman(sc, child, rman_get_type(r->res)) == NULL) { error = BUS_ACTIVATE_RESOURCE(dev, child, r->res); if (error == 0) r->direct = true; @@ -1535,7 +1535,7 @@ bhndb_activate_bhnd_resource(device_t dev, device_t child, /* Determine the resource priority of bridged resources, and skip direct * allocation if the priority is too low. */ if (bhndb_get_addrspace(sc, child) == BHNDB_ADDRSPACE_BRIDGED) { - switch (type) { + switch (rman_get_type(r->res)) { case SYS_RES_IRQ: /* IRQ resources are always direct */ break; @@ -1557,7 +1557,7 @@ bhndb_activate_bhnd_resource(device_t dev, device_t child, default: device_printf(dev, "unsupported resource type %d\n", - type); + rman_get_type(r->res)); return (ENXIO); } } @@ -1591,7 +1591,7 @@ bhndb_activate_bhnd_resource(device_t dev, device_t child, */ static int bhndb_deactivate_bhnd_resource(device_t dev, device_t child, - int type, int rid, struct bhnd_resource *r) + struct bhnd_resource *r) { int error; diff --git a/sys/dev/bhnd/cores/chipc/chipc.c b/sys/dev/bhnd/cores/chipc/chipc.c index 8d62bbcc4712..4863a1b4e270 100644 --- a/sys/dev/bhnd/cores/chipc/chipc.c +++ b/sys/dev/bhnd/cores/chipc/chipc.c @@ -1005,17 +1005,16 @@ cleanup: } static int -chipc_activate_bhnd_resource(device_t dev, device_t child, int type, - int rid, struct bhnd_resource *r) +chipc_activate_bhnd_resource(device_t dev, device_t child, + struct bhnd_resource *r) { struct rman *rm; int error; /* Delegate non-locally managed resources to parent */ - rm = chipc_get_rman(dev, type, rman_get_flags(r->res)); + rm = chipc_get_rman(dev, rman_get_type(r->res), rman_get_flags(r->res)); if (rm == NULL || !rman_is_region_manager(r->res, rm)) { - return (bhnd_bus_generic_activate_resource(dev, child, type, - rid, r)); + return (bhnd_bus_generic_activate_resource(dev, child, r)); } /* Try activating the chipc region resource */ diff --git a/sys/dev/bhnd/cores/chipc/chipc_gpio.c b/sys/dev/bhnd/cores/chipc/chipc_gpio.c index 8e4445155f7b..638c0b9dc592 100644 --- a/sys/dev/bhnd/cores/chipc/chipc_gpio.c +++ b/sys/dev/bhnd/cores/chipc/chipc_gpio.c @@ -138,8 +138,7 @@ chipc_gpio_attach(device_t dev) CC_GPIO_LOCK_INIT(sc); - sc->mem_rid = 0; - sc->mem_res = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, sc->mem_rid, + sc->mem_res = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, 0, RF_ACTIVE|RF_SHAREABLE); if (sc->mem_res == NULL) { device_printf(dev, "failed to allocate chipcommon registers\n"); @@ -195,8 +194,7 @@ failed: device_delete_children(dev); if (sc->mem_res != NULL) { - bhnd_release_resource(dev, SYS_RES_MEMORY, sc->mem_rid, - sc->mem_res); + bhnd_release_resource(dev, sc->mem_res); } CC_GPIO_LOCK_DESTROY(sc); @@ -218,7 +216,7 @@ chipc_gpio_detach(device_t dev) if ((error = bhnd_deregister_provider(dev, BHND_SERVICE_ANY))) return (error); - bhnd_release_resource(dev, SYS_RES_MEMORY, sc->mem_rid, sc->mem_res); + bhnd_release_resource(dev, sc->mem_res); CC_GPIO_LOCK_DESTROY(sc); return (0); diff --git a/sys/dev/bhnd/cores/chipc/chipc_gpiovar.h b/sys/dev/bhnd/cores/chipc/chipc_gpiovar.h index a0fc2b9ce993..e49cd5c498dd 100644 --- a/sys/dev/bhnd/cores/chipc/chipc_gpiovar.h +++ b/sys/dev/bhnd/cores/chipc/chipc_gpiovar.h @@ -119,7 +119,6 @@ struct chipc_gpio_softc { device_t dev; device_t gpiobus; /**< attached gpiobus child */ struct bhnd_resource *mem_res; /**< chipcommon register block */ - int mem_rid; /**< resource ID of mem_res */ uint32_t quirks; /**< device quirks (see CC_GPIO_QUIRK_*) */ struct mtx mtx; /**< lock protecting RMW register access */ }; diff --git a/sys/dev/bhnd/cores/chipc/chipc_private.h b/sys/dev/bhnd/cores/chipc/chipc_private.h index f94f3a256771..9bf9463b0abb 100644 --- a/sys/dev/bhnd/cores/chipc/chipc_private.h +++ b/sys/dev/bhnd/cores/chipc/chipc_private.h @@ -101,7 +101,6 @@ struct chipc_region { resource ID */ struct bhnd_resource *cr_res; /**< bus resource, or NULL */ - int cr_res_rid; /**< cr_res RID, if any. */ u_int cr_refs; /**< RF_ALLOCATED refcount */ u_int cr_act_refs; /**< RF_ACTIVE refcount */ diff --git a/sys/dev/bhnd/cores/chipc/chipc_subr.c b/sys/dev/bhnd/cores/chipc/chipc_subr.c index bb5764af1ef3..9aa292e9e093 100644 --- a/sys/dev/bhnd/cores/chipc/chipc_subr.c +++ b/sys/dev/bhnd/cores/chipc/chipc_subr.c @@ -374,8 +374,7 @@ chipc_free_region(struct chipc_softc *sc, struct chipc_region *cr) cr->cr_region_num, cr->cr_refs)); if (cr->cr_res != NULL) { - bhnd_release_resource(sc->dev, SYS_RES_MEMORY, cr->cr_res_rid, - cr->cr_res); + bhnd_release_resource(sc->dev, cr->cr_res); } free(cr, M_BHND); @@ -462,14 +461,14 @@ chipc_retain_region(struct chipc_softc *sc, struct chipc_region *cr, int flags) ("non-NULL resource has refcount")); /* Fetch initial resource ID */ - if ((cr->cr_res_rid = cr->cr_rid) == -1) { + if (cr->cr_rid == -1) { CHIPC_UNLOCK(sc); return (EINVAL); } /* Allocate resource */ cr->cr_res = bhnd_alloc_resource(sc->dev, - SYS_RES_MEMORY, cr->cr_res_rid, cr->cr_addr, + SYS_RES_MEMORY, cr->cr_rid, cr->cr_addr, cr->cr_end, cr->cr_count, RF_SHAREABLE); if (cr->cr_res == NULL) { CHIPC_UNLOCK(sc); @@ -488,8 +487,7 @@ chipc_retain_region(struct chipc_softc *sc, struct chipc_region *cr, int flags) /* If this is the first reference, activate the resource */ if (cr->cr_act_refs == 0) { - error = bhnd_activate_resource(sc->dev, SYS_RES_MEMORY, - cr->cr_res_rid, cr->cr_res); + error = bhnd_activate_resource(sc->dev, cr->cr_res); if (error) { /* Drop any allocation reference acquired * above */ @@ -535,8 +533,7 @@ chipc_release_region(struct chipc_softc *sc, struct chipc_region *cr, /* If this is the last reference, deactivate the resource */ if (cr->cr_act_refs == 1) { - error = bhnd_deactivate_resource(sc->dev, - SYS_RES_MEMORY, cr->cr_res_rid, cr->cr_res); + error = bhnd_deactivate_resource(sc->dev, cr->cr_res); if (error) goto done; } @@ -549,8 +546,7 @@ chipc_release_region(struct chipc_softc *sc, struct chipc_region *cr, KASSERT(cr->cr_refs > 0, ("overrelease of refs")); /* If this is the last reference, release the resource */ if (cr->cr_refs == 1) { - error = bhnd_release_resource(sc->dev, SYS_RES_MEMORY, - cr->cr_res_rid, cr->cr_res); + error = bhnd_release_resource(sc->dev, cr->cr_res); if (error) goto done; diff --git a/sys/dev/bhnd/cores/pci/bhnd_pci.c b/sys/dev/bhnd/cores/pci/bhnd_pci.c index b8af7dd29fc5..3382f86bfb43 100644 --- a/sys/dev/bhnd/cores/pci/bhnd_pci.c +++ b/sys/dev/bhnd/cores/pci/bhnd_pci.c @@ -132,7 +132,7 @@ bhnd_pci_generic_attach(device_t dev) sizeof(bhnd_pci_devs[0])); /* Allocate bus resources */ - sc->mem_res = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, sc->mem_rid, + sc->mem_res = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, 0, RF_ACTIVE); if (sc->mem_res == NULL) return (ENXIO); @@ -156,7 +156,7 @@ bhnd_pci_generic_detach(device_t dev) if ((error = bus_generic_detach(dev))) return (error); - bhnd_release_resource(dev, SYS_RES_MEMORY, sc->mem_rid, sc->mem_res); + bhnd_release_resource(dev, sc->mem_res); BHND_PCI_LOCK_DESTROY(sc); diff --git a/sys/dev/bhnd/cores/pci/bhnd_pcivar.h b/sys/dev/bhnd/cores/pci/bhnd_pcivar.h index 14026d1b8b44..ece08703df5b 100644 --- a/sys/dev/bhnd/cores/pci/bhnd_pcivar.h +++ b/sys/dev/bhnd/cores/pci/bhnd_pcivar.h @@ -99,7 +99,6 @@ struct bhnd_pci_softc { accesses. */ struct bhnd_resource *mem_res; /**< device register block. */ - int mem_rid; /**< register block RID */ }; #define BHND_PCI_LOCK_INIT(sc) \ diff --git a/sys/dev/bhnd/cores/pcie2/bhnd_pcie2.c b/sys/dev/bhnd/cores/pcie2/bhnd_pcie2.c index 01881aca3876..1af80d84f574 100644 --- a/sys/dev/bhnd/cores/pcie2/bhnd_pcie2.c +++ b/sys/dev/bhnd/cores/pcie2/bhnd_pcie2.c @@ -96,7 +96,7 @@ bhnd_pcie2_generic_attach(device_t dev) sizeof(bhnd_pcie2_devs[0])); /* Allocate bus resources */ - sc->mem_res = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, sc->mem_rid, + sc->mem_res = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, 0, RF_ACTIVE); if (sc->mem_res == NULL) return (ENXIO); @@ -120,7 +120,7 @@ bhnd_pcie2_generic_detach(device_t dev) if ((error = bus_generic_detach(dev))) return (error); - bhnd_release_resource(dev, SYS_RES_MEMORY, sc->mem_rid, sc->mem_res); + bhnd_release_resource(dev, sc->mem_res); BHND_PCIE2_LOCK_DESTROY(sc); diff --git a/sys/dev/bhnd/cores/pcie2/bhnd_pcie2_var.h b/sys/dev/bhnd/cores/pcie2/bhnd_pcie2_var.h index 6930b29cc85d..fe8baf77efc3 100644 --- a/sys/dev/bhnd/cores/pcie2/bhnd_pcie2_var.h +++ b/sys/dev/bhnd/cores/pcie2/bhnd_pcie2_var.h @@ -83,7 +83,6 @@ struct bhnd_pcie2_softc { accesses. */ struct bhnd_resource *mem_res; /**< device register block. */ - int mem_rid; /**< register block RID */ }; #define BHND_PCIE2_LOCK_INIT(sc) \ diff --git a/sys/dev/bhnd/cores/pmu/bhnd_pmu_core.c b/sys/dev/bhnd/cores/pmu/bhnd_pmu_core.c index e4bb34cab5a8..12ceaee9b45d 100644 --- a/sys/dev/bhnd/cores/pmu/bhnd_pmu_core.c +++ b/sys/dev/bhnd/cores/pmu/bhnd_pmu_core.c @@ -81,13 +81,11 @@ bhnd_pmu_core_attach(device_t dev) struct bhnd_pmu_softc *sc; struct bhnd_resource *res; int error; - int rid; sc = device_get_softc(dev); /* Allocate register block */ - rid = 0; - res = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, rid, RF_ACTIVE); + res = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, 0, RF_ACTIVE); if (res == NULL) { device_printf(dev, "failed to allocate resources\n"); return (ENXIO); @@ -103,11 +101,10 @@ bhnd_pmu_core_attach(device_t dev) /* Delegate to common driver implementation */ if ((error = bhnd_pmu_attach(dev, res))) { - bhnd_release_resource(dev, SYS_RES_MEMORY, rid, res); + bhnd_release_resource(dev, res); return (error); } - sc->rid = rid; return (0); } @@ -123,7 +120,7 @@ bhnd_pmu_core_detach(device_t dev) if ((error = bhnd_pmu_detach(dev))) return (error); - bhnd_release_resource(dev, SYS_RES_MEMORY, sc->rid, sc->res); + bhnd_release_resource(dev, sc->res); return (0); } diff --git a/sys/dev/bhnd/cores/pmu/bhnd_pmuvar.h b/sys/dev/bhnd/cores/pmu/bhnd_pmuvar.h index 665d513aa60c..7ee13cc69ec5 100644 --- a/sys/dev/bhnd/cores/pmu/bhnd_pmuvar.h +++ b/sys/dev/bhnd/cores/pmu/bhnd_pmuvar.h @@ -105,7 +105,6 @@ struct bhnd_pmu_softc { device_t chipc_dev; /**< chipcommon device */ struct bhnd_resource *res; /**< pmu register block. */ - int rid; /**< pmu register RID */ struct bhnd_core_clkctl *clkctl; /**< pmu clkctl register */ struct mtx mtx; /**< state mutex */ diff --git a/sys/dev/bhnd/nvram/bhnd_sprom.c b/sys/dev/bhnd/nvram/bhnd_sprom.c index 9975b4525cdf..28d90113e464 100644 --- a/sys/dev/bhnd/nvram/bhnd_sprom.c +++ b/sys/dev/bhnd/nvram/bhnd_sprom.c @@ -96,7 +96,6 @@ bhnd_sprom_attach(device_t dev, bus_size_t offset) struct bhnd_nvram_io *io; struct bhnd_resource *r; bus_size_t r_size, sprom_size; - int rid; int error; sc = device_get_softc(dev); @@ -107,8 +106,7 @@ bhnd_sprom_attach(device_t dev, bus_size_t offset) r = NULL; /* Allocate SPROM resource */ - rid = 0; - r = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, rid, RF_ACTIVE); + r = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, 0, RF_ACTIVE); if (r == NULL) { device_printf(dev, "failed to allocate resources\n"); return (ENXIO); @@ -140,7 +138,7 @@ bhnd_sprom_attach(device_t dev, bus_size_t offset) /* Clean up our temporary I/O context and its backing resource */ bhnd_nvram_io_free(io); - bhnd_release_resource(dev, SYS_RES_MEMORY, rid, r); + bhnd_release_resource(dev, r); io = NULL; r = NULL; @@ -160,7 +158,7 @@ failed: bhnd_nvram_io_free(io); if (r != NULL) - bhnd_release_resource(dev, SYS_RES_MEMORY, rid, r); + bhnd_release_resource(dev, r); if (sc->store != NULL) bhnd_nvram_store_free(sc->store); diff --git a/sys/dev/bhnd/siba/siba.c b/sys/dev/bhnd/siba/siba.c index c4abf8b75765..baccf027578e 100644 --- a/sys/dev/bhnd/siba/siba.c +++ b/sys/dev/bhnd/siba/siba.c @@ -1182,7 +1182,7 @@ siba_map_cfg_resources(device_t dev, struct siba_devinfo *dinfo) struct siba_addrspace *addrspace; rman_res_t r_start, r_count, r_end; uint8_t num_cfg; - int rid; + int cfg_rid, rid; num_cfg = dinfo->core_id.num_cfg_blocks; if (num_cfg > SIBA_MAX_CFG) { @@ -1218,9 +1218,9 @@ siba_map_cfg_resources(device_t dev, struct siba_devinfo *dinfo) }); /* Map the config resource for bus-level access */ - dinfo->cfg_rid[i] = SIBA_CFG_RID(dinfo, i); + cfg_rid = SIBA_CFG_RID(dinfo, i); dinfo->cfg_res[i] = BHND_BUS_ALLOC_RESOURCE(dev, dev, - SYS_RES_MEMORY, dinfo->cfg_rid[i], r_start, r_end, + SYS_RES_MEMORY, cfg_rid, r_start, r_end, r_count, RF_ACTIVE|RF_SHAREABLE); if (dinfo->cfg_res[i] == NULL) { diff --git a/sys/dev/bhnd/siba/siba_subr.c b/sys/dev/bhnd/siba/siba_subr.c index fee874fea09f..6642185165cd 100644 --- a/sys/dev/bhnd/siba/siba_subr.c +++ b/sys/dev/bhnd/siba/siba_subr.c @@ -93,7 +93,6 @@ siba_alloc_dinfo(device_t bus) .cb_rid = -1, }); dinfo->cfg_res[i] = NULL; - dinfo->cfg_rid[i] = -1; } resource_list_init(&dinfo->resources); @@ -569,11 +568,9 @@ siba_free_dinfo(device_t dev, device_t child, struct siba_devinfo *dinfo) if (dinfo->cfg_res[i] == NULL) continue; - bhnd_release_resource(dev, SYS_RES_MEMORY, dinfo->cfg_rid[i], - dinfo->cfg_res[i]); + bhnd_release_resource(dev, dinfo->cfg_res[i]); dinfo->cfg_res[i] = NULL; - dinfo->cfg_rid[i] = -1; } /* Unmap the core's interrupt */ diff --git a/sys/dev/bhnd/siba/sibavar.h b/sys/dev/bhnd/siba/sibavar.h index 7fc1bcf228d9..2185c5b6b229 100644 --- a/sys/dev/bhnd/siba/sibavar.h +++ b/sys/dev/bhnd/siba/sibavar.h @@ -211,7 +211,6 @@ struct siba_devinfo { struct siba_intr intr; /**< interrupt flag mapping, if any */ struct bhnd_resource *cfg_res[SIBA_MAX_CFG]; /**< bus-mapped config block registers */ - int cfg_rid[SIBA_MAX_CFG]; /**< bus-mapped config block resource IDs */ siba_pmu_state pmu_state; /**< per-core PMU state */ union { void *bhnd_info; /**< if SIBA_PMU_BHND, bhnd(4)-managed per-core PMU info. */ From nobody Tue Dec 9 20:12:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQqlW3Zs7z6Jl8h for ; Tue, 09 Dec 2025 20:12:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQqlW14Lbz3wLb for ; Tue, 09 Dec 2025 20:12:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765311159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uCOriMitX7OsYcz+6+jHiPQ8oQnKZsmLm8XbKXwKvM0=; b=iQVKOocBq5XBL8qW8sLzQRVxPbw8GvYYtr1txiPNZF+N9i8ifLcfQakup6qeVz+GG/iYDg ++GYRbuVJdcvKF56RpryEK5oaXxvX3m0mGhBBfVyF0Tv75eW/stg5s/5Yw44BHYNrVoiT9 eTQR5gZD111JhjjUupCI4LP7XrBRrygId2WIJSFd7IVNktzFiIJXJTYniDxf6RUbm661MX gBAQNLc2xPVwN92mPRvGJqCDuXu6BAFPpYJYmd5sb+UqorjNxjcafcjc8qJf53gAoqHDnC tO2rJF9Ip4LlrnuQH/SmqCPpnZFpIXq9YPLKHRxjHXTR3Ho0y3K4Yvd8fCfqjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765311159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uCOriMitX7OsYcz+6+jHiPQ8oQnKZsmLm8XbKXwKvM0=; b=aq6ZNdoO2ZSTUu6nWeuFiyld1LruAG6ieYyL5/sL0Cw8qdIaL3fPVkMhJ7YmztwWLrJQME KTHm5rv244+mDGqh4JJ+2dMI8KHzwOnwWR7kwT87pRDtz0pMcvTjLIfLi/uta4VOHIhXsg vgFiZkKaZI3BPKo0iBBGcluxoVyfvwLz8swkz0uP23Xwfp7BWndeqaQ62IuRPY1YbQEGHg Qdl/S6DDkuGirUolyzpnZHk6CSdyvcXK9zBgrnEj9gREgwRQDX68nnxLRpQYzzHzAa6g0J brligpS74O2wpHiMy5cUy2eoMs0n9Qtmsk79osrUbmxyrxltDPd0EE3b6ibXeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765311159; a=rsa-sha256; cv=none; b=Ky8hOvtreZFbjd237uKWv7DgsSJlK0NE3eGdxvsAEw93Ncn1ZXMducyj5RDD+7PgfE6Vc4 +FKUg5UhoXepAsqs+xtaQlRUb2HF5ZsvVUTdBPYKeYJ2iZqMQnhz9ZP0FxkmUuFfHwRf+9 y2IB6Ph+OexXz+DmWxTIUjv1fsgqJKeyHL7dmPnTegRGfvZLa195/GVrE+SA7TJHD7MABe bQunPkCKGyOV43+wjDKxJfBACM3VYYtlUzPOU6SPa+aXYMw5bdykPgShLiWLuTHX0Jt+k8 2InYUaWsgJU2XacCTPEB5htvQyHf30pUDRRFqPE9E4aQoWulcO2UH14n6j79VQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQqlW0cvZz1CVt for ; Tue, 09 Dec 2025 20:12:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2f4de by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 20:12:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 1033312267d6 - main - bhnd_bus_alloc_resource*: Pass rid by value List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 1033312267d66496c661feefe6c14a86d7e4b95e Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 20:12:39 +0000 Message-Id: <693882b7.2f4de.5366b7dd@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1033312267d66496c661feefe6c14a86d7e4b95e commit 1033312267d66496c661feefe6c14a86d7e4b95e Author: John Baldwin AuthorDate: 2025-12-09 20:03:25 +0000 Commit: John Baldwin CommitDate: 2025-12-09 20:03:25 +0000 bhnd_bus_alloc_resource*: Pass rid by value Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D53409 --- sys/dev/bhnd/bcma/bcma_subr.c | 2 +- sys/dev/bhnd/bhnd.h | 6 +++--- sys/dev/bhnd/bhnd_bus_if.m | 2 +- sys/dev/bhnd/bhnd_erom.c | 2 +- sys/dev/bhnd/bhnd_subr.c | 8 ++++---- sys/dev/bhnd/cores/chipc/chipc_gpio.c | 2 +- sys/dev/bhnd/cores/chipc/chipc_subr.c | 2 +- sys/dev/bhnd/cores/pci/bhnd_pci.c | 2 +- sys/dev/bhnd/cores/pcie2/bhnd_pcie2.c | 2 +- sys/dev/bhnd/cores/pmu/bhnd_pmu_core.c | 2 +- sys/dev/bhnd/nvram/bhnd_sprom.c | 2 +- sys/dev/bhnd/siba/siba.c | 2 +- 12 files changed, 17 insertions(+), 17 deletions(-) diff --git a/sys/dev/bhnd/bcma/bcma_subr.c b/sys/dev/bhnd/bcma/bcma_subr.c index d10501c70564..9e442ce911d4 100644 --- a/sys/dev/bhnd/bcma/bcma_subr.c +++ b/sys/dev/bhnd/bcma/bcma_subr.c @@ -239,7 +239,7 @@ bcma_dinfo_init_agent(device_t bus, device_t child, struct bcma_devinfo *dinfo) dinfo->rid_agent = BCMA_AGENT_RID(dinfo); dinfo->res_agent = BHND_BUS_ALLOC_RESOURCE(bus, bus, SYS_RES_MEMORY, - &dinfo->rid_agent, r_start, r_end, r_count, RF_ACTIVE|RF_SHAREABLE); + dinfo->rid_agent, r_start, r_end, r_count, RF_ACTIVE|RF_SHAREABLE); if (dinfo->res_agent == NULL) { device_printf(bus, "failed allocating agent register block for " "core %u\n", BCMA_DINFO_COREIDX(dinfo)); diff --git a/sys/dev/bhnd/bhnd.h b/sys/dev/bhnd/bhnd.h index c21cca0f48dd..da1686f4d6c9 100644 --- a/sys/dev/bhnd/bhnd.h +++ b/sys/dev/bhnd/bhnd.h @@ -617,7 +617,7 @@ int bhnd_bus_generic_read_board_info(device_t dev, device_t child, struct bhnd_board_info *info); struct bhnd_resource *bhnd_bus_generic_alloc_resource (device_t dev, - device_t child, int type, int *rid, + device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); int bhnd_bus_generic_release_resource (device_t dev, @@ -1292,7 +1292,7 @@ bhnd_nvram_getvar(device_t dev, const char *name, void *buf, size_t *len, * @retval resource The allocated resource. */ static inline struct bhnd_resource * -bhnd_alloc_resource(device_t dev, int type, int *rid, rman_res_t start, +bhnd_alloc_resource(device_t dev, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { return BHND_BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, type, rid, @@ -1314,7 +1314,7 @@ bhnd_alloc_resource(device_t dev, int type, int *rid, rman_res_t start, * @retval resource The allocated resource. */ static inline struct bhnd_resource * -bhnd_alloc_resource_any(device_t dev, int type, int *rid, u_int flags) +bhnd_alloc_resource_any(device_t dev, int type, int rid, u_int flags) { return bhnd_alloc_resource(dev, type, rid, 0, ~0, 1, flags); } diff --git a/sys/dev/bhnd/bhnd_bus_if.m b/sys/dev/bhnd/bhnd_bus_if.m index adb2af9c4d85..62c34404e87f 100644 --- a/sys/dev/bhnd/bhnd_bus_if.m +++ b/sys/dev/bhnd/bhnd_bus_if.m @@ -923,7 +923,7 @@ METHOD struct bhnd_resource * alloc_resource { device_t dev; device_t child; int type; - int *rid; + int rid; rman_res_t start; rman_res_t end; rman_res_t count; diff --git a/sys/dev/bhnd/bhnd_erom.c b/sys/dev/bhnd/bhnd_erom.c index 6cb98dec9858..2c4af61438fe 100644 --- a/sys/dev/bhnd/bhnd_erom.c +++ b/sys/dev/bhnd/bhnd_erom.c @@ -429,7 +429,7 @@ bhnd_erom_iores_map(struct bhnd_erom_io *eio, bhnd_addr_t addr, /* Try to allocate the new mapping */ iores->mapped_rid = iores->owner_rid; iores->mapped = bhnd_alloc_resource(iores->owner, SYS_RES_MEMORY, - &iores->mapped_rid, addr, addr+size-1, size, + iores->mapped_rid, addr, addr+size-1, size, RF_ACTIVE|RF_SHAREABLE); if (iores->mapped == NULL) { iores->mapped_rid = -1; diff --git a/sys/dev/bhnd/bhnd_subr.c b/sys/dev/bhnd/bhnd_subr.c index ac4f69db8cae..299388d51626 100644 --- a/sys/dev/bhnd/bhnd_subr.c +++ b/sys/dev/bhnd/bhnd_subr.c @@ -1015,7 +1015,7 @@ bhnd_alloc_resources(device_t dev, struct resource_spec *rs, res[i] = NULL; for (u_int i = 0; rs[i].type != -1; i++) { - res[i] = bhnd_alloc_resource_any(dev, rs[i].type, &rs[i].rid, + res[i] = bhnd_alloc_resource_any(dev, rs[i].type, rs[i].rid, rs[i].flags); /* Clean up all allocations on failure */ @@ -2190,7 +2190,7 @@ bhnd_bus_generic_get_nvram_var(device_t dev, device_t child, const char *name, */ struct bhnd_resource * bhnd_bus_generic_alloc_resource(device_t dev, device_t child, int type, - int *rid, rman_res_t start, rman_res_t end, rman_res_t count, + int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct bhnd_resource *br; @@ -2201,7 +2201,7 @@ bhnd_bus_generic_alloc_resource(device_t dev, device_t child, int type, res = NULL; /* Allocate the real bus resource (without activating it) */ - res = BUS_ALLOC_RESOURCE(dev, child, type, *rid, start, end, count, + res = BUS_ALLOC_RESOURCE(dev, child, type, rid, start, end, count, (flags & ~RF_ACTIVE)); if (res == NULL) return (NULL); @@ -2216,7 +2216,7 @@ bhnd_bus_generic_alloc_resource(device_t dev, device_t child, int type, /* Attempt activation */ if (flags & RF_ACTIVE) { - error = BHND_BUS_ACTIVATE_RESOURCE(dev, child, type, *rid, br); + error = BHND_BUS_ACTIVATE_RESOURCE(dev, child, type, rid, br); if (error) goto failed; } diff --git a/sys/dev/bhnd/cores/chipc/chipc_gpio.c b/sys/dev/bhnd/cores/chipc/chipc_gpio.c index 429de0fc1fd8..8e4445155f7b 100644 --- a/sys/dev/bhnd/cores/chipc/chipc_gpio.c +++ b/sys/dev/bhnd/cores/chipc/chipc_gpio.c @@ -139,7 +139,7 @@ chipc_gpio_attach(device_t dev) CC_GPIO_LOCK_INIT(sc); sc->mem_rid = 0; - sc->mem_res = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid, + sc->mem_res = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, sc->mem_rid, RF_ACTIVE|RF_SHAREABLE); if (sc->mem_res == NULL) { device_printf(dev, "failed to allocate chipcommon registers\n"); diff --git a/sys/dev/bhnd/cores/chipc/chipc_subr.c b/sys/dev/bhnd/cores/chipc/chipc_subr.c index 1137d3ab67cc..bb5764af1ef3 100644 --- a/sys/dev/bhnd/cores/chipc/chipc_subr.c +++ b/sys/dev/bhnd/cores/chipc/chipc_subr.c @@ -469,7 +469,7 @@ chipc_retain_region(struct chipc_softc *sc, struct chipc_region *cr, int flags) /* Allocate resource */ cr->cr_res = bhnd_alloc_resource(sc->dev, - SYS_RES_MEMORY, &cr->cr_res_rid, cr->cr_addr, + SYS_RES_MEMORY, cr->cr_res_rid, cr->cr_addr, cr->cr_end, cr->cr_count, RF_SHAREABLE); if (cr->cr_res == NULL) { CHIPC_UNLOCK(sc); diff --git a/sys/dev/bhnd/cores/pci/bhnd_pci.c b/sys/dev/bhnd/cores/pci/bhnd_pci.c index 45775916e5cf..b8af7dd29fc5 100644 --- a/sys/dev/bhnd/cores/pci/bhnd_pci.c +++ b/sys/dev/bhnd/cores/pci/bhnd_pci.c @@ -132,7 +132,7 @@ bhnd_pci_generic_attach(device_t dev) sizeof(bhnd_pci_devs[0])); /* Allocate bus resources */ - sc->mem_res = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid, + sc->mem_res = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, sc->mem_rid, RF_ACTIVE); if (sc->mem_res == NULL) return (ENXIO); diff --git a/sys/dev/bhnd/cores/pcie2/bhnd_pcie2.c b/sys/dev/bhnd/cores/pcie2/bhnd_pcie2.c index 15a93f9e0b93..01881aca3876 100644 --- a/sys/dev/bhnd/cores/pcie2/bhnd_pcie2.c +++ b/sys/dev/bhnd/cores/pcie2/bhnd_pcie2.c @@ -96,7 +96,7 @@ bhnd_pcie2_generic_attach(device_t dev) sizeof(bhnd_pcie2_devs[0])); /* Allocate bus resources */ - sc->mem_res = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid, + sc->mem_res = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, sc->mem_rid, RF_ACTIVE); if (sc->mem_res == NULL) return (ENXIO); diff --git a/sys/dev/bhnd/cores/pmu/bhnd_pmu_core.c b/sys/dev/bhnd/cores/pmu/bhnd_pmu_core.c index d324cb8c0924..e4bb34cab5a8 100644 --- a/sys/dev/bhnd/cores/pmu/bhnd_pmu_core.c +++ b/sys/dev/bhnd/cores/pmu/bhnd_pmu_core.c @@ -87,7 +87,7 @@ bhnd_pmu_core_attach(device_t dev) /* Allocate register block */ rid = 0; - res = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); + res = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, rid, RF_ACTIVE); if (res == NULL) { device_printf(dev, "failed to allocate resources\n"); return (ENXIO); diff --git a/sys/dev/bhnd/nvram/bhnd_sprom.c b/sys/dev/bhnd/nvram/bhnd_sprom.c index 32bc882f6df0..9975b4525cdf 100644 --- a/sys/dev/bhnd/nvram/bhnd_sprom.c +++ b/sys/dev/bhnd/nvram/bhnd_sprom.c @@ -108,7 +108,7 @@ bhnd_sprom_attach(device_t dev, bus_size_t offset) /* Allocate SPROM resource */ rid = 0; - r = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); + r = bhnd_alloc_resource_any(dev, SYS_RES_MEMORY, rid, RF_ACTIVE); if (r == NULL) { device_printf(dev, "failed to allocate resources\n"); return (ENXIO); diff --git a/sys/dev/bhnd/siba/siba.c b/sys/dev/bhnd/siba/siba.c index a8e83f843506..c4abf8b75765 100644 --- a/sys/dev/bhnd/siba/siba.c +++ b/sys/dev/bhnd/siba/siba.c @@ -1220,7 +1220,7 @@ siba_map_cfg_resources(device_t dev, struct siba_devinfo *dinfo) /* Map the config resource for bus-level access */ dinfo->cfg_rid[i] = SIBA_CFG_RID(dinfo, i); dinfo->cfg_res[i] = BHND_BUS_ALLOC_RESOURCE(dev, dev, - SYS_RES_MEMORY, &dinfo->cfg_rid[i], r_start, r_end, + SYS_RES_MEMORY, dinfo->cfg_rid[i], r_start, r_end, r_count, RF_ACTIVE|RF_SHAREABLE); if (dinfo->cfg_res[i] == NULL) { From nobody Tue Dec 9 20:33:55 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQrD40sSRz6JmK1 for ; Tue, 09 Dec 2025 20:33:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQrD33P0zz450V for ; Tue, 09 Dec 2025 20: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=1765312435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p84Y+O+mJZLuI33tNuWxarxksNtGhDOpzyzke3yaLEE=; b=kBeJiLoJ6dPkcMFYewLctFNF2z9vJ0PMXE7aNVrNyStVoy3WaLNJM4w20tGmlC2ceTLG/N eiFbtQjdVi7RkDZ6qrEJCZkIuABAdYNlEm31Pmp91SKvCwlfP0q8kswLOzE2r67t3P8iLZ JEFXyxOCyOczw8B61hkDkfm1KPQchsK9Rz1PQrRks/FNRlycN+H3NcYSeO1vwJ4ckT1XGe orY8/sV8iIflJIPDYKk81kh4JGKkqrzWWdn9M2+7DenFDtD0jmHfj2bGY6XKRlz4l9rv4k vnlttbQV8r8gVMnYv7XIRzNY0dylgf11LI5cehX9ow3gPqVoq6s4id/c9ih4xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765312435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p84Y+O+mJZLuI33tNuWxarxksNtGhDOpzyzke3yaLEE=; b=xPO4s4i2ViP9iKgzm2S57zXYRkD3fLmFn0a0300s6+fipctb6Z7Mup6R1jgbgjYe8e4MxS otivJdk6ZTy1MX0X42gAxhmP00PhZbWd/CC31zQWq68XBkvVuX5JGXB4oxAFNhHH6eoaFw nXvjemSd0iwww77MYYuoQa8b8bxRiSOiqF2dbuhifcqkXJXGSwcgD+tr29q9XQoVM5AsKb pE+YENeAqRZWfxg2X/h7Rnkhke18YMdKtjPNizkEbSHIy82g65hyLALFpplQuxLEy/ub/F GMAsNNXZGZmmGj1Ihk93AqajQnXvd17SiFWPCikCNEkkclbP2a8hEBvEYLZnFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765312435; a=rsa-sha256; cv=none; b=OLLV89jLByrsoY2gu/z1tKe1lvx909lmXbJMUbQqGxBSZZR78ux1RgiBJA+s3eq2SUaghF 5CTJiPscM/3aGsy5DaxCcu7kYdO6md44SXm+UaeoyZ8IEkVahFSP8isI9SAyx+HdG2VQH5 2C+M3qPbBSBHhjX6Q1tGu/pc2lT+fBn7C0SBFljlVDOhTXb0bf0MA5FQ2TWCtE3e7EGpnj IjheZIcwjClRGlIiRR46fPh7zkL8RvSmS3ZUVxFvhcVr/4d6fHAXepiulxs91PnBjYK5/0 8h7yo0QMDnBvMyroKszWIyoc3E0taAUF3KBQVp9J9cPrVlOll7NF3zXLrtW67A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQrD31Wjjz6W for ; Tue, 09 Dec 2025 20:33:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 314bc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 20:33:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: f04b23ce3547 - main - rc.d/{ipfilter,ippool}: Fix typo in variable name List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f04b23ce3547c238dcd52d4fa1a7d401ad38d1b1 Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 20:33:55 +0000 Message-Id: <693887b3.314bc.7e2865ea@gitrepo.freebsd.org> The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=f04b23ce3547c238dcd52d4fa1a7d401ad38d1b1 commit f04b23ce3547c238dcd52d4fa1a7d401ad38d1b1 Author: Cy Schubert AuthorDate: 2025-12-09 20:32:24 +0000 Commit: Cy Schubert CommitDate: 2025-12-09 20:33:26 +0000 rc.d/{ipfilter,ippool}: Fix typo in variable name MFC after: 1 day --- libexec/rc/rc.d/ipfilter | 2 +- libexec/rc/rc.d/ippool | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.d/ipfilter b/libexec/rc/rc.d/ipfilter index 9b64fcff0c7a..1253294b09cf 100755 --- a/libexec/rc/rc.d/ipfilter +++ b/libexec/rc/rc.d/ipfilter @@ -33,7 +33,7 @@ required_modules="ipl:ipfilter" ipfilter_start() { echo "Enabling ipfilter." - if [ -n "${ifilter_optionlist}" ]; then + if [ -n "${ipfilter_optionlist}" ]; then if ${ipfilter_program:-/sbin/ipf} -V | grep -q 'Running: yes'; then ${ipfilter_program:-/sbin/ipf} -D fi diff --git a/libexec/rc/rc.d/ippool b/libexec/rc/rc.d/ippool index 5ef0d0522621..f47a42267106 100755 --- a/libexec/rc/rc.d/ippool +++ b/libexec/rc/rc.d/ippool @@ -27,7 +27,7 @@ required_modules="ipl:ipfilter" ippool_start_precmd() { rc_flags="-f ${ippool_rules} ${rc_flags}" - if [ -n "${ifilter_optionlist}" ]; then + if [ -n "${ipfilter_optionlist}" ]; then ${ipfilter_program:-/sbin/ipf} -T "${ipfilter_optionlist}" fi } From nobody Tue Dec 9 20:46:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQrVk5l5bz6JnQV; Tue, 09 Dec 2025 20:46:38 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQrVk3ZS2z482x; Tue, 09 Dec 2025 20:46:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765313198; h=from:from:reply-to:subject: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=xfXq5RRFHRJLcSBaveFLCRt5A9QXH+j9R26X76oBOEM=; b=R1wOJxGcrD/M+UCWiV5Z9D1al6K5PLXtVAPJfyWKuVzFXDaVP+6YeJ86yIk+/SQNitxC68 uMuTX8mTwg3KztNujj7uKd3ODgXTh0bjjWMo9Iqdmu80LXbXc+HTksJpYm5kqkYFnOrPqC B7E1e7hwkSJNxDtJZGS4chfMWTYI3+rrhPzJPNEYm/5SPvic4JEJkM+D83K7MPY66fyMb6 JXEfUbi6vsEONetDzG3bD+xIQrwp1n2NRqqnjfME5dzZt7HlWMwtb/vKDjHn7QdLiSbUcZ b7+HGJGDKrvJ1nTdd9G9pgq75gsFs5ibglR2144mcTvckH9OE9/1r4Vg16hJAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765313198; h=from:from:reply-to:subject: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=xfXq5RRFHRJLcSBaveFLCRt5A9QXH+j9R26X76oBOEM=; b=S8kHEG10jHmbu2EHpuuKU5q4ocyalvpxZf9lXUMCDM+GSGQ/4YXDXgTmVEX+MLauSpSSse Dpmo4cOcDYLDuaT+0R8njPEZ7RzZTSO8R3LCaWZklx4d0fjpQhzeINVCyzKA2VzxcQ6qnb fbsV6kBTAuXtw4kvVvFOx/fmnlcBACLKAVQd6ZzWh5wWp7KXOZ8+2IKnzg8M3Cm6z1I2Pv 9ei6UO0KwVrB+bASUPurZXrBis5Zlcuw8rfHkw45a5msHUSWLoa/WWRp6guitPN7/65ZDc vIK7sXnwq7qUHi7IPsM0E8vQ7lGTDsYIagv4w/sdH+kqt6elo7norr4m5mt8Og== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765313198; a=rsa-sha256; cv=none; b=OIbIB3WAA9WhWddjfkVcLi/900X6+NO6ROQRskiSw2n73TYEh9/RJP8BkqIejczpz/hDdW RZOqBaH3X6elhgghuyaKf7RVt6WFpqrZVbXnV7cigQv788S8wRvBFwfryl4TGpCz+x1T7Y voJX1utTv6Fux2QMLRD8BHCSG9OHnrj1tQLZ0lTmRPk1Lmr+OVbO8nSGFS3JYj38zBL3Qp lLRbMq/HPrmKGa5WMMuJa8xlgUW6D8alj45sBjx44Qj3SsoVeGfYDRhhGbSBerFcIX99ip c35K1CU330wYT3Z2xTsSH7juUlwab/wK7f7h8f9oUqKwv90Tn+l9r6IEYi7yhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2601:5c0:4202:5670:44e0:6039:a461:36a5] (unknown [IPv6:2601:5c0:4202:5670:44e0:6039:a461:36a5]) (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 4dQrVk1hQLzp82; Tue, 09 Dec 2025 20:46:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <2f83e5f9-74f0-4cc5-aebd-a89be8ed4464@FreeBSD.org> Date: Tue, 9 Dec 2025 15:46:37 -0500 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 575639548cef - main - bus_alloc_resource: Pass rid by value to BUS_ALLOC_RESOURCE DEVMETHOD Content-Language: en-US From: John Baldwin To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <693882af.2fecd.1848e0d9@gitrepo.freebsd.org> In-Reply-To: <693882af.2fecd.1848e0d9@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/9/25 15:12, John Baldwin wrote: > The branch main has been updated by jhb: > > URL: https://cgit.FreeBSD.org/src/commit/?id=575639548cef58590a1d70c29e47aae0e8d44153 > > commit 575639548cef58590a1d70c29e47aae0e8d44153 > Author: John Baldwin > AuthorDate: 2025-12-09 19:59:21 +0000 > Commit: John Baldwin > CommitDate: 2025-12-09 20:00:06 +0000 > > bus_alloc_resource: Pass rid by value to BUS_ALLOC_RESOURCE DEVMETHOD > > The wrapper functions such as bus_alloc_resource_any() still support > passing the rid by value or pointer, but the underlying implementation > now passes by value. > > Reviewed by: imp > Differential Revision: https://reviews.freebsd.org/D53402 FYI, this breaks the build of drm-kmod (hence the __FreeBSD_version bump). I will open a PR against drm-kmod shortly, but it will still take some time for the patch to make its way into ports. There's not really a great way to stage changes that depend on __FreeBSD_version bumps. :( -- John Baldwin From nobody Tue Dec 9 20:51:25 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQrcY70yZz6Jndv for ; Tue, 09 Dec 2025 20:51:41 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (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 4dQrcX1ZJqz49Nb for ; Tue, 09 Dec 2025 20:51:40 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.208.45 as permitted sender) smtp.mailfrom=asomers@gmail.com Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-64166a57f3bso10261412a12.1 for ; Tue, 09 Dec 2025 12:51:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765313498; x=1765918298; 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=myOiAHUUZ7jY6Xywt8xI7/2pVpkNM8tQkCJ7OWB/9IM=; b=Cko76drVIhoOzZ9lSB+lqcJbArtlwCgLhJbInOD6IhblrAAE3n65Mo8tlt0LKuNpu3 dtsYJZ0z83vE5Z7xGoDuiKNzzuJHvR2W0kW28RsaBH4KBssgDYHsxMegVDFdu1nlFynS fjzknDW0SgIrlg3iMAVH68wsX0ZYCSrOHlVlxooBKhCtBorAgKJs+otnaGUadPVsXnwF t6+BY9bUqdtBMLUOBx3fJz7DROVHRRQTE8XlyK76Xp+IeYOHSnPQ1LUEidvCiaMwXCsr 378Qb/0n1brAbQgtRgKoSrOKMJ9k7ArEgk5/HLU/v92+vCVkYoSeB6DOSlAs49gCm8Po v1WQ== X-Forwarded-Encrypted: i=1; AJvYcCX+vZ9A2tT7b//GLkeI/5LEQZ+vePQ6pbst5JKM+UlBu8suJRxystgXF+GLKvhvnzCEKIp6UhE96sbzsySu9RvMR8KK0g==@freebsd.org X-Gm-Message-State: AOJu0Yxbzuc5dCcwQd3f6I+plPWs5+9By9aK9IFpTh7/tbK9Pu0Eenom mIGlGYG+thnw4LPJegxuQi287YeMENdt5t3WymUICG8zgKrvVZEK4Q+whe9dpns2WP+fm3NT5tY H7PEsucRs40Xd4LtZDRUlz6xXyZTeG08= X-Gm-Gg: AY/fxX4BoYDmuLcl6DgaN6AmWUs2mXsM2PWN6SUq3P23QuOzp3c/jdoMb1MIsIaBZNy NUR9POKTMIDSCwTVkWCX/XZrhf/qRXSvdghaTIgMSsbYcbAmFstKydO1Ohnu2FJvSefAKdmhk9R Vn8edT21PwhuJaw3btP5i3NhPlxfJefClofJJOf9RSAyJf67FrC5ggP1xUNEBLntsZLcVz5IbYM UhyiW4jVc+HxTPGL3FzSrLP2AGcGgawnFXr9P2354m+4eskD5aivDRixxkYp+0Zk49P9OTxoEYJ o9EyPQ== X-Google-Smtp-Source: AGHT+IGew3+i7htKcWDJ9Wjj3Urn/XjIUKs93f9H2dII15yfphJK5gQNFWDJ9c0+bg+FPuppyqYaBEKNNYHtcoPQf4k= X-Received: by 2002:a05:6402:42c9:b0:649:234d:70c2 with SMTP id 4fb4d7f45d1cf-6496cbd497cmr178209a12.25.1765313498196; Tue, 09 Dec 2025 12:51:38 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <69360981.ae97.5ff70e8d@gitrepo.freebsd.org> In-Reply-To: <69360981.ae97.5ff70e8d@gitrepo.freebsd.org> From: Alan Somers Date: Tue, 9 Dec 2025 13:51:25 -0700 X-Gm-Features: AQt7F2ptzf4y5-0bNLfUMSK-d9lDPOIf7xi1o_UBW9jhXKywY-wvf6I48gtWess Message-ID: Subject: Re: git: 66e85755595a - main - zfs: merge openzfs/zfs@89f729dcc To: Martin Matuska Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000fa2ec306458b131a" X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.89 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.991]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_DN_SOME(0.00)[]; FREEFALL_USER(0.00)[asomers]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ARC_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.45:from]; FROM_HAS_DN(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.45:from]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; MISSING_XM_UA(0.00)[]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4dQrcX1ZJqz49Nb --000000000000fa2ec306458b131a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Dec 7, 2025 at 4:11=E2=80=AFPM Martin Matuska wrot= e: > The branch main has been updated by mm: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D66e85755595a451db490d2fe24267d8= 5db4b09c2 > > commit 66e85755595a451db490d2fe24267d85db4b09c2 > Merge: c51876a10731 89f729dcca87 > Author: Martin Matuska > AuthorDate: 2025-12-07 21:38:13 +0000 > Commit: Martin Matuska > CommitDate: 2025-12-07 21:38:13 +0000 > > zfs: merge openzfs/zfs@89f729dcc > > Notable upstream pull request merges: > #17932 1f3444f2b zpool: fix special vdev -v -o conflict > #17934 -multiple Remove libuutil > #17941 88d012a1d Fix snapshot automount expiry cancellation deadlock > #17942 36e4f1888 Fix taskq NULL pointer dereference on timer race > #17946 39303feba chksum: run 256K benchmark on demand, preserve > chksum_stat_data > #17948 -multiple Remove libtpool > #17957 e37937f42 ztest: fix broken random call > #17960 928eccc5b DDT: Reduce global DDT lock scope during writes > #17961 48f33c1ef DDT: Make children writes inherit allocator > #17975 7f7d4934c FreeBSD: Fix uninitialized variable error > #17980 a5b665df3 DDT: Switch to using wmsums for lookup stats > #18004 ffaea0831 FreeBSD: Remove HAVE_INLINE_FLSL use > > Obtained from: OpenZFS > OpenZFS commit: 89f729dcca87425aadfa03d1764e96f285eb658d Can we please bump __FreeBSD_version on account of this change? filesystems/py-libzfs is now failing to build. The fix is easy, but it's 16-specific, so I'd like to key the port build off of __FreeBSD_version . https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D291530 --000000000000fa2ec306458b131a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sun, Dec 7, 2025 at 4:11=E2=80=AFPM Martin= Matuska <mm@freebsd.org> wrote= :
The branch mai= n has been updated by mm:

URL: https://cgit.= FreeBSD.org/src/commit/?id=3D66e85755595a451db490d2fe24267d85db4b09c2
commit 66e85755595a451db490d2fe24267d85db4b09c2
Merge: c51876a10731 89f729dcca87
Author:=C2=A0 =C2=A0 =C2=A0Martin Matuska <mm@FreeBSD.org>
AuthorDate: 2025-12-07 21:38:13 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Martin Matuska <mm@FreeBSD.org>
CommitDate: 2025-12-07 21:38:13 +0000

=C2=A0 =C2=A0 zfs: merge openzfs/zfs@89f729dcc

=C2=A0 =C2=A0 Notable upstream pull request merges:
=C2=A0 =C2=A0 =C2=A0#17932 1f3444f2b zpool: fix special vdev -v -o conflict=
=C2=A0 =C2=A0 =C2=A0#17934 -multiple Remove libuutil
=C2=A0 =C2=A0 =C2=A0#17941 88d012a1d Fix snapshot automount expiry cancella= tion deadlock
=C2=A0 =C2=A0 =C2=A0#17942 36e4f1888 Fix taskq NULL pointer dereference on = timer race
=C2=A0 =C2=A0 =C2=A0#17946 39303feba chksum: run 256K benchmark on demand, = preserve
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 chksum_stat_data
=C2=A0 =C2=A0 =C2=A0#17948 -multiple Remove libtpool
=C2=A0 =C2=A0 =C2=A0#17957 e37937f42 ztest: fix broken random call
=C2=A0 =C2=A0 =C2=A0#17960 928eccc5b DDT: Reduce global DDT lock scope duri= ng writes
=C2=A0 =C2=A0 =C2=A0#17961 48f33c1ef DDT: Make children writes inherit allo= cator
=C2=A0 =C2=A0 =C2=A0#17975 7f7d4934c FreeBSD: Fix uninitialized variable er= ror
=C2=A0 =C2=A0 =C2=A0#17980 a5b665df3 DDT: Switch to using wmsums for lookup= stats
=C2=A0 =C2=A0 =C2=A0#18004 ffaea0831 FreeBSD: Remove HAVE_INLINE_FLSL use
=C2=A0 =C2=A0 Obtained from:=C2=A0 OpenZFS
=C2=A0 =C2=A0 OpenZFS commit: 89f729dcca87425aadfa03d1764e96f285eb658d

Can we please bump=C2=A0=C2=A0__FreeBSD_version= on account of this change?=C2=A0 filesystems/py-libzfs is now failing to b= uild.=C2=A0 =C2=A0The fix is easy, but it's 16-specific, so I'd lik= e to key the port build off of=C2=A0__FreeBSD_version .
--000000000000fa2ec306458b131a-- From nobody Tue Dec 9 21:03:32 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQrtF6tsBz6JpQb; Tue, 09 Dec 2025 21:03:33 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQrtF6NYcz4CRx; Tue, 09 Dec 2025 21:03:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765314213; h=from:from:reply-to:subject: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=ec3Wf82yGmt1Az/jOKTTsEWEJzALOQHJxf5PU4NXqQQ=; b=JvmBkzznp3VZZjBsLRklTcSHntn8Kuu9b4nR3R78LmsKvhGcykX8ue2faJFj+O8v3lqNdk dfrDeLlEo+VxnduAw7UgqEoeYcQoiWztlqgcj040CFkRCdbU799QLfL2m6M5w6yWsPgomP TN+KixHhiHK0IYMWDF4PjtBJwQQMh7G19gX0cfdBvj3cMJV6632sS2kZLcScUMvGZtoGK2 TpyOFgE7EVnXwJrG37fNeXm0jcbQT5pkd+9CkaAilhQvg8vNmnY4Tn5hug3wzc0TSjfeGY wXysg5SJJInlNFnxDkclpMNficbwx6jgJ8fX0EX9tpW5yNFV+qhbLyrxx35O8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765314213; h=from:from:reply-to:subject: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=ec3Wf82yGmt1Az/jOKTTsEWEJzALOQHJxf5PU4NXqQQ=; b=yFn8QKgaezP4Hd2Gn7OewU4i5ZWfWb5AArut7IyxLqFchn0+xQHXAbiQOjC8Gij5jBA7Ww CMS8M/gTYci9I1IvX5y3DQC3nUciqa8rjFILdOGiV41ger6CBgRT5l9mgxc86ErUafWrvj tR5/5VHMWrGdzLLmwbDZWaegUCfYx3i/ykIIJIcyvR6OVV3IHK3attqON+UNWu6k0ikttT CPiJOLGUbv3AFrSePH8KHzAgyzwV3/tj6zYz4GHU8A8SDMTmhjzXqHAggEoovExmEzcA4x 5T1EotwlqJK5mD79UzUpymt0gSyUJ9kpGqj2U4oniTNPVt8ZerNMtfTunNVYtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765314213; a=rsa-sha256; cv=none; b=vpMPIEX6szOaAM4CDJIk8DGYluNcX/tFlW4DKFnh9CK0+Mw2UoaYSe8HxH/uU+zGGOvkNm MpsEmPQ0CLbex6dBkiPNDpH25wnr3dW3suN3TRndfJonipH+tVntU/ivHX4mtLurjYwYOk V/eUWS5IeuaGtwqJgUEsCyawPRkipdWbAjChmA60EmLIZS91FIR014fP43VhM35jcJEwSz SyAvIPoQo62FomEV+8P7BcHqSde+Srl6QZG4PETh8tH7ePN5xnWZJLFwI4lajdh81VCihr birDdD53/8pbbUlnCfUQX1FkCpxaS/qZSKOUQ6+YiKArH01uuMd6dgshjWYzMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2601:5c0:4202:5670:44e0:6039:a461:36a5] (unknown [IPv6:2601:5c0:4202:5670:44e0:6039:a461:36a5]) (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 4dQrtF4bX4zpVK; Tue, 09 Dec 2025 21:03:33 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <0bed20a1-312e-41fe-98da-f376c9592447@FreeBSD.org> Date: Tue, 9 Dec 2025 16:03:32 -0500 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 575639548cef - main - bus_alloc_resource: Pass rid by value to BUS_ALLOC_RESOURCE DEVMETHOD Content-Language: en-US From: John Baldwin To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <693882af.2fecd.1848e0d9@gitrepo.freebsd.org> <2f83e5f9-74f0-4cc5-aebd-a89be8ed4464@FreeBSD.org> In-Reply-To: <2f83e5f9-74f0-4cc5-aebd-a89be8ed4464@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/9/25 15:46, John Baldwin wrote: > On 12/9/25 15:12, John Baldwin wrote: >> The branch main has been updated by jhb: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=575639548cef58590a1d70c29e47aae0e8d44153 >> >> commit 575639548cef58590a1d70c29e47aae0e8d44153 >> Author: John Baldwin >> AuthorDate: 2025-12-09 19:59:21 +0000 >> Commit: John Baldwin >> CommitDate: 2025-12-09 20:00:06 +0000 >> >> bus_alloc_resource: Pass rid by value to BUS_ALLOC_RESOURCE DEVMETHOD >> >> The wrapper functions such as bus_alloc_resource_any() still support >> passing the rid by value or pointer, but the underlying implementation >> now passes by value. >> >> Reviewed by: imp >> Differential Revision: https://reviews.freebsd.org/D53402 > > FYI, this breaks the build of drm-kmod (hence the __FreeBSD_version bump). > I will open a PR against drm-kmod shortly, but it will still take some time > for the patch to make its way into ports. There's not really a great way > to stage changes that depend on __FreeBSD_version bumps. :( https://github.com/freebsd/drm-kmod/pull/395 is the patch to fix drm-kmod -- John Baldwin From nobody Tue Dec 9 22:20:31 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQtb36wbKz6Jvbp for ; Tue, 09 Dec 2025 22:20:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQtb36Hybz4JjG for ; Tue, 09 Dec 2025 22:20:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765318831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y5K7ym/oRQfw1FuFI6moYu9IGp48qlK08Ht7ZO95f0s=; b=MU+n1dTU+kYpVueLNLxdpfUdnThGu5xgzkhGgfGTSf8H/sYUXFxqW5dfaFY1AbSE9yiHX4 t4dSSozork3O7EWNWbUlwWinbvFfh7KjDeElnHPur6YuWrLzVaWCeO+NrczaHJAnnP3tZ1 zzIzwrz9/+jLySm3jYRq21zejVmK6UkwPfnUCn+61S4VuLM1eEyREps3cZ8CWazsNne0Gb bkxJREkZ/pwSAMzywoGN477kif2Lpu3U6BqvrpM00a3S5lyGr+XaJhx7rMGCSMqsaaM/ni JaM4oci+MQh1VyxPAWrGXlSKVRgC9PTbsIwGN+RrJltXUaLB2rJh2h+fyjsAUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765318831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y5K7ym/oRQfw1FuFI6moYu9IGp48qlK08Ht7ZO95f0s=; b=VqOv1LwvORjsUpn8CLNbTCItxreGraMdm54gtsHX7eCz8Mu2Al+w+ugG9Omm/Icu/QBPcn K56YghF9b1VxJPGGYYKl4gxTHxbhzrMrMInLnSU1oHELm1Sby16i1RGQbf8xGvFr5MBKrG F80ywQ19pbwws7aqofiHGgB7PV7QxgURLrqQFxVWJdwzYPMPPbgtrd0TALYGzyT7zL9+Wz 17RFt6p1zNFE2wUYrkrbZxuMojPQMIVMV0jA/SPdJb4jnWUy7YCnVM+FGrpiCdYmk5ZMKc wQI/aLSKoMhstUIIxmT2EnuSWlHsg8Ouy9DMltCc2i96UTZtBM+YtrAuH8MM7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765318831; a=rsa-sha256; cv=none; b=A2nPd5Y1zJvjw+x9nfon7Si1ivAU5yA9VRtzY6I2oU7PRSjUE/Uq3CS3MOnObIz1qJuTSk VkWtGUSxlN1tGEn/ncQA29o/YyCdiJJ5sygYFxoJQ3tPgGcyf00PiUda1W5eTieLy/hM4t IIZxwRRokBuIi93DYKxAWDqhrYNzayKElWV+a0lRR87mybY01hX9lLD5Zmr79lYpTd8w+A U7cusucZrEk81ycJEhANbgkE7qlsuoPoZT+0OPyLH3qGayXXdEuXhQQSWiuTKOYQDJb6Ze e9OT0YT6uLhr7ZbwVPJLun+ZLBk8vPzTAvpRDtPsbd76K14bXLy2d2jkSwdxOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQtb35sY9z2fx for ; Tue, 09 Dec 2025 22:20:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d667 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 09 Dec 2025 22:20:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: a837d1fe49e0 - main - splice: Fix leaks that can happen when initiating a splice List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a837d1fe49e0255d81c670dc271ff245ae960097 Auto-Submitted: auto-generated Date: Tue, 09 Dec 2025 22:20:31 +0000 Message-Id: <6938a0af.3d667.4486402f@gitrepo.freebsd.org> The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=a837d1fe49e0255d81c670dc271ff245ae960097 commit a837d1fe49e0255d81c670dc271ff245ae960097 Author: Andrew Gallatin AuthorDate: 2025-12-09 21:06:20 +0000 Commit: Andrew Gallatin CommitDate: 2025-12-09 22:07:11 +0000 splice: Fix leaks that can happen when initiating a splice - change the state to SPLICE_EXCEPTION to allow so_unsplice() to work to cleanup failed splices (fixes socket reference leak) - NULL out sp->dst when unsplicing from so_splice() before so2 has been been referenced. - Deal with a null sp->dst / so2 in so_unsplice - Fix asserts that talked about sp->state == SPLICE_INIT; that state is not possible here. Differential Revision: https://reviews.freebsd.org/D54157 Reviewed by: markj Sponsored by: Netflix Fixes: c0c5d01e5374 ("so_splice: Synchronize so_unsplice() with so_splice()") MFC after: 3 days --- sys/kern/uipc_socket.c | 44 +++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 00aa5f9309b2..9eba3ad2e082 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1726,6 +1726,10 @@ so_splice(struct socket *so, struct socket *so2, struct splice *splice) error = EBUSY; if (error != 0) { SOCK_UNLOCK(so2); + mtx_lock(&sp->mtx); + sp->dst = NULL; + sp->state = SPLICE_EXCEPTION; + mtx_unlock(&sp->mtx); so_unsplice(so, false); return (error); } @@ -1733,6 +1737,10 @@ so_splice(struct socket *so, struct socket *so2, struct splice *splice) if (so->so_snd.sb_tls_info != NULL) { SOCK_SENDBUF_UNLOCK(so2); SOCK_UNLOCK(so2); + mtx_lock(&sp->mtx); + sp->dst = NULL; + sp->state = SPLICE_EXCEPTION; + mtx_unlock(&sp->mtx); so_unsplice(so, false); return (EINVAL); } @@ -1799,20 +1807,20 @@ so_unsplice(struct socket *so, bool timeout) SOCK_UNLOCK(so); so2 = sp->dst; - SOCK_LOCK(so2); - KASSERT(!SOLISTENING(so2), ("%s: so2 is listening", __func__)); - SOCK_SENDBUF_LOCK(so2); - KASSERT(sp->state == SPLICE_INIT || - (so2->so_snd.sb_flags & SB_SPLICED) != 0, - ("%s: so2 is not spliced", __func__)); - KASSERT(sp->state == SPLICE_INIT || - so2->so_splice_back == sp, - ("%s: so_splice_back != sp", __func__)); - so2->so_snd.sb_flags &= ~SB_SPLICED; - so2rele = so2->so_splice_back != NULL; - so2->so_splice_back = NULL; - SOCK_SENDBUF_UNLOCK(so2); - SOCK_UNLOCK(so2); + if (so2 != NULL) { + SOCK_LOCK(so2); + KASSERT(!SOLISTENING(so2), ("%s: so2 is listening", __func__)); + SOCK_SENDBUF_LOCK(so2); + KASSERT((so2->so_snd.sb_flags & SB_SPLICED) != 0, + ("%s: so2 is not spliced", __func__)); + KASSERT(so2->so_splice_back == sp, + ("%s: so_splice_back != sp", __func__)); + so2->so_snd.sb_flags &= ~SB_SPLICED; + so2rele = so2->so_splice_back != NULL; + so2->so_splice_back = NULL; + SOCK_SENDBUF_UNLOCK(so2); + SOCK_UNLOCK(so2); + } /* * No new work is being enqueued. The worker thread might be @@ -1852,9 +1860,11 @@ so_unsplice(struct socket *so, bool timeout) sorwakeup(so); CURVNET_SET(so->so_vnet); sorele(so); - sowwakeup(so2); - if (so2rele) - sorele(so2); + if (so2 != NULL) { + sowwakeup(so2); + if (so2rele) + sorele(so2); + } CURVNET_RESTORE(); so_splice_free(sp); return (0); From nobody Tue Dec 9 22:45:30 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQv85064kz6Jxc6; Tue, 09 Dec 2025 22:45:41 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQv844nd4z4MPL; Tue, 09 Dec 2025 22:45:40 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765320340; h=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=s5o88g1DnMrSQ8i5FI1JjYjxZ80MGwM95c8iI4q15zU=; b=qtuI1w7x3rttRe3AuTlNDWmXVwBEf8OUigOdnUf6iIIuDfqcMc0Qz1gdlsmxiMlILDgVrR Vw6r70Xfn5/TZ9VlWdnW2OekfyCeWXosOGzCudZLUJE1T2mpJ+Q36Q04hatEYAoRn8maid wufEplSCquD0FVC1W6DtAX61HanJuewfltIKOq7pSKmQfzkb7Q1+jb2D7pqkpPGVAayff2 ywZBQLHF4akfXJ/oT6JlGKytETP2uwi6Uxl4V/klpGEu5bK+Q1aaDgplXgUkIbefcSwiPo BB+C5QLUnUw0l4ySRm5PSAb9DZYhxEUWz9dFZMWJu8kEqNq+AA5n0rotbFhwZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765320340; h=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=s5o88g1DnMrSQ8i5FI1JjYjxZ80MGwM95c8iI4q15zU=; b=tuwG7skmvMm10yuCs3v7qDP9EFKjOTAhQ/RlDtmVfsky3lxdsNPGzSJNvz49VXN8H8qfzZ ZabKtSrYAvPPI18y1RlZtdIgYkUUQPF1YZNVc/irjou9G2JXSwclA4DGBPzkoCu9K2HhyJ /nXcauZRzDTEVF2rVsezmJK2IVtlIX+BfKH+EDw6ldUXcjycj1ECCtE6RmoehNOFqArqgu wZSXLd507mCo2mnKF0Vf1bmveyO3X1avoHZEB81aTCj5jWakWJlzAN+8O/ua75A69t7azH gbMdDz3VvmUQ9DtUVuJWUuTR22LBCc4tJjTptwUaXD2HQPyOeZT+9IKA7XXiRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765320340; a=rsa-sha256; cv=none; b=x3tgupkIlXceX8jRkPgMIt6NkK2xDlk0pw289XcYtKRLN6JHuC/0i9g6z5/iMoW6Mtp0Up rynGRbR/zWGSspru/8J3mr002kqafGJgEaAN9GwNDsEeVARa6ry4OB1osvTkzXJNVeVxH0 Pbd5wG+fLwGbLxUJbF9WBlSWUL993Ea12JpWevyzBcFMDrlZpvydl1xzOeuqVI/Jze7xl8 xYWLoKcsF3w21epCSvQHX6b4UwA9fX0ZocnEKT2Qg8Anzb6IEtBrkFq40O2pJ6KZO4BFPs g7zVqDlpbcIt2q8ZPZffORZAZscmh1IC3eOCC1LldSRMHfPfMaDaGZNh9MRhkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E8" (verified OK)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dQv843FkhzqNP; Tue, 09 Dec 2025 22:45:40 +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 6D554A64805; Tue, 09 Dec 2025 22:45:19 +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 3EA8F2D029E6; Tue, 9 Dec 2025 22:45:33 +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 lIVSwWwMRkBL; Tue, 9 Dec 2025 22:45:31 +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 B44612D029D8; Tue, 9 Dec 2025 22:45:31 +0000 (UTC) Date: Tue, 9 Dec 2025 22:45:30 +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: 575639548cef - main - bus_alloc_resource: Pass rid by value to BUS_ALLOC_RESOURCE DEVMETHOD In-Reply-To: <2f83e5f9-74f0-4cc5-aebd-a89be8ed4464@FreeBSD.org> Message-ID: References: <693882af.2fecd.1848e0d9@gitrepo.freebsd.org> <2f83e5f9-74f0-4cc5-aebd-a89be8ed4464@FreeBSD.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed On Tue, 9 Dec 2025, John Baldwin wrote: Hi, upfront: while talking about this very specific change as well, I really just want to point out the general problem. > On 12/9/25 15:12, John Baldwin wrote: >> The branch main has been updated by jhb: >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=575639548cef58590a1d70c29e47aae0e8d44153 >> >> commit 575639548cef58590a1d70c29e47aae0e8d44153 >> Author: John Baldwin >> AuthorDate: 2025-12-09 19:59:21 +0000 >> Commit: John Baldwin >> CommitDate: 2025-12-09 20:00:06 +0000 >> >> bus_alloc_resource: Pass rid by value to BUS_ALLOC_RESOURCE DEVMETHOD >> The wrapper functions such as bus_alloc_resource_any() still >> support >> passing the rid by value or pointer, but the underlying implementation >> now passes by value. >> Reviewed by: imp >> Differential Revision: https://reviews.freebsd.org/D53402 > > FYI, this breaks the build of drm-kmod (hence the __FreeBSD_version bump). > I will open a PR against drm-kmod shortly, but it will still take some time > for the patch to make its way into ports. There's not really a great way > to stage changes that depend on __FreeBSD_version bumps. :( Yes, it is a pain. The version check needs to go in for multiple different branches but likely also needs to be applied to ports via patch file as at least one is based on a tag and not on a branch currently for as much as I remember. Just saying as I ran into all the tiny details with my previous PCI cleanup there, which cost me a delay of more than 2 months to get things in (and then still broke nvidia graphics and networking). Even if not a graphics person, I'll be happy to review this. That said, I believe, what I had said before, the proper solution [for this specific case] would have been to implement pci_bus_alloc_resource() in LinuxKPI and get rid of the FreeBSD specific native code. We already have "drmn" specific workaorunds in LinuxKPI due to the special bit of "vgapci" sitting in front of it. The infrastructure for that is sadly there but at least it is in one place under one name. We would have had to ship that implementation with drm-kmod for older releases but the problem would have been sorted, and could have been sorted upfront. We get bitten by unneccesary native code in drm-kmod (and elsewhere) a lot more these days and every opportunity to clean on up not taken will just bring more pain later. I have the next of these "native code in Linux code" problems queued already for amdgpu but also some in-tree consumers have similar issues (sometimes the other way round being mostly native but still using some LinuxKPI headers). /bz -- Bjoern A. Zeeb r15:7 From nobody Wed Dec 10 00:03:57 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQwtP4VZBz6K3bD for ; Wed, 10 Dec 2025 00:03:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQwtP3Nplz3HC1 for ; Wed, 10 Dec 2025 00:03:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765325037; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q2n4zD8K722SLVjE8mYhZ0isHJTOCDbZddQIeOrKIek=; b=YrSyuV2enr8TeE2qiYxOM+B4KkF0CRQcBf0879YTzdvnxbXS2ZrtsNkKaWGkAh4gbpuSnJ Mwt6wfAl9i811GNelY9sDvsv5S3n5EsHeK4Qhp4lZs9NRmdcuVQU9DRePaUYi1syvzdZhO OgcjUkdwPHVGIvJnYGhfO2MNhD3PyQXDLRtnGfQER1KgnkdeAwTKdGY7zEM6OMPhMfYcYg HX+iy76cOBZqK2c7q23pMi+tuCI2G4S6qI2bcCwnodtZDHgEZguOuAGm3gr/5nfzmJT4Qs BYGGsisCj9sQ1ln8VQtObFqQq6NBeZyjCkn6fHN+4jKjVl+YyiGJAO+z2rk6ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765325037; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q2n4zD8K722SLVjE8mYhZ0isHJTOCDbZddQIeOrKIek=; b=XIAd+xO87nw/iF1qLLfypSaAq+tOnWLUv5Bs8nCtggDVGMiY3Y/ulg4khlQ82/6/p2YKWf WffR8cORxrIa9ms28PfjHox653HXVKu7mnOA970oG1oCRNuK9DUV6QsH47T0kFgJ04GU+E mQNtaFw3jxMYHYY9IDLE+cu9ni3iIbHxmo1Tsr16xkRpOUJa55G9xjd3reqhr7IT9d7EDE VuoPar/aga8oVx+509ce6tvLRM3E3xqvdmfKjhcxq92Q90lv6WRRTTESqTj8rGo9nLNbSf d5/udVNpYvG7dGYCU0JF0QLOEYjWaDyBO9STxtt974hoGc4OESQKPzKoyMn1EA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765325037; a=rsa-sha256; cv=none; b=E5U4ktTtmw+tIj2WytiGKhw0xmPeW870ucfKB7MbpBSpXh0irv8BfPiqmLgvvuAsDWkYeQ JeXagPMfED7QDt5X8LS5fc9u/pQk67rQoNEf3Ad+O37hheUo89KXYRiaHSKHC3nMn1aiBb 9k96bvmkQR6SJJQvVSYQ3NkzdMjljNqI7ZgD7q05+9sN4YACLn6q8fPVm/3EehWaY3dZSl KPQz+m58zrnFtiTPiUkfjL2xnF0qZKeNyhY4Lmc2N7lzV3nnjz8p11wt9JK/3Qs+8bRXhU 2GCxD5WT6fGDnFIkiuUyt9Ol4rJBnNG44heW8IPjWIDMuZlX2PGUKSY0XooDDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dQwtP2pWjz67j for ; Wed, 10 Dec 2025 00:03:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id e858 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 00:03:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: cc1e4aae5a67 - main - rc.d/ipfilter: ipfilter must be enabled for options to take List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cc1e4aae5a67a20f3c0fff13612364e6e4404f93 Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 00:03:57 +0000 Message-Id: <6938b8ed.e858.115270d4@gitrepo.freebsd.org> The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=cc1e4aae5a67a20f3c0fff13612364e6e4404f93 commit cc1e4aae5a67a20f3c0fff13612364e6e4404f93 Author: Cy Schubert AuthorDate: 2025-12-09 23:42:07 +0000 Commit: Cy Schubert CommitDate: 2025-12-10 00:03:38 +0000 rc.d/ipfilter: ipfilter must be enabled for options to take ipfilter options are erased and reset to default when ipfilter is disabled. This results in nullifying options from rc.conf that were previously set. 8d6feaaaa26f, which added this code, was incorrect as it was for a bug in ipfilter 4.2.28 and no longer applies to ipfilter 5.1.2. Fixes: 8d6feaaaa26f MFC after: 1 day --- libexec/rc/rc.d/ipfilter | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/libexec/rc/rc.d/ipfilter b/libexec/rc/rc.d/ipfilter index 1253294b09cf..a68e6f60a6f2 100755 --- a/libexec/rc/rc.d/ipfilter +++ b/libexec/rc/rc.d/ipfilter @@ -33,14 +33,11 @@ required_modules="ipl:ipfilter" ipfilter_start() { echo "Enabling ipfilter." + if ! ${ipfilter_program:-/sbin/ipf} -V | grep -q 'Running: yes'; then + ${ipfilter_program:-/sbin/ipf} -E + fi if [ -n "${ipfilter_optionlist}" ]; then - if ${ipfilter_program:-/sbin/ipf} -V | grep -q 'Running: yes'; then - ${ipfilter_program:-/sbin/ipf} -D - fi ${ipfilter_program:-/sbin/ipf} -T "${ipfilter_optionlist}" - ${ipfilter_program:-/sbin/ipf} -E - elif ! ${ipfilter_program:-/sbin/ipf} -V | grep -q 'Running: yes'; then - ${ipfilter_program:-/sbin/ipf} -E fi ${ipfilter_program:-/sbin/ipf} -Fa if [ -r "${ipfilter_rules}" ]; then From nobody Wed Dec 10 00:05:29 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dQwwB209Nz6K486; Wed, 10 Dec 2025 00:05:30 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dQwwB1R0Xz3HdG; Wed, 10 Dec 2025 00:05:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765325130; h=from:from:reply-to:subject:subject: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=pEk05nqtwb4JdTz6TjgUzdvSogY7TDb5H3Qiughtyb0=; b=cf0tpYjd2ggB2nunTP53BoH/j69b6DnwuC43wl7ISF1HKyl81bV7Zy9+JeNH35y5M49t3B IqKk1dXaUJdHyRuXmMYAXzM73HFVxjBox/0i+OEf/CbVP/KJQsARqSZ5a22eXbU1DBbYpB U9x3nFfPE3UYp/k10GkoXA8Z7trQ/TpyIgvJUl8RCnVRdUV3vRqj9vhbTbF9yTwtNVzU3I eTP+cspYw8IqDG7hfokW5H4hvYmwCzUGybbfE4xn9wtjfBgZtjp0rEglzlltrHoeZCX9+I hqrN3eT7zkfeLybMFFe7Y1bMxa9L5bSX2rqqJMXeWL4+xNy6RLSKUue2R9xGHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765325130; h=from:from:reply-to:subject:subject: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=pEk05nqtwb4JdTz6TjgUzdvSogY7TDb5H3Qiughtyb0=; b=OjEza0t6WQ5m3WnX1q6/71oddXmNjyuilS8Arj3fM3j5S8Qd4eWzJRcuYXOvXkZIOuOMlX dKg9+dsrIwdu0SPfdK3QZEMt9s8eeKanWOjsUpo6BtnyPtBrrjvmLRmX/TiqNGXsVgo/3S fKKeewI7ITC3kjhRVbK4eidmsgCIa7SAzjhiLHluGfLrYc9Hy06mMvAnruLceK/+sqjmu4 2MhCcbCkIlV+wG9gSmuHov/nsfG26Kq4KHlFvZlnTj4PGZDv1y68OTEwRU3i5UKE3pR4ev 93qoUoZZQOih7F/pl3bKBMAdtkN8OqI2ZcW1woyRyvmoPBZ0ZyJKQSqiK35ERQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765325130; a=rsa-sha256; cv=none; b=sqkRF24pxmppQ/7rqQTEbeJa3XEcUF5IraJAMFzUHw/pjNHxZSPvZQ2IVWHtKkPICCp7Du 8SMWeNpJF+B9ikAG1WXVF39j5Zr5Mxc3CeCO+wduh3dwdbP3F86taHah4w0mR7xHNt0i7w IU3QMn+TgPepKEmTLXHgPQEqXhJYgfM1/3e4hpwcvgLMj2csMscbPIfMESU4LNGtnmT3fB zgLhk/XK0plPkUAJzxJNEUTE5EjpiN1vQHFHN69dyQsYUnfcoJ8bDBzhWIbiIU5ykyj9J3 peUncesTuXvq+uz6tbNBn39q3cbwPjBF06HiudcOio3gEOgyr8KArFEEG3St6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2601:5c0:4202:5670:44e0:6039:a461:36a5] (unknown [IPv6:2601:5c0:4202:5670:44e0:6039:a461:36a5]) (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 4dQww96XB0zs9g; Wed, 10 Dec 2025 00:05:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <8b52aeca-46cd-49b3-9a11-7c487fe62cb8@FreeBSD.org> Date: Tue, 9 Dec 2025 19:05:29 -0500 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 575639548cef - main - bus_alloc_resource: Pass rid by value to BUS_ALLOC_RESOURCE DEVMETHOD Content-Language: en-US To: "Bjoern A. Zeeb" Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <693882af.2fecd.1848e0d9@gitrepo.freebsd.org> <2f83e5f9-74f0-4cc5-aebd-a89be8ed4464@FreeBSD.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/9/25 17:45, Bjoern A. Zeeb wrote: > On Tue, 9 Dec 2025, John Baldwin wrote: > > Hi, > > upfront: while talking about this very specific change as well, I really just > want to point out the general problem. > >> On 12/9/25 15:12, John Baldwin wrote: >>> The branch main has been updated by jhb: >>> >>> URL: >>> https://cgit.FreeBSD.org/src/commit/?id=575639548cef58590a1d70c29e47aae0e8d44153 >>> >>> commit 575639548cef58590a1d70c29e47aae0e8d44153 >>> Author: John Baldwin >>> AuthorDate: 2025-12-09 19:59:21 +0000 >>> Commit: John Baldwin >>> CommitDate: 2025-12-09 20:00:06 +0000 >>> >>> bus_alloc_resource: Pass rid by value to BUS_ALLOC_RESOURCE DEVMETHOD >>> The wrapper functions such as bus_alloc_resource_any() still >>> support >>> passing the rid by value or pointer, but the underlying implementation >>> now passes by value. >>> Reviewed by: imp >>> Differential Revision: https://reviews.freebsd.org/D53402 >> >> FYI, this breaks the build of drm-kmod (hence the __FreeBSD_version bump). >> I will open a PR against drm-kmod shortly, but it will still take some time >> for the patch to make its way into ports. There's not really a great way >> to stage changes that depend on __FreeBSD_version bumps. :( > > Yes, it is a pain. > > The version check needs to go in for multiple different branches but likely also > needs to be applied to ports via patch file as at least one is based on a tag and > not on a branch currently for as much as I remember. Just saying as I ran into > all the tiny details with my previous PCI cleanup there, which cost me a delay of > more than 2 months to get things in (and then still broke nvidia graphics and > networking). Even if not a graphics person, I'll be happy to review this. > > > That said, I believe, what I had said before, the proper solution [for this > specific case] would have been to implement pci_bus_alloc_resource() in LinuxKPI > and get rid of the FreeBSD specific native code. Eh, even the Linux code is special in this case as it is allocating a non-standard BAR. We do support non-standard BARs (and don't require manually dinking with the register the way Linux does), and I have a patch to vga_pci to permit allocating those, but that needs a larger patch and more testing by someone with old enough hardware to test this case, and in general none of the drm-kmod folks ever replied on any of those reviews despite multiple pings, so I just went with the simpler approach. -- John Baldwin From nobody Wed Dec 10 05:07:23 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dR3cW6fkBz6Jw9p for ; Wed, 10 Dec 2025 05:07:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dR3cW48VQz3n2t for ; Wed, 10 Dec 2025 05:07:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765343243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bRx+vbMEDkMbp4LxBItgDiw+//I9RzxIVBIccfmyj4U=; b=o7gR7afo2xtNcoCYNaaZqHwwtYsnNHK6Vv+EkdFsF85JQEoL25Id1Nsgk61hBbcL9A1Czz nF4e/GZsQLxMs0vQgOj0OpZpBoho2kAJoRYGLEtaLdTx1vcDxBUGznXHT4sL08ThbH3LOB AYskfy5jIOmF0ZVt+DU8ylCT0ibXUYNALOBrD6O2Kse0LCC0d8iIwbxoHBA5nwFRICUCY/ RK/P2gQLp/9ib56AE9S+T6EiOa2Zp1EP9C/3I+/HeUrlTHdK3s5+zM7Cl2IgmGI7/aiMFR sJ7nPeXmoXBxkbQpUwVyWvESgwMlZPXAEwoHeG34B8bnO6+oa7IqmtoKMI+vrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765343243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bRx+vbMEDkMbp4LxBItgDiw+//I9RzxIVBIccfmyj4U=; b=NXDEvl5QbN8YEOxjDRY6hQsCIp6hvPIdKhlj+IKk7s9ReXxwn7ic+jlzkiO2LgVMHtUyhF i8o3rhLqceP/objDNWiB+a4228sdQJbPZKkFtIpYJOteYp63bQoFJoZKuPLvgbTpLd7nD3 PHjdWi2fIgfoMtsGh9fRQTLUnDjfq74/+TXUA3OXhBHGaynbT/vy13yzqULgaZiA5Fp2uW YJmFUlNv4xETtTSqsmA69jsZjg8gBs7ksAKCoik6NEnMkhP7K6jWf+5119UQ3Uc0b5mLxl FmotVXvVfkfchpufUHDnJlHw6g4J69rp3magC8lrKqjBlQ5/nu4Avu1RjkpzSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765343243; a=rsa-sha256; cv=none; b=jth/MqjeAV+DKpl3AxbgL13fVafc7hChtDouRAjOpNYpEZr9K9HVPe9+Mq1Sp7IAiW+t6x oS5fqyry4Ayi7kWnStW4a/MamX9ICtRZ0RwxKsPWNkq4ceBjP3c2suKpvuHCJcvzkcxUgr ak8N9JUq5vIE1uNqgLOPFiRNdQuIGfk2mmQ5vw3Q7CWDAQeNpPzlosAFvzcWBqd+R2+4Nx Xx6nMPHy4cCMoJBtamQX/kXs71e7KwDNgTGfIcDHm5uv5dCWxbwhi/G76+/yFPPR21VLQg xMnPjYGaRV28QX7CDQnVbAPF8exAAjpoHB67birS8uZDu5pvQ8hitS33rFheIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dR3cW3CrCzW0m for ; Wed, 10 Dec 2025 05:07:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d265 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 05:07:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Simon J. Gerraty Subject: git: 9bbb08f9055d - main - Update share/mk files from bmake List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9bbb08f9055d03d41597abc9312620d0ab50444c Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 05:07:23 +0000 Message-Id: <6939000b.3d265.73f141cc@gitrepo.freebsd.org> The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=9bbb08f9055d03d41597abc9312620d0ab50444c commit 9bbb08f9055d03d41597abc9312620d0ab50444c Author: Simon J. Gerraty AuthorDate: 2025-12-10 05:06:31 +0000 Commit: Simon J. Gerraty CommitDate: 2025-12-10 05:06:31 +0000 Update share/mk files from bmake Update to the latest makefiles etc from bmake. Mostly this just replaces sjg license with an SPDX tag. There are also some improvements to meta2deps* and optimizations to leverage POSIX shell features in some target scripts. Default isPOSIX_SHELL to ':' in sys.mk to enable these. Use :sh1 in M_type if possible. bsd.progs.mk has diverged too much to touch beyond making the SPDX tag update. Reviewed by: stevek Differential Revision: https://reviews.freebsd.org/D54150 --- share/mk/auto.obj.mk | 11 ++---- share/mk/bsd.progs.mk | 7 +--- share/mk/dirdeps-options.mk | 11 ++---- share/mk/dirdeps-targets.mk | 18 +++------- share/mk/gendirdeps.mk | 24 +++++++++---- share/mk/install-new.mk | 50 ++++++++++++--------------- share/mk/jobs.mk | 11 ++---- share/mk/local.sys.env.mk | 9 ++++- share/mk/meta.autodep.mk | 83 ++++++++++++++++++++++++++++----------------- share/mk/meta.stage.mk | 46 +++++++++++++++---------- share/mk/meta.subdir.mk | 12 ++----- share/mk/meta.sys.mk | 12 ++----- share/mk/meta2deps.py | 49 ++++++++++++++++++++------ share/mk/meta2deps.sh | 54 ++++++++++++++++++++++------- share/mk/stage-install.sh | 9 ++--- share/mk/sys.dependfile.mk | 11 ++---- share/mk/sys.dirdeps.mk | 11 ++---- share/mk/sys.mk | 3 ++ 18 files changed, 232 insertions(+), 199 deletions(-) diff --git a/share/mk/auto.obj.mk b/share/mk/auto.obj.mk index 4b8c5325b71f..140764860de3 100644 --- a/share/mk/auto.obj.mk +++ b/share/mk/auto.obj.mk @@ -1,15 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: auto.obj.mk,v 1.20 2025/05/17 15:29:55 sjg Exp $ +# $Id: auto.obj.mk,v 1.21 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2004-2025, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/share/mk/bsd.progs.mk b/share/mk/bsd.progs.mk index 4d1ff354edfb..007e8a843944 100644 --- a/share/mk/bsd.progs.mk +++ b/share/mk/bsd.progs.mk @@ -2,12 +2,7 @@ # # @(#) Copyright (c) 2006, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/share/mk/dirdeps-options.mk b/share/mk/dirdeps-options.mk index e12dcec40ac7..d173cb7d1e97 100644 --- a/share/mk/dirdeps-options.mk +++ b/share/mk/dirdeps-options.mk @@ -1,15 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: dirdeps-options.mk,v 1.22 2024/02/17 17:26:57 sjg Exp $ +# $Id: dirdeps-options.mk,v 1.23 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2018-2022, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/share/mk/dirdeps-targets.mk b/share/mk/dirdeps-targets.mk index a8a547c0ce9b..1d00c5f418d2 100644 --- a/share/mk/dirdeps-targets.mk +++ b/share/mk/dirdeps-targets.mk @@ -1,19 +1,11 @@ -# SPDX-License-Identifier: BSD-2-Clause +# $Id: dirdeps-targets.mk,v 1.29 2025/08/09 22:42:24 sjg Exp $ # -# RCSid: -# $Id: dirdeps-targets.mk,v 1.28 2024/10/19 00:47:38 sjg Exp $ +# @(#) Copyright (c) 2019-2020 Simon J. Gerraty # -# @(#) Copyright (c) 2019-2020 Simon J. Gerraty +# SPDX-License-Identifier: BSD-2-Clause # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. -# -# Please send copies of changes and bug-fixes to: -# sjg@crufty.net +# Please send copies of changes and bug-fixes to: +# sjg@crufty.net # ## diff --git a/share/mk/gendirdeps.mk b/share/mk/gendirdeps.mk index 53e736da3391..ab1786f3603f 100644 --- a/share/mk/gendirdeps.mk +++ b/share/mk/gendirdeps.mk @@ -1,8 +1,8 @@ -# $Id: gendirdeps.mk,v 1.51 2025/01/05 01:16:19 sjg Exp $ +# $Id: gendirdeps.mk,v 1.54 2025/08/12 21:36:43 sjg Exp $ # SPDX-License-Identifier: BSD-2-Clause # -# Copyright (c) 2011-2020, Simon J. Gerraty +# Copyright (c) 2011-2025, Simon J. Gerraty # Copyright (c) 2010-2018, Juniper Networks, Inc. # All rights reserved. # @@ -76,6 +76,12 @@ # .MAIN: all +.if ${DEBUG_GENDIRDEPS:Uno:@m@${RELDIR:M$m}@} != "" +_debug.gendirdeps = 1 +.else +_debug.gendirdeps = 0 +.endif + # keep this simple .MAKE.MODE = compat @@ -108,6 +114,9 @@ META_FILES += ${META_XTRAS:N\*.meta} .endif .if !empty(META_FILES) +.if ${_debug.gendirdeps} && ${DEBUG_GENDIRDEPS:Mmeta*} != "" +.info ${RELDIR}: META_FILES=${META_FILES} +.endif .if ${.MAKE.LEVEL} > 0 && !empty(GENDIRDEPS_FILTER) # so we can compare below @@ -146,7 +155,7 @@ GENDIRDEPS_FILTER += ${GENDIRDEPS_FILTER_VARS:@v@S,/${$v}/,/_{${v}}/,@:NS,//,*:u META2DEPS ?= ${.PARSEDIR}/meta2deps.sh META2DEPS := ${META2DEPS} -.if ${DEBUG_GENDIRDEPS:Uno:@x@${RELDIR:M$x}@} != "" && ${DEBUG_GENDIRDEPS:Uno:Mmeta2d*} != "" +.if ${_debug.gendirdeps} && ${DEBUG_GENDIRDEPS:Mmeta2d*} != "" _time = time _sh_x = sh -x _py_d = -ddd @@ -260,7 +269,7 @@ dpadd_dir_list += ${f:H:tA} ddeps != cat ${ddep_list:O:u} | ${META2DEPS_FILTER} ${_skip_gendirdeps} \ sed ${GENDIRDEPS_SEDCMDS} -.if ${DEBUG_GENDIRDEPS:Uno:@x@${RELDIR:M$x}@} != "" +.if ${_debug.gendirdeps} .info ${RELDIR}: raw_dir_list='${dir_list}' .info ${RELDIR}: ddeps='${ddeps}' .endif @@ -289,12 +298,13 @@ M2D_OBJROOTS := ${M2D_OBJROOTS:O:u:[-1..1]} # anything we use from an object dir other than ours # needs to be qualified with its . suffix # (we used the pseudo machine "host" for the HOST_TARGET). -skip_ql= ${SRCTOP}* ${_objtops:@o@$o*@} +skip_ql = ${SRCTOP}* ${_objtops:@o@$o*@} +M_ListToSkip ?= O:u:S,^,N,:ts: .for o in ${M2D_OBJROOTS:${skip_ql:${M_ListToSkip}}} # we need := so only skip_ql to this point applies ql.$o := ${dir_list:${skip_ql:${M_ListToSkip}}:M$o*/*/*:C,$o([^/]+)/(.*),\2.\1,:S,.${HOST_TARGET},.host,} qualdir_list += ${ql.$o} -.if ${DEBUG_GENDIRDEPS:Uno:@x@${RELDIR:M$x}@} != "" +.if ${_debug.gendirdeps} .info ${RELDIR}: o=$o ${ql.$o qualdir_list:L:@v@$v=${$v}@} .endif skip_ql+= $o* @@ -323,7 +333,7 @@ DIRDEPS += \ GENDIRDEPS_FILTER_MASK += @CMNS DIRDEPS := ${DIRDEPS:${GENDIRDEPS_FILTER:UNno:M[${GENDIRDEPS_FILTER_MASK:O:u:ts}]*:ts:}:C,//+,/,g:O:u} -.if ${DEBUG_GENDIRDEPS:Uno:@x@${RELDIR:M$x}@} != "" +.if ${_debug.gendirdeps} .info ${RELDIR}: M2D_OBJROOTS=${M2D_OBJROOTS} .info ${RELDIR}: M2D_EXCLUDES=${M2D_EXCLUDES} .info ${RELDIR}: dir_list='${dir_list}' diff --git a/share/mk/install-new.mk b/share/mk/install-new.mk index 19a2b2a10061..2fb9725a7a47 100644 --- a/share/mk/install-new.mk +++ b/share/mk/install-new.mk @@ -1,53 +1,41 @@ -# $Id: install-new.mk,v 1.3 2012/03/24 18:25:49 sjg Exp $ +# $Id: install-new.mk,v 1.9 2025/11/19 17:44:15 sjg Exp $ # # @(#) Copyright (c) 2009, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. -# +# SPDX-License-Identifier: BSD-2-Clause +# # Please send copies of changes and bug-fixes to: # sjg@crufty.net # .if !defined(InstallNew) -# copy if src and target are different making a backup if desired -CmpCp= CmpCp() { \ +# How do we want CmpCpMv to do the final operation? +# the backup (if any) will use the opposite. +CPMV_OP ?= mv +# clear this if not supported +CPMV_f ?= -f + +# copy/move if src and target are different making a backup if desired +CmpCpMv= CmpCpMv() { \ src=$$1 target=$$2 _bak=$$3; \ if ! test -s $$target || ! cmp -s $$target $$src; then \ trap "" 1 2 3 15; \ + case "/${CPMV_OP}" in */cp) bop=mv;; */mv) bop=cp;; esac; \ if test -s $$target; then \ if test "x$$_bak" != x; then \ rm -f $$target$$_bak; \ - mv $$target $$target$$_bak; \ + $$bop ${CPMV_f} $$target $$target$$_bak; \ else \ rm -f $$target; \ fi; \ fi; \ - cp $$src $$target; \ - fi; } - -# Replace the file if they are different and make a backup if desired -CmpReplace= CmpReplace() { \ - src=$$1 target=$$2 _bak=$$3; \ - if ! test -s $$target || ! cmp -s $$target $$src; then \ - trap "" 1 2 3 15; \ - if test -s $$target; then \ - if test "x$$_bak" != x; then \ - rm -f $$target$$_bak; \ - cp -f $$target $$target$$_bak; \ - fi; \ - fi; \ - mv -f $$src $$target; \ + ${CPMV_OP} ${CPMV_f} $$src $$target; \ fi; } # If the .new file is different, we want it. # Note: this function will work as is for *.new$RANDOM" -InstallNew= ${CmpReplace}; InstallNew() { \ +InstallNew= ${CmpCpMv}; InstallNew() { \ _t=-e; _bak=; \ while :; do \ case "$$1" in \ @@ -58,8 +46,12 @@ InstallNew= ${CmpReplace}; InstallNew() { \ done; \ for new in "$$@"; do \ if test $$_t $$new; then \ - target=`expr $$new : '\(.*\).new'`; \ - CmpReplace $$new $$target $$_bak; \ + if ${isPOSIX_SHELL:Ufalse}; then \ + target=$${new%.new}; \ + else \ + target=`expr $$new : '\(.*\).new'`; \ + fi; \ + CmpCpMv $$new $$target $$_bak; \ fi; \ rm -f $$new; \ done; :; } diff --git a/share/mk/jobs.mk b/share/mk/jobs.mk index e304e16a9c56..874e7deeb107 100644 --- a/share/mk/jobs.mk +++ b/share/mk/jobs.mk @@ -1,15 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: jobs.mk,v 1.19 2025/02/03 21:18:44 sjg Exp $ +# $Id: jobs.mk,v 1.20 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2012-2025, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/share/mk/local.sys.env.mk b/share/mk/local.sys.env.mk index 470c2d8559eb..79a8a775f5c2 100644 --- a/share/mk/local.sys.env.mk +++ b/share/mk/local.sys.env.mk @@ -22,9 +22,16 @@ M_L_TARGETS = ${M_ListToMatch:S,V,_TARGETS,} # NskipFoo = ${Foo:${M_ListToSkip}} M_ListToSkip= O:u:ts::S,:,:N,g:S,^,N, +# :sh1 evaluates command only once and caches the result. +.if ${MAKE_VERSION} < 20251111 +M_sh1 = sh +.else +M_sh1 = sh1 +.endif + # type should be a builtin in any sh since about 1980, # AUTOCONF := ${autoconf:L:${M_whence}} -M_type = @x@(type $$x 2> /dev/null); echo;@:sh:[0]:N* found*:[@]:C,[()],,g +M_type = @x@(type $$x 2> /dev/null); echo;@:${M_sh1:Ush}:[0]:N* found*:[@]:C,[()],,g M_whence = ${M_type}:M/*:[1] # convert a path to a valid shell variable diff --git a/share/mk/meta.autodep.mk b/share/mk/meta.autodep.mk index 55f2d66e56aa..2120c0892475 100644 --- a/share/mk/meta.autodep.mk +++ b/share/mk/meta.autodep.mk @@ -1,16 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause +# $Id: meta.autodep.mk,v 1.71 2025/08/09 22:42:24 sjg Exp $ # -# $Id: meta.autodep.mk,v 1.63 2024/04/24 18:56:41 sjg Exp $ - -# -# @(#) Copyright (c) 2010, Simon J. Gerraty +# @(#) Copyright (c) 2010-2025, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net @@ -22,6 +14,12 @@ __${_this}__: .NOTMAIN .-include +.if ${DEBUG_AUTODEP:Uno:@m@${RELDIR:M$m}@} != "" +_debug.autodep = 1 +.else +_debug.autodep = 0 +.endif + PICO?= .pico .if defined(SRCS) @@ -85,9 +83,9 @@ UPDATE_DEPENDFILE = NO _bootstrap_dirdeps = yes .endif _bootstrap_dirdeps ?= no -UPDATE_DEPENDFILE ?= yes +UPDATE_DEPENDFILE ?= ${MK_UPDATE_DEPENDFILE:Uyes} -.if ${DEBUG_AUTODEP:Uno:@m@${RELDIR:M$m}@} != "" +.if ${_debug.autodep} .info ${_DEPENDFILE:S,${SRCTOP}/,,} update=${UPDATE_DEPENDFILE} .endif @@ -111,7 +109,7 @@ WANT_UPDATE_DEPENDFILE ?= yes UPDATE_DEPENDFILE = no .endif -.if ${DEBUG_AUTODEP:Uno:@m@${RELDIR:M$m}@} != "" +.if ${_debug.autodep} .info ${_DEPENDFILE:S,${SRCTOP}/,,} update=${UPDATE_DEPENDFILE} .endif @@ -207,7 +205,7 @@ CAT_DEPEND = /dev/null _depend = .endif -.if ${DEBUG_AUTODEP:Uno:@m@${RELDIR:M$m}@} != "" +.if ${_debug.autodep} .info ${_DEPENDFILE:S,${SRCTOP}/,,} _depend=${_depend} .endif @@ -253,19 +251,33 @@ _gendirdeps_mutex = ${GENDIRDEPS_MUTEXER} ${GENDIRDEPS_MUTEX:U${_CURDIR}/Makefil # but we need to behave as if we did. # Avoid adding glob patterns to .MAKE.META.CREATED though. .MAKE.META.CREATED += ${META_XTRAS:N*\**:O:u} - -.if make(gendirdeps) -META_FILES = *.meta -.elif ${OPTIMIZE_OBJECT_META_FILES:Uno:tl} == "no" -META_FILES = ${.MAKE.META.FILES:T:N.depend*:O:u} +OPTIMIZE_OBJECT_META_FILES ?= no + +.if ${OPTIMIZE_OBJECT_META_FILES} == "yes" +# If we have lots of .o.meta, ${PICO}.meta etc we need only look at one set. +# If META_FILE_OBJ_FILTER is not already set, we default it to a +# .SUFFIX which matches the first *o.meta. +# There is no guarantee it will be just .o or .So etc, +META_FILE_OBJ_FILTER ?= \ + ${.SUFFIXES:M*o:@o@${"${.MAKE.META.FILES:T:M*$o.meta:[1]}":?M*$o.meta:}@:[1]} +.endif + +# parent may have set META_FILE_OBJ_FILTER +.if ${OPTIMIZE_OBJECT_META_FILES} == "yes" || !empty(META_FILE_OBJ_FILTER) +META_FILES = \ + ${.MAKE.META.FILES:N.depend*:N*o.meta} \ + ${.MAKE.META.FILES:${META_FILE_OBJ_FILTER}} .else -# if we have 1000's of .o.meta, ${PICO}.meta etc we need only look at one set -# it is left as an exercise for the reader to work out what this does -META_FILES = ${.MAKE.META.FILES:T:N.depend*:N*o.meta:O:u} \ - ${.MAKE.META.FILES:T:M*.${.MAKE.META.FILES:M*o.meta:R:E:O:u:[1]}.meta:O:u} +META_FILES = ${.MAKE.META.FILES:N.depend*} .endif +# ensure this is not empty (this will sort after any M and N +# we use S,${_OBJDIR}/,, rather than :T since some makefiles have +# objects in subdirs +META_FILE_FILTER += S,${_OBJDIR}/,,:O:u +# we have to defer evaluation until the target script runs +GENDIRDEPS_ENV += META_FILES="${META_FILES:${META_FILE_FILTER:O:u:ts:}}}" -.if ${DEBUG_AUTODEP:Uno:@m@${RELDIR:M$m}@} != "" +.if ${_debug.autodep} .info ${_DEPENDFILE:S,${SRCTOP}/,,}: ${_depend} ${.PARSEDIR}/gendirdeps.mk ${META2DEPS} xtras=${META_XTRAS} .endif @@ -276,20 +288,29 @@ META_FILES = ${.MAKE.META.FILES:T:N.depend*:N*o.meta:O:u} \ .if !empty(GENDIRDEPS_FILTER) .export GENDIRDEPS_FILTER .endif -# export to avoid blowing command line limit -META_FILES := ${META_XTRAS:U:O:u} ${META_FILES:U:T:O:u:${META_FILE_FILTER:ts:}} -.export META_FILES .endif +_this_dir := ${_PARSEDIR} +.if ${MAKE_VERSION} < 20230123 # we might have .../ in MAKESYSPATH -_makesyspath:= ${_PARSEDIR} +_makesyspath := ${MAKESYSPATH:U${_this_dir}} +.if ${.MAKEFLAGS:M-m} != "" +_makesyspath := ${.MAKEFLAGS:S,-m ,-m,gW:M-m*:S,-m, ,:ts:}:${_makesyspath} +.endif +_makesyspath := ${_makesyspath:C,\.\.\./[^:]*,${_this_dir},} +GENDIRDEPS_ENV += MAKESYSPATH=${_makesyspath} +.else +# add this if not already there +.SYSPATH: ${_this_dir} +GENDIRDEPS_ENV += MAKESYSPATH=${.SYSPATH:ts:} +.endif + ${_DEPENDFILE}: ${_depend} ${.PARSEDIR}/gendirdeps.mk ${META2DEPS} $${.MAKE.META.CREATED} @echo Checking $@: ${.OODATE:T:[1..8]} @(cd . && ${GENDIRDEPS_ENV} \ SKIP_GENDIRDEPS='${SKIP_GENDIRDEPS:O:u}' \ DPADD='${FORCE_DPADD:O:u}' ${_gendirdeps_mutex} \ - MAKESYSPATH=${_makesyspath} \ - ${.MAKE} -f gendirdeps.mk RELDIR=${RELDIR} _DEPENDFILE=${_DEPENDFILE}) + ${.MAKE} -B -f gendirdeps.mk RELDIR=${RELDIR} _DEPENDFILE=${_DEPENDFILE}) @test -s $@ && touch $@; : .endif diff --git a/share/mk/meta.stage.mk b/share/mk/meta.stage.mk index 345df6aae16b..b4d1ea4d6773 100644 --- a/share/mk/meta.stage.mk +++ b/share/mk/meta.stage.mk @@ -1,15 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause +# $Id: meta.stage.mk,v 1.75 2025/12/08 17:44:57 sjg Exp $ # -# $Id: meta.stage.mk,v 1.69 2024/02/17 17:26:57 sjg Exp $ +# @(#) Copyright (c) 2011-2025, Simon J. Gerraty # -# @(#) Copyright (c) 2011-2017, Simon J. Gerraty -# -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net @@ -38,12 +31,14 @@ CLEANFILES+= .dirdep @echo '${_dirdep}' > $@ .endif -.if defined(NO_POSIX_SHELL) || ${type printf:L:sh:Mbuiltin} == "" -_stage_file_basename = `basename $$f` -_stage_target_dirname = `dirname $$t` -.else +.if ${isPOSIX_SHELL:U:Nfalse} _stage_file_basename = $${f\#\#*/} +_stage_file_dirname = $${f%/*} _stage_target_dirname = $${t%/*} +.else +_stage_file_basename = `basename $$f` +_stage_file_dirname = `dirname $$f` +_stage_target_dirname = `dirname $$t` .endif _OBJROOT ?= ${OBJROOT:U${OBJTOP:H}} @@ -86,22 +81,37 @@ STAGE_DIRDEP_SCRIPT = ${LN_CP_SCRIPT}; StageDirdep() { \ if [ -s $$t.dirdep ]; then \ cmp -s .dirdep $$t.dirdep && return; \ x=`cat $$t.dirdep`; \ - case "${RELDIR}:${_dirdep}" in $${x%.*}:$${x}*) ;; \ + case "${RELDIR}:${_dirdep}" in \ + $${x%.*}:$${x}*) ;; \ *) echo "${STAGE_CONFLICT}: $$t installed by $$x not ${_dirdep}" >&2; \ - ${STAGE_CONFLICT_ACTION} ;; esac; \ + ${STAGE_CONFLICT_ACTION} ;; \ + esac; \ fi; \ LnCp .dirdep $$t.dirdep || exit 1; } # common logic for staging files # this all relies on RELDIR being set to a subdir of SRCTOP # we use ln(1) if we can, else cp(1) +# if --subdir is given the dirname part of each file will be preserved STAGE_FILE_SCRIPT = ${STAGE_DIRDEP_SCRIPT}; StageFiles() { \ - case "$$1" in "") return;; -m) mode=$$2; shift 2;; *) mode=;; esac; \ + mode= subdir=; \ + while : ; do \ + case "$$1" in \ + "") return;; \ + -m) mode=$$2; shift 2;; \ + --subdir) subdir=1; shift;; \ + *) break;; \ + esac; \ + done; \ dest=$$1; shift; \ mkdir -p $$dest; \ [ -s .dirdep ] || echo '${_dirdep}' > .dirdep; \ for f in "$$@"; do \ - case "$$f" in */*) t=$$dest/${_stage_file_basename};; *) t=$$dest/$$f;; esac; \ + case "$$subdir,$$f" in \ + 1,*/*) t=$$dest/$$f; mkdir -p $$dest/${_stage_file_dirname};; \ + */*) t=$$dest/${_stage_file_basename};; \ + *) t=$$dest/$$f;; \ + esac; \ StageDirdep $$t; \ LnCp $$f $$t || exit 1; \ [ -z "$$mode" ] || chmod $$mode $$t; \ diff --git a/share/mk/meta.subdir.mk b/share/mk/meta.subdir.mk index aee8a1a9a39b..a1c2b66f2f9d 100644 --- a/share/mk/meta.subdir.mk +++ b/share/mk/meta.subdir.mk @@ -1,16 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: meta.subdir.mk,v 1.15 2024/04/19 15:10:22 sjg Exp $ - +# $Id: meta.subdir.mk,v 1.16 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2010, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/share/mk/meta.sys.mk b/share/mk/meta.sys.mk index 1104204dc8c9..c5fcdaa801e4 100644 --- a/share/mk/meta.sys.mk +++ b/share/mk/meta.sys.mk @@ -1,16 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: meta.sys.mk,v 1.56 2024/11/22 23:51:48 sjg Exp $ - +# $Id: meta.sys.mk,v 1.57 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2010-2023, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/share/mk/meta2deps.py b/share/mk/meta2deps.py index 44c752d0e7eb..77ed86397a0f 100755 --- a/share/mk/meta2deps.py +++ b/share/mk/meta2deps.py @@ -39,9 +39,9 @@ We only pay attention to a subset of the information in the SPDX-License-Identifier: BSD-2-Clause RCSid: - $Id: meta2deps.py,v 1.50 2024/09/27 00:08:36 sjg Exp $ + $Id: meta2deps.py,v 1.54 2025/07/24 16:05:48 sjg Exp $ - Copyright (c) 2011-2020, Simon J. Gerraty + Copyright (c) 2011-2025, Simon J. Gerraty Copyright (c) 2011-2017, Juniper Networks, Inc. All rights reserved. @@ -441,7 +441,7 @@ class MetaFile: # Bye bye We go to some effort to avoid processing a dependency more than once. - Of the above record types only C,E,F,L,R,V and W are of interest. + Of the above record types only C,E,F,L,M,R,V,W and X are of interest. """ version = 0 # unknown @@ -465,8 +465,8 @@ class MetaFile: if self.sb and self.name.startswith(self.sb): error_name = self.name.replace(self.sb+'/','') else: - error_name = self.name - interesting = '#CEFLRVX' + error_name = self.name + interesting = '#CEFLMRVX' for line in f: self.line += 1 # ignore anything we don't care about @@ -475,6 +475,7 @@ class MetaFile: if self.debug > 2: print("input:", line, end=' ', file=self.debug_out) w = line.split() + wlen = len(w) if skip: if w[0] == 'V': @@ -498,6 +499,23 @@ class MetaFile: if line.find('Bye') > 0: eof_token = True continue + else: + # before we go further check we have a sane number of args + # the Linux filemon module is rather unreliable. + if w[0] in 'LM': + elen = 4 + elif w[0] == 'X': + # at least V4 on Linux does 3 args + if wlen == 3: + elen = 3 + else: + elen = 4 + else: + elen = 3 + if self.debug > 2: + print('op={} elen={} wlen={} line="{}"'.format(w[0], elen, wlen, line.strip()), file=self.debug_out) + if wlen != elen: + raise AssertionError('corrupted filemon data: wrong number of words: expected {} got {} in: {}'.format(elen, wlen, line)) pid = int(w[1]) if pid != last_pid: @@ -540,11 +558,11 @@ class MetaFile: print("seen:", w[2], file=self.debug_out) continue # file operations - if w[0] in 'ML': + if w[0] in 'LM': # these are special, tread src as read and # target as write - self.parse_path(w[2].strip("'"), cwd, 'R', w) self.parse_path(w[3].strip("'"), cwd, 'W', w) + self.parse_path(w[2].strip("'"), cwd, 'R', w) continue elif w[0] in 'ERWS': path = w[2] @@ -611,9 +629,19 @@ class MetaFile: return # we don't want to resolve the last component if it is # a symlink - path = resolve(path, cwd, self.last_dir, self.debug, self.debug_out) - if not path: - return + npath = resolve(path, cwd, self.last_dir, self.debug, self.debug_out) + if not npath: + if len(w) > 3 and w[0] in 'ML' and op == 'R' and path.startswith('../'): + # we already resolved the target of the M/L + # so it makes sense to try and resolve relative to that dir. + if os.path.isdir(self.last_path): + dir = self.last_path + else: + dir,junk = os.path.split(self.last_path) + npath = resolve(path, cwd, dir, self.debug, self.debug_out) + if not npath: + return + path = npath dir,base = os.path.split(path) if dir in self.seen: if self.debug > 2: @@ -631,6 +659,7 @@ class MetaFile: rdir = None # now put path back together path = '/'.join([dir,base]) + self.last_path = path if self.debug > 1: print("raw=%s rdir=%s dir=%s path=%s" % (w[2], rdir, dir, path), file=self.debug_out) if op in 'RWS': diff --git a/share/mk/meta2deps.sh b/share/mk/meta2deps.sh index 4c1b674f7b63..293ebdab6e7c 100755 --- a/share/mk/meta2deps.sh +++ b/share/mk/meta2deps.sh @@ -49,8 +49,10 @@ # The output, is a set of absolute paths with "SB" like: #.nf # +# $SB/obj-i386/bsd/gnu/lib/csu +# $SB/obj-i386/bsd/gnu/lib/libgcc # $SB/obj-i386/bsd/include -# $SB/obj-i386/bsd/lib/csu/i386 +# $SB/obj-i386/bsd/lib/csu/i386-elf # $SB/obj-i386/bsd/lib/libc # $SB/src/bsd/include # $SB/src/bsd/sys/i386/include @@ -75,10 +77,11 @@ # RCSid: -# $Id: meta2deps.sh,v 1.21 2024/02/17 17:26:57 sjg Exp $ +# $Id: meta2deps.sh,v 1.26 2025/12/08 17:34:02 sjg Exp $ # SPDX-License-Identifier: BSD-2-Clause # +# Copyright (c) 2011-2025, Simon J. Gerraty # Copyright (c) 2010-2013, Juniper Networks, Inc. # All rights reserved. # @@ -103,6 +106,10 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +case ",$DEBUG_SH," in +*,meta2deps*) set -x;; +esac + meta2src() { cat /dev/null "$@" | sed -n '/^R .*\.[chyl]$/s,^..[0-9]* ,,p' | @@ -248,13 +255,31 @@ meta2deps() { ;; *) cat /dev/null "$@";; esac 2> /dev/null | - sed -e 's,^CWD,C C,;/^[#CREFLMVX] /!d' -e "s,',,g" | + sed -e 's,^CWD,C C,;/^[#CREFLMVWX] /!d' -e "s,',,g" | $_excludes | ( version=no epids= xpids= eof_token=no - while read op pid path junk + while read op pid path path2 do - : op=$op pid=$pid path=$path + : op=$op pid=$pid path=$path path2=$path2 + # first a sanity check - filemon on Linux is not very reliable + # path2 should only be non-empty for op L or M + # and it should not contain spaces. + # It will also be non-empty for # Meta line + # which tells us which meta_file we are processing + case "$op,$path2" in + \#*,*.meta) # new file, reset some vars + version=no epids= xpids= eof_token=no lpid= + meta_file=`set -- $path2; echo $2` + continue + ;; + \#*) ;; # ok + [LM],) error "missing path2 in: '$op $pid $path'";; + [LMX],*" "*) error "wrong number of words in: '$op $pid $path $path2'";; + *,|[LMX],*) ;; # ok + *) error "wrong number of words in: '$op $pid $path $path2'";; + esac # we track cwd and ldir (of interest) per pid # CWD is bmake's cwd + : lpid=$lpid,pid=$pid case "$lpid,$pid" in ,C) CWD=$path cwd=$path ldir=$path if [ -z "$SB" ]; then @@ -263,13 +288,13 @@ meta2deps() { SRCTOP=${SRCTOP:-$SB/src} case "$verion" in no) ;; # ignore - 0) error "no filemon data";; + 0) error "no filemon data: $meta_file";; *) ;; esac version=0 case "$eof_token" in no) ;; # ignore - 0) error "truncated filemon data";; + 0) error "truncated filemon data: $meta_file";; esac eof_token=0 continue @@ -319,9 +344,14 @@ meta2deps() { $src_re|$obj_re) ;; /*/stage/*) ;; /*) continue;; - *) for path in $ldir/$path $cwd/$path + *) + rlist="$ldir/$path $cwd/$path" + case "$op,$path" in + [ML],../*) rlist="$rlist $path2/$path `dirname $path2`/$path";; + esac + for path in $rlist do - test -e $path && break + test -e $path && break done dir=${path%/*} ;; @@ -406,18 +436,18 @@ meta2deps() { done > $tf.dirdep : version=$version case "$version" in - 0) error "no filemon data";; + 0) error "no filemon data: $meta_file";; esac : eof_token=$eof_token case "$eof_token" in - 0) error "truncated filemon data";; + 0) error "truncated filemon data: $meta_file";; esac for p in $epids do : p=$p case " $xpids " in *" $p "*) ;; - *) error "missing eXit for pid $p";; + *) error "missing eXit for pid $p: $meta_file";; esac done ) || exit 1 _nl=echo diff --git a/share/mk/stage-install.sh b/share/mk/stage-install.sh index d9182e32feff..b6ab4abc8201 100755 --- a/share/mk/stage-install.sh +++ b/share/mk/stage-install.sh @@ -37,18 +37,13 @@ # # RCSid: -# $Id: stage-install.sh,v 1.11 2024/02/17 17:26:57 sjg Exp $ +# $Id: stage-install.sh,v 1.12 2025/08/09 22:42:24 sjg Exp $ # # SPDX-License-Identifier: BSD-2-Clause # # @(#) Copyright (c) 2013-2020, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/share/mk/sys.dependfile.mk b/share/mk/sys.dependfile.mk index 3c13b1c92bff..84c5c898b6af 100644 --- a/share/mk/sys.dependfile.mk +++ b/share/mk/sys.dependfile.mk @@ -1,15 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: sys.dependfile.mk,v 1.11 2024/02/17 17:26:57 sjg Exp $ +# $Id: sys.dependfile.mk,v 1.12 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2012-2023, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/share/mk/sys.dirdeps.mk b/share/mk/sys.dirdeps.mk index 4d2dfa8416fa..66b7f900697c 100644 --- a/share/mk/sys.dirdeps.mk +++ b/share/mk/sys.dirdeps.mk @@ -1,15 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: sys.dirdeps.mk,v 1.15 2024/04/18 17:18:31 sjg Exp $ +# $Id: sys.dirdeps.mk,v 1.16 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2012-2023, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/share/mk/sys.mk b/share/mk/sys.mk index 26f31c104088..bb943d2b1519 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -314,6 +314,9 @@ __MAKE_SHELL?=/bin/sh path=${__MAKE_SHELL} .endif +# We expect .SHELL to be POSIX +isPOSIX_SHELL?= : + # Hack for ports compatibility. Historically, ports makefiles have # assumed they can examine MACHINE_CPU without including anything # because this was automatically included in sys.mk. For /usr/src, From nobody Wed Dec 10 10:58:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRCP96xfPz6KNLt for ; Wed, 10 Dec 2025 10:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRCP9650jz3mJ0 for ; Wed, 10 Dec 2025 10:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765364285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zIEtszgP43pNumvaN9QhIyelikQET3jYm2u3jnzJbOc=; b=lD1rUAluBFDXZ9eFcBI8MVfU+LuAxV4Shzkhg24VS/3sOtJ595TJA7pum3jT1Jf8xEoBwK Sryz98d/nl83B7jfy93QKaVrgpNelI08tjuMpW/JSphCQLnz+uYEgphlqlyKgozXAcM336 FcqiBy9wMJauAAjJHJ8zWgSXyMrqLIefZwPNCszbnlRZl7l8KDyE8CHxCv3Elxi3F6xdox S4hxtv8Fbb/GVM8UL1qgzpzRXkDAdWiK+i0Sx4ZR3hlN9Uf5RrjQxPF9NZ2WDUHYu9r37p rTMxC0qaHxTXamKXXz4k5G4M9aT5UioHwJVUP/N9Z7kJ0GcoKHfCFcAC9Iasig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765364285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zIEtszgP43pNumvaN9QhIyelikQET3jYm2u3jnzJbOc=; b=VYa8ilL7oxdD6kkpu+wzcztJenQOe6qNv4LuUWSQhtVOVHNBJm3JJz7dVrtAtc+UpcBlf8 C96lHqmalc4RbHTbT5O2aBCkG3X6zBWF6P/b52k7iQZGt1lk4owUSGtTe0h5dpxGKSEkk/ nzQFkgSTpdSa1X+Y/MZOanJ12VtYOirx23hshkpiAIe7zb+akuqZk9BxHZseNuBbJ7IQ5z aSP3r0c9ayjXjFJ3hUWE313C6rtyl3qFtEJMQJvXM/lIhT0do4IeabylCwMjvLU4mIWc0V f1li0hWbEBFQrzS6RJcfhmKhRcTbCZ3JrA+WY3DBh1ZY5OADT+0duzBEOmRrnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765364285; a=rsa-sha256; cv=none; b=qcdqrirZweOXjIZDH0dXU1X/WrLhruECH1oL/MRRezW1odeo8HAHGeARbAmSDBboTKrYuO p7F3iFWvYUUQKT7urStTqDminCvzyz7yo6msyxyfaZMshOxb/sfDE9SpHYNBFBlMaaD87i dvIAxL3ykXtAKe7h0oADuuqnrF6Tc02Op08sAdBKfqI+QXaTPWphOeBqTIfYNFbkI9Xf9g aTGRWlaRmkQp67kk6TTbomWCKQZBY4yWcJuLzFkvVHGwb2qYbcyvewWYHxtjzC1HzjcXbe +kFfdWf/aVwOkfIUxw8hmYq9a8sBlPPCrvGfE3GYH4zNIAe5Mas1uk86tTKwgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRCP95HhDzjNy for ; Wed, 10 Dec 2025 10:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8560 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 10:58:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: ac79e2e025e0 - main - get*ent: be consistant about _ALIGN(p) - p List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: ac79e2e025e03b7038e3abc886e34a03f5ec2934 Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 10:58:05 +0000 Message-Id: <6939523d.8560.71c378b7@gitrepo.freebsd.org> The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=ac79e2e025e03b7038e3abc886e34a03f5ec2934 commit ac79e2e025e03b7038e3abc886e34a03f5ec2934 Author: Brooks Davis AuthorDate: 2025-12-10 10:57:34 +0000 Commit: Brooks Davis CommitDate: 2025-12-10 10:57:34 +0000 get*ent: be consistant about _ALIGN(p) - p Add an nscache specific inline function to calculate the misalignment rather than adding and subtracting _ALIGN(p) and p which can take the buffer far out of bound (undefined behavior in C and unsupported on CHERI). Reviewed by: kib Effort: CHERI upstreaming Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D53945 --- lib/libc/gen/getgrent.c | 6 +++--- lib/libc/include/nscache.h | 8 ++++++++ lib/libc/net/gethostnamadr.c | 4 ++-- lib/libc/net/getnetnamadr.c | 4 ++-- lib/libc/net/getprotoent.c | 4 ++-- lib/libc/net/getservent.c | 4 ++-- lib/libc/rpc/getrpcent.c | 4 ++-- 7 files changed, 21 insertions(+), 13 deletions(-) diff --git a/lib/libc/gen/getgrent.c b/lib/libc/gen/getgrent.c index 508e3d63eb60..8819708556b9 100644 --- a/lib/libc/gen/getgrent.c +++ b/lib/libc/gen/getgrent.c @@ -347,16 +347,16 @@ grp_unmarshal_func(char *buffer, size_t buffer_size, void *retval, va_list ap, memcpy(&p, buffer + sizeof(struct group), sizeof(char *)); if (orig_buf_size + sizeof(struct group) + sizeof(char *) + - _ALIGN(p) - (size_t)p < buffer_size) { + __nss_buf_misalignment(p) < buffer_size) { *ret_errno = ERANGE; return (NS_RETURN); } orig_buf = (char *)_ALIGN(orig_buf); memcpy(orig_buf, buffer + sizeof(struct group) + sizeof(char *) + - _ALIGN(p) - (size_t)p, + __nss_buf_misalignment(p), buffer_size - sizeof(struct group) - sizeof(char *) - - _ALIGN(p) + (size_t)p); + __nss_buf_misalignment(p)); p = (char *)_ALIGN(p); NS_APPLY_OFFSET(grp->gr_name, orig_buf, p, char *); diff --git a/lib/libc/include/nscache.h b/lib/libc/include/nscache.h index aab29e411ddc..5932d103a4da 100644 --- a/lib/libc/include/nscache.h +++ b/lib/libc/include/nscache.h @@ -29,6 +29,8 @@ #ifndef __NS_CACHE_H__ #define __NS_CACHE_H__ +#include + #include "nscachedcli.h" typedef int (*nss_cache_id_func_t)(char *, size_t *, va_list, void *); @@ -178,6 +180,12 @@ typedef struct _nss_cache_data { } nss_cache_data; __BEGIN_DECLS +static inline __ptrdiff_t +__nss_buf_misalignment(const void *p) +{ + return ((char *)_ALIGN(p) - (char *)p); +} + /* dummy function, which is needed to make nss_method_lookup happy */ extern int __nss_cache_handler(void *, void *, va_list); diff --git a/lib/libc/net/gethostnamadr.c b/lib/libc/net/gethostnamadr.c index b54ca8b2998e..6a8648ac693d 100644 --- a/lib/libc/net/gethostnamadr.c +++ b/lib/libc/net/gethostnamadr.c @@ -402,9 +402,9 @@ host_unmarshal_func(char *buffer, size_t buffer_size, void *retval, va_list ap, orig_buf = (char *)_ALIGN(orig_buf); memcpy(orig_buf, buffer + sizeof(struct hostent) + sizeof(char *) + - _ALIGN(p) - (size_t)p, + __nss_buf_misalignment(p), buffer_size - sizeof(struct hostent) - sizeof(char *) - - _ALIGN(p) + (size_t)p); + __nss_buf_misalignment(p)); p = (char *)_ALIGN(p); NS_APPLY_OFFSET(ht->h_name, orig_buf, p, char *); diff --git a/lib/libc/net/getnetnamadr.c b/lib/libc/net/getnetnamadr.c index 660de3302606..b380912955e8 100644 --- a/lib/libc/net/getnetnamadr.c +++ b/lib/libc/net/getnetnamadr.c @@ -249,9 +249,9 @@ net_unmarshal_func(char *buffer, size_t buffer_size, void *retval, va_list ap, orig_buf = (char *)_ALIGN(orig_buf); memcpy(orig_buf, buffer + sizeof(struct netent) + sizeof(char *) + - _ALIGN(p) - (size_t)p, + __nss_buf_misalignment(p), buffer_size - sizeof(struct netent) - sizeof(char *) - - _ALIGN(p) + (size_t)p); + __nss_buf_misalignment(p)); p = (char *)_ALIGN(p); NS_APPLY_OFFSET(ne->n_name, orig_buf, p, char *); diff --git a/lib/libc/net/getprotoent.c b/lib/libc/net/getprotoent.c index 9fcbf41530cf..5f25333caff3 100644 --- a/lib/libc/net/getprotoent.c +++ b/lib/libc/net/getprotoent.c @@ -265,9 +265,9 @@ __proto_unmarshal_func(char *buffer, size_t buffer_size, void *retval, orig_buf = (char *)_ALIGN(orig_buf); memcpy(orig_buf, buffer + sizeof(struct protoent) + sizeof(char *) + - _ALIGN(p) - (size_t)p, + __nss_buf_misalignment(p), buffer_size - sizeof(struct protoent) - sizeof(char *) - - _ALIGN(p) + (size_t)p); + __nss_buf_misalignment(p)); p = (char *)_ALIGN(p); NS_APPLY_OFFSET(proto->p_name, orig_buf, p, char *); diff --git a/lib/libc/net/getservent.c b/lib/libc/net/getservent.c index 26f68f24cc78..1cf7921ac679 100644 --- a/lib/libc/net/getservent.c +++ b/lib/libc/net/getservent.c @@ -1084,9 +1084,9 @@ serv_unmarshal_func(char *buffer, size_t buffer_size, void *retval, va_list ap, orig_buf = (char *)_ALIGN(orig_buf); memcpy(orig_buf, buffer + sizeof(struct servent) + sizeof(char *) + - (_ALIGN(p) - (size_t)p), + __nss_buf_misalignment(p), buffer_size - sizeof(struct servent) - sizeof(char *) - - (_ALIGN(p) - (size_t)p)); + __nss_buf_misalignment(p)); p = (char *)_ALIGN(p); NS_APPLY_OFFSET(serv->s_name, orig_buf, p, char *); diff --git a/lib/libc/rpc/getrpcent.c b/lib/libc/rpc/getrpcent.c index ee36c11b303f..a6eaac7079a3 100644 --- a/lib/libc/rpc/getrpcent.c +++ b/lib/libc/rpc/getrpcent.c @@ -778,9 +778,9 @@ rpc_unmarshal_func(char *buffer, size_t buffer_size, void *retval, va_list ap, orig_buf = (char *)_ALIGN(orig_buf); memcpy(orig_buf, buffer + sizeof(struct rpcent) + sizeof(char *) + - _ALIGN(p) - (size_t)p, + __nss_buf_misalignment(p), buffer_size - sizeof(struct rpcent) - sizeof(char *) - - _ALIGN(p) + (size_t)p); + __nss_buf_misalignment(p)); p = (char *)_ALIGN(p); NS_APPLY_OFFSET(rpc->r_name, orig_buf, p, char *); From nobody Wed Dec 10 10:58:06 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRCPC0Q8hz6KNTf for ; Wed, 10 Dec 2025 10:58:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRCPB5yhyz3m4w for ; Wed, 10 Dec 2025 10:58:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765364286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IVWuih7CGWvJQ8gOwMOh9jHqmZT29xlaPkGLUiayR+Y=; b=cF4Ae+uoCxxSs7V+buUqa8qWYlYOzPFEFjV4p8DIA71bcFiHylQu4Kgx6buA6pPVtILIHO 8DL1keFi3+wi9fAazhxRojv+th0g9ZxKfWGROryETDdiQsDlCgOjACv2wYmSFGeDftMSfr PN2GScNosbi1SzFGwXXyeSbrw/m66eLG+93VdCI+0bhvYTCmfUOsP63YVM0rAE6TGGda+y M8BTPHPAzDNhBlPvW9sTlhzcJjoOKV3+iCK4BeBcDLdkBBQNFqpXIqgi0mkQtW38cssnmW xwVxWpRELURneomkfKTqo1QljqhkzaCZuPKpQW3gZIOcoQOcgxXxqbIHZZctxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765364286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IVWuih7CGWvJQ8gOwMOh9jHqmZT29xlaPkGLUiayR+Y=; b=hzlj+AE8/guT5zXNx3uMXK7oihj7ky54pAbVX2qhFa35aE7S3oXw/VOm5qRUx4rDL5OD7U ZYIz/e7p0LCftzAAdVREj5Ye+3zAusc5GHGXMn6WQMQDXuxwoSDwLtBLbX2fsFT2zADIo6 sC/ueed27QkegYe3WPdh6N8di4p1L2LT5i1kz526Q7Kk7el+KVfz7mvtrm3mfHcIzcPVSx Rik5aaJilYVGIkftBx37bx8ujemLps/t2rliaDf19KWZJxDmic8yYmmGLRyfeTHG7fHlpJ ytGchvQr+hdOThfElY31b82C9mmVticrLIKJxtmDlNrktHcIvkaW9ysufjGlBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765364286; a=rsa-sha256; cv=none; b=Xc7YnZ3ILYokI7HWCBqusV3PFIXi1267d0/TInBYR2Ft9KvZ1wCLjYD/sakzoS5dG6K4Pq FnAg/RWcOnvzUMH2vqP4xCi5nCxsbaVW0ifOPzCMFVvJwNsWedNM5sxBPdpYOTouA0dfB0 M0Sj33j1ojrOAd6aRjnXtVMrYwy1k27q1E6SDNoHFXpWLcyxO2R+6OGmmBj6GZhy8LYG1Q KM68A4fNgJ62UC+bg6BpmcExESeJ1Hyajx3FhGLM2kwSzREhEAy02m04k9T4p50s1GHvcr cfeKqNfAtmp2v4tW0gH+7XKUdTKfmPv8qOgGXaWWeRIu7QCf1iSORgAgQQnTXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRCPB5R0Pzj2b for ; Wed, 10 Dec 2025 10:58:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 968e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 10:58:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: cfae62eac076 - main - libcasper: fix warnings when _ALIGN preserves types List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: cfae62eac076d43bc94c667084018a21ee8a305f Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 10:58:06 +0000 Message-Id: <6939523e.968e.3db17379@gitrepo.freebsd.org> The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=cfae62eac076d43bc94c667084018a21ee8a305f commit cfae62eac076d43bc94c667084018a21ee8a305f Author: Brooks Davis AuthorDate: 2025-12-10 10:57:45 +0000 Commit: Brooks Davis CommitDate: 2025-12-10 10:57:45 +0000 libcasper: fix warnings when _ALIGN preserves types Without the void * casts, the compiler complains about an alignment requirement increase. Reviewed by: kib, markj Obtained from: CheriBSD Effort: CHERI upstreaming Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D53946 --- lib/libcasper/services/cap_grp/cap_grp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libcasper/services/cap_grp/cap_grp.c b/lib/libcasper/services/cap_grp/cap_grp.c index 025ce00adf56..5c613292555e 100644 --- a/lib/libcasper/services/cap_grp/cap_grp.c +++ b/lib/libcasper/services/cap_grp/cap_grp.c @@ -102,7 +102,7 @@ group_unpack_members(const nvlist_t *nvl, char ***fieldp, char **bufferp, datasize = _ALIGNBYTES + sizeof(char *); if (datasize >= *bufsizep) return (ERANGE); - outstrs = (char **)_ALIGN(*bufferp); + outstrs = (char **)(void *)_ALIGN(*bufferp); outstrs[0] = NULL; *fieldp = outstrs; *bufferp += datasize; @@ -124,7 +124,7 @@ group_unpack_members(const nvlist_t *nvl, char ***fieldp, char **bufferp, if (datasize >= *bufsizep) return (ERANGE); - outstrs = (char **)_ALIGN(*bufferp); + outstrs = (char **)(void *)_ALIGN(*bufferp); str = (char *)outstrs + sizeof(char *) * (nmem + 1); for (ii = 0; ii < nmem; ii++) { n = snprintf(nvlname, sizeof(nvlname), "gr_mem[%u]", ii); From nobody Wed Dec 10 10:58:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRCPD1fV7z6KNTg for ; Wed, 10 Dec 2025 10:58:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRCPC6Sxfz3mFt for ; Wed, 10 Dec 2025 10:58:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765364287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aR0YiGqaXnYTD0Tu731aFOtzQk1VyazyMHyF7x70vJ0=; b=oLS5lKyeamDCtt7GZUaHO3jS/c7bbN+xO0PUYso9Lpj4BBYvuu6DhdfYUuEuA9ZQBeyoDM gYmzhQxbSrP7ubZTkFpOa81r46osB5WnTAluWM+xy1yU4kHJvQSZ0RIsHVLLelGXhpcV5Y H1e3lIV/+Ew8OBTx6rNVuR25V4jbt16Gz/rB72YoR8QTipQEmWYWIDRaBoCWCXlCZiEPuE 8IskuWx+ccERuvESBMUJ6Ffd7HliE5kOuPDlS/3TqMkw53Af3Z2kS/v4+boh8xlT9Clifr t0K+3LRHYeIbrFpYmLwIZz0mPAIZCcPtBr2Rqgk/biue7u/mYYPGSfnrlWIQnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765364287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aR0YiGqaXnYTD0Tu731aFOtzQk1VyazyMHyF7x70vJ0=; b=nEzI65J2OiiFtu+qTydy1QXn+T306YKyGGsOwHdFs7gBMZ+55PMU4x+sh8uRC72163W5RO hk5+4ShEVRchQ87BMUJ2ziN46hpnGbhARag+rlxgjXOxoKxWL4vLiHzKa/Q1VgFXdtyQgt t8Xcwthc6AQK3uir/+vw47qM1APsrPdhIjUukMjmKeHOjgA3oSFnQQePuQ4kVN6wJLFQhP axlYeFPAhLHe2wBdkJ6HjIqlskLovA/BCjPHS7oh1ahYuuH0zKjKR/hPriwOmVVSR8R+/i jczZVzV7xN1hP4M7EU2GiiBQXpo9G7x0wcNwiFSgbKLyys9R+SOOnEktAh3Irw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765364287; a=rsa-sha256; cv=none; b=tzLrMffqKLrmwdjupdr5Lh95P1yKMm4UKNATl1Zhnuo/dqanPAptxLcIOzGeDlatibRjmg xzjUoWa/Simo3zs5+t0uUnWAG/tFoT6LiTzBmn9sKW3aN0y3vQolLiZxPbYK5/RlzfZKp1 ZVCenqgfHOs01P+jFtDBld6dYv+dxTVdKfIly9zKOgrdhr66elphXJARZm/DJgs4SxPspk ewJuI2OG8mB5sSJV5YQgiu/8Vk72aBtiFmqcdan5vK4rXIznwTY8/dRt+Db9EZsQQXlzxj bws2znmHgc3aZsIdN8441mfS9D0qxubI8jAysEEk5q8H4CZNuo1TFRfGZ1jLjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRCPC63HqzjTS for ; Wed, 10 Dec 2025 10:58:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8b3e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 10:58:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 80203a27e964 - main - Add sys/_align.h replacing machine/_align.h List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 80203a27e964403d1d23907089f5c57c60a15c04 Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 10:58:07 +0000 Message-Id: <6939523f.8b3e.3debe545@gitrepo.freebsd.org> The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=80203a27e964403d1d23907089f5c57c60a15c04 commit 80203a27e964403d1d23907089f5c57c60a15c04 Author: Brooks Davis AuthorDate: 2025-12-10 10:55:28 +0000 Commit: Brooks Davis CommitDate: 2025-12-10 10:57:50 +0000 Add sys/_align.h replacing machine/_align.h Define _ALIGNBYTES using sizeof(void *) (no functional change on any existing architecture) which will allow it to work with CHERI were we must align things up to capability alignment. In _ALIGN, replace integer manipulation which does not preserve pointer provenance with a type and provenance preserving builtin. This requires modest changes in code which assumes _ALIGN returns an integer, but those are relatively rare. Reviewed by: kib, markj Effort: CHERI upstreaming Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D53947 --- include/arm/Makefile | 3 +-- sys/amd64/include/_align.h | 5 ----- sys/amd64/include/param.h | 2 +- sys/arm/include/_align.h | 51 -------------------------------------------- sys/arm/include/param.h | 2 +- sys/arm64/include/_align.h | 47 ---------------------------------------- sys/arm64/include/param.h | 2 +- sys/i386/include/_align.h | 5 ----- sys/i386/include/param.h | 2 +- sys/powerpc/include/_align.h | 51 -------------------------------------------- sys/powerpc/include/param.h | 2 +- sys/riscv/include/_align.h | 41 ----------------------------------- sys/riscv/include/param.h | 2 +- sys/sys/_align.h | 32 +++++++++++++++++++++++++++ sys/sys/socket.h | 2 +- sys/x86/include/_align.h | 51 -------------------------------------------- 16 files changed, 40 insertions(+), 260 deletions(-) diff --git a/include/arm/Makefile b/include/arm/Makefile index 27fa8dfb9de3..3e7d73fd911f 100644 --- a/include/arm/Makefile +++ b/include/arm/Makefile @@ -2,8 +2,7 @@ .PATH: ${SRCTOP}/sys/arm/include ${SRCTOP}/lib/msun/arm -INCS= _align.h \ - _inttypes.h \ +INCS= _inttypes.h \ _limits.h \ _stdint.h \ _types.h \ diff --git a/sys/amd64/include/_align.h b/sys/amd64/include/_align.h deleted file mode 100644 index 506bc3c9e7f3..000000000000 --- a/sys/amd64/include/_align.h +++ /dev/null @@ -1,5 +0,0 @@ -/*- - * This file is in the public domain. - */ - -#include diff --git a/sys/amd64/include/param.h b/sys/amd64/include/param.h index 0654bb9de790..642a031d8841 100644 --- a/sys/amd64/include/param.h +++ b/sys/amd64/include/param.h @@ -41,7 +41,7 @@ #ifndef _AMD64_INCLUDE_PARAM_H_ #define _AMD64_INCLUDE_PARAM_H_ -#include +#include /* * Machine dependent constants for AMD64. diff --git a/sys/arm/include/_align.h b/sys/arm/include/_align.h deleted file mode 100644 index 1088c2363e9a..000000000000 --- a/sys/arm/include/_align.h +++ /dev/null @@ -1,51 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * Copyright (c) 2001 David E. O'Brien - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * William Jolitz. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef _ARM_INCLUDE__ALIGN_H_ -#define _ARM_INCLUDE__ALIGN_H_ - -/* - * Round p (pointer or byte index) up to the hardware-required alignment which - * is sufficient for any data type, pointer or numeric. The resulting type - * is equivelent to arm's uintptr_t (but is purposely spelled "unsigned" here). - */ -#define _ALIGNBYTES (sizeof(int) - 1) -#define _ALIGN(p) (((unsigned)(p) + _ALIGNBYTES) & ~_ALIGNBYTES) - -#endif /* !_ARM_INCLUDE__ALIGN_H_ */ diff --git a/sys/arm/include/param.h b/sys/arm/include/param.h index 79c9bc09c284..fa9737608038 100644 --- a/sys/arm/include/param.h +++ b/sys/arm/include/param.h @@ -44,7 +44,7 @@ * Machine dependent constants for StrongARM */ -#include +#include #define STACKALIGNBYTES (8 - 1) #define STACKALIGN(p) ((u_int)(p) & ~STACKALIGNBYTES) diff --git a/sys/arm64/include/_align.h b/sys/arm64/include/_align.h deleted file mode 100644 index b88200e21636..000000000000 --- a/sys/arm64/include/_align.h +++ /dev/null @@ -1,47 +0,0 @@ -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * William Jolitz. - * - * 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 REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifdef __arm__ -#include -#else /* !__arm__ */ - -#ifndef _MACHINE__ALIGN_H_ -#define _MACHINE__ALIGN_H_ - -/* - * Round p (pointer or byte index) up to a correctly-aligned value - * for all data types (int, long, ...). The result is unsigned int - * and must be cast to any desired pointer type. - */ -#define _ALIGNBYTES (sizeof(long long) - 1) -#define _ALIGN(p) (((u_long)(p) + _ALIGNBYTES) & ~_ALIGNBYTES) - -#endif /* !_MACHINE__ALIGN_H_ */ - -#endif /* !__arm__ */ diff --git a/sys/arm64/include/param.h b/sys/arm64/include/param.h index 753035b7775e..f3cdd4e44bc0 100644 --- a/sys/arm64/include/param.h +++ b/sys/arm64/include/param.h @@ -38,7 +38,7 @@ * Machine dependent constants for arm64. */ -#include +#include #define STACKALIGNBYTES (16 - 1) #define STACKALIGN(p) ((uint64_t)(p) & ~STACKALIGNBYTES) diff --git a/sys/i386/include/_align.h b/sys/i386/include/_align.h deleted file mode 100644 index 506bc3c9e7f3..000000000000 --- a/sys/i386/include/_align.h +++ /dev/null @@ -1,5 +0,0 @@ -/*- - * This file is in the public domain. - */ - -#include diff --git a/sys/i386/include/param.h b/sys/i386/include/param.h index 657dbcd879bd..9e542038f345 100644 --- a/sys/i386/include/param.h +++ b/sys/i386/include/param.h @@ -35,7 +35,7 @@ #ifndef _I386_INCLUDE_PARAM_H_ #define _I386_INCLUDE_PARAM_H_ -#include +#include /* * Machine dependent constants for Intel 386. diff --git a/sys/powerpc/include/_align.h b/sys/powerpc/include/_align.h deleted file mode 100644 index 0a7b6039b087..000000000000 --- a/sys/powerpc/include/_align.h +++ /dev/null @@ -1,51 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * Copyright (c) 2001 David E. O'Brien - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * William Jolitz. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef _POWERPC_INCLUDE__ALIGN_H_ -#define _POWERPC_INCLUDE__ALIGN_H_ - -/* - * Round p (pointer or byte index) up to a correctly-aligned value - * for all data types (int, long, ...). The result is unsigned int - * and must be cast to any desired pointer type. - */ -#define _ALIGNBYTES (sizeof(register_t) - 1) -#define _ALIGN(p) (((uintptr_t)(p) + _ALIGNBYTES) & ~_ALIGNBYTES) - -#endif /* !_POWERPC_INCLUDE__ALIGN_H_ */ diff --git a/sys/powerpc/include/param.h b/sys/powerpc/include/param.h index e79e92f76ec2..a190f60c02cc 100644 --- a/sys/powerpc/include/param.h +++ b/sys/powerpc/include/param.h @@ -44,7 +44,7 @@ * Machine dependent constants for PowerPC */ -#include +#include #ifndef MACHINE #define MACHINE "powerpc" diff --git a/sys/riscv/include/_align.h b/sys/riscv/include/_align.h deleted file mode 100644 index c588625ce7f9..000000000000 --- a/sys/riscv/include/_align.h +++ /dev/null @@ -1,41 +0,0 @@ -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * William Jolitz. - * - * 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 REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef _MACHINE__ALIGN_H_ -#define _MACHINE__ALIGN_H_ - -/* - * Round p (pointer or byte index) up to a correctly-aligned value - * for all data types (int, long, ...). The result is unsigned int - * and must be cast to any desired pointer type. - */ -#define _ALIGNBYTES (sizeof(long long) - 1) -#define _ALIGN(p) (((u_long)(p) + _ALIGNBYTES) & ~_ALIGNBYTES) - -#endif /* !_MACHINE__ALIGN_H_ */ diff --git a/sys/riscv/include/param.h b/sys/riscv/include/param.h index 32b0c7a1e34b..471d8b354b82 100644 --- a/sys/riscv/include/param.h +++ b/sys/riscv/include/param.h @@ -34,7 +34,7 @@ * Machine dependent constants for RISC-V. */ -#include +#include #define STACKALIGNBYTES (16 - 1) #define STACKALIGN(p) ((uint64_t)(p) & ~STACKALIGNBYTES) diff --git a/sys/sys/_align.h b/sys/sys/_align.h new file mode 100644 index 000000000000..09444bc4afce --- /dev/null +++ b/sys/sys/_align.h @@ -0,0 +1,32 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2020 SRI International + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory (Department of Computer Science and + * Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the + * DARPA SSITH research programme. + */ +#ifndef _SYS__ALIGN_H_ +#define _SYS__ALIGN_H_ + +/* + * Round p up to the alignment of the largest, non-floating point, type + * that fits in a register. In practice this has always been the size + * of a pointer (but spelled in a wide varity of ways) and with CHERI + * that needs to remain true to support file descriptor passing within + * the kernel. + * + * Unlike historic implementations, _ALIGN macro preserves both the type + * and provenance of p. + * + * These interfaces are ambigiously defined and should be considred + * obsolete. New code that requires alignment adjustments should replace + * _ALIGNBYTES with alignof(appropriate type) and _ALIGN with + * __align_up(p, alignof(appropriate type)). + */ +#define _ALIGNBYTES (sizeof(void *) - 1) +#define _ALIGN(p) __align_up((p), _ALIGNBYTES + 1) + +#endif /* !_SYS__ALIGN_H_ */ diff --git a/sys/sys/socket.h b/sys/sys/socket.h index 76a1652644bd..25b6fce75b94 100644 --- a/sys/sys/socket.h +++ b/sys/sys/socket.h @@ -36,7 +36,7 @@ #include #include #include -#include +#include /* * Definitions related to sockets: types, address families, options. diff --git a/sys/x86/include/_align.h b/sys/x86/include/_align.h deleted file mode 100644 index dc2ff4f656f4..000000000000 --- a/sys/x86/include/_align.h +++ /dev/null @@ -1,51 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-4-Clause - * - * Copyright (c) 2001 David E. O'Brien - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * William Jolitz. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef _X86_INCLUDE__ALIGN_H_ -#define _X86_INCLUDE__ALIGN_H_ - -/* - * Round p (pointer or byte index) up to a correctly-aligned value - * for all data types (int, long, ...). The result is unsigned int - * and must be cast to any desired pointer type. - */ -#define _ALIGNBYTES (sizeof(__register_t) - 1) -#define _ALIGN(p) (((__uintptr_t)(p) + _ALIGNBYTES) & ~_ALIGNBYTES) - -#endif /* !_X86_INCLUDE__ALIGN_H_ */ From nobody Wed Dec 10 12:26:59 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRFN24DVNz6KTwj for ; Wed, 10 Dec 2025 12:27:14 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (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 4dRFN11TzYz3wJn for ; Wed, 10 Dec 2025 12:27:13 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.128.49 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4775ae77516so82285335e9.1 for ; Wed, 10 Dec 2025 04:27:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765369631; x=1765974431; 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=X8jbQneqsZSJOxCbcIRnhazWSSISuVPl0Qshd78NZGE=; b=km0prF2+rcJz+5s4I87P++Y+AyRY3xRCyyBl2ORK6b+ZJsgPFcgdn+6mCEFHjGdfnL aRHKQvfdS8F6EEfSb07SfQdvXk1pQ6OSW66FXX9zcHUBPZD5YQCu//pR0pOh+Af428Wk 2u88BjrhpYJbsy/eb/bAS9lTayrSz1EuvQFstXupPB+jO7AaXxWmwLAORF5KaHtoEANd XgkVi+qhn9tMM/o4bIv3aBEWjxzX3X+9Qnx9FfvF++GxyhDHX+ZSRvj0KYtsx3d/OZW9 aXQvTEThWXQ2XN38xB1VSV19c7AvtZLQ2ndnVEUYb74A8jYLS4jVGF+cSyixU8u1K/q5 3ILg== X-Forwarded-Encrypted: i=1; AJvYcCXsUYZ1gAzACVyQXs+A+PEPRHPvSIiyPL9tsIHKF3P/MOQFeseg8uDkgZgIZLA1kHY+HnuMB9jAUj4sTbJ/E3IifJsI/A==@freebsd.org X-Gm-Message-State: AOJu0YyLKNgKRujkZtbSG3vGvzSNe95VULwVPiAreU2QGZsZzpBcvi6v ZKJFK0xsaWcDgFHFkbojzTDpvO9GWeOsbg2yDR+/WdGAJH0RCz3DG0KfKKsnQsmFFS0+puzwpct bVcw7 X-Gm-Gg: ASbGncv/O8IUYps/famlKvIWHUQGX7C568bHI5lZq3/BqusrN8dYGdFfaBE+yVcVbaK ZbkQU5ElvxubjTAjjvmDVxRl+15TQLlSNM5mSR5amT8Fx0BGk0XWu2Ieo3iKZgGT/+mLyaYeGkC YU2bWx/CVffrCadTMCRvicibiPvddCV9v2UF5kf2/tl998y56/mXjTgjms7XWVAvYyfi6+pPN96 C5a/T+GXlhZ2Hx1jPd7BtJx7gUZlR6J94epxBC+I9fb5i4ngRuntrL2tLnrt037UPp103rg4Vqi Mx5re6yrgAKV7WDP/k2nZnJUmMUig0TkgliemQyil/79rInaFMr8q5r/J+PV8ayZME1c6OYnF0y aPYx1F1gvtxMGPG9suSYnwt6/y84NqUExNyXUPNbU8u6n/ifsc2wFzhptUZ4z0pfq+m/bLmdqd/ S0WuYlJ8HfSV0YVBaoqKw21BCYX5FtGaz967q7CvobKRtCO1qg+4m2exs7EC1eo8St4w== X-Google-Smtp-Source: AGHT+IHHv8sKM4BsZ33+Hj+zJ+rMbaOghYaZCwwv046DY7eY9Ny5MRSoFBFa+K7+wM9aszzmp62+uQ== X-Received: by 2002:a05:600c:3f0e:b0:46e:4b79:551 with SMTP id 5b1f17b1804b1-47a8379c10dmr22936435e9.31.1765369631110; Wed, 10 Dec 2025 04:27:11 -0800 (PST) Received: from smtpclient.apple (nat-184-41.net.cam.ac.uk. [131.111.184.41]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47a82d4ab25sm41610645e9.14.2025.12.10.04.27.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Dec 2025 04:27:10 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.200.81.1.6\)) Subject: Re: git: 27ff0bbcfd27 - main - libc/limits_test: add no-op testcase to satisfy kyua From: Jessica Clarke In-Reply-To: <1F88B5B5-D18A-4CF4-90A3-138EC7AB13A4@freebsd.org> Date: Wed, 10 Dec 2025 12:26:59 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" , Siva Mahadevan Content-Transfer-Encoding: quoted-printable Message-Id: References: <6932e8a2.2d8b4.6f0b56d3@gitrepo.freebsd.org> <1F88B5B5-D18A-4CF4-90A3-138EC7AB13A4@freebsd.org> To: Robert Clausecker X-Mailer: Apple Mail (2.3864.200.81.1.6) X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.40 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.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]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEFALL_USER(0.00)[jrtc27]; ARC_NA(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.128.49:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.128.49:from]; MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4dRFN11TzYz3wJn On 5 Dec 2025, at 14:28, Jessica Clarke wrote: > On 5 Dec 2025, at 14:13, Robert Clausecker wrote: >>=20 >> The branch main has been updated by fuz: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D27ff0bbcfd27df588d3f486cb21180a2= 6031b889 >>=20 >> commit 27ff0bbcfd27df588d3f486cb21180a26031b889 >> Author: Siva Mahadevan >> AuthorDate: 2025-10-23 13:17:25 +0000 >> Commit: Robert Clausecker >> CommitDate: 2025-12-05 14:12:46 +0000 >>=20 >> libc/limits_test: add no-op testcase to satisfy kyua >>=20 >> This test suite is purely tested with compile-time assertions, so >> it needs a dummy runtime test to ensure that kyua reports the >> file as passing. >=20 > Why are we building and installing tests that do nothing at run time? > Why are these not just compile-time assertions that fail the build, > like we=E2=80=99ve got in the form of test-includes to verify headers = include > their dependencies? Ping? Jessica From nobody Wed Dec 10 14:46:55 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRJTD10pnz6KgYc for ; Wed, 10 Dec 2025 14:46:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRJTC5zQmz3Jml for ; Wed, 10 Dec 2025 14:46:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765378015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tnemagfmYI7b+aib1+nuvMOmadFR28k21ENkKuqW+uc=; b=om0q6u9AED1nQGQZA/lra0gvz1rwymhs9gZh+FWy9ahyx+axnOQMBjvfFOddf4jCFP22zm 01IEHV7ggqFhC/FCkeDiH3OdGeiEJRpQA3c4FTlPd4cNbmtpRMw5EQPwWnq0PfIOaBQMm+ PhESRFS4ib0woDWeglzCdzoRVXxye95fu9/wdZCBbLimmOlT79b8e2l8TEqQHZFOuh/s0x e07fv5Fn9If3uGFN3O4ZukAj9OaE0LMMw94mJgxIVeJaocLF2bv1RG6Y/0IFS9go9kk20J 14lMYGzhpD2EK+DhfCviOPMowDvD8FeI171dKkHoaou52ZYvME/dhRoPjp3Lvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765378015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tnemagfmYI7b+aib1+nuvMOmadFR28k21ENkKuqW+uc=; b=IhbgGzIfL5PTlN6nTXo8MzGHv4oyyueAARESRmHqMgbQFkPRF+oghgCqBSCbmYIDJpBoLW QYhK8DWOb6A1NFZHPQ/Om9W9PXaP4aBoxmCqk4P0DRNCDntWVjlEOQEEABjW8BeZXimAOb 8J1lYpxw94TKPHnd9OcOW3BT6BMlTvSqvcBoaZQXd+B+W9uPqIGG5s94Ck5ghiWg0KKuqB X1UpA83TS2Q3zD8p8XK6Y5pKiZIn/Ggtcuyv5CpimOQcOGmOUUDL1ZwikL0T3OFcK0oIGv fRzkK/0R+QoGdHP+lYNwe2NpmagxWAx1FEHgCfAiHIBLYvp+IAaAyXFqsPjbQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765378015; a=rsa-sha256; cv=none; b=KlXYspcAMRSg/rwBsNeQ/83zB/ehDJ3vaqULIjkmFmSmMUUnqE+e42c49vz+CskqU6QWv6 sUzOTjPLgciPZL+U6KEmZkt0F8HQLeGMnBG0nI+MCeW6NuuRd2wftVEhzEaq+u2ShXRact z+WBjmDTmr7mnHwqzevalsahOF1GoQ7hZNnewQncDhbbCtqkKh1SnBE120WxnCwB7X7Uqj nd3mM7t4wae0zK7IxYf9cd7BkwfDHTjWOGBRnMG84walRpxTv+nkNdMR7jacIVGtBRRO4Y mMacroqQrd3XierIUgHVEukBwJkXPFa6+SVe0UtEEtv7sguC6yN6/YIllX92pw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRJTC5NZ2zqCJ for ; Wed, 10 Dec 2025 14:46:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31e9e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 14:46: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: 4453ec5b8716 - main - reboot: Default to a clean shutdown List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 4453ec5b8716bc465ff5192986099dc75d1f2ce7 Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 14:46:55 +0000 Message-Id: <693987df.31e9e.22c3019a@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=4453ec5b8716bc465ff5192986099dc75d1f2ce7 commit 4453ec5b8716bc465ff5192986099dc75d1f2ce7 Author: Dag-Erling Smørgrav AuthorDate: 2025-12-10 14:45:57 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-12-10 14:45:57 +0000 reboot: Default to a clean shutdown * If invoked as fasthalt or fastboot, behavior is unchanged. * If not invoked as fasthalt or fastboot, we simply signal init(8), just like shutdown(8) does, instead of taking the system down ourselves. * Since only init can handle the RB_REROOT case, the -r flag is not supported in fast mode. * Update the usage string to correctly reflect the program being run (fast or normal; halt, boot, or nextboot) and the options available in each case. * Update the manual page to make the distinction between normal and fast mode clear, better explain what shutdown(8) still does that reboot(8) does not, and add a historical note explaining what the difference between the two used to be. MFC after: 1 month Relnotes: yes Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D54117 --- sbin/reboot/reboot.8 | 62 ++++++++++++++++++++++++++++++++++++++-------------- sbin/reboot/reboot.c | 58 ++++++++++++++++++++++++++++++++++-------------- 2 files changed, 88 insertions(+), 32 deletions(-) diff --git a/sbin/reboot/reboot.8 b/sbin/reboot/reboot.8 index 1bbc39d52be4..4d35336efefb 100644 --- a/sbin/reboot/reboot.8 +++ b/sbin/reboot/reboot.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 12, 2025 +.Dd December 8, 2025 .Dt REBOOT 8 .Os .Sh NAME @@ -60,16 +60,25 @@ The .Nm halt and .Nm -utilities flush the file system cache to disk, send all running processes -a +utilities stop and restart the system, respectively. +.Pp +Both utilities have two distinct modes of operation. +In normal mode, they send a signal to the +.Xr init 8 +process, which shuts down running services and stops or restarts the +system. +In fast mode, they flush the file system cache to disk, send all +running processes a .Dv SIGTERM (and subsequently a .Dv SIGKILL ) -and, respectively, halt or restart the system. -The action is logged, including entering a shutdown record into the user -accounting database. +and stop or restart the system themselves. +Services are killed, not shut down, which may result in data loss. .Pp -The options are as follows: +In either mode, the action is logged, including entering a shutdown +record into the user accounting database. +.Pp +The following options are available: .Bl -tag -width indent .It Fl c The system will turn off the power and then turn it back on if it can. @@ -111,14 +120,17 @@ Care should be taken if contains any characters that are special to the shell or loader's configuration parsing code. .It Fl f -Force reboot. +Forced mode. Normally, +.Nm halt +or .Nm checks for the presence of the next kernel, and absence of the .Pa /var/run/noshutdown file. -Without this flag, reboot is denied if one of the conditions failed. +Without this flag, the operation is rejected if one of these checks +fails. .It Fl k Ar kname Boot the specified kernel .Ar kname @@ -195,17 +207,20 @@ The .Nm fasthalt and .Nm fastboot -utilities are nothing more than aliases for the +utilities invoke .Nm halt and -.Nm -utilities. +.Nm , +respectively, in fast mode. .Pp -Normally, the +The .Xr shutdown 8 -utility is used when the system needs to be halted or restarted, giving -users advance warning of their impending doom and cleanly terminating -specific programs. +utility can be used to not only stop or restart the system right away, +but also schedule a stop or restart in the future, and will, unlike +.Nm halt +and +.Nm , +give users advance warning of their impending doom. .Sh EXAMPLES Replace current root filesystem with UFS mounted from .Pa /dev/ada0s1a : @@ -236,3 +251,18 @@ A .Nm utility appeared in .Bx 4.0 . +.Pp +Historically, the +.Xr shutdown 8 +utility was used when the system needed to be halted or restarted +cleanly in the normal course of operations, and the +.Nm halt +and +.Nm +utilities were blunt instruments used only in single-user mode or if +exceptional circumstances made a normal shutdown impractical. +As other operating systems did away with this distinction, and it +became clear that many users were unaware of it and were using +.Nm +in the belief that it performed a clean shutdown, it was rewritten to +conform to that expectation. diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c index 59ae83ef6f6a..a147b7e08a95 100644 --- a/sbin/reboot/reboot.c +++ b/sbin/reboot/reboot.c @@ -59,6 +59,7 @@ extern char **environ; static void usage(void) __dead2; static uint64_t get_pageins(void); +static bool dofast; static bool dohalt; static bool donextboot; @@ -229,6 +230,24 @@ add_env(char **env, const char *key, const char *value) free(oldenv); } +static void +shutdown(int howto) +{ + char sigstr[SIG2STR_MAX]; + int signo = + howto & RB_HALT ? SIGUSR1 : + howto & RB_POWEROFF ? SIGUSR2 : + howto & RB_POWERCYCLE ? SIGWINCH : + howto & RB_REROOT ? SIGEMT : + SIGINT; + + (void)sig2str(signo, sigstr); + BOOTTRACE("SIG%s to init(8)...", sigstr); + if (kill(1, signo) == -1) + err(1, "SIG%s init", sigstr); + exit(0); +} + /* * Different options are valid for different programs. */ @@ -239,18 +258,24 @@ int main(int argc, char *argv[]) { struct utmpx utx; - const struct passwd *pw; struct stat st; + const struct passwd *pw; + const char *progname, *user; + const char *kernel = NULL, *getopts = GETOPT_REBOOT; + char *env = NULL, *v; + uint64_t pageins; int ch, howto = 0, i, sverrno; bool aflag, Dflag, fflag, lflag, Nflag, nflag, qflag; - uint64_t pageins; - const char *user, *kernel = NULL, *getopts = GETOPT_REBOOT; - char *env = NULL, *v; - if (strstr(getprogname(), "halt") != NULL) { + progname = getprogname(); + if (strncmp(progname, "fast", 4) == 0) { + dofast = true; + progname += 4; + } + if (strcmp(progname, "halt") == 0) { dohalt = true; howto = RB_HALT; - } else if (strcmp(getprogname(), "nextboot") == 0) { + } else if (strcmp(progname, "nextboot") == 0) { donextboot = true; getopts = GETOPT_NEXTBOOT; /* Note: reboot's extra opts return '?' */ } else { @@ -331,6 +356,8 @@ main(int argc, char *argv[]) errx(1, "-c and -p cannot be used together"); if ((howto & RB_REROOT) != 0 && howto != RB_REROOT) errx(1, "-r cannot be used with -c, -d, -n, or -p"); + if ((howto & RB_REROOT) != 0 && dofast) + errx(1, "-r cannot be performed in fast mode"); if ((howto & RB_REROOT) != 0 && kernel != NULL) errx(1, "-r and -k cannot be used together, there is no next kernel"); @@ -438,14 +465,10 @@ main(int argc, char *argv[]) (void)signal(SIGPIPE, SIG_IGN); /* - * Only init(8) can perform rerooting. + * Common case: clean shutdown. */ - if (howto & RB_REROOT) { - if (kill(1, SIGEMT) == -1) - err(1, "SIGEMT init"); - - return (0); - } + if (!dofast) + shutdown(howto); /* Just stop init -- if we fail, we'll restart it. */ BOOTTRACE("SIGTSTP to init(8)..."); @@ -507,9 +530,12 @@ usage(void) fprintf(stderr, "usage: nextboot [-aDf] " "[-e name=value] [-k kernel] [-o options]\n"); } else { - fprintf(stderr, dohalt ? - "usage: halt [-clNnpq] [-k kernel]\n" : - "usage: reboot [-cdlNnpqr] [-k kernel]\n"); + fprintf(stderr, "usage: %s%s [-%sflNnpq%s] " + "[-e name=value] [-k kernel] [-o options]\n", + dofast ? "fast" : "", + dohalt ? "halt" : dofast ? "boot" : "reboot", + dohalt ? "D" : "cDd", + dohalt || dofast ? "" : "r"); } exit(1); } From nobody Wed Dec 10 14:46:56 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRJTF4WDpz6KgQt for ; Wed, 10 Dec 2025 14:46:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRJTD6WBMz3Jms for ; Wed, 10 Dec 2025 14:46:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765378017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eKfL7f6jHWtLxMCv3ZXXqiLNiJGd7xqnuMrLPeiPgD0=; b=A7uor2hmDm/MLJ9uDHT+5NOPH2BygFptc7jtdNn0PRA8LSEYm9qEEGSV8Jbsxri6rUnKo0 0A+bNzD/tYv5yQebfiGl0eCedHqabrGx3vVM74pbNmJAqXEwDnoYnZnGHKjJlg9cIwYWTO sYc3ymM96J8TqyrXu75VcAVDz1MUrj6yht66RtNO+R2G7Q4dFKucsEbZDxtclNL0x9rjr2 CPm0SO8324R0CuzKmbgAAcr3BoIHn4KBc0PJ6czVbPvcHM7mqzHnpByiAaf2wqAXwj7gU7 yoMGxybpkhc9XiHWiS0lpnBWg4PO4qxggqwJ7letYe5jKVrfsNBr/eqtMNLs2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765378017; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eKfL7f6jHWtLxMCv3ZXXqiLNiJGd7xqnuMrLPeiPgD0=; b=a6EOsc2w35MWwBE2wr3GnRZ8zq1AXEOlNhL5dAiuCACGxCy3A8CxM4FE0cctA0SC8jliQU 0wYI+ivLTvWHJRcTJxsnKMZC7frcVgGZ3Ssnl3NLoz+ObwLWRoKPL1xguNLFer2Nv7Pp2C ntUCTQLvV/7nu5uSeYgw1l2FRk5wE6bVd3rRdytDbKqIsu7F5GgsbbQ6BBP+iZi5+4lNr1 3wWh7FJ7KVoM3WTH0tdUMi6mqYCTXtRdCe/9JdRAcEeiZf63Tk38DQN/VPQ5RNvM0TWEDo e0aE3OZfwTOzzAJKMffreCDo3hEVvYyjuliIRCaMvuIB0+whUg+atpv4OVCzFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765378017; a=rsa-sha256; cv=none; b=Uu8x7vU+sRRXta/b5dYUrGJDIcRj+LQWeysSRm0RH3Sbb+KJMLMgm2q/6+2weEjivGt+91 fbE6EaSEaW3f0ejXCHQmpf4gRKVhKJAOpQ5f/QN00BiGMgY5YsERljJQXsqnSKLq+GA8TA 3q3CpyTK+u0jKXmm/9paPQQcaM9c6actw2475HWVw67UkP9orxoxrj2zZZNwMA6Kv/SN2d OAOXjlAsuNEjg3nYUZikKkMxso7eocAqmyzfJxjVh5kDCk+CU+LDbXgSUp4xo2HpaQ4wuq OxEhGOpXlwxpkZ2PmCfLtxeFEi8P8hk8RpPbKYYd3X65M+A2MaNHHvK6/ulGBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRJTD5xhxzpvv for ; Wed, 10 Dec 2025 14:46:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 319e5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 14:46: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: 2a3b1641756a - main - shutdown: Adapt to changes in reboot List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 2a3b1641756a4f0c50338a17e310f8a2dbd31b50 Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 14:46:56 +0000 Message-Id: <693987e0.319e5.207ff37c@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=2a3b1641756a4f0c50338a17e310f8a2dbd31b50 commit 2a3b1641756a4f0c50338a17e310f8a2dbd31b50 Author: Dag-Erling Smørgrav AuthorDate: 2025-12-10 14:46:08 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-12-10 14:46:08 +0000 shutdown: Adapt to changes in reboot Now that halt and reboot actually signal init, shutdown needs to run fasthalt or fastboot instead when given the -o option. MFC after: 1 month Reviewed by: imp, allanjude Differential Revision: https://reviews.freebsd.org/D54122 --- sbin/shutdown/shutdown.8 | 8 ++++---- sbin/shutdown/shutdown.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sbin/shutdown/shutdown.8 b/sbin/shutdown/shutdown.8 index 2f09f5d524a9..81ce2a045859 100644 --- a/sbin/shutdown/shutdown.8 +++ b/sbin/shutdown/shutdown.8 @@ -105,9 +105,9 @@ or options is specified, .Nm will execute -.Xr halt 8 +.Xr fasthalt 8 or -.Xr reboot 8 +.Xr fastboot 8 instead of sending a signal to .Xr init 8 . .It Fl n @@ -116,9 +116,9 @@ If the option is specified, prevent the file system cache from being flushed by passing .Fl n to -.Xr halt 8 +.Xr fasthalt 8 or -.Xr reboot 8 . +.Xr fastboot 8 . This option should probably not be used. .It Fl q Shut down quietly. diff --git a/sbin/shutdown/shutdown.c b/sbin/shutdown/shutdown.c index 762b23ab6bd9..0fb39530b463 100644 --- a/sbin/shutdown/shutdown.c +++ b/sbin/shutdown/shutdown.c @@ -407,7 +407,7 @@ die_you_gravy_sucking_pig_dog(void) } else { if (doreboot) { BOOTTRACE("exec reboot(8) -l..."); - execle(_PATH_REBOOT, "reboot", "-l", nosync, + execle(_PATH_REBOOT, "fastboot", "-l", nosync, (char *)NULL, empty_environ); syslog(LOG_ERR, "shutdown: can't exec %s: %m.", _PATH_REBOOT); @@ -415,7 +415,7 @@ die_you_gravy_sucking_pig_dog(void) } else if (dohalt) { BOOTTRACE("exec halt(8) -l..."); - execle(_PATH_HALT, "halt", "-l", nosync, + execle(_PATH_HALT, "fasthalt", "-l", nosync, (char *)NULL, empty_environ); syslog(LOG_ERR, "shutdown: can't exec %s: %m.", _PATH_HALT); @@ -423,14 +423,14 @@ die_you_gravy_sucking_pig_dog(void) } else if (dopower) { BOOTTRACE("exec halt(8) -l -p..."); - execle(_PATH_HALT, "halt", "-l", "-p", nosync, + execle(_PATH_HALT, "fasthalt", "-l", "-p", nosync, (char *)NULL, empty_environ); syslog(LOG_ERR, "shutdown: can't exec %s: %m.", _PATH_HALT); warn(_PATH_HALT); } else if (docycle) { - execle(_PATH_HALT, "halt", "-l", "-c", nosync, + execle(_PATH_HALT, "fasthalt", "-l", "-c", nosync, (char *)NULL, empty_environ); syslog(LOG_ERR, "shutdown: can't exec %s: %m.", _PATH_HALT); From nobody Wed Dec 10 15:44:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRKlD58QJz6Km0g for ; Wed, 10 Dec 2025 15:44:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRKlD2kDJz3Z1m for ; Wed, 10 Dec 2025 15:44:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765381448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jfuHsa8aJtZwhlvmN+HbsJndhjcX1O+wRHs8vDiW3l4=; b=LYPLP1OZDa1KMvtfWKw+Kfstzcy6salfUjA9YtJGRS1hlsRpHMSDwDX95JXBO7Z22u08Nh 2FeUou2B/ir1FiG08yViRb+2JiiOAbXTxSMQIpUmtW78LmwtJWhJLNAP7WLtT8tcym1ZvB yUkLP8ob5SY+POyEOQFj4AwKnu/+aXOTAzoAV0vMiJrOzfiZtkz9VlJb4Dt4Xsx2nmCazS 6iV+YQ13XIBrKEIigoQktRvtTCZ3UrfiM1ovuThk+vJgKF1zpEL3exsSv0KpTcezLOogEl GuJZ+hdiKWDXRFlGmmG+hbj99Oml4OG4b5aXAicTriCqCNh8i0jKOeMO3VQmxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765381448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jfuHsa8aJtZwhlvmN+HbsJndhjcX1O+wRHs8vDiW3l4=; b=SA5hPWM6g4sakAN0NOy+7MNZEkDm1GqvXWVbVzS2rE8eSAbXkRWEihl23WPLbuZkMGsg3g XYd0Mb+wm0hUDlHplJ0kS2mgJFSmNlkIfPtR8/GzM2/YwnFCnwIpfNGyUa4gr5+i6+VPwP o1tATp0euMfrmJChD17xgO1g9/RVjydu5pb8sTnyjcaGw8Nvz0YAGq6v+6CMYmGeee39RS g+huLVH0HLWfR8bERmJrf2iFWvY2zYzdYYEppjHBL3dKKjkf83+TXQFHXg2Kramt9HNv/N vwYj9TLF4KFLnhnlFLROkfzK4DN5b1Q6cLdOgXVgJWwjvvdO0WT454eQLaVpHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765381448; a=rsa-sha256; cv=none; b=nWUNzWMjJlbgD4y+eNvYjaWjNQq4ueHtkQWG5o30XIFNrEDCwqQ60tnvtqdNqnBpTOWL0o JLYS3lr4mznb2ykVSrc/dc99GqQisp60mYORFO28DcQn05eFzAXAudV8AoskDSXzdMlQXC UqfQPOm8rgsNT7aF82Boi9UGbv7kUSTt4qDkRBKJjwGjOvbJnZ8Pp6J7YZflV9fX3QfPJ/ 2Y0rLIXMiO9A6/sV435OQUQ/nPA0LLmr8DLDlER8kd8AXiEpUNk2nDlb/kP4xcmeWSBtPH /XPDXQ7okvGF2rqTwLqcoCCd4dDntnn9843HcBDmQ7k4qshY5Mrd3KpHjgsYOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRKlD269wzrbT for ; Wed, 10 Dec 2025 15:44:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 359d2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 15:44:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 255af72c8059 - main - netlink: Don't overwrite existing data in a linear buffer in snl_writer List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 255af72c8059b0117db646f82efa2e4848fa7570 Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 15:44:08 +0000 Message-Id: <69399548.359d2.27db7a45@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=255af72c8059b0117db646f82efa2e4848fa7570 commit 255af72c8059b0117db646f82efa2e4848fa7570 Author: John Baldwin AuthorDate: 2025-12-10 15:30:31 +0000 Commit: John Baldwin CommitDate: 2025-12-10 15:30:31 +0000 netlink: Don't overwrite existing data in a linear buffer in snl_writer First, a bit of background on some of the data structures netlink uses to manage data associated with a netlink connection. - struct linear_buffer contains a single virtually-contiguous buffer of bytes. Regions of this buffer are suballocated via lb_allocz() which uses a simple "bump" where the buffer is split into an allocated region at the start and a free region at the end. Each allocation "bumps" the boundary (lb->offset) forward by the allocation size. Individual allocations are not freed. Instead, the entire buffer is freed once all of the allocations are no longer in use. Linear buffers also contain an embedded link to permit chaining buffers together. - snl_state contains various state for a netlink connection including a chain of linear buffers. This chain of linear buffers can contain allocations for netlink messages as well as other ancillary data buffers such as socket address structures. The chain of linear buffers are freed once the connection is torn down. - snl_writer is used to construct a message written on a netlink connection. It contains a single virtually-contiguous buffer (nw->base) allocated from the associated snl_state's linear buffer chain. The buffer distinguishes between the amount of space reserved from the underlying allocator (nw->size) and the current message length actually written (nw->offset). As new chunks of data (e.g. netlink attributes) are added to the write buffer, the buffer is grown by snl_realloc_msg_buffer by reallocating a larger buffer from the associated snl_state and copying over the current message data to the new buffer. Commit 0c511bafdd5b309505c13c8dc7c6816686d1e103 aimed to fix two bugs in snl_realloc_msg_buffer. The first bug is that snl_realloc_msg_buffer originally failed to update nw->size after growing the buffer which could result in spurious re-allocations when growing in the future. It also probably could eventually lead to overflowing the buffer since each reallocation request was just adding the new bytes needed for a chunk to the original 'nw->size' while 'nw->offset' kept growing. Eventually the new 'nw->offset' would be larger than 'nw->size + sz' causing routines like snl_reserve_msg_data_raw() to return an out-of-bounds pointer. The second change in this commit I think was trying to fix the buffer overflows due to 'nw->size' being wrong, but instead introduced a new set of bugs. The second change ignored the returned pointer from snl_allocz() and instead assumed it could use all of the currently-allocated data in the current linear buffer. This is only ok if the only data in the linear buffer chain for the associated snl_state is the snl_writer's message buffer. If there is any other data allocated from the snl_state, it could be earlier in the current linear buffer, so resetting new_base to nw->ss->lb->base can result in overwriting that other data. The second change was also over-allocating storage from the underlying chain of linear buffers (e.g. a writer allocation of 256 followed by 512 would end up using the first 512 bytes, but 768 bytes would be reserved in the underlying linear buffer). To fix, revert the second change keeping only the fix for 'nw->size' being wrong. Reviewed by: igoro, markj Fixes: 0c511bafdd5b ("netlink: fix snl_writer and linear_buffer re-allocation logic") Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D54148 --- sys/netlink/netlink_snl.h | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/sys/netlink/netlink_snl.h b/sys/netlink/netlink_snl.h index 57f7e1e29d08..52b35e502c98 100644 --- a/sys/netlink/netlink_snl.h +++ b/sys/netlink/netlink_snl.h @@ -1083,6 +1083,7 @@ static inline bool snl_realloc_msg_buffer(struct snl_writer *nw, size_t sz) { uint32_t new_size = nw->size * 2; + char *new_base; while (new_size < nw->size + sz) new_size *= 2; @@ -1090,23 +1091,20 @@ snl_realloc_msg_buffer(struct snl_writer *nw, size_t sz) if (nw->error) return (false); - if (snl_allocz(nw->ss, new_size) == NULL) { + new_base = snl_allocz(nw->ss, new_size); + if (new_base == NULL) { nw->error = true; return (false); } - nw->size = new_size; - void *new_base = nw->ss->lb->base; - if (new_base != nw->base) { - memcpy(new_base, nw->base, nw->offset); - if (nw->hdr != NULL) { - int hdr_off = (char *)(nw->hdr) - nw->base; + memcpy(new_base, nw->base, nw->offset); + if (nw->hdr != NULL) { + int hdr_off = (char *)(nw->hdr) - nw->base; - nw->hdr = (struct nlmsghdr *) - (void *)((char *)new_base + hdr_off); - } - nw->base = (char *)new_base; + nw->hdr = (struct nlmsghdr *)(void *)(new_base + hdr_off); } + nw->base = new_base; + nw->size = new_size; return (true); } From nobody Wed Dec 10 16:00:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRL6J19Zpz6KnPw for ; Wed, 10 Dec 2025 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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRL6J0NhXz3bLv for ; Wed, 10 Dec 2025 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=1765382440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KoksV57Rz8pTQy/BNfyyv3yDjoagQ1XClG0LS+V3z8U=; b=jPbXackTqOigGa0neXnStoOd65855NEwZ7MgjBHZwTIj2bdgCDpRXtkGvlvASa3Lz0kSdr Q2j4SfzA3dUauwbwjIE6FvK067CTwyWAtTFCM3XVJEoMHLg2UigUFyKrUkwgY/JmrDMgYl NqMzLCBtdSlFkrW2xQ+qGSQpJgK+XpzPx68xNmh4CyDftya5iJ0oZ4HNQCXsCVx/NWTUrO 4atMjjpofXNW0JqCyARFH7z1bccEs2ujIWL/xFImjfJnsAlqYoRzL0suZYU9kj9Y6OrmMi GjL8Ksrv01Ws7rxGCQltuyUNPjjHDCEi+H+JcyYVwnkQklh70BoawsGKUhcDiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765382440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KoksV57Rz8pTQy/BNfyyv3yDjoagQ1XClG0LS+V3z8U=; b=hyCNqMc2Y7fZd+JRjQj4xISVkZFCo4IuIGsFrLsEIQhlABJXdkiaZ9eHVkDBNrC3sYqtWd VhiNN+/DSx2Aoaf4mXNhRo7iCQ9rvgnR9fxC/OwVq91arZchHrZ8qVPWGCUUWkQ/HRX48m 49X3FAHWcD9Jk/EYK0gPm/IG0ejwCdil4s7puzKIRsQlXBBzAeKDBbR+EyUacBYDsYgJTA LWVl9ITB+wBO5EEKStJIyHA1am7FYKDQ638+wnm2uoVcMYpSP84KAQTVILl+95L+cX/cSE KAPRMXtD4XPOUoeP2ouBembL67ewoJiLGeBkiiUti6uwoO2E4tHysynnMlwGoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765382440; a=rsa-sha256; cv=none; b=IZYL7j0fbZiljj9eKzXNn+s+HxHsiTsQb6PoXCwsWhXtiBqphYRSSnBMtimjsopwub7l82 0VmcNev7QCrHTt1NZuOhZTsB/5c1ozKZ+TdizfgXXTHTrO6JLzA4+j/qVspIe8OktEoI5r ipwvpRR5rodS/NO0wxY6bKlXtljZpAs/o5UkqaKrLCvCXDGlZBSe4mKMBzBs3qGoyQVgfn 49LW4v9S4cCniBZ4YWK133GfAwWban/cGl24d0pz9HFXmTDWu6MKiUPfeVUwQIjnr+ytOv /HCF/+lVRfe3qASdlftN2Y2W3Ib5f8YeYB5727dVah9iV8CozcEOEO8NMt35VA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRL6H72m6zs2d for ; Wed, 10 Dec 2025 16:00:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39991 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 16:00:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Austin Shafer Subject: git: 4ae02d979227 - main - linuxkpi: clean up stray pctrie_iter_reset List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ashafer X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4ae02d9792272fa8c43f4982cf338123d9bcaed2 Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 16:00:39 +0000 Message-Id: <69399927.39991.63f41f2f@gitrepo.freebsd.org> The branch main has been updated by ashafer: URL: https://cgit.FreeBSD.org/src/commit/?id=4ae02d9792272fa8c43f4982cf338123d9bcaed2 commit 4ae02d9792272fa8c43f4982cf338123d9bcaed2 Author: Austin Shafer AuthorDate: 2025-12-09 15:33:17 +0000 Commit: Austin Shafer CommitDate: 2025-12-10 16:00:08 +0000 linuxkpi: clean up stray pctrie_iter_reset This removes an extraneous pctrie_iter_reset before returning. This is not needed as it simply clears a local variable that will get cleaned up anyway as we immediately return from the function. MFC after: 1 week Sponsored by: NVIDIA Reviewed by: alc Differential Revision: https://reviews.freebsd.org/D54153 --- sys/compat/linuxkpi/common/src/linux_page.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_page.c b/sys/compat/linuxkpi/common/src/linux_page.c index 2b2827579cba..c0d9d71ba1ce 100644 --- a/sys/compat/linuxkpi/common/src/linux_page.c +++ b/sys/compat/linuxkpi/common/src/linux_page.c @@ -345,10 +345,8 @@ retry: page = vm_page_grab_iter(vm_obj, pindex, VM_ALLOC_NOCREAT, &pages); if (page == NULL) { page = PHYS_TO_VM_PAGE(IDX_TO_OFF(pfn)); - if (page == NULL) { - pctrie_iter_reset(&pages); + if (page == NULL) return (VM_FAULT_SIGBUS); - } if (!vm_page_busy_acquire(page, VM_ALLOC_WAITFAIL)) { pctrie_iter_reset(&pages); goto retry; From nobody Wed Dec 10 18:11:23 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRP174nhTz6KwSw for ; Wed, 10 Dec 2025 18:11:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRP173Yg3z3pW5 for ; Wed, 10 Dec 2025 18:11:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765390283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T7OoX+beYHc57sm4jCzT2cY8hPLKmsijv9JhmGGW0zs=; b=uNzAH9/dDMsroPcZpuNjrIOOlsg5SGkOBk6aTkZNWMQnU6jR6130Qu5UyHRVzzB3qdVpTl 07shOHuxLXR3x7oVZ0onSpXMFpWZBlbZL86Pzs4HzyzSVU7ptTJTUQ8/ggLK56KiRmgt3m ZC7Ju0kNjwLE0Ts1tyZVrhEC6BAQTlBceK5Lzibh4rvkXuV7dx34ftPDnu1EhD9blS7KgM Hl4+6q5zY9sGua8tAVxcSsL+UOAUWnbF8xQQbOKOfxX+stslxTXKudWSHZVNpi4LyvFzxn 8XZadOjuqvYAoF50rfeJIqagXgPdgZ0N5QgENuZUqn8c2bMTKFxyj3JjGmGJDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765390283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T7OoX+beYHc57sm4jCzT2cY8hPLKmsijv9JhmGGW0zs=; b=F0to6w2Tr5bj1EF8C/M5EY2BzxEQBiyLNqfb7Rv9RPRpCpcuudOTgoAnEdzN+tCE9At4ir UieEqeMm9VsLhn5Hk+9HXieC8SSaKM2DLGYfsZvpR1ZdTdtukj63iYxvh0EGtQBXsFj9vk spOq3vOag5U+9uC+/HYO32Am75CAuhZ0GRv4IKDqdS0VUgGG7tFUHAuEKpzUFUP+WDubw2 jRFVfKukREBpdnUCPZFLKDhzj2pU5CLOa28iTCeFDEPHPITsvjnQg4Pw7qiHuAyj6PtsfE zzbFhWWG8lLJZVzPD1rlpMovCsRpt1dOC8e1lHHNZMeX+LN9aS2MK3UrJ3IejA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765390283; a=rsa-sha256; cv=none; b=oNmRZrYYDBVJioeJbffmYeJlqn1WFoDTw16woMMeF9nfcVPBCrIj+TGH+yfRyyMLbR4qn8 q3TcDwwB/BiMqYoLu+vX3kX6MrVZxoVe8MvMwXFseLw4i75KFUONBeg7YUKXrT/1CNieWI n29NBLQToG4G2bZY0BQyNHtZaqKdSYUg2afxlRVytho+bmQoJEV7SkZoASrzILFF+dfP6z h/558IsFKM5qp8NZkM2U2n4sm0A9q8EssWlu4fvGD6m5018PfJenMASAyLtaOCzKSde0Kl k+HuU/YuaEhMPAXLxsjY7xZLDuHjnuR2S9FYyw+SJVYjsMLqPworydRExFD87w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRP1736mtzwnT for ; Wed, 10 Dec 2025 18:11:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d05d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 18:11:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: a0347b0f3a60 - main - gpart: "gpart --libxo:JP list" duplicates attribute keys List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a0347b0f3a6088872c29eddb85154478d543dffb Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 18:11:23 +0000 Message-Id: <6939b7cb.d05d.6c0036bc@gitrepo.freebsd.org> The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=a0347b0f3a6088872c29eddb85154478d543dffb commit a0347b0f3a6088872c29eddb85154478d543dffb Author: Alan Somers AuthorDate: 2025-12-05 16:16:53 +0000 Commit: Alan Somers CommitDate: 2025-12-10 18:08:30 +0000 gpart: "gpart --libxo:JP list" duplicates attribute keys Add leaf-list modifier to attrib as it's possible to have multiple attributes on a gpart provider. I purposely made it so that the normal output still says "attrib:" just so we don't break any scripts people may be using to parse the output, but the libxo output now says "attribute" just like `gpart show` will do once https://reviews.freebsd.org/D53950 is merged. PR: 291377 MFC after: 1 week Reviewed by: asomers Sponsored by: ConnectWise Differential Revision: https://reviews.freebsd.org/D54080 --- sbin/geom/core/geom.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sbin/geom/core/geom.c b/sbin/geom/core/geom.c index 51ea52a3e858..a1b1b351ebb3 100644 --- a/sbin/geom/core/geom.c +++ b/sbin/geom/core/geom.c @@ -912,8 +912,12 @@ list_one_provider(struct gprovider *pp, const char *padding) } xo_emit("{P:/%s}{Lcw:Mode}{:mode}\n", padding, pp->lg_mode); LIST_FOREACH(conf, &pp->lg_config, lg_config) { - xo_emit("{P:/%s}{Lcwa:}{a:}\n", padding, conf->lg_name, - conf->lg_name, conf->lg_val ? conf->lg_val : ""); + if (strcmp(conf->lg_name, "attrib") != 0) + xo_emit("{P:/%s}{Lcwa:}{a:}\n", padding, conf->lg_name, + conf->lg_name, conf->lg_val ? conf->lg_val : ""); + else + xo_emit("{P:/%s}{Lcw:attrib}{l:attribute}\n", padding, + conf->lg_val ? conf->lg_val : ""); } } From nobody Wed Dec 10 19:04:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRQ9x5BjXz6L0fL for ; Wed, 10 Dec 2025 19:04:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRQ9x38fRz3xJX for ; Wed, 10 Dec 2025 19:04:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765393445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z3ww1WRjgZS2EMDcflxzVv3KQkb1ImS5dq2SR0S3stw=; b=pW5n0B2vAbOqfho2Du15pIV5dsx8ucVoLXZYc6BRqyNca/JBKAiwiflIcbQaG4R8ICEOeo wFz7MYpkXL0fbOpiHC2jZRXaSUObUXjuXBlUSYdJHThTBz2XUPG9ap/MHIWM9WWoDmitS/ rF5Ej2sGBq0JF9Luh3d0YlcrbYUTI9ke6Pp3LwNvXWXo84M+95nTxeT57Wpx6b2QIfBOfb U4NIRmbjyeKvXdkkYzhI6Vxmy/a4TtTQChyJDIlbyQj8DfZ4pNnLjhdlGe3lb8/hr6gDuF +xpq/039S/QSY2X29lduncw2KrrOkxS44lVx2U2UCFb6u48UQivg3Oj9lN66jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765393445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z3ww1WRjgZS2EMDcflxzVv3KQkb1ImS5dq2SR0S3stw=; b=d9s0zMUtOYfwhypvWlWkfBE9nPtNFQ+/7wtMvhxW4y7E3yyecKktvB34o7Vl2gZueriIT/ XE/jPfPQXq5TXvhNKK5Qugb+t8XxIEy+4j22nn0s90rvKqOICPlc2hcOo7q6+ckUJsqQPn 7vZ8FRX0pK14DQFcgswsVisCRx8ikM/Ej54Yq6XOd/4W++3JPJZr+J9M3KcxkvVsQcPgVG Zq4aqIXvUwjXn6gUq2ndlLqrCNxJISXxi1uG1aYjKA1zIci4MzKakjWrFgKuuLGb4KTqDZ YZv87j7vbnUEYq51xKmttTYHqZkiXMc6wRQYAwZythfb1YqF1ANvZi4cUwl+Sw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765393445; a=rsa-sha256; cv=none; b=RTpWgPwbvXepAAuJbGUmu0wBebRlnkhZZnaHEjxg4dXprKby+YAAcUkoEngBY4wUpnsV1Z RCxtjGPikGP4wxwb56zf8QPXHP7Z2z8L7bBcjKZ5LjDSUJsbcx3BZ+ML/rPapr8CjNtsRI zHjUXV7sPUNd6QxA5epVQ92IluLs1nMJX+VxqyAITT+qZW8nGjUB1OHu3wY45M4HknJy8W eeQD585+eUVopWmcc42gvXdYw7t3bHAUYIOhXLVoq28D0xxfBu7r5Pt+rtxLY+OiExJV1p rcwVOVsVvLdnu9N5hNICy+bBFrZyjoy8VU+breGetE3HrhRmmRxr9wYUhOI3Ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRQ9x2grTzy5M for ; Wed, 10 Dec 2025 19:04:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22561 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 19:04:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 332096ebb638 - main - kboot: Explicitly use host:/proc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 332096ebb6380ae65829018b4e1d611cd68dcc33 Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 19:04:05 +0000 Message-Id: <6939c425.22561.49bc3f@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=332096ebb6380ae65829018b4e1d611cd68dcc33 commit 332096ebb6380ae65829018b4e1d611cd68dcc33 Author: Warner Losh AuthorDate: 2025-12-10 12:36:56 +0000 Commit: Warner Losh CommitDate: 2025-12-10 19:03:47 +0000 kboot: Explicitly use host:/proc When looking for the boot_params symbol we need to get the UEFI memory map, use host: prefix. The short-circuit we have for this only works when we have a filesystem. During the earliest parts of boot, we can sometimes not have this yet, so making this explicit allows these environments to function. It's always in the host path. Print better error messages, and add newlines in two palces. Sponsored by: Netflix --- stand/kboot/libkboot/dfk.c | 13 ++++++++++--- sys/dev/mpr/mpr_sas.c | 31 +++++++++++++++++++++++++++++-- sys/dev/mpr/mpr_sas.h | 3 +++ 3 files changed, 42 insertions(+), 5 deletions(-) diff --git a/stand/kboot/libkboot/dfk.c b/stand/kboot/libkboot/dfk.c index 09f4512f5c99..18a3ad8eadab 100644 --- a/stand/kboot/libkboot/dfk.c +++ b/stand/kboot/libkboot/dfk.c @@ -39,8 +39,13 @@ #define ELF_TARG_DATA ELFDATA2LSB #endif +#ifndef _STANDALONE #define KCORE_PATH "/proc/kcore" #define KALLSYMS_PATH "/proc/kallsyms" +#else +#define KCORE_PATH "host:/proc/kcore" +#define KALLSYMS_PATH "host:/proc/kallsyms" +#endif struct elf_file { @@ -135,8 +140,10 @@ symbol_addr(const char *symbol) unsigned long addr; char line[256]; - if (!lb_init(&lb, KALLSYMS_PATH)) + if (!lb_init(&lb, KALLSYMS_PATH)) { + printf("Cannot open symbol file %s\n", KALLSYMS_PATH); return (0); + } while (lb_1line(&lb, line, sizeof(line))) { char *val, *name, *x, t; @@ -259,11 +266,11 @@ data_from_kernel(const char *sym, void *buf, size_t len) addr = symbol_addr(sym); if (addr == 0) { - fprintf(stderr, "Can't find symbol %s", sym); + fprintf(stderr, "Can't find symbol %s\n", sym); return (false); } if (!read_at_address(addr, buf, len)) { - fprintf(stderr, "Can't read from kernel"); + fprintf(stderr, "Can't read from kernel\n"); return (false); } return (true); diff --git a/sys/dev/mpr/mpr_sas.c b/sys/dev/mpr/mpr_sas.c index 5f3a27a468b0..a48593b1e6ee 100644 --- a/sys/dev/mpr/mpr_sas.c +++ b/sys/dev/mpr/mpr_sas.c @@ -152,6 +152,25 @@ mprsas_find_target_by_handle(struct mprsas_softc *sassc, int start, return (NULL); } +static void +mprsas_startup_timeout(void *_sassc) +{ + struct mprsas_softc *sassc = _sassc; + + /* + * Things have taken far too long. We have to get on with it. However, + * we're still processing events. We'll release the boot here only. + * We're called with the mpr lock held, which the rest of these + * functions take. This may cause mountroot to fail, but we'll at least + * proceed with the boot if this isn't holding up the system disk. + */ + callout_stop(&sassc->startup_timeout); + sassc->flags &= ~MPRSAS_STARTUP_ARMED; + xpt_release_boot(); + printf("Gave up all the devices...\n"); +}; + + /* we need to freeze the simq during attach and diag reset, to avoid failing * commands before device handles have been found by discovery. Since * discovery involves reading config pages and possibly sending commands, @@ -171,6 +190,10 @@ mprsas_startup_increment(struct mprsas_softc *sassc) "%s freezing simq\n", __func__); xpt_hold_boot(); xpt_freeze_simq(sassc->sim, 1); + callout_init_mtx(&sassc->startup_timeout, + &sassc->sc->mpr_mtx, 0); + callout_reset(&sassc->startup_timeout, 60 * hz, + mprsas_startup_timeout, sassc); } mpr_dprint(sassc->sc, MPR_INIT, "%s refcount %u\n", __func__, sassc->startup_refcount); @@ -197,11 +220,15 @@ mprsas_startup_decrement(struct mprsas_softc *sassc) /* finished all discovery-related actions, release * the simq and rescan for the latest topology. */ + bool need_release = sassc->flags & MPRSAS_STARTUP_ARMED; mpr_dprint(sassc->sc, MPR_INIT, "%s releasing simq\n", __func__); - sassc->flags &= ~MPRSAS_IN_STARTUP; + if (need_release) /* stop to prevent deadlock */ + callout_stop(&sassc->startup_timeout); + sassc->flags &= ~(MPRSAS_IN_STARTUP | MPRSAS_STARTUP_ARMED); xpt_release_simq(sassc->sim, 1); - xpt_release_boot(); + if (need_release) + xpt_release_boot(); } mpr_dprint(sassc->sc, MPR_INIT, "%s refcount %u\n", __func__, sassc->startup_refcount); diff --git a/sys/dev/mpr/mpr_sas.h b/sys/dev/mpr/mpr_sas.h index 4f1be3cd4214..24250cf50d14 100644 --- a/sys/dev/mpr/mpr_sas.h +++ b/sys/dev/mpr/mpr_sas.h @@ -91,6 +91,7 @@ struct mprsas_softc { #define MPRSAS_IN_STARTUP (1 << 1) #define MPRSAS_QUEUE_FROZEN (1 << 3) #define MPRSAS_TOREMOVE (1 << 5) +#define MPRSAS_STARTUP_ARMED (1 << 6) u_int maxtargets; struct mprsas_target *targets; struct cam_devq *devq; @@ -102,6 +103,8 @@ struct mprsas_softc { u_int startup_refcount; struct proc *sysctl_proc; + struct callout startup_timeout; + struct taskqueue *ev_tq; struct task ev_task; TAILQ_HEAD(, mpr_fw_event_work) ev_queue; From nobody Wed Dec 10 19:22:13 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRQZt2hl8z6L28y for ; Wed, 10 Dec 2025 19:22:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRQZs73rJz412W for ; Wed, 10 Dec 2025 19:22:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765394534; h=from:from:reply-to:subject:subject: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/j9ZrW4+atmu1D+jklslLwS7MNeub1XU38hxKXpvKw=; b=Z8pdTMx5yXrqZ1Ut+ii2ZIgW5Q+oIevan9XSSfm5mPLjYbuW4X7vwHJfaqIBJVhVP1lrn0 TbSogYcAhSgPEhVLYXOOvQvNkq9us588wj1okU14NFxJogaEa7GhDYyuN9A+yLy24fzgxc Iz0Dpmik/tzKS7G5kM/kX4k1r81zjWrlsZu9JTgjhsbNBOtzxIIJiMyPqHK1XIuVDUq2fJ a0XEPGE5oaTT64HkWpa4sSs1kSfC/ltw5J8vlPMHSAUy4w/B7sU+PnX82uWGikD2NCuMRE ZqGpqva0+oDkogxaxuqZdoEtOaSrfRq7D8uT2CtDBYgIJPx2TPnGMk0gteY3vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765394534; h=from:from:reply-to:subject:subject: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/j9ZrW4+atmu1D+jklslLwS7MNeub1XU38hxKXpvKw=; b=LTeLgladCEt4SoDE7wnDeK/WB0X4zavH3h7HqL8jPMu65NDivSXxTjHGemojUHraoUAX38 q21i1xggbZjYaSEmN8sOL4jJj8yIUpP3m7K6+dv2AUg3Y+BR1MOrYWRgGBqlpAoeinahqK d+3kGlkquyiC/XLN8q/wRFbQGUKgz2462XFy6Bl++EycIk+Vbjpqy0jChH+CaYudi3orJm +jUoTUrLORA/gRBJhwAHIA11NPl0GbB/qTH8s2eK84Q+CGSAi+BBJvkz9c3jZgaA8zZP/7 a+X1Kfz7h17OBTDGjjjMFG/xy5SFQb86Pde+Cz2Wabv+4Nb+YpA8RvQdyYnKPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765394534; a=rsa-sha256; cv=none; b=MYBHbwxrqg0QWPycuvqkiiCp0vZbkI5860FbrCm9jXUQ78d7YeHo1WMAeJOjFFu1KJHk7R 6siPjGx0wP6ODCuoRvsEDtApzDmw0GLtjSGGja1fM5zbrkBL5H7IA8DzO1R1PZDGjVVS6J 1tS5q/f0RoPl3nAXiKJnTnWk0qGSuQhmZRkBvmzonzwMhrCXHE9PdZS8JxiiqIJb5GKQ4D i/sVBP8LubZSGVxB/tnDfbQEtlPMPXtRCt37qIN/bMjNW83t2pDnRlNLcvmeDFmkFcUIOU BaMAbV5EN3nLNetdpIseksxR2p3DKMNprcM9eaqWClYKw5iAG3d28oM2NdwJBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRQZs6drMzyNr for ; Wed, 10 Dec 2025 19:22:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26fbe by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 19:22:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 89eddfb4b9f5 - main - linux: fix panic on kldunload List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 89eddfb4b9f5d744623ce0ee8ea966b0d33456e5 Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 19:22:13 +0000 Message-Id: <6939c865.26fbe.36b38dfe@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=89eddfb4b9f5d744623ce0ee8ea966b0d33456e5 commit 89eddfb4b9f5d744623ce0ee8ea966b0d33456e5 Author: Gleb Smirnoff AuthorDate: 2025-12-10 19:20:14 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-10 19:20:14 +0000 linux: fix panic on kldunload The vnet_deregister_sysuninit() that is called by linker unload sequence also calls every registered destructor before unregistering it. IMHO, this is not correct in principle, but for now plug the regression right in the code that introduced the panic. Fixes: 607f11055d2d421770963162a4d9a99cdd136152 --- sys/compat/linux/linux_if.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linux/linux_if.c b/sys/compat/linux/linux_if.c index 1281207c1c84..b342b07a6722 100644 --- a/sys/compat/linux/linux_if.c +++ b/sys/compat/linux/linux_if.c @@ -105,6 +105,13 @@ VNET_SYSINIT(linux_ifnet_vnet_init, SI_SUB_PROTO_IF, SI_ORDER_ANY, static void linux_ifnet_vnet_uninit(void *arg __unused) { + /* + * At a normal vnet shutdown all interfaces are gone at this point. + * But when we kldunload linux.ko, the vnet_deregister_sysuninit() + * would call this function for the default vnet. + */ + if (IS_DEFAULT_VNET(curvnet)) + clear_unrhdr(V_linux_eth_unr); delete_unrhdr(V_linux_eth_unr); } VNET_SYSUNINIT(linux_ifnet_vnet_uninit, SI_SUB_PROTO_IF, SI_ORDER_ANY, From nobody Wed Dec 10 20:24:00 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRRy92mXRz6JbYB; Wed, 10 Dec 2025 20:24:01 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRRy92Bwzz47CY; Wed, 10 Dec 2025 20:24:01 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765398241; h=from:from:reply-to:subject: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=xnzFFPmPy0m+cY6Q5uTw9LPUYg6dGByV4BU7VXBfI5Y=; b=TYOD3PK3djdqSxc4FuAklqM+qntJMacSTfwJxJgVTiudZ4oM9XRmFlJ3Js0FFCnhvXWMIb LQ9PUA5d8BexECvC6u5HyigrH7amFj+E1H3i335R7dNKJSjKFoGrxOrFSutz/a4nfv6axq hOvRireclaqFDBlToMDs5VmPPgAwr/0pcPmm+P5MsfaSx/4uuPMHxQqQPS6JNyH9jFDjZc hhgzD1GCyO9os6KirDnuqYjIIxMCJo05SgRukLQGyT+Y54CF3s4WBzeglzWCyMoFzVI0D/ NWem9HQXSWDvaNxLRsA14wex6pUiyeBl7jeQNFvWRxepSwFOtGwfCOOa2OmCCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765398241; h=from:from:reply-to:subject: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=xnzFFPmPy0m+cY6Q5uTw9LPUYg6dGByV4BU7VXBfI5Y=; b=tbY8WKUg9S8m9x2RgcKjPlGuXQZ9rsT/ApthoS6YkUa3t2JEenNs+YlHGjCsskF53r7O70 sJb/NWyBMMR1+8a+AzDe903mTrmU4yRgFJHHDz8FOaixthnMYXBi4xGeackUB969eWyyIX 6hQZSaNMV2CyqkDjsrzp8CwMvQDAdzy45b5XIuP3Tou4CBB1sabqPG0rlxRyTthA5Fic2d KlBmQ5MdIbPq7I2cDQLnhQb3acdBajzkhK/6wPTiP0kdH00dZtzpvrVQ4ecvylTaTWwqMw LzGvZrHzZAwRF9Y/dyH2EFs//beRdSA9Hot6x8n9bzWILGM/Tp7Z7d8MX42x9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765398241; a=rsa-sha256; cv=none; b=n1fB5Tb+Fe44fZ+/Ryg3RM5QiazmYM9aSPlZB/tQsJ50B4ZsQjmRg5ZYEyOdFpJGi5tHkn ze8MbQXGVqXvsFpZW04JzWQXQMgWb4/tmXJEQZDPx7z0diMmdnmo+NNJB78W5Dovt2aS33 XaDFl5FvT/2HrBAAwuYyut+H/d+4/djJjIC9hi4GIoWSmIgG7OTlqbqL7TMQpPiicgcMPp iUVRGse9ivfvPCrtsBKV3NAoktXILw5ME8QI2KsItWO/31s3K7BntOVqNazRGApZ6wKhcK 4kss38ES7sxjpFKr83fVcI+Furo/PQE1S0jNl5h9nZs7pShhZBKctfwwrcNh2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2601:5c0:4202:5670:f5e4:7fac:8cd1:45da] (unknown [IPv6:2601:5c0:4202:5670:f5e4:7fac:8cd1:45da]) (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 4dRRy90C54z1KC5; Wed, 10 Dec 2025 20:24:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <2fb326df-cbe6-4551-b2f0-03ae846ce0bd@FreeBSD.org> Date: Wed, 10 Dec 2025 15:24:00 -0500 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 89eddfb4b9f5 - main - linux: fix panic on kldunload Content-Language: en-US To: Gleb Smirnoff , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <6939c865.26fbe.36b38dfe@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <6939c865.26fbe.36b38dfe@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/10/25 14:22, Gleb Smirnoff wrote: > The branch main has been updated by glebius: > > URL: https://cgit.FreeBSD.org/src/commit/?id=89eddfb4b9f5d744623ce0ee8ea966b0d33456e5 > > commit 89eddfb4b9f5d744623ce0ee8ea966b0d33456e5 > Author: Gleb Smirnoff > AuthorDate: 2025-12-10 19:20:14 +0000 > Commit: Gleb Smirnoff > CommitDate: 2025-12-10 19:20:14 +0000 > > linux: fix panic on kldunload > > The vnet_deregister_sysuninit() that is called by linker unload sequence also > calls every registered destructor before unregistering it. IMHO, this is > not correct in principle, but for now plug the regression right in the code > that introduced the panic. > > Fixes: 607f11055d2d421770963162a4d9a99cdd136152 > --- > sys/compat/linux/linux_if.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/sys/compat/linux/linux_if.c b/sys/compat/linux/linux_if.c > index 1281207c1c84..b342b07a6722 100644 > --- a/sys/compat/linux/linux_if.c > +++ b/sys/compat/linux/linux_if.c > @@ -105,6 +105,13 @@ VNET_SYSINIT(linux_ifnet_vnet_init, SI_SUB_PROTO_IF, SI_ORDER_ANY, > static void > linux_ifnet_vnet_uninit(void *arg __unused) > { > + /* > + * At a normal vnet shutdown all interfaces are gone at this point. > + * But when we kldunload linux.ko, the vnet_deregister_sysuninit() > + * would call this function for the default vnet. > + */ > + if (IS_DEFAULT_VNET(curvnet)) > + clear_unrhdr(V_linux_eth_unr); > delete_unrhdr(V_linux_eth_unr); > } > VNET_SYSUNINIT(linux_ifnet_vnet_uninit, SI_SUB_PROTO_IF, SI_ORDER_ANY, Don't you also want to make this SYSUNINIT enabled for the !VIMAGE case so you don't leak this on unload for the !VIMAGE case? -- John Baldwin From nobody Wed Dec 10 21:12:53 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRT2f73rPz6JgVM for ; Wed, 10 Dec 2025 21:12:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRT2f6ZKlz4HTV for ; Wed, 10 Dec 2025 21:12:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765401178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NIPivklYgagSmRxzXYeh+YU/caaHykUYmDFzwTjVyHg=; b=ZBoaYNvV+YS9uU4JOn3+i/bNNz7j2ygpd0FHjkL3vdkrnWOUQGGaNhnjEq5V53nty4h5Oc GkZpchFzF3WVin81GjeQJIHq8/pbHWb0ykjLE/gjYg3O/m8tSZLUzplYekz23sMIoTG2C3 7zSWxq2Lp4MawnH2QxaERIF5jyBNGchO07s1/a84bsWWkF+dBGvREq1dZkU/lYUggquj8X oEX6854anP8o1Kv7MThT6H30ybMLP6+RUPQ0EZ+ji7NTC95KL0116YJQ4qL5QI3J+ReBPJ 30ibBGGNPYthcDTn+JbzgSeYpPAOXOfFGBsLQ0I+UHXyiNn28a7NGiRtnpeWfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765401178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NIPivklYgagSmRxzXYeh+YU/caaHykUYmDFzwTjVyHg=; b=yq5ELzNWPpvIE0jJ0cri1AOplO7HurGfRh5Qa46hkDmW2fEoo/QoZjm4DbHwQJY401zBe1 ZdTQO5INFMLz/aU55u6fs7tpO/7XuYAS516MS/bxAAbEpHOL5z3m8rOcrUGunqiW2HkMCj Scq4R+x1qo5cpUbXOiaE83tEUFmXYcjj74w6rPVebfXS8tsMr01BJmuycohHjJxDfe2MA3 okFZrO+JOuMS3bAT0vncAmZdlC4eODku8F54hdMTKRJtlWbuUOPZEgvCppgdt/sovLFCYt G8S9Nlv78JJnhhkKsiWI1eSfdXS4jy0m4eA0+K6ubqw3ELwAmNkUiGKSSIiNvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765401178; a=rsa-sha256; cv=none; b=BYJHDty+PVzIr4ASkG+8IrUlVdq5Pf5r0ZAZlmE+xmHuU1L8GueuXnTUycof984h6S4AtX YkMl6JVjYNAsS5scrJMKO+VIUtMbYMR731Jg0xYunyeEEb6WUumhqE7aJUeJJmoYcRQkTT 8Jzkt73f9WYpf4qEo/g73Rdrauj3/0QpHvCLNWCXnsFpLHB+cc7ALGRvrPNmJWC2NzOVEy sUj/jpE321AacwH/Iz6FelwyJIYKDgins1gbXhfVWvAfDPsZJhLMlsrA08fR0kjNqBDRIq 9hInbtE9J0d9sdYOioWxhRB0LOijZlh0XceignF1xZQPR2Ldvzt7aIEOE63WDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRT2f6B0mz12Qp for ; Wed, 10 Dec 2025 21:12:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31ae1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 21:12:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 84d198e137a5 - main - mpr: Partially revert 332096ebb638 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 84d198e137a59a17c08896333eaa9b318f4b1e1f Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 21:12:53 +0000 Message-Id: <6939e255.31ae1.2dfe0287@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=84d198e137a59a17c08896333eaa9b318f4b1e1f commit 84d198e137a59a17c08896333eaa9b318f4b1e1f Author: Warner Losh AuthorDate: 2025-12-10 21:06:50 +0000 Commit: Warner Losh CommitDate: 2025-12-10 21:09:07 +0000 mpr: Partially revert 332096ebb638 These were a doodle that escaped into my staging tree. Remove them. Sponsored by: Netflix --- sys/dev/mpr/mpr_sas.c | 31 ++----------------------------- sys/dev/mpr/mpr_sas.h | 3 --- 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/sys/dev/mpr/mpr_sas.c b/sys/dev/mpr/mpr_sas.c index a48593b1e6ee..5f3a27a468b0 100644 --- a/sys/dev/mpr/mpr_sas.c +++ b/sys/dev/mpr/mpr_sas.c @@ -152,25 +152,6 @@ mprsas_find_target_by_handle(struct mprsas_softc *sassc, int start, return (NULL); } -static void -mprsas_startup_timeout(void *_sassc) -{ - struct mprsas_softc *sassc = _sassc; - - /* - * Things have taken far too long. We have to get on with it. However, - * we're still processing events. We'll release the boot here only. - * We're called with the mpr lock held, which the rest of these - * functions take. This may cause mountroot to fail, but we'll at least - * proceed with the boot if this isn't holding up the system disk. - */ - callout_stop(&sassc->startup_timeout); - sassc->flags &= ~MPRSAS_STARTUP_ARMED; - xpt_release_boot(); - printf("Gave up all the devices...\n"); -}; - - /* we need to freeze the simq during attach and diag reset, to avoid failing * commands before device handles have been found by discovery. Since * discovery involves reading config pages and possibly sending commands, @@ -190,10 +171,6 @@ mprsas_startup_increment(struct mprsas_softc *sassc) "%s freezing simq\n", __func__); xpt_hold_boot(); xpt_freeze_simq(sassc->sim, 1); - callout_init_mtx(&sassc->startup_timeout, - &sassc->sc->mpr_mtx, 0); - callout_reset(&sassc->startup_timeout, 60 * hz, - mprsas_startup_timeout, sassc); } mpr_dprint(sassc->sc, MPR_INIT, "%s refcount %u\n", __func__, sassc->startup_refcount); @@ -220,15 +197,11 @@ mprsas_startup_decrement(struct mprsas_softc *sassc) /* finished all discovery-related actions, release * the simq and rescan for the latest topology. */ - bool need_release = sassc->flags & MPRSAS_STARTUP_ARMED; mpr_dprint(sassc->sc, MPR_INIT, "%s releasing simq\n", __func__); - if (need_release) /* stop to prevent deadlock */ - callout_stop(&sassc->startup_timeout); - sassc->flags &= ~(MPRSAS_IN_STARTUP | MPRSAS_STARTUP_ARMED); + sassc->flags &= ~MPRSAS_IN_STARTUP; xpt_release_simq(sassc->sim, 1); - if (need_release) - xpt_release_boot(); + xpt_release_boot(); } mpr_dprint(sassc->sc, MPR_INIT, "%s refcount %u\n", __func__, sassc->startup_refcount); diff --git a/sys/dev/mpr/mpr_sas.h b/sys/dev/mpr/mpr_sas.h index 24250cf50d14..4f1be3cd4214 100644 --- a/sys/dev/mpr/mpr_sas.h +++ b/sys/dev/mpr/mpr_sas.h @@ -91,7 +91,6 @@ struct mprsas_softc { #define MPRSAS_IN_STARTUP (1 << 1) #define MPRSAS_QUEUE_FROZEN (1 << 3) #define MPRSAS_TOREMOVE (1 << 5) -#define MPRSAS_STARTUP_ARMED (1 << 6) u_int maxtargets; struct mprsas_target *targets; struct cam_devq *devq; @@ -103,8 +102,6 @@ struct mprsas_softc { u_int startup_refcount; struct proc *sysctl_proc; - struct callout startup_timeout; - struct taskqueue *ev_tq; struct task ev_task; TAILQ_HEAD(, mpr_fw_event_work) ev_queue; From nobody Wed Dec 10 21:41:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRTgz04F7z6JjZf for ; Wed, 10 Dec 2025 21:41:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRTgy5DXVz4NWS for ; Wed, 10 Dec 2025 21:41:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765402910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=irzj0Ridi7lN9NeO1/muFUuYKQY7CVqeHJPqDHYwxa8=; b=CqsAV0G2a5MSVoXf1tllMBGGUysFf/1UlHUoFwaDVcXF6CJtIHlmkZj3c2GIVi8cZSKm13 rAu/5kpmCimlaPHUedLuXAAcrAQ3oi/cdxoImjQONsSLYcasubxft53My5LdTdE5oGpFvD tmLAMRsytaDou5Q2dl+q+qvU2itwc6MgnfCG0+NJWTMtCo9pqjK4dDImfnu+l/8XzpBZDO aOFM3rqBaOkJln5FYKxZOxJOQ2B/8v6WOIc5wbElLEbefJGwWv5lAVXpaMPJ3hqtPSYtC2 oZDpik86LrhfYqVsfHxJK6XfAfLxNxrl3ePH28Me1oQIn5fus1LqRzy6zGFdUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765402910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=irzj0Ridi7lN9NeO1/muFUuYKQY7CVqeHJPqDHYwxa8=; b=PkUZE7fCzF0fRbDY4tR1zwPeVja/dqwlNL8QsYlL+PFrwamkuNU0rCvdppkELIkcDLjMCd d0VtjjdB/Vd/7OMzhe7CSawmf6y6xPY2pW+HCh2mpmlb/TENWUN6PIuJvje9oDvh+UE6hk CXdpmlMrv0KIBUwDLWVM17ceYAxoo85zUMdSIuhcwTab+1UYh0hAf7R+yuKtBZFv5X4xgX mnHJ/nhJkoJt5tfit+MOweAn2JZthsWnB4WW6w26QfN+l8++k3ggx1bBhQ82ioUWQl5Dro mzSGw3POkXISGcHjhwUokL8GrUamXA0yYHURPzhl2Orrhk1YA0baGTi9mpH5Dg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765402910; a=rsa-sha256; cv=none; b=NnCN/h+ElGuKhrRDT7/22rbmyG2BLVHaXRzkvBXR4LrrGC8yF7EIFIFyTiJsBuCrfuEzZq eVnSBnvM7Ig3MlRG4ozsWVR8ebvVYv2olNRI6B1wCgEBwR9VGij1ChLi4gH5SvzzsOVRI1 uQ2TlPpWLeip0WKVgpexvZAy8+2KYVgAf9MpGUkPviQI9Kp1Fkorfzt4txqeCKq6/HhXdq NrH42z2b6fee5gOAnA5O9+5N9cCW7FT2YG89UEgEq6FpCY7aYNPA9JNgJaxtRs1cIUNuyl eQTc10rxX+POK1PSywFLJ+35qHjTueS8RlzVBZoqALfy55xcUdRURfO2FAu14Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRTgy4pX2z12cH for ; Wed, 10 Dec 2025 21:41:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34322 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 21:41:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: b19e5e7ce4c7 - main - cam: Expand the parts of the sense buffer we report List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: b19e5e7ce4c7749a3dc8780feb7efcafcf0dca0b Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 21:41:50 +0000 Message-Id: <6939e91e.34322.16fa9c2a@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b19e5e7ce4c7749a3dc8780feb7efcafcf0dca0b commit b19e5e7ce4c7749a3dc8780feb7efcafcf0dca0b Author: Warner Losh AuthorDate: 2025-03-08 01:34:35 +0000 Commit: Warner Losh CommitDate: 2025-12-10 21:37:40 +0000 cam: Expand the parts of the sense buffer we report Decode the descriptors we put into devd. Sponsored by: Netflix --- sys/cam/cam_periph.c | 8 +- sys/cam/scsi/scsi_all.c | 207 ++++++++++++++++++++++++++++++++++++++++++++++++ sys/cam/scsi/scsi_all.h | 3 + 3 files changed, 212 insertions(+), 6 deletions(-) diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index e485ecff8736..7f6855a5d51d 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -2109,7 +2109,7 @@ cam_periph_error(union ccb *ccb, cam_flags camflags, return (error); } -#define CAM_PERIPH_DEVD_MSG_SIZE 256 +#define CAM_PERIPH_DEVD_MSG_SIZE 1024 static void cam_periph_devctl_notify(union ccb *ccb) @@ -2117,7 +2117,6 @@ cam_periph_devctl_notify(union ccb *ccb) struct cam_periph *periph; struct ccb_getdev *cgd; struct sbuf sb; - int serr, sk, asc, ascq; char *sbmsg, *type; sbmsg = malloc(CAM_PERIPH_DEVD_MSG_SIZE, M_CAMPERIPH, M_NOWAIT); @@ -2146,10 +2145,7 @@ cam_periph_devctl_notify(union ccb *ccb) type = "timeout"; break; case CAM_SCSI_STATUS_ERROR: - sbuf_printf(&sb, "scsi_status=%d ", ccb->csio.scsi_status); - if (scsi_extract_sense_ccb(ccb, &serr, &sk, &asc, &ascq)) - sbuf_printf(&sb, "scsi_sense=\"%02x %02x %02x %02x\" ", - serr, sk, asc, ascq); + scsi_format_sense_devd(&ccb->csio, &sb); type = "error"; break; case CAM_ATA_STATUS_ERROR: diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c index 0ba4fa0c8978..6cfc390ed187 100644 --- a/sys/cam/scsi/scsi_all.c +++ b/sys/cam/scsi/scsi_all.c @@ -9380,6 +9380,213 @@ scsi_vpd_supported_page(struct cam_periph *periph, uint8_t page_id) return (0); } +static void +decode_sks(struct sbuf *sb, int sk, uint8_t *sks) +{ + /* + * The format of the sense key specific info varies based on key types. + * The valid bit should be checked by the caller for fixed formats and + * is always one for variable formats since it's mere presence signals + * validity. SPC7 4.4.2.4.1 and 4.4.3. + */ + switch (sk) { + case SSD_KEY_ILLEGAL_REQUEST: + { + const char *type; + + type = sks[0] & SSD_FIELDPTR_CMD ? "CDB" : "buffer"; + sbuf_printf(sb, "error_in=\"%s\" ", type); + if (sks[0] & SSD_BITPTR_VALID) { + sbuf_printf(sb, "bit_ptr=%d ", sks[0] & SSD_BITPTR_VALUE); + } + sbuf_printf(sb, "byte=%d ", scsi_2btoul(sks + 1)); + break; + } + case SSD_KEY_HARDWARE_ERROR: + case SSD_KEY_MEDIUM_ERROR: + case SSD_KEY_RECOVERED_ERROR: + sbuf_printf(sb, "retry_count=%d ", scsi_2btoul(sks + 1)); + break; + case SSD_KEY_NO_SENSE: + case SSD_KEY_NOT_READY: + sbuf_printf(sb, "progress=%d ", scsi_2btoul(sks + 1)); + break; + case SSD_KEY_COPY_ABORTED: + { + const char *type; + + /* Note: segment number in cmd_info if SD=1 */ + type = sks[0] & SSD_SD_VALID ? "rel" : "abs"; + sbuf_printf(sb, "segment=\"%s\" ", type); + if (sks[0] & SSD_BITPTR_VALID) { + sbuf_printf(sb, "bit_ptr=%d ", sks[0] & SSD_BITPTR_VALUE); + } + sbuf_printf(sb, "byte=%d ", scsi_2btoul(sks + 1)); + break; + } + case SSD_KEY_UNIT_ATTENTION: + sbuf_printf(sb, "overflow=%d ", sks[0] & 0x1); + break; + default: + /* + * NO DATA - SKSV should be zero, but no + * reported data on 1 either. + */ + break; + } +} + +/* + * Decode the sense buffer we get back from the drive. See SPC7 4.4 + * for details. + */ +void +scsi_format_sense_devd(struct ccb_scsiio *csio, struct sbuf *sb) +{ + int serr, sk, asc, ascq, slen; + struct scsi_sense_data *sense_data; + uint8_t *walker, *ep; + union ccb *ccb = (union ccb *)csio; + + sbuf_printf(sb, "scsi_status=%d ", csio->scsi_status); + if (scsi_extract_sense_ccb(ccb, &serr, &sk, &asc, &ascq)) + sbuf_printf(sb, "scsi_sense=\"%02x %02x %02x %02x\" ", + serr, sk, asc, ascq); + if (csio->ccb_h.flags & CAM_SENSE_PTR) + bcopy((struct scsi_sense_data **)&csio->sense_data, + &sense_data, sizeof(struct scsi_sense_data *)); + else + sense_data = &csio->sense_data; + /* + * Decode the rest of the sense buffer + */ + slen = csio->sense_len - csio->sense_resid; + walker = (uint8_t *)sense_data; + ep = walker + slen; + switch (*walker) { + case SSD_DESC_CURRENT_ERROR: + case SSD_DESC_DEFERRED_ERROR: + { + struct scsi_sense_data_desc *sdesc = (struct scsi_sense_data_desc *)walker; + + walker = sdesc->sense_desc; + if (walker + sdesc->extra_len > ep) + return; /* more data than buffer, just punt */ + ep = walker + sdesc->extra_len; + while (walker < ep) { + struct scsi_sense_desc_header *hdr = + (struct scsi_sense_desc_header *)walker; + + switch (hdr->desc_type) { + case SSD_DESC_INFO: + { + struct scsi_sense_info *info; + + info = (struct scsi_sense_info *)hdr; + if ((info->byte2 & SSD_INFO_VALID) == 0) + break; + sbuf_printf(sb, "info=0x%jx ", + scsi_8btou64(info->info)); + break; + } + case SSD_DESC_COMMAND: + { + struct scsi_sense_command *command; + + command = (struct scsi_sense_command *)hdr; + sbuf_printf(sb, "cmd_info=0x%jx ", + scsi_8btou64(command->command_info)); + break; + } + case SSD_DESC_SKS: + /* len sanity */ + decode_sks(sb, sk, walker + 2); + break; + case SSD_DESC_FRU: + { + struct scsi_sense_fru *fru; + + fru = (struct scsi_sense_fru *)hdr; + sbuf_printf(sb, "fru=%ju ", (uintmax_t)fru->fru); + break; + } + case SSD_DESC_ATA: + { + struct scsi_sense_ata_ret_desc *res; + uint16_t count; + uint64_t lba; + + res = (struct scsi_sense_ata_ret_desc *)hdr; + sbuf_printf(sb, "ata_status=0x%02x ata_error=0x%02x ", + res->status, res->error); + if (res->flags & SSD_DESC_ATA_FLAG_EXTEND) { + count = ((uint16_t)res->count_15_8 << 8) | res->count_7_0; + lba = ((uint64_t)res->lba_47_40 << 40) | + ((uint64_t)res->lba_39_32 << 32) | + ((uint64_t)res->lba_31_24 << 24) | + ((uint64_t)res->lba_23_16 << 16) | + ((uint64_t)res->lba_15_8 << 8) | + res->lba_7_0; + } else { + count = res->count_7_0; + lba = ((uint64_t)res->lba_23_16 << 16) | + ((uint64_t)res->lba_15_8 << 8) | + res->lba_7_0; + } + sbuf_printf(sb, "count=%d lba=0x%jx ", count, (uintmax_t)lba); + break; + } + default: + { + uint8_t *cp; + + if (hdr->desc_type >= SSD_DESC_VENDOR_MIN && hdr->desc_type <= SSD_DESC_VENDOR_MAX) + sbuf_printf(sb, "ven%02x=\"", hdr->desc_type); + else + sbuf_printf(sb, "desc%02x=\"", hdr->desc_type); + cp = (uint8_t *)&hdr[1]; + for (int i = 0; i < hdr->length; i++, cp++) + sbuf_printf(sb, "%02x ", *cp); + sbuf_printf(sb, "\" "); + break; + } + } /* switch */ + + walker += sizeof(*hdr) + hdr->length; + } + } + case SSD_CURRENT_ERROR: + case SSD_DEFERRED_ERROR: + { + struct scsi_sense_data_fixed *sfixed = (struct scsi_sense_data_fixed *)walker; + + if (sfixed->error_code & SSD_ERRCODE_VALID) { + uint32_t val = scsi_4btoul(sfixed->info); + + sbuf_printf(sb, "info=0x%x ", val); + } + if (SSD_FIXED_IS_PRESENT(sfixed, slen, cmd_spec_info) && + SSD_FIXED_IS_FILLED(sfixed, cmd_spec_info)) { + uint32_t val = scsi_4btoul(sfixed->cmd_spec_info); + + sbuf_printf(sb, "cmd_info=0x%x ", val); + } + if (SSD_FIXED_IS_PRESENT(sfixed, slen, fru) && + SSD_FIXED_IS_FILLED(sfixed, fru)) { + + sbuf_printf(sb, "fru=0x%x ", sfixed->fru); + } + if (SSD_FIXED_IS_PRESENT(sfixed, slen, sense_key_spec) && + SSD_FIXED_IS_FILLED(sfixed, sense_key_spec) && + (sfixed->sense_key_spec[0] & SSD_SCS_VALID) != 0) { + decode_sks(sb, sk, sfixed->sense_key_spec); + } + /* Additional bytes not reported -- vendor specific */ + /* Report the bytes present ? but can't use macros since it's at most 14 bytes */ + } + } /* switch */ +} + static void init_scsi_delay(void *dummy __unused) { diff --git a/sys/cam/scsi/scsi_all.h b/sys/cam/scsi/scsi_all.h index fb3ed8ee4458..045fbca2de80 100644 --- a/sys/cam/scsi/scsi_all.h +++ b/sys/cam/scsi/scsi_all.h @@ -3328,6 +3328,7 @@ struct scsi_sense_data_fixed uint8_t sense_key_spec[3]; #define SSD_SCS_VALID 0x80 #define SSD_FIELDPTR_CMD 0x40 +#define SSD_SD_VALID 0x20 #define SSD_BITPTR_VALID 0x08 #define SSD_BITPTR_VALUE 0x07 uint8_t extra_bytes[14]; @@ -4524,6 +4525,8 @@ find_mode_page_10(struct scsi_mode_header_10 *mode_header) return(page_start); } +void scsi_format_sense_devd(struct ccb_scsiio *csio, struct sbuf *sb); + __END_DECLS #endif /*_SCSI_SCSI_ALL_H*/ From nobody Wed Dec 10 21:41:51 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRTh00CsWz6JjmN for ; Wed, 10 Dec 2025 21:41:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRTgz5stzz4NWX for ; Wed, 10 Dec 2025 21:41:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765402911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kNQp7apwmQ1BOFub0SzYxqN0Ub8AzZzuOPIaibcFS/s=; b=Ykv3mkDm/KHZDELMhDSNEoWNTdtkQkKc81j0w7biud4GA5DIjxBM6ql5Z3MrHxjhp/TS1D XEobqmeHuMJoqgU9CXqtg5j7KAqUbae09dTn+5mJCYL8SryVv4tKuWbC9c/9+5remI7KwB Su/O34nfAM6/57rGiPug9br3nGGFLUcRJHfsfgrBF6dNTtRwoU5NXqfGJgvHG4/GBlVxqD glV+pH3L6uDuDB1NPxWWV8C8eGKzSSK5txMuVsm20ZdF953e6XQk54c936qu4Ipzxq4Yv9 hi7kLa5GMCKcH0y9tHm9koUBUxTJvNwkjZS/dKybTaGkLNjTtFHLIkyolj+f1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765402911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kNQp7apwmQ1BOFub0SzYxqN0Ub8AzZzuOPIaibcFS/s=; b=ajyQ7px2mhU4RA9lxqvmuYVxVqruIuWnY7vH0J9dH50jWvj96euF6L063JYsf296v5tRBp wOF3rSxFiKqoaDvGxbAWWViBChkFwVvWd14jnXQ5XCL+jFFrIxHsYogiNiDYblnSiduEP1 u4JjQiPxO1qHvTfseMohoSFhpAZhN0Iaz6aLuVQIMCbph3RWx5r4hGefQb6zwxMmyJaMz9 2LO+c2+3JxEdF90W+pFiz1t4M0zBcKoo7MlF9jQ7irdeeTUHv2C8bi5VRrxLhj6kfFiYsw QZg7ZhxkDRNFDw1Nz5l3XqU8q3IUJt4bkP5woDwKtSQ9B8Q4g9ycGFaGTnP01w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765402911; a=rsa-sha256; cv=none; b=QqX6VweW/Ks9YUBg3qNu53lxFYdiVBE29hyFrFgZzQbvTUzEjFkmDc2Qci59epsknZ584A AASbaOqH7KR83hUGZrlzT8R/SMyEI9Rgh963X9R/p57Mgo1MYeLMlnQSvrp/ZNSwToHaFR XCKFH/yHLvJ6i6rqO4d77qrENZn6TFPTgKIwYUG1l+uNkpFY2xgLijzfiG1ADbzxFj5NiQ lpnttyVr224slNzvSVWD3qCRtXtW9Vp+DStCgJwUl4fwakUonOSFpN+Nw0X0hyFtHsK/dX gyei2CpTRe3lPSFGqwKM27SzelwPtaVS4b34hXv8Y9Gas26QlqL6OsluuLDWyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRTgz5K30z12cJ for ; Wed, 10 Dec 2025 21:41:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34414 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 21:41:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: d3e79182960a - main - cam: decode and print direct accecss block device sense data List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: d3e79182960ae56f52b5b3fbbfa6f4c2bbc53246 Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 21:41:51 +0000 Message-Id: <6939e91f.34414.82ccf2c@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d3e79182960ae56f52b5b3fbbfa6f4c2bbc53246 commit d3e79182960ae56f52b5b3fbbfa6f4c2bbc53246 Author: Warner Losh AuthorDate: 2025-12-07 11:07:21 +0000 Commit: Warner Losh CommitDate: 2025-12-10 21:37:40 +0000 cam: decode and print direct accecss block device sense data A more efficient way to include multiple bits of data in a sense decriptor was defined in SBC4 in 2020. Decode and print it. Sponsored by: Netflix --- sys/cam/scsi/scsi_all.c | 47 +++++++++++++++++++++++++++++++++++++++++++++-- sys/cam/scsi/scsi_all.h | 23 +++++++++++++++++++++++ 2 files changed, 68 insertions(+), 2 deletions(-) diff --git a/sys/cam/scsi/scsi_all.c b/sys/cam/scsi/scsi_all.c index 6cfc390ed187..4ea2ab7d4acd 100644 --- a/sys/cam/scsi/scsi_all.c +++ b/sys/cam/scsi/scsi_all.c @@ -4789,6 +4789,32 @@ scsi_sense_forwarded_sbuf(struct sbuf *sb, struct scsi_sense_data *sense, sense_key_desc, asc, ascq, asc_desc); } +void +scsi_sense_dabd_sbuf(struct sbuf *sb, struct scsi_sense_data *sense, + u_int sense_len, uint8_t *cdb, int cdb_len, + struct scsi_inquiry_data *inq_data, + struct scsi_sense_desc_header *header) +{ + struct scsi_sense_direct_access_block_device *dabd; + int error_code, sense_key, asc, ascq; + + dabd = (struct scsi_sense_direct_access_block_device *)header; + + sbuf_printf(sb, "Direct Access Block Device: fru: %d ", + dabd->fru); + if (dabd->sks_byte & SSD_DESC_DABD_SKS_VALID) { + scsi_extract_sense_len(sense, sense_len, &error_code, &sense_key, + &asc, &ascq, /*show_errors*/ 1); + scsi_sks_sbuf(sb, sense_key, dabd->data); + } + if (dabd->byte2 & SSD_DESC_DABD_VALID) { + scsi_info_sbuf(sb, cdb, cdb_len, inq_data, + scsi_8btou64(dabd->info)); + scsi_command_sbuf(sb, cdb, cdb_len, inq_data, + scsi_8btou64(dabd->command_info)); + } +} + /* * Generic sense descriptor printing routine. This is used when we have * not yet implemented a specific printing routine for this descriptor. @@ -4837,7 +4863,8 @@ struct scsi_sense_desc_printer { {SSD_DESC_BLOCK, scsi_sense_block_sbuf}, {SSD_DESC_ATA, scsi_sense_ata_sbuf}, {SSD_DESC_PROGRESS, scsi_sense_progress_sbuf}, - {SSD_DESC_FORWARDED, scsi_sense_forwarded_sbuf} + {SSD_DESC_DABD, scsi_sense_dabd_sbuf}, + {SSD_DESC_FORWARDED, scsi_sense_forwarded_sbuf}, }; void @@ -9507,7 +9534,7 @@ scsi_format_sense_devd(struct ccb_scsiio *csio, struct sbuf *sb) struct scsi_sense_fru *fru; fru = (struct scsi_sense_fru *)hdr; - sbuf_printf(sb, "fru=%ju ", (uintmax_t)fru->fru); + sbuf_printf(sb, "fru=%u ", fru->fru); break; } case SSD_DESC_ATA: @@ -9536,6 +9563,22 @@ scsi_format_sense_devd(struct ccb_scsiio *csio, struct sbuf *sb) sbuf_printf(sb, "count=%d lba=0x%jx ", count, (uintmax_t)lba); break; } + case SSD_DESC_DABD: + { + struct scsi_sense_direct_access_block_device *dabd; + + dabd = (struct scsi_sense_direct_access_block_device *)hdr; + + if (dabd->sks_byte & SSD_DESC_DABD_SKS_VALID) + decode_sks(sb, sk, dabd->data); + sbuf_printf(sb, "fru=%u ", dabd->fru); + if (dabd->byte2 & SSD_DESC_DABD_VALID) { + sbuf_printf(sb, "info=0x%jx ", + scsi_8btou64(dabd->info)); + sbuf_printf(sb, "cmd_info=0x%jx ", + scsi_8btou64(dabd->command_info)); + } + } default: { uint8_t *cp; diff --git a/sys/cam/scsi/scsi_all.h b/sys/cam/scsi/scsi_all.h index 045fbca2de80..cadf2d1f2835 100644 --- a/sys/cam/scsi/scsi_all.h +++ b/sys/cam/scsi/scsi_all.h @@ -3653,6 +3653,25 @@ struct scsi_sense_forwarded uint8_t sense_data[]; }; +/* + * Direct Access Block Specific Sense Data + */ +struct scsi_sense_direct_access_block_device +{ + uint8_t desc_type; +#define SSD_DESC_DABD 0x0d + uint8_t length; + uint8_t byte2; +#define SSD_DESC_DABD_VALID 0x80 + uint8_t reserved3; + uint8_t sks_byte; +#define SSD_DESC_DABD_SKS_VALID 0x80 + uint8_t data[2]; /* Same as SSD_DESC_SKS extra data */ + uint8_t fru; + uint8_t info[8]; /* if SSD_DESC_DA_VALID */ + uint8_t command_info[8]; +}; + /* * Vendor-specific sense descriptor. The desc_type field will be in the * range between MIN and MAX inclusive. @@ -3889,6 +3908,10 @@ void scsi_sense_forwarded_sbuf(struct sbuf *sb, struct scsi_sense_data *sense, u_int sense_len, uint8_t *cdb, int cdb_len, struct scsi_inquiry_data *inq_data, struct scsi_sense_desc_header *header); +void scsi_sense_dabd_sbuf(struct sbuf *sb, struct scsi_sense_data *sense, + u_int sense_len, uint8_t *cdb, int cdb_len, + struct scsi_inquiry_data *inq_data, + struct scsi_sense_desc_header *header); void scsi_sense_generic_sbuf(struct sbuf *sb, struct scsi_sense_data *sense, u_int sense_len, uint8_t *cdb, int cdb_len, struct scsi_inquiry_data *inq_data, From nobody Wed Dec 10 21:53:31 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRTxX5vj3z6JkM1 for ; Wed, 10 Dec 2025 21:53:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRTxX3rsNz3Cq6 for ; Wed, 10 Dec 2025 21:53:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765403616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nSlt3RxXljTbmDx/6t0zo0Ps3scOSGBG5M9WzUtosi0=; b=BQfnYqxRNnEABeI+a0FMehQQiD3wnZjk1ZhvaKypeyzQpptkSA6NbBj1w3n0a77Uwtswjp NdKkmZi1lJAKVeWOtXqGnuMGVPUl9VBZ2rnzBuNAdQHUMqHJvlaM8u7x0QA8A4RaOuAQte Zjqwekj89wj8xmNkZlmp+Fj+74L1rflUVbOMkc/Wv168mXXAa/P0JVWUDNvkkNBaWCbPp2 iqqeeLdSgDlJnoTXMmsBxi6fq26Y4PTKSIa1GSWyUvsLEGTnZ+54L5ebMRaVYU3AVIZkaD e80yL+XifaIH+NzF0MS7md+5X+ELPHrJV54dAhOUFTC9LVZr8DpogFzpZDH0nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765403616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nSlt3RxXljTbmDx/6t0zo0Ps3scOSGBG5M9WzUtosi0=; b=NgRKpyuLgPzTIOEd5ukSdTjFOnvHH6S6aiasr4L7omwXWUv/+fsYtYBMub/SXCOnv4CKgb RadAd+gpcg+q/cH+mQzfmSFdP5Q2mIIEoAUZEvMbLX5eaAkPOiwDZ5xFTbxKPZfUsJH+t5 VVt01nTLEUN1ZFgCOB8TGAIZ+zakao4JhQVJPrJi7ZfqvTHFp+MgvBH5I015WUDxz6DYfR NF09+cTp/LRY7c0aTXKbG9BuCHQRZA5HUDMNvuKXE6AQFBt1/jg89NIfme7R0L/3PL4Pxe +B51cMMY4TqqS8sk+AMn1Ama3qEDiG5dsnP2LTYg0wSGBIu0/IpQu66asuJe/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765403616; a=rsa-sha256; cv=none; b=ogAxMwh1HQbCcRo7/tyOSp44jEtXdhURy3vP/L2UpRucMqWGBDcRyVGK78mdbrMZngklPH RRGZVWYXz+Gi1Q4OCYGatoTdbjzz3Uwhgzba0qNzY2kxlpdSdNMp1RD1llQ3mgXLDQmiZz U3f4HM6+uzLIfLjIZd/8GUbP9yJ03qXuc4ufZZztmNqpDCGFdb1frhK8/gxId4T2aiN1pH JWGKWJ2+3MidFurcX5lZphdYcG+uNjpQtDdld8s2DQEKrrIUqhP7ZbOT2/kpKMWdd3P0+L q3r2OPRoS57e+UtBDX0YBoDgkuF7Px+o5OjlI++OQeSEOj+8ELXD1rVcq2tSnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRTxR3GRZz134x for ; Wed, 10 Dec 2025 21:53:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 349f0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 21:53:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 45b3846ae5aa - main - linux: fix unr(9) leak on module unload List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 45b3846ae5aa941fa241e9417d5877a94b5c4ba4 Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 21:53:31 +0000 Message-Id: <6939ebdb.349f0.21eb3101@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=45b3846ae5aa941fa241e9417d5877a94b5c4ba4 commit 45b3846ae5aa941fa241e9417d5877a94b5c4ba4 Author: Gleb Smirnoff AuthorDate: 2025-12-10 21:52:45 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-10 21:52:45 +0000 linux: fix unr(9) leak on module unload Suggested by: jhb Fixes: 607f11055d2d421770963162a4d9a99cdd136152 --- sys/compat/linux/linux_if.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/compat/linux/linux_if.c b/sys/compat/linux/linux_if.c index b342b07a6722..f201f7c4b128 100644 --- a/sys/compat/linux/linux_if.c +++ b/sys/compat/linux/linux_if.c @@ -101,7 +101,6 @@ linux_ifnet_vnet_init(void *arg __unused) VNET_SYSINIT(linux_ifnet_vnet_init, SI_SUB_PROTO_IF, SI_ORDER_ANY, linux_ifnet_vnet_init, NULL); -#ifdef VIMAGE static void linux_ifnet_vnet_uninit(void *arg __unused) { @@ -116,7 +115,6 @@ linux_ifnet_vnet_uninit(void *arg __unused) } VNET_SYSUNINIT(linux_ifnet_vnet_uninit, SI_SUB_PROTO_IF, SI_ORDER_ANY, linux_ifnet_vnet_uninit, NULL); -#endif /* * Translate a FreeBSD interface name to a Linux interface name From nobody Wed Dec 10 21:56:46 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRV1B5Hw7z6Jkvv for ; Wed, 10 Dec 2025 21:56:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRV1B2Vr0z3CxN for ; Wed, 10 Dec 2025 21:56:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765403806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jwORGsPRedMWONDD+H3JsYemDig+kskokGPpN+J7ceM=; b=A8urKs4LyQ6NbQwE1JGWdCHWEPpJzOkBn1OcStzLSr2LaO+d6FCf9s6yGlJ5ZTNUt/0RPY jolfbBu5ISUEKh++ykeGLlFcBanj5zhkWnjAWtnjYi/5B8CGJ0nt21Gisv+bium74ETOid yFbJRWl1mOSYOdUvtwDnI7gH6ZcogyMua2mqVMjNilTWvfP+Gx1wUHBgtClmuMG2QuJDo3 DCaBurMikkheF4BeAlmxSsuVH0KTlvImcUHyZ7dYKgYZrEC/isLGlZoDMXuHok+qBlt2Sh rpF5T52i5ZNU+zTzKPVOJaAf8TV9Txe4PJ5nHmxfVtHG6O3514a2gzvtbw//UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765403806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jwORGsPRedMWONDD+H3JsYemDig+kskokGPpN+J7ceM=; b=w5wnojTWPB9tQs6kOjoKsT9Qur4u2O3z1gwMOOfH0PKCTJKt4teST0sQqGUTqum3R203sc NYUEkJkJZAU3tiMlNQXfMlPu5iafPYYe3wcd1urhyNmAfUewE+T1Km6uKHLJzHhwnU25rM ElKklBTMItJ/b4BoFDkC1EJ6btDWjGkJy0d+NmqXKqfQohQ/6yNJf7Sh9vCqq8tnWO1aU/ p3qfPGWQxjXYixEEj9ncbuizOQvFCcx9VFrYZjmCYjP/ZSt0Yy7pScakMbBfvmALt6UajZ iCb0AieoQ4k3FpRK4uug7ZCxUuppgkQhRlOsyUBQxZtpfC/MPmlPl44uVdRwlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765403806; a=rsa-sha256; cv=none; b=JRik4PzTldTSUL6DxqipaRKVoTDrzjYesAepNGmyyGncJ2TB1vTA6tz5NhoX3APzaBSixP xnbR2dGBLdvllkGcNxxPqNGmCQYINZspGtEKvid8b6c7S+a5VFpY9YcHxK3QFi/z/HzkOM bi4xjVZpZnC5Lm6qjBpj7VDYwL3u04NLyS+aRbuPgK4/2UMeMxoZn0QPMtBRDo24g4CJRj tEAHjdkWaq4gishW+C21y+CbSUqDQWbH2/i91af0UoKJaN5akF2w+kqws5CcGaMuqQCeq7 ZgdOAcPeYORvIcfgyDfOnff8utmI0hB3ySAASq84nF2Ql6PahDvRF5su5g1HKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRV1B1cG2z130M for ; Wed, 10 Dec 2025 21:56:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3550a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 21:56:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: a8d8bf4affa9 - main - sendfile: if sendfile_getobj() fails jump to the function epilogue List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: a8d8bf4affa95d3939442a65ea5c8f73785903e5 Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 21:56:46 +0000 Message-Id: <6939ec9e.3550a.bd529d5@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=a8d8bf4affa95d3939442a65ea5c8f73785903e5 commit a8d8bf4affa95d3939442a65ea5c8f73785903e5 Author: Gleb Smirnoff AuthorDate: 2025-12-10 21:56:14 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-10 21:56:14 +0000 sendfile: if sendfile_getobj() fails jump to the function epilogue The functional change here is that *sent would be zeroed. Note that some portable applications, e.g. OpenSSL, use a wrapper around our sendfile(2) to make it more Linux-like. These wrappers are usually written in a manner that expects *sbytes to always be initialized regardless of the error code returned. --- sys/kern/kern_sendfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_sendfile.c b/sys/kern/kern_sendfile.c index 7ffb09c58b9c..6e924f70b2ab 100644 --- a/sys/kern/kern_sendfile.c +++ b/sys/kern/kern_sendfile.c @@ -735,7 +735,7 @@ vn_sendfile(struct file *fp, int sockfd, struct uio *hdr_uio, error = sendfile_getobj(td, fp, &obj, &vp, &shmfd, &obj_size, &bsize); if (error != 0) - return (error); + goto out; error = sendfile_getsock(td, sockfd, &sock_fp, &so); if (error != 0) From nobody Wed Dec 10 22:53:49 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRWH15KKXz6Jq9Q for ; Wed, 10 Dec 2025 22:53:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRWH134c4z3PV5 for ; Wed, 10 Dec 2025 22:53:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765407229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yi4mU1kMx2A/AhwM2qKnBUMcmrAuiG6nXw7oQ7RAXGU=; b=vay2+llj/GIzkHpklY/r3nRn0Gzpr6d72PQeOZ90havxryb/sp2DP3lgEOb2tFU4qbd2Pn qtTAFtxz4FvzLwqzaT64d8bfrc+dV3KKoirDveKbIR8qtpSPMvaFRnKsaYt9anf68BaPTR XHGaAiQTGVwpOw6FWcZYFU/BhmVQniQEuP9bOJdovryio9CLkW7hUVuI/wuf5CsGcdTP/L Y0j1IFGnB26FulwzMjF0HeFsK2PmpjxOy6kEITHjlVk9Rw5CmsPdJ4/o3Vrmw712FodlUo EO1/EiskFsCIQaratZr9GBteczhpdj1fVa7Ezl39pyymqyGKzYuZGeWc4Ven6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765407229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Yi4mU1kMx2A/AhwM2qKnBUMcmrAuiG6nXw7oQ7RAXGU=; b=NNKhl4gShtRcu1PY3fZiYxVvsnhj6wqth7AxHjBqz4Y98yGIuj59QjLYvWrcrAz8tt8iRh WOhzxfI7uZqYCtxUtwgJoJLsUmnbjVgwaPZhBLVWJP5WtJSS8wa5v7wvV48H0kEBfLQDIR D1hTVyApYpfLTZjNEb9MDiWsZN/tqOgovxBQ8GTvwIdpA7wmvZ4DUhVXaBvGLqc3XrkIEb rwGoOPyNc6iefK8YTE6feuxv5wA+sUdU0+m54MAzn6kl9f+AjYmVZcY5gxqA/OSSy6QUng bozayo9sIAY27ATZIke+sNDCq5leelSfbxB2CjDIwu27ws7300QH9Q37ybIrrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765407229; a=rsa-sha256; cv=none; b=KKH9g4U3k+Tkt4Kly/sYB/aNTtX4WdIDQR0BplOP8xcCICcLGAYyHEQFpYe1SkKMX2traj tZCg1az/D6Yw0l0E8/VvyewItkYBCk6OWvYg/ZMOJtkAJNXYVDEOiv2Qj4aga9Lw3bFISF M9YQ8iwybI/KeMLlAOYIyhk2L0RXUch9kIygbkDzUSBQtB+fho00G0J4xQBcnSbrJLgSg6 PZbq7rPdqO+uLdyE1k6F/5Ik6cqG8njmK6v2isKGMWysDykcUJ+nBgjExBjG/SMOCWKLpf l8jmgUYm/uN6o2gfqa+E9ty/vMSq58xaQG501lcqeLj8YB0dHpLrdPBCkTLwjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRWH12P6Lz14bn for ; Wed, 10 Dec 2025 22:53:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id b10f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 22:53:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: e5c770dc7ff3 - main - nvme: Nvme controller generated events List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: e5c770dc7ff3fa71189addcafd30c333ff496de1 Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 22:53:49 +0000 Message-Id: <6939f9fd.b10f.169825a4@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e5c770dc7ff3fa71189addcafd30c333ff496de1 commit e5c770dc7ff3fa71189addcafd30c333ff496de1 Author: Warner Losh AuthorDate: 2025-12-10 22:52:10 +0000 Commit: Warner Losh CommitDate: 2025-12-10 22:52:10 +0000 nvme: Nvme controller generated events Interface for the nvme driver notifying its children of different events: async notifications, namespace events and device failure. These aren't yet connected. Sponsored by: Netflix Reviewed by: dab Differential Revision: https://reviews.freebsd.org/D51386 --- sys/conf/files | 1 + sys/dev/nvme/nvme_if.m | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/sys/conf/files b/sys/conf/files index 3314274b47a8..9c5220c7befa 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -2571,6 +2571,7 @@ dev/nvme/nvme_sim.c optional nvme scbus dev/nvme/nvme_sysctl.c optional nvme dev/nvme/nvme_test.c optional nvme dev/nvme/nvme_util.c optional nvme | scbus +dev/nvme/nvme_if.m optional nvme dev/nvmem/nvmem.c optional nvmem fdt dev/nvmem/nvmem_if.m optional nvmem dev/nvmf/controller/ctl_frontend_nvmf.c optional nvmft diff --git a/sys/dev/nvme/nvme_if.m b/sys/dev/nvme/nvme_if.m new file mode 100644 index 000000000000..a89381d165f7 --- /dev/null +++ b/sys/dev/nvme/nvme_if.m @@ -0,0 +1,55 @@ +# Copyright (c) 2025 Netlix, Inc +# +# SPDX-License-Identifier: BSD-2-Clause +# + +# Interface from the NVME controller to its children to notify it of certain +# interesting events. + +INTERFACE nvme; + +HEADER { + #include "dev/nvme/nvme_private.h" +}; + +# +# A new namespace is now available +# +METHOD int ns_added { + device_t dev; /* nvme device */ + struct nvme_namespace *ns; /* information about the namespace */ +}; + +# +# A namespace has been removed +# +METHOD int ns_removed { + device_t dev; /* nvme device */ + struct nvme_namespace *ns; /* information about the namespace */ +}; + +# +# A namespace has been changed somehow +# +METHOD int ns_changed { + device_t dev; /* nvme device */ + struct nvme_namespace *ns; /* information about the namespace */ +}; + +# +# The controller has failed +# +METHOD int controller_failed { + device_t dev; /* nvme device */ +}; + +# +# Async completion +# +METHOD int handle_aen { + device_t dev; /* nvme device */ + const struct nvme_completion *cpl; /* Completion for this async event */ + uint32_t pg_nr; /* Page number reported by async event */ + void *page; /* Contents of the page */ + uint32_t page_len; /* Length of the page */ +}; From nobody Wed Dec 10 22:53:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRWH25yNjz6Jqgd for ; Wed, 10 Dec 2025 22:53:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRWH23gYmz3P84 for ; Wed, 10 Dec 2025 22:53:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765407230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Ul/YCmmbh8713KqLjnweLTkjmxnXgYzH9qkjoNYaHQ=; b=TAdE4lMBSGJnMo6UOPyK9ZKjhXmPjbcplb6JY4yZ2H6vqJYiByKq33coXoIYVjiOs9Q4rw qGK3+0hqc7FPbAmxjDLbh6IL4N3irRBr2R/gwL44RkJSATU77xDHZ9ip25/jQPN2jec0Ny 7s5jd9WtvyuL3XdW8AfPcpi3M+AsG7YXCjCvRUYWnx824ATN7YY2ar5dFe0Wg1aYYRfSPQ uo+zVEb/GZWXys/axPsaEYW75Jru4lNtmCHlJxml3irEJRsnbZfdEKWe0uusthkvVlLoDA Sgf+8k5U7QiKWPHA3OUveWepLikZ+9sV8HVd4blqyDAOjXv/EgFwd0O1+DbYqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765407230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9Ul/YCmmbh8713KqLjnweLTkjmxnXgYzH9qkjoNYaHQ=; b=pAyFmqxZPQid4NkZ/f6fq6ZVQTO1cbbQU8k/pgrhh4VuieTTVbTcWndiGHbwsL3/e7jWhr xMczi2wnUbjvoqLAAu0Cn23+pmtqgnxUaxmFj7Y+p63cybCmx+xu0BuQOUkN146ooM6mx0 tbmAcHLgoS0WkINSvwbOmVvXknQdw/+RK7JxVv0q+9lm3QLmjopcPbHN4G1m2iORyPDZ+w lQiez4qycE6B0qzYqgHJbjbbVSd+b8E/3Y4fLIjq0EAUa/As7NcROkaRyVq5GevDhIx/aD 2y972fyMDVHF+L7SybRwSBqa8JU5nU0BZFqdh0yiHIDpbI/5BsY0MhN5qkJnJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765407230; a=rsa-sha256; cv=none; b=fOA70CBESKBp9B+CeVVTZ/es8MeIU9miPwsj2dAjeQbNDMcBmf0+0Vf7240sii5u4qs2uX M1EcJ4wcGcUpiyB6Y3QBf8Wj9+AX31j6vYgkuWLnyMxbyzqsbWHKSSEFiQ7PPYIzxvyeIQ oS3nN2efRTO7RuIYCof6kuwnYa6VQ/HKHdZ0Yj21m2yQeC5R3O8d2olS4dj3y4Qqvfjarn Q8+46Y2zCbiA5uztu/UOAf3AGzH6yfrf4CCeLl8GG0FVKnP3RahkNv3RvwjyhwkBHhmw1H NoVk8JzzlMO+RNw56hEHJUqMLnmqyuyCMVXMQkqyZJbmctNvLXlDRN7CSKIl7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRWH238V7z14K0 for ; Wed, 10 Dec 2025 22:53:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id a0db by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 22:53:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 743fbb549b17 - main - nvme: Add child device for each controller List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 743fbb549b17c1288306cd3fffdf139137268f61 Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 22:53:50 +0000 Message-Id: <6939f9fe.a0db.7031fc1c@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=743fbb549b17c1288306cd3fffdf139137268f61 commit 743fbb549b17c1288306cd3fffdf139137268f61 Author: Warner Losh AuthorDate: 2025-12-10 22:52:17 +0000 Commit: Warner Losh CommitDate: 2025-12-10 22:52:17 +0000 nvme: Add child device for each controller Step 1 in the move from registering consumers for NVMe drives to newbus nvme drives: Add a child device and attach them for each controller that we initialize. Detach them when we detach the main device. Sponsored by: Netflix Reviewed by: dab Differential Revision: https://reviews.freebsd.org/D51383 --- sys/dev/nvme/nvme.c | 5 +++++ sys/dev/nvme/nvme_ctrlr.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/sys/dev/nvme/nvme.c b/sys/dev/nvme/nvme.c index d119f9877aaa..7788889ae591 100644 --- a/sys/dev/nvme/nvme.c +++ b/sys/dev/nvme/nvme.c @@ -104,9 +104,14 @@ int nvme_detach(device_t dev) { struct nvme_controller *ctrlr = DEVICE2SOFTC(dev); + int error; config_intrhook_drain(&ctrlr->config_hook); + error = bus_generic_detach(dev); + if (error) + return (error); + nvme_ctrlr_destruct(ctrlr, dev); return (0); } diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 3d8b26d2004c..50753f06c4e2 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -1079,8 +1079,13 @@ nvme_ctrlr_start_config_hook(void *arg) config_intrhook_disestablish(&ctrlr->config_hook); if (!ctrlr->is_failed) { + device_t child; + ctrlr->is_initialized = true; nvme_notify_new_controller(ctrlr); + child = device_add_child(ctrlr->dev, NULL, DEVICE_UNIT_ANY); + device_set_ivars(child, ctrlr); + bus_attach_children(ctrlr->dev); } TSEXIT(); } From nobody Wed Dec 10 22:53:51 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRWH43Nlcz6Jq7Z for ; Wed, 10 Dec 2025 22:53:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRWH35z3nz3PST for ; Wed, 10 Dec 2025 22:53:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765407231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BISpXwktCj8u1b+sWLpEX7CAS24QdGNYpYT1FGHn6mU=; b=xdzQg58eTLcOv57hNX80xEmlb1XO2htrRb0wQ7rsgdOhZtTNXqqA7iGIqe456jy9yGzrDz UiTCoUFNUYAgLKY0DnJcdPl9rm+fD/fNYwck0xoThQ2FnkhPnWB25h7C/RrfcA0fPUE5jY i5cuxD95LY30oL3rPrk/H0hc+fr7JlwIqyZ6Ni3GXe5/6iTjwdz4XO2IhZ78o7U8AV56Hq o7pyvKh3LcmXM2FUa6vUWqOp5KV8iU0mJ+ZoMoAG9uVtcft32r1Ymll0h1HePR251wo0fO 9dXAxir9mj9cb9zO0X4G5el/IfKg+HoA+dSHSxPqZWa+cYi/m/b7BLk7xT80PQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765407231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BISpXwktCj8u1b+sWLpEX7CAS24QdGNYpYT1FGHn6mU=; b=FRadbmjhX6RQ3pz3HMfo/0GsrT2OI0hdNj3tHgWqDwYbv9tfhzXJvXnOmo8LQqrxdr37e5 uIC+QuF1O8VEwUkyVd2rapxEIN/pV017kxIEK/QgMwa98brDUmKJJCzq6ItOtToiLEfBVQ Bonw8PFE70YCdH6EkNo52HaY0r2awERR6cXAowTvdMrKfgeB+QeSt/lXE1zNjtRT/+Qcji GL5KeaSRWGzQtRqIB8koiGGY3ETllCR5D7q0txHNHSVC1HuTtCdFt/faklYN/fn244HZsN OJ0I0ZoVJ+Y5UgW4n831cZo1AIadKhj78E4bu1Siyr40oMMnbcskK2fH5gs38g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765407231; a=rsa-sha256; cv=none; b=uTEG5JCoFNoOlNdAFuPtPL+3V2+Fkqwo/H5g5/MsY+QrUkvBCJHk3czDA9d672w/fZlToJ wTia6V9wmlEwrmaifEReGfjrImrueFS596naCphrCL4ckmGFKrCPabWN8qMQseV3Vzp2SA loozL+i2dv5RNtQKPnHMShoYUXHXfbwUyff7zXwq4nkWJbfxEJ2QEaZ8nb91+iMX7Drd8h 2JfU9sk2HcxbyYXlhe1JbL4QM3K1bBRaQPh/GJp67luOTYPaW3sK/vhbQDvJ82imUXXKzF lzSIPQjt6vZ52+l/Iik5sAkEWzzjIail2MKBI90b6hp6BVJQEbO5AdVbA5k8lA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRWH33vlsz14hx for ; Wed, 10 Dec 2025 22:53:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id b819 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 22:53:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 1e39b5d4833e - main - nvme_sim: Attach as a child of nvme List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 1e39b5d4833e3be0261ff9cc2d360aa36698c3dc Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 22:53:51 +0000 Message-Id: <6939f9ff.b819.65552ec6@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1e39b5d4833e3be0261ff9cc2d360aa36698c3dc commit 1e39b5d4833e3be0261ff9cc2d360aa36698c3dc Author: Warner Losh AuthorDate: 2025-12-10 22:52:23 +0000 Commit: Warner Losh CommitDate: 2025-12-10 22:52:23 +0000 nvme_sim: Attach as a child of nvme Rather than registering as a consumer of the nvme controller, hook into the child device and use that. This is a small regression at the moment: we don't fail the device when that happens at runtime, and we don't handle new namespaces when they arrive (though that feature is currently fragile). Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D51384 --- sys/dev/nvme/nvme_sim.c | 138 +++++++++++++++++++++++++++++------------------- 1 file changed, 85 insertions(+), 53 deletions(-) diff --git a/sys/dev/nvme/nvme_sim.c b/sys/dev/nvme/nvme_sim.c index e015fbe4d072..88d777f556ed 100644 --- a/sys/dev/nvme/nvme_sim.c +++ b/sys/dev/nvme/nvme_sim.c @@ -304,61 +304,101 @@ nvme_sim_poll(struct cam_sim *sim) nvme_ctrlr_poll(sim2ctrlr(sim)); } -static void * -nvme_sim_new_controller(struct nvme_controller *ctrlr) +static void +nvme_sim_ns_change(struct nvme_namespace *ns, struct nvme_sim_softc *sc) +{ + union ccb *ccb; + + /* + * We map the NVMe namespace idea onto the CAM unit LUN. For each new + * namespace, we create a new CAM path for it. We then rescan the path + * to get it to enumerate. + */ + ccb = xpt_alloc_ccb(); + if (xpt_create_path(&ccb->ccb_h.path, /*periph*/NULL, + cam_sim_path(sc->s_sim), 0, ns->id) != CAM_REQ_CMP) { + printf("unable to create path for rescan\n"); + xpt_free_ccb(ccb); + return; + } + xpt_rescan(ccb); +} + +static int +nvme_sim_probe(device_t dev) +{ + if (nvme_use_nvd) + return (ENXIO); + + device_set_desc(dev, "nvme cam"); + return (BUS_PROBE_DEFAULT); +} + +static int +nvme_sim_attach(device_t dev) { - struct nvme_sim_softc *sc; struct cam_devq *devq; int max_trans; + int err = ENOMEM; + struct nvme_sim_softc *sc = device_get_softc(dev); + struct nvme_controller *ctrlr = device_get_ivars(dev); max_trans = ctrlr->max_hw_pend_io; devq = cam_simq_alloc(max_trans); if (devq == NULL) - return (NULL); + return (ENOMEM); - sc = malloc(sizeof(*sc), M_NVME, M_ZERO | M_WAITOK); sc->s_ctrlr = ctrlr; sc->s_sim = cam_sim_alloc(nvme_sim_action, nvme_sim_poll, - "nvme", sc, device_get_unit(ctrlr->dev), + "nvme", sc, device_get_unit(dev), NULL, max_trans, max_trans, devq); if (sc->s_sim == NULL) { - printf("Failed to allocate a sim\n"); + device_printf(dev, "Failed to allocate a sim\n"); cam_simq_free(devq); goto err1; } - if (xpt_bus_register(sc->s_sim, ctrlr->dev, 0) != CAM_SUCCESS) { - printf("Failed to create a bus\n"); + if (xpt_bus_register(sc->s_sim, dev, 0) != CAM_SUCCESS) { + err = ENXIO; + device_printf(dev, "Failed to create a bus\n"); goto err2; } if (xpt_create_path(&sc->s_path, /*periph*/NULL, cam_sim_path(sc->s_sim), CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { - printf("Failed to create a path\n"); + err = ENXIO; + device_printf(dev, "Failed to create a path\n"); goto err3; } - return (sc); + for (int i = 0; i < min(ctrlr->cdata.nn, NVME_MAX_NAMESPACES); i++) { + struct nvme_namespace *ns = &ctrlr->ns[i]; + + if (ns->data.nsze == 0) + continue; + nvme_sim_ns_change(ns, sc); + } + return (0); err3: xpt_bus_deregister(cam_sim_path(sc->s_sim)); err2: cam_sim_free(sc->s_sim, /*free_devq*/TRUE); err1: free(sc, M_NVME); - return (NULL); + return (err); } -static void * -nvme_sim_ns_change(struct nvme_namespace *ns, void *sc_arg) +static int +nvme_sim_fail(device_t dev, struct nvme_namespace *ns) { - struct nvme_sim_softc *sc = sc_arg; + struct nvme_sim_softc *sc = device_get_softc(dev); struct cam_path *tmppath; union ccb *ccb; if (xpt_create_path(&tmppath, /*periph*/NULL, cam_sim_path(sc->s_sim), 0, ns->id) != CAM_REQ_CMP) { - printf("unable to create path for rescan\n"); - return (NULL); + device_printf(dev, "unable to create path for rescan\n"); + return (ENOMEM); } /* * If it's gone, then signal that and leave. @@ -366,13 +406,13 @@ nvme_sim_ns_change(struct nvme_namespace *ns, void *sc_arg) if (ns->flags & NVME_NS_GONE) { xpt_async(AC_LOST_DEVICE, tmppath, NULL); xpt_free_path(tmppath); - return (sc_arg); + return (0); } ccb = xpt_alloc_ccb_nowait(); if (ccb == NULL) { - printf("unable to alloc CCB for rescan\n"); - return (NULL); + device_printf(dev, "unable to alloc CCB for rescan\n"); + return (ENOMEM); } ccb->ccb_h.path = tmppath; @@ -383,45 +423,37 @@ nvme_sim_ns_change(struct nvme_namespace *ns, void *sc_arg) */ xpt_rescan(ccb); - return (sc_arg); + return (0); } -static void -nvme_sim_controller_fail(void *ctrlr_arg) +static int +nvme_sim_detach(device_t dev) { - struct nvme_sim_softc *sc = ctrlr_arg; + struct nvme_controller *ctrlr = device_get_ivars(dev); - xpt_async(AC_LOST_DEVICE, sc->s_path, NULL); - xpt_free_path(sc->s_path); - xpt_bus_deregister(cam_sim_path(sc->s_sim)); - cam_sim_free(sc->s_sim, /*free_devq*/TRUE); - free(sc, M_NVME); -} + for (int i = 0; i < min(ctrlr->cdata.nn, NVME_MAX_NAMESPACES); i++) { + struct nvme_namespace *ns = &ctrlr->ns[i]; -struct nvme_consumer *consumer_cookie; - -static void -nvme_sim_init(void *dummy __unused) -{ - if (nvme_use_nvd) - return; - - consumer_cookie = nvme_register_consumer(nvme_sim_ns_change, - nvme_sim_new_controller, NULL, nvme_sim_controller_fail); + if (ns->data.nsze == 0) + continue; + nvme_sim_fail(dev, ns); + } + return (0); } -SYSINIT(nvme_sim_register, SI_SUB_DRIVERS, SI_ORDER_ANY, - nvme_sim_init, NULL); - -static void -nvme_sim_uninit(void *dummy __unused) -{ - if (nvme_use_nvd) - return; - /* XXX Cleanup */ +static device_method_t nvme_sim_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, nvme_sim_probe), + DEVMETHOD(device_attach, nvme_sim_attach), + DEVMETHOD(device_detach, nvme_sim_detach), + { 0, 0 } +}; - nvme_unregister_consumer(consumer_cookie); -} +static driver_t nvme_sim_driver = { + "nvme_sim", + nvme_sim_methods, + sizeof(struct nvme_sim_softc), +}; -SYSUNINIT(nvme_sim_unregister, SI_SUB_DRIVERS, SI_ORDER_ANY, - nvme_sim_uninit, NULL); +DRIVER_MODULE(nvme_sim, nvme, nvme_sim_driver, NULL, NULL); +MODULE_VERSION(nvme_shim, 1); From nobody Wed Dec 10 22:53:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRWH50VKTz6Jq9X for ; Wed, 10 Dec 2025 22:53:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRWH45Scgz3PdV for ; Wed, 10 Dec 2025 22:53:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765407232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aF6Dm5x1qmsh6fyn9b42jJRkcwYoFs1pWltadl/s10w=; b=CnGVp10Fcm/hFsQW7xCmEuH3/204jarMu/0RvehN1VJEWOm/CAOr2v9K5f4i9e4kX69zvA XEiM8cYXr1G6PyezxMrFdrsliimH/us106hQJ3p3AXjsTgfCPB1pv6CvV+5P3EhSQ3mubC 7O53KLfJe9aFQjKNS7HwJ4lZSeIXd2KWx8DnH6V3LGlzY2srMXKqmaNiSI3rp4rSV0Xaxl tRZGFsI6o9IpJ4Bq4wRoH+q8ATyhGEz4++++WT3HHvJCLnlY4EYbJS5tTvlDy/tpU+OqXz /gJzV9bXrDqhK0S3dRktETH03Y7cfqZmqbnsJV6ALqIkDSmvb5QVfx+Ioekiaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765407232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aF6Dm5x1qmsh6fyn9b42jJRkcwYoFs1pWltadl/s10w=; b=TmAukqRmv44JONr0oxqgjmNEGG6rb0ubJ3eGGwSTo7sQxGceRc51aMfSz+0hFnEntVJTmn I1nD01TaFW4hQfCT+HC6uLr2cOjP+IxNWgt30rRiT7jG7h4v8fEv70nWpu+ht9dG/ScBRa k+chahlfKQpKPGnJ3DXCVfYOWeYuiiOb6IMsA82wKaoi4woCBKSu5uoD4m6l7M7sxXsyVC tNtVjtxlOiO1zbwCs/GFRtrxN37T+CP4+IDYoJhRg3E9VYtpsIUSz+numirQ/1p8iLM7w/ vpWLofFOet5Ge8ZArZsTsKWooheP/UrTIAOO2qpF4bK8e9EhSRUCTgAouDruKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765407232; a=rsa-sha256; cv=none; b=WDThdP2EK+jPllY1IVUfvOTNqZSiiAzbqyGMut8MmIRLEp2BSfTbUPlC8tlzIbGWGbiHXd sXMXFEvyGmNgSO9NVKRpwFgq+l5fSX6F6Jt97+e0F4Ac6ggbW7WJU83STnI2uZinhmsNCl FE+FPs/VvLVVdcCGtYdtsDyLgpbQcibSlHTr/Xqq1HKCqfCj3Szbgb/4FF+fqEOf3Eve77 gDBuUuJzF1My8PQJ07jHxz6H6i6wUlYZTynBl3nu1wWDHGFUz8v7SJ7WGlod2lDBLdvEuj 1hYNTbXX2HDdmTlPwKsRFumQDmRZONo957M5GZd2ANWF1BuazoB+MGOyncqT3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRWH44dYkz14Yt for ; Wed, 10 Dec 2025 22:53:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id b113 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 22:53:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: b32470bc6621 - main - nvd: Attach as a child of nvme List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: b32470bc6621b622cac266600a670e1847bfb037 Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 22:53:52 +0000 Message-Id: <6939fa00.b113.30ed6cdb@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b32470bc6621b622cac266600a670e1847bfb037 commit b32470bc6621b622cac266600a670e1847bfb037 Author: Warner Losh AuthorDate: 2025-12-10 22:52:28 +0000 Commit: Warner Losh CommitDate: 2025-12-10 22:52:28 +0000 nvd: Attach as a child of nvme Rather than registering as a consumer of the nvme controller, hook into the child device and use that. This is a small regression at the moment: we don't fail the device when that happens at runtime. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D51385 --- sys/dev/nvd/nvd.c | 110 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 73 insertions(+), 37 deletions(-) diff --git a/sys/dev/nvd/nvd.c b/sys/dev/nvd/nvd.c index 9250fb54c234..fef3d1a1bc92 100644 --- a/sys/dev/nvd/nvd.c +++ b/sys/dev/nvd/nvd.c @@ -60,12 +60,6 @@ static disk_getattr_t nvd_getattr; static void nvd_done(void *arg, const struct nvme_completion *cpl); static void nvd_gone(struct nvd_disk *ndisk); -static void *nvd_new_disk(struct nvme_namespace *ns, void *ctrlr); -static void *nvd_ns_changed(struct nvme_namespace *ns, void *ctrlr); - -static void *nvd_new_controller(struct nvme_controller *ctrlr); -static void nvd_controller_fail(void *ctrlr); - static int nvd_load(void); static void nvd_unload(void); @@ -149,16 +143,12 @@ static int nvd_load(void) { if (!nvme_use_nvd) - return 0; + return (0); mtx_init(&nvd_lock, "nvd_lock", NULL, MTX_DEF); TAILQ_INIT(&ctrlr_head); TAILQ_INIT(&disk_head); - - consumer_handle = nvme_register_consumer(nvd_ns_changed, - nvd_new_controller, NULL, nvd_controller_fail); - - return (consumer_handle != NULL ? 0 : -1); + return (0); } static void @@ -395,30 +385,12 @@ nvd_bioq_process(void *arg, int pending) } } -static void * -nvd_new_controller(struct nvme_controller *ctrlr) -{ - struct nvd_controller *nvd_ctrlr; - - nvd_ctrlr = malloc(sizeof(struct nvd_controller), M_NVD, - M_ZERO | M_WAITOK); - - nvd_ctrlr->ctrlr = ctrlr; - TAILQ_INIT(&nvd_ctrlr->disk_head); - mtx_lock(&nvd_lock); - TAILQ_INSERT_TAIL(&ctrlr_head, nvd_ctrlr, tailq); - mtx_unlock(&nvd_lock); - - return (nvd_ctrlr); -} - -static void * -nvd_new_disk(struct nvme_namespace *ns, void *ctrlr_arg) +static void +nvd_new_disk(struct nvme_namespace *ns, struct nvd_controller *ctrlr) { uint8_t descr[NVME_MODEL_NUMBER_LENGTH+1]; struct nvd_disk *ndisk, *tnd; struct disk *disk; - struct nvd_controller *ctrlr = ctrlr_arg; device_t dev = ctrlr->ctrlr->dev; int unit; @@ -509,10 +481,9 @@ nvd_new_disk(struct nvme_namespace *ns, void *ctrlr_arg) (uintmax_t)disk->d_mediasize / (1024*1024), (uintmax_t)disk->d_mediasize / disk->d_sectorsize, disk->d_sectorsize); - - return (ndisk); } +#if 0 static void nvd_resize(struct nvd_disk *ndisk) { @@ -534,15 +505,25 @@ nvd_resize(struct nvd_disk *ndisk) (uintmax_t)disk->d_mediasize / disk->d_sectorsize, disk->d_sectorsize); } +#endif + +static int +nvdc_fail(device_t dev) +{ + return ENXIO; +} +#if 0 static void * nvd_ns_changed(struct nvme_namespace *ns, void *ctrlr_arg) { struct nvd_disk *ndisk; struct nvd_controller *ctrlr = ctrlr_arg; - if ((ns->flags & NVME_NS_DELTA) == 0) - return (nvd_new_disk(ns, ctrlr_arg)); + if ((ns->flags & NVME_NS_DELTA) == 0) { + nvd_new_disk(ns, ctrlr_arg); + return (ctrlr_arg); + } mtx_lock(&nvd_lock); TAILQ_FOREACH(ndisk, &ctrlr->disk_head, ctrlr_tailq) { @@ -568,5 +549,60 @@ nvd_controller_fail(void *ctrlr_arg) while (!TAILQ_EMPTY(&ctrlr->disk_head)) msleep(&ctrlr->disk_head, &nvd_lock, 0, "nvd_fail", 0); mtx_unlock(&nvd_lock); - free(ctrlr, M_NVD); } +#endif + +static int +nvdc_probe(device_t dev) +{ + if (!nvme_use_nvd) + return (ENXIO); + + device_set_desc(dev, "nvme storage namespace"); + return (BUS_PROBE_DEFAULT); +} + +static int +nvdc_attach(device_t dev) +{ + struct nvd_controller *nvd_ctrlr = device_get_softc(dev); + struct nvme_controller *ctrlr = device_get_ivars(dev); + + nvd_ctrlr->ctrlr = ctrlr; + TAILQ_INIT(&nvd_ctrlr->disk_head); + mtx_lock(&nvd_lock); + TAILQ_INSERT_TAIL(&ctrlr_head, nvd_ctrlr, tailq); + mtx_unlock(&nvd_lock); + + for (int i = 0; i < min(ctrlr->cdata.nn, NVME_MAX_NAMESPACES); i++) { + struct nvme_namespace *ns = &ctrlr->ns[i]; + + if (ns->data.nsze == 0) + continue; + nvd_new_disk(ns, nvd_ctrlr); + } + + return (0); +} + +static int +nvdc_detach(device_t dev) +{ + return (nvdc_fail(dev)); +} + +static device_method_t nvdc_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, nvdc_probe), + DEVMETHOD(device_attach, nvdc_attach), + DEVMETHOD(device_detach, nvdc_detach), + { 0, 0 } +}; + +static driver_t nvdc_driver = { + "nvdc", + nvdc_methods, + sizeof(struct nvd_controller), +}; + +DRIVER_MODULE(nvdc, nvme, nvdc_driver, NULL, NULL); From nobody Wed Dec 10 22:53:53 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRWH61j4tz6JqRv for ; Wed, 10 Dec 2025 22:53:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRWH56NX1z3PXj for ; Wed, 10 Dec 2025 22:53:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765407233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zUjwliOOQbVl/R22tRpdVNbjJMK2RGVjz5XAJG/ZR/g=; b=oIqJAMOyNyZf6ICIKjMvNv5fbHi/PK6dNT0TLckQqD6ORtUyGLsTVWt9gb5pYAI3Nh4llO lHvCXoNtU5vPVMViCoSThkGNU7hjHSKJQkzY7BOcMRnFDEkil/jtyY3M1kcvsXTiaeu9dZ V1rJiz0DoL0C2x3OiwepE+LyvNTKoSZc8QDfo2El6oILerla/a9vsSUD9MPBgWLoIIfZw1 w11K37TQ4jkkoTBbgP2CilQnese3d59H+ebW7F8CAumVJxWGHAcMp0Z4gjRH6zJUbh8Is2 vfYiOyalGN/BB4nOCp+WncQ5Kx9KvmPRr4VUybn+DUB0avYWO7gbuMYU0xBLZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765407233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zUjwliOOQbVl/R22tRpdVNbjJMK2RGVjz5XAJG/ZR/g=; b=uMYuGuQ+40+vT3tNT54qhUjKEjiMo+R5zmdKnC2BF2+YH3394XlEw4aKjhxsKYvKgPiMxg 0LCX4IddeJRlAI0lRnKLbFEErNVsHa6YZXqOBR+39OX/+MnEr+7XfpIsIAxymtCWABzq0b nr2d9MyLnrmbcVFUayS0jZMoOLSKF/ocxFhWyey7yuic9PlW9g8Nj/tCOKXGU3d+T+gwpa OTVYpVLx7+J5zC2KJw3XuOKllpT2GD72Ar2EyEeG2t5wXnW2doalC0i9Fgg5M4IN6DR/bw +mdnSE7tg7JT3cONCudczQR5slaZYZToeHg/mLn72HGsNUxsy7anUlyXt1E68A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765407233; a=rsa-sha256; cv=none; b=kkXizOiPGycMZGQFg5x8AFHg/Isqfb5geKstz1pGO7aD2XsdCfXbV12/zPLUM4C5n7KVm7 Y6aUvbhL2PxjoMJqtSgYl6yYUWJFyAPOU5zouvKUrg/ZWOBUyGtcAsqtY6DwDBYY/uS+5w W4i9wRcpUUm6k920JUX5kBhd5DpLwcxmkiC+cpcXO+u83TiTq8JeZXob0S/loYi0DA97a8 VOfI6DxaeFZb8hc0Pe8yo78sVSZMdMITvJEwpUlkR+fgsTvUNpi+B0ekyPEOY6/QhZNw6c ++2VhRDfRS8t/KNROwLPUDWWtoiuTej0Zg0Vmlq5RhSR6ME7WXZ+ImAdms1qsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRWH55SKfz14j0 for ; Wed, 10 Dec 2025 22:53:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id b117 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 22:53:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: a21f12840f5f - main - nvme_sim: Connect to events broadcast with nvme_if List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: a21f12840f5f25d777920957ed8ba7362052eaa7 Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 22:53:53 +0000 Message-Id: <6939fa01.b117.36a8aca3@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a21f12840f5f25d777920957ed8ba7362052eaa7 commit a21f12840f5f25d777920957ed8ba7362052eaa7 Author: Warner Losh AuthorDate: 2025-12-10 22:52:33 +0000 Commit: Warner Losh CommitDate: 2025-12-10 22:52:33 +0000 nvme_sim: Connect to events broadcast with nvme_if Connect up the nvme_ns_* events. Copy code from old ways, as needed, and refactor a little. Sponsored by: Netflix Reviewed by: dab Differential Revision: https://reviews.freebsd.org/D51387 --- sys/dev/nvme/nvme_sim.c | 145 +++++++++++++++++++++++++++------------------- sys/modules/nvme/Makefile | 1 + 2 files changed, 85 insertions(+), 61 deletions(-) diff --git a/sys/dev/nvme/nvme_sim.c b/sys/dev/nvme/nvme_sim.c index 88d777f556ed..d134d1daafc3 100644 --- a/sys/dev/nvme/nvme_sim.c +++ b/sys/dev/nvme/nvme_sim.c @@ -44,10 +44,15 @@ #include "nvme_private.h" +#include "nvme_if.h" + #define ccb_accb_ptr spriv_ptr0 #define ccb_ctrlr_ptr spriv_ptr1 static void nvme_sim_action(struct cam_sim *sim, union ccb *ccb); static void nvme_sim_poll(struct cam_sim *sim); +static int nvme_sim_ns_added(device_t dev, struct nvme_namespace *ns); +static int nvme_sim_ns_changed(device_t dev, uint32_t nsid); +static int nvme_sim_ns_removed(device_t dev, struct nvme_namespace *ns); #define sim2softc(sim) ((struct nvme_sim_softc *)cam_sim_softc(sim)) #define sim2ctrlr(sim) (sim2softc(sim)->s_ctrlr) @@ -304,26 +309,6 @@ nvme_sim_poll(struct cam_sim *sim) nvme_ctrlr_poll(sim2ctrlr(sim)); } -static void -nvme_sim_ns_change(struct nvme_namespace *ns, struct nvme_sim_softc *sc) -{ - union ccb *ccb; - - /* - * We map the NVMe namespace idea onto the CAM unit LUN. For each new - * namespace, we create a new CAM path for it. We then rescan the path - * to get it to enumerate. - */ - ccb = xpt_alloc_ccb(); - if (xpt_create_path(&ccb->ccb_h.path, /*periph*/NULL, - cam_sim_path(sc->s_sim), 0, ns->id) != CAM_REQ_CMP) { - printf("unable to create path for rescan\n"); - xpt_free_ccb(ccb); - return; - } - xpt_rescan(ccb); -} - static int nvme_sim_probe(device_t dev) { @@ -339,7 +324,7 @@ nvme_sim_attach(device_t dev) { struct cam_devq *devq; int max_trans; - int err = ENOMEM; + int err = ENXIO; struct nvme_sim_softc *sc = device_get_softc(dev); struct nvme_controller *ctrlr = device_get_ivars(dev); @@ -356,16 +341,14 @@ nvme_sim_attach(device_t dev) if (sc->s_sim == NULL) { device_printf(dev, "Failed to allocate a sim\n"); cam_simq_free(devq); - goto err1; + return (ENOMEM); } if (xpt_bus_register(sc->s_sim, dev, 0) != CAM_SUCCESS) { - err = ENXIO; device_printf(dev, "Failed to create a bus\n"); goto err2; } if (xpt_create_path(&sc->s_path, /*periph*/NULL, cam_sim_path(sc->s_sim), CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { - err = ENXIO; device_printf(dev, "Failed to create a path\n"); goto err3; } @@ -375,7 +358,7 @@ nvme_sim_attach(device_t dev) if (ns->data.nsze == 0) continue; - nvme_sim_ns_change(ns, sc); + nvme_sim_ns_added(dev, ns); } return (0); @@ -383,69 +366,109 @@ err3: xpt_bus_deregister(cam_sim_path(sc->s_sim)); err2: cam_sim_free(sc->s_sim, /*free_devq*/TRUE); -err1: - free(sc, M_NVME); return (err); } + static int -nvme_sim_fail(device_t dev, struct nvme_namespace *ns) +nvme_sim_fail_all_ns(device_t dev) { struct nvme_sim_softc *sc = device_get_softc(dev); - struct cam_path *tmppath; - union ccb *ccb; + struct nvme_controller *ctrlr = sc->s_ctrlr; - if (xpt_create_path(&tmppath, /*periph*/NULL, - cam_sim_path(sc->s_sim), 0, ns->id) != CAM_REQ_CMP) { - device_printf(dev, "unable to create path for rescan\n"); - return (ENOMEM); - } - /* - * If it's gone, then signal that and leave. - */ - if (ns->flags & NVME_NS_GONE) { - xpt_async(AC_LOST_DEVICE, tmppath, NULL); - xpt_free_path(tmppath); - return (0); - } + for (int i = 0; i < min(ctrlr->cdata.nn, NVME_MAX_NAMESPACES); i++) { + struct nvme_namespace *ns = &ctrlr->ns[i]; - ccb = xpt_alloc_ccb_nowait(); - if (ccb == NULL) { - device_printf(dev, "unable to alloc CCB for rescan\n"); - return (ENOMEM); + if (ns->data.nsze == 0) + continue; + nvme_sim_ns_removed(dev, ns); } - ccb->ccb_h.path = tmppath; + return (0); +} + +static int +nvme_sim_detach(device_t dev) +{ + return (nvme_sim_fail_all_ns(dev)); +} + +static int +nvme_sim_ns_added(device_t dev, struct nvme_namespace *ns) +{ + struct nvme_sim_softc *sc = device_get_softc(dev); + union ccb *ccb; /* * We map the NVMe namespace idea onto the CAM unit LUN. For each new - * namespace, scan or rescan the path to enumerate it. tmppath freed at - * end of scan. + * namespace, scan or rescan the path to enumerate it. */ + ccb = xpt_alloc_ccb(); + if (xpt_create_path(&ccb->ccb_h.path, /*periph*/NULL, + cam_sim_path(sc->s_sim), 0, ns->id) != CAM_REQ_CMP) { + printf("unable to create path for rescan\n"); + return (ENOMEM); + } xpt_rescan(ccb); return (0); } static int -nvme_sim_detach(device_t dev) +nvme_sim_ns_removed(device_t dev, struct nvme_namespace *ns) { - struct nvme_controller *ctrlr = device_get_ivars(dev); - - for (int i = 0; i < min(ctrlr->cdata.nn, NVME_MAX_NAMESPACES); i++) { - struct nvme_namespace *ns = &ctrlr->ns[i]; + struct nvme_sim_softc *sc = device_get_softc(dev); + struct cam_path *tmppath; - if (ns->data.nsze == 0) - continue; - nvme_sim_fail(dev, ns); + if (xpt_create_path(&tmppath, /*periph*/NULL, + cam_sim_path(sc->s_sim), 0, ns->id) != CAM_REQ_CMP) { + printf("unable to create path for rescan\n"); + return (ENOMEM); } + xpt_async(AC_LOST_DEVICE, tmppath, NULL); + xpt_free_path(tmppath); + + return (0); +} + +static int +nvme_sim_ns_changed(device_t dev, uint32_t nsid) +{ + struct nvme_sim_softc *sc = device_get_softc(dev); + struct nvme_namespace *ns = &sc->s_ctrlr->ns[nsid - 1]; + + /* + * These wind up being the same. For a configured cam_ed, we generate + * AC_GETDEV_CHANGED, but for new one we do AC_FOUND_DEVICE, but the + * scan is the same. + */ + return (nvme_sim_ns_added(dev, ns)); +} + +static int +nvme_sim_controller_failed(device_t dev) +{ + return (nvme_sim_fail_all_ns(dev)); +} + +static int +nvme_sim_handle_aen(device_t dev, const struct nvme_completion *cpl, + uint32_t pg_nr, void *page, uint32_t page_len) +{ + /* Do nothing */ return (0); } static device_method_t nvme_sim_methods[] = { /* Device interface */ - DEVMETHOD(device_probe, nvme_sim_probe), - DEVMETHOD(device_attach, nvme_sim_attach), - DEVMETHOD(device_detach, nvme_sim_detach), + DEVMETHOD(device_probe, nvme_sim_probe), + DEVMETHOD(device_attach, nvme_sim_attach), + DEVMETHOD(device_detach, nvme_sim_detach), + /* Nvme controller messages */ + DEVMETHOD(nvme_ns_added, nvme_sim_ns_added), + DEVMETHOD(nvme_ns_removed, nvme_sim_ns_removed), + DEVMETHOD(nvme_ns_changed, nvme_sim_ns_changed), + DEVMETHOD(nvme_controller_failed, nvme_sim_controller_failed), + DEVMETHOD(nvme_handle_aen, nvme_sim_handle_aen), { 0, 0 } }; diff --git a/sys/modules/nvme/Makefile b/sys/modules/nvme/Makefile index 936a28fa5de9..b10f5dd190bf 100644 --- a/sys/modules/nvme/Makefile +++ b/sys/modules/nvme/Makefile @@ -16,6 +16,7 @@ SRCS = nvme.c \ \ bus_if.h \ device_if.h \ + nvme_if.h \ opt_cam.h \ opt_nvme.h \ pci_if.h From nobody Wed Dec 10 22:53:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRWH72lJbz6Jqgl for ; Wed, 10 Dec 2025 22:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRWH66bmXz3PF9 for ; Wed, 10 Dec 2025 22:53:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765407235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fCzRCqsk3BJimMGINitCtuQcVTQYiK2z0q3hjOIfqqk=; b=LMgIPxIyrSP5S2jHFDMgoxOZchHkrb9SEFpL6bss6SocEl6L/syF3riv5ZrDH71XESh0wn 08uJ4u1TOIBuAjWO+U14EQ18EedXvnmMFN+yzTg/diyWW+J8GUCUhSMfqrx3oBAa0e7JLq 0TsPgU4R8woOL7Aa1LSOYk5fl6jYt1WKWPEZcGpHZSwUR8+NSnatYiD+MDQsmM+EX/nnMs oRM58bMHWTIPVxpw2XIxpE/m+/f9ShIeBjcHGvj64xVFPV8ZnKTMCin3gOjNkIGhX0nXuZ nViVrI6YUU5TDY1U7F2mAK4i2lPyp7xH5d2nnluEHjdG0utx/ZSu83C9A09bTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765407235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fCzRCqsk3BJimMGINitCtuQcVTQYiK2z0q3hjOIfqqk=; b=uswP14Tl6fZlmjgxOikpAt321r+F10O3qoYzN4qThDOTAY/OxtoMgB3TUZZSA0Yw8qVRCP CtgL0zG0eGQGi0wGjhwLi6JijijtwePEw2g258nmV2NJUDDUlyJ+lv7R+Y3fuWISYAnLdz wasHLHugx03sa28YnlVuiA5tDhvWWpcYIVOJcoYdXpnYRGTz8mBZTZxzPxv2JzqB1NavB8 wnmy4CK4B0jkufp+oK5vHqN8DjMy7mC0O2CECaEzj6jso8yVEpRo3c1e5v7arJIaHP4095 QmbiC5/MpRWqsm6Vnt9vzJXLnOhfeTKwHNhjjkjbH/bQFC9U9pfxhkOFHB3HBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765407235; a=rsa-sha256; cv=none; b=r7ptdY3s2wVKw21NCocQTCi8aC8bUQLq1rCex+fPLzlSAvxEEWiZu65f+pfwoUnIMMI+YJ Z26pkZ+EN2gSIvlHTAcY8VANeJlhTqYIqBPZAWFKEbpOAnVkvkyWWvJOz7B3nQa8SiZEJ7 ZSXCPPrf/F99S+4ji8G5ZTc4bTVHWB0WZhbNeJbRSI+lERt/5Qj1C9pX5lCqDO8XZNQikG 9GlEF8rGu7kj0sbR68JYu6M/vtgosGhtUDK/rIRxqNjNLnSzFBfFjzYk4j9B20w3LMqIGa Ia3l96A4uPn7SEk/Erfcn8tnJOS1hZCTGE2gZJ7PXbsbbnZGll9rowimhWbXjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRWH664sCz14s1 for ; Wed, 10 Dec 2025 22:53:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id b2a3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 22:53:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: aed44717a160 - main - nvd: Connect nvme_if methods List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: aed44717a1606e4c5c79f7c8831de49cba64d7e6 Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 22:53:54 +0000 Message-Id: <6939fa02.b2a3.323cdf4@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=aed44717a1606e4c5c79f7c8831de49cba64d7e6 commit aed44717a1606e4c5c79f7c8831de49cba64d7e6 Author: Warner Losh AuthorDate: 2025-12-10 22:52:38 +0000 Commit: Warner Losh CommitDate: 2025-12-10 22:52:38 +0000 nvd: Connect nvme_if methods Conenct methods to manage namespaces explicitly to replace the old consumer interface. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D51388 --- sys/dev/nvd/nvd.c | 237 +++++++++++++++++++++++++------------------- sys/dev/nvme/nvme.c | 36 ------- sys/dev/nvme/nvme_ctrlr.c | 45 ++++++--- sys/dev/nvme/nvme_if.m | 2 +- sys/dev/nvme/nvme_private.h | 2 - sys/modules/nvd/Makefile | 2 +- 6 files changed, 167 insertions(+), 157 deletions(-) diff --git a/sys/dev/nvd/nvd.c b/sys/dev/nvd/nvd.c index fef3d1a1bc92..d96a752a12d9 100644 --- a/sys/dev/nvd/nvd.c +++ b/sys/dev/nvd/nvd.c @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -47,6 +48,8 @@ #include +#include "nvme_if.h" + #define NVD_STR "nvd" struct nvd_disk; @@ -385,17 +388,96 @@ nvd_bioq_process(void *arg, int pending) } } -static void -nvd_new_disk(struct nvme_namespace *ns, struct nvd_controller *ctrlr) +static int +nvdc_controller_failed(device_t dev) +{ + struct nvd_controller *nvd_ctrlr = device_get_softc(dev); + struct nvd_disk *ndisk; + + mtx_lock(&nvd_lock); + TAILQ_REMOVE(&ctrlr_head, nvd_ctrlr, tailq); + TAILQ_FOREACH(ndisk, &nvd_ctrlr->disk_head, ctrlr_tailq) + nvd_gone(ndisk); + while (!TAILQ_EMPTY(&nvd_ctrlr->disk_head)) + msleep(&nvd_ctrlr->disk_head, &nvd_lock, 0, "nvd_fail", 0); + mtx_unlock(&nvd_lock); + return (0); +} + +static int +nvdc_probe(device_t dev) +{ + if (!nvme_use_nvd) + return (ENXIO); + + device_set_desc(dev, "nvme storage namespace"); + return (BUS_PROBE_DEFAULT); +} + +static int +nvdc_attach(device_t dev) +{ + struct nvd_controller *nvd_ctrlr = device_get_softc(dev); + struct nvme_controller *ctrlr = device_get_ivars(dev); + + nvd_ctrlr->ctrlr = ctrlr; + TAILQ_INIT(&nvd_ctrlr->disk_head); + mtx_lock(&nvd_lock); + TAILQ_INSERT_TAIL(&ctrlr_head, nvd_ctrlr, tailq); + mtx_unlock(&nvd_lock); + + return (0); +} + +static int +nvdc_detach(device_t dev) +{ + return (nvdc_controller_failed(dev)); +} + +static struct nvd_disk * +nvd_nsid_to_disk(struct nvd_controller *nvd_ctrlr, uint32_t nsid) +{ + struct nvd_disk *ndisk; + + mtx_lock(&nvd_lock); + TAILQ_FOREACH(ndisk, &nvd_ctrlr->disk_head, ctrlr_tailq) { + if (ndisk->ns->id != nsid) + continue; + break; + } + mtx_unlock(&nvd_lock); + return ndisk; +} + +static struct nvd_disk * +nvd_ns_to_disk(struct nvd_controller *nvd_ctrlr, struct nvme_namespace *ns) { + struct nvd_disk *ndisk; + + mtx_lock(&nvd_lock); + TAILQ_FOREACH(ndisk, &nvd_ctrlr->disk_head, ctrlr_tailq) { + if (ndisk->ns != ns) + continue; + break; + } + mtx_unlock(&nvd_lock); + return ndisk; +} + +static int +nvdc_ns_added(device_t dev, struct nvme_namespace *ns) +{ + struct nvd_controller *nvd_ctrlr = device_get_softc(dev); + struct nvd_disk *ndisk; uint8_t descr[NVME_MODEL_NUMBER_LENGTH+1]; - struct nvd_disk *ndisk, *tnd; + struct nvd_disk *tnd; struct disk *disk; - device_t dev = ctrlr->ctrlr->dev; - int unit; + device_t pdev = nvd_ctrlr->ctrlr->dev; + int unit; ndisk = malloc(sizeof(struct nvd_disk), M_NVD, M_ZERO | M_WAITOK); - ndisk->ctrlr = ctrlr; + ndisk->ctrlr = nvd_ctrlr; ndisk->ns = ns; ndisk->cur_depth = 0; ndisk->ordered_in_flight = 0; @@ -415,7 +497,7 @@ nvd_new_disk(struct nvme_namespace *ns, struct nvd_controller *ctrlr) TAILQ_INSERT_BEFORE(tnd, ndisk, global_tailq); else TAILQ_INSERT_TAIL(&disk_head, ndisk, global_tailq); - TAILQ_INSERT_TAIL(&ctrlr->disk_head, ndisk, ctrlr_tailq); + TAILQ_INSERT_TAIL(&nvd_ctrlr->disk_head, ndisk, ctrlr_tailq); mtx_unlock(&nvd_lock); ndisk->tq = taskqueue_create("nvd_taskq", M_WAITOK, @@ -464,14 +546,14 @@ nvd_new_disk(struct nvme_namespace *ns, struct nvd_controller *ctrlr) * which has no access to the config space for this controller, report * the AHCI controller's data. */ - if (ctrlr->ctrlr->quirks & QUIRK_AHCI) - dev = device_get_parent(dev); - disk->d_hba_vendor = pci_get_vendor(dev); - disk->d_hba_device = pci_get_device(dev); - disk->d_hba_subvendor = pci_get_subvendor(dev); - disk->d_hba_subdevice = pci_get_subdevice(dev); + if (nvd_ctrlr->ctrlr->quirks & QUIRK_AHCI) + pdev = device_get_parent(pdev); + disk->d_hba_vendor = pci_get_vendor(pdev); + disk->d_hba_device = pci_get_device(pdev); + disk->d_hba_subvendor = pci_get_subvendor(pdev); + disk->d_hba_subdevice = pci_get_subdevice(pdev); disk->d_rotation_rate = DISK_RR_NON_ROTATING; - strlcpy(disk->d_attachment, device_get_nameunit(dev), + strlcpy(disk->d_attachment, device_get_nameunit(pdev), sizeof(disk->d_attachment)); disk_create(disk, DISK_VERSION); @@ -481,14 +563,35 @@ nvd_new_disk(struct nvme_namespace *ns, struct nvd_controller *ctrlr) (uintmax_t)disk->d_mediasize / (1024*1024), (uintmax_t)disk->d_mediasize / disk->d_sectorsize, disk->d_sectorsize); + + return (0); } -#if 0 -static void -nvd_resize(struct nvd_disk *ndisk) +static int +nvdc_ns_removed(device_t dev, struct nvme_namespace *ns) { - struct disk *disk = ndisk->disk; - struct nvme_namespace *ns = ndisk->ns; + struct nvd_controller *nvd_ctrlr = device_get_softc(dev); + struct nvd_disk *ndisk = nvd_ns_to_disk(nvd_ctrlr, ns); + + if (ndisk == NULL) + panic("nvdc: no namespace found for ns %p", ns); + nvd_gone(ndisk); + /* gonecb removes it from the list -- no need to wait */ + return (0); +} + +static int +nvdc_ns_changed(device_t dev, uint32_t nsid) +{ + struct nvd_controller *nvd_ctrlr = device_get_softc(dev); + struct nvd_disk *ndisk = nvd_nsid_to_disk(nvd_ctrlr, nsid); + struct disk *disk; + struct nvme_namespace *ns; + + if (ndisk == NULL) + panic("nvdc: no namespace found for %d", nsid); + disk = ndisk->disk; + ns = ndisk->ns; disk->d_sectorsize = nvme_ns_get_sector_size(ns); disk->d_mediasize = (off_t)nvme_ns_get_size(ns); @@ -504,98 +607,28 @@ nvd_resize(struct nvd_disk *ndisk) (uintmax_t)disk->d_mediasize / (1024*1024), (uintmax_t)disk->d_mediasize / disk->d_sectorsize, disk->d_sectorsize); -} -#endif - -static int -nvdc_fail(device_t dev) -{ - return ENXIO; -} - -#if 0 -static void * -nvd_ns_changed(struct nvme_namespace *ns, void *ctrlr_arg) -{ - struct nvd_disk *ndisk; - struct nvd_controller *ctrlr = ctrlr_arg; - - if ((ns->flags & NVME_NS_DELTA) == 0) { - nvd_new_disk(ns, ctrlr_arg); - return (ctrlr_arg); - } - - mtx_lock(&nvd_lock); - TAILQ_FOREACH(ndisk, &ctrlr->disk_head, ctrlr_tailq) { - if (ndisk->ns->id != ns->id) - continue; - nvd_resize(ndisk); - break; - } - mtx_unlock(&nvd_lock); - return (ctrlr_arg); -} - -static void -nvd_controller_fail(void *ctrlr_arg) -{ - struct nvd_controller *ctrlr = ctrlr_arg; - struct nvd_disk *ndisk; - - mtx_lock(&nvd_lock); - TAILQ_REMOVE(&ctrlr_head, ctrlr, tailq); - TAILQ_FOREACH(ndisk, &ctrlr->disk_head, ctrlr_tailq) - nvd_gone(ndisk); - while (!TAILQ_EMPTY(&ctrlr->disk_head)) - msleep(&ctrlr->disk_head, &nvd_lock, 0, "nvd_fail", 0); - mtx_unlock(&nvd_lock); -} -#endif - -static int -nvdc_probe(device_t dev) -{ - if (!nvme_use_nvd) - return (ENXIO); - - device_set_desc(dev, "nvme storage namespace"); - return (BUS_PROBE_DEFAULT); -} - -static int -nvdc_attach(device_t dev) -{ - struct nvd_controller *nvd_ctrlr = device_get_softc(dev); - struct nvme_controller *ctrlr = device_get_ivars(dev); - - nvd_ctrlr->ctrlr = ctrlr; - TAILQ_INIT(&nvd_ctrlr->disk_head); - mtx_lock(&nvd_lock); - TAILQ_INSERT_TAIL(&ctrlr_head, nvd_ctrlr, tailq); - mtx_unlock(&nvd_lock); - - for (int i = 0; i < min(ctrlr->cdata.nn, NVME_MAX_NAMESPACES); i++) { - struct nvme_namespace *ns = &ctrlr->ns[i]; - - if (ns->data.nsze == 0) - continue; - nvd_new_disk(ns, nvd_ctrlr); - } - return (0); } static int -nvdc_detach(device_t dev) +nvdc_handle_aen(device_t dev, const struct nvme_completion *cpl, + uint32_t pg_nr, void *page, uint32_t page_len) { - return (nvdc_fail(dev)); + /* Do nothing */ + return (0); } static device_method_t nvdc_methods[] = { /* Device interface */ - DEVMETHOD(device_probe, nvdc_probe), - DEVMETHOD(device_attach, nvdc_attach), - DEVMETHOD(device_detach, nvdc_detach), + DEVMETHOD(device_probe, nvdc_probe), + DEVMETHOD(device_attach, nvdc_attach), + DEVMETHOD(device_detach, nvdc_detach), + /* Nvme controller messages */ + DEVMETHOD(nvme_ns_added, nvdc_ns_added), + DEVMETHOD(nvme_ns_removed, nvdc_ns_removed), + DEVMETHOD(nvme_ns_changed, nvdc_ns_changed), + DEVMETHOD(nvme_controller_failed, nvdc_controller_failed), + DEVMETHOD(nvme_handle_aen, nvdc_handle_aen), { 0, 0 } }; diff --git a/sys/dev/nvme/nvme.c b/sys/dev/nvme/nvme.c index 7788889ae591..3ff64c781884 100644 --- a/sys/dev/nvme/nvme.c +++ b/sys/dev/nvme/nvme.c @@ -170,18 +170,6 @@ nvme_notify(struct nvme_consumer *cons, } } -void -nvme_notify_new_controller(struct nvme_controller *ctrlr) -{ - int i; - - for (i = 0; i < NVME_MAX_CONSUMERS; i++) { - if (nvme_consumer[i].id != INVALID_CONSUMER_ID) { - nvme_notify(&nvme_consumer[i], ctrlr); - } - } -} - static void nvme_notify_new_consumer(struct nvme_consumer *cons) { @@ -247,30 +235,6 @@ nvme_notify_fail_consumers(struct nvme_controller *ctrlr) } } -void -nvme_notify_ns(struct nvme_controller *ctrlr, int nsid) -{ - struct nvme_consumer *cons; - struct nvme_namespace *ns; - void *ctrlr_cookie; - uint32_t i; - - KASSERT(nsid <= NVME_MAX_NAMESPACES, - ("%s: Namespace notification to nsid %d exceeds range\n", - device_get_nameunit(ctrlr->dev), nsid)); - - if (!ctrlr->is_initialized) - return; - - ns = &ctrlr->ns[nsid - 1]; - for (i = 0; i < NVME_MAX_CONSUMERS; i++) { - cons = &nvme_consumer[i]; - if (cons->id != INVALID_CONSUMER_ID && cons->ns_fn != NULL && - (ctrlr_cookie = ctrlr->cons_cookie[i]) != NULL) - ns->cons_cookie[i] = (*cons->ns_fn)(ns, ctrlr_cookie); - } -} - struct nvme_consumer * nvme_register_consumer(nvme_cons_ns_fn_t ns_fn, nvme_cons_ctrlr_fn_t ctrlr_fn, nvme_cons_async_fn_t async_fn, diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 50753f06c4e2..7a449fdc4727 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -48,6 +48,8 @@ #include "nvme_private.h" #include "nvme_linux.h" +#include "nvme_if.h" + #define B4_CHK_RDY_DELAY_MS 2300 /* work around controller bug */ static void nvme_ctrlr_construct_and_submit_aer(struct nvme_controller *ctrlr, @@ -1082,10 +1084,20 @@ nvme_ctrlr_start_config_hook(void *arg) device_t child; ctrlr->is_initialized = true; - nvme_notify_new_controller(ctrlr); child = device_add_child(ctrlr->dev, NULL, DEVICE_UNIT_ANY); device_set_ivars(child, ctrlr); bus_attach_children(ctrlr->dev); + + /* + * Now notify the child of all the known namepsaces + */ + for (int i = 0; i < min(ctrlr->cdata.nn, NVME_MAX_NAMESPACES); i++) { + struct nvme_namespace *ns = &ctrlr->ns[i]; + + if (ns->data.nsze == 0) + continue; + NVME_NS_ADDED(child, ns); + } } TSEXIT(); } @@ -1223,23 +1235,26 @@ nvme_ctrlr_aer_task(void *arg, int pending) nvme_ctrlr_cmd_set_async_event_config(aer->ctrlr, aer->ctrlr->async_event_config, NULL, NULL); } else if (aer->log_page_id == NVME_LOG_CHANGED_NAMESPACE) { - struct nvme_ns_list *nsl = - (struct nvme_ns_list *)aer->log_page_buffer; - struct nvme_controller *ctrlr = aer->ctrlr; + device_t *children; + int n_children; + struct nvme_ns_list *nsl; + if (device_get_children(aer->ctrlr->dev, &children, &n_children) != 0) { + children = NULL; + n_children = 0; + } + nsl = (struct nvme_ns_list *)aer->log_page_buffer; for (int i = 0; i < nitems(nsl->ns) && nsl->ns[i] != 0; i++) { - struct nvme_namespace *ns; - uint32_t id = nsl->ns[i]; - - if (nsl->ns[i] > NVME_MAX_NAMESPACES) - break; - - ns = &ctrlr->ns[id - 1]; - ns->flags |= NVME_NS_DELTA; - nvme_ns_construct(ns, id, ctrlr); - nvme_notify_ns(ctrlr, id); - ns->flags &= ~NVME_NS_DELTA; + /* + * I think we need to query the name space here and see + * if it went away, arrived, or changed in size and call + * the nuanced routine (after constructing or before + * destructing the namespace). XXX needs more work XXX. + */ + for (int j = 0; j < n_children; j++) + NVME_NS_CHANGED(children[j], nsl->ns[i]); } + free(children, M_TEMP); } /* diff --git a/sys/dev/nvme/nvme_if.m b/sys/dev/nvme/nvme_if.m index a89381d165f7..5a06ff112f4c 100644 --- a/sys/dev/nvme/nvme_if.m +++ b/sys/dev/nvme/nvme_if.m @@ -33,7 +33,7 @@ METHOD int ns_removed { # METHOD int ns_changed { device_t dev; /* nvme device */ - struct nvme_namespace *ns; /* information about the namespace */ + uint32_t nsid; /* nsid that just changed */ }; # diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index a425a6a5ad62..cd0ef444150f 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -561,8 +561,6 @@ void nvme_notify_async_consumers(struct nvme_controller *ctrlr, uint32_t log_page_id, void *log_page_buffer, uint32_t log_page_size); void nvme_notify_fail_consumers(struct nvme_controller *ctrlr); -void nvme_notify_new_controller(struct nvme_controller *ctrlr); -void nvme_notify_ns(struct nvme_controller *ctrlr, int nsid); void nvme_ctrlr_shared_handler(void *arg); void nvme_ctrlr_poll(struct nvme_controller *ctrlr); diff --git a/sys/modules/nvd/Makefile b/sys/modules/nvd/Makefile index 08b2d61859e9..84bffa71942e 100644 --- a/sys/modules/nvd/Makefile +++ b/sys/modules/nvd/Makefile @@ -1,6 +1,6 @@ .PATH: ${SRCTOP}/sys/dev/nvd KMOD= nvd -SRCS= nvd.c opt_geom.h device_if.h bus_if.h pci_if.h +SRCS= nvd.c opt_geom.h device_if.h bus_if.h nvme_if.h pci_if.h .include From nobody Wed Dec 10 22:53:55 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRWH82hp8z6JqWJ for ; Wed, 10 Dec 2025 22:53:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRWH80k36z3Pn4 for ; Wed, 10 Dec 2025 22:53:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765407236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bf7R4EkotuRYqRojiawPTjMWwJnuVOLR4Hyap25w5R8=; b=kvhTo3jk3/FkObBPnNvkxjy3I1Xun9ERg1GPMr0shJandB1nEyZQ5lKL8lnPLfkvEnIdc1 olyUaSmbbO5AAgz8nM1HxmfssiVcZ6WAQ0I02FgN5AM9EUUXS6rYOEbPeHfgtccsDizVpO pobDhdD0E9bF0vX/QnD4q27lFldxMA2Fas1+4HII63GD8/j872n4pkmjAHZP/g2Bq/7F1d kajiSJ+C/P9QcFDg+evYooStYsSd2za4r7ZZUViwJ+MoyuHExaqlV4Yrx31nu/0siqTDQb lwP7NkTpYDR27omdsFKvczCHicOvkgVkcSJzHoyj0eN7ZC8Vm13tMfDCnT+FBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765407236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bf7R4EkotuRYqRojiawPTjMWwJnuVOLR4Hyap25w5R8=; b=JgTHQPt89b8huLSu6jS7Wt540DuxhxpjU1CW4iOpn+yNnRao6bF+Hh1iY9+25Cj94pd8Nx IDIOfQbVSHG789G7hgzBgZZgsOWS2/7dc28BKPLv7w5tC3TowsxqRQaApbVj2uoaIABpVX uQJ6d89LW1B6kLJgLXesEf2zDDbQV+Y2l1JT0rpjrfgmkHm4TP69js4TgdHhY52NFo6bJy N1XoKvmoaSkOynjzANAY8TCyUaUUiRkzHGXpMMEnTNVNvQpkVhc8VeMeogxBGpOISv/TDm o069hd9O6++7ahgXb6YccZNdsGEcfP7TUOuC2UleJuVkD/Nd+7SXyRun876y0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765407236; a=rsa-sha256; cv=none; b=Ff1uLjpccReaW0trf7zbfWBFpGUk7Q19Fsdm1ZOM+ryG+PUqM8APUKZUeCrE/04t2o4QTE JXZgtTbfy3cHCOxMN2ba6ueiBEzseiA33RbPymlHJJ8r4AZdhHlk2QnyW4AuoWTH5/d+66 gT+wR7c1GF4E5XZoZFBXIe2KsGfMd/o37q6kEVdas5pxcomAsIuvhE8EqDZZvWOxbbujkr ZxN3JDrrxq8FqoLMkNqTpZ64Douq1gPOXJV/RPkaon9uWy9N+KidHQqL8qdGLWNxTjAp6z tzxEKqBOCKbCEDWksvJynQz62LTr/tLHQV50jfawhPP4hDJXfw6M8tZrXnm7IA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRWH76vbPz14s3 for ; Wed, 10 Dec 2025 22:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id a57e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 22:53:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 9b170dc457a4 - main - nvme: Use new method to do async notifications List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 9b170dc457a46d3ec3b329116fcd6851fe9b63a0 Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 22:53:55 +0000 Message-Id: <6939fa03.a57e.2d3336d8@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9b170dc457a46d3ec3b329116fcd6851fe9b63a0 commit 9b170dc457a46d3ec3b329116fcd6851fe9b63a0 Author: Warner Losh AuthorDate: 2025-12-10 22:52:45 +0000 Commit: Warner Losh CommitDate: 2025-12-10 22:52:45 +0000 nvme: Use new method to do async notifications Nothing uses these at the moment, but it would be useful to use in the future so convert this functionality to an newbus function dispatch. Sponsored by: Netflix Reviewed by: dab Differential Revision: https://reviews.freebsd.org/D51390 --- sys/dev/nvme/nvme.c | 29 ++++++++++++++--------------- sys/dev/nvme/nvme_ctrlr.c | 11 +++++------ sys/dev/nvme/nvme_private.h | 8 ++++---- 3 files changed, 23 insertions(+), 25 deletions(-) diff --git a/sys/dev/nvme/nvme.c b/sys/dev/nvme/nvme.c index 3ff64c781884..dcd0851dd56a 100644 --- a/sys/dev/nvme/nvme.c +++ b/sys/dev/nvme/nvme.c @@ -34,6 +34,7 @@ #include #include "nvme_private.h" +#include "nvme_if.h" struct nvme_consumer { uint32_t id; @@ -189,23 +190,21 @@ nvme_notify_new_consumer(struct nvme_consumer *cons) } void -nvme_notify_async_consumers(struct nvme_controller *ctrlr, - const struct nvme_completion *async_cpl, - uint32_t log_page_id, void *log_page_buffer, - uint32_t log_page_size) +nvme_notify_async(struct nvme_controller *ctrlr, + const struct nvme_completion *async_cpl, + uint32_t log_page_id, void *log_page_buffer, uint32_t log_page_size) { - struct nvme_consumer *cons; - void *ctrlr_cookie; - uint32_t i; + device_t *children; + int n_children; - for (i = 0; i < NVME_MAX_CONSUMERS; i++) { - cons = &nvme_consumer[i]; - if (cons->id != INVALID_CONSUMER_ID && cons->async_fn != NULL && - (ctrlr_cookie = ctrlr->cons_cookie[i]) != NULL) { - (*cons->async_fn)(ctrlr_cookie, async_cpl, - log_page_id, log_page_buffer, log_page_size); - } - } + if (device_get_children(ctrlr->dev, &children, &n_children) != 0) + return; + + for (int i = 0; i < n_children; i++) + NVME_HANDLE_AEN(children[i], async_cpl, log_page_id, + log_page_buffer, log_page_size); + + free(children, M_TEMP); } void diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 7a449fdc4727..2f28d8f5cb7f 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -1154,8 +1154,7 @@ nvme_ctrlr_aer_task(void *arg, int pending) * Repost another asynchronous event request to replace the one * that just completed. */ - nvme_notify_async_consumers(ctrlr, &aer->cpl, aer->log_page_id, - NULL, 0); + nvme_notify_async(ctrlr, &aer->cpl, aer->log_page_id, NULL, 0); nvme_ctrlr_construct_and_submit_aer(ctrlr, aer); goto out; } @@ -1180,8 +1179,8 @@ nvme_ctrlr_aer_task(void *arg, int pending) * error, don't pass log page data to the consumers. In * practice, this case should never happen. */ - nvme_notify_async_consumers(aer->ctrlr, &aer->cpl, - aer->log_page_id, NULL, 0); + nvme_notify_async(aer->ctrlr, &aer->cpl, aer->log_page_id, + NULL, 0); goto out; } @@ -1261,8 +1260,8 @@ nvme_ctrlr_aer_task(void *arg, int pending) * Pass the cpl data from the original async event completion, not the * log page fetch. */ - nvme_notify_async_consumers(aer->ctrlr, &aer->cpl, - aer->log_page_id, aer->log_page_buffer, aer->log_page_size); + nvme_notify_async(aer->ctrlr, &aer->cpl, aer->log_page_id, + aer->log_page_buffer, aer->log_page_size); /* * Repost another asynchronous event request to replace the one diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index cd0ef444150f..27d70d120307 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -556,10 +556,10 @@ nvme_allocate_request_ccb(union ccb *ccb, const int how, nvme_cb_fn_t cb_fn, #define nvme_free_request(req) free(req, M_NVME) -void nvme_notify_async_consumers(struct nvme_controller *ctrlr, - const struct nvme_completion *async_cpl, - uint32_t log_page_id, void *log_page_buffer, - uint32_t log_page_size); +void nvme_notify_async(struct nvme_controller *ctrlr, + const struct nvme_completion *async_cpl, + uint32_t log_page_id, void *log_page_buffer, + uint32_t log_page_size); void nvme_notify_fail_consumers(struct nvme_controller *ctrlr); void nvme_ctrlr_shared_handler(void *arg); From nobody Wed Dec 10 22:53:57 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRWH924YXz6JqY4 for ; Wed, 10 Dec 2025 22:53:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRWH90l4wz3PWB for ; Wed, 10 Dec 2025 22:53:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765407237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6LMYpKNt0ejBgGdBhpxzsVRJsJCtVSJbLf4U1hgHK2I=; b=ekMQR80/ZEtlnKXD+QKJXAHDrgDotj0FXX/Fjpr/wH9evS+PXY7VUN+2ZnOAmPcB6KCVtj 9C6rJqg1R5/70AuKWPXsjaRUwlZAODB+5S8pYFtW1OmxAezzH7tImuAkr/iPUr2845wAJu KMtUg60SS8C7geGNxCdBRriCnZppQnWA2frU/rS4YgdCudl0xLWSQWRsD+f6q3/wnSJb1U a49pyEi3CTp+SuqORURIYAdyz6QIhyIBtdoDInY9eEDyb7lKwgNzFJ02CDQ40UOxPj7nm/ L/OzcHYIzsd4hkCxUAOZYb4B6bTiD1tz48R4+f9b/y0JQ/dqN1bifkweUn/xqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765407237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6LMYpKNt0ejBgGdBhpxzsVRJsJCtVSJbLf4U1hgHK2I=; b=M80HWBvSAp6d9UE5ouqTjCchFmh729FB3ef77bjo/O0r0oEZn7GbRMDHjqwK0tDCmm+77H 9lzLwHmbMsaUBS2Ok7KfeU0eJ4NUAQga2watNzhssccovgO1dNNUcEhxSya5fxllqnzi7t pYZlZNOaeNWwhU20Iu5EdXJP57sc35wBLERS6xfur+WN11mEd3ykvrNpzLLlyTFLuhIP19 uzCR8QLkS/sfA/gI0lYFIUn1O9+TjjC+Zjykf6hPmtKx6zIO+C4zfSVqJqWCT0Viz5jpMS hF8Jp7OYXAHoIfoHq85e95s/hjMnZNAI2Ut7zsFmv9irq4Lmr9IGoaRhE55MkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765407237; a=rsa-sha256; cv=none; b=K6/0kczLaHNPOplg1d47/aTl4I4S8L9U9GWRRWk/vVbTrofzGEw6VIx4TvV7d+NRBRPjgU w7xioOyBzwzk3xfi5MJjOyECJiTxRrLFT4dlHq4J+IUhBIBIOEYvSG5l05YZrxWdK9txc/ 1YPLIWMHIf17+08xZhNOWg/SmWO6KNTJmVTgJzpmPudPovspXcuiD5brxSS9WOkQGg2Xkt vFeU/eUIEmb/Pqz37CkuIbEKZgHXqLiPVm47eXvPlHd+sNB6qUeiofbPtjVNiuSLSQyHjk Q8ZKZE6eXYkCDqX5AvsHk3vhAF8mlU1rn/wDvLwo2A6OfRcnk8z7G8PU4HbIsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRWH90Hxfz143D for ; Wed, 10 Dec 2025 22:53:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id a0df by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 22:53:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: b6b52a9b8011 - main - nvme: Notify failure with newbus call List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: b6b52a9b8011d9893899ecad87948ef346858960 Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 22:53:57 +0000 Message-Id: <6939fa05.a0df.57d52f01@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b6b52a9b8011d9893899ecad87948ef346858960 commit b6b52a9b8011d9893899ecad87948ef346858960 Author: Warner Losh AuthorDate: 2025-12-10 22:52:53 +0000 Commit: Warner Losh CommitDate: 2025-12-10 22:52:53 +0000 nvme: Notify failure with newbus call Sponsored by: Netflix Reviewed by: dab Differential Revision: https://reviews.freebsd.org/D51391 --- sys/dev/nvme/nvme.c | 23 ++++++++++------------- sys/dev/nvme/nvme_ctrlr.c | 4 ++-- sys/dev/nvme/nvme_private.h | 2 +- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/sys/dev/nvme/nvme.c b/sys/dev/nvme/nvme.c index dcd0851dd56a..2571c6fe2973 100644 --- a/sys/dev/nvme/nvme.c +++ b/sys/dev/nvme/nvme.c @@ -208,11 +208,10 @@ nvme_notify_async(struct nvme_controller *ctrlr, } void -nvme_notify_fail_consumers(struct nvme_controller *ctrlr) +nvme_notify_fail(struct nvme_controller *ctrlr) { - struct nvme_consumer *cons; - void *ctrlr_cookie; - uint32_t i; + device_t *children; + int n_children; /* * This controller failed during initialization (i.e. IDENTIFY @@ -223,15 +222,13 @@ nvme_notify_fail_consumers(struct nvme_controller *ctrlr) if (!ctrlr->is_initialized) return; - for (i = 0; i < NVME_MAX_CONSUMERS; i++) { - cons = &nvme_consumer[i]; - if (cons->id != INVALID_CONSUMER_ID && - (ctrlr_cookie = ctrlr->cons_cookie[i]) != NULL) { - ctrlr->cons_cookie[i] = NULL; - if (cons->fail_fn != NULL) - cons->fail_fn(ctrlr_cookie); - } - } + if (device_get_children(ctrlr->dev, &children, &n_children) != 0) + return; + + for (int i = 0; i < n_children; i++) + NVME_CONTROLLER_FAILED(children[i]); + + free(children, M_TEMP); } struct nvme_consumer * diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 2f28d8f5cb7f..6b875060d4b1 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -256,7 +256,7 @@ nvme_ctrlr_fail(struct nvme_controller *ctrlr, bool admin_also) nvme_qpair_fail(&ctrlr->ioq[i]); } } - nvme_notify_fail_consumers(ctrlr); + nvme_notify_fail(ctrlr); } /* @@ -1723,7 +1723,7 @@ nvme_ctrlr_destruct(struct nvme_controller *ctrlr, device_t dev) if (gone) nvme_ctrlr_fail(ctrlr, true); else - nvme_notify_fail_consumers(ctrlr); + nvme_notify_fail(ctrlr); for (i = 0; i < NVME_MAX_NAMESPACES; i++) nvme_ns_destruct(&ctrlr->ns[i]); diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index 27d70d120307..04756c6c74a7 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -560,7 +560,7 @@ void nvme_notify_async(struct nvme_controller *ctrlr, const struct nvme_completion *async_cpl, uint32_t log_page_id, void *log_page_buffer, uint32_t log_page_size); -void nvme_notify_fail_consumers(struct nvme_controller *ctrlr); +void nvme_notify_fail(struct nvme_controller *ctrlr); void nvme_ctrlr_shared_handler(void *arg); void nvme_ctrlr_poll(struct nvme_controller *ctrlr); From nobody Wed Dec 10 22:53:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRWHB4Lftz6JqWS for ; Wed, 10 Dec 2025 22:53:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRWHB1B0Xz3Pc8 for ; Wed, 10 Dec 2025 22:53:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765407238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HkC8ImcduR6pya7N/KVwQHrpR4O9KqP25t497rZqGIk=; b=fZj6Nqp2CQvkb6wffwP/S5W2IaWCbTmKPSbPdkO/ZzIzUr74MwWmNaxiwURw8wwvPnW7BS amBHoKMMctcbiMGfoofOaqeAw+khhahVuO6+mACK8hvcPRUi3JnL8U7PaR+0FYMzDbRWf6 Vm9cH23hG1XaTkfqs9fMm+LswzKL9f9URRGY0TnapCdNj7ETf9Daj404YA2HFnFhBuOff8 5T3nnTjwgMUkkdWAK5zoTUPduhfjuevD8M0JoFW4Aa5xiQ9D7mHTlfGDwpmyrYb56C45pY FnGXkCwgd/ctoe08owji9lRAYVYgnU/KmlKolEUKfy0T2/UCQ/l1C0qErGN1bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765407238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HkC8ImcduR6pya7N/KVwQHrpR4O9KqP25t497rZqGIk=; b=VeviDzpr4SYLjcwovRfzp/knqnljJBBwdVthVaJnnUNAc1i5PWH27ncBIwvpqiasrk8OHC eui2z2zUWtlSzooriIGhd/o/I7Z1poW/VhXlNzxHk6En+gr49BKoOmQ5Edf27sHxtQYovO euJcAe237S/lZsKtwVhpjsfYXE5RZecm33pUYWnF8MZGDwe72WX/k9c8nzftzYwJe1EwBS YyLGCCFqO9gRCSN3SZ0lqfhMkJpjMEZ/aybKtoyY1HVldMNunaTrk+YnwrsTKBPNtSPNeQ kQBpxt376VSrFlKdkmBkYovSlsbfRwRki+jZ/XWSCRKSdoCMd71jzPKHLfu1sQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765407238; a=rsa-sha256; cv=none; b=ir3ViPtLJGeNT0K1S87k/Ob5UEklOHFLyBaBodzpibM3zUnwrWDYzxEdXViakFs/Xq0Y6y NYpPGIZ6k0z9b1CPL9SdzZkF/5NOhIwl5T+I7evlkYAxJq5iNtSEY3XY1B9wKbSr6Dd2Mv cO57uv8OssvrIWaH2U5NDKveNoGVDCQRIwSszAzQ2DWWpZbS0ugHyHbobVaEGeBsYN+++l vicSAjiZojtgXQ82IQAAGXkZnkQMJo+4+r5N8b7PAfavKTxiL9OTiWqORrsnGqSSzkx+rC oZl3P+v0JMpo4nQUmncKlF6imVwqv6N9FfRe4hD4Ie6xxJnYaGMZ5CM8h018Xw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRWHB0nlPz14fS for ; Wed, 10 Dec 2025 22:53:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id a84b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 22:53:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 848602856f49 - main - nvme: remove now-redundant consumer interface List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 848602856f49c3937b8c6d168fd988263954b43a Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 22:53:58 +0000 Message-Id: <6939fa06.a84b.5ec67153@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=848602856f49c3937b8c6d168fd988263954b43a commit 848602856f49c3937b8c6d168fd988263954b43a Author: Warner Losh AuthorDate: 2025-12-10 22:52:59 +0000 Commit: Warner Losh CommitDate: 2025-12-10 22:52:59 +0000 nvme: remove now-redundant consumer interface Now that we've moved to newbus methods, we can delete this... Sponsored by: Netflix Reviewed by: dab Differential Revision: https://reviews.freebsd.org/D54095 --- sys/dev/nvd/nvd.c | 2 - sys/dev/nvme/nvme.c | 133 -------------------------------------------- sys/dev/nvme/nvme.h | 14 ----- sys/dev/nvme/nvme_ctrlr.c | 1 - sys/dev/nvme/nvme_private.h | 5 -- 5 files changed, 155 deletions(-) diff --git a/sys/dev/nvd/nvd.c b/sys/dev/nvd/nvd.c index d96a752a12d9..29c1e012bf24 100644 --- a/sys/dev/nvd/nvd.c +++ b/sys/dev/nvd/nvd.c @@ -174,8 +174,6 @@ nvd_unload(void) } mtx_unlock(&nvd_lock); - nvme_unregister_consumer(consumer_handle); - mtx_destroy(&nvd_lock); } diff --git a/sys/dev/nvme/nvme.c b/sys/dev/nvme/nvme.c index 2571c6fe2973..db50e2b140bc 100644 --- a/sys/dev/nvme/nvme.c +++ b/sys/dev/nvme/nvme.c @@ -36,39 +36,10 @@ #include "nvme_private.h" #include "nvme_if.h" -struct nvme_consumer { - uint32_t id; - nvme_cons_ns_fn_t ns_fn; - nvme_cons_ctrlr_fn_t ctrlr_fn; - nvme_cons_async_fn_t async_fn; - nvme_cons_fail_fn_t fail_fn; -}; - -struct nvme_consumer nvme_consumer[NVME_MAX_CONSUMERS]; -#define INVALID_CONSUMER_ID 0xFFFF - int32_t nvme_retry_count; MALLOC_DEFINE(M_NVME, "nvme", "nvme(4) memory allocations"); -static void -nvme_init(void *dummy __unused) -{ - uint32_t i; - - for (i = 0; i < NVME_MAX_CONSUMERS; i++) - nvme_consumer[i].id = INVALID_CONSUMER_ID; -} - -SYSINIT(nvme_register, SI_SUB_DRIVERS, SI_ORDER_SECOND, nvme_init, NULL); - -static void -nvme_uninit(void *dummy __unused) -{ -} - -SYSUNINIT(nvme_unregister, SI_SUB_DRIVERS, SI_ORDER_SECOND, nvme_uninit, NULL); - int nvme_shutdown(device_t dev) { @@ -117,78 +88,6 @@ nvme_detach(device_t dev) return (0); } -static void -nvme_notify(struct nvme_consumer *cons, - struct nvme_controller *ctrlr) -{ - struct nvme_namespace *ns; - void *ctrlr_cookie; - int cmpset, ns_idx; - - /* - * The consumer may register itself after the nvme devices - * have registered with the kernel, but before the - * driver has completed initialization. In that case, - * return here, and when initialization completes, the - * controller will make sure the consumer gets notified. - */ - if (!ctrlr->is_initialized) - return; - - cmpset = atomic_cmpset_32(&ctrlr->notification_sent, 0, 1); - if (cmpset == 0) - return; - - if (cons->ctrlr_fn != NULL) - ctrlr_cookie = (*cons->ctrlr_fn)(ctrlr); - else - ctrlr_cookie = (void *)(uintptr_t)0xdeadc0dedeadc0de; - ctrlr->cons_cookie[cons->id] = ctrlr_cookie; - - /* ctrlr_fn has failed. Nothing to notify here any more. */ - if (ctrlr_cookie == NULL) { - (void)atomic_cmpset_32(&ctrlr->notification_sent, 1, 0); - return; - } - - if (ctrlr->is_failed) { - ctrlr->cons_cookie[cons->id] = NULL; - if (cons->fail_fn != NULL) - (*cons->fail_fn)(ctrlr_cookie); - /* - * Do not notify consumers about the namespaces of a - * failed controller. - */ - return; - } - for (ns_idx = 0; ns_idx < min(ctrlr->cdata.nn, NVME_MAX_NAMESPACES); ns_idx++) { - ns = &ctrlr->ns[ns_idx]; - if (ns->data.nsze == 0) - continue; - if (cons->ns_fn != NULL) - ns->cons_cookie[cons->id] = - (*cons->ns_fn)(ns, ctrlr_cookie); - } -} - -static void -nvme_notify_new_consumer(struct nvme_consumer *cons) -{ - device_t *devlist; - struct nvme_controller *ctrlr; - int dev_idx, devcount; - - if (devclass_get_devices(devclass_find("nvme"), &devlist, &devcount)) - return; - - for (dev_idx = 0; dev_idx < devcount; dev_idx++) { - ctrlr = DEVICE2SOFTC(devlist[dev_idx]); - nvme_notify(cons, ctrlr); - } - - free(devlist, M_TEMP); -} - void nvme_notify_async(struct nvme_controller *ctrlr, const struct nvme_completion *async_cpl, @@ -231,38 +130,6 @@ nvme_notify_fail(struct nvme_controller *ctrlr) free(children, M_TEMP); } -struct nvme_consumer * -nvme_register_consumer(nvme_cons_ns_fn_t ns_fn, nvme_cons_ctrlr_fn_t ctrlr_fn, - nvme_cons_async_fn_t async_fn, - nvme_cons_fail_fn_t fail_fn) -{ - int i; - - /* - * TODO: add locking around consumer registration. - */ - for (i = 0; i < NVME_MAX_CONSUMERS; i++) - if (nvme_consumer[i].id == INVALID_CONSUMER_ID) { - nvme_consumer[i].id = i; - nvme_consumer[i].ns_fn = ns_fn; - nvme_consumer[i].ctrlr_fn = ctrlr_fn; - nvme_consumer[i].async_fn = async_fn; - nvme_consumer[i].fail_fn = fail_fn; - - nvme_notify_new_consumer(&nvme_consumer[i]); - return (&nvme_consumer[i]); - } - - printf("nvme(4): consumer not registered - no slots available\n"); - return (NULL); -} - -void -nvme_unregister_consumer(struct nvme_consumer *consumer) -{ - consumer->id = INVALID_CONSUMER_ID; -} - void nvme_completion_poll_cb(void *arg, const struct nvme_completion *cpl) { diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index cceff065fb2a..fb2c26b1f344 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -1913,17 +1913,10 @@ struct thread; struct nvme_namespace; struct nvme_controller; -struct nvme_consumer; struct nvme_passthru_cmd; typedef void (*nvme_cb_fn_t)(void *, const struct nvme_completion *); -typedef void *(*nvme_cons_ns_fn_t)(struct nvme_namespace *, void *); -typedef void *(*nvme_cons_ctrlr_fn_t)(struct nvme_controller *); -typedef void (*nvme_cons_async_fn_t)(void *, const struct nvme_completion *, - uint32_t, void *, uint32_t); -typedef void (*nvme_cons_fail_fn_t)(void *); - enum nvme_namespace_flags { NVME_NS_DEALLOCATE_SUPPORTED = 0x01, NVME_NS_FLUSH_SUPPORTED = 0x02, @@ -1977,13 +1970,6 @@ int nvme_ns_cmd_flush(struct nvme_namespace *ns, nvme_cb_fn_t cb_fn, int nvme_ns_dump(struct nvme_namespace *ns, void *virt, off_t offset, size_t len); -/* Registration functions */ -struct nvme_consumer * nvme_register_consumer(nvme_cons_ns_fn_t ns_fn, - nvme_cons_ctrlr_fn_t ctrlr_fn, - nvme_cons_async_fn_t async_fn, - nvme_cons_fail_fn_t fail_fn); -void nvme_unregister_consumer(struct nvme_consumer *consumer); - /* Controller helper functions */ device_t nvme_ctrlr_get_device(struct nvme_controller *ctrlr); const struct nvme_controller_data * diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 6b875060d4b1..7e1a3f02f326 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -1665,7 +1665,6 @@ nvme_ctrlr_construct(struct nvme_controller *ctrlr, device_t dev) ctrlr->is_resetting = 0; ctrlr->is_initialized = false; - ctrlr->notification_sent = 0; TASK_INIT(&ctrlr->reset_task, 0, nvme_ctrlr_reset_task, ctrlr); for (int i = 0; i < NVME_MAX_ASYNC_EVENTS; i++) { struct nvme_async_event_request *aer = &ctrlr->aer[i]; diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index 04756c6c74a7..8837275e2ed5 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -76,7 +76,6 @@ MALLOC_DECLARE(M_NVME); #define NVME_INT_COAL_THRESHOLD (0) /* 0-based */ #define NVME_MAX_NAMESPACES (16) -#define NVME_MAX_CONSUMERS (2) #define NVME_MAX_ASYNC_EVENTS (8) #define NVME_ADMIN_TIMEOUT_PERIOD (60) /* in seconds */ @@ -205,7 +204,6 @@ struct nvme_namespace { uint32_t id; uint32_t flags; struct cdev *cdev; - void *cons_cookie[NVME_MAX_CONSUMERS]; uint32_t boundary; struct mtx lock; }; @@ -299,10 +297,7 @@ struct nvme_controller { uint32_t num_aers; struct nvme_async_event_request aer[NVME_MAX_ASYNC_EVENTS]; - void *cons_cookie[NVME_MAX_CONSUMERS]; - uint32_t is_resetting; - uint32_t notification_sent; u_int fail_on_reset; bool is_failed; From nobody Wed Dec 10 22:53:59 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRWHC58t7z6Jqdr for ; Wed, 10 Dec 2025 22:53:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRWHC2Jd4z3PcM for ; Wed, 10 Dec 2025 22:53:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765407239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1mGpPfjMVWg0kCRMCjAKvpH7XhGMSJaNZTKGlqQaAO4=; b=BnLITaDIoAUp9zVmQ89AzqqNjryac4AKT5JzSfx4XO8yUrHiWM1upTFDLx/9umSX5K7l5I Ze31B37xZi5TGYtSwzeGqAtsa8LC0HgOt0j51ySdzdsh3Vv2vx+9uMv2ifZ5k3IB4+SCDh FpwHNH/p7sdSAMwPQbK96mlzfxm/58wkc8VIW3sUBWJSlrGNWolgtyxkfBd/rlM983Ak65 f97Qkwb+yVOtTwfDOgJE9XMjDGSiFTDllxg57P+il127Ui3pL2M5z/hsT6GmvolQOlzgx4 D+6LCDHEbbiCCCQD1V6BynicHTiDx+QPSNJeSfV0Gv1x3g9pshtyMx94iIWFHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765407239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1mGpPfjMVWg0kCRMCjAKvpH7XhGMSJaNZTKGlqQaAO4=; b=lwKRMrNQvEP5uzHu+LOGt3l63tI7jZipkh9UCDgu8jCavGv0IXvAJQKZ+UbdmIBc/3RdD4 cMzMAsnVqGeSWs5a9cTNH8kb2YpPoPMf3WkNoUi7pxUhDuVh2JQjJAYFQVwwnNu2Ia4p/c vJHMfDA3TjjYqC19XRjrtNeMEciFJhxe1Texx0NirvAUGDvOZeQ/bDf6URRgKRn00+s0sm /l0BAQloGsKvA5/ihycqXdDcyDT+orkjH/P9SymJ4hok+UDZ9x2/eHrB2JUoF6l5nz5dd+ HYh6lRSOWXNub4C7WlzxAJVXE/hpVk1H4hJbJSWJMBCQsKESnXiQ45gFS3IBoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765407239; a=rsa-sha256; cv=none; b=hYmruU9RRLsz3dujcHyhCjKyWQ7C+f6wi9zT8VvSM9fHzKSiTlsybMJKlEzWMVtlKQwn10 GO8t4rD90uVlFUmxfPLgbEm4Fh4G9TN4mNF0dY5sKO5PCc+KxCihJht4KAR0DzLJUEL51C 2hqLwrHxtftN3xGdLfoadpHVIhSKG1YmtgQHI1NXA9xaqAesirsrbIzbbYBdxAc9pyTnGF v8rW1YxQZnj4N0hmyfwKX+mEFYXFWx2sX3NNbSZ4NldVsb0LCrnBJK9byi6L8zTY8Ti5yD cEDmT8f0viUsmUZIrTgexQrHfldmjoqnOY2nuCSXX0nCcgxqvEtXzjWgCpSw2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRWHC1YB7z143F for ; Wed, 10 Dec 2025 22:53:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id b5c4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 10 Dec 2025 22:53:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 0a19464bf7af - main - nvme: Only attach to storage NVMe devices List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 0a19464bf7afa35ce2aa7649152bc3a7629faa98 Auto-Submitted: auto-generated Date: Wed, 10 Dec 2025 22:53:59 +0000 Message-Id: <6939fa07.b5c4.42f70329@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0a19464bf7afa35ce2aa7649152bc3a7629faa98 commit 0a19464bf7afa35ce2aa7649152bc3a7629faa98 Author: Warner Losh AuthorDate: 2025-12-10 22:53:12 +0000 Commit: Warner Losh CommitDate: 2025-12-10 22:53:12 +0000 nvme: Only attach to storage NVMe devices Only attach CAM to the nvme storage devices. Sponsored by: Netflix --- sys/cam/cam_ccb.h | 2 +- sys/dev/nvme/nvme_sim.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/cam/cam_ccb.h b/sys/cam/cam_ccb.h index 19f18f36b8c9..bb23c6bed26f 100644 --- a/sys/cam/cam_ccb.h +++ b/sys/cam/cam_ccb.h @@ -650,7 +650,7 @@ struct ccb_pathinq_settings_nvme { uint8_t bus; uint8_t slot; uint8_t function; - uint8_t extra; + uint8_t progif; char dev_name[NVME_DEV_NAME_LEN]; /* nvme controller dev name for this device */ }; _Static_assert(sizeof(struct ccb_pathinq_settings_nvme) == 64, diff --git a/sys/dev/nvme/nvme_sim.c b/sys/dev/nvme/nvme_sim.c index d134d1daafc3..8b861cf3aa71 100644 --- a/sys/dev/nvme/nvme_sim.c +++ b/sys/dev/nvme/nvme_sim.c @@ -208,7 +208,7 @@ nvme_sim_action(struct cam_sim *sim, union ccb *ccb) cpi->xport_specific.nvme.bus = pci_get_bus(dev); cpi->xport_specific.nvme.slot = pci_get_slot(dev); cpi->xport_specific.nvme.function = pci_get_function(dev); - cpi->xport_specific.nvme.extra = 0; + cpi->xport_specific.nvme.progif = pci_get_progif(dev); strlcpy(cpi->xport_specific.nvme.dev_name, device_get_nameunit(dev), sizeof(cpi->xport_specific.nvme.dev_name)); cpi->hba_vendor = pci_get_vendor(dev); @@ -314,6 +314,13 @@ nvme_sim_probe(device_t dev) { if (nvme_use_nvd) return (ENXIO); + /* + * Only do storage devices with CAM. NVMHCI 1.0 interfaces are the only + * ones that have namespaces with LBA ranges on them. + */ + if (pci_get_progif(device_get_parent(dev)) != + PCIP_STORAGE_NVM_ENTERPRISE_NVMHCI_1_0) + return (ENXIO); device_set_desc(dev, "nvme cam"); return (BUS_PROBE_DEFAULT); From nobody Thu Dec 11 00:46:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRYnS69rgz6K0J3 for ; Thu, 11 Dec 2025 00:46:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRYnS5GQFz3d5X for ; Thu, 11 Dec 2025 00:46:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765414012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f4WCl3aLzq8fFD73YCWT67z1bQHwliGx+u89FQQ90eA=; b=BffvMiA64qliKOCnQpJ1yO7WJ7tfm2DbYW5Lcq1Eo4BAlL5oevrwyEH4EFGN9vST3JEaYt /uGWK542ZxhLTGAytFEUH6L938kCguxne0KRkvXuCN+C/3uu2KMTBk3sv7PfHL6CGcUc+U Djxqb5nblHOH9/MR/GN96FFrbhZmal6dYPLtImaBOG1R0tyQMIrw1gcLHdKRRYNmc99jMN EvSEF2EQtPq3Rkwh153r8R8NgfbzyQqnXdqQ5pYAdV6N12Jb+Jz2NNIKFAdSpzeE5Sb1zG vnY2IOi2A6uDVBMNKJhiztyPZpuR8dOwH9r+Q7X4m2ZcvElCD+9HUUguu3i0Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765414012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f4WCl3aLzq8fFD73YCWT67z1bQHwliGx+u89FQQ90eA=; b=IuVLeTdkYv4xBZe7Eg4ltTHpJBxdVKXyUETe+YLWiEdUieXObRQ+dnC1TkhBnlAmHKx81t EtmQCMe28iI4uRSNhBGvSUZS3NyXzf4j1Gx0ykOTvLlOksKdYLYamVoHBuGybwDa9+YEm/ zGVmoMrZNWiVusxN5kJtitNJaBbGV0W4DpwW8ThwNXAmfeQi/aoKUjW2PTmZ2w2xt+49pG RqCR0DfkAMrxwESYfHDGPhqXW85i7pAHflMZo+zpR1KP6WWNhHeZA3IJvbwyA8CxtZsT6f XvoV3RvDaD17GOLZZr4RwEEy1XBG739AUUpbKYcacIDWWMKkAmatfowXz2L9ZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765414012; a=rsa-sha256; cv=none; b=QhimHSjawXQBD5xq9NsxDWyIsMmJgdtSO9o+5gZotfwP/jiawrQqjhNHPjaQVpz8HYIEb4 9BuodnidWmd4nAImEoMRPVl6bdS0p2sVTsSd9I0JEDmeWjWRQuoBKZtxPI6geXcSzjFynt GQcG2q0IuRlDq/YR/+AmqhhPoN+PdAeiE0vjCNfCCZp9f7tVYd5NLfU0wJxfvSML6mFEfT 4l7IH7SVE7lMM5nYblfxwUmma1vmphlqxgaDyQUo7m05N3k3hHc5u5QWLNeTyRjI8saKob FgcFZXHfFB8OxG3lrFKypMZqPbdScvXwBh+7Hb28aI41VRWk99P1fWuLE32txg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRYnS4pQlz177k for ; Thu, 11 Dec 2025 00:46:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 267f3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 11 Dec 2025 00:46: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: 567a097c8ab6 - main - LinuxKPI: 802.11: lock down the "txq_scheduled" tailq List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 567a097c8ab60d9fcd68a87c3c5ad605fe8715cc Auto-Submitted: auto-generated Date: Thu, 11 Dec 2025 00:46:52 +0000 Message-Id: <693a147c.267f3.1f34bc6e@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=567a097c8ab60d9fcd68a87c3c5ad605fe8715cc commit 567a097c8ab60d9fcd68a87c3c5ad605fe8715cc Author: Bjoern A. Zeeb AuthorDate: 2025-12-10 20:29:23 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-12-11 00:46:15 +0000 LinuxKPI: 802.11: lock down the "txq_scheduled" tailq For consistency rename the "scheduled_txqs" tailq to "txq_scheduled" and add a lock per txq ("txq_scheduled_lock[]"). We use the "_bh" locking as this called from the device driver. This fixes panics due to concurrent access to the tailq, especially in between "first" and "remove" on the out-direction and between "insert" and "elem_init" on the in-direction. This was easily reproducible just running iperf3 at basic rates for a few seconds to minutes with multiple chipsets, not only rtw89. Sponsored by: The FreeBSD Foundation PR: 290636 Reported by: arved, and others before MFC after: 3 days --- sys/compat/linuxkpi/common/src/linux_80211.c | 51 ++++++++++++++++++++++------ sys/compat/linuxkpi/common/src/linux_80211.h | 3 +- 2 files changed, 42 insertions(+), 12 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 8098d02da1a9..1d510577f00c 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -6472,8 +6472,9 @@ linuxkpi_ieee80211_alloc_hw(size_t priv_len, const struct ieee80211_ops *ops) TAILQ_INIT(&lhw->lvif_head); __hw_addr_init(&lhw->mc_list); for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) { + spin_lock_init(&lhw->txq_scheduled_lock[ac]); lhw->txq_generation[ac] = 1; - TAILQ_INIT(&lhw->scheduled_txqs[ac]); + TAILQ_INIT(&lhw->txq_scheduled[ac]); } /* Chanctx_conf */ @@ -6507,6 +6508,7 @@ linuxkpi_ieee80211_iffree(struct ieee80211_hw *hw) { struct lkpi_hw *lhw; struct mbuf *m; + int ac; lhw = HW_TO_LHW(hw); free(lhw->ic, M_LKPI80211); @@ -6571,6 +6573,9 @@ linuxkpi_ieee80211_iffree(struct ieee80211_hw *hw) lkpi_cleanup_mcast_list_locked(lhw); LKPI_80211_LHW_MC_UNLOCK(lhw); + for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) + spin_lock_destroy(&lhw->txq_scheduled_lock[ac]); + /* Cleanup more of lhw here or in wiphy_free()? */ spin_lock_destroy(&lhw->txq_lock); LKPI_80211_LHW_TXQ_LOCK_DESTROY(lhw); @@ -8664,7 +8669,12 @@ linuxkpi_ieee80211_wake_queue(struct ieee80211_hw *hw, int qnum) spin_unlock_irqrestore(&lhw->txq_lock, flags); } +/* -------------------------------------------------------------------------- */ + /* This is just hardware queues. */ +/* + * Being called from the driver thus use _bh() locking. + */ void linuxkpi_ieee80211_txq_schedule_start(struct ieee80211_hw *hw, uint8_t ac) { @@ -8672,10 +8682,16 @@ linuxkpi_ieee80211_txq_schedule_start(struct ieee80211_hw *hw, uint8_t ac) lhw = HW_TO_LHW(hw); - IMPROVE_TXQ("Are there reasons why we wouldn't schedule?"); - IMPROVE_TXQ("LOCKING"); + if (ac >= IEEE80211_NUM_ACS) { + ic_printf(lhw->ic, "%s: ac %u out of bounds.\n", __func__, ac); + return; + } + + spin_lock_bh(&lhw->txq_scheduled_lock[ac]); + IMPROVE("check AIRTIME_FAIRNESS"); if (++lhw->txq_generation[ac] == 0) lhw->txq_generation[ac]++; + spin_unlock_bh(&lhw->txq_scheduled_lock[ac]); } struct ieee80211_txq * @@ -8688,24 +8704,33 @@ linuxkpi_ieee80211_next_txq(struct ieee80211_hw *hw, uint8_t ac) lhw = HW_TO_LHW(hw); txq = NULL; - IMPROVE_TXQ("LOCKING"); + if (ac >= IEEE80211_NUM_ACS) { + ic_printf(lhw->ic, "%s: ac %u out of bounds.\n", __func__, ac); + return (NULL); + } + + spin_lock_bh(&lhw->txq_scheduled_lock[ac]); /* Check that we are scheduled. */ if (lhw->txq_generation[ac] == 0) goto out; - ltxq = TAILQ_FIRST(&lhw->scheduled_txqs[ac]); + ltxq = TAILQ_FIRST(&lhw->txq_scheduled[ac]); if (ltxq == NULL) goto out; if (ltxq->txq_generation == lhw->txq_generation[ac]) goto out; + IMPROVE("check AIRTIME_FAIRNESS"); + + TAILQ_REMOVE(&lhw->txq_scheduled[ac], ltxq, txq_entry); ltxq->txq_generation = lhw->txq_generation[ac]; - TAILQ_REMOVE(&lhw->scheduled_txqs[ac], ltxq, txq_entry); txq = <xq->txq; TAILQ_ELEM_INIT(ltxq, txq_entry); out: + spin_unlock_bh(&lhw->txq_scheduled_lock[ac]); + return (txq); } @@ -8718,8 +8743,6 @@ void linuxkpi_ieee80211_schedule_txq(struct ieee80211_hw *hw, ltxq = TXQ_TO_LTXQ(txq); - IMPROVE_TXQ("LOCKING"); - /* Only schedule if work to do or asked to anyway. */ LKPI_80211_LTXQ_LOCK(ltxq); ltxq_empty = skb_queue_empty(<xq->skbq); @@ -8727,20 +8750,26 @@ void linuxkpi_ieee80211_schedule_txq(struct ieee80211_hw *hw, if (!withoutpkts && ltxq_empty) goto out; + lhw = HW_TO_LHW(hw); + spin_lock_bh(&lhw->txq_scheduled_lock[txq->ac]); /* * Make sure we do not double-schedule. We do this by checking tqe_prev, * the previous entry in our tailq. tqe_prev is always valid if this entry * is queued, tqe_next may be NULL if this is the only element in the list. */ if (ltxq->txq_entry.tqe_prev != NULL) - goto out; + goto unlock; + + TAILQ_INSERT_TAIL(&lhw->txq_scheduled[txq->ac], ltxq, txq_entry); +unlock: + spin_unlock_bh(&lhw->txq_scheduled_lock[txq->ac]); - lhw = HW_TO_LHW(hw); - TAILQ_INSERT_TAIL(&lhw->scheduled_txqs[txq->ac], ltxq, txq_entry); out: return; } +/* -------------------------------------------------------------------------- */ + void linuxkpi_ieee80211_handle_wake_tx_queue(struct ieee80211_hw *hw, struct ieee80211_txq *txq) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index 0dfcd7646c34..fcbef46fc6de 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -252,7 +252,8 @@ struct lkpi_hw { /* name it mac80211_sc? */ struct mtx txq_mtx; uint32_t txq_generation[IEEE80211_NUM_ACS]; - TAILQ_HEAD(, lkpi_txq) scheduled_txqs[IEEE80211_NUM_ACS]; + spinlock_t txq_scheduled_lock[IEEE80211_NUM_ACS]; + TAILQ_HEAD(, lkpi_txq) txq_scheduled[IEEE80211_NUM_ACS]; spinlock_t txq_lock; /* Deferred RX path. */ From nobody Thu Dec 11 02:07:22 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRbZM09d2z6K6BC for ; Thu, 11 Dec 2025 02:07:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRbZL6YzMz3qDx for ; Thu, 11 Dec 2025 02:07:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765418842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AvYCOTBnlhBuTRTykR64yotPGPh6CXES5CwSrvBnPFs=; b=t+Bj73MAOln7oABRxpYKaJlFpgPBs9JzRwOy2OYRvAXpvRRiOumiOWYH8Ojunh4E900wXT +VvaHl8YNLqpRj+396q6MRZHelVWT5I8TLz3NVuyZGavbYgn28fbcyibZiVTSHVIKPV/Ys yaX7q71e+x5n5kzxCCyKF7p6ml3Eqs6UXUSs8UhDdZjwAd/yvXa06kDY3PhHocTDzyZFt/ FnO/pgLw4CSLFQf+gC60NmlIOWpQHevUMXei599iy2VetuOJGDWngel3CztfNhWLsruQte FCoItScHJJlRWpDzCFvvGyowPVUZAeLBLR/Q18vXkTPH9imLuBBLs5N0YooEtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765418842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AvYCOTBnlhBuTRTykR64yotPGPh6CXES5CwSrvBnPFs=; b=FMmDbD5Bd+R4hLQU756yd0z9DC/mjHX8di6sA2fBOeD5F+z5TESEJEjiWPjGB6Gu3HVI5W 6QnT+D4tAOA10flSMnOCcC219DIcRikr8KidTQgZKEjTE17Txb6Oqa+8/B9SUdIa73iF8s +of6iCkgor0kjC7/3FXQCT1OfXpMAALj/L8FpbqI8DXIfam5X272YHwScbNqUBlMiC7rsh 7MD/kNZZlUKfZQjACqU9ZMhOLGooyDE/bjh5451iNdC+dS91ClRP22R//lsEBoKo6i/RQK 1+v8KPR9pvVrCICLyxZl6LPlj+KCvIS2YiN7m1h3StPBSlNJyneA8arBjZNtXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765418842; a=rsa-sha256; cv=none; b=UAX3t4yDzNTs1Ze2uCQlj4ac1ks4vqNJsoMQnNDFm2P3yZ6z49w7GTHui7JimwOFJkfLnd 5XqR1XTX9phr3mB5/TIMev51TIW8Fkr/ePi/XkfbrxOsAZyxLaLnn4p2+aORUG3cZpWj5k NA2nAMTsUmlq2aGtuAuSKLmP1Angu290jjZuYV1Y1gu8huaXUgF20pmvHBB9m0DUg0Ld5j Rz1HBiuTPfHHcfWZaqAVV4yT0Qj6rDD3sAIzQVq1Fj9VbqPxWCzg+mL7Vzado2HF2awQvr Eikg9tBUQ1oEqxIEgF1EhnOnC0GyocrQE+dX8TEHCnCzCTU0v1K3YwMPWUMV1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRbZL5zdZz19j9 for ; Thu, 11 Dec 2025 02:07:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2e7b3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 11 Dec 2025 02:07:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: e967a2a03677 - main - sockets: remove compat shim for divert(4) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: e967a2a03677f67d46b458d233a6e93c40d173c9 Auto-Submitted: auto-generated Date: Thu, 11 Dec 2025 02:07:22 +0000 Message-Id: <693a275a.2e7b3.1858af56@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=e967a2a03677f67d46b458d233a6e93c40d173c9 commit e967a2a03677f67d46b458d233a6e93c40d173c9 Author: Gleb Smirnoff AuthorDate: 2025-12-11 02:03:35 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-11 02:03:35 +0000 sockets: remove compat shim for divert(4) All known software in ports had been addressed three years ago and the shim stays in stable/14 and stable/15 for another couple years with its printf(), so all ourliers are expected to conform before 16.0-RELEASE. See 8624f4347e8133911b0554e816f6bedb56dc5fb3 for details. --- sys/kern/uipc_socket.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 9eba3ad2e082..8ed5dcc9336a 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -913,17 +913,6 @@ socreate(int dom, struct socket **aso, int type, int proto, struct socket *so; int error; - /* - * XXX: divert(4) historically abused PF_INET. Keep this compatibility - * shim until all applications have been updated. - */ - if (__predict_false(dom == PF_INET && type == SOCK_RAW && - proto == IPPROTO_DIVERT)) { - dom = PF_DIVERT; - printf("%s uses obsolete way to create divert(4) socket\n", - td->td_proc->p_comm); - } - prp = pffindproto(dom, type, proto); if (prp == NULL) { /* No support for domain. */ From nobody Thu Dec 11 02:11:21 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRbfy3PHsz6K6Qw for ; Thu, 11 Dec 2025 02:11:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRbfx6HTFz3tXG for ; Thu, 11 Dec 2025 02: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=1765419081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MCvpUE4BC5CGKcYRgg3cf8eN3KGlz9XpdZ42gfaseyo=; b=waMrshzcTEIT1ejz74Wcprar7NCI+c1UXnBoKYBWi5alJMEU0HWb14fRHSXY2RaE3g6JfE tbhkSjw+y5Y+XKOgdxuDe67C6mJljZovVA1yyNJ+56GdvRGS/bLANMBpXWy7fQYK9aXV/O +LY0eVhnkxtEtN6iw2bA8OMwWM/WWH0QIhvQCB2hoFaQpQX3tdCVXscEE34NDboEtSqPp7 BK7/0eilkhjPUaFzEKyo43nMMgelBH30AZxstOWQxnJmCznXNYX1DCKFcwMc6f8vVhwKTc PfcW4qp588Vl81HI1Pn/+/3wI9C+1wfZaSQgtgBTlno9Kyd7RI2mL4zlRSPkiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765419081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MCvpUE4BC5CGKcYRgg3cf8eN3KGlz9XpdZ42gfaseyo=; b=SsJC3Khh3if39zUg+6lSE3DgqqVPm23q1hssfU8pNlBVp4VrDGMEhgQRCOyo+4Ch1bgXRQ lOpMNjD52qyzpTptT6W8S2CecuslVE2n1qMnYL85/8yfd2iiSSF4d1Bp1Nqd/S73svLDXs dl7ujx+v66XwnnlSbrf8GvlrGmsRzWx9do39tx3ot/AFKtZWR8lgcrcw+3EqsXE58dsBGG i+sZf+4VWTher9Yw4D2P+XTkoEa5S0w+QlORu3+xLTxNZKbp2bmVtCWhpSrJkLfL5zHD8S hpjxE6dFvoOKrx5qBn+CDap2oy8ypgfILEnG7rdyIT+hJSUnyUWA4QPWkM3Q+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765419081; a=rsa-sha256; cv=none; b=MP301GXyzQtZXQGIse+aA5WeKIQ5kZm09NH7fpx4Ap3T59Q3fHZA6crj/o8sZ8OEdbxti4 IjDnC6BF3FTkxh8gxBxV9G84Fa4/Z5qq5x/bddc1vGryIAd68UTw32N6SZCukzPxmKfMen q6rHpZL8x0XOhoyk+ET+VvlN1pI6hR4E72cFihAoW/6v0LrNBjh8F8kyhgnylmLhbQILSa CQ+iDlWvQhX/iDEt1MNt2tXReanyVRCxDHNfdnNRA1/STbBdX4wjiroM95mdpGgIdKvykV kkdV0qY5Rklg8TEb8bJRBvw/cv/oot58wM4S/XsgHMOemvkWtNX7B2hOF9j8+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRbfx5c6Dz19pN for ; Thu, 11 Dec 2025 02:11:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2df72 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 11 Dec 2025 02:11:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 473bc5778c3e - main - bnxt.4: Adjust for recent HARDWARE List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 473bc5778c3e5136831c08d525d673059ef0aaa2 Auto-Submitted: auto-generated Date: Thu, 11 Dec 2025 02:11:21 +0000 Message-Id: <693a2849.2df72.271658a4@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=473bc5778c3e5136831c08d525d673059ef0aaa2 commit 473bc5778c3e5136831c08d525d673059ef0aaa2 Author: Alexander Ziaee AuthorDate: 2025-12-11 01:58:28 +0000 Commit: Alexander Ziaee CommitDate: 2025-12-11 02:10:56 +0000 bnxt.4: Adjust for recent HARDWARE + Adjust document description matching another terabit driver + Add BCM576XX family to DESCRIPTION, switch to XX notation + Add some model names, additional models, and improvements to HARDWARE MFC after: 3 days Reviewed by: sumit.saxena_broadcom.com (previous) Differential Revision: https://reviews.freebsd.org/D54028 --- share/man/man4/bnxt.4 | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/share/man/man4/bnxt.4 b/share/man/man4/bnxt.4 index 0900a11cecea..5e3ee27426d5 100644 --- a/share/man/man4/bnxt.4 +++ b/share/man/man4/bnxt.4 @@ -23,12 +23,12 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 18, 2020 +.Dd December 10, 2025 .Dt BNXT 4 .Os .Sh NAME .Nm bnxt -.Nd "Broadcom NetXtreme-C/NetXtreme-E Family Ethernet driver" +.Nd Broadcom NetXtreme family 10Gb to 400Gb Ethernet driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -47,17 +47,16 @@ if_bnxt_load="YES" .Sh DESCRIPTION The .Nm -driver provides support for various NICs based on the Broadcom BCM57301/2/4, -BCM57402/4/6, and BCM57502/4/8 Ethernet controller chips. +driver provides support for PCIe NICs based on the Broadcom BCM573XX, +BCM574XX, BCM575XX, and BCM576XX Ethernet controllers. .Pp For more information on configuring this device, see .Xr ifconfig 8 . .Sh HARDWARE The .Nm -driver provides support for various NICs based on the Broadcom NetXtreme-C and -NetXtreme-E families of Gigabit Ethernet controller chips, including the -following: +driver supports the following +Broadcom 10Gb to 400Gb Ethernet controllers: .Pp .Bl -bullet -compact .It @@ -103,11 +102,25 @@ Broadcom BCM57417 NetXtreme-E Ethernet Partition .It Broadcom BCM57454 NetXtreme-E 10Gb/25Gb/40Gb/50Gb/100Gb Ethernet .It -Broadcom BCM57502 NetXtreme-E 10Gb/25Gb/50Gb/100Gb/200Gb Ethernet +Broadcom BCM57502 NetXtreme-E 10Gb/25Gb/50Gb Ethernet .It -Broadcom BCM57504 NetXtreme-E 10Gb/25Gb/50Gb/100Gb/200Gb Ethernet +Broadcom N425 BCM57504 NetXtreme-E 10Gb/25Gb Ethernet .It -Broadcom BCM57508 NetXtreme-E 10Gb/25Gb/50Gb/100Gb/200Gb Ethernet +Broadcom P425 BCM57504 NetXtreme-E 10Gb/25Gb Ethernet +.It +Broadcom N1100 BCM57504 NetXtreme-E 10Gb/25Gb/50Gb/100Gb Ethernet +.It +Broadcom N2100 BCM57508 Thor 10Gb/25Gb/50Gb/100Gb Ethernet +.It +Broadcom P2100 BCM57508 Thor 10Gb/25Gb/50Gb/100Gb Ethernet +.It +Broadcom N2200 BCM57608 Thor 2 10Gb/25Gb/50Gb/100Gb/200Gb Ethernet +.It +Broadcom P2200 BCM57608 Thor 2 10Gb/25Gb/50Gb/100Gb/200Gb Ethernet +.It +Broadcom N1400 BCM57608 Thor 2 25Gb/50Gb/100Gb/200Gb/400Gb Ethernet +.It +Broadcom P1400 BCM57608 Thor 2 25Gb/50Gb/100Gb/200Gb/400Gb Ethernet .El .Sh SYSCTL VARIABLES These variables must be set before loading the driver, either via From nobody Thu Dec 11 02:35:46 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRcCD2DBkz6K8Cx for ; Thu, 11 Dec 2025 02:35:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRcCD0LVMz3wwB for ; Thu, 11 Dec 2025 02:35:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765420552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pDONF7BjXoSBg0RTFDm/6EYljPb6QUi4TRDVUioOqLU=; b=tUF5Xh6WU5t6GYyMQ3svBgS+AhjW/jfndHGvedkOGVu0a2+DUXd9w1y2rRek74p52Xm0KU WMKNTIkcedWlW7q8e3Z2ZUG7Fd2f7jVJEeTLWxeVQJe91Lh2ykNpJcrESxpgGu+/U0OcPJ Pdz+KGX1kiyevKcHgImT2lbo85t/v694wg+1ujSJ0gceVGlfSY1tutBDjQfrYO/BIZKy1V XEwMWJOpCbXZRrwKGMcwfcELGm9cthF9nrNDWQFMOfHPl6pBDVTTJnCF+dJxxf5OH7TkKr houUJ4MZwpvEXDy6IXPJ6cWHhHnEXXQHK9sbgk+Umo5xQkomFzerehwhqLknxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765420552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pDONF7BjXoSBg0RTFDm/6EYljPb6QUi4TRDVUioOqLU=; b=ls0t8xD4G4n9CNwP23qAXaA0FO/LJHmnY3hUtyyeZnZPiRc5QA6MKQkNT+hgT6NX/ti6cu TwNLxcj5Gt2mCJsHN/oPHR4xaRlb/HH5l2eCLU+lfaTYsNJ+OrMHkzUi3D3qVU4dQCQb37 t3FUGA4bgvUcQI0LzppDpxdKFkxaACCRFOXBaXdLReLqYWfX61G/1/XYy7+GUFJ7QY7Bow 8py2gvVNTv91XiEjLVcKFUR8uPoFIs3jkJRkg7NiT6GXpb4R6Ut/T7j9cssOmQMQ6ZpL1c ulPX5Zx27bltWLhfi+4AEi468g/5pESwuUaSNOcaCbV0TbjMzy9/aWaLf2v/UQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765420552; a=rsa-sha256; cv=none; b=OUFh7EYePGNfe46SIxI3sHnJ0AIkATQGcCVNt7oG77HNxoPX+SNvPE1oSRr3I/EgSDx5rc iGAYNMfMhNFfU5Xmjb9GOy0VMZTDRIlGUBzs5A2g8I/RUv8l8UXPJdY7S5whoAusG5hecq IqrpAurvgqoidnLwiENykgUiVsDHliLNaFyMBIPZqMXYJjm23dsSgUVzQguZHslUixU/Tm fGt0AoiVqfd6oREp8LipzqjbH+F1DJumxZG1wvcWM3QJLwschzCggMuHFbSx7Y91A9lcxq 73QnmyQKhRidrOkuDvCcYYwoiwICEcTKDJ3kTMgfbm8D4Pbp8zitKed6cq4LZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRcC66xKtz1BHN for ; Thu, 11 Dec 2025 02:35:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 318dc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 11 Dec 2025 02:35:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: d2850435f18c - main - aq(4): Use sys, not userland, headers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: d2850435f18c81479f79bd23ea8d4b997dbc0521 Auto-Submitted: auto-generated Date: Thu, 11 Dec 2025 02:35:46 +0000 Message-Id: <693a2e02.318dc.3facb64@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d2850435f18c81479f79bd23ea8d4b997dbc0521 commit d2850435f18c81479f79bd23ea8d4b997dbc0521 Author: Ed Maste AuthorDate: 2025-11-13 19:05:08 +0000 Commit: Ed Maste CommitDate: 2025-12-11 02:35:06 +0000 aq(4): Use sys, not userland, headers And remove some unused definitions. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54152 --- sys/dev/aq/aq_common.h | 8 +------- sys/dev/aq/aq_dbg.h | 2 +- sys/dev/aq/aq_fw.c | 2 +- sys/dev/aq/aq_fw1x.c | 2 +- sys/dev/aq/aq_fw2x.c | 2 +- sys/dev/aq/aq_hw.h | 1 - 6 files changed, 5 insertions(+), 12 deletions(-) diff --git a/sys/dev/aq/aq_common.h b/sys/dev/aq/aq_common.h index b123a7e6807d..17dcc5f23fb1 100644 --- a/sys/dev/aq/aq_common.h +++ b/sys/dev/aq/aq_common.h @@ -35,14 +35,10 @@ #ifndef _AQ_COMMON_H_ #define _AQ_COMMON_H_ -#include +#include #define ETH_MAC_LEN 6 -/* Types definition */ -#define TRUE 1 -#define FALSE 0 - #define s8 __int8_t #define u8 __uint8_t #define u16 __uint16_t @@ -51,7 +47,6 @@ #define u64 __uint64_t #define s64 __int64_t #define s32 int -typedef __uint32_t DWORD; #define ETIME ETIMEDOUT #define EOK 0 @@ -77,7 +72,6 @@ typedef __uint32_t DWORD; } while (0) -#define LODWORD(a) ((DWORD)(a)) #define LOWORD(a) ((u16)(a)) #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) diff --git a/sys/dev/aq/aq_dbg.h b/sys/dev/aq/aq_dbg.h index bb786bf0adc6..8d02f483b2f7 100644 --- a/sys/dev/aq/aq_dbg.h +++ b/sys/dev/aq/aq_dbg.h @@ -38,7 +38,7 @@ #ifndef AQ_DBG_H #define AQ_DBG_H -#include +#include #include /* Debug levels: diff --git a/sys/dev/aq/aq_fw.c b/sys/dev/aq/aq_fw.c index 619a3048cc28..3596074dbafc 100644 --- a/sys/dev/aq/aq_fw.c +++ b/sys/dev/aq/aq_fw.c @@ -39,7 +39,7 @@ #include __FBSDID("$FreeBSD$"); -#include +#include #include "aq_common.h" diff --git a/sys/dev/aq/aq_fw1x.c b/sys/dev/aq/aq_fw1x.c index 97bbbfc5e335..02b3f649201c 100644 --- a/sys/dev/aq/aq_fw1x.c +++ b/sys/dev/aq/aq_fw1x.c @@ -35,7 +35,7 @@ #include __FBSDID("$FreeBSD$"); -#include +#include #include "aq_common.h" #include "aq_hw.h" diff --git a/sys/dev/aq/aq_fw2x.c b/sys/dev/aq/aq_fw2x.c index c76a0342c3f2..b532977b748f 100644 --- a/sys/dev/aq/aq_fw2x.c +++ b/sys/dev/aq/aq_fw2x.c @@ -38,7 +38,7 @@ #include __FBSDID("$FreeBSD$"); -#include +#include #include "aq_common.h" diff --git a/sys/dev/aq/aq_hw.h b/sys/dev/aq/aq_hw.h index bf7f2896c7ca..97744de118b8 100644 --- a/sys/dev/aq/aq_hw.h +++ b/sys/dev/aq/aq_hw.h @@ -35,7 +35,6 @@ #ifndef _AQ_HW_H_ #define _AQ_HW_H_ -#include #include #include #include From nobody Thu Dec 11 03:39:33 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRdd81qmZz6KDNC; Thu, 11 Dec 2025 03:39:56 +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 4dRdd75C6Sz44D1; Thu, 11 Dec 2025 03:39:55 +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 5BB3dXDF067255; Thu, 11 Dec 2025 05:39:36 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 5BB3dXDF067255 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 5BB3dXQ5067254; Thu, 11 Dec 2025 05:39:33 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 11 Dec 2025 05:39:33 +0200 From: Konstantin Belousov To: Gleb Smirnoff Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e967a2a03677 - main - sockets: remove compat shim for divert(4) Message-ID: References: <693a275a.2e7b3.1858af56@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <693a275a.2e7b3.1858af56@gitrepo.freebsd.org> 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-Spamd-Bar: ---- 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-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dRdd75C6Sz44D1 On Thu, Dec 11, 2025 at 02:07:22AM +0000, Gleb Smirnoff wrote: > The branch main has been updated by glebius: > > URL: https://cgit.FreeBSD.org/src/commit/?id=e967a2a03677f67d46b458d233a6e93c40d173c9 > > commit e967a2a03677f67d46b458d233a6e93c40d173c9 > Author: Gleb Smirnoff > AuthorDate: 2025-12-11 02:03:35 +0000 > Commit: Gleb Smirnoff > CommitDate: 2025-12-11 02:03:35 +0000 > > sockets: remove compat shim for divert(4) > > All known software in ports had been addressed three years ago and the > shim stays in stable/14 and stable/15 for another couple years with its > printf(), so all ourliers are expected to conform before 16.0-RELEASE. > See 8624f4347e8133911b0554e816f6bedb56dc5fb3 for details. So why breaking the binaries that users might have lingering around? Put this single if() under #ifdef COMPAT15, and perhaps remove the printf() as well. > --- > sys/kern/uipc_socket.c | 11 ----------- > 1 file changed, 11 deletions(-) > > diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c > index 9eba3ad2e082..8ed5dcc9336a 100644 > --- a/sys/kern/uipc_socket.c > +++ b/sys/kern/uipc_socket.c > @@ -913,17 +913,6 @@ socreate(int dom, struct socket **aso, int type, int proto, > struct socket *so; > int error; > > - /* > - * XXX: divert(4) historically abused PF_INET. Keep this compatibility > - * shim until all applications have been updated. > - */ > - if (__predict_false(dom == PF_INET && type == SOCK_RAW && > - proto == IPPROTO_DIVERT)) { > - dom = PF_DIVERT; > - printf("%s uses obsolete way to create divert(4) socket\n", > - td->td_proc->p_comm); > - } > - > prp = pffindproto(dom, type, proto); > if (prp == NULL) { > /* No support for domain. */ From nobody Thu Dec 11 07:01:51 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRk6B6mH5z6KTKg for ; Thu, 11 Dec 2025 07: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRk6B4whNz3PJ2 for ; Thu, 11 Dec 2025 07: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=1765436514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gtuO93E02N6Z7oa814MEqJpNJ2NUajBxSzgDYyF93v8=; b=Psj86CeS0Sgsp6wdniNPBnVktdOl6WAsOUk8LT6KiRiVtoIc/7CZq2aQHkXmhMm45jgmFO I2sRmknmjawMIdeudHgymGez9z0gPnbCWSSHZPnJX1xA4N3xO1TzabLceiOPwv+OvP+yGJ k79DBbeBgFy6sNXR2exGLnaACdU/jOaP7gud4RnnRoelcczVDja/33EDvIqRG2/vodvz16 UvNRXEgPNfJz0qJm5yZT/cJmmjgfCzGJhrsCdbEmb+BLeN3pdQMjpH7/l7EwjYY7Ye+ak1 swsyTRVt8m895UNf0Ac0Lf6PERIEujVKV22AKbfzSOE6ZklBh9Qxd2jKR3SBxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765436514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gtuO93E02N6Z7oa814MEqJpNJ2NUajBxSzgDYyF93v8=; b=HPDQ0Dtxug6Avsj/7+KWj5VwNAAVbElCsEC+RdOQgIwpTSsD48okrmDYGptsIA6wlb9hcl 7kGjEozjI4KDAO80CKwtHG0h1wQTy/+CtOjhuTEBWBO4w9FJueT7iomnOKXPXoMgg6lCEx 2ULULufoyHJGN8qEd426mUZe2EcaKcr98ugzohtFhbTOYM58GT0Ifr5hn+oGyj9wtNZRgL gQu04ZvF4eIZyAp4mOgdmUS6DKAoEEmc2hPEOvDyAi4y8DDNnm7WbWdbs1Q3ypSFp8AgWt XvmM6ibU1Birm2TmuUvko5MuWNgQrUNkNoE+Bi2YCgF/7eB1ZpiF+hr2ngirnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765436514; a=rsa-sha256; cv=none; b=cwPEbgCPP2wVFDQOXmJKan34vjpoMSxDoxFBFCNaEgpRvh8Nw0yoTSuRlymx6w5UbZlVHm CxHd7CbdH3Y7hzqZhj2ideZI7UBcXXQb3wpSHy2g4LTgUpcQGU0v3Srl+Qh81P0bPYCmE9 JBu5Y1IfFsiOKXK5M+jmX6g4tOBr7jNISXzhS6iRuHSnFCDigXBn9V3RZjjBJkCFqBCFdb TTKAkde7omeu/j3yQ5AtpEeV0hmhtAU6nToFTV7gZ1DNK1pgNKzytCKkptaITtsJJdZ3Ui ozwKccnIkdCvQgMRaNQ3GqAuxSJdnBnXU3vst5w68bqTmfJ++0RTD6HOR2hjxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRk6B4T2yz4Xs for ; Thu, 11 Dec 2025 07:01:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2614a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 11 Dec 2025 07:01:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Philip Paeps Subject: git: a86dc94b84d1 - main - contrib/tzdata: import tzdata 2025c List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: a86dc94b84d177da8f00d1c9420ef0860576e4c4 Auto-Submitted: auto-generated Date: Thu, 11 Dec 2025 07:01:51 +0000 Message-Id: <693a6c5f.2614a.5c6272ee@gitrepo.freebsd.org> The branch main has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=a86dc94b84d177da8f00d1c9420ef0860576e4c4 commit a86dc94b84d177da8f00d1c9420ef0860576e4c4 Merge: d2850435f18c 7d227f6f7a5c Author: Philip Paeps AuthorDate: 2025-12-11 06:55:42 +0000 Commit: Philip Paeps CommitDate: 2025-12-11 06:55:42 +0000 contrib/tzdata: import tzdata 2025c Changes: https://github.com/eggert/tz/blob/2025c/NEWS MFC after: 3 days contrib/tzdata/CONTRIBUTING | 36 ++-- contrib/tzdata/Makefile | 196 ++++++++++++++------- contrib/tzdata/NEWS | 135 ++++++++++++++ contrib/tzdata/README | 14 +- contrib/tzdata/SECURITY | 2 +- contrib/tzdata/africa | 9 +- contrib/tzdata/antarctica | 12 +- contrib/tzdata/asia | 6 +- contrib/tzdata/australasia | 10 +- contrib/tzdata/backzone | 8 +- contrib/tzdata/calendars | 27 +-- contrib/tzdata/checknow.awk | 5 + contrib/tzdata/europe | 52 ++++-- contrib/tzdata/leap-seconds.list | 8 +- contrib/tzdata/leapseconds | 19 +- contrib/tzdata/leapseconds.awk | 11 +- contrib/tzdata/northamerica | 53 ++++-- contrib/tzdata/southamerica | 6 +- contrib/tzdata/theory.html | 367 ++++++++++++++++++++------------------- contrib/tzdata/version | 2 +- contrib/tzdata/zone1970.tab | 20 +-- contrib/tzdata/zonenow.tab | 94 +++++----- 22 files changed, 683 insertions(+), 409 deletions(-) diff --cc contrib/tzdata/Makefile index 2130582c2deb,000000000000..bb7cb1014f73 mode 100644,000000..100644 --- a/contrib/tzdata/Makefile +++ b/contrib/tzdata/Makefile @@@ -1,1383 -1,0 +1,1463 @@@ +# Make and install tzdb code and data. +# This file is in the public domain, so clarified as of +# 2009-05-17 by Arthur David Olson. +# Request POSIX conformance; this must be the first non-comment line. +.POSIX: ++# By default, builds of code and data assume POSIX.1-2001 or later; ++# this assumption can be relaxed by tailoring the build as described below. +# On older platforms you may need to scrounge for POSIX conformance. +# For example, on Solaris 10 (2005) with Sun Studio 12 aka Sun C 5.9 (2007), +# use 'PATH=/usr/xpg4/bin:$PATH make CC=c99'. ++# Reproducible builds of distribution tarballs also need a copy of the ++# Git repository, and assume the behavior of the following programs ++# (or later versions): ++# Git 2.7.0 (2016) ++# GNU Coreutils 6.3 (2006) ++# GNU Tar 1.14 (2004) ++# GnuPG 1.4 (2004) ++# Although tzdb does not come with a software bill of materials, ++# you should be able to construct one based on the above information, ++# your platform, and the way you use this Makefile. + +# To affect how this Makefile works, you can run a shell script like this: +# +# #!/bin/sh - # make CC='gcc -std=gnu23' "$@" ++# make CFLAGS='-O2 -DHAVE_GETTEXT=0' "$@" +# - # This example script is appropriate for a circa 2024 GNU/Linux system - # where a non-default setting enables this package's optional use of C23. ++# This example script is appropriate for a GNU/Linux system ++# which needs more optimization than default, and which does not want ++# gettext's internationalization of diagnostics. +# +# Alternatively, you can simply edit this Makefile to tailor the following +# macro definitions. + +############################################################################### +# Start of macros that one plausibly might want to tailor. + +# Package name for the code distribution. +PACKAGE= tzcode + +# Version number for the distribution, overridden in the 'tarballs' rule below. +VERSION= unknown + +# Email address for bug reports. +BUGEMAIL= tz@iana.org + +# DATAFORM selects the data format. +# Available formats represent essentially the same data, albeit +# possibly with minor discrepancies that users are not likely to notice. +# To get new features and the best data right away, use: +# DATAFORM= vanguard +# To wait a while before using new features, to give downstream users +# time to upgrade zic (the default), use: +# DATAFORM= main +# To wait even longer for new features, use: +# DATAFORM= rearguard +# Rearguard users might also want "ZFLAGS = -b fat"; see below. +DATAFORM= main + +# Change the line below for your timezone (after finding the one you want in +# one of the $(TDATA) source files, or adding it to a source file). +# Alternatively, if you discover you've got the wrong timezone, you can just +# 'zic -l -' to remove it, or 'zic -l rightzone' to change it. +# Use the command +# make zonenames +# to get a list of the values you can use for LOCALTIME. + +LOCALTIME= Factory + +# The POSIXRULES macro controls interpretation of POSIX-like TZ +# settings like TZ='EET-2EEST' that lack DST transition rules. +# If POSIXRULES is '-', no template is installed; this is the default. +# Any other value for POSIXRULES is obsolete and should not be relied on, as: +# * It does not work correctly in popular implementations such as GNU/Linux. +# * It does not work even in tzcode, except for historical timestamps +# that precede the last explicit transition in the POSIXRULES file. +# Hence it typically does not work for current and future timestamps. +# If, despite the above, you want a template for handling these settings, +# you can change the line below (after finding the timezone you want in the +# one of the $(TDATA) source files, or adding it to a source file). +# Alternatively, if you discover you've got the wrong timezone, you can just +# 'zic -p -' to remove it, or 'zic -p rightzone' to change it. +# Use the command +# make zonenames +# to get a list of the values you can use for POSIXRULES. + +POSIXRULES= - + +# Also see TZDEFRULESTRING below, which takes effect only +# if POSIXRULES is '-' or if the template file cannot be accessed. + + +# Installation locations. +# +# The defaults are suitable for Debian, except that if REDO is +# posix_right or right_posix then files that Debian puts under +# /usr/share/zoneinfo/posix and /usr/share/zoneinfo/right are instead +# put under /usr/share/zoneinfo-posix and /usr/share/zoneinfo-leaps, +# respectively. Problems with the Debian approach are discussed in +# the commentary for the right_posix rule (below). + +# Destination directory, which can be used for staging. +# 'make DESTDIR=/stage install' installs under /stage (e.g., to +# /stage/etc/localtime instead of to /etc/localtime). Files under +# /stage are not intended to work as-is, but can be copied by hand to +# the root directory later. If DESTDIR is empty, 'make install' does +# not stage, but installs directly into production locations. +DESTDIR = + +# Everything is installed into subdirectories of TOPDIR, and used there. +# TOPDIR should be empty (meaning the root directory), +# or a directory name that does not end in "/". +# TOPDIR should be empty or an absolute name unless you're just testing. +TOPDIR = + +# The default local timezone is taken from the file TZDEFAULT. +TZDEFAULT = $(TOPDIR)/etc/localtime + +# The subdirectory containing installed program and data files, and +# likewise for installed files that can be shared among architectures. +# These should be relative file names. +USRDIR = usr +USRSHAREDIR = $(USRDIR)/share + +# "Compiled" timezone information is placed in the "TZDIR" directory +# (and subdirectories). +# TZDIR_BASENAME should not contain "/" and should not be ".", ".." or empty. +TZDIR_BASENAME= zoneinfo +TZDIR = $(TOPDIR)/$(USRSHAREDIR)/$(TZDIR_BASENAME) + +# The "tzselect" and (if you do "make INSTALL") "date" commands go in: +BINDIR = $(TOPDIR)/$(USRDIR)/bin + +# The "zdump" command goes in: +ZDUMPDIR = $(BINDIR) + +# The "zic" command goes in: +ZICDIR = $(TOPDIR)/$(USRDIR)/sbin + +# Manual pages go in subdirectories of. . . +MANDIR = $(TOPDIR)/$(USRSHAREDIR)/man + +# Library functions are put in an archive in LIBDIR. +LIBDIR = $(TOPDIR)/$(USRDIR)/lib + + +# Types to try, as an alternative to time_t. +TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES_TAIL) +TIME_T_ALTERNATIVES_HEAD = int_least64_t.ck +TIME_T_ALTERNATIVES_TAIL = int_least32_t.ck uint_least32_t.ck \ + uint_least64_t.ck + +# What kind of TZif data files to generate. (TZif is the binary time +# zone data format that zic generates; see Internet RFC 9636.) +# If you want only POSIX time, with time values interpreted as +# seconds since the epoch (not counting leap seconds), use +# REDO= posix_only +# below. If you want only "right" time, with values interpreted +# as seconds since the epoch (counting leap seconds), use +# REDO= right_only +# below. If you want both sets of data available, with leap seconds not +# counted normally, use +# REDO= posix_right +# below. If you want both sets of data available, with leap seconds counted +# normally, use +# REDO= right_posix - # below. POSIX mandates that leap seconds not be counted; for compatibility - # with it, use "posix_only" or "posix_right". Use POSIX time on systems with ++# below. POSIX mandates that leap seconds not be counted, and a ++# nonnegative TZ_CHANGE_INTERVAL also assumes this, so to be compatible with ++# these, use "posix_only" or "posix_right". Use POSIX time on systems with +# leap smearing; this can work better than unsmeared "right" time with +# applications that are not leap second aware, and is closer to unsmeared +# "right" time than unsmeared POSIX time is (e.g., 0.5 vs 1.0 s max error). + +REDO= posix_right + +# Whether to put an "Expires" line in the leapseconds file. +# Use EXPIRES_LINE=1 to put the line in, 0 to omit it. +# The EXPIRES_LINE value matters only if REDO's value contains "right". +# If you change EXPIRES_LINE, remove the leapseconds file before running "make". +# zic's support for the Expires line was introduced in tzdb 2020a, +# and was modified in tzdb 2021b to generate version 4 TZif files. +# EXPIRES_LINE defaults to 0 for now so that the leapseconds file +# can be given to pre-2020a zic implementations and so that TZif files +# built by newer zic implementations can be read by pre-2021b libraries. +EXPIRES_LINE= 0 + +# To install data in text form that has all the information of the TZif data, +# (optionally incorporating leap second information), use +# TZDATA_TEXT= tzdata.zi leapseconds +# To install text data without leap second information (e.g., because +# REDO='posix_only'), use +# TZDATA_TEXT= tzdata.zi +# To avoid installing text data, use +# TZDATA_TEXT= + +TZDATA_TEXT= leapseconds tzdata.zi + +# For backward-compatibility links for old zone names, use +# BACKWARD= backward +# To omit these links, use +# BACKWARD= + +BACKWARD= backward + +# If you want out-of-scope and often-wrong data from the file 'backzone', +# but only for entries listed in the backward-compatibility file zone.tab, use +# PACKRATDATA= backzone +# PACKRATLIST= zone.tab +# If you want all the 'backzone' data, use +# PACKRATDATA= backzone +# PACKRATLIST= +# To omit this data, use +# PACKRATDATA= +# PACKRATLIST= + +PACKRATDATA= +PACKRATLIST= + +# The name of a locale using the UTF-8 encoding, used during self-tests. +# The tests are skipped if the name does not appear to work on this system. + +UTF8_LOCALE= en_US.utf8 + ++# Extra flags for producing man page files like tzfile.5.txt. ++# These flags are used only if groff (or mandoc) is present. ++# Each option should begin with "-" and should lack shell metacharacters. ++# Plausible options include -Tascii and -Tutf8. ++MANFLAGS= -Tutf8 ++ +# Non-default libraries needed to link. +# On some hosts, this should have -lintl unless CFLAGS has -DHAVE_GETTEXT=0. +LDLIBS= + +# Add the following to an uncommented "CFLAGS=" line as needed +# to override defaults specified in the source code or by the system. +# "-DFOO" is equivalent to "-DFOO=1". +# -DDEPRECATE_TWO_DIGIT_YEARS for optional runtime warnings about strftime +# formats that generate only the last two digits of year numbers +# -DEPOCH_LOCAL if the 'time' function returns local time not UT +# -DEPOCH_OFFSET=N if the 'time' function returns a value N greater +# than what POSIX specifies, assuming local time is UT. +# For example, N is 252460800 on AmigaOS. ++# -DFREE_PRESERVES_ERRNO=[01] if the 'free' function munges or preserves errno ++# (default is guessed) +# -DHAVE_DECL_ASCTIME_R=0 if does not declare asctime_r +# on POSIX platforms predating POSIX.1-2024 +# -DHAVE_DECL_ENVIRON if declares 'environ' +# -DHAVE_DECL_TIMEGM=0 if does not declare timegm +# -DHAVE_DIRECT_H if mkdir needs (MS-Windows) ++# -DHAVE_FCHMOD=0 if your system lacks the fchmod function +# -DHAVE__GENERIC=0 if _Generic does not work* ++# -DHAVE_GETEUID=0 if gete?[ug]id do not work +# -DHAVE_GETRANDOM if getrandom works (e.g., GNU/Linux), +# -DHAVE_GETRANDOM=0 to avoid using getrandom ++# -DHAVE_GETRESUID=0 if getres[ug]id do not work +# -DHAVE_GETTEXT if gettext works (e.g., GNU/Linux, FreeBSD, Solaris), +# where LDLIBS also needs to contain -lintl on some hosts; +# -DHAVE_GETTEXT=0 to avoid using gettext +# -DHAVE_INCOMPATIBLE_CTIME_R if your system's time.h declares +# ctime_r and asctime_r incompatibly with POSIX.1-2017 and earlier +# (Solaris when _POSIX_PTHREAD_SEMANTICS is not defined). +# -DHAVE_INTTYPES_H=0 if does not work*+ ++# -DHAVE_ISSETUGID=1 if issetugid works, 0 otherwise (default is guessed) ++# If 0, you may also use -DHAVE_SYS_AUXV_H=1 if works, ++# 0 otherwise (default is guessed). +# -DHAVE_LINK=0 if your system lacks a link function +# -DHAVE_LOCALTIME_R=0 if your system lacks a localtime_r function +# -DHAVE_LOCALTIME_RZ=0 if you do not want zdump to use localtime_rz +# localtime_rz can make zdump significantly faster, but is nonstandard. +# -DHAVE_MALLOC_ERRNO=0 if malloc etc. do not set errno on failure. ++# -DHAVE_MEMPCPY=1 if your system has mempcpy, 0 if not (default is guessed) +# -DHAVE_POSIX_DECLS=0 if your system's include files do not declare - # functions like 'link' or variables like 'tzname' required by POSIX ++# variables like 'tzname' required by POSIX ++# -DHAVE_PWD_H=0 if your system lacks pwd.h, grp.h and corresponding functions ++# If 0, you may also need -Dgid_t=G -Duid_t=U ++# to define gid_t and uid_t to be types G and U. +# -DHAVE_SETENV=0 if your system lacks the setenv function ++# -DHAVE_SETMODE=[01] if your system lacks or has the setmode and getmode ++# functions (default is guessed) +# -DHAVE_SNPRINTF=0 if your system lacks the snprintf function+ +# -DHAVE_STDCKDINT_H=0 if neither nor substitutes like +# __builtin_add_overflow work* +# -DHAVE_STDINT_H=0 if does not work*+ +# -DHAVE_STRFTIME_L if declares locale_t and strftime_l +# -DHAVE_STRDUP=0 if your system lacks the strdup function ++# -DHAVE_STRNLEN=0 if your system lacks the strnlen function+ +# -DHAVE_STRTOLL=0 if your system lacks the strtoll function+ ++# -DHAVE_STRUCT_STAT_ST_CTIM=0 if struct stat lacks a member st_ctim+ ++# -DHAVE_STRUCT_TIMESPEC=0 if your system lacks struct timespec+ +# -DHAVE_SYMLINK=0 if your system lacks the symlink function +# -DHAVE_SYS_STAT_H=0 if does not work* ++# If 0, you may also need -Dmode_t=M to define mode_t to be type M. +# -DHAVE_TZSET=0 if your system lacks a tzset function +# -DHAVE_UNISTD_H=0 if does not work* +# -DHAVE_UTMPX_H=0 if does not work* +# -Dlocale_t=XXX if your system uses XXX instead of locale_t +# -DMKTIME_MIGHT_OVERFLOW if mktime might fail due to time_t overflow ++# -DOPENAT_TZDIR if tzset should use openat on TZDIR then a relative open. ++# See localtime.c for details. +# -DPORT_TO_C89 if tzcode should also run on mostly-C89 platforms+ +# Typically it is better to use a later standard. For example, +# with GCC 4.9.4 (2016), prefer '-std=gnu11' to '-DPORT_TO_C89'. +# Even with -DPORT_TO_C89, the code needs at least one C99 +# feature (integers at least 64 bits wide) and maybe more. +# -DRESERVE_STD_EXT_IDS if your platform reserves standard identifiers +# with external linkage, e.g., applications cannot define 'localtime'. +# -Dssize_t=int on hosts like MS-Windows that lack ssize_t +# -DSUPPORT_C89=0 if the tzcode library should not support C89 callers +# Although -DSUPPORT_C89=0 might work around latent bugs in callers, +# it does not conform to POSIX. +# -DSUPPORT_POSIX2008 if the library should support older POSIX callers+ +# However, this might cause problems in POSIX.1-2024-or-later callers. +# -DSUPPRESS_TZDIR to not prepend TZDIR to file names; this has +# security implications and is not recommended for general use +# -DTHREAD_SAFE to make localtime.c thread-safe, as POSIX requires; +# not needed by the main-program tz code, which is single-threaded. +# Append other compiler flags as needed, e.g., -pthread on GNU/Linux. ++# The following options can also be used: ++# -DTHREAD_PREFER_SINGLE to prefer speed in single-threaded apps, ++# at some cost in CPU time and energy in multi-threaded apps. ++# The following options can also be used: ++# -DHAVE___ISTHREADED=1 if there is an extern int __isthreaded ++# variable, 0 otherwise (default is guessed) ++# -DHAVE_SYS_SINGLE_THREADED_H=0 if works, ++# 0 otherwise (default is guessed) ++# -DTHREAD_RWLOCK to use read-write locks intead of mutexes. ++# This can improve paralellism and thus save real time ++# if many threads call tzcode functions simultaneously. ++# It also costs CPU time and thus energy. ++# -DTHREAD_TM_MULTI to have gmtime, localtime, and offtime ++# return different struct tm * addresses in different threads. ++# This supports unportable programs that call ++# gmtime/localtime/offtime when they should call ++# gmtime_r/localtime_r/offtime_r to avoid races. ++# Because the corresponding storage is freed on thread exit, ++# this option is incompatible with POSIX.1-2024 and earlier. ++# It also costs CPU time and memory. +# -Dtime_tz=\"T\" to use T as the time_t type, rather than the system time_t +# This is intended for internal use only; it mangles external names. ++# -DTZ_CHANGE_INTERVAL=N if functions depending on TZ should check ++# no more often than every N seconds for TZif file changes. ++# If N is negative (the default), no such checking is done. ++# This option is intended for platforms that want localtime etc. ++# to respond to changes to a file selected by TZ, including to ++# TZDEFAULT (normally /etc/localtime) if TZ is unset. ++# On these platforms, REDO should be "posix_only" or "posix_right". ++# This option does not affect tzalloc-allocated objects. +# -DTZ_DOMAIN=\"foo\" to use "foo" for gettext domain name; default is "tz" +# -DTZ_DOMAINDIR=\"/path\" to use "/path" for gettext directory; +# the default is system-supplied, typically "/usr/lib/locale" +# -DTZDEFRULESTRING=\",date/time,date/time\" to default to the specified +# DST transitions for proleptic format TZ strings lacking them, +# in the usual case where POSIXRULES is '-'. If not specified, +# TZDEFRULESTRING defaults to US rules for future DST transitions. +# This mishandles some past timestamps, as US DST rules have changed. +# It also mishandles settings like TZ='EET-2EEST' for eastern Europe, +# as Europe and US DST rules differ. +# -DTZNAME_MAXIMUM=N to limit time zone abbreviations to N bytes (default 254) +# -DUNINIT_TRAP if reading uninitialized storage can cause problems +# other than simply getting garbage data +# -DUSE_LTZ=0 to build zdump with the system time zone library +# Also set TZDOBJS=zdump.o and CHECK_TIME_T_ALTERNATIVES= below. +# -DZIC_BLOAT_DEFAULT=\"fat\" to default zic's -b option to "fat", and +# similarly for "slim". Fat TZif files work around incompatibilities +# and bugs in some TZif readers, notably older ones that +# ignore or otherwise mishandle 64-bit data in TZif files; +# however, fat TZif files may trigger bugs in newer TZif readers. +# Slim TZif files are more efficient, and are the default. +# -DZIC_MAX_ABBR_LEN_WO_WARN=3 +# (or some other number) to set the maximum time zone abbreviation length +# that zic will accept without a warning (the default is 6) +# -g to generate symbolic debugging info +# -Idir to include from directory 'dir' +# -O0 to disable optimization; other -O options to enable more optimization +# -Uname to remove any definition of the macro 'name' +# $(GCC_DEBUG_FLAGS) if you are using recent GCC and want lots of checking +# +# * Options marked "*" can be omitted if your compiler is C23 compatible. +# * Options marked "+" are obsolescent and are planned to be removed +# once the code assumes C99 or later (say in the year 2029) +# and POSIX.1-2024 or later (say in the year 2034). +# +# Select instrumentation via "make GCC_INSTRUMENT='whatever'". +GCC_INSTRUMENT = \ + -fsanitize=undefined -fsanitize-address-use-after-scope \ - -fsanitize-undefined-trap-on-error -fstack-protector ++ -fsanitize-trap=all -fstack-protector +# Omit -fanalyzer from GCC_DEBUG_FLAGS, as it makes GCC too slow. +GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \ + $(GCC_INSTRUMENT) \ + -Wall -Wextra \ + -Walloc-size-larger-than=100000 -Warray-bounds=2 \ + -Wbad-function-cast -Wbidi-chars=any,ucn -Wcast-align=strict -Wcast-qual \ + -Wdate-time \ + -Wdeclaration-after-statement -Wdouble-promotion \ + -Wduplicated-branches -Wduplicated-cond -Wflex-array-member-not-at-end \ + -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation \ + -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op \ + -Wmissing-declarations -Wmissing-prototypes \ + -Wmissing-variable-declarations -Wnested-externs \ + -Wnull-dereference \ + -Wold-style-definition -Woverlength-strings -Wpointer-arith \ + -Wshadow -Wshift-overflow=2 -Wstrict-overflow \ + -Wstrict-prototypes -Wstringop-overflow=4 \ + -Wstringop-truncation -Wsuggest-attribute=cold \ + -Wsuggest-attribute=const -Wsuggest-attribute=format \ + -Wsuggest-attribute=malloc \ + -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \ + -Wtrampolines -Wundef -Wunused-macros -Wuse-after-free=3 \ + -Wvariadic-macros -Wvla -Wwrite-strings \ + -Wno-format-nonliteral -Wno-sign-compare -Wno-type-limits +# +# If your system has a "GMT offset" field in its "struct tm"s +# (or if you decide to add such a field in your system's "time.h" file), +# add the name to a define such as +# -DTM_GMTOFF=tm_gmtoff +# to the end of the "CFLAGS=" line. If not defined, the code attempts to +# guess TM_GMTOFF from other macros; define NO_TM_GMTOFF to suppress this. +# Similarly, if your system has a "zone abbreviation" field, define +# -DTM_ZONE=tm_zone +# and define NO_TM_ZONE to suppress any guessing. +# Although POSIX.1-2024 requires these fields and they are widely available +# on GNU/Linux and BSD systems, some older systems lack them. +# +# The next batch of options control support for external variables +# exported by tzcode. In practice these variables are less useful +# than TM_GMTOFF and TM_ZONE. However, most of them are standardized. +# # +# # To omit or support the external variable "tzname", add one of: +# # -DHAVE_TZNAME=0 # do not support "tzname" +# # -DHAVE_TZNAME=1 # support "tzname", which is defined by system library +# # -DHAVE_TZNAME=2 # support and define "tzname" +# # to the "CFLAGS=" line. Although "tzname" is required by POSIX.1-1988 +# # and later, its contents are unspecified if you use a geographical TZ +# # and the variable is planned to be removed in a future POSIX edition. +# # If not defined, the code attempts to guess HAVE_TZNAME from other macros. +# # Warning: unless time_tz is also defined, HAVE_TZNAME=1 can cause +# # crashes when combined with some platforms' standard libraries, +# # presumably due to memory allocation issues. +# # +# # To omit or support the external variables "timezone" and "daylight", add +# # -DUSG_COMPAT=0 # do not support +# # -DUSG_COMPAT=1 # support, and variables are defined by system library +# # -DUSG_COMPAT=2 # support and define variables +# # to the "CFLAGS=" line; "timezone" and "daylight" are inspired by Unix +# # Systems Group code and are required by POSIX.1-2008 and later (with XSI), +# # although their contents are unspecified if you use a geographical TZ +# # and the variables are planned to be removed in a future edition of POSIX. +# # If not defined, the code attempts to guess USG_COMPAT from other macros. +# # +# # To support the external variable "altzone", add +# # -DALTZONE=0 # do not support +# # -DALTZONE=1 # support "altzone", which is defined by system library +# # -DALTZONE=2 # support and define "altzone" +# # to the end of the "CFLAGS=" line; although "altzone" appeared in +# # System V Release 3.1 it has not been standardized. +# # If not defined, the code attempts to guess ALTZONE from other macros. +# +# If you want functions that were inspired by early versions of X3J11's work, +# add +# -DSTD_INSPIRED +# to the end of the "CFLAGS=" line. This arranges for the following +# functions to be added to the time conversion library. +# "offtime" is like "gmtime" except that it accepts a second (long) argument +# that gives an offset to add to the time_t when converting it. - # I.e., "offtime" is like calling "localtime_rz" with a fixed-offset zone. ++# "offtime_r" is to "offtime" what "gmtime_r" is to "gmtime". ++# I.e., "offtime" and "offtime_r" are like calling "localtime_rz" ++# with a fixed-offset zone. +# "timelocal" is nearly equivalent to "mktime". +# "timeoff" is like "timegm" except that it accepts a second (long) argument +# that gives an offset to use when converting to a time_t. +# I.e., "timeoff" is like calling "mktime_z" with a fixed-offset zone. +# "posix2time" and "time2posix" are described in an included manual page. +# X3J11's work does not describe any of these functions. +# These functions may well disappear in future releases of the time +# conversion package. +# +# If you don't want functions that were inspired by NetBSD, add +# -DNETBSD_INSPIRED=0 +# to the end of the "CFLAGS=" line. Otherwise, the functions +# "localtime_rz", "mktime_z", "tzalloc", and "tzfree" are added to the +# time library, and if STD_INSPIRED is also defined to nonzero the functions +# "posix2time_z" and "time2posix_z" are added as well. +# The functions ending in "_z" (or "_rz") are like their unsuffixed +# (or suffixed-by-"_r") counterparts, except with an extra first +# argument of opaque type timezone_t that specifies the timezone. +# "tzalloc" allocates a timezone_t value, and "tzfree" frees it. +# +# If you want to allocate state structures in localtime, add +# -DALL_STATE +# to the end of the "CFLAGS=" line. Storage is obtained by calling malloc. +# +# NIST-PCTS:151-2, Version 1.4, (1993-12-03) is a test suite put +# out by the National Institute of Standards and Technology +# which claims to test C and POSIX conformance. If you want to pass PCTS, add +# -DPCTS +# to the end of the "CFLAGS=" line. +# +# If you want strict compliance with XPG4 as of 1994-04-09, add +# -DXPG4_1994_04_09 +# to the end of the "CFLAGS=" line. This causes "strftime" to always return +# 53 as a week number (rather than 52 or 53) for January days before +# January's first Monday when a "%V" format is used and January 1 +# falls on a Friday, Saturday, or Sunday. +# +# POSIX says CFLAGS defaults to "-O 1". +# Uncomment the following line and edit its contents as needed. + +#CFLAGS= -O 1 + + +# The name of a POSIX-like library archiver, its flags, C compiler, +# linker flags, and 'make' utility. Ordinarily the defaults suffice. +# The commented-out values are the defaults specified by POSIX.1-2024. +#AR = ar +#ARFLAGS = -rv +#CC = c17 +#LDFLAGS = +#MAKE = make + +# Where to fetch leap-seconds.list from. +leaplist_URI = \ + https://hpiers.obspm.fr/iers/bul/bulc/ntp/leap-seconds.list +# The file is generated by the IERS Earth Orientation Centre, in Paris. +leaplist_TZ = Europe/Paris ++# ++# To fetch leap-seconds.list from NIST via a less-secure protocol ++# and with less-volatile metadata, use these settings: ++#leaplist_URI = ftp://ftp.boulder.nist.gov/pub/time/leap-seconds.list ++#leaplist_TZ = America/Denver + +# The zic command and its arguments. + +zic= ./zic +ZIC= $(zic) $(ZFLAGS) + +# To shrink the size of installed TZif files, +# append "-r @N" to omit data before N-seconds-after-the-Epoch. +# To grow the files and work around bugs in older applications, +# possibly at the expense of introducing bugs in newer ones, +# append "-b fat"; see ZIC_BLOAT_DEFAULT above. +# See the zic man page for more about -b and -r. +ZFLAGS= + +# How to use zic to install TZif files. + +ZIC_INSTALL= $(ZIC) -d '$(DESTDIR)$(TZDIR)' + +# The name of a POSIX-compliant 'awk' on your system. +# mawk 1.3.3 and Solaris 10 /usr/bin/awk do not work. +# Also, it is better (though not essential) if 'awk' supports UTF-8, +# and unfortunately mawk and busybox awk do not support UTF-8. +# Try AWK=gawk or AWK=nawk if your awk has the abovementioned problems. +AWK= awk + +# The full path name of a POSIX-compliant shell, preferably one that supports +# the Korn shell's 'select' statement as an extension. +# These days, Bash is the most popular. +# It should be OK to set this to /bin/sh, on platforms where /bin/sh +# lacks 'select' or doesn't completely conform to POSIX, but /bin/bash +# is typically nicer if it works. +KSHELL= /bin/bash + +# Name of curl , used for HTML validation +# and to fetch leap-seconds.list from upstream. +# Set CURL=: to disable use of the Internet. +CURL= curl + +# Name of GNU Privacy Guard , used to sign distributions. +GPG= gpg + +# This expensive test requires USE_LTZ. +# To suppress it, define this macro to be empty. +CHECK_TIME_T_ALTERNATIVES = check_time_t_alternatives + +# SAFE_CHAR is a regular expression that matches a safe character. +# Some parts of this distribution are limited to safe characters; +# others can use any UTF-8 character. +# For now, the safe characters are a safe subset of ASCII. +# The caller must set the shell variable 'sharp' to the character '#', +# since Makefile macros cannot contain '#'. +# TAB_CHAR is a single tab character, in single quotes. +TAB_CHAR= ' ' +SAFE_CHARSET1= $(TAB_CHAR)' !\"'$$sharp'$$%&'\''()*+,./0123456789:;<=>?@' +SAFE_CHARSET2= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\^_`' +SAFE_CHARSET3= 'abcdefghijklmnopqrstuvwxyz{|}~' +SAFE_CHARSET= $(SAFE_CHARSET1)$(SAFE_CHARSET2)$(SAFE_CHARSET3) +SAFE_CHAR= '[]'$(SAFE_CHARSET)'-]' + - # These non-alphabetic, non-ASCII printable characters are Latin-1, - # and so are likely displayable even in editors like XEmacs 21 - # that have limited display capabilities. - UNUSUAL_OK_LATIN_1 = ¡¢£¤¥¦§¨©«¬®¯°±²³´¶·¸¹»¼½¾¿×÷ - # Non-ASCII non-letters that OK_CHAR allows, as these characters are - # useful in commentary. - UNUSUAL_OK_CHARSET= $(UNUSUAL_OK_LATIN_1) ++# These non-alphabetic, non-ASCII printable characters are ++# used in commentary or in generated *.txt files ++# and are not likely to cause confusion. ++UNUSUAL_OK_CHARSET= §«°±»½¾×–‘’“”•→−≤★⟨⟩⯪ + +# Put this in a bracket expression to match spaces. +s = [:space:] + +# OK_CHAR matches any character allowed in the distributed files. +# This is the same as SAFE_CHAR, except that UNUSUAL_OK_CHARSET and +# multibyte letters are also allowed so that commentary can contain a +# few safe symbols and people's names and can quote non-English sources. - # Other non-letters are limited to ASCII renderings for the - # convenience of maintainers using XEmacs 21.5.34, which by default - # mishandles Unicode characters U+0100 and greater. +OK_CHAR= '[][:alpha:]$(UNUSUAL_OK_CHARSET)'$(SAFE_CHARSET)'-]' + +# SAFE_LINE matches a line of safe characters. +# SAFE_SHARP_LINE is similar, except any OK character can follow '#'; +# this is so that comments can contain non-ASCII characters. +# OK_LINE matches a line of OK characters. +SAFE_LINE= '^'$(SAFE_CHAR)'*$$' +SAFE_SHARP_LINE='^'$(SAFE_CHAR)'*('$$sharp$(OK_CHAR)'*)?$$' +OK_LINE= '^'$(OK_CHAR)'*$$' + +# Flags to give 'tar' when making a distribution. +# Try to use flags appropriate for GNU tar. +GNUTARFLAGS= --format=pax --pax-option=delete=atime,delete=ctime \ + --numeric-owner --owner=0 --group=0 \ + --mode=go+u,go-w --sort=name +SETUP_TAR= \ + export LC_ALL=C && \ + if tar $(GNUTARFLAGS) --version >/dev/null 2>&1; then \ + TAR='tar $(GNUTARFLAGS)'; \ + else \ + TAR=tar; \ + fi + +# Flags to give 'gzip' when making a distribution. +GZIPFLAGS= -9n + +# When comparing .tzs files, use GNU diff's -F'^TZ=' option if supported. +# This makes it easier to see which Zone has been affected. +SETUP_DIFF_TZS = \ + if diff -u -F'^TZ=' - - <>/dev/null >&0 2>&1; then \ + DIFF_TZS='diff -u -F^TZ='; \ + else \ + DIFF_TZS='diff -u'; \ + fi + +# ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib. +RANLIB= : + +# POSIX prohibits defining or using SHELL. However, csh users on systems +# that use the user shell for Makefile commands may need to define SHELL. +#SHELL= /bin/sh + +# End of macros that one plausibly might want to tailor. +############################################################################### + + +TZCOBJS= zic.o +TZDOBJS= zdump.o localtime.o strftime.o +DATEOBJS= date.o localtime.o strftime.o +LIBSRCS= localtime.c asctime.c difftime.c strftime.c +LIBOBJS= localtime.o asctime.o difftime.o strftime.o +HEADERS= tzfile.h private.h +NONLIBSRCS= zic.c zdump.c +NEWUCBSRCS= date.c +SOURCES= $(HEADERS) $(LIBSRCS) $(NONLIBSRCS) $(NEWUCBSRCS) \ + tzselect.ksh workman.sh +MANS= newctime.3 newstrftime.3 newtzset.3 time2posix.3 \ + tzfile.5 tzselect.8 zic.8 zdump.8 +MANTXTS= newctime.3.txt newstrftime.3.txt newtzset.3.txt \ + time2posix.3.txt \ + tzfile.5.txt tzselect.8.txt zic.8.txt zdump.8.txt \ + date.1.txt +COMMON= calendars CONTRIBUTING LICENSE Makefile \ + NEWS README SECURITY theory.html version +WEB_PAGES= tz-art.html tz-how-to.html tz-link.html +CHECK_WEB_PAGES=theory.ck tz-art.ck tz-how-to.ck tz-link.ck +DOCS= $(MANS) date.1 $(MANTXTS) $(WEB_PAGES) +PRIMARY_YDATA= africa antarctica asia australasia \ + europe northamerica southamerica +YDATA= $(PRIMARY_YDATA) etcetera +NDATA= factory +TDATA_TO_CHECK= $(YDATA) $(NDATA) backward +TDATA= $(YDATA) $(NDATA) $(BACKWARD) +ZONETABLES= zone.tab zone1970.tab zonenow.tab +TABDATA= iso3166.tab $(TZDATA_TEXT) $(ZONETABLES) +LEAP_DEPS= leapseconds.awk leap-seconds.list +TZDATA_ZI_DEPS= ziguard.awk zishrink.awk version $(TDATA) \ + $(PACKRATDATA) $(PACKRATLIST) +DSTDATA_ZI_DEPS= ziguard.awk $(TDATA) $(PACKRATDATA) $(PACKRATLIST) +DATA= $(TDATA_TO_CHECK) backzone iso3166.tab leap-seconds.list \ + leapseconds $(ZONETABLES) +AWK_SCRIPTS= checklinks.awk checknow.awk checktab.awk leapseconds.awk \ + ziguard.awk zishrink.awk +MISC= $(AWK_SCRIPTS) +TZS_YEAR= 2050 +TZS_CUTOFF_FLAG= -c $(TZS_YEAR) +TZS= to$(TZS_YEAR).tzs +TZS_NEW= to$(TZS_YEAR)new.tzs +TZS_DEPS= $(YDATA) localtime.c private.h \ + strftime.c tzfile.h zdump.c zic.c +TZDATA_DIST = $(COMMON) $(DATA) $(MISC) +# EIGHT_YARDS is just a yard short of the whole ENCHILADA. +EIGHT_YARDS = $(TZDATA_DIST) $(DOCS) $(SOURCES) tzdata.zi +ENCHILADA = $(EIGHT_YARDS) $(TZS) + +# Consult these files when deciding whether to rebuild the 'version' file. +# This list is not the same as the output of 'git ls-files', since +# .gitignore is not distributed. +VERSION_DEPS= \ + calendars CONTRIBUTING LICENSE Makefile NEWS README SECURITY \ + africa antarctica asctime.c asia australasia \ + backward backzone \ + checklinks.awk checknow.awk checktab.awk \ + date.1 date.c difftime.c \ + etcetera europe factory iso3166.tab \ + leap-seconds.list leapseconds.awk localtime.c \ + newctime.3 newstrftime.3 newtzset.3 northamerica \ + private.h southamerica strftime.c theory.html \ + time2posix.3 tz-art.html tz-how-to.html tz-link.html \ + tzfile.5 tzfile.h tzselect.8 tzselect.ksh \ + workman.sh zdump.8 zdump.c zic.8 zic.c \ + ziguard.awk zishrink.awk \ + zone.tab zone1970.tab zonenow.tab + +all: tzselect zic zdump libtz.a $(TABDATA) \ + vanguard.zi main.zi rearguard.zi + +ALL: all date $(ENCHILADA) + +install: all $(DATA) $(REDO) $(MANS) + mkdir -p '$(DESTDIR)$(BINDIR)' \ + '$(DESTDIR)$(ZDUMPDIR)' '$(DESTDIR)$(ZICDIR)' \ + '$(DESTDIR)$(LIBDIR)' \ + '$(DESTDIR)$(MANDIR)/man3' '$(DESTDIR)$(MANDIR)/man5' \ + '$(DESTDIR)$(MANDIR)/man8' + $(ZIC_INSTALL) -l $(LOCALTIME) \ + -p $(POSIXRULES) \ + -t '$(DESTDIR)$(TZDEFAULT)' + cp -f $(TABDATA) '$(DESTDIR)$(TZDIR)/.' + cp tzselect '$(DESTDIR)$(BINDIR)/.' + cp zdump '$(DESTDIR)$(ZDUMPDIR)/.' + cp zic '$(DESTDIR)$(ZICDIR)/.' + cp libtz.a '$(DESTDIR)$(LIBDIR)/.' + $(RANLIB) '$(DESTDIR)$(LIBDIR)/libtz.a' + cp -f newctime.3 newtzset.3 '$(DESTDIR)$(MANDIR)/man3/.' + cp -f tzfile.5 '$(DESTDIR)$(MANDIR)/man5/.' + cp -f tzselect.8 zdump.8 zic.8 '$(DESTDIR)$(MANDIR)/man8/.' + +INSTALL: ALL install date.1 + mkdir -p '$(DESTDIR)$(BINDIR)' '$(DESTDIR)$(MANDIR)/man1' + cp date '$(DESTDIR)$(BINDIR)/.' + cp -f date.1 '$(DESTDIR)$(MANDIR)/man1/.' + +# Calculate version number from git, if available. +# Otherwise, use $(VERSION) unless it is "unknown" and there is already +# a 'version' file, in which case reuse the existing 'version' contents +# and append "-dirty" if the contents do not already end in "-dirty". +version: $(VERSION_DEPS) + { (type git) >/dev/null 2>&1 && \ + V=$$(git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \ + --abbrev=7 --dirty) || \ + if test '$(VERSION)' = unknown && read -r V <$@; then \ + V=$${V%-dirty}-dirty; \ + else \ + V='$(VERSION)'; \ + fi; } && \ + printf '%s\n' "$$V" >$@.out + mv $@.out $@ + +# These files can be tailored by setting BACKWARD, PACKRATDATA, PACKRATLIST. +vanguard.zi main.zi rearguard.zi: $(DSTDATA_ZI_DEPS) + $(AWK) \ + -v DATAFORM=$(@:.zi=) \ + -v PACKRATDATA='$(PACKRATDATA)' \ + -v PACKRATLIST='$(PACKRATLIST)' \ + -f ziguard.awk \ + $(TDATA) $(PACKRATDATA) >$@.out + mv $@.out $@ +# This file has a version comment that attempts to capture any tailoring +# via BACKWARD, DATAFORM, PACKRATDATA, PACKRATLIST, and REDO. +tzdata.zi: $(DATAFORM).zi version zishrink.awk + read -r version $@.out + mv $@.out $@ + +tzdir.h: + printf '%s\n' >$@.out \ + '#ifndef TZDEFAULT' \ + '# define TZDEFAULT "$(TZDEFAULT)" /* default zone */' \ + '#endif' \ + '#ifndef TZDIR' \ + '# define TZDIR "$(TZDIR)" /* TZif directory */' \ + '#endif' + mv $@.out $@ + +version.h: version + read -r VERSION $@.out + mv $@.out $@ + +zdump: $(TZDOBJS) + $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZDOBJS) $(LDLIBS) + +zic: $(TZCOBJS) + $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZCOBJS) $(LDLIBS) + +leapseconds: $(LEAP_DEPS) + $(AWK) -v EXPIRES_LINE=$(EXPIRES_LINE) \ + -f leapseconds.awk leap-seconds.list >$@.out + mv $@.out $@ + +# Awk script to extract a Git-style author from leap-seconds.list comments. +EXTRACT_AUTHOR = \ + author_line { sub(/^.[[:space:]]*/, ""); \ + sub(/:[[:space:]]*/, " <"); \ + printf "%s>\n", $$0; \ + success = 1; \ + exit \ + } \ + /Questions or comments to:/ { author_line = 1 } \ + END { exit !success } + +# Fetch leap-seconds.list from upstream. +fetch-leap-seconds.list: + $(CURL) -OR $(leaplist_URI) + +# Fetch leap-seconds.list from upstream and commit it to the local repository. +commit-leap-seconds.list: fetch-leap-seconds.list + author=$$($(AWK) '$(EXTRACT_AUTHOR)' leap-seconds.list) && \ + date=$$(TZ=$(leaplist_TZ) stat -c%y leap-seconds.list) && \ + git commit --author="$$author" --date="$$date" -m'make $@' \ + leap-seconds.list + +# Arguments to pass to submakes. +# They can be overridden by later submake arguments. +INSTALLARGS = \ + BACKWARD='$(BACKWARD)' \ + DESTDIR='$(DESTDIR)' \ + PACKRATDATA='$(PACKRATDATA)' \ + PACKRATLIST='$(PACKRATLIST)' \ + TZDEFAULT='$(TZDEFAULT)' \ + TZDIR='$(TZDIR)' \ + ZIC='$(ZIC)' + +INSTALL_DATA_DEPS = zic leapseconds tzdata.zi + +posix_only: $(INSTALL_DATA_DEPS) + $(ZIC_INSTALL) tzdata.zi + +right_only: $(INSTALL_DATA_DEPS) + $(ZIC_INSTALL) -L leapseconds tzdata.zi + +# In earlier versions of this makefile, the other two directories were +# subdirectories of $(TZDIR). However, this led to configuration errors. +# For example, with posix_right under the earlier scheme, +# TZ='right/Australia/Adelaide' got you localtime with leap seconds, +# but gmtime without leap seconds, which led to problems with applications +# like sendmail that subtract gmtime from localtime. +# Therefore, the other two directories are now siblings of $(TZDIR). +# You must replace all of $(TZDIR) to switch from not using leap seconds +# to using them, or vice versa. +right_posix: right_only + rm -fr '$(DESTDIR)$(TZDIR)-leaps' + ln -s '$(TZDIR_BASENAME)' '$(DESTDIR)$(TZDIR)-leaps' || \ + $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-leaps' right_only + $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-posix' posix_only + +posix_right: posix_only + rm -fr '$(DESTDIR)$(TZDIR)-posix' + ln -s '$(TZDIR_BASENAME)' '$(DESTDIR)$(TZDIR)-posix' || \ + $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-posix' posix_only + $(MAKE) $(INSTALLARGS) TZDIR='$(TZDIR)-leaps' right_only + +zones: $(REDO) + +# dummy.zd is not a real file; it is mentioned here only so that the +# top-level 'make' does not have a syntax error. +ZDS = dummy.zd +# Rule used only by submakes invoked by the $(TZS_NEW) rule. +# It is separate so that GNU 'make -j' can run instances in parallel. +$(ZDS): zdump + ./zdump -i $(TZS_CUTOFF_FLAG) "$$PWD/$(@:.zd=)" >$@ + +TZS_NEW_DEPS = tzdata.zi zdump zic +$(TZS_NEW): $(TZS_NEW_DEPS) + rm -fr tzs$(TZS_YEAR).dir + mkdir tzs$(TZS_YEAR).dir + $(zic) -d tzs$(TZS_YEAR).dir tzdata.zi + $(AWK) '/^L/{print "Link\t" $$2 "\t" $$3}' \ + tzdata.zi | LC_ALL=C sort >$@.out + x=$$($(AWK) '/^Z/{print "tzs$(TZS_YEAR).dir/" $$2 ".zd"}' \ + tzdata.zi \ + | LC_ALL=C sort -t . -k 2,2) && \ + set x $$x && \ + shift && \ + ZDS=$$* && \ + $(MAKE) TZS_CUTOFF_FLAG="$(TZS_CUTOFF_FLAG)" \ + ZDS="$$ZDS" $$ZDS && \ + sed 's,^TZ=".*\.dir/,TZ=",' $$ZDS >>$@.out + rm -fr tzs$(TZS_YEAR).dir + mv $@.out $@ + +# If $(TZS) exists but 'make tzs.ck' fails, a maintainer should inspect the +# failed output and fix the inconsistency, perhaps by running 'make force_tzs'. +$(TZS): + touch $@ + +force_tzs: $(TZS_NEW) + cp $(TZS_NEW) $(TZS) + +libtz.a: $(LIBOBJS) + rm -f $@ + $(AR) $(ARFLAGS) $@ $(LIBOBJS) + $(RANLIB) $@ + +date: $(DATEOBJS) + $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(DATEOBJS) $(LDLIBS) + +tzselect: tzselect.ksh version + read -r VERSION ; Thu, 11 Dec 2025 08:13:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRlhL51lsz3WcV for ; Thu, 11 Dec 2025 08:13:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765440786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dvLTpX8wT9wLVwMce2fd0vAeSzoNQ2oAIGLkggHQZIU=; b=E+fGc77vGHNMPtkeNWRcpD27OeiGZn6p8yrvJBJHW9fOlKxjmfF32uyPP23HjEQoZXFGhe yyufetuV3E/lClvH7fOeIWHR04vOxMRL/XQpaW6o8GUV6OjC2QWZYw+PuDKQ8JUi5y82wC Cx2cmHge1tHigpagzARsMT+qJlt4FvV9n77XrPb48DdfpKmNApkPexedxvebhYxdTgjLk2 tVjacl/dRVmitTm70JKux27WEJuL5bUd3KT7M2r0KmGgsCk4LyAo6C+kwhWUH8wWG8JI63 eocf/mGUWXdpzt2G+nSquV8DScIUK87N2Dekwce32p48fesd7v382SviD8x03A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765440786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dvLTpX8wT9wLVwMce2fd0vAeSzoNQ2oAIGLkggHQZIU=; b=sZAMo7ZxSBCrXSRQJ7LZofrIWSEUW8byGICuRzWQNda9+Bwsu6qQAhDW2N9I7tfghlwWWe zZYsLDYJwpZ1NzxI5XSgy9kTpdIKJhP2OzUW2GyfQ4fa1JKWXpl1yAR/cM0FBEo6knjCg8 Idk5x1VEVACIweBvH7JpFoYFS7Fc0REstLPiz05Nbt+JpJ6m+1s4utWtfolSwUCW4IA79k 4ciVzmD//JHYqzvPEPlnhYt2n51BTHi9xxVTMp1Nd5T4H4HM2V/kbIEaFUtRDWo+6i6v/f 8dvZR9VtzY54y5FqkgmL2bkyBSNDazWbzQB/rQCKM7oylgsItYCIuPX3dcbntg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765440786; a=rsa-sha256; cv=none; b=XXr05D3ZkqAzlCCQxzphr9F6mU5wNUqMRqzlEDssT6UM/1B6CnUSloPpa3wJund/v4vMxW raWkCZwM8IphJbGNhdcg6A6l3BCxzY2fMzndgkN9AKi3w1FONzUahQVYjxZMPNHe9PRI9t KpHK65CE26SOZvG1KTEeg2x1dQayltsKldi4oFX+ILELrH2nuTnwgUY/0OfHVwUTRMX2QN FuEFwhvixBjx5hx4BmkFo8w15pt6KH/vToF5Cnb/ZVhtQ5zTDUc15zpr4PFag0LnFb288I gGG1Nz1gLt9bSd+9S1AliDQ+OfwuTNSwhvqR649yK/bF2VxJey/jG9gfmDqjvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRlhL4c48z7Ym for ; Thu, 11 Dec 2025 08:13:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2c04d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 11 Dec 2025 08:13:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: e3fa0a22dd37 - main - bhyve: pci-uart needs to also set subclass and function List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e3fa0a22dd371727712764e3d07891b05980cd61 Auto-Submitted: auto-generated Date: Thu, 11 Dec 2025 08:13:06 +0000 Message-Id: <693a7d12.2c04d.3cb4fed0@gitrepo.freebsd.org> The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=e3fa0a22dd371727712764e3d07891b05980cd61 commit e3fa0a22dd371727712764e3d07891b05980cd61 Author: Toomas Soome AuthorDate: 2025-12-10 20:36:43 +0000 Commit: Toomas Soome CommitDate: 2025-12-11 08:11:50 +0000 bhyve: pci-uart needs to also set subclass and function edk2 PciSioSerialDxe driver setup depends on subclass and function being set, adding them does make it possible to access pci-uart serial port from UEFI. Reviewed by: corvink Differential Revision: https://reviews.freebsd.org/D54167 Sponsored by: Edgecast Cloud LLC --- usr.sbin/bhyve/pci_uart.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/bhyve/pci_uart.c b/usr.sbin/bhyve/pci_uart.c index f0f05c731a18..abbc23c63fae 100644 --- a/usr.sbin/bhyve/pci_uart.c +++ b/usr.sbin/bhyve/pci_uart.c @@ -104,6 +104,8 @@ pci_uart_init(struct pci_devinst *pi, nvlist_t *nvl) pci_set_cfgdata16(pi, PCIR_DEVICE, COM_DEV); pci_set_cfgdata16(pi, PCIR_VENDOR, COM_VENDOR); pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_SIMPLECOMM); + pci_set_cfgdata8(pi, PCIR_SUBCLASS, PCIS_SIMPLECOMM_UART); + pci_set_cfgdata8(pi, PCIR_PROGIF, PCIP_SIMPLECOMM_UART_16550A); sc = uart_ns16550_init(pci_uart_intr_assert, pci_uart_intr_deassert, pi); From nobody Thu Dec 11 09:02:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRmn4118pz6Kc5S for ; Thu, 11 Dec 2025 09:02:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRmn370S5z3cSb for ; Thu, 11 Dec 2025 09:02:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765443736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GVFrvtZaBYQaSJQd0L8EFdXQ+DpuFKeuD0+pMIcADYU=; b=jn9kmc+uUOQ8xMKv1s4uonp/qk3zOkW6qQY6VFivn4gmMNfp4sB0JVcYHNpqGE4hL5D9Rd fgl1zZjc5beY1S28ZFOyfxNvnF113Tg23QbJFutyoXL1LQiM5zAO6LygagMZpJpn6FC6sJ HLNqDzmM8Knp7sdIyEqnnBF/9ips3NbLFH2nykjd2OUkFl3kYOaCWXyOXPC6PUcpHuU+Bm +xJ0sUZ/S4RRyLq1r9JfHYAxlxuAoxx1uNaW8JldMboNLpKy+b72tR/1ERzaQBfZV6URZ/ aa+KwHjkgJAulwJWRU84XfPZyIxGoQ84rY76vknJAOt9HpieOefwM0r2/jEPpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765443736; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GVFrvtZaBYQaSJQd0L8EFdXQ+DpuFKeuD0+pMIcADYU=; b=ldBATRxUGosted9U58u8nT5iiHY42xuiOA4YEoOiZLDITeSPEqOrxGv8iWRfCs+y85YyVC hLaNXKPerBPIoeQhu80/dmqUOtcRyD1l1qCOziBpKl791mmrQW49WAfcYGfZXNu2B/IN0U TbhRQfe13/xvURXSiW3ZaygLohfwWGl+uUm4Dix0nViVDrY5IxSZ0H2niJe93J12PWmjyx UTV2v++owDiwtS3scoCPlMWA4g7x99ycCtLIJOipjwSOzYnxtBS0BjV0t2WZPk29LGOo4k fJeHXngWa8IBdupREGhTERw/MrwEH9dD0f2OIRGtAcOZN9lVZO+eTIxQ3UqZBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765443736; a=rsa-sha256; cv=none; b=QU2QlIKxJebC7+ugnRPzHrsZnHy8igX/1evyF7zMtInTB3L0vOqhXANDA/VfRLpRKCSHzH 52ecB1ZbeVcaBhDrf9jQpi28fJKK0bHQ64UndDj2emM236SJm2j1c55yC2Zj6UZZnE10Wd zCGIyA8n76lZ4pLwkgr6jrnRMIZwdN+fd6YUdGACxdJtSIVdg7pqgyYIPStNt7mRqXV8+6 oNUpzOIfuwdOJnJAYk3r6q4mt8rMzz0v1tRxA9XI/e1mwgQuCyImg77qRyjBCoFDNpO5tA TthQel615q5CppIWHdG/d8OV4BleS9sflDtg7f1m5cfbtWIZmeHUoz7YrxFcZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRmn36T5yz8kx for ; Thu, 11 Dec 2025 09:02:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31030 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 11 Dec 2025 09:02:10 +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: a35545ee0268 - main - vm: Fix kstack alignment assertion List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: a35545ee02680cee04c354b50182dd94d4489666 Auto-Submitted: auto-generated Date: Thu, 11 Dec 2025 09:02:10 +0000 Message-Id: <693a8892.31030.200d994c@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a35545ee02680cee04c354b50182dd94d4489666 commit a35545ee02680cee04c354b50182dd94d4489666 Author: Dag-Erling Smørgrav AuthorDate: 2025-12-11 09:01:47 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-12-11 09:02:07 +0000 vm: Fix kstack alignment assertion The expectation that the allocation will be aligned to the kstack size only applies when allocating from a kstack arena, not when allocating a non-standard size from the kernel arena. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Fixes: 7a79d0669761 ("vm: improve kstack_object pindex calculation to avoid pindex holes") Reviewed by: bnovkov, siderop1_netapp.com Differential Revision: https://reviews.freebsd.org/D54171 --- sys/vm/vm_glue.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index 18d789c59281..925bb92cdd75 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -321,10 +321,12 @@ vm_thread_alloc_kstack_kva(vm_size_t size, int domain) rv = vmem_alloc(arena, size, M_BESTFIT | M_NOWAIT, &addr); if (rv == ENOMEM) return (0); - KASSERT(atop(addr - VM_MIN_KERNEL_ADDRESS) % - (kstack_pages + KSTACK_GUARD_PAGES) == 0, - ("%s: allocated kstack KVA not aligned to multiple of kstack size", - __func__)); + if (size == ptoa(kstack_pages + KSTACK_GUARD_PAGES)) { + /* This expectation only applies to kstack arenas */ + KASSERT((addr - VM_MIN_KERNEL_ADDRESS) % size == 0, + ("%s: allocated kstack KVA not aligned to multiple of kstack size", + __func__)); + } return (addr); #else From nobody Thu Dec 11 10:36:29 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRpsp24tLz6KkJX for ; Thu, 11 Dec 2025 10: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRpsn676nz3py0 for ; Thu, 11 Dec 2025 10: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=1765449389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O6mtuaq4roLCpZdl/JWMB3losVl1zzlfyg4TaMcQqM8=; b=rWbiCvxTkVWXGDiXZbzqekeo5iif9/FS4+KlFw8+7nCs1n6OZ42f2FfZOzMyB5B2MnGzDy wuOubcyiNlYm9ZE4apGKeM+LMssODdzQJPKVH9nTHAjaHMSc3dTluOEjrZMNKXeg054Zyr +mX0GgtlPIxcutSrLs/h820WQ5G3Wl4noQIh1leMJW4HvKvR+76Tt6YpO7NDNle1ZqpLFa px0ZfpGP/qZRSHpKVE0LL7jPit3/awWx2sgzt06qNcjySdjno/KKZTDtJ+nBSUhPLv+Ooa LOQP3LL3Lw9nyDnczXatyezCq+NwGNvD8s9CKx/Nbnjdh2FTB6JNsSD4Pc4hMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765449389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O6mtuaq4roLCpZdl/JWMB3losVl1zzlfyg4TaMcQqM8=; b=Hy8g1A4C3uFdERemDv72/AgZyPsh+b1+wB2UHFfnTyjDdXXp8/3UY2wWN+5CHp5KnQsmoA BkDRRs8nGs/uObgMfbAnumeusC0tck6KqWe+/QELnuIMtCptXmPGdv+s1SM3rK6VxtZixM ioS+6D0HNpSbxjVnsjY0TRqCxyw8+KBTFbwFbBov+m+inXHtXC7XsU9saM61G7+1hMzypc JjWlXIXP4T10hHmOKm6ZWKj8Ud6nBiNIE6rLxeW4KBevG+cvIor6C7mYIejI+/cs+PuayS iEMNlTW/OnHAVi6XGz0ktoH3vbeUN/UtbzD8mIIW/DeBJ+1ohExKiDToKXvCcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765449389; a=rsa-sha256; cv=none; b=joyvrK03bCa7X0Gas+fdBoLkkY/h8v9C9DYkjIRYD5KLXlBdaf0eqv2eb2ljgxUhUb46YB kn/Kpp22VnupKB0+VdwF/9F0VLwmWsocurSZz5S6jXwpqFQdgJ5NcnJHEt/xP4MB8ckTGx Aiy2bt6e7tqcte/hjhrhYpJZbKSYjP5eBDP9A6WzJNDLUB9Kz+vjI+oi78KUiixtLPvhjR 9xWN8yU7TlCCpZNZ1SVvY8BkdbLAXDynd66MUaYF5owyZtOUDmNVhjsRh2OPEMqE5Zb3/h Aufgg26SdII0PKyxtLwLelWejhcSF3RYstjSagMNfj5oAonqPv0wGj2mZnyebQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRpsn5jpmzB6Z for ; Thu, 11 Dec 2025 10:36:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38c7d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 11 Dec 2025 10:36:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: ac4fb06d096d - main - pf: handle TTL expired during nat64 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ac4fb06d096d6308b9522f454b68fbfc45bb8531 Auto-Submitted: auto-generated Date: Thu, 11 Dec 2025 10:36:29 +0000 Message-Id: <693a9ead.38c7d.75fb604c@gitrepo.freebsd.org> The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=ac4fb06d096d6308b9522f454b68fbfc45bb8531 commit ac4fb06d096d6308b9522f454b68fbfc45bb8531 Author: Kristof Provost AuthorDate: 2025-12-10 16:27:51 +0000 Commit: Kristof Provost CommitDate: 2025-12-11 09:25:33 +0000 pf: handle TTL expired during nat64 If the TTL (or hop limit) expires during nat64 translation we may need to send the error message in the original address family (i.e. pre-translation). We'd usually handle this in pf_route()/pf_route6(), but at that point we have already translated the packet, making it difficult to include it in the generated ICMP message. Check for this case in pf_translate_af() and send icmp errors directly from it. PR: 291527 MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D54166 --- sys/net/pfvar.h | 1 - sys/netpfil/pf/pf.c | 25 ++++++++++++++++++++----- tests/sys/netpfil/pf/nat64.py | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 6 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 7568b83f89fd..90e926ef3cb1 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2518,7 +2518,6 @@ int pf_socket_lookup(struct pf_pdesc *); struct pf_state_key *pf_alloc_state_key(int); int pf_translate(struct pf_pdesc *, struct pf_addr *, u_int16_t, struct pf_addr *, u_int16_t, u_int16_t, int); -int pf_translate_af(struct pf_pdesc *); bool pf_init_threshold(struct pf_kthreshold *, uint32_t, uint32_t); uint16_t pf_tagname2tag(const char *); #ifdef ALTQ diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 2f09d47dc6e1..2ebaf61a165f 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -3605,8 +3605,8 @@ pf_change_icmp(struct pf_addr *ia, u_int16_t *ip, struct pf_addr *oa, } } -int -pf_translate_af(struct pf_pdesc *pd) +static int +pf_translate_af(struct pf_pdesc *pd, struct pf_krule *r) { #if defined(INET) && defined(INET6) struct mbuf *mp; @@ -3617,6 +3617,21 @@ pf_translate_af(struct pf_pdesc *pd) struct pf_fragment_tag *ftag; int hlen; + if (pd->ttl == 1) { + /* We'd generate an ICMP error. Do so now rather than after af translation. */ + if (pd->af == AF_INET) { + pf_send_icmp(pd->m, ICMP_TIMXCEED, + ICMP_TIMXCEED_INTRANS, 0, pd->af, r, + pd->act.rtableid); + } else { + pf_send_icmp(pd->m, ICMP6_TIME_EXCEEDED, + ICMP6_TIME_EXCEED_TRANSIT, 0, pd->af, r, + pd->act.rtableid); + } + + return (-1); + } + hlen = pd->naf == AF_INET ? sizeof(*ip4) : sizeof(*ip6); /* trim the old header */ @@ -9186,7 +9201,7 @@ pf_route(struct pf_krule *r, struct ifnet *oifp, if (pd->dir == PF_IN) { if (ip->ip_ttl <= IPTTLDEC) { - if (r->rt != PF_DUPTO) + if (r->rt != PF_DUPTO && pd->naf == pd->af) pf_send_icmp(m0, ICMP_TIMXCEED, ICMP_TIMXCEED_INTRANS, 0, pd->af, r, pd->act.rtableid); @@ -9511,7 +9526,7 @@ pf_route6(struct pf_krule *r, struct ifnet *oifp, if (pd->dir == PF_IN) { if (ip6->ip6_hlim <= IPV6_HLIMDEC) { - if (r->rt != PF_DUPTO) + if (r->rt != PF_DUPTO && pd->naf == pd->af) pf_send_icmp(m0, ICMP6_TIME_EXCEEDED, ICMP6_TIME_EXCEED_TRANSIT, 0, pd->af, r, pd->act.rtableid); @@ -11354,7 +11369,7 @@ done: *m0 = NULL; break; case PF_AFRT: - if (pf_translate_af(&pd)) { + if (pf_translate_af(&pd, r)) { *m0 = pd.m; action = PF_DROP; break; diff --git a/tests/sys/netpfil/pf/nat64.py b/tests/sys/netpfil/pf/nat64.py index 705de72f5bc4..ba0d2ae01a9e 100644 --- a/tests/sys/netpfil/pf/nat64.py +++ b/tests/sys/netpfil/pf/nat64.py @@ -329,6 +329,42 @@ class TestNAT64(VnetTestTemplate): for r in packets: r.show() + @pytest.mark.require_user("root") + @pytest.mark.require_progs(["scapy"]) + def test_ttl_one(self): + """ + PR 291527: invalid ICMP error generated by nat64 router + """ + ifname = self.vnet.iface_alias_map["if1"].name + gw_mac = self.vnet.iface_alias_map["if1"].epairb.ether + ToolsHelper.print_output("/sbin/route -6 add default 2001:db8::1") + + import scapy.all as sp + + pkt = sp.Ether(dst=gw_mac) \ + / sp.IPv6(dst="64:ff9b::198.51.100.2", hlim=1) \ + / sp.SCTP(sport=1111, dport=2222) \ + / sp.SCTPChunkInit(init_tag=1, n_in_streams=1, n_out_streams=1, \ + a_rwnd=1500, params=[]) + s = DelayedSend(pkt, sendif=ifname) + + found = False + packets = sp.sniff(iface=ifname, timeout=5) + for r in packets: + print("Reply packet:") + r.show() + + ip6 = r.getlayer(sp.IPv6) + icmp6 = r.getlayer(sp.ICMPv6TimeExceeded) + if not ip6 or not icmp6: + continue + assert ip6.src == "2001:db8::1" + assert ip6.dst == "2001:db8::2" + assert icmp6.type == 3 # Time exceeded + assert icmp6.code == 0 # hop limit exceeded in transit + found = True + assert found + @pytest.mark.require_user("root") @pytest.mark.require_progs(["scapy"]) def test_ttl_zero(self): From nobody Thu Dec 11 14:04:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRvTQ3Nhlz6JnHQ for ; Thu, 11 Dec 2025 14:04:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRvTQ2XMdz3XC8 for ; Thu, 11 Dec 2025 14:04:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765461850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=avOE3SW4pDqrB7s+HiQGdf7gdt7AlANr0LM1M57od/o=; b=TLbLuL0N1mVj3qEN2B/ILxZidi20KIjhr7tpLWaoLazHKp5JFgYB1mGdhPRi1AjVbN0iwQ ZOtnbemLlw7hvVGeMktCCUPI8r3A1jtKQfS5v32By/Rt7LGoPIvKCTnhJlsH4SUCpfc3xc bxTdmE4Ndnf6lkabmz6Wc8Le1F3JC03kl76Y9rS/of8YHo6PRuP4pAhlNb8l6MhiqgL4B/ 0VLzOrqnFLKHA1k37Y4BiyTYwkE2BH7H/h7IAdovizk/qmTlDLYnsBkG4rZChsqQToXups kuoOAMcFm86cr/ZjfQC1vi+FoJ66v+IRCcynKV/RdW+2sc2c8g/nI70Bi01htg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765461850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=avOE3SW4pDqrB7s+HiQGdf7gdt7AlANr0LM1M57od/o=; b=Ol/UYDc+IoreWmA56QG2yLwBWDrEL5oY9gn8whZ3wkQePQ0knOYi6b0fIAO/JJyBz82CYK 7BRTjlbKAR30hcl5771eAQ6RQnxDV9dL1xsCE8S6oVnWVOIwF+cGMPK579RxTVzjjYwW6D /Stj41UYgw4xvW5UHpgn1nKgNUQdVm6MQUJsv/VuSAnMPd0ZM1wjSWJfLTZu0jk9Q0EIkq HaSoqhB57S6bNbT363ZgZw2lacnKXoxklcnKQmshq8/6RTAvrz7BRPVCWKnhj9kD0Pd4w9 XQWUyNfAzlBxk/zpjaEub/EkGumDVlmqFtiKIbh6C39PWTbV3tbM7HWfRet6fg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765461850; a=rsa-sha256; cv=none; b=IzTIiPxec14Lx4o5TEBzvDQNUES8bwCEzK5v2zDCrmsehDfmffoip7XxdAF38aCuouSPQb qHnMUSiBRRvwMAlCfER7RJrvaWSHkZPHeRiZ6g13gd5cJn10czd8IuH1o8Ma+XtxDChkP2 6t/dLXkAMHec0gwwbDg2b/Yg1KgwZKOAgfgNqpHW01WnoF+YjQ+8d24aGfNLIh7Y6PDAaG zV3sImBfsFq9TEvEOsWjTg9uxBp9w7Zku+ogZM/d1rqhe0eQ6fdA2mnjZ6eBK8a4Be4WV3 5h5XV3VToONOM2/hqBL7AJFaTbiOlfkUBGX3RtLND54ZhxrTAaXepmnD1/UeYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRvTQ1xbyzZmS for ; Thu, 11 Dec 2025 14:04:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 286a5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 11 Dec 2025 14:04:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: f825427c0ae9 - main - krb5: Add missing symbol List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f825427c0ae975025e831542782d4078b063a82e Auto-Submitted: auto-generated Date: Thu, 11 Dec 2025 14:04:10 +0000 Message-Id: <693acf5a.286a5.34c342b4@gitrepo.freebsd.org> The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=f825427c0ae975025e831542782d4078b063a82e commit f825427c0ae975025e831542782d4078b063a82e Author: Cy Schubert AuthorDate: 2025-12-11 14:00:45 +0000 Commit: Cy Schubert CommitDate: 2025-12-11 14:02:37 +0000 krb5: Add missing symbol Submitted by: lampa@fit.vutbr.cz PR: 291565 MFC after: 1 day --- krb5/lib/gssapi/version.map | 1 + 1 file changed, 1 insertion(+) diff --git a/krb5/lib/gssapi/version.map b/krb5/lib/gssapi/version.map index c0e66aa3c382..42f32cc55edf 100644 --- a/krb5/lib/gssapi/version.map +++ b/krb5/lib/gssapi/version.map @@ -39,6 +39,7 @@ HEIMDAL_GSS_2.0 { gss_inquire_cred; gss_inquire_cred_by_mech; gss_inquire_cred_by_oid; + gss_inquire_sec_context_by_oid; gss_inquire_mech_for_saslname; gss_inquire_mechs_for_name; gss_inquire_name; From nobody Thu Dec 11 17:24:45 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dRzws49Czz6K4mZ for ; Thu, 11 Dec 2025 17:24:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dRzws2ypVz421f for ; Thu, 11 Dec 2025 17:24:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765473885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XD9XNZ9oDAm78+mfUeLUjmDGVS4COsPtMAMG02Bm5/0=; b=x3aNJTWL5B3DFR/NVbAYAoKQxwrQ+tobSn8SjkUv1a3gtU9Rt37SxWMimAyV2ICMEKrPi9 GFh0YUr8ssC7N7Dqd2kzorPNHGA/hZiixSCTgvm0Cvvr5hoOPdCH6+zT1yGcN23OtcxZr7 eD+MbqbFfOpOZJ7M6ko2RY9R1DLXesur6QMOTX08KSV1+lM94DJc9+YGQebOdjbp8CXDrF Ox/PFycZiQ58RqIq/Rek/R6yFmMaWsml7/Q47QOfscsDN3ANUndk77DzpG/t+2HgoziJl4 3j1XcOZZHHpnuqCdwlSdKO2FVsxXB2asbMGbcpASN72hYrvoIijCJd8KyKrjUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765473885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XD9XNZ9oDAm78+mfUeLUjmDGVS4COsPtMAMG02Bm5/0=; b=WZhV36eZtecCukEnPYbrWJ0xsVyuhf+pHUOuD6nQcjGYx6VGg/bg/TE4a3YE5jtjE19hZy Qa6ZVrVkHXcHV/f+lrDUW6eBXgQsiASXTUyHmeeLunS/GOh3bk60R8nCeXOEayNl6//Ut1 P7+YGUoeoecAV4fvqQ1URnDIj/9I8JzvqjpAbEBfWbR38BScn/eLc6h6/qZUiCWcPDKVn7 IFbMJ0tCZbxyVXY9so/ICvUFEomi9UCQ3Gj6icHTNM3NTRmtCXHdMd+e767zEtk34wVtcx qspFLiLXPfG9/Wp9SwlqMRlRktInTcTwMtVTRoYckYzsRvDhNw7dNFXijuhkYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765473885; a=rsa-sha256; cv=none; b=K7wQycIngk8NG+VwhKlri93PonxZZ7d0ZKkT/34U/zhPI+g1QNx3JQAyfUJCrEGoHenUkm ZjSuvArx2a56apx4+tvphTCkRCeLZ7D379CnyteYYoM2NzPDisRYXNFw4od7ndxfO8kDgT DuaDOzU4J9U0JRR1pxKChsMAfSqMgM9NJndvTqGTV9mOP3Df/HRE8EGEgMjN4i0wlmzQte 4qa0R6/eaTFrWXZ+ZxirnV3m/QculARDHOdrAPyNVQGTe+S07YNBo8snSskfWOfDd7Uacj 2VvtW9MXQzDLm9u50VD9Q5JhmXPTCJkGxH7BZqiGv68IZOoQXTxQpf3jlWO1lA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dRzws2JZnzh96 for ; Thu, 11 Dec 2025 17:24:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id b366 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 11 Dec 2025 17:24:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Oskar Holmlund Subject: git: 95d8576d8cc7 - main - make_dtb.sh: add include path List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oh X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 95d8576d8cc725ce2536d85335523c350b0bf69c Auto-Submitted: auto-generated Date: Thu, 11 Dec 2025 17:24:45 +0000 Message-Id: <693afe5d.b366.61f9ce7c@gitrepo.freebsd.org> The branch main has been updated by oh: URL: https://cgit.FreeBSD.org/src/commit/?id=95d8576d8cc725ce2536d85335523c350b0bf69c commit 95d8576d8cc725ce2536d85335523c350b0bf69c Author: Oskar Holmlund AuthorDate: 2025-12-11 17:19:44 +0000 Commit: Oskar Holmlund CommitDate: 2025-12-11 17:19:44 +0000 make_dtb.sh: add include path The device tree include file for TI TPS65* is in a relative path to the source for example: device-tree/src/arm/ti/omap/am335x-bone-common.dtsi#n305 device-tree/src/arm/rockchip/rk3066a-marsboard.dts#n183 This patch gets the dts path and adds that as an include path for the device tree compiler. Approved by: manu (mentor) Differential revision: https://reviews.freebsd.org/D53887 --- sys/tools/fdt/make_dtb.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/tools/fdt/make_dtb.sh b/sys/tools/fdt/make_dtb.sh index 8cefb6c5704b..dbd4504d75d4 100755 --- a/sys/tools/fdt/make_dtb.sh +++ b/sys/tools/fdt/make_dtb.sh @@ -21,6 +21,7 @@ fi for d in ${dts}; do dtb="${dtb_path}/$(basename "$d" .dts).dtb" + dts_path=`dirname $d` ${CPP} -P -x assembler-with-cpp -I "$S/dts/include" -I "$S/contrib/device-tree/include" -I "$S/dts/${MACHINE}" -I "$S/contrib/device-tree/src/${MACHINE}" -I "$S/contrib/device-tree/src/" -include "$d" -include "$S/dts/freebsd-compatible.dts" /dev/null | - ${DTC} -@ -O dtb -o "$dtb" -b 0 -p 1024 -i "$S/dts/${MACHINE}" -i "$S/contrib/device-tree/src/${MACHINE}" -i "$S/contrib/device-tree/src/" + ${DTC} -@ -O dtb -o "$dtb" -b 0 -p 1024 -i "$S/dts/${MACHINE}" -i "$S/contrib/device-tree/src/${MACHINE}" -i "$S/contrib/device-tree/src/" -i "$dts_path" done From nobody Thu Dec 11 17:32:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dS06G4Sn7z6K5Z9 for ; Thu, 11 Dec 2025 17: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dS06G3dYdz42xq for ; Thu, 11 Dec 2025 17: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=1765474374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wwb1gW0jS2zxA/AcRjzgMvCpiAGicofHcDywq427QiA=; b=gVjyTbPl4DpfL77pB7HFuCd2qQvuSK0u1/rmqqQxZhLRGdzyWalU00uTdhIEg3NzTsOfNL T2ch7dIPIh1zXzEVGahyFrfkyicVMCxtsqtEO2MIpuq5zpFIoJ7+omM/qfYYi4h0PudOBq 6dSl6EASsT9WVhGhwvFiD+x5uD4htSVcx+ST7p3FXEEYAmE8yo29jJseZj2P1Eg9qPw1k2 wltQoBQwRhvnPfoa0z0tPWWT+fqN/njiFXBbGOi7nSAhLDA/l3H6dw4QWvqk65bfC1pwst ho0O95/g/2R7+KJo5Q4EjshS5qDrc+q7ZcjCJ3Ifsbya5HRo0Pk5TfaddALq/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765474374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wwb1gW0jS2zxA/AcRjzgMvCpiAGicofHcDywq427QiA=; b=QbXyW7k8ziw1hBAJ2TUy0l/JMLQDDfWxW3pu49md7TnhX85qN57yCTFsCJgRQyb8TzBKqu ABKlfQRKm2tq75/oR4GKtjJvY9c5TVhnLJFRgb4J2fdIq98cmyeT4hfwn65q759qoZmIMs AAIOo3SnWXHk1dXx9bAsJgl/blZ0Nc39BJNpkwFqcwgKXP85HiArmW2mPfMFraUtNbeLya hrBzdBazQw860qib0K3hYE9vWN43mJj4HpYDORhhaCu1Xnz3iIf8kr879aBdjT9u0PDfCn gd8gjzw3YxYwdWqEdogcNOalA9bq0jHBO69mLVMB/HWeQ1BljaSsrFO4Zx/+5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765474374; a=rsa-sha256; cv=none; b=WePfJKqOZjFzaxIL5n/5q4f6ZuthK4i0vopkMZKDQt8SIrzVpdn3HlhHfC23yOJIjQS4wH s2GG34YreACJ2SIvDkyPi8GjvdNTTv0nLKC/cM2oFMqMiblJlKQX2QMmpsqYB9ZH33P+xc hrtXE22lh0+LdXYs1nGEDjjEg5ymIaZRuFijPn1hHwqMLNhXoE3vDYezVlWmQsjbCkdbKi wd1czRZjmeVfDJbiWrSFSEhVTo3/fKkopziNYCCj9D4J0wxbYs0V51lLiP4ujrhVaIAWTa MFmtQGjszuzPXudyPTBbvVqs3A3/5kpGxbx4fjlZqAUHelERTaWJc2jk0QjoQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dS06G34B4zhdw for ; Thu, 11 Dec 2025 17:32:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id c44f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 11 Dec 2025 17:32:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Ricardo Branco From: Ed Maste Subject: git: dbac191956f9 - main - linux: Add support for kcmp(2) system call List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: dbac191956f9b51069617b09fd0a24ca0e7bfc12 Auto-Submitted: auto-generated Date: Thu, 11 Dec 2025 17:32:54 +0000 Message-Id: <693b0046.c44f.420319d4@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=dbac191956f9b51069617b09fd0a24ca0e7bfc12 commit dbac191956f9b51069617b09fd0a24ca0e7bfc12 Author: Ricardo Branco AuthorDate: 2025-12-08 21:27:07 +0000 Commit: Ed Maste CommitDate: 2025-12-11 17:31:47 +0000 linux: Add support for kcmp(2) system call Signed-off-by: Ricardo Branco Reviewed by: kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1920 --- sys/compat/linux/linux_dummy.c | 2 -- sys/compat/linux/linux_misc.c | 27 +++++++++++++++++++++++++++ sys/compat/linux/linux_misc.h | 11 +++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/sys/compat/linux/linux_dummy.c b/sys/compat/linux/linux_dummy.c index 19cd55849f65..46f98f4da1eb 100644 --- a/sys/compat/linux/linux_dummy.c +++ b/sys/compat/linux/linux_dummy.c @@ -96,8 +96,6 @@ DUMMY(setns); /* Linux 3.2: */ DUMMY(process_vm_readv); DUMMY(process_vm_writev); -/* Linux 3.5: */ -DUMMY(kcmp); /* Linux 3.8: */ DUMMY(finit_module); DUMMY(sched_setattr); diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 0925ffb64480..69fb9935a9ae 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -54,6 +54,7 @@ #include #include #include +#include #include #include @@ -3067,4 +3068,30 @@ linux_mq_getsetattr(struct thread *td, struct linux_mq_getsetattr_args *args) return (error); } +int +linux_kcmp(struct thread *td, struct linux_kcmp_args *args) +{ + int type; + + switch (args->type) { + case LINUX_KCMP_FILE: + type = KCMP_FILE; + break; + case LINUX_KCMP_FILES: + type = KCMP_FILES; + break; + case LINUX_KCMP_SIGHAND: + type = KCMP_SIGHAND; + break; + case LINUX_KCMP_VM: + type = KCMP_VM; + break; + default: + return (EINVAL); + } + + return (kern_kcmp(td, args->pid1, args->pid2, type, args->idx1, + args->idx)); +} + MODULE_DEPEND(linux, mqueuefs, 1, 1, 1); diff --git a/sys/compat/linux/linux_misc.h b/sys/compat/linux/linux_misc.h index 2d2b12ef0127..63ed914afc63 100644 --- a/sys/compat/linux/linux_misc.h +++ b/sys/compat/linux/linux_misc.h @@ -216,4 +216,15 @@ struct syscall_info { #define LINUX_IOPRIO_WHO_PGRP 2 #define LINUX_IOPRIO_WHO_USER 3 +/* Linux kcmp types from */ +#define LINUX_KCMP_FILE 0 +#define LINUX_KCMP_VM 1 +#define LINUX_KCMP_FILES 2 +#define LINUX_KCMP_FS 3 +#define LINUX_KCMP_SIGHAND 4 +#define LINUX_KCMP_IO 5 +#define LINUX_KCMP_SYSVSEM 6 +#define LINUX_KCMP_EPOLL_TFD 7 +#define LINUX_KCMP_TYPES 8 + #endif /* _LINUX_MISC_H_ */ From nobody Thu Dec 11 17:32:55 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dS06H5r5Wz6K5FW for ; Thu, 11 Dec 2025 17:32:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dS06H4NDzz42xr for ; Thu, 11 Dec 2025 17:32:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765474375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uFBaYOd/A1FRCSWisjQMRdcVhpVT52MRKnO4k78L8NU=; b=p0ofs8D/iUFMk3dyayQjLbB4i4ew6jfqgwLTgxuwn+yQNpXHvjtbmenF++UgQy6Au9z74N /BmoOW31XwoD09nE2cNFo6q5Lnfe/85BkGUNBBxQJqrIjH+G6vvxASJgX6U1ltARYFux5G XA6qrwNHi1qMYJ3IOwaGuaPgU+67rPW5r+pGdV3SH/93xs1pspSbDYfFzP7s/OhGhr0NN4 BftXIaXg4o7oUsrDCHl1Y9eHzByea2DyZTqB/7InCu55uurqkLD2BZk1+DrZRAgxxynxj7 d1Oi2JLkWyopLPzLxrArhAnH+p+BG160RAukXUG1G3F8gJWKeW80qcoHnTI/dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765474375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uFBaYOd/A1FRCSWisjQMRdcVhpVT52MRKnO4k78L8NU=; b=S1zU+7VKMUavN1VfF0/u0t4fSC8A0KaXgKquGdHvn+DgmTvGRmiC5DMwFi4WizBRsnx1Sn Jrnd5u9v/33GdDIjuOH0c5or8ott55BdlhsxZkENEp9txrUO0qHULmPqBSKH97E7WDilU7 0JPBEMs170s4sroPTwy+KR6VaNy4RwBazMo+y5df4JxM2jb8si/L9dvFZMv7mlOpEsb6P+ sETZpSN1Yunju1RWYXLLLi8ppMdw92jfDjHXmt3haazoRzMcPCU9ezcmoqqnNAoBpZ0VyW Bl0TXMWEpsQzIgRrAFk1JjKKqE0iP9iAiH9LCM+uKLHfOL40G7oAEjHaShPafw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765474375; a=rsa-sha256; cv=none; b=aPKdC3iaEi5btHXaffIAQ0ND/uEPWzbZzmjnMmkgXw7b4evYQ/l6bapG2TSwNQ6YkNCqeL zxmsXTTGWKqeHl4M6xRv62harJfzWbg3YTo64POkT4YCb8WxXRIfG/Pb3eU6KzjsOedkT8 /fUXUcHvVyQPgYgM3Gtza01NRR5ln2KJUCnvSX8vLUk6m9ypfoFU6yoN3fgbfSz1EbYO3M DmiPS7xUus6tj6YMppeUxBcMH+sYolYtFvIx02tE5Unl24dxAsc7BLoHSWhyo1C5UyBlRj 2r00k6F6ylo1wf9RlPJwV1kPZZegrERH692fxtmSU6YekLTU6/WkTARa/39Vmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dS06H3jVKzhdx for ; Thu, 11 Dec 2025 17:32:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d90c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 11 Dec 2025 17:32:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Ricardo Branco From: Ed Maste Subject: git: fe21dbf70aa8 - main - linux: Implement F_DUPFD_QUERY fcntl with kcmp(2) KCMP_FILE List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: fe21dbf70aa8c6dfd2010f30dd2d09f7b743e77d Auto-Submitted: auto-generated Date: Thu, 11 Dec 2025 17:32:55 +0000 Message-Id: <693b0047.d90c.74555850@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fe21dbf70aa8c6dfd2010f30dd2d09f7b743e77d commit fe21dbf70aa8c6dfd2010f30dd2d09f7b743e77d Author: Ricardo Branco AuthorDate: 2025-12-08 22:30:31 +0000 Commit: Ed Maste CommitDate: 2025-12-11 17:32:10 +0000 linux: Implement F_DUPFD_QUERY fcntl with kcmp(2) KCMP_FILE Signed-off-by: Ricardo Branco Reviewed by: kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1920 --- sys/compat/linux/linux_file.c | 8 ++++++++ sys/compat/linux/linux_file.h | 1 + 2 files changed, 9 insertions(+) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index a4be5313aa96..daddafa325ad 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -1457,6 +1457,14 @@ fcntl_common(struct thread *td, struct linux_fcntl_args *args) fdrop(fp, td); return (0); + case LINUX_F_DUPFD_QUERY: + error = kern_kcmp(td, td->td_proc->p_pid, td->td_proc->p_pid, + KCMP_FILE, args->fd, args->arg); + if (error != 0) + return (error); + td->td_retval[0] = (td->td_retval[0] == 0) ? 1 : 0; + return (0); + default: linux_msg(td, "unsupported fcntl cmd %d", args->cmd); return (EINVAL); diff --git a/sys/compat/linux/linux_file.h b/sys/compat/linux/linux_file.h index 7448dc597230..0b6ca536be7d 100644 --- a/sys/compat/linux/linux_file.h +++ b/sys/compat/linux/linux_file.h @@ -127,6 +127,7 @@ #define LINUX_F_SETLEASE (LINUX_F_SPECIFIC_BASE + 0) #define LINUX_F_GETLEASE (LINUX_F_SPECIFIC_BASE + 1) +#define LINUX_F_DUPFD_QUERY (LINUX_F_SPECIFIC_BASE + 3) #define LINUX_F_CANCELLK (LINUX_F_SPECIFIC_BASE + 5) #define LINUX_F_DUPFD_CLOEXEC (LINUX_F_SPECIFIC_BASE + 6) #define LINUX_F_NOTIFY (LINUX_F_SPECIFIC_BASE + 2) From nobody Thu Dec 11 18:00:41 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dS0kK5pfxz6K7PL for ; Thu, 11 Dec 2025 18:00:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dS0kK5MSxz45qJ for ; Thu, 11 Dec 2025 18:00:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765476041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sZrkjKSnAjtzOnHuEE7YIQlPnBKB7JLO5VXXdUrrcEk=; b=N102C4RO6FldQh+0h+SB+WnVvn0kMdRQLjKOfXhQ2FfO3Lu5W2tj+5ATYKH1oRacz9GI8R 03RH38/XFxWEfWLdsO/d7mdDARsskbaSeeomWgQRk0Pob3VnuAvEJiPYYG+WdmfL7p3tRQ Fe4Cs96B0DOG38ZQmXMlYeR82pRUZaQAQsVQDnKjDDJpRi4v+g95JzNuywEsh8eQ3T3RJg NB+aiHUhAaxlmqp6ah8WUZ5CHKjYIt6g2QqpbTnWtTH1sLbSxIwlL1/uq+NfJfxnuZTaV0 MUyPxyR2yM+oX0MhwTkr5m3aVI9BkpT54Aq/CKi6fAn9AWHReqJ3aBWjSalCVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765476041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sZrkjKSnAjtzOnHuEE7YIQlPnBKB7JLO5VXXdUrrcEk=; b=pODQiDvEqtl8QoFtBMyBa1vIk6z6C/xIWRyR67wQb1hxyNWX5FXIEZHx2ghz0Zb6z5Vm3u HS0GPu4G2jgb+PgZFoyPOPuFVVc3oVo52sa9uPYdL4Kl3QhVHKlkFkjntZ+d775BNsG6uR bNa1fwmu1gDErLSW0xXxBTra/S8VR409SZYdVAmffHo9Z7fW3WfuOka+puyK6Z9GLRveAQ uC89JVnEVQ8oo96mjraHMaIhBSX3KDITD3gXnesu9FgQF8UHJA2LBHxJmkbO527T56COyL FqEoC2bFAAsMGrxLKp3PhMAIN0GjK7kn/FM95dFkLjXNlNSdRSBteblfOQil8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765476041; a=rsa-sha256; cv=none; b=IIuzUIKdojGtLRiD/yaF6WcROvjQ/qmdSMdPmzwuZE+QNj0kb4arhwK7TAzCQfjj6bGowJ 5nuQ5waA3CdcIeR19nXMTLt/MfkZxefoNl7HXLT+lbcJKykH21S8TpSEA6IpgTbgJus/Um PPLs2J60lEojEVxnCWOOqgGyXgQOAN9uMJf8WZSv0XacvZjP5lEqViqIua7tS4lExG2YZw pQMoD2Ixtu5F+c2YvFKfZWvjWcmucPzt4uY7/jerwNZ3wodKY5PbkF4ZJQu78iuFRWxosv YzZwQ0VDKnU44DllnXXOLS28znQfGiavcaVjQkQSVN4ygG8twQT5aF/tJJlRYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dS0kK4yrzzhvG for ; Thu, 11 Dec 2025 18:00:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21921 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 11 Dec 2025 18:00:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Oskar Holmlund Subject: git: b9915c27a70f - main - sys/dts: Remove i.MX5 device tree List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oh X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b9915c27a70f6ab2215006d8ac0906f6206dc40d Auto-Submitted: auto-generated Date: Thu, 11 Dec 2025 18:00:41 +0000 Message-Id: <693b06c9.21921.62ab1c3@gitrepo.freebsd.org> The branch main has been updated by oh: URL: https://cgit.FreeBSD.org/src/commit/?id=b9915c27a70f6ab2215006d8ac0906f6206dc40d commit b9915c27a70f6ab2215006d8ac0906f6206dc40d Author: Oskar Holmlund AuthorDate: 2025-12-11 17:59:50 +0000 Commit: Oskar Holmlund CommitDate: 2025-12-11 17:59:50 +0000 sys/dts: Remove i.MX5 device tree IMX51 is already EOL and IMX53 is going to be EOL in Feb 2026. See NXP product longevity site Remove Digi ConnectCore Wi-i.MX53 Genesi Efika MX FreeBSD own DTSI for imx51 and imx53 sys/modules/dtb/imx5 for i.MX53 quick start board. Approved by: manu (mentor) Differential revision: https://reviews.freebsd.org/D53888 --- sys/dts/arm/digi-ccwmx53.dts | 151 --------- sys/dts/arm/efikamx.dts | 125 -------- sys/dts/arm/imx51x.dtsi | 619 ------------------------------------ sys/dts/arm/imx53x.dtsi | 712 ------------------------------------------ sys/modules/dtb/imx5/Makefile | 5 - 5 files changed, 1612 deletions(-) diff --git a/sys/dts/arm/digi-ccwmx53.dts b/sys/dts/arm/digi-ccwmx53.dts deleted file mode 100644 index c1b4abd956ef..000000000000 --- a/sys/dts/arm/digi-ccwmx53.dts +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (c) 2012 The FreeBSD Foundation - * Copyright (c) 2013 Rui Paulo - * All rights reserved. - * - * This software was developed by Semihalf under sponsorship from - * the FreeBSD Foundation. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * Digi ConnectCore Wi-i.MX53 - */ - -/dts-v1/; -/include/ "imx53x.dtsi" - -/ { - model = "Digi ConnectCore Wi-i.MX53"; - compatible = "digi,imx53-ccwm53", "fsl,imx53"; - - memory { - /* RAM 512M */ - reg = <0x70000000 0x10000000 - 0xB0000000 0x10000000>; - }; - - localbus@10000000 { - sata@10000000 { - status = "okay"; - }; - ipu3@1E000000 { - status = "okay"; - }; - }; - - soc@50000000 { - aips@50000000 { - spba@50000000 { - esdhc@50004000 { - clock-frequency = <216000000>; - status = "okay"; - }; - esdhc@50008000 { - clock-frequency = <216000000>; - status = "okay"; - }; - SSI2: ssi@50014000 { - status = "okay"; - }; - }; - timer@53fa0000 { - status = "okay"; - }; - /* UART1, console */ - console: serial@53fbc000 { - status = "okay"; - clock-frequency = <0>; /* won't load w/o this */ - }; - serial@53fc0000 { - status = "okay"; - clock-frequency = <0>; /* won't load w/o this */ - }; - serial@53ff0000 { - status = "okay"; - clock-frequency = <0>; /* won't load w/o this */ - }; - clock@53fd4000 { - status = "okay"; - }; - gpio@53f84000 { - status = "okay"; - }; - gpio@53f88000 { - status = "okay"; - }; - gpio@53f8c000 { - status = "okay"; - }; - gpio@53f90000 { - status = "okay"; - }; - usb@53f80000 /* OTG */ { - status = "okay"; - }; - usb@53f80200 /* Host 1 */ { - status = "okay"; - }; - wdog@53f98000 { - status = "okay"; - }; - i2c@53fec000 { - status = "okay"; - rtc@68 { - compatible = "dialog,ds9052"; - reg = <0x48>; - interrupts = <0x1 0x1 0 0>; - }; - }; - }; - aips@60000000 { - ethernet@63fec000 { - status = "okay"; - phy-mode = "rmii"; - }; - i2c@63fc4000 { - status = "okay"; - }; - i2c@63fc8000 { - status = "okay"; - }; - audmux@63fd4000 { - status = "okay"; - }; - ide@63fe0000 { - status = "okay"; - }; - serial@63f90000 { - status = "okay"; - }; - }; - }; - - aliases { - SSI2 = &SSI2; - }; - - chosen { - bootargs = "-v"; - stdin = &console; - stdout = &console; - }; -}; diff --git a/sys/dts/arm/efikamx.dts b/sys/dts/arm/efikamx.dts deleted file mode 100644 index 7b04b7f52e14..000000000000 --- a/sys/dts/arm/efikamx.dts +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (c) 2012 The FreeBSD Foundation - * - * This software was developed by Semihalf under sponsorship from - * the FreeBSD Foundation. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * Freescale i.MX515 Device Tree Source. - */ - -/dts-v1/; -/include/ "imx51x.dtsi" - -/ { - model = "Genesi Efika MX"; - compatible = "genesi,imx51-efikamx", "fsl,imx51"; - - memory { - /* RAM 512M */ - reg = <0x90000000 0x20000000>; - }; - - localbus@5e000000 { - ipu3@5e000000 { - status = "okay"; - }; - }; - - soc@70000000 { - aips@70000000 { - spba@70000000 { - esdhc@70004000 { - clock-frequency = <216000000>; - status = "okay"; - }; - esdhc@70008000 { - clock-frequency = <216000000>; - status = "okay"; - }; - SSI2: ssi@70014000 { - status = "okay"; - }; - }; - timer@73fa0000 { - status = "okay"; - }; - - /* UART1, console */ - UART1: serial@73fbc000 { - status = "okay"; - clock-frequency = <3000000>; /* XXX */ - }; - - clock@73fd4000 { - status = "okay"; - }; - gpio@73f84000 { - status = "okay"; - }; - gpio@73f88000 { - status = "okay"; - }; - gpio@73f8c000 { - status = "okay"; - }; - gpio@73f90000 { - status = "okay"; - }; - usb@73f80000 /* OTG */ { - status = "okay"; - }; - usb@73f80200 /* Host 1 */ { - status = "okay"; - }; - wdog@73f98000 { - status = "okay"; - }; - }; - aips@80000000 { - i2c@83fc4000 { - status = "okay"; - }; - i2c@83fc8000 { - status = "okay"; - }; - audmux@83fd4000 { - status = "okay"; - }; - ide@83fe0000 { - status = "okay"; - }; - }; - }; - - aliases { - UART1 = &UART1; - SSI2 = &SSI2; - }; - - chosen { - bootargs = "-v"; - stdin = "UART1"; - stdout = "UART1"; - }; -}; diff --git a/sys/dts/arm/imx51x.dtsi b/sys/dts/arm/imx51x.dtsi deleted file mode 100644 index 00624c265d1d..000000000000 --- a/sys/dts/arm/imx51x.dtsi +++ /dev/null @@ -1,619 +0,0 @@ -/* - * Copyright (c) 2012 The FreeBSD Foundation - * - * This software was developed by Semihalf under sponsorship from - * the FreeBSD Foundation. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * Freescale i.MX515 Device Tree Source. - */ - -/ { - #address-cells = <1>; - #size-cells = <1>; - - aliases { - soc = &SOC; - }; - - - cpus { - #address-cells = <1>; - #size-cells = <0>; - - cpu@0 { - device_type = "cpu"; - compatible = "ARM,MCIMX515"; - reg = <0x0>; - d-cache-line-size = <32>; - i-cache-line-size = <32>; - d-cache-size = <0x8000>; - i-cache-size = <0x8000>; - /* TODO: describe L2 cache also */ - timebase-frequency = <0>; - bus-frequency = <0>; - clock-frequency = <0>; - }; - }; - - localbus@e0000000 { - compatible = "simple-bus"; - #address-cells = <1>; - #size-cells = <1>; - - /* This reflects CPU decode windows setup. */ - ranges; - - tzic: tz-interrupt-controller@e0000000 { - compatible = "fsl,imx51-tzic", "fsl,tzic"; - interrupt-controller; - #interrupt-cells = <1>; - reg = <0xe0000000 0x00004000>; - }; - /* - * 60000000 60000FFF 4K Debug ROM - * 60001000 60001FFF 4K ETB - * 60002000 60002FFF 4K ETM - * 60003000 60003FFF 4K TPIU - * 60004000 60004FFF 4K CTI0 - * 60005000 60005FFF 4K CTI1 - * 60006000 60006FFF 4K CTI2 - * 60007000 60007FFF 4K CTI3 - * 60008000 60008FFF 4K Cortex Debug Unit - * - * E0000000 E0003FFF 0x4000 TZIC - */ - }; - - SOC: soc@70000000 { - compatible = "simple-bus"; - #address-cells = <1>; - #size-cells = <1>; - interrupt-parent = <&tzic>; - ranges = <0x70000000 0x70000000 0x14000000>; - - aips@70000000 { /* AIPS1 */ - compatible = "fsl,aips-bus", "simple-bus"; - #address-cells = <1>; - #size-cells = <1>; - interrupt-parent = <&tzic>; - ranges; - - /* Required by many devices, so better to stay first */ - /* 73FD4000 0x4000 CCM */ - clock@73fd4000 { - compatible = "fsl,imx51-ccm"; - /* 83F80000 0x4000 DPLLIP1 */ - /* 83F84000 0x4000 DPLLIP2 */ - /* 83F88000 0x4000 DPLLIP3 */ - reg = <0x73fd4000 0x4000 - 0x83F80000 0x4000 - 0x83F84000 0x4000 - 0x83F88000 0x4000>; - interrupt-parent = <&tzic>; - interrupts = <71 72>; - status = "disabled"; - }; - - /* - * GPIO modules moved up - to have it attached for - * drivers which rely on GPIO - */ - /* 73F84000 0x4000 GPIO1 */ - gpio1: gpio@73f84000 { - compatible = "fsl,imx51-gpio", "fsl,imx31-gpio"; - reg = <0x73f84000 0x4000>; - interrupt-parent = <&tzic>; - interrupts = <50 51 42 43 44 45 46 47 48 49>; - /* TODO: use <> also */ - gpio-controller; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <1>; - }; - - /* 73F88000 0x4000 GPIO2 */ - gpio2: gpio@73f88000 { - compatible = "fsl,imx51-gpio", "fsl,imx31-gpio"; - reg = <0x73f88000 0x4000>; - interrupt-parent = <&tzic>; - interrupts = <52 53>; - gpio-controller; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <1>; - }; - - /* 73F8C000 0x4000 GPIO3 */ - gpio3: gpio@73f8c000 { - compatible = "fsl,imx51-gpio", "fsl,imx31-gpio"; - reg = <0x73f8c000 0x4000>; - interrupt-parent = <&tzic>; - interrupts = <54 55>; - gpio-controller; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <1>; - }; - - /* 73F90000 0x4000 GPIO4 */ - gpio4: gpio@73f90000 { - compatible = "fsl,imx51-gpio", "fsl,imx31-gpio"; - reg = <0x73f90000 0x4000>; - interrupt-parent = <&tzic>; - interrupts = <56 57>; - gpio-controller; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <1>; - }; - - spba@70000000 { - compatible = "fsl,spba-bus", "simple-bus"; - #address-cells = <1>; - #size-cells = <1>; - interrupt-parent = <&tzic>; - ranges; - - /* 70004000 0x4000 ESDHC 1 */ - esdhc@70004000 { - compatible = "fsl,imx51-esdhc"; - reg = <0x70004000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <1>; - status = "disabled"; - }; - - /* 70008000 0x4000 ESDHC 2 */ - esdhc@70008000 { - compatible = "fsl,imx51-esdhc"; - reg = <0x70008000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <2>; - status = "disabled"; - }; - - /* 7000C000 0x4000 UART 3 */ - uart3: serial@7000c000 { - compatible = "fsl,imx51-uart", "fsl,imx-uart"; - reg = <0x7000c000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <33>; - status = "disabled"; - }; - - /* 70010000 0x4000 eCSPI1 */ - ecspi@70010000 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "fsl,imx51-ecspi"; - reg = <0x70010000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <36>; - status = "disabled"; - }; - - /* 70014000 0x4000 SSI2 irq30 */ - SSI2: ssi@70014000 { - compatible = "fsl,imx51-ssi"; - reg = <0x70014000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <30>; - status = "disabled"; - }; - - /* 70020000 0x4000 ESDHC 3 */ - esdhc@70020000 { - compatible = "fsl,imx51-esdhc"; - reg = <0x70020000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <3>; - status = "disabled"; - }; - - /* 70024000 0x4000 ESDHC 4 */ - esdhc@70024000 { - compatible = "fsl,imx51-esdhc"; - reg = <0x70024000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <4>; - status = "disabled"; - }; - - /* 70028000 0x4000 SPDIF */ - /* 91 SPDIF */ - - /* 70030000 0x4000 PATA (PORT UDMA) irq70 */ - - /* 70034000 0x4000 SLM */ - /* 70038000 0x4000 HSI2C */ /* 64 HS-I2C */ - /* 7003C000 0x4000 SPBA */ - }; - - usbphy0: usbphy@0 { - compatible = "usb-nop-xceiv"; - status = "okay"; - }; - - usbotg: usb@73f80000 { - compatible = "fsl,imx51-usb", "fsl,imx27-usb"; - reg = <0x73f80000 0x0200>; - interrupts = <18>; - fsl,usbmisc = <&usbmisc 0>; - fsl,usbphy = <&usbphy0>; - status = "disabled"; - }; - - usbh1: usb@73f80200 { - compatible = "fsl,imx51-usb", "fsl,imx27-usb"; - reg = <0x73f80200 0x0200>; - interrupts = <14>; - fsl,usbmisc = <&usbmisc 1>; - status = "disabled"; - }; - - usbh2: usb@73f80400 { - compatible = "fsl,imx51-usb", "fsl,imx27-usb"; - reg = <0x73f80400 0x0200>; - interrupts = <16>; - fsl,usbmisc = <&usbmisc 2>; - status = "disabled"; - }; - - usbh3: usb@73f80600 { - compatible = "fsl,imx51-usb", "fsl,imx27-usb"; - reg = <0x73f80600 0x0200>; - interrupts = <17>; - fsl,usbmisc = <&usbmisc 3>; - status = "disabled"; - }; - - usbmisc: usbmisc@73f80800 { - #index-cells = <1>; - compatible = "fsl,imx51-usbmisc"; - reg = <0x73f80800 0x200>; - }; - - /* 73F98000 0x4000 WDOG1 */ - wdog@73f98000 { - compatible = "fsl,imx51-wdt", "fsl,imx21-wdt"; - reg = <0x73f98000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <58>; - status = "disabled"; - }; - - /* 73F9C000 0x4000 WDOG2 (TZ) */ - wdog@73f9c000 { - compatible = "fsl,imx51-wdt", "fsl,imx21-wdt"; - reg = <0x73f9c000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <59>; - status = "disabled"; - }; - - /* 73F94000 0x4000 KPP */ - keyboard@73f94000 { - compatible = "fsl,imx51-kpp"; - reg = <0x73f94000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <60>; - status = "disabled"; - }; - - /* 73FA0000 0x4000 GPT */ - timer@73fa0000 { - compatible = "fsl,imx51-gpt"; - reg = <0x73fa0000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <39>; - status = "disabled"; - }; - - /* 73FA4000 0x4000 SRTC */ - - rtc@73fa4000 { - compatible = "fsl,imx51-srtc"; - reg = <0x73fa4000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <24 25>; - status = "disabled"; - }; - - /* 73FA8000 0x4000 IOMUXC */ - iomux@73fa8000 { - compatible = "fsl,imx51-iomux"; - reg = <0x73fa8000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <7>; - }; - - /* 73FAC000 0x4000 EPIT1 */ - epit1: timer@73fac000 { - compatible = "fsl,imx51-epit"; - reg = <0x73fac000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <40>; - status = "disabled"; - }; - - /* 73FB0000 0x4000 EPIT2 */ - epit2: timer@73fb0000 { - compatible = "fsl,imx51-epit"; - reg = <0x73fb0000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <41>; - status = "disabled"; - }; - - /* 73FB4000 0x4000 PWM1 */ - pwm@73fb4000 { - compatible = "fsl,imx51-pwm"; - reg = <0x73fb4000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <61>; - status = "disabled"; - }; - - /* 73FB8000 0x4000 PWM2 */ - pwm@73fb8000 { - compatible = "fsl,imx51-pwm"; - reg = <0x73fb8000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <94>; - status = "disabled"; - }; - - /* 73FBC000 0x4000 UART 1 */ - uart1: serial@73fbc000 { - compatible = "fsl,imx51-uart", "fsl,imx-uart"; - reg = <0x73fbc000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <31>; - status = "disabled"; - }; - - /* 73FC0000 0x4000 UART 2 */ - uart2: serial@73fc0000 { - compatible = "fsl,imx51-uart", "fsl,imx-uart"; - reg = <0x73fc0000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <32>; - status = "disabled"; - }; - - /* 73FC4000 0x4000 USBOH3 */ - /* NOTYET - usb@73fc4000 { - compatible = "fsl,imx51-otg"; - reg = <0x73fc4000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <>; - status = "disabled"; - }; - */ - /* 73FD0000 0x4000 SRC */ - reset@73fd0000 { - compatible = "fsl,imx51-src"; - reg = <0x73fd0000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <75>; - status = "disabled"; - }; - /* 73FD8000 0x4000 GPC */ - power@73fd8000 { - compatible = "fsl,imx51-gpc"; - reg = <0x73fd8000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <73 74>; - status = "disabled"; - }; - - }; - - aips@80000000 { /* AIPS2 */ - compatible = "fsl,aips-bus", "simple-bus"; - #address-cells = <1>; - #size-cells = <1>; - interrupt-parent = <&tzic>; - ranges; - - /* 83F94000 0x4000 AHBMAX */ - /* 83F98000 0x4000 IIM */ - /* - * 69 IIM Interrupt request to the processor. - * Indicates to the processor that program or - * explicit. - */ - /* 83F9C000 0x4000 CSU */ - /* - * 27 CSU Interrupt Request 1. Indicates to the - * processor that one or more alarm inputs were. - */ - - /* 83FA0000 0x4000 TIGERP_PLATFORM_NE_32K_256K */ - /* irq76 Neon Monitor Interrupt */ - /* irq77 Performance Unit Interrupt */ - /* irq78 CTI IRQ */ - /* irq79 Debug Interrupt, Cross-Trigger Interface 1 */ - /* irq80 Debug Interrupt, Cross-Trigger Interface 1 */ - /* irq89 Debug Interrupt, Cross-Trigger Interface 2 */ - /* irq98 Debug Interrupt, Cross-Trigger Interface 3 */ - - /* 83FA4000 0x4000 OWIRE irq88 */ - /* 83FA8000 0x4000 FIRI irq93 */ - /* 83FAC000 0x4000 eCSPI2 */ - ecspi@83fac000 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "fsl,imx51-ecspi"; - reg = <0x83fac000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <37>; - status = "disabled"; - }; - - /* 83FB0000 0x4000 SDMA */ - sdma@83fb0000 { - compatible = "fsl,imx51-sdma", "fsl,imx35-sdma"; - reg = <0x83fb0000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <6>; - }; - - /* 83FB4000 0x4000 SCC */ - /* 21 SCC Security Monitor High Priority Interrupt. */ - /* 22 SCC Secure (TrustZone) Interrupt. */ - /* 23 SCC Regular (Non-Secure) Interrupt. */ - - /* 83FB8000 0x4000 ROMCP */ - /* 83FBC000 0x4000 RTIC */ - /* - * 26 RTIC RTIC (Trust Zone) Interrupt Request. - * Indicates that the RTIC has completed hashing the - */ - - /* 83FC0000 0x4000 CSPI */ - cspi@83fc0000 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "fsl,imx51-cspi", "fsl,imx35-cspi"; - reg = <0x83fc0000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <38>; - status = "disabled"; - }; - - /* 83FC4000 0x4000 I2C2 */ - i2c@83fc4000 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "fsl,imx51-i2c", "fsl,imx1-i2c", "fsl,imx-i2c"; - reg = <0x83fc4000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <63>; - status = "disabled"; - }; - - /* 83FC8000 0x4000 I2C1 */ - i2c@83fc8000 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "fsl,imx51-i2c", "fsl,imx1-i2c", "fsl,imx-i2c"; - reg = <0x83fc8000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <62>; - status = "disabled"; - }; - - /* 83FCC000 0x4000 SSI1 */ - /* 29 SSI1 SSI-1 Interrupt Request */ - SSI1: ssi@83fcc000 { - compatible = "fsl,imx51-ssi"; - reg = <0x83fcc000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <29>; - status = "disabled"; - }; - - /* 83FD0000 0x4000 AUDMUX */ - audmux@83fd4000 { - compatible = "fsl,imx51-audmux"; - reg = <0x83fd4000 0x4000>; - status = "disabled"; - }; - - /* 83FD8000 0x4000 EMI1 */ - /* 8 EMI (NFC) */ - /* 15 EMI */ - /* 97 EMI Boot sequence completed interrupt */ - /* - * 101 EMI Indicates all pages have been transferred - * to NFC during an auto program operation. - */ - - /* 83FE0000 0x4000 PATA (PORT PIO) */ - /* 70 PATA Parallel ATA host controller interrupt */ - ide@83fe0000 { - compatible = "fsl,imx51-ata"; - reg = <0x83fe0000 0x4000>; - interrupt-parent = <&tzic>; - interrupts = <70>; - status = "disabled"; - }; - - /* 83FE4000 0x4000 SIM */ - /* 67 SIM intr composed of oef, xte, sdi1, and sdi0 */ - /* 68 SIM intr composed of tc, etc, tfe, and rdrf */ - - /* 83FE8000 0x4000 SSI3 */ - /* 96 SSI3 SSI-3 Interrupt Request */ - SSI3: ssi@83fe8000 { - compatible = "fsl,imx51-ssi"; - reg = <0x83fe8000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <96>; - status = "disabled"; - }; - - /* 83FEC000 0x4000 FEC */ - ethernet@83fec000 { - compatible = "fsl,imx51-fec"; - reg = <0x83fec000 0x4000>; - interrupt-parent = <&tzic>; interrupts = <87>; - status = "disabled"; - }; - - /* 83FF0000 0x4000 TVE */ - /* 92 TVE */ - /* 83FF4000 0x4000 VPU */ - /* 9 VPU */ - /* 100 VPU Idle interrupt from VPU */ - - /* 83FF8000 0x4000 SAHARA Lite */ - /* 19 SAHARA SAHARA host 0 (TrustZone) Intr Lite */ - /* 20 SAHARA SAHARA host 1 (non-TrustZone) Intr Lite */ - }; - }; - - localbus@5e000000 { - compatible = "simple-bus"; - #address-cells = <1>; - #size-cells = <1>; - - ranges; - - vga: ipu3@5e000000 { - compatible = "fsl,ipu3"; - reg = < - 0x5e000000 0x08000 /* CM */ - 0x5e008000 0x08000 /* IDMAC */ - 0x5e018000 0x08000 /* DP */ - 0x5e020000 0x08000 /* IC */ - 0x5e028000 0x08000 /* IRT */ - 0x5e030000 0x08000 /* CSI0 */ - 0x5e038000 0x08000 /* CSI1 */ - 0x5e040000 0x08000 /* DI0 */ - 0x5e048000 0x08000 /* DI1 */ - 0x5e050000 0x08000 /* SMFC */ - 0x5e058000 0x08000 /* DC */ - 0x5e060000 0x08000 /* DMFC */ - 0x5e068000 0x08000 /* VDI */ - 0x5f000000 0x20000 /* CPMEM */ - 0x5f020000 0x20000 /* LUT */ - 0x5f040000 0x20000 /* SRM */ - 0x5f060000 0x20000 /* TPM */ - 0x5f080000 0x20000 /* DCTMPL */ - >; - interrupt-parent = <&tzic>; - interrupts = < - 10 /* IPUEX Error */ - 11 /* IPUEX Sync */ - >; - status = "disabled"; - }; - }; -}; - -/* - -TODO: Not mapped interrupts - -5 DAP -84 GPU2D (OpenVG) general interrupt -85 GPU2D (OpenVG) busy signal (for S/W power gating feasibility) -12 GPU3D -102 GPU3D Idle interrupt from GPU3D (for S/W power gating) -90 SJC -*/ diff --git a/sys/dts/arm/imx53x.dtsi b/sys/dts/arm/imx53x.dtsi deleted file mode 100644 index 0358c448e7d5..000000000000 --- a/sys/dts/arm/imx53x.dtsi +++ /dev/null @@ -1,712 +0,0 @@ -/* - * Copyright (c) 2012 The FreeBSD Foundation - * Copyright (c) 2013 Rui Paulo - * All rights reserved. - * - * This software was developed by Semihalf under sponsorship from - * the FreeBSD Foundation. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * Freescale i.MX535 Device Tree Source. - */ - -/ { - #address-cells = <1>; - #size-cells = <1>; - - aliases { *** 686 LINES SKIPPED *** From nobody Thu Dec 11 19:08:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dS2D56z4Nz6KCjP for ; Thu, 11 Dec 2025 19:08:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dS2D54pB6z3JGw for ; Thu, 11 Dec 2025 19:08:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765480085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LkSzb6X/wEX8/J61tslF3dCT8Xocuc1o9i5gmw0Cd7g=; b=OgoXM9/26Rmi5PU8DpQ3jRWFY0uTiuBX39qWxMJBbRsxwDjclyF6qjT6ze2OZO1Zs20REV 2uk6LT5fd5oLbDgsQyY2qTt1Sw3UB66mN/6Z2ux/uMFc0eixCYhQFpHq9mn1ocFjY/tzap zWK0kh/vF5DPmgT131Fb8g9wuoitzhd9hEWCQ4q56ux5yj+4iV7dQORN3biQa9jTampvRs D8wOJIz8wISX/9BPHZC1xqz6tOCVlEVHqECaupB/WslObrJEN0pDKvr+9uSMAj/YUr4IdZ lW1jDx3KmKdW+TaFqmrGXCZJb2VKAXywJ5GalvkIsSMm50HlfFvSnlLWa2qcTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765480085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LkSzb6X/wEX8/J61tslF3dCT8Xocuc1o9i5gmw0Cd7g=; b=q3yZ3sfa04yQoX6pl3Tj8IfrA9fcl5O1VteTyy5yJtIPv62d8N2CgaE38CUOBfJm8dZ9JN Fbm8lSjIn/D4L74yiFocqSxoJuPTDcRfknvzAYEtfk0SGcO7AdkwcVEysR1e8OC38bwFYT dCZiASsNrVrJFEas3SLH2LiwuMhi5QqzoPT0Mcr4fsvsIQSwSLuzFjlzqri0NU8X+UmPYV /JRFNMJ3wS1DusQSpO47lrkbVyUpiWbwPZmdDGrh2bfkLUXpWWA9NzKFfktbw5LCOej/mn aiI4WGcO6FbOWy7rjVppFhiOrHQszv9bg2u06Engx5Yupze6IYhjs3KffJkFMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765480085; a=rsa-sha256; cv=none; b=FRF6kjW6hO2pv2MGBfzfRD3hBennpGnaWVAKoIg39V2quIRV3qIy8Hvz8eO9Tmrwtg6vG4 0frglSgBtzIOPhkyDqq+ja4uK5eYGW8zG2Ro0RcPADsjeBE/wgWlSe31ohwq4p9fcTz7SZ fuCSxWKQM0dpj7+0qhh56JqUNE1U6w4TluwL3yiHPI7BNQBbHnrofnWoRXf9uHJ6NS9qBT N6/zdrnItCDgN7CzgXErM3fsTkaGZbOF8bEgB8ULPm0diBlot0kUJsNa3w88JLpTpOSApg nr9QtRALbfM8Cp6BeVzCd5YxrtehsFKiks7JqpKfSsc0DadGke/noh18Lz4pmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dS2D53bHfzkdB for ; Thu, 11 Dec 2025 19:08:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 268a9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 11 Dec 2025 19:08:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 8ac7a3801c6a - main - cam: Reduce overly long timeout values for initial device probing List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 8ac7a3801c6a780edf6166c14915d7ac6e36e816 Auto-Submitted: auto-generated Date: Thu, 11 Dec 2025 19:08:05 +0000 Message-Id: <693b1695.268a9.145b4f4f@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8ac7a3801c6a780edf6166c14915d7ac6e36e816 commit 8ac7a3801c6a780edf6166c14915d7ac6e36e816 Author: Warner Losh AuthorDate: 2025-12-11 19:05:32 +0000 Commit: Warner Losh CommitDate: 2025-12-11 19:07:17 +0000 cam: Reduce overly long timeout values for initial device probing Currently, we have very long timeouts for the initial probing commands. However, these are not appropriate for modern (post 2010) SCSI disks. Sandards since SPC3 state that these commands should not wait for media access. Since we retry them several times during the initial bus scan, these delays can delay the boot by minutes (5 minutes per errant disk in our expereince). These delays don't help and only hurt, so reduce the TESTUNITREADY, INQUIRY and MODESENSE commands (during the initial probe). Provide sysctl/tuneables to change the time for these and also the REPORTLUNS commands for people that might need to adjust them for devices that violate this belief but none-the-less work with longer timeouts. kern.cam.tur_timeout (default was 60s, now 1s) kern.cam.inquiry_timeout (default was 60s, now 1s) kern.cam.reportluns_timeout (default is 60s) kern.cam.modesense_timeout (default was 60s, now 1s) This can be partially merged: the sysctls can, but the new defaults likely shouldn't. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D52427 --- UPDATING | 11 +++++++++++ share/man/man4/scsi.4 | 34 +++++++++++++++++++++++++++++++++- sys/cam/scsi/scsi_xpt.c | 28 ++++++++++++++++++++++------ 3 files changed, 66 insertions(+), 7 deletions(-) diff --git a/UPDATING b/UPDATING index aaef0e5b4cd3..f6cf0109f894 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,17 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20251212: + Timeouts for SCSI bus probing have been drastically reduced. They are + now tuneables that can be set in the boot loader should you have a + device that requires a longer-than-standards imply timeout but + none-the-less works. + + kern.cam.tur_timeout (default was 60s, now 1s) + kern.cam.inquiry_timeout (default was 60s, now 1s) + kern.cam.reportluns_timeout (default is 60s) + kern.cam.modesense_timeout (default was 60s, now 1s) + 20251115: The FreeBSD-base repository is now defined in /etc/pkg/FreeBSD.conf, disabled by default. In -CURRENT and -STABLE this points at nightly diff --git a/share/man/man4/scsi.4 b/share/man/man4/scsi.4 index 380768c2d7c1..c922f3f56d15 100644 --- a/share/man/man4/scsi.4 +++ b/share/man/man4/scsi.4 @@ -22,7 +22,7 @@ .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. -.Dd December 11, 2023 +.Dd December 11, 2025 .Dt CAM 4 .Os .Sh NAME @@ -69,6 +69,38 @@ appropriate drivers. The .Xr pass 4 driver, if it is configured in the kernel, will attach to all devices. +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width 12 +.It Va kern.cam.cam_srch_hi +Search above LUN 7 for SCSI3 and greater devices. +.It Va kern.cam.tur_timeout +Timeout, in ms, for the initial TESTUNITREADY command we send to the devices +during their initial probing. +Defaults to 1s. +.Fx 15 +and earlier set this to 60s. +.It Va kern.cam.inquiry_timeout +Timeout, in ms, for the initial INQUIRY command we send to the devices +during their initial probing. +Defaults to 1s. +.Fx 15 +and earlier set this to 60s. +.It Va kern.cam.reportluns_timeout +Timeout, in ms, for the initial REPORTLUNS command we send to the devices +during their initial probing. +Defaults to 50s. +.It Va kern.cam.modesense_timeout +Timeout, in ms, for the initial MODESENSE command we send to the devices +during their initial probing. +Defaults to 1s. +.Fx 15 +and earlier set this to 60s. +.El .Sh KERNEL CONFIGURATION There are a number of generic kernel configuration options for the .Nm diff --git a/sys/cam/scsi/scsi_xpt.c b/sys/cam/scsi/scsi_xpt.c index d0c170867b97..835c7c8ad825 100644 --- a/sys/cam/scsi/scsi_xpt.c +++ b/sys/cam/scsi/scsi_xpt.c @@ -78,6 +78,22 @@ static int cam_srch_hi = 0; SYSCTL_INT(_kern_cam, OID_AUTO, cam_srch_hi, CTLFLAG_RWTUN, &cam_srch_hi, 0, "Search above LUN 7 for SCSI3 and greater devices"); +static int tur_timeout = 1000; /* 1s now, 60s before */ +SYSCTL_INT(_kern_cam, OID_AUTO, tur_timeout, CTLFLAG_RWTUN, + &tur_timeout, 0, "TESTUNITREADY timeout on probing"); + +static int inquiry_timeout = 1000; /* 1s now, 60s before */ +SYSCTL_INT(_kern_cam, OID_AUTO, inquiry_timeout, CTLFLAG_RWTUN, + &inquiry_timeout, 0, "INQUIRY timeout on probing"); + +static int reportluns_timeout = 60000; /* 60s */ +SYSCTL_INT(_kern_cam, OID_AUTO, reportluns_timeout, CTLFLAG_RWTUN, + &reportluns_timeout, 0, "REPORTLUNS timeout on probing"); + +static int modesense_timeout = 1000; /* 1s now, 60s */ +SYSCTL_INT(_kern_cam, OID_AUTO, modesense_timeout, CTLFLAG_RWTUN, + &modesense_timeout, 0, "MODESENSE timeout on probing"); + #define CAM_SCSI2_MAXLUN 8 #define CAM_CAN_GET_SIMPLE_LUN(x, i) \ ((((x)->luns[i].lundata[0] & RPL_LUNDATA_ATYP_MASK) == \ @@ -760,7 +776,7 @@ again: probedone, MSG_SIMPLE_Q_TAG, SSD_FULL_SIZE, - /*timeout*/60000); + /*timeout*/tur_timeout); break; } case PROBE_INQUIRY: @@ -816,7 +832,7 @@ again: /*evpd*/FALSE, /*page_code*/0, SSD_MIN_SIZE, - /*timeout*/60 * 1000); + /*timeout*/inquiry_timeout); break; } case PROBE_REPORT_WLUNS: @@ -856,7 +872,7 @@ again: } scsi_report_luns(csio, 5, probedone, MSG_SIMPLE_Q_TAG, RPL_REPORT_DEFAULT, rp, periph->path->target->rpl_size, - SSD_FULL_SIZE, 60000); + SSD_FULL_SIZE, reportluns_timeout); break; } case PROBE_MODE_SENSE: @@ -879,7 +895,7 @@ again: mode_buf, mode_buf_len, SSD_FULL_SIZE, - /*timeout*/60000); + /*timeout*/modesense_timeout); break; } xpt_print(periph->path, @@ -1026,7 +1042,7 @@ done: probedone, MSG_SIMPLE_Q_TAG, SSD_FULL_SIZE, - /*timeout*/60000); + /*timeout*/tur_timeout); break; } @@ -1039,7 +1055,7 @@ done: /*evpd*/FALSE, /*page_code*/0, SSD_MIN_SIZE, - /*timeout*/60 * 1000); + /*timeout*/inquiry_timeout); break; } default: From nobody Fri Dec 12 04:24:34 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dSGZB27zTz6KDCD for ; Fri, 12 Dec 2025 04:24:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dSGZB1FQSz3LxW for ; Fri, 12 Dec 2025 04:24:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765513474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qj3JwCFZERfoezvVkwlgnddCpxAJSIn55TiSWdQLZP4=; b=mvqCMmpMlP57DUvtM6X+oqig3OK7vVJOwYSpnVSRdJpPmHuLvQvbKwGXIEkBaQRt2UGtyO ENo3v0/zloQ8SNSzaN/ms19af98ouQnTRF+X4Hfry595i2pAzpAVht31tCyXtbqZNbqU/e fo2ZLACISwfj1f+VvyxPjq9UYaYkC1PDMsW1qBmh0ZbDV/S5asVsX7CyhVRjtRlFdH3zpG 0wMQpjGl6WQ3U9OBQBUd9iXBPQwX+pBxgcyk6AqANyKLgirU2W4TRBIH7Uszlbkr2YrRfR FTI5BL6fySWGKoZFBUvAKAyzJj1x+ObkYMBRfBXVHo5/yg3/bS1NkhWckMjxyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765513474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qj3JwCFZERfoezvVkwlgnddCpxAJSIn55TiSWdQLZP4=; b=OARfZvOMugQQAT5xCKP8il2VcJM9ZuJfUEHxo7NoaXLro+QUk6o0WBD6b4L0VMNn2iaq3V bHUTN8xf8/56BDv3biJmO8bZh8/NM7Qtt+zmZ4K6oD324ibnS7GMedGnPl1Lk6RGdzat6+ mwSbC6STs4OZnXO50Jo0M5yfn/pdSbP4xeUjyL7+wo5ikUO3pVx9oRJ1KDfd72Ezq3v6NI X/NyWkwjjFf5EOtagFQ+TNzx/sWgChKMGoV9nrwY8sDsQw77vnrWZhHNBDlC/20KlWenXJ eG7VerP+O4SDw8P2DHBgRCs8YB8QDSYC9RNxW7JGUNdF6QrTz+0lfwsoAiyBHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765513474; a=rsa-sha256; cv=none; b=NNQNCmRJ3WOWXRrMeqsB8X/43sVIHo7XprQkbci/PUNfjjbCcbcSgjQHmXEkPG29WU/ODq MKRs4NlaoGsQuNGtMfCuGiDOOCvXPaI9NN1NGj4vZpyRKif9htXjQgHdYKw++dnEHgFpeD tqnn5sc3V8ltpiNuoCmVJEBlAdyX90bVjXiRNHmj1ejfaf8mm2/fKqtJIEwRWYs82ggNwq kdc34bsHtoqOgc/SP6XEVuR+g1JhUVGCYvj64i8G9mmQ+zI01N8gzJ6zfCSDTve83cchJp 2ar7kIp0YiFMY/7s4SluWvxIKtNDpr195kR9D3ZaPcjmNfanA+dji021Ll3FiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dSGZB0r7Nz115Z for ; Fri, 12 Dec 2025 04:24:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 882c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 12 Dec 2025 04:24:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 478ac7dc2afd - main - cam: Also reduce timeout for wlun probing List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 478ac7dc2afde987e2f2087e5a13fa98a7cae4f9 Auto-Submitted: auto-generated Date: Fri, 12 Dec 2025 04:24:34 +0000 Message-Id: <693b9902.882c.7f104e97@gitrepo.freebsd.org> The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=478ac7dc2afde987e2f2087e5a13fa98a7cae4f9 commit 478ac7dc2afde987e2f2087e5a13fa98a7cae4f9 Author: Warner Losh AuthorDate: 2025-12-12 04:21:51 +0000 Commit: Warner Losh CommitDate: 2025-12-12 04:21:51 +0000 cam: Also reduce timeout for wlun probing wlun probing was added after my initial work on this and was overlooked in merging forward. Add the timeout here too, for the same reasons as for REPORT LUNS. This doesn't change the default. Fixes: 8ac7a3801c6a cam: Reduce overly long timeout values for initial device probing Sponsored by: Netflix Reviewed by: jaeyoon Differential Revision: https://reviews.freebsd.org/D54184 --- sys/cam/scsi/scsi_xpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cam/scsi/scsi_xpt.c b/sys/cam/scsi/scsi_xpt.c index 835c7c8ad825..56fcd3873831 100644 --- a/sys/cam/scsi/scsi_xpt.c +++ b/sys/cam/scsi/scsi_xpt.c @@ -849,7 +849,7 @@ again: } scsi_report_luns(csio, 5, probedone, MSG_SIMPLE_Q_TAG, RPL_REPORT_WELLKNOWN, rp, periph->path->target->rpl_size, - SSD_FULL_SIZE, 60000); + SSD_FULL_SIZE, reportluns_timeout); break; } case PROBE_REPORT_LUNS: From nobody Fri Dec 12 06:32:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dSKQG3qJXz6KPQN for ; Fri, 12 Dec 2025 06: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dSKQG36CYz3Z0n for ; Fri, 12 Dec 2025 06: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=1765521174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mCnWip99u/Ye28eaLG++vd9X+tChxyen2mbDG/fNEw4=; b=cmYKmGIGUm5a8lf2dprtzpDyjq1Kcc2pPz2hJKDHvq6QqSqefr0ds1WqCfoYHaETm7PgCX f/UfiIXCgpQ6agnPnL8gjy7pgMqj744VPdqAqUaTV5kODrZmqMuiqEAx3whJhuEnhuTEts SLq5W0d2piAkKJdQ7OEriZW4ID1BTJU0Vo1c/bXdP4mIv8iUcImCU1j6SpMSBuagbRkiRD 7ayTcgtz3HfjtGnjRwGSLBXkiKF/kpefk1N3WsZ32+WnI9RDO4z3b2C8ESc/bEYTx9+fqy ISzcrdMY87w7rkqRmckJSo47jqY+cBFluqEcgmx3keEX1rxAhw1gBuh9aF5b9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765521174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mCnWip99u/Ye28eaLG++vd9X+tChxyen2mbDG/fNEw4=; b=gbBzTiPoD5mbjQ6E6EyosHY8VPPzoEswsUT7/Aui/ueIV0qPoeyC9l3MvbRjd37PmFiDII daOhwRIjsZ4y7EwJ0LS8oQC+CJzgBinJvACzRDnhw3FrP3ds0Zs0/A4mAsaMTR/jNfeNfh rrpMN/FeJ3InMm5agtdhz9dBe6AwMkJ66C2b6UzNqMhvGAuoZK7wGFdZKmJBuU8+bqg48H HZ4mKwzQu0SELiEGCRSvTdUpnRUQPv8m3pnwDvRpiMqiSfgZbWphBGo+FSsYd0lUqaXlI6 WDLhKA3oFd9MSbzyNpZxniU6MKFDnwEVacYLjA2YDgpz6RCTnjXANRBs+DqgSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765521174; a=rsa-sha256; cv=none; b=haDQeYFZjnjrbC630kBAjNAUEdIOd6n+dt2MDNnvXJizMP5vPxJstVL0PbEt9O90Rlfp2h mX+YVYXM1cwxwZ/GOTBHeGhf1rus+i8JrZ9moDSmh38sQuB8Oy4DH0+KByDHn564PP/J8T Q05kgj1GlFx++dujk/Uiv4omUz+Pomsm6M+3tH6ZB8r1EjUWKv7RmD2JUwmBsD+56jJzf2 xHYSbpWNVbbaL28RByutirY8DHl+qLexOx9smoNw/2nm8iD3Ni8opwlcQpiF9A/XksIKgG BSjKJ4WKsbfCmV2xv5rBA7Uaw5Ox/zeCklxoX5WFfCXBd7IoiYvuQlHx95QSjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dSKQG2gNyz15RH for ; Fri, 12 Dec 2025 06:32:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 245da by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 12 Dec 2025 06:32:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jason A. Harmening Subject: git: 38d60d453caa - main - vnode_if.src: fix function name in locking annotation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jah X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 38d60d453caad0f7377946d69d05d9421323f23f Auto-Submitted: auto-generated Date: Fri, 12 Dec 2025 06:32:54 +0000 Message-Id: <693bb716.245da.2050b852@gitrepo.freebsd.org> The branch main has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=38d60d453caad0f7377946d69d05d9421323f23f commit 38d60d453caad0f7377946d69d05d9421323f23f Author: Jason A. Harmening AuthorDate: 2025-11-28 07:34:47 +0000 Commit: Jason A. Harmening CommitDate: 2025-12-12 06:31:55 +0000 vnode_if.src: fix function name in locking annotation getwritevnode->getlowvnode Reviewed by: kib, olce Tested by: pho MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53988 --- sys/kern/vnode_if.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src index 2e63215b2f97..3faefb607f24 100644 --- a/sys/kern/vnode_if.src +++ b/sys/kern/vnode_if.src @@ -469,7 +469,7 @@ vop_getwritemount { OUT struct mount **mpp; }; -%% getwritevnode vp = = = +%% getlowvnode vp = = = vop_getlowvnode { IN struct vnode *vp; From nobody Fri Dec 12 06:32:55 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dSKQH59WNz6KPQP for ; Fri, 12 Dec 2025 06:32:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dSKQH3cJxz3Z2C for ; Fri, 12 Dec 2025 06:32:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765521175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TPDJm5x9v/A9USbMAbGTCzm5oGSDaZRCacHhFvwqH7A=; b=SocoKg87uXUlCWyco/kVpo85PvujTjo27eLDlY+5NO5iqhWz9WZhgF19qQ6tgHQ5OOY5Sh rwvfyEDeEWcK3CRjzLwz0+bxilqiwDDMlBGuhE5aAYooG/aPHuTbhZDkm0fHCWZ1ozCJyd HaunR3awtGDGZoR48SV0oORloOzyggHnN7rMWGGoda86B67m/q+LszqbxHRHN4kquwtLc2 /cvesSVNKcgMlKOiHgPq110lkBpTBqtXp4roMZ5ZowRxj0MPivP9NO+JdEVHu6Q3NEzKCE FwytSG6MCy3h/zriWiYaOcIs/sk7FIfr8dUGvPy5ZTu7oshr5FVrJjELvrKDxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765521175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TPDJm5x9v/A9USbMAbGTCzm5oGSDaZRCacHhFvwqH7A=; b=eOmZ9Z7RsDgW6fJ1E5ez1nsOhPxzf2chqHgEOhH16ggXpHZfUbqXRJiUfJbxlHUNyhvd9C uwl6iA9WU+OqUx7FIPv00xHieNl/CyJQdUA0BkkvkGj9wu3XKbszLVfkvM1v+Ia61X1CO8 XMRFWYpbaKpt6ssXQVsoTX84CdT6PUXjBNy+ucaC6lQlzfl39/QcfSwuBrfZjLg8Jppdt3 NGpPcyiXXW3zPtV1ku6z55ngR050/0vCbxdZh9GP/MG1AkbZC7Uxe41f+rPDCtItq5FaEZ hJvvFWz6lqeDIKcsQcNWOxqvsBUEl0v4ErqQTnSdrAfJPrh0l3NbgNFNt9iNIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765521175; a=rsa-sha256; cv=none; b=XYpf0WJ8t2pPzM5ydNPVqA+QTnUgvD1jFARrHzXJxYP+L6+2RnaAEWrbhDJCpVFgaKcEtM WjxwlcWcp85e7an/vqMd53y+cmFsTxamrM9Mnv7Q3d1dDR4S/B3jE7lrpOdXZ2NksV78VQ T9A0wdPWRCk7lXim5tYMSowODHzehpoeYcyoe4zdIxTc0opu0tu46BCGJ6g60JT+Kv6FW5 C9kLKo4XyF32uSDWOU3b1q4LVX6gYq5EaHZ22VW55jrB8bJTOifGydELtZf+iL3YEy5eoJ Z0Va+EzbbAJw3Pjia2MXFPc+e2LMscrFVuAFWKfCAXuV4LdOfMk881NYlnL29w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dSKQH33RXz14ZT for ; Fri, 12 Dec 2025 06:32:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2542b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 12 Dec 2025 06:32:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jason A. Harmening Subject: git: 5c025978fc36 - main - unionfs: Implement VOP_GETLOWVNODE List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jah X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c025978fc3649730329994eecc56ada119e6717 Auto-Submitted: auto-generated Date: Fri, 12 Dec 2025 06:32:55 +0000 Message-Id: <693bb717.2542b.2fc8a436@gitrepo.freebsd.org> The branch main has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=5c025978fc3649730329994eecc56ada119e6717 commit 5c025978fc3649730329994eecc56ada119e6717 Author: Jason A. Harmening AuthorDate: 2025-11-28 07:36:24 +0000 Commit: Jason A. Harmening CommitDate: 2025-12-12 06:32:05 +0000 unionfs: Implement VOP_GETLOWVNODE This function returns the vnode that will be used to resolve the access type specified in the 'flags' argument, and is useful for optimal behavior of vn_copy_file_range(). While most filesystems can simply use the default implementation which returns the passed- in vnode, unionfs (like nullfs) ideally should resolve the access request to whichever base layer vnode will be used for the I/O. For unionfs, write accesses must be resolved through the upper vnode, while read accesses will be resolved through the upper vnode if present or the lower vnode otherwise. Provide a simple unionfs_getlowvnode() implementation that reflects this policy. Reviewed by: kib, olce Tested by: pho MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53988 --- sys/fs/unionfs/union_vnops.c | 45 ++++++++++++++++++++++++++++++++++++++++++++ sys/kern/vfs_default.c | 3 +-- sys/sys/vnode.h | 1 + 3 files changed, 47 insertions(+), 2 deletions(-) diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index 66fee97a07d5..060863866fcf 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -2105,6 +2105,49 @@ unionfs_getwritemount(struct vop_getwritemount_args *ap) return (error); } +static int +unionfs_getlowvnode(struct vop_getlowvnode_args *ap) +{ + struct unionfs_node *unp; + struct vnode *vp, *basevp; + + vp = ap->a_vp; + VI_LOCK(vp); + unp = VTOUNIONFS(vp); + if (unp == NULL) { + VI_UNLOCK(vp); + return (EBADF); + } + + if (ap->a_flags & FWRITE) { + basevp = unp->un_uppervp; + /* + * If write access is being requested, we expect the unionfs + * vnode has already been opened for write access and thus any + * necessary copy-up has already been performed. Return an + * error if that expectation is not met and an upper vnode has + * not been instantiated. We could proactively do a copy-up + * here, but that would require additional locking as well as + * the addition of a 'cred' argument to VOP_GETLOWVNODE(). + */ + if (basevp == NULL) { + VI_UNLOCK(vp); + return (EACCES); + } + } else { + basevp = (unp->un_uppervp != NULL) ? + unp->un_uppervp : unp->un_lowervp; + } + + VNASSERT(basevp != NULL, vp, ("%s: no upper/lower vnode", __func__)); + + vholdnz(basevp); + VI_UNLOCK(vp); + VOP_GETLOWVNODE(basevp, ap->a_vplp, ap->a_flags); + vdrop(basevp); + return (0); +} + static int unionfs_inactive(struct vop_inactive_args *ap) { @@ -3000,6 +3043,7 @@ struct vop_vector unionfs_vnodeops = { .vop_getattr = unionfs_getattr, .vop_getextattr = unionfs_getextattr, .vop_getwritemount = unionfs_getwritemount, + .vop_getlowvnode = unionfs_getlowvnode, .vop_inactive = unionfs_inactive, .vop_need_inactive = vop_stdneed_inactive, .vop_islocked = vop_stdislocked, @@ -3039,5 +3083,6 @@ struct vop_vector unionfs_vnodeops = { .vop_unp_bind = unionfs_unp_bind, .vop_unp_connect = unionfs_unp_connect, .vop_unp_detach = unionfs_unp_detach, + .vop_copy_file_range = vop_stdcopy_file_range, }; VFS_VOP_VECTOR_REGISTER(unionfs_vnodeops); diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 4eca09aef145..468d5d18b02b 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -77,7 +77,6 @@ static int dirent_exists(struct vnode *vp, const char *dirname, static int vop_stdis_text(struct vop_is_text_args *ap); static int vop_stdunset_text(struct vop_unset_text_args *ap); static int vop_stdadd_writecount(struct vop_add_writecount_args *ap); -static int vop_stdcopy_file_range(struct vop_copy_file_range_args *ap); static int vop_stdfdatasync(struct vop_fdatasync_args *ap); static int vop_stdgetpages_async(struct vop_getpages_async_args *ap); static int vop_stdread_pgcache(struct vop_read_pgcache_args *ap); @@ -1426,7 +1425,7 @@ vfs_stdnosync(struct mount *mp, int waitfor) return (0); } -static int +int vop_stdcopy_file_range(struct vop_copy_file_range_args *ap) { int error; diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 0bf438a1b821..1a267e0e272c 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -906,6 +906,7 @@ int vop_stdunp_bind(struct vop_unp_bind_args *ap); int vop_stdunp_connect(struct vop_unp_connect_args *ap); int vop_stdunp_detach(struct vop_unp_detach_args *ap); int vop_stdadd_writecount_nomsync(struct vop_add_writecount_args *ap); +int vop_stdcopy_file_range(struct vop_copy_file_range_args *ap); int vop_eopnotsupp(struct vop_generic_args *ap); int vop_ebadf(struct vop_generic_args *ap); int vop_einval(struct vop_generic_args *ap); From nobody Fri Dec 12 06:32:56 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dSKQK1pvPz6KP8Q for ; Fri, 12 Dec 2025 06:32:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dSKQJ3xldz3ZV3 for ; Fri, 12 Dec 2025 06:32:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765521176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A8inPCT4m705Fg6illFUTSbh2Pa/7uRyXTIz3+PWrnQ=; b=DLpSwf7IFTkLhj/99uJanyZYbl62u+M4hqAF/G+zJbv8lGw4/LMI6Xs3QlDlUzdS1yNEDq r0WhDMm+7MBDfot1b+5sfgB9ERb0A5aPoIDOWRdEUA8sUciFs5m+lYJEym5zqPc6F/vkFx 2RjZ2MZUdundCTKurK2uyZqRFgYu90HJTMeeIfx2XqfZcL5+XvDYNmJRRNfUlrOTsFdh9t GnJA7W5VowUL2hBwJUMF4VoKh6gGaqv/KNZGeaaZeXfoLuXde+xhxccFxTzyBb0ipH5zdR F0GlFt7NxY22pPDh96oYXECaS0uAOLziQPkO/VNREkes1smVcKRgwEhN+V/Llg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765521176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A8inPCT4m705Fg6illFUTSbh2Pa/7uRyXTIz3+PWrnQ=; b=YlyJ/kGSKebV0Y7sxsgaACTdZU0JJDX9YoUyN/AvPEoVV443m/UWBClH+0ZYawBaswa3ng 30BGFN40BG4XMDtF7s7plR9Y3DkPVMFHy1uKX8vclJwnF4HNa8ryiMZDdxLeKQ4YksQ54q c4XHFIao+5Co90s9WPLlB12YMAg0NG4SXGqjDx5nGrfKPHAfcF6sTXfKhEPk9CF6hGld5T pgAXZCUYgMhy6oLimPPNirUTWtaFM9WczHDBEExZUwFn6MTscnNUKnPTXWYkrz6A+xHPj2 U8vNAzU3RWhxDyHmwbRug4tkx9JI2kRvMDYs4c+AxxUaUoF27eyD6ktibLizWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765521176; a=rsa-sha256; cv=none; b=ZjFD2jhHB7Y9bQgrkKc9USxmQSmDIt05hzNwGhe4+0/xgOgFmQTnYfd8jt1djY/1veXd7Z gt4qMtdmCtUNWuKig7sPPgM1HD0EgUtY8+LVE9SRw52Be2IzYRplX/iZW8bQbiznMSqJf9 qci9nD+jg004yzHgT/wNbxXWM55950asEdnIKO1pn4luK7vPN8pAqNjGC+juAtQw92dBac zf3sOsEDpk0PXtuMZiCwsZgJ/P2NYsY/coZd3mysyeQBsVnlfCWAyyXMTVRJDnXK1ZfXJS 1hcIXgOUVG1iIvSy3QgjT/tJ/nY3ABFE6ujlxC5dfR0YuiMib6+Uvor2UHM+Aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dSKQJ3VcPz15d0 for ; Fri, 12 Dec 2025 06:32:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24577 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 12 Dec 2025 06:32:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jason A. Harmening Subject: git: 0247b4018de2 - main - unionfs: detect common deadlock-producing mount misconfigurations List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jah X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0247b4018de2c341ac59a585362c10044cea86ad Auto-Submitted: auto-generated Date: Fri, 12 Dec 2025 06:32:56 +0000 Message-Id: <693bb718.24577.5dcb7e3d@gitrepo.freebsd.org> The branch main has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=0247b4018de2c341ac59a585362c10044cea86ad commit 0247b4018de2c341ac59a585362c10044cea86ad Author: Jason A. Harmening AuthorDate: 2025-11-29 07:53:16 +0000 Commit: Jason A. Harmening CommitDate: 2025-12-12 06:32:05 +0000 unionfs: detect common deadlock-producing mount misconfigurations When creating a unionfs mount, it's fairly easy to shoot oneself in the foot by specifying upper and lower file hierarchies that resolve back to the same vnodes. This is fairly easy to do if the sameness is not obvious due to aliasing through nullfs or other unionfs mounts (as in the associated PR), and will produce either deadlock or failed locking assertions on any attempt to use the resulting unionfs mount. Leverage VOP_GETLOWVNODE() to detect the most common cases of foot-shooting at mount time and fail the mount with EDEADLK. This is not meant to be an exhaustive check for all possible deadlock-producing scenarios, but it is an extremely cheap and simple approach that, unlike previous proposed fixes, also works in the presence of nullfs aliases. PR: 172334 Reported by: ngie, Karlo Miličević Reviewed by: kib, olce Tested by: pho MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D53988 --- sys/fs/unionfs/union_vfsops.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c index 284b24a604f4..3eb67221ec0e 100644 --- a/sys/fs/unionfs/union_vfsops.c +++ b/sys/fs/unionfs/union_vfsops.c @@ -73,6 +73,8 @@ unionfs_domount(struct mount *mp) { struct vnode *lowerrootvp; struct vnode *upperrootvp; + struct vnode *lvp1; + struct vnode *lvp2; struct unionfs_mount *ump; char *target; char *tmp; @@ -276,11 +278,32 @@ unionfs_domount(struct mount *mp) */ VOP_UNLOCK(ump->um_uppervp); + /* + * Detect common cases in which constructing a unionfs hierarchy + * would produce deadlock (or failed locking assertions) upon + * use of the resulting unionfs vnodes. This typically happens + * when the requested upper and lower filesytems (which themselves + * may be unionfs instances and/or nullfs aliases) end up resolving + * to the same base-layer files. Note that this is not meant to be + * an exhaustive check of all possible deadlock-producing scenarios. + */ + lvp1 = lvp2 = NULL; + VOP_GETLOWVNODE(ump->um_lowervp, &lvp1, FREAD); + VOP_GETLOWVNODE(ump->um_uppervp, &lvp2, FREAD); + if (lvp1 != NULL && lvp1 == lvp2) + error = EDEADLK; + if (lvp1 != NULL) + vrele(lvp1); + if (lvp2 != NULL) + vrele(lvp2); + /* * Get the unionfs root vnode. */ - error = unionfs_nodeget(mp, ump->um_uppervp, ump->um_lowervp, - NULL, &(ump->um_rootvp), NULL); + if (error == 0) { + error = unionfs_nodeget(mp, ump->um_uppervp, ump->um_lowervp, + NULL, &(ump->um_rootvp), NULL); + } if (error != 0) { vrele(upperrootvp); free(ump, M_UNIONFSMNT); From nobody Fri Dec 12 09:20:19 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dSP7S2nYNz6KbvY for ; Fri, 12 Dec 2025 09:20:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dSP7S0gLxz3t2S for ; Fri, 12 Dec 2025 09: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=1765531220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4qw1ZIAbtZV2ZTDr62glG2Cas167ECS2Fz4APvzraAI=; b=xzomU+mGHd7Gx5yoxRy258H2ckH52La9leCMoxHByfjh6C4i3DOleVGMotTuyrG0XB7Hjh C1n/+RfcKpq7Cdu/V33wZEakg3U9aOVjUlma+uJ29tdXKY/31TqerNzb0zPjVxouztsMT5 L/iNgLIUjbMP1Cb2ViRBPbdF1eCca3QGEBWp1/K0yPuS90HWe1jMV26VAlV/DgtnIJnQy6 8zM2DceoK43ItJTxkgxgfkZUd6a/PxmkC3/F+igKl4NZsgwtGHZPtdDanT8tRIwazHYsK1 0UtXpNMeWHaxzwN+xlvSsQEQSf6hSVN0DrxWLh8Y5XEClat8S9+tgvXmVtJLIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765531220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4qw1ZIAbtZV2ZTDr62glG2Cas167ECS2Fz4APvzraAI=; b=kovIfPv0clWg2wl/bzMtXFGWq6YWiXkF8s6oOacKqJsE3erUROaid5i9JbWbd2Y55KBgCa gXz2QgR+9PP9W9OTSLRceMD2JTv+jVXoJGHT86llxKBbItxVmlUjz/jFwUyo7szYtoCzz0 qIz5v/bR512xRJAOHM4buYPoTd9dCpHmDzASGzbwtYalZRpPRMXE8A2HhuRVjtWmDQmlYD ICgrr3E1ktSBiYJ53p7m0ouNUjDizADOFxcKYH68bFm32d0E8TQzT/Zkmt25/87/jMpNQX eiEj+ucpx3GbEsq01dfJthywAZ/qaDJsTccejji4xeglWyY5NeQY12IeFXfBXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765531220; a=rsa-sha256; cv=none; b=E4QT0gytEIXBbEM4avIwdVBh/wWdYPt1FHZcQvfUC42ap2/+YNB7VOEmaTdAFz8itAHbhm 32TsW9znYRmp3sTrmzciX8fPUqjaQtp8zqhKySvSYlwn79SDoZl/LJr96we4AuCcqdGEV+ mLzpHl7E249gmY0CCXYsxdYPo6pc/UnVcD/leNUlee+V7Yfqsu6V3WFshgmRylZP7o6SHa JtcH+DaNwWWnrEeKmP0wgRhnJxYd2mrOUqQCiLg1YFVsmYi1ZI0qRGtoDxVBBCZW3k/6Xg npYviDHnPe9yCqcB5ek5riSDX1cUNvALHMCyWyYPTl77fhxUpYohYj0V+dsC7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dSP7R6l8Mz19fQ for ; Fri, 12 Dec 2025 09:20:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36428 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 12 Dec 2025 09:20:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 9d2981f20d64 - main - stress2: Fix looping at exit and fix the cleanup List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d2981f20d64b727cedd47ceeecd3b5c123ab5f2 Auto-Submitted: auto-generated Date: Fri, 12 Dec 2025 09:20:19 +0000 Message-Id: <693bde53.36428.65ffe30f@gitrepo.freebsd.org> The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=9d2981f20d64b727cedd47ceeecd3b5c123ab5f2 commit 9d2981f20d64b727cedd47ceeecd3b5c123ab5f2 Author: Peter Holm AuthorDate: 2025-12-12 09:19:23 +0000 Commit: Peter Holm CommitDate: 2025-12-12 09:19:23 +0000 stress2: Fix looping at exit and fix the cleanup --- tools/test/stress2/misc/pg_zero.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/test/stress2/misc/pg_zero.sh b/tools/test/stress2/misc/pg_zero.sh index 4d34a59616e1..daec4b12283b 100755 --- a/tools/test/stress2/misc/pg_zero.sh +++ b/tools/test/stress2/misc/pg_zero.sh @@ -42,7 +42,7 @@ wr(void *arg __unused) int n; while (done != 1) { - while (go == 0) { + while (go == 0 && done != 1) { usleep(10); } go = 2; @@ -184,7 +184,7 @@ mdconfig -a -t vnode -f $diskimage -u $mdstart ../testcases/swap/swap -t 3m -i 20 -l 100 > /dev/null & sleep 3 cd /tmp; ./$prog; s=$?; cd - -pkill swap +while pkill swap; do sleep .1; done wait rm -f /tmp/$prog.c /tmp/$prog $diskimage mdconfig -d -u $mdstart From nobody Fri Dec 12 11:45:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dSSM557xNz6KnM1 for ; Fri, 12 Dec 2025 11:45:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dSSM54CfCz3Bt6 for ; Fri, 12 Dec 2025 11:45:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765539937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KmMUzLlY9NFSdcxzCA6urmoeT4krBGHUFA8waXlrfNE=; b=GVyHwfnzWvHOe9YLvJwyzFOSlzt4IreO3MMTQb8dOc8zHYMLfAPw2HQvmzfJt+AO1Eg4z/ dJ/j+hNV+xBPPD1o0/A/ioEuIAHyN6cE5oEFq9qINHnQkXz5/YfbfOfroPxjBOhsuiI++M 6Qtek6y7NfyN/vc4EbgRWXSSF9UwwdUcJM8xxlmsJ5yqRWvKiEnbTFiXOP0TRaihtRIV9Y hz0UgFZ4KkjqTVXJvKh9oedV4S6t2PrpE6QAW6K38mGDNqopat94u4PZdVL7J7Wny8CBRV aWqeHyQk0spvfZSgHubRg56TznrFgKezlV/K4VNoKP0TGcOTp90ZLMAUy7X12A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765539937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KmMUzLlY9NFSdcxzCA6urmoeT4krBGHUFA8waXlrfNE=; b=WFkO83inUVkwPZpfChfc/YdGeHcsBHydTue/O/wRjUICCA2gT91gChsdu8W4Y3/6vfGM31 7vmculnMh2pDQIj2j79Ui8HMjRnjF1YMtadWtt7TJ9cyaI9Gx1l6B8e6cIkwp4tPCC0sdg o4hzVs0uhE8cNOJqvmsr2Dnp7X8bQO29m/Dm9qLifijkCpSS3ev8lbtQOMm+g0u3b3YUGq 2bmvvmcLXcX+ZBVx/n1p9V/G2zier0wJOKA8rCg3TpUWBiu8AmUNUoFG8N03QbM5ZR31QH 3nk2Ge0QctvSYw9oO+S8KbmdhDRIdG0pACXi0jkW8xIurKMS0JHZLvj2iHWzYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765539937; a=rsa-sha256; cv=none; b=Ps23SV5+b/DN29kUTtB5q1cSV+DQ20RD2HVNQLs96HjpkvVMD0nOlkDs5hftejHXx1/x/7 r25eSF5skca+4ONud/f6ahPRY7pyx/8tJsqMU+3SGgvJbwQ0LZIjkE9hxLZ2YsWo4QpzoL gaZbCt2inV9LXvOyAFvDZgF/RovdqiC5u8jhBEPJB1JBzqKjsoe1a6FcHbi2qsgaUTckfy JoKZSqEWqWyb7stJsMlJpw8WzhsfE7EVrZgYSpZRAYADTNdxtlLHxgzdXvuvohOQ4NVmd6 2fwmNx1tCoxspZAPbTNABkW8c3/34pq5niJ/u6i6X8X11UOM0EPEjFxd+d7lbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dSSM53HmKz1Px for ; Fri, 12 Dec 2025 11:45:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id cb96 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 12 Dec 2025 11:45:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Oskar Holmlund Subject: git: f2cb6206e10a - main - Remove: sys/dts/arm/overlays/spigen-rpi-b.dtso List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oh X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f2cb6206e10a6d82c5cbb5bc372382efe50a7b3e Auto-Submitted: auto-generated Date: Fri, 12 Dec 2025 11:45:37 +0000 Message-Id: <693c0061.cb96.21362ddf@gitrepo.freebsd.org> The branch main has been updated by oh: URL: https://cgit.FreeBSD.org/src/commit/?id=f2cb6206e10a6d82c5cbb5bc372382efe50a7b3e commit f2cb6206e10a6d82c5cbb5bc372382efe50a7b3e Author: Oskar Holmlund AuthorDate: 2025-12-12 11:44:44 +0000 Commit: Oskar Holmlund CommitDate: 2025-12-12 11:44:44 +0000 Remove: sys/dts/arm/overlays/spigen-rpi-b.dtso Remove SPIGEN device tree overlay used with rpi-b (BCM2835/armv6) Approved by: manu (mentor) Differential revision: https://reviews.freebsd.org/D54188 --- sys/dts/arm/overlays/spigen-rpi-b.dtso | 30 ------------------------------ sys/modules/dtb/rpi/Makefile | 1 - 2 files changed, 31 deletions(-) diff --git a/sys/dts/arm/overlays/spigen-rpi-b.dtso b/sys/dts/arm/overlays/spigen-rpi-b.dtso deleted file mode 100644 index edff894b9714..000000000000 --- a/sys/dts/arm/overlays/spigen-rpi-b.dtso +++ /dev/null @@ -1,30 +0,0 @@ - -/dts-v1/; -/plugin/; - -/ { - compatible = "brcm,bcm2835"; -}; - -&{/soc/spi@7e204000} { - status = "okay"; - - spigen0: spigen0 { - compatible = "freebsd,spigen"; - reg = <0>; - spi-max-frequency = <500000>; /* Req'd property, override with spi(8) */ - status = "okay"; - }; - spigen1: spigen1 { - compatible = "freebsd,spigen"; - reg = <1>; - spi-max-frequency = <500000>; /* Req'd property, override with spi(8) */ - status = "okay"; - }; -}; - -&{/soc/gpio@7e200000/spi0_cs_pins} { - brcm,pins = <8 7>; - brcm,function = <4>; /* ALT0 */ -}; - diff --git a/sys/modules/dtb/rpi/Makefile b/sys/modules/dtb/rpi/Makefile index 57ba9ec98d09..6ed6423d84a0 100644 --- a/sys/modules/dtb/rpi/Makefile +++ b/sys/modules/dtb/rpi/Makefile @@ -1,7 +1,6 @@ # DTS files for the 32-bit and 64-bit arm-based Raspberry Pi family of devices .if ${MACHINE_CPUARCH} == "arm" DTSO= \ - spigen-rpi-b.dtso \ spigen-rpi2.dtso .elif ${MACHINE_CPUARCH} == "aarch64" DTSO= \ From nobody Fri Dec 12 15:17:00 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dSY314Yqlz6L2dK for ; Fri, 12 Dec 2025 15:17:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dSY3124Kmz3d4Z for ; Fri, 12 Dec 2025 15:17:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765552621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bhFcRc/Md0o5uFy/5+Wg8qMgLv++m0VYiDQ2o6FQrLg=; b=vIsNVcd3AYBES/nA4/5LLE7hOfr0DN7/rfYsHKq8D/bXQHMlS/x8ea0R0xVtu/R8IXfzjs bCUadltJkR2SlVYoeGdHC8fXwd/BqEgOnFHa77PYRWBPTITi3CgIXs8pkW9GDYs+RBspaI SjMSAgQjgQVIOnO1a/zvRvVZUX6piCnaL0Kj7PwFPkYnrWbrmJWrFBwwqO+LnADrkMNlea 4JpiTugRD35bEScslNxCbTIpaCyaDilxjuxV1XIxIxvTr3qGbHg8IRYst9PgIJFOb+iQ4z k9YtJb07Dik2Z8EdV/caA1P7/mHA0dE0WLLzwLmO0OR+eOHb2nJMEQGViT6SrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765552621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bhFcRc/Md0o5uFy/5+Wg8qMgLv++m0VYiDQ2o6FQrLg=; b=BhRyjS2UIA25Ey9JQfAnW4tqkqMqK7lQSJ76U6RY6gjiCsJzUuXwBgFIlwvtcA43UebS04 ruUCPrnqNBOGQtiLKbr343wAYmWpN/NOISG7QQv+vMM9Y0phCk+fNi8fI0wROGQHT0UbGR Yzx7HCXD2EhjcwatGvct0BLDwg3SG5Czx+/ApfNrFCn/1rZBAdClyoonsoOYmsX1TFfC/F QwaKx2rO3IakGumqMwIKbaEXiPQkDsVuLBHIpb+pC4hujLKVEUkpi1IJBCJFf+GxOzCWwo H3CjMIkY1vmDAGh7Mb9SC4rzdzYJDjcnLXX10KD1ndqPS5Yfk3FbAVGrQVJulA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765552621; a=rsa-sha256; cv=none; b=X5FxMbIrty4CfPIWzDyMA2S/fbmGXPM9+4MAaKkh6obOHTQAyZWDw/edq2z8rdiC5B3xFF xvLPaXrzOLkt6mhfbtLYEWELP6hVzZtZIQ7NxPmaLxwr1Osj1G0B830MiY2pPfLzftSQ4U hLB1vlkGTdgafsi7oS31k0g+5LTil7Ua6fykF1IPE8SkarG7vbxFiEaHUh4sVgwCduw7oV nl3TfldwK6+jomWJ6+sn9i4Q80NK/r56pCBIviQc1O+h7YSMXxRdtZdhSKIJqfHYIFHFVT 5z98b6he9JQ4gIMuQAfnzsT8IbLR6J/jcAGpOU+y5e2P2ZxV36WaetzBfrfCwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dSY3115zYz74f for ; Fri, 12 Dec 2025 15:17:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 335d1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 12 Dec 2025 15:17:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 3b8e13c4696e - main - pci_vendors: update to version 2025-12-12 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 3b8e13c4696e9b3dab284842902b9f7b18073c8d Auto-Submitted: auto-generated Date: Fri, 12 Dec 2025 15:17:00 +0000 Message-Id: <693c31ec.335d1.593f6072@gitrepo.freebsd.org> The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=3b8e13c4696e9b3dab284842902b9f7b18073c8d commit 3b8e13c4696e9b3dab284842902b9f7b18073c8d Author: Baptiste Daroussin AuthorDate: 2025-12-12 14:24:32 +0000 Commit: Baptiste Daroussin CommitDate: 2025-12-12 15:16:53 +0000 pci_vendors: update to version 2025-12-12 --- share/misc/pci_vendors | 1312 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 1079 insertions(+), 233 deletions(-) diff --git a/share/misc/pci_vendors b/share/misc/pci_vendors index 1b13509f002d..bcb3d2f9e030 100644 --- a/share/misc/pci_vendors +++ b/share/misc/pci_vendors @@ -1,8 +1,8 @@ # # List of PCI ID's # -# Version: 2025.10.18 -# Date: 2025-10-18 03:15:01 +# Version: 2025.12.12 +# Date: 2025-12-12 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at https://pci-ids.ucw.cz/. @@ -30,49 +30,65 @@ # This is a relabelled RTL-8139 8139 AT-2500TX V3 Ethernet 0014 Loongson Technology LLC - 7a00 Hyper Transport Bridge Controller - 7a02 APB (Advanced Peripheral Bus) Controller - 7a03 Gigabit Ethernet Controller - 7a04 OTG USB Controller - 7a05 Vivante GPU (Graphics Processing Unit) - 7a06 DC (Display Controller) - 7a07 HDA (High Definition Audio) Controller - 7a08 SATA AHCI Controller - 7a09 PCI-to-PCI Bridge - 7a0b SPI Controller - 7a0c LPC Controller - 7a0f DMA (Direct Memory Access) Controller -# Found on some boards with two sockets - 7a10 Hyper Transport Bridge Controller - 7a13 7A2000 PCH Gigabit Ethernet Controller - 7a14 EHCI USB Controller - 7a15 Vivante GPU (Graphics Processing Unit) - 7a18 SATA 3 AHCI Controller + 7a00 7A1000 Chipset Hyper Transport Bridge Controller + 7a02 2K1000 / 7A1000 Chipset Advanced Peripheral Bus Controller + 7a03 2K1000/2000 / 7A1000 Chipset Gigabit Ethernet Controller + 7a04 2K1000 / 7A1000 Chipset OTG USB Controller + 7a05 2K1000 Vivante GC1000 GPU + 7a06 2K1000 / 7A1000 Chipset Display Controller + 7a07 2K1000/2000 / 7A1000/2000 Chipset HD Audio Controller + 7a08 2K1000 / 7A1000 Chipset 3Gb/s SATA AHCI Controller + 7a09 2K1000 / 7A1000 Chipset PCIe x1 Bridge + 7a0b 7A1000 Chipset SPI Controller + 7a0c 2K2000 / 7A1000/2000 Chipset LPC Controller + 7a0e 2K2000 AES Controller + 7a0f 2K1000 / 7A1000 Chipset DMA Controller + 7a10 7A2000 Chipset Hyper Transport Bridge Controller + 7a13 2K2000 / 7A2000 Chipset Gigabit Ethernet Controller + 7a14 2K1000 / 7A1000/2000 Chipset USB EHCI Controller + 7a15 7A1000 Chipset Vivante GC1000 GPU + 7a16 2K1000/2000 VPU Decoder + 7a17 7A1000 Chipset AC97 Audio Controller + 7a18 2K2000 / 7A2000 Chipset 6Gb/s SATA AHCI Controller 7a19 PCI-to-PCI Bridge - 7a1b SPI Controller - 7a24 OHCI USB Controller -# Found on 7A2000 PCH - 7a25 LG100 GPU - 7a27 7A2000 PCH I2S Controller - 7a29 PCI-to-PCI Bridge - 7a34 xHCI USB Controller -# Found on 7A2000 PCH - 7a36 Display Controller - 7a39 PCIe x1 Root Port - 7a49 PCIe x4 Root Port - 7a59 PCIe x8 Root Port - 7a69 PCIe x16 Root Port + 7a1a 2K2000 Configuration Bus + 7a1b 2K2000 / 7A2000 Chipset SPI Controller + 7a1d 2K2000 RapidIO Interface + 7a1e 2K2000 DES Controller + 7a22 2K2000 Advanced Peripheral Bus Controller + 7a24 2K1000 / 7A1000/2000 Chipset USB OHCI Controller + 7a25 2K2000 / 7A2000 Chipset LG100 GPU + 7a26 2K1000 Camera Controller + 7a27 2K2000 / 7A2000 Chipset I2S Controller + 7a29 7A1000 Chipset PCIe x8 Bridge + 7a2e 2K2000 RSA Controller + 7a2f 2K2000 DMA Controller + 7a34 2K2000 / 7A2000 Chipset USB 3.0 xHCI Controller + 7a36 2K2000 / 7A2000 Chipset Display Controller + 7a37 2K2000 HDMI Audio Controller + 7a39 2K2000 / 7A2000 Chipset PCIe x1 Root Port + 7a3e 2K2000 RNG Controller + 7a44 2K2000 USB 2.0 xHCI Controller + 7a48 2K2000 SDIO Controller + 7a49 2K2000 / 7A2000 Chipset PCIe x4 Root Port + 7a54 2K2000 OTG USB Controller + 7a59 7A2000 Chipset PCIe x8 Root Port + 7a69 7A2000 Chipset PCIe x16 Root Port + 7a79 2K2000 PCIe Root Complex + 7a88 2K2000 eMMC Controller + 7a8e 2K2000 SE Controller + 7af9 2K2000 PCIe Endpoint 0018 Fn-Link Technology Limited 6252 6252CPUB 802.11ax PCIe Wireless Network Adapter 001c PEAK-System Technik GmbH 0001 PCAN-PCI CAN-Bus controller 001c 0004 2 Channel CAN Bus SJC1000 001c 0005 2 Channel CAN Bus SJC1000 (Optically Isolated) +0029 MICROCHIP 003d Lockheed Martin-Marietta Corp # Real TJN ID is e159, but they got it wrong several times --mj 0059 Tiger Jet Network Inc. (Wrong ID) 0070 Hauppauge computer works Inc. - 7801 WinTV HVR-1800 MCE 0071 Nebula Electronics Ltd. 0095 Silicon Image, Inc. (Wrong ID) 0680 Ultra ATA/133 IDE RAID CONTROLLER CARD @@ -80,6 +96,7 @@ 00a7 Teles AG (Wrong ID) 0100 nCipher Security 0123 General Dynamics +0127 MIPS 0128 Dell (wrong ID) # 018a is not LevelOne but there is a board misprogrammed 018a LevelOne @@ -137,11 +154,14 @@ 0303 Hewlett-Packard Company (Wrong ID) 0308 ZyXEL Communications Corporation (Wrong ID) 0315 SK-Electronics Co., Ltd. +031e ANDES 0357 TTTech Computertechnik AG (Wrong ID) 000a TTP-Monitoring Card V2.0 0432 SCM Microsystems, Inc. 0001 Pluto2 DVB-T Receiver for PCMCIA [EasyWatch MobilSet] +0489 SIFIVE 0497 Dell Inc. (wrong ID) +05b7 THEAD 060e Lightelligence 0001 Hummingbird ES 0675 Dynalink @@ -184,6 +204,7 @@ 0731 920a JH920 0731 920b JH920-I 0731 920c JH920-M + 0731 920d JH920-II 920b JH920-I 920c JH920-M 9210 JM9210 @@ -200,6 +221,7 @@ 0731 930a JH930-I 0731 930b JH930-M 0731 930c JH930 + 0731 930d JH930-II 930b JH930-M f011 JM1100-IV f111 JM1100-MV @@ -245,8 +267,6 @@ 0e11 409b Smart Array 642 0e11 409c Smart Array 6400 0e11 409d Smart Array 6400 EM - 0049 NC7132 Gigabit Upgrade Module - 004a NC6136 Gigabit Server Adapter 005a Remote Insight II board - Lights-Out 007c NC7770 1000BaseTX 007d NC6770 1000BaseTX @@ -254,9 +274,7 @@ 00b1 Remote Insight II board - PCI device 00bb NC7760 00ca NC7771 - 00cb NC7781 00cf NC7772 - 00d0 NC7782 00d1 NC7783 00e3 NC7761 0508 Netelligent 4/16 Token Ring @@ -268,18 +286,10 @@ 4000 4000 [Triflex] 4040 Integrated Array 4048 Compaq Raid LC2 - 4050 Smart Array 4200 - 4051 Smart Array 4250ES - 4058 Smart Array 431 4070 Smart Array 5300 4080 Smart Array 5i 4082 Smart Array 532 4083 Smart Array 5312 - 4091 Smart Array 6i - 409a Smart Array 641 - 409b Smart Array 642 - 409c Smart Array 6400 - 409d Smart Array 6400 EM 6010 HotPlug PCI Bridge 6010 7020 USB Controller a0ec Fibre Channel Host Controller @@ -312,31 +322,13 @@ ae6d NorthStar CPU to PCI Bridge b011 Netelligent 10/100 TX Embedded UTP b012 Netelligent 10 T/2 PCI UTP/Coax - b01e NC3120 Fast Ethernet NIC - b01f NC3122 Fast Ethernet NIC - b02f NC1120 Ethernet NIC b030 Netelligent 10/100 TX UTP - b04a 10/100 TX PCI Intel WOL UTP Controller b060 Smart Array 5300 Controller - b0c6 NC3161 Fast Ethernet NIC - b0c7 NC3160 Fast Ethernet NIC - b0d7 NC3121 Fast Ethernet NIC - b0dd NC3131 Fast Ethernet NIC - b0de NC3132 Fast Ethernet Module - b0df NC6132 Gigabit Module - b0e0 NC6133 Gigabit Module b0e1 NC3133 Fast Ethernet Module - b123 NC6134 Gigabit NIC - b134 NC3163 Fast Ethernet NIC - b13c NC3162 Fast Ethernet NIC - b144 NC3123 Fast Ethernet NIC - b163 NC3134 Fast Ethernet NIC - b164 NC3165 Fast Ethernet Upgrade Module b178 Smart Array 5i/532 0e11 4080 Smart Array 5i 0e11 4082 Smart Array 532 0e11 4083 Smart Array 5312 - b1a4 NC7131 Gigabit Server Adapter b200 Memory Hot-Plug Controller b203 Integrated Lights Out Controller 103c 3305 iLO2 @@ -540,7 +532,7 @@ 1028 1f35 PERC H710 Adapter 1028 1f37 PERC H710 Mini (for blades) 1028 1f38 PERC H710 Mini (for monolithics) - 15d9 0690 LSI MegaRAID ROMB + 15d9 0690 AOC-S2208L-H8iR 8086 3510 RMS25PB080 RAID Controller 8086 3511 RMS25PB040 RAID Controller 8086 3512 RMT3PB080 RAID Controller @@ -642,6 +634,7 @@ 1000 3040 9210-8i 1000 3080 9200-8e [LSI SAS 6Gb/s SAS/SATA PCIe x8 External HBA] 1000 30b0 9200-8e [LSI SAS 6Gb/s SAS/SATA PCIe x8 External HBA] + 1000 30e0 9202-16e 1014 03ca IBM 6Gb SAS HBA [9212-4i4e] 1028 1f1c 6Gbps SAS HBA Adapter 1028 1f1d PERC H200 Adapter @@ -760,6 +753,7 @@ 1000 3040 9207-8e SAS2.1 HBA 1000 3050 SAS9217-8i 1000 3060 SAS9217-4i4e + 1000 3070 SAS9206-16e 1014 0472 N2125 External Host Bus Adapter 1014 047a N2115 Internal Host Bus Adapter 1590 0041 H220i @@ -843,6 +837,7 @@ 15d9 1d03 AOC-S4116L-H16IR (16DD/96DD) RAID Adapter 15d9 1d07 AOC-S4016L-L16IT Storage Adapter 15d9 1d08 AOC-S4016L-L16IR Storage Adapter + 17aa 7855 ThinkSystem RAID 950W-16i 8GB Flash PCIe Gen4 24Gb Adapter 1d49 020a ThinkSystem 450W-16e SAS/SATA PCIe Gen4 24Gb HBA 00ab SAS3516 Fusion-MPT Tri-Mode RAID On Chip (ROC) # 8 Internal and 8 External port channel 9400 HBA @@ -868,6 +863,7 @@ 1d49 0202 ThinkSystem 430-8e SAS/SATA 12Gb HBA 1d49 0204 ThinkSystem 430-8i SAS/SATA 12Gb Dense HBA 00b2 PCIe Switch management endpoint + 15d9 1d24 AOM-PCIE5-418P 1d49 0003 ThinkSystem 1611-8P PCIe Gen4 NVMe Switch Adapter # 24G SAS/PCIe storage adapter chip 00b3 Fusion-MPT 24G SAS/PCIe SAS50xx/SAS51xx @@ -888,7 +884,9 @@ 1028 23cb PERC H975i Front 1028 23cd PERC H975i Adapter 1028 2446 PERC H976i Front + 17aa 784c ThinkSystem RAID 960W PCIe Gen5 Adapter 1d49 020b ThinkSystem 460-16e SAS/SATA PCIe Gen5 24Gb HBA + 00b4 Fusion-MPT 24G SAS/PCIe SAS50xx/SAS51xx 00b5 Fusion-MPT 24G SAS/PCIe SAS50xx/SAS51xx # 9760W 32 internal port RAID controller 1000 5000 MegaRAID 9760W-32i 24G SAS/PCIe Storage Adapter @@ -906,6 +904,14 @@ 1028 22d3 PERC H975i Adapter - Virtual 1028 23cb PERC H975i Front - Virtual 1028 23cd PERC H975i Adapter - Virtual + 17aa 784c ThinkSystem RAID 960W PCIe Gen5 Adapter + 00b6 Fusion-MPT 24G SAS/PCIe SAS50xx/SAS51xx + 1000 5000 MegaRAID 9760W-32i 24G SAS/PCIe Storage Adapter + 1000 5001 MegaRAID 9760W-16i 24G SAS/PCIe Storage Adapter + 1000 5010 MegaRAID 9760W-16i16e 24G SAS/PCIe Storage Adapter + 1000 5020 eHBA 9700W-32i 24G SAS/PCIe Storage Adapter + 1000 5021 eHBA 9700W-16i 24G SAS/PCIe Storage Adapter + 1000 5030 eHBA 9700-16e 24G SAS/PCIe Storage Adapter 1028 2446 PERC H976i Front - Virtual # Broadcom next-gen MPT PCIe switch 00b8 Fusion-MPT Switch SAS50xx/SAS51xx @@ -920,6 +926,7 @@ 1000 3190 SAS9305-16i # SAS 9305 24 internal port HBA 1000 31a0 SAS9305-24i + 1000 31b0 SAS9306-24i 1170 0002 SAS3224 PCI Express to 12Gb HBA MEZZ CARD 00c5 SAS3316 PCI-Express Fusion-MPT SAS-3 00c6 SAS3316 PCI-Express Fusion-MPT SAS-3 @@ -1157,11 +1164,15 @@ 1d49 0505 ThinkSystem RAID 540-8i PCIe Gen4 12Gb Adapter 1d49 0506 ThinkSystem RAID 540-16i PCIe Gen4 12Gb Adapter 1d49 0507 ThinkSystem RAID 545-8i PCIe Gen4 12Gb Adapter + 1d49 0508 ThinkSystem RAID 545-8i PCIe Gen4 12Gb Internal Adapter 1d49 0700 ThinkSystem M.2 RAID B540i-2i SATA/NVMe Enablement Kit 1d49 0701 ThinkSystem 7mm RAID B540p-2HS SATA/NVMe Enablement Kit 1d49 0702 ThinkSystem M.2 RAID B540p-2HS SATA/NVMe Enablement Kit 1d49 0703 ThinkSystem M.2 RAID B540d-2HS SATA/NVMe Enablement Kit 1d49 0704 ThinkSystem M.2 RAID B545i-2i SATA/NVMe Enablement Kit + 1d49 0705 ThinkSystem M.2 RAID B550p-2HS SATA/NVMe Enablement Kit + 1d49 0706 ThinkSystem M.2 RAID B550d-2HS SATA/NVMe Enablement Kit + 1d49 0707 ThinkSystem M.2 RAID B550i-2i SATA/NVMe Enablement Kit 10e7 MegaRAID 12GSAS/PCIe Unsupported SAS38xx 1960 MegaRAID 1000 0518 MegaRAID 518 SCSI 320-2 Controller @@ -1220,6 +1231,7 @@ 1000 100b PEX89000 PCIe Gen 5 Virtual Upstream/Downstream Port 1000 2004 PEX89000 Virtual PCIe TWC/NT 2.0 Endpoint 1000 2005 PEX89000 Virtual PCIe gDMA Endpoint + 15d9 1d24 AOM-PCIE5-418P # Lower lane count PEX89000 switch c034 PEX890xx PCIe Gen 5 Switch # Lower lane count PEX89000 switch @@ -1282,7 +1294,8 @@ 145a Dummy Function (absent graphics controller) 1478 Navi 10 XL Upstream Port of PCI Express Switch 1479 Navi 10 XL Downstream Port of PCI Express Switch - 1506 Mendocino + 1506 Mendocino [Radeon 610M] + 17aa 380e IdeaPad 1 15AMN7 150e Strix [Radeon 880M / 890M] 154c Kryptos [Radeon RX 350] 1462 7c28 MS-7C28 Motherboard @@ -1291,6 +1304,7 @@ 1552 Pooky 1561 Anubis 1586 Strix Halo [Radeon Graphics / Radeon 8050S Graphics / Radeon 8060S Graphics] + 15b3 Stoney HDMI/DP Audio Controller 15bf Phoenix1 15c8 Phoenix2 15d8 Picasso/Raven 2 [Radeon Vega Series / Radeon Vega Mobile Series] @@ -1322,7 +1336,7 @@ 1043 16c2 Radeon Vega 8 # Used in the Steam Deck LCD 163f VanGogh [AMD Custom GPU 0405] - 1640 Radeon High Definition Audio Controller [Rembrandt/Strix] + 1640 Radeon High Definition Audio Controller 164c Lucienne 164d Rembrandt 164e Raphael @@ -3849,6 +3863,7 @@ 6995 Lexa XT [Radeon PRO WX 2100] 699f Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X] 1028 1720 Radeon RX 550X + 1458 22f3 Radeon RX 550 2GB 148c 2380 Lexa XL [Radeon RX 550] 17aa 5069 Thinkpad E480/E580 1da2 e367 Lexa PRO [Radeon RX 550] @@ -4056,6 +4071,7 @@ 73c4 Navi 22 USB 73ce Navi 22-XL SRIOV MxGPU 73df Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M/6850M XT] + 1002 0e36 Radeon RX 6700 XT 12G 1043 16c2 Radeon RX 6800M 1458 2408 Radeon RX 6750 XT GAMING OC 12G 1462 3980 Radeon RX 6700 XT Mech 2X 12G [MSI] @@ -4098,6 +4114,7 @@ 7446 Navi 31 USB 7448 Navi 31 [Radeon Pro W7900] 744a Navi 31 [Radeon Pro W7900 Dual Slot] + 744b Navi 31 [Radeon Pro W7900D] 744c Navi 31 [Radeon RX 7900 XT/7900 XTX/7900 GRE/7900M] 1002 0e3b RX 7900 XTX / RX 7900 GRE [XFX] 1043 0506 TUF Gaming Radeon RX 7900 XTX OC @@ -4136,6 +4153,9 @@ 1da2 e490 Navi 48 XTX [Sapphire Pulse Radeon RX 9070 XT] 7551 Navi 48 [Radeon AI PRO R9700] 7590 Navi 44 [Radeon RX 9060 XT] + 1eae 8601 RX-96TS316W7 [SWIFT RX 9060 XT OC White Triple Fan Gaming Edition 16GB] + 75a0 Aqua Vanjaram [Instinct MI350X] + 75a3 Aqua Vanjaram [Instinct MI355X] 7833 RS350 Host Bridge 7834 RS350 [Radeon 9100 PRO/XT IGP] 7835 RS350M [Mobility Radeon 9000 IGP] @@ -4894,6 +4914,7 @@ 0144 Yotta Video Compositor Output 1014 0145 Yotta Output Controller (ytout) 0156 405GP PLB to PCI Bridge + 1fc3 0004 IC695ETM001 RX3i Ethernet PCI Module 015e 622Mbps ATM PCI Adapter 0160 64bit/66MHz PCI ATM 155 MMF 016e GXT4000P Graphics Adapter @@ -5472,7 +5493,7 @@ 15e2 Audio Coprocessor 17aa 5124 ThinkPad E595 ea50 ce19 mCOM10-L1900 - 15e3 Family 17h/19h/1ah HD Audio Controller + 15e3 Ryzen HD Audio Controller 103c 8615 Pavilion Laptop 15-cw1xxx 103c 8b17 ProBook 445 G9/455 G9 1043 86c7 PRIME B450M-A Motherboard @@ -6237,6 +6258,7 @@ 0534 G200eR2 1028 04f7 PowerEdge R320 server 0536 Integrated Matrox G200eW3 Graphics Controller + 1028 0a6b PowerEdge R760 0538 MGA G200eH3 1590 00e4 iLO5 VGA 0540 M91XX @@ -6418,6 +6440,7 @@ 01b4 Celleb platform IDE interface 01b5 SCC USB 2.0 EHCI controller 01b6 SCC USB 1.1 OHCI controller + 01ba SpursEngine SE1000 accelerator 1030 TMC Research 1031 Miro Computer Products AG 5601 DC20 ASIC @@ -6447,6 +6470,7 @@ 1033 0035 USB Controller 103c 1293 USB add-in card 103c 1294 USB 2.0 add-in card + 1154 0207 Buffalo IFC-USB2P4 1179 0001 USB 1186 0035 DUB-C2 USB 2.0 2-port 32-bit cardbus controller 12ee 7000 Root Hub @@ -6481,6 +6505,7 @@ 00ce uPD72871 [Firewarden] IEEE1394a OHCI 1.0 Link/1-port PHY Controller 00df Vr4131 00e0 uPD72010x USB 2.0 Controller + 1154 0208 Buffalo IFC-USB2P4 1186 f100 DUB-C2 USB 2.0 2-port 32-bit cardbus controller 12ee 7001 Root hub 14c2 0205 PTI-205N USB 2.0 Host Controller @@ -6493,6 +6518,7 @@ 010c VR7701 0125 uPD720400 PCI Express - PCI/PCI-X Bridge 013a Dual Tuner/MPEG Encoder + 0165 uPD61253F1 MPEG Video Broadcast Decoder 0194 uPD720200 USB 3.0 Host Controller 1028 04a3 Precision M4600 1028 04b2 Vostro 3350 @@ -7268,6 +7294,7 @@ ac8f PCI7420/7620 SD/MS-Pro Controller 1028 018d Inspiron 700m/710m b001 TMS320C6424 + b012 TDA4VH PCIE Root Complex fe00 FireWire Host Controller fe03 12C01A FireWire Host Controller 104d Sony Corporation @@ -7439,8 +7466,7 @@ 4802 Falcon 4803 Hawk 4806 CPX8216 -# MPC7410 PowerPC microprocessor and PCI host bridge - 480b MPC7410 + 480b Harrier PCI Host Bridge 4d68 20268 5600 SM56 PCI Modem 1057 0300 SM56 PCI Speakerphone Modem @@ -7839,6 +7865,11 @@ 1077 e4f7 FastLinQ QL45212H 25GbE Adapter (SR-IOV VF) 1077 e4f8 FastLinQ QL45611H 100GbE Adapter (SR-IOV VF) 1590 0245 10/20/25GbE 2P 4820c CNA SRIOV + 16a1 BCM57840 NetXtreme II 10 Gigabit Ethernet + 1590 00ec FlexFabric 10Gb 4-port 536FLR-T Adapter + 16ab NetXtreme II BCM57840 10/20 Gigabit Ethernet Multi Function + 16ad NetXtreme II BCM57840 10/20 Gigabit Ethernet Virtual Function + 1590 00ec FlexFabric 10Gb 4-port 536FLR-T Adapter 2020 ISP2020A Fast!SCSI Basic Adapter 2031 ISP8324-based 16Gb Fibre Channel to PCI Express Adapter 103c 17e7 SN1000Q 16Gb Single Port Fibre Channel Adapter @@ -9637,6 +9668,8 @@ 1885 0701 Tsunami FPGA PMC with Altera Stratix S30 9712 PEX9712 12-Lane, 5-Port PCIe Gen 3 (8.0 GT/s) ExpressFabric Switch 9733 PEX 9733 33-lane, 9-port PCI Express Gen 3 (8.0 GT/s) Switch + 1028 1fc7 UCEA-200 0235NK NVMe PCIe Extender Adapter with Full-Height Bracket + 1028 1fc8 UCEA-200 0CDC7W NVMe PCIe Extender Adapter with Half-Height Bracket 1d49 0001 ThinkSystem 1610-4P NVMe Switch Adapter 1d49 0002 ThinkSystem 810-4P NVMe Switch Adapter 9749 PEX 9749 49-lane, 13-port PCI Express Gen 3 (8.0 GT/s) Switch @@ -12891,11 +12924,13 @@ 15fb GP100GL [GP100 SKU 200] 15fc GP100GL [Tesla P100-DGXS-16GB] 15ff GP100GL [GP100 SKU 15ff] + 1613 GM204GL [GRID M60 Service Provider] 1617 GM204M [GeForce GTX 980M] 1618 GM204M [GeForce GTX 970M] 1619 GM204M [GeForce GTX 965M] 161a GM204M [GeForce GTX 980 Mobile] 1667 GM204M [GeForce GTX 965M] + 1676 GM204GLM [Quadro M2200 Mobile] 1725 GP100 172e GP100 172f GP100 @@ -13211,6 +13246,7 @@ 2182 TU116 [GeForce GTX 1660 Ti] 2183 TU116 2184 TU116 [GeForce GTX 1660] + 2186 TU116 [PG160 SKU18] 2187 TU116 [GeForce GTX 1650 SUPER] 2188 TU116 [GeForce GTX 1650] 2189 TU116 [CMP 30HX] @@ -13225,7 +13261,8 @@ 2200 GA102 2203 GA102 [GeForce RTX 3090 Ti] 2204 GA102 [GeForce RTX 3090] - 147d 10de NVIDIA Geforce RTX 3090 Founders Edition + 10de 147d GeForce RTX 3090 Founders Edition + 3842 3973 GeForce RTX 3090 XC3 2205 GA102 [GeForce RTX 3080 Ti 20GB] 2206 GA102 [GeForce RTX 3080] 10de 1467 GA102 [GeForce RTX 3080] @@ -13256,12 +13293,21 @@ 229e Orin PCIe x1 Root Complex 22a3 GH100 [H100 NVSwitch] 22ba AD102 High Definition Audio Controller + 22bb AD103 High Definition Audio Controller 22bc AD104 High Definition Audio Controller 22bd AD106M High Definition Audio Controller 22be AD107 High Definition Audio Controller + 22ce GB10 GEN5 X4 PCIe host + 22d0 GB10 GEN4 X1 PCIe host + 22d1 GB20B PCI bridge 22d8 THOR Processor PCI Express Root Port 22e6 THOR Processor PCI Express x16 Controller + 22e8 GB202 High Definition Audio Controller + 22e9 GB203 High Definition Audio Controller + 22eb GB206 High Definition Audio Controller + 22ec GB207 High Definition Audio Controller 2302 GH100 + 230c GH100 [H20 NVL16] 230e GH100 [H20 NVL16] 2313 GH100 [H100 CNX] 2321 GH100 [H100L 94GB] @@ -13284,6 +13330,7 @@ 2343 GH100 2345 GH100 [GH100-88K-A1] 2348 GH100 [GH200 144G HBM3e] + 237e GH100 [H100 GH3] 237f GH100 [Skinny Joe] 23b0 GH100 23f0 GH100 @@ -13456,46 +13503,70 @@ 2941 GB100 [HGX GB200] 297e GB100 2980 GB102 [Reserved Dev ID A] + 29bb GB102 [DRIVE P2021] 29bc GB102 [B100] 29c0 GB102 [Reserved Dev ID B] 29f1 GB102 - 2b00 TA1090SA [THOR] +# space added + 2b00 GB10B [Jetson AGX Thor] 2b85 GB202 [GeForce RTX 5090] 2b87 GB202 [GeForce RTX 5090 D] + 2b8c GB202 [GeForce RTX 5090 D V2] 2bb1 GB202GL [RTX PRO 6000 Blackwell Workstation Edition] - 2bb3 GB202GL [RTX PRO 5000 Blackwell] + 2bb2 GB202GL [RTX PRO 6000D Blackwell Workstation Edition] + 2bb3 GB202GL [RTX PRO 5000 Blackwell / RTX PRO 5000 72GB Blackwell] 2bb4 GB202GL [RTX PRO 6000 Blackwell Max-Q Workstation Edition] 2bb5 GB202GL [RTX PRO 6000 Blackwell Server Edition] + 2bb9 GB202GL [RTX 6000D] + 2bbc GB202GL [RTX PRO 6000D Blackwell Max-Q Workstation Edition] 2c02 GB203 [GeForce RTX 5080] 2c05 GB203 [GeForce RTX 5070 Ti] 2c18 GB203M / GN22 [GeForce RTX 5090 Max-Q / Mobile] 2c19 GB203M / GN22 [GeForce RTX 5080 Max-Q / Mobile] 2c2c GB6-256(N22W-ES-A1) 2c31 GB203GL [RTX PRO 4500 Blackwell] + 2c33 GB203GL [RTX PRO 4000 Blackwell SFF Edition] 2c34 GB203GL [RTX PRO 4000 Blackwell] 2c38 GB203GLM [RTX PRO 5000 Blackwell Generation Laptop GPU] 2c39 GB203GLM [RTX PRO 4000 Blackwell Generation Laptop GPU] + 2c3a GB203GL [RTX PRO 4500 Blackwell] 2c58 GB203M / GN22-X11 [GeForce RTX 5090 Max-Q / Mobile] 2c59 GB203M / GN22-X9 [GeForce RTX 5080 Max-Q / Mobile] + 2c77 GB203GLM [RTX PRO 5000 Blackwell Embedded GPU] + 2c79 GB203GLM [RTX PRO 4000 Blackwell Embedded GPU] 2d04 GB206 [GeForce RTX 5060 Ti] 2d05 GB206 [GeForce RTX 5060] 2d18 GB206M [GeForce RTX 5070 Max-Q / Mobile] 2d19 GB206M [GeForce RTX 5060 Max-Q / Mobile] 2d2c GB6-128 (N22Y-ES-A1) + 2d30 GB206GL [RTX PRO 2000 Blackwell] 2d39 GB206GLM [RTX PRO 2000 Blackwell Generation Laptop GPU] 2d58 GB206M [GeForce RTX 5070 Max-Q / Mobile] 2d59 GB206M [GeForce RTX 5060 Max-Q / Mobile] + 2d79 GB206GLM [RTX PRO 2000 Blackwell Embedded GPU] 2d83 GB207 [GeForce RTX 5050] 2d98 GB207M [GeForce RTX 5050 Max-Q / Mobile] 2db8 GB207GLM [RTX PRO 1000 Blackwell Generation Laptop GPU] 2db9 GB207GLM [RTX PRO 500 Blackwell Generation Laptop GPU] 2dd8 GB207M [GeForce RTX 5050 Max-Q / Mobile] - 2e2a GB20B + 2df9 GB207GLM [RTX PRO 500 Blackwell Embedded GPU] + 2e12 GB20B [GB10] +# N1X + 2e2a GB20B [JMJWOA-Generic-GPU] 2f04 GB205 [GeForce RTX 5070] 2f18 GB205M [GeForce RTX 5070 Ti Mobile] 2f38 GB205GLM [RTX PRO 3000 Blackwell Generation Laptop GPU] 2f58 GB205M [GeForce RTX 5070 Ti Mobile] - 31c0 GB110 + 2f80 GB205 High Definition Audio Controller + 3180 GB110 [Reserved Dev ID A] + 3182 GB110 [B300 SXM6 AC] + 31a1 GB110 [GB300 MaxQ] + 31c0 GB110 [Reserved Dev ID B] + 31c2 GB110 [GB300] + 31fe GB110 + 3200 GB112 + 3224 GB112 + 323e GB112 3340 GB120 10df Emulex Corporation 0720 OneConnect NIC (Skyhawk) @@ -13517,6 +13588,7 @@ 072b OneConnect iSCSI Initiator + Target (Skyhawk-VF) 072c OneConnect FCoE Initiator (Skyhawk-VF) 1ae5 LP6000 Fibre Channel Host Adapter + d300 LPE41100/LPE42100 Series 64G/128G Fibre Channel Adapter e100 Proteus-X: LightPulse IOV Fibre Channel Host Adapter e131 LightPulse 8Gb/s PCIe Shared I/O Fibre Channel Adapter e180 Proteus-X: LightPulse IOV Fibre Channel Host Adapter @@ -13598,6 +13670,9 @@ f500 LPe37000/LPe38000 Series 32Gb/64Gb Fibre Channel Adapter 1014 06c1 PCIe4 4-Port 32Gb Fibre Channel Adapter for POWER (FC EN1L/EN1M; CCIN 2CFC) 1014 06c2 PCIe4 2-Port 64Gb Fibre Channel Adapter for POWER (FC EN1N/EN1P; CCIN 2CFD) + 1590 042e Synergy 7330C 64Gb Fibre Channel Host Bus Adapter + 1590 0451 SN1620E 2-Port 32Gb Fibre Channel Adapter + 1590 0452 SN1720E 2-Port 64Gb Fibre Channel Adapter 1590 0454 Synergy 5331C 32Gb Fibre Channel Host Bus Adapter f600 LPe37100S/LPe38100S Series 32Gb/64Gb Fibre Channel Adapter f700 LP7000 Fibre Channel Host Adapter @@ -13713,6 +13788,7 @@ 2600 Killer E2600 GbE Controller 3000 Killer E3000 2.5GbE Controller 4321 RTL8852BE 802.11ax PCIe Wireless Network Adapter + 5000 Killer E5000 5GbE Controller 5208 RTS5208 PCI Express Card Reader 5209 RTS5209 PCI Express Card Reader 5227 RTS5227 PCI Express Card Reader @@ -13767,6 +13843,7 @@ 8125 RTL8125 2.5GbE Controller 4c52 2022 LRES2022PT Single-port 2.5Gb Ethernet Network Adapter 8126 RTL8126 5GbE Controller + 8127 RTL8127 10GbE Controller 8129 RTL-8129 10ec 8129 RT8129 Fast Ethernet Adapter 11ec 8129 RTL8111/8168 PCIe Gigabit Ethernet (misconfigured) @@ -13913,7 +13990,7 @@ ea50 ce19 mCOM10-L1900 816d RTL811x EHCI host controller ea50 ce19 mCOM10-L1900 - 816e Realtek RealManage BMC + 816e RealManage BMC 8171 RTL8191SEvA Wireless LAN Controller 8172 RTL8191SEvB Wireless LAN Controller 8173 RTL8192SE Wireless LAN Controller @@ -14322,6 +14399,7 @@ 0410 VX900 Series Host Bridge: Host Control 0415 VT6415 PATA IDE Host Controller 1043 838f Motherboard + 1849 0415 Motherboard 0419 VN1000 Host Bridge 0501 VT8501 [Apollo MVP4] 0505 VT82C505 @@ -16282,7 +16360,7 @@ 1324 10cf P7120 17aa 20cb ThinkPad T400 e230 R5U2xx (R5U230 / R5U231 / R5U241) [Memory Stick Host Controller] - e476 CardBus bridge + e476 R5U242 PCIe to CardBus Bridge 1028 040a Latitude E6410 1028 040b Latitude E6510 e822 MMC/SD Host Controller @@ -16642,6 +16720,7 @@ 6180 88F6180 [Kirkwood] ARM SoC 6192 88F6190/6192 [Kirkwood] ARM SoC 6281 88F6281 [Kirkwood] ARM SoC + 6282 88F6282 [Armada 300] ARM SoC # This device ID was used for earlier chips. 6381 MV78xx0 [Discovery Innovation] ARM SoC 6440 88SE63x0 x1, 88SE6440 x4 PCIe SAS/SATA 3Gb/s RAID controller @@ -17215,7 +17294,7 @@ 103c 0890 NC6000 laptop 10cf 11c4 Lifebook P5020D Laptop 7233 OZ711MP3/MS3 4-in-1 MemoryCardBus Controller - 8120 Integrated MMC/SD Controller + 8120 OZ888 SD/MMC Card Reader Controller 8130 Integrated MS/MSPRO/xD Controller 8220 OZ600FJ1/OZ900FJ1 SD/MMC Card Reader Controller 8221 OZ600FJ0/OZ900FJ0/OZ600FJS SD/MMC Card Reader Controller @@ -17225,9 +17304,11 @@ 8330 OZ600 MS/xD Controller 1028 04a3 Precision M4600 8331 O2 Flash Memory Card - 8520 SD/MMC Card Reader Controller - 8621 SD/MMC Card Reader Controller + 8520 OZ777 SD/MMC Card Reader Controller + 8620 OZ620 SD/MMC Card Reader Controller + 8621 OZ711 SD/MMC Card Reader Controller 17aa 5068 Thinkpad E480/E580 + 1e44 1776 Steam Deck 8760 FORESEE E2M2 NVMe SSD 1218 Hybricon Corp. 1219 First Virtual Corporation @@ -17453,6 +17534,7 @@ a000 6000 SPI a000 7000 Local Bus ea50 1c10 RXi2-BP + 9105 AX99100 PCIe to I/O Bridge 125c Aurora Technologies, Inc. 0101 Saturn 4520P 0640 Aries 16000P @@ -17597,6 +17679,7 @@ 2263 SM2263EN/SM2263XT (DRAM-less) NVMe SSD Controllers 2268 SM2268XT (DRAM-less) NVMe SSD Controller 2269 SM2269XT (DRAM-less) NVMe SSD Controller + 2508 SM2508 NVMe 2.0 SSD Controller 8366 SM8366 NVMe SSD Controller [MonTitan] 1270 Olympus Optical Co., Ltd. 1271 GW Instruments @@ -17952,6 +18035,11 @@ 12b9 00d3 USR 56K Internal V92 FAX Modem (Model 5610) 12b9 baba USR 56K Internal Voice Modem 3CP3298-DEL (Model 5601) [Hawk] 12ba BittWare, Inc. + 0069 VectorPath S7t-VG6 + 12ba b5d4 BW_BMC_IF + 0079 VectorPath VP815 + 12ba b5d4 BW_BMC_IF + 007a VectorPath VP708 12bb Nippon Unisoft Corporation 12bc Array Microsystems 12bd Computerm Corp. @@ -18088,6 +18176,7 @@ e110 PI7C9X110 PCIe- to-PCI bridge 1775 11cc CC11/CL11 CompactPCI Bridge e111 PI7C9X111SL PCIe-to-PCI Reversible Bridge + ea50 3bbb OCuLink to RX3i backplane bridge e112 PI7C9X112SL PCIe-to-PCI Bridge e113 PI7C9X113SL/PI7C9X118SL PCIe-to-PCI Bridge e130 PCI Express to PCI-XPI7C9X130 PCI-X Bridge @@ -18558,6 +18647,40 @@ 1028 2293 DC NVMe SED 7450 MU U.2 12.8TB 1028 2294 DC NVMe ISE 7450 MU U.2 12.8TB 1344 3000 U.3 1600GB [MTFDKCB1T6TFS/MTFDKCC1T6TFS] + 51c9 7600 PRO NVMe SSD + 1028 2421 MTFDLBQ1T9THG-1BP1DFCDA + 1028 2422 MTFDLBQ3T8THG-1BP1DFCDA + 1028 2423 MTFDLBQ7T6THG-1BP1DFCDA + 1028 2424 MTFDLBQ15T3THG-1BP1DFCDA + 1028 2429 MTFDLBQ1T9THG-1BP1JABDA + 1028 242a MTFDLBQ3T8THG-1BP1JABDA + 1028 242b MTFDLBQ7T6THG-1BP1JABDA + 1028 242c MTFDLBQ15T3THG-1BP1JABDA + 1028 2431 MTFDLAL1T9THG-1BP1DFCDA + 1028 2432 MTFDLAL3T8THG-1BP1DFCDA + 1028 2433 MTFDLAL7T6THG-1BP1DFCDA + 1028 2434 MTFDLAL15T3THG-1BP1DFCDA + 1028 2439 MTFDLAL1T9THG-1BP1JABDA + 1028 243a MTFDLAL3T8THG-1BP1JABDA + 1028 243b MTFDLAL7T6THG-1BP1JABDA + 1028 243c MTFDLAL15T3THG-1BP1JABDA + 51ca 7600 MAX NVMe SSD + 1028 2425 MTFDLBQ1T6THS-1BP1DFCDA + 1028 2426 MTFDLBQ3T2THS-1BP1DFCDA + 1028 2427 MTFDLBQ6T4THS-1BP1DFCDA + 1028 2428 MTFDLBQ12T8THS-1BP1DFCDA + 1028 242d MTFDLBQ1T6THS-1BP1JABDA + 1028 242e MTFDLBQ3T2THS-1BP1JABDA + 1028 242f MTFDLBQ6T4THS-1BP1JABDA + 1028 2430 MTFDLBQ12T8THS-1BP1JABDA + 1028 2435 MTFDLAL1T6THS-1BP1DFCDA + 1028 2436 MTFDLAL3T2THS-1BP1DFCDA + 1028 2437 MTFDLAL6T4THS-1BP1DFCDA + 1028 2438 MTFDLAL12T8THS-1BP1DFCDA + 1028 243d MTFDLAL1T6THS-1BP1JABDA + 1028 243e MTFDLAL3T2THS-1BP1JABDA + 1028 243f MTFDLAL6T4THS-1BP1JABDA + 1028 2440 MTFDLAL12T8THS-1BP1JABDA 51cb 6550 ION NVMe SSD 1028 2379 MTFDLBQ61T4THL-1BK1JABDA 1028 23a6 MTFDLBQ30T7THL-1BK1JABDA @@ -18577,6 +18700,8 @@ 5428 4600 NVMe SSD 5429 2600 NVMe SSD (DRAM-less) 6001 2100AI NVMe SSD [Nitro] + 6003 4150AT NVMe SSD + 6004 4100AT NVMe SSD (DRAM-less) 1345 Arescom Inc 1347 Odetics 1349 Sumitomo Electric Industries, Ltd. @@ -19038,8 +19163,13 @@ 0252 XR17V252 Dual UART PCI controller 0254 XR17V254 Quad UART PCI controller 0258 XR17V258 Octal UART PCI controller - 0352 XR17V3521 Dual PCIe UART + 0352 XR17V352 High Performance Dual PCI Express UART 4c52 9252 LRUS9252H 2-Port RS232 Serial Adapter + 0354 XR17V354 High Performance Quad PCI Express UART + 0358 XR17V358 High Performance Octal PCI Express UART + ea50 8232 8-Channel RS232 Card + 8358 Twin XR17V358 High Performance Octal PCI Express UARTs + ea50 8232 16-Channel RS232 Card 13a9 Siemens Medical Systems, Ultrasound Group 13aa Broadband Networks Inc 13ab Arcom Control Systems Ltd @@ -20327,6 +20457,8 @@ 1432 Edimax Computer Co. 9130 RTL81xx Fast Ethernet 1433 Eltec Elektronik GmbH + 0002 XRD_FG (PCGR-200) [95510214H] + 0006 XRD_FGx Opto (PCGR-300) [95510215H] # Nee Real Time Devices US Inc. 1435 RTD Embedded Technologies, Inc. 4520 PCI4520 @@ -20379,7 +20511,6 @@ 144c Catalina Research Inc 144d Samsung Electronics Co Ltd 1600 S4LN053X01 AHCI SSD Controller(Apple slot) - 9602 RS780/RS880 PCI to PCI bridge (int gfx) a544 Exynos 8890 PCIe Root Complex a575 Exynos 7420 PCIe Root Complex a5e3 Exynos 5433 PCIe Root Complex @@ -20389,21 +20520,13 @@ 144d a801 PM963 2.5" NVMe PCIe SSD a804 NVMe SSD Controller SM961/PM961/SM963 144d a801 SM963 2.5" NVMe PCIe SSD - a806 NVMe SSD SM0032L + a806 PM971 BGA PCIe x2 NVMe SSD a808 NVMe SSD Controller SM981/PM981/PM983 # Used by different variants of SSD 970 EVO and PRO 144d a801 SSD 970 EVO/PRO 1d49 403b Thinksystem U.2 PM983 NVMe SSD a809 NVMe SSD Controller 980 (DRAM-less) a80a NVMe SSD Controller PM9A1/PM9A3/980PRO - 0128 215a DC NVMe PM9A3 RI U.2 960GB - 0128 215b DC NVMe PM9A3 RI U.2 1.92TB - 0128 215c DC NVMe PM9A3 RI U.2 3.84TB - 0128 215d DC NVMe PM9A3 RI U.2 7.68TB - 0128 2166 DC NVMe PM9A3 RI 110M.2 960GB - 0128 2167 DC NVMe PM9A3 RI 110M.2 1.92TB - 0128 2168 DC NVMe PM9A3 RI 80M.2 480GB - 0128 2169 DC NVMe PM9A3 RI 80M.2 960GB 1028 215a DC NVMe PM9A3 RI U.2 960GB 1028 215b DC NVMe PM9A3 RI U.2 1.92TB 1028 215c DC NVMe PM9A3 RI U.2 3.84TB @@ -20420,6 +20543,7 @@ # Actually 88SS1322 according to techpowerup a80b NVMe SSD Controller PM9B1 (DRAM-less) a80c NVMe SSD Controller S4LV008[Pascal] + 144d a801 SSD 990 PRO a80d NVMe SSD Controller PM9C1a (DRAM-less) a80e NVMe SSD Controller PM9D3a a80f BM9C1 QLC NVME SSD (DRAM-less) @@ -20799,12 +20923,15 @@ # MT7612E too? 7662 MT7662E 802.11ac PCI Express Wireless Network Adapter 7663 MT7663 802.11ac PCI Express Wireless Network Adapter + 7902 MT7902 802.11ax PCIe Wireless Network Adapter [Filogic 310] 7915 MT7915E 802.11ax PCI Express Wireless Network Adapter 7916 MT7905D/MT7975 # WiFi 6E capable 7922 MT7922 802.11ax PCI Express Wireless Network Adapter 1a3b 5300 ASUS PCE-AXE59BT - 7961 MT7921 802.11ax PCI Express Wireless Network Adapter + 7925 MT7925 802.11be 160MHz 2x2 PCIe Wireless Network Adapter [Filogic 360] + 7927 MT7927 802.11be 320MHz 2x2 PCIe Wireless Network Adapter [Filogic 380] + 7961 MT7921 802.11ax PCIe Wireless Network Adapter [Filogic 330] 7988 MT7988 PCI Express Host Bridge [Filogic 880] 7990 MT7996 802.11be PCI Express Wireless Network Adapter (Port 0) 7991 MT7996 802.11be PCI Express Wireless Network Adapter (Port 1) @@ -21686,6 +21813,7 @@ 4430 BCM44xx CardBus iLine32 HomePNA 2.0 4432 BCM4432 CardBus 10/100BaseT 4433 BCM4387 802.11ax Dual Band Wireless LAN Controller + 4434 BCM4388 802.11ax Dual Band Wireless LAN Controller 4464 BCM4364 802.11ac Wireless Network Adapter # brcmfmac reports it as BCM4377/4 but macOS drivers call it BCM4377b 4488 BCM4377b Wireless Network Adapter @@ -21743,6 +21871,8 @@ 5f69 BRCM4378 Bluetooth Controller # Bluetooth PCI function of the BRCM4387 Wireless Network Adapter 5f71 BRCM4387 Bluetooth Controller +# Bluetooth PCI function of the BCM4388 Wireless Network Adapter + 5f72 BCM4388 Bluetooth Controller # Bluetooth PCI function of the BRCM4377 Wireless Network Adapter 5fa0 BRCM4377 Bluetooth Controller 8411 BCM47xx PCIe Bridge @@ -22264,10 +22394,6 @@ 1539 ATELIER INFORMATIQUES et ELECTRONIQUE ETUDES S.A. 153a ONO SOKKI 153b TERRATEC Electronic GmbH - 1144 Aureon 5.1 -# Terratec seems to use several IDs for the same card. - 1147 Aureon 5.1 Sky - 1158 Philips Semiconductors SAA7134 (rev 01) [Terratec Cinergy 600 TV] 153c ANTAL Electronic 153d FILANET Corp 153e TECHWELL Inc @@ -22536,8 +22662,9 @@ 0278 Quantum-4 in Flash Recovery Mode 0279 Quantum-4 RMA 027a Eros Chiplet - 027c Quantum-5 in Flash Recovery Mode - 027d Quantum-5 RMA + 027c Nvlink-7 Switch in Flash Recovery Mode + 027d Nvlink-7 Switch RMA + 027e Spectrum-7 Tile 0281 NPS-600 Flash Recovery 0282 ArcusE Flash recovery 0283 ArcusE RMA @@ -22560,8 +22687,8 @@ 029a OPHY3.1 # Sagitta 029c OPHY3.5 - 02a0 Quantum-6 in Flash Recovery Mode - 02a1 Quantum-6 RMA + 02a0 Nvlink-8 Switch in Flash Recovery Mode + 02a1 Nvlink-8 RMA 02a2 Spectrum-7 in Flash Recovery Mode 02a3 Spectrum-7 RMA 1002 MT25400 Family [ConnectX-2 Virtual Function] @@ -22782,6 +22909,7 @@ # Spectrum, 100GbE Switch cb84 MT52100 cf08 Switch-IB2 + cf09 Quantum Aggregation Node cf6c MT53100 [Spectrum-2] cf70 Spectrum-3 cf80 Spectrum-4 @@ -22793,8 +22921,8 @@ d2f4 Quantum-3 d2f6 Quantum-3CPO d2f8 Quantum-4 - d2fa Quantum-5 - d2fc Quantum-6 + d2fa Nvlink-7 Switch + d2fc Nvlink-8 Switch 15b4 CCI/TRIAD 15b5 Cimetrics Inc 15b6 Texas Memory Systems Inc @@ -22822,7 +22950,7 @@ 5004 PC SN520 x2 M.2 2230 NVMe SSD 5005 PC SN520 x2 M.2 2242 NVMe SSD 5006 SanDisk Extreme Pro / WD Black SN750 / PC SN730 / Red SN700 NVMe SSD - 5007 IX SN530 NVMe SSD (DRAM-less) + 5007 IX SN530 NVMe SSD / microSD Express Card (DRAM-less) 5008 PC SN530 NVMe SSD (DRAM-less) 5009 SanDisk Ultra 3D / WD PC SN530, IX SN530, Blue SN550 NVMe SSD (DRAM-less) 15b7 5009 WD Blue SN550 NVMe SSD @@ -22848,12 +22976,14 @@ 5036 WD PC SN5000S M.2 2280 NVMe SSD (DRAM-less) 5041 WD Blue SN580 NVMe SSD (DRAM-less) 5042 WD Black SN770M NVMe SSD (DRAM-less) - 5044 WD PC SN7100S NVMe SSD (DRAM-less) - 5045 WD_BLACK SN7100 NVMe SSD (DRAM-less) + 5043 WD PC SN7100S M.2 2230 NVMe SSD (DRAM-less) + 5044 WD PC SN7100S M.2 2242 NVMe SSD (DRAM-less) + 5045 WD_BLACK SN7100/WD PC SN7100S M.2 2280 NVMe SSD (DRAM-less) 5046 SanDisk Extreme NVMe SSD (DRAM-less) 5049 SN8000S NVMe SSD 504a WD Blue SN5000 NVMe SSD (DRAM-less) 5050 WD PC SN8050S / WD_BLACK SN8100 NVMe SSD + 5063 WD Blue SN5100 NVMe SSD (DRAM-less) 15b8 ADDI-DATA GmbH 1001 APCI1516 SP controller (16 digi outputs) 1003 APCI1032 SP controller (32 digi inputs w/ opto coupler) @@ -22909,6 +23039,8 @@ 15ce Genrad Inc 15cf Hilscher Gesellschaft für Systemautomation mbH 0000 CIFX PCI/PCIe + 0090 CIFX PCIe *** 2211 LINES SKIPPED *** From nobody Fri Dec 12 15:49:49 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dSYms5YwGz6L4VY for ; Fri, 12 Dec 2025 15:49:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dSYms4yqjz3k4v for ; Fri, 12 Dec 2025 15:49:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765554589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6QjQYFg5vdR3ZIm4QjS1Qb6caIbypvJJsO7CYFxQcvk=; b=IJpqoosVKMJpEA6Bm3YTyD8XwSxk1S1Px8EBa6PXq8/NJmSrGvOD0Kn3beYczRm3nZJa3a qg+I8Y1OvuxjpHpVukzmGFm6dBClj3zzDVfZaEoFAK4NtN4IBeM2p5f1whKxBOgw8g8T2X C8DNwgPcWarhk4yE0bEBVHEapeR5CIsgTDwKLUKqz9sQ5cs0wVsEdLeuVxd/B4vaCgAb15 oMaYtKJQfQ28Zy8fZzfT52IiYGw0r3uc87TzDuTSjCnOUsmWsT6BzH4KlL1lOLo4b671ae UVVBw4vAUSSZ5bvv+aq2SX1ze+0INDqCIZl5OV1M5fLNyPemFTC7J58aVG2GdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765554589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6QjQYFg5vdR3ZIm4QjS1Qb6caIbypvJJsO7CYFxQcvk=; b=ipX5Tf9DLe/lCTfQRpkBnCrUprHk0Di9CY6Z3gr4riPb0PHwPg+ez5igr+abUfJLYTmqMD H+hNupwNjLT8CBVWZvZSNbh26r6LRDx48FWRtgevLtp0zwa7OCLLS3vvg0Hp1Hd96/EeBk StxTrI6kpOvH6wa9wP0QcH0UsF9gqhpcu7VT6tXr+4xX59477uziekZgsJLlwVxaG3oS9D 008Oeg1SCZ/3hdnAr9gevEA574WOemU9Lo2c8GvRDdnS2VbPG5Muhqsg962MuPHV/u7xi/ AZk2TSZj1lHl7fxY778jMbvwpbRGXATIRcJP6RU/oHKXZ9qF39/VWgQPmlw1mQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765554589; a=rsa-sha256; cv=none; b=yJHclCb3tCillS6Uz1YfqaYsSb26dc3Ihuu/8rJwh5LusAS2YAJTtDfhEw+ozqH1IlnuC6 lCjyqfS5FNtLiEnWFmDBxEb0ZvVBmmqEFEvUWOZiX0LKbN21Y6OGm7h0jH6lXOUEG3VLZ3 Ykkd+lD4PqXjBmx0PpCUAWyQ3nLinhfBsy7/5cfnmohcaGRTfsnCCB05D7c7+IMLGXNyza Xwl4/YkQtnZIPyGyRCIsSjmn7Vtxrd4X0kpbI3GoAp0lsxLE/eL2Yd7ApsozKYaKZVzs4R P8bb3hUFmWS2rNhc2P79yq2lA5Y03jhPOoAJOZHw43O1eMCJfqx/gAZzRXAB/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dSYms4Y7Sz7J3 for ; Fri, 12 Dec 2025 15:49:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 354cb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 12 Dec 2025 15:49:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: c52253232a78 - main - xae(4): remove unused function. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c52253232a78dc2553d6ea7c9ab3e92301b36c01 Auto-Submitted: auto-generated Date: Fri, 12 Dec 2025 15:49:49 +0000 Message-Id: <693c399d.354cb.f610b33@gitrepo.freebsd.org> The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=c52253232a78dc2553d6ea7c9ab3e92301b36c01 commit c52253232a78dc2553d6ea7c9ab3e92301b36c01 Author: Ruslan Bukin AuthorDate: 2025-12-12 15:47:22 +0000 Commit: Ruslan Bukin CommitDate: 2025-12-12 15:49:37 +0000 xae(4): remove unused function. Sponsored by: CHERI Research Centre --- sys/dev/xilinx/if_xae.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/dev/xilinx/if_xae.c b/sys/dev/xilinx/if_xae.c index 7880f93c48ee..435902dc3c10 100644 --- a/sys/dev/xilinx/if_xae.c +++ b/sys/dev/xilinx/if_xae.c @@ -543,11 +543,6 @@ xae_get_phyaddr(phandle_t node, int *phy_addr) return (0); } -static void -xae_qflush(if_t ifp) -{ -} - static void xae_stop_locked(struct xae_softc *sc) { @@ -1239,7 +1234,6 @@ xae_attach(device_t dev) if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); if_setcapabilities(ifp, IFCAP_VLAN_MTU); if_setcapenable(ifp, if_getcapabilities(ifp)); - if_setqflushfn(ifp, xae_qflush); if_setioctlfn(ifp, xae_ioctl); if_setstartfn(ifp, xae_txstart); if_setinitfn(ifp, xae_init); From nobody Fri Dec 12 15:52:30 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dSYqz09Wdz6L4d5 for ; Fri, 12 Dec 2025 15:52:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dSYqy6R4lz3kgm for ; Fri, 12 Dec 2025 15:52:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765554750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jc9V/XqkTU5wwgAY2BgivN5STVv//wwMOFpv9nxSSWs=; b=WEDdclv2r0jR0UmQCD8/fFhCu0o6jow1vOst09KCPduw7dyuo9ec21XCAerue2QRZL/0FQ 0I4VZap0nNcZWWC2O6pP7ML83+JcDbk007K33MSW4iPzR0t0r214Ru/nlLkJ4eJW6PiNYA KOS+dsCGjgrmSu1WB2gH8s1Uim+GPfjKOajVKh3A2cN75cUzYDX1egTj6s7OfbU7Y8+Dqp wWAynbfNKmeTsEzZzyFNiXAz9wCN0gKyF6mpBO45X2bgSDUbPc77FgRCXgBXH9NrKQGO10 /mQFEW2Nd/Pjg+rhuVgzdmmu6Q2nXx+MuPLin4vwS7yAeW/gW5JTlmIwx0mjVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765554750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jc9V/XqkTU5wwgAY2BgivN5STVv//wwMOFpv9nxSSWs=; b=V0JlTDuaeAdli4HrSgaPuhTQLb6s84SKkepbV9GlXF0iNu0IX8QUGRcx2hvPmjhIVVA7FN W+53MNjDLuXxCmt8z1PtVhIw883qB+5L3A6IPocXM7eJtUT9evrtA2KaVQVjCiUrtOFCwL X0TblootL40nMFAlZSyN6jtsV+tYSxC19OyQkQy/LXxfJxD5kTDtSb6HGkpcW7G7sGGQU6 VGiGo4KMcI2VDBNxoZZJH8KnF/0IrUMw9Qvy3jF/d1yxWb3RkZ+CY8j0F3sOAxLEJ0kEgS kErF/dNKQS89x3laa53Dly1k78pdoDqjyq6tUJXVG/ebg00b6nGc7NAMoqp+Cw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765554750; a=rsa-sha256; cv=none; b=yJrzypQPi336D8+gQZbbcVACZqu7bvvttrTNA0flP5mqjHm6rdHP0VlRL0/WX97CAGNJEK 1lZUh3VFJKzxo4nMnbsu9QzUlHK+Sy9m2YbVtsyIlUnL4ihrsw51QffbOK2R40HX2ncpR6 VwN7TL0KN1yrtk0RkItYB92D4zaih+Y30umhE/wYtBKYlYbaj+HcPXoLPf5zgOUpeWYjeb StKHL1ecpb98VhATWbaLizGztsMLHjsm7HrIoEnmMqC1Tqnq1NDiG+NWqRv680UqUPL1UJ 8I2J8AcZCOz77IdIben2cH3kBtDGlBOxhm1opx4oe0dCuL7Sn+A+MldB7d4qTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dSYqy62WXz7d4 for ; Fri, 12 Dec 2025 15:52:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 350d1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 12 Dec 2025 15:52:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: ef2d586d7efb - main - etc/mtree/BSD.include.dist: Remove libmilter-dev List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ef2d586d7efb908bf39e7d5eb5d4305193d0ca6e Auto-Submitted: auto-generated Date: Fri, 12 Dec 2025 15:52:30 +0000 Message-Id: <693c3a3e.350d1.53928c17@gitrepo.freebsd.org> The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=ef2d586d7efb908bf39e7d5eb5d4305193d0ca6e commit ef2d586d7efb908bf39e7d5eb5d4305193d0ca6e Author: Emmanuel Vadot AuthorDate: 2025-12-12 15:34:05 +0000 Commit: Emmanuel Vadot CommitDate: 2025-12-12 15:52:19 +0000 etc/mtree/BSD.include.dist: Remove libmilter-dev When building with WITHOUT_SENDMAIL this result in a FreeBSD-libmilter-dev package with only this directory and a dependacy on FreeBSD-libmilter which doesn't exists. Differential Revision: https://reviews.freebsd.org/D54193 Fixes: 436618a427b4 ("etc/mtree: Add package tags for /usr/include") Reviewed by: ivy Sponsored by: Beckhoff Automation GMbH & Co. KG --- etc/mtree/BSD.include.dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/mtree/BSD.include.dist b/etc/mtree/BSD.include.dist index 56d3a823a8f2..e35f19ebc4b2 100644 --- a/etc/mtree/BSD.include.dist +++ b/etc/mtree/BSD.include.dist @@ -280,7 +280,7 @@ .. libipt .. - libmilter tags=package=libmilter-dev + libmilter .. libxo tags=package=runtime-dev .. From nobody Fri Dec 12 16:56:09 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dSbFT3jnlz6Jw5w; Fri, 12 Dec 2025 16:56:13 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dSbFT2fQDz3xbP; Fri, 12 Dec 2025 16:56:13 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765558573; h=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=jVouLZWQkpOQ/y1UqbirnP1vQMI13WPWerwhY3wK2y4=; b=bYeALreIBp1NDBt1zGZYYMMOWViq3bLqqliJukgaS6xPdopKSL7z5GGfPMWDpVbkSlfTk1 HQ5eadBAwKac0ao9pjGpOBRq4bYg4wPkDJNf7kB2CfPTbak/LBRn5vB6mRsrM0iciILQ8z sBfcwrXrLW8VN8TBfHzKskX6LxDBDxjrmRelqaHRFB22YUq0UKbwByfWFWrZn/t9JsBcRP glIa/all5ydtfR6HtwaKuf93VobXsH3YwSDs/QSVLWA3Wm/pU9NT5RBr72jl3jcBSJi4GL MU5003cakD31LN+KO8xR/kE1+oFjWyJGo8nUFeJZ3/K7zMtdeqeKTGglCPpIkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765558573; h=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=jVouLZWQkpOQ/y1UqbirnP1vQMI13WPWerwhY3wK2y4=; b=l8oqdbbLMolEn4sjKi8WZun4GyLXmXlRH7Snx5ujGGsRkXZLEOt7zKX/CwI5VmAJmp7kGa h6qzXEwCFn42+AH+R6EmNpTjZ8WhYJUhwFHgsG6wzegDuyt+khG/uL+K/Oe+Bqk62ndnLY Rr0PU69STVMKK1Q1MhsvNGw5qBPWLiUyCFqK2ASr86gI7NHsn+YpRe+f61KddIVGl+pjxs H1gyQXpMxfpaCJFFA90gH6wx59osFDk8I7g1as/spO7fE8mLIiHDpl/qCaFYUGZcwqu1hx PyAhtxtJOuuZL3QXHwOT/uD7XhFAmrTEYlKoXUDOH8pWGnfDmq5/r3GywW/WpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765558573; a=rsa-sha256; cv=none; b=RPmWioOjX9wHmr/AeEsSligtZ76emexIeq4LKRm+rMppm1yUfvVi92koxa7vwxDQvpphST rP3Q/3ZkIAMXxbEy2zN/a/XaHwcJY1QBdA516bLwHhGYGYXJbi+I4AhKatNwR2VTXTRQLH ro0pYgqaehM0U88PefDwKzOWv8elBr60B/CxP38tlFFSbc/RXRk4EWQ65B4OdlHjzKa0fN 6y680vTgKJEr+UtEN3dgXmt8Uqexg20CYDL+3K1lSMCjDp6KaoND9PIvV6M8t0WBYSQj2h ZHevdCgpjNq6kvOG3Y6a78ZgcG+6k7qGpUO/FjSEYovlYiKhFfp/comTjwudFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4dSbFS4rzrz14Hh; Fri, 12 Dec 2025 16:56:12 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Fri, 12 Dec 2025 08:56:09 -0800 From: Gleb Smirnoff To: Ruslan Bukin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c52253232a78 - main - xae(4): remove unused function. Message-ID: References: <693c399d.354cb.f610b33@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <693c399d.354cb.f610b33@gitrepo.freebsd.org> On Fri, Dec 12, 2025 at 03:49:49PM +0000, Ruslan Bukin wrote: R> The branch main has been updated by br: R> R> URL: https://cgit.FreeBSD.org/src/commit/?id=c52253232a78dc2553d6ea7c9ab3e92301b36c01 R> R> commit c52253232a78dc2553d6ea7c9ab3e92301b36c01 R> Author: Ruslan Bukin R> AuthorDate: 2025-12-12 15:47:22 +0000 R> Commit: Ruslan Bukin R> CommitDate: 2025-12-12 15:49:37 +0000 R> R> xae(4): remove unused function. R> R> Sponsored by: CHERI Research Centre R> --- R> sys/dev/xilinx/if_xae.c | 6 ------ R> 1 file changed, 6 deletions(-) R> R> diff --git a/sys/dev/xilinx/if_xae.c b/sys/dev/xilinx/if_xae.c R> index 7880f93c48ee..435902dc3c10 100644 R> --- a/sys/dev/xilinx/if_xae.c R> +++ b/sys/dev/xilinx/if_xae.c R> @@ -543,11 +543,6 @@ xae_get_phyaddr(phandle_t node, int *phy_addr) R> return (0); R> } R> R> -static void R> -xae_qflush(if_t ifp) R> -{ R> -} R> - R> static void R> xae_stop_locked(struct xae_softc *sc) R> { R> @@ -1239,7 +1234,6 @@ xae_attach(device_t dev) R> if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); R> if_setcapabilities(ifp, IFCAP_VLAN_MTU); R> if_setcapenable(ifp, if_getcapabilities(ifp)); R> - if_setqflushfn(ifp, xae_qflush); R> if_setioctlfn(ifp, xae_ioctl); R> if_setstartfn(ifp, xae_txstart); R> if_setinitfn(ifp, xae_init); This also means this code was never run with INVARIANTS. Otherwise it would panic in if_attach_internal(). -- Gleb Smirnoff From nobody Fri Dec 12 17:23:36 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dSbs51VHtz6JyQc for ; Fri, 12 Dec 2025 17:23:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dSbs46J8Dz440v for ; Fri, 12 Dec 2025 17:23:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765560216; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MyrFE+8HZ7I0D8HC2UCDioMDtU7QR4LHSsvLLYdhRkM=; b=ErBrngYv9U5QLLcTrRjtJgkDIXT/KEUVg5yNJ31YTTdM80vilEjKX1uCHcxWNC96DPp4RG r+OmJHc+wzL8hiK+vUwX0jI+gtQQtSCySC218eDD2KkoFhO9eXqouVb2PzUDFL5LB2+l+V clVH8sLY2ZMBtCugMm+MkrUXCkGPZePxgcECWcB0YIAMIuiNirN9SFhthj8tF5vbTwmM51 e/Oe5Hpn3In2lE5td6Lt/tizRCujLgLwhtmb9JsaQRkCDR+J3825UtHJQSnwAy7nGVKkKK UmDnvD56D4Z8Z/nLLOjOZFguL5+2sHMXGgldmDJPY9vHdCgFrt+JNJb2y0EBBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765560216; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MyrFE+8HZ7I0D8HC2UCDioMDtU7QR4LHSsvLLYdhRkM=; b=sFtNzsIJnqHjbZA8k4tAXX2X9nYRcuH1pmNA7HPWMG3fTOOZ7ONDJ7ZQW4NE/b4QpRSclR k7d5oXLHVdcMCWsargrXwLzOt92zPNEXfsU3YRszakrYoCtsvF29qztZ4vOMahLdZTlu8j q2BFUwg2KdUyqwy5yfvxQ9c8DtJOfUL4vN0kebjzv090sxgAP20tidt6hk0Nyxfda9Y3n1 OOHqEc6IBqU1U4Jxx16/MoHDBCZFoVuXrFqPhIM2dhVcQRyN4DgitOzFpSb5wHZFVydW1V kAHYFinyOrx4xUeNQdyBZBojC+6b7bKD9tsx4it5JtB4zWFCyRtgJOEI0x9PFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765560216; a=rsa-sha256; cv=none; b=YqLlkK6IZf0HrNEeO5r/uDX8jTDCisXLX7tpP3hskmjPXFj+lO494endIImEJTFMdKV+Xe VZNzhGkDC7Qt9WFvNRPAgojUJXgdLggdt7ujxvwxR7RseNsvWIIvfrWWmrwsTZOkv9g1MS 9lZkBgG27dDIYJrE9vuJDiiMhIoWn4lGP57ytZmNek3LnIpOFtQh0BGMIRMfDe0ebbqM38 jfTKTaNEWlHqiDVjWNFtYWTsSHV0XXeGy+AjP2V0I+QaJEndJaNN9gs2fMEA7LfHlRTB1F Rn8Drzk59SRi4v/Dr3mjHvVUzA47uydQZ+2QXDb8NKnlwRd9uTAGzjyPJBTqTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dSbs45HVQz9cW for ; Fri, 12 Dec 2025 17:23:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3dc51 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 12 Dec 2025 17:23:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 929338d1e92a - main - tpc: retire net.inet.tcp.nolocaltimewait List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 929338d1e92ada4ff4ee2061c625fa45a1a34caf Auto-Submitted: auto-generated Date: Fri, 12 Dec 2025 17:23:36 +0000 Message-Id: <693c4f98.3dc51.1b0fc74e@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=929338d1e92ada4ff4ee2061c625fa45a1a34caf commit 929338d1e92ada4ff4ee2061c625fa45a1a34caf Author: Gleb Smirnoff AuthorDate: 2025-12-12 17:22:56 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-12 17:22:56 +0000 tpc: retire net.inet.tcp.nolocaltimewait See c3fc0db3bc50df18a724e6e6b12ea4e060fd9255 for details. --- sys/netinet/tcp_timewait.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index 3afa3c0ac1c1..259ec7dc50dc 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -86,30 +86,6 @@ #include -VNET_DEFINE_STATIC(bool, nolocaltimewait) = false; -#define V_nolocaltimewait VNET(nolocaltimewait) - -static int -sysctl_net_inet_tcp_nolocaltimewait(SYSCTL_HANDLER_ARGS) -{ - int error; - bool new; - - new = V_nolocaltimewait; - error = sysctl_handle_bool(oidp, &new, 0, req); - if (error == 0 && req->newptr) { - V_nolocaltimewait = new; - gone_in(16, "net.inet.tcp.nolocaltimewait is obsolete." - " Use net.inet.tcp.msl_local instead.\n"); - } - return (error); -} - -SYSCTL_PROC(_net_inet_tcp, OID_AUTO, nolocaltimewait, - CTLFLAG_VNET | CTLFLAG_RW | CTLTYPE_U8, - &VNET_NAME(nolocaltimewait), 0, sysctl_net_inet_tcp_nolocaltimewait, "CU", - "Do not create TCP TIME_WAIT state for local connections"); - static u_int tcp_eff_msl(struct tcpcb *tp) { @@ -146,9 +122,6 @@ void tcp_twstart(struct tcpcb *tp) { struct inpcb *inp = tptoinpcb(tp); -#ifdef INET6 - bool isipv6 = inp->inp_inc.inc_flags & INC_ISIPV6; -#endif NET_EPOCH_ASSERT(); INP_WLOCK_ASSERT(inp); @@ -164,21 +137,6 @@ tcp_twstart(struct tcpcb *tp) if (tp->t_flags & TF_ACKNOW) (void) tcp_output(tp); - if (V_nolocaltimewait && ( -#ifdef INET6 - isipv6 ? in6_localip(&inp->in6p_faddr) : -#endif -#ifdef INET - in_localip(inp->inp_faddr) -#else - false -#endif - )) { - if ((tp = tcp_close(tp)) != NULL) - INP_WUNLOCK(inp); - return; - } - tcp_timer_activate(tp, TT_2MSL, 2 * tcp_eff_msl(tp)); INP_WUNLOCK(inp); } From nobody Fri Dec 12 17:50:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dScSV5z7tz6K29p for ; Fri, 12 Dec 2025 17:50:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dScSV5bKjz3CGd for ; Fri, 12 Dec 2025 17:50:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765561850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YBnMEdjyTV3Vt6WaFKAxH+Ooh+OsK0wjpkN9nN0Fg4M=; b=VgVJbh2YIib0aCnn3IOg4thhY9W5OMt386UVpaqUpZMcNiZpuI5bG2N7he+/CA+l7CQqfc c0n/vTSiaAdwp3xMQHxDxjeseYZ8o0ty7cct3iw3p6avRrhmjevQZQgV70v3wNdOvUO152 mW4hfh9VYvB38823HFzDQ9irDsLLOPHT5M5RoDMsQWVthzGl38nGhdpn+Jso1lcDzoV/u3 ln4d1ye6znUfaTa7W84wsRkK442Lm9mP48lc12MWWU/87QEz1aCA8919b9P1lpv20OGpjC 3RIGlgIWYrOKqix2thga2sr63+I+uFtwUfCuR4YaoW9p6O0i8szynxij6jxunQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765561850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YBnMEdjyTV3Vt6WaFKAxH+Ooh+OsK0wjpkN9nN0Fg4M=; b=TZKt5NgzSPggU8iC/H4zzRJyDbBK+XHIw9XuP1xtu4TInV2+nJb6tjrfFfzCf/8GMYSKUE 0vcUEjnf9hvZc3zxby71Ztu1mKvESpwCBCtN7jhMmyG80LVD/WT6fw3kogWP6sSQHYoQp0 tChBPoTWM42eqQEvrdD4m16Dj6uBtQPTrq2OJs9OBteqfJgZEK1u5OKaUl2woRm8pPl3Ik yvlRPwjW85PNbJkJuc3stwNpoy1eHr6bQF3lRmTfkr3n18VddWxMGkLL3Lv8cRqWdWkke0 OiEk65XW6vKtD4AUnLfkASHI2wr6LBp61Wub3wsFPf6BFaR0hKt50q1w5T9VmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765561850; a=rsa-sha256; cv=none; b=q1mMV9hh+Eu6S0xWWOeU/Wt6BffWwcpglxVWqedkmrB+2C3r6GKYmJ3UEvDsl84bt+aox6 n0fPAmKAAUjr3n17VcHW5BZGl+eJ3G1f7odLitNsP+293jUkM5B4hbAwJsLJIHTU7K3VWO akuz7MbXwCPDZbAtxYK6IvFL9K0zxGNIm3cUkd7tfoB8YagfemUVQKIWYSoY5VCpigpkRL Q5K9iYJrTxtU+LdjFPlIqQQZStX7iCwRJ+MyG86CJxryhA5gOEVWTrDogzDrX/R3YAmRri bfg6O3m/ekwinFek43GVQk6ZhWJDC7+fSuuPY/yFOFEaqOnX5Il7Fyj5KG77Kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dScSV5BzrzBmb for ; Fri, 12 Dec 2025 17:50:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id a85b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 12 Dec 2025 17:50:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: a16fdef54c10 - main - RELNOTES: Truncate for 16.0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: a16fdef54c10d887381ab9e56bc09f6dd42d6fea Auto-Submitted: auto-generated Date: Fri, 12 Dec 2025 17:50:50 +0000 Message-Id: <693c55fa.a85b.4119dfca@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a16fdef54c10d887381ab9e56bc09f6dd42d6fea commit a16fdef54c10d887381ab9e56bc09f6dd42d6fea Author: Mark Johnston AuthorDate: 2025-12-12 17:50:38 +0000 Commit: Mark Johnston CommitDate: 2025-12-12 17:50:38 +0000 RELNOTES: Truncate for 16.0 Differential Revision: https://reviews.freebsd.org/D54195 --- RELNOTES | 462 +-------------------------------------------------------------- 1 file changed, 1 insertion(+), 461 deletions(-) diff --git a/RELNOTES b/RELNOTES index b6c3a8963757..2400b74d1e8c 100644 --- a/RELNOTES +++ b/RELNOTES @@ -1,4 +1,4 @@ -Release notes for FreeBSD 15.0. +Release notes for FreeBSD 16.0. This file describes new user-visible features, changes and updates relevant to users of binary FreeBSD releases. Each entry should describe the change in no @@ -9,463 +9,3 @@ specified as a comma separated list and/or range, followed by a colon and a newline. Entries should be separated by a newline. Changes to this file should not be MFCed. - -8e0b1a1c03a3: - The FreeBSD-base repository is now defined in /etc/pkg/FreeBSD.conf, - disabled by default. Systems which installed with pkgbase prior to - 15.0-RC1 (if running releng/15.0) or November 15th (if running from - stable/main snapshots) will need to remove the definition of the - FreeBSD-base repository from /usr/local/etc/pkg/repos/ and replace - it with a single line "FreeBSD-base: { enabled: yes }". - -5000d023a446, 03da141d59ae: - Add a "-f" option to "kadmin -l dump" which can be used to - dump the Heimdal KDC database in a format that can be loaded - into the MIT KDC. - See https://wiki.freebsd.org/Kerberos/Heimdal2MIT_KDC_Migration - for how to use "-f" to transfer/convert the KDC database. - -9cab9fde5eda: - virtual_oss is imported to base. The audio/virtual_oss port will stop - being built from FreeBSD 15.0 onwards. - - Regarding user-facing changes, the only practical difference is the - installation process. Everything is provided by the base system, except - for the following optional components, which can be installed from - ports: - - * sndio backend support: audio/virtual_oss_sndio - * bluetooth backend support: audio/virtual_oss_bluetooth - * virtual_equalizer(8): audio/virtual_oss_equalizer - - Apart from that, virtual_oss should work as expected. Users of - virtual_oss can uninstall audio/virtual_oss and instead use the base - system version from now on. - -929f5966a9fd, b9b0e105c357, 5105e1ebecc7, cb3eac927b5d, ce9c325a2e92, 18a870751b03, 89c82750da1a, 0c13e9c3c464, 10eecc467f32, 619feb9dd00e, 7d2cfb27d62f, e26259f48afe, a245dc5d68c7, 9a726ef24134, 383e7290c0b5, c791ea80b5f7, 543b875a8ee4, 40a5abfc3f66, 73ed0c7992fd, 04764f21855a, 624b7beed5ac, 7b68893ffa9b, 6c4771c73470, dd0ec030f8fd, fb1ccc04adfe, b98d0566b2bd, ca9ccf0ce9ad, 6b28571cb6ba, 98d46e05ab08, 2a454b05f2c1, 110111a6cca1, 5f8493bbf479, e447c252d0ec, 4680e7fcc70a, 188138106b9f, 4cb1baa7d85c, 805498e49ae4, f58febc4cefa, ae07a5805b19, 0559f30a882d, cbb6e747af98, 0d1496f0f1e7, 60f970b85e44, 0b9a631e0724, ee3960cba106: - Replaced Heimdal 1.5.2 with MIT KRB5 (1.21.3, 1.22.0, 1.22.1). - Heimdal 1.5.2 can still be built using the WITHOUT_MITKRB5 flag. - Heimdal build plumbing will be removed in 16. - -2b74ff5fceb6: - Introduced support for watchdog timer in Intel 6300ESB I/O controller - hub via the i6300esbwd driver, now included in ichwd.ko. - This driver is intended primarily for QEMU users, where it serves as - the default and only watchdog timer for x86 virtual machines. - -3068d706eabe: - Lua updated to 5.4.8, which is minor bug fixes from 5.4.7. - -b45a181a74c8: - Awk updates to August 04, 2025 version, with minor bug fixes. - -dc5ba6b8b4f0: - The WITHOUT_GSSAPI src.conf(5) option has been removed. The GSSAPI - libraries are now always built unless WITHOUT_KERBEROS is set. - -c43cad871720: - jemalloc 5.3.0 has landed. See contrib/jemalloc/ChangeLog - for the long list of changes. - -cce64f2e6851: - Add support for the NFSv4.2 Clone operation, which uses - block cloning to "copy on write" files on an NFS server. - This only works for exported ZFS file systems that have - block cloning enabled, at this time. - -37b2cb5ecb0f: - Add support to VOP_COPY_FILE_RANGE() for block cloning. - At this time, ZFS is the only local file system that supports - this and only if block cloning is enabled. NFSv4.2 also supports it. - See pathconf(2) and copy_file_range(2) for more information. - -2ec2ba7e232d, df58e8b1506f (openzfs 2957eabbe), f61844833ee8, b1b607bd200f, - ee95e4d02dbd: - Add Solaris style extended attributes (called named attributes - in NFSv4). At this time, only ZFS when the ZFS property called - xattr=dir and NFSv4 support them. The attributes are presented - in a directory as regular files. See named_attribute(7) for - more information. - -ef2a572bf6: - Inline IPSEC offload infrastructure and driver support for mlx5(4) - Nvidia ConnectX-6+ network cards were added. - -68ba38dad3: - amd64: handling of the %fsbase/%gsbase registers and tls base - were reworked, making it more useful for apps that directly - manipulate CPU context. - -78aaab9f1cf: - rtld: added support for -z initfirst - -e36f069ecb4, c069ca085b: - Reliability of UFS on volumes with more than 2G of inodes is - significantly improved. The underlying issue was the invalid - interpretation of the 32bit inode number as signed, which got - sign-extended into ino_t. - -d390633cf8c: - On modern amd64 machines (which have the LA57 CPU feature), - FreeBSD is able to utilize more than 4TB of RAM. - -2bd157bc732a: - The readdir_r(3) function is deprecated and may be removed in future - releases. Using it in a program will result in compile-time and - link-time warnings. - -9ba51cce8bbd: - bsnmpd(1) no longer supports legacy UDP transport. Users, that have - not updated their /etc/snmpd.config since 12.0-RELEASE or older will - need to merge in the new configuration. In particular, the transport - definition shall be changed from begemotSnmpdPortStatus OID to - begemotSnmpdTransInetStatus. - -1349a733cf28: - Add a driver supporting a new storage controller interface, - Universal Flash Storage Host Controller Interface, supporting - version 4.1 and earlier, via ufshci(4). - -f1f230439fa4: - FreeBSD now implements the inotify(2) family of system calls. - -50e733f19b37, 171f66b0c2ca: - These commits helped improve utilization of NFSv4.1/4.2 - delegations. The changes are only used when the NFSv4 - mount uses the "nocto" mount option and requires an - up-to-date NFSv4.1/4.2 server with delegations enabled. - For example: For a FreeBSD kernel build with both src - and obj NFSv4 mounted, the total RPC count dropped from - 5461286 to 945643, with a 20% drop in elapsed time. - -c3fc0db3bc50 - The default value of the sysctl variable - net.inet.tcp.nolocaltimewait has changed from 1 to 0. This means - that FreeBSD does not skip the TIME_WAIT state anymore for - endpoints for which the remote address is local. The new sysctl - variable net.inet.tcp.msl_local can be used to control the time - these endpoints stay in the TIME_WAIT state. The sysctl variable - net.inet.tcp.nolocaltimewait is deprecated and intended to be - removed in FreeBSD 16. - -cd240957d7ba - Making a connection to INADDR_ANY (i.e., using INADDR_ANY as an alias - for localhost) is now disabled by default. This functionality can be - re-enabled by setting the net.inet.ip.connect_inaddr_wild sysctl to 1. - -b61850c4e6f6 - The bridge(4) sysctl net.link.bridge.member_ifaddrs now defaults to 0, - meaning that interfaces added to a bridge may not have IP addresses - assigned. Refer to bridge(4) for more information. - -44e5a0150835, 9a37f1024ceb: - A new utility sndctl(8) has been added to concentrate the various - interfaces for viewing and manipulating audio device settings (sysctls, - /dev/sndstat), into a single utility with a similar control-driven - interface to that of mixer(8). - -93a94ce731a8: - ps(1)'s options '-a' and '-A', when combined with any other one - affecting the selection of processes except for '-X' and '-x', would - have no effect, in contradiction with the rule that one process is - listed as soon as any of the specified options selects it (inclusive - OR), which is both mandated by POSIX and arguably a natural expectation. - This bug has been fixed. - - As a practical consequence, specifying '-a'/'-A' now causes all - processes to be listed regardless of other selection options (except for - '-X' and '-x', which still apply). In particular, to list only - processes from specific jails, one must not use '-a' with '-J'. Option - '-J', contrary to its apparent initial intent, never worked as a filter - in practice (except by accident with '-a' due to the bug), but instead - as any other selection options (e.g., '-U', '-p', '-G', etc.) subject to - the "inclusive OR" rule. - -995b690d1398: - ps(1)'s '-U' option has been changed to select processes by their real - user IDs instead of their effective one, in accordance with POSIX and - the use case of wanting to list processes launched by some user, which - is expected to be more frequent than listing processes having the rights - of some user. This only affects the selection of processes whose real - and effective user IDs differ. After this change, ps(1)'s '-U' flag - behaves differently then in other BSDs but identically to that of - Linux's procps and illumos. - -1aabbb25c9f9: - ps(1)'s default list of processes now comes from matching its effective - user ID instead of its real user ID with the effective user ID of all - processes, in accordance with POSIX. As ps(1) itself is not installed - setuid, this only affects processes having different real and effective - user IDs that launch ps(1) processes. - -f0600c41e754-de701f9bdbe0, bc201841d139: - mac_do(4) is now considered production-ready and its functionality has - been considerably extended at the price of breaking credentials - transition rules' backwards compatibility. All that could be specified - with old rules can also be with new rules. Migrating old rules is just - a matter of adding "uid=" in front of the target part, substituting - commas (",") with semi-colons (";") and colons (":") with greater-than - signs (">"). Please consult the mac_do(4) manual page for the new rules - grammar. - -02d4eeabfd73: - hw.snd.maxautovchans has been retired. The commit introduced a - hw.snd.vchans_enable sysctl, which along with - dev.pcm.X.{play|rec}.vchans, from now on work as tunables to only - enable/disable vchans, as opposed to setting their number and/or - (de-)allocating vchans. Since these sysctls do not trigger any - (de-)allocations anymore, their effect is instantaneous, whereas before - we could have frozen the machine (when trying to allocate new vchans) - when setting dev.pcm.X.{play|rec}.vchans to a very large value. - -7e7f88001d7d: - The definition of pf's struct pfr_tstats and struct pfr_astats has - changed, breaking ABI compatibility for 32-bit powerpc (including - powerpcspe) and armv7. Users of these platforms should ensure kernel - and userspace are updated together. - -5dc99e9bb985, 08e638c089a, 4009a98fe80: - The net.inet.{tcp,udp,raw}.bind_all_fibs tunables have been added. - They modify socket behavior such that packets not originating from the - same FIB as the socket are ignored. TCP and UDP sockets belonging to - different FIBs may also be bound to the same address. The default - behavior is unmodified. - -f87bb5967670, e51036fbf3f8: - Support for vinum volumes has been removed. - -8ae6247aa966, cf0ede720391d, 205659c43d87bd, 1ccbdf561f417, 4db1b113b151: - The layout of NFS file handles for the tarfs, tmpfs, cd9660, and ext2fs - file systems has changed. An NFS server that exports any of these file - systems will need its clients to unmount and remount the exports. - -1111a44301da: - Defer the January 19, 2038 date limit in UFS1 filesystems to - February 7, 2106. This affects only UFS1 format filesystems. - See the commit message for details. - -07cd69e272da: - Add a new -a command line option to mountd(8). - If this command line option is specified, when - a line in exports(5) has the -alldirs export option, - the directory must be a server file system mount point. - -0e8a36a2ab12: - Add a new NFS mount option called "mountport" that may be used - to specify the port# for the NFS server's Mount protocol. - This permits a NFSv3 mount to be done without running rpcbind(8). - -b2f7c53430c3: - Kernel TLS is now enabled by default in kernels including KTLS - support. KTLS is included in GENERIC kernels for aarch64, - amd64, powerpc64, and powerpc64le. - -f57efe95cc25: - New mididump(1) utility which dumps MIDI 1.0 events in real time. - -ddfc6f84f242: - Update unicode to 16.0.0 and CLDR to 45.0.0. - -b22be3bbb2de: - Basic Cloudinit images no longer generate RSA host keys by default for - SSH. - -000000000000: - RSA host keys for SSH are deprecated and will no longer be generated - by default in FreeBSD 16. - -0aabcd75dbc2: - EC2 AMIs no longer generate RSA host keys by default for SSH. RSA - host key generation can be re-enabled by setting sshd_rsa_enable="YES" - in /etc/rc.conf if it is necessary to support very old SSH clients. - -a1da7dc1cdad: - The SO_SPLICE socket option was added. It allows TCP connections to - be spliced together, enabling proxy-like functionality without the - need to copy data in and out of user memory. - -fc12c191c087: - grep(1) no longer follows symbolic links by default for - recursive searches. This matches the documented behavior in - the manual page. - -e962b37bf0ff: - When running bhyve(8) guests with a boot ROM, i.e., bhyveload(8) is not - used, bhyve now assumes that the boot ROM will enable PCI BAR decoding. - This is incompatible with some boot ROMs, particularly outdated builds - of edk2-bhyve. To restore the old behavior, add - "pci.enable_bars='true'" to your bhyve configuration. - - Note in particular that the uefi-edk2-bhyve package has been renamed - to edk2-bhyve. - -43caa2e805c2: - amd64 bhyve(8)'s "lpc.bootrom" and "lpc.bootvars" options are - deprecated. Use the top-level "bootrom" and "bootvars" options - instead. - -822ca3276345: - byacc was updated to 20240109. - -21817992b331: - ncurses was updated to 6.5. - -1687d77197c0: - Filesystem manual pages have been moved to section four. - Please check ports you are maintaining for crossreferences. - -8aac90f18aef: - new MAC/do policy and mdo(1) utility which enables a user to - become another user without the requirement of setuid root. - -7398d1ece5cf: - hw.snd.version is removed. - -a15f7c96a276,66b5296f1b29: - NVMe over Fabrics controller. The nvmft(4) kernel module adds - a new frontend to the CAM target layer which exports ctl(4) - LUNs as NVMe namespaces to remote hosts. The ctld(8) daemon - now supports NVMe controllers in addition to iSCSI targets and - is responsible for accepting incoming connection requests and - handing off connected queue pairs to nvmft(4). - -a1eda74167b5,1058c12197ab: - NVMe over Fabrics host. New commands added to nvmecontrol(8) - to establish connections to remote controllers. Once - connections are established they are handed off to the nvmf(4) - kernel module which creates nvmeX devices and exports remote - namespaces as nda(4) disks. - -25723d66369f: - As a side-effect of retiring the unit.* code in sound(4), the - hw.snd.maxunit loader(8) tunable is also retired. - -eeb04a736cb9: - date(1) now supports nanoseconds. For example: - `date -Ins` prints "2024-04-22T12:20:28,763742224+02:00" and - `date +%N` prints "415050400". - -6d5ce2bb6344: - The default value of the nfs_reserved_port_only rc.conf(5) setting has - changed. The FreeBSD NFS server now requires the source port of - requests to be in the privileged port range (i.e., <= 1023), which - generally requires the client to have elevated privileges on their local - system. The previous behavior can be restored by setting - nfs_reserved_port_only=NO in rc.conf. - -aea973501b19: - ktrace(2) will now record detailed information about capability mode - violations. The kdump(1) utility has been updated to display such - information. - -f32a6403d346: - One True Awk updated to 2nd Edition. See https://awk.dev for details - on the additions. Unicode and CSVs (Comma Separated Values) are now - supported. - -fe86d923f83f: - usbconfig(8) now reads the descriptions of the usb vendor and products - from usb.ids when available, similarly to what pciconf(8) does. - -4347ef60501f: - The powerd(8) utility is now enabled in /etc/rc.conf by default on - images for the arm64 Raspberry Pi's (arm64-aarch64-RPI img files). - This prevents the CPU clock from running slow all the time. - -0b49e504a32d: - rc.d/jail now supports the legacy variable jail_${jailname}_zfs_dataset - to allow unmaintained jail managers like ezjail to make use of this - feature (simply rename jail_${jailname}_zfs_datasets in the ezjail - config to jail_${jailname}_zfs_dataset. - -e0dfe185cbca: - jail(8) now support zfs.dataset to add a list of ZFS datasets to a - jail. - -61174ad88e33: - newsyslog(8) now supports specifying a global compression method directly - at the beginning of the newsyslog.conf file, which will make newsyslog(8) - to behave like the corresponding option was passed to the newly added - '-c' option. For example: - - none - -906748d208d3: - newsyslog(8) now accepts a new option, '-c' which overrides all historical - compression flags by treating their meaning as "treat the file as compressible" - rather than "compress the file with that specific method." - - The following choices are available: - * none: Do not compress, regardless of flag. - * legacy: Historical behavior (J=bzip2, X=xz, Y=zstd, Z=gzip). - * bzip2, xz, zstd, gzip: apply the specified compression method. - - We plan to change the default to 'none' in FreeBSD 15.0. - -1a878807006c: - This commit added some statistics collection to the NFS-over-TLS - code in the NFS server so that sysadmins can moditor usage. - The statistics are available via the kern.rpc.tls.* sysctls. - -7c5146da1286: - Mountd has been modified to use strunvis(3) to decode directory - names in exports(5) file(s). This allows special characters, - such as blanks, to be embedded in the directory name(s). - "vis -M" may be used to encode such directory name(s). - -c5359e2af5ab: - bhyve(8) has a new network backend, "slirp", which makes use of the - libslirp package to provide a userspace network stack. This backend - makes it possible to access the guest network from the host without - requiring any extra network configuration on the host. - -bb830e346bd5: - Set the IUTF8 flag by default in tty(4). - - 128f63cedc14 and 9e589b093857 added proper UTF-8 backspacing handling - in the tty(4) driver, which is enabled by setting the new IUTF8 flag - through stty(1). Since the default locale is UTF-8, enable IUTF8 by - default. - -ff01d71e48d4: - dialog(1) has been replaced by bsddialog(1) - -41582f28ddf7: - FreeBSD 15.0 will not include support for 32-bit platforms. - However, 64-bit systems will still be able to run older 32-bit - binaries. - - Support for executing 32-bit binaries on 64-bit platforms via - COMPAT_FREEBSD32 will remain supported for at least the - stable/15 and stable/16 branches. - - Support for compiling individual 32-bit applications via - `cc -m32` will also be supported for at least the stable/15 - branch which includes suitable headers in /usr/include and - libraries in /usr/lib32. - - Support for 32-bit platforms in ports for 15.0 and later - releases is also deprecated, and these future releases may not - include binary packages for 32-bit platforms or support for - building 32-bit applications from ports. - - stable/14 and earlier branches will retain existing 32-bit - kernel and world support. Ports will retain existing support - for building ports and packages for 32-bit systems on stable/14 - and earlier branches as long as those branches are supported - by the ports system. However, all 32-bit platforms are Tier-2 - or Tier-3 and support for individual ports should be expected - to degrade as upstreams deprecate 32-bit platforms. - - With the current support schedule, stable/14 will be EOLed 5 - years after the release of 14.0. The EOL of stable/14 would - mark the end of support for 32-bit platforms including source - releases, pre-built packages, and support for building - applications from ports. Given an estimated release date of - October 2023 for 14.0, support for 32-bit platforms would end - in October 2028. - - The project may choose to alter this approach when 15.0 is - released by extending some level of 32-bit support for one or - more platforms in 15.0 or later. Users should use the - stable/14 branch to migrate off of 32-bit platforms. From nobody Fri Dec 12 18:43:23 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dSddm431zz6K6hs; Fri, 12 Dec 2025 18:43:56 +0000 (UTC) (envelope-from br@bsdpad.com) Received: from mail.bsdpad.com (mail.bsdpad.com [91.99.52.19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4dSddm16xDz3LmJ; Fri, 12 Dec 2025 18:43:56 +0000 (UTC) (envelope-from br@bsdpad.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=bsdpad.com; s=20201212; h=From:To:Subject; bh=7Cbw+ViErRnm4BDy8XIrHI3044Yu4XOBW+TrM5omvwk=; b=n04K3Gch3ZS4B6ndiymKvi924S 97WuZVj63wgp+mpwF4oYvhtHt3CD/dnHLFqmVgFaDs3M3XZ7WIh/6fOY7ZXH7YspsHMA6ZpOclPEA tSJMBXYUu8UMlBqV2YqfM5Bowg9OFDnk3NIl1fSwEajm7auQFep+SmdbHKLE4Cskeh/bzH1MhWBbb Es9y4fyerN25xnzZKGXhordyXEyhOLCs4ScRAZrEfNyfoVpU3/GHiOraWz5VH+htW6Sr3UatOqVDe ZqBefEVVCV+DSLtVE7K/MIf+G8IYBo4aHAFe7s3B4c7GdVCQW4Icj3W+me1WT58Nq3YVJuuIuevB2 T9Y2e88Q==; Received: from mail.bsdpad.com ([91.99.52.19] helo=localhost) by mail.bsdpad.com with esmtpsa (TLS1.3) tls TLS_AES_128_GCM_SHA256 (Exim 4.98.2 (FreeBSD)) (envelope-from ) id 1vU86t-00000000DKZ-2xJ6; Fri, 12 Dec 2025 18:43:23 +0000 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 12 Dec 2025 18:43:23 +0000 Message-Id: Cc: , , Subject: Re: git: c52253232a78 - main - xae(4): remove unused function. To: "Gleb Smirnoff" From: "Ruslan Bukin" X-Mailer: aerc References: <693c399d.354cb.f610b33@gitrepo.freebsd.org> In-Reply-To: X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:91.99.0.0/16, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dSddm16xDz3LmJ On Fri Dec 12, 2025 at 4:56 PM UTC, Gleb Smirnoff wrote: > On Fri, Dec 12, 2025 at 03:49:49PM +0000, Ruslan Bukin wrote: > R> The branch main has been updated by br: > R>=20 > R> URL: https://cgit.FreeBSD.org/src/commit/?id=3Dc52253232a78dc2553d6ea7= c9ab3e92301b36c01 > R>=20 > R> commit c52253232a78dc2553d6ea7c9ab3e92301b36c01 > R> Author: Ruslan Bukin > R> AuthorDate: 2025-12-12 15:47:22 +0000 > R> Commit: Ruslan Bukin > R> CommitDate: 2025-12-12 15:49:37 +0000 > R>=20 > R> xae(4): remove unused function. > R> =20 > R> Sponsored by: CHERI Research Centre > R> --- > R> sys/dev/xilinx/if_xae.c | 6 ------ > R> 1 file changed, 6 deletions(-) > R>=20 > R> diff --git a/sys/dev/xilinx/if_xae.c b/sys/dev/xilinx/if_xae.c > R> index 7880f93c48ee..435902dc3c10 100644 > R> --- a/sys/dev/xilinx/if_xae.c > R> +++ b/sys/dev/xilinx/if_xae.c > R> @@ -543,11 +543,6 @@ xae_get_phyaddr(phandle_t node, int *phy_addr) > R> return (0); > R> } > R> =20 > R> -static void > R> -xae_qflush(if_t ifp) > R> -{ > R> -} > R> - > R> static void > R> xae_stop_locked(struct xae_softc *sc) > R> { > R> @@ -1239,7 +1234,6 @@ xae_attach(device_t dev) > R> if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); > R> if_setcapabilities(ifp, IFCAP_VLAN_MTU); > R> if_setcapenable(ifp, if_getcapabilities(ifp)); > R> - if_setqflushfn(ifp, xae_qflush); > R> if_setioctlfn(ifp, xae_ioctl); > R> if_setstartfn(ifp, xae_txstart); > R> if_setinitfn(ifp, xae_init); > > This also means this code was never run with INVARIANTS. Otherwise it wo= uld > panic in if_attach_internal(). Indeed, but just a couple of week since I rewrote it. INVARIANTS were disab= led in my Codasip repo due to experiments with nvme(4), and I forgot re-enable! Ruslan From nobody Sat Dec 13 00:44:18 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dSndZ69Zkz6KbLk for ; Sat, 13 Dec 2025 00:44:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dSndZ5j0Nz3sf2 for ; Sat, 13 Dec 2025 00:44:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765586658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uDXLc0NUQW8rbbSRv2ZqzC+SmLLautS23MmPhLeS/b0=; b=k0Fftdfpi/xVwobsAOOhfB5u6H1d3sukQJkCBSF9yl/dqqeAHT2FXIFKAet7fzSPOxg8Gi VnyOpiyEJXRpT6mS7A9v7G7SPqSYwjiuj1x5+wOE0fkzeKd2UrhpNClCKskEOlcYOP8Wph lZuNElbLoHO8wOESKf39at0HObrBcBPiomVBmas3CfI1UJnXMRi+AIhinsHblqdBuu/GmT VwdpkKrXcmhPr3xitloVKlpxlVAVURPDx9PwLAQQFd6tIBeloi6MP07K0N53qRGE8CZ/AU bBvWRCn0/QGs4M/ouxpozHvTJz1dyhFWgkRC/h+8rSnlylv92EFWaV1YMfpA/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765586658; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uDXLc0NUQW8rbbSRv2ZqzC+SmLLautS23MmPhLeS/b0=; b=gGh96/ahRvoEQCSIhy5ZituBgQV9j/nBlRP5aTqurlvj59TjEAZGMIadCP+3pKFJHRoDog QB+FeL3uHLq0qpFxpIN9+4m/Y9q3x63NMNvs+VGOlDlEsw+/HDJ9cAxJlTk12tecHgKbxn 7VAvNB6fgjqdWGPxyk7Mwl16D7WZiD2Z2H804tnFI+/suLbq9B1XxJD4c6c7///Vige64S H8cE81epPwjbualu6G1wQh976vXx8cRFEcVpGJkPGAA+OnFi/qO/K68beAEs8bEXUcVAWY qtIM0rIhsBgyHBovQUQU6rkI9gN8BRM0ungsvwO2n6Qok2J8CjaBboVpI3So7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765586658; a=rsa-sha256; cv=none; b=HMjqL0P0DdMHM3/RdSRfp77gECt+EUg9VHCyh2NdNhLBmv5unaFo+sQC2R+6SYNCwfxSrO gs8P/ai+SUORGrHcm4/ctZygSjnrgygQvNIKSgyfjrzH5oLT2ia2xkSUY+Yi6z24t2NuKU dhu7IyfGaVenE1RFBs0gSOCQUudKpjwNdNP3Qi4xVnxC9wkT8CMsVUdPn2UaTowTl73mR0 67LgFROWxRTKHVauyPGEgSB5SyrGimEVGgsnSeFwQnCz6NpFANdxaenXqrGzu0atZR9b3p rG4nnrNonAxD7NvDIif7gw1GNmwjJWo1Pfj6RPdaZiXNHBrbpJM9myV3iUd2QA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dSndZ4TVKzh7m for ; Sat, 13 Dec 2025 00:44:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23afb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 13 Dec 2025 00:44:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: c42bce238abd - main - bpf: convert several boolean natured fields of bpf_d to flags List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: c42bce238abd9dc36113457372e62bf14690af52 Auto-Submitted: auto-generated Date: Sat, 13 Dec 2025 00:44:18 +0000 Message-Id: <693cb6e2.23afb.22846ed9@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=c42bce238abd9dc36113457372e62bf14690af52 commit c42bce238abd9dc36113457372e62bf14690af52 Author: Gleb Smirnoff AuthorDate: 2025-12-13 00:43:45 +0000 Commit: Gleb Smirnoff CommitDate: 2025-12-13 00:43:45 +0000 bpf: convert several boolean natured fields of bpf_d to flags This shrinks the structure a bit. Should be no functional change. Differential Revision: https://reviews.freebsd.org/D53870 --- sys/net/bpf.c | 69 ++++++++++++++++++++++++++++--------------------------- sys/net/bpfdesc.h | 14 +++++------ 2 files changed, 42 insertions(+), 41 deletions(-) diff --git a/sys/net/bpf.c b/sys/net/bpf.c index b043773bc876..855242728e16 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -669,7 +669,7 @@ bpf_movein(struct uio *uio, int linktype, struct ifnet *ifp, struct mbuf **mp, else m->m_flags |= M_MCAST; } - if (d->bd_hdrcmplt == 0) { + if (!(d->bd_flags & BPFD_HDRCMPLT)) { memcpy(eh->ether_shost, IF_LLADDR(ifp), sizeof(eh->ether_shost)); } @@ -952,7 +952,6 @@ bpfopen(struct cdev *dev, int flags, int fmt, struct thread *td) bpf_buffer_init(d); if ((flags & FREAD) == 0) d->bd_writer = 2; - d->bd_hbuf_in_use = 0; d->bd_bufmode = BPF_BUFMODE_BUFFER; d->bd_sig = SIGIO; d->bd_direction = BPF_D_INOUT; @@ -1006,9 +1005,9 @@ bpfread(struct cdev *dev, struct uio *uio, int ioflag) callout_stop(&d->bd_callout); timed_out = (d->bd_state == BPF_TIMED_OUT); d->bd_state = BPF_IDLE; - while (d->bd_hbuf_in_use) { - error = mtx_sleep(&d->bd_hbuf_in_use, &d->bd_lock, - PRINET | PCATCH, "bd_hbuf", 0); + while (d->bd_flags & BPFD_HBUF_INUSE) { + error = mtx_sleep(&d->bd_hbuf, &d->bd_lock, PRINET | PCATCH, + "bd_hbuf", 0); if (error != 0) { BPFD_UNLOCK(d); return (error); @@ -1025,7 +1024,8 @@ bpfread(struct cdev *dev, struct uio *uio, int ioflag) * A packet(s) either arrived since the previous * read or arrived while we were asleep. */ - if (d->bd_immediate || non_block || timed_out) { + if ((d->bd_flags & BPFD_IMMEDIATE) || non_block || + timed_out) { /* * Rotate the buffers and return what's here * if we are in immediate mode, non-blocking @@ -1082,7 +1082,7 @@ bpfread(struct cdev *dev, struct uio *uio, int ioflag) /* * At this point, we know we have something in the hold slot. */ - d->bd_hbuf_in_use = 1; + d->bd_flags |= BPFD_HBUF_INUSE; BPFD_UNLOCK(d); /* @@ -1096,14 +1096,14 @@ bpfread(struct cdev *dev, struct uio *uio, int ioflag) error = bpf_uiomove(d, d->bd_hbuf, d->bd_hlen, uio); BPFD_LOCK(d); - if (d->bd_hbuf_in_use) { + if (d->bd_flags & BPFD_HBUF_INUSE) { KASSERT(d->bd_hbuf != NULL, ("bpfread: lost bd_hbuf")); d->bd_fbuf = d->bd_hbuf; d->bd_hbuf = NULL; d->bd_hlen = 0; bpf_buf_reclaimed(d); - d->bd_hbuf_in_use = 0; - wakeup(&d->bd_hbuf_in_use); + d->bd_flags &= ~BPFD_HBUF_INUSE; + wakeup(&d->bd_hbuf); } BPFD_UNLOCK(d); @@ -1123,7 +1123,7 @@ bpf_wakeup(struct bpf_d *d) d->bd_state = BPF_IDLE; } wakeup(d); - if (d->bd_async && d->bd_sig && d->bd_sigio) + if ((d->bd_flags & BPFD_ASYNC) && d->bd_sig && d->bd_sigio) pgsigio(&d->bd_sigio, d->bd_sig, 0); selwakeuppri(&d->bd_sel, PRINET); @@ -1155,7 +1155,7 @@ bpf_ready(struct bpf_d *d) if (!bpf_canfreebuf(d) && d->bd_hlen != 0) return (1); - if ((d->bd_immediate || d->bd_state == BPF_TIMED_OUT) && + if (((d->bd_flags & BPFD_IMMEDIATE) || d->bd_state == BPF_TIMED_OUT) && d->bd_slen != 0) return (1); return (0); @@ -1230,10 +1230,10 @@ bpfwrite(struct cdev *dev, struct uio *uio, int ioflag) return (ENXIO); } counter_u64_add(d->bd_wfcount, 1); - if (d->bd_hdrcmplt) + if (d->bd_flags & BPFD_HDRCMPLT) dst.sa_family = pseudo_AF_HDRCMPLT; - if (d->bd_feedback) { + if (d->bd_flags & BPFD_FEEDBACK) { mc = m_dup(m, M_NOWAIT); if (mc != NULL) mc->m_pkthdr.rcvif = ifp; @@ -1302,9 +1302,8 @@ reset_d(struct bpf_d *d) BPFD_LOCK_ASSERT(d); - while (d->bd_hbuf_in_use) - mtx_sleep(&d->bd_hbuf_in_use, &d->bd_lock, PRINET, - "bd_hbuf", 0); + while (d->bd_flags & BPFD_HBUF_INUSE) + mtx_sleep(&d->bd_hbuf, &d->bd_lock, PRINET, "bd_hbuf", 0); if ((d->bd_hbuf != NULL) && (d->bd_bufmode != BPF_BUFMODE_ZBUF || bpf_canfreebuf(d))) { /* Free the hold buffer. */ @@ -1377,7 +1376,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, d->bd_state = BPF_IDLE; BPFD_UNLOCK(d); - if (d->bd_locked == 1) { + if (d->bd_flags & BPFD_LOCKED) { switch (cmd) { case BIOCGBLEN: case BIOCFLUSH: @@ -1446,8 +1445,8 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, BPFD_LOCK(d); n = d->bd_slen; - while (d->bd_hbuf_in_use) - mtx_sleep(&d->bd_hbuf_in_use, &d->bd_lock, + while (d->bd_flags & BPFD_HBUF_INUSE) + mtx_sleep(&d->bd_hbuf, &d->bd_lock, PRINET, "bd_hbuf", 0); if (d->bd_hbuf) n += d->bd_hlen; @@ -1697,7 +1696,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, */ case BIOCIMMEDIATE: BPFD_LOCK(d); - d->bd_immediate = *(u_int *)addr; + d->bd_flags |= *(u_int *)addr ? BPFD_IMMEDIATE : 0; BPFD_UNLOCK(d); break; @@ -1715,7 +1714,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, */ case BIOCGHDRCMPLT: BPFD_LOCK(d); - *(u_int *)addr = d->bd_hdrcmplt; + *(u_int *)addr = d->bd_flags & BPFD_HDRCMPLT ? 1 : 0; BPFD_UNLOCK(d); break; @@ -1724,7 +1723,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, */ case BIOCSHDRCMPLT: BPFD_LOCK(d); - d->bd_hdrcmplt = *(u_int *)addr ? 1 : 0; + d->bd_flags |= *(u_int *)addr ? BPFD_HDRCMPLT : 0; BPFD_UNLOCK(d); break; @@ -1785,13 +1784,13 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, case BIOCFEEDBACK: BPFD_LOCK(d); - d->bd_feedback = *(u_int *)addr; + d->bd_flags |= *(u_int *)addr ? BPFD_FEEDBACK : 0; BPFD_UNLOCK(d); break; case BIOCLOCK: BPFD_LOCK(d); - d->bd_locked = 1; + d->bd_flags |= BPFD_LOCKED; BPFD_UNLOCK(d); break; @@ -1800,7 +1799,7 @@ bpfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, case FIOASYNC: /* Send signal on receive packets */ BPFD_LOCK(d); - d->bd_async = *(int *)addr; + d->bd_flags |= *(u_int *)addr ? BPFD_ASYNC : 0; BPFD_UNLOCK(d); break; @@ -2208,7 +2207,7 @@ filt_bpfread(struct knote *kn, long hint) /* * Ignore the hold buffer if it is being copied to user space. */ - if (!d->bd_hbuf_in_use && d->bd_hbuf) + if (!(d->bd_flags & BPFD_HBUF_INUSE) && d->bd_hbuf) kn->kn_data += d->bd_hlen; } else if (d->bd_rtout > 0 && d->bd_state == BPF_IDLE) { callout_reset(&d->bd_callout, d->bd_rtout, @@ -2627,12 +2626,14 @@ catchpacket(struct bpf_d *d, u_char *pkt, u_int pktlen, u_int snaplen, counter_u64_add(d->bd_dcount, 1); return; } - KASSERT(!d->bd_hbuf_in_use, ("hold buffer is in use")); + KASSERT(!(d->bd_flags & BPFD_HBUF_INUSE), + ("hold buffer is in use")); ROTATE_BUFFERS(d); do_wakeup = 1; curlen = 0; } else { - if (d->bd_immediate || d->bd_state == BPF_TIMED_OUT) { + if ((d->bd_flags & BPFD_IMMEDIATE) || + d->bd_state == BPF_TIMED_OUT) { /* * Immediate mode is set, or the read timeout has * already expired during a select call. A packet @@ -3009,12 +3010,12 @@ bpfstats_fill_xbpf(struct xbpf_d *d, struct bpf_d *bd) BPF_LOCK_ASSERT(); bzero(d, sizeof(*d)); d->bd_structsize = sizeof(*d); - d->bd_immediate = bd->bd_immediate; + d->bd_immediate = bd->bd_flags & BPFD_IMMEDIATE ? 1 : 0; d->bd_promisc = bd->bd_promisc; - d->bd_hdrcmplt = bd->bd_hdrcmplt; + d->bd_hdrcmplt = bd->bd_flags & BPFD_HDRCMPLT ? 1 : 0; d->bd_direction = bd->bd_direction; - d->bd_feedback = bd->bd_feedback; - d->bd_async = bd->bd_async; + d->bd_feedback = bd->bd_flags & BPFD_FEEDBACK ? 1 : 0; + d->bd_async = bd->bd_flags & BPFD_ASYNC ? 1 : 0; d->bd_rcount = counter_u64_fetch(bd->bd_rcount); d->bd_dcount = counter_u64_fetch(bd->bd_dcount); d->bd_fcount = counter_u64_fetch(bd->bd_fcount); @@ -3025,7 +3026,7 @@ bpfstats_fill_xbpf(struct xbpf_d *d, struct bpf_d *bd) d->bd_pid = bd->bd_pid; strlcpy(d->bd_ifname, bd->bd_bif->bif_ifp->if_xname, IFNAMSIZ); - d->bd_locked = bd->bd_locked; + d->bd_locked = bd->bd_flags & BPFD_LOCKED ? 1 : 0; d->bd_wcount = counter_u64_fetch(bd->bd_wcount); d->bd_wdcount = counter_u64_fetch(bd->bd_wdcount); d->bd_wfcount = counter_u64_fetch(bd->bd_wfcount); diff --git a/sys/net/bpfdesc.h b/sys/net/bpfdesc.h index a7e94aa9e8d2..5638cd78a10c 100644 --- a/sys/net/bpfdesc.h +++ b/sys/net/bpfdesc.h @@ -63,11 +63,16 @@ struct bpf_d { caddr_t bd_sbuf; /* store slot */ caddr_t bd_hbuf; /* hold slot */ caddr_t bd_fbuf; /* free slot */ - int bd_hbuf_in_use; /* don't rotate buffers */ int bd_slen; /* current length of store buffer */ int bd_hlen; /* current length of hold buffer */ - int bd_bufsize; /* absolute length of buffers */ + int bd_flags; +#define BPFD_HBUF_INUSE 0x00000001 /* don't rotate buffers */ +#define BPFD_IMMEDIATE 0x00000002 /* return on packet arrival */ +#define BPFD_HDRCMPLT 0x00000004 /* header already filled in */ +#define BPFD_FEEDBACK 0x00000008 /* feed back sent packets */ +#define BPFD_ASYNC 0x00000010 /* packet reception generates signal */ +#define BPFD_LOCKED 0x00000020 /* descriptor is locked */ struct bpf_if * bd_bif; /* interface descriptor */ u_long bd_rtout; /* Read timeout in 'ticks' */ @@ -79,13 +84,9 @@ struct bpf_d { u_char bd_promisc; /* true if listening promiscuously */ u_char bd_state; /* idle, waiting, or timed out */ - u_char bd_immediate; /* true to return on packet arrival */ u_char bd_writer; /* non-zero if d is writer-only */ - int bd_hdrcmplt; /* false to fill in src lladdr automatically */ int bd_direction; /* select packet direction */ int bd_tstamp; /* select time stamping function */ - int bd_feedback; /* true to feed back sent packets */ - int bd_async; /* non-zero if packet reception should generate signal */ int bd_sig; /* signal to send upon packet reception */ int bd_pcp; /* VLAN pcp tag */ struct sigio * bd_sigio; /* information for async I/O */ @@ -95,7 +96,6 @@ struct bpf_d { struct label *bd_label; /* MAC label for descriptor */ counter_u64_t bd_fcount; /* number of packets which matched filter */ pid_t bd_pid; /* PID which created descriptor */ - int bd_locked; /* true if descriptor is locked */ u_int bd_bufmode; /* Current buffer mode. */ counter_u64_t bd_wcount; /* number of packets written */ counter_u64_t bd_wfcount; /* number of packets that matched write filter */ From nobody Sat Dec 13 09:15:45 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dT0zj3clwz6K3hX for ; Sat, 13 Dec 2025 09:15:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dT0zj2lVdz3XlF for ; Sat, 13 Dec 2025 09:15:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765617345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JtcJN5xn/8bc57crvi8fEjvj5DHwEVuz/WOesYcEkZE=; b=r+5LqxN2FynX6NKLtWkO9MSwM6nUKP6Ti6Arsa5LqpDgk/KUnx0ZS18DpIPw793RPciPfF wqPJBO8edpLPDpW45n5k7Q8n57Our1I/MnahQdIjpHC1TiQZj9TPgUM081tDH1m8pkQN+n gxbF47mgr9VtNuPztfgSbCmqEqqyWWLYayv0CX3u4VBmK0iWJSa5cSHlDVZtbIejGmKYMJ vpvaLMSZ9mx0BzPYA1n7NJQoRZZVOv1jWtn21P6clhUyjxxBOPLvGywhb5+CHf2hncFaVl 3EAL3sL1My2ByPFZSU3DqPEPOnJd/+39SC4uTykznBwi1fpN2TyMdf/ooW8tDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765617345; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JtcJN5xn/8bc57crvi8fEjvj5DHwEVuz/WOesYcEkZE=; b=yokjSI8shupMpp3DbxKERuFzNuwWkv5GFw216bZFW7jR68H/ObbiWm7zhfF8r0mOGaar/0 YydZPz0vBBhgvzfTq4kMBcu9HcN0a/O5b/492j05jAigxwE7pRGv3VbvAOP6++lxm74tg9 kcIocRGF1EhLWjSaiLSrypjPIFZGBlCJLIILGSFFiBYMlAVGHZxo+IeriK8VX947QPbDkB 6WjzzeYZD0OTfmJmXefHlcunpLfxqJFoF6ySSYda7WguFyN3CqyhEXMLnWf4laRNAkyQn9 GAnpbHZ90hF9bab0oDtt+Un4AF3zioV3eIEu4iXw2G4KB5hOEHOO2hh+lSX/3Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765617345; a=rsa-sha256; cv=none; b=BvQr92EsQ/rpGICOssYo4t+q5HGqhdpxjQCCtDUtkL74cMHxOkIbKxYAy2TOQ4BHOTotE8 ImRRR8/QrCisg0u9wj0qMRYRkhbRhevCBuOg7rN4JFc2NVTD5cBWjwyp3eQCjTfcuGXaHk HSb7CuO11EB4tBGJJRgMPPV7EcKEdRkH6hgA0nxtJKgQ2H8njGjxv905bJIUrCna9RFpOw VxlUEGAllOXRwYELasjF5vjZETjuG3PZ7w0V5SzB0pGrDk21WF8doffNlxtZHDXIk/f/RI Fvp5dk3fhg/Oliijmo/bMNs/mLotAStBGBbNVvj+PoXcjeakBjSBDgukgl+ZJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dT0zj24MLzxBT for ; Sat, 13 Dec 2025 09:15:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 307f9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 13 Dec 2025 09:15:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roman Bogorodskiy Subject: git: 611bbb190ff5 - main - bhyve: change suspend exit code List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: novel X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 611bbb190ff593e0e424e311575d7e978e623659 Auto-Submitted: auto-generated Date: Sat, 13 Dec 2025 09:15:45 +0000 Message-Id: <693d2ec1.307f9.15123720@gitrepo.freebsd.org> The branch main has been updated by novel: URL: https://cgit.FreeBSD.org/src/commit/?id=611bbb190ff593e0e424e311575d7e978e623659 commit 611bbb190ff593e0e424e311575d7e978e623659 Author: Roman Bogorodskiy AuthorDate: 2025-12-05 17:16:29 +0000 Commit: Roman Bogorodskiy CommitDate: 2025-12-13 09:12:38 +0000 bhyve: change suspend exit code Currently, after suspending, bhyve(8) exits with 0. This code is also used to indicate that a VM was rebooted. To differentiate reboot and suspend, use the next available exit code, 5, for suspend. Approved by: markj Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D54087 --- usr.sbin/bhyve/bhyve.8 | 4 +++- usr.sbin/bhyve/snapshot.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 45450b5b5db5..0893b0b719bc 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 28, 2025 +.Dd December 4, 2025 .Dt BHYVE 8 .Os .Sh NAME @@ -1158,6 +1158,8 @@ halted triple fault (amd64 only) .It 4 exited due to an error +.It 5 +suspended .El .Sh EXAMPLES If not using a boot ROM, the guest operating system must have been loaded with diff --git a/usr.sbin/bhyve/snapshot.c b/usr.sbin/bhyve/snapshot.c index 997faa254284..eabe6ab47f80 100644 --- a/usr.sbin/bhyve/snapshot.c +++ b/usr.sbin/bhyve/snapshot.c @@ -1308,7 +1308,7 @@ vm_checkpoint(struct vmctx *ctx, int fddir, const char *checkpoint_file, if (stop_vm) { vm_destroy(ctx); - exit(0); + exit(5); } done: From nobody Sat Dec 13 09:30:00 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dT1J902Lyz6K4h1 for ; Sat, 13 Dec 2025 09: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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dT1J86LqYz3bXL for ; Sat, 13 Dec 2025 09: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=1765618200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VBF+Jua6Bk5+kl3f2M/dIuMRfQV5Kv75X/pH4BzWeMQ=; b=b19x1cW8x5vnzJt0hKEDF3UcxqQd6r8r2xvYx/XO+vRt1gTYvwP0jWT5125yHWIaiZECDM yUIZyEEhxLEau7ab+Ih2Mo6DFhP2Jrwc6jzGi3xY5XQ2VUpviX8NNTTITn9U9CbapT2PCr uE1atzdlcqj9C9pVc0DSU026gUh/hfXN7/LsLyxByqjBk9zfdbRgqfkx4ZENcO4VX9mzeg RPhZNo/XZUIPyCbrITK7G8n3A3UdAEMs8s/UfbQon6F7ydhEdOf80m+8MJZH2zZQuFrTeq bRFzX9ZDL3K5sg2tCCVAbMGUy7Lcti1v80WCSFeirijBmcolT7B27MU1AnY3qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765618200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VBF+Jua6Bk5+kl3f2M/dIuMRfQV5Kv75X/pH4BzWeMQ=; b=YYs1pWARjvRMP9z/eB3J8TET03IdgAAD+isdKztJn/kzTs5mLWBmTeiL9DF509/FN4g7yT WA9OXQqh/CBBdpYnNd83hF0bR0F5rGmIdvHqwjEEEZJ0uGvonSPLAiOtoHSqviFV+9YY0v LSl2lgY1BDLTQwNn0TpSPCe9SyLq88gRro34VnTGkvpF/s3gfARSDKFj23EtyV69TUKFwJ 49lYkejUwhgv3BuIg0OAJ9SF/KPV1spWEHuqXVIJ/N3sdxmugqE3Px44Wo33iZ+/n3Pw0c BBwxDSaa26fsEpSI8H+VJGADSU7wciYe+TKBAVWBeaMew5rZdryA84BUShP9ww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765618200; a=rsa-sha256; cv=none; b=nBPHEoj1HYlG3P3uK5pzcvSq99pg6LUuNd9tXYvI1snOVkMhCVti4fxXaPi504Ts1NaWuJ rr3nOXkb9YQ6FAejg417ZN0qeLRcT9uvW+i5t3INFauJRGRcPz7AuPmosFSAdgr5Eom0Vq +rcohAD8BHiH0E2KNuNvmwq5Y2ElDjMaWUkvlh2/wI06yLdacVdz4Ce6uJxqaeb35hp2jW jEhhevyz2zf9N/T7o/XQ6153QkloR+B3P404MWdKWu4/B0FCSSsmF47c0mi24iAfAZbbM+ SgS8wTrhkn0idr2UWEMIC3Gh5RwQsa39WaDxhuqkltTjvPpY1NQgqFxGiwwUJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dT1J85vHYzxZ7 for ; Sat, 13 Dec 2025 09:30:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 315da by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 13 Dec 2025 09:30:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roman Bogorodskiy Subject: git: 148111d3775e - main - bhyvectl: improve options error handling List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: novel X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 148111d3775eb159d71a36e3a8b4c5c1bf53392c Auto-Submitted: auto-generated Date: Sat, 13 Dec 2025 09:30:00 +0000 Message-Id: <693d3218.315da.421f44e1@gitrepo.freebsd.org> The branch main has been updated by novel: URL: https://cgit.FreeBSD.org/src/commit/?id=148111d3775eb159d71a36e3a8b4c5c1bf53392c commit 148111d3775eb159d71a36e3a8b4c5c1bf53392c Author: Roman Bogorodskiy AuthorDate: 2025-12-05 18:45:03 +0000 Commit: Roman Bogorodskiy CommitDate: 2025-12-13 09:27:00 +0000 bhyvectl: improve options error handling Currently, it is possible to execute bhyvectl(8) with mutually exclusive options, such as "--destroy" and "--suspend", and it will print out obscure errors, e.g.: bhyvectl --suspend=/var/run/vms/my_vm --destroy --vm my_vm connect() failed: Connection refused Address that by failing early if mutually exclusive options were specified. Additionally, move the BHYVE_SNAPSHOT block before the errors are printed, so its errors are also displayed. Approved by: markj Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D54092 --- usr.sbin/bhyvectl/bhyvectl.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/usr.sbin/bhyvectl/bhyvectl.c b/usr.sbin/bhyvectl/bhyvectl.c index 41055678ac30..9e845ac6b531 100644 --- a/usr.sbin/bhyvectl/bhyvectl.c +++ b/usr.sbin/bhyvectl/bhyvectl.c @@ -326,7 +326,7 @@ int main(int argc, char *argv[]) { char *vmname; - int error, ch, vcpuid; + int action_opts, error, ch, vcpuid; struct vm_run vmrun; struct vmctx *ctx; struct vcpu *vcpu; @@ -338,6 +338,7 @@ main(int argc, char *argv[]) opts = setup_options(); + action_opts = 0; vcpuid = 0; vmname = NULL; progname = basename(argv[0]); @@ -388,6 +389,14 @@ main(int argc, char *argv[]) if (vmname == NULL) usage(opts); + action_opts = create + destroy + force_reset + force_poweroff; + if (checkpoint_file) + action_opts++; + + if (action_opts > 1) { + fprintf(stderr, "mutually exclusive actions specified\n"); + exit(1); + } ctx = vm_openf(vmname, create ? VMMAPI_OPEN_CREATE : 0); if (ctx == NULL) { @@ -508,17 +517,17 @@ main(int argc, char *argv[]) if (!error && force_poweroff) error = vm_suspend(ctx, VM_SUSPEND_POWEROFF); +#ifdef BHYVE_SNAPSHOT + if (!error && checkpoint_file) + error = snapshot_request(vmname, checkpoint_file, vm_suspend_opt); +#endif + if (error) printf("errno = %d\n", errno); if (!error && destroy) vm_destroy(ctx); -#ifdef BHYVE_SNAPSHOT - if (!error && checkpoint_file) - error = snapshot_request(vmname, checkpoint_file, vm_suspend_opt); -#endif - free(opts); exit(error); } From nobody Sat Dec 13 09:53:35 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dT1qM5T9Kz6K5tN for ; Sat, 13 Dec 2025 09:53:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dT1qM4mNLz3dMX for ; Sat, 13 Dec 2025 09:53:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765619615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S5JYLiJbnB4FeivC+ggFh0bno+A0WalkwFfjSiwKHcA=; b=XAcMpFA+AyujjkkEwWQX2e+v97af3XinlEIrkXEBd/OvEELxcqKxM+seIsksPy80nfpVw5 sIzZM4Vwpof35JSCD0AqGrMLVgzqJ7IIywjeV5XcIjeOp19KGUjJcFKEDMrZ+ijHpCDSK1 Y2Yx2Qm6Khx9HZsirsXveQqXS+TmsEqrCbGkR46Lacbc7jEMAA7sL/r1Kh8Vr429p5OCGN GGbVG2+g76SK2XumHmvhxAlwInIlGyrwgnsYSVSQ6mfZ29K2dylFbJP4VKJ/6wwaXGe86v gpoQF9a9PEQf7Ebpw7g4o2ropkjOTwd6SPBWdvr5chYPybJWZSdIHOHzT83vwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765619615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S5JYLiJbnB4FeivC+ggFh0bno+A0WalkwFfjSiwKHcA=; b=hg8vihAcTYgasszlFApzn3H2dJZuqQ4wb63d6BfaWfJCUpVaHXxMEGaufQJ7HO96bd+S+O 8AmIw64UGNJUuqiWIb00oW/xGLyf0XNwWXwvKNpJ3KIhdKiTUX+PXY3QRSq2EVP/1Q6ddD Qqen6oxnXWHXEQMt6DE133UXFu5LDTOulTtvakgAkao0aHuQoFpO2gOw2FpltMA0IXOWs1 r3zDc48io0vuyqYsKRFkLVfGlg3WKLxFEJp0Ot9Cnr86MhK6xYXwkmsWU07aoZQEmEezQp mWUriamOWFsSuqT5O1bbm0Py5fdQ3AS38DbHpwDKk4Pj/UPi19g9wXPTNjYiAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765619615; a=rsa-sha256; cv=none; b=Md+d1nvR1TojeWjYZIr/Ky7WmFsGlnKqmKM+KPNUVWj0n63qQDUKYAQPnqdNCYX+LW2qk+ MZ+dnk/b2Z6iBdxfGOagh7krE+mVETnhdM48jeDMKfTHYwDQoV/ATrA+SMNIWYcbgDp0yd qjnSNAfZCzZhg/1RCs7VDw6AN6wFWeV5n/Wf5AFeR4j8wgWtCJ9o3/ZUiK0R5N4QuqieYd tfXM6SeA5bxo5q6GLg/5RFRsDWHoSb2KLjLtFl94AXEZkpA2sgLli7RI7wcCXak/IlaHgH 2WpW6LGpMZJLOuhLnz6QrXpBy+8VuJrvgGoLYGFqBa5Tz47ZopMXmMqX7BSIuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dT1qM4M5Szym6 for ; Sat, 13 Dec 2025 09:53:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35738 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 13 Dec 2025 09:53:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: bcc735cb710f - main - mps(4): Fix a typo in a device message List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bcc735cb710fb74d1fb5f7be3d37701343c58ccd Auto-Submitted: auto-generated Date: Sat, 13 Dec 2025 09:53:35 +0000 Message-Id: <693d379f.35738.3f5f4123@gitrepo.freebsd.org> The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=bcc735cb710fb74d1fb5f7be3d37701343c58ccd commit bcc735cb710fb74d1fb5f7be3d37701343c58ccd Author: Gordon Bergling AuthorDate: 2025-12-13 09:43:49 +0000 Commit: Gordon Bergling CommitDate: 2025-12-13 09:53:21 +0000 mps(4): Fix a typo in a device message - s/reseting/resetting/ MFC after: 5 days --- sys/dev/mps/mps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/mps/mps.c b/sys/dev/mps/mps.c index 9dfa0471ac0a..357eacf28925 100644 --- a/sys/dev/mps/mps.c +++ b/sys/dev/mps/mps.c @@ -518,7 +518,7 @@ mps_iocfacts_allocate(struct mps_softc *sc, uint8_t attaching) */ if (attaching && ((sc->facts->IOCCapabilities & MPI2_IOCFACTS_CAPABILITY_EVENT_REPLAY) == 0)) { - mps_dprint(sc, MPS_INIT, "No event replay, reseting\n"); + mps_dprint(sc, MPS_INIT, "No event replay, resetting\n"); mps_diag_reset(sc, NO_SLEEP); if ((error = mps_transition_ready(sc)) != 0) { mps_dprint(sc, MPS_INIT|MPS_FAULT, "Failed to " From nobody Sat Dec 13 09:54:14 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dT1r646k0z6K631 for ; Sat, 13 Dec 2025 09:54:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dT1r62z1Wz3dxr for ; Sat, 13 Dec 2025 09:54:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765619654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tp61jPab+I51VCpaZPw7j3wMmOpBjP9yvh4D8IdiYeo=; b=vD+A2cZZJA+SAKvep5xzeMpKA/AV/Bd0eMfg6gumr00fQwTheNrR/yZkWUX/YEfWfT1COy xv+esw6tTUXUrOSwFz80sj27MEoS8bQ/+IKVWeB6nXOc3OUCD18I4n1Ek2RhllXCVdSs+t xccHXPEA+BK0x+WkJjn8q6Tl+9InkXXcCWw9YAMl+z1AwaV5/ipJOsIK9lyJ/Ag6+g5xcz FEC8II5442Lr8oQ1pmsD1oA5ZBdvuOc6yU4vYFtz1wKvf6r1jOv6oL7TqlwaGTlYyQZWPD BPMhUfJD0xK1AmSZTb8CuuBiC9rQi5AytZ57IYHHYlIvUAmz0/MXy9XuFR9HMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765619654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tp61jPab+I51VCpaZPw7j3wMmOpBjP9yvh4D8IdiYeo=; b=fIObzmgP6Msf1XMiSu7X2hB9+3IEC6YsYJvsuItULRDU1MCN4Tdw82NI438D9e9iLFrvC5 3bbTot+XwhOf+ppaP9rc7A65Z/xTfNnawK8b0UGeezxVlxeU0MhNQQOVPWyBUFHcylLeNl AZNsgBKCYk5Cc/wkNSqJioVeBg8+b4G5HLDaS/mzpVOKgWq2DCPXN2W5IyLHHJdjVEka7S /PGVlknEhIX5rkFsnYDI7pvK8Km+9vlUy8AUZq6pVweQKKl0W59znFTJ5GN4pC8jGM56c+ wZr4SC1qubfb3CYkECOnQ4IeyRsU8Q47ij7pKbRDRyr7lroAVSj7bpfzBNNHhw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765619654; a=rsa-sha256; cv=none; b=n4oQq5/1a15b6tggtkFJwIqoRoXDqKLw26R+gTN8G8l+CCcyjMpqbJGz0w4eeQVlNHG5XI WviWhRA1K/aSQAq83gyK7vz1NSzJr3R/7txy16MkWcVXR2Fni12lMKF7sjgS/fQRWJjsbi aX0wH7elux4GYj29ttqIav218Pr7n1RDh3NokO/b4bWxhbBhY5Lbh19n1yGDP7JzPjCgH/ n8obiQcsbW9Dc4Xre6vlkwOSEkrE5sNHCw9yl8Ye3lWN7dEiyGwOpJiLLLTNdsl8YgSZL0 fWmeWC7pEl5p1wyXCoBYRJ//axnco2ULdyAXcAX3jIMLxx2syWnJj2HgkdbM3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dT1r62MRVzyd8 for ; Sat, 13 Dec 2025 09:54:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 352aa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 13 Dec 2025 09:54:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 3b6f9481a856 - main - mmc(4): Fix a typo in a device debug message List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3b6f9481a85600cf1f23a819c3afee30fcd4122f Auto-Submitted: auto-generated Date: Sat, 13 Dec 2025 09:54:14 +0000 Message-Id: <693d37c6.352aa.4569550f@gitrepo.freebsd.org> The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=3b6f9481a85600cf1f23a819c3afee30fcd4122f commit 3b6f9481a85600cf1f23a819c3afee30fcd4122f Author: Gordon Bergling AuthorDate: 2025-12-13 09:47:40 +0000 Commit: Gordon Bergling CommitDate: 2025-12-13 09:54:04 +0000 mmc(4): Fix a typo in a device debug message - s/reseting/resetting/ MFC after: 5 days --- sys/cam/mmc/mmc_xpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cam/mmc/mmc_xpt.c b/sys/cam/mmc/mmc_xpt.c index f5f66f5214a8..5c26ee30d36a 100644 --- a/sys/cam/mmc/mmc_xpt.c +++ b/sys/cam/mmc/mmc_xpt.c @@ -632,7 +632,7 @@ mmcprobe_start(struct cam_periph *periph, union ccb *start_ccb) if (host_caps & MMC_CAP_SIGNALING_180) softc->flags |= PROBE_FLAG_HOST_CAN_DO_18V; uint32_t hv = mmc_highest_voltage(softc->host_ocr); - CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_PROBE, ("reseting the bus\n")); + CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_PROBE, ("resetting the bus\n")); init_standard_ccb(start_ccb, XPT_MMC_SET_TRAN_SETTINGS); cts->ios.vdd = hv; cts->ios.bus_mode = opendrain; From nobody Sat Dec 13 09:54:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dT1r76zPTz6K5rs for ; Sat, 13 Dec 2025 09:54:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dT1r73Xs3z3drw for ; Sat, 13 Dec 2025 09:54:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765619655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xptdbD/ZI5Su0WGHaj5JiPcNFJsD0UIYja7RRrJwd5A=; b=FL1pqUeoHEZBNITFe7ByzEZgmf9sZznIUM303A9ECXOKgeRZGlmgA5i987RXVOdkjrHz/n ytNq9c1r6DGtATJrruwizgI3FXrLNUyOet9H4DZPJRp4azC9luLKdvcgP0iJCqMivIjObI YEXMtYWCwmXMbySIhLW/NyWk06imjjR9eykoJed6usF5bie0JZN4yJQJVyoLmyTcbXevF3 Kt6GtomgiBqICY7cuXRdm11BjivgPkMK1tR3x8oX67OQI1d/9ZkidfduOfZyZRKplAZchw w+UjrcJTY3pIfo7mPsseiks2CsPlQK2dp7oI/hjmm8lcnJkuGywcTXDfoXOG7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765619655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xptdbD/ZI5Su0WGHaj5JiPcNFJsD0UIYja7RRrJwd5A=; b=jmdviRO2CxkmFPdZJ06QI/A9OSB0GdeWRyE3DtItBafgA+F+JRy/chvF0MsQarDt1Br/tK aJ6HAmHxyxnwSoVvqqKDp5nd3r/aGBOaxVmj1pUT3EP4jYSF5R0d6NM/5z4d3Pbq85n5x/ Wjy/WAsdnr0AWTyxZjTebS6BAJD5v45y70/d+o3A1Bg2iFFL4VOoDrmwDFxDUBZlj6HDSg 3jL33dk5XsUKLWsbngkD3qwe5iEODbfzkQVS1uuGNfuNrAIPj6hOuTh/1g3HOFRt4M1Ho2 r4ef9v4R8Wj612PAsBPkd+pRAI5DsjcftTGS66DyGXV5eVqc3gb+DTIRIys3dA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765619655; a=rsa-sha256; cv=none; b=SwI7tZ0mTrWHDBFt0zdvOQJ7uWK5Nb52l8Yo1hcnrAvQiA28t3H8MODHyBycs7QZBbayVU /DKjMn8dzAyVPmxYVlYQeAWS6bihmFn6HZ9dpdgS0izEQXiuCRmIgrHNst7Q7p/nvgqJU+ uB6oACXtbP0tDE8knp6ZiMxQXClOyKfeWqT7yqD6CsyTO4VnOtpdNsUa5OPxP3DcUrFnAc oLmFlTv36RSz70FqvZ8Up9aM1AEAvSfVDH8kpcgpvPLW+kDL7ZuW3nfNBWATQm9cWQCuRW w5SSpYEzOfji5edbhXDhKutXm5Mww+tdUlKUx6YinijlsDgUyVKOGFq4kAa7IQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dT1r734wszykT for ; Sat, 13 Dec 2025 09:54:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35922 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 13 Dec 2025 09:54:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: a3950d70a499 - main - oce(4): Fix a typo in a device debug message List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a3950d70a499e120c67da884865486e8599229bd Auto-Submitted: auto-generated Date: Sat, 13 Dec 2025 09:54:15 +0000 Message-Id: <693d37c7.35922.38ccacad@gitrepo.freebsd.org> The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=a3950d70a499e120c67da884865486e8599229bd commit a3950d70a499e120c67da884865486e8599229bd Author: Gordon Bergling AuthorDate: 2025-12-13 09:48:56 +0000 Commit: Gordon Bergling CommitDate: 2025-12-13 09:54:08 +0000 oce(4): Fix a typo in a device debug message - s/depricated/deprecated/ MFC after: 3 days --- sys/dev/oce/oce_mbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/oce/oce_mbox.c b/sys/dev/oce/oce_mbox.c index a51798119761..f24271ed65ae 100644 --- a/sys/dev/oce/oce_mbox.c +++ b/sys/dev/oce/oce_mbox.c @@ -1007,7 +1007,7 @@ error: * @param *stats pointer to where to store statistics * @param reset_stats resets statistics of set * @returns 0 on success, EIO on failure - * @note command depricated in Lancer + * @note command deprecated in Lancer */ #define OCE_MBOX_GET_NIC_STATS(sc, pstats_dma_mem, version) \ int \ From nobody Sat Dec 13 09:54:35 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dT1rW5LQ3z6K6LP for ; Sat, 13 Dec 2025 09:54:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dT1rW2PbVz3fRW for ; Sat, 13 Dec 2025 09:54:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765619675; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wY+/78nXkuaLe34/0FJlzPOSMl2osZ44lRd6s7PeYOw=; b=Tyxs1R/LIWU/9DQWk4jk5fsbRHujB0Kl9yLYsVYpLM0WBChu+hYaY6AHNc7Th2KwAI5Mx3 rXTcsQNucqWGn1H/MTOu8xxdb88TtelpC76x06pRUv1j3FJ308gT0ScgdMkZIA6xJDRPf4 YKKAaRwk0gIUTvwfFQWJgdpebXSpBubCqhGNh8wZX4gr3bEPc5JOZ66vi/OVaV5BMDAUQs YMEL+sULqO+s4bL1Mq7xdvxxtR808vOyb+bf+0HPUiwg3kaeYx6Opzvv4J+zFSdnw3vAlp SaHxwEpiwpT20YDX5WdArAuzKKpwRyspVqfwP398cZLsnwkWGAOVuRIWcQZujA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765619675; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wY+/78nXkuaLe34/0FJlzPOSMl2osZ44lRd6s7PeYOw=; b=nQ7ryuNAfUfhizYL/lz0VTgYqUwBTeOgU7An4CmUaWVWpnw51Sy43W0YemXHExZYALVojc nLgG+QP3gjTdFyz4tTjg5RlS1Z8NQn1Cfy2l+OZtogx/J64QDoK+Rea1sOQp+F8utnPMlX //nAUuUhTecpGvhHO1fxmpNAe5Xr/ryWziwFBdsmkLjNjBRWAfBZ2px2fS88L6yv+EWQwY BbKRX1/BI1lTPW8thioRn/Yti8Kh53II7cOcnq9aUL2CtxlRDOOyAKGeOarbAgVKkjWyIo O4sJcXv9cF50BfO/okAY7hKsJLBAcb+qEJczHUhWVbGkpnXfvub5znlkdVGkXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765619675; a=rsa-sha256; cv=none; b=HAEIsVlw4cqhTLjE8YIU/6dgY6Lpg4ItQrsSIN5QbSc/BhV8yr4Irc4Rx2lYCin8qjnHNY 8Umhe+I1r5fIMsyb7a29Vqcva7Ty5xaaTdIA6NVP/WBTh6duZRkpU2gv6OxXsT4Kpfq/KC BS4MiWhfKXPEKWCp3WX/cvvZZS7DLDV6H2yex6EGt47rzc2YAE4LtnAHa1irFq6i7n9HBp V1NhwIjKyglBoR3RH0tlnRJSNIDifCvpthegj1jrErvsohJUddgBKfyTmmpFB/PjxKV+r/ zdq2Ju2KO1E9VPXDeBz+2Q9PHwLlOGzt9Qo0XpWA9qv5/82TiJ9DNydUgYIUgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dT1rW1wDVzyXm for ; Sat, 13 Dec 2025 09:54:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3573c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 13 Dec 2025 09:54:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 1df4d82bd17e - main - altq(4): Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1df4d82bd17ebd7449a6b58c32b65a12269ca068 Auto-Submitted: auto-generated Date: Sat, 13 Dec 2025 09:54:35 +0000 Message-Id: <693d37db.3573c.35ded692@gitrepo.freebsd.org> The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=1df4d82bd17ebd7449a6b58c32b65a12269ca068 commit 1df4d82bd17ebd7449a6b58c32b65a12269ca068 Author: Gordon Bergling AuthorDate: 2025-12-13 09:50:05 +0000 Commit: Gordon Bergling CommitDate: 2025-12-13 09:54:25 +0000 altq(4): Fix a typo in a source code comment - s/backet/bucket/ MFC after: 3 days --- sys/net/altq/altq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/altq/altq.h b/sys/net/altq/altq.h index 1b21007cd457..4963d649038e 100644 --- a/sys/net/altq/altq.h +++ b/sys/net/altq/altq.h @@ -55,7 +55,7 @@ #define ALTQT_CODEL 14 /* CoDel */ #define ALTQT_MAX 15 /* should be max discipline type + 1 */ -/* simple token backet meter profile */ +/* simple token bucket meter profile */ struct tb_profile { u_int64_t rate; /* rate in bit-per-sec */ u_int32_t depth; /* depth in bytes */ From nobody Sat Dec 13 09:54:36 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dT1rY0SFrz6K6SD for ; Sat, 13 Dec 2025 09:54:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dT1rX2wYlz3fcx for ; Sat, 13 Dec 2025 09:54:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765619676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xrio2pumBAib5CWvNoouY6chfBBe6Tdrnp2DekGF8Pw=; b=Nw/EI5SnJz+lZMPaBn+/2kY648UIS2aamMUfCCz7rK2tsGJFUPcmeAZGSAJ1KPQUvFvcRb DpwxQk1K7NE8AEt8HuRGbPZwkYmXrU9m7m8bXsH5L89cFVABfrF6sYT/kBGf923QuttJY/ RiMFmO2qV1OfvoV6BgUxMLt2ETygAGj/EmicSPFqC+WWdQgOm3fnONOr1GQeSWVu4Igu83 5huHtYd/70MISFnZXgnFTpA1pEPYWfqRIBD4cbvkI6qiP9JEWOBpDSmswq4Nbicz4uV/LA i8lNlSuFQ1ewdVRUy+qoGCS32elFTAk763A3PiG7XZW4LGMGbDcLzhiipx2tlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765619676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xrio2pumBAib5CWvNoouY6chfBBe6Tdrnp2DekGF8Pw=; b=E6qIRDZ1r5w8empo43v5urlwiSzyrRC41tFpvSUBneY5P85fS+JaSW8FH5xfgpgTrbjm/S w7Kj/WQsqAMm6kd+G3vaYwa9WJox+nUpnY1iEFjGSzqaxKnJ8cxfLRFY0uH5YbfW5r4j7J nZYEFhoYMeHSqSqDsgDc1fBBV6mpTN2xSY2vCRLiwU0k2We0OI9O/24hzFEG1gD9cb3R/Y wcbAsWvm9m+HgxBjoxl9ST4z7phnhA03/3SS5d9arpEfIaVFBnQ8gvO7DwEg//KWyr1S5q jpn/jOBwTBTQhyzCtJ7oCUuQeiZnhASFDaVRYyc2RXROhp3slkp0Gs7/2OxQoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765619676; a=rsa-sha256; cv=none; b=qFyIcuLnk8wDms/27nxuuP62gWofwJzRsGwRI8U6sD7/dv6M9eVzqCbgAdsEAyrYV8wgQA mVrfts1RkaxK0HP49oEsbASKDYRQ6ZXOIEf3nPDklZLb3TOdq+bdo2wBqe8/ycT3zmzP78 WYpKK8MHsYmNRDxqL05KgCkLw6bnQcWpuIu3gYwvpFwagvhCZMZ7f97rIGFLjUff04Zzx7 NYxPOt5bYCB6e2gPm+j2mP9W7yV2HbO1WN4JzbSow3j/xbHA9FIqkKMec3sJtFa8IgLUlj Oi95LFOU7xaQ3SKdqLJEKyg3ui5LTSW8682gBtOcGEHZEcIA2zK66SC64txuUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dT1rX2Sr4zygZ for ; Sat, 13 Dec 2025 09:54:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34b2d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 13 Dec 2025 09:54:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 756712d745db - main - ng_hci(4): Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 756712d745db207085f1fe87dc8258434ec2147d Auto-Submitted: auto-generated Date: Sat, 13 Dec 2025 09:54:36 +0000 Message-Id: <693d37dc.34b2d.39709446@gitrepo.freebsd.org> The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=756712d745db207085f1fe87dc8258434ec2147d commit 756712d745db207085f1fe87dc8258434ec2147d Author: Gordon Bergling AuthorDate: 2025-12-13 09:51:45 +0000 Commit: Gordon Bergling CommitDate: 2025-12-13 09:54:30 +0000 ng_hci(4): Fix a typo in a source code comment - s/depricated/deprecated/ MFC after: 3 days --- sys/netgraph/bluetooth/include/ng_hci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netgraph/bluetooth/include/ng_hci.h b/sys/netgraph/bluetooth/include/ng_hci.h index ce3291770740..54980e128bba 100644 --- a/sys/netgraph/bluetooth/include/ng_hci.h +++ b/sys/netgraph/bluetooth/include/ng_hci.h @@ -1391,7 +1391,7 @@ typedef struct { typedef ng_hci_status_rp ng_hci_write_iac_lap_rp; -/*0x003b-0x003e commands are depricated v2.0 or later*/ +/*0x003b-0x003e commands are deprecated v2.0 or later*/ #define NG_HCI_OCF_READ_PAGE_SCAN_PERIOD 0x003b /* No command parameter(s) */ typedef struct { From nobody Sat Dec 13 12:31:00 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dT5K10Wjtz6KKQV for ; Sat, 13 Dec 2025 12:31:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dT5K06vfJz3swr for ; Sat, 13 Dec 2025 12:31:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765629061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qfyWFy9vrxc16DrO1kPk3N2oTYKknCjhVccoZmFYxP8=; b=h8kYm1/LrM5lNWqUfGAjyMDz9YcTB4uMb4mojam57Fv+ZUZoWNpuIrFm3fHCXY0zAhicCD r+Chgzx/0aV3sWRnjEbhQNDpLIWiQeM6dFs07FIXOL0f0SQqbyx28vUPKf9mGxxQpbUKF8 5Jr0OxMjKj3dNx0EyTTO94S4fmOjOj4LjgWqvMCUsPTYY7iVkvRwzCAMZs1QOvVjcw8N/M yvpAjECrJOVz670FouBlhkSESZMxEeMGzLSyB6sHWvGcWThf6fAZUEM7XIVEXusXF2v14Q GsliHLHS3Xa6JhpFnofCuu2lx3vmqDQwcgs1KVin+nz9upqI6RDwKu2fhZGw/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765629061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qfyWFy9vrxc16DrO1kPk3N2oTYKknCjhVccoZmFYxP8=; b=Eik0+GydnQpRMAu84/K8wUiungjXtTQvsE5dsrj3PShFQQzj70DhVSre5Y9xF2QUvi7fOf i3U6a6Iq8Vy32wsJcZLWZHej+QoUk9yKaebPwsiZQA6dplbYdX/k+wixktvohBV02Ib+yu CG++zUfdIbIUFGSEQ1Y73cnjWAhWSKU+uyfswGk0uWk8BWI77zOgKuCTUEwqGFohLvKNS6 zXESoywcthCSYvl83xeMP+CjWabrNgXvkR20HbIjYdbTvkodsWhfQNCYx2McKRXP+eS6E+ 5TqUWIl0US9JXRMdLHiPTDX4gvh8RCXB+iQYqrix13Hur+CKjvmNIjwqD9bPJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765629061; a=rsa-sha256; cv=none; b=Y4JeiSjfnRygUa6B/VFgk7VM4fb6+duZl7IpSOQxskcwQqFEviOhITj4CilPcv+/bNNrGb IgIXC4sFa8pE1D3jjyzGrMTCs+ymEMfNza+/yE/RxRcBAn/aKWgoLt5RnDBNuD5aHX5ByK zjxOp4O1i/o8Kx4HLoTuoMSzoKJp4Ari7zSlsbzS9ZAodtWMhDxlLOhY8Yxn8DoWt0Cu40 BhL/s7JIWFYRFXrM4uPM2Dmy1ElgvgNA5Zs4d5RoaqUg6SjE0aV3mkpW8qDTvZ4oAAMt+J SPY3UYLWd5qslo5NRZN6+EiW7BeZlE/jpfNj76LmcavrtoTyW652HbDhqwIk3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dT5K06QLDz13Kr for ; Sat, 13 Dec 2025 12:31:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2661f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 13 Dec 2025 12:31:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roman Bogorodskiy Subject: git: 9d9974457ce8 - main - bhyvectl: fix build without BHYVE_SNAPSHOT List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: novel X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d9974457ce8c6cf9023884ab457d4712dcc237f Auto-Submitted: auto-generated Date: Sat, 13 Dec 2025 12:31:00 +0000 Message-Id: <693d5c84.2661f.3cb56e27@gitrepo.freebsd.org> The branch main has been updated by novel: URL: https://cgit.FreeBSD.org/src/commit/?id=9d9974457ce8c6cf9023884ab457d4712dcc237f commit 9d9974457ce8c6cf9023884ab457d4712dcc237f Author: Roman Bogorodskiy AuthorDate: 2025-12-13 12:25:22 +0000 Commit: Roman Bogorodskiy CommitDate: 2025-12-13 12:28:15 +0000 bhyvectl: fix build without BHYVE_SNAPSHOT Build fails without BHYVE_SNAPSHOT due to undeclared identifier 'checkpoint_file'. Wrap that with a proper #ifdef. Reported by: dhw --- usr.sbin/bhyvectl/bhyvectl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/bhyvectl/bhyvectl.c b/usr.sbin/bhyvectl/bhyvectl.c index 9e845ac6b531..8c37b670ab2e 100644 --- a/usr.sbin/bhyvectl/bhyvectl.c +++ b/usr.sbin/bhyvectl/bhyvectl.c @@ -390,8 +390,10 @@ main(int argc, char *argv[]) usage(opts); action_opts = create + destroy + force_reset + force_poweroff; +#ifdef BHYVE_SNAPSHOT if (checkpoint_file) action_opts++; +#endif if (action_opts > 1) { fprintf(stderr, "mutually exclusive actions specified\n"); From nobody Sat Dec 13 14:31:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dT80G6Bk5z6KVG6 for ; Sat, 13 Dec 2025 14:31:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dT80G51TKz445T for ; Sat, 13 Dec 2025 14:31:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765636302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p3EBdQu2RYnUlO/PCOPf6Pu2Oj5Gi84RuSvfaVtFuc4=; b=rxgAS/JzRBPvt037UW5/vNd8Fo/IBubjdWFEk9X16Vph59P30ohVDh1jEEV6qFsT7be1be Fleoq5dbgjkP0RZBryU9vMX4Lq0UNSMZV5hYYup65e7Sw1md/6YwYeAEXk7lgu+fgrn6vp aSkKYB5J2DJeMdAmUa9j5AcvIcSuShE/uXVMcUh0RgnD5EFxjYjT4sXzSzuQNiWRR2cqfK eR11n47YBAvpTq/Es+juGkKHVK2JoDvoGRro/Q39tRBIrcAcIISCS96DNiz4UtCIpluv5a l+pr/3eEH7vo/Y2P76ks7gxpaQG2+hTEIFZxiXH07nbOHbK/UR2fu+qkzceGkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765636302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p3EBdQu2RYnUlO/PCOPf6Pu2Oj5Gi84RuSvfaVtFuc4=; b=Li5pce2jFMTvkrATOFSpvdYlGggJc0E7qn9eAka0CiT85N0T7wZhMxGG0xVZbmYdWm26mP 0SVbUaFrhyxLx1jlR3ju5E0jVKAb/LsbTkJNb+L4f6S4gKvOsh8pKl1GM0917dRIs3ATwt VOhc+/QHDkSUxfgMZDTjSwhou2S+XZO23HVfg3MIBoy9lk+gFRPMdoqaHrql36h+rcc2DG 6hAMI0XR2Lw8fEq3wtj0DU++p4HJYQLy2aci3I5641oTHnckgzWEBapOp+Rrp5vRsj/V5Y n7qVMphLDRiQocksRAFFdZKQAp7p4ICJZI2t93Abc4uKA22ZvP6Dxxe4uGFkJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765636302; a=rsa-sha256; cv=none; b=xF2qA0a7ny0aPn33ZWe20TaT+pWsie/oSjMSTZMD6XutxIICS7IICzeqkIZ8WLXbpaKd4K 2XQfUqzvnDB0bBXSKBSwRd4eRKNjD2Md2WHj1F8I8RQTAAXDQw3WcX964aJubLp0p7Guea EB1U5UFNDcyypSOybpEN9+voA0dXIkRAy5QggSQku1TlAqJNwBO1TUB2o9PWynGYCoBsWP N0IXzyyMG0mzWDZMswehkLr10NcSDCP/AZbeqyPb9gC13jm7I4/UvCiwHU4iuVNT9be1P0 dp5SkOWubQ1GdnF1lqOSoPvWhT7nBIWLbnOUIuOKLXrBMihPVj4iS361lhSF0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dT80G4P73z16Jc for ; Sat, 13 Dec 2025 14:31:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 314bd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 13 Dec 2025 14:31:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 49b6dda4d711 - main - Import latest mtree from NetBSD List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 49b6dda4d71175ad615718401573be5fd024822b Auto-Submitted: auto-generated Date: Sat, 13 Dec 2025 14:31:39 +0000 Message-Id: <693d78cb.314bd.1342b969@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=49b6dda4d71175ad615718401573be5fd024822b commit 49b6dda4d71175ad615718401573be5fd024822b Merge: 9d9974457ce8 f600477feb4a Author: Jose Luis Duran AuthorDate: 2025-12-13 14:28:16 +0000 Commit: Jose Luis Duran CommitDate: 2025-12-13 14:28:16 +0000 Import latest mtree from NetBSD Merge commit 'f600477feb4ae61a75f61949eb600caff4aeea8c' MFC after: 1 week Discussed with: brooks contrib/mtree/compare.c | 39 ++++++++----- contrib/mtree/crc.c | 20 +++---- contrib/mtree/create.c | 144 ++++++++++++++++++++--------------------------- contrib/mtree/extern.h | 13 ++++- contrib/mtree/misc.c | 10 ++-- contrib/mtree/mtree.8 | 139 +++++++++++++++++++++++++++++++++++---------- contrib/mtree/mtree.c | 8 +-- contrib/mtree/spec.c | 44 ++++++++++++--- contrib/mtree/specspec.c | 4 +- contrib/mtree/verify.c | 17 ++++-- 10 files changed, 271 insertions(+), 167 deletions(-) From nobody Sat Dec 13 14:36:27 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dT85l6qpZz6KVDP for ; Sat, 13 Dec 2025 14:36:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dT85l5vGkz44Zx for ; Sat, 13 Dec 2025 14:36:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765636587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bcvWm4P6ke2FapnQPU1PoA7Cj1DIgYqjbPPjPWi+Nj8=; b=ZsY6bfW5KCsMU/S79eoP9PyZJem6AaA6lffoAgXDLAkfGEDa9rACPPrrYL4/pEduOX8927 4ftMsZhv3mR6PioFwIXdGjx8+8xXPNt4ffXyvxowEArudJ95D0XAP0L+D+jRhS2G2e0FDo rGAZeDhPJ3X1n6epbIg26tOXVO5lMf4gPLNLJsOeowMh3JbR9t7cuQv/6nDJxUALpwzZ5R QFeuUyBQfB2fF6wqUuiHXz/AvJnmmVQsH8fmw8RgRa8Co646HsMNml/TsKtuFYNw8Amu3L zwLNK5mI715+Xp9WOWK7YlFAiUsoI1r2s/t2NW3JL9IlLbTPQhQF8Z2dWEF8gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765636587; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bcvWm4P6ke2FapnQPU1PoA7Cj1DIgYqjbPPjPWi+Nj8=; b=v51hkPCtxxAfaHf8SKKr/BffwIcls6sVaQQ0vmEYsZq8+RkoHRlYdKnbtpwYrjB2LlfYXb sPYt9hbvt8fmHulOLTKu5774Dwm1Q2oEfcEb25glr4mGjxiid9KOX70Kci9h7/sHsUo2eE E9Vg2CkQVa6rNPW19Y+ia6wuN1QmJtEH8Yv2qCxYOiK2SfhvyItdEw+GZ7quGF22MDlM1C GsC+NWo5P+AvxUTfmaLd34N8pyXUhjBA5WO9oLI9/nDXm7G0YbcYDzi5aumKx61vMbsUst rdSzePxnm/n1QPAOzgnTmgHjQq6WEVBEbdYXq+BpwfddUCSwcfh+rdzMwlSj+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765636587; a=rsa-sha256; cv=none; b=VIwXp8RR+OFcYxFV2PSl2mrQDfzeyJ0VRPuGERDZSx4KXlQtENt7/GEa7uilCJ8WmeLu7T Jb96/2Wj4Zfnm3PYKcOsmF02fo244wkk3xkbmdmujuC7zRrO7+NhYxhFuKn8FceJih+msG IcGyW9IYlXOELES6U59a4R5YLD4XkZrs+P11EoaMDnH0ixsXw6ImwYhDkn3R8b51dveYfj m8qa1DEe8P4yicdd+McbQCoOgU7PG1ggA/0xPICTcNULchHQnHVNJf0t6CW+ekZs/SeNz4 d6QuqIv4obNHLwp0JuuCdZsz1CP56VOL9X3FOO+TjvyiPUWv3WarjM7ZBIMIiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dT85l5SxDz16rX for ; Sat, 13 Dec 2025 14:36:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32bed by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 13 Dec 2025 14:36:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: dab5daf54cc2 - main - mtree: Fix typos List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dab5daf54cc26aaf2679a2eda5f378461f279ec5 Auto-Submitted: auto-generated Date: Sat, 13 Dec 2025 14:36:27 +0000 Message-Id: <693d79eb.32bed.70363935@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=dab5daf54cc26aaf2679a2eda5f378461f279ec5 commit dab5daf54cc26aaf2679a2eda5f378461f279ec5 Author: Jose Luis Duran AuthorDate: 2025-12-09 13:18:23 +0000 Commit: Jose Luis Duran CommitDate: 2025-12-13 14:34:43 +0000 mtree: Fix typos Manually apply a typo fix. This change has already been submitted upstream as bin/59824. MFC after: 1 week --- contrib/mtree/compare.c | 2 +- contrib/mtree/spec.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/mtree/compare.c b/contrib/mtree/compare.c index c4e5bfcac1d7..3d8cf2335207 100644 --- a/contrib/mtree/compare.c +++ b/contrib/mtree/compare.c @@ -285,7 +285,7 @@ typeerr: LABEL; LABEL; printf(flavor == F_FREEBSD9 ? - "%spermissions expcted %#lo found %#lo" : + "%spermissions expected %#lo found %#lo" : "%spermissions (%#lo, %#lo", tab, (u_long)s->st_mode, (u_long)p->fts_statp->st_mode & MBITS); diff --git a/contrib/mtree/spec.c b/contrib/mtree/spec.c index 25bface34bd0..24e15f33fa8a 100644 --- a/contrib/mtree/spec.c +++ b/contrib/mtree/spec.c @@ -803,7 +803,7 @@ addchild(NODE *pathparent, NODE *centry) * * Make centry point to the just-replaced node. Unlink * the just-replaced node from the list, and allow it to - * be insterted in the correct position later. + * be inserted in the correct position later. */ centry = samename; if (centry->prev) From nobody Sat Dec 13 14:38:19 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dT8806L6Xz6KVsd for ; Sat, 13 Dec 2025 14:38:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dT8804R4Tz45QD for ; Sat, 13 Dec 2025 14:38:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765636704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5ZzMh2ydCJLAmfkCoVNqldM37i1Q+B105ei9JPICQV8=; b=Q4Ay+++1V/aBw40117wVqlvHw9LIJdpMSXMR6lOE51U11YrakO3WkKTIDMZ8VNi3WuPwmY YjiB60K71u8Hs1PTCVTAhFc4fftmlenjK3x6P8NQLcLASu3lRSkLQmXfVITH4Z6/h2qRzM FOW7Lvm+cOEVBzl8WagnH2zY+wX4elnGvCzFzATWEagunqwlAcknFk4zMsD0OfvlrtlNbO PVfuu8snK8xyFjqU51CDS1ia8+EC8sFb/E0sWYUF6SfcIGGKNbuQ2hlu8wH+HZBmUHw2zr /SQVDDNXE6+A9FBQvGKRll1T1VsNBu7ldT1GLw/N9vZh9QES1JyHP8vrw4mlVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765636704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5ZzMh2ydCJLAmfkCoVNqldM37i1Q+B105ei9JPICQV8=; b=wb+xXV5YZeJM5gLKAJRfMorxV3WjJl9O8opJ+emkx9+iiGSgYrPVeIN7F+ogqT+51S8DRy DL6YFu7waSFKz0yjTQ4HyL4rVwf0h1J9QL2gHBTG4dRnKyivIIK5iyd0jztRHl4GpGRK6c usrSPETBsixPNtq/srM9XheK2T2ubkGX/v3cviiQ4tbXT2o5Mega7dFwJQfvbmQWv5impU YPJ6TqDnoQcpaOU7zOOb0nUiB3EN8JCQqTFjaSwMdTNrzhzWhlYSUSjxNl7nbJdfrXGbqE NCzpDUgI8qL2c/HQwU8cMECjtlAUHh5/3nH0W93eqxaP9qncR+Q6EGskRl5+wg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765636704; a=rsa-sha256; cv=none; b=VwZjXtSed8kctDbCBLCnIKKRk7CwRt5GiWCH8E9VIxXeoJz/N34dQIFbHOmPAgT3QYvE5L jz6upfk5mPy87WDjxhuUZNUgAasL/BH8ziy7rql4pWow0KfH/hAX+f8VYZ8+YMpHFYfqRE nPZch16rFjdPYnc+hk+X8UMyANqM1kZniujwBc8iQ59Z5wY3o93IYHtBeMyLBcK0u7QzdQ AYAgv6pLV1r5PuMN1zGKZ0HlSKuFIKb2DvMHbmftOyqxLIG5ATMp3uMXDlm8NoAzDs/Bvu 2mjp4i2a89PFMhT+Rz1bibBotBRSa+Ucnjr9GBJh2ZHZcjlganJ8yu+u/8Ujjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dT8803X1dz16cq for ; Sat, 13 Dec 2025 14:38:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 327b7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 13 Dec 2025 14:38:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 2f29d0f3e6d2 - main - mtree: tests: Import NetBSD's mtree test suite List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2f29d0f3e6d25599c188c94bf1e395d9cbeb2a4d Auto-Submitted: auto-generated Date: Sat, 13 Dec 2025 14:38:19 +0000 Message-Id: <693d7a5b.327b7.650dbe8c@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=2f29d0f3e6d25599c188c94bf1e395d9cbeb2a4d commit 2f29d0f3e6d25599c188c94bf1e395d9cbeb2a4d Author: Jose Luis Duran AuthorDate: 2025-12-09 15:45:01 +0000 Commit: Jose Luis Duran CommitDate: 2025-12-13 14:37:20 +0000 mtree: tests: Import NetBSD's mtree test suite Manually import latest mtree test suite from NetBSD. MFC after: 1 week --- contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh | 40 +++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh b/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh old mode 100755 new mode 100644 index 5daefd84e928..5e4177c792a5 --- a/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh +++ b/contrib/netbsd-tests/usr.sbin/mtree/t_mtree.sh @@ -1,4 +1,4 @@ -# $NetBSD: t_mtree.sh,v 1.7 2017/01/14 20:45:16 christos Exp $ +# $NetBSD: t_mtree.sh,v 1.10 2023/12/02 16:18:17 christos Exp $ # # Copyright (c) 2009, 2012 The NetBSD Foundation, Inc. # All rights reserved. @@ -447,6 +447,42 @@ mtree_specspec_type_body() fi } +atf_test_case mtree_onlyfile +atf_test_case netbsd6_onlyfile +onlyfile_head() +{ + atf_set "descr" "Test -O with same hash value in directory and leaf" +} + +onlyfile_body() +{ + mkdir -p ab/no + echo ./ab/no >onlyfile + mtree -F ${FLAVOR} -c -n -O onlyfile >output + if [ ! -s output ]; then + atf_fail "mtree did not find path in onlyfile" + fi +} + +mtree_onlyfile_head() +{ + FLAVOR=mtree onlyfile_head +} +netbsd6_onlyfile_head() +{ + FLAVOR=netbsd6 onlyfile_head +} + +mtree_onlyfile_body() +{ + FLAVOR=mtree onlyfile_body +} +netbsd6_onlyfile_body() +{ + FLAVOR=netbsd6 onlyfile_body +} + + atf_init_test_cases() { atf_add_test_case mtree_create @@ -459,6 +495,7 @@ atf_init_test_cases() atf_add_test_case mtree_merge atf_add_test_case mtree_nonemptydir atf_add_test_case mtree_specspec_type + atf_add_test_case mtree_onlyfile atf_add_test_case netbsd6_create atf_add_test_case netbsd6_check @@ -469,4 +506,5 @@ atf_init_test_cases() atf_add_test_case netbsd6_ignore atf_add_test_case netbsd6_merge atf_add_test_case netbsd6_nonemptydir + atf_add_test_case netbsd6_onlyfile } From nobody Sat Dec 13 21:50:35 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dTKkh0jpYz6K8H2 for ; Sat, 13 Dec 2025 21:50:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dTKkh00ngz40dq for ; Sat, 13 Dec 2025 21:50:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765662636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YrcR1LUoH0g+XSrj+N7xYdpdkjTGmphAkVO8D0AfBcQ=; b=lIx0x/XE9AtjCqi7wpWw00ydZgh9z5UFdBxDWJsk13vn6kG1RCeIIFh2yP/nXtVVi9Llnu R5ru+OWNy/Cz7n/x9sY79pojmXfxXzNOfv9XU1lt8kOe4d+CGRtXhWjaVOpjysBCysXSlC LUXNNw/o3rRROn9DzZGRPDqf594mIt3LWVbzgqR+nl+L3Z/o37xWzk8tUBNhu8d3EXYDBE sw462UQRiB+ZzUcQENj6TzLu5PKkOnhKjKQ0PeCsHS/nJbe2OOV8Mrh/VKKyOWX9DeeSMl QxuFa53Scl9G+NzGFHZ3v7rkmrxXiCob3Z/8BzCEYtRjgYb9KoruneYnZP4qEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765662636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YrcR1LUoH0g+XSrj+N7xYdpdkjTGmphAkVO8D0AfBcQ=; b=LLJZ9W/Te7m6ulWrzgx7H5uT3WhkNIvFcn3p4cNDjF3LLnGjtzIXwbF6zyj7geZ97gMChZ Hzh7C0m9mJkk1UmRkzmFUPhizgefpoQKjlHnpapAIhbQLhTYNJt6s9Vcl+aNC+GHpEnnGb apa+cdD6Q7E3Bev3geqvO0NUPChNnClgxnUC2cbjXzIq34eaHrPa9Yt6pfKcu6PxMs2Zpx 5T6c4kKmKQh8ykWpF95HCwXrUX7ZU3oJhyDHunEJFSvZhdJh7nGlRhxvLb5f2ozG5Kfjq3 k8Pb4RQJgKw2+79wT26E5xpLsOON0WUVSptSMIYSb+ZmYZcHoi1uwmxqnKWdZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765662636; a=rsa-sha256; cv=none; b=X3hZrze4gYQ4qwGKOHgj5oOvX/sxyZFV3GQjtM7rudBhcHIGFMOoP5ZApcvX79/3ecRFmB agXo17oWCcmImKn/aUtFa1r6jIv3S1xN1NMiAGPB6yqKpFUzEKX8OMOO65uIewsziGEePD c0DlZs5CiIJoEwrgQ6f8Bkj9e052hdMXkTSByUDc09D/ggBmlEx1lfVagPM63hQrk3E/NM SxSzup8jEbwGsXz3t23YOvGXw1DEEGbEp7jksWRHkJ/TA+FJ206fa6EBg8ood4UCy0Czuo yQp8r+8+11qGXENgCUFH+ocI5KvwWa2nzLC/D4nHF9WmChYchxB4M+EqRBKtIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dTKkg6W75z1KlM for ; Sat, 13 Dec 2025 21:50:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35dce by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 13 Dec 2025 21:50:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 1dee2336ab44 - main - pfctl: report ICMP states consistently for IPv4/IPv6 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1dee2336ab44e604f4871c46e7ccb2f7f1e33054 Auto-Submitted: auto-generated Date: Sat, 13 Dec 2025 21:50:35 +0000 Message-Id: <693ddfab.35dce.35d7e471@gitrepo.freebsd.org> The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=1dee2336ab44e604f4871c46e7ccb2f7f1e33054 commit 1dee2336ab44e604f4871c46e7ccb2f7f1e33054 Author: Kristof Provost AuthorDate: 2025-12-12 17:07:19 +0000 Commit: Kristof Provost CommitDate: 2025-12-13 21:50:22 +0000 pfctl: report ICMP states consistently for IPv4/IPv6 Remove the '#ifndef INET6', which never actually mattered because this define is never set. This makes us report ICMP states for IPv4 and IPv6 the same way (and also aligns us with OpenBSD). This means we will now always report state 0:0 rather than NO_TRAFFIC:NO_TRAFFIC for icmp6 (like we already did for icmp). Reported by: Lev Prokofev Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/pf_print_state.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sbin/pfctl/pf_print_state.c b/sbin/pfctl/pf_print_state.c index 417ff70de975..1c5a46f86b35 100644 --- a/sbin/pfctl/pf_print_state.c +++ b/sbin/pfctl/pf_print_state.c @@ -324,13 +324,8 @@ print_state(struct pfctl_state *s, int opts) } else if (proto == IPPROTO_SCTP) { printf(" %s:%s\n", sctp_state_name(src->state), sctp_state_name(dst->state)); -#ifndef INET6 - } else if (proto != IPPROTO_ICMP && src->state < PFOTHERS_NSTATES && - dst->state < PFOTHERS_NSTATES) { -#else } else if (proto != IPPROTO_ICMP && proto != IPPROTO_ICMPV6 && src->state < PFOTHERS_NSTATES && dst->state < PFOTHERS_NSTATES) { -#endif /* XXX ICMP doesn't really have state levels */ const char *states[] = PFOTHERS_NAMES; From nobody Sun Dec 14 13:46:16 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dTkxP1H03z6KCrb for ; Sun, 14 Dec 2025 13:46:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dTkxN73s2z3km2 for ; Sun, 14 Dec 2025 13:46:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765719977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cZMfktKBlvKKbG/e3bTenlTSdBi03EcyjQO6Iy1eGEI=; b=fp/6yI+kqmDjSUvfWHaZkKLVZEJub4OynMN9Y1yNeSk7+PHbSQtVpWyZMaGL+J0lny9sB8 IdgqrC8A+2AGAGa9ovBPA20QIUkKeEW6Yvm03//zBuYStfvAw0tT+d8Y5P7B9BESdDdUCq 9MELJNSexNMoqlAzvCYZ2NNZiYdVQ3YMp2nCY8dEc4h+B2OwLlxUNS2V63/Q1izvHpVGPK 5C1rJF1meT36Ihbb1Nwj6oqcaWCRah+hGhKoQHstwuzbgXMTGwVAAUgAfmVbZvlLSNhMjn z7Qjpnj8vzeEA3G9OFfCJ4v5G8nNM/X3aJdJkD3Cu/JbRZfnHU+4utZ/LWql8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765719977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cZMfktKBlvKKbG/e3bTenlTSdBi03EcyjQO6Iy1eGEI=; b=ldPnNCRyZ2qDAWPX1m1gSSN3V+B1a3KQKXOjfd1AB02/8zFZ0OGKyF0Cv14eJb5TSfAKp9 m7fZZb69M0520TtVPaHUNV3pK/YiXhYTbPJNwxGptPEmWvG53ynq1vxtz1B1Uq6CZ9s7Pv ZPib2xQd7UgUHgg32UyRew/2rIDoifn6gro3gZqP7hrm5PXRCv6955jL2BO8wJqHFB18am JuLX51g39KFm2RAOwiOPmtrzsp3bJYL+d883W0Qd1CPoa67/JHnC0oszKHsQZnAsGwr3YC cnmBToH4T1FkwGNGw6XUrjiwvAQl3mnmNfk2pyHD/Jd653w7RPzigGHIJ6xpzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765719977; a=rsa-sha256; cv=none; b=uOpkB4IbjATuJ+cAjNfdeENxynfHQS/1Aqb9OY4feoPBPwlgolnIlxHKh0OjJflfccWh0x 4AI7dBF2pt4p/+2+Xh/MQiV9AB0+t/LWKlqqB35SHv0vgmNJXfQLbzbKVYUV/Tzn/oTpol L0LQJyNuXQbGCgaElBGP/bRIJxHm926W/pPWhb5PH2JkohEL8fl/2hXU/d12CER4HyC4QN cOUqDby6IQYr13OBaiDFPLgn40NXnbAUG19ko07ac6T5PDdHKbE6DkaZro/wnpFFOrPyg+ qwzW2yAsLldhomJCsWa43NcdmXyyjxGbOcAkU/J7IgxcvrZk5tTmXEVgmauERw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dTkxN6P3Jzcj7 for ; Sun, 14 Dec 2025 13:46:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 28a39 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 14 Dec 2025 13:46:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: d4f25d0c7957 - main - vfs: Let prison_enforce_statfs zero the fsid List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: d4f25d0c7957f0f1960028eec82625c2d6405537 Auto-Submitted: auto-generated Date: Sun, 14 Dec 2025 13:46:16 +0000 Message-Id: <693ebfa8.28a39.576ae4cc@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d4f25d0c7957f0f1960028eec82625c2d6405537 commit d4f25d0c7957f0f1960028eec82625c2d6405537 Author: Dag-Erling Smørgrav AuthorDate: 2025-12-14 13:16:16 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-12-14 13:16:37 +0000 vfs: Let prison_enforce_statfs zero the fsid Currently, we unconditionally zero the fsid before returning a struct statfs to a jailed process. Move this into prison_enforce_statfs() so it only happens if enforce_statfs is greater than 1, or enforce_statfs is 1 but the mountpoint is outside the jail. PR: 291301 MFC after: 1 week Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D54214 --- sys/kern/kern_jail.c | 3 +++ sys/kern/vfs_syscalls.c | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index d1149dd4fb3b..07b98fef8dfb 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -4117,11 +4117,14 @@ prison_enforce_statfs(struct ucred *cred, struct mount *mp, struct statfs *sp) if (pr->pr_enforce_statfs == 0) return; if (prison_canseemount(cred, mp) != 0) { + bzero(&sp->f_fsid, sizeof(sp->f_fsid)); bzero(sp->f_mntonname, sizeof(sp->f_mntonname)); strlcpy(sp->f_mntonname, "[restricted]", sizeof(sp->f_mntonname)); return; } + if (pr->pr_enforce_statfs > 1) + bzero(&sp->f_fsid, sizeof(sp->f_fsid)); if (pr->pr_root->v_mount == mp) { /* * Clear current buffer data, so we are sure nothing from diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 1a739d354f1f..68f155de3db2 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -290,10 +290,8 @@ kern_do_statfs(struct thread *td, struct mount *mp, struct statfs *buf) error = VFS_STATFS(mp, buf); if (error != 0) goto out; - if (priv_check_cred_vfs_generation(td->td_ucred)) { - buf->f_fsid.val[0] = buf->f_fsid.val[1] = 0; + if (priv_check_cred_vfs_generation(td->td_ucred)) prison_enforce_statfs(td->td_ucred, mp, buf); - } out: vfs_unbusy(mp); return (error); @@ -545,7 +543,6 @@ restart: sptmp = malloc(sizeof(struct statfs), M_STATFS, M_WAITOK); *sptmp = *sp; - sptmp->f_fsid.val[0] = sptmp->f_fsid.val[1] = 0; prison_enforce_statfs(td->td_ucred, mp, sptmp); sp = sptmp; } else From nobody Sun Dec 14 13:46:17 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dTkxQ2Bn3z6KD4j for ; Sun, 14 Dec 2025 13:46:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dTkxQ0Pm9z3kdD for ; Sun, 14 Dec 2025 13:46:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765719978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lkjKSlvaYiFLb+tL9M5P/ayD7et+aDMZfyfAugxNT3M=; b=IHMMr0Pba9ewMDf+gBj8n4qAM2SwSUQv4uZR04ts6EKh5ABGci00e1hW01iFZQlQVi9uD3 0nHmO65lMMWf3DBpJ1/E/zzogN6KzRaCpwKr0Z/lW6y8u/y5M3zKmIjDDrC4Koul45lgPd en/1ESNN044xrN1IMEAuqiAmdLHfGXYdUGfk6pGhN7LOlWsf+aXnFpE+Jp6aSyhHJtlEyq ylEn9cA7Mintzs/uCQYYfQmy42y2tPpPpgB99zSAbKiDltck5HX3rh3XIC0qBX0/PlI2L1 KJ7mZr7QQWoYxPpf7bdC9XDJylsVj89Ldx9N7Uc1nOn3h7WRYr5LPJ1nAhGTZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765719978; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lkjKSlvaYiFLb+tL9M5P/ayD7et+aDMZfyfAugxNT3M=; b=V74KrZN2GnFUmfuDYUgK6Juagh0ndYZAMNMmhWHkj8AuC5Lcui7rYg0paFsdEQWPNSau8C byvNCWfZJ5tNGU6jJ5tDBYwx+nYPghtX6ll04lU0VZvV8Dzf5lbh3AWUiM0Vr2lAnEqA0P 1tW4JybbmEj861Co7ZukVj6BHzcgzQlwVBNFnrNCk5LI0wdTURG9hsxgH+rJ0HuxsSDIfd qVMpZ1aLBlT/Vm7MAxz23XjyJQbuftFFZ2FMkiCZc1lVup2jRm5Dz7DIdPTReVZfX/+dzL miyiGGdrAy97NPZCp9WkAgHBzzCTlstwxvEd6+gJC751lDEdiK8FAbpHPOAtKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765719978; a=rsa-sha256; cv=none; b=TjjUFm8vCYH8BnoHFJUUBx9kzczovlG+sipcvfaM4Uf5aDm4hplhSPZE9GH7Z0/omDjItl qhndhMD8DsfEsLNUDwKlt5BHqFc78bKSlliv+Ap1UGh8lRzyfL53klK5p4+UIb/2mu4DNX cgP18MRiZrYacM1SDxiasKa9VIFoyr7kmXaB7AVK/e03ozc2U5S9FO5D5AYmuMgZiutsGP OO+1ExMRxbRo+zjCOkFpSIzisrfRX3LIkSGKwqoALuzkUhqZLDBoQZBO8DORXB1mpFbstu njjQc+EzDGaVfNJPQ5dXTbtFiYu80tYbpZMXH7aALlRVIQWLEQHSMXKovkcYUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dTkxP73j3zc3G for ; Sun, 14 Dec 2025 13:46:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 28fc8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 14 Dec 2025 13:46:17 +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: 026d962ef14d - main - proc: Fix proc_init / proc_dtor ordering issues List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 026d962ef14dafe19fa73361bea6dcc95f141dfa Auto-Submitted: auto-generated Date: Sun, 14 Dec 2025 13:46:17 +0000 Message-Id: <693ebfa9.28fc8.59e9115c@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=026d962ef14dafe19fa73361bea6dcc95f141dfa commit 026d962ef14dafe19fa73361bea6dcc95f141dfa Author: Dag-Erling Smørgrav AuthorDate: 2025-12-14 13:16:22 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-12-14 13:16:37 +0000 proc: Fix proc_init / proc_dtor ordering issues * Move the initialization of p_ktr into proc_init() and make the check in proc_dtor() unconditional. Prior to this, it was possible to fail and invoke proc_dtor() after the first thread had been created (which was the condition for checking p_ktr in proc_dtor()) but before p_ktr had been initialized. * Move the p_klist initialization in fork1() past the last possible failure point so we don't have to free it on failure. We didn't, which meant we were leaking a knlist every time we failed to fork due to hitting the resource limit. PR: 291470 MFC after: 1 week Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D54215 --- sys/kern/kern_fork.c | 4 ++-- sys/kern/kern_proc.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 8b237b6dbd17..961d72c46d2c 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -1065,8 +1065,6 @@ fork1(struct thread *td, struct fork_req *fr) #ifdef MAC mac_proc_init(newproc); #endif - newproc->p_klist = knlist_alloc(&newproc->p_mtx); - STAILQ_INIT(&newproc->p_ktr); /* * Increment the count of procs running with this uid. Don't allow @@ -1079,6 +1077,8 @@ fork1(struct thread *td, struct fork_req *fr) chgproccnt(cred->cr_ruidinfo, 1, 0); } + newproc->p_klist = knlist_alloc(&newproc->p_mtx); + do_fork(td, fr, newproc, td2, vm2, fp_procdesc); error = 0; goto cleanup; diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 6e56664d12ce..8f86ce349e30 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -241,11 +241,9 @@ proc_dtor(void *mem, int size, void *arg) p = (struct proc *)mem; td = FIRST_THREAD_IN_PROC(p); if (td != NULL) { -#ifdef INVARIANTS KASSERT((p->p_numthreads == 1), - ("bad number of threads in exiting process")); - KASSERT(STAILQ_EMPTY(&p->p_ktr), ("proc_dtor: non-empty p_ktr")); -#endif + ("too many threads in exiting process")); + /* Free all OSD associated to this thread. */ osd_thread_exit(td); ast_kclear(td); @@ -253,6 +251,7 @@ proc_dtor(void *mem, int size, void *arg) /* Make sure all thread destructors are executed */ EVENTHANDLER_DIRECT_INVOKE(thread_dtor, td); } + KASSERT(STAILQ_EMPTY(&p->p_ktr), ("proc_dtor: non-empty p_ktr")); EVENTHANDLER_DIRECT_INVOKE(process_dtor, p); #ifdef KDTRACE_HOOKS kdtrace_proc_dtor(p); @@ -281,6 +280,7 @@ proc_init(void *mem, int size, int flags) p->p_stats = pstats_alloc(); p->p_pgrp = NULL; TAILQ_INIT(&p->p_kqtim_stop); + STAILQ_INIT(&p->p_ktr); return (0); } From nobody Sun Dec 14 15:49:40 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dTngn1y3Mz6KNxp for ; Sun, 14 Dec 2025 15:49:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dTngn03Mkz42Dw for ; Sun, 14 Dec 2025 15:49:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765727381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IksPACnwnBIt+gXxtTFLxQSLlSsJxEDP78+Qvcnmmzo=; b=JE+j35nc0BVvSHub9+YdVpb7fNFnKVWcPZ2aS+ngXO2L/I/HYjv8CXLrqIlJswSuC2rtiW 4BXI0CmP9rICNddcrJgIt29Kc9GxCKK8DHcdU1Ln6PEDbF/73aMoTz/+LLNuaMHU/R53tk BH9c99Nflf5Tft9l/zM9MMFHK18NhOpnIWYq+FsPLn1dGJZR0pbMvVFZSWtpSTPPNBog72 B5rIEuZ0pZl6GXZj9OdLX0AVTACDE4GEL2dst0uVO8IMAIqtWhijMAiMiHXR9yr4ROzRvY eIcpUcB37iqfBcFiiaZjjq5CP3ChfAcd5fbzYsi0D489OErUJIs7MpJUeNWB0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765727381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IksPACnwnBIt+gXxtTFLxQSLlSsJxEDP78+Qvcnmmzo=; b=IoEJo/dfm5Rd1DZs4IYolJx7lzDjqIunwr5IYIKFLNHaQq2BlHtgVq9IDVkvz/fE+vZyLx duc97dcxpJsjv/Tt1ojd6O0e8Rqj8REMx9zM7GEbDrlqq2OQmMEbVOALDmg4xbWrzunlD1 uzDbPRgWc+ZNIexDUMBly2g+xJEFbrub/EpU3om7+u8QkbG1PkfLpr8Jp5Y2bpFGIWhPE3 q5fKg4n0qlCdKIW/kNzNGyn4RGhRCYlFKWa2HLkS/S/L8LcNZIw1KUGowsVckUVwCf7akx qZ0kzFSUQ5Cd/B0YFvXvqGJADoKcW+fVYGC2JEFEO4OOU6rozw5L6S5MVe8nmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765727381; a=rsa-sha256; cv=none; b=NSLS6s0NVbnkwYTh5NxZdHGj5dcJhHQQP49UVhey7nmRdut/d+A1+w2bSndZFTaaYV3k3V QDQCD11zHpj9qNziajD5YDMl9eNPUGn+3ghbg2ypCSxDBm3709oChMG3Pzl27oLEBJzgDk y7lTSPZFO7GnvJniIBq6x8XWhICOKa2mmKIcgIGwRGxpgiY3maGzmfnJHfqekasnF78tNr 8LRXuj7b1eghUN0/UxKoYZakFtUPH7eP2XHOQHJD8Zpw0yqoEh9WFsEAEsFP3xCaZIe9Kc Xo2NW+4xLSJCJ3yfbsz6QV/v1MBpkf5EVFw/3cpGrIiaAhZKGa37Y5lpSxMzQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dTngm6Pshzgm4 for ; Sun, 14 Dec 2025 15:49:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34506 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 14 Dec 2025 15:49:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 9dda51f13cd8 - main - rc.subr: Use the variable we defined to invoke setaudit(8) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 9dda51f13cd85791c0f18782461219f5a88e2d67 Auto-Submitted: auto-generated Date: Sun, 14 Dec 2025 15:49:40 +0000 Message-Id: <693edc94.34506.65d65980@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9dda51f13cd85791c0f18782461219f5a88e2d67 commit 9dda51f13cd85791c0f18782461219f5a88e2d67 Author: Mark Johnston AuthorDate: 2025-12-14 15:47:06 +0000 Commit: Mark Johnston CommitDate: 2025-12-14 15:47:06 +0000 rc.subr: Use the variable we defined to invoke setaudit(8) Reported by: gtetlow Fixes: 39ee24182b92 ("rc.subr: Support setting the audit user when starting services") MFC after: 1 week --- libexec/rc/rc.subr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rc/rc.subr b/libexec/rc/rc.subr index 5199a915297d..101c69e93cde 100644 --- a/libexec/rc/rc.subr +++ b/libexec/rc/rc.subr @@ -1161,7 +1161,7 @@ run_rc_command() fi _setauditcmd= if [ -n "$_audit_user" ]; then - _setauditcmd="setaudit -U -a $_audit_user" + _setauditcmd="$SETAUDIT -U -a $_audit_user" fi # If a specific jail has a specific svcj request, honor it (YES/NO). From nobody Sun Dec 14 15:49:42 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dTngp2xTYz6KP3D for ; Sun, 14 Dec 2025 15:49:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dTngp0VMlz41mj for ; Sun, 14 Dec 2025 15:49:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765727382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PhTOUo6KFQMpaaVHW56fddMqORDTPeWEUpPgVjb85nA=; b=L6ZJ3EPJ30RQ0oHR5LwO5eGqygm3XUDe26TRPwQ06xQTlHzbCp475OatmBhDdSvb4aR0Zo MepTlrJgi1So+KDY2KQ9UfS7bHqWA1vGdqMM2Eld7gNnw1DXbzCVeud+domf2C3vwhrafv HJ1sjJB/8MgPjlVQ3WuNVjg4KBpSVRVZD8ngL8MxV34qUJv6q6I+EnnQ2bAscYwm39VpkZ uC0IZpta1HupbmgiYJ3Ng+dqOXNgZBlNXsoece1MNKStUtkTvVr2ROS/iGAU9lAmVqTktu FqzmAtmFjKljvv5E6AXmK03YYgv4vnbRRuQupJW1e5IWcPBOHMEJrDDHU15e4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765727382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PhTOUo6KFQMpaaVHW56fddMqORDTPeWEUpPgVjb85nA=; b=qSqRRvCn/2dAGjI/xs40+otARm/F0EjLegc9fJFHIvtbBYD4c1F0V0hIkb9XBciI2WIZdv BseTeszHHJ/PIlpfpOZxxmRUR99wse52Gs7ybSA6UM6QqheuJ7YIXr8/F89EvMl6bAYk4b yW3LWQDutlxmkn0X1CV/t8DivR/mNTEhtdy2hf+r9/ssfI8gXAL3WcaOo5zFUrzUT2nY33 ET9Yisx8DXHQNtMW8YAXj74VYUdpyYk4kwYd/lZAo5bivuDWBVYgelgJHq5QSbzqGuTldH sbbrboEHAoOCnECag0ErfthwtPUBGGHq10pPJf87+nAdq0KeAXFkve/2TksdTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765727382; a=rsa-sha256; cv=none; b=PpaOyVKAPLljPe/iExEk849ofaWLXcS1+GdQOs+Mwqd/+3KCqDCoyZqHFnghSkGGA6XK0X GmXz0sEhL5YHMDT5Hte6hHgVU44j7lEHjexOsAPvdgA3Rg8HeELxQlF9cPDnpPb+yqi3vf lQ51iTXPvDcDVm5NnTTN1cKy8pJGrFRsG2/r0ZE8xtil+zCXvFPKmeuB+QVhnOxeWGCimh BIbZ2s4SGZMZ9YhmJ6GLtZOks5JjawsW2/MCts+V/eim4owjRtrWFDMWFeUyGHr3rt+fXf l0/3enm9LtiJ8dkpUyE/nNdRDLjhcyXtd5MJ+td0Lkg/5yjNgZvuHPcjKkjPVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dTngp05BmzgCY for ; Sun, 14 Dec 2025 15:49:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33540 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 14 Dec 2025 15:49:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: a0d607957533 - main - socket: Fix the name of a parameter in a comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: a0d607957533c7fbefaac5cd81d34c037cc27344 Auto-Submitted: auto-generated Date: Sun, 14 Dec 2025 15:49:42 +0000 Message-Id: <693edc96.33540.1bce46c8@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a0d607957533c7fbefaac5cd81d34c037cc27344 commit a0d607957533c7fbefaac5cd81d34c037cc27344 Author: Mark Johnston AuthorDate: 2025-12-14 15:47:38 +0000 Commit: Mark Johnston CommitDate: 2025-12-14 15:47:38 +0000 socket: Fix the name of a parameter in a comment Reported by: des Fixes: 0a68f644dca1 ("socket: Split up soreceive_generic()") MFC after: 1 week --- sys/kern/uipc_socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 8ed5dcc9336a..efc8ebfcece2 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -2738,7 +2738,7 @@ sockbuf_pushsync(struct sockbuf *sb, struct mbuf *nextrecord) * time. * * The caller may receive the data as a single mbuf chain by supplying an - * mbuf **mp0 for use in returning the chain. The uio is then used only for + * mbuf **mp for use in returning the chain. The uio is then used only for * the count in uio_resid. */ static int From nobody Sun Dec 14 15:49:43 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dTngq5MqNz6KP1f for ; Sun, 14 Dec 2025 15:49:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dTngq2RY2z41sw for ; Sun, 14 Dec 2025 15:49:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765727383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MqRqmxBGnBayOIgHUytTR2H+wCEQ9r+cVWUt09uPhcE=; b=pBz8zHDW+uwV2ADTSJKBJEZriX2xFZgk3RrOFQAg7Vkzk7w1RrI7UVmVazXE0MDGxO649A Uw3q9sDQE9XNYKOiLKwIL9YipzQd3uufabON+gFeB1HKRzVVz94sllFfEofuAFrtLqoIAZ jy5qKzuUE4aTl7S/MLg/ny1yAslC0OzHf/0zhw+rzEOlpbHgtQDjPuuV7Eq1Y0lin5CT8V UT+bPnAwAe4j6QymDOazsU/eNks9W1kzq4fJPDjs3VI1zsha3Rdxrd9vSDEiniVkxbk7Dm jCumEbcaqwXSvnOGo7fE8IZhTUw4WcmVSppTIbJScwz/dMO57BlGFsJxNNS+NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765727383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MqRqmxBGnBayOIgHUytTR2H+wCEQ9r+cVWUt09uPhcE=; b=JaYqu0VjViF0qFx1owTSXopPYY/YLzualmbS/QGtDflsRnE/Pg2bjJOfyv9KMm3efvISu9 kmznR5euqp4c7A50rabdp+e5bhqK6dxZidARIy3ad0yt7788yndmsM8fX7gI/lF0k+1crB ve7Y6fVp/P8/Dsbns92Wk74CTMymrc8RgmHAyb82r5oDuMnvGf9BfuH/jfvKvgTcuO0n6+ EybMKx1ayVn2HG5FY+nATMEBPIZvCVJIcdohEXyC4xnxySWpP1T23hknCIh3Z8tUw+ILll uSokLWArlHz58IxdsveTrP4bcflEVaHfITftzXnC+mVAz4HLvMcIXpMU66YyZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765727383; a=rsa-sha256; cv=none; b=yEc9MQ0BiVqLpfbkzoSHo/v6cpEg+nM8+iKWp8s+EJK4zN0LNgEZFSjL1sMwOkhG0CmhQN oh7vQI0l6TBo80ufl4u+hX7SCgVZS2ZwBKOgWlcp0OxBPJA+48QxhsNHAO2D6zJ6VdXIBX 5VJ2nNUsVyOhjMSZ//SFUqx9XzvCnfuh/3ic7pNIA1xO/oLIA+7SgOxGlkrRTZ/PzRqNn2 MaXCypFli1GQJiIh36kBNbLhLTm6GKfah+aiNs1yRnN/wyfK6ZKQbYLry7VeVW5AySAr8g UY/4Kjj3MGMBTWLuDn0QRK3eARgAJlZ0Y2WACFUACpL9p/flDEzMUCGmoYMBcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dTngq10J8zgNp for ; Sun, 14 Dec 2025 15:49:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3431c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 14 Dec 2025 15:49:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: c694122f3cfb - main - netmap: Let memory allocator parameters be settable via loader.conf List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: c694122f3cfb7d52b882fa79086d49f45a2c7fd2 Auto-Submitted: auto-generated Date: Sun, 14 Dec 2025 15:49:43 +0000 Message-Id: <693edc97.3431c.5fd2e68e@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c694122f3cfb7d52b882fa79086d49f45a2c7fd2 commit c694122f3cfb7d52b882fa79086d49f45a2c7fd2 Author: Mark Johnston AuthorDate: 2025-12-14 15:47:48 +0000 Commit: Mark Johnston CommitDate: 2025-12-14 15:47:48 +0000 netmap: Let memory allocator parameters be settable via loader.conf This is useful when dev.netmap.port_numa_affinity is set to 1. When interfaces attach, they get a memory allocator that is copied from nm_mem. Parameters in nm_mem can be set using sysctls, but this happens after their values are copied. To work around this, we can make it possible to set these memory parameters as tunables. Reviewed by: vmaffione MFC after: 1 week Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D54178 --- sys/dev/netmap/netmap_mem2.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/sys/dev/netmap/netmap_mem2.c b/sys/dev/netmap/netmap_mem2.c index d69e9305f6f0..865a663da364 100644 --- a/sys/dev/netmap/netmap_mem2.c +++ b/sys/dev/netmap/netmap_mem2.c @@ -628,22 +628,26 @@ static const struct netmap_mem_d nm_blueprint = { #define STRINGIFY(x) #x -#define DECLARE_SYSCTLS(id, name) \ - SYSBEGIN(mem2_ ## name); \ - SYSCTL_INT(_dev_netmap, OID_AUTO, name##_size, \ - CTLFLAG_RW, &nm_mem.params[id].size, 0, "Requested size of netmap " STRINGIFY(name) "s"); \ - SYSCTL_INT(_dev_netmap, OID_AUTO, name##_curr_size, \ - CTLFLAG_RD, &nm_mem.pools[id]._objsize, 0, "Current size of netmap " STRINGIFY(name) "s"); \ - SYSCTL_INT(_dev_netmap, OID_AUTO, name##_num, \ - CTLFLAG_RW, &nm_mem.params[id].num, 0, "Requested number of netmap " STRINGIFY(name) "s"); \ - SYSCTL_INT(_dev_netmap, OID_AUTO, name##_curr_num, \ - CTLFLAG_RD, &nm_mem.pools[id].objtotal, 0, "Current number of netmap " STRINGIFY(name) "s"); \ - SYSCTL_INT(_dev_netmap, OID_AUTO, priv_##name##_size, \ - CTLFLAG_RW, &netmap_min_priv_params[id].size, 0, \ +#define DECLARE_SYSCTLS(id, name) \ + SYSBEGIN(mem2_ ## name); \ + SYSCTL_INT(_dev_netmap, OID_AUTO, name##_size, \ + CTLFLAG_RWTUN, &nm_mem.params[id].size, 0, \ + "Requested size of netmap " STRINGIFY(name) "s"); \ + SYSCTL_INT(_dev_netmap, OID_AUTO, name##_curr_size, \ + CTLFLAG_RD, &nm_mem.pools[id]._objsize, 0, \ + "Current size of netmap " STRINGIFY(name) "s"); \ + SYSCTL_INT(_dev_netmap, OID_AUTO, name##_num, \ + CTLFLAG_RWTUN, &nm_mem.params[id].num, 0, \ + "Requested number of netmap " STRINGIFY(name) "s"); \ + SYSCTL_INT(_dev_netmap, OID_AUTO, name##_curr_num, \ + CTLFLAG_RD, &nm_mem.pools[id].objtotal, 0, \ + "Current number of netmap " STRINGIFY(name) "s"); \ + SYSCTL_INT(_dev_netmap, OID_AUTO, priv_##name##_size, \ + CTLFLAG_RWTUN, &netmap_min_priv_params[id].size, 0, \ "Default size of private netmap " STRINGIFY(name) "s"); \ - SYSCTL_INT(_dev_netmap, OID_AUTO, priv_##name##_num, \ - CTLFLAG_RW, &netmap_min_priv_params[id].num, 0, \ - "Default number of private netmap " STRINGIFY(name) "s"); \ + SYSCTL_INT(_dev_netmap, OID_AUTO, priv_##name##_num, \ + CTLFLAG_RWTUN, &netmap_min_priv_params[id].num, 0, \ + "Default number of private netmap " STRINGIFY(name) "s"); \ SYSEND SYSCTL_DECL(_dev_netmap); From nobody Sun Dec 14 15:49:44 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dTngr5ZYLz6KNxv for ; Sun, 14 Dec 2025 15:49:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dTngr2Ftdz42H8 for ; Sun, 14 Dec 2025 15:49:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765727384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OZ2ugbJF4QYj8Mj1XlvyKnXWVRgjpXgOQdSUtUN3XxY=; b=C4iwMlRM95HaOuyhb8QJuvEuzXazvCnPTC2D31j/aOPS03VDvEhDVjVTJlqwRMArog5Ad/ JCSdN6Fh5xEGH1CzyG5ZeLtWAIu6xQr+O1RIGDo+KL2lgVOO7rgH7jDuCyHLwHGv2oj8Cs ribASjplpEurPb29bXEivamdKyF6uAsO5KlSMql4fQ9gJTRlCksQfD7wCc6+efrl1z4rHY BfRh5RYtwaR2rJOBVlxFOfuIckO+ytdRYk1PF+CFw6o0Vw0Y5cZNTaJ0WD/jkLBGr+Tlds DBySnS8zCaEKGPQhFQZvIgcs2FUT/VI+PhnwIHrHXmZOufx12oWBKFLj+QXXUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765727384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OZ2ugbJF4QYj8Mj1XlvyKnXWVRgjpXgOQdSUtUN3XxY=; b=FbxQPMj3GXtAy/Vs51WmSeJePjbyiJ3hdbvxrAHCqvUUxpSAhgKdWSjgE7VUkP5cgdGnT7 uG0mDhQcW8WW3S+I4KmwccNk6B7ajeJa8ST+6LAyc+/JswfzX7IJ7qtv+OHDTKbrVFuvPB tndU3QYPtNx9PLdwG3WOkZ7SI/WAuYv83f3zmPxQquwpxngcBFYhEr9hwCZ+nF2v4sOKR8 /G9UavUDJhT8dh+yByCUw5NImIjrs4MnuR9IvCCwV4EXO5/YZWdA6TLVJBtfZU+TDpdSYe /lrD527R1RhaX2ohhUi2n0EwmcUoyK0XLpol+liQAuH5lkPlWVGm2/HCOaS1GA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765727384; a=rsa-sha256; cv=none; b=FK+2Dl8QfBM6VpxZbc1/lypzJlq0nql/4HHkS7fmxxEgCRw2NPfMF26ieUgkidUJwAccGr mC3TJwKGouGY44r6paAfa/s3fr+WMBjJCUaW5ZWpJeaO7p8aUKI3bgMm1r7wXW48n3Jq9b j9OJtu72YZ8mXk2tMmXOQiMWgJPNf5g+ApCv9LU+ynUa4hL00V4BMQV89VRxy47rXZ3UZ9 v1EHUxnVryRIIUSi7BkkFTjnT7mfwikdYShowRbPTWYXJOn9tpK9nM8UdQ7GXGxxmtoGK+ H7ZhEZ0hIvaglqJvqeLzqYWwsiNy3VlYsmYxGLvk35bcWQepHbBEaJftiPy+Jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dTngr1sWvzg1d for ; Sun, 14 Dec 2025 15:49:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33cb7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 14 Dec 2025 15:49:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 796abca7e281 - main - pfsync: Avoid zeroing the state export union List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 796abca7e281f0d4b7f72f48da4f941e1c8b139c Auto-Submitted: auto-generated Date: Sun, 14 Dec 2025 15:49:44 +0000 Message-Id: <693edc98.33cb7.439a1cad@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=796abca7e281f0d4b7f72f48da4f941e1c8b139c commit 796abca7e281f0d4b7f72f48da4f941e1c8b139c Author: Mark Johnston AuthorDate: 2025-12-14 15:48:27 +0000 Commit: Mark Johnston CommitDate: 2025-12-14 15:48:27 +0000 pfsync: Avoid zeroing the state export union pfsync_state_export() takes a pointer to a union that is in reality a pointer to one of the three state formats (1301, 1400, 1500), and zeros the union. The three formats do not have the same size, so zeroing is wrong when the format isn't that which has the largest size. Refactor a bit so that the zeroing happens at the layer where we know which format we're dealing with. Reported by: CHERI Reviewed by: kp MFC after: 1 week Sponsored by: CHERI Research Centre (EPSRC grant UKRI3001) Differential Revision: https://reviews.freebsd.org/D54163 --- sys/net/pfvar.h | 8 ++++++-- sys/netpfil/pf/if_pfsync.c | 15 +++++++++------ sys/netpfil/pf/pf_ioctl.c | 33 +++++++++++++++++++++++++++------ 3 files changed, 42 insertions(+), 14 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 90e926ef3cb1..daaa2d3cddf7 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1341,8 +1341,12 @@ VNET_DECLARE(pflow_export_state_t *, pflow_export_state_ptr); #define V_pflow_export_state_ptr VNET(pflow_export_state_ptr) extern pfsync_detach_ifnet_t *pfsync_detach_ifnet_ptr; -void pfsync_state_export(union pfsync_state_union *, - struct pf_kstate *, int); +void pfsync_state_export_1301(struct pfsync_state_1301 *, + struct pf_kstate *); +void pfsync_state_export_1400(struct pfsync_state_1400 *, + struct pf_kstate *); +void pfsync_state_export_1500(struct pfsync_state_1500 *, + struct pf_kstate *); void pf_state_export(struct pf_state_export *, struct pf_kstate *); diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index b571734b4250..3edf08aefeb5 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -1900,25 +1900,28 @@ pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t data) static void pfsync_out_state_1301(struct pf_kstate *st, void *buf) { - union pfsync_state_union *sp = buf; + struct pfsync_state_1301 *sp; - pfsync_state_export(sp, st, PFSYNC_MSG_VERSION_1301); + sp = buf; + pfsync_state_export_1301(sp, st); } static void pfsync_out_state_1400(struct pf_kstate *st, void *buf) { - union pfsync_state_union *sp = buf; + struct pfsync_state_1400 *sp; - pfsync_state_export(sp, st, PFSYNC_MSG_VERSION_1400); + sp = buf; + pfsync_state_export_1400(sp, st); } static void pfsync_out_state_1500(struct pf_kstate *st, void *buf) { - union pfsync_state_union *sp = buf; + struct pfsync_state_1500 *sp; - pfsync_state_export(sp, st, PFSYNC_MSG_VERSION_1500); + sp = buf; + pfsync_state_export_1500(sp, st); } static void diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 6774aaac2ecd..9856842c72b2 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -4118,8 +4118,7 @@ DIOCCHANGERULE_error: goto fail; } - pfsync_state_export((union pfsync_state_union*)&ps->state, - s, PFSYNC_MSG_VERSION_1301); + pfsync_state_export_1301(&ps->state, s); PF_STATE_UNLOCK(s); break; } @@ -4185,8 +4184,7 @@ DIOCGETSTATES_retry: if (s->timeout == PFTM_UNLINKED) continue; - pfsync_state_export((union pfsync_state_union*)p, - s, PFSYNC_MSG_VERSION_1301); + pfsync_state_export_1301(p, s); p++; nr++; } @@ -5795,11 +5793,10 @@ fail: return (error); } -void +static void pfsync_state_export(union pfsync_state_union *sp, struct pf_kstate *st, int msg_version) { const char *tagname; - bzero(sp, sizeof(union pfsync_state_union)); /* copy from state key */ sp->pfs_1301.key[PF_SK_WIRE].addr[0] = st->key[PF_SK_WIRE]->addr[0]; @@ -5932,6 +5929,30 @@ pfsync_state_export(union pfsync_state_union *sp, struct pf_kstate *st, int msg_ pf_state_counter_hton(st->bytes[1], sp->pfs_1301.bytes[1]); } +void +pfsync_state_export_1301(struct pfsync_state_1301 *sp, struct pf_kstate *st) +{ + bzero(sp, sizeof(*sp)); + pfsync_state_export((union pfsync_state_union *)sp, st, + PFSYNC_MSG_VERSION_1301); +} + +void +pfsync_state_export_1400(struct pfsync_state_1400 *sp, struct pf_kstate *st) +{ + bzero(sp, sizeof(*sp)); + pfsync_state_export((union pfsync_state_union *)sp, st, + PFSYNC_MSG_VERSION_1400); +} + +void +pfsync_state_export_1500(struct pfsync_state_1500 *sp, struct pf_kstate *st) +{ + bzero(sp, sizeof(*sp)); + pfsync_state_export((union pfsync_state_union *)sp, st, + PFSYNC_MSG_VERSION_1500); +} + void pf_state_export(struct pf_state_export *sp, struct pf_kstate *st) { From nobody Sun Dec 14 15:49:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dTngs2QdZz6KP7Q for ; Sun, 14 Dec 2025 15:49:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dTngr6MTsz4224 for ; Sun, 14 Dec 2025 15:49:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765727384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bl/UMKvJzhRtL7cFU6e/4QC2FsPm9zyO6KLZhScXEjU=; b=DNAl80eeoc+EAfw/WNaXJXEeD+OzalVpLsryui7coqlJFZzHoKWN5/7hYPlsCx0DAZUksf HOZOUdSw//88rjlW7QeXrk4x4+yO5KwE0GCIyxYZmlaWfSMAtOwRpVaAkGZwaZjJTmH8B4 duXD2OX/OEbFLX/kc3ohucZTKy4xzDP+WLtVuJGS4NWpXrULg6Gc7eCZ720CXw8NIeJELs w+MifJ2soPKhP0us4ocU2JbQ4iyYjQ/zzDCdfOA6q4zz7kaNwrvcQ75Y1/pmuPgfX34oC2 cb6Zfn84hInDGMgHl/u+kCasxFxqYVUHejKyToqRsM+y3DYsUCp/6V5ZaSOdXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765727384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bl/UMKvJzhRtL7cFU6e/4QC2FsPm9zyO6KLZhScXEjU=; b=wTNavI5l1bGBOnhCZOG0te8IL2Vht+8pITTZ4oIcMwZaV2ugDdyC/TEvdF2MDZGhbCFE0R q5fXy18d045jBzbZxvzytzEeOAjwaZS95OK41SidLBdimwaVJepk9hEmCaAhDDnyf4FwVe OXjD1ApdIGovb9p/RlremW2lqTPkv5wCqwXCM+Sxzhlbta6QFTpJMradF0G3BWczpU9Mn+ fdMf4NlgTqAaOHq1QHiK/hvwaewlIVc/BZKFjMpFDcSTkDEAGzxKhGIkXMKyvhQUjqO2sn OjLC012bjpVf/MST+w3ka2YSPE45om/bRJCn74V6m72LC2+vd9kWdoDHdkv6gQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765727384; a=rsa-sha256; cv=none; b=D43k5ajEuStvSYL4DmCIS4Uf5S2S0H6/oEBCQqEBi+3OYX6d3cSJlA3zZqOGUoHfm35P/D 9WP1+4t28vNyDYfFWdV0C1+ugygYzQz+e8rkh3EW61D/QfhYrWfcdty3PYCa+/owxVi70f xa/zS4jmgHZVeRFtL9QvQVUZox/6H5CrxWrwXvkSjgjbG9nH/fwp1PhNjABObIgs+HVC7Q O7/QvCh9rYHCRj0TUVSmkM46nnr3EknpiZ9xplJgJVhhJdqn9F//HSiawaMofkl6v+2R18 U6Iv5ZA8/CuWhAT0IA3zOp7PYOs6AsgqW2FNI/X79o5C4qHgQRCGqss0kmkhTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dTngr5hbJzgjT for ; Sun, 14 Dec 2025 15:49:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32bb6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 14 Dec 2025 15:49:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 9734ca05b9b4 - main - RELNOTES: Add entries from this week's scan of the commit logs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 9734ca05b9b481ae4f812ee39338782e7c2c1dda Auto-Submitted: auto-generated Date: Sun, 14 Dec 2025 15:49:39 +0000 Message-Id: <693edc93.32bb6.1dd1db2a@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9734ca05b9b481ae4f812ee39338782e7c2c1dda commit 9734ca05b9b481ae4f812ee39338782e7c2c1dda Author: Mark Johnston AuthorDate: 2025-12-12 18:26:13 +0000 Commit: Mark Johnston CommitDate: 2025-12-14 15:46:51 +0000 RELNOTES: Add entries from this week's scan of the commit logs Reviewed by: emaste, imp Differential Revision: https://reviews.freebsd.org/D54197 --- RELNOTES | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/RELNOTES b/RELNOTES index 2400b74d1e8c..a78b9cdca164 100644 --- a/RELNOTES +++ b/RELNOTES @@ -9,3 +9,53 @@ specified as a comma separated list and/or range, followed by a colon and a newline. Entries should be separated by a newline. Changes to this file should not be MFCed. + +dbac191956f9, fe21dbf70aa8: + Support for the kcmp(2) system call and fcntl(F_DUPFD_QUERY) for Linux + binaries. + +a86dc94b84d1: + tzdata2025c was imported. + +a98e5d785001: + Add strdupa(3) and strndupa(3) macros for compatability with glibc. + +e967a2a03677: + divert socket compat removal, consumers must use PF_DIVERT instead of + PF_INET. + +4453ec5b8716b, 2a3b1641756a: + The reboot(8) and halt(8) commands now perform a graceful shutdown similar + to the shutdown(8) command including invoking rc.d scripts to shutdown + services. The fastboot(8) and fasthalt(8) commands still perform a "fast" + reboot or shutdown. + +d9788eabffa4: + ipfilter cannot be used in a jail by default. + +0ff0c19e7f70: + ipfs(8) is no longer built by default. + +575efcfff22f: + sendfile(2)'s SF_SYNC flag was removed. + +057dae35ffc6, 51a01f3debff, ca3e47b0ea68: + hwpmc(4) support for Intel Alder Lake 6-B7, 6-BA, and 6-BF CPU + hwpmc(4) support for Intel Emerald Rapids CPUs + hwpmc(4) support for Intel Alder Lake-N CPUs + +1ecf01065b45: + New library libuvmem provides the vmem(9) API to userspace applications. + +b6cad334e64: + Make game controller devices accessible by members of the "game" group + by default. + +791c531402bd: + Add driver for Feature Integration Technology Inc. (aka Fintek) F81232 + USB to serial devices. + +ec0cd287f55f: + Support for NVMe/TCP offload on Chelsio T7 adapters. The nvmf_che(4) + module enables T7 adapters to process NVMe/TCP PDUs directly similar to + the PDU offload provided by cxgbei(4) for iSCSI. From nobody Sun Dec 14 16:08:16 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dTp5D445rz6KQj0 for ; Sun, 14 Dec 2025 16:08:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dTp5D2WsBz44gv for ; Sun, 14 Dec 2025 16:08:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765728496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WLd2XQCqWrnhjIt6437VfAW55OPwOUBhVPCdn85q1Rw=; b=nlYu1Dyxa1nSR0uyUric0O4wbSS6lRXbcSg2bEkT4RXE67TmSUF1lRvAlQg9V3XJyO6lfA hiQ3Cov0V9AsAAySaY7lmXTeGAA3LAafTe/tkb1ES7teKkT/E1vaJh16thpGYKeRcgHlh9 BujaAcUieGhUiVr4pEmc4HGx3NUwRXHdXoYBHqwb98bib4fwFlVesqn+DB9wlD9gPdNeZS R2A/A5Wib5Of0vMW31SrmGBuUXCDzVA6iPtx0/lfE5IXhPCN8VA/nfcfv+gB8YHKfhJTbl kMeJIRCwkT3DMPFUuXLpcIVvJ6obaPIdhxLj81Kxixq7tG7dD80C0UsjPOAoOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765728496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WLd2XQCqWrnhjIt6437VfAW55OPwOUBhVPCdn85q1Rw=; b=juhoZOmADH2sGfOwWbPJ4/6GcHg1AfPjdB/5Ok28g9qqZxlAZzQBNF5YjgLnPU5GNhfZJM mYxCwZNZNRtS1YPlCwjwEnzsWP/2DHo12KryIf3/8IRpPss5+LHv6rIiErNjJsPnII4Mfm yjE4mDiRU1KlGzj4AAR3oDsaBz8i4zqacYweZJtxFqhXOIBL4X2y+upKpuP6BevAnfEeuH +FcopKkc2MMsaqV/dfLQ28wQoV0c/QuNXxVBHBHgyTtQGES7cIHWpe1EbDwVT+Hc4kJ/NI up96m4PpM9v1P70uEhywwc+oEQLhkIjLhx8XYgRuNxYQ+X+e6y3NyeZj/VjM1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765728496; a=rsa-sha256; cv=none; b=dMidctle20wyR/BgIphiZFnEf5S2CBBnipbVQteMJvB9QhvM5aQKa6XVNwhRwaqJWF4cD4 o7PBfVezU9bOF93Dgaci0fgNLR0S98PlinvPPoACyomW/FbXzufDgTJjm53ZamZQxLFxNz JUFXRaO/tevbYWk9/Iz+2kpwxII7tnrFfeKxVNaWJ/rsskGcWCYebhWrMlx1bk6T5PKwdD wbvNGdG7EeMW//ic8FEabG05HXWKLb7PsYpNKzCPdRVW2Br8tmiKBKo9pemLGYeLEbkliH FS7Hig1oOSxhqS+xGSl0edmLya5ihvXYMZGHUj+QTWZGgFYBQjj3zruQ9RLTWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dTp5D1c0bzgqW for ; Sun, 14 Dec 2025 16:08:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36305 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 14 Dec 2025 16:08:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 123c08620049 - main - libc/tests/string: improve stpncpy() "bounds" unit test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 123c086200491819595abc271d360e605288fd18 Auto-Submitted: auto-generated Date: Sun, 14 Dec 2025 16:08:16 +0000 Message-Id: <693ee0f0.36305.6925ea64@gitrepo.freebsd.org> The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=123c086200491819595abc271d360e605288fd18 commit 123c086200491819595abc271d360e605288fd18 Author: Robert Clausecker AuthorDate: 2025-12-04 16:34:59 +0000 Commit: Robert Clausecker CommitDate: 2025-12-14 16:05:30 +0000 libc/tests/string: improve stpncpy() "bounds" unit test The test is extended the same way I previously extended the memccpy() test to fix what is probably the same kind of bug. PR: 291359 Reported by: Collin Funk Reviewed by: ngie Approved by: markj (mentor) Fixes: 6fa9e7d8737548ef93c573387ce62402c368d486 (D42519) See also: 61ed5748e4e9c7397fcb2638b442f46ac5c9e7c5 (D46051) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54169 lib/libc/tests/string/stpncpy_test.c: apply ngie's fixes --- lib/libc/tests/string/stpncpy_test.c | 55 +++++++++++++++++++++++++----------- 1 file changed, 39 insertions(+), 16 deletions(-) diff --git a/lib/libc/tests/string/stpncpy_test.c b/lib/libc/tests/string/stpncpy_test.c index 8574b2d591be..2dfd932d45dc 100644 --- a/lib/libc/tests/string/stpncpy_test.c +++ b/lib/libc/tests/string/stpncpy_test.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2009 David Schultz - * Copyright (c) 2023 The FreeBSD Foundation + * Copyright (c) 2023, 2025 The FreeBSD Foundation * All rights reserved. * * Portions of this software were developed by Robert Clausecker @@ -52,34 +52,57 @@ makebuf(size_t len, int guard_at_end) buf = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE, MAP_ANON, -1, 0); assert(buf); if (guard_at_end) { - assert(munmap(buf + alloc_size - page_size, page_size) == 0); + assert(mprotect(buf + alloc_size - page_size, page_size, PROT_NONE) == 0); return (buf + alloc_size - page_size - len); } else { - assert(munmap(buf, page_size) == 0); + assert(mprotect(buf, page_size, PROT_NONE) == 0); return (buf + page_size); } } static void -test_stpncpy(const char *s) +freebuf(char *buf, size_t len, int guard_at_end) { - char *src, *dst; - size_t size, len, bufsize, x; + size_t alloc_size, page_size; + + page_size = getpagesize(); + alloc_size = roundup2(len, page_size) + page_size; + + if (guard_at_end) + munmap(buf + len + page_size - alloc_size, alloc_size); + else + munmap(buf - page_size, alloc_size); +} + +static void +test_stpncpy(const char *s, size_t size) +{ + char *src, *dst, *expected; + size_t bufsize, x; int i, j; - size = strlen(s) + 1; for (i = 0; i <= 1; i++) { for (j = 0; j <= 1; j++) { - for (bufsize = 0; bufsize <= size + 10; bufsize++) { - src = makebuf(size, i); - memcpy(src, s, size); + for (bufsize = 0; bufsize <= size + 32; bufsize++) { dst = makebuf(bufsize, j); + if (bufsize < size) { + src = makebuf(bufsize, i); + memcpy(src, s, bufsize); + expected = dst + bufsize; + } else { + src = makebuf(size, i); + memcpy(src, s, size); + expected = dst + size - 1; + } + memset(dst, 'X', bufsize); - len = (bufsize < size) ? bufsize : size - 1; - assert(stpncpy_fn(dst, src, bufsize) == dst+len); - assert(memcmp(src, dst, len) == 0); - for (x = len; x < bufsize; x++) + assert(stpncpy_fn(dst, src, bufsize) == expected); + assert(memcmp(src, dst, MIN(bufsize, size)) == 0); + for (x = size; x < bufsize; x++) assert(dst[x] == '\0'); + + freebuf(dst, bufsize, j); + freebuf(src, MIN(bufsize, size)); } } } @@ -140,12 +163,12 @@ ATF_TC_WITHOUT_HEAD(bounds); ATF_TC_BODY(bounds, tc) { size_t i; - char buf[64+1]; + char buf[64]; for (i = 0; i < sizeof(buf) - 1; i++) { buf[i] = ' ' + i; buf[i+1] = '\0'; - test_stpncpy(buf); + test_stpncpy(buf, i + 2); } } From nobody Sun Dec 14 16:08:17 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dTp5F4KH8z6KQgZ for ; Sun, 14 Dec 2025 16:08:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dTp5F2nJ4z44mh for ; Sun, 14 Dec 2025 16:08:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765728497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2QrF4E7ahVVxkEQEY9YGJ9lJMDXnxF2NS9Tl7migrNw=; b=M79YT8zGea16ifmQvODGCV42WIQXAxeWAB4sd7ssWSYn9fXKGybSBUld7i49+/aXjSnv7B zoAAryrAnALBMja9TLG7HQMjmQYKpvTMA9QmTl4swVBIFyDwj6OKEYJuL9+AyVf/MeUvni LM0Wf2b2lmCOTZwwEwgHKn9BXt3WNN5IHVyPl+5kr1nNKfMyW8l/FKCiex3CDLh2ZJMG0h A+au+COejlT7BDTe09NWJig9JL8JtrYQoh6tOMQl64BxwwKTWbrhIypzeJtcy4MH2BdaT4 ozpypID0q6JKT+OortRwdlevPBSH1AX11/mVM6Bgy/V74pigwSFh7N2CB6OwZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765728497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2QrF4E7ahVVxkEQEY9YGJ9lJMDXnxF2NS9Tl7migrNw=; b=JsESMX8bIzgzPT6UZ3unnyQHWqCA/gXQhpxcLOmDvO4XF7QFV3PRQ9GE/bfE5nuRLHi2Uj awwnLwW0zEqWuy89tOJcKdoRDLHzpc01UJNw1GTnkCn6WAO/PQYDcn6d3kPw71Dy4nZn1p 05PxIqvQDIgkYt36Ka8SMxUrvS8KJ5hkSMdhp20v0wjUSeLb2OwrByHKKnq7dVmq6hKp2h H4SrwzmCELkhF8SP6OcJRDtcn3otDJxuiEGuSttz00/x/It5r/Z+aoF0O9t2IoG22rrK/Y 9LesLSp7KIhzHZtqp+6zDGlL00TN9XvA4cN4FsVzuUy+KLuf5ZncTsdqh3ubGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765728497; a=rsa-sha256; cv=none; b=docanDbZMp2IFHcgJ+qdmVqBs2WGs2edZOVvXAsw7JXhL/Sy9NS5HCiptO60ClaqYaRR9q rjRNZBhp01+3g6w2ceH81C/sfWICvTnVyehUTH1E9s/T4y1772RA4OUL7azLtLyY/wg0R6 PLx7SMd6g0Mj2i6YYB0BJ4+tDlYxbesMdHCUI8Kl01ki80GxZG99tmoTXJ3AfxvrBnos4R G2VKTL+y8mRuRgTro8r47muZyIVKtIlHRQ+pWkGGzxcHl89zwMumeN6RxptoLa40hNG7mH ZOP3NHNqV4LYgexyni47mo3C6yvDEz7sooOp4iG6uoO++72Veroibakop25HFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dTp5F2KGjzh4J for ; Sun, 14 Dec 2025 16:08:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3662d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 14 Dec 2025 16:08:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 66eb78377bf1 - main - libc/amd64: fix overread conditions in stpncpy() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 66eb78377bf109af1d9e25626bf254b4369436ec Auto-Submitted: auto-generated Date: Sun, 14 Dec 2025 16:08:17 +0000 Message-Id: <693ee0f1.3662d.650a5e21@gitrepo.freebsd.org> The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=66eb78377bf109af1d9e25626bf254b4369436ec commit 66eb78377bf109af1d9e25626bf254b4369436ec Author: Robert Clausecker AuthorDate: 2025-12-10 20:45:18 +0000 Commit: Robert Clausecker CommitDate: 2025-12-14 16:06:05 +0000 libc/amd64: fix overread conditions in stpncpy() Due to incorrect unit test design, two overread conditions went undetected in the amd64 baseline stpncpy() implementation. For buffers of 1--16 and 32 bytes that do not contain nul bytes and end exactly at a page boundary, the code would incorrectly read 16 bytes from the next page, possibly crossing into an unmapped page and crashing the program. If the next page was mapped, the code would then proceed with the expected behaviour of the stpncpy() function. Three changes were made to fix the bug: - an off-by-one error is fixed in the code deciding whether to enter the runt case or not, entering it for 0 Reviewed by: getz Approved by: markj (mentor) MFC after: 1 week Fixes: 90253d49db09a9b1490c448d05314f3e4bbfa468 (D42519) Differential Revision: https://reviews.freebsd.org/D54170 --- lib/libc/amd64/string/stpncpy.S | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/libc/amd64/string/stpncpy.S b/lib/libc/amd64/string/stpncpy.S index 5ce0dd093a9e..df22bb9f0c53 100644 --- a/lib/libc/amd64/string/stpncpy.S +++ b/lib/libc/amd64/string/stpncpy.S @@ -100,7 +100,7 @@ ARCHENTRY(__stpncpy, baseline) movdqa (%rsi), %xmm0 # load head and $0xf, %ecx # offset from alignment mov $-1, %r9d - lea -32(%rcx), %rax # set up overflow-proof comparison rdx+rcx<=32 + lea -33(%rcx), %rax # set up overflow-proof comparison rdx+rcx<=32 shl %cl, %r9d # mask of bytes belonging to the string sub %rcx, %rdi # adjust RDI to correspond to RSI pxor %xmm1, %xmm1 @@ -223,8 +223,9 @@ ARCHENTRY(__stpncpy, baseline) /* 1--32 bytes to copy, bounce through the stack */ .Lrunt: movdqa %xmm1, bounce+16(%rsp) # clear out rest of on-stack copy - bts %r10d, %r8d # treat end of buffer as end of string - and %r9w, %r8w # end of string within first buffer? + bts %r10, %r8 # treat end of buffer as end of string + and %r9d, %r8d # mask out head before string + test $0x1ffff, %r8d # end of string within first chunk or right after? jnz 0f # if yes, do not inspect second buffer movdqa 16(%rsi), %xmm0 # load second chunk of input From nobody Sun Dec 14 16:48:20 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dTpzS6TxVz6KV6w for ; Sun, 14 Dec 2025 16:48:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dTpzS5dRWz497p for ; Sun, 14 Dec 2025 16:48:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765730900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GkvKn2LBELfN/Og1nItGXWs4NY4KZwsxP67kq3NcoS0=; b=m7lAK4CCZPGLkbwrsNrZGpEJ/kGKrnYBQNd3J3TtmQWOVsw3tbDdoNSZdy8dDDC48HQMJk EG7VNg1WMJoi3wSuOFPNgIUlVuEPVgAkYSEEC+1yH6xze/7aFKwY7+kXcxqzPN8Mk8Hlwr wPLdGNoh62cABB6AUthHxdDNhdG3RrC87iNA3i8slDBzaHLDDK9/dtjXjg+yXzwYPW53LL gnlnaY+/9WR77opFO5ZtbcDMTBX9mttcySK6pUN8BTkjkfEtFeAJgsWvSAcSPXtdj8/1hr ZswXiyejXAT5zXZ1rV7Cw7W5Cz2QV2pPiBNYWmuv86wL52y0JJs+dlGRm1bzkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765730900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GkvKn2LBELfN/Og1nItGXWs4NY4KZwsxP67kq3NcoS0=; b=Ww5FN/QV2X6psBJhmPqZqSoP4JoOVw0kACQKJ/ORWfLQKeMQEgbncvCunrDAlaq15hKxCA imLUZG9M1Kb02OSF5Ok8/GngZYKXG14D56jPUh10AjZOBDKRMx/o50tqKL91La7ZkwDLO6 PiIf6t7kkpTS8u3+SXNVDXHxw2MafFTb1boDB0lguJjJ6tUB/t+K2XiMvqp+ijXTBU9S+N 8TW/Px9nmQCnv2k07BNSQetTSEYH1b8b0jqCa60jO8V/oOWLsCShgvqnr2UINzmlOo9MiB mzb28hcaos8fTnTRGWNfRlJFmuSSYZl+KOhnqCr730zGStgsX48CA0H6BHLEag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765730900; a=rsa-sha256; cv=none; b=dA/TtTFgdyB7McpKmDeW89DTMgelhAutzw0Y6+DtshJzuJpmJHglXBG1gm3ROMn4xtp4+v FRnJByxJGnL1H5SXhe1ByMuFCoPblhXu7b4tKbwz7vE9Hsgu+gr4SIEjdliwfqOQD/dSTh 6sOu29nrzV5bIDmxPiVgISJCBcc+EDbqXRdE7dWEFnEv9dpZIizGdg/LUvcm44ENYOi6H+ Y1KSdOCoGvILPuubn4nfnDELn25lM5wLwmoRe1fmeXQGnlSogySYIaw7o4DqBpzXgImIBw J8KsR7ZUAU9c8/p5mFJmyfYEXGgm92cPiPInIf2jok9nXPVVTthy66VS/OSb4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dTpzS4tT9zj5v for ; Sun, 14 Dec 2025 16:48:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 83ee by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 14 Dec 2025 16:48:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 5917f9571dab - main - login.1: Remove mention of login copyright display List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: 5917f9571dabddf28f95d15c17b65dc163628d44 Auto-Submitted: auto-generated Date: Sun, 14 Dec 2025 16:48:20 +0000 Message-Id: <693eea54.83ee.78ee0ac1@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5917f9571dabddf28f95d15c17b65dc163628d44 commit 5917f9571dabddf28f95d15c17b65dc163628d44 Author: Ed Maste AuthorDate: 2025-12-14 16:43:51 +0000 Commit: Ed Maste CommitDate: 2025-12-14 16:48:06 +0000 login.1: Remove mention of login copyright display PR: 291649 Fixes: 905571c03119 ("Remove copyright strings printed at login time via login(1) or sshd(8).") --- usr.bin/login/login.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/login/login.1 b/usr.bin/login/login.1 index 8c24c4bda9f0..5dbe307e5dd3 100644 --- a/usr.bin/login/login.1 +++ b/usr.bin/login/login.1 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 29, 2022 +.Dd December 14, 2025 .Dt LOGIN 1 .Os .Sh NAME @@ -87,7 +87,7 @@ file. .Pp Immediately after logging a user in, .Nm -displays the system copyright notice, the date and time the user last +displays the date and time the user last logged in, the message of the day as well as other information. If the file .Pa .hushlogin From nobody Sun Dec 14 17:07:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dTqPH3l3Kz6KWPj for ; Sun, 14 Dec 2025 17:07:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dTqPH348jz4CMM for ; Sun, 14 Dec 2025 17:07:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765732035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IPdpKlouS4wkgRKnOoeGOVIToQWYe7gg76m6JJEB7Ik=; b=QpK7iPkj5Yzr+b9gxyfer6Xb2ZeCvhWtLQrdf21t6cw/2wdpE+VEP6ChQfy3U2aq3eaQ/2 qFKJADW7jI0VsBc3qM/KoM4+ZjdRG5XvKgmoF5dD6mq20meEgdrASYmwvv25lOCedXqIcd SxIiDV4LYhbBIOsLGNuF8MpXiTb8e4BDCWKMTGkOoBJdTx3UZHM9SDF2WGEFFPXFSehleM tvxnnAhZ3D/Wa5Yo/JElrAoh8dISMDourTp57FWNCTM55wPFyfSjW+IFd3Bz/Rl1GgeDi1 yn8SiiBdevhgF9UJyPZYRkXPD5qw1GoWxUv1xAdPQKXZHdXpBBIZ6py99d3M6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765732035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IPdpKlouS4wkgRKnOoeGOVIToQWYe7gg76m6JJEB7Ik=; b=vlGB14SSUm96FvmotdLEQH6qVL5aIhUQL05rEafyPygCXF07R5gsAfE846ubXA1Aqk5sOV oPPyw2eJCsnGfUTet/8sfo0zIUgZVnfiVXz1rTNbltHgGZHb5cJnctIDRQFjp1CqXzh9bx RQ5a/8jjQb3kE4JZR3S6YF/h11QcCOc7CWwx3hwTuw7vfXa2zes41/NjSADLfVZmcDEFg6 VgGy9JZk3u89et3++u9MGBM139UbCGlfmnCwOpTHnF2X8yzeQShZn8M7GGj4rMceC9oe7k Q8h3pvpRmOygWupnWDQCKofb29Duh5gJ56GdBmDd90sWq1YhzqzcP0Pl/wJkTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765732035; a=rsa-sha256; cv=none; b=KsKnF9TJuRxXMtkYzzktUuPw92A+XDkPd2hgaNYCQZgxYEE0U7lrneDB0zBmeT2pmm0icx jk7pc0i5DhJQQlumZADNGaJmnsu9EPpV2SfwJsVu++AQSsvCOyRFaDOdgQJzy3wvlAUW5N lBTpHWAuGIgxUh6ve67BsYfjd5hJwN9S9g0kCMLjcujFcr9Wp4Qc6QwuE/SQdsGs1ykLV2 HXFqSB7QXZZRpIxZdVGuuExhSxJ4ZO/DoraTE10oxL8g1Y3Ox2cV+N72+tzQOevLR04Gw/ b/OWjamMU2r2eDus8nRJDDvAOvXpLphLCEoKF8ukxMdFre+M8DiZKQmOv73EJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dTqPH1gt2zjqQ for ; Sun, 14 Dec 2025 17:07:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id b3fd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 14 Dec 2025 17:07:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 8be864282609 - main - libc/test: fix typo List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8be8642826099368208efb2c1222f2a102cc5b08 Auto-Submitted: auto-generated Date: Sun, 14 Dec 2025 17:07:15 +0000 Message-Id: <693eeec3.b3fd.7b4cb3fb@gitrepo.freebsd.org> The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=8be8642826099368208efb2c1222f2a102cc5b08 commit 8be8642826099368208efb2c1222f2a102cc5b08 Author: Robert Clausecker AuthorDate: 2025-12-14 17:05:07 +0000 Commit: Robert Clausecker CommitDate: 2025-12-14 17:06:40 +0000 libc/test: fix typo I misapplied ngie's recommended correction. Fixes: 123c086200491819595abc271d360e605288fd18 Differential Revision: https://reviews.freebsd.org/D54169 --- lib/libc/tests/string/stpncpy_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/tests/string/stpncpy_test.c b/lib/libc/tests/string/stpncpy_test.c index 2dfd932d45dc..7fabe17bfe4a 100644 --- a/lib/libc/tests/string/stpncpy_test.c +++ b/lib/libc/tests/string/stpncpy_test.c @@ -102,7 +102,7 @@ test_stpncpy(const char *s, size_t size) assert(dst[x] == '\0'); freebuf(dst, bufsize, j); - freebuf(src, MIN(bufsize, size)); + freebuf(src, MIN(bufsize, size), i); } } } From nobody Sun Dec 14 17:54:11 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dTrRX4hwdz6Kb7R for ; Sun, 14 Dec 2025 17:54:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dTrRX3BmCz4J7f for ; Sun, 14 Dec 2025 17:54:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765734856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PPsxVZyTP02jONLGOTlg3WRDtGVarRSVpmnRvm5l6mw=; b=w7VxfrGGPliYpPnZsGAM/Evx/YnImTLgfsRwpqVM8LroLEtfDUWJBeUrcpVzBnb3C+A7+7 f8qbslbCTZpnNb8Zs0Uvo3BM1goG+92+OkL+ngM0sgFc/g0ry3nSqMM8kz81EgaBIciJQ4 Xki+z7aI/EMPZqgmi/2RWOuVgRr36eXI14bqVG7+/F8XjQ6oMdR26AxcCwi7yK7SvcPKcX xWHaFtm0EC3yzqUtsvv6DBJKTqzTwt4eiTUX8sGaBggp9qAczRJKV+cSofIPB7lYCbEO0C 5J/TwzOOKOZmXsIom+6MKm0MXkSJcxE+LiawoNwY76c6nj24GhnYP78TzgaaGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765734856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PPsxVZyTP02jONLGOTlg3WRDtGVarRSVpmnRvm5l6mw=; b=dC8xK7nDmjsj3LM6XQl8Ip6U3OWeEvsRAeYRzUpFpufGZpkPOZcmaNDCYlYkbhn1/wSOy5 S335YyurzVtdMJeonWu2PbS3eBNffsR12zqff6+3L/+FuTKQwdjs1LYrzm23fTwRwaKC9O 35SsE2M3FCDS0o3MNSzZfKGJTOCJJZKhNCLLgyP78rr0sxTUmxEII0RMlQARPTvxXHEi3I K6t1HD40z3E3U0cm0BbPEpYenoQoaXME8CiOAme+Djtfq4S+ryfU8+5eFdlhpKpW5ixFtE MTPJyTwQWPL6s8QQgzupnpLXMw6sDLNfA6MSqjj+gqgzZUXYIq1BrslDTExzag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765734856; a=rsa-sha256; cv=none; b=R1rExG9oAm0RrrLfbNWv3Kbo7LhY4T270wRJZpjhhMg23iNEtXlu+Ev5GVJfgt61uqRbzq PhNXoS0FJWq7ArCMoTgyGJK57uHI3CSMQN5TFcsO1hQfetzz1lj6qAhI/oSM1lPF14Vj3C k8eE00nDF+YxzDDfWzaAQnm1+35rwpd64NPjmVeHXu65ZnwGFpuYqvTXyS02MU8b9MdExW knBC+hjqHjh95tY6O954kbpQBqLhKcS/c8uK5nswExH9M271H/+mJN7/qQW666JNT2dfif Wgr2U/wYh8GPrIejCNNe9/IGsUL8fjaNKttOQtT7EGik/3aRSY0/UEDHFARexA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dTrRX2HFGzksf for ; Sun, 14 Dec 2025 17:54:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2172e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 14 Dec 2025 17:54:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: fa259d156d43 - main - zfs: Merge commit 86b064469dc9c2 from OpenZFS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: fa259d156d43966db95fe0f5cc15a0e6af206ff7 Auto-Submitted: auto-generated Date: Sun, 14 Dec 2025 17:54:11 +0000 Message-Id: <693ef9c3.2172e.2628d6a5@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fa259d156d43966db95fe0f5cc15a0e6af206ff7 commit fa259d156d43966db95fe0f5cc15a0e6af206ff7 Author: Mark Johnston AuthorDate: 2025-12-14 17:20:38 +0000 Commit: Mark Johnston CommitDate: 2025-12-14 17:44:37 +0000 zfs: Merge commit 86b064469dc9c2 from OpenZFS FreeBSD: Fix a potential null dereference in zfs_freebsd_fsync() In general it's possible for a vnode to not have an associated VM object. This happens in particular with named pipes, which have some distinct VOPs, defined in zfs_fifoops. Thus, this chunk of zfs_freebsd_fsync() needs to check for the FIFO case, like other vm_object_mightbedirty() callers do. (Note that vn_flush_cached_data() calls are predicated on zn_has_cached_data() returning true, and it checks for a NULL v_object pointer already.) Fixes: ef4058fcdc01838117dd93a654228bac7487a37c Reported-by: Collin Funk Reviewed-by: Sean Eric Fagan Reviewed-by: Brian Behlendorf Reviewed-by: Alexander Motin Signed-off-by: Mark Johnston Closes #18015 MFC after: 3 days --- sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c index 8a9d23d0d554..05ac77741d4f 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c @@ -5275,7 +5275,7 @@ zfs_freebsd_fsync(struct vop_fsync_args *ap) * Push any dirty mmap()'d data out to the DMU and ZIL, ready for * zil_commit() to be called in zfs_fsync(). */ - if (vm_object_mightbedirty(vp->v_object)) { + if (vp->v_object != NULL && vm_object_mightbedirty(vp->v_object)) { zfs_vmobject_wlock(vp->v_object); if (!vm_object_page_clean(vp->v_object, 0, 0, 0)) err = SET_ERROR(EIO); From nobody Sun Dec 14 20:13:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dTvX50gd2z6KmpW for ; Sun, 14 Dec 2025 20:13:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dTvX46yRFz3MjX for ; Sun, 14 Dec 2025 20:13:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765743205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3fGyzlTUM/EdNG7YMf7b+N0/CNyt+6alVMi4EKc8Y5s=; b=VCFXqei2K6BTjZXaKaLDduNOBP4QbwgY3IHNrjLzaJo+PZA2shAxgGqM3Hw7wue+3t0aop IL2u5BVWuFz2mxe3WhPWiu9NsoXQAAujfFmxPPqj84qu4LgYYTCHqo6akYtJQQO2V9nW/A W+JtLD69X5lPYHgG/Hicmhj7IhHHKodNdLseNjURAT6NiOR7vyLPWDQP1V05GKlURaSlXt iWU8ZNUjXvyVuc8cGKiEFIgIpOMU23g9DFd6E+04rSUuvJS48MXPz6ajAMRuwmbXoQQ0zC dNqZQGHh7oGPwzajYxmRavPcvu/JbsGr35M7wRQZRBPSTrCGxcUWrHoca/uY6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765743205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3fGyzlTUM/EdNG7YMf7b+N0/CNyt+6alVMi4EKc8Y5s=; b=RIeTHyQIheSEFDZIWJBIFPN+waHWqKKMtDqLEHzZRVeNNOQ9lWZDGyq0qeTQS1uUnNPzb5 xJbU+RUDRcR2XQJkpLJ1NfeV3GpC/Xulog03ePSQGDGC86z0saPLuTogpSk05+kdgE67DA TA9bprQ5FUTIB73LpXU58EhkMUoCkyTkg9LMOQ5Ld7YcRM6RiMGzwvpLQ++0lugTHngp5w Amy6Cd/yCsLI4ZSgu87HtOUfgCpPAeBHT135RApk5qC0zbqZx+dyHrskE3kbKnWSvRFPRH 44NMV3EGei2RNFM6D7e0Z/X8UXTxedibmfo+8E0hHXImOSAl2SSsIpk2VPv5gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765743205; a=rsa-sha256; cv=none; b=nnDru61/hNtG2/H0wwBWNRqLu1QmP1HIbuluaflUrxFC218Almeq5Wqo/b6SaJb3x9Dvq9 1aZc2Ook2ClnsFsa0vjChlf8waW8QJyuFeSH201M7E7l5BUEGAHUqqajP6xA+sMoIH7GSz u+wQgVuO0mVzfTXC28EH6CN2iNNZ7unugeiUQJrMZPVTmp6BQdDbQUhYo2/t54miALyGhr RNbx3fhHZAUk62RhFq9prcKYc93PFIjHq0qucFphctBKeQCY85vG4wo0ijGJrRzbKmX/r0 9gsePtZai6/t3B4pDReYm4Pfn/moY+zJwo7TeaFj6Q/jiChkGXvKrmvbeuEbuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dTvX46TfHznv9 for ; Sun, 14 Dec 2025 20:13:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 334bd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 14 Dec 2025 20:13:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: f943454bfbd9 - main - LinuxKPI: 802.11: rework MC/configure_filter List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org 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: f943454bfbd98ce49516c6ede8626b5f2602edc1 Auto-Submitted: auto-generated Date: Sun, 14 Dec 2025 20:13:24 +0000 Message-Id: <693f1a64.334bd.43d4ae57@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=f943454bfbd98ce49516c6ede8626b5f2602edc1 commit f943454bfbd98ce49516c6ede8626b5f2602edc1 Author: Bjoern A. Zeeb AuthorDate: 2025-12-14 20:07:13 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-12-14 20:12:56 +0000 LinuxKPI: 802.11: rework MC/configure_filter (*prepare_multicast)(), for the drivers we support, is iwlwifi(4)-specific. If it is not available do not let us stop from calling (*configure_filter)() at least as well. In addition to the interface setting mc_all_multi, if we have no way to prepare the multicast filter list this way, set FIF_ALLMULTI for now. This seems to help some with rtw89 but does not help me with other drivers yet to get IPv6 link-local (e.g., ff02::1%wlan0) going. This should also help in case we are scanning and are setting FIF_BCN_PRBRESP_PROMISC . We should go and review the full FIF_ list and start adding conditional support for the other options too. Sponsored by: The FreeBSD Foundation PR: 281982 MFC after: 3 days --- sys/compat/linuxkpi/common/src/linux_80211.c | 10 ++-------- sys/compat/linuxkpi/common/src/linux_80211_macops.c | 3 --- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 1d510577f00c..02724433d89d 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1874,10 +1874,6 @@ lkpi_update_mcast_filter(struct ieee80211com *ic) lhw = ic->ic_softc; - if (lhw->ops->prepare_multicast == NULL || - lhw->ops->configure_filter == NULL) - return; - LKPI_80211_LHW_SCAN_LOCK(lhw); scanning = (lhw->scan_flags & LKPI_LHW_SCAN_RUNNING) != 0; LKPI_80211_LHW_SCAN_UNLOCK(lhw); @@ -1887,7 +1883,8 @@ lkpi_update_mcast_filter(struct ieee80211com *ic) flags = 0; if (scanning) flags |= FIF_BCN_PRBRESP_PROMISC; - if (lhw->mc_all_multi) + /* The latter condition may not be as expected but seems wise. */ + if (lhw->mc_all_multi || lhw->ops->prepare_multicast == NULL) flags |= FIF_ALLMULTI; hw = LHW_TO_HW(lhw); @@ -4246,9 +4243,6 @@ lkpi_ic_update_mcast(struct ieee80211com *ic) struct lkpi_hw *lhw; lhw = ic->ic_softc; - if (lhw->ops->prepare_multicast == NULL || - lhw->ops->configure_filter == NULL) - return; LKPI_80211_LHW_MC_LOCK(lhw); /* Cleanup anything on the current list. */ diff --git a/sys/compat/linuxkpi/common/src/linux_80211_macops.c b/sys/compat/linuxkpi/common/src/linux_80211_macops.c index d9e82a6d64ee..a85e6d0d0dd7 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211_macops.c +++ b/sys/compat/linuxkpi/common/src/linux_80211_macops.c @@ -310,9 +310,6 @@ lkpi_80211_mo_configure_filter(struct ieee80211_hw *hw, unsigned int changed_fla if (lhw->ops->configure_filter == NULL) return; - if (mc_ptr == 0) - return; - LKPI_80211_TRACE_MO("hw %p changed_flags %#x total_flags %p mc_ptr %ju", hw, changed_flags, total_flags, (uintmax_t)mc_ptr); lhw->ops->configure_filter(hw, changed_flags, total_flags, mc_ptr); } From nobody Sun Dec 14 21:15:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dTww652Lyz6KsJ3 for ; Sun, 14 Dec 2025 21:15:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dTww636lHz3XVh for ; Sun, 14 Dec 2025 21:15:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765746950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zqv6bHhLusLBzfwdLBJ6o4XPsDIdriZumUc0BhKW73k=; b=x7SZ1pcTGe0NDPO7ZDm0qNOOvbYNddMKNGAdTncwm6tOCBWQQvGoQnUcUSeCHHcBB5ylfK D2w3egbeRNfr1BuvdPixcbAC4YD114vePufTPZDWHjOwfTVwu0g3Uk7vUMeHW/2gXsqIdE HCXu8A6PTuVeQUudyPJqvh9/PfyxhWqnnJD7LpsWmU2OWC9AEVs5jYMJNqmzqxi5giRhRR XGz19qN35p9nRtocr+cZy/TxhvQoE3eK74TIQD1b+Jb0GTx30gLSlN++bOg54GOy37Duje /qPvCYStf7ipu5MeT6d3bfRHYEZp6viu2qeF7i10oB+FM497PXoglayyVDbGTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765746950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zqv6bHhLusLBzfwdLBJ6o4XPsDIdriZumUc0BhKW73k=; b=kmL8QRGDDVzMqzyqClqmsR5fTO5J7TmPpgphzjUabZMeM5OL4S+f4pJC2k3tWXzhvnpriO m/2EttFBic66C21ybfuWt+gqN1cnGZOmcg4kdZ5ZuWem9xAhP6B1nucg2fbtX4F/KP2iXl tBFJXr5Z3WhSqGeXwCUsVmFW1uQb1/da0CSTd6R4izbZZ2BC5A+ergVBiAKdX0oytTvhTU EDJLNbw7LqiIJmmBf5PgE8yGVtssEUH8STC9FR/xzWcBzy2jXi1ODORzEkuI9H4OxcDSEm vyjMIrwclYe3RlNZ+EWYsNAvgHZ5ZUwkiyajcO3LY1v++a8kB+/QLeSzkdhpdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765746950; a=rsa-sha256; cv=none; b=dxFFasmeva+AJgFw7XVCj7moBCS3SuDYPQWrYrr6iri8M4QHKiFTfEgv+eEKyr4Gvc4exI zMZOrsEqdJuL7sH2r5DYcC5XYZlEjyBc3rRJBYCXbwn1ZEj0LUHFVBzFwlPr4k+/oda7y+ 5PA2bECdlpJgHh0PER6sOZDeYMkptNOE2HxLVlO2EJlU04yFilJNapBYNNKhAPOhZPSlNJ FAyJfdIXH/GkEcpCWVQ94gzilwx1d1L6TXPADx/kO9tElViNlOhHnsvCKJyTee7p2SMQX2 S+IMjzV7N2s5IY8FXUK8ACoIQ3om1tP9ME7u2Yhzt2aCZEGJTwjlUIH8CB9o4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dTww61hVpzrBK for ; Sun, 14 Dec 2025 21:15:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38964 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 14 Dec 2025 21:15:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Craig Leres Subject: git: 80726c2257e9 - main - Fix zgrep(1) wrapper regression, add test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: leres X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 80726c2257e9d6d79341aac65ba22987f53619bc Auto-Submitted: auto-generated Date: Sun, 14 Dec 2025 21:15:50 +0000 Message-Id: <693f2906.38964.6123975e@gitrepo.freebsd.org> The branch main has been updated by leres: URL: https://cgit.FreeBSD.org/src/commit/?id=80726c2257e9d6d79341aac65ba22987f53619bc commit 80726c2257e9d6d79341aac65ba22987f53619bc Author: Craig Leres AuthorDate: 2025-12-13 23:43:02 +0000 Commit: Craig Leres CommitDate: 2025-12-14 21:15:36 +0000 Fix zgrep(1) wrapper regression, add test @bdrewery reported D48873 broke "bzgrep -q '1 2' /var/log/messages.0.bz2" The mistake was in using $* instead of "$@" (I suspect $* is never right). Reported by: bdrewery Reviewed by: markj Approved by: markj Fixes: 1070477cc8b7 ("Fix remaining zgrep(1) wrapper script regressions") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54217 --- usr.bin/grep/tests/grep_freebsd_test.sh | 10 ++++++++++ usr.bin/grep/zgrep.sh | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/usr.bin/grep/tests/grep_freebsd_test.sh b/usr.bin/grep/tests/grep_freebsd_test.sh index 906b70645151..eaf3694c2b1e 100755 --- a/usr.bin/grep/tests/grep_freebsd_test.sh +++ b/usr.bin/grep/tests/grep_freebsd_test.sh @@ -117,6 +117,15 @@ color_dupe_body() atf_check -o match:"^ +1 color.out" wc -l color.out } +atf_test_case qflag +qflag_body() +{ + # Test whitespace in argument + printf "1 2 3 4\n5 6 7 8\n" > in + + atf_check zgrep -q '1 2' in +} + atf_init_test_cases() { atf_add_test_case grep_r_implied @@ -124,4 +133,5 @@ atf_init_test_cases() atf_add_test_case gnuext atf_add_test_case zflag atf_add_test_case color_dupe + atf_add_test_case qflag } diff --git a/usr.bin/grep/zgrep.sh b/usr.bin/grep/zgrep.sh index 8bd630726647..474f3868db9d 100755 --- a/usr.bin/grep/zgrep.sh +++ b/usr.bin/grep/zgrep.sh @@ -109,7 +109,7 @@ do grep_args="${grep_args} ${pre}" shift # Put back partial arg - set -- "-${post}" $* + set -- "-${post}" "$@" ;; -[ABCDdefm]) if [ $# -lt 2 ] From nobody Sun Dec 14 22:13:20 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dTyBS3vnPz6KwVN for ; Sun, 14 Dec 2025 22:13:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dTyBS1Xf5z3f3g for ; Sun, 14 Dec 2025 22:13:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765750400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QRCVjuQTrK4VyYGWWkbkwL3ga3clR8Ku8LWUuNOKE1E=; b=tl3rn/KiGo/lq5HdBALbgFEY6JnYL/Pb4KVjF/8cu1rlY+cTSiYLcxW3ihCgSUvdjGnd5Y ksfhvr1a04pCiSUFuF3D2kNCeRDZsDS6B30oW4HcCkkbx5t6e4fEVXC1whtQtDkFI6kxF3 HCQx/PTY6L5PJNYmGDwe1k0yAMOOaqUKvsHH2oIaCmLgzDRNiJ/WCIgSoAy2pUKhtcFcx4 TTdfl5V+eWKTQJBXPTb4c4jRW2R5x4YWE1M9lZFQs3j/kox6wguVyjSUX+yq8ACM3DHeH2 U9qXex+u+yfWTkpV6utiSjq/+GuveD5ixkUuNYbWwkeCJZPPDwWNhJpGGagusg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1765750400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QRCVjuQTrK4VyYGWWkbkwL3ga3clR8Ku8LWUuNOKE1E=; b=oSqEeCqeR4JbCvDqTX5mDTddYJsc1/hP2369JgirZxl+zY0O0BEydbgKQ9Ea0prLuUHNdp uXs9QlYaj8xgeSA1HElQzKHssKEOBKjpvxXiklcBjVWi9YAFKuXeCYkWLSr7J4uS8lK3Ng v/K+Gm3G5182r2Q8AN539/K0CtTCVBUNkTFZ4OA698XtSNRmYH2LnnX119Xyfo5adgrmjK McX2E/HFVOt+QlBta///BNxlM7mG5dpufTgpNcyO2dTAkZewZzUJB73otn4RxUhKLV5a1r w9XSuraEVVb24s1bqvzCtHsNZXB2fh/NDofDeEQ3iFiI+g2ljXcY8QttWnJncQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1765750400; a=rsa-sha256; cv=none; b=FiIAyrHn+Lig0LGJMtQSAIIv39EmvW5TYkn3lnKNDStI1IUZW55Mbw6kPu2zeeEqyMVNiT vi2AKSHD8zfG2khWQoW5t4hOzkBFHItFQ2m4PoLwwDa62krJNNHw+u1zzVsImFHHl+qNqx sW/fxemXziCQq3Rph0CHOovuAo+St2L9OdbI+/O49Qkzv+79UKiLGyWcIOdq2OMjJq4Ugp cYg30X1r8YHVmultwTyYk2t1a7mfABDtKQdYyXY19GTWiVbP7K02WcRqhuZ7yA+H+zqjaF Wv/LZeiirVFZOpM9dggtznDJe/1vq/IGFC+LBYqdYvxJbL+41a+v1PEEOtAJ4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dTyBS0m2fzsht for ; Sun, 14 Dec 2025 22:13:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fd56 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 14 Dec 2025 22:13:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Poul-Henning Kamp Subject: git: edd982b95372 - main - Cross-reference all of uart(4), tty(4) and termios(4) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: phk X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: edd982b95372bee56de4bfe3a61873a8fed254ae Auto-Submitted: auto-generated Date: Sun, 14 Dec 2025 22:13:20 +0000 Message-Id: <693f3680.3fd56.52521b89@gitrepo.freebsd.org> The branch main has been updated by phk: URL: https://cgit.FreeBSD.org/src/commit/?id=edd982b95372bee56de4bfe3a61873a8fed254ae commit edd982b95372bee56de4bfe3a61873a8fed254ae Author: Poul-Henning Kamp AuthorDate: 2025-12-14 22:09:48 +0000 Commit: Poul-Henning Kamp CommitDate: 2025-12-14 22:09:48 +0000 Cross-reference all of uart(4), tty(4) and termios(4) Add a BUGS subsection about why, in the vain hope that somebody improves the situation. --- share/man/man4/Makefile | 1 + share/man/man4/termios.4 | 11 +++++++++++ share/man/man4/tty.4 | 16 +++++++++++++--- share/man/man4/uart.4 | 12 ++++++++++++ 4 files changed, 37 insertions(+), 3 deletions(-) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 4084fa55dc69..8cf4a06ea9bb 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -809,6 +809,7 @@ MLINKS+=tap.4 if_tap.4 \ tap.4 if_vmnet.4 MLINKS+=tdfx.4 tdfx_linux.4 MLINKS+=ti.4 if_ti.4 +MLINKS+=tty.4 cua.4 MLINKS+=tun.4 if_tun.4 MLINKS+=ure.4 if_ure.4 MLINKS+=vge.4 if_vge.4 diff --git a/share/man/man4/termios.4 b/share/man/man4/termios.4 index 08b0b81126c3..3d99130c8d33 100644 --- a/share/man/man4/termios.4 +++ b/share/man/man4/termios.4 @@ -1594,4 +1594,15 @@ the values in the header .Xr tcsetattr 3 , .Xr tcsetsid 3 , .Xr tty 4 , +.Xr uart 4 , .Xr stack 9 +.Sh BUGS +Before the Internet, serial ports were primarily used for inbound +connections from terminals, either directly or through modems, these +days serial ports are primarily used for outbound connections to +devices, an evolution which unfortunately has spread the relevant +documentation over three different manual pages: +.Xr termios 4 , +.Xr uart 4 and +.Xr tty 4 . + diff --git a/share/man/man4/tty.4 b/share/man/man4/tty.4 index caa31835a331..ec93ff440855 100644 --- a/share/man/man4/tty.4 +++ b/share/man/man4/tty.4 @@ -37,9 +37,9 @@ This section describes the interface to the terminal drivers in the system. .Ss Terminal Special Files -Each hardware terminal port on the system usually has a terminal special device -file associated with it in the directory ``/dev/'' (for -example, ``/dev/tty03''). +Each hardware terminal port on the system has several terminal special device +files associated with it in the directory ``/dev/'' (for +example, ``/dev/tty03'' and ``/dev/cua03''). When a user logs into the system on one of these hardware terminal ports, the system has already opened the associated device and prepared the line for normal interactive @@ -375,6 +375,7 @@ variables. .Xr pts 4 , .Xr pty 4 , .Xr termios 4 , +.Xr uart 4 , .Xr getty 8 .Sh HISTORY A console typewriter device @@ -383,3 +384,12 @@ and asynchronous communication interfaces .Pa /dev/tty[0-5] first appeared in .At v1 . +.Sh BUGS +Before the Internet, serial ports were primarily used for inbound +connections from terminals, either directly or through modems, these +days serial ports are primarily used for outbound connections to +devices, an evolution which unfortunately has spread the relevant +documentation over three different manual pages: +.Xr termios 4 , +.Xr uart 4 and +.Xr tty 4 . diff --git a/share/man/man4/uart.4 b/share/man/man4/uart.4 index 98b61886371d..f0b6b23b53d2 100644 --- a/share/man/man4/uart.4 +++ b/share/man/man4/uart.4 @@ -377,6 +377,8 @@ COM2 instead of COM1 and set the baud rate to 115200. .Xr cu 1 , .Xr puc 4 , .Xr scc 4 , +.Xr termios 4 , +.Xr tty 4 , .Xr ttys 5 .\" .Sh HISTORY @@ -389,3 +391,13 @@ The .Nm device driver and this manual page were written by .An Marcel Moolenaar Aq Mt marcel@xcllnt.net . +.Sh BUGS +Before the Internet, serial ports were primarily used for inbound +connections from terminals, either directly or through modems, these +days serial ports are primarily used for outbound connections to +devices, an evolution which unfortunately has spread the relevant +documentation over three different manual pages: +.Xr termios 4 , +.Xr uart 4 and +.Xr tty 4 . +