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 ***