From nobody Mon Sep 29 00:59: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 4cZjWS1P02z68ZqB; Mon, 29 Sep 2025 00:59:16 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZjWR4xqLz3c0Q; Mon, 29 Sep 2025 00:59:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 58T0x3v1024115; Mon, 29 Sep 2025 03:59:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 58T0x3v1024115 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 58T0x3rt024114; Mon, 29 Sep 2025 03:59:03 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 29 Sep 2025 03:59:03 +0300 From: Konstantin Belousov To: Dag-Erling =?utf-8?B?U23DuHJncmF2?= Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: d58339f39874 - main - tzcode: Drop libc namespace Message-ID: References: <202509271707.58RH7ajb090983@gitrepo.freebsd.org> <86frc6bzcm.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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86frc6bzcm.fsf@ltc.des.dev> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cZjWR4xqLz3c0Q On Sun, Sep 28, 2025 at 01:17:29PM +0200, Dag-Erling Smørgrav wrote: > Konstantin Belousov writes: > > It does change the behavior. Now a user-provided open/fstat/pthread_* > > functions can interpose the system functions, making tz code doing something > > that was not intended. > > > > In other words, namespacing guaranteed that tzcode was not affected by > > the app playing with libc namespace. > > That is a side effect of namespace.h but not its original purpose, which > was to allow libc to call pthread functions, which would be stubbed out > when libc_r was not loaded. This is no longer needed, and namespace.h > has bitrotted and is missing a bunch of syscalls and functions > (including nearly every *at() system call, with the sole exception of > openat()). Well, this is same as the biology: most features current uses have nothing to do with the cause of its appearance. But still, I think we should decide if we want to keep this guarantee of the libc semantic in presence of user interposing. Then we can either fix the missing overrides or drop the feature altogether. For ELF, I believe that we can implement this resilience to interposing much cleaner using protected symbol visibility for symbols exported by libc. But still, we need to decide what we do. Not all symbols can be protected: e.g. ability to preempt malloc/free is crusial for third-party malloc implementations. > If we really want to do what you suggest, there are better > ways (like what macOS does). I have no idea about MacOS/what is used by Mach-O. Can you provide some hints or links, please? From nobody Mon Sep 29 01:48: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 4cZkbk4x6Tz68fCb; Mon, 29 Sep 2025 01:48:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZkbk4Bx0z3g71; Mon, 29 Sep 2025 01:48:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759110482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e8WvWwKNxgYx1rl/fFJPllDRMwNzXrAVwGGNRvxHwGQ=; b=dVjDduNtMpCUpJkiuvbK5sZblkTrzJc6tsj9fxOczITPi+t2gN11JH74ngHbZqGmu47BRU YIdBQKUTOEuje3mkc/9p5OjsUyXxtoLvWqNrieQHu9n8v7pI6JpPJAunYionrJ6TmwpzTr mpFvGK8qWlizJx2AFDNdLdSKB3DmW5997G4Iv+aK2HB9o+J1Fse1qsZ+xA/SyxO2yKOy+7 Gs1nbYDXozwvjSpHunPrjvaVUPnF/J8Fcm4Ectl1I3t/nBIWH1mkWCGgzDoY+WwuMy8ybw C694DovBdmsO1qu4L+R4kF6w2GVweYwYPAi33tvu07lEwoCsjw8odTTUSlc6lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759110482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e8WvWwKNxgYx1rl/fFJPllDRMwNzXrAVwGGNRvxHwGQ=; b=cfPRqydSFNWvWyVNd6T10SSCtXdCpMRNPMF90qj86IKF1QVqy+EphOpr8n69eY0de3DpxI W3XsRzn4IUVqsZ54hZQ50T6NFy59PFXX4EL1iwVQpc6fJbXfICQv3KrP7HLWFae6PAAgFN IivUOwBWub2vsF3WtnbSrqRIVRVEex1NAszxkcm6dLP52pfa67roCChNR+lPgWcx/R+rMo GuAdyBvzlleYyWS63aZSkOnkHhpa2PtVZ9Yv/fSigzRFISBq2zgMgA8N/X5/pX9rdY+2Vz 1PnT1BgyYzJV85K1Midy1kXPcEwfLnVw36K8JbyOshpV/7xEDe2UB1qY7+KRyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759110482; a=rsa-sha256; cv=none; b=NWcZCKOLYSOvqCeaLWBRwaRGJI9fPvp5wtevO+d8y/ofRAxq7SJd7ibBYD2/mmLp0hRmGb BafLhOUBGeuXtaFSaq74ONU5gdLAPa08/qXuwjsMhVnjo9vGn4RbpEs9DWsh2xUUQUOY4r wD12X0JZzIed+BO2vYZGGXKvM8kXI7GO0/F1zqzyF3nE7XrLNMnNM73guiO0FnjTfjwf5u M1PNty3oXVbuGdmmJCoKOodH2mTkuZHNYM6KS5dpozF4BZ27SHx6YaAzGS+4CVBaiJQz0U G2lm4oY+y9/HvrNbldmG6l4ns5IP3gKj+gjTLHQJssMy6PI2cUdllQ8Y680/ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZkbk3Gldzm1j; Mon, 29 Sep 2025 01:48:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58T1m2d2063220; Mon, 29 Sep 2025 01:48:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58T1m2EP063217; Mon, 29 Sep 2025 01:48:02 GMT (envelope-from git) Date: Mon, 29 Sep 2025 01:48:02 GMT Message-Id: <202509290148.58T1m2EP063217@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 55025f42f6fa - main - stand: Remove support for FreeBSD 12.2 and earlier List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 55025f42f6fa517aaffc902b3d69fc707536907d Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=55025f42f6fa517aaffc902b3d69fc707536907d commit 55025f42f6fa517aaffc902b3d69fc707536907d Author: Warner Losh AuthorDate: 2025-09-28 06:40:37 +0000 Commit: Warner Losh CommitDate: 2025-09-29 01:45:00 +0000 stand: Remove support for FreeBSD 12.2 and earlier Remove 'pager' shim that was last not supported in FreeBSD 12.2, which went EOL on March 31, 2022. People have had enough time to upgrade the boot loader. Sponsored by: Netflix --- stand/lua/cli.lua | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/stand/lua/cli.lua b/stand/lua/cli.lua index 6832da0a31a5..596e55a8d1d8 100644 --- a/stand/lua/cli.lua +++ b/stand/lua/cli.lua @@ -30,18 +30,6 @@ local core = require("core") local cli = {} -if not pager then - -- shim for the pager module that just doesn't do it. - -- XXX Remove after 12.2 goes EoL. - pager = { - open = function() end, - close = function() end, - output = function(str) - printc(str) - end, - } -end - -- Internal function -- Parses arguments to boot and returns two values: kernel_name, argstr -- Defaults to nil and "" respectively. From nobody Mon Sep 29 01:48: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 4cZkbl4Z93z68dxG; Mon, 29 Sep 2025 01:48: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 4cZkbl453gz3frM; Mon, 29 Sep 2025 01:48:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759110483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/5ElgpImgPeMhKT2hnG0XwwGMrrzJkq6btBBtTQkCqI=; b=Ex4Vcj3J1avHjRrnlYfsiWvdypy3JxQk/BYQSOXp4BN0vngDqfZc8+rI2k4H5Yd411V8aV uN1dkivlZ63Ezc3ekyXUZzuVtjRMXcUc3YkTMZz5+ZYMvGZV5tdwlvwFmnYO9o8bJWiW8O Vlb5JJpat1TUX9rf3lOnV3iv7PiSU76BvBQpwjQ+WDul9e9UWfHbNXS8xAzwF1gGK1OlJT 40UN+X4VTPsKxwquTz3z5iq8NNrgyHKHnuxNvPV159AN33Vmhgca2YYPIcPt4Er0fv9/xn /P5Hz7tB1WmZeFkS8T5uHjT7CRPDYwK4l1VnEYkvARQxleOIZWRBRNtseCtdGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759110483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/5ElgpImgPeMhKT2hnG0XwwGMrrzJkq6btBBtTQkCqI=; b=YAF7JlQGGahWzqXUc2bJ+Z2l8/Z2PLXIGZHDbDFXxNLqZmENCI0qUK5EZWBBRu2mx2yq8b iINJKPWZ/dNJThX1JrmfogRruPJYuEltLZr/Zfgt0Syt+4o1Y1YLGIKxBc2H8ZC1iAGS+2 eXsFvZnqN6RO8jkFRCUl9r0aycBUaRLmf0YVNnAPSTLAEKIk3qlqdMG1PQPBSrM9Gs66Ny RwzxVRYNTJLlbU0pDkRSeCoT90euc8m0b7LUwCzMX+GSUL676afa9TE7d5ifvs4txu7EZU h/tgaGuKTktPqCpUhBHfYeNydeQDO2AIMgu/gUQ2eu9t6incHaQ0i46sVFStew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759110483; a=rsa-sha256; cv=none; b=li5eE+ubRoRhs29He+76uN70hw0WHN27XVK/B/v0Qw+Bkjm5zTHF8TxGJnOYHyspb25vCP 01E3Lvc+L+Jf5irgqd6Hrpo3v3lLxbCGbnWFA7Xiw9GvKOOY0zghTtQXeG0aiprAJRJtZz CRTBhgHWSAvM0Mepda5j5YunZHyPiadaV6FOF/7BNJlCkgIev03GXtsUYM3bmJ8QZqwDss vHne4MXYJu2jHYUf1+KEqY2aL4YPYkJOL3NzGT8j/SDHkK7BFuHtdAPX8Uh6t0rEqiRHT1 abuoDPeskzbxrJ1jH1Wz3pxFhqRODx8t5ODXXgXFBLtnrC5eN8eyfD4oHfukeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZkbl3MN8zlC0; Mon, 29 Sep 2025 01:48:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58T1m39w063257; Mon, 29 Sep 2025 01:48:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58T1m3Qr063254; Mon, 29 Sep 2025 01:48:03 GMT (envelope-from git) Date: Mon, 29 Sep 2025 01:48:03 GMT Message-Id: <202509290148.58T1m3Qr063254@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: b7473a5d68b8 - main - loader: make disable-device more rebust List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b7473a5d68b8ade1ce6c6c08965fe284cc70bd75 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b7473a5d68b8ade1ce6c6c08965fe284cc70bd75 commit b7473a5d68b8ade1ce6c6c08965fe284cc70bd75 Author: Warner Losh AuthorDate: 2025-09-28 17:58:31 +0000 Commit: Warner Losh CommitDate: 2025-09-29 01:45:01 +0000 loader: make disable-device more rebust Check the number of arguments and ensure that the passed-in device to disable parses correctly. Sponsored by: Netflix --- stand/lua/cli.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/stand/lua/cli.lua b/stand/lua/cli.lua index 596e55a8d1d8..dda8c3da4c89 100644 --- a/stand/lua/cli.lua +++ b/stand/lua/cli.lua @@ -235,9 +235,17 @@ cli["disable-device"] = function(...) return end + if #argv > 1 then + print("Too many arguments") + print("usage error: disable-device device") + return + end + d, u = string.match(argv[1], "(%w*%a)(%d+)") - if d ~= nil then + if d ~= nil and u ~= nil then loader.setenv("hint." .. d .. "." .. u .. ".disabled", "1") + else + print("Cannot parse " .. argv[1] .." into driver and unit number.") end end From nobody Mon Sep 29 01:48:04 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZkbn0cRJz68fG9; Mon, 29 Sep 2025 01:48:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZkbm4Nhwz3g76; Mon, 29 Sep 2025 01:48:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759110484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=glSHmRLkP8rEawmzpGLJcWbU+QhUjuimwXja1+MP0ww=; b=vcoQGJ9Y5Sz6J8p1E8pt8yetzK1w4UtqtwBAY4lj06+gIENnh7eTEJlTW22m/x5ohFnSad UwQqPzTpucN2naVQxTXB1qw158gCrsfsDnzgT5wrTuaJ4iiqkhpBJ4XPWl3CYV1fuVUOz9 BiqodBplQe2LRKORDUtzcp+U+QQB/GHDPGrp738EFt/HYXEF/LOMMT77AcsJhfaAAAQDUm gpfin4UYflAeNmCUJhqgEtBpL6jeErolEIzWVEOO+Bcw4xxW8S+p0WPr6oqhAEft4nJc4w sSxmvYdB3jouB20fsunILkTUbqgAKudDbiXBFhTadpS/hfsv7y8fnTivsShTAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759110484; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=glSHmRLkP8rEawmzpGLJcWbU+QhUjuimwXja1+MP0ww=; b=ZGyuZziAYa8aehhDacJT9ilrnVjYZcoemVcnmcXjywpS4FrN894JqZaJad+71hzJ/7L9xL vzjp1kbe6hmElSVoiUJL7ynIu4Wtz+S0pil8Jnl043d0DP97vnFo4KzSFDtRwPxuX9eRHt XNWegfUDfidbv4VpIn9OsziYPlDPBCKXO39yWGo+WgK3H4FLi/aROh59Y7GxM0adek35ES qQ63OCvXv7B+RPofRY6ZTsjiPBYjrQ1fkuS8cUS0Mi0ZCeyUbBRenQazx0uLpG8COcjF2H zUUfuUWbUwDJ4TK5tnZXCRNwlcdsW7jPjU1oKGAABFfyYfA9CzREham37uR0VQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759110484; a=rsa-sha256; cv=none; b=PjAZskTuD9Je1rHA5kxppJvXlvJYr987PhI1OY2NkvS8iUo7UTqRmidOWo6qlzTnASCqhY QLg92AZxTe2KpSgc+/olF2bG1srVkljD/pTPGnpABfZzKXwos/zD3veSiq6fheOHFqtNnH T4QDe92HRTCf1SZBqppRHJFxsMw4n3ZX3UF8hV7Cwhcp+joY+oRhEJhHJPAMMau/NR8lg3 Q50fc56Y+So2cNISZiBvMmHU3oEJGQSYxm3UQzLgoqMxUUGw//MLoRa2B/DrbazXuRK2mN NUVCHRS2T9IRZYmSyHMUZCrAYtkrxLOQ1AT4/7igvFILQT1geKiwbeNUxo+l4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZkbm3nyDzlFL; Mon, 29 Sep 2025 01:48:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58T1m4Y2063298; Mon, 29 Sep 2025 01:48:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58T1m4nh063295; Mon, 29 Sep 2025 01:48:04 GMT (envelope-from git) Date: Mon, 29 Sep 2025 01:48:04 GMT Message-Id: <202509290148.58T1m4nh063295@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: ebc32e74b6f9 - main - core.lua: Consistently check for single user List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ebc32e74b6f98a6f2b9ed7cba0078cd64d48701f Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ebc32e74b6f98a6f2b9ed7cba0078cd64d48701f commit ebc32e74b6f98a6f2b9ed7cba0078cd64d48701f Author: Warner Losh AuthorDate: 2025-09-28 19:19:29 +0000 Commit: Warner Losh CommitDate: 2025-09-29 01:45:01 +0000 core.lua: Consistently check for single user While boot_single:lower() should always be in {yes,no}, it might not be. In one place we check == yes, and another ~= no. Make both places ~= no for consistency. We generally try to test != default. Sponsored by: Netflix --- stand/lua/core.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/lua/core.lua b/stand/lua/core.lua index f42be6fbebb7..ad417e5f97e5 100644 --- a/stand/lua/core.lua +++ b/stand/lua/core.lua @@ -413,7 +413,7 @@ end function core.isSingleUserBoot() local single_user = loader.getenv("boot_single") - return single_user ~= nil and single_user:lower() == "yes" + return single_user ~= nil and single_user:lower() ~= "no" end function core.isUEFIBoot() From nobody Mon Sep 29 05:08: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 4cZq2y4ljqz68tWP; Mon, 29 Sep 2025 05:08:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZq2y1yhQz41Pq; Mon, 29 Sep 2025 05:08:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759122506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rNn9UY5jQjWFr9PaKeh46MzjMqa3x7lK45utUnqZSsQ=; b=FCGFYEkEtIkd5FLW4PJCh0ZuJB3VtFY6Wda8zJWbPCLWjqSyMoPF1cD3gm1dC9nOU1BW2z EPZJ1tjT6LcWdz48Pta7zRYdjvuGSLUMey9fSomHi6ZCAobJCVJUPoNgXP6DE2Mvoxuwq9 P83Xj7iKBVErzb+IItK2FMwc3BG+6SrwnxFXMLplOszk8FSsc8Hj/b/Pik8+pza0TgO8wX NfvYmZiMBsENoJDfznbrGGFv7wjGMrec5d4vANn0GA6l5tCSALbsMdGJlhf/AH34BiQaLv rQ4bmTS6RmrgIFxcaTWRg0ylyqn56uHNM7584vDUr2zkqgCIq3ZippEOg82wCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759122506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rNn9UY5jQjWFr9PaKeh46MzjMqa3x7lK45utUnqZSsQ=; b=V82NJF2uhKAnZPHQBtFjFm7vj8rUUeCqPs35O1UgaHs0zsLa4oMTXW35hVubg93x58rh0P mGhnpAFSNMeOGnW3rMFq1m+WT7LlOuRWHEe3wjkrA+/AdV9jPigCDy0G0aT096QVAPme8C hxYrCb8YnRFeYSUr/u0RQBYrm6LXlmIHs4WYa1OHcDYZ1CO1h5icl/eCFgG+Dm0uiLpg6K r7VJ4Kbv0/CS6DQGT9lULG3Hp0tF9hFfOf8vELwGFjpVTJaDP+qbptk8GrI+00tt6Xumnz r6qGGwWy59x5A4F6VwDTPHvvhPtexgWp1Y9Xn7flfTvl0X8A64OhOJ66q78nXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759122506; a=rsa-sha256; cv=none; b=eNXGIF60uyp8LsgYlh91YeFA2MNYXOqU2NEI3KPat6gw86YX/fkx7o1KvqyhvtD1iOKt9Z R4oks/oR0ndMa2iIwiWNguEn8XP0njIYwvCdA7/Zysucn2NRqqQR9CLekkbwtv7CUl77Hx LSCdaxMRepRODSLLTkeH+7PK5UriyF2O4iKvJkWDPB7pNXyMx3xTM6PvUyoo+q1FktrhzJ 3Nc8J82314IdXB9ekXbK9xTOunuLL1XA5pV2LNxMu/L1s49/qoTw/my+TcF04UePZiJ/WG j9L/PwO6j5G3kE1trjTaDB9Q1T0c9aRBM6XKs8bj0iV7AK2fLtUgQvlGgShPqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZq2y1QL2zrWC; Mon, 29 Sep 2025 05:08:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58T58Qg7042421; Mon, 29 Sep 2025 05:08:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58T58Pin042411; Mon, 29 Sep 2025 05:08:25 GMT (envelope-from git) Date: Mon, 29 Sep 2025 05:08:25 GMT Message-Id: <202509290508.58T58Pin042411@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: 8d485a8490fe - main - MFV: expat 2.7.3. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8d485a8490fe1cd60e7b6a00d3c8a8cc116a56fb Auto-Submitted: auto-generated The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=8d485a8490fe1cd60e7b6a00d3c8a8cc116a56fb commit 8d485a8490fe1cd60e7b6a00d3c8a8cc116a56fb Merge: ebc32e74b6f9 a8fa7ccb4730 Author: Xin LI AuthorDate: 2025-09-29 04:28:11 +0000 Commit: Xin LI CommitDate: 2025-09-29 04:28:12 +0000 MFV: expat 2.7.3. MFC after: 3 days contrib/expat/Changes | 58 ++++++++++++++++++++++- contrib/expat/README.md | 4 +- contrib/expat/configure.ac | 4 +- contrib/expat/doc/reference.html | 18 +++++--- contrib/expat/doc/xmlwf.1 | 2 +- contrib/expat/doc/xmlwf.xml | 2 +- contrib/expat/lib/expat.h | 5 +- contrib/expat/lib/internal.h | 6 +++ contrib/expat/lib/xmlparse.c | 49 +++++++++++++------- contrib/expat/lib/xmlrole.h | 2 +- contrib/expat/tests/alloc_tests.c | 44 +++++++++++++----- contrib/expat/tests/misc_tests.c | 96 ++++++++++++++++++++++++++++++++++++++- contrib/expat/xmlwf/xmlfile.c | 4 +- lib/libexpat/expat_config.h | 6 +-- lib/libexpat/libbsdxml.3 | 4 +- 15 files changed, 251 insertions(+), 53 deletions(-) diff --cc contrib/expat/README.md index fdaaf459e204,000000000000..c2f288ca1242 mode 100644,000000..100644 --- a/contrib/expat/README.md +++ b/contrib/expat/README.md @@@ -1,311 -1,0 +1,311 @@@ +[![Run Linux CI tasks](https://github.com/libexpat/libexpat/actions/workflows/linux.yml/badge.svg)](https://github.com/libexpat/libexpat/actions/workflows/linux.yml) +[![Packaging status](https://repology.org/badge/tiny-repos/expat.svg)](https://repology.org/metapackage/expat/versions) +[![Downloads SourceForge](https://img.shields.io/sourceforge/dt/expat?label=Downloads%20SourceForge)](https://sourceforge.net/projects/expat/files/) +[![Downloads GitHub](https://img.shields.io/github/downloads/libexpat/libexpat/total?label=Downloads%20GitHub)](https://github.com/libexpat/libexpat/releases) +[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/10205/badge)](https://www.bestpractices.dev/projects/10205) + +> [!CAUTION] +> +> Expat is **understaffed** and without funding. +> There is a [call for help with details](https://github.com/libexpat/libexpat/blob/master/expat/Changes) +> at the top of the `Changes` file. + + - # Expat, Release 2.7.2 ++# Expat, Release 2.7.3 + +This is Expat, a C99 library for parsing +[XML 1.0 Fourth Edition](https://www.w3.org/TR/2006/REC-xml-20060816/), started by +[James Clark](https://en.wikipedia.org/wiki/James_Clark_%28programmer%29) in 1997. +Expat is a stream-oriented XML parser. This means that you register +handlers with the parser before starting the parse. These handlers +are called when the parser discovers the associated structures in the +document being parsed. A start tag is an example of the kind of +structures for which you may register handlers. + +Expat supports the following C99 compilers: + +- GNU GCC >=4.5 (for use from C) or GNU GCC >=4.8.1 (for use from C++) +- LLVM Clang >=3.5 +- Microsoft Visual Studio >=17.0/2022 + (the oldest version supported by the [official GitHub Actions Windows images](https://github.com/actions/runner-images)) + +Windows users can use the +[`expat-win32bin-*.*.*.{exe,zip}` download](https://github.com/libexpat/libexpat/releases), +which includes both pre-compiled libraries and executables, and source code for +developers. + +Expat is [free software](https://www.gnu.org/philosophy/free-sw.en.html). +You may copy, distribute, and modify it under the terms of the License +contained in the file +[`COPYING`](https://github.com/libexpat/libexpat/blob/master/expat/COPYING) +distributed with this package. +This license is the same as the MIT/X Consortium license. + + +## Using libexpat in your CMake-Based Project + +There are three documented ways of using libexpat with CMake: + +### a) `find_package` with Module Mode + +This approach leverages CMake's own [module `FindEXPAT`](https://cmake.org/cmake/help/latest/module/FindEXPAT.html). + +Notice the *uppercase* `EXPAT` in the following example: + +```cmake +cmake_minimum_required(VERSION 3.10) + +project(hello VERSION 1.0.0) + +find_package(EXPAT 2.2.8 MODULE REQUIRED) + +add_executable(hello + hello.c +) + +target_link_libraries(hello PUBLIC EXPAT::EXPAT) +``` + +### b) `find_package` with Config Mode + +This approach requires files from… + +- libexpat >=2.2.8 where packaging uses the CMake build system +or +- libexpat >=2.3.0 where packaging uses the GNU Autotools build system + on Linux +or +- libexpat >=2.4.0 where packaging uses the GNU Autotools build system + on macOS or MinGW. + +Notice the *lowercase* `expat` in the following example: + +```cmake +cmake_minimum_required(VERSION 3.10) + +project(hello VERSION 1.0.0) + +find_package(expat 2.2.8 CONFIG REQUIRED char dtd ns) + +add_executable(hello + hello.c +) + +target_link_libraries(hello PUBLIC expat::expat) +``` + +### c) The `FetchContent` module + +This approach — as demonstrated below — requires CMake >=3.18 for both the +[`FetchContent` module](https://cmake.org/cmake/help/latest/module/FetchContent.html) +and its support for the `SOURCE_SUBDIR` option to be available. + +Please note that: +- Use of the `FetchContent` module with *non-release* SHA1s or `master` + of libexpat is neither advised nor considered officially supported. +- Pinning to a specific commit is great for robust CI. +- Pinning to a specific commit needs updating every time there is a new + release of libexpat — either manually or through automation —, + to not miss out on libexpat security updates. + +For an example that pulls in libexpat via Git: + +```cmake +cmake_minimum_required(VERSION 3.18) + +include(FetchContent) + +project(hello VERSION 1.0.0) + +FetchContent_Declare( + expat + GIT_REPOSITORY https://github.com/libexpat/libexpat/ - GIT_TAG 000000000_GIT_COMMIT_SHA1_HERE_000000000 # i.e. Git tag R_0_Y_Z ++ GIT_TAG 000000000_GIT_COMMIT_SHA1_HERE_000000000 # i.e. Git tag R_X_Y_Z + SOURCE_SUBDIR expat/ +) + +FetchContent_MakeAvailable(expat) + +add_executable(hello + hello.c +) + +target_link_libraries(hello PUBLIC expat) +``` + + +## Building from a Git Clone + +If you are building Expat from a check-out from the +[Git repository](https://github.com/libexpat/libexpat/), +you need to run a script that generates the configure script using the +GNU autoconf and libtool tools. To do this, you need to have +autoconf 2.58 or newer. Run the script like this: + +```console +./buildconf.sh +``` + +Once this has been done, follow the same instructions as for building +from a source distribution. + + +## Building from a Source Distribution + +### a) Building with the configure script (i.e. GNU Autotools) + +To build Expat from a source distribution, you first run the +configuration shell script in the top level distribution directory: + +```console +./configure +``` + +There are many options which you may provide to configure (which you +can discover by running configure with the `--help` option). But the +one of most interest is the one that sets the installation directory. +By default, the configure script will set things up to install +libexpat into `/usr/local/lib`, `expat.h` into `/usr/local/include`, and +`xmlwf` into `/usr/local/bin`. If, for example, you'd prefer to install +into `/home/me/mystuff/lib`, `/home/me/mystuff/include`, and +`/home/me/mystuff/bin`, you can tell `configure` about that with: + +```console +./configure --prefix=/home/me/mystuff +``` + +Another interesting option is to enable 64-bit integer support for +line and column numbers and the over-all byte index: + +```console +./configure CPPFLAGS=-DXML_LARGE_SIZE +``` + +However, such a modification would be a breaking change to the ABI +and is therefore not recommended for general use — e.g. as part of +a Linux distribution — but rather for builds with special requirements. + +After running the configure script, the `make` command will build +things and `make install` will install things into their proper +location. Have a look at the `Makefile` to learn about additional +`make` options. Note that you need to have write permission into +the directories into which things will be installed. + +If you are interested in building Expat to provide document +information in UTF-16 encoding rather than the default UTF-8, follow +these instructions (after having run `make distclean`). +Please note that we configure with `--without-xmlwf` as xmlwf does not +support this mode of compilation (yet): + +1. Mass-patch `Makefile.am` files to use `libexpatw.la` for a library name: +
+ `find . -name Makefile.am -exec sed + -e 's,libexpat\.la,libexpatw.la,' + -e 's,libexpat_la,libexpatw_la,' + -i.bak {} +` + +1. Run `automake` to re-write `Makefile.in` files:
+ `automake` + +1. For UTF-16 output as unsigned short (and version/error strings as char), + run:
+ `./configure CPPFLAGS=-DXML_UNICODE --without-xmlwf`
+ For UTF-16 output as `wchar_t` (incl. version/error strings), run:
+ `./configure CFLAGS="-g -O2 -fshort-wchar" CPPFLAGS=-DXML_UNICODE_WCHAR_T + --without-xmlwf` +
Note: The latter requires libc compiled with `-fshort-wchar`, as well. + +1. Run `make` (which excludes xmlwf). + +1. Run `make install` (again, excludes xmlwf). + +Using `DESTDIR` is supported. It works as follows: + +```console +make install DESTDIR=/path/to/image +``` + +overrides the in-makefile set `DESTDIR`, because variable-setting priority is + +1. commandline +1. in-makefile +1. environment + +Note: This only applies to the Expat library itself, building UTF-16 versions +of xmlwf and the tests is currently not supported. + +When using Expat with a project using autoconf for configuration, you +can use the probing macro in `conftools/expat.m4` to determine how to +include Expat. See the comments at the top of that file for more +information. + +A reference manual is available in the file `doc/reference.html` in this +distribution. + + +### b) Building with CMake + +The CMake build system is still *experimental* and may replace the primary +build system based on GNU Autotools at some point when it is ready. + + +#### Available Options + +For an idea of the available (non-advanced) options for building with CMake: + +```console +# rm -f CMakeCache.txt ; cmake -D_EXPAT_HELP=ON -LH . | grep -B1 ':.*=' | sed 's,^--$,,' +// Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel ... +CMAKE_BUILD_TYPE:STRING= + +// Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=/usr/local + +// Path to a program. +DOCBOOK_TO_MAN:FILEPATH=/usr/bin/docbook2x-man + +// Build man page for xmlwf +EXPAT_BUILD_DOCS:BOOL=ON + +// Build the examples for expat library +EXPAT_BUILD_EXAMPLES:BOOL=ON + +// Build fuzzers for the expat library +EXPAT_BUILD_FUZZERS:BOOL=OFF + +// Build pkg-config file +EXPAT_BUILD_PKGCONFIG:BOOL=ON + +// Build the tests for expat library +EXPAT_BUILD_TESTS:BOOL=ON + +// Build the xmlwf tool for expat library +EXPAT_BUILD_TOOLS:BOOL=ON + +// Character type to use (char|ushort|wchar_t) [default=char] +EXPAT_CHAR_TYPE:STRING=char + +// Install expat files in cmake install target +EXPAT_ENABLE_INSTALL:BOOL=ON + +// Use /MT flag (static CRT) when compiling in MSVC +EXPAT_MSVC_STATIC_CRT:BOOL=OFF + +// Build fuzzers via OSS-Fuzz for the expat library +EXPAT_OSSFUZZ_BUILD:BOOL=OFF + +// Build a shared expat library +EXPAT_SHARED_LIBS:BOOL=ON + +// Treat all compiler warnings as errors +EXPAT_WARNINGS_AS_ERRORS:BOOL=OFF + +// Make use of getrandom function (ON|OFF|AUTO) [default=AUTO] +EXPAT_WITH_GETRANDOM:STRING=AUTO + +// Utilize libbsd (for arc4random_buf) +EXPAT_WITH_LIBBSD:BOOL=OFF + +// Make use of syscall SYS_getrandom (ON|OFF|AUTO) [default=AUTO] +EXPAT_WITH_SYS_GETRANDOM:STRING=AUTO +``` diff --cc lib/libexpat/expat_config.h index 64da66e1cf6f,000000000000..565404f1577b mode 100644,000000..100644 --- a/lib/libexpat/expat_config.h +++ b/lib/libexpat/expat_config.h @@@ -1,149 -1,0 +1,149 @@@ +/* expat_config.h. Generated from expat_config.h.in by configure. */ +/* expat_config.h.in. Generated from configure.ac by autoheader. */ + +#ifndef EXPAT_CONFIG_H +#define EXPAT_CONFIG_H 1 + +#include + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* 1234 = LILENDIAN, 4321 = BIGENDIAN */ +#if BYTE_ORDER == LITTLE_ENDIAN +#define BYTEORDER 1234 +#else +#define BYTEORDER 4321 +#endif + +/* Define to 1 if you have the `arc4random' function. */ +#define HAVE_ARC4RANDOM 1 + +/* Define to 1 if you have the `arc4random_buf' function. */ +#define HAVE_ARC4RANDOM_BUF 1 + +/* define if the compiler supports basic C++11 syntax */ +#define HAVE_CXX11 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the 'getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the `getrandom' function. */ +#define HAVE_GETRANDOM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the 'bsd' library (-lbsd). */ +/* #undef HAVE_LIBBSD */ + +/* Define to 1 if you have a working 'mmap' system call. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have `syscall' and `SYS_getrandom'. */ +#define HAVE_SYSCALL_GETRANDOM 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "expat" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://github.com/libexpat/libexpat/issues" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "expat" + +/* Define to the full name and version of this package. */ - #define PACKAGE_STRING "expat 2.7.2" ++#define PACKAGE_STRING "expat 2.7.3" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "expat" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ - #define PACKAGE_VERSION "2.7.2" ++#define PACKAGE_VERSION "2.7.3" + +/* Define to 1 if all of the C89 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#define STDC_HEADERS 1 + +/* Version number of package */ - #define VERSION "2.7.2" ++#define VERSION "2.7.3" + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Define to allow retrieving the byte offsets for attribute names and values. + */ +/* #undef XML_ATTR_INFO */ + +/* Define to specify how much context to retain around the current parse + point, 0 to disable. */ +#define XML_CONTEXT_BYTES 1024 + +/* Define to include code reading entropy from `/dev/urandom'. */ +#define XML_DEV_URANDOM 1 + +/* Define to make parameter entity parsing functionality available. */ +#define XML_DTD 1 + +/* Define as 1/0 to enable/disable support for general entities. */ +#define XML_GE 1 + +/* Define to make XML Namespaces functionality available. */ +#define XML_NS 1 + +/* Define to empty if 'const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to 'long int' if does not define. */ +/* #undef off_t */ + +#endif // ndef EXPAT_CONFIG_H diff --cc lib/libexpat/libbsdxml.3 index 60aa64fba20d,000000000000..d25249bbc155 mode 100644,000000..100644 --- a/lib/libexpat/libbsdxml.3 +++ b/lib/libexpat/libbsdxml.3 @@@ -1,67 -1,0 +1,67 @@@ +.\"- +.\" Copyright (c) 2002 Poul-Henning Kamp +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\"/ - .Dd April 7, 2025 ++.Dd September 28, 2025 +.Dt LIBBSDXML 3 +.Os +.Sh NAME +.Nm libbsdxml +.Nd eXpat XML parser library +.Sh SYNOPSIS +.In bsdxml.h +.Sh DESCRIPTION +The +.Nm - library is a verbatim copy of the eXpat XML library version 2.7.2. ++library is a verbatim copy of the eXpat XML library version 2.7.3. +.Pp +The +.Nm +library is intended to be used within the +.Fx +base system only. +Use of the +.Nm +library for other purposes is not supported and discouraged. +.Pp +To avoid version and autoconfiguration issues, the library has been +renamed to +.Nm +rather than retain the original eXpat library and include file names +to prevent confusion and autoconfiguration issues for 3rd party +software. +.Sh SEE ALSO +For full documentation, please see the eXpat webpage at +.Pa http://www.libexpat.org/ . +.Sh AUTHORS +.An -nosplit +The original eXpat was written by +.An James Clark Aq Mt jjc@jclark.com . +.Pp +Subsequently eXpat maintenance and development been taken up by a group +of people under the leadership of +.An Fred Drake Aq Mt fdrake@acm.com , +.An Paul Prescod , +and +.An Clark Cooper . From nobody Mon Sep 29 05:19:28 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 4cZqHk0rXFz68vGT; Mon, 29 Sep 2025 05:19:30 +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 4cZqHk042sz42J6; Mon, 29 Sep 2025 05:19:30 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759123170; h=from:from:reply-to:subject:subject: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=zVe1MmbsVV7AdYqlW5jQ1Tfa6EY8LNYvQYMTTN29yPA=; b=jxV4hwxv0AUTHuq+qvgdbnduPUei5WEKbFPPG7QcMVxFzYd9xGqFPG3mPaPt5d+cy2iMjj 56Xb3rAksMzeg4lu7O2HCF2hGVD7ygUKH99Edz5Sv6c/gFwTEDj8pA+w4Jmq+kgT4xAr1n 3EGyHaOGDzzXw1xV1T3rm/z5ORiLF1DpkEcOi5Wr4SKlH8p2OK0RM9FGEj9mjrOJpfQaKV nEiTrgpnSFg28/8cxhZAYY29AIvOy3xPGc84y1X4ocYTNS6A1chCqQRL+iDy/HyiNK8OQ1 JqlVEwVFhVt+1DMbovWe79iwzu2sB6QbsujtgRsuVUS9TrSe27RJmcRw2lp32A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759123170; h=from:from:reply-to:subject:subject: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=zVe1MmbsVV7AdYqlW5jQ1Tfa6EY8LNYvQYMTTN29yPA=; b=kBZnVA5VHXWqIzYieV/VWWMNPcxXlhr5Hv2kWblPDoF+5AqE4Wv2nyFh3HrLA+oiWZISBP ZxxVsFXHPqv9x168aYtDUl1o8gxIwNlKQvYZnWhtqoiqzdpr+h7kB37cyE87LsPxvOM3AB eKuqQ4H02bn65QM8M2iND0e5slfBi4YbspFTv11MUEhrjgIcrl2fRiWzGlk3zO8/eiP3rx JEZX2iGQRVKYj1NHVtiLJFziTPsJFMicT3n8v+U2+QCD1aF7AGOxVz89NKUCOYvoPmi/GZ f+OoVltXpebNBd+sVNlCKEutoIgLTFDg/qE4TRNlNF7vZhMtaaihAlAJbkJNmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759123170; a=rsa-sha256; cv=none; b=yZnxezbESo1LfzHzEJDaCgdSxmJzV9L0NjTwKltD22fK4okBCbcT6XU2VgqnkBi3dyh2Q6 32SlWn/PmYcSY2pfnDMsKlS2HruQmh/aoSm7LPwUX+FF2AAduWADER3aarId6fdqVwOw26 v4ja86NFSih17JskJO9x/ncMK1dRp7tYngZ+zKAuVgax37DeB+kfVc+nn1FbmFDpMhcrBi 8m/W7C3AZC/89k3s/NZCF6XSrjRulpKqli6Ftu4UkKV2rph4Z611RFPXFV5rYVBbRh3ihi 2Gs4S8bU0LbKQR0n8GpkoiMcpjQ0FIiMq5hdFoaNSOXmNImhlkgEKd7uwiG2ug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from ltc.des.dev (88-177-82-251.subs.proxad.net [88.177.82.251]) (using TLSv1.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 4cZqHj60Jmz18h9; Mon, 29 Sep 2025 05:19:29 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 999644BECF; Mon, 29 Sep 2025 07:19:28 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: d58339f39874 - main - tzcode: Drop libc namespace In-Reply-To: (Konstantin Belousov's message of "Mon, 29 Sep 2025 03:59:03 +0300") References: <202509271707.58RH7ajb090983@gitrepo.freebsd.org> <86frc6bzcm.fsf@ltc.des.dev> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Mon, 29 Sep 2025 07:19:28 +0200 Message-ID: <86zfadal9b.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 Konstantin Belousov writes: > Dag-Erling Sm=C3=B8rgrav writes: > > If we really want to do what you suggest, there are better > > ways (like what macOS does). > I have no idea about MacOS/what is used by Mach-O. Can you provide some > hints or links, please? They use macros in the header that contains the prototype to rename functions when there are multiple variants. In our case it would look like this: (in sys/sys/cdefs.h) #ifdef __LIBC #define __LIBC_SYM(sym) __asm("_" #sym) #else #define __LIBC_SYM(sym) #endif __LIBC (in include/fcntl.h) int open(const char *, int, ...) __LIBC_SYM(open); (in lib/lib{c,sys,thr}/Makefile) CFLAGS+=3D-D__LIBC This allows code in libc to use open() instead of _open() and not have to worry about needing to include "namespace.h" and "un-namespace.h" in the right places. It also means simply adding __LIBC to any prototype (and a __weak_reference in the correct place) automatically protects every call to that function in lib{c,sys,thr} without having to chase them all down. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Mon Sep 29 09:58:35 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cZxTv2tjcz69DhW; Mon, 29 Sep 2025 09:58:43 +0000 (UTC) (envelope-from peterj@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 4cZxTv2GqMz3QpM; Mon, 29 Sep 2025 09:58:43 +0000 (UTC) (envelope-from peterj@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759139923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/unk3XzCe8GGnLGiCtWhUhoRbbKYX2PCmMhhoaDm9T8=; b=bqucpHzPAugOnVbQZTm3CFWDrZzKQEo+8A/k3oMuKUqy58bQOU9bbudtGJh8wvpB8ygBub WeGxOOjfqMoaeXjbYRsxL8lgq9h/mZE6CH27k043RFLrl4q/Ys67ZZ3lSNpef1sK2HQU1F 5kP4ZPoQyjZLIQgASmIegLsW8G3Q4gr0N11A3/FpxbTJrTG2Wi+uoI2R0ZRPLyCh/CaT9Q xbeqFbj2k7ZCqyU0N4/Xy2y3Kf0kvg/4ZEUHwc/Ny8rx6dykVwNTMV9q4sBhaaEn2598eN EaRsDbmQ0t+Ut2XpEOVj9ie7OgKe+TVqmmybxVcB9FqEb07Nnm5IznnD9HlJQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759139923; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/unk3XzCe8GGnLGiCtWhUhoRbbKYX2PCmMhhoaDm9T8=; b=mskmx7ld/zzIszsojz0sv9Jh537FqLP3LjeoIgJW0pzvqrPY2neo/GMM1vigdPcTVD+OAr H/aNcAttt3fd7rgkCy0YnRUFF1sPjRFC3I0BI9k3B8f51aIMh4t2MZTI4FNnuqfH4AXjjI a+2KkwZE218i2w8KQPN4CU7aBfDKaX7BbIOJ9UFQFZ+Dp6HjcNxd3dT8ahDGcLnfd/+Ndw nJQ3yaqvZrQm8fn3NA01/tj8bx/PwjVczZmvNKaNFfTe+mV3U3skEUejnBo0T+9wCPvZuY 8bmGpRAS3rCI/ty1doKgcrlaTxy8dZxSU6l6fYg2RhNaWpUZfRG4z+kRh9oGEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759139923; a=rsa-sha256; cv=none; b=Um5CywkH6/pP4Ehwr0GtO219bm9j1uYD6CBL76Rx8pFTwFRIzG/mDB7yZWzCtTSexOQTx9 nI2O9GoUUkzPg9N9jsBWTRfufX+Ugex+C9XNc2/qDlpwuiUCZaiaXA/wujjDAaO1XpF6kd bV1VzJQMhvs6oduEe7J2gvcL8Gsj2wnBXuaNrunMfRoe6rfEheE+mKLZR15stVhNIbGsAR 0cXblJK7Q2xBxvIYNAOBY5yeYHcmohA0pt9neB2Sryh3FXmOxRdOKTSeMYNsFtHP+wCSW5 aBQX4NPZ+0qsaqYRHlgBrb7xJcGkYk/eaU7+jFQcz/IywHCInEOxRNQaLGBe2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) (Authenticated sender: peterj) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cZxTs4v51z305; Mon, 29 Sep 2025 09:58:41 +0000 (UTC) (envelope-from peterj@freebsd.org) Date: Mon, 29 Sep 2025 19:58:35 +1000 From: Peter Jeremy To: Christos Margiolis Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 9cab9fde5eda - main - virtual_oss: Port to base Message-ID: References: <202509280958.58S9wrww083342@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="kBxti147krCTzE5f" Content-Disposition: inline In-Reply-To: <202509280958.58S9wrww083342@gitrepo.freebsd.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp --kBxti147krCTzE5f Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2025-Sep-28 09:58:53 +0000, Christos Margiolis wr= ote: >The branch main has been updated by christos: > >URL: https://cgit.FreeBSD.org/src/commit/?id=3D9cab9fde5edad9b409dd2317a2a= ec7815e6d6bed > >commit 9cab9fde5edad9b409dd2317a2aec7815e6d6bed >Author: Christos Margiolis >AuthorDate: 2025-09-28 09:56:52 +0000 >Commit: Christos Margiolis >CommitDate: 2025-09-28 09:56:52 +0000 > > virtual_oss: Port to base This fails to compile if "WITHOUT_BLUETOOTH=3Dyes" is specified (see below) because bluetooth.h isn't available (as expected). It looks like virtual_oss isn't taking that option into account when working out what to compile. # Meta data file /usr/obj/usr/src/arm64.aarch64/usr.sbin/virtual_oss/virtua= l_bt_speaker/bt_speaker.pieo.meta CMD cc -target aarch64-unknown-freebsd16.0 --sysroot=3D/usr/obj/usr/src/arm= 64.aarch64/tmp -B/usr/obj/usr/src/arm64.aarch64/tmp/usr/bin -fpie -DPIC -= O2 -pipe -fno-common -I/usr/src/usr.sbin/virtual_oss/virtual_oss -I/usr/sr= c/lib/virtual_oss/bt -mcpu=3Dcortex-a53 -fPIE -g -gz=3Dzlib -std=3Dgnu17 -= Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror -W= all -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-= prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswit= ch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Wnested-exte= rns -Wold-style-definition -Wno-pointer-sign -Wdate-time -Wmissing-variable= -declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unu= sed-const-variable -Wno-error=3Dunused-but-set-parameter -Wno-error=3Dcast-= function-type-mismatch -Qunused-arguments -c /usr/src/usr.sbin/virtua= l_oss/virtual_bt_speaker/bt_speaker.c -o bt_speaker.pieo CMD=20 CWD /usr/obj/usr/src/arm64.aarch64/usr.sbin/virtual_oss/virtual_bt_speaker TARGET bt_speaker.pieo OODATE /usr/src/usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c -- command output -- /usr/src/usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c:45:10: fatal = error: 'bluetooth.h' file not found 45 | #include | ^~~~~~~~~~~~~ 1 error generated. *** Error code 1 --=20 Peter Jeremy --kBxti147krCTzE5f Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAmjaWEJfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzSeihAAlZbPSAOAxUF+0oeuk9CiSBHYPIH79MlKyFbF65EaNidfjLoA/piSl/MH DbxhdD/SG3CR4z/xxvsviZEOchb+3cu463bNdhC8FHEfjSz1aMQdPa+G8fdtLnFB 2wb7jPhdTLIQfJuIGf0q8NA/8GaVnZArddbXEJ9HXoFigzOI38RYWgIGe6qzM3ms BXP8SwZsggeBlapmfgECI0l2gMLmJY+RTglMwvpLwM2blC4FfDb0eNXfmIXQ114r xgTq8Ld2pJSvmyyrEsglmnTCjLteVXVQ8dWlGclPZc9NW6rsLk+UdECydHjLZhBt RyRRtGQyGxSdhAebZ1LlWC7jK/26P+s6DSWw+EDgM7dXFDBWSpR2rXQQdFAvKYH+ LB5bNOsXszOnnhLBN/eeWYnt1aoSJBeaLBEI9m4zgGeIkNIcoH8aiXBDLus6D6sw 5NmPuij1rdVwgmI6DJc9OBVnIytvbcB/t4omX7Q1+vJvmDZ28U04f/n4LRKCO2/R /BCHJePdiuo9lB2HTDL0ZWBDqxbSdHedNax5rJvt88V9meBwnJ1LCFnoE1gw77Y4 c0C+anX9VQCGZN5UOAqj/1yqOljFmQpejV4hKTf7zRI54k8d99xDR0LpZlL+yGVX bR7537jq4F57xEc6LmUDE114C8vXM1pr6T7sodnB3ZFe8HpiMy4= =nxic -----END PGP SIGNATURE----- --kBxti147krCTzE5f-- From nobody Mon Sep 29 10:41: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 4cZyRb63l7z69Gkc; Mon, 29 Sep 2025 10:41: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 4cZyRb3l7Zz3VcS; Mon, 29 Sep 2025 10:41:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759142507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mbXvsNI6K8OqV4K/nE7gsugU3RkUApaUDTtjT8VQzis=; b=DqatkofgOMymj662ElY6yRKAiAJFKZ4Q11Wjjd/kDd96GSUsetL1EL2nTo0KwM65Cs9wr+ 8eom+kUWJdHSKY/Aln1WiwubWSSpKBdQXo0BwhovO1Qef5ZbuNBcJmxUL3R4yjLSTLJdoq jXZ+SWbKygpfbq6ShSOow4td5I8GiYOe+HhpcnYv/5+F5/48UqrKklxvX/DMfj6i4ELGcK vvttgr87VVl11ZNTaejdqSpDpzkg0AehKsbz8ITOHRTUzBkM3s/pz55dg0AqbqeEhezT75 sETftRDPPtF/ccikLqNnGJlipx1bfO8ydcKmG4A4GAKD2uIeh5I1fGhIprlkng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759142507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mbXvsNI6K8OqV4K/nE7gsugU3RkUApaUDTtjT8VQzis=; b=TqcCg6c5bVL/iJpZy++xseSjL+YmOxYlCNOdArtwdgJXU5xgM/ju/iZOOZft94wpgM6Rzr KKYTnaqzNPO3ifG2lilKTT4OfR+DtiDIplV3qgCuejocuTn0+tMhlkjt8HB1vZcK1ZhCrt flMGht+V2uqPnVO+I3tehxg7UA8QV2QgTN63V/g4H1N8KzVJrh5rniAo3QuvOEwjr3RJ18 0DEgqOs8Fmn1fQ673GELjBSSp+kTrCZdzhVJ8MX+2qXu2xTPRIRzgrLX4gtrD2FSEzoo9n /PXJboLikqKsW2LRbUP9PPZqy/R+QtsRZG0r9Z3tQAL+bNjSlitmR0/J20XU6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759142507; a=rsa-sha256; cv=none; b=YBb2+m2K+t/OiBfchgNF/ic+tifwxKO4wRSYqUb8mjp74NA7jbV9NVg9boimkr/7m/mEZj Q4qAS0wpCfJpCs1UtdwJc4KcxbyY8zZJDXR2OFuQ/s8XhcB6Mjbukgv3QtUngNEgh6vE1Q HXSXnqSWfcPZk7v9xihRW2Zh8vhlAztfAHqop0mscR6nlFwrMPjoM+ollFZvBYAdbLtQAf LBdbSATJmURG9ZCUo3ST5y5TLNrlkvTgNqtarRsPw2jQQ/MB6qw1r1s55luOynG4FfaWRe 3TKDHkEEwCZF8efbrAvvrcBc4ZH2E6DrHE2vtgTsaxmOeQjxn1B8+Pamwzm0Ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cZyRb3FDRz12P1; Mon, 29 Sep 2025 10:41:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TAflrv077317; Mon, 29 Sep 2025 10:41:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TAflhv077314; Mon, 29 Sep 2025 10:41:47 GMT (envelope-from git) Date: Mon, 29 Sep 2025 10:41:47 GMT Message-Id: <202509291041.58TAflhv077314@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 69ede18b950e - main - virtual_oss(8): Use proper format specifier for uintmax_t * 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: 69ede18b950e32317d7741410cde7543fa0fce3c Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=69ede18b950e32317d7741410cde7543fa0fce3c commit 69ede18b950e32317d7741410cde7543fa0fce3c Author: Christos Margiolis AuthorDate: 2025-09-29 10:40:10 +0000 Commit: Christos Margiolis CommitDate: 2025-09-29 10:40:10 +0000 virtual_oss(8): Use proper format specifier for uintmax_t * Fixes armv7 build. Reported by: CI Fixes: 9cab9fde5eda ("virtual_oss: Port to base") Sponsored by: The FreeBSD Foundation MFC after: 4 days --- usr.sbin/virtual_oss/virtual_oss/httpd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/virtual_oss/virtual_oss/httpd.c b/usr.sbin/virtual_oss/virtual_oss/httpd.c index c05d5839e96b..faea44f07f26 100644 --- a/usr.sbin/virtual_oss/virtual_oss/httpd.c +++ b/usr.sbin/virtual_oss/virtual_oss/httpd.c @@ -483,7 +483,7 @@ voss_httpd_handle_connection(vclient_t *pvc, int fd, const struct sockaddr_in *s } else if (page < 0 && strstr(line, "GET /stream.m3u") == line) { page = 2; } else if (strstr(line, "Range: bytes=") == line && - sscanf(line, "Range: bytes=%zu-%zu", &r_start, &r_end) >= 1) { + sscanf(line, "Range: bytes=%ju-%ju", &r_start, &r_end) >= 1) { is_partial = true; } } From nobody Mon Sep 29 10:45: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 4cZyWg3HLnz69HGR; Mon, 29 Sep 2025 10:45:19 +0000 (UTC) (envelope-from christos@freebsd.org) Received: from margiolis.net (mail.margiolis.net [95.179.159.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cZyWf5QvZz3Vqs; Mon, 29 Sep 2025 10:45:18 +0000 (UTC) (envelope-from christos@freebsd.org) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=default; bh=zNjQOWmfO+Np dLX/gF9GD11teOmD/K2oADCsYVSaW+o=; h=in-reply-to:references:to:from: subject:cc:date; d=margiolis.net; b=f3kPOiJdYa1MgsvYuqcWYlrHlweSv7j30d L4ujPsKth5lrSH3b3h1bO50s4mNLrRZez/kirhnwBUZ0PEJguzkT92DjsQ01E4nYZ3n49L M7+IrPNtghFUgOyjfxrCpyLa1ubpzbbtPCAFNao2pbl7R/fxzFeZSTjgmiGVtrjaYx8= Received: from localhost (public-gprs564280.centertel.pl [37.225.67.121]) by margiolis.net (OpenSMTPD) with ESMTPSA id 261f96fa (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 29 Sep 2025 04:45:11 -0600 (MDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 29 Sep 2025 12:45:09 +0200 Message-Id: Cc: , , Subject: Re: git: 9cab9fde5eda - main - virtual_oss: Port to base From: "Christos Margiolis" To: "Peter Jeremy" X-Mailer: aerc 0.21.0 References: <202509280958.58S9wrww083342@gitrepo.freebsd.org> In-Reply-To: X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20473, ipnet:95.179.144.0/20, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cZyWf5QvZz3Vqs Hello Peter, I am about to board my flight home. I will take a look at this as soon as I'm home. Thanks for reporting. Christos On Mon Sep 29, 2025 at 11:58 AM CEST, Peter Jeremy wrote: > On 2025-Sep-28 09:58:53 +0000, Christos Margiolis = wrote: >>The branch main has been updated by christos: >> >>URL: https://cgit.FreeBSD.org/src/commit/?id=3D9cab9fde5edad9b409dd2317a2= aec7815e6d6bed >> >>commit 9cab9fde5edad9b409dd2317a2aec7815e6d6bed >>Author: Christos Margiolis >>AuthorDate: 2025-09-28 09:56:52 +0000 >>Commit: Christos Margiolis >>CommitDate: 2025-09-28 09:56:52 +0000 >> >> virtual_oss: Port to base > > This fails to compile if "WITHOUT_BLUETOOTH=3Dyes" is specified (see belo= w) > because bluetooth.h isn't available (as expected). It looks like > virtual_oss isn't taking that option into account when working out what > to compile. > > # Meta data file /usr/obj/usr/src/arm64.aarch64/usr.sbin/virtual_oss/virt= ual_bt_speaker/bt_speaker.pieo.meta > CMD cc -target aarch64-unknown-freebsd16.0 --sysroot=3D/usr/obj/usr/src/a= rm64.aarch64/tmp -B/usr/obj/usr/src/arm64.aarch64/tmp/usr/bin -fpie -DPIC = -O2 -pipe -fno-common -I/usr/src/usr.sbin/virtual_oss/virtual_oss -I/usr/= src/lib/virtual_oss/bt -mcpu=3Dcortex-a53 -fPIE -g -gz=3Dzlib -std=3Dgnu17= -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror = -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissin= g-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wsw= itch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Wnested-ex= terns -Wold-style-definition -Wno-pointer-sign -Wdate-time -Wmissing-variab= le-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-u= nused-const-variable -Wno-error=3Dunused-but-set-parameter -Wno-error=3Dcas= t-function-type-mismatch -Qunused-arguments -c /usr/src/usr.sbin/virt= ual_oss/virtual_bt_speaker/bt_speaker.c -o bt_speaker.pieo > CMD=20 > CWD /usr/obj/usr/src/arm64.aarch64/usr.sbin/virtual_oss/virtual_bt_speake= r > TARGET bt_speaker.pieo > OODATE /usr/src/usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c > -- command output -- > /usr/src/usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c:45:10: fata= l error: 'bluetooth.h' file not found > 45 | #include > | ^~~~~~~~~~~~~ > 1 error generated. > > *** Error code 1 From nobody Mon Sep 29 11:57:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cb07V6hHPz69MLR; Mon, 29 Sep 2025 11:57:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb07V5rZLz3bd5; Mon, 29 Sep 2025 11:57:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759147078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3MtQAyt97Zh+PY0f2lbAaf5C1qKwx/28Mkyhz90s3W8=; b=vniv6pV/UidNM6k/xJaAvZIpw5mA4bn9+tEPEmp7oeyjsikrSEB4qOAnOD5PROxG9rioyX 6LUbMv4slzuQAJUjOwJzglg2Bg/K0SVeEo1Xvj83s19ikORQHrFzWguKeiK/if1WRXrZo3 mneoptTxRr2aYXR8E91mgbONUrU77OuyDLyxzhK/CoVWkt7zVP0DtFDSEDge72PZZ8Bt+3 EJ+5A8AJ/NYmB4Bo71cq76AcfalbLDboIauvzr7i1J8n1+q4bc2Fw99eOFbAyJ31Dxp1l4 xuq4dN2iLKtqbyCUBHe3/vXHN8HyMoDAuoNKRzdgrdUUkuSNTeWpNI/ZfJlGnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759147078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3MtQAyt97Zh+PY0f2lbAaf5C1qKwx/28Mkyhz90s3W8=; b=TLI3lzkntftlyMXMdHNHCWZE19P6n7GB1SGH4lHsxEZjtxaOw4qDHdlG5L1e2IRYdvW10W PZeiuYuBeWG2G70ViErjLb4/o4tVHBxWIpfhPNI9IwF/P7P5FjEyt2MLMy1T1TMsGBPFAu 6EKVSmC8Xm5h8b3Jsj3RKUVgWiT1H/cxUNiwv/QTC05BZa9+Uv0dDHk3C97aHTDR74nmZF dTdFh5pq7q43ng/TuQbdMwfv339INSIuLoZzJ4yBRHobajSsKoDfq/nscJ3LZvcsZHd6nu v9Xt0Ohia2NeLKnyKDhc+aCBC4+UhA1+tx58wl0RyPVzVNzEvCyD0tKENm3cGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759147078; a=rsa-sha256; cv=none; b=j5/3szExBkSpwAycvTlNmRSlRuNJVOwkXw76+XZZHadYiiaKBX10qViIKNXQrTJdFqDvP2 SW4h/IyypJD/JE+UYMKk7YhSLcRfVE48sNAvZyW83xpLbPqjwm+vEWLpZ7Yt1wqWO5pBh7 Ni1wQCsvHz71UlkFMEUBfdATxDufsYv8S3wIra7mChpTdXU6px1H0AdFth6Prx7G+C+Gw4 rYIWqi5hq7OFqmOIqWTNkRVDxRcmHuWcbnD2ondJ2YzKmOL4jY9hjcItIS1WG8/xI2luV2 zbYOPgzS8YTM21Lcvmgu1kicW5SP257PfS1xiry6lDMfcamq4WrJYUHZfh2ULA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb07V5RJfz13qt; Mon, 29 Sep 2025 11:57:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TBvww6014868; Mon, 29 Sep 2025 11:57:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TBvwmE014865; Mon, 29 Sep 2025 11:57:58 GMT (envelope-from git) Date: Mon, 29 Sep 2025 11:57:58 GMT Message-Id: <202509291157.58TBvwmE014865@gitrepo.freebsd.org> 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=B8rgrav?= Subject: git: d28e4ce6cb61 - main - tzcode: Tweak open flags. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d28e4ce6cb61916b4f6bedcf4205a4da1ae121e1 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d28e4ce6cb61916b4f6bedcf4205a4da1ae121e1 commit d28e4ce6cb61916b4f6bedcf4205a4da1ae121e1 Author: Dag-Erling Smørgrav AuthorDate: 2025-09-29 11:48:02 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-09-29 11:57:32 +0000 tzcode: Tweak open flags. Upstream uses a set of flags that reduces to O_RDONLY | O_CLOEXEC when you ignore flags that either don't exist in FreeBSD or have no effect. We were using O_RDONLY | O_BINARY, which reduces to O_RDONLY. Add O_CLOEXEC. Also replace O_RDONLY with the more accurate O_SEARCH when opening TZDIR. MFC after: 3 days Fixes: 967a49a21a27 ("Update tzcode to 2025b") --- contrib/tzcode/localtime.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/tzcode/localtime.c b/contrib/tzcode/localtime.c index 8638ac9ba2cd..1668475ea646 100644 --- a/contrib/tzcode/localtime.c +++ b/contrib/tzcode/localtime.c @@ -677,7 +677,7 @@ tzloadbody(char const *name, struct state *sp, char tzloadflags, while (*relname == '/') relname++; } - dd = open(TZDIR, O_DIRECTORY | O_RDONLY); + dd = open(TZDIR, O_DIRECTORY | O_SEARCH | O_CLOEXEC); if ((tzloadflags & TZLOAD_FROMENV) && issetugid()) { if (dd < 0) return errno; @@ -687,14 +687,14 @@ tzloadbody(char const *name, struct state *sp, char tzloadflags, fid = -1; errno = EINVAL; } else { - fid = openat(dd, relname, O_RDONLY | O_BINARY, AT_RESOLVE_BENEATH); + fid = openat(dd, relname, O_RDONLY | O_CLOEXEC | O_RESOLVE_BENEATH); } } else { if (dd < 0) { relname = name; dd = AT_FDCWD; } - fid = openat(dd, relname, O_RDONLY | O_BINARY, 0); + fid = openat(dd, relname, O_RDONLY | O_CLOEXEC); } if (dd != AT_FDCWD && dd >= 0) { serrno = errno; From nobody Mon Sep 29 12:40:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cb14860jFz69PFC; Mon, 29 Sep 2025 12:40:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb14851HJz3fHl; Mon, 29 Sep 2025 12:40:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759149608; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0O6chSwbdF10T2W6+X2xkaC20akwGe5W66aROX8Cr78=; b=xu+TVBAY7ZMHB72Oj++3v0fucyywmYz+Fn65iVnRdZk1Lbla0DZ3XeXaUfu2y2M38XMSyD OIyrlodVvbFnsPJaUEKOf1ojVyT7CFSyiu5YKqui6UjvT7TvCELgt5xeqQrQgT48UZNCJM Eyw2QxsPeyS0XokvEHZcJL0fuo4hK9QGuMhqt0lBvkqhJOPiNK9giyP75M2FSisFwsuCwA utmdi/we95dMqzsb/UZth1sRICtX63Vzt3XsghldKnjTPxOBRTOHfmUM+SNyzfOuTUE+Qz VLbMujYDZwmiIO+hvYjkxHMiodzEhcOtsGfvVNQ8stgXWbVAnGMwD7UWueSTvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759149608; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0O6chSwbdF10T2W6+X2xkaC20akwGe5W66aROX8Cr78=; b=XDSzAkoCaWfGfiFobnYv91V/ULErZKlEvtHl/0EgvP7p5oK3UUJA1xNFPTFOZi6/7ITiLI W3n9Ak8JMfgC95FMB/UnSdjRhRj6PthaxGGghVg0oaBn2wwcHNi8q/2NnO/U4Q3Flr4j5G 5xyEWhRfADQTa+v7SOzwoSJpofGWo5wIUswHrqEfk6WAmdfSCOJiCBntR1/+sCdnZBfkCT 20CxyaSGMz3U0QNtdMt8ZjzdfyF5yUbf3QNWSlxTEZLxTU0KS9VWKCaL7mA6lgsrhRJOys uJ7hNW9BNkXTFg93Cv3I04KU+bJiBKrvf0Bslm/NmorZzORkf+J5QmrSm/Tyiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759149608; a=rsa-sha256; cv=none; b=TuYivagpgPYn+ht39lwp8NtPd0SXRvuTdQeTzNuaEfvHInW0foH8atOwiGoMdO/o/bHI7X midygpCgcGBmEPvtvNbJs5gUZP+/m5XDrDDiHbLbBfKpSTEm/qWrDbSVISOeshyRxXP2u9 7W8Cbfl5KxtNEmJWlp5qDLhUzdM+GMT07pk2v+wIrtPCp/v8i2u3iFckkuKcW+bQ3881XV Ld7Cl1c9fV7yusfQ186NnWKXOyMl6Ikk1RqTm0/ZvabVVc6CWc/i+aSCbphpA3Nvw/ah9S rvtZ2TZaOTuM/hNzB8mxtTHA6mmYehR1mFa7HpGoxX5az8qk29VOAWrcXDRB0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb1484WPgz15YT; Mon, 29 Sep 2025 12:40:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TCe8SE094918; Mon, 29 Sep 2025 12:40:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TCe8gw094913; Mon, 29 Sep 2025 12:40:08 GMT (envelope-from git) Date: Mon, 29 Sep 2025 12:40:08 GMT Message-Id: <202509291240.58TCe8gw094913@gitrepo.freebsd.org> 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=B8rgrav?= Subject: git: cf76bfbb2351 - main - tzcode: Test escape from TZDIR 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: cf76bfbb235116702ea1689bf984f200a72d2790 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=cf76bfbb235116702ea1689bf984f200a72d2790 commit cf76bfbb235116702ea1689bf984f200a72d2790 Author: Dag-Erling Smørgrav AuthorDate: 2025-09-29 12:36:24 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-09-29 12:39:49 +0000 tzcode: Test escape from TZDIR Test a value of TZ that temporarily escapes from TZDIR (which is not permitted when setugid) then reenters it. MFC after: 3 days --- lib/libc/tests/stdtime/detect_tz_changes_test.c | 39 ++++++++++++++++--------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/lib/libc/tests/stdtime/detect_tz_changes_test.c b/lib/libc/tests/stdtime/detect_tz_changes_test.c index fe6b04357331..06c31c9fbc3d 100644 --- a/lib/libc/tests/stdtime/detect_tz_changes_test.c +++ b/lib/libc/tests/stdtime/detect_tz_changes_test.c @@ -24,10 +24,12 @@ #include -static const struct tzcase { +struct tzcase { const char *tzfn; const char *expect; -} tzcases[] = { +}; + +static const struct tzcase tzcases[] = { /* * A handful of time zones and the expected result of * strftime("%z (%Z)", tm) when that time zone is active @@ -43,7 +45,8 @@ static const struct tzcase { { "UTC", "+0000 (UTC)" }, { 0 }, }; - +static const struct tzcase utc = { "UTC", "+0000 (UTC)" }; +static const struct tzcase invalid = { "invalid", "+0000 (-00)" }; static const time_t then = 1751328000; /* 2025-07-01 00:00:00 UTC */ static bool debugging; @@ -139,7 +142,7 @@ ATF_TC_BODY(tz_invalid_file, tc) ATF_REQUIRE_EQ(0, chdir("/")); /* check timezone */ unsetenv("TZ"); - test_tz("+0000 (-00)"); + test_tz(invalid.expect); } ATF_TC(thin_jail); @@ -366,12 +369,8 @@ test_tz_env(const char *tzval, const char *expect) test_tz(expect); } -ATF_TC(tz_env); -ATF_TC_HEAD(tz_env, tc) -{ - atf_tc_set_md_var(tc, "descr", "Test TZ environment variable"); -} -ATF_TC_BODY(tz_env, tc) +static void +tz_env_common(void) { char path[MAXPATHLEN]; const struct tzcase *tzcase = tzcases; @@ -394,6 +393,18 @@ ATF_TC_BODY(tz_env, tc) } } +ATF_TC(tz_env); +ATF_TC_HEAD(tz_env, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test TZ environment variable"); +} +ATF_TC_BODY(tz_env, tc) +{ + tz_env_common(); + /* escape from TZDIR is permitted when not setugid */ + test_tz_env("../zoneinfo/UTC", utc.expect); +} + ATF_TC(tz_invalid_env); ATF_TC_HEAD(tz_invalid_env, tc) @@ -403,8 +414,8 @@ ATF_TC_HEAD(tz_invalid_env, tc) } ATF_TC_BODY(tz_invalid_env, tc) { - test_tz_env("invalid", "+0000 (-00)"); - test_tz_env(":invalid", "+0000 (-00)"); + test_tz_env("invalid", invalid.expect); + test_tz_env(":invalid", invalid.expect); } ATF_TC(setugid); @@ -443,7 +454,9 @@ ATF_TC_BODY(tz_env_setugid, tc) { ATF_REQUIRE_EQ(0, seteuid(UID_NOBODY)); ATF_REQUIRE(issetugid()); - ATF_TC_BODY_NAME(tz_env)(tc); + tz_env_common(); + /* escape from TZDIR is not permitted when setugid */ + test_tz_env("../zoneinfo/UTC", invalid.expect); } ATF_TP_ADD_TCS(tp) From nobody Mon Sep 29 12:59:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cb1VS5Rj1z69Qk0; Mon, 29 Sep 2025 12:59:28 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta004.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb1VR6N3sz3gMH; Mon, 29 Sep 2025 12:59:27 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=permerror reason="p tag has invalid value: quarantine rua=mailto:p[ostmaster@cschubert.com" header.from=cschubert.com (policy=permerror); spf=pass (mx1.freebsd.org: domain of cy.schubert@cschubert.com designates 3.97.99.33 as permitted sender) smtp.mailfrom=cy.schubert@cschubert.com Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTPS id 3B0nvNfrXPzKy3DTTvua44; Mon, 29 Sep 2025 12:59:27 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id 3DTRveJzqWbOa3DTSvNsJB; Mon, 29 Sep 2025 12:59:27 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=Q5lx4J2a c=1 sm=1 tr=0 ts=68da82af a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=yJojWOMRYYMA:10 a=6I5d2MoRAAAA:8 a=NEAV23lmAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=sQLVxLPwCTWh772AjQwA:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy.cwsent.com [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 16FEE1CCD; Mon, 29 Sep 2025 05:59:25 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 0816B8AF; Mon, 29 Sep 2025 05:59:25 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Christos Margiolis cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 9cab9fde5eda - main - virtual_oss: Port to base In-reply-to: <202509280958.58S9wrww083342@gitrepo.freebsd.org> References: <202509280958.58S9wrww083342@gitrepo.freebsd.org> Comments: In-reply-to Christos Margiolis message dated "Sun, 28 Sep 2025 09:58:53 +0000." List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 29 Sep 2025 05:59:24 -0700 Message-Id: <20250929125925.0816B8AF@slippy.cwsent.com> X-CMAE-Envelope: MS4xfKhP9tH7BKF+HiQDWi4FEGLE7iM/xxJljiGAKkQwgST+uJRluRFaRhXrcSnHqCCrwSkm2/L91+pDjQQHTcXyCRdx6xU6StHf5e+ydRT7yLbx7c7DAQ0O mpT/Lx9T00RL/fZ5qTMJICFU0G3QuZ+vod8YrDIJaVTu+d+5f9FQwBHkMChjz2dz5Gaz836FeA562/Ol84lqBzzjBpuXJb0F4AzK2+PXlUoe4jmNJXyyllm4 n96nKpF9G8XrimWe3D5ALIdaACLdmQZD5QqnSJh1i0+qaG2YIt1NW2b/TG1xdishBW9o0RpZvSEoUqu6S6ssSTnoS7nvHpnKgUuEOPimc8M= X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.29 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; NEURAL_HAM_MEDIUM(-0.99)[-0.990]; MV_CASE(0.50)[]; RWL_MAILSPIKE_EXCELLENT(-0.40)[3.97.99.33:from]; R_SPF_ALLOW(-0.20)[+ip4:3.97.99.32/31]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[3.97.99.33:from]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; R_DKIM_NA(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; DMARC_BAD_POLICY(0.00)[cschubert.com : p tag has invalid value: quarantine rua=mailto:p[ostmaster@cschubert.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4cb1VR6N3sz3gMH In message <202509280958.58S9wrww083342@gitrepo.freebsd.org>, Christos Margioli s writes: > The branch main has been updated by christos: > > URL: https://cgit.FreeBSD.org/src/commit/?id=9cab9fde5edad9b409dd2317a2aec781 > 5e6d6bed > > commit 9cab9fde5edad9b409dd2317a2aec7815e6d6bed > Author: Christos Margiolis > AuthorDate: 2025-09-28 09:56:52 +0000 > Commit: Christos Margiolis > CommitDate: 2025-09-28 09:56:52 +0000 > > virtual_oss: Port to base > > This patch diverges quite a bit from the current upstream [1] in a few > ways: > > 1. virtual_oss(8), virtual_bt_speaker(8) and virtual_oss_cmd(8) are > actually separate programs. > 2. Backends (lib/virtual_oss) are built as separate shared libraries and > we dlopen() them in virtual_oss(8) and virtual_bt_speaker(8) on > demand. > 3. virtual_equalizer(8) and the sndio and bluetooth backends are built > as ports, because they depend on third-party libraries. > 4. Use newer libav API in bluetooth backend (see HAVE_LIBAV ifdefs) to > address compiler errors. > > [1] https://github.com/freebsd/virtual_oss > > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > Reviewed by: emaste > Differential Revision: https://reviews.freebsd.org/D52308 > --- > etc/mtree/BSD.lib32.dist | 2 + > etc/mtree/BSD.usr.dist | 2 + > lib/Makefile | 4 +- > lib/virtual_oss/Makefile | 9 + > lib/virtual_oss/Makefile.inc | 3 + > lib/virtual_oss/bt/Makefile | 19 + > lib/virtual_oss/bt/avdtp.c | 720 ++++++ > lib/virtual_oss/bt/avdtp_signal.h | 139 ++ > lib/virtual_oss/bt/bt.c | 1061 ++++++++ > lib/virtual_oss/bt/bt.h | 116 + > lib/virtual_oss/bt/cosdata-gen/Makefile | 12 + > lib/virtual_oss/bt/cosdata-gen/cosdata.c | 177 ++ > lib/virtual_oss/bt/sbc_coeffs.h | 69 + > lib/virtual_oss/bt/sbc_encode.c | 701 ++++++ > lib/virtual_oss/bt/sbc_encode.h | 82 + > lib/virtual_oss/null/Makefile | 10 + > lib/virtual_oss/null/null.c | 102 + > lib/virtual_oss/oss/Makefile | 10 + > lib/virtual_oss/oss/oss.c | 197 ++ > lib/virtual_oss/sndio/Makefile | 12 + > lib/virtual_oss/sndio/sndio.c | 203 ++ > libexec/rc/rc.d/Makefile | 1 + > libexec/rc/rc.d/virtual_oss | 119 + > usr.sbin/Makefile | 1 + > usr.sbin/virtual_oss/Makefile | 8 + > usr.sbin/virtual_oss/Makefile.inc | 1 + > usr.sbin/virtual_oss/virtual_bt_speaker/Makefile | 11 + > .../virtual_oss/virtual_bt_speaker/bt_speaker.c | 542 ++++ > .../virtual_bt_speaker/virtual_bt_speaker.8 | 71 + > usr.sbin/virtual_oss/virtual_equalizer/Makefile | 11 + > usr.sbin/virtual_oss/virtual_equalizer/equalizer.c | 431 ++++ > .../virtual_equalizer/virtual_equalizer.8 | 127 + > usr.sbin/virtual_oss/virtual_oss/Makefile | 24 + > usr.sbin/virtual_oss/virtual_oss/audio_delay.c | 238 ++ > usr.sbin/virtual_oss/virtual_oss/backend.h | 53 + > usr.sbin/virtual_oss/virtual_oss/compressor.c | 76 + > usr.sbin/virtual_oss/virtual_oss/ctl.c | 615 +++++ > usr.sbin/virtual_oss/virtual_oss/eq.c | 226 ++ > usr.sbin/virtual_oss/virtual_oss/format.c | 429 ++++ > usr.sbin/virtual_oss/virtual_oss/httpd.c | 844 +++++++ > usr.sbin/virtual_oss/virtual_oss/int.h | 327 +++ > usr.sbin/virtual_oss/virtual_oss/main.c | 2625 ++++++++++++++++++ > ++ > usr.sbin/virtual_oss/virtual_oss/mul.c | 175 ++ > usr.sbin/virtual_oss/virtual_oss/ring.c | 213 ++ > usr.sbin/virtual_oss/virtual_oss/utils.h | 31 + > usr.sbin/virtual_oss/virtual_oss/virtual_oss.8 | 355 +++ > usr.sbin/virtual_oss/virtual_oss/virtual_oss.c | 914 +++++++ > usr.sbin/virtual_oss/virtual_oss/virtual_oss.h | 206 ++ > usr.sbin/virtual_oss/virtual_oss_cmd/Makefile | 8 + > usr.sbin/virtual_oss/virtual_oss_cmd/command.c | 113 + > .../virtual_oss/virtual_oss_cmd/virtual_oss_cmd.8 | 103 + > 51 files changed, 12547 insertions(+), 1 deletion(-) > Should this not have been imported using a vendor branch or are we intending on maintaining this ourselves without any further imports? -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e**(i*pi)+1=0 From nobody Mon Sep 29 13:26: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 4cb2664TtMz68DV6; Mon, 29 Sep 2025 13:26:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb2663kHNz3k4G; Mon, 29 Sep 2025 13:26:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759152414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U0g2UU5Ae6IuZ4GMQ4Np5s52oykQEACanEzNE/1KZ+s=; b=t4nlJWJxzoePZRdnaZVQ4s/vrObXhNHNmFXD37JADKhN1uGRnilml6K91xLlN8+wS5ybG5 2lyBiGTlhVJEiOX9Y4rAbDg9pPYCU4lJ7NoL8Yf68oTGOuHC/QxOSMqoUujYgNwYE2TUxw K/thVfeE6pBIiogJLAJy0mRTxk2zQ3gtRDMr8QWthwphB7Yw2Pgs2pDeJC0/21vl1W2sLm matJPm7mpVKZyJaayi+gljPswtXDyuw02WW/Szv/HCVGU538whCWQSoP3k3nDpGN6813Jd BqPt7Fjeykp8jiE3D14zhn5E9DI6wOid88vtJjm5NCBZ8VsFKgvkXoLpFM02lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759152414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U0g2UU5Ae6IuZ4GMQ4Np5s52oykQEACanEzNE/1KZ+s=; b=ri85puVPeyi0itAucE0NFt3oB+chPSXTPNJyxvZ4P/pugKME26W+O2IGnkU5WMFmqW9XJb IA33rFVeujYItbLFIucTr872NyuJQ5OpFDeYsel2zHo76FVF6pIrLOL6yX2gGCMdZqwrya yKUAcDw092JpfSPD7BWvgKKgBcLxhrHvBfx9coIsVeUxlvEcwqDltuHRob1YYgqNKKxjPc 2GY2nqLRatrsFe7QB+iT9ZaZbjnEeGUwd7PsbR/49x5SmVjTyHZuk8nMnLuoyDGwjKIgnh OcNY4IDK7FVW7WrNeyCFAz4prn3x+MomI8K+G1OFUiSSErIiz4Sq/034XzxuaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759152414; a=rsa-sha256; cv=none; b=IAMFOWpU3bXrDaN8/nK2SP7DXy3h0BoDhCwY9WmJClB/RBO4wtVRQlSJSihd0EG0sHho03 DMMS5WYgTA88dFfS8sA2wE7iYCTzDN8u2+NnhjpIefc3dJr1MX5tbrMwSBjaesgeH5QlDW wu6AmO8tmVIMiv0O34JLcbs53uqciQmSaqiPECNvvHnL9XX/mYyXbV96AOV+z8dMglH1fp SPDzehDt15D5Gw4emaBUO1AaBPNKt5S8mbJWvBYbnyWxo/ttTxQ7UVQBWqErqsO/eEP2L/ eYTpEKxmoz575B2mONgRa9ORluiWVfpuvsSPCVH54/3RFGgrdu2cLQJell4c2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb2663BWzz15rf; Mon, 29 Sep 2025 13:26:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TDQswE084314; Mon, 29 Sep 2025 13:26:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TDQsAE084311; Mon, 29 Sep 2025 13:26:54 GMT (envelope-from git) Date: Mon, 29 Sep 2025 13:26:54 GMT Message-Id: <202509291326.58TDQsAE084311@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: c856f327fa6c - main - mpr.4: Improve HARDWARE introductory sentance 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: c856f327fa6ccf1c5b9e4f531581fa2a0d83c3e0 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=c856f327fa6ccf1c5b9e4f531581fa2a0d83c3e0 commit c856f327fa6ccf1c5b9e4f531581fa2a0d83c3e0 Author: Alexander Ziaee AuthorDate: 2025-09-29 13:23:24 +0000 Commit: Alexander Ziaee CommitDate: 2025-09-29 13:23:24 +0000 mpr.4: Improve HARDWARE introductory sentance Add context for inclusion in Hardware Release Notes. MFC after: 3 days --- share/man/man4/mpr.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/mpr.4 b/share/man/man4/mpr.4 index e114ecfd077b..cce21113e5c2 100644 --- a/share/man/man4/mpr.4 +++ b/share/man/man4/mpr.4 @@ -65,9 +65,9 @@ Fusion-MPT 3/3.5 IT/IR .Tn SAS/PCIe controllers. .Sh HARDWARE -These controllers are supported by the +The .Nm -driver: +driver supports the following SATA/SAS/NVMe RAID controllers: .Pp .Bl -bullet -compact .It From nobody Mon Sep 29 14:29: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 4cb3VL4cKvz68JkP for ; Mon, 29 Sep 2025 14:29:30 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb3VK5cbWz3rvY for ; Mon, 29 Sep 2025 14:29:29 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=lm23Ulnp; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2a00:1450:4864:20::630 as permitted sender) smtp.mailfrom=mjguzik@gmail.com Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-b30ead58e0cso889990066b.0 for ; Mon, 29 Sep 2025 07:29:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759156163; x=1759760963; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=YBLHlyNPP9t6LcTzFCize7wx0KHrkxDOhL/BE24R//o=; b=lm23UlnpRyXqjvamNsuEhKDffYIOBbGuGItVenDH0nnJVCaoe2+vVoHJuRfdQUmlqg AQDGT78FV7JiRNiWi1fj5fUihQdbRq5Q1x6mnIU4fUqhskV4w41YMp011RWYoyh3MBXq ZZ1uVh5Vewgwks6VwVH2T2TqvyacicGK08nQooyoUnQQoRam9DxE5Ugu+AXf0hyiAXcE VKKCyPFseHhasbJDzESzsKRjKdD5EC2r6YCN28Tysv3CwklTn1c6xYU1WwujBnnm3lQX FApnveiDzgNSWKB8Pe6KUFSLaX7F2o8pm8WRtyMc+6aFsxTkqZP5wWg5mkrLSBxLS7gp eIgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759156163; x=1759760963; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YBLHlyNPP9t6LcTzFCize7wx0KHrkxDOhL/BE24R//o=; b=CK0x/eBWDLb+JakR/PNv7oj1M3jSVNyJS9CHTPyR96D6Z/aJ78HRpIxQ08qqr74ZKV b01EeGehNrZlVD8GbSxX4/oT0Dbgncb2o64f+rl6JhNGju1N5WxqjOgglySvpIM0EJPf HNKtKEZGiRfXztJIC4ml+J9eRY3C+qv57B+xduCoRze/OXBqLs67nw99obV/U47pwRyA nFx9PMGn7Z2LZjufmPAw3JZr1tGLR2RtnJJrVie5RVy8WIh3PwRg9jr+jT9jrzFrfmIn /1T8eCANDmPn/pEaVbs+aL1BIaDL9qIIvCWznc2y6zXOqrD7j042l1clDyDv3YvjqrPD uJEg== X-Forwarded-Encrypted: i=1; AJvYcCVfETgzfgEFkkIxUmjDhyn2lRDaUpQtkbE2tfbh/KUS+NhLBbrJrqS5SKqyrS1hfwziT6aVyJuUeR8M5D0gfHMFWZpHRg==@freebsd.org X-Gm-Message-State: AOJu0YwTwGGk7VJfrng94+YzxP6StnALtkKVWlziWvGkWK3S5XoU+xn6 Je6h0YHrfSH+lPe+e0+YcO83NpDGXXrzmab77On+co5gwiaeba40zU+ATjpjqZ2smsHmJU9fZmD xCJnhQCprheawOKN4GGuifN5aPI+DbnY= X-Gm-Gg: ASbGncsfAwwqDqWCo/nV4o0l+hr2cxApm4D/AkXUMAXpVJ8nT8xDGW662y+4DuQQly4 tm10CgEcWlfGm+1u+ch7O9aThyOkfgDave7Cj64A7V+55o4d6Exqqg09hfK7O/yh4MmZ0U+OHM5 U2ezBj8IHCpoMHx/cvcaTbz9Jv9SRHccwEcMmUMypxOL6/Zz9UXHHV+PBH7mLxN7tRv9nQECiAx MU1kDZUsEN49U8GtUEOBRt40Dx16JgAmZvcHU8LPmQI1xGRbpvB X-Google-Smtp-Source: AGHT+IEkZNqiBgfYXi24bTKQaauuEp0ioRIig8yAgcJm4J7t9sRejqAc4+zaDnu5KN51zRfcsGO/imJ86TaEDkBg8w8= X-Received: by 2002:a17:906:6a14:b0:b29:8743:8203 with SMTP id a640c23a62f3a-b34b14ad9e0mr1967841766b.0.1759156162755; Mon, 29 Sep 2025 07:29:22 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <201310151031.r9FAVgRP008282@svn.freebsd.org> In-Reply-To: <201310151031.r9FAVgRP008282@svn.freebsd.org> From: Mateusz Guzik Date: Mon, 29 Sep 2025 16:29:10 +0200 X-Gm-Features: AS18NWCCz3H2jT3gqy1oALdqtkYDW60-H4oU7xM-w0Ip-hoLD87gG_bp3uGrPIc Message-ID: Subject: Re: svn commit: r256519 - in head/sys: net netatalk netinet netinet6 netipx To: Gleb Smirnoff Cc: src-committers@freebsd.org, "" , "dev-commits-src-main@FreeBSD.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.88 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-0.99)[-0.991]; NEURAL_HAM_SHORT(-0.88)[-0.885]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[text/plain]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; MISSING_XM_UA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::630:from]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MID_RHS_MATCH_FROMTLD(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_COUNT_ONE(0.00)[1]; FREEMAIL_ENVFROM(0.00)[gmail.com] X-Rspamd-Queue-Id: 4cb3VK5cbWz3rvY On Tue, Oct 15, 2013 at 12:31=E2=80=AFPM Gleb Smirnoff wrote: > > Author: glebius > Date: Tue Oct 15 10:31:42 2013 > New Revision: 256519 > URL: http://svnweb.freebsd.org/changeset/base/256519 > > Log: > Remove ifa_init() and provide ifa_alloc() that will allocate and setu= p > struct ifaddr internally. > > Sponsored by: Netflix > Sponsored by: Nginx, Inc. > > Modified: > head/sys/net/if.c > head/sys/net/if_var.h > head/sys/netatalk/at_control.c > head/sys/netinet/in.c > head/sys/netinet6/in6.c > head/sys/netipx/ipx.c > > Modified: head/sys/net/if.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/net/if.c Tue Oct 15 10:19:24 2013 (r256518) > +++ head/sys/net/if.c Tue Oct 15 10:31:42 2013 (r256519) > @@ -633,8 +633,7 @@ if_attach_internal(struct ifnet *ifp, in > socksize =3D sizeof(*sdl); > socksize =3D roundup2(socksize, sizeof(long)); > ifasize =3D sizeof(*ifa) + 2 * socksize; > - ifa =3D malloc(ifasize, M_IFADDR, M_WAITOK | M_ZERO); > - ifa_init(ifa); > + ifa =3D ifa_alloc(ifasize, M_WAITOK); > sdl =3D (struct sockaddr_dl *)(ifa + 1); > sdl->sdl_len =3D socksize; > sdl->sdl_family =3D AF_LINK; > @@ -1417,13 +1416,23 @@ if_maddr_runlock(struct ifnet *ifp) > /* > * Initialization, destruction and refcounting functions for ifaddrs. > */ > -void > -ifa_init(struct ifaddr *ifa) > +struct ifaddr * > +ifa_alloc(size_t size, int flags) > { > + struct ifaddr *ifa; > + > + KASSERT(size >=3D sizeof(struct ifaddr), > + ("%s: invalid size %zu", __func__, size)); > + We have crashes stemming from this: panic: ifa_alloc: invalid size 16 panic() at panic+0x43/frame 0xfffffe009e777760 ifa_alloc() at ifa_alloc+0xd6/frame 0xfffffe009e777780 in6_ifadd() at in6_ifadd+0xd8/frame 0xfffffe009e7778a0 nd6_ra_input() at nd6_ra_input+0x1023/frame 0xfffffe009e777a80 icmp6_input() at icmp6_input+0x5b6/frame 0xfffffe009e777c00 ip6_input() at ip6_input+0xc94/frame 0xfffffe009e777ce0 sppp_input() at sppp_input+0x502/frame 0xfffffe009e777d70 pppoe_data_input() at pppoe_data_input+0x1e7/frame 0xfffffe009e777de0 swi_net() at swi_net+0x19b/frame 0xfffffe009e777e60 ithread_loop() at ithread_loop+0x266/frame 0xfffffe009e777ef0 fork_exit() at fork_exit+0x82/frame 0xfffffe009e777f30 fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe009e777f30 in6_ifadd has: struct in6_addr taddr; ifa =3D ifa_alloc(sizeof(taddr), M_WAITOK); should the assert be simply removed? > + ifa =3D malloc(size, M_IFADDR, M_ZERO | flags); > + if (ifa =3D=3D NULL) > + return (NULL); > > mtx_init(&ifa->ifa_mtx, "ifaddr", NULL, MTX_DEF); > refcount_init(&ifa->ifa_refcnt, 1); > ifa->if_data.ifi_datalen =3D sizeof(ifa->if_data); > + > + return (ifa); > } > > void > > Modified: head/sys/net/if_var.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/net/if_var.h Tue Oct 15 10:19:24 2013 (r256518) > +++ head/sys/net/if_var.h Tue Oct 15 10:31:42 2013 (r256519) > @@ -819,8 +819,8 @@ struct ifaddr { > #define IFA_LOCK(ifa) mtx_lock(&(ifa)->ifa_mtx) > #define IFA_UNLOCK(ifa) mtx_unlock(&(ifa)->ifa_mtx) > > +struct ifaddr * ifa_alloc(size_t size, int flags); > void ifa_free(struct ifaddr *ifa); > -void ifa_init(struct ifaddr *ifa); > void ifa_ref(struct ifaddr *ifa); > #endif > > > Modified: head/sys/netatalk/at_control.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netatalk/at_control.c Tue Oct 15 10:19:24 2013 (= r256518) > +++ head/sys/netatalk/at_control.c Tue Oct 15 10:31:42 2013 (= r256519) > @@ -199,16 +199,10 @@ at_control(struct socket *so, u_long cmd > * allocate a fresh one. > */ > if (aa =3D=3D NULL) { > - aa =3D malloc(sizeof(struct at_ifaddr), M_IFADDR, > - M_NOWAIT | M_ZERO); > - if (aa =3D=3D NULL) { > - error =3D ENOBUFS; > - goto out; > - } > - callout_init(&aa->aa_callout, CALLOUT_MPSAFE); > + ifa =3D ifa_alloc(sizeof(struct at_ifaddr), M_WAI= TOK); > + aa =3D (struct at_ifaddr *)ifa; > > - ifa =3D (struct ifaddr *)aa; > - ifa_init(ifa); > + callout_init(&aa->aa_callout, CALLOUT_MPSAFE); > > /* > * As the at_ifaddr contains the actual sockaddrs= , > > Modified: head/sys/netinet/in.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet/in.c Tue Oct 15 10:19:24 2013 (r256518) > +++ head/sys/netinet/in.c Tue Oct 15 10:31:42 2013 (r256519) > @@ -404,16 +404,8 @@ in_control(struct socket *so, u_long cmd > goto out; > } > if (ia =3D=3D NULL) { > - ia =3D (struct in_ifaddr *) > - malloc(sizeof *ia, M_IFADDR, M_NOWAIT | > - M_ZERO); > - if (ia =3D=3D NULL) { > - error =3D ENOBUFS; > - goto out; > - } > - > - ifa =3D &ia->ia_ifa; > - ifa_init(ifa); > + ifa =3D ifa_alloc(sizeof(struct in_ifaddr), M_WAI= TOK); > + ia =3D (struct in_ifaddr *)ifa; > ifa->ifa_addr =3D (struct sockaddr *)&ia->ia_addr= ; > ifa->ifa_dstaddr =3D (struct sockaddr *)&ia->ia_d= staddr; > ifa->ifa_netmask =3D (struct sockaddr *)&ia->ia_s= ockmask; > > Modified: head/sys/netinet6/in6.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netinet6/in6.c Tue Oct 15 10:19:24 2013 (r256518) > +++ head/sys/netinet6/in6.c Tue Oct 15 10:31:42 2013 (r256519) > @@ -1141,12 +1141,9 @@ in6_update_ifa(struct ifnet *ifp, struct > * RA, it is called under an interrupt context. So, we s= hould > * call malloc with M_NOWAIT. > */ > - ia =3D (struct in6_ifaddr *) malloc(sizeof(*ia), M_IFADDR= , > - M_NOWAIT); > + ia =3D (struct in6_ifaddr *)ifa_alloc(sizeof(*ia), M_NOWA= IT); > if (ia =3D=3D NULL) > return (ENOBUFS); > - bzero((caddr_t)ia, sizeof(*ia)); > - ifa_init(&ia->ia_ifa); > LIST_INIT(&ia->ia6_memberships); > /* Initialize the address and masks, and put time stamp *= / > ia->ia_ifa.ifa_addr =3D (struct sockaddr *)&ia->ia_addr; > > Modified: head/sys/netipx/ipx.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/netipx/ipx.c Tue Oct 15 10:19:24 2013 (r256518) > +++ head/sys/netipx/ipx.c Tue Oct 15 10:31:42 2013 (r256519) > @@ -190,13 +190,8 @@ ipx_control(struct socket *so, u_long cm > if (td && (error =3D priv_check(td, PRIV_NET_SETLLADDR)) = !=3D 0) > goto out; > if (ia =3D=3D NULL) { > - ia =3D malloc(sizeof(*ia), M_IFADDR, M_NOWAIT | M= _ZERO); > - if (ia =3D=3D NULL) { > - error =3D ENOBUFS; > - goto out; > - } > - ifa =3D (struct ifaddr *)ia; > - ifa_init(ifa); > + ifa =3D ifa_alloc(sizeof(struct ipx_ifaddr), M_WA= ITOK); > + ia =3D (struct ipx_ifaddr *)ifa; > ia->ia_ifp =3D ifp; > ifa->ifa_addr =3D (struct sockaddr *)&ia->ia_addr= ; > ifa->ifa_netmask =3D (struct sockaddr *)&ipx_netm= ask; From nobody Mon Sep 29 14:37:40 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cb3gm51Pwz68K08; Mon, 29 Sep 2025 14:37:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb3gm4Lgdz3sQW; Mon, 29 Sep 2025 14:37:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O3gFaRzrv/k/stD7+r0TpZXve3j6i+9kCv9E61ptL4Q=; b=ffqEuiopZ04YsWyGSpPECFgwZW1ioDh7Cm1auildtK2fdMMw/I2l3clPVv6h+ne+7p8Ecl FRCBNC6DHyl9FI8e0Tlacx+CNor6X+vyfyKhq6DfecK7OYXCBTKEBM15MvAAocngqfFZIg OQQ+8fc1+Jj+dlJ/5e2xg+bkylRQg/JRScFxofui7O3TGMP6sjcyxX93StvCGsj85gTNak p0XWi3rKgkrlxu2EVmOKz1yeeYtD8Rn/RL+uuGTqzA1H6DhUW7hK79Hq1TcNLPo3uLgXul sCO5N3MH29tNXVuVOGu7uFWcnAg2xAtgabT7zMOXdGpxgAQa241sVUL+hz8Qzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156660; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O3gFaRzrv/k/stD7+r0TpZXve3j6i+9kCv9E61ptL4Q=; b=e2PpPlOULpilRmfFRlqPDwd6ey7TaW9fK2PuaLg32P0in+22Yu5iyyHBZnwOpAwfILh8yr EslY+Jojgc4W86hCAth1PlH7Vps+BCyQjsp2eaCnxvQB8TaxOEkDeY1cnyKQ508Q2Y5HOz iwotVyxa9PVtsDWDY6JLbmemXuiR21SFrawhDPQYpMSWL+v81r6Di4eRtEIa8WBrtZ+zcS 1PYQ0BrLzrwxxWeRkxyudDXYam+okNcfpmAvJiuXLxM3ijYsZ7jik+M0woGM4etYZ59af8 G/MIWJ6DgH4zMTikiTf25dVs/1+qFcqX7KjnNCzwOYXNVh3kFCHf4dmzTDz0lA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759156660; a=rsa-sha256; cv=none; b=K58kS2U+rRHH0DoHlzXY4Q6UtbPxOGTXckYqzoXhXFKWOf3sHIkfiEPCuRcTSv6oweuClJ eKcDG9BlqRlcSNEBrLf2w8L6lIfM0IujtkBveefyiq43hnZOUkeGYJle85UmMiQlprPGS+ E+OAv30bUVKHu7qNX2VQrl0Fc+xv+HF5RzvVEErLQeNTDA2//wSRpOVGdp6klbOPgKeD8N v2g3jfHxOchrJ7O4VxmgemTdUWYrYfE1ok18dSP1TX3YWYooQuKJgdHL/El/kBxhscj9oW gFvtI9iABadIUicxOULKOk2w5N/godkmj7yma9g7AbOkioDJAiJgyOO3EOh5lQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb3gm3TxFz18cQ; Mon, 29 Sep 2025 14:37:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TEbeXD017486; Mon, 29 Sep 2025 14:37:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TEbeIs017483; Mon, 29 Sep 2025 14:37:40 GMT (envelope-from git) Date: Mon, 29 Sep 2025 14:37:40 GMT Message-Id: <202509291437.58TEbeIs017483@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 499ff78fb11a - main - cxgbe(4): Rename lport to hw_port. 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 499ff78fb11a5868dfaeaa3fa86ca782b8f06f27 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=499ff78fb11a5868dfaeaa3fa86ca782b8f06f27 commit 499ff78fb11a5868dfaeaa3fa86ca782b8f06f27 Author: Navdeep Parhar AuthorDate: 2025-09-29 05:40:24 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 14:25:58 +0000 cxgbe(4): Rename lport to hw_port. No functional change intended. MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/adapter.h | 2 +- sys/dev/cxgbe/common/t4_hw.c | 2 +- sys/dev/cxgbe/crypto/t6_kern_tls.c | 2 +- sys/dev/cxgbe/t4_l2t.c | 14 +++++++------- sys/dev/cxgbe/t4_l2t.h | 2 +- sys/dev/cxgbe/tom/t4_tom.c | 2 +- sys/dev/cxgbe/tom/t4_tom_l2t.c | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index d3820245837a..248a8e112add 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -319,7 +319,7 @@ struct port_info { char lockname[16]; unsigned long flags; - uint8_t lport; /* associated offload logical port */ + uint8_t hw_port; /* associated hardware port idx */ int8_t mdio_addr; uint8_t port_type; uint8_t mod_type; diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c index 07940a44f66e..01890b9598b8 100644 --- a/sys/dev/cxgbe/common/t4_hw.c +++ b/sys/dev/cxgbe/common/t4_hw.c @@ -9818,11 +9818,11 @@ int t4_port_init(struct adapter *adap, int mbox, int pf, int vf, int port_id) } while ((adap->params.portvec & (1 << j)) == 0); } + p->hw_port = j; p->tx_chan = t4_get_tx_c_chan(adap, j); p->rx_chan = t4_get_rx_c_chan(adap, j); p->mps_bg_map = t4_get_mps_bg_map(adap, j); p->rx_e_chan_map = t4_get_rx_e_chan_map(adap, j); - p->lport = j; if (!(adap->flags & IS_VF) || adap->params.vfres.r_caps & FW_CMD_CAP_PORT) { diff --git a/sys/dev/cxgbe/crypto/t6_kern_tls.c b/sys/dev/cxgbe/crypto/t6_kern_tls.c index 04bb6c944050..454b2e264a0e 100644 --- a/sys/dev/cxgbe/crypto/t6_kern_tls.c +++ b/sys/dev/cxgbe/crypto/t6_kern_tls.c @@ -2003,7 +2003,7 @@ t6_ktls_write_wr(struct sge_txq *txq, void *dst, struct mbuf *m, if (tlsp->l2te) t4_l2t_release(tlsp->l2te); tlsp->l2te = t4_l2t_alloc_tls(tlsp->sc, txq, dst, &ndesc, - vlan_tag, tlsp->vi->pi->lport, eh->ether_dhost); + vlan_tag, tlsp->vi->pi->hw_port, eh->ether_dhost); if (tlsp->l2te == NULL) CXGBE_UNIMPLEMENTED("failed to allocate TLS L2TE"); if (ndesc != 0) { diff --git a/sys/dev/cxgbe/t4_l2t.c b/sys/dev/cxgbe/t4_l2t.c index b1307bf2ace5..5f9c26a0f720 100644 --- a/sys/dev/cxgbe/t4_l2t.c +++ b/sys/dev/cxgbe/t4_l2t.c @@ -119,7 +119,7 @@ find_or_alloc_l2e(struct l2t_data *d, uint16_t vlan, uint8_t port, uint8_t *dmac first_free = e; } else if (e->state == L2T_STATE_SWITCHING && memcmp(e->dmac, dmac, ETHER_ADDR_LEN) == 0 && - e->vlan == vlan && e->lport == port) + e->vlan == vlan && e->hw_port == port) return (e); /* Found existing entry that matches. */ } @@ -156,7 +156,7 @@ mk_write_l2e(struct adapter *sc, struct l2t_entry *e, int sync, int reply, INIT_TP_WR(req, 0); OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_L2T_WRITE_REQ, idx | V_SYNC_WR(sync) | V_TID_QID(e->iqid))); - req->params = htons(V_L2T_W_PORT(e->lport) | V_L2T_W_NOREPLY(!reply)); + req->params = htons(V_L2T_W_PORT(e->hw_port) | V_L2T_W_NOREPLY(!reply)); req->l2t_idx = htons(idx); req->vlan = htons(e->vlan); memcpy(req->dst_mac, e->dmac, sizeof(req->dst_mac)); @@ -227,7 +227,7 @@ t4_l2t_alloc_tls(struct adapter *sc, struct sge_txq *txq, void *dst, e = &d->l2tab[i]; if (e->state != L2T_STATE_TLS) continue; - if (e->vlan == vlan && e->lport == port && + if (e->vlan == vlan && e->hw_port == port && e->wrq == (struct sge_wrq *)txq && memcmp(e->dmac, eth_addr, ETHER_ADDR_LEN) == 0) { if (atomic_fetchadd_int(&e->refcnt, 1) == 0) { @@ -263,7 +263,7 @@ t4_l2t_alloc_tls(struct adapter *sc, struct sge_txq *txq, void *dst, /* Initialize the entry. */ e->state = L2T_STATE_TLS; e->vlan = vlan; - e->lport = port; + e->hw_port = port; e->iqid = sc->sge.fwq.abs_id; e->wrq = (struct sge_wrq *)txq; memcpy(e->dmac, eth_addr, ETHER_ADDR_LEN); @@ -303,7 +303,7 @@ t4_l2t_alloc_switching(struct adapter *sc, uint16_t vlan, uint8_t port, e->iqid = sc->sge.fwq.abs_id; e->state = L2T_STATE_SWITCHING; e->vlan = vlan; - e->lport = port; + e->hw_port = port; memcpy(e->dmac, eth_addr, ETHER_ADDR_LEN); atomic_store_rel_int(&e->refcnt, 1); atomic_subtract_int(&d->nfree, 1); @@ -313,7 +313,7 @@ t4_l2t_alloc_switching(struct adapter *sc, uint16_t vlan, uint8_t port, e = NULL; } else { MPASS(e->vlan == vlan); - MPASS(e->lport == port); + MPASS(e->hw_port == port); atomic_add_int(&e->refcnt, 1); } } @@ -488,7 +488,7 @@ sysctl_l2t(SYSCTL_HANDLER_ARGS) " %u %2u %c %5u %s", e->idx, ip, e->dmac[0], e->dmac[1], e->dmac[2], e->dmac[3], e->dmac[4], e->dmac[5], - e->vlan & 0xfff, vlan_prio(e), e->lport, + e->vlan & 0xfff, vlan_prio(e), e->hw_port, l2e_state(e), atomic_load_acq_int(&e->refcnt), e->ifp ? if_name(e->ifp) : "-"); skip: diff --git a/sys/dev/cxgbe/t4_l2t.h b/sys/dev/cxgbe/t4_l2t.h index 13e085bb7467..989d2d5ec8f3 100644 --- a/sys/dev/cxgbe/t4_l2t.h +++ b/sys/dev/cxgbe/t4_l2t.h @@ -71,7 +71,7 @@ struct l2t_entry { volatile int refcnt; /* entry reference count */ uint16_t hash; /* hash bucket the entry is on */ uint8_t ipv6; /* entry is for an IPv6 address */ - uint8_t lport; /* associated offload logical port */ + uint8_t hw_port; /* associated hardware port idx */ uint8_t dmac[ETHER_ADDR_LEN]; /* next hop's MAC address */ }; diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c index 0b54fdaa5c80..238078817d99 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -1221,7 +1221,7 @@ select_ntuple(struct vi_info *vi, struct l2t_entry *e) ntuple |= (uint64_t)(F_FT_VLAN_VLD | e->vlan) << tp->vlan_shift; if (tp->port_shift >= 0) - ntuple |= (uint64_t)e->lport << tp->port_shift; + ntuple |= (uint64_t)e->hw_port << tp->port_shift; if (tp->protocol_shift >= 0) ntuple |= (uint64_t)IPPROTO_TCP << tp->protocol_shift; diff --git a/sys/dev/cxgbe/tom/t4_tom_l2t.c b/sys/dev/cxgbe/tom/t4_tom_l2t.c index 3fd0d5ca41d4..e245c2b6fd5b 100644 --- a/sys/dev/cxgbe/tom/t4_tom_l2t.c +++ b/sys/dev/cxgbe/tom/t4_tom_l2t.c @@ -403,7 +403,7 @@ t4_l2t_get(struct port_info *pi, if_t ifp, struct sockaddr *sa) l2_store(sa, e); e->ifp = ifp; e->hash = hash; - e->lport = pi->lport; + e->hw_port = pi->hw_port; e->wrq = &sc->sge.ctrlq[pi->port_id]; e->iqid = sc->sge.ofld_rxq[pi->vi[0].first_ofld_rxq].iq.abs_id; atomic_store_rel_int(&e->refcnt, 1); From nobody Mon Sep 29 14:37:41 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cb3gn4sLXz68KTJ; Mon, 29 Sep 2025 14:37:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb3gn4RWvz3sQX; Mon, 29 Sep 2025 14:37:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZjFwxszcLh40gEB5gq9wJ0SPpclRxDS20jmxr/qheRo=; b=kPm9ksyZ3U52oyX9T+1LFO/8bwnivvjjVJvLUrd6kTF6FT1zrmsVktKhLdeAkB1i57vLSY tl5wljQoWql8l5SfxDJ+pSA37Fl/eppgqvDtRLCxzzAvLbqHlaVmNXpBjgOy4BcWvdFHPw J1B4YBPc0uTwVs3XkP5gwioLI98WOpJg+gulwWw/VQu9KwkWl029nMt74QK/tWz+qA4ZPy NHvft4hRyaw+PueLSDNx7ONXmPvy/PYwu3LmMAxRy3FzNcjtrn8phmZWWCkEqhqJLcaDRP jwIHQOVAISe6SD+xOpytknGvXgKcGuEYAzDcXs4WLfwHLbmBGPSp3zI2L6xWTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156661; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZjFwxszcLh40gEB5gq9wJ0SPpclRxDS20jmxr/qheRo=; b=OskJdmREZnGdpdp4FSygVP0z4Fj5Ba5CxpF/J0ZXKp1LaUU4sW8a9tE8l3yrcFMcNaPVmh EqXMVtaIvppslwyS+Q+JphXNCegJqhIp3uR27NT+PVhpgKfZP6YXGsps9wRXdQ+h13Wg3M Z/oF292744TBpLZ16+/AU7pIQ8tejLRaAbpGmi28eWiFMJSKJ9Mfu+vtKB5OYPVjdJE7ZP sloxU7jvmGpIzbDlMdSBZBcnEwRaeFt2VJJAnMtDJN8pBJ6NjVMUdijz7C70MRG2tf/wUh 4U4rM8eXtJ2o5M1qPLRCJ1FqVXJ3U/uVaMeDg2zW/gjmZvejuNF720pDlyeGUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759156661; a=rsa-sha256; cv=none; b=qQAzv7qpsGe76H1yxgNT+MMiEN21bdNTdP9ovJmsanNtiWVZEuo9ev2ANjioCLkYLrDFy9 5I4O+I12SM0MUhuj+PYKIqOfei+SOHf06/9X9gaDPdocim9IKY1fyat1IMS/CGXGR00UKG nUnwhXrpsofO83LNq+Mq4QBBywB5HPg1fSidTpT9fGq9ho7p9S7b4eohNOjhAMLfkbAOvI 4KZLwR07DKNxHc2pwTddEnHngX4Od9nI49dbXFCZ7X9T3FHYBkniwpsZKWHaU5MUGBzZAn 7+PGkXr8JK4JGJvFERTIgByhSmB40PZr7amLaFzo4GfPcFSEWdDKuWucfTdf7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb3gn40z3z18Dm; Mon, 29 Sep 2025 14:37:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TEbfqS017530; Mon, 29 Sep 2025 14:37:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TEbfEd017523; Mon, 29 Sep 2025 14:37:41 GMT (envelope-from git) Date: Mon, 29 Sep 2025 14:37:41 GMT Message-Id: <202509291437.58TEbfEd017523@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 6d29d22a9e0c - main - cxgbe(4): Use hw_port and tx_chan correctly all over the driver List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d29d22a9e0c33d1e3e70b8c458982c59b76eb29 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=6d29d22a9e0c33d1e3e70b8c458982c59b76eb29 commit 6d29d22a9e0c33d1e3e70b8c458982c59b76eb29 Author: Navdeep Parhar AuthorDate: 2025-09-29 05:45:01 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 14:25:58 +0000 cxgbe(4): Use hw_port and tx_chan correctly all over the driver The port's tx channel and its hardware index are different things that happen to have the same value on NICs using T4 through T6. This is going to change so use the correct spelling all over the driver. Specifically, the firmware expects the hw port index in all of these: * PCIe channel for queues * TX interface for TX CPLs * PORTID in FW_PORT commands * PORTID in t4_alloc_vi * flowid in all the firmware flowc WRs * mbox commands that deal with the tx scheduler Also, create a port_id lookup table for hw_port, just like the one for tx_chan. Use it to lookup the port softc in the port_info handler. MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/adapter.h | 6 ++++-- sys/dev/cxgbe/common/t4_hw.c | 16 ++++++---------- sys/dev/cxgbe/t4_main.c | 14 ++++++++------ sys/dev/cxgbe/t4_netmap.c | 6 +++--- sys/dev/cxgbe/t4_sched.c | 6 +++--- sys/dev/cxgbe/t4_sge.c | 22 ++++++++++++---------- sys/dev/cxgbe/tom/t4_cpl_io.c | 5 +++-- sys/dev/cxgbe/tom/t4_listen.c | 5 +++-- 8 files changed, 42 insertions(+), 38 deletions(-) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index 248a8e112add..5abe0de7664f 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -477,6 +477,7 @@ struct sge_eq { uint8_t doorbells; uint8_t port_id; /* port_id of the port associated with the eq */ uint8_t tx_chan; /* tx channel used by the eq */ + uint8_t hw_port; /* hw port used by the eq */ struct mtx eq_lock; struct tx_desc *desc; /* KVA of descriptor ring */ @@ -937,7 +938,8 @@ struct adapter { struct taskqueue *tq[MAX_NPORTS]; /* General purpose taskqueues */ struct port_info *port[MAX_NPORTS]; - uint8_t chan_map[MAX_NCHAN]; /* channel -> port */ + uint8_t chan_map[MAX_NCHAN]; /* tx_chan -> port_id */ + uint8_t port_map[MAX_NPORTS]; /* hw_port -> port_id */ CXGBE_LIST_HEAD(, clip_entry) *clip_table; TAILQ_HEAD(, clip_entry) clip_pending; /* these need hw update. */ @@ -961,7 +963,7 @@ struct adapter { uint8_t doorbells; int offload_map; /* port_id's with IFCAP_TOE enabled */ - int bt_map; /* tx_chan's with BASE-T */ + int bt_map; /* hw_port's that are BASE-T */ int active_ulds; /* ULDs activated on this adapter */ int flags; int debug_flags; diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c index 01890b9598b8..f90ad3010626 100644 --- a/sys/dev/cxgbe/common/t4_hw.c +++ b/sys/dev/cxgbe/common/t4_hw.c @@ -8964,7 +8964,7 @@ static void handle_port_info(struct port_info *pi, const struct fw_port_cmd *p, memset(&cmd, 0, sizeof(cmd)); cmd.op_to_portid = cpu_to_be32(V_FW_CMD_OP(FW_PORT_CMD) | F_FW_CMD_REQUEST | F_FW_CMD_READ | - V_FW_PORT_CMD_PORTID(pi->tx_chan)); + V_FW_PORT_CMD_PORTID(pi->hw_port)); action = sc->params.port_caps32 ? FW_PORT_ACTION_GET_PORT_INFO32 : FW_PORT_ACTION_GET_PORT_INFO; cmd.action_to_len16 = cpu_to_be32(V_FW_PORT_CMD_ACTION(action) | @@ -8996,16 +8996,12 @@ int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl) (action == FW_PORT_ACTION_GET_PORT_INFO || action == FW_PORT_ACTION_GET_PORT_INFO32)) { /* link/module state change message */ - int i; - int chan = G_FW_PORT_CMD_PORTID(be32_to_cpu(p->op_to_portid)); - struct port_info *pi = NULL; - - for_each_port(adap, i) { - pi = adap2pinfo(adap, i); - if (pi->tx_chan == chan) - break; - } + int hw_port = G_FW_PORT_CMD_PORTID(be32_to_cpu(p->op_to_portid)); + int port_id = adap->port_map[hw_port]; + struct port_info *pi; + MPASS(port_id >= 0 && port_id < adap->params.nports); + pi = adap->port[port_id]; PORT_LOCK(pi); handle_port_info(pi, p, action, &mod_changed, &link_changed); PORT_UNLOCK(pi); diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 9756a6945384..9f6162133d05 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -1277,6 +1277,7 @@ t4_attach(device_t dev) goto done; /* error message displayed already */ memset(sc->chan_map, 0xff, sizeof(sc->chan_map)); + memset(sc->port_map, 0xff, sizeof(sc->port_map)); /* Prepare the adapter for operation. */ buf = malloc(PAGE_SIZE, M_CXGBE, M_ZERO | M_WAITOK); @@ -1407,14 +1408,15 @@ t4_attach(device_t dev) } if (is_bt(pi->port_type)) - setbit(&sc->bt_map, pi->tx_chan); + setbit(&sc->bt_map, pi->hw_port); else - MPASS(!isset(&sc->bt_map, pi->tx_chan)); + MPASS(!isset(&sc->bt_map, pi->hw_port)); snprintf(pi->lockname, sizeof(pi->lockname), "%sp%d", device_get_nameunit(dev), i); mtx_init(&pi->pi_lock, pi->lockname, 0, MTX_DEF); sc->chan_map[pi->tx_chan] = i; + sc->port_map[pi->hw_port] = i; /* * The MPS counter for FCS errors doesn't work correctly on the @@ -3684,7 +3686,7 @@ alloc_extra_vi(struct adapter *sc, struct port_info *pi, struct vi_info *vi) ("%s: VI %s doesn't have a MAC func", __func__, device_get_nameunit(vi->dev))); func = vi_mac_funcs[index]; - rc = t4_alloc_vi_func(sc, sc->mbox, pi->tx_chan, sc->pf, 0, 1, + rc = t4_alloc_vi_func(sc, sc->mbox, pi->hw_port, sc->pf, 0, 1, vi->hw_addr, &vi->rss_size, &vi->vfvld, &vi->vin, func, 0); if (rc < 0) { CH_ERR(vi, "failed to allocate virtual interface %d" @@ -6220,7 +6222,7 @@ apply_link_config(struct port_info *pi) MPASS(lc->pcaps & FW_PORT_CAP32_FEC_BASER_RS); #endif if (!(sc->flags & IS_VF)) { - rc = -t4_link_l1cfg(sc, sc->mbox, pi->tx_chan, lc); + rc = -t4_link_l1cfg(sc, sc->mbox, pi->hw_port, lc); if (rc != 0) { device_printf(pi->dev, "l1cfg failed: %d\n", rc); return (rc); @@ -8452,14 +8454,14 @@ sysctl_tx_vm_wr(SYSCTL_HANDLER_ARGS) vi->flags |= TX_USES_VM_WR; if_sethwtsomaxsegcount(vi->ifp, TX_SGL_SEGS_VM_TSO); ctrl0 = htobe32(V_TXPKT_OPCODE(CPL_TX_PKT_XT) | - V_TXPKT_INTF(pi->tx_chan)); + V_TXPKT_INTF(pi->hw_port)); if (!(sc->flags & IS_VF)) npkt--; } else { vi->flags &= ~TX_USES_VM_WR; if_sethwtsomaxsegcount(vi->ifp, TX_SGL_SEGS_TSO); ctrl0 = htobe32(V_TXPKT_OPCODE(CPL_TX_PKT_XT) | - V_TXPKT_INTF(pi->tx_chan) | V_TXPKT_PF(sc->pf) | + V_TXPKT_INTF(pi->hw_port) | V_TXPKT_PF(sc->pf) | V_TXPKT_VF(vi->vin) | V_TXPKT_VF_VLD(vi->vfvld)); } for_each_txq(vi, i, txq) { diff --git a/sys/dev/cxgbe/t4_netmap.c b/sys/dev/cxgbe/t4_netmap.c index e53fb5054316..ddd7d974aa48 100644 --- a/sys/dev/cxgbe/t4_netmap.c +++ b/sys/dev/cxgbe/t4_netmap.c @@ -232,7 +232,7 @@ alloc_nm_txq(struct vi_info *vi, struct sge_nm_txq *nm_txq, int iqidx, int idx) nm_txq->nid = idx; nm_txq->iqidx = iqidx; nm_txq->cpl_ctrl0 = htobe32(V_TXPKT_OPCODE(CPL_TX_PKT) | - V_TXPKT_INTF(pi->tx_chan) | V_TXPKT_PF(sc->pf) | + V_TXPKT_INTF(pi->hw_port) | V_TXPKT_PF(sc->pf) | V_TXPKT_VF(vi->vin) | V_TXPKT_VF_VLD(vi->vfvld)); if (sc->params.fw_vers >= FW_VERSION32(1, 24, 11, 0)) nm_txq->op_pkd = htobe32(V_FW_WR_OP(FW_ETH_TX_PKTS2_WR)); @@ -314,7 +314,7 @@ alloc_nm_rxq_hwq(struct vi_info *vi, struct sge_nm_rxq *nm_rxq) V_FW_IQ_CMD_TYPE(FW_IQ_TYPE_FL_INT_CAP) | V_FW_IQ_CMD_VIID(vi->viid) | V_FW_IQ_CMD_IQANUD(X_UPDATEDELIVERY_INTERRUPT)); - c.iqdroprss_to_iqesize = htobe16(V_FW_IQ_CMD_IQPCIECH(pi->tx_chan) | + c.iqdroprss_to_iqesize = htobe16(V_FW_IQ_CMD_IQPCIECH(pi->hw_port) | F_FW_IQ_CMD_IQGTSMODE | V_FW_IQ_CMD_IQINTCNTTHRESH(0) | V_FW_IQ_CMD_IQESIZE(ilog2(IQ_ESIZE) - 4)); @@ -429,7 +429,7 @@ alloc_nm_txq_hwq(struct vi_info *vi, struct sge_nm_txq *nm_txq) F_FW_EQ_ETH_CMD_AUTOEQUEQE | V_FW_EQ_ETH_CMD_VIID(vi->viid)); c.fetchszm_to_iqid = htobe32(V_FW_EQ_ETH_CMD_HOSTFCMODE(X_HOSTFCMODE_NONE) | - V_FW_EQ_ETH_CMD_PCIECHN(vi->pi->tx_chan) | F_FW_EQ_ETH_CMD_FETCHRO | + V_FW_EQ_ETH_CMD_PCIECHN(vi->pi->hw_port) | F_FW_EQ_ETH_CMD_FETCHRO | V_FW_EQ_ETH_CMD_IQID(sc->sge.nm_rxq[nm_txq->iqidx].iq_cntxt_id)); c.dcaen_to_eqsize = htobe32(V_FW_EQ_ETH_CMD_FBMIN(chip_id(sc) <= CHELSIO_T5 ? diff --git a/sys/dev/cxgbe/t4_sched.c b/sys/dev/cxgbe/t4_sched.c index 2186c8aa2ac0..65c2720d692c 100644 --- a/sys/dev/cxgbe/t4_sched.c +++ b/sys/dev/cxgbe/t4_sched.c @@ -272,7 +272,7 @@ update_tx_sched(void *context, int pending) } rc = -t4_sched_params(sc, FW_SCHED_TYPE_PKTSCHED, FW_SCHED_PARAMS_LEVEL_CL_RL, tc->mode, tc->rateunit, - tc->ratemode, pi->tx_chan, j, 0, tc->maxrate, 0, + tc->ratemode, pi->hw_port, j, 0, tc->maxrate, 0, tc->pktsize, tc->burstsize, 1); end_synchronized_op(sc, 0); @@ -291,7 +291,7 @@ update_tx_sched(void *context, int pending) "params: mode %d, rateunit %d, ratemode %d, " "channel %d, minrate %d, maxrate %d, pktsize %d, " "burstsize %d\n", j, rc, tc->mode, tc->rateunit, - tc->ratemode, pi->tx_chan, 0, tc->maxrate, + tc->ratemode, pi->hw_port, 0, tc->maxrate, tc->pktsize, tc->burstsize); } } @@ -839,7 +839,7 @@ failed: cst->tx_total = cst->tx_credits; cst->plen = 0; cst->ctrl0 = htobe32(V_TXPKT_OPCODE(CPL_TX_PKT_XT) | - V_TXPKT_INTF(pi->tx_chan) | V_TXPKT_PF(sc->pf) | + V_TXPKT_INTF(pi->hw_port) | V_TXPKT_PF(sc->pf) | V_TXPKT_VF(vi->vin) | V_TXPKT_VF_VLD(vi->vfvld)); /* diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index 86454bc4fe10..4998f27603db 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -3414,6 +3414,7 @@ init_eq(struct adapter *sc, struct sge_eq *eq, int eqtype, int qsize, eq->type = eqtype; eq->port_id = port_id; eq->tx_chan = sc->port[port_id]->tx_chan; + eq->hw_port = sc->port[port_id]->hw_port; eq->iq = iq; eq->sidx = qsize - sc->params.sge.spg_len / EQ_ESIZE; strlcpy(eq->lockname, name, sizeof(eq->lockname)); @@ -3577,7 +3578,7 @@ alloc_iq_fl_hwq(struct vi_info *vi, struct sge_iq *iq, struct sge_fl *fl) V_FW_IQ_CMD_TYPE(FW_IQ_TYPE_FL_INT_CAP) | V_FW_IQ_CMD_VIID(vi->viid) | V_FW_IQ_CMD_IQANUD(X_UPDATEDELIVERY_INTERRUPT)); - c.iqdroprss_to_iqesize = htobe16(V_FW_IQ_CMD_IQPCIECH(pi->tx_chan) | + c.iqdroprss_to_iqesize = htobe16(V_FW_IQ_CMD_IQPCIECH(pi->hw_port) | F_FW_IQ_CMD_IQGTSMODE | V_FW_IQ_CMD_IQINTCNTTHRESH(iq->intr_pktc_idx) | V_FW_IQ_CMD_IQESIZE(ilog2(IQ_ESIZE) - 4)); @@ -4270,7 +4271,7 @@ ctrl_eq_alloc(struct adapter *sc, struct sge_eq *eq) c.physeqid_pkd = htobe32(0); c.fetchszm_to_iqid = htobe32(V_FW_EQ_CTRL_CMD_HOSTFCMODE(X_HOSTFCMODE_STATUS_PAGE) | - V_FW_EQ_CTRL_CMD_PCIECHN(eq->tx_chan) | + V_FW_EQ_CTRL_CMD_PCIECHN(eq->hw_port) | F_FW_EQ_CTRL_CMD_FETCHRO | V_FW_EQ_CTRL_CMD_IQID(eq->iqid)); c.dcaen_to_eqsize = htobe32(V_FW_EQ_CTRL_CMD_FBMIN(chip_id(sc) <= CHELSIO_T5 ? @@ -4282,8 +4283,8 @@ ctrl_eq_alloc(struct adapter *sc, struct sge_eq *eq) rc = -t4_wr_mbox(sc, sc->mbox, &c, sizeof(c), &c); if (rc != 0) { - CH_ERR(sc, "failed to create hw ctrlq for tx_chan %d: %d\n", - eq->tx_chan, rc); + CH_ERR(sc, "failed to create hw ctrlq for port %d: %d\n", + eq->port_id, rc); return (rc); } @@ -4316,7 +4317,7 @@ eth_eq_alloc(struct adapter *sc, struct vi_info *vi, struct sge_eq *eq) F_FW_EQ_ETH_CMD_AUTOEQUEQE | V_FW_EQ_ETH_CMD_VIID(vi->viid)); c.fetchszm_to_iqid = htobe32(V_FW_EQ_ETH_CMD_HOSTFCMODE(X_HOSTFCMODE_NONE) | - V_FW_EQ_ETH_CMD_PCIECHN(eq->tx_chan) | F_FW_EQ_ETH_CMD_FETCHRO | + V_FW_EQ_ETH_CMD_PCIECHN(eq->hw_port) | F_FW_EQ_ETH_CMD_FETCHRO | V_FW_EQ_ETH_CMD_IQID(eq->iqid)); c.dcaen_to_eqsize = htobe32(V_FW_EQ_ETH_CMD_FBMIN(chip_id(sc) <= CHELSIO_T5 ? @@ -4360,7 +4361,7 @@ ofld_eq_alloc(struct adapter *sc, struct vi_info *vi, struct sge_eq *eq) F_FW_EQ_OFLD_CMD_EQSTART | FW_LEN16(c)); c.fetchszm_to_iqid = htonl(V_FW_EQ_OFLD_CMD_HOSTFCMODE(X_HOSTFCMODE_STATUS_PAGE) | - V_FW_EQ_OFLD_CMD_PCIECHN(eq->tx_chan) | + V_FW_EQ_OFLD_CMD_PCIECHN(eq->hw_port) | F_FW_EQ_OFLD_CMD_FETCHRO | V_FW_EQ_OFLD_CMD_IQID(eq->iqid)); c.dcaen_to_eqsize = htobe32(V_FW_EQ_OFLD_CMD_FBMIN(chip_id(sc) <= CHELSIO_T5 ? @@ -4678,10 +4679,10 @@ failed: if (vi->flags & TX_USES_VM_WR) txq->cpl_ctrl0 = htobe32(V_TXPKT_OPCODE(CPL_TX_PKT_XT) | - V_TXPKT_INTF(pi->tx_chan)); + V_TXPKT_INTF(pi->hw_port)); else txq->cpl_ctrl0 = htobe32(V_TXPKT_OPCODE(CPL_TX_PKT_XT) | - V_TXPKT_INTF(pi->tx_chan) | V_TXPKT_PF(sc->pf) | + V_TXPKT_INTF(pi->hw_port) | V_TXPKT_PF(sc->pf) | V_TXPKT_VF(vi->vin) | V_TXPKT_VF_VLD(vi->vfvld)); txq->tc_idx = -1; @@ -6583,10 +6584,11 @@ send_etid_flowc_wr(struct cxgbe_rate_tag *cst, struct port_info *pi, V_FW_WR_FLOWID(cst->etid)); flowc->mnemval[0].mnemonic = FW_FLOWC_MNEM_PFNVFN; flowc->mnemval[0].val = htobe32(pfvf); + /* Firmware expects hw port and will translate to channel itself. */ flowc->mnemval[1].mnemonic = FW_FLOWC_MNEM_CH; - flowc->mnemval[1].val = htobe32(pi->tx_chan); + flowc->mnemval[1].val = htobe32(pi->hw_port); flowc->mnemval[2].mnemonic = FW_FLOWC_MNEM_PORT; - flowc->mnemval[2].val = htobe32(pi->tx_chan); + flowc->mnemval[2].val = htobe32(pi->hw_port); flowc->mnemval[3].mnemonic = FW_FLOWC_MNEM_IQID; flowc->mnemval[3].val = htobe32(cst->iqid); flowc->mnemval[4].mnemonic = FW_FLOWC_MNEM_EOSTATE; diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c index be20ea42474e..402aa29c05cb 100644 --- a/sys/dev/cxgbe/tom/t4_cpl_io.c +++ b/sys/dev/cxgbe/tom/t4_cpl_io.c @@ -127,8 +127,9 @@ send_flowc_wr(struct toepcb *toep, struct tcpcb *tp) paramidx = 0; FLOWC_PARAM(PFNVFN, pfvf); - FLOWC_PARAM(CH, pi->tx_chan); - FLOWC_PARAM(PORT, pi->tx_chan); + /* Firmware expects hw port and will translate to channel itself. */ + FLOWC_PARAM(CH, pi->hw_port); + FLOWC_PARAM(PORT, pi->hw_port); FLOWC_PARAM(IQID, toep->ofld_rxq->iq.abs_id); FLOWC_PARAM(SNDBUF, toep->params.sndbuf); if (tp) { diff --git a/sys/dev/cxgbe/tom/t4_listen.c b/sys/dev/cxgbe/tom/t4_listen.c index 06c495dcafc3..ad835eafdc56 100644 --- a/sys/dev/cxgbe/tom/t4_listen.c +++ b/sys/dev/cxgbe/tom/t4_listen.c @@ -508,10 +508,11 @@ send_flowc_wr_synqe(struct adapter *sc, struct synq_entry *synqe) V_FW_WR_FLOWID(synqe->tid)); flowc->mnemval[0].mnemonic = FW_FLOWC_MNEM_PFNVFN; flowc->mnemval[0].val = htobe32(pfvf); + /* Firmware expects hw port and will translate to channel itself. */ flowc->mnemval[1].mnemonic = FW_FLOWC_MNEM_CH; - flowc->mnemval[1].val = htobe32(pi->tx_chan); + flowc->mnemval[1].val = htobe32(pi->hw_port); flowc->mnemval[2].mnemonic = FW_FLOWC_MNEM_PORT; - flowc->mnemval[2].val = htobe32(pi->tx_chan); + flowc->mnemval[2].val = htobe32(pi->hw_port); flowc->mnemval[3].mnemonic = FW_FLOWC_MNEM_IQID; flowc->mnemval[3].val = htobe32(ofld_rxq->iq.abs_id); flowc->mnemval[4].mnemonic = FW_FLOWC_MNEM_SNDBUF; From nobody Mon Sep 29 14:37:42 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cb3gq4lYsz68KRn; Mon, 29 Sep 2025 14:37:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb3gq21Dkz3sYl; Mon, 29 Sep 2025 14:37:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2qXn7QrweaxMO0bZhmdJ6lEKS8BGOt9sB0C3lssT/2I=; b=dhxcqKRS3/EDsIlUhTQxZU2/Pmbt9ysS3Txo4tf7/nEwixpPMudhwk5iG+4UnDKC6DSzDZ 0AGyzuejOSQGWXX3Uo6B5zg9b4DjoHDUn2eIcByh+bmqZdGE5eFOiA1xBDCGjCYn+5dSzw PIDG6eP93RSwGlxGJ9+cJIh7gavFWbePxB1ZyckbdKSfOEWQfKFlqqkRfA6yNTPRls1mqZ ahRDLy2mIDoZo5Eu8lOVHViCixEVfX5gvPUW0bZvQnZ8W4MgBWLhN8vo7c+2+nALA0Do01 79wwQeNA18z2Mj1icWC5uiYUCcRds78p/tAll1TOpc1ffDXr9AGCsANMBaXGMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2qXn7QrweaxMO0bZhmdJ6lEKS8BGOt9sB0C3lssT/2I=; b=ZOeUju9yUJG+JUuqVshgV4bjrEmpcbfIOWAF7ORmlkkCR1PTyHy7GcNMYXTa9AzuwkRZco NBsMOsVd3mnEzTn83jse61QRUH2UzUSPbQ6WP0Eop1zlaJd9RhM7ekYAgNbnHHn+L5Cutk 0sNsGqdK0tvpcgQaNUpQWhFh8m74Mrtn0assv8GjtFlg7SudQknrRab8PydjVlk7FPyc6f ZdBpf3g26J+z1HFCQ0V5DUBJAqrgdtobktSTLgNmlQPU75lMZX1jwh5bi+bAg3/hJHHAEH Yr1v3+HAH/TIUKLXLAGzF7EPUD7kBlDE2eAdZSiJ09rJot88+JAPMUm+G67Bcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759156663; a=rsa-sha256; cv=none; b=yKYKuWf7wPt3ZxwUoJ/jvpG5f2mvGl5lfkA/6QLY1Y3C33otXEfPmyqZsvgorslKSXPie5 ejweEMzB0O2IiBT9wj4Qza5OQ81I/d7UQvDs44hIGAvTs9N8VKZ2bykXBPm/bfsbtsqeHo U1eyHK6BueNih3jRXA+tr95WI/0/H19K+qTsZI5ap8R7b1/Hg/ROnHWgsTxfyPMo9uVZXL tdtHAZqb+8nNO1JW7+Mz0QDEvcyWW65PMZq7Kf5pP9I76430jhGht9U7x/JJEkSSj9a5kL +Unj1JEJ/ANm0wx9dfFVXHPXJ/eYe5z9gB7GB61NT6FAw91oCuYDIwRLirk3Ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb3gq0Vpdz18gN; Mon, 29 Sep 2025 14:37:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TEbhMB017564; Mon, 29 Sep 2025 14:37:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TEbgNd017561; Mon, 29 Sep 2025 14:37:42 GMT (envelope-from git) Date: Mon, 29 Sep 2025 14:37:42 GMT Message-Id: <202509291437.58TEbgNd017561@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: c7b2e390de43 - main - cxgbe(4): hw/fw headers and shared code for the Terminator 7 ASIC 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c7b2e390de43bb2b1a5918a23310ec5464ee3787 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=c7b2e390de43bb2b1a5918a23310ec5464ee3787 commit c7b2e390de43bb2b1a5918a23310ec5464ee3787 Author: Navdeep Parhar AuthorDate: 2025-09-29 06:21:02 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 14:25:58 +0000 cxgbe(4): hw/fw headers and shared code for the Terminator 7 ASIC This is the first of a series of commits that will add T7 support to cxgbe. The ASIC is gen5x16 on the PCIe side and has a 400Gbps MAC on the Ethernet side. NICs using the T7 will come in the following variants: * 1 x 400Gbps with QSFP-DD connector * 2 x 200/100/40Gbps with QSFP56/QSFP28/QSFP+ connectors * 4 x 50/25/10/1Gbps with SFP28/SFP+/SFP connectors There are 8 general purpose ARM A72 cores available on select SmartNIC/DPU boards. Obtained from: Chelsio Communications MFC after: 3 days Sponsored by: Chelsio Communications --- sys/conf/files | 24 + sys/dev/cxgbe/common/common.h | 177 +- sys/dev/cxgbe/common/t4_hw.c | 1949 +- sys/dev/cxgbe/common/t4_hw.h | 135 +- sys/dev/cxgbe/common/t4_msg.h | 3011 ++- sys/dev/cxgbe/common/t4_regs.h | 27273 ++++++++++++++++++++++++++-- sys/dev/cxgbe/common/t4_regs_values.h | 24 +- sys/dev/cxgbe/common/t4_tcb.h | 182 +- sys/dev/cxgbe/cudbg/cudbg_flash_utils.c | 90 +- sys/dev/cxgbe/cudbg/cudbg_lib.c | 10 +- sys/dev/cxgbe/cudbg/cudbg_lib_common.h | 7 +- sys/dev/cxgbe/firmware/t4fw_interface.h | 1320 +- sys/dev/cxgbe/firmware/t7fw_cfg.txt | 644 + sys/dev/cxgbe/firmware/t7fw_cfg_fpga.txt | 530 + sys/dev/cxgbe/firmware/t7fw_cfg_uwire.txt | 644 + sys/dev/cxgbe/t4_main.c | 16 +- sys/dev/cxgbe/t4_sge.c | 3 +- sys/dev/cxgbe/tom/t4_tls.c | 4 +- sys/modules/cxgbe/Makefile | 4 +- sys/modules/cxgbe/t7_firmware/Makefile | 23 + 20 files changed, 33901 insertions(+), 2169 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index db05a1424f00..63bf5c3fd724 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1519,6 +1519,30 @@ t6fw.fw optional cxgbe \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t6fw.fw" +t7fw_cfg.c optional cxgbe \ + compile-with "${AWK} -f $S/tools/fw_stub.awk t7fw_cfg.fw:t7fw_cfg t7fw_cfg_uwire.fw:t7fw_cfg_uwire -mt7fw_cfg -c${.TARGET}" \ + no-ctfconvert no-implicit-rule before-depend local \ + clean "t7fw_cfg.c" +t7fw_cfg.fwo optional cxgbe \ + dependency "t7fw_cfg.fw" \ + compile-with "${NORMAL_FWO}" \ + no-implicit-rule \ + clean "t7fw_cfg.fwo" +t7fw_cfg.fw optional cxgbe \ + dependency "$S/dev/cxgbe/firmware/t7fw_cfg.txt" \ + compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ + no-obj no-implicit-rule \ + clean "t7fw_cfg.fw" +t7fw_cfg_uwire.fwo optional cxgbe \ + dependency "t7fw_cfg_uwire.fw" \ + compile-with "${NORMAL_FWO}" \ + no-implicit-rule \ + clean "t7fw_cfg_uwire.fwo" +t7fw_cfg_uwire.fw optional cxgbe \ + dependency "$S/dev/cxgbe/firmware/t7fw_cfg_uwire.txt" \ + compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ + no-obj no-implicit-rule \ + clean "t7fw_cfg_uwire.fw" dev/cxgbe/crypto/t4_crypto.c optional ccr \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cyapa/cyapa.c optional cyapa iicbus diff --git a/sys/dev/cxgbe/common/common.h b/sys/dev/cxgbe/common/common.h index 6e80ce40648b..6b36832a7464 100644 --- a/sys/dev/cxgbe/common/common.h +++ b/sys/dev/cxgbe/common/common.h @@ -1,8 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2011 Chelsio Communications, Inc. - * All rights reserved. + * Copyright (c) 2011, 2025 Chelsio Communications. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -32,6 +31,15 @@ #include "t4_hw.h" +#define GLBL_INTR_MASK (F_CIM | F_MPS | F_PL | F_PCIE | F_MC0 | F_EDC0 | \ + F_EDC1 | F_LE | F_TP | F_MA | F_PM_TX | F_PM_RX | F_ULP_RX | \ + F_CPL_SWITCH | F_SGE | F_ULP_TX | F_SF) + +#define GLBL_T7_INTR_MASK (F_CIM | F_MPS | F_PL | F_T7_PCIE | F_T7_MC0 | \ + F_T7_EDC0 | F_T7_EDC1 | F_T7_LE | F_T7_TP | \ + F_T7_MA | F_T7_PM_TX | F_T7_PM_RX | F_T7_ULP_RX | \ + F_T7_CPL_SWITCH | F_T7_SGE | F_T7_ULP_TX | F_SF) + enum { MAX_NPORTS = 4, /* max # of ports */ SERNUM_LEN = 24, /* Serial # length */ @@ -77,6 +85,18 @@ enum { FEC_MODULE = 1 << 6, /* FEC suggested by the cable/transceiver. */ }; +enum { + ULP_T10DIF_ISCSI = 1 << 0, + ULP_T10DIF_FCOE = 1 << 1 +}; + +enum { + ULP_CRYPTO_LOOKASIDE = 1 << 0, + ULP_CRYPTO_INLINE_TLS = 1 << 1, + ULP_CRYPTO_INLINE_IPSEC = 1 << 2, + ULP_CRYPTO_OFLD_OVER_IPSEC_INLINE = 1 << 4 +}; + enum t4_bar2_qtype { T4_BAR2_QTYPE_EGRESS, T4_BAR2_QTYPE_INGRESS }; struct port_stats { @@ -230,6 +250,15 @@ struct tp_cpl_stats { struct tp_rdma_stats { u32 rqe_dfr_pkt; u32 rqe_dfr_mod; + u32 pkts_in[MAX_NCHAN]; + u64 bytes_in[MAX_NCHAN]; + /* + * When reading rdma stats, the address difference b/w RDMA_IN and + * RDMA_OUT is 4*u32, to read both at once, added padding + */ + u32 padding[4]; + u32 pkts_out[MAX_NCHAN]; + u64 bytes_out[MAX_NCHAN]; }; struct sge_params { @@ -259,7 +288,10 @@ struct tp_params { uint32_t max_rx_pdu; uint32_t max_tx_pdu; bool rx_pkt_encap; + uint8_t lb_mode; + uint8_t lb_nchan; + int8_t ipsecidx_shift; int8_t fcoe_shift; int8_t port_shift; int8_t vnic_shift; @@ -270,6 +302,9 @@ struct tp_params { int8_t macmatch_shift; int8_t matchtype_shift; int8_t frag_shift; + int8_t roce_shift; + int8_t synonly_shift; + int8_t tcpflags_shift; }; /* Use same modulation queue as the tx channel. */ @@ -285,6 +320,22 @@ struct vpd_params { u8 md[MD_LEN + 1]; }; +/* + * Maximum resources provisioned for a PCI PF. + */ +struct pf_resources { + unsigned int nvi; /* N virtual interfaces */ + unsigned int neq; /* N egress Qs */ + unsigned int nethctrl; /* N egress ETH or CTRL Qs */ + unsigned int niqflint; /* N ingress Qs/w free list(s) & intr */ + unsigned int niq; /* N ingress Qs */ + unsigned int tc; /* PCI-E traffic class */ + unsigned int pmask; /* port access rights mask */ + unsigned int nexactf; /* N exact MPS filters */ + unsigned int r_caps; /* read capabilities */ + unsigned int wx_caps; /* write/execute capabilities */ +}; + struct pci_params { unsigned int vpd_cap_addr; unsigned int mps; @@ -308,8 +359,11 @@ struct chip_params { u8 pm_stats_cnt; u8 cng_ch_bits_log; /* congestion channel map bits width */ u8 nsched_cls; + u8 cim_num_ibq; u8 cim_num_obq; - u8 filter_opt_len; + u8 filter_opt_len; /* number of bits for optional fields */ + u8 filter_num_opt; /* number of optional fields */ + u8 sge_ctxt_size; u16 mps_rplc_size; u16 vfcount; u32 sge_fl_db; @@ -360,6 +414,7 @@ struct adapter_params { struct sge_params sge; struct tp_params tp; /* PF-only */ struct vpd_params vpd; + struct pf_resources pfres; /* PF-only */ struct pci_params pci; struct devlog_params devlog; /* PF-only */ struct rss_params rss; /* VF-only */ @@ -399,12 +454,13 @@ struct adapter_params { unsigned int ofldq_wr_cred; unsigned int eo_wr_cred; - unsigned int max_ordird_qp; - unsigned int max_ird_adapter; + unsigned int max_ordird_qp; /* Max read depth per RDMA QP */ + unsigned int max_ird_adapter; /* Max read depth per adapter */ /* These values are for all ports (8b/port, upto 4 ports) */ uint32_t mps_bg_map; /* MPS rx buffer group map */ uint32_t tp_ch_map; /* TPCHMAP from firmware */ + uint32_t tx_tp_ch_map; /* TX_TPCHMAP from firmware */ bool ulptx_memwrite_dsgl; /* use of T5 DSGL allowed */ bool fr_nsmr_tpte_wr_support; /* FW support for FR_NSMR_TPTE_WR */ @@ -412,11 +468,15 @@ struct adapter_params { bool viid_smt_extn_support; /* FW returns vin, vfvld & smt index? */ unsigned int max_pkts_per_eth_tx_pkts_wr; uint8_t nsched_cls; /* # of usable sched classes per port */ + + uint8_t ncores; + uint32_t tid_qid_sel_mask; /* TID based QID selection mask */ }; #define CHELSIO_T4 0x4 #define CHELSIO_T5 0x5 #define CHELSIO_T6 0x6 +#define CHELSIO_T7 0x7 /* * State needed to monitor the forward progress of SGE Ingress DMA activities @@ -509,10 +569,11 @@ static inline int is_hashfilter(const struct adapter *adap) static inline int is_ktls(const struct adapter *adap) { - return adap->cryptocaps & FW_CAPS_CONFIG_TLS_HW; + return adap->cryptocaps & FW_CAPS_CONFIG_TLS_HW || + adap->params.chipid == CHELSIO_T7; } -static inline int chip_id(struct adapter *adap) +static inline int chip_id(const struct adapter *adap) { return adap->params.chipid; } @@ -537,6 +598,11 @@ static inline int is_t6(struct adapter *adap) return adap->params.chipid == CHELSIO_T6; } +static inline int is_t7(struct adapter *adap) +{ + return adap->params.chipid == CHELSIO_T7; +} + static inline int is_fpga(struct adapter *adap) { return adap->params.fpga; @@ -641,7 +707,7 @@ int t4_load_bootcfg(struct adapter *adapter, const u8 *cfg_data, unsigned int si int t4_load_boot(struct adapter *adap, u8 *boot_data, unsigned int boot_addr, unsigned int size); int t4_flash_erase_sectors(struct adapter *adapter, int start, int end); -int t4_flash_cfg_addr(struct adapter *adapter); +int t4_flash_cfg_addr(struct adapter *adapter, unsigned int *lenp); int t4_load_cfg(struct adapter *adapter, const u8 *cfg_data, unsigned int size); int t4_get_fw_version(struct adapter *adapter, u32 *vers); int t4_get_fw_hdr(struct adapter *adapter, struct fw_hdr *hdr); @@ -655,9 +721,10 @@ int t4_init_hw(struct adapter *adapter, u32 fw_params); const struct chip_params *t4_get_chip_params(int chipid); int t4_prep_adapter(struct adapter *adapter, u32 *buf); int t4_shutdown_adapter(struct adapter *adapter); -int t4_init_devlog_params(struct adapter *adapter, int fw_attach); +int t4_init_devlog_ncores_params(struct adapter *adapter, int fw_attach); int t4_init_sge_params(struct adapter *adapter); int t4_init_tp_params(struct adapter *adap); +int t4_filter_field_width(const struct adapter *adap, int filter_field); int t4_filter_field_shift(const struct adapter *adap, int filter_sel); int t4_port_init(struct adapter *adap, int mbox, int pf, int vf, int port_id); void t4_fatal_err(struct adapter *adapter, bool fw_error); @@ -665,6 +732,7 @@ int t4_set_trace_filter(struct adapter *adapter, const struct trace_params *tp, int filter_index, int enable); void t4_get_trace_filter(struct adapter *adapter, struct trace_params *tp, int filter_index, int *enabled); +void t4_set_trace_rss_control(struct adapter *adap, u8 chan, u16 qid); int t4_config_rss_range(struct adapter *adapter, int mbox, unsigned int viid, int start, int n, const u16 *rspq, unsigned int nrspq); int t4_config_glbl_rss(struct adapter *adapter, int mbox, unsigned int mode, @@ -691,19 +759,60 @@ void t4_write_rss_pf_mask(struct adapter *adapter, u32 pfmask, bool sleep_ok); int t4_mps_set_active_ports(struct adapter *adap, unsigned int port_mask); void t4_pmtx_get_stats(struct adapter *adap, u32 cnt[], u64 cycles[]); void t4_pmrx_get_stats(struct adapter *adap, u32 cnt[], u64 cycles[]); -void t4_read_cimq_cfg(struct adapter *adap, u16 *base, u16 *size, u16 *thres); -int t4_read_cim_ibq(struct adapter *adap, unsigned int qid, u32 *data, size_t n); -int t4_read_cim_obq(struct adapter *adap, unsigned int qid, u32 *data, size_t n); -int t4_cim_read(struct adapter *adap, unsigned int addr, unsigned int n, - unsigned int *valp); -int t4_cim_write(struct adapter *adap, unsigned int addr, unsigned int n, - const unsigned int *valp); -int t4_cim_ctl_read(struct adapter *adap, unsigned int addr, unsigned int n, - unsigned int *valp); -int t4_cim_read_la(struct adapter *adap, u32 *la_buf, unsigned int *wrptr); +void t4_pmrx_cache_get_stats(struct adapter *adap, u32 stats[]); +void t4_read_cimq_cfg_core(struct adapter *adap, u8 coreid, u16 *base, + u16 *size, u16 *thres); +int t4_read_cim_ibq_core(struct adapter *adap, u8 coreid, u32 qid, u32 *data, + size_t n); +int t4_read_cim_obq_core(struct adapter *adap, u8 coreid, u32 qid, u32 *data, + size_t n); +int t4_cim_read_core(struct adapter *adap, u8 group, u8 coreid, + unsigned int addr, unsigned int n, + unsigned int *valp); +int t4_cim_write_core(struct adapter *adap, u8 group, u8 coreid, + unsigned int addr, unsigned int n, + const unsigned int *valp); +int t4_cim_read_la_core(struct adapter *adap, u8 coreid, u32 *la_buf, + u32 *wrptr); void t4_cim_read_pif_la(struct adapter *adap, u32 *pif_req, u32 *pif_rsp, unsigned int *pif_req_wrptr, unsigned int *pif_rsp_wrptr); void t4_cim_read_ma_la(struct adapter *adap, u32 *ma_req, u32 *ma_rsp); + +static inline void t4_read_cimq_cfg(struct adapter *adap, u16 *base, u16 *size, + u16 *thres) +{ + t4_read_cimq_cfg_core(adap, 0, base, size, thres); +} + +static inline int t4_read_cim_ibq(struct adapter *adap, u32 qid, u32 *data, + size_t n) +{ + return t4_read_cim_ibq_core(adap, 0, qid, data, n); +} + +static inline int t4_read_cim_obq(struct adapter *adap, u32 qid, u32 *data, + size_t n) +{ + return t4_read_cim_obq_core(adap, 0, qid, data, n); +} + +static inline int t4_cim_read(struct adapter *adap, unsigned int addr, + unsigned int n, unsigned int *valp) +{ + return t4_cim_read_core(adap, 0, 0, addr, n, valp); +} + +static inline int t4_cim_write(struct adapter *adap, unsigned int addr, + unsigned int n, unsigned int *valp) +{ + return t4_cim_write_core(adap, 0, 0, addr, n, valp); +} + +static inline int t4_cim_read_la(struct adapter *adap, u32 *la_buf, u32 *wrptr) +{ + return t4_cim_read_la_core(adap, 0, la_buf, wrptr); +} + int t4_get_flash_params(struct adapter *adapter); u32 t4_read_pcie_cfg4(struct adapter *adap, int reg, int drv_fw_attach); @@ -919,6 +1028,8 @@ int t4_configure_ringbb(struct adapter *adap); int t4_configure_add_smac(struct adapter *adap); int t4_set_vlan_acl(struct adapter *adap, unsigned int mbox, unsigned int vf, u16 vlan); +int t4_flash_loc_start(struct adapter *adap, enum t4_flash_loc loc, + unsigned int *lenp); static inline int t4vf_query_params(struct adapter *adapter, unsigned int nparams, const u32 *params, @@ -969,8 +1080,8 @@ port_top_speed(const struct port_info *pi) sizeof(struct ulptx_idata) + sizeof(struct cpl_set_tcb_field_core)) static inline void * -mk_set_tcb_field_ulp(struct adapter *sc, void *cur, int tid, uint16_t word, - uint64_t mask, uint64_t val) +mk_set_tcb_field_ulp_with_rpl(struct adapter *sc, void *cur, int tid, + uint16_t word, uint64_t mask, uint64_t val, const int qid) { struct ulp_txpkt *ulpmc; struct ulptx_idata *ulpsc; @@ -989,8 +1100,21 @@ mk_set_tcb_field_ulp(struct adapter *sc, void *cur, int tid, uint16_t word, req = (struct cpl_set_tcb_field_core *)(ulpsc + 1); OPCODE_TID(req) = htobe32(MK_OPCODE_TID(CPL_SET_TCB_FIELD, tid)); - req->reply_ctrl = htobe16(F_NO_REPLY); - req->word_cookie = htobe16(V_WORD(word) | V_COOKIE(0)); + + if (qid == -1) { + req->reply_ctrl = htobe16(F_NO_REPLY); + req->word_cookie = htobe16(V_WORD(word) | V_COOKIE(0)); + } else { + if (chip_id(sc) >= CHELSIO_T7) { + req->reply_ctrl = htobe16(V_T7_QUEUENO(qid) | + V_T7_REPLY_CHAN(0) | V_NO_REPLY(0)); + } else { + req->reply_ctrl = htobe16(V_QUEUENO(qid) | + V_REPLY_CHAN(0) | V_NO_REPLY(0)); + } + req->word_cookie = htobe16(V_WORD(word) | + V_COOKIE(CPL_COOKIE_TOM)); + } req->mask = htobe64(mask); req->val = htobe64(val); @@ -1006,4 +1130,11 @@ mk_set_tcb_field_ulp(struct adapter *sc, void *cur, int tid, uint16_t word, return (ulpsc + 1); } + +static inline void * +mk_set_tcb_field_ulp(struct adapter *sc, void *cur, int tid, uint16_t word, + uint64_t mask, uint64_t val) +{ + return (mk_set_tcb_field_ulp_with_rpl(sc, cur, tid, word, mask, val, -1)); +} #endif /* __CHELSIO_COMMON_H */ diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c index f90ad3010626..eb7ea9acc108 100644 --- a/sys/dev/cxgbe/common/t4_hw.c +++ b/sys/dev/cxgbe/common/t4_hw.c @@ -1,8 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2012, 2016 Chelsio Communications, Inc. - * All rights reserved. + * Copyright (c) 2012, 2016, 2025 Chelsio Communications. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -246,6 +245,8 @@ struct port_tx_state { u32 t4_port_reg(struct adapter *adap, u8 port, u32 reg) { + if (chip_id(adap) > CHELSIO_T6) + return T7_PORT_REG(port, reg); if (chip_id(adap) > CHELSIO_T4) return T5_PORT_REG(port, reg); return PORT_REG(port, reg); @@ -268,8 +269,10 @@ read_tx_state(struct adapter *sc, struct port_tx_state *tx_state) { int i; - for_each_port(sc, i) - read_tx_state_one(sc, i, &tx_state[i]); + for (i = 0; i < MAX_NCHAN; i++) { + if (sc->chan_map[i] != 0xff) + read_tx_state_one(sc, i, &tx_state[i]); + } } static void @@ -279,7 +282,9 @@ check_tx_state(struct adapter *sc, struct port_tx_state *tx_state) uint64_t tx_frames, rx_pause; int i; - for_each_port(sc, i) { + for (i = 0; i < MAX_NCHAN; i++) { + if (sc->chan_map[i] == 0xff) + continue; rx_pause = tx_state[i].rx_pause; tx_frames = tx_state[i].tx_frames; read_tx_state_one(sc, i, &tx_state[i]); /* update */ @@ -351,7 +356,7 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox, const void *cmd, return -EINVAL; if (adap->flags & IS_VF) { - if (is_t6(adap)) + if (chip_id(adap) >= CHELSIO_T6) data_reg = FW_T6VF_MBDATA_BASE_ADDR; else data_reg = FW_T4VF_MBDATA_BASE_ADDR; @@ -508,9 +513,8 @@ failed: int t4_wr_mbox_meat(struct adapter *adap, int mbox, const void *cmd, int size, void *rpl, bool sleep_ok) { - return t4_wr_mbox_meat_timeout(adap, mbox, cmd, size, rpl, - sleep_ok, FW_CMD_MAX_TIMEOUT); - + return t4_wr_mbox_meat_timeout(adap, mbox, cmd, size, rpl, + sleep_ok, FW_CMD_MAX_TIMEOUT); } static int t4_edc_err_read(struct adapter *adap, int idx) @@ -799,6 +803,7 @@ unsigned int t4_get_regs_len(struct adapter *adapter) case CHELSIO_T5: case CHELSIO_T6: + case CHELSIO_T7: if (adapter->flags & IS_VF) return FW_T4VF_REGMAP_SIZE; return T5_REGMAP_SIZE; @@ -2639,6 +2644,638 @@ void t4_get_regs(struct adapter *adap, u8 *buf, size_t buf_size) ((NUM_CIM_PF_MAILBOX_DATA_INSTANCES - 1) * 4), }; + static const unsigned int t7_reg_ranges[] = { + 0x1008, 0x101c, + 0x1024, 0x10a8, + 0x10b4, 0x10f8, + 0x1100, 0x1114, + 0x111c, 0x112c, + 0x1138, 0x113c, + 0x1144, 0x115c, + 0x1180, 0x1184, + 0x1190, 0x1194, + 0x11a0, 0x11a4, + 0x11b0, 0x11d0, + 0x11fc, 0x1278, + 0x1280, 0x1368, + 0x1700, 0x172c, + 0x173c, 0x1760, + 0x1800, 0x18fc, + 0x3000, 0x3044, + 0x3060, 0x3064, + 0x30a4, 0x30b0, + 0x30b8, 0x30d8, + 0x30e0, 0x30fc, + 0x3140, 0x357c, + 0x35a8, 0x35cc, + 0x35e0, 0x35ec, + 0x3600, 0x37fc, + 0x3804, 0x3818, + 0x3880, 0x388c, + 0x3900, 0x3904, + 0x3910, 0x3978, + 0x3980, 0x399c, + 0x4700, 0x4720, + 0x4728, 0x475c, + 0x480c, 0x4814, + 0x4890, 0x489c, + 0x48a4, 0x48ac, + 0x48b8, 0x48c4, + 0x4900, 0x4924, + 0x4ffc, 0x4ffc, + 0x5500, 0x5624, + 0x56c4, 0x56ec, + 0x56f4, 0x5720, + 0x5728, 0x575c, + 0x580c, 0x5814, + 0x5890, 0x589c, + 0x58a4, 0x58ac, + 0x58b8, 0x58bc, + 0x5940, 0x598c, + 0x59b0, 0x59c8, + 0x59d0, 0x59dc, + 0x59fc, 0x5a18, + 0x5a60, 0x5a6c, + 0x5a80, 0x5a8c, + 0x5a94, 0x5a9c, + 0x5b94, 0x5bfc, + 0x5c10, 0x5e48, + 0x5e50, 0x5e94, + 0x5ea0, 0x5eb0, + 0x5ec0, 0x5ec0, + 0x5ec8, 0x5ed0, + 0x5ee0, 0x5ee0, + 0x5ef0, 0x5ef0, + 0x5f00, 0x5f04, + 0x5f0c, 0x5f10, + 0x5f20, 0x5f88, + 0x5f90, 0x5fd8, + 0x6000, 0x6020, + 0x6028, 0x6030, + 0x6044, 0x609c, + 0x60a8, 0x60ac, + 0x60b8, 0x60ec, + 0x6100, 0x6104, + 0x6118, 0x611c, + 0x6150, 0x6150, + 0x6180, 0x61b8, + 0x7700, 0x77a8, + 0x77b0, 0x7888, + 0x78cc, 0x7970, + 0x7b00, 0x7b00, + 0x7b08, 0x7b0c, + 0x7b24, 0x7b84, + 0x7b8c, 0x7c2c, + 0x7c34, 0x7c40, + 0x7c48, 0x7c68, + 0x7c70, 0x7c7c, + 0x7d00, 0x7ddc, + 0x7de4, 0x7e38, + 0x7e40, 0x7e44, + 0x7e4c, 0x7e74, + 0x7e80, 0x7ee0, + 0x7ee8, 0x7f0c, + 0x7f20, 0x7f5c, + 0x8dc0, 0x8de8, + 0x8df8, 0x8e04, + 0x8e10, 0x8e30, + 0x8e7c, 0x8ee8, + 0x8f88, 0x8f88, + 0x8f90, 0x8fb0, + 0x8fb8, 0x9058, + 0x9074, 0x90f8, + 0x9100, 0x912c, + 0x9138, 0x9188, + 0x9400, 0x9414, + 0x9430, 0x9440, + 0x9454, 0x9454, + 0x945c, 0x947c, + 0x9498, 0x94b8, + 0x9600, 0x9600, + 0x9608, 0x9638, + 0x9640, 0x9704, + 0x9710, 0x971c, + 0x9800, 0x9804, + 0x9854, 0x9854, + 0x9c00, 0x9c6c, + 0x9c80, 0x9cec, + 0x9d00, 0x9d6c, + 0x9d80, 0x9dec, + 0x9e00, 0x9e6c, + 0x9e80, 0x9eec, + 0x9f00, 0x9f6c, + 0x9f80, 0x9fec, + 0xa000, 0xa06c, + 0xa080, 0xa0ec, + 0xa100, 0xa16c, + 0xa180, 0xa1ec, + 0xa200, 0xa26c, + 0xa280, 0xa2ec, + 0xa300, 0xa36c, + 0xa380, 0xa458, + 0xa460, 0xa4f8, + 0xd000, 0xd03c, + 0xd100, 0xd134, + 0xd200, 0xd214, + 0xd220, 0xd234, + 0xd240, 0xd254, + 0xd260, 0xd274, + 0xd280, 0xd294, + 0xd2a0, 0xd2b4, + 0xd2c0, 0xd2d4, + 0xd2e0, 0xd2f4, + 0xd300, 0xd31c, + 0xdfc0, 0xdfe0, + 0xe000, 0xe00c, + 0xf000, 0xf008, + 0xf010, 0xf06c, + 0x11000, 0x11014, + 0x11048, 0x11120, + 0x11130, 0x11144, + 0x11174, 0x11178, + 0x11190, 0x111a0, + 0x111e4, 0x112f0, + 0x11300, 0x1133c, + 0x11408, 0x1146c, + 0x12000, 0x12004, + 0x12060, 0x122c4, + 0x19040, 0x1906c, + 0x19078, 0x19080, + 0x1908c, 0x190e8, + 0x190f0, 0x190f8, + 0x19100, 0x19110, + 0x19120, 0x19124, + 0x19150, 0x19194, + 0x1919c, 0x191a0, + 0x191ac, 0x191c8, + 0x191d0, 0x191e4, + 0x19250, 0x19250, + 0x19258, 0x19268, + 0x19278, 0x19278, + 0x19280, 0x192b0, + 0x192bc, 0x192f0, + 0x19300, 0x19308, + 0x19310, 0x19318, + 0x19320, 0x19328, + 0x19330, 0x19330, + 0x19348, 0x1934c, + 0x193f8, 0x19428, + 0x19430, 0x19444, + 0x1944c, 0x1946c, + 0x19474, 0x1947c, + 0x19488, 0x194cc, + 0x194f0, 0x194f8, + 0x19c00, 0x19c48, + 0x19c50, 0x19c80, + 0x19c94, 0x19c98, + 0x19ca0, 0x19cdc, + 0x19ce4, 0x19cf8, + 0x19d00, 0x19d30, + 0x19d50, 0x19d80, + 0x19d94, 0x19d98, + 0x19da0, 0x19de0, + 0x19df0, 0x19e10, + 0x19e50, 0x19e6c, + 0x19ea0, 0x19ebc, + 0x19ec4, 0x19ef4, + 0x19f04, 0x19f2c, + 0x19f34, 0x19f34, + 0x19f40, 0x19f50, + 0x19f90, 0x19fb4, + 0x19fbc, 0x19fbc, + 0x19fc4, 0x19fc8, + 0x19fd0, 0x19fe4, + 0x1a000, 0x1a004, + 0x1a010, 0x1a06c, + 0x1a0b0, 0x1a0e4, + 0x1a0ec, 0x1a108, + 0x1a114, 0x1a130, + 0x1a138, 0x1a1c4, + 0x1a1fc, 0x1a29c, + 0x1a2a8, 0x1a2b8, + 0x1a2c0, 0x1a388, + 0x1a398, 0x1a3ac, + 0x1e008, 0x1e00c, + 0x1e040, 0x1e044, + 0x1e04c, 0x1e04c, + 0x1e284, 0x1e290, + 0x1e2c0, 0x1e2c0, + 0x1e2e0, 0x1e2e4, + 0x1e300, 0x1e384, + 0x1e3c0, 0x1e3c8, + 0x1e408, 0x1e40c, + 0x1e440, 0x1e444, + 0x1e44c, 0x1e44c, + 0x1e684, 0x1e690, + 0x1e6c0, 0x1e6c0, + 0x1e6e0, 0x1e6e4, + 0x1e700, 0x1e784, + 0x1e7c0, 0x1e7c8, + 0x1e808, 0x1e80c, + 0x1e840, 0x1e844, + 0x1e84c, 0x1e84c, + 0x1ea84, 0x1ea90, + 0x1eac0, 0x1eac0, + 0x1eae0, 0x1eae4, + 0x1eb00, 0x1eb84, + 0x1ebc0, 0x1ebc8, + 0x1ec08, 0x1ec0c, + 0x1ec40, 0x1ec44, + 0x1ec4c, 0x1ec4c, + 0x1ee84, 0x1ee90, + 0x1eec0, 0x1eec0, + 0x1eee0, 0x1eee4, + 0x1ef00, 0x1ef84, + 0x1efc0, 0x1efc8, + 0x1f008, 0x1f00c, + 0x1f040, 0x1f044, + 0x1f04c, 0x1f04c, + 0x1f284, 0x1f290, + 0x1f2c0, 0x1f2c0, + 0x1f2e0, 0x1f2e4, + 0x1f300, 0x1f384, + 0x1f3c0, 0x1f3c8, + 0x1f408, 0x1f40c, + 0x1f440, 0x1f444, + 0x1f44c, 0x1f44c, + 0x1f684, 0x1f690, + 0x1f6c0, 0x1f6c0, + 0x1f6e0, 0x1f6e4, + 0x1f700, 0x1f784, + 0x1f7c0, 0x1f7c8, + 0x1f808, 0x1f80c, + 0x1f840, 0x1f844, + 0x1f84c, 0x1f84c, + 0x1fa84, 0x1fa90, + 0x1fac0, 0x1fac0, + 0x1fae0, 0x1fae4, + 0x1fb00, 0x1fb84, + 0x1fbc0, 0x1fbc8, + 0x1fc08, 0x1fc0c, + 0x1fc40, 0x1fc44, + 0x1fc4c, 0x1fc4c, + 0x1fe84, 0x1fe90, + 0x1fec0, 0x1fec0, + 0x1fee0, 0x1fee4, + 0x1ff00, 0x1ff84, + 0x1ffc0, 0x1ffc8, + 0x30000, 0x30038, + 0x30100, 0x3017c, + 0x30190, 0x301a0, + 0x301a8, 0x301b8, + 0x301c4, 0x301c8, + 0x301d0, 0x301e0, + 0x30200, 0x30344, + 0x30400, 0x304b4, + 0x304c0, 0x3052c, + 0x30540, 0x3065c, + 0x30800, 0x30848, + 0x30850, 0x308a8, + 0x308b8, 0x308c0, + 0x308cc, 0x308dc, + 0x30900, 0x30904, + 0x3090c, 0x30914, + 0x3091c, 0x30928, + 0x30930, 0x3093c, + 0x30944, 0x30948, + 0x30954, 0x30974, + 0x3097c, 0x30980, + 0x30a00, 0x30a20, + 0x30a38, 0x30a3c, + 0x30a50, 0x30a50, + 0x30a80, 0x30a80, + 0x30a88, 0x30aa8, + 0x30ab0, 0x30ab4, + 0x30ac8, 0x30ad4, + 0x30b28, 0x30b84, + 0x30b98, 0x30bb8, + 0x30c98, 0x30d14, + 0x31000, 0x31020, + 0x31038, 0x3103c, + 0x31050, 0x31050, + 0x31080, 0x31080, + 0x31088, 0x310a8, + 0x310b0, 0x310b4, + 0x310c8, 0x310d4, + 0x31128, 0x31184, + 0x31198, 0x311b8, + 0x32000, 0x32038, + 0x32100, 0x3217c, + 0x32190, 0x321a0, + 0x321a8, 0x321b8, + 0x321c4, 0x321c8, + 0x321d0, 0x321e0, + 0x32200, 0x32344, + 0x32400, 0x324b4, + 0x324c0, 0x3252c, + 0x32540, 0x3265c, + 0x32800, 0x32848, + 0x32850, 0x328a8, + 0x328b8, 0x328c0, + 0x328cc, 0x328dc, + 0x32900, 0x32904, + 0x3290c, 0x32914, + 0x3291c, 0x32928, + 0x32930, 0x3293c, + 0x32944, 0x32948, + 0x32954, 0x32974, + 0x3297c, 0x32980, + 0x32a00, 0x32a20, + 0x32a38, 0x32a3c, + 0x32a50, 0x32a50, + 0x32a80, 0x32a80, + 0x32a88, 0x32aa8, + 0x32ab0, 0x32ab4, + 0x32ac8, 0x32ad4, + 0x32b28, 0x32b84, + 0x32b98, 0x32bb8, + 0x32c98, 0x32d14, + 0x33000, 0x33020, + 0x33038, 0x3303c, + 0x33050, 0x33050, + 0x33080, 0x33080, + 0x33088, 0x330a8, + 0x330b0, 0x330b4, + 0x330c8, 0x330d4, + 0x33128, 0x33184, + 0x33198, 0x331b8, + 0x34000, 0x34038, + 0x34100, 0x3417c, + 0x34190, 0x341a0, + 0x341a8, 0x341b8, + 0x341c4, 0x341c8, + 0x341d0, 0x341e0, + 0x34200, 0x34344, + 0x34400, 0x344b4, + 0x344c0, 0x3452c, + 0x34540, 0x3465c, + 0x34800, 0x34848, + 0x34850, 0x348a8, + 0x348b8, 0x348c0, + 0x348cc, 0x348dc, + 0x34900, 0x34904, + 0x3490c, 0x34914, + 0x3491c, 0x34928, + 0x34930, 0x3493c, + 0x34944, 0x34948, + 0x34954, 0x34974, + 0x3497c, 0x34980, + 0x34a00, 0x34a20, + 0x34a38, 0x34a3c, + 0x34a50, 0x34a50, + 0x34a80, 0x34a80, + 0x34a88, 0x34aa8, + 0x34ab0, 0x34ab4, + 0x34ac8, 0x34ad4, + 0x34b28, 0x34b84, + 0x34b98, 0x34bb8, + 0x34c98, 0x34d14, + 0x35000, 0x35020, + 0x35038, 0x3503c, + 0x35050, 0x35050, + 0x35080, 0x35080, + 0x35088, 0x350a8, + 0x350b0, 0x350b4, + 0x350c8, 0x350d4, + 0x35128, 0x35184, + 0x35198, 0x351b8, + 0x36000, 0x36038, + 0x36100, 0x3617c, + 0x36190, 0x361a0, + 0x361a8, 0x361b8, + 0x361c4, 0x361c8, + 0x361d0, 0x361e0, + 0x36200, 0x36344, + 0x36400, 0x364b4, + 0x364c0, 0x3652c, + 0x36540, 0x3665c, + 0x36800, 0x36848, + 0x36850, 0x368a8, + 0x368b8, 0x368c0, + 0x368cc, 0x368dc, + 0x36900, 0x36904, + 0x3690c, 0x36914, + 0x3691c, 0x36928, + 0x36930, 0x3693c, + 0x36944, 0x36948, + 0x36954, 0x36974, + 0x3697c, 0x36980, + 0x36a00, 0x36a20, + 0x36a38, 0x36a3c, + 0x36a50, 0x36a50, + 0x36a80, 0x36a80, + 0x36a88, 0x36aa8, + 0x36ab0, 0x36ab4, + 0x36ac8, 0x36ad4, + 0x36b28, 0x36b84, + 0x36b98, 0x36bb8, + 0x36c98, 0x36d14, + 0x37000, 0x37020, + 0x37038, 0x3703c, + 0x37050, 0x37050, + 0x37080, 0x37080, + 0x37088, 0x370a8, + 0x370b0, 0x370b4, + 0x370c8, 0x370d4, + 0x37128, 0x37184, + 0x37198, 0x371b8, + 0x38000, 0x380b0, + 0x380b8, 0x38130, + 0x38140, 0x38140, + 0x38150, 0x38154, + 0x38160, 0x381c4, + 0x381f0, 0x38204, + 0x3820c, 0x38214, + 0x3821c, 0x3822c, + 0x38244, 0x38244, + 0x38254, 0x38274, + 0x3827c, 0x38280, + 0x38300, 0x38304, + 0x3830c, 0x38314, + 0x3831c, 0x3832c, + 0x38344, 0x38344, + 0x38354, 0x38374, + 0x3837c, 0x38380, + 0x38400, 0x38424, + 0x38438, 0x3843c, + 0x38480, 0x38480, + 0x384a8, 0x384a8, + 0x384b0, 0x384b4, + 0x384c8, 0x38514, + 0x38600, 0x3860c, + 0x3861c, 0x38624, + 0x38900, 0x38924, + 0x38938, 0x3893c, + 0x38980, 0x38980, + 0x389a8, 0x389a8, + 0x389b0, 0x389b4, + 0x389c8, 0x38a14, + 0x38b00, 0x38b0c, + 0x38b1c, 0x38b24, + 0x38e00, 0x38e00, + 0x38e18, 0x38e20, + 0x38e38, 0x38e40, + 0x38e58, 0x38e60, + 0x38e78, 0x38e80, + 0x38e98, 0x38ea0, + 0x38eb8, 0x38ec0, + 0x38ed8, 0x38ee0, + 0x38ef8, 0x38f08, *** 40524 LINES SKIPPED *** From nobody Mon Sep 29 14:37: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 4cb3gr44bYz68KB8; Mon, 29 Sep 2025 14:37:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb3gr2CFsz3sTN; Mon, 29 Sep 2025 14:37:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dMBZfug69tctbRa0kT9c947rV13U8/CU6nf+ceqZ8uM=; b=TBPPFtxb3qORqzkARi2LYBXfM/p9+Idcp9D7px/+Ohd4YubnW8m3exRdsyLvX0IUOA2i7H Lb/mBhj1oGtCvt6Uox32aLHtyBC3mAU6CRL0tU3ujuMU/ENWTBUWoPgmBxi+86QJiyWiOV UF/lgto+Tn327GsesLAXGZCLFDDVeqLNlLXUfKOqVuYQh4gXtbGSagG1QaqnuByl6hCF5v Ar8CTq6br9dqY4vSvGrLe/X9pKM5Y5Kv5f/Fa6IS/qdlJ1qBapRqpYLc9SrKThm47ILdd/ NxlBUNd05u+mT//d80Bseq0o41jgmgCcS6Aq4LNFH4AuyA99LH8CJGLrsuS7Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dMBZfug69tctbRa0kT9c947rV13U8/CU6nf+ceqZ8uM=; b=ARlz7kavIN5myTAryxwIb5VgbZAkZXRrjeVpfZpFwhzhlY+XHyqctlHxaDLtEphluubHa1 /dxywwOIEMROQLb+eUacy03yQ5z+Gfgb+AEqaYzm2KNMD/rCjXObi2Dck0N6iqN4QLNSk7 Ui8XdIJWA33Pcr4YXeeMmboIjNqtSE08hHUFmoonxv/cF2ZFSLF5Ix3mBmjBr+M5gSkpxb dmKeuxd+10wVDPjoJRA8pbzTWOL0Du52ukXBgU0MG/GGduCQYJDfsAlHiHzPwwsBtF9GGg U04ZiPoWfM3MXb84v6uK7A1EXeuZjS2nOgWFipst1x8Zk/KaFJXYPWTQHliGeA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759156664; a=rsa-sha256; cv=none; b=nX4VUw/8buF1FhTVTZ0em8sqJPNPzKwqroFnuc797BrdI5vLYBsdMlWblfhB40T2bVQ1w+ mjgn//J33ozhKsnLdxZVI6/835qHiq1/kLSEMSldbnYCLEnLAUM8pyXq8nuldnUarTQmEs pY52valZiaW3Imb5cA4wNlsFUJkXmdi/hP0OtRrWdwtGYS3EwVZ2l0a3BPQodgTGPljoAO VPfvxefCwP0Nkc5OipYZXokUxWKIKAkkndYvdbjElPAaWSIa0dEnsLEzfa3osd9XiMztnq S3FaWuca5B+oIhbMJTHBgZ0Fe4yPA10R3xyhkzel4J/gb2uJ0PysUewPkN0a4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb3gr1hPjz18gP; Mon, 29 Sep 2025 14:37:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TEbiA6017597; Mon, 29 Sep 2025 14:37:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TEbi7P017594; Mon, 29 Sep 2025 14:37:44 GMT (envelope-from git) Date: Mon, 29 Sep 2025 14:37:44 GMT Message-Id: <202509291437.58TEbi7P017594@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 1ba1c783296b - main - cxgbe(4): Claim T7 based devices List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1ba1c783296bc651e1af3174a1643dff39edf05a Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=1ba1c783296bc651e1af3174a1643dff39edf05a commit 1ba1c783296bc651e1af3174a1643dff39edf05a Author: Navdeep Parhar AuthorDate: 2025-09-29 07:54:13 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 14:25:58 +0000 cxgbe(4): Claim T7 based devices The nexus/ifnet names are chnex/che respectively. MFC after: 3 days Sponsored by: Chelsio Communications --- share/man/man4/cxgbe.4 | 5 +- sys/dev/cxgbe/t4_iov.c | 67 ++++++++++++++++++++++++ sys/dev/cxgbe/t4_main.c | 133 ++++++++++++++++++++++++++++++++++++++++++++++-- sys/dev/cxgbe/t4_vf.c | 65 +++++++++++++++++++++++ 4 files changed, 265 insertions(+), 5 deletions(-) diff --git a/share/man/man4/cxgbe.4 b/share/man/man4/cxgbe.4 index bfba202d1fec..77465a3ae590 100644 --- a/share/man/man4/cxgbe.4 +++ b/share/man/man4/cxgbe.4 @@ -29,7 +29,7 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.Dd November 10, 2022 +.Dd September 29, 2025 .Dt CXGBE 4 .Os .Sh NAME @@ -73,6 +73,7 @@ driver uses different names for devices based on the associated ASIC: .It T4 Ta cxgbe Ta t4nex Ta vcxgbe .It T5 Ta cxl Ta t5nex Ta vcxl .It T6 Ta cc Ta t6nex Ta vcc +.It T7 Ta che Ta chnex Ta vche .El .Pp Loader tunables with the hw.cxgbe prefix apply to all cards. @@ -416,6 +417,8 @@ Support for T6 cards first appeared in .Fx 11.1 and .Fx 12.0 . +Support for T7 cards first appeared in +.Fx 15.0 . .Sh AUTHORS .An -nosplit The diff --git a/sys/dev/cxgbe/t4_iov.c b/sys/dev/cxgbe/t4_iov.c index bfd1613e9795..452ebaaf0172 100644 --- a/sys/dev/cxgbe/t4_iov.c +++ b/sys/dev/cxgbe/t4_iov.c @@ -119,6 +119,28 @@ struct { {0x6085, "Chelsio T6240-SO 85"}, {0x6086, "Chelsio T6225-SO-CR 86"}, {0x6087, "Chelsio T6225-CR 87"}, +}, t7iov_pciids[] = { + {0xd000, "Chelsio Terminator 7 FPGA"}, /* T7 PE12K FPGA */ + {0x7000, "Chelsio T72200-DBG"}, /* 2 x 200G, debug */ + {0x7001, "Chelsio T7250"}, /* 2 x 10/25/50G, 1 mem */ + {0x7002, "Chelsio S7250"}, /* 2 x 10/25/50G, nomem */ + {0x7003, "Chelsio T7450"}, /* 4 x 10/25/50G, 1 mem */ + {0x7004, "Chelsio S7450"}, /* 4 x 10/25/50G, nomem */ + {0x7005, "Chelsio T72200"}, /* 2 x 40/100/200G, 1 mem */ + {0x7006, "Chelsio S72200"}, /* 2 x 40/100/200G, nomem */ + {0x7007, "Chelsio T72200-FH"}, /* 2 x 40/100/200G, 2 mem */ + {0x7008, "Chelsio T71400"}, /* 1 x 400G, nomem */ + {0x7009, "Chelsio S7210-BT"}, /* 2 x 10GBASE-T, nomem */ + {0x700a, "Chelsio T7450-RC"}, /* 4 x 10/25/50G, 1 mem, RC */ + {0x700b, "Chelsio T72200-RC"}, /* 2 x 40/100/200G, 1 mem, RC */ + {0x700c, "Chelsio T72200-FH-RC"}, /* 2 x 40/100/200G, 2 mem, RC */ + {0x700d, "Chelsio S72200-OCP3"}, /* 2 x 40/100/200G OCP3 */ + {0x700e, "Chelsio S7450-OCP3"}, /* 4 x 1/20/25/50G OCP3 */ + {0x700f, "Chelsio S7410-BT-OCP3"}, /* 4 x 10GBASE-T OCP3 */ + {0x7010, "Chelsio S7210-BT-A"}, /* 2 x 10GBASE-T */ + {0x7011, "Chelsio T7_MAYRA_7"}, /* Motherboard */ + + {0x7080, "Custom T7"}, }; static inline uint32_t @@ -190,6 +212,26 @@ t6iov_probe(device_t dev) return (ENXIO); } +static int +chiov_probe(device_t dev) +{ + uint16_t d; + size_t i; + + if (pci_get_vendor(dev) != PCI_VENDOR_ID_CHELSIO) + return (ENXIO); + + d = pci_get_device(dev); + for (i = 0; i < nitems(t7iov_pciids); i++) { + if (d == t7iov_pciids[i].device) { + device_set_desc(dev, t7iov_pciids[i].desc); + device_quiet(dev); + return (BUS_PROBE_DEFAULT); + } + } + return (ENXIO); +} + static int t4iov_attach(device_t dev) { @@ -460,6 +502,28 @@ static driver_t t6iov_driver = { sizeof(struct t4iov_softc) }; +static device_method_t chiov_methods[] = { + DEVMETHOD(device_probe, chiov_probe), + DEVMETHOD(device_attach, t4iov_attach), + DEVMETHOD(device_detach, t4iov_detach), + +#ifdef PCI_IOV + DEVMETHOD(pci_iov_init, t4iov_iov_init), + DEVMETHOD(pci_iov_uninit, t4iov_iov_uninit), + DEVMETHOD(pci_iov_add_vf, t4iov_add_vf), +#endif + + DEVMETHOD(t4_attach_child, t4iov_attach_child), + DEVMETHOD(t4_detach_child, t4iov_detach_child), + + DEVMETHOD_END +}; + +static driver_t chiov_driver = { + "chiov", + chiov_methods, + sizeof(struct t4iov_softc) +}; DRIVER_MODULE(t4iov, pci, t4iov_driver, 0, 0); MODULE_VERSION(t4iov, 1); @@ -468,3 +532,6 @@ MODULE_VERSION(t5iov, 1); DRIVER_MODULE(t6iov, pci, t6iov_driver, 0, 0); MODULE_VERSION(t6iov, 1); + +DRIVER_MODULE(chiov, pci, chiov_driver, 0, 0); +MODULE_VERSION(chiov, 1); diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 42f56179845c..6a52810c5d8d 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -241,6 +241,45 @@ static driver_t vcc_driver = { sizeof(struct vi_info) }; +/* T7+ bus driver interface */ +static int ch_probe(device_t); +static device_method_t ch_methods[] = { + DEVMETHOD(device_probe, ch_probe), + DEVMETHOD(device_attach, t4_attach), + DEVMETHOD(device_detach, t4_detach), + DEVMETHOD(device_suspend, t4_suspend), + DEVMETHOD(device_resume, t4_resume), + + DEVMETHOD(bus_child_location, t4_child_location), + DEVMETHOD(bus_reset_prepare, t4_reset_prepare), + DEVMETHOD(bus_reset_post, t4_reset_post), + + DEVMETHOD(t4_is_main_ready, t4_ready), + DEVMETHOD(t4_read_port_device, t4_read_port_device), + + DEVMETHOD_END +}; +static driver_t ch_driver = { + "chnex", + ch_methods, + sizeof(struct adapter) +}; + + +/* T7+ port (che) interface */ +static driver_t che_driver = { + "che", + cxgbe_methods, + sizeof(struct port_info) +}; + +/* T7+ VI (vche) interface */ +static driver_t vche_driver = { + "vche", + vcxgbe_methods, + sizeof(struct vi_info) +}; + /* ifnet interface */ static void cxgbe_init(void *); static int cxgbe_ioctl(if_t, unsigned long, caddr_t); @@ -960,6 +999,29 @@ struct { {0x6485, "Custom T6240-SO"}, {0x6486, "Custom T6225-SO-CR"}, {0x6487, "Custom T6225-CR"}, +}, t7_pciids[] = { + {0xd000, "Chelsio Terminator 7 FPGA"}, /* T7 PE12K FPGA */ + {0x7400, "Chelsio T72200-DBG"}, /* 2 x 200G, debug */ + {0x7401, "Chelsio T7250"}, /* 2 x 10/25/50G, 1 mem */ + {0x7402, "Chelsio S7250"}, /* 2 x 10/25/50G, nomem */ + {0x7403, "Chelsio T7450"}, /* 4 x 10/25/50G, 1 mem */ + {0x7404, "Chelsio S7450"}, /* 4 x 10/25/50G, nomem */ + {0x7405, "Chelsio T72200"}, /* 2 x 40/100/200G, 1 mem */ + {0x7406, "Chelsio S72200"}, /* 2 x 40/100/200G, nomem */ + {0x7407, "Chelsio T72200-FH"}, /* 2 x 40/100/200G, 2 mem */ + {0x7408, "Chelsio S71400"}, /* 1 x 400G, nomem */ + {0x7409, "Chelsio S7210-BT"}, /* 2 x 10GBASE-T, nomem */ + {0x740a, "Chelsio T7450-RC"}, /* 4 x 10/25/50G, 1 mem, RC */ + {0x740b, "Chelsio T72200-RC"}, /* 2 x 40/100/200G, 1 mem, RC */ + {0x740c, "Chelsio T72200-FH-RC"}, /* 2 x 40/100/200G, 2 mem, RC */ + {0x740d, "Chelsio S72200-OCP3"}, /* 2 x 40/100/200G OCP3 */ + {0x740e, "Chelsio S7450-OCP3"}, /* 4 x 1/20/25/50G OCP3 */ + {0x740f, "Chelsio S7410-BT-OCP3"}, /* 4 x 10GBASE-T OCP3 */ + {0x7410, "Chelsio S7210-BT-A"}, /* 2 x 10GBASE-T */ + {0x7411, "Chelsio T7_MAYRA_7"}, /* Motherboard */ + + /* Custom */ + {0x7480, "Custom T7"}, }; #ifdef TCP_OFFLOAD @@ -1042,6 +1104,31 @@ t6_probe(device_t dev) return (ENXIO); } +static int +ch_probe(device_t dev) +{ + int i; + uint16_t v = pci_get_vendor(dev); + uint16_t d = pci_get_device(dev); + uint8_t f = pci_get_function(dev); + + if (v != PCI_VENDOR_ID_CHELSIO) + return (ENXIO); + + /* Attach only to PF0 of the FPGA */ + if (d == 0xd000 && f != 0) + return (ENXIO); + + for (i = 0; i < nitems(t7_pciids); i++) { + if (d == t7_pciids[i].device) { + device_set_desc(dev, t7_pciids[i].desc); + return (BUS_PROBE_DEFAULT); + } + } + + return (ENXIO); +} + static void t5_attribute_workaround(device_t dev) { @@ -1091,6 +1178,13 @@ static const struct devnames devnames[] = { .pf03_drv_name = "t6iov", .vf_nexus_name = "t6vf", .vf_ifnet_name = "ccv" + }, { + .nexus_name = "chnex", + .ifnet_name = "che", + .vi_ifnet_name = "vche", + .pf03_drv_name = "chiov", + .vf_nexus_name = "chvf", + .vf_ifnet_name = "chev" } }; @@ -1100,12 +1194,13 @@ t4_init_devnames(struct adapter *sc) int id; id = chip_id(sc); - if (id >= CHELSIO_T4 && id - CHELSIO_T4 < nitems(devnames)) - sc->names = &devnames[id - CHELSIO_T4]; - else { + if (id < CHELSIO_T4) { device_printf(sc->dev, "chip id %d is not supported.\n", id); sc->names = NULL; - } + } else if (id - CHELSIO_T4 < nitems(devnames)) + sc->names = &devnames[id - CHELSIO_T4]; + else + sc->names = &devnames[nitems(devnames) - 1]; } static int @@ -4713,6 +4808,22 @@ struct fw_info { .intfver_fcoepdu = FW_INTFVER(T6, FCOEPDU), .intfver_fcoe = FW_INTFVER(T6, FCOE), }, + }, { + .chip = CHELSIO_T7, + .kld_name = "t7fw_cfg", + .fw_mod_name = "t7fw", + .fw_h = { + .chip = FW_HDR_CHIP_T7, + .fw_ver = htobe32(FW_VERSION(T7)), + .intfver_nic = FW_INTFVER(T7, NIC), + .intfver_vnic = FW_INTFVER(T7, VNIC), + .intfver_ofld = FW_INTFVER(T7, OFLD), + .intfver_ri = FW_INTFVER(T7, RI), + .intfver_iscsipdu = FW_INTFVER(T7, ISCSIPDU), + .intfver_iscsi = FW_INTFVER(T7, ISCSI), + .intfver_fcoepdu = FW_INTFVER(T7, FCOEPDU), + .intfver_fcoe = FW_INTFVER(T7, FCOE), + }, } }; @@ -13387,6 +13498,14 @@ MODULE_DEPEND(t6nex, firmware, 1, 1, 1); MODULE_DEPEND(t6nex, netmap, 1, 1, 1); #endif /* DEV_NETMAP */ +DRIVER_MODULE(chnex, pci, ch_driver, mod_event, 0); +MODULE_VERSION(chnex, 1); +MODULE_DEPEND(chnex, crypto, 1, 1, 1); +MODULE_DEPEND(chnex, firmware, 1, 1, 1); +#ifdef DEV_NETMAP +MODULE_DEPEND(chnex, netmap, 1, 1, 1); +#endif /* DEV_NETMAP */ + DRIVER_MODULE(cxgbe, t4nex, cxgbe_driver, 0, 0); MODULE_VERSION(cxgbe, 1); @@ -13396,6 +13515,9 @@ MODULE_VERSION(cxl, 1); DRIVER_MODULE(cc, t6nex, cc_driver, 0, 0); MODULE_VERSION(cc, 1); +DRIVER_MODULE(che, chnex, che_driver, 0, 0); +MODULE_VERSION(che, 1); + DRIVER_MODULE(vcxgbe, cxgbe, vcxgbe_driver, 0, 0); MODULE_VERSION(vcxgbe, 1); @@ -13404,3 +13526,6 @@ MODULE_VERSION(vcxl, 1); DRIVER_MODULE(vcc, cc, vcc_driver, 0, 0); MODULE_VERSION(vcc, 1); + +DRIVER_MODULE(vche, che, vche_driver, 0, 0); +MODULE_VERSION(vche, 1); diff --git a/sys/dev/cxgbe/t4_vf.c b/sys/dev/cxgbe/t4_vf.c index b7b08e226a57..89dae02e9332 100644 --- a/sys/dev/cxgbe/t4_vf.c +++ b/sys/dev/cxgbe/t4_vf.c @@ -125,6 +125,28 @@ struct { {0x6885, "Chelsio T6240-SO 85 VF"}, {0x6886, "Chelsio T6225-SO-CR 86 VF"}, {0x6887, "Chelsio T6225-CR 87 VF"}, +}, t7vf_pciids[] = { + {0xd800, "Chelsio T7 FPGA VF"}, /* T7 PE12K FPGA */ + {0x7800, "Chelsio T72200-DBG VF"}, /* 2 x 200G, debug */ + {0x7801, "Chelsio T7250 VF"}, /* 2 x 10/25/50G, 1 mem */ + {0x7802, "Chelsio S7250 VF"}, /* 2 x 10/25/50G, nomem */ + {0x7803, "Chelsio T7450 VF"}, /* 4 x 10/25/50G, 1 mem */ + {0x7804, "Chelsio S7450 VF"}, /* 4 x 10/25/50G, nomem */ + {0x7805, "Chelsio T72200 VF"}, /* 2 x 40/100/200G, 1 mem */ + {0x7806, "Chelsio S72200 VF"}, /* 2 x 40/100/200G, nomem */ + {0x7807, "Chelsio T72200-FH VF"}, /* 2 x 40/100/200G, 2 mem */ + {0x7808, "Chelsio T71400 VF"}, /* 1 x 400G, nomem */ + {0x7809, "Chelsio S7210-BT VF"}, /* 2 x 10GBASE-T, nomem */ + {0x780a, "Chelsio T7450-RC VF"}, /* 4 x 10/25/50G, 1 mem, RC */ + {0x780b, "Chelsio T72200-RC VF"}, /* 2 x 40/100/200G, 1 mem, RC */ + {0x780c, "Chelsio T72200-FH-RC VF"}, /* 2 x 40/100/200G, 2 mem, RC */ + {0x780d, "Chelsio S72200-OCP3 VF"}, /* 2 x 40/100/200G OCP3 */ + {0x780e, "Chelsio S7450-OCP3 VF"}, /* 4 x 1/20/25/50G OCP3 */ + {0x780f, "Chelsio S7410-BT-OCP3 VF"}, /* 4 x 10GBASE-T OCP3 */ + {0x7810, "Chelsio S7210-BT-A VF"}, /* 2 x 10GBASE-T */ + {0x7811, "Chelsio T7_MAYRA_7 VF"}, /* Motherboard */ + + {0x7880, "Custom T7 VF"}, }; static d_ioctl_t t4vf_ioctl; @@ -183,6 +205,22 @@ t6vf_probe(device_t dev) return (ENXIO); } +static int +chvf_probe(device_t dev) +{ + uint16_t d; + size_t i; + + d = pci_get_device(dev); + for (i = 0; i < nitems(t7vf_pciids); i++) { + if (d == t7vf_pciids[i].device) { + device_set_desc(dev, t7vf_pciids[i].desc); + return (BUS_PROBE_DEFAULT); + } + } + return (ENXIO); +} + #define FW_PARAM_DEV(param) \ (V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) | \ V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_##param)) @@ -956,6 +994,20 @@ static driver_t t6vf_driver = { sizeof(struct adapter) }; +static device_method_t chvf_methods[] = { + DEVMETHOD(device_probe, chvf_probe), + DEVMETHOD(device_attach, t4vf_attach), + DEVMETHOD(device_detach, t4_detach_common), + + DEVMETHOD_END +}; + +static driver_t chvf_driver = { + "chvf", + chvf_methods, + sizeof(struct adapter) +}; + static driver_t cxgbev_driver = { "cxgbev", cxgbe_methods, @@ -974,6 +1026,12 @@ static driver_t ccv_driver = { sizeof(struct port_info) }; +static driver_t chev_driver = { + "chev", + cxgbe_methods, + sizeof(struct port_info) +}; + DRIVER_MODULE(t4vf, pci, t4vf_driver, 0, 0); MODULE_VERSION(t4vf, 1); MODULE_DEPEND(t4vf, t4nex, 1, 1, 1); @@ -986,6 +1044,10 @@ DRIVER_MODULE(t6vf, pci, t6vf_driver, 0, 0); MODULE_VERSION(t6vf, 1); MODULE_DEPEND(t6vf, t6nex, 1, 1, 1); +DRIVER_MODULE(chvf, pci, chvf_driver, 0, 0); +MODULE_VERSION(chvf, 1); +MODULE_DEPEND(chvf, chnex, 1, 1, 1); + DRIVER_MODULE(cxgbev, t4vf, cxgbev_driver, 0, 0); MODULE_VERSION(cxgbev, 1); @@ -994,3 +1056,6 @@ MODULE_VERSION(cxlv, 1); DRIVER_MODULE(ccv, t6vf, ccv_driver, 0, 0); MODULE_VERSION(ccv, 1); + +DRIVER_MODULE(chev, chvf, chev_driver, 0, 0); +MODULE_VERSION(chev, 1); From nobody Mon Sep 29 14:37:45 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cb3gs543Pz68KWq; Mon, 29 Sep 2025 14:37:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb3gs2sTYz3sCF; Mon, 29 Sep 2025 14:37:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qlQFHypxkriaaI30suH+kAqVLwxszQcz5sPazCPcGfg=; b=Spgg41DQRClhwiE6v7isZEOc7QI3+TbMB8d8srpSv4kUCyb1gC6Xo7MSKKDHVypE5MA6xg dxYICUyAsTTeGnRocOy7OWL9dLiYNTyJisXyh1XWIKYZ4v+imWCiZVdcq6kRShq9mkPN/Q Nk7Zzh0fMTDRGCmInCCkmNQFvFGEtePgtzjkq0Jl6hb45M0p/IYaD4bQllsXEFsd+tlTvc P0p/tcyCYcULFq0YQbt0I1wkkWhKRJ4XFRWNt60C/SuWt7//U+PeuW7T0Mymgy9RpIyEz4 3EWHoOQ/TiVI0C4vj9DEIuUjamNJWlyc3pZ549W88goOEafYqv6ESVvIZFaXzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qlQFHypxkriaaI30suH+kAqVLwxszQcz5sPazCPcGfg=; b=na+mBIwYu5Czd4KGV65mO48sxZICglctdQPoksDWxs8I8HH2ztFUGzZ7Y23MA5c+Bo3LHu lU+ni90JBIHth2S2umRg8Ii5jLAhZq3/JyNAsuKazx1Z6jARhh3gq4AvDbuUh03SVeyg92 qS7gPAsu5LcNncsEz5BDPbsK0agkbLsntXF3Cba1cPNE/eNVIjoqLRUb3UefrhJbxkcBXp QxiP7dTsFJjO8sGTjcP4LzaVjTf67M5WpZcjH0USK78few8czldqIyk8rvZAa130B7gPgy NZRufsJuDFjfbIz2hDVZ8shKWSHBnf3IlwGhtXEDtiUAZuGqWv/1HBZGBWh7Zw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759156665; a=rsa-sha256; cv=none; b=lqq455cqnGous65NvD9BQmCod9bjQbDhtkWea9UmfFn7RZLmxFTghH8+9xcsNk+Am7cmzo sEaqWdlXTKE4FFLefjy+QaHdJbEeGmHDJjKdFOK6Tp8KaQv7q4W8QF7M70SWqS55ar/pTu tcNqj9TK5PXgKoJSAuqCzgSf9DYLzDY2XjK3eIE2EPLtKy3XkLXX5osdLa8ZhBbht51xr2 PnxroKelpWGo/yE5363GRuFoKNZxCp1h5njyQi5PKqMYasKj3yqgNg3Nl2y+Opcj6Df6HG HUdVmv200f8ORD1qC3HjRws8R5UEHLf+SgbGRQjLy9UJYTxWyBpJMk+gLJIXvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb3gs2Jz9z18gQ; Mon, 29 Sep 2025 14:37:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TEbjb0017630; Mon, 29 Sep 2025 14:37:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TEbjWc017627; Mon, 29 Sep 2025 14:37:45 GMT (envelope-from git) Date: Mon, 29 Sep 2025 14:37:45 GMT Message-Id: <202509291437.58TEbjWc017627@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 87d3ee5d14ba - main - cxgbe(4): Add T7 support to routines that deal with memory windows 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 87d3ee5d14ba2e912010531e5bb601180bd5803d Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=87d3ee5d14ba2e912010531e5bb601180bd5803d commit 87d3ee5d14ba2e912010531e5bb601180bd5803d Author: Navdeep Parhar AuthorDate: 2025-09-29 08:17:17 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 14:25:58 +0000 cxgbe(4): Add T7 support to routines that deal with memory windows MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_main.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 6a52810c5d8d..01899bda0216 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -4051,7 +4051,7 @@ setup_memwin(struct adapter *sc) const struct memwin_init *mw_init; struct memwin *mw; int i; - uint32_t bar0; + uint32_t bar0, reg; if (is_t4(sc)) { /* @@ -4079,9 +4079,10 @@ setup_memwin(struct adapter *sc) mw->mw_aperture = mw_init->aperture; mw->mw_curpos = 0; } - t4_write_reg(sc, - PCIE_MEM_ACCESS_REG(A_PCIE_MEM_ACCESS_BASE_WIN, i), - (mw->mw_base + bar0) | V_BIR(0) | + reg = chip_id(sc) > CHELSIO_T6 ? + PCIE_MEM_ACCESS_T7_REG(A_T7_PCIE_MEM_ACCESS_BASE_WIN, i) : + PCIE_MEM_ACCESS_REG(A_PCIE_MEM_ACCESS_BASE_WIN, i); + t4_write_reg(sc, reg, (mw->mw_base + bar0) | V_BIR(0) | V_WINDOW(ilog2(mw->mw_aperture) - 10)); rw_wlock(&mw->mw_lock); position_memwin(sc, i, mw->mw_curpos); @@ -4089,7 +4090,7 @@ setup_memwin(struct adapter *sc) } /* flush */ - t4_read_reg(sc, PCIE_MEM_ACCESS_REG(A_PCIE_MEM_ACCESS_BASE_WIN, 2)); + t4_read_reg(sc, reg); } /* @@ -4102,8 +4103,7 @@ static void position_memwin(struct adapter *sc, int idx, uint32_t addr) { struct memwin *mw; - uint32_t pf; - uint32_t reg; + uint32_t pf, reg, val; MPASS(idx >= 0 && idx < NUM_MEMWIN); mw = &sc->memwin[idx]; @@ -4116,8 +4116,14 @@ position_memwin(struct adapter *sc, int idx, uint32_t addr) pf = V_PFNUM(sc->pf); mw->mw_curpos = addr & ~0x7f; /* start must be 128B aligned */ } - reg = PCIE_MEM_ACCESS_REG(A_PCIE_MEM_ACCESS_OFFSET, idx); - t4_write_reg(sc, reg, mw->mw_curpos | pf); + if (chip_id(sc) > CHELSIO_T6) { + reg = PCIE_MEM_ACCESS_T7_REG(A_PCIE_MEM_ACCESS_OFFSET0, idx); + val = (mw->mw_curpos >> X_T7_MEMOFST_SHIFT) | pf; + } else { + reg = PCIE_MEM_ACCESS_REG(A_PCIE_MEM_ACCESS_OFFSET, idx); + val = mw->mw_curpos | pf; + } + t4_write_reg(sc, reg, val); t4_read_reg(sc, reg); /* flush */ } @@ -13013,7 +13019,9 @@ t4_dump_mem(struct adapter *sc, u_int addr, u_int len) { uint32_t base, j, off, pf, reg, save, win_pos; - reg = PCIE_MEM_ACCESS_REG(A_PCIE_MEM_ACCESS_OFFSET, 2); + reg = chip_id(sc) > CHELSIO_T6 ? + PCIE_MEM_ACCESS_T7_REG(A_PCIE_MEM_ACCESS_OFFSET0, 2) : + PCIE_MEM_ACCESS_REG(A_PCIE_MEM_ACCESS_OFFSET, 2); save = t4_read_reg(sc, reg); base = sc->memwin[2].mw_base; @@ -13025,6 +13033,8 @@ t4_dump_mem(struct adapter *sc, u_int addr, u_int len) win_pos = addr & ~0x7f; /* start must be 128B aligned */ } off = addr - win_pos; + if (chip_id(sc) > CHELSIO_T6) + win_pos >>= X_T7_MEMOFST_SHIFT; t4_write_reg(sc, reg, win_pos | pf); t4_read_reg(sc, reg); From nobody Mon Sep 29 14:37: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 4cb3gt6pcsz68K20; Mon, 29 Sep 2025 14:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb3gt3lJ3z3sTh; Mon, 29 Sep 2025 14:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QatEw6gXpmJND8b7GlUXMiNlGj/s+kQW0aEvaLvMykU=; b=Q6DndMMIax8tADAmsS+X6jOalbgqB9WkHd5I3soYC1aJqAy5PWFjQor6bmuCBI0qK+3YK4 uLN2W0mVIpGWVEHzg0toiDpV+U+hiYiqIfTnhO8vy6OqN4DqibkhM4JdTfkMbpO+xb2v5c HOHOaZQmeh2n8QOom139A/r8k0uv0o4xO49J+Dz/JU9AvVTBdKVXE6T93kQ4f1QRSDgWPX ouxhgQsPou0y/tOPfbfVthlG4Yc46W6YmUUMrqQunvsr+IHL0zjLWmkjFdX+RJi4cyINV2 SUvZwvSNZIhkJUo53NJ4NKzSZWO/wmmnK17NhrUwDzE6LyCVahyDk4g76x6r8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QatEw6gXpmJND8b7GlUXMiNlGj/s+kQW0aEvaLvMykU=; b=hOzE1KuMa6xEtq2RaStaoVwBD7fzemy+nexMqLkM+0NK3s7HH3MbneQZEUd04+2jYvShzI IKH5oIz2l4ogWPhAQwf1A73VFMcw2FZgud9uBj9XkRxXWgaekiK6bxB91umg/tl8gpmTNU H+Hif5P6jzgFgD+mLKZ+SQYqUwZHuk+0h1Ci5FFFxpiJoxHE4UVS73zxlyTv6ceZJCwOvZ +RFzcUqebbfmxPfbmZc+129Jb2ExTgpkzR0PAwwnhia/EdxsKrV9k21IZ549mVjD+JMteR 7p1BN6pFgkv5Gaa+jG05yMGEWvMoA8Ztua32zYvPlZ1r/VNcOPBC37dszlvw2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759156666; a=rsa-sha256; cv=none; b=VAdMx9PzC2hqWZKyXEmJK7IK0bkacEg67+Nz2wpgsted55FnRo/l6iaGMW2SPzMEKkhQ2u PmIUaN9n7jlZ1dUt+FZDgXAlhXGUZaeLaQkc6NFf9Za7CTBbBIPFkoLOOriCyMtEEe7XOl 7dqM6epKSaFRhbnqDGTUWOMmgvxXgqqQ5c/2z32ZFJBoYH/EE6y59Ths416Yg9ncBSpbFu VG0yPdJ3AP28f7CVo9F4omB0wpb5kDcfepWwZXrd3/ukbd+pgfu/O+0sjGEkcl2QuswYv2 MGMqI2wVIQqNywLIBmAysPZdkh3akN/1/MxJKJ9OO2XurtSW2D7qwBAnHyb31g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb3gt3K6wz18gR; Mon, 29 Sep 2025 14:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TEbkGq017666; Mon, 29 Sep 2025 14:37:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TEbk3j017663; Mon, 29 Sep 2025 14:37:46 GMT (envelope-from git) Date: Mon, 29 Sep 2025 14:37:46 GMT Message-Id: <202509291437.58TEbk3j017663@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: f487e4778bb7 - main - cxgbe(4): Update meminfo for T7 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f487e4778bb7154bec5057f5a6f9ca2a0230d4ae Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=f487e4778bb7154bec5057f5a6f9ca2a0230d4ae commit f487e4778bb7154bec5057f5a6f9ca2a0230d4ae Author: Navdeep Parhar AuthorDate: 2025-09-29 08:24:05 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 14:25:59 +0000 cxgbe(4): Update meminfo for T7 There are new regions in the T7 and internal addresses are not limited to 32b. MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_main.c | 196 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 153 insertions(+), 43 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 01899bda0216..101215073385 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -10030,16 +10030,16 @@ sysctl_linkdnrc(SYSCTL_HANDLER_ARGS) } struct mem_desc { - u_int base; - u_int limit; + uint64_t base; + uint64_t limit; u_int idx; }; static int mem_desc_cmp(const void *a, const void *b) { - const u_int v1 = ((const struct mem_desc *)a)->base; - const u_int v2 = ((const struct mem_desc *)b)->base; + const uint64_t v1 = ((const struct mem_desc *)a)->base; + const uint64_t v2 = ((const struct mem_desc *)b)->base; if (v1 < v2) return (-1); @@ -10050,10 +10050,9 @@ mem_desc_cmp(const void *a, const void *b) } static void -mem_region_show(struct sbuf *sb, const char *name, unsigned int from, - unsigned int to) +mem_region_show(struct sbuf *sb, const char *name, uint64_t from, uint64_t to) { - unsigned int size; + uintmax_t size; if (from == to) return; @@ -10062,8 +10061,12 @@ mem_region_show(struct sbuf *sb, const char *name, unsigned int from, if (size == 0) return; - /* XXX: need humanize_number(3) in libkern for a more readable 'size' */ - sbuf_printf(sb, "%-15s %#x-%#x [%u]\n", name, from, to, size); + if (from > UINT32_MAX || to > UINT32_MAX) + sbuf_printf(sb, "%-18s 0x%012jx-0x%012jx [%ju]\n", name, + (uintmax_t)from, (uintmax_t)to, size); + else + sbuf_printf(sb, "%-18s 0x%08jx-0x%08jx [%ju]\n", name, + (uintmax_t)from, (uintmax_t)to, size); } static int @@ -10071,7 +10074,7 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) { struct adapter *sc = arg1; struct sbuf *sb; - int rc, i, n; + int rc, i, n, nchan; uint32_t lo, hi, used, free, alloc; static const char *memory[] = { "EDC0:", "EDC1:", "MC:", "MC0:", "MC1:", "HMA:" @@ -10082,12 +10085,14 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) "Tx payload:", "Rx payload:", "LE hash:", "iSCSI region:", "TDDP region:", "TPT region:", "STAG region:", "RQ region:", "RQUDP region:", "PBL region:", "TXPBL region:", - "TLSKey region:", "DBVFIFO region:", "ULPRX state:", - "ULPTX state:", "On-chip queues:", + "TLSKey region:", "RRQ region:", "NVMe STAG region:", + "NVMe RQ region:", "NVMe RXPBL region:", "NVMe TPT region:", + "NVMe TXPBL region:", "DBVFIFO region:", "ULPRX state:", + "ULPTX state:", "RoCE RRQ region:", "On-chip queues:", }; struct mem_desc avail[4]; struct mem_desc mem[nitems(region) + 3]; /* up to 3 holes */ - struct mem_desc *md = mem; + struct mem_desc *md; rc = sysctl_wire_old_buffer(req, 0); if (rc != 0) @@ -10113,36 +10118,91 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) lo = t4_read_reg(sc, A_MA_TARGET_MEM_ENABLE); if (lo & F_EDRAM0_ENABLE) { hi = t4_read_reg(sc, A_MA_EDRAM0_BAR); - avail[i].base = G_EDRAM0_BASE(hi) << 20; - avail[i].limit = avail[i].base + (G_EDRAM0_SIZE(hi) << 20); + if (chip_id(sc) >= CHELSIO_T7) { + avail[i].base = (uint64_t)G_T7_EDRAM0_BASE(hi) << 20; + avail[i].limit = avail[i].base + + (G_T7_EDRAM0_SIZE(hi) << 20); + } else { + avail[i].base = (uint64_t)G_EDRAM0_BASE(hi) << 20; + avail[i].limit = avail[i].base + + (G_EDRAM0_SIZE(hi) << 20); + } avail[i].idx = 0; i++; } if (lo & F_EDRAM1_ENABLE) { hi = t4_read_reg(sc, A_MA_EDRAM1_BAR); - avail[i].base = G_EDRAM1_BASE(hi) << 20; - avail[i].limit = avail[i].base + (G_EDRAM1_SIZE(hi) << 20); + if (chip_id(sc) >= CHELSIO_T7) { + avail[i].base = (uint64_t)G_T7_EDRAM1_BASE(hi) << 20; + avail[i].limit = avail[i].base + + (G_T7_EDRAM1_SIZE(hi) << 20); + } else { + avail[i].base = (uint64_t)G_EDRAM1_BASE(hi) << 20; + avail[i].limit = avail[i].base + + (G_EDRAM1_SIZE(hi) << 20); + } avail[i].idx = 1; i++; } if (lo & F_EXT_MEM_ENABLE) { - hi = t4_read_reg(sc, A_MA_EXT_MEMORY_BAR); - avail[i].base = G_EXT_MEM_BASE(hi) << 20; - avail[i].limit = avail[i].base + (G_EXT_MEM_SIZE(hi) << 20); - avail[i].idx = is_t5(sc) ? 3 : 2; /* Call it MC0 for T5 */ + switch (chip_id(sc)) { + case CHELSIO_T4: + case CHELSIO_T6: + hi = t4_read_reg(sc, A_MA_EXT_MEMORY_BAR); + avail[i].base = (uint64_t)G_EXT_MEM_BASE(hi) << 20; + avail[i].limit = avail[i].base + + (G_EXT_MEM_SIZE(hi) << 20); + avail[i].idx = 2; + break; + case CHELSIO_T5: + hi = t4_read_reg(sc, A_MA_EXT_MEMORY0_BAR); + avail[i].base = (uint64_t)G_EXT_MEM0_BASE(hi) << 20; + avail[i].limit = avail[i].base + + (G_EXT_MEM0_SIZE(hi) << 20); + avail[i].idx = 3; /* Call it MC0 for T5 */ + break; + default: + hi = t4_read_reg(sc, A_MA_EXT_MEMORY0_BAR); + avail[i].base = (uint64_t)G_T7_EXT_MEM0_BASE(hi) << 20; + avail[i].limit = avail[i].base + + (G_T7_EXT_MEM0_SIZE(hi) << 20); + avail[i].idx = 3; /* Call it MC0 for T7+ */ + break; + } i++; } - if (is_t5(sc) && lo & F_EXT_MEM1_ENABLE) { + if (lo & F_EXT_MEM1_ENABLE && !(lo & F_MC_SPLIT)) { + /* Only T5 and T7+ have 2 MCs. */ + MPASS(is_t5(sc) || chip_id(sc) >= CHELSIO_T7); + hi = t4_read_reg(sc, A_MA_EXT_MEMORY1_BAR); - avail[i].base = G_EXT_MEM1_BASE(hi) << 20; - avail[i].limit = avail[i].base + (G_EXT_MEM1_SIZE(hi) << 20); + if (chip_id(sc) >= CHELSIO_T7) { + avail[i].base = (uint64_t)G_T7_EXT_MEM1_BASE(hi) << 20; + avail[i].limit = avail[i].base + + (G_T7_EXT_MEM1_SIZE(hi) << 20); + } else { + avail[i].base = (uint64_t)G_EXT_MEM1_BASE(hi) << 20; + avail[i].limit = avail[i].base + + (G_EXT_MEM1_SIZE(hi) << 20); + } avail[i].idx = 4; i++; } - if (is_t6(sc) && lo & F_HMA_MUX) { - hi = t4_read_reg(sc, A_MA_EXT_MEMORY1_BAR); - avail[i].base = G_EXT_MEM1_BASE(hi) << 20; - avail[i].limit = avail[i].base + (G_EXT_MEM1_SIZE(hi) << 20); + if (lo & F_HMA_MUX) { + /* Only T6+ have HMA. */ + MPASS(chip_id(sc) >= CHELSIO_T6); + + if (chip_id(sc) >= CHELSIO_T7) { + hi = t4_read_reg(sc, A_MA_HOST_MEMORY_BAR); + avail[i].base = (uint64_t)G_HMATARGETBASE(hi) << 20; + avail[i].limit = avail[i].base + + (G_T7_HMA_SIZE(hi) << 20); + } else { + hi = t4_read_reg(sc, A_MA_EXT_MEMORY1_BAR); + avail[i].base = G_EXT_MEM1_BASE(hi) << 20; + avail[i].limit = avail[i].base + + (G_EXT_MEM1_SIZE(hi) << 20); + } avail[i].idx = 5; i++; } @@ -10151,6 +10211,7 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) goto done; qsort(avail, i, sizeof(struct mem_desc), mem_desc_cmp); + md = &mem[0]; (md++)->base = t4_read_reg(sc, A_SGE_DBQ_CTXT_BADDR); (md++)->base = t4_read_reg(sc, A_SGE_IMSG_CTXT_BADDR); (md++)->base = t4_read_reg(sc, A_SGE_FLM_CACHE_BADDR); @@ -10186,22 +10247,52 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) } md++; -#define ulp_region(reg) \ - md->base = t4_read_reg(sc, A_ULP_ ## reg ## _LLIMIT);\ - (md++)->limit = t4_read_reg(sc, A_ULP_ ## reg ## _ULIMIT) +#define ulp_region(reg) do {\ + const u_int shift = chip_id(sc) >= CHELSIO_T7 ? 4 : 0; \ + md->base = (uint64_t)t4_read_reg(sc, A_ULP_ ## reg ## _LLIMIT) << shift; \ + md->limit = (uint64_t)t4_read_reg(sc, A_ULP_ ## reg ## _ULIMIT) << shift; \ + md->limit += (1 << shift) - 1; \ + md++; \ + } while (0) + +#define hide_ulp_region() do { \ + md->base = 0; \ + md->idx = nitems(region); \ + md++; \ + } while (0) ulp_region(RX_ISCSI); ulp_region(RX_TDDP); ulp_region(TX_TPT); ulp_region(RX_STAG); ulp_region(RX_RQ); - ulp_region(RX_RQUDP); + if (chip_id(sc) < CHELSIO_T7) + ulp_region(RX_RQUDP); + else + hide_ulp_region(); ulp_region(RX_PBL); ulp_region(TX_PBL); - if (sc->cryptocaps & FW_CAPS_CONFIG_TLSKEYS) { + if (chip_id(sc) >= CHELSIO_T6) ulp_region(RX_TLS_KEY); + else + hide_ulp_region(); + if (chip_id(sc) >= CHELSIO_T7) { + ulp_region(RX_RRQ); + ulp_region(RX_NVME_TCP_STAG); + ulp_region(RX_NVME_TCP_RQ); + ulp_region(RX_NVME_TCP_PBL); + ulp_region(TX_NVME_TCP_TPT); + ulp_region(TX_NVME_TCP_PBL); + } else { + hide_ulp_region(); + hide_ulp_region(); + hide_ulp_region(); + hide_ulp_region(); + hide_ulp_region(); + hide_ulp_region(); } #undef ulp_region +#undef hide_ulp_region md->base = 0; if (is_t4(sc)) @@ -10232,6 +10323,15 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) md->limit = 0; md++; + if (chip_id(sc) >= CHELSIO_T7) { + t4_tp_pio_read(sc, &lo, 1, A_TP_ROCE_RRQ_BASE, false); + md->base = lo; + } else { + md->base = 0; + md->idx = nitems(region); + } + md++; + md->base = sc->vres.ocq.start; if (sc->vres.ocq.size) md->limit = md->base + sc->vres.ocq.size - 1; @@ -10264,31 +10364,41 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) mem[i].limit); } - sbuf_printf(sb, "\n"); lo = t4_read_reg(sc, A_CIM_SDRAM_BASE_ADDR); hi = t4_read_reg(sc, A_CIM_SDRAM_ADDR_SIZE) + lo - 1; - mem_region_show(sb, "uP RAM:", lo, hi); + if (hi != lo - 1) { + sbuf_printf(sb, "\n"); + mem_region_show(sb, "uP RAM:", lo, hi); + } lo = t4_read_reg(sc, A_CIM_EXTMEM2_BASE_ADDR); hi = t4_read_reg(sc, A_CIM_EXTMEM2_ADDR_SIZE) + lo - 1; - mem_region_show(sb, "uP Extmem2:", lo, hi); + if (hi != lo - 1) + mem_region_show(sb, "uP Extmem2:", lo, hi); lo = t4_read_reg(sc, A_TP_PMM_RX_MAX_PAGE); - for (i = 0, free = 0; i < 2; i++) + if (chip_id(sc) >= CHELSIO_T7) + nchan = 1 << G_T7_PMRXNUMCHN(lo); + else + nchan = lo & F_PMRXNUMCHN ? 2 : 1; + for (i = 0, free = 0; i < nchan; i++) free += G_FREERXPAGECOUNT(t4_read_reg(sc, A_TP_FLM_FREE_RX_CNT)); sbuf_printf(sb, "\n%u Rx pages (%u free) of size %uKiB for %u channels\n", G_PMRXMAXPAGE(lo), free, - t4_read_reg(sc, A_TP_PMM_RX_PAGE_SIZE) >> 10, - (lo & F_PMRXNUMCHN) ? 2 : 1); + t4_read_reg(sc, A_TP_PMM_RX_PAGE_SIZE) >> 10, nchan); lo = t4_read_reg(sc, A_TP_PMM_TX_MAX_PAGE); hi = t4_read_reg(sc, A_TP_PMM_TX_PAGE_SIZE); - for (i = 0, free = 0; i < 4; i++) + if (chip_id(sc) >= CHELSIO_T7) + nchan = 1 << G_T7_PMTXNUMCHN(lo); + else + nchan = 1 << G_PMTXNUMCHN(lo); + for (i = 0, free = 0; i < nchan; i++) free += G_FREETXPAGECOUNT(t4_read_reg(sc, A_TP_FLM_FREE_TX_CNT)); sbuf_printf(sb, "%u Tx pages (%u free) of size %u%ciB for %u channels\n", G_PMTXMAXPAGE(lo), free, hi >= (1 << 20) ? (hi >> 20) : (hi >> 10), - hi >= (1 << 20) ? 'M' : 'K', 1 << G_PMTXNUMCHN(lo)); + hi >= (1 << 20) ? 'M' : 'K', nchan); sbuf_printf(sb, "%u p-structs (%u free)\n", t4_read_reg(sc, A_TP_CMM_MM_MAX_PSTRUCT), G_FREEPSTRUCTCOUNT(t4_read_reg(sc, A_TP_FLM_FREE_PS_CNT))); @@ -10305,7 +10415,7 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) used = G_USED(lo); alloc = G_ALLOC(lo); } - /* For T6 these are MAC buffer groups */ + /* For T6+ these are MAC buffer groups */ sbuf_printf(sb, "\nPort %d using %u pages out of %u allocated", i, used, alloc); } @@ -10321,7 +10431,7 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS) used = G_USED(lo); alloc = G_ALLOC(lo); } - /* For T6 these are MAC buffer groups */ + /* For T6+ these are MAC buffer groups */ sbuf_printf(sb, "\nLoopback %d using %u pages out of %u allocated", i, used, alloc); From nobody Mon Sep 29 14:37: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 4cb3gw19Yvz68KZL; Mon, 29 Sep 2025 14:37:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb3gv4z7lz3slD; Mon, 29 Sep 2025 14:37:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GAnLFNoIixwtKw/XEOHJVDyNgWjdjSk02iprzcGhhs0=; b=iv3tp8K02/meDZsQy2ufztP0SeOIhNlVgGaihNMkhnoVWkCBk9DJSSAkZA90MWaZBUFN43 XTq0/cMCANbu1kj/Fk+6QVn/1n0EKpPvvQMYEAv1pBEHyyDNQrkT4IiMND+irrQ2lXFok3 6AXxieIyMalatxA/7Nzg9Xsh+GlL45Zamz2paInh+/70bpKWDmyxdKzvh7rrzDzEuAZJll 3F03u3lNZzg1xXetHc+lCix96dg9DZ0ce+sgEpGlUMcwyFAI4+IMXQTlFCa2JidAgse9oE Y3/f8OvBghZpk0tA8iv4UHFLnvTbxCaNfn3ixZIZE7U0BdHC9gbXvTmkKp2GFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156667; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GAnLFNoIixwtKw/XEOHJVDyNgWjdjSk02iprzcGhhs0=; b=cOR5dkUHq5VpA9sNIjfiCtEONlizA2T8hEhXbLMWQTRna9bVIFdzQMnIM5e2smGqVgh1M/ Yf6tt2eBUeZOyykO7DYUChwN4Uet2tmrzc222og00r5yTIZleNFNOV0acJPJOvUpfLEhNe AApR0dTbJP0ValMH7sWc0KzGntDpyxVuYwKmEP7hRGTKQ/MLlL3cMWJaXjprQT/HtILOzt 2DBWXbtDfqmcsvzrGdUNUWgN+kLck7YiQFyAImfR0Vc26DRNIKWmIW5ULueyLb4hOfJ18r fv6Ec+ceObR93zEZNit/1+BZCtLnhSyX2KxOIDmbXtCwfbU9VR06eXpVFaO02w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759156667; a=rsa-sha256; cv=none; b=c70m2qEX+HAaXVzi2UahNdKzRdHHO1dVGDIIqIaA2Hd0/EWDFALKXM+ktMFhVTppXvRDFR HNSm9yQ2retED6D+6fNLWHeWKd92zuWA48MPmGKOTEFxwGSTpQfV6VSghU2Dow6DwTlE4+ 29YN+RnDbqSNQHvnysMB5lI8/ifUcO/HhHhJrebOok+NBELT5N7s4IW2phibsSukhx6NFW o0N9ePWX6kGU3pufzy91RbiiRQROiATxVOmSk5Hhd/EfPAUmnUSZqUX9S7ne4R+PiFnDKo auGZw6+ADpEpepfY7DI3+fFf9zs2nhVCNoMI+5FFsz5P1DIfnV2vr3sn5f0XIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb3gv4M5qz182T; Mon, 29 Sep 2025 14:37:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TEblWN017699; Mon, 29 Sep 2025 14:37:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TEblm4017696; Mon, 29 Sep 2025 14:37:47 GMT (envelope-from git) Date: Mon, 29 Sep 2025 14:37:47 GMT Message-Id: <202509291437.58TEblm4017696@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 6fa85bf12226 - main - cxgbe(4): Support for displaying T7 MPS TCAM entries 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6fa85bf1222672681f6f6bd1502cba752d7c5d5f Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=6fa85bf1222672681f6f6bd1502cba752d7c5d5f commit 6fa85bf1222672681f6f6bd1502cba752d7c5d5f Author: Navdeep Parhar AuthorDate: 2025-09-29 08:30:14 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 14:25:59 +0000 cxgbe(4): Support for displaying T7 MPS TCAM entries MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_main.c | 208 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 205 insertions(+), 3 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 101215073385..db7ed38b1f9f 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -870,6 +870,7 @@ static int sysctl_linkdnrc(SYSCTL_HANDLER_ARGS); static int sysctl_meminfo(SYSCTL_HANDLER_ARGS); static int sysctl_mps_tcam(SYSCTL_HANDLER_ARGS); static int sysctl_mps_tcam_t6(SYSCTL_HANDLER_ARGS); +static int sysctl_mps_tcam_t7(SYSCTL_HANDLER_ARGS); static int sysctl_path_mtus(SYSCTL_HANDLER_ARGS); static int sysctl_pm_stats(SYSCTL_HANDLER_ARGS); static int sysctl_rdma_stats(SYSCTL_HANDLER_ARGS); @@ -7904,7 +7905,8 @@ t4_sysctls(struct adapter *sc) SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "mps_tcam", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, - chip_id(sc) <= CHELSIO_T5 ? sysctl_mps_tcam : sysctl_mps_tcam_t6, + chip_id(sc) >= CHELSIO_T7 ? sysctl_mps_tcam_t7 : + (chip_id(sc) >= CHELSIO_T6 ? sysctl_mps_tcam_t6 : sysctl_mps_tcam), "A", "MPS TCAM entries"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "path_mtus", @@ -10560,7 +10562,7 @@ sysctl_mps_tcam_t6(SYSCTL_HANDLER_ARGS) struct sbuf *sb; int rc, i; - MPASS(chip_id(sc) > CHELSIO_T5); + MPASS(chip_id(sc) == CHELSIO_T6); sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) @@ -10569,7 +10571,7 @@ sysctl_mps_tcam_t6(SYSCTL_HANDLER_ARGS) sbuf_printf(sb, "Idx Ethernet address Mask VNI Mask" " IVLAN Vld DIP_Hit Lookup Port Vld Ports PF VF" " Replication" - " P0 P1 P2 P3 ML\n"); + " P0 P1 P2 P3 ML"); rc = 0; for (i = 0; i < sc->chip_params->mps_tcam_size; i++) { @@ -10733,6 +10735,206 @@ sysctl_mps_tcam_t6(SYSCTL_HANDLER_ARGS) return (rc); } +static int +sysctl_mps_tcam_t7(SYSCTL_HANDLER_ARGS) +{ + struct adapter *sc = arg1; + struct sbuf *sb; + int rc, i; + + MPASS(chip_id(sc) >= CHELSIO_T7); + + sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); + if (sb == NULL) + return (ENOMEM); + + sbuf_printf(sb, "Idx Ethernet address Mask VNI Mask" + " IVLAN Vld DIP_Hit Lookup Port Vld Ports PF VF" + " Replication" + " P0 P1 P2 P3 ML"); + + rc = 0; + for (i = 0; i < sc->chip_params->mps_tcam_size; i++) { + uint8_t dip_hit, vlan_vld, lookup_type, port_num; + uint16_t ivlan; + uint64_t tcamx, tcamy, val, mask; + uint32_t cls_lo, cls_hi, ctl, data2, vnix, vniy; + uint8_t addr[ETHER_ADDR_LEN]; + + /* Read tcamy */ + ctl = (V_CTLREQID(1) | V_CTLCMDTYPE(0) | V_CTLXYBITSEL(0)); + if (chip_rev(sc) == 0) { + if (i < 256) + ctl |= V_CTLTCAMINDEX(i) | V_T7_CTLTCAMSEL(0); + else + ctl |= V_CTLTCAMINDEX(i - 256) | V_T7_CTLTCAMSEL(1); + } else { +#if 0 + ctl = (V_CTLREQID(1) | V_CTLCMDTYPE(0) | V_CTLXYBITSEL(0)); +#endif + if (i < 512) + ctl |= V_CTLTCAMINDEX(i) | V_T7_CTLTCAMSEL(0); + else if (i < 1024) + ctl |= V_CTLTCAMINDEX(i - 512) | V_T7_CTLTCAMSEL(1); + else + ctl |= V_CTLTCAMINDEX(i - 1024) | V_T7_CTLTCAMSEL(2); + } + + mtx_lock(&sc->reg_lock); + if (hw_off_limits(sc)) + rc = ENXIO; + else { + t4_write_reg(sc, A_MPS_CLS_TCAM_DATA2_CTL, ctl); + val = t4_read_reg(sc, A_MPS_CLS_TCAM0_RDATA1_REQ_ID1); + tcamy = G_DMACH(val) << 32; + tcamy |= t4_read_reg(sc, A_MPS_CLS_TCAM0_RDATA0_REQ_ID1); + data2 = t4_read_reg(sc, A_MPS_CLS_TCAM0_RDATA2_REQ_ID1); + } + mtx_unlock(&sc->reg_lock); + if (rc != 0) + break; + + lookup_type = G_DATALKPTYPE(data2); + port_num = G_DATAPORTNUM(data2); + if (lookup_type && lookup_type != M_DATALKPTYPE) { + /* Inner header VNI */ + vniy = (((data2 & F_DATAVIDH2) | + G_DATAVIDH1(data2)) << 16) | G_VIDL(val); + dip_hit = data2 & F_DATADIPHIT; + vlan_vld = 0; + } else { + vniy = 0; + dip_hit = 0; + vlan_vld = data2 & F_DATAVIDH2; + ivlan = G_VIDL(val); + } + + ctl |= V_CTLXYBITSEL(1); + mtx_lock(&sc->reg_lock); + if (hw_off_limits(sc)) + rc = ENXIO; + else { + t4_write_reg(sc, A_MPS_CLS_TCAM_DATA2_CTL, ctl); + val = t4_read_reg(sc, A_MPS_CLS_TCAM0_RDATA1_REQ_ID1); + tcamx = G_DMACH(val) << 32; + tcamx |= t4_read_reg(sc, A_MPS_CLS_TCAM0_RDATA0_REQ_ID1); + data2 = t4_read_reg(sc, A_MPS_CLS_TCAM0_RDATA2_REQ_ID1); + } + mtx_unlock(&sc->reg_lock); + if (rc != 0) + break; + + if (lookup_type && lookup_type != M_DATALKPTYPE) { + /* Inner header VNI mask */ + vnix = (((data2 & F_DATAVIDH2) | + G_DATAVIDH1(data2)) << 16) | G_VIDL(val); + } else + vnix = 0; + + if (tcamx & tcamy) + continue; + tcamxy2valmask(tcamx, tcamy, addr, &mask); + + mtx_lock(&sc->reg_lock); + if (hw_off_limits(sc)) + rc = ENXIO; + else { + if (chip_rev(sc) == 0) { + cls_lo = t4_read_reg(sc, MPS_CLS_SRAM_L(i)); + cls_hi = t4_read_reg(sc, MPS_CLS_SRAM_H(i)); + } else { + t4_write_reg(sc, A_MPS_CLS_SRAM_H, + V_SRAMWRN(0) | V_SRAMINDEX(i)); + cls_lo = t4_read_reg(sc, A_MPS_CLS_SRAM_L); + cls_hi = t4_read_reg(sc, A_MPS_CLS_SRAM_H); + } + } + mtx_unlock(&sc->reg_lock); + if (rc != 0) + break; + + if (lookup_type && lookup_type != M_DATALKPTYPE) { + sbuf_printf(sb, "\n%3u %02x:%02x:%02x:%02x:%02x:%02x " + "%012jx %06x %06x - - %3c" + " I %4x %3c %#x%4u%4d", i, addr[0], + addr[1], addr[2], addr[3], addr[4], addr[5], + (uintmax_t)mask, vniy, vnix, dip_hit ? 'Y' : 'N', + port_num, cls_lo & F_T6_SRAM_VLD ? 'Y' : 'N', + G_PORTMAP(cls_hi), G_T6_PF(cls_lo), + cls_lo & F_T6_VF_VALID ? G_T6_VF(cls_lo) : -1); + } else { + sbuf_printf(sb, "\n%3u %02x:%02x:%02x:%02x:%02x:%02x " + "%012jx - - ", i, addr[0], addr[1], + addr[2], addr[3], addr[4], addr[5], + (uintmax_t)mask); + + if (vlan_vld) + sbuf_printf(sb, "%4u Y ", ivlan); + else + sbuf_printf(sb, " - N "); + + sbuf_printf(sb, "- %3c %4x %3c %#x%4u%4d", + lookup_type ? 'I' : 'O', port_num, + cls_lo & F_T6_SRAM_VLD ? 'Y' : 'N', + G_PORTMAP(cls_hi), G_T6_PF(cls_lo), + cls_lo & F_T6_VF_VALID ? G_T6_VF(cls_lo) : -1); + } + + if (cls_lo & F_T6_REPLICATE) { + struct fw_ldst_cmd ldst_cmd; + + memset(&ldst_cmd, 0, sizeof(ldst_cmd)); + ldst_cmd.op_to_addrspace = + htobe32(V_FW_CMD_OP(FW_LDST_CMD) | + F_FW_CMD_REQUEST | F_FW_CMD_READ | + V_FW_LDST_CMD_ADDRSPACE(FW_LDST_ADDRSPC_MPS)); + ldst_cmd.cycles_to_len16 = htobe32(FW_LEN16(ldst_cmd)); + ldst_cmd.u.mps.rplc.fid_idx = + htobe16(V_FW_LDST_CMD_FID(FW_LDST_MPS_RPLC) | + V_FW_LDST_CMD_IDX(i)); + + rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, + "t6mps"); + if (rc) + break; + if (hw_off_limits(sc)) + rc = ENXIO; + else + rc = -t4_wr_mbox(sc, sc->mbox, &ldst_cmd, + sizeof(ldst_cmd), &ldst_cmd); + end_synchronized_op(sc, 0); + if (rc != 0) + break; + else { + sbuf_printf(sb, " %08x %08x %08x %08x" + " %08x %08x %08x %08x", + be32toh(ldst_cmd.u.mps.rplc.rplc255_224), + be32toh(ldst_cmd.u.mps.rplc.rplc223_192), + be32toh(ldst_cmd.u.mps.rplc.rplc191_160), + be32toh(ldst_cmd.u.mps.rplc.rplc159_128), + be32toh(ldst_cmd.u.mps.rplc.rplc127_96), + be32toh(ldst_cmd.u.mps.rplc.rplc95_64), + be32toh(ldst_cmd.u.mps.rplc.rplc63_32), + be32toh(ldst_cmd.u.mps.rplc.rplc31_0)); + } + } else + sbuf_printf(sb, "%72s", ""); + + sbuf_printf(sb, "%4u%3u%3u%3u %#x", + G_T6_SRAM_PRIO0(cls_lo), G_T6_SRAM_PRIO1(cls_lo), + G_T6_SRAM_PRIO2(cls_lo), G_T6_SRAM_PRIO3(cls_lo), + (cls_lo >> S_T6_MULTILISTEN0) & 0xf); + } + + if (rc) + (void) sbuf_finish(sb); + else + rc = sbuf_finish(sb); + sbuf_delete(sb); + + return (rc); +} + static int sysctl_path_mtus(SYSCTL_HANDLER_ARGS) { From nobody Mon Sep 29 14:37:48 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 4cb3gx1fR2z68K26; Mon, 29 Sep 2025 14:37: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 4cb3gw5QW7z3sV1; Mon, 29 Sep 2025 14:37:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BxjT8qy0TLbWZEAixz8AEMZtLpGua2oM/rXdmudhdzY=; b=K1LJNwEWccUtK5DEsTpVXTaxAwNVyEQ1Yg0JrIgGuRZIOIPeJkcLZZK79y4wVGwFZQsQtC UQR6zneqV77TBvywjIWLpjALi6C7HwmOcwcXjcGlMRTd70CGa9mT46CfOm0zJJyxHgCYX6 XJQGyCaZL0KODKfcs/ld9aN3AXReTOE91/3vPT7Qd69qalDFg5t9ZE69xToNjUAS/nnc4P Xm0WkKnShVCEEBgqxRgyofU3jfVIjXaISHBuu7akhY6piwMFVEjlS6uejqOctn8K1fHZkn hA44mpba0ygdSjfVWOodlU6JW90n2mGz9vVWLoTwW1k6O8ZOmOT+RqsknjiXmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BxjT8qy0TLbWZEAixz8AEMZtLpGua2oM/rXdmudhdzY=; b=O1NKO6ZxbMXrdXV2Nf0TqqvvmKxarqtEV0CHk+E9feO9wlGk1jv/edAcmXL/QVLTYTwIg7 sFcZRyZru/hQ9un90xgei/DUL1AvFrPA19yMEVMhYAuaXbnuDSPTYBnpzZILYXOmeBsFv3 unM1oMrZETvD6Vxdl/0Yc/4WsOmhr9P0LRboedmInErrfE5OB81+Eiq/YJN8EJdjSgh1Zf 73Nv8r701/foTaYYpAYznrUb/+0Ct0v+rBlq36tukdJkQk/jQ8KfnSipyf9sGXyQLaW5eG iv8h7yBvherMAQcd0Gbfctq5SeIazLwcI/5njKmtne4fDtATCPRAa/6XQ11VDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759156668; a=rsa-sha256; cv=none; b=PB+yAROmMXmDfgixEgGV3ysNc9nJmZD31MwuDtSeMtwqNBxQw4fKgBNN3B3M2sMQkZkDgY Ua0d7ahjPOnH6mbymegiwAIAuab2BpIUZatPGEbaP1SShDTDYe4sWuLZ0Kb+8EO1wsIJku Cu60HJ9LQlogwUtFJMEN7p2fbMGIGcXaUq7220ai3yYkku3TfDLjFKaVvwogLJ4ABxYJxj HW7aiMsvgl4vhjMu5kocn7kTVuDIE08QVOTLb6bFH7wn93AV6zMUGyxPNilsd/KttTl4di qncnaCgTCmJIyKUxKWqsK4UbUkizymXS1x6L0yybikaIk6WOMP83qpiPqW019A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb3gw51fpz182V; Mon, 29 Sep 2025 14:37:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TEbmWY017740; Mon, 29 Sep 2025 14:37:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TEbm5f017737; Mon, 29 Sep 2025 14:37:48 GMT (envelope-from git) Date: Mon, 29 Sep 2025 14:37:48 GMT Message-Id: <202509291437.58TEbm5f017737@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: fc7f27c31eee - main - cxgbe(4): Include T7 PMRX cache stats in the sysctl that shows PM stats 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fc7f27c31eee81c46f20991343799f017aa79948 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=fc7f27c31eee81c46f20991343799f017aa79948 commit fc7f27c31eee81c46f20991343799f017aa79948 Author: Navdeep Parhar AuthorDate: 2025-09-29 08:32:08 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 14:25:59 +0000 cxgbe(4): Include T7 PMRX cache stats in the sysctl that shows PM stats MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_main.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index db7ed38b1f9f..f4366c9d6093 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -10976,6 +10976,7 @@ sysctl_pm_stats(SYSCTL_HANDLER_ARGS) int rc, i; uint32_t tx_cnt[MAX_PM_NSTATS], rx_cnt[MAX_PM_NSTATS]; uint64_t tx_cyc[MAX_PM_NSTATS], rx_cyc[MAX_PM_NSTATS]; + uint32_t stats[T7_PM_RX_CACHE_NSTATS]; static const char *tx_stats[MAX_PM_NSTATS] = { "Read:", "Write bypass:", "Write mem:", "Bypass + mem:", "Tx FIFO wait", NULL, "Tx latency" @@ -10992,12 +10993,14 @@ sysctl_pm_stats(SYSCTL_HANDLER_ARGS) else { t4_pmtx_get_stats(sc, tx_cnt, tx_cyc); t4_pmrx_get_stats(sc, rx_cnt, rx_cyc); + if (chip_id(sc) >= CHELSIO_T7) + t4_pmrx_cache_get_stats(sc, stats); } mtx_unlock(&sc->reg_lock); if (rc != 0) return (rc); - sb = sbuf_new_for_sysctl(NULL, NULL, 256, req); + sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); @@ -11032,6 +11035,61 @@ sysctl_pm_stats(SYSCTL_HANDLER_ARGS) rx_cyc[i]); } + if (chip_id(sc) >= CHELSIO_T7) { + i = 0; + sbuf_printf(sb, "\n\nPM RX Cache Stats\n"); + sbuf_printf(sb, "%-40s %u\n", "ReqWrite", stats[i++]); + sbuf_printf(sb, "%-40s %u\n", "ReqReadInv", stats[i++]); + sbuf_printf(sb, "%-40s %u\n", "ReqReadNoInv", stats[i++]); + sbuf_printf(sb, "%-40s %u\n", "Write Split Request", + stats[i++]); + sbuf_printf(sb, "%-40s %u\n", + "Normal Read Split (Read Invalidate)", stats[i++]); + sbuf_printf(sb, "%-40s %u\n", + "Feedback Read Split (Read NoInvalidate)", + stats[i++]); + sbuf_printf(sb, "%-40s %u\n", "Write Hit", stats[i++]); + sbuf_printf(sb, "%-40s %u\n", "Normal Read Hit", + stats[i++]); + sbuf_printf(sb, "%-40s %u\n", "Feedback Read Hit", + stats[i++]); + sbuf_printf(sb, "%-40s %u\n", "Normal Read Hit Full Avail", + stats[i++]); + sbuf_printf(sb, "%-40s %u\n", "Normal Read Hit Full UnAvail", + stats[i++]); + sbuf_printf(sb, "%-40s %u\n", + "Normal Read Hit Partial Avail", + stats[i++]); + sbuf_printf(sb, "%-40s %u\n", "FB Read Hit Full Avail", + stats[i++]); + sbuf_printf(sb, "%-40s %u\n", "FB Read Hit Full UnAvail", + stats[i++]); + sbuf_printf(sb, "%-40s %u\n", "FB Read Hit Partial Avail", + stats[i++]); + sbuf_printf(sb, "%-40s %u\n", "Normal Read Full Free", + stats[i++]); + sbuf_printf(sb, "%-40s %u\n", + "Normal Read Part-avail Mul-Regions", + stats[i++]); + sbuf_printf(sb, "%-40s %u\n", + "FB Read Part-avail Mul-Regions", + stats[i++]); + sbuf_printf(sb, "%-40s %u\n", "Write Miss FL Used", + stats[i++]); + sbuf_printf(sb, "%-40s %u\n", "Write Miss LRU Used", + stats[i++]); + sbuf_printf(sb, "%-40s %u\n", + "Write Miss LRU-Multiple Evict", stats[i++]); + sbuf_printf(sb, "%-40s %u\n", + "Write Hit Increasing Islands", stats[i++]); + sbuf_printf(sb, "%-40s %u\n", + "Normal Read Island Read split", stats[i++]); + sbuf_printf(sb, "%-40s %u\n", "Write Overflow Eviction", + stats[i++]); + sbuf_printf(sb, "%-40s %u", "Read Overflow Eviction", + stats[i++]); + } + rc = sbuf_finish(sb); sbuf_delete(sb); From nobody Mon Sep 29 14:37:49 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cb3gy1F4Dz68KRx; Mon, 29 Sep 2025 14:37:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb3gx71SBz3sp9; Mon, 29 Sep 2025 14:37:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MHaxaLYVlVC9REAJK8hsvahtsz6qnrrdYlKPS7oDqI4=; b=JG80nkhEd2QLZJnRWSx2tW3JBgea49ceWZxKV/NNhYb2Mn9wCdMu2jeXaXwUrLLATZvAKX 39n6siJAK1eNABK1HJfz7HCP0msSX5cC4POF4lOaDPcOWD8qPPNh0XKF61lUFbHOx6a9sv M7npr+e2FOxXBFQW/22hqGqOuJsZh0B5yAFHc7OcLv4sW7slDLme95yl9tQtgo3jYb8NCV XucSjAmqnuf6op0DqMv8aKIZ+X2UrWYcqHqvgSRCrE0q0z+Kz1LjuX3dfWmVE+8D2fyyVt ogMJ3YNATYi58uALWienX/6ueFNcWKsJynDJy2wrDcbA1aBFbmtnKeOvdTVeFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MHaxaLYVlVC9REAJK8hsvahtsz6qnrrdYlKPS7oDqI4=; b=XQTtYaXLGLhFFeUj5z2GELGaALUtzkCJOB9TzzJSW9ApHt0FpcgbnT2WFbsOabttobwinc UhBFlMyuBwF00zsHLJ01+wQ1oum88lN9eug5MHjhZXtyq4PCYGUI+vz3VXGKtsp0e/FU/Z ZCX0GibswQELtZ41IdCJs2wErhRpJB4QPfqoicOi+yLJnVejrSvMpDTqEV67pHAXDkyE4u Kc6zp9dryDFV0UsGybPF/8k3TzeBCmVTM7W+WC3SOirKZb+RrNlFSPkM6/CVYc+mK3a1FS YGovFkOW/fOKerpCIMUDiXlCSbtHvpZfkHIwmN8DlygbNypg1QI0Tcf7DQz0yw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759156670; a=rsa-sha256; cv=none; b=FsToAZx8bl8oJ6qJHuYLh8G/1a1DTq8VV6diEIeCXQFNZoBR3fJuQyIflMe9CS+wqaHsVe Eai6pDdCT0xHel1wRjg2Qy/f6/6vxixKSnw32AByy+tE1wTFe8vtzppqVuwUiyyyJEIdOf 8G7gEncFkxBK3qg+ASP7M078IldbnwAm8JuuCKTSMjA4nvE1MjJnzgy7knfvcg8cM9AfmJ oV+X+auUy5j/cQah4XhJH1bBKpAPfII6VKHNZmBuhkod3PsEgyg8x4m1OzlbnlJ/5/o+b7 F1lJYMstQZ+nn3SC+0hAzqzgWPOUsHxVr5yKZ7OvtwxXhKwhKYW46sWtTdxZ/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb3gx694sz18gS; Mon, 29 Sep 2025 14:37:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TEbneb017773; Mon, 29 Sep 2025 14:37:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TEbnWt017770; Mon, 29 Sep 2025 14:37:49 GMT (envelope-from git) Date: Mon, 29 Sep 2025 14:37:49 GMT Message-Id: <202509291437.58TEbnWt017770@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: d4fb12583adc - main - cxgbe(4): T7's SGE context has 4 more bytes 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d4fb12583adc0690ae102c47d08598b3dbb06384 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=d4fb12583adc0690ae102c47d08598b3dbb06384 commit d4fb12583adc0690ae102c47d08598b3dbb06384 Author: Navdeep Parhar AuthorDate: 2025-09-29 08:36:34 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 14:25:59 +0000 cxgbe(4): T7's SGE context has 4 more bytes MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_ioctl.h | 9 +++++++++ sys/dev/cxgbe/t4_main.c | 34 +++++++++++++++++++++++----------- 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/sys/dev/cxgbe/t4_ioctl.h b/sys/dev/cxgbe/t4_ioctl.h index ba9a17dbaddf..4698986c0a0e 100644 --- a/sys/dev/cxgbe/t4_ioctl.h +++ b/sys/dev/cxgbe/t4_ioctl.h @@ -64,6 +64,7 @@ enum { T4_SET_FILTER_MASK, /* set filter mask (hashfilter mode) */ T4_HOLD_CLIP_ADDR, /* add ref on an IP in the CLIP */ T4_RELEASE_CLIP_ADDR, /* remove ref from an IP in the CLIP */ + T4_GET_SGE_CTXT, /* get SGE context for a queue */ }; struct t4_reg { @@ -322,6 +323,7 @@ struct t4_sched_queue { }; #define T4_SGE_CONTEXT_SIZE 24 +#define T7_SGE_CONTEXT_SIZE 28 enum { SGE_CONTEXT_EGRESS, SGE_CONTEXT_INGRESS, @@ -335,6 +337,12 @@ struct t4_sge_context { uint32_t data[T4_SGE_CONTEXT_SIZE / 4]; }; +struct t4_sge_ctxt { + uint32_t mem_id; + uint32_t cid; + uint32_t data[T7_SGE_CONTEXT_SIZE / 4]; +}; + struct t4_mem_range { uint32_t addr; uint32_t len; @@ -444,4 +452,5 @@ struct t4_clip_addr { #define CHELSIO_T4_SET_FILTER_MASK _IOW('f', T4_SET_FILTER_MASK, uint32_t) #define CHELSIO_T4_HOLD_CLIP_ADDR _IOW('f', T4_HOLD_CLIP_ADDR, struct t4_clip_addr) #define CHELSIO_T4_RELEASE_CLIP_ADDR _IOW('f', T4_RELEASE_CLIP_ADDR, struct t4_clip_addr) +#define CHELSIO_T4_GET_SGE_CTXT _IOWR('f', T4_GET_SGE_CTXT, struct t4_sge_ctxt) #endif diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index f4366c9d6093..47d72175b3fa 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -895,7 +895,7 @@ static int sysctl_tp_backoff(SYSCTL_HANDLER_ARGS); static int sysctl_holdoff_tmr_idx_ofld(SYSCTL_HANDLER_ARGS); static int sysctl_holdoff_pktc_idx_ofld(SYSCTL_HANDLER_ARGS); #endif -static int get_sge_context(struct adapter *, struct t4_sge_context *); +static int get_sge_context(struct adapter *, int, uint32_t, int, uint32_t *); static int load_fw(struct adapter *, struct t4_data *); static int load_cfg(struct adapter *, struct t4_data *); static int load_boot(struct adapter *, struct t4_bootrom *); @@ -12100,15 +12100,17 @@ sysctl_holdoff_pktc_idx_ofld(SYSCTL_HANDLER_ARGS) #endif static int -get_sge_context(struct adapter *sc, struct t4_sge_context *cntxt) +get_sge_context(struct adapter *sc, int mem_id, uint32_t cid, int len, + uint32_t *data) { int rc; - if (cntxt->cid > M_CTXTQID) + if (len < sc->chip_params->sge_ctxt_size) + return (ENOBUFS); + if (cid > M_CTXTQID) return (EINVAL); - - if (cntxt->mem_id != CTXT_EGRESS && cntxt->mem_id != CTXT_INGRESS && - cntxt->mem_id != CTXT_FLM && cntxt->mem_id != CTXT_CNM) + if (mem_id != CTXT_EGRESS && mem_id != CTXT_INGRESS && + mem_id != CTXT_FLM && mem_id != CTXT_CNM) return (EINVAL); rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4ctxt"); @@ -12121,8 +12123,7 @@ get_sge_context(struct adapter *sc, struct t4_sge_context *cntxt) } if (sc->flags & FW_OK) { - rc = -t4_sge_ctxt_rd(sc, sc->mbox, cntxt->cid, cntxt->mem_id, - &cntxt->data[0]); + rc = -t4_sge_ctxt_rd(sc, sc->mbox, cid, mem_id, data); if (rc == 0) goto done; } @@ -12131,7 +12132,7 @@ get_sge_context(struct adapter *sc, struct t4_sge_context *cntxt) * Read via firmware failed or wasn't even attempted. Read directly via * the backdoor. */ - rc = -t4_sge_ctxt_rd_bd(sc, cntxt->cid, cntxt->mem_id, &cntxt->data[0]); + rc = -t4_sge_ctxt_rd_bd(sc, cid, mem_id, data); done: end_synchronized_op(sc, 0); return (rc); @@ -12895,9 +12896,13 @@ t4_ioctl(struct cdev *dev, unsigned long cmd, caddr_t data, int fflag, case CHELSIO_T4_DEL_FILTER: rc = del_filter(sc, (struct t4_filter *)data); break; - case CHELSIO_T4_GET_SGE_CONTEXT: - rc = get_sge_context(sc, (struct t4_sge_context *)data); + case CHELSIO_T4_GET_SGE_CONTEXT: { + struct t4_sge_context *ctxt = (struct t4_sge_context *)data; + + rc = get_sge_context(sc, ctxt->mem_id, ctxt->cid, + sizeof(ctxt->data), &ctxt->data[0]); break; + } case CHELSIO_T4_LOAD_FW: rc = load_fw(sc, (struct t4_data *)data); break; @@ -12943,6 +12948,13 @@ t4_ioctl(struct cdev *dev, unsigned long cmd, caddr_t data, int fflag, case CHELSIO_T4_RELEASE_CLIP_ADDR: rc = release_clip_addr(sc, (struct t4_clip_addr *)data); break; + case CHELSIO_T4_GET_SGE_CTXT: { + struct t4_sge_ctxt *ctxt = (struct t4_sge_ctxt *)data; + + rc = get_sge_context(sc, ctxt->mem_id, ctxt->cid, + sizeof(ctxt->data), &ctxt->data[0]); + break; + } default: rc = ENOTTY; } From nobody Mon Sep 29 14:37:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cb3gz2Vt0z68KX3; Mon, 29 Sep 2025 14:37:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb3gz0yRPz3sd9; Mon, 29 Sep 2025 14:37:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Apz+NkQjpT8y0BGF4GJNWMcZcafu3j7DcHLVg2WsFPg=; b=X9f+tDCjdSQ6cKQyoO6GaIMJWb3QCQX74ZZ7MXbFYTincoaQxwisHSE7pXoMMCqz1rM2fO Nel7KQUuWEgWUMFdRkqqRyAHzVizzm2ECWPuvnc47wOwcvRBsnPHSQcyxuFKJ6uX3XBSdB nZ4P3RrnKy8Efnq03I2CBOa8BImfga4DoEwjftdjjfCjtG+kecjR0IapKPEcpMlDmdSmJE j0nMwMY3rnMTzkKY1KKv8lJ54c6L/23JezI1QPkNxgTC6m1S3yUwhKMUYJq5bSq38bqwhe rfnOWLsgEaAqyNqS/fdAdd53KWplu20Dgyi4BiN8hBpkmtxo+3uZOvsurFMM5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Apz+NkQjpT8y0BGF4GJNWMcZcafu3j7DcHLVg2WsFPg=; b=ww6+Tpikuh2XuyJtuKoG3XIVFIql71a5tRVwgaBdMEWmeM9WidmR8gsrZl08DYCGlInWKA xrflvUPOqrtP5oS5v63hrx/iN6KVodtcDUvJp0z/KiFBV66i8LhFYqM75L8iBaJIJFvwdG N/35ERaIb1LFjzmQQG01n0boxiAbe40bnbf+LOnagU2BLW6tFZ2vLkHRoJwMcoBk0G1wM9 rSevNZE3Kunzu+bcl/LcuBLjYo9eQSuEzY6NCRp56xAufqTiBILxZMArzkif7ZY+R2Mq0Q x57uADrH/gntEF9ZJj6nTaRUKXVd0N7piRQWf+RijUncohgOvQO8xFDsDlpXTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759156671; a=rsa-sha256; cv=none; b=YT8jxe2+VbYdyZqix7Z/rP1nPYQGGC4VkF2MkWG8luD6jJOYLRPmMErUOS9o50agtcOloN nzUQ3nxxSJWaTSJZjVo1F0bD/8boRHyDTP2+kxPEZCTDsCoveE+HrLUD+RVCfSS5Ke33Kk D68nk/ENj6/od6fl+kBtVarCHaHdps1KmMRPYqPoy48aF4tN+k4qdFrZETzTwBDe0PSdTL UFPXSlgnIqcqiQ3OhALc7eiIcE6rEnvF4H7HS9qKMSHUUOYSf4LmhU+mMCOrlIJAh5E90z 7oTt4XISdPvZpef26BZzon5psZ0n/K97x3IoN//AKO+SlV2q59EIWbnPmorxsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb3gz0GgXz182W; Mon, 29 Sep 2025 14:37:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TEbo9U017812; Mon, 29 Sep 2025 14:37:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TEboqj017809; Mon, 29 Sep 2025 14:37:50 GMT (envelope-from git) Date: Mon, 29 Sep 2025 14:37:50 GMT Message-Id: <202509291437.58TEboqj017809@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: c392b5a9e44b - main - cxgbe(4): Congestion manager context settings for T7 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c392b5a9e44b9c8a0173a4e2c1fb87ee88f4aa3f Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=c392b5a9e44b9c8a0173a4e2c1fb87ee88f4aa3f commit c392b5a9e44b9c8a0173a4e2c1fb87ee88f4aa3f Author: Navdeep Parhar AuthorDate: 2025-09-29 08:43:28 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 14:25:59 +0000 cxgbe(4): Congestion manager context settings for T7 MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_netmap.c | 7 +++++-- sys/dev/cxgbe/t4_sge.c | 27 +++++++++++++++++++-------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/sys/dev/cxgbe/t4_netmap.c b/sys/dev/cxgbe/t4_netmap.c index ddd7d974aa48..12aaca6ee77a 100644 --- a/sys/dev/cxgbe/t4_netmap.c +++ b/sys/dev/cxgbe/t4_netmap.c @@ -276,7 +276,7 @@ free_nm_txq(struct vi_info *vi, struct sge_nm_txq *nm_txq) static int alloc_nm_rxq_hwq(struct vi_info *vi, struct sge_nm_rxq *nm_rxq) { - int rc, cntxt_id; + int rc, cntxt_id, cong_map; __be32 v; struct adapter *sc = vi->adapter; struct port_info *pi = vi->pi; @@ -284,7 +284,6 @@ alloc_nm_rxq_hwq(struct vi_info *vi, struct sge_nm_rxq *nm_rxq) struct netmap_adapter *na = NA(vi->ifp); struct fw_iq_cmd c; const int cong_drop = nm_cong_drop; - const int cong_map = pi->rx_e_chan_map; MPASS(na != NULL); MPASS(nm_rxq->iq_desc != NULL); @@ -321,6 +320,10 @@ alloc_nm_rxq_hwq(struct vi_info *vi, struct sge_nm_rxq *nm_rxq) c.iqsize = htobe16(vi->qsize_rxq); c.iqaddr = htobe64(nm_rxq->iq_ba); if (cong_drop != -1) { + if (chip_id(sc) >= CHELSIO_T7) + cong_map = 1 << pi->hw_port; + else + cong_map = pi->rx_e_chan_map; c.iqns_to_fl0congen = htobe32(F_FW_IQ_CMD_IQFLINTCONGEN | V_FW_IQ_CMD_FL0CNGCHMAP(cong_map) | F_FW_IQ_CMD_FL0CONGCIF | F_FW_IQ_CMD_FL0CONGEN); diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index 4aa2b7236979..ce506f6c9192 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -3586,7 +3586,13 @@ alloc_iq_fl_hwq(struct vi_info *vi, struct sge_iq *iq, struct sge_fl *fl) c.iqaddr = htobe64(iq->ba); c.iqns_to_fl0congen = htobe32(V_FW_IQ_CMD_IQTYPE(iq->qtype)); if (iq->cong_drop != -1) { - cong_map = iq->qtype == IQ_ETH ? pi->rx_e_chan_map : 0; + if (iq->qtype == IQ_ETH) { + if (chip_id(sc) >= CHELSIO_T7) + cong_map = 1 << pi->hw_port; + else + cong_map = pi->rx_e_chan_map; + } else + cong_map = 0; c.iqns_to_fl0congen |= htobe32(F_FW_IQ_CMD_IQFLINTCONGEN); } @@ -3939,14 +3945,19 @@ t4_sge_set_conm_context(struct adapter *sc, int cntxt_id, int cong_drop, param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DMAQ) | V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DMAQ_CONM_CTXT) | V_FW_PARAMS_PARAM_YZ(cntxt_id); - val = V_CONMCTXT_CNGTPMODE(cong_mode); - if (cong_mode == X_CONMCTXT_CNGTPMODE_CHANNEL || - cong_mode == X_CONMCTXT_CNGTPMODE_BOTH) { - for (i = 0, ch_map = 0; i < 4; i++) { - if (cong_map & (1 << i)) - ch_map |= 1 << (i << cng_ch_bits_log); + if (chip_id(sc) >= CHELSIO_T7) { + val = V_T7_DMAQ_CONM_CTXT_CNGTPMODE(cong_mode) | + V_T7_DMAQ_CONM_CTXT_CH_VEC(cong_map); + } else { + val = V_CONMCTXT_CNGTPMODE(cong_mode); + if (cong_mode == X_CONMCTXT_CNGTPMODE_CHANNEL || + cong_mode == X_CONMCTXT_CNGTPMODE_BOTH) { + for (i = 0, ch_map = 0; i < 4; i++) { + if (cong_map & (1 << i)) + ch_map |= 1 << (i << cng_ch_bits_log); + } + val |= V_CONMCTXT_CNGCHMAP(ch_map); } - val |= V_CONMCTXT_CNGCHMAP(ch_map); } rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, ¶m, &val); if (rc != 0) { From nobody Mon Sep 29 14:37:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cb3h10P52z68K70; Mon, 29 Sep 2025 14:37: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 4cb3h01n0pz3spm; Mon, 29 Sep 2025 14:37:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5lQR/DMJKeu5aD2+n1mXHHnRLD5ToMrEh44X4t0696o=; b=GTRdve6cIjHwE+EWfbkV8Wgv0DtDtsXAXBp8ZF11pkCyO15S2zh8HVwIipMRPDro3xyClJ ZYGYlNpPs3dW3WJWbWFr6VzjG5zKsyeifDcLZ2z/M3kfTv4I9VdY90m8w7NfY2Wgkqszsy Zh09r0zuuevgbZSTO5/zJKyiXAY2OW+qECvvhV5AVdSFwiLE/bxn6em2s9aqmA4VMOaaXs wcfCKNHcO7rlyHO6g+bGwaaE99B6M2leMB+ERhQ2H514IcZ6i3Sv88u8+39OKSn4y4s3F7 kqZIol9JDSLePPiNPrHEFeEZ+XxYO0R28P3GIy49T3aslNRZ07C5YpDt3/I5/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156672; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5lQR/DMJKeu5aD2+n1mXHHnRLD5ToMrEh44X4t0696o=; b=vabBL2RNuOwF5J7YbmviWYm5OZndvctPPNiiBjIBlS5OUSI8Q9+XZQqd3KP5Ybel6rZ7lq 3Gd7f5HVmIq4jaKGDBtsgRLXw9Ogas7nLR6J0jPbdWUU30WPSYYz4OfHnRZjii426wBsL2 wABNurSWcXhYYdJSSVYlgc/zKyq99C9dWrr1wJHV7lIx8DT531i68gxczm3DeodAVybPT8 wSsi5OcS4GozL3C2hJL1U3mTy/1RJ6VsliaYMw49bqOHIA11nwTxSBVSw/9GSGA5Xn+UDv LBUt4iK/FNhnM5TFMKD8Mqg5zq2SKH0y7QHhDwq32EzhT805Qh28mXhL3OOc9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759156672; a=rsa-sha256; cv=none; b=MNHR1c0Ci+UsEUNFM0YyUrE6wVUsbvTReW00M0q7485ygMgFxn9RJC8BTrWUAJX/iJzueI 2koO3yJZ9i1+LhSCQMSs8o3zHLYdqqzMOuIQee7CEYgmk3hLxq9uho2RkPg/40F+wS2O// 0pznipBOqSl9VtNuWMy7e9pasBV0u+APO0ZSXp9Fydsr+B7igrs981LZvLH3sAqT/MqXPU gMPAeByK5OkNrDKvoWMR0fWBANqUTM8z9219SF9KrPpLPewnhdji+1CqVfn7qSykWKgxBj UA9oQRAUjHuFTpj01IuCmZzpby5TuZiL14/eJI/N+kscQYl5t6hGQfD0X/oyFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb3h01HZnz182X; Mon, 29 Sep 2025 14:37:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TEbqjP017848; Mon, 29 Sep 2025 14:37:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TEbqmx017845; Mon, 29 Sep 2025 14:37:52 GMT (envelope-from git) Date: Mon, 29 Sep 2025 14:37:52 GMT Message-Id: <202509291437.58TEbqmx017845@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: cfcf1394efb9 - main - cxgbe(4): Recognize the new capabilities reported by T7 firmwares 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cfcf1394efb90ff05cd8acce7805145ff93ecac5 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=cfcf1394efb90ff05cd8acce7805145ff93ecac5 commit cfcf1394efb90ff05cd8acce7805145ff93ecac5 Author: Navdeep Parhar AuthorDate: 2025-09-29 08:51:20 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 14:26:00 +0000 cxgbe(4): Recognize the new capabilities reported by T7 firmwares MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/adapter.h | 1 + sys/dev/cxgbe/t4_main.c | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index 5abe0de7664f..36c3b48cccbd 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -990,6 +990,7 @@ struct adapter { uint16_t nbmcaps; uint16_t linkcaps; uint16_t switchcaps; + uint16_t nvmecaps; uint16_t niccaps; uint16_t toecaps; uint16_t rdmacaps; diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 47d72175b3fa..f094fd8f1de9 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -609,6 +609,10 @@ static int t4_switchcaps_allowed = FW_CAPS_CONFIG_SWITCH_INGRESS | SYSCTL_INT(_hw_cxgbe, OID_AUTO, switchcaps_allowed, CTLFLAG_RDTUN, &t4_switchcaps_allowed, 0, "Default switch capabilities"); +static int t4_nvmecaps_allowed = 0; +SYSCTL_INT(_hw_cxgbe, OID_AUTO, nvmecaps_allowed, CTLFLAG_RDTUN, + &t4_nvmecaps_allowed, 0, "Default NVMe capabilities"); + #ifdef RATELIMIT static int t4_niccaps_allowed = FW_CAPS_CONFIG_NIC | FW_CAPS_CONFIG_NIC_HASHFILTER | FW_CAPS_CONFIG_NIC_ETHOFLD; @@ -2254,6 +2258,7 @@ struct adapter_pre_reset_state { uint16_t nbmcaps; uint16_t linkcaps; uint16_t switchcaps; + uint16_t nvmecaps; uint16_t niccaps; uint16_t toecaps; uint16_t rdmacaps; @@ -2285,6 +2290,7 @@ save_caps_and_params(struct adapter *sc, struct adapter_pre_reset_state *o) o->nbmcaps = sc->nbmcaps; o->linkcaps = sc->linkcaps; o->switchcaps = sc->switchcaps; + o->nvmecaps = sc->nvmecaps; o->niccaps = sc->niccaps; o->toecaps = sc->toecaps; o->rdmacaps = sc->rdmacaps; @@ -2323,6 +2329,7 @@ compare_caps_and_params(struct adapter *sc, struct adapter_pre_reset_state *o) COMPARE_CAPS(nbm); COMPARE_CAPS(link); COMPARE_CAPS(switch); + COMPARE_CAPS(nvme); COMPARE_CAPS(nic); COMPARE_CAPS(toe); COMPARE_CAPS(rdma); @@ -5232,6 +5239,7 @@ struct caps_allowed { uint16_t nbmcaps; uint16_t linkcaps; uint16_t switchcaps; + uint16_t nvmecaps; uint16_t niccaps; uint16_t toecaps; uint16_t rdmacaps; @@ -5335,6 +5343,7 @@ apply_cfg_and_initialize(struct adapter *sc, char *cfg_file, LIMIT_CAPS(nbm); LIMIT_CAPS(link); LIMIT_CAPS(switch); + LIMIT_CAPS(nvme); LIMIT_CAPS(nic); LIMIT_CAPS(toe); LIMIT_CAPS(rdma); @@ -5400,6 +5409,7 @@ partition_resources(struct adapter *sc) COPY_CAPS(nbm); COPY_CAPS(link); COPY_CAPS(switch); + COPY_CAPS(nvme); COPY_CAPS(nic); COPY_CAPS(toe); COPY_CAPS(rdma); @@ -5726,6 +5736,7 @@ get_params__post_init(struct adapter *sc) READ_CAPS(nbmcaps); READ_CAPS(linkcaps); READ_CAPS(switchcaps); + READ_CAPS(nvmecaps); READ_CAPS(niccaps); READ_CAPS(toecaps); READ_CAPS(rdmacaps); @@ -7612,17 +7623,18 @@ static char *caps_decoder[] = { "\20\001INGRESS\002EGRESS", /* 2: switch */ "\20\001NIC\002VM\003IDS\004UM\005UM_ISGL" /* 3: NIC */ "\006HASHFILTER\007ETHOFLD", - "\20\001TOE", /* 4: TOE */ - "\20\001RDDP\002RDMAC", /* 5: RDMA */ + "\20\001TOE\002SENDPATH", /* 4: TOE */ + "\20\001RDDP\002RDMAC\003ROCEv2", /* 5: RDMA */ "\20\001INITIATOR_PDU\002TARGET_PDU" /* 6: iSCSI */ "\003INITIATOR_CNXOFLD\004TARGET_CNXOFLD" "\005INITIATOR_SSNOFLD\006TARGET_SSNOFLD" "\007T10DIF" "\010INITIATOR_CMDOFLD\011TARGET_CMDOFLD", "\20\001LOOKASIDE\002TLSKEYS\003IPSEC_INLINE" /* 7: Crypto */ - "\004TLS_HW", + "\004TLS_HW,\005TOE_IPSEC", "\20\001INITIATOR\002TARGET\003CTRL_OFLD" /* 8: FCoE */ "\004PO_INITIATOR\005PO_TARGET", + "\20\001NVMe_TCP", /* 9: NVMe */ }; void @@ -7727,6 +7739,7 @@ t4_sysctls(struct adapter *sc) SYSCTL_CAP(nbmcaps, 0, "NBM"); SYSCTL_CAP(linkcaps, 1, "link"); SYSCTL_CAP(switchcaps, 2, "switch"); + SYSCTL_CAP(nvmecaps, 9, "NVMe"); SYSCTL_CAP(niccaps, 3, "NIC"); SYSCTL_CAP(toecaps, 4, "TCP offload"); SYSCTL_CAP(rdmacaps, 5, "RDMA"); From nobody Mon Sep 29 14:37: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 4cb3h14W2bz68KS8; Mon, 29 Sep 2025 14:37: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 4cb3h135nnz3sdk; Mon, 29 Sep 2025 14:37:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kt+/YYUNVeYQ0Bk41bQBGL8BZgdY3u9I9TiXDX8cV98=; b=v6xHfAhup+uIbJ5x1x0ayKge3gIidJjkeQMc4AcsHPUk1OSP/2S2gKLf1OzlGvucI3xE30 CoxiVKzKwXdFMILVOndOMGl6owtragjCwtx75uATga84jP0p86yEuxqKU5aYwLBWoPxmOd r4nvCxCSRWkcdQoEeWd5uStndF/ffSizXkCpPDEvrnlJIo6t/gKTG1EV0OPYfeTxgOac/+ vXt2f45rDIj3/FyKeFNtgTNZea0plqPhhlgEtkhQ3tS13YYNJaMUP6SJC039ZrwovZoLcI 1wVUgzg7jZMmc99QvT5kYBQ0f5b9+I55LvYguAjpBZ5ybxA9WXhg/A0ountPuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156673; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kt+/YYUNVeYQ0Bk41bQBGL8BZgdY3u9I9TiXDX8cV98=; b=DDE66y66z0vNW2DU/HOp6E42BZnOHTMkTStmy4kvcynDo5WPqfYUF3XK4pHzXQ3bMjiJio vd78OMcZlthpAhmjLAmNcdv7g6alaj1IgozWatJSbhRzMaqxJmD64gjo4AqPuimUB3pqdG tX4rRDSxZ6NoiB1QodbOvEcZJd9SBWEsVu/kEYqML3hCozu+bRabFXpetMYSjeMNAMmVNZ IL5R10j4dN5dvG9u5zOqwmzOP/8KmvIHqpFwCjM4Rat65p18vm/cJbT36QjR6x3Hi5o+bC i68gM02P9rMJGDmATHamVsVuQMULkkCU65tprTDf0m7F7p56N9nMsVF2HxMN7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759156673; a=rsa-sha256; cv=none; b=anQ24HdIWrIXE2U9+5C345AxHGFSNTbQy0rEkQr8mkkl67a2e4VWAGJjaWVf8+QltmhIDr 3XTFaG2lWA7bfYGy4OWbF7NpgmDlZVb0v/AlBlMfZJJMH0dQ5nFRp7N/zJRPnQ07F1bs8l vd1gerFQIN/CKKeTha1jIf06dH0oqyzzBRNi2yHmUff71v5OkLpWAEOpwCeG53UeVoVd72 HTXnbWD8z92P54xCr8bpWKX7SdtORc5Y3dkByDUP89g8mwzmrb3Ch17fKmLtKoIDsRRvqI juyqiw4LBuNo3bhya/naMbH5XT0T3KvdcMyf80CQL4epnQtsns093/fBqII9bQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb3h124G0z182Y; Mon, 29 Sep 2025 14:37:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TEbrbl017887; Mon, 29 Sep 2025 14:37:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TEbrGX017884; Mon, 29 Sep 2025 14:37:53 GMT (envelope-from git) Date: Mon, 29 Sep 2025 14:37:53 GMT Message-Id: <202509291437.58TEbrGX017884@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: a16423b7a48c - main - cxgbe(4): T7 LB mode support 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a16423b7a48c61370d4eeb542e3ca6c1b4c9579a Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=a16423b7a48c61370d4eeb542e3ca6c1b4c9579a commit a16423b7a48c61370d4eeb542e3ca6c1b4c9579a Author: Navdeep Parhar AuthorDate: 2025-09-29 09:03:02 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 14:26:00 +0000 cxgbe(4): T7 LB mode support This is the new mode where multiple internal channels are used to service 1 port. LB = Load Balancing. * Ask for tx_tpchmap from the firmware and update sc->chan_map. * Statistics for a port should include all its channels. MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/cudbg/cudbg_lib.c | 1 + sys/dev/cxgbe/t4_main.c | 236 +++++++++++++++++++++++++--------------- 2 files changed, 148 insertions(+), 89 deletions(-) diff --git a/sys/dev/cxgbe/cudbg/cudbg_lib.c b/sys/dev/cxgbe/cudbg/cudbg_lib.c index 068e16e27a13..f0273349263a 100644 --- a/sys/dev/cxgbe/cudbg/cudbg_lib.c +++ b/sys/dev/cxgbe/cudbg/cudbg_lib.c @@ -1294,6 +1294,7 @@ static int collect_macstats(struct cudbg_init *pdbg_init, mac_stats_buff->port_count = n; for (i = 0; i < mac_stats_buff->port_count; i++) + /* Incorrect, should use hport instead of i */ t4_get_port_stats(padap, i, &mac_stats_buff->stats[i]); rc = write_compression_hdr(&scratch_buff, dbg_buff); diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index f094fd8f1de9..588d59418a71 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -852,6 +852,7 @@ static int sysctl_requested_fec(SYSCTL_HANDLER_ARGS); static int sysctl_module_fec(SYSCTL_HANDLER_ARGS); static int sysctl_autoneg(SYSCTL_HANDLER_ARGS); static int sysctl_force_fec(SYSCTL_HANDLER_ARGS); +static int sysctl_handle_t4_portstat64(SYSCTL_HANDLER_ARGS); static int sysctl_handle_t4_reg64(SYSCTL_HANDLER_ARGS); static int sysctl_temperature(SYSCTL_HANDLER_ARGS); static int sysctl_vdd(SYSCTL_HANDLER_ARGS); @@ -1515,7 +1516,8 @@ t4_attach(device_t dev) snprintf(pi->lockname, sizeof(pi->lockname), "%sp%d", device_get_nameunit(dev), i); mtx_init(&pi->pi_lock, pi->lockname, 0, MTX_DEF); - sc->chan_map[pi->tx_chan] = i; + for (j = 0; j < sc->params.tp.lb_nchan; j++) + sc->chan_map[pi->tx_chan + j] = i; sc->port_map[pi->hw_port] = i; /* @@ -1526,10 +1528,8 @@ t4_attach(device_t dev) */ if (is_t6(sc)) pi->fcs_reg = -1; - else { - pi->fcs_reg = t4_port_reg(sc, pi->tx_chan, - A_MPS_PORT_STAT_RX_PORT_CRC_ERROR_L); - } + else + pi->fcs_reg = A_MPS_PORT_STAT_RX_PORT_CRC_ERROR_L; pi->fcs_base = 0; /* All VIs on this port share this media. */ @@ -5665,6 +5665,14 @@ get_params__post_init(struct adapter *sc) else sc->params.tp_ch_map = UINT32_MAX; /* Not a legal value. */ + param[0] = FW_PARAM_DEV(TX_TPCHMAP); + val[0] = 0; + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 1, param, val); + if (rc == 0) + sc->params.tx_tp_ch_map = val[0]; + else + sc->params.tx_tp_ch_map = UINT32_MAX; /* Not a legal value. */ + /* * Determine whether the firmware supports the filter2 work request. */ @@ -7576,7 +7584,7 @@ cxgbe_refresh_stats(struct vi_info *vi) pi = vi->pi; sc = vi->adapter; tnl_cong_drops = 0; - t4_get_port_stats(sc, pi->port_id, &pi->stats); + t4_get_port_stats(sc, pi->hw_port, &pi->stats); chan_map = pi->rx_e_chan_map; while (chan_map) { i = ffs(chan_map) - 1; @@ -8366,86 +8374,112 @@ cxgbe_sysctls(struct port_info *pi) &pi->tx_parse_error, 0, "# of tx packets with invalid length or # of segments"); -#define T4_REGSTAT(name, stat, desc) \ - SYSCTL_ADD_OID(ctx, children, OID_AUTO, #name, \ - CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, \ - t4_port_reg(sc, pi->tx_chan, A_MPS_PORT_STAT_##stat##_L), \ - sysctl_handle_t4_reg64, "QU", desc) - -/* We get these from port_stats and they may be stale by up to 1s */ -#define T4_PORTSTAT(name, desc) \ - SYSCTL_ADD_UQUAD(ctx, children, OID_AUTO, #name, CTLFLAG_RD, \ - &pi->stats.name, desc) - - T4_REGSTAT(tx_octets, TX_PORT_BYTES, "# of octets in good frames"); - T4_REGSTAT(tx_frames, TX_PORT_FRAMES, "total # of good frames"); - T4_REGSTAT(tx_bcast_frames, TX_PORT_BCAST, "# of broadcast frames"); - T4_REGSTAT(tx_mcast_frames, TX_PORT_MCAST, "# of multicast frames"); - T4_REGSTAT(tx_ucast_frames, TX_PORT_UCAST, "# of unicast frames"); - T4_REGSTAT(tx_error_frames, TX_PORT_ERROR, "# of error frames"); - T4_REGSTAT(tx_frames_64, TX_PORT_64B, "# of tx frames in this range"); - T4_REGSTAT(tx_frames_65_127, TX_PORT_65B_127B, "# of tx frames in this range"); - T4_REGSTAT(tx_frames_128_255, TX_PORT_128B_255B, "# of tx frames in this range"); - T4_REGSTAT(tx_frames_256_511, TX_PORT_256B_511B, "# of tx frames in this range"); - T4_REGSTAT(tx_frames_512_1023, TX_PORT_512B_1023B, "# of tx frames in this range"); - T4_REGSTAT(tx_frames_1024_1518, TX_PORT_1024B_1518B, "# of tx frames in this range"); - T4_REGSTAT(tx_frames_1519_max, TX_PORT_1519B_MAX, "# of tx frames in this range"); - T4_REGSTAT(tx_drop, TX_PORT_DROP, "# of dropped tx frames"); - T4_REGSTAT(tx_pause, TX_PORT_PAUSE, "# of pause frames transmitted"); - T4_REGSTAT(tx_ppp0, TX_PORT_PPP0, "# of PPP prio 0 frames transmitted"); - T4_REGSTAT(tx_ppp1, TX_PORT_PPP1, "# of PPP prio 1 frames transmitted"); - T4_REGSTAT(tx_ppp2, TX_PORT_PPP2, "# of PPP prio 2 frames transmitted"); - T4_REGSTAT(tx_ppp3, TX_PORT_PPP3, "# of PPP prio 3 frames transmitted"); - T4_REGSTAT(tx_ppp4, TX_PORT_PPP4, "# of PPP prio 4 frames transmitted"); - T4_REGSTAT(tx_ppp5, TX_PORT_PPP5, "# of PPP prio 5 frames transmitted"); - T4_REGSTAT(tx_ppp6, TX_PORT_PPP6, "# of PPP prio 6 frames transmitted"); - T4_REGSTAT(tx_ppp7, TX_PORT_PPP7, "# of PPP prio 7 frames transmitted"); - - T4_REGSTAT(rx_octets, RX_PORT_BYTES, "# of octets in good frames"); - T4_REGSTAT(rx_frames, RX_PORT_FRAMES, "total # of good frames"); - T4_REGSTAT(rx_bcast_frames, RX_PORT_BCAST, "# of broadcast frames"); - T4_REGSTAT(rx_mcast_frames, RX_PORT_MCAST, "# of multicast frames"); - T4_REGSTAT(rx_ucast_frames, RX_PORT_UCAST, "# of unicast frames"); - T4_REGSTAT(rx_too_long, RX_PORT_MTU_ERROR, "# of frames exceeding MTU"); - T4_REGSTAT(rx_jabber, RX_PORT_MTU_CRC_ERROR, "# of jabber frames"); +#define T4_LBSTAT(name, stat, desc) do { \ + if (sc->params.tp.lb_mode) { \ + SYSCTL_ADD_OID(ctx, children, OID_AUTO, #name, \ + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_MPSAFE, pi, \ + A_MPS_PORT_STAT_##stat##_L, \ + sysctl_handle_t4_portstat64, "QU", desc); \ + } else { \ + SYSCTL_ADD_OID(ctx, children, OID_AUTO, #name, \ + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, \ + t4_port_reg(sc, pi->tx_chan, A_MPS_PORT_STAT_##stat##_L), \ + sysctl_handle_t4_reg64, "QU", desc); \ + } \ +} while (0) + + T4_LBSTAT(tx_octets, TX_PORT_BYTES, "# of octets in good frames"); + T4_LBSTAT(tx_frames, TX_PORT_FRAMES, "total # of good frames"); + T4_LBSTAT(tx_bcast_frames, TX_PORT_BCAST, "# of broadcast frames"); + T4_LBSTAT(tx_mcast_frames, TX_PORT_MCAST, "# of multicast frames"); + T4_LBSTAT(tx_ucast_frames, TX_PORT_UCAST, "# of unicast frames"); + T4_LBSTAT(tx_error_frames, TX_PORT_ERROR, "# of error frames"); + T4_LBSTAT(tx_frames_64, TX_PORT_64B, "# of tx frames in this range"); + T4_LBSTAT(tx_frames_65_127, TX_PORT_65B_127B, "# of tx frames in this range"); + T4_LBSTAT(tx_frames_128_255, TX_PORT_128B_255B, "# of tx frames in this range"); + T4_LBSTAT(tx_frames_256_511, TX_PORT_256B_511B, "# of tx frames in this range"); + T4_LBSTAT(tx_frames_512_1023, TX_PORT_512B_1023B, "# of tx frames in this range"); + T4_LBSTAT(tx_frames_1024_1518, TX_PORT_1024B_1518B, "# of tx frames in this range"); + T4_LBSTAT(tx_frames_1519_max, TX_PORT_1519B_MAX, "# of tx frames in this range"); + T4_LBSTAT(tx_drop, TX_PORT_DROP, "# of dropped tx frames"); + T4_LBSTAT(tx_pause, TX_PORT_PAUSE, "# of pause frames transmitted"); + T4_LBSTAT(tx_ppp0, TX_PORT_PPP0, "# of PPP prio 0 frames transmitted"); + T4_LBSTAT(tx_ppp1, TX_PORT_PPP1, "# of PPP prio 1 frames transmitted"); + T4_LBSTAT(tx_ppp2, TX_PORT_PPP2, "# of PPP prio 2 frames transmitted"); + T4_LBSTAT(tx_ppp3, TX_PORT_PPP3, "# of PPP prio 3 frames transmitted"); + T4_LBSTAT(tx_ppp4, TX_PORT_PPP4, "# of PPP prio 4 frames transmitted"); + T4_LBSTAT(tx_ppp5, TX_PORT_PPP5, "# of PPP prio 5 frames transmitted"); + T4_LBSTAT(tx_ppp6, TX_PORT_PPP6, "# of PPP prio 6 frames transmitted"); + T4_LBSTAT(tx_ppp7, TX_PORT_PPP7, "# of PPP prio 7 frames transmitted"); + + T4_LBSTAT(rx_octets, RX_PORT_BYTES, "# of octets in good frames"); + T4_LBSTAT(rx_frames, RX_PORT_FRAMES, "total # of good frames"); + T4_LBSTAT(rx_bcast_frames, RX_PORT_BCAST, "# of broadcast frames"); + T4_LBSTAT(rx_mcast_frames, RX_PORT_MCAST, "# of multicast frames"); + T4_LBSTAT(rx_ucast_frames, RX_PORT_UCAST, "# of unicast frames"); + T4_LBSTAT(rx_too_long, RX_PORT_MTU_ERROR, "# of frames exceeding MTU"); + T4_LBSTAT(rx_jabber, RX_PORT_MTU_CRC_ERROR, "# of jabber frames"); if (is_t6(sc)) { - T4_PORTSTAT(rx_fcs_err, + /* Read from port_stats and may be stale by up to 1s */ + SYSCTL_ADD_UQUAD(ctx, children, OID_AUTO, "rx_fcs_err", + CTLFLAG_RD, &pi->stats.rx_fcs_err, "# of frames received with bad FCS since last link up"); } else { - T4_REGSTAT(rx_fcs_err, RX_PORT_CRC_ERROR, + T4_LBSTAT(rx_fcs_err, RX_PORT_CRC_ERROR, "# of frames received with bad FCS"); } - T4_REGSTAT(rx_len_err, RX_PORT_LEN_ERROR, "# of frames received with length error"); - T4_REGSTAT(rx_symbol_err, RX_PORT_SYM_ERROR, "symbol errors"); - T4_REGSTAT(rx_runt, RX_PORT_LESS_64B, "# of short frames received"); - T4_REGSTAT(rx_frames_64, RX_PORT_64B, "# of rx frames in this range"); - T4_REGSTAT(rx_frames_65_127, RX_PORT_65B_127B, "# of rx frames in this range"); - T4_REGSTAT(rx_frames_128_255, RX_PORT_128B_255B, "# of rx frames in this range"); - T4_REGSTAT(rx_frames_256_511, RX_PORT_256B_511B, "# of rx frames in this range"); - T4_REGSTAT(rx_frames_512_1023, RX_PORT_512B_1023B, "# of rx frames in this range"); - T4_REGSTAT(rx_frames_1024_1518, RX_PORT_1024B_1518B, "# of rx frames in this range"); - T4_REGSTAT(rx_frames_1519_max, RX_PORT_1519B_MAX, "# of rx frames in this range"); - T4_REGSTAT(rx_pause, RX_PORT_PAUSE, "# of pause frames received"); - T4_REGSTAT(rx_ppp0, RX_PORT_PPP0, "# of PPP prio 0 frames received"); - T4_REGSTAT(rx_ppp1, RX_PORT_PPP1, "# of PPP prio 1 frames received"); - T4_REGSTAT(rx_ppp2, RX_PORT_PPP2, "# of PPP prio 2 frames received"); - T4_REGSTAT(rx_ppp3, RX_PORT_PPP3, "# of PPP prio 3 frames received"); - T4_REGSTAT(rx_ppp4, RX_PORT_PPP4, "# of PPP prio 4 frames received"); - T4_REGSTAT(rx_ppp5, RX_PORT_PPP5, "# of PPP prio 5 frames received"); - T4_REGSTAT(rx_ppp6, RX_PORT_PPP6, "# of PPP prio 6 frames received"); - T4_REGSTAT(rx_ppp7, RX_PORT_PPP7, "# of PPP prio 7 frames received"); - - T4_PORTSTAT(rx_ovflow0, "# drops due to buffer-group 0 overflows"); - T4_PORTSTAT(rx_ovflow1, "# drops due to buffer-group 1 overflows"); - T4_PORTSTAT(rx_ovflow2, "# drops due to buffer-group 2 overflows"); - T4_PORTSTAT(rx_ovflow3, "# drops due to buffer-group 3 overflows"); - T4_PORTSTAT(rx_trunc0, "# of buffer-group 0 truncated packets"); - T4_PORTSTAT(rx_trunc1, "# of buffer-group 1 truncated packets"); - T4_PORTSTAT(rx_trunc2, "# of buffer-group 2 truncated packets"); - T4_PORTSTAT(rx_trunc3, "# of buffer-group 3 truncated packets"); + T4_LBSTAT(rx_len_err, RX_PORT_LEN_ERROR, "# of frames received with length error"); + T4_LBSTAT(rx_symbol_err, RX_PORT_SYM_ERROR, "symbol errors"); + T4_LBSTAT(rx_runt, RX_PORT_LESS_64B, "# of short frames received"); + T4_LBSTAT(rx_frames_64, RX_PORT_64B, "# of rx frames in this range"); + T4_LBSTAT(rx_frames_65_127, RX_PORT_65B_127B, "# of rx frames in this range"); + T4_LBSTAT(rx_frames_128_255, RX_PORT_128B_255B, "# of rx frames in this range"); + T4_LBSTAT(rx_frames_256_511, RX_PORT_256B_511B, "# of rx frames in this range"); + T4_LBSTAT(rx_frames_512_1023, RX_PORT_512B_1023B, "# of rx frames in this range"); + T4_LBSTAT(rx_frames_1024_1518, RX_PORT_1024B_1518B, "# of rx frames in this range"); + T4_LBSTAT(rx_frames_1519_max, RX_PORT_1519B_MAX, "# of rx frames in this range"); + T4_LBSTAT(rx_pause, RX_PORT_PAUSE, "# of pause frames received"); + T4_LBSTAT(rx_ppp0, RX_PORT_PPP0, "# of PPP prio 0 frames received"); + T4_LBSTAT(rx_ppp1, RX_PORT_PPP1, "# of PPP prio 1 frames received"); + T4_LBSTAT(rx_ppp2, RX_PORT_PPP2, "# of PPP prio 2 frames received"); + T4_LBSTAT(rx_ppp3, RX_PORT_PPP3, "# of PPP prio 3 frames received"); + T4_LBSTAT(rx_ppp4, RX_PORT_PPP4, "# of PPP prio 4 frames received"); + T4_LBSTAT(rx_ppp5, RX_PORT_PPP5, "# of PPP prio 5 frames received"); + T4_LBSTAT(rx_ppp6, RX_PORT_PPP6, "# of PPP prio 6 frames received"); + T4_LBSTAT(rx_ppp7, RX_PORT_PPP7, "# of PPP prio 7 frames received"); +#undef T4_LBSTAT + +#define T4_REGSTAT(name, stat, desc) do { \ + SYSCTL_ADD_OID(ctx, children, OID_AUTO, #name, \ + CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, \ + A_MPS_STAT_##stat##_L, sysctl_handle_t4_reg64, "QU", desc); \ +} while (0) + if (pi->mps_bg_map & 1) { + T4_REGSTAT(rx_ovflow0, RX_BG_0_MAC_DROP_FRAME, + "# drops due to buffer-group 0 overflows"); + T4_REGSTAT(rx_trunc0, RX_BG_0_MAC_TRUNC_FRAME, + "# of buffer-group 0 truncated packets"); + } + if (pi->mps_bg_map & 2) { + T4_REGSTAT(rx_ovflow1, RX_BG_1_MAC_DROP_FRAME, + "# drops due to buffer-group 1 overflows"); + T4_REGSTAT(rx_trunc1, RX_BG_1_MAC_TRUNC_FRAME, + "# of buffer-group 1 truncated packets"); + } + if (pi->mps_bg_map & 4) { + T4_REGSTAT(rx_ovflow2, RX_BG_2_MAC_DROP_FRAME, + "# drops due to buffer-group 2 overflows"); + T4_REGSTAT(rx_trunc2, RX_BG_2_MAC_TRUNC_FRAME, + "# of buffer-group 2 truncated packets"); + } + if (pi->mps_bg_map & 8) { + T4_REGSTAT(rx_ovflow3, RX_BG_3_MAC_DROP_FRAME, + "# drops due to buffer-group 3 overflows"); + T4_REGSTAT(rx_trunc3, RX_BG_3_MAC_TRUNC_FRAME, + "# of buffer-group 3 truncated packets"); + } #undef T4_REGSTAT -#undef T4_PORTSTAT } static int @@ -9048,6 +9082,31 @@ sysctl_handle_t4_reg64(SYSCTL_HANDLER_ARGS) return (rc); } +static int +sysctl_handle_t4_portstat64(SYSCTL_HANDLER_ARGS) +{ + struct port_info *pi = arg1; + struct adapter *sc = pi->adapter; + int rc, i, reg = arg2; + uint64_t val; + + mtx_lock(&sc->reg_lock); + if (hw_off_limits(sc)) + rc = ENXIO; + else { + val = 0; + for (i = 0; i < sc->params.tp.lb_nchan; i++) { + val += t4_read_reg64(sc, + t4_port_reg(sc, pi->tx_chan + i, reg)); + } + rc = 0; + } + mtx_unlock(&sc->reg_lock); + if (rc == 0) + rc = sysctl_handle_64(oidp, &val, 0, req); + return (rc); +} + static int sysctl_temperature(SYSCTL_HANDLER_ARGS) { @@ -12553,10 +12612,11 @@ clear_stats(struct adapter *sc, u_int port_id) mtx_lock(&sc->reg_lock); if (!hw_off_limits(sc)) { /* MAC stats */ - t4_clr_port_stats(sc, pi->tx_chan); + t4_clr_port_stats(sc, pi->hw_port); if (is_t6(sc)) { if (pi->fcs_reg != -1) - pi->fcs_base = t4_read_reg64(sc, pi->fcs_reg); + pi->fcs_base = t4_read_reg64(sc, + t4_port_reg(sc, pi->tx_chan, pi->fcs_reg)); else pi->stats.rx_fcs_err = 0; } @@ -12769,14 +12829,12 @@ t4_os_link_changed(struct port_info *pi) if (is_t6(sc)) { if (lc->link_ok) { if (lc->speed > 25000 || - (lc->speed == 25000 && lc->fec == FEC_RS)) { - pi->fcs_reg = T5_PORT_REG(pi->tx_chan, - A_MAC_PORT_AFRAMECHECKSEQUENCEERRORS); - } else { - pi->fcs_reg = T5_PORT_REG(pi->tx_chan, - A_MAC_PORT_MTIP_1G10G_RX_CRCERRORS); - } - pi->fcs_base = t4_read_reg64(sc, pi->fcs_reg); + (lc->speed == 25000 && lc->fec == FEC_RS)) + pi->fcs_reg = A_MAC_PORT_AFRAMECHECKSEQUENCEERRORS; + else + pi->fcs_reg = A_MAC_PORT_MTIP_1G10G_RX_CRCERRORS; + pi->fcs_base = t4_read_reg64(sc, + t4_port_reg(sc, pi->tx_chan, pi->fcs_reg)); pi->stats.rx_fcs_err = 0; } else { pi->fcs_reg = -1; From nobody Mon Sep 29 14:37: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 4cb3h25tJWz68KZb; Mon, 29 Sep 2025 14:37:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb3h22ys5z3sh8; Mon, 29 Sep 2025 14:37:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6N+vIOIG5EMemd9MCLNUM/1JXKZVDaJHGvXAsAtGySg=; b=Q6fxaFggvEVogG0CYryIt+49HtN+aNzFglHHW2gaw4WctJ6PvBBLYzU1nSZz3hkrh8UHL+ bl6Lq5/EZz/jZ9PmF5TBYnihksZRAqeeS8Uyg7PeEmfH+F8P8DDYvSDAHn9yY8U7NqVDhv wWumV2FurTw6DMaDGfHokh24WNFj37Y28JRyP0+uElsaYp40mArUQMK3viA0DVjFagDXY9 2yBWx5UgOqwxSZ5INwd92L1ty/1Wte16ZnWCMt1R+KGKl18cAhhhzfV48lkgPEsBlO7PGo IywTEv8G4ukEXYzSvbcJppK1KAh8zkWqvEunX6j0Pp5c3obf4PE++w3j44ihLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156674; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6N+vIOIG5EMemd9MCLNUM/1JXKZVDaJHGvXAsAtGySg=; b=CjNW+QfLn7BIZh5bpGcpGcgxfDyZcJARr6ceiWS3XZeUZEWgRkbeiP6JExBZNNUXmUueh4 05ChnTMF6bmVCWp3DwKyNKbPCzWVALggd3wyACmpcllQvYE+r4PIhyA6+6Cx4ufnN2vDDc mjU1sDpzjWDmzeBUBglAsivXwCZaCcm90GOWB/+BwpJghvhIAgyv9IKAVanLMci7DqP5Zl DTJsr+fm3sxtSf8EuiOyBuxma2j95GDUvEhMAf1ajVGr5RH6TA0R6zoNX+v/5ZntP3HsES XBR+qwzbbroPZHieNewuxTmnJgCBG+EO4aHfuZOgoSVdr6+M+YzhCKYjyKc4Qw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759156674; a=rsa-sha256; cv=none; b=xLzBArl/coidhRj3DQoFQzPt7pUDhvsc2ADv9IMY7qC0oH11x/wXEmFQ1IjCIQpRRKAlPU 8KoqbPjDe8dJ6NVX9eR4Rk/wI4q9PT/zU8j4khgBkqqcURCqI3lI/q3jGgg12I53BJG9TU 9ZB03kqQkW5CaYhirCYzCAUoHRy67Tnf6hmnUwMUOIw4uF7BbkWbVjsl/EX99fhRxN2vJF gKQbaonHLCq2/P6NNFOmdw06CDCogBXtFM3LZHhlRY5vfyztGAzMd7QKCt5QnKPoNx/mS8 utgqjexf3UX9lXRaQLMXQVVcjU4BkWs4JEaB2bROdAtShDSCR0IvqLMpIlsCKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb3h22TQ8z18cR; Mon, 29 Sep 2025 14:37:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TEbsPs017934; Mon, 29 Sep 2025 14:37:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TEbsq5017927; Mon, 29 Sep 2025 14:37:54 GMT (envelope-from git) Date: Mon, 29 Sep 2025 14:37:54 GMT Message-Id: <202509291437.58TEbsq5017927@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 3d76a4feeead - main - cxgbe(4): Updates for T7 CIM multicore operation 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3d76a4feeead2bbda7792a3c4ca534fd4c159721 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=3d76a4feeead2bbda7792a3c4ca534fd4c159721 commit 3d76a4feeead2bbda7792a3c4ca534fd4c159721 Author: Navdeep Parhar AuthorDate: 2025-09-29 09:17:51 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 14:26:00 +0000 cxgbe(4): Updates for T7 CIM multicore operation T7 has a multicore microprocessor and each core has its own queue configuration, inbound/outbound queues, and logic analyzer. A work request involving a tid can only be handled on queues where (tid & tid_qid_sel_mask) == (eq->cntxt_id & tid_qid_sel_mask). MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/adapter.h | 14 +- sys/dev/cxgbe/t4_main.c | 553 ++++++++++++++++++++++++++++++----------- sys/dev/cxgbe/t4_netmap.c | 10 +- sys/dev/cxgbe/t4_sge.c | 77 ++++-- sys/dev/cxgbe/tom/t4_connect.c | 6 + sys/dev/cxgbe/tom/t4_listen.c | 2 + sys/dev/cxgbe/tom/t4_tom.c | 31 ++- sys/dev/cxgbe/tom/t4_tom.h | 2 + 8 files changed, 515 insertions(+), 180 deletions(-) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index 36c3b48cccbd..e3906f8058a7 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -1,8 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2011 Chelsio Communications, Inc. - * All rights reserved. + * Copyright (c) 2011, 2025 Chelsio Communications. * Written by: Navdeep Parhar * * Redistribution and use in source and binary forms, with or without @@ -770,6 +769,16 @@ struct sge_ofld_txq { counter_u64_t tx_toe_tls_octets; } __aligned(CACHE_LINE_SIZE); +static inline int +ofld_txq_group(int val, int mask) +{ + const uint32_t ngroup = 1 << bitcount32(mask); + const int mshift = ffs(mask) - 1; + const uint32_t gmask = ngroup - 1; + + return (val >> mshift & gmask); +} + #define INVALID_NM_RXQ_CNTXT_ID ((uint16_t)(-1)) struct sge_nm_rxq { /* Items used by the driver rx ithread are in this cacheline. */ @@ -837,6 +846,7 @@ struct sge_nm_txq { } __aligned(CACHE_LINE_SIZE); struct sge { + int nctrlq; /* total # of control queues */ int nrxq; /* total # of Ethernet rx queues */ int ntxq; /* total # of Ethernet tx queues */ int nofldrxq; /* total # of TOE rx queues */ diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 588d59418a71..df6314ca6e18 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -1,8 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2011 Chelsio Communications, Inc. - * All rights reserved. + * Copyright (c) 2011, 2025 Chelsio Communications. * Written by: Navdeep Parhar * * Redistribution and use in source and binary forms, with or without @@ -859,11 +858,13 @@ static int sysctl_vdd(SYSCTL_HANDLER_ARGS); static int sysctl_reset_sensor(SYSCTL_HANDLER_ARGS); static int sysctl_loadavg(SYSCTL_HANDLER_ARGS); static int sysctl_cctrl(SYSCTL_HANDLER_ARGS); -static int sysctl_cim_ibq_obq(SYSCTL_HANDLER_ARGS); +static int sysctl_cim_ibq(SYSCTL_HANDLER_ARGS); +static int sysctl_cim_obq(SYSCTL_HANDLER_ARGS); static int sysctl_cim_la(SYSCTL_HANDLER_ARGS); static int sysctl_cim_ma_la(SYSCTL_HANDLER_ARGS); static int sysctl_cim_pif_la(SYSCTL_HANDLER_ARGS); static int sysctl_cim_qcfg(SYSCTL_HANDLER_ARGS); +static int sysctl_cim_qcfg_t7(SYSCTL_HANDLER_ARGS); static int sysctl_cpl_stats(SYSCTL_HANDLER_ARGS); static int sysctl_ddp_stats(SYSCTL_HANDLER_ARGS); static int sysctl_tid_stats(SYSCTL_HANDLER_ARGS); @@ -1569,6 +1570,7 @@ t4_attach(device_t dev) sc->intr_count = iaq.nirq; s = &sc->sge; + s->nctrlq = max(sc->params.nports, sc->params.ncores); s->nrxq = nports * iaq.nrxq; s->ntxq = nports * iaq.ntxq; if (num_vis > 1) { @@ -1623,7 +1625,7 @@ t4_attach(device_t dev) MPASS(s->niq <= s->iqmap_sz); MPASS(s->neq <= s->eqmap_sz); - s->ctrlq = malloc(nports * sizeof(struct sge_wrq), M_CXGBE, + s->ctrlq = malloc(s->nctrlq * sizeof(struct sge_wrq), M_CXGBE, M_ZERO | M_WAITOK); s->rxq = malloc(s->nrxq * sizeof(struct sge_rxq), M_CXGBE, M_ZERO | M_WAITOK); @@ -4564,8 +4566,27 @@ calculate_iaq(struct adapter *sc, struct intrs_and_queues *iaq, int itype, iaq->nrxq_vi = t4_nrxq_vi; #if defined(TCP_OFFLOAD) || defined(RATELIMIT) if (is_offload(sc) || is_ethoffload(sc)) { - iaq->nofldtxq = t4_nofldtxq; - iaq->nofldtxq_vi = t4_nofldtxq_vi; + if (sc->params.tid_qid_sel_mask == 0) { + iaq->nofldtxq = t4_nofldtxq; + iaq->nofldtxq_vi = t4_nofldtxq_vi; + } else { + iaq->nofldtxq = roundup(t4_nofldtxq, sc->params.ncores); + iaq->nofldtxq_vi = roundup(t4_nofldtxq_vi, + sc->params.ncores); + if (iaq->nofldtxq != t4_nofldtxq) + device_printf(sc->dev, + "nofldtxq updated (%d -> %d) for correct" + " operation with %d firmware cores.\n", + t4_nofldtxq, iaq->nofldtxq, + sc->params.ncores); + if (iaq->num_vis > 1 && + iaq->nofldtxq_vi != t4_nofldtxq_vi) + device_printf(sc->dev, + "nofldtxq_vi updated (%d -> %d) for correct" + " operation with %d firmware cores.\n", + t4_nofldtxq_vi, iaq->nofldtxq_vi, + sc->params.ncores); + } } #endif #ifdef TCP_OFFLOAD @@ -4666,6 +4687,10 @@ calculate_iaq(struct adapter *sc, struct intrs_and_queues *iaq, int itype, if (iaq->nofldrxq > 0) { iaq->nofldrxq = 1; iaq->nofldtxq = 1; + if (sc->params.tid_qid_sel_mask == 0) + iaq->nofldtxq = 1; + else + iaq->nofldtxq = sc->params.ncores; } iaq->nnmtxq = 0; iaq->nnmrxq = 0; @@ -4678,9 +4703,10 @@ done: MPASS(iaq->nirq > 0); MPASS(iaq->nrxq > 0); MPASS(iaq->ntxq > 0); - if (itype == INTR_MSI) { + if (itype == INTR_MSI) MPASS(powerof2(iaq->nirq)); - } + if (sc->params.tid_qid_sel_mask != 0) + MPASS(iaq->nofldtxq % sc->params.ncores == 0); } static int @@ -5640,6 +5666,14 @@ get_params__post_init(struct adapter *sc) } } + if (sc->params.ncores > 1) { + MPASS(chip_id(sc) >= CHELSIO_T7); + + param[0] = FW_PARAM_DEV(TID_QID_SEL_MASK); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 1, param, val); + sc->params.tid_qid_sel_mask = rc == 0 ? val[0] : 0; + } + /* * The parameters that follow may not be available on all firmwares. We * query them individually rather than in a compound query because old @@ -7622,6 +7656,150 @@ vi_tick(void *arg) callout_schedule(&vi->tick, hz); } +/* CIM inbound queues */ +static const char *t4_ibq[CIM_NUM_IBQ] = { + "ibq_tp0", "ibq_tp1", "ibq_ulp", "ibq_sge0", "ibq_sge1", "ibq_ncsi" +}; +static const char *t7_ibq[CIM_NUM_IBQ_T7] = { + "ibq_tp0", "ibq_tp1", "ibq_tp2", "ibq_tp3", "ibq_ulp", "ibq_sge0", + "ibq_sge1", "ibq_ncsi", NULL, "ibq_ipc1", "ibq_ipc2", "ibq_ipc3", + "ibq_ipc4", "ibq_ipc5", "ibq_ipc6", "ibq_ipc7" +}; +static const char *t7_ibq_sec[] = { + "ibq_tp0", "ibq_tp1", "ibq_tp2", "ibq_tp3", "ibq_ulp", "ibq_sge0", + NULL, NULL, NULL, "ibq_ipc0" +}; + +/* CIM outbound queues */ +static const char *t4_obq[CIM_NUM_OBQ_T5] = { + "obq_ulp0", "obq_ulp1", "obq_ulp2", "obq_ulp3", "obq_sge", "obq_ncsi", + "obq_sge_rx_q0", "obq_sge_rx_q1" /* These two are T5/T6 only */ +}; +static const char *t7_obq[CIM_NUM_OBQ_T7] = { + "obq_ulp0", "obq_ulp1", "obq_ulp2", "obq_ulp3", "obq_sge", "obq_ncsi", + "obq_sge_rx_q0", NULL, NULL, "obq_ipc1", "obq_ipc2", "obq_ipc3", + "obq_ipc4", "obq_ipc5", "obq_ipc6", "obq_ipc7" +}; +static const char *t7_obq_sec[] = { + "obq_ulp0", "obq_ulp1", "obq_ulp2", "obq_ulp3", "obq_sge", NULL, + "obq_sge_rx_q0", NULL, NULL, "obq_ipc0" +}; + +static void +cim_sysctls(struct adapter *sc, struct sysctl_ctx_list *ctx, + struct sysctl_oid_list *c0) +{ + struct sysctl_oid *oid; + struct sysctl_oid_list *children1; + int i, j, qcount; + char s[16]; + const char **qname; + + oid = SYSCTL_ADD_NODE(ctx, c0, OID_AUTO, "cim", + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "CIM block"); + c0 = SYSCTL_CHILDREN(oid); + + SYSCTL_ADD_U8(ctx, c0, OID_AUTO, "ncores", CTLFLAG_RD, NULL, + sc->params.ncores, "# of active CIM cores"); + + for (i = 0; i < sc->params.ncores; i++) { + snprintf(s, sizeof(s), "%u", i); + oid = SYSCTL_ADD_NODE(ctx, c0, OID_AUTO, s, + CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "CIM core"); + children1 = SYSCTL_CHILDREN(oid); + + /* + * CTLFLAG_SKIP because the misc.devlog sysctl already displays + * the log for all cores. Use this sysctl to get the log for a + * particular core only. + */ + SYSCTL_ADD_PROC(ctx, children1, OID_AUTO, "devlog", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE | CTLFLAG_SKIP, + sc, i, sysctl_devlog, "A", "firmware's device log"); + + SYSCTL_ADD_PROC(ctx, children1, OID_AUTO, "loadavg", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, i, + sysctl_loadavg, "A", + "microprocessor load averages (select firmwares only)"); + + SYSCTL_ADD_PROC(ctx, children1, OID_AUTO, "qcfg", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, i, + chip_id(sc) > CHELSIO_T6 ? sysctl_cim_qcfg_t7 : sysctl_cim_qcfg, + "A", "Queue configuration"); + + SYSCTL_ADD_PROC(ctx, children1, OID_AUTO, "la", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, i, + sysctl_cim_la, "A", "Logic analyzer"); + + SYSCTL_ADD_PROC(ctx, children1, OID_AUTO, "ma_la", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, i, + sysctl_cim_ma_la, "A", "CIM MA logic analyzer"); + + SYSCTL_ADD_PROC(ctx, children1, OID_AUTO, "pif_la", + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, i, + sysctl_cim_pif_la, "A", "CIM PIF logic analyzer"); + + /* IBQs */ + switch (chip_id(sc)) { + case CHELSIO_T4: + case CHELSIO_T5: + case CHELSIO_T6: + qname = &t4_ibq[0]; + qcount = nitems(t4_ibq); + break; + case CHELSIO_T7: + default: + if (i == 0) { + qname = &t7_ibq[0]; + qcount = nitems(t7_ibq); + } else { + qname = &t7_ibq_sec[0]; + qcount = nitems(t7_ibq_sec); + } + break; + } + MPASS(qcount <= sc->chip_params->cim_num_ibq); + for (j = 0; j < qcount; j++) { + if (qname[j] == NULL) + continue; + SYSCTL_ADD_PROC(ctx, children1, OID_AUTO, qname[j], + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, + (i << 16) | j, sysctl_cim_ibq, "A", NULL); + } + + /* OBQs */ + switch (chip_id(sc)) { + case CHELSIO_T4: + qname = t4_obq; + qcount = CIM_NUM_OBQ; + break; + case CHELSIO_T5: + case CHELSIO_T6: + qname = t4_obq; + qcount = nitems(t4_obq); + break; + case CHELSIO_T7: + default: + if (i == 0) { + qname = t7_obq; + qcount = nitems(t7_obq); + } else { + qname = t7_obq_sec; + qcount = nitems(t7_obq_sec); + } + break; + } + MPASS(qcount <= sc->chip_params->cim_num_obq); + for (j = 0; j < qcount; j++) { + if (qname[j] == NULL) + continue; + SYSCTL_ADD_PROC(ctx, children1, OID_AUTO, qname[j], + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, + (i << 16) | j, sysctl_cim_obq, "A", NULL); + } + } +} + /* * Should match fw_caps_config_ enums in t4fw_interface.h */ @@ -7766,11 +7944,6 @@ t4_sysctls(struct adapter *sc) CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, 0, sysctl_reset_sensor, "I", "reset the chip's temperature sensor."); - SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "loadavg", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, - sysctl_loadavg, "A", - "microprocessor load averages (debug firmwares only)"); - SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "core_vdd", CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, sysctl_vdd, "I", "core Vdd (in mV)"); @@ -7802,81 +7975,7 @@ t4_sysctls(struct adapter *sc) CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, sysctl_cctrl, "A", "congestion control"); - SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cim_ibq_tp0", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, - sysctl_cim_ibq_obq, "A", "CIM IBQ 0 (TP0)"); - - SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cim_ibq_tp1", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 1, - sysctl_cim_ibq_obq, "A", "CIM IBQ 1 (TP1)"); - - SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cim_ibq_ulp", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 2, - sysctl_cim_ibq_obq, "A", "CIM IBQ 2 (ULP)"); - - SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cim_ibq_sge0", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 3, - sysctl_cim_ibq_obq, "A", "CIM IBQ 3 (SGE0)"); - - SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cim_ibq_sge1", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 4, - sysctl_cim_ibq_obq, "A", "CIM IBQ 4 (SGE1)"); - - SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cim_ibq_ncsi", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 5, - sysctl_cim_ibq_obq, "A", "CIM IBQ 5 (NCSI)"); - - SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cim_la", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, - sysctl_cim_la, "A", "CIM logic analyzer"); - - SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cim_ma_la", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, - sysctl_cim_ma_la, "A", "CIM MA logic analyzer"); - - SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cim_obq_ulp0", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, - 0 + CIM_NUM_IBQ, sysctl_cim_ibq_obq, "A", "CIM OBQ 0 (ULP0)"); - - SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cim_obq_ulp1", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, - 1 + CIM_NUM_IBQ, sysctl_cim_ibq_obq, "A", "CIM OBQ 1 (ULP1)"); - - SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cim_obq_ulp2", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, - 2 + CIM_NUM_IBQ, sysctl_cim_ibq_obq, "A", "CIM OBQ 2 (ULP2)"); - - SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cim_obq_ulp3", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, - 3 + CIM_NUM_IBQ, sysctl_cim_ibq_obq, "A", "CIM OBQ 3 (ULP3)"); - - SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cim_obq_sge", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, - 4 + CIM_NUM_IBQ, sysctl_cim_ibq_obq, "A", "CIM OBQ 4 (SGE)"); - - SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cim_obq_ncsi", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, - 5 + CIM_NUM_IBQ, sysctl_cim_ibq_obq, "A", "CIM OBQ 5 (NCSI)"); - - if (chip_id(sc) > CHELSIO_T4) { - SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cim_obq_sge0_rx", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, - 6 + CIM_NUM_IBQ, sysctl_cim_ibq_obq, "A", - "CIM OBQ 6 (SGE0-RX)"); - - SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cim_obq_sge1_rx", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, - 7 + CIM_NUM_IBQ, sysctl_cim_ibq_obq, "A", - "CIM OBQ 7 (SGE1-RX)"); - } - - SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cim_pif_la", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, - sysctl_cim_pif_la, "A", "CIM PIF logic analyzer"); - - SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cim_qcfg", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, - sysctl_cim_qcfg, "A", "CIM queue configuration"); + cim_sysctls(sc, ctx, children); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "cpl_stats", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, @@ -7891,8 +7990,8 @@ t4_sysctls(struct adapter *sc) sysctl_tid_stats, "A", "tid stats"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "devlog", - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, - sysctl_devlog, "A", "firmware's device log"); + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, -1, + sysctl_devlog, "A", "firmware's device log (all cores)"); SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "fcoe_stats", CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, @@ -9207,6 +9306,10 @@ sysctl_loadavg(SYSCTL_HANDLER_ARGS) struct sbuf *sb; int rc; uint32_t param, val; + uint8_t coreid = (uint8_t)arg2; + + KASSERT(coreid < sc->params.ncores, + ("%s: bad coreid %u\n", __func__, coreid)); rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4lavg"); if (rc) @@ -9215,7 +9318,8 @@ sysctl_loadavg(SYSCTL_HANDLER_ARGS) rc = ENXIO; else { param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) | - V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_LOAD); + V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_LOAD) | + V_FW_PARAMS_PARAM_Y(coreid); rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 1, ¶m, &val); } end_synchronized_op(sc, 0); @@ -9281,50 +9385,30 @@ done: return (rc); } -static const char *qname[CIM_NUM_IBQ + CIM_NUM_OBQ_T5] = { - "TP0", "TP1", "ULP", "SGE0", "SGE1", "NC-SI", /* ibq's */ - "ULP0", "ULP1", "ULP2", "ULP3", "SGE", "NC-SI", /* obq's */ - "SGE0-RX", "SGE1-RX" /* additional obq's (T5 onwards) */ -}; - static int -sysctl_cim_ibq_obq(SYSCTL_HANDLER_ARGS) +sysctl_cim_ibq(SYSCTL_HANDLER_ARGS) { struct adapter *sc = arg1; struct sbuf *sb; - int rc, i, n, qid = arg2; + int rc, i, n, qid, coreid; uint32_t *buf, *p; - char *qtype; - u_int cim_num_obq = sc->chip_params->cim_num_obq; - KASSERT(qid >= 0 && qid < CIM_NUM_IBQ + cim_num_obq, - ("%s: bad qid %d\n", __func__, qid)); + qid = arg2 & 0xffff; + coreid = arg2 >> 16; - if (qid < CIM_NUM_IBQ) { - /* inbound queue */ - qtype = "IBQ"; - n = 4 * CIM_IBQ_SIZE; - buf = malloc(n * sizeof(uint32_t), M_CXGBE, M_ZERO | M_WAITOK); - mtx_lock(&sc->reg_lock); - if (hw_off_limits(sc)) - rc = -ENXIO; - else - rc = t4_read_cim_ibq(sc, qid, buf, n); - mtx_unlock(&sc->reg_lock); - } else { - /* outbound queue */ - qtype = "OBQ"; - qid -= CIM_NUM_IBQ; - n = 4 * cim_num_obq * CIM_OBQ_SIZE; - buf = malloc(n * sizeof(uint32_t), M_CXGBE, M_ZERO | M_WAITOK); - mtx_lock(&sc->reg_lock); - if (hw_off_limits(sc)) - rc = -ENXIO; - else - rc = t4_read_cim_obq(sc, qid, buf, n); - mtx_unlock(&sc->reg_lock); - } + KASSERT(qid >= 0 && qid < sc->chip_params->cim_num_ibq, + ("%s: bad ibq qid %d\n", __func__, qid)); + KASSERT(coreid >= 0 && coreid < sc->params.ncores, + ("%s: bad coreid %d\n", __func__, coreid)); + n = 4 * CIM_IBQ_SIZE; + buf = malloc(n * sizeof(uint32_t), M_CXGBE, M_ZERO | M_WAITOK); + mtx_lock(&sc->reg_lock); + if (hw_off_limits(sc)) + rc = -ENXIO; + else + rc = t4_read_cim_ibq_core(sc, coreid, qid, buf, n); + mtx_unlock(&sc->reg_lock); if (rc < 0) { rc = -rc; goto done; @@ -9336,12 +9420,58 @@ sysctl_cim_ibq_obq(SYSCTL_HANDLER_ARGS) rc = ENOMEM; goto done; } - - sbuf_printf(sb, "%s%d %s", qtype , qid, qname[arg2]); for (i = 0, p = buf; i < n; i += 16, p += 4) sbuf_printf(sb, "\n%#06x: %08x %08x %08x %08x", i, p[0], p[1], p[2], p[3]); + rc = sbuf_finish(sb); + sbuf_delete(sb); +done: + free(buf, M_CXGBE); + return (rc); +} + +static int +sysctl_cim_obq(SYSCTL_HANDLER_ARGS) +{ + struct adapter *sc = arg1; + struct sbuf *sb; + int rc, i, n, qid, coreid; + uint32_t *buf, *p; + + qid = arg2 & 0xffff; + coreid = arg2 >> 16; + + KASSERT(qid >= 0 && qid < sc->chip_params->cim_num_obq, + ("%s: bad obq qid %d\n", __func__, qid)); + KASSERT(coreid >= 0 && coreid < sc->params.ncores, + ("%s: bad coreid %d\n", __func__, coreid)); + + n = 6 * CIM_OBQ_SIZE * 4; + buf = malloc(n * sizeof(uint32_t), M_CXGBE, M_ZERO | M_WAITOK); + mtx_lock(&sc->reg_lock); + if (hw_off_limits(sc)) + rc = -ENXIO; + else + rc = t4_read_cim_obq_core(sc, coreid, qid, buf, n); + mtx_unlock(&sc->reg_lock); + if (rc < 0) { + rc = -rc; + goto done; + } + n = rc * sizeof(uint32_t); /* rc has # of words actually read */ + rc = sysctl_wire_old_buffer(req, 0); + if (rc != 0) + goto done; + + sb = sbuf_new_for_sysctl(NULL, NULL, PAGE_SIZE, req); + if (sb == NULL) { + rc = ENOMEM; + goto done; + } + for (i = 0, p = buf; i < n; i += 16, p += 4) + sbuf_printf(sb, "\n%#06x: %08x %08x %08x %08x", i, p[0], p[1], + p[2], p[3]); rc = sbuf_finish(sb); sbuf_delete(sb); done: @@ -9412,7 +9542,7 @@ sbuf_cim_la6(struct adapter *sc, struct sbuf *sb, uint32_t *buf, uint32_t cfg) } static int -sbuf_cim_la(struct adapter *sc, struct sbuf *sb, int flags) +sbuf_cim_la(struct adapter *sc, int coreid, struct sbuf *sb, int flags) { uint32_t cfg, *buf; int rc; @@ -9427,9 +9557,10 @@ sbuf_cim_la(struct adapter *sc, struct sbuf *sb, int flags) if (hw_off_limits(sc)) rc = ENXIO; else { - rc = -t4_cim_read(sc, A_UP_UP_DBG_LA_CFG, 1, &cfg); + rc = -t4_cim_read_core(sc, 1, coreid, A_UP_UP_DBG_LA_CFG, 1, + &cfg); if (rc == 0) - rc = -t4_cim_read_la(sc, buf, NULL); + rc = -t4_cim_read_la_core(sc, coreid, buf, NULL); } mtx_unlock(&sc->reg_lock); if (rc == 0) { @@ -9446,6 +9577,7 @@ static int sysctl_cim_la(SYSCTL_HANDLER_ARGS) { struct adapter *sc = arg1; + int coreid = arg2; struct sbuf *sb; int rc; @@ -9453,7 +9585,7 @@ sysctl_cim_la(SYSCTL_HANDLER_ARGS) if (sb == NULL) return (ENOMEM); - rc = sbuf_cim_la(sc, sb, M_WAITOK); + rc = sbuf_cim_la(sc, coreid, sb, M_WAITOK); if (rc == 0) rc = sbuf_finish(sb); sbuf_delete(sb); @@ -9490,7 +9622,7 @@ dump_cimla(struct adapter *sc) device_get_nameunit(sc->dev)); return; } - rc = sbuf_cim_la(sc, &sb, M_WAITOK); + rc = sbuf_cim_la(sc, 0, &sb, M_WAITOK); if (rc == 0) { rc = sbuf_finish(&sb); if (rc == 0) { @@ -9614,6 +9746,13 @@ sysctl_cim_qcfg(SYSCTL_HANDLER_ARGS) uint32_t obq_wr[2 * CIM_NUM_OBQ_T5], *wr = obq_wr; uint32_t stat[4 * (CIM_NUM_IBQ + CIM_NUM_OBQ_T5)], *p = stat; u_int cim_num_obq, ibq_rdaddr, obq_rdaddr, nq; + static const char *qname[CIM_NUM_IBQ + CIM_NUM_OBQ_T5] = { + "TP0", "TP1", "ULP", "SGE0", "SGE1", "NC-SI", /* ibq's */ + "ULP0", "ULP1", "ULP2", "ULP3", "SGE", "NC-SI", /* obq's */ + "SGE0-RX", "SGE1-RX" /* additional obq's (T5 onwards) */ + }; + + MPASS(chip_id(sc) < CHELSIO_T7); cim_num_obq = sc->chip_params->cim_num_obq; if (is_t4(sc)) { @@ -9665,6 +9804,104 @@ sysctl_cim_qcfg(SYSCTL_HANDLER_ARGS) return (rc); } +static int +sysctl_cim_qcfg_t7(SYSCTL_HANDLER_ARGS) +{ + struct adapter *sc = arg1; + u_int coreid = arg2; + struct sbuf *sb; + int rc, i; + u_int addr; + uint16_t base[CIM_NUM_IBQ_T7 + CIM_NUM_OBQ_T7]; + uint16_t size[CIM_NUM_IBQ_T7 + CIM_NUM_OBQ_T7]; + uint16_t thres[CIM_NUM_IBQ_T7]; + uint32_t obq_wr[2 * CIM_NUM_OBQ_T7], *wr = obq_wr; + uint32_t stat[4 * (CIM_NUM_IBQ_T7 + CIM_NUM_OBQ_T7)], *p = stat; + static const char * const qname_ibq_t7[] = { + "TP0", "TP1", "TP2", "TP3", "ULP", "SGE0", "SGE1", "NC-SI", + "RSVD", "IPC1", "IPC2", "IPC3", "IPC4", "IPC5", "IPC6", "IPC7", + }; + static const char * const qname_obq_t7[] = { + "ULP0", "ULP1", "ULP2", "ULP3", "SGE", "NC-SI", "SGE0-RX", + "RSVD", "RSVD", "IPC1", "IPC2", "IPC3", "IPC4", "IPC5", + "IPC6", "IPC7" + }; + static const char * const qname_ibq_sec_t7[] = { + "TP0", "TP1", "TP2", "TP3", "ULP", "SGE0", "RSVD", "RSVD", + "RSVD", "IPC0", "RSVD", "RSVD", "RSVD", "RSVD", "RSVD", "RSVD", + }; + static const char * const qname_obq_sec_t7[] = { + "ULP0", "ULP1", "ULP2", "ULP3", "SGE", "RSVD", "SGE0-RX", + "RSVD", "RSVD", "IPC0", "RSVD", "RSVD", "RSVD", "RSVD", + "RSVD", "RSVD", + }; + + MPASS(chip_id(sc) >= CHELSIO_T7); + + mtx_lock(&sc->reg_lock); + if (hw_off_limits(sc)) + rc = ENXIO; + else { + rc = -t4_cim_read_core(sc, 1, coreid, + A_T7_UP_IBQ_0_SHADOW_RDADDR, 4 * CIM_NUM_IBQ_T7, stat); + if (rc != 0) + goto unlock; + + rc = -t4_cim_read_core(sc, 1, coreid, + A_T7_UP_OBQ_0_SHADOW_RDADDR, 4 * CIM_NUM_OBQ_T7, + &stat[4 * CIM_NUM_IBQ_T7]); + if (rc != 0) + goto unlock; + + addr = A_T7_UP_OBQ_0_SHADOW_REALADDR; + for (i = 0; i < CIM_NUM_OBQ_T7 * 2; i++, addr += 8) { + rc = -t4_cim_read_core(sc, 1, coreid, addr, 1, + &obq_wr[i]); + if (rc != 0) + goto unlock; + } + t4_read_cimq_cfg_core(sc, coreid, base, size, thres); + } +unlock: + mtx_unlock(&sc->reg_lock); + if (rc) + return (rc); + + sb = sbuf_new_for_sysctl(NULL, NULL, PAGE_SIZE, req); + if (sb == NULL) + return (ENOMEM); + + sbuf_printf(sb, + " Queue Base Size Thres RdPtr WrPtr SOP EOP Avail"); + + for (i = 0; i < CIM_NUM_IBQ_T7; i++, p += 4) { + if (!size[i]) + continue; + + sbuf_printf(sb, "\n%7s %5x %5u %5u %6x %4x %4u %4u %5u", + coreid == 0 ? qname_ibq_t7[i] : qname_ibq_sec_t7[i], + base[i], size[i], thres[i], G_IBQRDADDR(p[0]) & 0xfff, + G_IBQWRADDR(p[1]) & 0xfff, G_QUESOPCNT(p[3]), + G_QUEEOPCNT(p[3]), G_T7_QUEREMFLITS(p[2]) * 16); + } + + for ( ; i < CIM_NUM_IBQ_T7 + CIM_NUM_OBQ_T7; i++, p += 4, wr += 2) { + if (!size[i]) + continue; + + sbuf_printf(sb, "\n%7s %5x %5u %12x %4x %4u %4u %5u", + coreid == 0 ? qname_obq_t7[i - CIM_NUM_IBQ_T7] : + qname_obq_sec_t7[i - CIM_NUM_IBQ_T7], + base[i], size[i], G_QUERDADDR(p[0]) & 0xfff, + wr[0] << 1, G_QUESOPCNT(p[3]), G_QUEEOPCNT(p[3]), + G_T7_QUEREMFLITS(p[2]) * 16); + } + + rc = sbuf_finish(sb); + sbuf_delete(sb); + return (rc); +} + static int sysctl_cpl_stats(SYSCTL_HANDLER_ARGS) { @@ -9807,18 +10044,25 @@ static const char * const devlog_facility_strings[] = { }; static int -sbuf_devlog(struct adapter *sc, struct sbuf *sb, int flags) +sbuf_devlog(struct adapter *sc, int coreid, struct sbuf *sb, int flags) { int i, j, rc, nentries, first = 0; struct devlog_params *dparams = &sc->params.devlog; struct fw_devlog_e *buf, *e; + uint32_t addr, size; uint64_t ftstamp = UINT64_MAX; + KASSERT(coreid >= 0 && coreid < sc->params.ncores, + ("%s: bad coreid %d\n", __func__, coreid)); + if (dparams->addr == 0) return (ENXIO); + size = dparams->size / sc->params.ncores; + addr = dparams->addr + coreid * size; + MPASS(flags == M_WAITOK || flags == M_NOWAIT); - buf = malloc(dparams->size, M_CXGBE, M_ZERO | flags); + buf = malloc(size, M_CXGBE, M_ZERO | flags); if (buf == NULL) return (ENOMEM); @@ -9826,13 +10070,12 @@ sbuf_devlog(struct adapter *sc, struct sbuf *sb, int flags) if (hw_off_limits(sc)) rc = ENXIO; else - rc = read_via_memwin(sc, 1, dparams->addr, (void *)buf, - dparams->size); + rc = read_via_memwin(sc, 1, addr, (void *)buf, size); mtx_unlock(&sc->reg_lock); if (rc != 0) goto done; - nentries = dparams->size / sizeof(struct fw_devlog_e); + nentries = size / sizeof(struct fw_devlog_e); for (i = 0; i < nentries; i++) { e = &buf[i]; @@ -9884,14 +10127,24 @@ static int sysctl_devlog(SYSCTL_HANDLER_ARGS) { struct adapter *sc = arg1; - int rc; + int rc, i, coreid = arg2; struct sbuf *sb; sb = sbuf_new_for_sysctl(NULL, NULL, 4096, req); if (sb == NULL) return (ENOMEM); - - rc = sbuf_devlog(sc, sb, M_WAITOK); + if (coreid == -1) { + /* -1 means all cores */ + for (i = rc = 0; i < sc->params.ncores && rc == 0; i++) { + if (sc->params.ncores > 0) + sbuf_printf(sb, "=== CIM core %u ===\n", i); + rc = sbuf_devlog(sc, i, sb, M_WAITOK); + } + } else { + KASSERT(coreid >= 0 && coreid < sc->params.ncores, + ("%s: bad coreid %d\n", __func__, coreid)); + rc = sbuf_devlog(sc, coreid, sb, M_WAITOK); + } if (rc == 0) rc = sbuf_finish(sb); sbuf_delete(sb); @@ -9901,7 +10154,7 @@ sysctl_devlog(SYSCTL_HANDLER_ARGS) static void dump_devlog(struct adapter *sc) { - int rc; + int rc, i; struct sbuf sb; if (sbuf_new(&sb, NULL, 4096, SBUF_AUTOEXTEND) != &sb) { @@ -9909,13 +10162,15 @@ dump_devlog(struct adapter *sc) device_get_nameunit(sc->dev)); return; } - rc = sbuf_devlog(sc, &sb, M_WAITOK); + for (i = rc = 0; i < sc->params.ncores && rc == 0; i++) { + if (sc->params.ncores > 0) + sbuf_printf(&sb, "=== CIM core %u ===\n", i); + rc = sbuf_devlog(sc, i, &sb, M_WAITOK); + } if (rc == 0) { - rc = sbuf_finish(&sb); - if (rc == 0) { - log(LOG_DEBUG, "%s: device log follows.\n%s", - device_get_nameunit(sc->dev), sbuf_data(&sb)); - } + sbuf_finish(&sb); + log(LOG_DEBUG, "%s: device log follows.\n%s", + device_get_nameunit(sc->dev), sbuf_data(&sb)); } sbuf_delete(&sb); } diff --git a/sys/dev/cxgbe/t4_netmap.c b/sys/dev/cxgbe/t4_netmap.c index 12aaca6ee77a..0135bec6e2c1 100644 --- a/sys/dev/cxgbe/t4_netmap.c +++ b/sys/dev/cxgbe/t4_netmap.c @@ -424,9 +424,13 @@ alloc_nm_txq_hwq(struct vi_info *vi, struct sge_nm_txq *nm_txq) F_FW_CMD_WRITE | F_FW_CMD_EXEC | V_FW_EQ_ETH_CMD_PFN(sc->pf) | V_FW_EQ_ETH_CMD_VFN(0)); c.alloc_to_len16 = htobe32(F_FW_EQ_ETH_CMD_EQSTART | FW_LEN16(c)); - if (nm_txq->cntxt_id == INVALID_NM_TXQ_CNTXT_ID) - c.alloc_to_len16 |= htobe32(F_FW_EQ_ETH_CMD_ALLOC); - else + if (nm_txq->cntxt_id == INVALID_NM_TXQ_CNTXT_ID) { + const int core = sc->params.ncores > 1 ? + nm_txq->nid % sc->params.ncores : 0; + + c.alloc_to_len16 |= htobe32(F_FW_EQ_ETH_CMD_ALLOC | + V_FW_EQ_ETH_CMD_COREGROUP(core)); + } else c.eqid_pkd = htobe32(V_FW_EQ_ETH_CMD_EQID(nm_txq->cntxt_id)); c.autoequiqe_to_viid = htobe32(F_FW_EQ_ETH_CMD_AUTOEQUIQE | F_FW_EQ_ETH_CMD_AUTOEQUEQE | V_FW_EQ_ETH_CMD_VIID(vi->viid)); diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index ce506f6c9192..46f95606743c 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -1,8 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * - * Copyright (c) 2011 Chelsio Communications, Inc. - * All rights reserved. + * Copyright (c) 2011, 2025 Chelsio Communications. * Written by: Navdeep Parhar * * Redistribution and use in source and binary forms, with or without @@ -259,17 +258,20 @@ static void free_ofld_rxq(struct vi_info *, struct sge_ofld_rxq *); static void add_ofld_rxq_sysctls(struct sysctl_ctx_list *, struct sysctl_oid *, struct sge_ofld_rxq *); #endif -static int ctrl_eq_alloc(struct adapter *, struct sge_eq *); -static int eth_eq_alloc(struct adapter *, struct vi_info *, struct sge_eq *); +static int ctrl_eq_alloc(struct adapter *, struct sge_eq *, int); +static int eth_eq_alloc(struct adapter *, struct vi_info *, struct sge_eq *, + int); #if defined(TCP_OFFLOAD) || defined(RATELIMIT) -static int ofld_eq_alloc(struct adapter *, struct vi_info *, struct sge_eq *); +static int ofld_eq_alloc(struct adapter *, struct vi_info *, struct sge_eq *, + int); #endif static int alloc_eq(struct adapter *, struct sge_eq *, struct sysctl_ctx_list *, struct sysctl_oid *); static void free_eq(struct adapter *, struct sge_eq *); static void add_eq_sysctls(struct adapter *, struct sysctl_ctx_list *, struct sysctl_oid *, struct sge_eq *); -static int alloc_eq_hwq(struct adapter *, struct vi_info *, struct sge_eq *); +static int alloc_eq_hwq(struct adapter *, struct vi_info *, struct sge_eq *, + int); static int free_eq_hwq(struct adapter *, struct vi_info *, struct sge_eq *); static int alloc_wrq(struct adapter *, struct vi_info *, struct sge_wrq *, struct sysctl_ctx_list *, struct sysctl_oid *); @@ -1064,9 +1066,9 @@ t4_setup_adapter_queues(struct adapter *sc) */ /* - * Control queues, one per port. + * Control queues. At least one per port and per internal core. */ - for_each_port(sc, i) { + for (i = 0; i < sc->sge.nctrlq; i++) { rc = alloc_ctrlq(sc, i); if (rc != 0) return (rc); @@ -1087,7 +1089,7 @@ t4_teardown_adapter_queues(struct adapter *sc) if (sc->sge.ctrlq != NULL) { MPASS(!(sc->flags & IS_VF)); /* VFs don't allocate ctrlq. */ - for_each_port(sc, i) + for (i = 0; i < sc->sge.nctrlq; i++) free_ctrlq(sc, i); } free_fwq(sc); @@ -3849,7 +3851,7 @@ alloc_ctrlq(struct adapter *sc, int idx) struct sysctl_oid *oid; struct sge_wrq *ctrlq = &sc->sge.ctrlq[idx]; - MPASS(idx < sc->params.nports); + MPASS(idx < sc->sge.nctrlq); if (!(ctrlq->eq.flags & EQ_SW_ALLOCATED)) { MPASS(!(ctrlq->eq.flags & EQ_HW_ALLOCATED)); @@ -3861,8 +3863,8 @@ alloc_ctrlq(struct adapter *sc, int idx) snprintf(name, sizeof(name), "%s ctrlq%d", device_get_nameunit(sc->dev), idx); - init_eq(sc, &ctrlq->eq, EQ_CTRL, CTRL_EQ_QSIZE, idx, - &sc->sge.fwq, name); + init_eq(sc, &ctrlq->eq, EQ_CTRL, CTRL_EQ_QSIZE, + idx % sc->params.nports, &sc->sge.fwq, name); rc = alloc_wrq(sc, NULL, ctrlq, &sc->ctx, oid); if (rc != 0) { CH_ERR(sc, "failed to allocate ctrlq%d: %d\n", idx, rc); @@ -3877,7 +3879,7 @@ alloc_ctrlq(struct adapter *sc, int idx) MPASS(ctrlq->nwr_pending == 0); MPASS(ctrlq->ndesc_needed == 0); - rc = alloc_eq_hwq(sc, NULL, &ctrlq->eq); + rc = alloc_eq_hwq(sc, NULL, &ctrlq->eq, idx); if (rc != 0) { CH_ERR(sc, "failed to create hw ctrlq%d: %d\n", idx, rc); return (rc); @@ -4265,18 +4267,20 @@ qsize_to_fthresh(int qsize) } static int -ctrl_eq_alloc(struct adapter *sc, struct sge_eq *eq) +ctrl_eq_alloc(struct adapter *sc, struct sge_eq *eq, int idx) { - int rc, cntxt_id; + int rc, cntxt_id, core; struct fw_eq_ctrl_cmd c; int qsize = eq->sidx + sc->params.sge.spg_len / EQ_ESIZE; + core = sc->params.tid_qid_sel_mask != 0 ? idx % sc->params.ncores : 0; bzero(&c, sizeof(c)); c.op_to_vfn = htobe32(V_FW_CMD_OP(FW_EQ_CTRL_CMD) | F_FW_CMD_REQUEST | *** 226 LINES SKIPPED *** From nobody Mon Sep 29 14:37: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 4cb3h40Wl7z68K77; Mon, 29 Sep 2025 14:37:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb3h33flmz3t0j; Mon, 29 Sep 2025 14:37:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156675; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=01TC9zX4N5X/6kIKZTQayo16uFXWYCnz3nhVCTlJ1hE=; b=UGNl+3jlSU3tDHlKRlJ7rU3ph6op/p+thaRjkkhLo/phZovRxifqmbbHvNODWfrGGgPNnu qhY2HlKqDEHec7YQqnQ4JOr92o2inQ2HeHt5kXFfYqqB0w9u+0n0PbgugKil7op5hpD1nx yZHEhyQbK8BcCdpKdMbR30Io5Cr4ZIj9RvIVsnNbdMme5ALeDWLhwFxiwvCO8b+FKfJzkz FdbgtF2O4h+bomrQq/og4uzu/TnurrMIYXLkYCHiKviVlMzpLutApeuTKug+NulcXL/HMW 3f0e86fjH85BSphr1YmoXqGf3DP+IV2TtyWaoSdE5BqgZRUc0cXl3InK34YzlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156675; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=01TC9zX4N5X/6kIKZTQayo16uFXWYCnz3nhVCTlJ1hE=; b=pHbQG7cNpnZt3I/aj3yQUKAbWkRfiweD3e325NdIsOLPycrbP5YBMePl/4HNSzTVKR9nn3 76gAcJeFCqeNGJiU1QEGWda4h+NVmxfHGOLUk1/q53WeSEHYbHo6xHsViiYw8qIthNg0mu H3pgd+yIJjnDxlaSQ49Xs+DIc5w6oyl6dMOBlNFYlpBm/20fumWq1/Bwktid5Hd66+uL1Q 4sf32VD8wyLnUH7nLEanBagtgT6IQmCyF9BGsjwKBX9r/kHGF1VDh4KKfrgEg/KBlmTjSc P4eL4f8p3corrKEN8kU83qZ/6Q/btyuOH4+yHZTFaW4I2dddPNAvVqou6SpERw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759156675; a=rsa-sha256; cv=none; b=xtaOrlzJ330i+E+GSfM6Se6/km6yxF9ulWPgA52930TrVpvzRvOoSG7hjmepVxZIRJWIWI YuKM/uIog0l/oUpmhNkIsxrHEzw3HV6chKXDQnmaDlZzFkc1bqY2gnhQi+VWcjXDocepzm QvVyF1xcsDimWkUl3j6UJK0N+dgI7ZVRM91szz939g5oC9DlgIb1yBUsfyoSsnF2cdnJPr 0DN4B9pQmN+ywW63zWUPp1MDCQZ1puDGxmgG3hg+3HmF6SsBRr3CerLJ0CIyWxsZgDFEOw q4VN2F5XG4h3hqvUJHAUCb9mTVREd6eMIa/dV1gkSQBcLPblEtLDhxhC4BlHXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb3h32kdrz182Z; Mon, 29 Sep 2025 14:37:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TEbtDn017969; Mon, 29 Sep 2025 14:37:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TEbt7d017966; Mon, 29 Sep 2025 14:37:55 GMT (envelope-from git) Date: Mon, 29 Sep 2025 14:37:55 GMT Message-Id: <202509291437.58TEbt7d017966@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: c231e86ce388 - main - cxgbe(4): Update the filtering code for T7 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c231e86ce388a0d0fb64e0fd2ff736c990ec97bb Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=c231e86ce388a0d0fb64e0fd2ff736c990ec97bb commit c231e86ce388a0d0fb64e0fd2ff736c990ec97bb Author: Navdeep Parhar AuthorDate: 2025-09-29 09:48:18 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 14:26:00 +0000 cxgbe(4): Update the filtering code for T7 There are new fields available and the width of the optional part has changed. This affects the ntuples used by TOE/filters/hashfilters. MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_filter.c | 458 +++++++++++++++++++++++++++++------------ sys/dev/cxgbe/t4_ioctl.h | 8 + sys/dev/cxgbe/tom/t4_connect.c | 37 +++- sys/dev/cxgbe/tom/t4_tom.c | 5 +- 4 files changed, 368 insertions(+), 140 deletions(-) diff --git a/sys/dev/cxgbe/t4_filter.c b/sys/dev/cxgbe/t4_filter.c index 8d4552116d96..92f882dd38cf 100644 --- a/sys/dev/cxgbe/t4_filter.c +++ b/sys/dev/cxgbe/t4_filter.c @@ -322,48 +322,85 @@ remove_hftid(struct adapter *sc, struct filter_entry *f) LIST_REMOVE(f, link_tid); } -/* - * Input: driver's 32b filter mode. - * Returns: hardware filter mode (bits to set in vlan_pri_map) for the input. - */ static uint16_t -mode_to_fconf(uint32_t mode) +mode_to_fconf_t4(uint32_t mode) { uint32_t fconf = 0; if (mode & T4_FILTER_IP_FRAGMENT) fconf |= F_FRAGMENTATION; - if (mode & T4_FILTER_MPS_HIT_TYPE) fconf |= F_MPSHITTYPE; - if (mode & T4_FILTER_MAC_IDX) fconf |= F_MACMATCH; - if (mode & T4_FILTER_ETH_TYPE) fconf |= F_ETHERTYPE; - if (mode & T4_FILTER_IP_PROTO) fconf |= F_PROTOCOL; - if (mode & T4_FILTER_IP_TOS) fconf |= F_TOS; - if (mode & T4_FILTER_VLAN) fconf |= F_VLAN; - if (mode & T4_FILTER_VNIC) fconf |= F_VNIC_ID; - if (mode & T4_FILTER_PORT) fconf |= F_PORT; - if (mode & T4_FILTER_FCoE) fconf |= F_FCOE; return (fconf); } +static uint16_t +mode_to_fconf_t7(uint32_t mode) +{ + uint32_t fconf = 0; + + if (mode & T4_FILTER_TCPFLAGS) + fconf |= F_TCPFLAGS; + if (mode & T4_FILTER_SYNONLY) + fconf |= F_SYNONLY; + if (mode & T4_FILTER_ROCE) + fconf |= F_ROCE; + if (mode & T4_FILTER_IP_FRAGMENT) + fconf |= F_T7_FRAGMENTATION; + if (mode & T4_FILTER_MPS_HIT_TYPE) + fconf |= F_T7_MPSHITTYPE; + if (mode & T4_FILTER_MAC_IDX) + fconf |= F_T7_MACMATCH; + if (mode & T4_FILTER_ETH_TYPE) + fconf |= F_T7_ETHERTYPE; + if (mode & T4_FILTER_IP_PROTO) + fconf |= F_T7_PROTOCOL; + if (mode & T4_FILTER_IP_TOS) + fconf |= F_T7_TOS; + if (mode & T4_FILTER_VLAN) + fconf |= F_T7_VLAN; + if (mode & T4_FILTER_VNIC) + fconf |= F_T7_VNIC_ID; + if (mode & T4_FILTER_PORT) + fconf |= F_T7_PORT; + if (mode & T4_FILTER_FCoE) + fconf |= F_T7_FCOE; + if (mode & T4_FILTER_IPSECIDX) + fconf |= F_IPSECIDX; + + return (fconf); +} + +/* + * Input: driver's 32b filter mode. + * Returns: hardware filter mode (bits to set in vlan_pri_map) for the input. + */ +static uint16_t +mode_to_fconf(struct adapter *sc, uint32_t mode) +{ + if (chip_id(sc) >= CHELSIO_T7) + return (mode_to_fconf_t7(mode)); + else + return (mode_to_fconf_t4(mode)); +} + /* * Input: driver's 32b filter mode. * Returns: hardware vnic mode (ingress config) matching the input. @@ -389,65 +426,100 @@ check_fspec_against_fconf_iconf(struct adapter *sc, struct tp_params *tpp = &sc->params.tp; uint32_t fconf = 0; - if (fs->val.frag || fs->mask.frag) - fconf |= F_FRAGMENTATION; - - if (fs->val.matchtype || fs->mask.matchtype) - fconf |= F_MPSHITTYPE; - - if (fs->val.macidx || fs->mask.macidx) - fconf |= F_MACMATCH; - - if (fs->val.ethtype || fs->mask.ethtype) - fconf |= F_ETHERTYPE; - - if (fs->val.proto || fs->mask.proto) - fconf |= F_PROTOCOL; - - if (fs->val.tos || fs->mask.tos) - fconf |= F_TOS; - - if (fs->val.vlan_vld || fs->mask.vlan_vld) - fconf |= F_VLAN; - - if (fs->val.ovlan_vld || fs->mask.ovlan_vld) { - if (tpp->vnic_mode != FW_VNIC_MODE_OUTER_VLAN) - return (EINVAL); - fconf |= F_VNIC_ID; - } - - if (fs->val.pfvf_vld || fs->mask.pfvf_vld) { - if (tpp->vnic_mode != FW_VNIC_MODE_PF_VF) - return (EINVAL); - fconf |= F_VNIC_ID; - } - + if (chip_id(sc) >= CHELSIO_T7) { + if (fs->val.tcpflags || fs->mask.tcpflags) + fconf |= F_TCPFLAGS; + if (fs->val.synonly || fs->mask.synonly) + fconf |= F_SYNONLY; + if (fs->val.roce || fs->mask.roce) + fconf |= F_ROCE; + if (fs->val.frag || fs->mask.frag) + fconf |= F_T7_FRAGMENTATION; + if (fs->val.matchtype || fs->mask.matchtype) + fconf |= F_T7_MPSHITTYPE; + if (fs->val.macidx || fs->mask.macidx) + fconf |= F_T7_MACMATCH; + if (fs->val.ethtype || fs->mask.ethtype) + fconf |= F_T7_ETHERTYPE; + if (fs->val.proto || fs->mask.proto) + fconf |= F_T7_PROTOCOL; + if (fs->val.tos || fs->mask.tos) + fconf |= F_T7_TOS; + if (fs->val.vlan_vld || fs->mask.vlan_vld) + fconf |= F_T7_VLAN; + if (fs->val.ovlan_vld || fs->mask.ovlan_vld) { + if (tpp->vnic_mode != FW_VNIC_MODE_OUTER_VLAN) + return (EINVAL); + fconf |= F_T7_VNIC_ID; + } + if (fs->val.pfvf_vld || fs->mask.pfvf_vld) { + if (tpp->vnic_mode != FW_VNIC_MODE_PF_VF) + return (EINVAL); + fconf |= F_T7_VNIC_ID; + } #ifdef notyet - if (fs->val.encap_vld || fs->mask.encap_vld) { - if (tpp->vnic_mode != FW_VNIC_MODE_ENCAP_EN); + if (fs->val.encap_vld || fs->mask.encap_vld) { + if (tpp->vnic_mode != FW_VNIC_MODE_ENCAP_EN); + return (EINVAL); + fconf |= F_T7_VNIC_ID; + } +#endif + if (fs->val.iport || fs->mask.iport) + fconf |= F_T7_PORT; + if (fs->val.fcoe || fs->mask.fcoe) + fconf |= F_T7_FCOE; + if (fs->val.ipsecidx || fs->mask.ipsecidx) + fconf |= F_IPSECIDX; + } else { + if (fs->val.tcpflags || fs->mask.tcpflags || + fs->val.synonly || fs->mask.synonly || + fs->val.roce || fs->mask.roce || + fs->val.ipsecidx || fs->mask.ipsecidx) return (EINVAL); - fconf |= F_VNIC_ID; - } + if (fs->val.frag || fs->mask.frag) + fconf |= F_FRAGMENTATION; + if (fs->val.matchtype || fs->mask.matchtype) + fconf |= F_MPSHITTYPE; + if (fs->val.macidx || fs->mask.macidx) + fconf |= F_MACMATCH; + if (fs->val.ethtype || fs->mask.ethtype) + fconf |= F_ETHERTYPE; + if (fs->val.proto || fs->mask.proto) + fconf |= F_PROTOCOL; + if (fs->val.tos || fs->mask.tos) + fconf |= F_TOS; + if (fs->val.vlan_vld || fs->mask.vlan_vld) + fconf |= F_VLAN; + if (fs->val.ovlan_vld || fs->mask.ovlan_vld) { + if (tpp->vnic_mode != FW_VNIC_MODE_OUTER_VLAN) + return (EINVAL); + fconf |= F_VNIC_ID; + } + if (fs->val.pfvf_vld || fs->mask.pfvf_vld) { + if (tpp->vnic_mode != FW_VNIC_MODE_PF_VF) + return (EINVAL); + fconf |= F_VNIC_ID; + } +#ifdef notyet + if (fs->val.encap_vld || fs->mask.encap_vld) { + if (tpp->vnic_mode != FW_VNIC_MODE_ENCAP_EN); + return (EINVAL); + fconf |= F_VNIC_ID; + } #endif - - if (fs->val.iport || fs->mask.iport) - fconf |= F_PORT; - - if (fs->val.fcoe || fs->mask.fcoe) - fconf |= F_FCOE; - + if (fs->val.iport || fs->mask.iport) + fconf |= F_PORT; + if (fs->val.fcoe || fs->mask.fcoe) + fconf |= F_FCOE; + } if ((tpp->filter_mode | fconf) != tpp->filter_mode) return (E2BIG); return (0); } -/* - * Input: hardware filter configuration (filter mode/mask, ingress config). - * Input: driver's 32b filter mode matching the input. - */ static uint32_t -fconf_to_mode(uint16_t hwmode, int vnic_mode) +fconf_to_mode_t4(uint16_t hwmode, int vnic_mode) { uint32_t mode = T4_FILTER_IPv4 | T4_FILTER_IPv6 | T4_FILTER_IP_SADDR | T4_FILTER_IP_DADDR | T4_FILTER_IP_SPORT | T4_FILTER_IP_DPORT; @@ -488,6 +560,69 @@ fconf_to_mode(uint16_t hwmode, int vnic_mode) return (mode); } +static uint32_t +fconf_to_mode_t7(uint16_t hwmode, int vnic_mode) +{ + uint32_t mode = T4_FILTER_IPv4 | T4_FILTER_IPv6 | T4_FILTER_IP_SADDR | + T4_FILTER_IP_DADDR | T4_FILTER_IP_SPORT | T4_FILTER_IP_DPORT; + + if (hwmode & F_TCPFLAGS) + mode |= T4_FILTER_TCPFLAGS; + if (hwmode & F_SYNONLY) + mode |= T4_FILTER_SYNONLY; + if (hwmode & F_ROCE) + mode |= T4_FILTER_ROCE; + if (hwmode & F_T7_FRAGMENTATION) + mode |= T4_FILTER_IP_FRAGMENT; + if (hwmode & F_T7_MPSHITTYPE) + mode |= T4_FILTER_MPS_HIT_TYPE; + if (hwmode & F_T7_MACMATCH) + mode |= T4_FILTER_MAC_IDX; + if (hwmode & F_T7_ETHERTYPE) + mode |= T4_FILTER_ETH_TYPE; + if (hwmode & F_T7_PROTOCOL) + mode |= T4_FILTER_IP_PROTO; + if (hwmode & F_T7_TOS) + mode |= T4_FILTER_IP_TOS; + if (hwmode & F_T7_VLAN) + mode |= T4_FILTER_VLAN; + if (hwmode & F_T7_VNIC_ID) + mode |= T4_FILTER_VNIC; /* real meaning depends on vnic_mode. */ + if (hwmode & F_T7_PORT) + mode |= T4_FILTER_PORT; + if (hwmode & F_T7_FCOE) + mode |= T4_FILTER_FCoE; + if (hwmode & F_IPSECIDX) + mode |= T4_FILTER_IPSECIDX; + + switch (vnic_mode) { + case FW_VNIC_MODE_PF_VF: + mode |= T4_FILTER_IC_VNIC; + break; + case FW_VNIC_MODE_ENCAP_EN: + mode |= T4_FILTER_IC_ENCAP; + break; + case FW_VNIC_MODE_OUTER_VLAN: + default: + break; + } + + return (mode); +} + +/* + * Input: hardware filter configuration (filter mode/mask, ingress config). + * Output: driver's 32b filter mode matching the input. + */ +static inline uint32_t +fconf_to_mode(struct adapter *sc, uint16_t hwmode, int vnic_mode) +{ + if (chip_id(sc) >= CHELSIO_T7) + return (fconf_to_mode_t7(hwmode, vnic_mode)); + else + return (fconf_to_mode_t4(hwmode, vnic_mode)); +} + int get_filter_mode(struct adapter *sc, uint32_t *mode) { @@ -499,7 +634,7 @@ get_filter_mode(struct adapter *sc, uint32_t *mode) /* Non-zero incoming value in mode means "hashfilter mode". */ filter_mode = *mode ? tp->filter_mask : tp->filter_mode; - *mode = fconf_to_mode(filter_mode, tp->vnic_mode); + *mode = fconf_to_mode(sc, filter_mode, tp->vnic_mode); return (0); } @@ -512,7 +647,7 @@ set_filter_mode(struct adapter *sc, uint32_t mode) uint16_t fconf; iconf = mode_to_iconf(mode); - fconf = mode_to_fconf(mode); + fconf = mode_to_fconf(sc, mode); if ((iconf == -1 || iconf == tp->vnic_mode) && fconf == tp->filter_mode) return (0); /* Nothing to do */ @@ -554,7 +689,7 @@ set_filter_mask(struct adapter *sc, uint32_t mode) uint16_t fmask; iconf = mode_to_iconf(mode); - fmask = mode_to_fconf(mode); + fmask = mode_to_fconf(sc, mode); if ((iconf == -1 || iconf == tp->vnic_mode) && fmask == tp->filter_mask) return (0); /* Nothing to do */ @@ -811,71 +946,138 @@ hashfilter_ntuple(struct adapter *sc, const struct t4_filter_specification *fs, struct tp_params *tp = &sc->params.tp; uint16_t fmask; - *ftuple = fmask = 0; - /* * Initialize each of the fields which we care about which are present * in the Compressed Filter Tuple. */ - if (tp->vlan_shift >= 0 && fs->mask.vlan) { - *ftuple |= (uint64_t)(F_FT_VLAN_VLD | fs->val.vlan) << - tp->vlan_shift; - fmask |= F_VLAN; - } - - if (tp->port_shift >= 0 && fs->mask.iport) { - *ftuple |= (uint64_t)fs->val.iport << tp->port_shift; - fmask |= F_PORT; - } - - if (tp->protocol_shift >= 0 && fs->mask.proto) { - *ftuple |= (uint64_t)fs->val.proto << tp->protocol_shift; - fmask |= F_PROTOCOL; - } - - if (tp->tos_shift >= 0 && fs->mask.tos) { - *ftuple |= (uint64_t)(fs->val.tos) << tp->tos_shift; - fmask |= F_TOS; - } - - if (tp->vnic_shift >= 0 && fs->mask.vnic) { - /* vnic_mode was already validated. */ - if (tp->vnic_mode == FW_VNIC_MODE_PF_VF) - MPASS(fs->mask.pfvf_vld); - else if (tp->vnic_mode == FW_VNIC_MODE_OUTER_VLAN) - MPASS(fs->mask.ovlan_vld); +#define SFF(V, S) ((uint64_t)(V) << S) /* Shifted Filter Field. */ + *ftuple = fmask = 0; + if (chip_id(sc) >= CHELSIO_T7) { + if (tp->ipsecidx_shift >= 0 && fs->mask.ipsecidx) { + *ftuple |= SFF(fs->val.ipsecidx, tp->ipsecidx_shift); + fmask |= F_IPSECIDX; + } + if (tp->fcoe_shift >= 0 && fs->mask.fcoe) { + *ftuple |= SFF(fs->val.fcoe, tp->fcoe_shift); + fmask |= F_T7_FCOE; + } + if (tp->port_shift >= 0 && fs->mask.iport) { + *ftuple |= (uint64_t)fs->val.iport << tp->port_shift; + fmask |= F_T7_PORT; + } + if (tp->vnic_shift >= 0 && fs->mask.vnic) { + /* vnic_mode was already validated. */ + if (tp->vnic_mode == FW_VNIC_MODE_PF_VF) + MPASS(fs->mask.pfvf_vld); + else if (tp->vnic_mode == FW_VNIC_MODE_OUTER_VLAN) + MPASS(fs->mask.ovlan_vld); #ifdef notyet - else if (tp->vnic_mode == FW_VNIC_MODE_ENCAP_EN) - MPASS(fs->mask.encap_vld); + else if (tp->vnic_mode == FW_VNIC_MODE_ENCAP_EN) + MPASS(fs->mask.encap_vld); #endif - *ftuple |= ((1ULL << 16) | fs->val.vnic) << tp->vnic_shift; - fmask |= F_VNIC_ID; - } - - if (tp->macmatch_shift >= 0 && fs->mask.macidx) { - *ftuple |= (uint64_t)(fs->val.macidx) << tp->macmatch_shift; - fmask |= F_MACMATCH; - } - - if (tp->ethertype_shift >= 0 && fs->mask.ethtype) { - *ftuple |= (uint64_t)(fs->val.ethtype) << tp->ethertype_shift; - fmask |= F_ETHERTYPE; - } - - if (tp->matchtype_shift >= 0 && fs->mask.matchtype) { - *ftuple |= (uint64_t)(fs->val.matchtype) << tp->matchtype_shift; - fmask |= F_MPSHITTYPE; - } - - if (tp->frag_shift >= 0 && fs->mask.frag) { - *ftuple |= (uint64_t)(fs->val.frag) << tp->frag_shift; - fmask |= F_FRAGMENTATION; - } - - if (tp->fcoe_shift >= 0 && fs->mask.fcoe) { - *ftuple |= (uint64_t)(fs->val.fcoe) << tp->fcoe_shift; - fmask |= F_FCOE; + *ftuple |= SFF(F_FT_VNID_ID_VLD | fs->val.vnic, tp->vnic_shift); + fmask |= F_T7_VNIC_ID; + } + if (tp->vlan_shift >= 0 && fs->mask.vlan) { + *ftuple |= SFF(F_FT_VLAN_VLD | fs->val.vlan, tp->vlan_shift); + fmask |= F_T7_VLAN; + } + if (tp->tos_shift >= 0 && fs->mask.tos) { + *ftuple |= SFF(fs->val.tos, tp->tos_shift); + fmask |= F_T7_TOS; + } + if (tp->protocol_shift >= 0 && fs->mask.proto) { + *ftuple |= SFF(fs->val.proto, tp->protocol_shift); + fmask |= F_T7_PROTOCOL; + } + if (tp->ethertype_shift >= 0 && fs->mask.ethtype) { + *ftuple |= SFF(fs->val.ethtype, tp->ethertype_shift); + fmask |= F_T7_ETHERTYPE; + } + if (tp->macmatch_shift >= 0 && fs->mask.macidx) { + *ftuple |= SFF(fs->val.macidx, tp->macmatch_shift); + fmask |= F_T7_MACMATCH; + } + if (tp->matchtype_shift >= 0 && fs->mask.matchtype) { + *ftuple |= SFF(fs->val.matchtype, tp->matchtype_shift); + fmask |= F_T7_MPSHITTYPE; + } + if (tp->frag_shift >= 0 && fs->mask.frag) { + *ftuple |= SFF(fs->val.frag, tp->frag_shift); + fmask |= F_T7_FRAGMENTATION; + } + if (tp->roce_shift >= 0 && fs->mask.roce) { + *ftuple |= SFF(fs->val.roce, tp->roce_shift); + fmask |= F_ROCE; + } + if (tp->synonly_shift >= 0 && fs->mask.synonly) { + *ftuple |= SFF(fs->val.synonly, tp->synonly_shift); + fmask |= F_SYNONLY; + } + if (tp->tcpflags_shift >= 0 && fs->mask.tcpflags) { + *ftuple |= SFF(fs->val.tcpflags, tp->synonly_shift); + fmask |= F_TCPFLAGS; + } + } else { + if (fs->mask.ipsecidx || fs->mask.roce || fs->mask.synonly || + fs->mask.tcpflags) { + MPASS(tp->ipsecidx_shift == -1); + MPASS(tp->roce_shift == -1); + MPASS(tp->synonly_shift == -1); + MPASS(tp->tcpflags_shift == -1); + return (EINVAL); + } + if (tp->fcoe_shift >= 0 && fs->mask.fcoe) { + *ftuple |= SFF(fs->val.fcoe, tp->fcoe_shift); + fmask |= F_FCOE; + } + if (tp->port_shift >= 0 && fs->mask.iport) { + *ftuple |= (uint64_t)fs->val.iport << tp->port_shift; + fmask |= F_PORT; + } + if (tp->vnic_shift >= 0 && fs->mask.vnic) { + /* vnic_mode was already validated. */ + if (tp->vnic_mode == FW_VNIC_MODE_PF_VF) + MPASS(fs->mask.pfvf_vld); + else if (tp->vnic_mode == FW_VNIC_MODE_OUTER_VLAN) + MPASS(fs->mask.ovlan_vld); +#ifdef notyet + else if (tp->vnic_mode == FW_VNIC_MODE_ENCAP_EN) + MPASS(fs->mask.encap_vld); +#endif + *ftuple |= SFF(F_FT_VNID_ID_VLD | fs->val.vnic, tp->vnic_shift); + fmask |= F_VNIC_ID; + } + if (tp->vlan_shift >= 0 && fs->mask.vlan) { + *ftuple |= SFF(F_FT_VLAN_VLD | fs->val.vlan, tp->vlan_shift); + fmask |= F_VLAN; + } + if (tp->tos_shift >= 0 && fs->mask.tos) { + *ftuple |= SFF(fs->val.tos, tp->tos_shift); + fmask |= F_TOS; + } + if (tp->protocol_shift >= 0 && fs->mask.proto) { + *ftuple |= SFF(fs->val.proto, tp->protocol_shift); + fmask |= F_PROTOCOL; + } + if (tp->ethertype_shift >= 0 && fs->mask.ethtype) { + *ftuple |= SFF(fs->val.ethtype, tp->ethertype_shift); + fmask |= F_ETHERTYPE; + } + if (tp->macmatch_shift >= 0 && fs->mask.macidx) { + *ftuple |= SFF(fs->val.macidx, tp->macmatch_shift); + fmask |= F_MACMATCH; + } + if (tp->matchtype_shift >= 0 && fs->mask.matchtype) { + *ftuple |= SFF(fs->val.matchtype, tp->matchtype_shift); + fmask |= F_MPSHITTYPE; + } + if (tp->frag_shift >= 0 && fs->mask.frag) { + *ftuple |= SFF(fs->val.frag, tp->frag_shift); + fmask |= F_FRAGMENTATION; + } } +#undef SFF /* A hashfilter must conform to the hardware filter mask. */ if (fmask != tp->filter_mask) @@ -1594,7 +1796,7 @@ static int act_open_cpl_len16(struct adapter *sc, int isipv6) { int idx; - static const int sz_table[3][2] = { + static const int sz_table[4][2] = { { howmany(sizeof (struct cpl_act_open_req), 16), howmany(sizeof (struct cpl_act_open_req6), 16) @@ -1607,10 +1809,14 @@ act_open_cpl_len16(struct adapter *sc, int isipv6) howmany(sizeof (struct cpl_t6_act_open_req), 16), howmany(sizeof (struct cpl_t6_act_open_req6), 16) }, + { + howmany(sizeof (struct cpl_t7_act_open_req), 16), + howmany(sizeof (struct cpl_t7_act_open_req6), 16) + }, }; MPASS(chip_id(sc) >= CHELSIO_T4); - idx = min(chip_id(sc) - CHELSIO_T4, 2); + idx = min(chip_id(sc) - CHELSIO_T4, 3); return (sz_table[idx][!!isipv6]); } diff --git a/sys/dev/cxgbe/t4_ioctl.h b/sys/dev/cxgbe/t4_ioctl.h index 4698986c0a0e..f7c8ee24d596 100644 --- a/sys/dev/cxgbe/t4_ioctl.h +++ b/sys/dev/cxgbe/t4_ioctl.h @@ -120,6 +120,10 @@ struct t4_i2c_data { #define T4_FILTER_MAC_IDX 0x2000 /* MPS MAC address match index */ #define T4_FILTER_MPS_HIT_TYPE 0x4000 /* MPS match type */ #define T4_FILTER_IP_FRAGMENT 0x8000 /* IP fragment */ +#define T4_FILTER_IPSECIDX 0x10000 +#define T4_FILTER_ROCE 0x20000 +#define T4_FILTER_SYNONLY 0x40000 +#define T4_FILTER_TCPFLAGS 0x80000 /* * T4_FILTER_VNIC's real meaning depends on the ingress config. */ @@ -200,6 +204,10 @@ struct t4_filter_tuple { uint32_t vlan_vld:1; /* VLAN valid */ uint32_t ovlan_vld:1; /* outer VLAN tag valid, value in "vnic" */ uint32_t pfvf_vld:1; /* VNIC id (PF/VF) valid, value in "vnic" */ + uint32_t roce:1; + uint32_t synonly:1; + uint32_t tcpflags:6; + uint32_t ipsecidx:12; }; struct t4_filter_specification { diff --git a/sys/dev/cxgbe/tom/t4_connect.c b/sys/dev/cxgbe/tom/t4_connect.c index fc092eab3223..c236ee060bc2 100644 --- a/sys/dev/cxgbe/tom/t4_connect.c +++ b/sys/dev/cxgbe/tom/t4_connect.c @@ -211,7 +211,7 @@ static inline int act_open_cpl_size(struct adapter *sc, int isipv6) { int idx; - static const int sz_table[3][2] = { + static const int sz_table[4][2] = { { sizeof (struct cpl_act_open_req), sizeof (struct cpl_act_open_req6) @@ -224,10 +224,14 @@ act_open_cpl_size(struct adapter *sc, int isipv6) sizeof (struct cpl_t6_act_open_req), sizeof (struct cpl_t6_act_open_req6) }, + { + sizeof (struct cpl_t7_act_open_req), + sizeof (struct cpl_t7_act_open_req6) + }, }; MPASS(chip_id(sc) >= CHELSIO_T4); - idx = min(chip_id(sc) - CHELSIO_T4, 2); + idx = min(chip_id(sc) - CHELSIO_T4, 3); return (sz_table[idx][!!isipv6]); } @@ -261,6 +265,7 @@ t4_connect(struct toedev *tod, struct socket *so, struct nhop_object *nh, struct offload_settings settings; struct epoch_tracker et; uint16_t vid = 0xfff, pcp = 0; + uint64_t ntuple; INP_WLOCK_ASSERT(inp); KASSERT(nam->sa_family == AF_INET || nam->sa_family == AF_INET6, @@ -314,10 +319,12 @@ t4_connect(struct toedev *tod, struct socket *so, struct nhop_object *nh, qid_atid = V_TID_QID(toep->ofld_rxq->iq.abs_id) | V_TID_TID(toep->tid) | V_TID_COOKIE(CPL_COOKIE_TOM); + ntuple = select_ntuple(vi, toep->l2te); if (isipv6) { struct cpl_act_open_req6 *cpl = wrtod(wr); struct cpl_t5_act_open_req6 *cpl5 = (void *)cpl; struct cpl_t6_act_open_req6 *cpl6 = (void *)cpl; + struct cpl_t7_act_open_req6 *cpl7 = (void *)cpl; if ((inp->inp_vflag & INP_IPV6) == 0) DONT_OFFLOAD_ACTIVE_OPEN(ENOTSUP); @@ -329,18 +336,23 @@ t4_connect(struct toedev *tod, struct socket *so, struct nhop_object *nh, switch (chip_id(sc)) { case CHELSIO_T4: INIT_TP_WR(cpl, 0); - cpl->params = select_ntuple(vi, toep->l2te); + cpl->params = htobe32((uint32_t)ntuple); break; case CHELSIO_T5: INIT_TP_WR(cpl5, 0); cpl5->iss = htobe32(tp->iss); - cpl5->params = select_ntuple(vi, toep->l2te); + cpl5->params = htobe64(V_FILTER_TUPLE(ntuple)); break; case CHELSIO_T6: - default: INIT_TP_WR(cpl6, 0); cpl6->iss = htobe32(tp->iss); - cpl6->params = select_ntuple(vi, toep->l2te); + cpl6->params = htobe64(V_FILTER_TUPLE(ntuple)); + break; + case CHELSIO_T7: + default: + INIT_TP_WR(cpl7, 0); + cpl7->iss = htobe32(tp->iss); + cpl7->params = htobe64(V_T7_FILTER_TUPLE(ntuple)); break; } OPCODE_TID(cpl) = htobe32(MK_OPCODE_TID(CPL_ACT_OPEN_REQ6, @@ -362,23 +374,28 @@ t4_connect(struct toedev *tod, struct socket *so, struct nhop_object *nh, struct cpl_act_open_req *cpl = wrtod(wr); struct cpl_t5_act_open_req *cpl5 = (void *)cpl; struct cpl_t6_act_open_req *cpl6 = (void *)cpl; + struct cpl_t7_act_open_req *cpl7 = (void *)cpl; switch (chip_id(sc)) { case CHELSIO_T4: INIT_TP_WR(cpl, 0); - cpl->params = select_ntuple(vi, toep->l2te); + cpl->params = htobe32((uint32_t)ntuple); break; case CHELSIO_T5: INIT_TP_WR(cpl5, 0); cpl5->iss = htobe32(tp->iss); - cpl5->params = select_ntuple(vi, toep->l2te); + cpl5->params = htobe64(V_FILTER_TUPLE(ntuple)); break; case CHELSIO_T6: - default: INIT_TP_WR(cpl6, 0); cpl6->iss = htobe32(tp->iss); - cpl6->params = select_ntuple(vi, toep->l2te); + cpl6->params = htobe64(V_FILTER_TUPLE(ntuple)); break; + case CHELSIO_T7: + default: + INIT_TP_WR(cpl7, 0); + cpl7->iss = htobe32(tp->iss); + cpl7->params = htobe64(V_T7_FILTER_TUPLE(ntuple)); } OPCODE_TID(cpl) = htobe32(MK_OPCODE_TID(CPL_ACT_OPEN_REQ, qid_atid)); diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c index 024164ef4c51..82d8f724b382 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -1232,10 +1232,7 @@ select_ntuple(struct vi_info *vi, struct l2t_entry *e) tp->vnic_shift; } - if (is_t4(sc)) - return (htobe32((uint32_t)ntuple)); - else - return (htobe64(V_FILTER_TUPLE(ntuple))); + return (ntuple); } /* From nobody Mon Sep 29 14:37:56 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cb3h45vR9z68K2G; Mon, 29 Sep 2025 14:37:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb3h43M8Mz3t0p; Mon, 29 Sep 2025 14:37:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uldnC/7DqqmShk12rrekaFTBil0yohrsO14xdtOSFzY=; b=H5Q4PiToEWu811v8GLHCZH/8JAlx/HtU8y8nmsznqqcFrIIKs+ClUoSCH54vmmHfYLdNl6 gF14+34o760BUsNZRorqe1MddyG1f+VwHltC/DY/gv18sZwCwe/rXENbV8Iv0M7ZtwBkhG PMtMaPmKs2+BwQY7p6+oHTzny5Or14yHLFZULvKiQFMVz5GecoV/rS4C1WIsMNwVVO6FED /QQg3cROU98WB0xALHeEQoigac1vUdBJwqG/S1olPGXFtjV1n7Vz6vCyRYIcA6tTLFnKMl WLdmTVesgEVnCkAc/AOeZtl6Qwchye+FONA6yy8xYy4zRHoK1FeKODmgOPSrrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uldnC/7DqqmShk12rrekaFTBil0yohrsO14xdtOSFzY=; b=HDC8KlfWLt1LLfOfLn0gT/pA49r0g0UFZnCr6HjAJYuRiybXpH6+I6AdIcBhBYysMI2C8G X+K8MStyjmbNV04KXCpAYSjlDQ/ITf6FQqn79XqqaDvjaLjQ7lQhkGfDMtgBeFEFpCUD09 ZgUxXjNfkC6gkadus3QQRHUXUMWhlNVYQmzv6gObgdsQJQ/E2mj3FNGYk7iDp5w/CB/5N1 C22hKn3rZpdoQFpU99bCL3IFpdtffD5dqeb0b4WrVFv5XnbBviCPcy6lk91EqpyA/lAXaC r+dyN5p06TJRd6XYWstmGx1UbauqtkNpRFS0k9r4wTwi1YYaCNLUqvZ5ycCyng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759156676; a=rsa-sha256; cv=none; b=WX21lP0HTXlfho1vzvt8aUB6ugAD1u68jCf88aWt/2BSjIAm2m00/iVYFyYwOvMjYJA7z5 1teW+ppi1y9W843cLmYjskfve9Kz8+frS+8ok6gj1oMupYTUnutGfFfsDTLFeHCpxs+V1l 9678+Mt9z6+Z67qvP++WzVptQX/bsFh575pM719iv8ELr+zO/5hTDqeZm8ojx0yRwEdGeP dhqeuf/fP+jHzFpx1prn/ycuhtBcTwuZZMpZC0gXZpnOOaKTL2twrcRyAkn1jM4ygH6ne0 OWkP8FMyq8/aPlkol+KVslUHAk2mJADhwI+rN51pEdbNHWlCM1Nqmg+WcmL+aA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb3h42y4Xz1854; Mon, 29 Sep 2025 14:37:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TEbuX4018004; Mon, 29 Sep 2025 14:37:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TEbu1E018001; Mon, 29 Sep 2025 14:37:56 GMT (envelope-from git) Date: Mon, 29 Sep 2025 14:37:56 GMT Message-Id: <202509291437.58TEbu1E018001@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 721033a7d96f - main - cxgbe(4): T7 TCB CPLs have queue and channel in different location 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 721033a7d96f24e80ec18ec9cc17712be55a52b7 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=721033a7d96f24e80ec18ec9cc17712be55a52b7 commit 721033a7d96f24e80ec18ec9cc17712be55a52b7 Author: Navdeep Parhar AuthorDate: 2025-09-29 09:52:55 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 14:26:00 +0000 cxgbe(4): T7 TCB CPLs have queue and channel in different location MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_filter.c | 18 +++++++++++++----- sys/dev/cxgbe/tom/t4_cpl_io.c | 15 ++++++++++++--- sys/dev/cxgbe/tom/t4_tom.c | 11 +++++++++-- 3 files changed, 34 insertions(+), 10 deletions(-) diff --git a/sys/dev/cxgbe/t4_filter.c b/sys/dev/cxgbe/t4_filter.c index 92f882dd38cf..4b583b67ba07 100644 --- a/sys/dev/cxgbe/t4_filter.c +++ b/sys/dev/cxgbe/t4_filter.c @@ -1397,11 +1397,19 @@ set_tcb_field(struct adapter *sc, u_int tid, uint16_t word, uint64_t mask, return (ENOMEM); bzero(req, sizeof(*req)); INIT_TP_WR_MIT_CPL(req, CPL_SET_TCB_FIELD, tid); - if (no_reply == 0) { - req->reply_ctrl = htobe16(V_QUEUENO(sc->sge.fwq.abs_id) | - V_NO_REPLY(0)); - } else - req->reply_ctrl = htobe16(V_NO_REPLY(1)); + if (no_reply) { + req->reply_ctrl = htobe16(F_NO_REPLY); + } else { + const int qid = sc->sge.fwq.abs_id; + + if (chip_id(sc) >= CHELSIO_T7) { + req->reply_ctrl = htobe16(V_T7_QUEUENO(qid) | + V_T7_REPLY_CHAN(0) | V_NO_REPLY(0)); + } else { + req->reply_ctrl = htobe16(V_QUEUENO(qid) | + V_REPLY_CHAN(0) | V_NO_REPLY(0)); + } + } req->word_cookie = htobe16(V_WORD(word) | V_COOKIE(CPL_COOKIE_HASHFILTER)); req->mask = htobe64(mask); req->val = htobe64(val); diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c index 402aa29c05cb..84e31efa8b58 100644 --- a/sys/dev/cxgbe/tom/t4_cpl_io.c +++ b/sys/dev/cxgbe/tom/t4_cpl_io.c @@ -2051,9 +2051,18 @@ write_set_tcb_field(struct adapter *sc, void *dst, struct toepcb *toep, } INIT_TP_WR_MIT_CPL(req, CPL_SET_TCB_FIELD, toep->tid); - req->reply_ctrl = htobe16(V_QUEUENO(toep->ofld_rxq->iq.abs_id)); - if (reply == 0) - req->reply_ctrl |= htobe16(F_NO_REPLY); + if (reply == 0) { + req->reply_ctrl = htobe16(F_NO_REPLY); + } else { + const int qid = toep->ofld_rxq->iq.abs_id; + if (chip_id(sc) >= CHELSIO_T7) { + req->reply_ctrl = htobe16(V_T7_QUEUENO(qid) | + V_T7_REPLY_CHAN(0) | V_NO_REPLY(0)); + } else { + req->reply_ctrl = htobe16(V_QUEUENO(qid) | + V_REPLY_CHAN(0) | V_NO_REPLY(0)); + } + } req->word_cookie = htobe16(V_WORD(word) | V_COOKIE(cookie)); req->mask = htobe64(mask); req->val = htobe64(val); diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c index 82d8f724b382..18d73afc47c5 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -494,8 +494,15 @@ send_get_tcb(struct adapter *sc, u_int tid) bzero(cpl, sizeof(*cpl)); INIT_TP_WR(cpl, tid); OPCODE_TID(cpl) = htobe32(MK_OPCODE_TID(CPL_GET_TCB, tid)); - cpl->reply_ctrl = htobe16(V_REPLY_CHAN(0) | - V_QUEUENO(sc->sge.ofld_rxq[0].iq.cntxt_id)); + if (chip_id(sc) >= CHELSIO_T7) { + cpl->reply_ctrl = + htobe16(V_T7_QUEUENO(sc->sge.ofld_rxq[0].iq.cntxt_id) | + V_T7_REPLY_CHAN(0) | V_NO_REPLY(0)); + } else { + cpl->reply_ctrl = + htobe16(V_QUEUENO(sc->sge.ofld_rxq[0].iq.cntxt_id) | + V_REPLY_CHAN(0) | V_NO_REPLY(0)); + } cpl->cookie = 0xff; commit_wrq_wr(&sc->sge.ctrlq[0], cpl, &cookie); From nobody Mon Sep 29 14:37: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 4cb3h55yd5z68K7J; Mon, 29 Sep 2025 14:37:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb3h54wTXz3sxm; Mon, 29 Sep 2025 14:37:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PpnwNDXAtgx8VPJMzfLq3LiOIhe8n2Po1fTOo4Er814=; b=qh/JXaH86mG20+AaJBfJvX353FxCskl0bjuceQDBTO7c874kd0aq0+Zt1Cu1/AigtmM43M FhVlF1ESHotERQZseEejnMbAysmQIfeTmZjbkcHHPuxx/CqcSCUJqxvLwrSBB3Nt7A3cPr FRnlHZegpYdYN0eRDMLPC3nG3dltDQSRzTrd1IlQat5KdPj7+mJtX7SPoe4+ugwhm705eg I5GuUnXF/TJLt9dudc8m8EW09Vt5G/mhI7X+jlu1451vyIr5/fwS38Ci1TjaBWeYcZv6dm IiB3LLNBJ/JpxyNYVpuUVOuRTsZzm0XKx7K1VDOvJxvSutcI3XR5bcdgMXpDjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PpnwNDXAtgx8VPJMzfLq3LiOIhe8n2Po1fTOo4Er814=; b=Y3dDyRjKgqEWoQ4AndPYq7QZRNkTaInixBko/zqtqz7cKY45NtA26DtpYnsHyMhlonBB60 obrN/wWE/Kfohu0ENDqrJf0wogQZwVozO1iI5R0F6Ybhu9Aisty2YlF7tHajTWhSAIxJJk gRLshRbglLRlhbixNP3N6U/nrrAwm0enXc6rLIhlvxnc+7rHhm7KIl9ruR6OV4XwgJxfnY HMxae4e0Bc3UwhorK+1g5IGJ6bNuUXxEyuOF/gX/6CZgPh4VCVzz7aaK3DawVHQGqRSZ88 8Tj4Kabc6G9NpNdL/a05JtSOMiZDpofCJRQaS2Joicz8esG5gzwb6SvO7+myqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759156677; a=rsa-sha256; cv=none; b=vuau9dYhSWTOvUFNnn0Am6S4ZqA6Uw0MTUpYEStg9L2T1400V3X/mdgJA2IffrlvaUiGuP FNJzQ5L1Q1n3CIAxMEMg89FIeFFffW1FscJA3prA4PdC8VFxfcAUESKXqJAxZO2/bxffeK Ohy51bKhO72V171SbZDdNCFNOW248WkbOhp46sM+v0n3lCs2PvrZZs2s98F8M/J1gfVhV7 oOaL1L0xlMyeO5dCRgzT4pj2zXX5oGGxMPEKAeUDFznvnEbLObaJxxmSglWlEiiEAu1kC0 A9jXfvmbIK5VkM0962+ysULE4D7x/l6xGndrnunYrco5Regl4u6dwGtTR/5Y2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb3h53W9jz18RH; Mon, 29 Sep 2025 14:37:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TEbvbc018040; Mon, 29 Sep 2025 14:37:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TEbvF8018037; Mon, 29 Sep 2025 14:37:57 GMT (envelope-from git) Date: Mon, 29 Sep 2025 14:37:57 GMT Message-Id: <202509291437.58TEbvF8018037@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 77098268dc39 - main - cxgbe(4): T7 ULPTX supports larger data length with MEMIO commands 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 77098268dc397ea86f157f6e66540cd6618e0a05 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=77098268dc397ea86f157f6e66540cd6618e0a05 commit 77098268dc397ea86f157f6e66540cd6618e0a05 Author: Navdeep Parhar AuthorDate: 2025-09-29 13:18:07 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 14:26:00 +0000 cxgbe(4): T7 ULPTX supports larger data length with MEMIO commands MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/crypto/t4_keyctx.c | 4 ++++ sys/dev/cxgbe/iw_cxgbe/mem.c | 13 ++++++++++--- sys/dev/cxgbe/tom/t4_ddp.c | 20 ++++++++++++++++---- 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/sys/dev/cxgbe/crypto/t4_keyctx.c b/sys/dev/cxgbe/crypto/t4_keyctx.c index 50e339ac2e05..52a75666c3aa 100644 --- a/sys/dev/cxgbe/crypto/t4_keyctx.c +++ b/sys/dev/cxgbe/crypto/t4_keyctx.c @@ -665,6 +665,10 @@ t4_write_tlskey_wr(const struct ktls_session *tls, int direction, int tid, kwr->reneg_to_write_rx = V_KEY_GET_LOC(direction == KTLS_TX ? KEY_WRITE_TX : KEY_WRITE_RX); + /* We don't need to use V_T7_ULP_MEMIO_DATA_LEN in this routine. */ + _Static_assert(V_T7_ULP_MEMIO_DATA_LEN(TLS_KEY_CONTEXT_SZ >> 5) == + V_ULP_MEMIO_DATA_LEN(TLS_KEY_CONTEXT_SZ >> 5), "datalen mismatch"); + /* master command */ kwr->cmd = htobe32(V_ULPTX_CMD(ULP_TX_MEM_WRITE) | V_T5_ULP_MEMIO_ORDER(1) | V_T5_ULP_MEMIO_IMM(1)); diff --git a/sys/dev/cxgbe/iw_cxgbe/mem.c b/sys/dev/cxgbe/iw_cxgbe/mem.c index 4a1adc118b7c..9e879bde6169 100644 --- a/sys/dev/cxgbe/iw_cxgbe/mem.c +++ b/sys/dev/cxgbe/iw_cxgbe/mem.c @@ -86,7 +86,10 @@ _c4iw_write_mem_dma_aligned(struct c4iw_rdev *rdev, u32 addr, u32 len, ulpmc->cmd = cpu_to_be32(V_ULPTX_CMD(ULP_TX_MEM_WRITE) | V_T5_ULP_MEMIO_ORDER(1) | V_T5_ULP_MEMIO_FID(sc->sge.ofld_rxq[0].iq.abs_id)); - ulpmc->dlen = cpu_to_be32(V_ULP_MEMIO_DATA_LEN(len>>5)); + if (chip_id(sc) >= CHELSIO_T7) + ulpmc->dlen = cpu_to_be32(V_T7_ULP_MEMIO_DATA_LEN(len>>5)); + else + ulpmc->dlen = cpu_to_be32(V_ULP_MEMIO_DATA_LEN(len>>5)); ulpmc->len16 = cpu_to_be32(DIV_ROUND_UP(wr_len-sizeof(ulpmc->wr), 16)); ulpmc->lock_addr = cpu_to_be32(V_ULP_MEMIO_ADDR(addr)); @@ -149,8 +152,12 @@ _c4iw_write_mem_inline(struct c4iw_rdev *rdev, u32 addr, u32 len, void *data) V_FW_WR_LEN16(DIV_ROUND_UP(wr_len, 16))); ulpmc->cmd = cmd; - ulpmc->dlen = cpu_to_be32(V_ULP_MEMIO_DATA_LEN( - DIV_ROUND_UP(copy_len, T4_ULPTX_MIN_IO))); + if (chip_id(sc) >= CHELSIO_T7) + ulpmc->dlen = cpu_to_be32(V_T7_ULP_MEMIO_DATA_LEN( + DIV_ROUND_UP(copy_len, T4_ULPTX_MIN_IO))); + else + ulpmc->dlen = cpu_to_be32(V_ULP_MEMIO_DATA_LEN( + DIV_ROUND_UP(copy_len, T4_ULPTX_MIN_IO))); ulpmc->len16 = cpu_to_be32(DIV_ROUND_UP(wr_len-sizeof(ulpmc->wr), 16)); ulpmc->lock_addr = cpu_to_be32(V_ULP_MEMIO_ADDR(addr + i * 3)); diff --git a/sys/dev/cxgbe/tom/t4_ddp.c b/sys/dev/cxgbe/tom/t4_ddp.c index da0753296532..35fb1061d867 100644 --- a/sys/dev/cxgbe/tom/t4_ddp.c +++ b/sys/dev/cxgbe/tom/t4_ddp.c @@ -1655,7 +1655,10 @@ t4_write_page_pods_for_ps(struct adapter *sc, struct sge_wrq *wrq, int tid, INIT_ULPTX_WR(ulpmc, len, 0, 0); ulpmc->cmd = cmd; - ulpmc->dlen = htobe32(V_ULP_MEMIO_DATA_LEN(chunk / 32)); + if (chip_id(sc) >= CHELSIO_T7) + ulpmc->dlen = htobe32(V_T7_ULP_MEMIO_DATA_LEN(chunk >> 5)); + else + ulpmc->dlen = htobe32(V_ULP_MEMIO_DATA_LEN(chunk >> 5)); ulpmc->len16 = htobe32(howmany(len - sizeof(ulpmc->wr), 16)); ulpmc->lock_addr = htobe32(V_ULP_MEMIO_ADDR(ppod_addr >> 5)); @@ -1842,7 +1845,10 @@ t4_write_page_pods_for_bio(struct adapter *sc, struct toepcb *toep, ulpmc = mtod(m, struct ulp_mem_io *); INIT_ULPTX_WR(ulpmc, len, 0, toep->tid); ulpmc->cmd = cmd; - ulpmc->dlen = htobe32(V_ULP_MEMIO_DATA_LEN(chunk / 32)); + if (chip_id(sc) >= CHELSIO_T7) + ulpmc->dlen = htobe32(V_T7_ULP_MEMIO_DATA_LEN(chunk >> 5)); + else + ulpmc->dlen = htobe32(V_ULP_MEMIO_DATA_LEN(chunk >> 5)); ulpmc->len16 = htobe32(howmany(len - sizeof(ulpmc->wr), 16)); ulpmc->lock_addr = htobe32(V_ULP_MEMIO_ADDR(ppod_addr >> 5)); @@ -1922,7 +1928,10 @@ t4_write_page_pods_for_buf(struct adapter *sc, struct toepcb *toep, INIT_ULPTX_WR(ulpmc, len, 0, toep->tid); ulpmc->cmd = cmd; - ulpmc->dlen = htobe32(V_ULP_MEMIO_DATA_LEN(chunk / 32)); + if (chip_id(sc) >= CHELSIO_T7) + ulpmc->dlen = htobe32(V_T7_ULP_MEMIO_DATA_LEN(chunk >> 5)); + else + ulpmc->dlen = htobe32(V_ULP_MEMIO_DATA_LEN(chunk >> 5)); ulpmc->len16 = htobe32(howmany(len - sizeof(ulpmc->wr), 16)); ulpmc->lock_addr = htobe32(V_ULP_MEMIO_ADDR(ppod_addr >> 5)); @@ -2013,7 +2022,10 @@ t4_write_page_pods_for_sgl(struct adapter *sc, struct toepcb *toep, INIT_ULPTX_WR(ulpmc, len, 0, toep->tid); ulpmc->cmd = cmd; - ulpmc->dlen = htobe32(V_ULP_MEMIO_DATA_LEN(chunk / 32)); + if (chip_id(sc) >= CHELSIO_T7) + ulpmc->dlen = htobe32(V_T7_ULP_MEMIO_DATA_LEN(chunk >> 5)); + else + ulpmc->dlen = htobe32(V_ULP_MEMIO_DATA_LEN(chunk >> 5)); ulpmc->len16 = htobe32(howmany(len - sizeof(ulpmc->wr), 16)); ulpmc->lock_addr = htobe32(V_ULP_MEMIO_ADDR(ppod_addr >> 5)); From nobody Mon Sep 29 14:37:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cb3h71ry7z68K7K; Mon, 29 Sep 2025 14:37:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb3h706BGz3t8T; Mon, 29 Sep 2025 14:37:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+lsfUKEqnjYNtPvgJcFTQdeqksIPDYa9wDgHUhdmn/M=; b=E/xSFFIn8OTnzyfgx4S9p6M02H+t/RzFu6Xbhb0osEfUxWxf3XIGFGezSa5hXwMsopM6B/ 5Zn9DuhUXT+fX9pX4GWaSauXCfO7xZjjEhmUzldg/jiNkumxbbM3UaSF4j9GWhq6pr1wep wi4qhiN1RA2CAT7gFIHhkRBORqOyS1Lw7gtZlLhW+WtHSHXmG/kHaWtObaaGrcuNTlFVmO Z9DoyHI+Y6M52EtRv9brhwsyNXW/vZDLn0aBomcAo7gNDSyrSoGrm/TxoIxu6HaNglhilJ sqiK7JhCbMZtkMQe2WKmL6liPHXJ4ivmystqiDlRyq4zhAXdEWSllzEuJswHlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+lsfUKEqnjYNtPvgJcFTQdeqksIPDYa9wDgHUhdmn/M=; b=AAYZIc5Ty3Ir39j3w+SNtP9ij5CFKmqXuSxdcBfQLxmN7+wJ04Ymep0hC5HHfUAifkBYnb r+AYGfYimVM2TSMYRaSl+N9M+DLAG1Z6q0CGaLPZkODjt9+k94nyCONxuzpqQlCouVODiG FFDMpxHda9ZiaJnVnM/obc/x0tSfouSuIyU4vKi5pErYnhGoaPjh9aHsJ0bVeQUj1CY63T fcXduMVFHX+8BVbk9LMF28GBnq+xm/CfLU1NTpePmbNlqCRUatRJV0cnZFmJqjl9RcICsA JdsyjcSKb2uwvBsG/ogP6hRuKIF1QLN+10mdOg4+wgcP6AjYv3o7NZLzqjmEPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759156679; a=rsa-sha256; cv=none; b=PTwKWrs+lgKP6OTCAgDCMQaxA/G2bW/pXIYYwXEoaGTpPugP4fkQit4tUpZh1O3kn0i4pU hr7WamEWwvQkYLQ7l9Ld9oAfYSsNoqekM/MON/pgS9ydj/S5LUxaSdMf75YrJPITlB5Km0 J/kPDRFoF00UyfulNNUeq0cs9PVMYEYOo0BVJ8Q6MyDJVX2Ybf3zlIC6cWPGxL58DjIapK R52wIG9mLoCPb98p/K8rRl5pArLbKhUQcAvtbPUCzC8f9DyGRJz8XIFxYYfa7P/BndGvx8 k1LtdF+tPtYxwFsQrOTaVrKpUPeV0v5uSFlTXQjjEZNVluDvBGpfO8F6blGBAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb3h65rm8z18dQ; Mon, 29 Sep 2025 14:37:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TEbwOw018076; Mon, 29 Sep 2025 14:37:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TEbwiY018071; Mon, 29 Sep 2025 14:37:58 GMT (envelope-from git) Date: Mon, 29 Sep 2025 14:37:58 GMT Message-Id: <202509291437.58TEbwiY018071@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: bc48ca42d0d4 - main - cxgbetool(8): Updates for T7 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bc48ca42d0d40b0b88df9cc1d8aec49533529690 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=bc48ca42d0d40b0b88df9cc1d8aec49533529690 commit bc48ca42d0d40b0b88df9cc1d8aec49533529690 Author: Navdeep Parhar AuthorDate: 2025-09-29 13:22:47 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 14:26:01 +0000 cxgbetool(8): Updates for T7 * Registers dump * SGE context * TCB info MFC after: 3 days Sponsored by: Chelsio Communications --- usr.sbin/cxgbetool/Makefile | 1 + usr.sbin/cxgbetool/cxgbetool.c | 257 +- usr.sbin/cxgbetool/reg_defs_t4vf.c | 15 + usr.sbin/cxgbetool/reg_defs_t7.c | 28216 +++++++++++++++++++++++++++++++++++ usr.sbin/cxgbetool/tcb_common.c | 22 +- usr.sbin/cxgbetool/tcbinfot7.c | 1512 ++ usr.sbin/cxgbetool/tcbshowt7.c | 412 + 7 files changed, 30426 insertions(+), 9 deletions(-) diff --git a/usr.sbin/cxgbetool/Makefile b/usr.sbin/cxgbetool/Makefile index cc5290b8aaf5..bf24b11c18c8 100644 --- a/usr.sbin/cxgbetool/Makefile +++ b/usr.sbin/cxgbetool/Makefile @@ -6,6 +6,7 @@ SRCS+= tcb_common.c SRCS+= tcbinfot4.c tcbshowt4.c SRCS+= tcbinfot5.c tcbshowt5.c SRCS+= tcbinfot6.c tcbshowt6.c +SRCS+= tcbinfot7.c tcbshowt7.c CFLAGS+= -I${SRCTOP}/sys/dev/cxgbe -I${SRCTOP}/sys -I. LIBADD= pcap WARNS?= 2 diff --git a/usr.sbin/cxgbetool/cxgbetool.c b/usr.sbin/cxgbetool/cxgbetool.c index c3bd883b39fc..68de86d74092 100644 --- a/usr.sbin/cxgbetool/cxgbetool.c +++ b/usr.sbin/cxgbetool/cxgbetool.c @@ -1,6 +1,5 @@ /*- - * Copyright (c) 2011 Chelsio Communications, Inc. - * All rights reserved. + * Copyright (c) 2011, 2025 Chelsio Communications. * Written by: Navdeep Parhar * * Redistribution and use in source and binary forms, with or without @@ -92,6 +91,7 @@ struct field_desc { #include "reg_defs_t4.c" #include "reg_defs_t5.c" #include "reg_defs_t6.c" +#include "reg_defs_t7.c" #include "reg_defs_t4vf.c" static void @@ -436,6 +436,48 @@ dump_regs_t6(int argc, const char *argv[], const uint32_t *regs) } #undef T6_MODREGS +#define T7_MODREGS(name) { #name, t7_##name##_regs } +static int +dump_regs_t7(int argc, const char *argv[], const uint32_t *regs) +{ + static struct mod_regs t7_mod[] = { + T7_MODREGS(sge), + { "pci", t7_pcie_regs }, + T7_MODREGS(dbg), + { "mc0", t7_mc_t70_regs }, + T7_MODREGS(ma), + { "edc0", t7_edc_t60_regs }, + { "edc1", t7_edc_t61_regs }, + T7_MODREGS(cim), + T7_MODREGS(tp), + { "ulprx", t7_ulp_rx_regs }, + { "ulptx", t7_ulp_tx_regs }, + { "pmrx", t7_pm_rx_regs }, + { "pmtx", t7_pm_tx_regs }, + T7_MODREGS(mps), + { "cplsw", t7_cpl_switch_regs }, + T7_MODREGS(smb), + { "i2c", t7_i2cm_regs }, + T7_MODREGS(mi), + T7_MODREGS(uart), + T7_MODREGS(pmu), + T7_MODREGS(sf), + T7_MODREGS(pl), + T7_MODREGS(le), + T7_MODREGS(ncsi), + { "mac", t7_mac_t7_regs }, + { "hma", t7_hma_t6_regs }, + { "crypto0", t7_crypto_0_regs }, + { "crypto1", t7_crypto_1_regs }, + { "cryptokey", t7_crypto_key_regs }, + T7_MODREGS(arm), + T7_MODREGS(gcache), + }; + + return dump_regs_table(argc, argv, regs, t7_mod, nitems(t7_mod)); +} +#undef T7_MODREGS + static int dump_regs_t4vf(int argc, const char *argv[], const uint32_t *regs) { @@ -478,6 +520,20 @@ dump_regs_t6vf(int argc, const char *argv[], const uint32_t *regs) return dump_regs_table(argc, argv, regs, t6vf_mod, nitems(t6vf_mod)); } +static int +dump_regs_t7vf(int argc, const char *argv[], const uint32_t *regs) +{ + static struct mod_regs t7vf_mod[] = { + { "sge", t5vf_sge_regs }, + { "mps", t4vf_mps_regs }, + { "pl", t7vf_pl_regs }, + { "mbdata", t4vf_mbdata_regs }, + { "cim", t4vf_cim_regs }, + }; + + return dump_regs_table(argc, argv, regs, t7vf_mod, nitems(t7vf_mod)); +} + static int dump_regs(int argc, const char *argv[]) { @@ -515,6 +571,11 @@ dump_regs(int argc, const char *argv[]) rc = dump_regs_t6vf(argc, argv, regs.data); else rc = dump_regs_t6(argc, argv, regs.data); + } else if (vers == 7) { + if (revision == 0x3f) + rc = dump_regs_t7vf(argc, argv, regs.data); + else + rc = dump_regs_t7(argc, argv, regs.data); } else { warnx("%s (type %d, rev %d) is not a known card.", g.nexus, vers, revision); @@ -1492,7 +1553,180 @@ show_struct(const uint32_t *words, int nwords, const struct field_desc *fd) #define FIELD1(name, start) FIELD(name, start, start) static void -show_t5t6_ctxt(const struct t4_sge_context *p, int vers) +show_t7_ctxt(const struct t4_sge_ctxt *p) +{ + static struct field_desc egress_t7[] = { + FIELD("uPToken_4k:", 197, 198), + FIELD("WrLength_5:", 196, 196), + FIELD("CpuId:", 193, 195), + FIELD("PCIeDataChannel_1:", 192, 192), + FIELD("DCA_ST:", 181, 191), + FIELD("StatusPgNS:", 180, 180), + FIELD("StatusPgRO:", 179, 179), + FIELD("FetchNS:", 178, 178), + FIELD("FetchRO:", 177, 177), + FIELD("Valid:", 176, 176), + FIELD("ReschedulePending_1:", 175, 175), + FIELD("PCIeDataChannel:", 174, 174), + FIELD("StatusPgTPHintEn:", 173, 173), + FIELD("StatusPgTPHint:", 171, 172), + FIELD("FetchTPHintEn:", 170, 170), + FIELD("FetchTPHint:", 168, 169), + FIELD("FCThreshOverride:", 167, 167), + { "WRLength:", 162, 166, 9, 0, 1 }, + FIELD("WRLengthKnown:", 161, 161), + FIELD("ReschedulePending:", 160, 160), + FIELD("TimerIx:", 157, 159), + FIELD("FetchBurstMin:", 156, 156), + FIELD("FLMPacking:", 155, 155), + FIELD("FetchBurstMax:", 153, 154), + FIELD("uPToken:", 133, 152), + FIELD("uPTokenEn:", 132, 132), + FIELD("UserModeIO:", 131, 131), + FIELD("uPFLCredits:", 123, 130), + FIELD("uPFLCreditEn:", 122, 122), + FIELD("FID:", 111, 121), + FIELD("HostFCMode:", 109, 110), + FIELD("HostFCOwner:", 108, 108), + { "CIDXFlushThresh:", 105, 107, 0, 0, 1 }, + FIELD("CIDX:", 89, 104), + FIELD("PIDX:", 73, 88), + { "BaseAddress:", 18, 72, 9, 1 }, + FIELD("QueueSize:", 2, 17), + FIELD("QueueType:", 1, 1), + FIELD("FetchSizeMode:", 0, 0), + { NULL } + }; + static struct field_desc fl_t7[] = { + FIELD("FLMcontextID_4k:", 197, 198), + FIELD("CpuId:", 193, 195), + FIELD("PCIeDataChannel_1:", 192, 192), + FIELD("DCA_ST:", 181, 191), + FIELD("StatusPgNS:", 180, 180), + FIELD("StatusPgRO:", 179, 179), + FIELD("FetchNS:", 178, 178), + FIELD("FetchRO:", 177, 177), + FIELD("Valid:", 176, 176), + FIELD("PCIeDataChannel:", 174, 175), + FIELD("StatusPgTPHintEn:", 173, 173), + FIELD("StatusPgTPHint:", 171, 172), + FIELD("FetchTPHintEn:", 170, 170), + FIELD("FetchTPHint:", 168, 169), + FIELD("FCThreshOverride:", 167, 167), + FIELD("ReschedulePending:", 160, 160), + FIELD("OnChipQueue:", 159, 159), + FIELD("FetchSizeMode:", 158, 158), + { "FetchBurstMin:", 156, 157, 4, 0, 1 }, + FIELD("FLMPacking:", 155, 155), + FIELD("FetchBurstMax:", 153, 154), + FIELD("FLMcongMode:", 152, 152), + FIELD("MaxuPFLCredits:", 144, 151), + FIELD("FLMcontextID:", 133, 143), + FIELD("uPTokenEn:", 132, 132), + FIELD("UserModeIO:", 131, 131), + FIELD("uPFLCredits:", 123, 130), + FIELD("uPFLCreditEn:", 122, 122), + FIELD("FID:", 111, 121), + FIELD("HostFCMode:", 109, 110), + FIELD("HostFCOwner:", 108, 108), + { "CIDXFlushThresh:", 105, 107, 0, 0, 1 }, + FIELD("CIDX:", 89, 104), + FIELD("PIDX:", 73, 88), + { "BaseAddress:", 18, 72, 9, 1 }, + FIELD("QueueSize:", 2, 17), + FIELD("QueueType:", 1, 1), + FIELD("CachePriority:", 0, 0), + { NULL } + }; + static struct field_desc ingress_t7[] = { + FIELD("Fid:", 171, 182), + FIELD("InterruptIDX4K:", 170, 170), + FIELD("CoalEn:", 169, 169), + FIELD("CoalAbort:", 168, 168), + FIELD("CoalCntr:", 161, 167), + FIELD("CoalCompTimerStatus:", 160, 160), + FIELD("CoalCompCntrStatus:", 159, 159), + FIELD("SP_NS:", 158, 158), + FIELD("SP_RO:", 157, 157), + FIELD("SP_TPHintEn:", 156, 156), + FIELD("SP_TPHint:", 154, 155), + FIELD("DCA_ST:", 143, 153), + FIELD("ISCSICoalescing:", 142, 142), + FIELD("Queue_Valid:", 141, 141), + FIELD("TimerPending:", 140, 140), + FIELD("DropRSS:", 139, 139), + FIELD("PCIeChannel:", 137, 138), + FIELD("SEInterruptArmed:", 136, 136), + FIELD("CongestionMgtEnable:", 135, 135), + FIELD("NoSnoop:", 134, 134), + FIELD("RelaxedOrdering:", 133, 133), + FIELD("GTSmode:", 132, 132), + FIELD("TPHintEn:", 131, 131), + FIELD("TPHint:", 129, 130), + FIELD("UpdateScheduling:", 128, 128), + FIELD("UpdateDelivery:", 126, 127), + FIELD("InterruptSent:", 125, 125), + FIELD("InterruptIDX:", 114, 124), + FIELD("InterruptDestination:", 113, 113), + FIELD("InterruptArmed:", 112, 112), + FIELD("RxIntCounter:", 106, 111), + FIELD("RxIntCounterThreshold:", 104, 105), + FIELD("Generation:", 103, 103), + { "BaseAddress:", 48, 102, 9, 1 }, + FIELD("PIDX:", 32, 47), + FIELD("CIDX:", 16, 31), + { "QueueSize:", 4, 15, 4, 0 }, + { "QueueEntrySize:", 2, 3, 4, 0, 1 }, + FIELD("QueueEntryOverride:", 1, 1), + FIELD("CachePriority:", 0, 0), + { NULL } + }; + static struct field_desc flm_t7[] = { + FIELD("MidCongEn:", 154, 154), + FIELD("FlPtr:", 90, 153), + FIELD("Valid:", 89, 89), + FIELD("SplitLenMode:", 87, 88), + FIELD("TPHintEn:", 86, 86), + FIELD("TPHint:", 84, 85), + FIELD("NoSnoop:", 83, 83), + FIELD("RelaxedOrdering:", 82, 82), + FIELD("DCA_ST:", 71, 81), + FIELD("EQid:", 54, 70), + FIELD("SplitEn:", 52, 53), + FIELD("PadEn:", 51, 51), + FIELD("PackEn:", 50, 50), + FIELD("Cache_Lock :", 49, 49), + FIELD("CongDrop:", 48, 48), + FIELD("Inflifght:", 47, 47), + FIELD("CongEn:", 46, 46), + FIELD("CongMode:", 45, 45), + FIELD("PackOffset:", 20, 39), + FIELD("CIDX:", 8, 15), + FIELD("PIDX:", 0, 7), + { NULL } + }; + static struct field_desc conm_t7[] = { + FIELD("CngMPSEnable:", 37, 37), + FIELD("CngTPMode:", 35, 36), + FIELD("CngDBPHdr:", 34, 34), + FIELD("CngDBPData:", 33, 33), + FIELD("CngIMSG:", 32, 32), + { "CngChMap:", 0, 31, 0, 1, 0 }, + { NULL } + }; + + if (p->mem_id == SGE_CONTEXT_EGRESS) + show_struct(p->data, 7, (p->data[0] & 2) ? fl_t7 : egress_t7); + else if (p->mem_id == SGE_CONTEXT_FLM) + show_struct(p->data, 5, flm_t7); + else if (p->mem_id == SGE_CONTEXT_INGRESS) + show_struct(p->data, 6, ingress_t7); + else if (p->mem_id == SGE_CONTEXT_CNM) + show_struct(p->data, 2, conm_t7); +} + +static void +show_t5t6_ctxt(const struct t4_sge_ctxt *p, int vers) { static struct field_desc egress_t5[] = { FIELD("DCA_ST:", 181, 191), @@ -1743,7 +1977,7 @@ show_t5t6_ctxt(const struct t4_sge_context *p, int vers) } static void -show_t4_ctxt(const struct t4_sge_context *p) +show_t4_ctxt(const struct t4_sge_ctxt *p) { static struct field_desc egress_t4[] = { FIELD1("StatusPgNS:", 180), @@ -1887,7 +2121,7 @@ get_sge_context(int argc, const char *argv[]) int rc; char *p; long cid; - struct t4_sge_context cntxt = {0}; + struct t4_sge_ctxt cntxt = {0}; if (argc != 2) { warnx("sge_context: incorrect number of arguments."); @@ -1915,14 +2149,21 @@ get_sge_context(int argc, const char *argv[]) } cntxt.cid = cid; - rc = doit(CHELSIO_T4_GET_SGE_CONTEXT, &cntxt); + rc = doit(CHELSIO_T4_GET_SGE_CTXT, &cntxt); if (rc != 0) return (rc); - if (g.chip_id == 4) + switch (g.chip_id) { + case 4: show_t4_ctxt(&cntxt); - else + break; + case 5: + case 6: show_t5t6_ctxt(&cntxt, g.chip_id); + break; + default: + show_t7_ctxt(&cntxt); + } return (0); } diff --git a/usr.sbin/cxgbetool/reg_defs_t4vf.c b/usr.sbin/cxgbetool/reg_defs_t4vf.c index 5ea7d4f276dd..bf60ee8a8356 100644 --- a/usr.sbin/cxgbetool/reg_defs_t4vf.c +++ b/usr.sbin/cxgbetool/reg_defs_t4vf.c @@ -122,6 +122,21 @@ struct reg_info t6vf_pl_regs[] = { { NULL, 0, 0 } }; +struct reg_info t7vf_pl_regs[] = { + { "PL_WHOAMI", 0x200, 0 }, + { "PortxMap", 24, 3 }, + { "SourceBus", 16, 2 }, + { "SourcePF", 9, 3 }, + { "IsVF", 8, 1 }, + { "VFID", 0, 8 }, + { "PL_VF_REV", 0x204, 0 }, + { "ChipID", 4, 4 }, + { "Rev", 0, 4 }, + { "PL_VF_REVISION", 0x208, 0 }, + + { NULL, 0, 0 } +}; + struct reg_info t4vf_cim_regs[] = { /* * Note: the Mailbox Control register has read side-effects so diff --git a/usr.sbin/cxgbetool/reg_defs_t7.c b/usr.sbin/cxgbetool/reg_defs_t7.c new file mode 100644 index 000000000000..549db9c546d5 --- /dev/null +++ b/usr.sbin/cxgbetool/reg_defs_t7.c @@ -0,0 +1,28216 @@ +/* This file is automatically generated --- changes will be lost */ +/* Generation Date : Thu Sep 11 05:26:14 PM IST 2025 */ +/* Directory name: t7_reg.txt, Changeset: 5945:1487219ecb20 */ + +struct reg_info t7_sge_regs[] = { + { "SGE_PF_KDOORBELL", 0x1e000, 0 }, + { "QID", 15, 17 }, + { "Sync", 14, 1 }, + { "Type", 13, 1 }, + { "PIDX", 0, 13 }, + { "SGE_PF_GTS", 0x1e004, 0 }, + { "IngressQID", 16, 16 }, + { "TimerReg", 13, 3 }, + { "SEIntArm", 12, 1 }, + { "CIDXInc", 0, 12 }, + { "SGE_PF_KTIMESTAMP_LO", 0x1e008, 0 }, + { "SGE_PF_KTIMESTAMP_HI", 0x1e00c, 0 }, + { "SGE_PF_KDOORBELL", 0x1e400, 0 }, + { "QID", 15, 17 }, + { "Sync", 14, 1 }, + { "Type", 13, 1 }, + { "PIDX", 0, 13 }, + { "SGE_PF_GTS", 0x1e404, 0 }, + { "IngressQID", 16, 16 }, + { "TimerReg", 13, 3 }, + { "SEIntArm", 12, 1 }, + { "CIDXInc", 0, 12 }, + { "SGE_PF_KTIMESTAMP_LO", 0x1e408, 0 }, + { "SGE_PF_KTIMESTAMP_HI", 0x1e40c, 0 }, + { "SGE_PF_KDOORBELL", 0x1e800, 0 }, + { "QID", 15, 17 }, + { "Sync", 14, 1 }, + { "Type", 13, 1 }, + { "PIDX", 0, 13 }, + { "SGE_PF_GTS", 0x1e804, 0 }, + { "IngressQID", 16, 16 }, + { "TimerReg", 13, 3 }, + { "SEIntArm", 12, 1 }, + { "CIDXInc", 0, 12 }, + { "SGE_PF_KTIMESTAMP_LO", 0x1e808, 0 }, + { "SGE_PF_KTIMESTAMP_HI", 0x1e80c, 0 }, + { "SGE_PF_KDOORBELL", 0x1ec00, 0 }, + { "QID", 15, 17 }, + { "Sync", 14, 1 }, + { "Type", 13, 1 }, + { "PIDX", 0, 13 }, + { "SGE_PF_GTS", 0x1ec04, 0 }, + { "IngressQID", 16, 16 }, + { "TimerReg", 13, 3 }, + { "SEIntArm", 12, 1 }, + { "CIDXInc", 0, 12 }, + { "SGE_PF_KTIMESTAMP_LO", 0x1ec08, 0 }, + { "SGE_PF_KTIMESTAMP_HI", 0x1ec0c, 0 }, + { "SGE_PF_KDOORBELL", 0x1f000, 0 }, + { "QID", 15, 17 }, + { "Sync", 14, 1 }, + { "Type", 13, 1 }, + { "PIDX", 0, 13 }, + { "SGE_PF_GTS", 0x1f004, 0 }, + { "IngressQID", 16, 16 }, + { "TimerReg", 13, 3 }, + { "SEIntArm", 12, 1 }, + { "CIDXInc", 0, 12 }, + { "SGE_PF_KTIMESTAMP_LO", 0x1f008, 0 }, + { "SGE_PF_KTIMESTAMP_HI", 0x1f00c, 0 }, + { "SGE_PF_KDOORBELL", 0x1f400, 0 }, + { "QID", 15, 17 }, + { "Sync", 14, 1 }, + { "Type", 13, 1 }, + { "PIDX", 0, 13 }, + { "SGE_PF_GTS", 0x1f404, 0 }, + { "IngressQID", 16, 16 }, + { "TimerReg", 13, 3 }, + { "SEIntArm", 12, 1 }, + { "CIDXInc", 0, 12 }, + { "SGE_PF_KTIMESTAMP_LO", 0x1f408, 0 }, + { "SGE_PF_KTIMESTAMP_HI", 0x1f40c, 0 }, + { "SGE_PF_KDOORBELL", 0x1f800, 0 }, + { "QID", 15, 17 }, + { "Sync", 14, 1 }, + { "Type", 13, 1 }, + { "PIDX", 0, 13 }, + { "SGE_PF_GTS", 0x1f804, 0 }, + { "IngressQID", 16, 16 }, + { "TimerReg", 13, 3 }, + { "SEIntArm", 12, 1 }, + { "CIDXInc", 0, 12 }, + { "SGE_PF_KTIMESTAMP_LO", 0x1f808, 0 }, + { "SGE_PF_KTIMESTAMP_HI", 0x1f80c, 0 }, + { "SGE_PF_KDOORBELL", 0x1fc00, 0 }, + { "QID", 15, 17 }, + { "Sync", 14, 1 }, + { "Type", 13, 1 }, + { "PIDX", 0, 13 }, + { "SGE_PF_GTS", 0x1fc04, 0 }, + { "IngressQID", 16, 16 }, + { "TimerReg", 13, 3 }, + { "SEIntArm", 12, 1 }, + { "CIDXInc", 0, 12 }, + { "SGE_PF_KTIMESTAMP_LO", 0x1fc08, 0 }, + { "SGE_PF_KTIMESTAMP_HI", 0x1fc0c, 0 }, + { "SGE_CONTROL", 0x1008, 0 }, + { "IgrAllCPLtoFL", 31, 1 }, + { "FLSplitMin", 22, 9 }, + { "NumOfFid", 19, 3 }, + { "RxPktCPLMode", 18, 1 }, + { "EgrStatusPageSize", 17, 1 }, + { "IngHintEnable2", 16, 1 }, + { "IngHintEnable1", 15, 1 }, + { "IngHintEnable0", 14, 1 }, + { "IngIntCompareIDX", 13, 1 }, + { "PktShift", 10, 3 }, + { "IngPCIeBoundary", 7, 3 }, + { "IngPadBoundary", 4, 3 }, + { "IngHintEnable3", 3, 1 }, + { "tf_mode", 1, 2 }, + { "GlobalEnable", 0, 1 }, + { "SGE_HOST_PAGE_SIZE", 0x100c, 0 }, + { "HostPageSizePF7", 28, 4 }, + { "HostPageSizePF6", 24, 4 }, + { "HostPageSizePF5", 20, 4 }, + { "HostPageSizePF4", 16, 4 }, + { "HostPageSizePF3", 12, 4 }, + { "HostPageSizePF2", 8, 4 }, + { "HostPageSizePF1", 4, 4 }, + { "HostPageSizePF0", 0, 4 }, + { "SGE_EGRESS_QUEUES_PER_PAGE_PF", 0x1010, 0 }, + { "QueuesPerPagePF7", 28, 4 }, + { "QueuesPerPagePF6", 24, 4 }, + { "QueuesPerPagePF5", 20, 4 }, + { "QueuesPerPagePF4", 16, 4 }, + { "QueuesPerPagePF3", 12, 4 }, + { "QueuesPerPagePF2", 8, 4 }, + { "QueuesPerPagePF1", 4, 4 }, + { "QueuesPerPagePF0", 0, 4 }, + { "SGE_EGRESS_QUEUES_PER_PAGE_VF", 0x1014, 0 }, + { "QueuesPerPageVFPF7", 28, 4 }, + { "QueuesPerPageVFPF6", 24, 4 }, + { "QueuesPerPageVFPF5", 20, 4 }, + { "QueuesPerPageVFPF4", 16, 4 }, + { "QueuesPerPageVFPF3", 12, 4 }, + { "QueuesPerPageVFPF2", 8, 4 }, + { "QueuesPerPageVFPF1", 4, 4 }, + { "QueuesPerPageVFPF0", 0, 4 }, + { "SGE_USER_MODE_LIMITS", 0x1018, 0 }, + { "Opcode_Min", 24, 8 }, + { "Opcode_Max", 16, 8 }, + { "Length_Min", 8, 8 }, + { "Length_Max", 0, 8 }, + { "SGE_WR_ERROR", 0x101c, 0 }, + { "WR_Sendpath_Error_Opcode", 16, 8 }, + { "WR_Sendpath_Opcode", 8, 8 }, + { "WR_Error_Opcode", 0, 8 }, + { "SGE_INT_CAUSE1", 0x1024, 0 }, + { "perr_flm_CreditFifo", 30, 1 }, + { "perr_imsg_hint_fifo", 29, 1 }, + { "perr_headersplit_fifo3", 28, 1 }, + { "perr_headersplit_fifo2", 27, 1 }, + { "perr_payload_fifo3", 26, 1 }, + { "perr_payload_fifo2", 25, 1 }, + { "perr_pc_rsp", 23, 1 }, + { "perr_pc_req", 22, 1 }, + { "perr_dbp_pc_rsp_fifo3", 21, 1 }, + { "perr_dbp_pc_rsp_fifo2", 20, 1 }, + { "perr_dbp_pc_rsp_fifo1", 19, 1 }, + { "perr_dbp_pc_rsp_fifo0", 18, 1 }, + { "perr_dmarbt", 17, 1 }, + { "perr_flm_DbpFifo", 16, 1 }, + { "perr_flm_MCReq_fifo", 15, 1 }, + { "perr_flm_HintFifo", 14, 1 }, + { "perr_align_ctl_fifo3", 13, 1 }, + { "perr_align_ctl_fifo2", 12, 1 }, + { "perr_align_ctl_fifo1", 11, 1 }, + { "perr_align_ctl_fifo0", 10, 1 }, + { "perr_edma_fifo3", 9, 1 }, + { "perr_edma_fifo2", 8, 1 }, + { "perr_edma_fifo1", 7, 1 }, + { "perr_edma_fifo0", 6, 1 }, + { "perr_pd_fifo3", 5, 1 }, + { "perr_pd_fifo2", 4, 1 }, + { "perr_pd_fifo1", 3, 1 }, + { "perr_pd_fifo0", 2, 1 }, + { "perr_ing_ctxt_mifrsp", 1, 1 }, + { "perr_egr_ctxt_mifrsp", 0, 1 }, + { "SGE_INT_ENABLE1", 0x1028, 0 }, + { "perr_flm_CreditFifo", 30, 1 }, + { "perr_imsg_hint_fifo", 29, 1 }, + { "perr_headersplit_fifo3", 28, 1 }, + { "perr_headersplit_fifo2", 27, 1 }, + { "perr_payload_fifo3", 26, 1 }, + { "perr_payload_fifo2", 25, 1 }, + { "perr_pc_rsp", 23, 1 }, + { "perr_pc_req", 22, 1 }, + { "perr_dbp_pc_rsp_fifo3", 21, 1 }, + { "perr_dbp_pc_rsp_fifo2", 20, 1 }, + { "perr_dbp_pc_rsp_fifo1", 19, 1 }, + { "perr_dbp_pc_rsp_fifo0", 18, 1 }, + { "perr_dmarbt", 17, 1 }, + { "perr_flm_DbpFifo", 16, 1 }, + { "perr_flm_MCReq_fifo", 15, 1 }, + { "perr_flm_HintFifo", 14, 1 }, + { "perr_align_ctl_fifo3", 13, 1 }, + { "perr_align_ctl_fifo2", 12, 1 }, + { "perr_align_ctl_fifo1", 11, 1 }, + { "perr_align_ctl_fifo0", 10, 1 }, + { "perr_edma_fifo3", 9, 1 }, + { "perr_edma_fifo2", 8, 1 }, + { "perr_edma_fifo1", 7, 1 }, + { "perr_edma_fifo0", 6, 1 }, + { "perr_pd_fifo3", 5, 1 }, + { "perr_pd_fifo2", 4, 1 }, + { "perr_pd_fifo1", 3, 1 }, + { "perr_pd_fifo0", 2, 1 }, + { "perr_ing_ctxt_mifrsp", 1, 1 }, + { "perr_egr_ctxt_mifrsp", 0, 1 }, + { "SGE_PERR_ENABLE1", 0x102c, 0 }, + { "perr_flm_CreditFifo", 30, 1 }, + { "perr_imsg_hint_fifo", 29, 1 }, + { "perr_headersplit_fifo3", 28, 1 }, + { "perr_headersplit_fifo2", 27, 1 }, + { "perr_payload_fifo3", 26, 1 }, + { "perr_payload_fifo2", 25, 1 }, + { "perr_pc_rsp", 23, 1 }, + { "perr_pc_req", 22, 1 }, + { "perr_dbp_pc_rsp_fifo3", 21, 1 }, + { "perr_dbp_pc_rsp_fifo2", 20, 1 }, + { "perr_dbp_pc_rsp_fifo1", 19, 1 }, + { "perr_dbp_pc_rsp_fifo0", 18, 1 }, + { "perr_dmarbt", 17, 1 }, + { "perr_flm_DbpFifo", 16, 1 }, + { "perr_flm_MCReq_fifo", 15, 1 }, + { "perr_flm_HintFifo", 14, 1 }, + { "perr_align_ctl_fifo3", 13, 1 }, + { "perr_align_ctl_fifo2", 12, 1 }, + { "perr_align_ctl_fifo1", 11, 1 }, + { "perr_align_ctl_fifo0", 10, 1 }, + { "perr_edma_fifo3", 9, 1 }, + { "perr_edma_fifo2", 8, 1 }, + { "perr_edma_fifo1", 7, 1 }, + { "perr_edma_fifo0", 6, 1 }, + { "perr_pd_fifo3", 5, 1 }, + { "perr_pd_fifo2", 4, 1 }, + { "perr_pd_fifo1", 3, 1 }, + { "perr_pd_fifo0", 2, 1 }, + { "perr_ing_ctxt_mifrsp", 1, 1 }, + { "perr_egr_ctxt_mifrsp", 0, 1 }, + { "SGE_INT_CAUSE2", 0x1030, 0 }, + { "tf_fifo_perr", 24, 1 }, + { "perr_egr_dbp_tx_coal", 23, 1 }, + { "perr_dbp_fl_fifo", 22, 1 }, + { "deq_ll_perr", 21, 1 }, + { "enq_perr", 20, 1 }, + { "deq_out_perr", 19, 1 }, + { "buf_perr", 18, 1 }, + { "perr_isw_idma3_fifo", 15, 1 }, + { "perr_conm_sram", 14, 1 }, + { "perr_isw_idma2_fifo", 13, 1 }, + { "perr_isw_idma0_fifo", 12, 1 }, + { "perr_isw_idma1_fifo", 11, 1 }, + { "perr_isw_dbp_fifo", 10, 1 }, + { "perr_isw_gts_fifo", 9, 1 }, + { "perr_itp_evr", 8, 1 }, + { "perr_flm_cntxmem", 7, 1 }, + { "perr_flm_l1Cache", 6, 1 }, + { "sge_ipp_fifo_perr", 5, 1 }, + { "perr_dbp_hp_fifo", 4, 1 }, + { "perr_db_fifo", 3, 1 }, + { "perr_ing_ctxt_cache", 2, 1 }, + { "perr_egr_ctxt_cache", 1, 1 }, + { "perr_base_size", 0, 1 }, + { "SGE_INT_ENABLE2", 0x1034, 0 }, + { "tf_fifo_perr", 24, 1 }, + { "perr_egr_dbp_tx_coal", 23, 1 }, + { "perr_dbp_fl_fifo", 22, 1 }, + { "deq_ll_perr", 21, 1 }, + { "enq_perr", 20, 1 }, + { "deq_out_perr", 19, 1 }, + { "buf_perr", 18, 1 }, + { "perr_isw_idma3_fifo", 15, 1 }, + { "perr_conm_sram", 14, 1 }, + { "perr_isw_idma2_fifo", 13, 1 }, + { "perr_isw_idma0_fifo", 12, 1 }, + { "perr_isw_idma1_fifo", 11, 1 }, + { "perr_isw_dbp_fifo", 10, 1 }, + { "perr_isw_gts_fifo", 9, 1 }, + { "perr_itp_evr", 8, 1 }, + { "perr_flm_cntxmem", 7, 1 }, + { "perr_flm_l1Cache", 6, 1 }, + { "sge_ipp_fifo_perr", 5, 1 }, + { "perr_dbp_hp_fifo", 4, 1 }, + { "perr_db_fifo", 3, 1 }, + { "perr_ing_ctxt_cache", 2, 1 }, + { "perr_egr_ctxt_cache", 1, 1 }, + { "perr_base_size", 0, 1 }, + { "SGE_PERR_ENABLE2", 0x1038, 0 }, + { "tf_fifo_perr", 24, 1 }, + { "perr_egr_dbp_tx_coal", 23, 1 }, + { "perr_dbp_fl_fifo", 22, 1 }, + { "deq_ll_perr", 21, 1 }, + { "enq_perr", 20, 1 }, + { "deq_out_perr", 19, 1 }, + { "buf_perr", 18, 1 }, + { "perr_isw_idma3_fifo", 15, 1 }, + { "perr_conm_sram", 14, 1 }, + { "perr_isw_idma2_fifo", 13, 1 }, + { "perr_isw_idma0_fifo", 12, 1 }, + { "perr_isw_idma1_fifo", 11, 1 }, + { "perr_isw_dbp_fifo", 10, 1 }, + { "perr_isw_gts_fifo", 9, 1 }, + { "perr_itp_evr", 8, 1 }, + { "perr_flm_cntxmem", 7, 1 }, + { "perr_flm_l1Cache", 6, 1 }, + { "sge_ipp_fifo_perr", 5, 1 }, + { "perr_dbp_hp_fifo", 4, 1 }, + { "perr_dbp_lp_fifo", 3, 1 }, + { "perr_ing_ctxt_cache", 2, 1 }, + { "perr_egr_ctxt_cache", 1, 1 }, + { "perr_base_size", 0, 1 }, + { "SGE_INT_CAUSE3", 0x103c, 0 }, + { "err_flm_dbp", 31, 1 }, + { "err_flm_idma1", 30, 1 }, + { "err_flm_idma0", 29, 1 }, + { "err_flm_hint", 28, 1 }, + { "err_pcie_error3", 27, 1 }, + { "err_pcie_error2", 26, 1 }, + { "err_pcie_error1", 25, 1 }, + { "err_pcie_error0", 24, 1 }, + { "err_timer_above_max_qid", 23, 1 }, + { "err_cpl_exceed_iqe_size", 22, 1 }, + { "err_invalid_cidx_inc", 21, 1 }, + { "err_itp_time_paused", 20, 1 }, + { "err_cpl_opcode_0", 19, 1 }, + { "err_dropped_db", 18, 1 }, + { "err_data_cpl_on_high_qid1", 17, 1 }, + { "err_data_cpl_on_high_qid0", 16, 1 }, + { "err_bad_db_pidx3", 15, 1 }, + { "err_bad_db_pidx2", 14, 1 }, + { "err_bad_db_pidx1", 13, 1 }, + { "err_bad_db_pidx0", 12, 1 }, + { "err_ing_pcie_chan", 11, 1 }, + { "err_ing_ctxt_prio", 10, 1 }, + { "err_egr_ctxt_prio", 9, 1 }, + { "dbp_tbuf_full", 8, 1 }, + { "fatal_wre_len", 7, 1 }, + { "reg_address_err", 6, 1 }, + { "ingress_size_err", 5, 1 }, + { "egress_size_err", 4, 1 }, + { "err_inv_ctxt3", 3, 1 }, + { "err_inv_ctxt2", 2, 1 }, + { "err_inv_ctxt1", 1, 1 }, + { "err_inv_ctxt0", 0, 1 }, + { "SGE_INT_ENABLE3", 0x1040, 0 }, + { "err_flm_dbp", 31, 1 }, + { "err_flm_idma1", 30, 1 }, + { "err_flm_idma0", 29, 1 }, + { "err_flm_hint", 28, 1 }, + { "err_pcie_error3", 27, 1 }, + { "err_pcie_error2", 26, 1 }, + { "err_pcie_error1", 25, 1 }, + { "err_pcie_error0", 24, 1 }, + { "err_timer_above_max_qid", 23, 1 }, + { "err_cpl_exceed_iqe_size", 22, 1 }, + { "err_invalid_cidx_inc", 21, 1 }, + { "err_itp_time_paused", 20, 1 }, + { "err_cpl_opcode_0", 19, 1 }, + { "err_dropped_db", 18, 1 }, + { "err_data_cpl_on_high_qid1", 17, 1 }, + { "err_data_cpl_on_high_qid0", 16, 1 }, + { "err_bad_db_pidx3", 15, 1 }, + { "err_bad_db_pidx2", 14, 1 }, + { "err_bad_db_pidx1", 13, 1 }, + { "err_bad_db_pidx0", 12, 1 }, + { "err_ing_pcie_chan", 11, 1 }, + { "err_ing_ctxt_prio", 10, 1 }, + { "err_egr_ctxt_prio", 9, 1 }, + { "dbp_tbuf_full", 8, 1 }, + { "fatal_wre_len", 7, 1 }, + { "reg_address_err", 6, 1 }, + { "ingress_size_err", 5, 1 }, + { "egress_size_err", 4, 1 }, + { "err_inv_ctxt3", 3, 1 }, + { "err_inv_ctxt2", 2, 1 }, + { "err_inv_ctxt1", 1, 1 }, + { "err_inv_ctxt0", 0, 1 }, + { "SGE_FL_BUFFER_SIZE0", 0x1044, 0 }, + { "Size", 4, 20 }, + { "SGE_FL_BUFFER_SIZE1", 0x1048, 0 }, + { "Size", 4, 20 }, + { "SGE_FL_BUFFER_SIZE2", 0x104c, 0 }, + { "Size", 4, 20 }, + { "SGE_FL_BUFFER_SIZE3", 0x1050, 0 }, + { "Size", 4, 20 }, + { "SGE_FL_BUFFER_SIZE4", 0x1054, 0 }, + { "Size", 4, 20 }, + { "SGE_FL_BUFFER_SIZE5", 0x1058, 0 }, + { "Size", 4, 20 }, + { "SGE_FL_BUFFER_SIZE6", 0x105c, 0 }, + { "Size", 4, 20 }, + { "SGE_FL_BUFFER_SIZE7", 0x1060, 0 }, + { "Size", 4, 20 }, + { "SGE_FL_BUFFER_SIZE8", 0x1064, 0 }, + { "Size", 4, 20 }, + { "SGE_FL_BUFFER_SIZE9", 0x1068, 0 }, + { "Size", 4, 20 }, + { "SGE_FL_BUFFER_SIZE10", 0x106c, 0 }, + { "Size", 4, 20 }, + { "SGE_FL_BUFFER_SIZE11", 0x1070, 0 }, + { "Size", 4, 20 }, + { "SGE_FL_BUFFER_SIZE12", 0x1074, 0 }, + { "Size", 4, 20 }, + { "SGE_FL_BUFFER_SIZE13", 0x1078, 0 }, + { "Size", 4, 20 }, + { "SGE_FL_BUFFER_SIZE14", 0x107c, 0 }, + { "Size", 4, 20 }, + { "SGE_FL_BUFFER_SIZE15", 0x1080, 0 }, + { "Size", 4, 20 }, + { "SGE_DBQ_CTXT_BADDR", 0x1084, 0 }, + { "BaseAddr", 3, 29 }, + { "SGE_IMSG_CTXT_BADDR", 0x1088, 0 }, + { "BaseAddr", 3, 29 }, + { "SGE_FLM_CACHE_BADDR", 0x108c, 0 }, + { "BaseAddr", 3, 29 }, + { "SGE_FLM_CFG", 0x1090, 0 }, + { "OpMode", 26, 6 }, + { "NullPtr", 20, 4 }, + { "NullPtrEn", 19, 1 }, + { "NoHdr", 18, 1 }, + { "CachePtrCnt", 16, 2 }, + { "EDRAMPtrCnt", 14, 2 }, + { "HdrStartFLQ", 11, 3 }, + { "FetchThresh", 6, 5 }, + { "CreditCnt", 4, 2 }, + { "CreditCntPacking", 2, 2 }, + { "HdrStartFLQ4K", 1, 1 }, + { "NoEDRAM", 0, 1 }, + { "SGE_CONM_CTRL", 0x1094, 0 }, + { "EgrThresholdPacking", 16, 8 }, + { "EgrThreshold", 8, 8 }, + { "IngThreshold", 2, 6 }, + { "SGE_TIMESTAMP_LO", 0x1098, 0 }, + { "SGE_TIMESTAMP_HI", 0x109c, 0 }, + { "Opcode", 28, 2 }, + { "Value", 0, 28 }, + { "SGE_INGRESS_RX_THRESHOLD", 0x10a0, 0 }, + { "Threshold_0", 24, 6 }, + { "Threshold_1", 16, 6 }, + { "Threshold_2", 8, 6 }, + { "Threshold_3", 0, 6 }, + { "SGE_DBFIFO_STATUS", 0x10a4, 0 }, + { "vfifo_cnt", 15, 17 }, + { "coal_ctl_fifo_cnt", 8, 6 }, + { "merge_fifo_cnt", 0, 6 }, + { "SGE_DOORBELL_CONTROL", 0x10a8, 0 }, + { "HintDepthCtl", 27, 5 }, + { "NoCoalesce", 26, 1 }, + { "HP_Weight", 24, 2 }, + { "HP_Disable", 23, 1 }, + { "ForceUserDBtoLP", 22, 1 }, + { "ForceVFPF0DBtoLP", 21, 1 }, + { "ForceVFPF1DBtoLP", 20, 1 }, + { "ForceVFPF2DBtoLP", 19, 1 }, + { "ForceVFPF3DBtoLP", 18, 1 }, + { "ForceVFPF4DBtoLP", 17, 1 }, + { "ForceVFPF5DBtoLP", 16, 1 }, + { "ForceVFPF6DBtoLP", 15, 1 }, + { "ForceVFPF7DBtoLP", 14, 1 }, + { "Enable_Drop", 13, 1 }, + { "Drop_Timeout", 7, 6 }, + { "InvOnDBSync", 6, 1 }, + { "InvOnGTSSync", 5, 1 }, + { "db_dbg_en", 4, 1 }, + { "gts_dbg_timer_reg", 1, 3 }, + { "gts_dbg_en", 0, 1 }, + { "SGE_ITP_CONTROL", 0x10b4, 0 }, + { "TScale", 28, 4 }, + { "Critical_Time", 10, 15 }, + { "LL_Empty", 4, 6 }, + { "LL_Read_Wait_Disable", 0, 1 }, + { "SGE_TIMER_VALUE_0_AND_1", 0x10b8, 0 }, + { "TimerValue0", 16, 16 }, + { "TimerValue1", 0, 16 }, + { "SGE_TIMER_VALUE_2_AND_3", 0x10bc, 0 }, + { "TimerValue2", 16, 16 }, + { "TimerValue3", 0, 16 }, + { "SGE_TIMER_VALUE_4_AND_5", 0x10c0, 0 }, + { "TimerValue4", 16, 16 }, + { "TimerValue5", 0, 16 }, + { "SGE_GK_CONTROL", 0x10c4, 0 }, + { "en_flm_fifth", 29, 1 }, + { "fl_prog_thresh", 20, 9 }, + { "coal_all_thread", 19, 1 }, + { "en_pshb", 18, 1 }, + { "en_db_fifth", 17, 1 }, + { "db_prog_thresh", 8, 9 }, + { "100ns_timer", 0, 8 }, + { "SGE_GK_CONTROL2", 0x10c8, 0 }, + { "dbq_timer_tick", 16, 16 }, + { "fl_merge_cnt_thresh", 8, 4 }, + { "merge_cnt_thresh", 0, 6 }, + { "SGE_DEBUG_INDEX", 0x10cc, 0 }, + { "SGE_DEBUG_DATA_HIGH", 0x10d0, 0 }, + { "SGE_DEBUG_DATA_LOW", 0x10d4, 0 }, + { "SGE_REVISION", 0x10d8, 0 }, + { "SGE_INT_CAUSE4", 0x10dc, 0 }, + { "err_ishift_ur1", 31, 1 }, + { "err_ishift_ur0", 30, 1 }, + { "bar2_egress_len_or_addr_err", 29, 1 }, + { "err_cpl_exceed_max_iqe_size1", 28, 1 }, + { "err_cpl_exceed_max_iqe_size0", 27, 1 }, + { "err_wr_len_too_large3", 26, 1 }, + { "err_wr_len_too_large2", 25, 1 }, + { "err_wr_len_too_large1", 24, 1 }, + { "err_wr_len_too_large0", 23, 1 }, + { "err_large_minfetch_with_txcoal3", 22, 1 }, + { "err_large_minfetch_with_txcoal2", 21, 1 }, + { "err_large_minfetch_with_txcoal1", 20, 1 }, + { "err_large_minfetch_with_txcoal0", 19, 1 }, + { "coal_with_hp_disable_err", 18, 1 }, + { "bar2_egress_coal0_err", 17, 1 }, + { "bar2_egress_size_err", 16, 1 }, + { "flm_pc_rsp_err", 15, 1 }, + { "err_th3_max_fetch", 14, 1 }, + { "err_th2_max_fetch", 13, 1 }, + { "err_th1_max_fetch", 12, 1 }, + { "err_th0_max_fetch", 11, 1 }, + { "err_rx_cpl_packet_size1", 10, 1 }, + { "err_rx_cpl_packet_size0", 9, 1 }, + { "err_bad_upfl_inc_credit3", 8, 1 }, + { "err_bad_upfl_inc_credit2", 7, 1 }, + { "err_bad_upfl_inc_credit1", 6, 1 }, + { "err_bad_upfl_inc_credit0", 5, 1 }, + { "err_physaddr_len0_idma1", 4, 1 }, + { "err_physaddr_len0_idma0", 3, 1 }, + { "err_flm_invalid_pkt_drop1", 2, 1 }, + { "err_flm_invalid_pkt_drop0", 1, 1 }, + { "err_unexpected_timer", 0, 1 }, + { "SGE_INT_ENABLE4", 0x10e0, 0 }, + { "err_ishift_ur1", 31, 1 }, + { "err_ishift_ur0", 30, 1 }, + { "bar2_egress_len_or_addr_err", 29, 1 }, + { "err_cpl_exceed_max_iqe_size1", 28, 1 }, + { "err_cpl_exceed_max_iqe_size0", 27, 1 }, + { "err_wr_len_too_large3", 26, 1 }, + { "err_wr_len_too_large2", 25, 1 }, + { "err_wr_len_too_large1", 24, 1 }, + { "err_wr_len_too_large0", 23, 1 }, + { "err_large_minfetch_with_txcoal3", 22, 1 }, + { "err_large_minfetch_with_txcoal2", 21, 1 }, + { "err_large_minfetch_with_txcoal1", 20, 1 }, + { "err_large_minfetch_with_txcoal0", 19, 1 }, + { "coal_with_hp_disable_err", 18, 1 }, + { "bar2_egress_coal0_err", 17, 1 }, + { "bar2_egress_size_err", 16, 1 }, + { "flm_pc_rsp_err", 15, 1 }, + { "err_th3_max_fetch", 14, 1 }, + { "err_th2_max_fetch", 13, 1 }, + { "err_th1_max_fetch", 12, 1 }, + { "err_th0_max_fetch", 11, 1 }, + { "err_rx_cpl_packet_size1", 10, 1 }, + { "err_rx_cpl_packet_size0", 9, 1 }, + { "err_bad_upfl_inc_credit3", 8, 1 }, + { "err_bad_upfl_inc_credit2", 7, 1 }, + { "err_bad_upfl_inc_credit1", 6, 1 }, + { "err_bad_upfl_inc_credit0", 5, 1 }, + { "err_physaddr_len0_idma1", 4, 1 }, + { "err_physaddr_len0_idma0", 3, 1 }, + { "err_flm_invalid_pkt_drop1", 2, 1 }, + { "err_flm_invalid_pkt_drop0", 1, 1 }, + { "err_unexpected_timer", 0, 1 }, + { "SGE_STAT_TOTAL", 0x10e4, 0 }, + { "SGE_STAT_MATCH", 0x10e8, 0 }, + { "SGE_STAT_CFG", 0x10ec, 0 }, + { "StatSource", 9, 4 }, + { "ITPOpMode", 8, 1 }, + { "EgrCtxtOpMode", 6, 2 }, + { "IngCtxtOpMode", 4, 2 }, + { "StatMode", 0, 4 }, + { "SGE_HINT_CFG", 0x10f0, 0 }, + { "uPCutoffThreshLp", 12, 11 }, + { "HintsAllowedNoHdr", 6, 6 }, + { "HintsAllowedHdr", 0, 6 }, + { "SGE_INGRESS_QUEUES_PER_PAGE_PF", 0x10f4, 0 }, + { "QueuesPerPagePF7", 28, 4 }, + { "QueuesPerPagePF6", 24, 4 }, + { "QueuesPerPagePF5", 20, 4 }, + { "QueuesPerPagePF4", 16, 4 }, + { "QueuesPerPagePF3", 12, 4 }, + { "QueuesPerPagePF2", 8, 4 }, *** 29611 LINES SKIPPED *** From nobody Mon Sep 29 14:37: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 4cb3h84Dynz68K57; Mon, 29 Sep 2025 14:38: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 4cb3h80rCqz3t6K; Mon, 29 Sep 2025 14:38:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=emTMfgufZ27EPQSoVjw6CmWY9iqasqVpS9aMIuQqJGc=; b=M90pNscyfmP2uSo7s0CSWyBb6qcr/0WaAZSmik6Y3xVyWO0Ev1WjeXX6WC4Y1OkALYUvSY c4WY0F8AlgGbBdcrCiqfn1bFVssS69ePFKNJmuQSRN3asRFxcJk9OM4PVPrcqnkeDbxwsm jBYOQXQxXhwiNUF5OVDCnCiToYw8eE4BR48X0XFWzCXUc78uhFYHyXBCUToys+GoYDWAUo YGRrMTYfPlhhoeO7MDgAhGGA7qFnoYyrt/m08cvD9KFJ+ZElGUyQ1/p2w42kaqh2oHjnqO qoF8vUAn1uUVvHrgIZSiYldmXWBuIC1o6gyCaobSekrR5NMdCq/u9MEh9g8ntg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=emTMfgufZ27EPQSoVjw6CmWY9iqasqVpS9aMIuQqJGc=; b=Kzb86kPrMX0MwGsME6GsI0mRgKxVgEi/n3Q0mVLiPS6J6NLCYEa1nx85cAlpA+GE7pZShK xZcgEjjITkNC3UQZ228rA3kcqUc/buFqC8rlDjViG33/b7irVHvhdpdLsWzllLke3ZJ3lz qY5LAZCOt7LivvQKJaOG+GI7pygWd4j+n0DMPJ5UgJWuiSwj1FcK3Ya3we76n6lymthx+2 bu/4004F3ZuhzGgESB31XVEu5eeJmWLDusuwxxwPeILSi77tbFz+Qn+4Upgk/vqbTYwGoF Nnha0hW/BhkjAkGEHJ77rHoPVV8lMVcD8VyXV3uJBsHKRpZIzj66imbOA8H1PQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759156680; a=rsa-sha256; cv=none; b=bG73lsSkku2AyIzKMgB0ubPGtagAmCEcGo1GrsfPiXnkq/LfAQ03WbWrvY4EUkPo257Gqi vjszdNIG5PYHxVFSystOlUFohUPPdzU3RzCNXsoK6wDXXfMkjwwpCPdAXQjVE02zWk/QFS cSZwskYgW+g/TGXBxP6KTDeDtluleHaYyN7d+oIohhfOdS5lOyiniGFlALMOrQLxkBqoL2 vlp30GwI1svc7OSCgwJfTFSJ8o2oxdRNJ/v/6F8xk62QU2VQi49Je0IilWOefnpGF1o3WL rzLZxk386awN96kiTJwR169OHHUNmi69ReSeLLQ0pRozWbDRn2pNj3vCmkou2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb3h7738Sz18GB; Mon, 29 Sep 2025 14:37:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TEbxJR018117; Mon, 29 Sep 2025 14:37:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TEbxAN018114; Mon, 29 Sep 2025 14:37:59 GMT (envelope-from git) Date: Mon, 29 Sep 2025 14:37:59 GMT Message-Id: <202509291437.58TEbxAN018114@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: e5ce2d39368f - main - libcxgb4: Get userspace RDMA tools to recognize T7 based RNICs 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e5ce2d39368f702cc910e3baf103df0a6e1f9266 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=e5ce2d39368f702cc910e3baf103df0a6e1f9266 commit e5ce2d39368f702cc910e3baf103df0a6e1f9266 Author: Navdeep Parhar AuthorDate: 2025-09-29 13:50:34 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 14:26:01 +0000 libcxgb4: Get userspace RDMA tools to recognize T7 based RNICs MFC after: 3 days Sponsored by: Chelsio Communications --- contrib/ofed/libcxgb4/dev.c | 9 ++++++++- contrib/ofed/libcxgb4/libcxgb4.h | 5 +++++ contrib/ofed/libcxgb4/t4_chip_type.h | 10 ++++++++++ contrib/ofed/libcxgb4/t4_pci_id_tbl.h | 27 +++++++++++++++++++++------ 4 files changed, 44 insertions(+), 7 deletions(-) diff --git a/contrib/ofed/libcxgb4/dev.c b/contrib/ofed/libcxgb4/dev.c index d3c289dad9f2..db728f5627da 100644 --- a/contrib/ofed/libcxgb4/dev.c +++ b/contrib/ofed/libcxgb4/dev.c @@ -144,6 +144,8 @@ static struct ibv_context *c4iw_alloc_context(struct ibv_device *ibdev, context->ibv_ctx.ops = c4iw_ctx_ops; switch (rhp->chip_version) { + case CHELSIO_T7: + PDBG("%s T7/T6/T5/T4 device\n", __FUNCTION__); case CHELSIO_T6: PDBG("%s T6/T5/T4 device\n", __FUNCTION__); case CHELSIO_T5: @@ -429,6 +431,8 @@ static struct verbs_device *cxgb4_driver_init(const char *uverbs_sys_path, strstr(&ibdev[2], "nex") && devnum >= 0) { snprintf(dev_str, sizeof(dev_str), "/dev/t%cnex/%d", ibdev[1], devnum); + } else if (strstr(&ibdev[0], "chnex") && devnum >= 0) { + snprintf(dev_str, sizeof(dev_str), "/dev/chnex/%d", devnum); } else return NULL; @@ -523,7 +527,10 @@ found: goto err; dev->ibv_dev.ops = &c4iw_dev_ops; - dev->chip_version = CHELSIO_CHIP_VERSION(hca_table[i].device >> 8); + if (hca_table[i].device == 0xd000) + dev->chip_version = CHELSIO_T7; + else + dev->chip_version = CHELSIO_CHIP_VERSION(hca_table[i].device >> 8); dev->abi_version = abi_version; PDBG("%s device claimed\n", __FUNCTION__); diff --git a/contrib/ofed/libcxgb4/libcxgb4.h b/contrib/ofed/libcxgb4/libcxgb4.h index b891e8b1df97..216eee05a9d8 100644 --- a/contrib/ofed/libcxgb4/libcxgb4.h +++ b/contrib/ofed/libcxgb4/libcxgb4.h @@ -64,6 +64,11 @@ struct c4iw_dev { int abi_version; }; +static inline int dev_is_t7(struct c4iw_dev *dev) +{ + return dev->chip_version == CHELSIO_T7; +} + static inline int dev_is_t6(struct c4iw_dev *dev) { return dev->chip_version == CHELSIO_T6; diff --git a/contrib/ofed/libcxgb4/t4_chip_type.h b/contrib/ofed/libcxgb4/t4_chip_type.h index 54b718111e3f..ae3b760c51a1 100644 --- a/contrib/ofed/libcxgb4/t4_chip_type.h +++ b/contrib/ofed/libcxgb4/t4_chip_type.h @@ -37,6 +37,7 @@ #define CHELSIO_T4 0x4 #define CHELSIO_T5 0x5 #define CHELSIO_T6 0x6 +#define CHELSIO_T7 0x7 /* We code the Chelsio T4 Family "Chip Code" as a tuple: * @@ -65,6 +66,10 @@ enum chip_type { T6_A0 = CHELSIO_CHIP_CODE(CHELSIO_T6, 0), T6_FIRST_REV = T6_A0, T6_LAST_REV = T6_A0, + + T7_A1 = CHELSIO_CHIP_CODE(CHELSIO_T7, 1), + T7_FIRST_REV = T7_A1, + T7_LAST_REV = T7_A1, }; static inline int is_t4(enum chip_type chip) @@ -82,4 +87,9 @@ static inline int is_t6(enum chip_type chip) return (CHELSIO_CHIP_VERSION(chip) == CHELSIO_T6); } +static inline int is_t7(enum chip_type chip) +{ + return (CHELSIO_CHIP_VERSION(chip) == CHELSIO_T7); +} + #endif /* __T4_CHIP_TYPE_H__ */ diff --git a/contrib/ofed/libcxgb4/t4_pci_id_tbl.h b/contrib/ofed/libcxgb4/t4_pci_id_tbl.h index 50812a1d67bd..0ff7e689dc84 100644 --- a/contrib/ofed/libcxgb4/t4_pci_id_tbl.h +++ b/contrib/ofed/libcxgb4/t4_pci_id_tbl.h @@ -92,8 +92,7 @@ #endif CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN - /* T4 adapters: - */ + /* T4 adapters */ CH_PCI_ID_TABLE_FENTRY(0x4000), /* T440-dbg */ CH_PCI_ID_TABLE_FENTRY(0x4001), /* T420-cr */ CH_PCI_ID_TABLE_FENTRY(0x4002), /* T422-cr */ @@ -119,8 +118,7 @@ CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN CH_PCI_ID_TABLE_FENTRY(0x4087), /* Custom T440-cr */ CH_PCI_ID_TABLE_FENTRY(0x4088), /* Custom T440 2-xaui, 2-xfi */ - /* T5 adapters: - */ + /* T5 adapters */ CH_PCI_ID_TABLE_FENTRY(0x5000), /* T580-dbg */ CH_PCI_ID_TABLE_FENTRY(0x5001), /* T520-cr */ CH_PCI_ID_TABLE_FENTRY(0x5002), /* T522-cr */ @@ -169,8 +167,7 @@ CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN CH_PCI_ID_TABLE_FENTRY(0x509b), /* Custom T540-CR LOM */ CH_PCI_ID_TABLE_FENTRY(0x509c), /* Custom T520-CR*/ - /* T6 adapters: - */ + /* T6 adapters */ CH_PCI_ID_TABLE_FENTRY(0x6001), CH_PCI_ID_TABLE_FENTRY(0x6002), CH_PCI_ID_TABLE_FENTRY(0x6003), @@ -184,6 +181,24 @@ CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN CH_PCI_ID_TABLE_FENTRY(0x6011), CH_PCI_ID_TABLE_FENTRY(0x6014), CH_PCI_ID_TABLE_FENTRY(0x6015), + CH_PCI_ID_TABLE_FENTRY(0x6081), + + /* T7 adapters */ + { .vendor = 0x1425, .device = 0xd000 }, /* T7 FPGA */ + CH_PCI_ID_TABLE_FENTRY(0x7000), /* T7-DBG */ + CH_PCI_ID_TABLE_FENTRY(0x7001), /* T7250 */ + CH_PCI_ID_TABLE_FENTRY(0x7002), /* S7250 */ + CH_PCI_ID_TABLE_FENTRY(0x7003), /* T7450 */ + CH_PCI_ID_TABLE_FENTRY(0x7004), /* S7450 */ + CH_PCI_ID_TABLE_FENTRY(0x7005), /* T72200 */ + CH_PCI_ID_TABLE_FENTRY(0x7006), /* S72200 */ + CH_PCI_ID_TABLE_FENTRY(0x7007), /* T72200-FH */ + CH_PCI_ID_TABLE_FENTRY(0x7008), /* T71400 */ + CH_PCI_ID_TABLE_FENTRY(0x7009), /* S7210-BT */ + CH_PCI_ID_TABLE_FENTRY(0x700a), /* T7450-RC */ + CH_PCI_ID_TABLE_FENTRY(0x700b), /* T72200-RC */ + CH_PCI_ID_TABLE_FENTRY(0x700c), /* T72200-FH-RC */ + CH_PCI_ID_TABLE_FENTRY(0x7080), /* Custom */ CH_PCI_DEVICE_ID_TABLE_DEFINE_END; #endif /* __T4_PCI_ID_TBL_H__ */ From nobody Mon Sep 29 14:38: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 4cb3h946BKz68K7b; Mon, 29 Sep 2025 14:38: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 4cb3h91BWzz3t4k; Mon, 29 Sep 2025 14:38:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zsh9kvBGkL8JMsUfZWCO3Dntl1JSf3Hk3lRbFxTIlWM=; b=ENJCnoUvM/seBojq6d4jBKwbPSWnNkJWy/HCAMzlfJ+rBuIjL5XPbzPybgOihnHuN/QNLo BhIy6gv/6Q9SxD2mZY/zV9+8Baqm8yd00ppqPBcqgAU6wYMQ9ozMiye6+SuBZFTs4z+UWq zLP4a9JA+TbEnxc39H52vyWZu6hpD7mEXegrjRXD3vswcm9g5Yqv/C0tEZk2Lecw9GsYSr jRQu/R4R9LiqVq/A2/IJhwuKso1tFPXbtODRi713Lamz0NY2ziUjpvnS3s80x9cPrnw0Kt 7ipAf+PFmaoWlM33WpQkpt7Gkz1xCAbrhcUYKPskdTVUNX7YDBvItpFjdMHcKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zsh9kvBGkL8JMsUfZWCO3Dntl1JSf3Hk3lRbFxTIlWM=; b=f36m/bZkYjQSPtEteXZMJ0KHGND7RGBztrJDySHgbMeQd0zdwva/3MUNVF/deUFWoDSZDv IbNoRWan9O+OBVwSusrdXN4os1jW0YI+gluEGIXjFWvq8rnYuDQNQi4ckhbosqbKMvGy+1 eCCOdtwRAziiZ73PsHFVHhhiuYlxja0tHoggyM+5rU9MqZdfS01AK0hcjJu9Hw+FZfylk2 nhqNF2WTRUXoD6IYqB+5169/Vm6j71g6q/rq1OPPMAu1nc7sVBE2id3ULLHKgWhEGuGb8s SAdyf+Ouw1Hg1e0SNJOKMJ2Q7DngI8YqGsTC8CRJzALx15w38VNb6Tncj8KgVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759156681; a=rsa-sha256; cv=none; b=SJKV94hWNW+mulA0ZaONGW4dMmDJyozun85MZjwUf4ip88KMvpD2ShHAAZoMdM6rwYzrzR O1hRMbkE08Eg3YG9vpSNxc7eSu6gqy16hCuVIYox5fW1BwJ7pJbfrlh3l+1V9tBDVqzqjO kF6pPlqZcCzg4R2lslrgX3SX5dsMVlZlxLkTkb0YWdxYAPa1z3eDAB2fBKLriqrxkqhDDm bDAMp2N0Dr1rwvGyCBv9Xcm7TTXtEMO/e87bVNPL7/0hiErBdK+nN5RtPjYT6sIXVdwOXp BB8SkgLjiaW04dXb9Ngh8JTV+PvPsF1NpZjxkHKWZZUZZZcZ+8krRUaifkyywQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb3h90VjSz182b; Mon, 29 Sep 2025 14:38:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TEc0V8018184; Mon, 29 Sep 2025 14:38:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TEc0Br018179; Mon, 29 Sep 2025 14:38:00 GMT (envelope-from git) Date: Mon, 29 Sep 2025 14:38:00 GMT Message-Id: <202509291438.58TEc0Br018179@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 3203b1a110c8 - main - cxgbe(4): Support for T7 tracing filters 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3203b1a110c890e7b407a83fa3d65b4ba711e59d Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=3203b1a110c890e7b407a83fa3d65b4ba711e59d commit 3203b1a110c890e7b407a83fa3d65b4ba711e59d Author: Navdeep Parhar AuthorDate: 2025-09-29 13:54:10 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 14:26:01 +0000 cxgbe(4): Support for T7 tracing filters These are the filters that can be used to sniff wire traffic after all hw offloads. MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_main.c | 10 ++-------- sys/dev/cxgbe/t4_tracer.c | 5 ++--- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index df6314ca6e18..0ad162cf2231 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -2524,11 +2524,7 @@ restart_lld(struct adapter *sc) } if (sc->traceq < 0 && IS_MAIN_VI(vi)) { sc->traceq = sc->sge.rxq[vi->first_rxq].iq.abs_id; - t4_write_reg(sc, is_t4(sc) ? - A_MPS_TRC_RSS_CONTROL : - A_MPS_T5_TRC_RSS_CONTROL, - V_RSSCONTROL(pi->tx_chan) | - V_QUEUENUMBER(sc->traceq)); + t4_set_trace_rss_control(sc, pi->tx_chan, sc->traceq); pi->flags |= HAS_TRACEQ; } @@ -6756,9 +6752,7 @@ cxgbe_init_synchronized(struct vi_info *vi) */ if (sc->traceq < 0 && IS_MAIN_VI(vi)) { sc->traceq = sc->sge.rxq[vi->first_rxq].iq.abs_id; - t4_write_reg(sc, is_t4(sc) ? A_MPS_TRC_RSS_CONTROL : - A_MPS_T5_TRC_RSS_CONTROL, V_RSSCONTROL(pi->tx_chan) | - V_QUEUENUMBER(sc->traceq)); + t4_set_trace_rss_control(sc, pi->tx_chan, sc->traceq); pi->flags |= HAS_TRACEQ; } diff --git a/sys/dev/cxgbe/t4_tracer.c b/sys/dev/cxgbe/t4_tracer.c index 80689a543e83..4f8d28626bc9 100644 --- a/sys/dev/cxgbe/t4_tracer.c +++ b/sys/dev/cxgbe/t4_tracer.c @@ -123,9 +123,8 @@ static int t4_cloner_match(struct if_clone *ifc, const char *name) { - if (strncmp(name, "t4nex", 5) != 0 && - strncmp(name, "t5nex", 5) != 0 && - strncmp(name, "t6nex", 5) != 0) + if (strncmp(name, "t4nex", 5) != 0 && strncmp(name, "t5nex", 5) != 0 && + strncmp(name, "t6nex", 5) != 0 && strncmp(name, "chnex", 5) != 0) return (0); if (name[5] < '0' || name[5] > '9') return (0); From nobody Mon Sep 29 14:38: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 4cb3hC0010z68KSZ; Mon, 29 Sep 2025 14:38: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 4cb3hB2zNsz3t56; Mon, 29 Sep 2025 14:38:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lVOcbiWBJHYhP2xCppBndr8Cefq34S3yXmbQeNq5CQ0=; b=YcoU/Xn3BO6j3gpuYEFWMxSxwsq1641mVrX3jR1Bc1I0uoKM2fi+0GBPGSuYjbFHBoElC+ /xfNCnYh/E1P3lg6y2EUs3k2b2C+jpee0yeK3SKmQAqV9Q/V04+u3XI13MRxDIo7uitmaB lsJ8TT+4J6SZOLV0fhW4c3KcqA+U3Y4K0PBsdD/1/lIMCEaNvNvT9FKqL8uZCbso81cogy F5awy/NK/eUbuOKgdkyNzzGghkyJHaSlmVxTJ7bWlMJu1+opCmxRAklOcTtxYqx6sdCRdI iYc3knLhEYPcxtB3kcq/PDMIYtM2OlcO8oUge0F1WIP3S3Bhu9uHCysitvH2og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759156682; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lVOcbiWBJHYhP2xCppBndr8Cefq34S3yXmbQeNq5CQ0=; b=yVJEh8NzI1ZiKtn1Q9eEHMp4lMsh6Pkk9XGAGOFUuMMw+FCpFYU2xXyspZuWR23t/wSTOF hNL9+aZIsk4lL8QX0VExS1u8fB+QN9aMzARc/de0Er1OkA75R0y95Li/CZjbOmfXylxdbP WBYQw2cxonSDwIFM8urfp7eMJK1VHeWEVoKDv3exFX50uJxeQHvZgPWMFGmaTkb5qgN0jI ertC87XlhHB8rT/pfjyZ407LV7W9cXvzGWbd9OzPBQy/UqGJJo+QSAyjAhXOk0LyfvkFBz sKhejGqIjBqQKN9P0nlbUyrFD/Ikec7A4L+JMF0aQFoGeSQa0AeR6eyIfEj9YA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759156682; a=rsa-sha256; cv=none; b=xNKclvKfiPt2XMsSp5jomZSMEiJFevqQK3AnS38DjbLck01+V5vzrDp+b/H5wob/oGXu4n wWYCP1LvPORM8vDCnDYcPei8gujzED6F7EaXxGf0xKtArbYEbwCGLRxkF0Jeo14F7A44WF 3/cXZCp475bWxOpxiHB4GR63upF5ZgegJZgNlUJ4M8N2fcP1EsUHnvJWR0TuTcMRkaqfCz 7ZLfgJuIfFcG1Bnlllu4wCBpiQxk4P43SrGJvffL0nKDb/WTZTWV2D5Sq3RdRA5eAZHfKD WleWgPn1JR0i2Y8xOYL+oWlQy5xr13J+oxnE9Srfomokn4dYErurx6QBdj4hmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb3hB1W3Mz18gV; Mon, 29 Sep 2025 14:38:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TEc2gq018291; Mon, 29 Sep 2025 14:38:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TEc2Hh018288; Mon, 29 Sep 2025 14:38:02 GMT (envelope-from git) Date: Mon, 29 Sep 2025 14:38:02 GMT Message-Id: <202509291438.58TEc2Hh018288@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: a02f38ccedc2 - main - cxgbe(4): Add support for port types SFP56 and QSFP56 and speed 200Gbps 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a02f38ccedc2c648d57fb6e575723b0b31b67ea0 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=a02f38ccedc2c648d57fb6e575723b0b31b67ea0 commit a02f38ccedc2c648d57fb6e575723b0b31b67ea0 Author: Navdeep Parhar AuthorDate: 2025-09-29 14:20:07 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 14:27:13 +0000 cxgbe(4): Add support for port types SFP56 and QSFP56 and speed 200Gbps This enables the 2x200/100/40Gbps and 4x50/25/10/1Gbps boards. MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_main.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 0ad162cf2231..e9cb56562abe 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -557,6 +557,9 @@ static int t4_fec = -1; SYSCTL_INT(_hw_cxgbe, OID_AUTO, fec, CTLFLAG_RDTUN, &t4_fec, 0, "Forward Error Correction (bit 0 = RS, bit 1 = BASER_RS)"); +static const char * +t4_fec_bits = "\20\1RS-FEC\2FC-FEC\3NO-FEC\4RSVD1\5RSVD2\6auto\7module"; + /* * Controls when the driver sets the FORCE_FEC bit in the L1_CFG32 that it * issues to the firmware. If the firmware doesn't support FORCE_FEC then the @@ -3637,6 +3640,8 @@ port_mword(struct port_info *pi, uint32_t speed) case FW_PORT_TYPE_CR_QSFP: case FW_PORT_TYPE_CR2_QSFP: case FW_PORT_TYPE_SFP28: + case FW_PORT_TYPE_SFP56: + case FW_PORT_TYPE_QSFP56: /* Pluggable transceiver */ switch (pi->mod_type) { case FW_PORT_MOD_TYPE_LR: @@ -3654,6 +3659,8 @@ port_mword(struct port_info *pi, uint32_t speed) return (IFM_50G_LR2); case FW_PORT_CAP32_SPEED_100G: return (IFM_100G_LR4); + case FW_PORT_CAP32_SPEED_200G: + return (IFM_200G_LR4); } break; case FW_PORT_MOD_TYPE_SR: @@ -3670,6 +3677,8 @@ port_mword(struct port_info *pi, uint32_t speed) return (IFM_50G_SR2); case FW_PORT_CAP32_SPEED_100G: return (IFM_100G_SR4); + case FW_PORT_CAP32_SPEED_200G: + return (IFM_200G_SR4); } break; case FW_PORT_MOD_TYPE_ER: @@ -3691,6 +3700,8 @@ port_mword(struct port_info *pi, uint32_t speed) return (IFM_50G_CR2); case FW_PORT_CAP32_SPEED_100G: return (IFM_100G_CR4); + case FW_PORT_CAP32_SPEED_200G: + return (IFM_200G_CR4_PAM4); } break; case FW_PORT_MOD_TYPE_LRM: @@ -3700,6 +3711,8 @@ port_mword(struct port_info *pi, uint32_t speed) case FW_PORT_MOD_TYPE_DR: if (speed == FW_PORT_CAP32_SPEED_100G) return (IFM_100G_DR); + if (speed == FW_PORT_CAP32_SPEED_200G) + return (IFM_200G_DR4); break; case FW_PORT_MOD_TYPE_NA: MPASS(0); /* Not pluggable? */ @@ -8932,13 +8945,12 @@ sysctl_link_fec(SYSCTL_HANDLER_ARGS) struct link_config *lc = &pi->link_cfg; int rc; struct sbuf *sb; - static char *bits = "\20\1RS-FEC\2FC-FEC\3NO-FEC\4RSVD1\5RSVD2"; sb = sbuf_new_for_sysctl(NULL, NULL, 128, req); if (sb == NULL) return (ENOMEM); if (lc->link_ok) - sbuf_printf(sb, "%b", lc->fec, bits); + sbuf_printf(sb, "%b", lc->fec, t4_fec_bits); else sbuf_printf(sb, "no link"); rc = sbuf_finish(sb); @@ -8958,14 +8970,12 @@ sysctl_requested_fec(SYSCTL_HANDLER_ARGS) if (req->newptr == NULL) { struct sbuf *sb; - static char *bits = "\20\1RS-FEC\2FC-FEC\3NO-FEC\4RSVD2" - "\5RSVD3\6auto\7module"; sb = sbuf_new_for_sysctl(NULL, NULL, 128, req); if (sb == NULL) return (ENOMEM); - sbuf_printf(sb, "%b", lc->requested_fec, bits); + sbuf_printf(sb, "%b", lc->requested_fec, t4_fec_bits); rc = sbuf_finish(sb); sbuf_delete(sb); } else { @@ -9034,7 +9044,6 @@ sysctl_module_fec(SYSCTL_HANDLER_ARGS) int rc; int8_t fec; struct sbuf *sb; - static char *bits = "\20\1RS-FEC\2FC-FEC\3NO-FEC\4RSVD2\5RSVD3"; sb = sbuf_new_for_sysctl(NULL, NULL, 128, req); if (sb == NULL) @@ -9068,7 +9077,7 @@ sysctl_module_fec(SYSCTL_HANDLER_ARGS) if (fec == 0) fec = FEC_NONE; PORT_UNLOCK(pi); - sbuf_printf(sb, "%b", fec & M_FW_PORT_CAP32_FEC, bits); + sbuf_printf(sb, "%b", fec & M_FW_PORT_CAP32_FEC, t4_fec_bits); } rc = sbuf_finish(sb); done: From nobody Mon Sep 29 15:13:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cb4TX3gyMz68MtZ; Mon, 29 Sep 2025 15:13:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb4TX2wFYz45dK; Mon, 29 Sep 2025 15:13:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759158832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dQTpTWOaZjgR/AlqLXPgxD4utA5D9XzTysG2sooEJLM=; b=VMn1zsXvJFSaFTVFWuPceHdOj4t/nKEqHalpOFBqklCHnz8WZIF7gFUAj2WTz9pv2P5MuR IEoFcR0HogKKb/lEHrvr/zaa/F8kmwJHN3hMtHD9k9pvEJUd/XL1vttyY+oaomVJNJQc10 vKoeQ0yAVnoJg2UjCiuSEpPvIafU5uN6NvG+V6eyQbXqSDUMSi1svK4GaKTuKW4JHZ1lqf mOkudddQ4cqLam+B6CEjdo6ex399H5W/XKVC1W9kDFdMO9hBsfRE/lZmVCwfnBffn/hBp2 hjG+J38U5SKNiYZjRrfbDy1TDxg5Os6bpzz4rLHrLv0stA7ZOIf9LR/jqLu4kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759158832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dQTpTWOaZjgR/AlqLXPgxD4utA5D9XzTysG2sooEJLM=; b=jadz6X4Yd8e9oW+iSmZCS6WdFmhSSS/ulFfOrpZocpbeD6y+YttcqpUoITNykBpTWcXUo2 Sxhs9a1ACmUHftbD5ClJTHv9spYEEZWsa42CJpWmN2z85ZlmlBDxlZxVxW37IFVOD4rVBD UOm1zH5pkOgZtDUVV9P//H+ovBumCHPVwVZwI70zE+OkRmjOKAdgQDthjKlip2lcQi0705 fS9K/jXmJktSh9tfvBi++138MLcF1+VKcAqQvJWkqioJ/JQ2tCDv//6Wzdhe7xgFfUGMft ZSnDJ4dWQbnojb5pjQv/r0BWSZhEICyRfcnGqiLFQUNlumvUwKyUNcDl5ZZWDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759158832; a=rsa-sha256; cv=none; b=LzDKfGVjL41c7rGURJ/KvZHQzxlStYaPVivcSjmsXRsECTKaAYpUbuJk46foY3x4r9vgXA 59MO/lYflkpp2DaD2LqHMBp36NQIhrRJKSUFkHshbcbfZCrdP+lx8QtVqdy3dLC8H5KaRY fGR83R0b69+0WMAyPnyS3ddW9RMPnv6B3aL6A9t19RggN9ceSK30chQXIEpmiA4mFJqidl 9yjqCI3EbWAOoFm/YYe/mZVGHcb6iEQ5CZSRartpKm/8g6YeX1hnTK8K78iPUosbLR+P8K qLDX+I8xExczGKmsD+Fm6EJNu4a5WOXrWloF7LWnY72GbGvoKkltjE+IDSC0vg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb4TX2SF1z191B; Mon, 29 Sep 2025 15:13:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TFDqET093189; Mon, 29 Sep 2025 15:13:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TFDq1h093186; Mon, 29 Sep 2025 15:13:52 GMT (envelope-from git) Date: Mon, 29 Sep 2025 15:13:52 GMT Message-Id: <202509291513.58TFDq1h093186@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 6cb542e31bef - main - iflib: ifdef iflib_simple_transmit and iflib_simple_select_queue on ALTQ 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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6cb542e31bef5fe6e3867b4cfb608f4caeef076d Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=6cb542e31bef5fe6e3867b4cfb608f4caeef076d commit 6cb542e31bef5fe6e3867b4cfb608f4caeef076d Author: Mateusz Guzik AuthorDate: 2025-09-29 15:13:06 +0000 Commit: Mateusz Guzik CommitDate: 2025-09-29 15:13:06 +0000 iflib: ifdef iflib_simple_transmit and iflib_simple_select_queue on ALTQ Otherwise builds warn about them being unused. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/iflib.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 1e6d98291c04..e2005aa28c5c 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -142,7 +142,9 @@ struct iflib_ctx; static void iru_init(if_rxd_update_t iru, iflib_rxq_t rxq, uint8_t flid); static void iflib_timer(void *arg); static void iflib_tqg_detach(if_ctx_t ctx); +#ifndef ALTQ static int iflib_simple_transmit(if_t ifp, struct mbuf *m); +#endif typedef struct iflib_filter_info { driver_filter_t *ifi_filter; @@ -7117,7 +7119,7 @@ iflib_debugnet_poll(if_t ifp, int count) } #endif /* DEBUGNET */ - +#ifndef ALTQ static inline iflib_txq_t iflib_simple_select_queue(if_ctx_t ctx, struct mbuf *m) { @@ -7166,3 +7168,4 @@ iflib_simple_transmit(if_t ifp, struct mbuf *m) return (error); } +#endif From nobody Mon Sep 29 15:22:27 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cb4gR2PTCz68NZM; Mon, 29 Sep 2025 15:22: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 4cb4gR1hvmz46Sl; Mon, 29 Sep 2025 15:22:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YWND1957s6K9APQME6figuZRZv1Cmu5NhTu0ZgcIX7M=; b=tNSN+pUf5vxadcP+YSVpBImyi1fuqnp1//LmgrzlEHqUjJ9OprnHaEBxK2frpJuuwdZyRA LOWvXuDSFhZ6woPacCTsUNk+qYTCReelOikNmE0BV9htR4MavcnJZwfiBaXeDK6oDG5hjr Ku4dPGkzJDztnrWHbiwlF6WjVtEFE6iFln9Nh6sd3Wa1HWNj2cCbjilTGdxkl5PYxDulMd nyccaH52P2tTx6AXWDhzr9hZmXmQo655tkvBtFdHP/YwhVaMtCGDFTVVIXqlxY1ScuLzsf yu7Hfo6YTtMmIohlt6uq5m/N80QFvO0HwSgCRmvbckTuntUnpdPrLlEh+7BH1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YWND1957s6K9APQME6figuZRZv1Cmu5NhTu0ZgcIX7M=; b=tzy7fKI4fzpYROfrvhAjQ7cFjrTAkq0tXzHm7gChxC2d5TUH0psxu7t1sFBZgtsz2jGzxe NGYdAu2TAwFZ/PTx4c/ndzUL7zKJVma18WapV2xpxZ1W3yeOGgrF9M4B0esjt8K9qOqUEt y/rsqcyK5RsSUN22gJ90bTYL68JGUV13BCAOUijrQge/A/guRuDh0IAFDGn7iLg2pje4mm eZvFZU3YZrKNBGnsy+a0TX6hY9Lb/7rc1A/lvn1VqyVdPfyV20CgKvweHwj+3ZgFjY8p7N QYe6TKc+KlPgJMxT5/F5O1z21YbuufQe5+BmOo7C25ttj/7D+VLhSarLi1T2Hg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759159347; a=rsa-sha256; cv=none; b=NEUpmVql5Egc+VfSLqA2iNeMpKz16bKctoG409aR2KyuUxH65UuneqnmHZjrY+ZqQrlPWS tKpRQVPtS8e4/n1I43Zp91KQQQseklLB9KlrmlAU8B6Y7JsXWKDzbS3dTTbIDW1zYCg+Tu 6/QYVOqinVcJ9rMxTUfn3EzkgiCZhctVdQj1gfyVrdRXUxh1Azj503BOpsv43M6vgs3NhF rWTaNLdKTFtxiWtbQe168IKTIfGd07O/LJHmEY0+L7IlIbotsv3JiHRjybPTNi2Ky/qz/C S/ajEKsvcfLcNunrVLHQA/WSHlM7b5M/cxameQzcYyrEv1v/9MsFm/y3h7jXEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb4gR1CgKz19Vk; Mon, 29 Sep 2025 15:22:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TFMRJV011773; Mon, 29 Sep 2025 15:22:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TFMRNc011770; Mon, 29 Sep 2025 15:22:27 GMT (envelope-from git) Date: Mon, 29 Sep 2025 15:22:27 GMT Message-Id: <202509291522.58TFMRNc011770@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: c341048373ac - main - cxgbe: Refactor find_offload_adapter and move to t4_tom from cxgbei 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c341048373ac6d4bad6dccc63880ff3f326ba15f Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=c341048373ac6d4bad6dccc63880ff3f326ba15f commit c341048373ac6d4bad6dccc63880ff3f326ba15f Author: John Baldwin AuthorDate: 2025-09-29 14:50:34 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 15:19:11 +0000 cxgbe: Refactor find_offload_adapter and move to t4_tom from cxgbei This allows it to be used for other offload drivers. MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/cxgbei/icl_cxgbei.c | 54 +++------------------------------------ sys/dev/cxgbe/tom/t4_tom.c | 48 ++++++++++++++++++++++++++++++++++ sys/dev/cxgbe/tom/t4_tom.h | 1 + 3 files changed, 53 insertions(+), 50 deletions(-) diff --git a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c index d805642541d3..a79cc58b870c 100644 --- a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c @@ -976,42 +976,6 @@ icl_cxgbei_setsockopt(struct icl_conn *ic, struct socket *so, int sspace, return (0); } -/* - * Request/response structure used to find out the adapter offloading a socket. - */ -struct find_ofld_adapter_rr { - struct socket *so; - struct adapter *sc; /* result */ -}; - -static void -find_offload_adapter(struct adapter *sc, void *arg) -{ - struct find_ofld_adapter_rr *fa = arg; - struct socket *so = fa->so; - struct tom_data *td = sc->tom_softc; - struct tcpcb *tp; - struct inpcb *inp; - - /* Non-TCP were filtered out earlier. */ - MPASS(so->so_proto->pr_protocol == IPPROTO_TCP); - - if (fa->sc != NULL) - return; /* Found already. */ - - if (td == NULL) - return; /* TOE not enabled on this adapter. */ - - inp = sotoinpcb(so); - INP_WLOCK(inp); - if ((inp->inp_flags & INP_DROPPED) == 0) { - tp = intotcpcb(inp); - if (tp->t_flags & TF_TOE && tp->tod == &td->tod) - fa->sc = sc; /* Found. */ - } - INP_WUNLOCK(inp); -} - static bool is_memfree(struct adapter *sc) { @@ -1095,7 +1059,6 @@ int icl_cxgbei_conn_handoff(struct icl_conn *ic, int fd) { struct icl_cxgbei_conn *icc = ic_to_icc(ic); - struct find_ofld_adapter_rr fa; struct file *fp; struct socket *so; struct inpcb *inp; @@ -1139,15 +1102,11 @@ icl_cxgbei_conn_handoff(struct icl_conn *ic, int fd) fdrop(fp, curthread); ICL_CONN_UNLOCK(ic); - /* Find the adapter offloading this socket. */ - fa.sc = NULL; - fa.so = so; - t4_iterate(find_offload_adapter, &fa); - if (fa.sc == NULL) { + icc->sc = find_offload_adapter(so); + if (icc->sc == NULL) { error = EINVAL; goto out; } - icc->sc = fa.sc; max_rx_pdu_len = ISCSI_BHS_SIZE + ic->ic_max_recv_data_segment_length; max_tx_pdu_len = ISCSI_BHS_SIZE + ic->ic_max_send_data_segment_length; @@ -1778,7 +1737,6 @@ cxgbei_limits(struct adapter *sc, void *arg) static int cxgbei_limits_fd(struct icl_drv_limits *idl, int fd) { - struct find_ofld_adapter_rr fa; struct file *fp; struct socket *so; struct adapter *sc; @@ -1801,17 +1759,13 @@ cxgbei_limits_fd(struct icl_drv_limits *idl, int fd) return (EINVAL); } - /* Find the adapter offloading this socket. */ - fa.sc = NULL; - fa.so = so; - t4_iterate(find_offload_adapter, &fa); - if (fa.sc == NULL) { + sc = find_offload_adapter(so); + if (sc == NULL) { fdrop(fp, curthread); return (ENXIO); } fdrop(fp, curthread); - sc = fa.sc; error = begin_synchronized_op(sc, NULL, HOLD_LOCK, "t4lims"); if (error != 0) return (error); diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c index 18d73afc47c5..f6d3a31667fb 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -2266,6 +2266,54 @@ t4_aio_queue_tom(struct socket *so, struct kaiocb *job) return (0); } +/* + * Request/response structure used to find out the adapter offloading + * a socket. + */ +struct find_offload_adapter_data { + struct socket *so; + struct adapter *sc; /* result */ +}; + +static void +find_offload_adapter_cb(struct adapter *sc, void *arg) +{ + struct find_offload_adapter_data *fa = arg; + struct socket *so = fa->so; + struct tom_data *td = sc->tom_softc; + struct tcpcb *tp; + struct inpcb *inp; + + /* Non-TCP were filtered out earlier. */ + MPASS(so->so_proto->pr_protocol == IPPROTO_TCP); + + if (fa->sc != NULL) + return; /* Found already. */ + + if (td == NULL) + return; /* TOE not enabled on this adapter. */ + + inp = sotoinpcb(so); + INP_WLOCK(inp); + if ((inp->inp_flags & INP_DROPPED) == 0) { + tp = intotcpcb(inp); + if (tp->t_flags & TF_TOE && tp->tod == &td->tod) + fa->sc = sc; /* Found. */ + } + INP_WUNLOCK(inp); +} + +struct adapter * +find_offload_adapter(struct socket *so) +{ + struct find_offload_adapter_data fa; + + fa.sc = NULL; + fa.so = so; + t4_iterate(find_offload_adapter_cb, &fa); + return (fa.sc); +} + static int t4_tom_mod_load(void) { diff --git a/sys/dev/cxgbe/tom/t4_tom.h b/sys/dev/cxgbe/tom/t4_tom.h index c3eb8578799d..a178c9b7ef5e 100644 --- a/sys/dev/cxgbe/tom/t4_tom.h +++ b/sys/dev/cxgbe/tom/t4_tom.h @@ -484,6 +484,7 @@ __be32 calc_options2(struct vi_info *, struct conn_params *); uint64_t select_ntuple(struct vi_info *, struct l2t_entry *); int negative_advice(int); int add_tid_to_history(struct adapter *, u_int); +struct adapter *find_offload_adapter(struct socket *); void t4_pcb_detach(struct toedev *, struct tcpcb *); /* t4_connect.c */ From nobody Mon Sep 29 15:22:28 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 4cb4gS58WMz68NkQ; Mon, 29 Sep 2025 15:22:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb4gS2tTfz46BT; Mon, 29 Sep 2025 15:22:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nWFCXC1KB6shB/wL2SPSv6lGkf7fm8voK/IlAHkqoPE=; b=yB/ipRfYPTOa5qbo/XadfrGW3QJa2PsSU/V+gqc91I6fnLSA/rS59CzbKsaYfVfdREkF8L Ivussw31C01f/TMWSAnzzrwAPDxk+n9XldrmnV5xuMondEoN7vdqJAzoYqWjcUsqI00yzK Dt4MHs6TIJJrMH/ogo+1SdBWHkdpLmFPRTbXCZjy9jTW9irqUwFlM/WibXXgN/cOOn6KLb Wd7cTSDNJepITKO3TLPWbppc4Bgm0MLUE5qXmSZeMWhKZhfgeRc4YThqRNhh5QwJpbc8Zv LzJum7Q/AffRRn5KS6mfJFVLvIA5ZIJD9Twb75UqoDZZ6YTNeYNZvZ1UfMLBVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nWFCXC1KB6shB/wL2SPSv6lGkf7fm8voK/IlAHkqoPE=; b=q+4Edlr95Q4Fhf0qkQ9afJTFaOFwx+mFyUxDQzrkpwJCdACh1Fp/Hhipsn5lhgnnYOBgj4 NKmWlAEkFjPHq9yLbXSIqkxWAypwYr1X5OlO5zxMSVDcaly6O6Z5N5kX0uRIjHpbGs5s9D W0z271GSHAU3h+ecR3dKMt8x7m8HfcrGB15+bGwhDPOe+zV+v6xS3lPz81cK6K5KxQ3Xdi 1PmPeGuXLGOjd5dUDCFiK95g9JuOtM3cyA6t2J9s/Esd2IVZdDj/iUIsfUmni155p10pem yCcy+hKQvjGka5fVRXIj84mQLdzuL3wZD2JmRM04/LgEr1K+N+Y6s7uiRBvVtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759159348; a=rsa-sha256; cv=none; b=oykOLfUWLNTc38JGTYlQs8EMrT4Z1IbU4Ni6g1aQ2wG4eNGfzuaB/jytV5ZyBcdiaCLdrI FNSM/cAwQgSFZnv3tYqaEHEPwdAMbI96MtRinbLJTOtrr/md0bOQQsaXbcN0sOrsM6vy8d 9Kq2FKn3ZhI9wpwpahrxOdplASIHMRq+NC0espn1pxl/yU9XVr4vrm4bRJ675pP6ZKXqXS PF/z4vxUwbYEGAodoLbUT3zS03BNrDD8WaL2664KD2b87GThG1NznC2cV2XpTk9u0VYMt3 K00JXUykfA/ycSFZZkOCNIynsFvDZn8hUiKldtQ8vCYyjHkgPwFT7fz/5vMDcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb4gS2BWsz19gf; Mon, 29 Sep 2025 15:22:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TFMSex011806; Mon, 29 Sep 2025 15:22:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TFMSwZ011803; Mon, 29 Sep 2025 15:22:28 GMT (envelope-from git) Date: Mon, 29 Sep 2025 15:22:28 GMT Message-Id: <202509291522.58TFMSwZ011803@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 35b883ccf365 - main - cxgbe: Move send_iscsi_flowc_wr to t4_tom.ko 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 35b883ccf36521a46ba1cd959c144328cce223c5 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=35b883ccf36521a46ba1cd959c144328cce223c5 commit 35b883ccf36521a46ba1cd959c144328cce223c5 Author: John Baldwin AuthorDate: 2025-09-29 14:52:18 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 15:19:11 +0000 cxgbe: Move send_iscsi_flowc_wr to t4_tom.ko Rename the function to send_txdataplen_max_flowc_wr to match the parameter it sets. This function will be reused by other ULP modules. MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/cxgbei/icl_cxgbei.c | 44 +-------------------------------------- sys/dev/cxgbe/tom/t4_tom.c | 44 +++++++++++++++++++++++++++++++++++++++ sys/dev/cxgbe/tom/t4_tom.h | 1 + 3 files changed, 46 insertions(+), 43 deletions(-) diff --git a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c index a79cc58b870c..9cdfd0fb9652 100644 --- a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c +++ b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c @@ -989,48 +989,6 @@ is_memfree(struct adapter *sc) return (true); } -/* XXXNP: move this to t4_tom. */ -static void -send_iscsi_flowc_wr(struct adapter *sc, struct toepcb *toep, int maxlen) -{ - struct wrqe *wr; - struct fw_flowc_wr *flowc; - const u_int nparams = 1; - u_int flowclen; - struct ofld_tx_sdesc *txsd = &toep->txsd[toep->txsd_pidx]; - - flowclen = sizeof(*flowc) + nparams * sizeof(struct fw_flowc_mnemval); - - wr = alloc_wrqe(roundup2(flowclen, 16), &toep->ofld_txq->wrq); - if (wr == NULL) { - /* XXX */ - panic("%s: allocation failure.", __func__); - } - flowc = wrtod(wr); - memset(flowc, 0, wr->wr_len); - - flowc->op_to_nparams = htobe32(V_FW_WR_OP(FW_FLOWC_WR) | - V_FW_FLOWC_WR_NPARAMS(nparams)); - flowc->flowid_len16 = htonl(V_FW_WR_LEN16(howmany(flowclen, 16)) | - V_FW_WR_FLOWID(toep->tid)); - - flowc->mnemval[0].mnemonic = FW_FLOWC_MNEM_TXDATAPLEN_MAX; - flowc->mnemval[0].val = htobe32(maxlen); - - KASSERT(howmany(flowclen, 16) <= MAX_OFLD_TX_SDESC_CREDITS, - ("%s: tx_credits %u too large", __func__, howmany(flowclen, 16))); - txsd->tx_credits = howmany(flowclen, 16); - txsd->plen = 0; - KASSERT(toep->tx_credits >= txsd->tx_credits && toep->txsd_avail > 0, - ("%s: not enough credits (%d)", __func__, toep->tx_credits)); - toep->tx_credits -= txsd->tx_credits; - if (__predict_false(++toep->txsd_pidx == toep->txsd_total)) - toep->txsd_pidx = 0; - toep->txsd_avail--; - - t4_wrq_tx(sc, wr); -} - static void set_ulp_mode_iscsi(struct adapter *sc, struct toepcb *toep, u_int ulp_submode) { @@ -1164,7 +1122,7 @@ icl_cxgbei_conn_handoff(struct icl_conn *ic, int fd) toep->params.ulp_mode = ULP_MODE_ISCSI; toep->ulpcb = icc; - send_iscsi_flowc_wr(icc->sc, toep, + send_txdataplen_max_flowc_wr(icc->sc, toep, roundup(max_iso_pdus * max_tx_pdu_len, tp->t_maxseg)); set_ulp_mode_iscsi(icc->sc, toep, icc->ulp_submode); INP_WUNLOCK(inp); diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c index f6d3a31667fb..53a945f8b4cc 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -2314,6 +2314,50 @@ find_offload_adapter(struct socket *so) return (fa.sc); } +void +send_txdataplen_max_flowc_wr(struct adapter *sc, struct toepcb *toep, + int maxlen) +{ + struct wrqe *wr; + struct fw_flowc_wr *flowc; + const u_int nparams = 1; + u_int flowclen; + struct ofld_tx_sdesc *txsd = &toep->txsd[toep->txsd_pidx]; + + CTR(KTR_CXGBE, "%s: tid %u maxlen=%d", __func__, toep->tid, maxlen); + + flowclen = sizeof(*flowc) + nparams * sizeof(struct fw_flowc_mnemval); + + wr = alloc_wrqe(roundup2(flowclen, 16), &toep->ofld_txq->wrq); + if (wr == NULL) { + /* XXX */ + panic("%s: allocation failure.", __func__); + } + flowc = wrtod(wr); + memset(flowc, 0, wr->wr_len); + + flowc->op_to_nparams = htobe32(V_FW_WR_OP(FW_FLOWC_WR) | + V_FW_FLOWC_WR_NPARAMS(nparams)); + flowc->flowid_len16 = htonl(V_FW_WR_LEN16(howmany(flowclen, 16)) | + V_FW_WR_FLOWID(toep->tid)); + + flowc->mnemval[0].mnemonic = FW_FLOWC_MNEM_TXDATAPLEN_MAX; + flowc->mnemval[0].val = htobe32(maxlen); + + KASSERT(howmany(flowclen, 16) <= MAX_OFLD_TX_SDESC_CREDITS, + ("%s: tx_credits %u too large", __func__, howmany(flowclen, 16))); + txsd->tx_credits = howmany(flowclen, 16); + txsd->plen = 0; + KASSERT(toep->tx_credits >= txsd->tx_credits && toep->txsd_avail > 0, + ("%s: not enough credits (%d)", __func__, toep->tx_credits)); + toep->tx_credits -= txsd->tx_credits; + if (__predict_false(++toep->txsd_pidx == toep->txsd_total)) + toep->txsd_pidx = 0; + toep->txsd_avail--; + + t4_wrq_tx(sc, wr); +} + static int t4_tom_mod_load(void) { diff --git a/sys/dev/cxgbe/tom/t4_tom.h b/sys/dev/cxgbe/tom/t4_tom.h index a178c9b7ef5e..b8aba17c07bb 100644 --- a/sys/dev/cxgbe/tom/t4_tom.h +++ b/sys/dev/cxgbe/tom/t4_tom.h @@ -485,6 +485,7 @@ uint64_t select_ntuple(struct vi_info *, struct l2t_entry *); int negative_advice(int); int add_tid_to_history(struct adapter *, u_int); struct adapter *find_offload_adapter(struct socket *); +void send_txdataplen_max_flowc_wr(struct adapter *, struct toepcb *, int); void t4_pcb_detach(struct toedev *, struct tcpcb *); /* t4_connect.c */ From nobody Mon Sep 29 15:22:29 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cb4gV2r40z68NYn; Mon, 29 Sep 2025 15:22:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb4gV01bZz46Bj; Mon, 29 Sep 2025 15:22:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XSdS0bouAS/Sw3zvuszLEQiQ65HtiolEQa9MS6B1bRY=; b=C/W6bvqa1g1SE8YEBrSbHbL2XXkW0HoX0um10JMgQTUo64vikOzhvvDXAJtxNjXti+qeoK zM5psDgEv7rSEi9ZzZm+xRAWC2wd/vxBFV+bk1jWhmu5SFysdhtXObsrW1dZ3TNkR1ZaRV 2xXxT+6VKe2tl2Iz/Its0eD5PAS0sVn13HyBwSoI/a3azuWTHV5ZNknGWrGpztzVMWDHq+ 1cj262zGehZImZcOXeJeedJ2c4jnMrDQJACqqXtMAABsrpf3d17ve6k9UFcUZTMhRBwVnA 14nXii8IvDEPG/6GVokbp+iD79yaTvn0tNkvMCkNZs0Rl+qysast8WLsvZPfNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XSdS0bouAS/Sw3zvuszLEQiQ65HtiolEQa9MS6B1bRY=; b=k/pz40gHmY+mt6lDTFHZtiCntfrqPwdFedNrGHY55X0EliEXnK53zGa1wy1JWAEqUBHSJm 08+h34gGwOwzmHO7Dnl5CW451VyCHyaEmErqNhptYCUxidt0799xPudLFxpFMUk/YkiKKr 1Tg7wdXi5rWdUh2xqFcJ41kfqS/laKVJJRUt9JVsy5DmI5RGJs6pLfobn/xviD5cV0/A37 gplWLlPHwwqsIvfjNTpCeh3S+CqxrHIaVgv+f/8Iay9BiBUHZT9eIcgBSVxEZfT32ytm0E KfKoV7HsMg/nD7BtgUTNcCHSlVDXyHyEVDCKcB2dBfU8gG488V3JaYzmEn+NHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759159350; a=rsa-sha256; cv=none; b=OD9Q9OXgigvplmZA7p3l6JHX/Q3H/sjmrTsSFeXH3GvH32i7XQ76HwJYSBcSf+hACk1wep EPMBxevYnoZ4CSFfD2D57rVe9KBZy6aBNa5XBy0OPXCFpafTuKIIShERn7+fpH7dnEI+3g LRzlZ5G7kvznjMy0JN/SfU6MTzZEqZE8lbSc66rQCYx8MLiVXfuFjs8ivbiW4usucHSS+R FwNdw2NKu2VA6ptFTQxMmpODwDH4DLy8l50pcOCDPMoEmQt+xI8gwCBbiH52yaIDGxRMjm mgp1me4sA14fA2z92kAxWDXLVt4vpoHsyXgrAz1qLstMXhrbHzunuISzw/BtjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb4gT2zTfz18TK; Mon, 29 Sep 2025 15:22:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TFMTVi011839; Mon, 29 Sep 2025 15:22:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TFMTuf011836; Mon, 29 Sep 2025 15:22:29 GMT (envelope-from git) Date: Mon, 29 Sep 2025 15:22:29 GMT Message-Id: <202509291522.58TFMTuf011836@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 19d9a9b15178 - main - cxgbe: Move the STAG and PBL memory pool arenas to the base driver List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 19d9a9b15178ed7cfe3f463f43e28cce13fc4f94 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=19d9a9b15178ed7cfe3f463f43e28cce13fc4f94 commit 19d9a9b15178ed7cfe3f463f43e28cce13fc4f94 Author: John Baldwin AuthorDate: 2025-09-29 14:55:16 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 15:19:11 +0000 cxgbe: Move the STAG and PBL memory pool arenas to the base driver Both RDMA (iw_cxgbe) and NVMe offloads use TPT table entries to map transaction tags in incoming PDUs to buffers in host memory permitting direct placement of received data into host memory buffers avoiding copies (iSCSI offload uses a different scheme for mapping tags to host memory). Move the vmem arenas for the supporting card memory regions from iw_cxgbe to the main driver so they can be shared with the NVMe offload driver. In addition, add some helper routines for constructing work requests to update TPT table entries. MFC after: 3 days Sponsored by: Chelsio Communications --- sys/conf/files | 2 + sys/dev/cxgbe/adapter.h | 24 +++++ sys/dev/cxgbe/iw_cxgbe/device.c | 20 ++-- sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h | 5 +- sys/dev/cxgbe/iw_cxgbe/mem.c | 110 ++++---------------- sys/dev/cxgbe/iw_cxgbe/resource.c | 38 +------ sys/dev/cxgbe/iw_cxgbe/t4.h | 1 - sys/dev/cxgbe/t4_main.c | 2 + sys/dev/cxgbe/t4_tpt.c | 193 ++++++++++++++++++++++++++++++++++++ sys/dev/cxgbe/tom/t4_tom.h | 6 ++ sys/modules/cxgbe/if_cxgbe/Makefile | 1 + 11 files changed, 261 insertions(+), 141 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 63bf5c3fd724..6da1f7e97973 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1393,6 +1393,8 @@ dev/cxgbe/t4_smt.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_l2t.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" +dev/cxgbe/t4_tpt.c optional cxgbe pci \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_tracer.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_vf.c optional cxgbev pci \ diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index e3906f8058a7..ac8cdddd41e5 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -971,6 +971,9 @@ struct adapter { vmem_t *key_map; struct tls_tunables tlst; + vmem_t *pbl_arena; + vmem_t *stag_arena; + uint8_t doorbells; int offload_map; /* port_id's with IFCAP_TOE enabled */ int bt_map; /* hw_port's that are BASE-T */ @@ -1549,6 +1552,27 @@ int t4_hashfilter_tcb_rpl(struct sge_iq *, const struct rss_header *, struct mbu int t4_del_hashfilter_rpl(struct sge_iq *, const struct rss_header *, struct mbuf *); void free_hftid_hash(struct tid_info *); +/* t4_tpt.c */ +#define T4_STAG_UNSET 0xffffffff +#define T4_WRITE_MEM_DMA_LEN \ + roundup2(sizeof(struct ulp_mem_io) + sizeof(struct ulptx_sgl), 16) +#define T4_ULPTX_MIN_IO 32 +#define T4_MAX_INLINE_SIZE 96 +#define T4_WRITE_MEM_INLINE_LEN(len) \ + roundup2(sizeof(struct ulp_mem_io) + sizeof(struct ulptx_idata) + \ + roundup((len), T4_ULPTX_MIN_IO), 16) + +uint32_t t4_pblpool_alloc(struct adapter *, int); +void t4_pblpool_free(struct adapter *, uint32_t, int); +uint32_t t4_stag_alloc(struct adapter *, int); +void t4_stag_free(struct adapter *, uint32_t, int); +void t4_init_tpt(struct adapter *); +void t4_free_tpt(struct adapter *); +void t4_write_mem_dma_wr(struct adapter *, void *, int, int, uint32_t, + uint32_t, vm_paddr_t, uint64_t); +void t4_write_mem_inline_wr(struct adapter *, void *, int, int, uint32_t, + uint32_t, void *, uint64_t); + static inline struct wrqe * alloc_wrqe(int wr_len, struct sge_wrq *wrq) { diff --git a/sys/dev/cxgbe/iw_cxgbe/device.c b/sys/dev/cxgbe/iw_cxgbe/device.c index 3c4d269f6c69..4610f91e96ac 100644 --- a/sys/dev/cxgbe/iw_cxgbe/device.c +++ b/sys/dev/cxgbe/iw_cxgbe/device.c @@ -132,26 +132,21 @@ c4iw_rdev_open(struct c4iw_rdev *rdev) rdev->stats.rqt.total = sc->vres.rq.size; rdev->stats.qid.total = sc->vres.qp.size; - rc = c4iw_init_resource(rdev, c4iw_num_stags(rdev), T4_MAX_NUM_PD); + rc = c4iw_init_resource(rdev, T4_MAX_NUM_PD); if (rc) { device_printf(sc->dev, "error %d initializing resources\n", rc); goto err1; } - rc = c4iw_pblpool_create(rdev); - if (rc) { - device_printf(sc->dev, "error %d initializing pbl pool\n", rc); - goto err2; - } rc = c4iw_rqtpool_create(rdev); if (rc) { device_printf(sc->dev, "error %d initializing rqt pool\n", rc); - goto err3; + goto err2; } rdev->status_page = (struct t4_dev_status_page *) __get_free_page(GFP_KERNEL); if (!rdev->status_page) { rc = -ENOMEM; - goto err4; + goto err3; } rdev->status_page->qp_start = sc->vres.qp.start; rdev->status_page->qp_size = sc->vres.qp.size; @@ -168,15 +163,13 @@ c4iw_rdev_open(struct c4iw_rdev *rdev) rdev->free_workq = create_singlethread_workqueue("iw_cxgb4_free"); if (!rdev->free_workq) { rc = -ENOMEM; - goto err5; + goto err4; } return (0); -err5: - free_page((unsigned long)rdev->status_page); err4: - c4iw_rqtpool_destroy(rdev); + free_page((unsigned long)rdev->status_page); err3: - c4iw_pblpool_destroy(rdev); + c4iw_rqtpool_destroy(rdev); err2: c4iw_destroy_resource(&rdev->resource); err1: @@ -186,7 +179,6 @@ err1: static void c4iw_rdev_close(struct c4iw_rdev *rdev) { free_page((unsigned long)rdev->status_page); - c4iw_pblpool_destroy(rdev); c4iw_rqtpool_destroy(rdev); c4iw_destroy_resource(&rdev->resource); } diff --git a/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h b/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h index ca2595b65b02..47ce10562c66 100644 --- a/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h +++ b/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h @@ -99,7 +99,6 @@ struct c4iw_id_table { }; struct c4iw_resource { - struct c4iw_id_table tpt_table; struct c4iw_id_table qid_table; struct c4iw_id_table pdid_table; }; @@ -904,11 +903,9 @@ int c4iw_ep_redirect(void *ctx, struct dst_entry *old, struct dst_entry *new, struct l2t_entry *l2t); u32 c4iw_get_resource(struct c4iw_id_table *id_table); void c4iw_put_resource(struct c4iw_id_table *id_table, u32 entry); -int c4iw_init_resource(struct c4iw_rdev *rdev, u32 nr_tpt, u32 nr_pdid); +int c4iw_init_resource(struct c4iw_rdev *rdev, u32 nr_pdid); int c4iw_init_ctrl_qp(struct c4iw_rdev *rdev); -int c4iw_pblpool_create(struct c4iw_rdev *rdev); int c4iw_rqtpool_create(struct c4iw_rdev *rdev); -void c4iw_pblpool_destroy(struct c4iw_rdev *rdev); void c4iw_rqtpool_destroy(struct c4iw_rdev *rdev); void c4iw_destroy_resource(struct c4iw_resource *rscp); int c4iw_destroy_ctrl_qp(struct c4iw_rdev *rdev); diff --git a/sys/dev/cxgbe/iw_cxgbe/mem.c b/sys/dev/cxgbe/iw_cxgbe/mem.c index 9e879bde6169..ae0aa0edc17a 100644 --- a/sys/dev/cxgbe/iw_cxgbe/mem.c +++ b/sys/dev/cxgbe/iw_cxgbe/mem.c @@ -56,49 +56,23 @@ mr_exceeds_hw_limits(struct c4iw_dev *dev, u64 length) static int _c4iw_write_mem_dma_aligned(struct c4iw_rdev *rdev, u32 addr, u32 len, - void *data, int wait) + dma_addr_t data, int wait) { struct adapter *sc = rdev->adap; - struct ulp_mem_io *ulpmc; - struct ulptx_sgl *sgl; u8 wr_len; int ret = 0; struct c4iw_wr_wait wr_wait; struct wrqe *wr; - addr &= 0x7FFFFFF; - if (wait) c4iw_init_wr_wait(&wr_wait); - wr_len = roundup(sizeof *ulpmc + sizeof *sgl, 16); + wr_len = T4_WRITE_MEM_DMA_LEN; wr = alloc_wrqe(wr_len, &sc->sge.ctrlq[0]); if (wr == NULL) return -ENOMEM; - ulpmc = wrtod(wr); - - memset(ulpmc, 0, wr_len); - INIT_ULPTX_WR(ulpmc, wr_len, 0, 0); - ulpmc->wr.wr_hi = cpu_to_be32(V_FW_WR_OP(FW_ULPTX_WR) | - (wait ? F_FW_WR_COMPL : 0)); - ulpmc->wr.wr_lo = wait ? (u64)(unsigned long)&wr_wait : 0; - ulpmc->wr.wr_mid = cpu_to_be32(V_FW_WR_LEN16(DIV_ROUND_UP(wr_len, 16))); - ulpmc->cmd = cpu_to_be32(V_ULPTX_CMD(ULP_TX_MEM_WRITE) | - V_T5_ULP_MEMIO_ORDER(1) | - V_T5_ULP_MEMIO_FID(sc->sge.ofld_rxq[0].iq.abs_id)); - if (chip_id(sc) >= CHELSIO_T7) - ulpmc->dlen = cpu_to_be32(V_T7_ULP_MEMIO_DATA_LEN(len>>5)); - else - ulpmc->dlen = cpu_to_be32(V_ULP_MEMIO_DATA_LEN(len>>5)); - ulpmc->len16 = cpu_to_be32(DIV_ROUND_UP(wr_len-sizeof(ulpmc->wr), 16)); - ulpmc->lock_addr = cpu_to_be32(V_ULP_MEMIO_ADDR(addr)); - - sgl = (struct ulptx_sgl *)(ulpmc + 1); - sgl->cmd_nsge = cpu_to_be32(V_ULPTX_CMD(ULP_TX_SC_DSGL) | - V_ULPTX_NSGE(1)); - sgl->len0 = cpu_to_be32(len); - sgl->addr0 = cpu_to_be64((u64)data); - + t4_write_mem_dma_wr(sc, wrtod(wr), wr_len, 0, addr, len, data, + wait ? (u64)(unsigned long)&wr_wait : 0); t4_wrq_tx(sc, wr); if (wait) @@ -111,74 +85,32 @@ static int _c4iw_write_mem_inline(struct c4iw_rdev *rdev, u32 addr, u32 len, void *data) { struct adapter *sc = rdev->adap; - struct ulp_mem_io *ulpmc; - struct ulptx_idata *ulpsc; - u8 wr_len, *to_dp, *from_dp; + u8 wr_len, *from_dp; int copy_len, num_wqe, i, ret = 0; struct c4iw_wr_wait wr_wait; struct wrqe *wr; - u32 cmd; - - cmd = cpu_to_be32(V_ULPTX_CMD(ULP_TX_MEM_WRITE)); - cmd |= cpu_to_be32(F_T5_ULP_MEMIO_IMM); - - addr &= 0x7FFFFFF; CTR3(KTR_IW_CXGBE, "%s addr 0x%x len %u", __func__, addr, len); - num_wqe = DIV_ROUND_UP(len, C4IW_MAX_INLINE_SIZE); c4iw_init_wr_wait(&wr_wait); + num_wqe = DIV_ROUND_UP(len, T4_MAX_INLINE_SIZE); + from_dp = data; for (i = 0; i < num_wqe; i++) { - - copy_len = min(len, C4IW_MAX_INLINE_SIZE); - wr_len = roundup(sizeof *ulpmc + sizeof *ulpsc + - roundup(copy_len, T4_ULPTX_MIN_IO), 16); + copy_len = min(len, T4_MAX_INLINE_SIZE); + wr_len = T4_WRITE_MEM_INLINE_LEN(copy_len); wr = alloc_wrqe(wr_len, &sc->sge.ctrlq[0]); if (wr == NULL) return -ENOMEM; - ulpmc = wrtod(wr); - - memset(ulpmc, 0, wr_len); - INIT_ULPTX_WR(ulpmc, wr_len, 0, 0); - - if (i == (num_wqe-1)) { - ulpmc->wr.wr_hi = cpu_to_be32(V_FW_WR_OP(FW_ULPTX_WR) | - F_FW_WR_COMPL); - ulpmc->wr.wr_lo = - (__force __be64)(unsigned long) &wr_wait; - } else - ulpmc->wr.wr_hi = cpu_to_be32(V_FW_WR_OP(FW_ULPTX_WR)); - ulpmc->wr.wr_mid = cpu_to_be32( - V_FW_WR_LEN16(DIV_ROUND_UP(wr_len, 16))); - - ulpmc->cmd = cmd; - if (chip_id(sc) >= CHELSIO_T7) - ulpmc->dlen = cpu_to_be32(V_T7_ULP_MEMIO_DATA_LEN( - DIV_ROUND_UP(copy_len, T4_ULPTX_MIN_IO))); - else - ulpmc->dlen = cpu_to_be32(V_ULP_MEMIO_DATA_LEN( - DIV_ROUND_UP(copy_len, T4_ULPTX_MIN_IO))); - ulpmc->len16 = cpu_to_be32(DIV_ROUND_UP(wr_len-sizeof(ulpmc->wr), - 16)); - ulpmc->lock_addr = cpu_to_be32(V_ULP_MEMIO_ADDR(addr + i * 3)); - - ulpsc = (struct ulptx_idata *)(ulpmc + 1); - ulpsc->cmd_more = cpu_to_be32(V_ULPTX_CMD(ULP_TX_SC_IMM)); - ulpsc->len = cpu_to_be32(roundup(copy_len, T4_ULPTX_MIN_IO)); - - to_dp = (u8 *)(ulpsc + 1); - from_dp = (u8 *)data + i * C4IW_MAX_INLINE_SIZE; - if (data) - memcpy(to_dp, from_dp, copy_len); - else - memset(to_dp, 0, copy_len); - if (copy_len % T4_ULPTX_MIN_IO) - memset(to_dp + copy_len, 0, T4_ULPTX_MIN_IO - - (copy_len % T4_ULPTX_MIN_IO)); + t4_write_mem_inline_wr(sc, wrtod(wr), wr_len, 0, addr, copy_len, + from_dp, i == (num_wqe - 1) ? + (__force __be64)(unsigned long) &wr_wait : 0); t4_wrq_tx(sc, wr); - len -= C4IW_MAX_INLINE_SIZE; - } + if (from_dp != NULL) + from_dp += T4_MAX_INLINE_SIZE; + addr += T4_MAX_INLINE_SIZE >> 5; + len -= T4_MAX_INLINE_SIZE; + } ret = c4iw_wait_for_reply(rdev, &wr_wait, 0, 0, NULL, __func__); return ret; } @@ -208,7 +140,7 @@ _c4iw_write_mem_dma(struct c4iw_rdev *rdev, u32 addr, u32 len, void *data) dmalen = T4_ULPTX_MAX_DMA; remain -= dmalen; ret = _c4iw_write_mem_dma_aligned(rdev, addr, dmalen, - (void *)daddr, !remain); + daddr, !remain); if (ret) goto out; addr += dmalen >> 5; @@ -270,8 +202,8 @@ static int write_tpt_entry(struct c4iw_rdev *rdev, u32 reset_tpt_entry, stag_idx = (*stag) >> 8; if ((!reset_tpt_entry) && (*stag == T4_STAG_UNSET)) { - stag_idx = c4iw_get_resource(&rdev->resource.tpt_table); - if (!stag_idx) { + stag_idx = t4_stag_alloc(rdev->adap, 1); + if (stag_idx == T4_STAG_UNSET) { mutex_lock(&rdev->stats.lock); rdev->stats.stag.fail++; mutex_unlock(&rdev->stats.lock); @@ -316,7 +248,7 @@ static int write_tpt_entry(struct c4iw_rdev *rdev, u32 reset_tpt_entry, sizeof(tpt), &tpt); if (reset_tpt_entry) { - c4iw_put_resource(&rdev->resource.tpt_table, stag_idx); + t4_stag_free(rdev->adap, stag_idx, 1); mutex_lock(&rdev->stats.lock); rdev->stats.stag.cur -= 32; mutex_unlock(&rdev->stats.lock); diff --git a/sys/dev/cxgbe/iw_cxgbe/resource.c b/sys/dev/cxgbe/iw_cxgbe/resource.c index 644ea0c631bf..cd20f1eafdd6 100644 --- a/sys/dev/cxgbe/iw_cxgbe/resource.c +++ b/sys/dev/cxgbe/iw_cxgbe/resource.c @@ -59,13 +59,9 @@ static int c4iw_init_qid_table(struct c4iw_rdev *rdev) } /* nr_* must be power of 2 */ -int c4iw_init_resource(struct c4iw_rdev *rdev, u32 nr_tpt, u32 nr_pdid) +int c4iw_init_resource(struct c4iw_rdev *rdev, u32 nr_pdid) { int err = 0; - err = c4iw_id_table_alloc(&rdev->resource.tpt_table, 0, nr_tpt, 1, - C4IW_ID_TABLE_F_RANDOM); - if (err) - goto tpt_err; err = c4iw_init_qid_table(rdev); if (err) goto qid_err; @@ -77,8 +73,6 @@ int c4iw_init_resource(struct c4iw_rdev *rdev, u32 nr_tpt, u32 nr_pdid) pdid_err: c4iw_id_table_free(&rdev->resource.qid_table); qid_err: - c4iw_id_table_free(&rdev->resource.tpt_table); - tpt_err: return -ENOMEM; } @@ -243,7 +237,6 @@ void c4iw_put_qpid(struct c4iw_rdev *rdev, u32 qid, void c4iw_destroy_resource(struct c4iw_resource *rscp) { - c4iw_id_table_free(&rscp->tpt_table); c4iw_id_table_free(&rscp->qid_table); c4iw_id_table_free(&rscp->pdid_table); } @@ -254,12 +247,9 @@ void c4iw_destroy_resource(struct c4iw_resource *rscp) u32 c4iw_pblpool_alloc(struct c4iw_rdev *rdev, int size) { - unsigned long addr; + u32 addr; - vmem_xalloc(rdev->pbl_arena, roundup(size, (1 << MIN_PBL_SHIFT)), - 4, 0, 0, VMEM_ADDR_MIN, VMEM_ADDR_MAX, - M_FIRSTFIT|M_NOWAIT, &addr); - CTR3(KTR_IW_CXGBE, "%s addr 0x%x size %d", __func__, (u32)addr, size); + addr = t4_pblpool_alloc(rdev->adap, size); mutex_lock(&rdev->stats.lock); if (addr) { rdev->stats.pbl.cur += roundup(size, 1 << MIN_PBL_SHIFT); @@ -268,33 +258,15 @@ u32 c4iw_pblpool_alloc(struct c4iw_rdev *rdev, int size) } else rdev->stats.pbl.fail++; mutex_unlock(&rdev->stats.lock); - return (u32)addr; + return addr; } void c4iw_pblpool_free(struct c4iw_rdev *rdev, u32 addr, int size) { - CTR3(KTR_IW_CXGBE, "%s addr 0x%x size %d", __func__, addr, size); mutex_lock(&rdev->stats.lock); rdev->stats.pbl.cur -= roundup(size, 1 << MIN_PBL_SHIFT); mutex_unlock(&rdev->stats.lock); - vmem_xfree(rdev->pbl_arena, addr, roundup(size,(1 << MIN_PBL_SHIFT))); -} - -int c4iw_pblpool_create(struct c4iw_rdev *rdev) -{ - rdev->pbl_arena = vmem_create("PBL_MEM_POOL", - rdev->adap->vres.pbl.start, - rdev->adap->vres.pbl.size, - 1, 0, M_FIRSTFIT| M_NOWAIT); - if (!rdev->pbl_arena) - return -ENOMEM; - - return 0; -} - -void c4iw_pblpool_destroy(struct c4iw_rdev *rdev) -{ - vmem_destroy(rdev->pbl_arena); + t4_pblpool_free(rdev->adap, addr, size); } /* RQT Memory Manager. */ diff --git a/sys/dev/cxgbe/iw_cxgbe/t4.h b/sys/dev/cxgbe/iw_cxgbe/t4.h index 48f85cf7965b..ffb610420640 100644 --- a/sys/dev/cxgbe/iw_cxgbe/t4.h +++ b/sys/dev/cxgbe/iw_cxgbe/t4.h @@ -64,7 +64,6 @@ #define T4_MAX_NUM_PD 65536 #define T4_MAX_MR_SIZE (~0ULL) #define T4_PAGESIZE_MASK 0xffffffff000 /* 4KB-8TB */ -#define T4_STAG_UNSET 0xffffffff #define T4_FW_MAJ 0 #define A_PCIE_MA_SYNC 0x30b4 diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index e9cb56562abe..388c5c104d19 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -1655,6 +1655,7 @@ t4_attach(device_t dev) if (sc->vres.key.size != 0) sc->key_map = vmem_create("T4TLS key map", sc->vres.key.start, sc->vres.key.size, 32, 0, M_FIRSTFIT | M_WAITOK); + t4_init_tpt(sc); /* * Second pass over the ports. This time we know the number of rx and @@ -1956,6 +1957,7 @@ t4_detach_common(device_t dev) #endif if (sc->key_map) vmem_destroy(sc->key_map); + t4_free_tpt(sc); #ifdef INET6 t4_destroy_clip_table(sc); #endif diff --git a/sys/dev/cxgbe/t4_tpt.c b/sys/dev/cxgbe/t4_tpt.c new file mode 100644 index 000000000000..d18eabb026f1 --- /dev/null +++ b/sys/dev/cxgbe/t4_tpt.c @@ -0,0 +1,193 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Chelsio Communications, Inc. + * Written by: John Baldwin + * + * 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 "common/common.h" + +/* + * Support routines to manage TPT entries used for both RDMA and NVMe + * offloads. This includes allocating STAG indices and managing the + * PBL pool. + */ + +#define T4_ULPTX_MIN_IO 32 +#define T4_MAX_INLINE_SIZE 96 +#define T4_ULPTX_MAX_DMA 1024 + +/* PBL and STAG Memory Managers. */ + +#define MIN_PBL_SHIFT 5 /* 32B == min PBL size (4 entries) */ + +uint32_t +t4_pblpool_alloc(struct adapter *sc, int size) +{ + vmem_addr_t addr; + + if (vmem_xalloc(sc->pbl_arena, roundup(size, (1 << MIN_PBL_SHIFT)), + 4, 0, 0, VMEM_ADDR_MIN, VMEM_ADDR_MAX, M_FIRSTFIT | M_NOWAIT, + &addr) != 0) + return (0); +#ifdef VERBOSE_TRACES + CTR(KTR_CXGBE, "%s: addr 0x%lx size %d", __func__, addr, size); +#endif + return (addr); +} + +void +t4_pblpool_free(struct adapter *sc, uint32_t addr, int size) +{ +#ifdef VERBOSE_TRACES + CTR(KTR_CXGBE, "%s: addr 0x%x size %d", __func__, addr, size); +#endif + vmem_xfree(sc->pbl_arena, addr, roundup(size, (1 << MIN_PBL_SHIFT))); +} + +uint32_t +t4_stag_alloc(struct adapter *sc, int size) +{ + vmem_addr_t stag_idx; + + if (vmem_alloc(sc->stag_arena, size, M_FIRSTFIT | M_NOWAIT, + &stag_idx) != 0) + return (T4_STAG_UNSET); +#ifdef VERBOSE_TRACES + CTR(KTR_CXGBE, "%s: idx 0x%lx size %d", __func__, stag_idx, size); +#endif + return (stag_idx); +} + +void +t4_stag_free(struct adapter *sc, uint32_t stag_idx, int size) +{ +#ifdef VERBOSE_TRACES + CTR(KTR_CXGBE, "%s: idx 0x%x size %d", __func__, stag_idx, size); +#endif + vmem_free(sc->stag_arena, stag_idx, size); +} + +void +t4_init_tpt(struct adapter *sc) +{ + if (sc->vres.pbl.size != 0) + sc->pbl_arena = vmem_create("PBL_MEM_POOL", sc->vres.pbl.start, + sc->vres.pbl.size, 1, 0, M_FIRSTFIT | M_WAITOK); + if (sc->vres.stag.size != 0) + sc->stag_arena = vmem_create("STAG", 1, + sc->vres.stag.size >> 5, 1, 0, M_FIRSTFIT | M_WAITOK); +} + +void +t4_free_tpt(struct adapter *sc) +{ + if (sc->pbl_arena != NULL) + vmem_destroy(sc->pbl_arena); + if (sc->stag_arena != NULL) + vmem_destroy(sc->stag_arena); +} + +/* + * TPT support routines. TPT entries are stored in the STAG adapter + * memory region and are written to via ULP_TX_MEM_WRITE commands in + * FW_ULPTX_WR work requests. + */ + +void +t4_write_mem_dma_wr(struct adapter *sc, void *wr, int wr_len, int tid, + uint32_t addr, uint32_t len, vm_paddr_t data, uint64_t cookie) +{ + struct ulp_mem_io *ulpmc; + struct ulptx_sgl *sgl; + + MPASS(wr_len == T4_WRITE_MEM_DMA_LEN); + + addr &= 0x7FFFFFF; + + memset(wr, 0, wr_len); + ulpmc = wr; + INIT_ULPTX_WR(ulpmc, wr_len, 0, tid); + if (cookie != 0) { + ulpmc->wr.wr_hi |= htobe32(F_FW_WR_COMPL); + ulpmc->wr.wr_lo = cookie; + } + ulpmc->cmd = htobe32(V_ULPTX_CMD(ULP_TX_MEM_WRITE) | + V_T5_ULP_MEMIO_ORDER(1) | + V_T5_ULP_MEMIO_FID(sc->sge.ofld_rxq[0].iq.abs_id)); + if (chip_id(sc) >= CHELSIO_T7) + ulpmc->dlen = htobe32(V_T7_ULP_MEMIO_DATA_LEN(len >> 5)); + else + ulpmc->dlen = htobe32(V_ULP_MEMIO_DATA_LEN(len >> 5)); + ulpmc->len16 = htobe32((tid << 8) | + DIV_ROUND_UP(wr_len - sizeof(ulpmc->wr), 16)); + ulpmc->lock_addr = htobe32(V_ULP_MEMIO_ADDR(addr)); + + sgl = (struct ulptx_sgl *)(ulpmc + 1); + sgl->cmd_nsge = htobe32(V_ULPTX_CMD(ULP_TX_SC_DSGL) | V_ULPTX_NSGE(1)); + sgl->len0 = htobe32(len); + sgl->addr0 = htobe64(data); +} + +void +t4_write_mem_inline_wr(struct adapter *sc, void *wr, int wr_len, int tid, + uint32_t addr, uint32_t len, void *data, uint64_t cookie) +{ + struct ulp_mem_io *ulpmc; + struct ulptx_idata *ulpsc; + + MPASS(len > 0 && len <= T4_MAX_INLINE_SIZE); + MPASS(wr_len == T4_WRITE_MEM_INLINE_LEN(len)); + + addr &= 0x7FFFFFF; + + memset(wr, 0, wr_len); + ulpmc = wr; + INIT_ULPTX_WR(ulpmc, wr_len, 0, tid); + + if (cookie != 0) { + ulpmc->wr.wr_hi |= htobe32(F_FW_WR_COMPL); + ulpmc->wr.wr_lo = cookie; + } + + ulpmc->cmd = htobe32(V_ULPTX_CMD(ULP_TX_MEM_WRITE) | + F_T5_ULP_MEMIO_IMM); + + if (chip_id(sc) >= CHELSIO_T7) + ulpmc->dlen = htobe32(V_T7_ULP_MEMIO_DATA_LEN( + DIV_ROUND_UP(len, T4_ULPTX_MIN_IO))); + else + ulpmc->dlen = htobe32(V_ULP_MEMIO_DATA_LEN( + DIV_ROUND_UP(len, T4_ULPTX_MIN_IO))); + ulpmc->len16 = htobe32((tid << 8) | + DIV_ROUND_UP(wr_len - sizeof(ulpmc->wr), 16)); + ulpmc->lock_addr = htobe32(V_ULP_MEMIO_ADDR(addr)); + + ulpsc = (struct ulptx_idata *)(ulpmc + 1); + ulpsc->cmd_more = htobe32(V_ULPTX_CMD(ULP_TX_SC_IMM)); + ulpsc->len = htobe32(roundup(len, T4_ULPTX_MIN_IO)); + + if (data != NULL) + memcpy(ulpsc + 1, data, len); +} diff --git a/sys/dev/cxgbe/tom/t4_tom.h b/sys/dev/cxgbe/tom/t4_tom.h index b8aba17c07bb..c8c2d432b8f1 100644 --- a/sys/dev/cxgbe/tom/t4_tom.h +++ b/sys/dev/cxgbe/tom/t4_tom.h @@ -586,4 +586,10 @@ int tls_tx_key(struct toepcb *); void tls_uninit_toep(struct toepcb *); int tls_alloc_ktls(struct toepcb *, struct ktls_session *, int); +/* t4_tpt.c */ +uint32_t t4_pblpool_alloc(struct adapter *, int); +void t4_pblpool_free(struct adapter *, uint32_t, int); +int t4_pblpool_create(struct adapter *); +void t4_pblpool_destroy(struct adapter *); + #endif diff --git a/sys/modules/cxgbe/if_cxgbe/Makefile b/sys/modules/cxgbe/if_cxgbe/Makefile index 981c3466c452..c8ba9df381a4 100644 --- a/sys/modules/cxgbe/if_cxgbe/Makefile +++ b/sys/modules/cxgbe/if_cxgbe/Makefile @@ -31,6 +31,7 @@ SRCS+= t4_netmap.c SRCS+= t4_sched.c SRCS+= t4_sge.c SRCS+= t4_smt.c +SRCS+= t4_tpt.c SRCS+= t4_tracer.c SRCS+= cudbg_common.c SRCS+= cudbg_flash_utils.c From nobody Mon Sep 29 15:22:30 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cb4gV6lSmz68Nc1; Mon, 29 Sep 2025 15:22:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb4gV4n5rz468N; Mon, 29 Sep 2025 15:22:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mkABo3Y0ZlGOE/xBtynuiiLclUD9ag06bocLksZ93l0=; b=aiOW8IqUlPTwUQ3TcdrFJqiqV82NgFjU8yTojtTsYzE05clctU8YK9l4/ghRUSECPC4VT6 EPEvHliJcRJloW59JfjyqmNJ1LP/yOryogAamKQSx44xIr2+EbNWMJidiqDZsTaVJ0O3zB oB843XnQe6uhe8+v4QOQWlfHux9OWQYsJbH8EQO651EKjb3m3zhdE1t7ur1cKFmv3vhrlz ATEs100QTL2IbLkj3kqqexHj0F0f/pM9ukaTh09e7LAxhSh6N/bnueeBd/+JsQJcUve/OD gsA7RJGJdlqd2NyUu5w2/dxtix+EILtoqnpxefCbb5yZKX6SaoIEL+8G2NQDFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mkABo3Y0ZlGOE/xBtynuiiLclUD9ag06bocLksZ93l0=; b=C58WI6Jp/2M5WgMclRjwoBv6drv5tQTfu6fr/Kb77kYRkeg3A8Gfy8APqIZ2EhW+Ydf9Lh iaCJE/jarPzdTsDt3sKrSzRUVLPyOxl/7VRN8cJve9HRUsD7wjSLTHSg0Wp3P6ECp4LC2K Jr6bFwko75baWAEydyjXA2VU8MPhC7N/pgYKaoZ/L8iLxmZBs7qwWLiDgVnUhs9ImhUh/E 6b0ZUyTPFsKjMYqMQjM/pZEAC3011VFlkRE5zXLkwPdoPgArgDh3JyTVBLYgYvFHhgJNit O8bNcRYQWDEkUaP793DInUT8kwvnFlBDwxN4PTA1XG3xu87q3Yhvut9mmJVjWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759159350; a=rsa-sha256; cv=none; b=TCrVfODo5bs77K+lR0FQFPer5uT0pNJE5mtQ0pZjk2rps30HxgFubixo/cRqwQf/Vg/MIe Eae1UDWu043BxRYu70xo0qNFJn087gqRFG7r8wZ3P5lm14wwHCMT21oUHLRW2Lsp/vNVmq UbCxoqbswO3fNuJi2vPS3PKdH/VMEUkTdpLgnBmhKXJMHPVasgKR7TDAlljeLbSJw9fpWO 6Bu7mxqdYZwmtcbJCvp6SfFHIIRUEMljZe153jdY1yNdCGqKEgzmumttpRUztD6vkmDEvA 08QcnBtlArZ4Yzr8Vk2Vr2cEDDO203Mh4FeHeYKxg/ei8TtIQLzlSubPT/kpfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb4gV3r6Vz191n; Mon, 29 Sep 2025 15:22:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TFMUom011874; Mon, 29 Sep 2025 15:22:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TFMU8s011871; Mon, 29 Sep 2025 15:22:30 GMT (envelope-from git) Date: Mon, 29 Sep 2025 15:22:30 GMT Message-Id: <202509291522.58TFMU8s011871@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 8bc9d3089314 - main - ccr: Support T7. 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8bc9d3089314635572accfe31a4a56afcc299bab Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=8bc9d3089314635572accfe31a4a56afcc299bab commit 8bc9d3089314635572accfe31a4a56afcc299bab Author: John Baldwin AuthorDate: 2025-09-29 14:58:06 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 15:19:12 +0000 ccr: Support T7. - Use expanded channel ID fields (2 bits vs 1 bits), even on T6 as on T6 the extra bits were previously reserved and the channel IDs should only be 0 or 1 on T6. - Set CMDMORE in ULP_TX_PKT on T7. MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/crypto/t4_crypto.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/sys/dev/cxgbe/crypto/t4_crypto.c b/sys/dev/cxgbe/crypto/t4_crypto.c index 2c83b10b13d6..24dfdc1f23db 100644 --- a/sys/dev/cxgbe/crypto/t4_crypto.c +++ b/sys/dev/cxgbe/crypto/t4_crypto.c @@ -458,8 +458,9 @@ ccr_populate_wreq(struct ccr_softc *sc, struct ccr_session *s, crwr->ulptx.cmd_dest = htobe32(V_ULPTX_CMD(ULP_TX_PKT) | V_ULP_TXPKT_DATAMODIFY(0) | - V_ULP_TXPKT_CHANNELID(s->port->tx_channel_id) | + V_T7_ULP_TXPKT_CHANNELID(s->port->tx_channel_id) | V_ULP_TXPKT_DEST(0) | + (is_t7(sc->adapter) ? V_ULP_TXPKT_CMDMORE(1) : 0) | V_ULP_TXPKT_FID(sc->first_rxq_id) | V_ULP_TXPKT_RO(1)); crwr->ulptx.len = htobe32( ((wr_len - sizeof(struct fw_crypto_lookaside_wr)) / 16)); @@ -545,7 +546,7 @@ ccr_hash(struct ccr_softc *sc, struct ccr_session *s, struct cryptop *crp) crwr->sec_cpl.op_ivinsrtofst = htobe32( V_CPL_TX_SEC_PDU_OPCODE(CPL_TX_SEC_PDU) | - V_CPL_TX_SEC_PDU_RXCHID(s->port->rx_channel_id) | + V_T7_CPL_TX_SEC_PDU_RXCHID(s->port->rx_channel_id) | V_CPL_TX_SEC_PDU_ACKFOLLOWS(0) | V_CPL_TX_SEC_PDU_ULPTXLPBK(1) | V_CPL_TX_SEC_PDU_CPLLEN(2) | V_CPL_TX_SEC_PDU_PLACEHOLDER(0) | V_CPL_TX_SEC_PDU_IVINSRTOFST(0)); @@ -705,7 +706,7 @@ ccr_cipher(struct ccr_softc *sc, struct ccr_session *s, struct cryptop *crp) crwr->sec_cpl.op_ivinsrtofst = htobe32( V_CPL_TX_SEC_PDU_OPCODE(CPL_TX_SEC_PDU) | - V_CPL_TX_SEC_PDU_RXCHID(s->port->rx_channel_id) | + V_T7_CPL_TX_SEC_PDU_RXCHID(s->port->rx_channel_id) | V_CPL_TX_SEC_PDU_ACKFOLLOWS(0) | V_CPL_TX_SEC_PDU_ULPTXLPBK(1) | V_CPL_TX_SEC_PDU_CPLLEN(2) | V_CPL_TX_SEC_PDU_PLACEHOLDER(0) | V_CPL_TX_SEC_PDU_IVINSRTOFST(1)); @@ -1006,7 +1007,7 @@ ccr_eta(struct ccr_softc *sc, struct ccr_session *s, struct cryptop *crp) crwr->sec_cpl.op_ivinsrtofst = htobe32( V_CPL_TX_SEC_PDU_OPCODE(CPL_TX_SEC_PDU) | - V_CPL_TX_SEC_PDU_RXCHID(s->port->rx_channel_id) | + V_T7_CPL_TX_SEC_PDU_RXCHID(s->port->rx_channel_id) | V_CPL_TX_SEC_PDU_ACKFOLLOWS(0) | V_CPL_TX_SEC_PDU_ULPTXLPBK(1) | V_CPL_TX_SEC_PDU_CPLLEN(2) | V_CPL_TX_SEC_PDU_PLACEHOLDER(0) | V_CPL_TX_SEC_PDU_IVINSRTOFST(1)); @@ -1293,7 +1294,7 @@ ccr_gcm(struct ccr_softc *sc, struct ccr_session *s, struct cryptop *crp) crwr->sec_cpl.op_ivinsrtofst = htobe32( V_CPL_TX_SEC_PDU_OPCODE(CPL_TX_SEC_PDU) | - V_CPL_TX_SEC_PDU_RXCHID(s->port->rx_channel_id) | + V_T7_CPL_TX_SEC_PDU_RXCHID(s->port->rx_channel_id) | V_CPL_TX_SEC_PDU_ACKFOLLOWS(0) | V_CPL_TX_SEC_PDU_ULPTXLPBK(1) | V_CPL_TX_SEC_PDU_CPLLEN(2) | V_CPL_TX_SEC_PDU_PLACEHOLDER(0) | V_CPL_TX_SEC_PDU_IVINSRTOFST(1)); @@ -1645,7 +1646,7 @@ ccr_ccm(struct ccr_softc *sc, struct ccr_session *s, struct cryptop *crp) crwr->sec_cpl.op_ivinsrtofst = htobe32( V_CPL_TX_SEC_PDU_OPCODE(CPL_TX_SEC_PDU) | - V_CPL_TX_SEC_PDU_RXCHID(s->port->rx_channel_id) | + V_T7_CPL_TX_SEC_PDU_RXCHID(s->port->rx_channel_id) | V_CPL_TX_SEC_PDU_ACKFOLLOWS(0) | V_CPL_TX_SEC_PDU_ULPTXLPBK(1) | V_CPL_TX_SEC_PDU_CPLLEN(2) | V_CPL_TX_SEC_PDU_PLACEHOLDER(0) | V_CPL_TX_SEC_PDU_IVINSRTOFST(1)); @@ -1932,13 +1933,15 @@ ccr_init_port(struct ccr_softc *sc, int port) "Too many ports to fit in port_mask"); /* - * Completions for crypto requests on port 1 can sometimes + * Completions for crypto requests on port 1 on T6 can sometimes * return a stale cookie value due to a firmware bug. Disable * requests on port 1 by default on affected firmware. */ - if (sc->adapter->params.fw_vers >= FW_VERSION32(1, 25, 4, 0) || - port == 0) - sc->port_mask |= 1u << port; + if (port != 0 && is_t6(sc->adapter) && + sc->adapter->params.fw_vers < FW_VERSION32(1, 25, 4, 0)) + return; + + sc->port_mask |= 1u << port; } static int @@ -2745,7 +2748,9 @@ static driver_t ccr_driver = { sizeof(struct ccr_softc) }; -DRIVER_MODULE(ccr, t6nex, ccr_driver, ccr_modevent, NULL); +DRIVER_MODULE(ccr, chnex, ccr_driver, ccr_modevent, NULL); +DRIVER_MODULE(ccr, t6nex, ccr_driver, NULL, NULL); MODULE_VERSION(ccr, 1); MODULE_DEPEND(ccr, crypto, 1, 1, 1); +MODULE_DEPEND(ccr, chnex, 1, 1, 1); MODULE_DEPEND(ccr, t6nex, 1, 1, 1); From nobody Mon Sep 29 15:22:31 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cb4gX0VFnz68P6m; Mon, 29 Sep 2025 15:22: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 4cb4gW566yz46RH; Mon, 29 Sep 2025 15:22:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bGaKGWTnJgloaoo9n4MT29Qi8u4O2g5JIErPU9lIRm0=; b=g8zQk4Q0b1gabwKjm39cLXhDgnt0/Gkbg/BQ4wk5p8VcEQEPX5EyWF7B2DuSFxacpyUckZ l6A2Nsl2gJ872TChOFpf/ZIH3+a/QczuN/qxdr/rz9dlgkJNrmCFd0d7BM/FkmqBTT+2R1 1KF7qtiv6oAoHt5T3ifnLatmrR6q6VEV5Npoe1Q+XPAEFRYfme6mXpdI6FGEDP0U/roF4N TYah/grcpioUz18OvTMcsGUpOr5+Eup6Qxs8zqe6s0XX4wGPKVjicVLJD4sTZklvX9AVyW cv66EHyJipqTAHSIN+2u7AErvU0i7H3ispRXqu/2Rh67junv29RCNlHgiSzI5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159351; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bGaKGWTnJgloaoo9n4MT29Qi8u4O2g5JIErPU9lIRm0=; b=LVMRJlrabvdm8Q4oG0L+L/Gw+zk/VztAyq9krMwACJ9TmgyF0dzhyOoQ7RamBa07eA2nkp iNbaPDreHlo9+5ByFzjdsk0V+SW6UgYsQYyL3ItqkVivZT/WIAi1kDYBgsuzDs2d+wt/Rv 0ulkCqbj3xdLOwYuNUhqGbAYc7ixbWDMH4Av9tHaCa0gnCDAEgBhbVPtckMvp6ZPo9C10E sgpDyCHc+lAfFsbbDygw1zVNv27gqvnFGhJzFjplqitebCYT1SiyHaDJuvFYKdxQcVZ2s3 rmOsEPGY9fT6keo84QPSqxSH7I1LF91swGAf0ppszHBam244lmN6aV1ZaQDJMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759159351; a=rsa-sha256; cv=none; b=vKqD7sWjSEMDXVrPHXqu6CEqyd985KFAzXZ7PjGyjc8gf2pS9tyRBjr47ibusLyRZAMcPw pLkEkfG3n0Jyws/2EvHOjehho40UGerV9URV2fCm3ut1+7+AP30RFBM7uCrMvi0A8vpYJG Mj2TIhlQ0HB9BH+JipfOp4bXt3Vlv/XZpS9Yi5/FLqhPdCKlAzXFXWf4r+PX2Z5TGMiMf5 St+4YWj04uLjYWBuQLNFOJVfQURfydpmK0bZAplz3r7p19Ah3oBAH3dt0Kxry2DPzQfePv CiFKZ3CZJrdjPiMrV0oqWZ23gTxcQGk882KxySNrig5gWJ8Sm1HWupPm2ARTbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb4gW4ZbCz19xg; Mon, 29 Sep 2025 15:22:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TFMVIk011915; Mon, 29 Sep 2025 15:22:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TFMVmD011908; Mon, 29 Sep 2025 15:22:31 GMT (envelope-from git) Date: Mon, 29 Sep 2025 15:22:31 GMT Message-Id: <202509291522.58TFMVmD011908@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 4f272a5ef3d8 - main - cxgbe: Support for NIC KTLS transmit on T7 adapters. 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4f272a5ef3d8073940e7719401d1e8de2de6100a Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=4f272a5ef3d8073940e7719401d1e8de2de6100a commit 4f272a5ef3d8073940e7719401d1e8de2de6100a Author: John Baldwin AuthorDate: 2025-09-29 14:59:03 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 15:19:12 +0000 cxgbe: Support for NIC KTLS transmit on T7 adapters. Unlike NIC KTLS support on T6, T7 is able to reuse the existing TSO functionality directly, including trimming the output of the crypto engine before it is passed on to TSO. This is much simpler and does not require the use of bypass pseudo-connections in the TOE engine. Among other things this permits arbitrary TCP options (including the full range of possible TCP timestamp values) while also avoiding various edge cases where parts of a requested TCP packet could not always be transmitted (e.g. partial trailers). This implementation also permits NIC KTLS to be used in parallel with TOE. This version does not yet support connections over a VF (specifically the ktls_tunnel_packet function needs to handle the VF work request), nor does it support VxLAN offload. MFC after: 3 days Sponsored by: Chelsio Communications --- sys/conf/files | 2 + sys/dev/cxgbe/adapter.h | 20 +- sys/dev/cxgbe/crypto/t7_kern_tls.c | 1435 +++++++++++++++++++++++++++++++++++ sys/dev/cxgbe/offload.h | 7 +- sys/dev/cxgbe/t4_main.c | 16 +- sys/dev/cxgbe/t4_sge.c | 36 +- sys/modules/cxgbe/if_cxgbe/Makefile | 1 + 7 files changed, 1503 insertions(+), 14 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 6da1f7e97973..d9730e6bf55b 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1405,6 +1405,8 @@ dev/cxgbe/common/t4vf_hw.c optional cxgbev pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/crypto/t6_kern_tls.c optional cxgbe pci kern_tls \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" +dev/cxgbe/crypto/t7_kern_tls.c optional cxgbe pci kern_tls \ + compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/crypto/t4_keyctx.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/cudbg/cudbg_common.c optional cxgbe \ diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index ac8cdddd41e5..9064d148cba9 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -640,12 +640,22 @@ struct sge_txq { uint64_t kern_tls_full; uint64_t kern_tls_octets; uint64_t kern_tls_waste; - uint64_t kern_tls_options; uint64_t kern_tls_header; - uint64_t kern_tls_fin; uint64_t kern_tls_fin_short; uint64_t kern_tls_cbc; uint64_t kern_tls_gcm; + union { + struct { + /* T6 only. */ + uint64_t kern_tls_options; + uint64_t kern_tls_fin; + }; + struct { + /* T7 only. */ + uint64_t kern_tls_lso; + uint64_t kern_tls_splitmode; + }; + }; /* stats for not-that-common events */ @@ -1425,6 +1435,12 @@ void t6_ktls_modunload(void); int t6_ktls_try(if_t, struct socket *, struct ktls_session *); int t6_ktls_parse_pkt(struct mbuf *); int t6_ktls_write_wr(struct sge_txq *, void *, struct mbuf *, u_int); + +/* t7_kern_tls.c */ +int t7_tls_tag_alloc(struct ifnet *, union if_snd_tag_alloc_params *, + struct m_snd_tag **); +int t7_ktls_parse_pkt(struct mbuf *); +int t7_ktls_write_wr(struct sge_txq *, void *, struct mbuf *, u_int); #endif /* t4_keyctx.c */ diff --git a/sys/dev/cxgbe/crypto/t7_kern_tls.c b/sys/dev/cxgbe/crypto/t7_kern_tls.c new file mode 100644 index 000000000000..402b2cab20ba --- /dev/null +++ b/sys/dev/cxgbe/crypto/t7_kern_tls.c @@ -0,0 +1,1435 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 Chelsio Communications + * Written by: John Baldwin + * + * 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 "opt_inet.h" +#include "opt_inet6.h" +#include "opt_kern_tls.h" + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "common/common.h" +#include "common/t4_regs.h" +#include "common/t4_regs_values.h" +#include "common/t4_tcb.h" +#include "t4_l2t.h" +#include "t4_clip.h" +#include "t4_mp_ring.h" +#include "crypto/t4_crypto.h" + +#if defined(INET) || defined(INET6) + +#define TLS_HEADER_LENGTH 5 + +struct tls_scmd { + __be32 seqno_numivs; + __be32 ivgen_hdrlen; +}; + +struct tlspcb { + struct m_snd_tag com; + struct vi_info *vi; /* virtual interface */ + struct adapter *sc; + struct sge_txq *txq; + + int tx_key_addr; + bool inline_key; + unsigned char enc_mode; + + struct tls_scmd scmd0; + struct tls_scmd scmd0_short; + + unsigned int tx_key_info_size; + + uint16_t prev_mss; + + /* Only used outside of setup and teardown when using inline keys. */ + struct tls_keyctx keyctx; +}; + +static void t7_tls_tag_free(struct m_snd_tag *mst); +static int ktls_setup_keys(struct tlspcb *tlsp, + const struct ktls_session *tls, struct sge_txq *txq); + +static const struct if_snd_tag_sw t7_tls_tag_sw = { + .snd_tag_free = t7_tls_tag_free, + .type = IF_SND_TAG_TYPE_TLS +}; + +static inline struct tlspcb * +mst_to_tls(struct m_snd_tag *t) +{ + return (__containerof(t, struct tlspcb, com)); +} + +static struct tlspcb * +alloc_tlspcb(struct ifnet *ifp, struct vi_info *vi, int flags) +{ + struct port_info *pi = vi->pi; + struct adapter *sc = pi->adapter; + struct tlspcb *tlsp; + + tlsp = malloc(sizeof(*tlsp), M_CXGBE, M_ZERO | flags); + if (tlsp == NULL) + return (NULL); + + m_snd_tag_init(&tlsp->com, ifp, &t7_tls_tag_sw); + tlsp->vi = vi; + tlsp->sc = sc; + tlsp->tx_key_addr = -1; + + return (tlsp); +} + +int +t7_tls_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, + struct m_snd_tag **pt) +{ + const struct ktls_session *tls; + struct tlspcb *tlsp; + struct adapter *sc; + struct vi_info *vi; + struct inpcb *inp; + struct sge_txq *txq; + int error, explicit_iv_size, keyid, mac_first; + + tls = params->tls.tls; + + /* Only TLS 1.1 and TLS 1.2 are currently supported. */ + if (tls->params.tls_vmajor != TLS_MAJOR_VER_ONE || + tls->params.tls_vminor < TLS_MINOR_VER_ONE || + tls->params.tls_vminor > TLS_MINOR_VER_TWO) + return (EPROTONOSUPPORT); + + /* Sanity check values in *tls. */ + switch (tls->params.cipher_algorithm) { + case CRYPTO_AES_CBC: + /* XXX: Explicitly ignore any provided IV. */ + switch (tls->params.cipher_key_len) { + case 128 / 8: + case 192 / 8: + case 256 / 8: + break; + default: + return (EINVAL); + } + switch (tls->params.auth_algorithm) { + case CRYPTO_SHA1_HMAC: + case CRYPTO_SHA2_256_HMAC: + case CRYPTO_SHA2_384_HMAC: + break; + default: + return (EPROTONOSUPPORT); + } + explicit_iv_size = AES_BLOCK_LEN; + mac_first = 1; + break; + case CRYPTO_AES_NIST_GCM_16: + if (tls->params.iv_len != SALT_SIZE) + return (EINVAL); + switch (tls->params.cipher_key_len) { + case 128 / 8: + case 192 / 8: + case 256 / 8: + break; + default: + return (EINVAL); + } + explicit_iv_size = 8; + mac_first = 0; + break; + default: + return (EPROTONOSUPPORT); + } + + vi = if_getsoftc(ifp); + sc = vi->adapter; + + tlsp = alloc_tlspcb(ifp, vi, M_WAITOK); + + if (sc->tlst.inline_keys) + keyid = -1; + else + keyid = t4_alloc_tls_keyid(sc); + if (keyid < 0) { + CTR(KTR_CXGBE, "%s: %p using immediate key ctx", __func__, + tlsp); + tlsp->inline_key = true; + } else { + tlsp->tx_key_addr = keyid; + CTR(KTR_CXGBE, "%s: %p allocated TX key addr %#x", __func__, + tlsp, tlsp->tx_key_addr); + } + + inp = params->tls.inp; + INP_RLOCK(inp); + if (inp->inp_flags & INP_DROPPED) { + INP_RUNLOCK(inp); + error = ECONNRESET; + goto failed; + } + + txq = &sc->sge.txq[vi->first_txq]; + if (inp->inp_flowtype != M_HASHTYPE_NONE) + txq += ((inp->inp_flowid % (vi->ntxq - vi->rsrv_noflowq)) + + vi->rsrv_noflowq); + tlsp->txq = txq; + INP_RUNLOCK(inp); + + error = ktls_setup_keys(tlsp, tls, txq); + if (error) + goto failed; + + tlsp->enc_mode = t4_tls_cipher_mode(tls); + tlsp->tx_key_info_size = t4_tls_key_info_size(tls); + + /* The SCMD fields used when encrypting a full TLS record. */ + tlsp->scmd0.seqno_numivs = htobe32(V_SCMD_SEQ_NO_CTRL(3) | + V_SCMD_PROTO_VERSION(t4_tls_proto_ver(tls)) | + V_SCMD_ENC_DEC_CTRL(SCMD_ENCDECCTRL_ENCRYPT) | + V_SCMD_CIPH_AUTH_SEQ_CTRL((mac_first == 0)) | + V_SCMD_CIPH_MODE(tlsp->enc_mode) | + V_SCMD_AUTH_MODE(t4_tls_auth_mode(tls)) | + V_SCMD_HMAC_CTRL(t4_tls_hmac_ctrl(tls)) | + V_SCMD_IV_SIZE(explicit_iv_size / 2) | V_SCMD_NUM_IVS(1)); + + tlsp->scmd0.ivgen_hdrlen = V_SCMD_IV_GEN_CTRL(0) | + V_SCMD_TLS_FRAG_ENABLE(0); + if (tlsp->inline_key) + tlsp->scmd0.ivgen_hdrlen |= V_SCMD_KEY_CTX_INLINE(1); + + /* + * The SCMD fields used when encrypting a partial TLS record + * (no trailer and possibly a truncated payload). + */ + tlsp->scmd0_short.seqno_numivs = V_SCMD_SEQ_NO_CTRL(0) | + V_SCMD_PROTO_VERSION(SCMD_PROTO_VERSION_GENERIC) | + V_SCMD_ENC_DEC_CTRL(SCMD_ENCDECCTRL_ENCRYPT) | + V_SCMD_CIPH_AUTH_SEQ_CTRL((mac_first == 0)) | + V_SCMD_AUTH_MODE(SCMD_AUTH_MODE_NOP) | + V_SCMD_HMAC_CTRL(SCMD_HMAC_CTRL_NOP) | + V_SCMD_IV_SIZE(AES_BLOCK_LEN / 2) | V_SCMD_NUM_IVS(0); + if (tlsp->enc_mode == SCMD_CIPH_MODE_AES_GCM) + tlsp->scmd0_short.seqno_numivs |= + V_SCMD_CIPH_MODE(SCMD_CIPH_MODE_AES_CTR); + else + tlsp->scmd0_short.seqno_numivs |= + V_SCMD_CIPH_MODE(tlsp->enc_mode); + tlsp->scmd0_short.seqno_numivs = + htobe32(tlsp->scmd0_short.seqno_numivs); + + tlsp->scmd0_short.ivgen_hdrlen = V_SCMD_IV_GEN_CTRL(0) | + V_SCMD_TLS_FRAG_ENABLE(0) | V_SCMD_AADIVDROP(1); + if (tlsp->inline_key) + tlsp->scmd0_short.ivgen_hdrlen |= V_SCMD_KEY_CTX_INLINE(1); + + TXQ_LOCK(txq); + if (tlsp->enc_mode == SCMD_CIPH_MODE_AES_GCM) + txq->kern_tls_gcm++; + else + txq->kern_tls_cbc++; + TXQ_UNLOCK(txq); + *pt = &tlsp->com; + return (0); + +failed: + m_snd_tag_rele(&tlsp->com); + return (error); +} + +static int +ktls_setup_keys(struct tlspcb *tlsp, const struct ktls_session *tls, + struct sge_txq *txq) +{ + struct tls_key_req *kwr; + struct tls_keyctx *kctx; + void *items[1]; + struct mbuf *m; + int error; + + /* + * Store the salt and keys in the key context. For + * connections with an inline key, this key context is passed + * as immediate data in each work request. For connections + * storing the key in DDR, a work request is used to store a + * copy of the key context in DDR. + */ + t4_tls_key_ctx(tls, KTLS_TX, &tlsp->keyctx); + if (tlsp->inline_key) + return (0); + + /* Populate key work request. */ + m = alloc_wr_mbuf(TLS_KEY_WR_SZ, M_NOWAIT); + if (m == NULL) { + CTR(KTR_CXGBE, "%s: %p failed to alloc WR mbuf", __func__, + tlsp); + return (ENOMEM); + } + m->m_pkthdr.snd_tag = m_snd_tag_ref(&tlsp->com); + m->m_pkthdr.csum_flags |= CSUM_SND_TAG; + kwr = mtod(m, void *); + memset(kwr, 0, TLS_KEY_WR_SZ); + + t4_write_tlskey_wr(tls, KTLS_TX, 0, 0, tlsp->tx_key_addr, kwr); + kctx = (struct tls_keyctx *)(kwr + 1); + memcpy(kctx, &tlsp->keyctx, sizeof(*kctx)); + + /* + * Place the key work request in the transmit queue. It + * should be sent to the NIC before any TLS packets using this + * session. + */ + items[0] = m; + error = mp_ring_enqueue(txq->r, items, 1, 1); + if (error) + m_free(m); + else + CTR(KTR_CXGBE, "%s: %p sent key WR", __func__, tlsp); + return (error); +} + +static u_int +ktls_base_wr_size(struct tlspcb *tlsp) +{ + u_int wr_len; + + wr_len = sizeof(struct fw_ulptx_wr); // 16 + wr_len += sizeof(struct ulp_txpkt); // 8 + wr_len += sizeof(struct ulptx_idata); // 8 + wr_len += sizeof(struct cpl_tx_sec_pdu);// 32 + if (tlsp->inline_key) + wr_len += tlsp->tx_key_info_size; + else { + wr_len += sizeof(struct ulptx_sc_memrd);// 8 + wr_len += sizeof(struct ulptx_idata); // 8 + } + /* SplitMode CPL_RX_PHYS_DSGL here if needed. */ + /* CPL_TX_*_LSO here if needed. */ + wr_len += sizeof(struct cpl_tx_pkt_core);// 16 + return (wr_len); +} + +static u_int +ktls_sgl_size(u_int nsegs) +{ + u_int wr_len; + + /* First segment is part of ulptx_sgl. */ + nsegs--; + + wr_len = sizeof(struct ulptx_sgl); + wr_len += 8 * ((3 * nsegs) / 2 + (nsegs & 1)); + return (wr_len); +} + +/* + * A request that doesn't need to generate the TLS trailer is a short + * record. For these requests, part of the TLS record payload is + * encrypted without invoking the MAC. + * + * Returns true if this record should be sent as a short record. In + * either case, the remaining outputs describe the how much of the + * TLS record to send as input to the crypto block and the amount of + * crypto output to trim via SplitMode: + * + * *header_len - Number of bytes of TLS header to pass as immediate + * data + * + * *offset - Start offset of TLS record payload to pass as DSGL data + * + * *plen - Length of TLS record payload to pass as DSGL data + * + * *leading_waste - amount of non-packet-header bytes to drop at the + * start of the crypto output + * + * *trailing_waste - amount of crypto output to drop from the end + */ +static bool +ktls_is_short_record(struct tlspcb *tlsp, struct mbuf *m_tls, + u_int tlen, u_int *header_len, u_int *offset, u_int *plen, + u_int *leading_waste, u_int *trailing_waste) +{ + const struct tls_record_layer *hdr; + u_int new_tlen, rlen; + + MPASS(tlen > m_tls->m_epg_hdrlen); + + hdr = (void *)m_tls->m_epg_hdr; + rlen = TLS_HEADER_LENGTH + ntohs(hdr->tls_length); + + /* + * Default to sending the full record as input to the crypto + * engine and relying on SplitMode to drop any waste. + */ + *header_len = m_tls->m_epg_hdrlen; + *offset = 0; + *plen = rlen - (m_tls->m_epg_hdrlen + m_tls->m_epg_trllen); + *leading_waste = mtod(m_tls, vm_offset_t); + *trailing_waste = rlen - tlen; + if (!tlsp->sc->tlst.short_records) + return (false); + + if (tlsp->enc_mode == SCMD_CIPH_MODE_AES_CBC) { + /* + * For AES-CBC we have to send input from the start of + * the TLS record payload that is a multiple of the + * block size. new_tlen rounds up tlen to the end of + * the containing AES block. If this last block + * overlaps with the trailer, send the full record to + * generate the MAC. + */ + new_tlen = TLS_HEADER_LENGTH + + roundup2(tlen - TLS_HEADER_LENGTH, AES_BLOCK_LEN); + if (rlen - new_tlen < m_tls->m_epg_trllen) + return (false); + + *trailing_waste = new_tlen - tlen; + *plen = new_tlen - m_tls->m_epg_hdrlen; + } else { + /* + * For AES-GCM we have to send the full record if + * the end overlaps with the trailer. Otherwise, we + * can use AES-CTR to encrypt a partial PDU. + */ + if (rlen - tlen < m_tls->m_epg_trllen) + return (false); + + /* + * The last record can be partially encrypted via + * AES-CTR without any trailing waste. + */ + *trailing_waste = 0; + *plen = tlen - m_tls->m_epg_hdrlen; + + /* + * In addition, with AES-CTR, we can minimize leading + * waste by starting encryption at the start of the + * closest AES block. + */ + if (mtod(m_tls, vm_offset_t) >= m_tls->m_epg_hdrlen) { + *header_len = 0; + *offset = rounddown2(mtod(m_tls, vm_offset_t) - + m_tls->m_epg_hdrlen, AES_BLOCK_LEN); + *plen -= *offset; + *leading_waste -= (m_tls->m_epg_hdrlen + *offset); + } + } + return (true); +} + +static int +ktls_wr_len(struct tlspcb *tlsp, struct mbuf *m, struct mbuf *m_tls, + int *nsegsp) +{ + u_int header_len, imm_len, offset, plen, tlen, wr_len; + u_int leading_waste, trailing_waste; + bool short_record; + + M_ASSERTEXTPG(m_tls); + + /* + * The relative offset of the last byte to send from the TLS + * record. + */ + tlen = mtod(m_tls, vm_offset_t) + m_tls->m_len; + if (tlen <= m_tls->m_epg_hdrlen) { + /* + * For requests that only want to send the TLS header, + * send a tunnelled packet as immediate data. + */ + wr_len = sizeof(struct fw_eth_tx_pkt_wr) + + sizeof(struct cpl_tx_pkt_core) + + roundup2(m->m_len + m_tls->m_len, 16); + if (wr_len > SGE_MAX_WR_LEN) { + CTR(KTR_CXGBE, + "%s: %p TLS header-only packet too long (len %d)", + __func__, tlsp, m->m_len + m_tls->m_len); + } + + /* This should always be the last TLS record in a chain. */ + MPASS(m_tls->m_next == NULL); + *nsegsp = 0; + return (wr_len); + } + + short_record = ktls_is_short_record(tlsp, m_tls, tlen, &header_len, + &offset, &plen, &leading_waste, &trailing_waste); + + /* Calculate the size of the work request. */ + wr_len = ktls_base_wr_size(tlsp); + + if (leading_waste != 0 || trailing_waste != 0) { + /* + * Partial records might require a SplitMode + * CPL_RX_PHYS_DSGL. + */ + wr_len += sizeof(struct cpl_t7_rx_phys_dsgl); + } + + /* Budget for an LSO header even if we don't use it. */ + wr_len += sizeof(struct cpl_tx_pkt_lso_core); + + /* + * Headers (including the TLS header) are always sent as + * immediate data. Short records include a raw AES IV as + * immediate data. + */ + imm_len = m->m_len + header_len; + if (short_record) + imm_len += AES_BLOCK_LEN; + wr_len += roundup2(imm_len, 16); + + /* TLS record payload via DSGL. */ + *nsegsp = sglist_count_mbuf_epg(m_tls, m_tls->m_epg_hdrlen + offset, + plen); + wr_len += ktls_sgl_size(*nsegsp); + + wr_len = roundup2(wr_len, 16); + return (wr_len); +} + +int +t7_ktls_parse_pkt(struct mbuf *m) +{ + struct tlspcb *tlsp; + struct ether_header *eh; + struct ip *ip; + struct ip6_hdr *ip6; + struct tcphdr *tcp; + struct mbuf *m_tls; + void *items[1]; + int nsegs; + u_int wr_len, tot_len; + uint16_t eh_type; + + /* + * Locate headers in initial mbuf. + * + * XXX: This assumes all of the headers are in the initial mbuf. + * Could perhaps use m_advance() like parse_pkt() if that turns + * out to not be true. + */ + M_ASSERTPKTHDR(m); + MPASS(m->m_pkthdr.snd_tag != NULL); + tlsp = mst_to_tls(m->m_pkthdr.snd_tag); + + if (m->m_len <= sizeof(*eh) + sizeof(*ip)) { + CTR(KTR_CXGBE, "%s: %p header mbuf too short", __func__, tlsp); + return (EINVAL); + } + eh = mtod(m, struct ether_header *); + eh_type = ntohs(eh->ether_type); + if (eh_type == ETHERTYPE_VLAN) { + struct ether_vlan_header *evh = (void *)eh; + + eh_type = ntohs(evh->evl_proto); + m->m_pkthdr.l2hlen = sizeof(*evh); + } else + m->m_pkthdr.l2hlen = sizeof(*eh); + + switch (eh_type) { + case ETHERTYPE_IP: + ip = (struct ip *)(eh + 1); + if (ip->ip_p != IPPROTO_TCP) { + CTR(KTR_CXGBE, "%s: %p mbuf not IPPROTO_TCP", __func__, + tlsp); + return (EINVAL); + } + m->m_pkthdr.l3hlen = ip->ip_hl * 4; + break; + case ETHERTYPE_IPV6: + ip6 = (struct ip6_hdr *)(eh + 1); + if (ip6->ip6_nxt != IPPROTO_TCP) { + CTR(KTR_CXGBE, "%s: %p, mbuf not IPPROTO_TCP (%u)", + __func__, tlsp, ip6->ip6_nxt); + return (EINVAL); + } + m->m_pkthdr.l3hlen = sizeof(struct ip6_hdr); + break; + default: + CTR(KTR_CXGBE, "%s: %p mbuf not ETHERTYPE_IP{,V6}", __func__, + tlsp); + return (EINVAL); + } + if (m->m_len < m->m_pkthdr.l2hlen + m->m_pkthdr.l3hlen + + sizeof(*tcp)) { + CTR(KTR_CXGBE, "%s: %p header mbuf too short (2)", __func__, + tlsp); + return (EINVAL); + } + tcp = (struct tcphdr *)((char *)(eh + 1) + m->m_pkthdr.l3hlen); + m->m_pkthdr.l4hlen = tcp->th_off * 4; + + /* Bail if there is TCP payload before the TLS record. */ + if (m->m_len != m->m_pkthdr.l2hlen + m->m_pkthdr.l3hlen + + m->m_pkthdr.l4hlen) { + CTR(KTR_CXGBE, + "%s: %p header mbuf bad length (%d + %d + %d != %d)", + __func__, tlsp, m->m_pkthdr.l2hlen, m->m_pkthdr.l3hlen, + m->m_pkthdr.l4hlen, m->m_len); + return (EINVAL); + } + + /* Assume all headers are in 'm' for now. */ + MPASS(m->m_next != NULL); + MPASS(m->m_next->m_flags & M_EXTPG); + + tot_len = 0; + + /* + * Each of the remaining mbufs in the chain should reference a + * TLS record. + */ + for (m_tls = m->m_next; m_tls != NULL; m_tls = m_tls->m_next) { + MPASS(m_tls->m_flags & M_EXTPG); + + wr_len = ktls_wr_len(tlsp, m, m_tls, &nsegs); +#ifdef VERBOSE_TRACES + CTR(KTR_CXGBE, "%s: %p wr_len %d nsegs %d", __func__, tlsp, + wr_len, nsegs); +#endif + if (wr_len > SGE_MAX_WR_LEN || nsegs > TX_SGL_SEGS) + return (EFBIG); + tot_len += roundup2(wr_len, EQ_ESIZE); + + /* + * Store 'nsegs' for the first TLS record in the + * header mbuf's metadata. + */ + if (m_tls == m->m_next) + set_mbuf_nsegs(m, nsegs); + } + + MPASS(tot_len != 0); + + set_mbuf_len16(m, tot_len / 16); +#ifdef VERBOSE_TRACES + CTR(KTR_CXGBE, "%s: %p len16 %d nsegs %d", __func__, tlsp, + mbuf_len16(m), mbuf_nsegs(m)); +#endif + items[0] = m; + return (mp_ring_enqueue(tlsp->txq->r, items, 1, 256)); +} + +static inline bool +needs_vlan_insertion(struct mbuf *m) +{ + + M_ASSERTPKTHDR(m); + + return (m->m_flags & M_VLANTAG); +} + +static inline uint64_t +pkt_ctrl1(struct sge_txq *txq, struct mbuf *m, uint16_t eh_type) +{ + uint64_t ctrl1; + + /* Checksums are always offloaded */ + if (eh_type == ETHERTYPE_IP) { + ctrl1 = V_TXPKT_CSUM_TYPE(TX_CSUM_TCPIP) | + V_T6_TXPKT_ETHHDR_LEN(m->m_pkthdr.l2hlen - ETHER_HDR_LEN) | + V_TXPKT_IPHDR_LEN(m->m_pkthdr.l3hlen); + } else { + MPASS(m->m_pkthdr.l3hlen == sizeof(struct ip6_hdr)); + ctrl1 = V_TXPKT_CSUM_TYPE(TX_CSUM_TCPIP6) | + V_T6_TXPKT_ETHHDR_LEN(m->m_pkthdr.l2hlen - ETHER_HDR_LEN) | + V_TXPKT_IPHDR_LEN(m->m_pkthdr.l3hlen); + } + txq->txcsum++; + + /* VLAN tag insertion */ + if (needs_vlan_insertion(m)) { + ctrl1 |= F_TXPKT_VLAN_VLD | + V_TXPKT_VLAN(m->m_pkthdr.ether_vtag); + txq->vlan_insertion++; + } + + return (ctrl1); +} + +static inline void * +write_lso_cpl(void *cpl, struct mbuf *m0, uint16_t mss, uint16_t eh_type, + int total_len) +{ + struct cpl_tx_pkt_lso_core *lso; + uint32_t ctrl; + + KASSERT(m0->m_pkthdr.l2hlen > 0 && m0->m_pkthdr.l3hlen > 0 && + m0->m_pkthdr.l4hlen > 0, + ("%s: mbuf %p needs TSO but missing header lengths", + __func__, m0)); + + ctrl = V_LSO_OPCODE(CPL_TX_PKT_LSO) | + F_LSO_FIRST_SLICE | F_LSO_LAST_SLICE | + V_LSO_ETHHDR_LEN((m0->m_pkthdr.l2hlen - ETHER_HDR_LEN) >> 2) | + V_LSO_IPHDR_LEN(m0->m_pkthdr.l3hlen >> 2) | + V_LSO_TCPHDR_LEN(m0->m_pkthdr.l4hlen >> 2); + if (eh_type == ETHERTYPE_IPV6) + ctrl |= F_LSO_IPV6; + + lso = cpl; + lso->lso_ctrl = htobe32(ctrl); + lso->ipid_ofst = htobe16(0); + lso->mss = htobe16(mss); + lso->seqno_offset = htobe32(0); + lso->len = htobe32(total_len); + + return (lso + 1); +} + +static inline void * +write_split_mode_rx_phys(void *dst, struct mbuf *m, struct mbuf *m_tls, + u_int crypto_hdr_len, u_int leading_waste, u_int trailing_waste) +{ + struct cpl_t7_rx_phys_dsgl *cpl; + uint16_t *len; + uint8_t numsge; + + /* Forward first (3) and third (1) segments. */ + numsge = 0xa; + + cpl = dst; + cpl->ot.opcode = CPL_RX_PHYS_DSGL; + cpl->PhysAddrFields_lo_to_NumSGE = + htobe32(F_CPL_T7_RX_PHYS_DSGL_SPLITMODE | + V_CPL_T7_RX_PHYS_DSGL_NUMSGE(numsge)); + + len = (uint16_t *)(cpl->RSSCopy); + + /* + * First segment always contains packet headers as well as + * transmit-related CPLs. + */ + len[0] = htobe16(crypto_hdr_len); + + /* + * Second segment is "gap" of data to drop at the front of the + * TLS record. + */ + len[1] = htobe16(leading_waste); + + /* Third segment is how much of the TLS record to send. */ + len[2] = htobe16(m_tls->m_len); + + /* Fourth segment is how much data to drop at the end. */ + len[3] = htobe16(trailing_waste); + +#ifdef VERBOSE_TRACES + CTR(KTR_CXGBE, "%s: forward %u skip %u forward %u skip %u", + __func__, be16toh(len[0]), be16toh(len[1]), be16toh(len[2]), + be16toh(len[3])); +#endif + return (cpl + 1); +} + +/* + * If the SGL ends on an address that is not 16 byte aligned, this function will + * add a 0 filled flit at the end. + */ +static void +write_gl_to_buf(struct sglist *gl, caddr_t to) +{ + struct sglist_seg *seg; + __be64 *flitp; + struct ulptx_sgl *usgl; + int i, nflits, nsegs; + + KASSERT(((uintptr_t)to & 0xf) == 0, + ("%s: SGL must start at a 16 byte boundary: %p", __func__, to)); + + nsegs = gl->sg_nseg; + MPASS(nsegs > 0); + + nflits = (3 * (nsegs - 1)) / 2 + ((nsegs - 1) & 1) + 2; + flitp = (__be64 *)to; + seg = &gl->sg_segs[0]; + usgl = (void *)flitp; + + usgl->cmd_nsge = htobe32(V_ULPTX_CMD(ULP_TX_SC_DSGL) | + V_ULPTX_NSGE(nsegs)); + usgl->len0 = htobe32(seg->ss_len); + usgl->addr0 = htobe64(seg->ss_paddr); + seg++; + + for (i = 0; i < nsegs - 1; i++, seg++) { + usgl->sge[i / 2].len[i & 1] = htobe32(seg->ss_len); + usgl->sge[i / 2].addr[i & 1] = htobe64(seg->ss_paddr); + } + if (i & 1) + usgl->sge[i / 2].len[1] = htobe32(0); + flitp += nflits; + + if (nflits & 1) { + MPASS(((uintptr_t)flitp) & 0xf); + *flitp++ = 0; + } + + MPASS((((uintptr_t)flitp) & 0xf) == 0); +} + +static inline void +copy_to_txd(struct sge_eq *eq, caddr_t from, caddr_t *to, int len) +{ + + MPASS((uintptr_t)(*to) >= (uintptr_t)&eq->desc[0]); + MPASS((uintptr_t)(*to) < (uintptr_t)&eq->desc[eq->sidx]); + + if (__predict_true((uintptr_t)(*to) + len <= + (uintptr_t)&eq->desc[eq->sidx])) { + bcopy(from, *to, len); + (*to) += len; + if ((uintptr_t)(*to) == (uintptr_t)&eq->desc[eq->sidx]) + (*to) = (caddr_t)eq->desc; + } else { + int portion = (uintptr_t)&eq->desc[eq->sidx] - (uintptr_t)(*to); + + bcopy(from, *to, portion); + from += portion; + portion = len - portion; /* remaining */ + bcopy(from, (void *)eq->desc, portion); + (*to) = (caddr_t)eq->desc + portion; + } +} + +static int +ktls_write_tunnel_packet(struct sge_txq *txq, void *dst, struct mbuf *m, + struct mbuf *m_tls, u_int available, tcp_seq tcp_seqno, u_int pidx, + uint16_t eh_type) +{ + struct tx_sdesc *txsd; + struct fw_eth_tx_pkt_wr *wr; + struct cpl_tx_pkt_core *cpl; + uint32_t ctrl; + int len16, ndesc, pktlen; + struct ether_header *eh; + struct ip *ip, newip; + struct ip6_hdr *ip6, newip6; + struct tcphdr *tcp, newtcp; + caddr_t out; + + TXQ_LOCK_ASSERT_OWNED(txq); + M_ASSERTPKTHDR(m); + + /* Locate the template TLS header. */ + M_ASSERTEXTPG(m_tls); + + /* This should always be the last TLS record in a chain. */ + MPASS(m_tls->m_next == NULL); + + wr = dst; + pktlen = m->m_len + m_tls->m_len; + ctrl = sizeof(struct cpl_tx_pkt_core) + pktlen; + len16 = howmany(sizeof(struct fw_eth_tx_pkt_wr) + ctrl, 16); + ndesc = tx_len16_to_desc(len16); + MPASS(ndesc <= available); + + /* Firmware work request header */ + /* TODO: Handle VF work request. */ + wr->op_immdlen = htobe32(V_FW_WR_OP(FW_ETH_TX_PKT_WR) | + V_FW_ETH_TX_PKT_WR_IMMDLEN(ctrl)); + + ctrl = V_FW_WR_LEN16(len16); + wr->equiq_to_len16 = htobe32(ctrl); + wr->r3 = 0; + + cpl = (void *)(wr + 1); + + /* CPL header */ + cpl->ctrl0 = txq->cpl_ctrl0; + cpl->pack = 0; + cpl->len = htobe16(pktlen); + + out = (void *)(cpl + 1); + + /* Copy over Ethernet header. */ + eh = mtod(m, struct ether_header *); + copy_to_txd(&txq->eq, (caddr_t)eh, &out, m->m_pkthdr.l2hlen); *** 696 LINES SKIPPED *** From nobody Mon Sep 29 15:22: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 4cb4gY1KGkz68NqP; Mon, 29 Sep 2025 15:22:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb4gX677Dz46RW; Mon, 29 Sep 2025 15:22:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cg6Rrofr2yjY5G1IuUSYMNGPVq803um23HpcM61ADp0=; b=ofkl0wG10OoeWJEYKg4jQg6uGOGvyhSNzTblN4wl7E/tfRHUtucG9/heZMcwPrp5YeyK1f toVnHKuKTe7qAL39lBvsHf/8fpLqZcHtgn+KgZxLW4Wy8XgZuOo4sX/dobXKSV1h2xujEy FUMqoRJs6HmieNUwrxzK7mal8auTe4s5DQpEjcBicvDWJqEDBWsi1ChqXVpCVUCyAmsglI 7sEGqVq82l4uS5hgz0ZbQP8Uz+8DC4Eflp4pAxG1xjx8NJhNn1CUy40BRkKYRlGIB9a7lo 9yoEA3oQ/Qda3O9FOocbG/1E83VTgnP165MscHXv6AGXE1M0lgfT3Di3xqimVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159352; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cg6Rrofr2yjY5G1IuUSYMNGPVq803um23HpcM61ADp0=; b=o7xpnzWHwJW7Tnp5ez3liqjXYWXY12u9sIkZ/mYDTuGb0P4uzw87Xa8ojJK3Dzt7BZAKd8 D+eJJ+N2jZRNhHFGSHCAMoJihbbFWZEOL14VwmfqdxlqXB8iIvFuWBES01/gPnNGvwXkV5 PBKdmq969QtkEBuxngNT3jWoP6LeiR/gnJC5nQcBlZKtkKy8jYvnraTqVoN/WcYakZC7h6 DokFRAbqSGr3AafLAWCJTXJwLSkah+D6bsHnKoB53rrLYImo7Bi7f3ofLGX/wAAkKYT/ei I05yTid+5G1UUt84wlx+LNnCOTMkTJLvQIEFsTn+WJzyPdNAyE+g16toEEGruQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759159352; a=rsa-sha256; cv=none; b=PLQCJRx9zJeRlqhkP+Bne0i3OfQhLM9gwkBLsuv6N2xwIG5f4O/FUMmgVCn1OJ5qr5jNmF WRctrOClPR2kSAg//Gvqtmf7Wd+icr3kwQ6Fdgbf7SZgbUbjaR9oFmzNP+/62RieJ7QUWY 1K+PHjt+ZYkoDyX2WTRNK65AxmiBwnG9rUkerl92ozdXXgJq1kPw3Rk5Lfyf/Q/7hV5k5f YWkDwoZZnqp46Fl3vnAI8rtOn+qbgloBy6zpDCrkNBFtZwlu7S/A70SMTm4Ah8HJv68mf8 itV30hoSt+7Zq3qO9CEB1BMDWUBn/IGKNMjBOS2LMNrHc9IHhJAV51sHSOnvYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb4gX5P5tz19gj; Mon, 29 Sep 2025 15:22:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TFMWvc011949; Mon, 29 Sep 2025 15:22:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TFMWWR011945; Mon, 29 Sep 2025 15:22:32 GMT (envelope-from git) Date: Mon, 29 Sep 2025 15:22:32 GMT Message-Id: <202509291522.58TFMWWR011945@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 6154961e2e4c - main - cxgbe: Support for TLS 1.3 in key contexts. 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6154961e2e4c7e1d998f4c9e22c5370d17edb160 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=6154961e2e4c7e1d998f4c9e22c5370d17edb160 commit 6154961e2e4c7e1d998f4c9e22c5370d17edb160 Author: John Baldwin AuthorDate: 2025-09-29 15:02:28 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 15:19:12 +0000 cxgbe: Support for TLS 1.3 in key contexts. For TLS 1.3 the 4 byte salt field has been extended to hold the 12 byte nonce. MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/crypto/t4_crypto.h | 1 + sys/dev/cxgbe/crypto/t4_keyctx.c | 26 ++++++++++++++++++++++---- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/sys/dev/cxgbe/crypto/t4_crypto.h b/sys/dev/cxgbe/crypto/t4_crypto.h index 452e48d20dfd..71c9ec3903ef 100644 --- a/sys/dev/cxgbe/crypto/t4_crypto.h +++ b/sys/dev/cxgbe/crypto/t4_crypto.h @@ -139,6 +139,7 @@ struct phys_sge_pairs { #define SCMD_PROTO_VERSION_TLS_1_2 0 #define SCMD_PROTO_VERSION_TLS_1_1 1 #define SCMD_PROTO_VERSION_GENERIC 4 +#define SCMD_PROTO_VERSION_TLS_1_3 8 #define SCMD_CIPH_MODE_NOP 0 #define SCMD_CIPH_MODE_AES_CBC 1 diff --git a/sys/dev/cxgbe/crypto/t4_keyctx.c b/sys/dev/cxgbe/crypto/t4_keyctx.c index 52a75666c3aa..b85e50fd6cb1 100644 --- a/sys/dev/cxgbe/crypto/t4_keyctx.c +++ b/sys/dev/cxgbe/crypto/t4_keyctx.c @@ -437,10 +437,16 @@ t4_tls_key_info_size(const struct ktls_session *tls) int t4_tls_proto_ver(const struct ktls_session *tls) { - if (tls->params.tls_vminor == TLS_MINOR_VER_ONE) + switch (tls->params.tls_vminor) { + case TLS_MINOR_VER_ONE: return (SCMD_PROTO_VERSION_TLS_1_1); - else + case TLS_MINOR_VER_TWO: return (SCMD_PROTO_VERSION_TLS_1_2); + case TLS_MINOR_VER_THREE: + return (SCMD_PROTO_VERSION_TLS_1_3); + default: + __assert_unreachable(); + } } int @@ -491,6 +497,17 @@ t4_tls_hmac_ctrl(const struct ktls_session *tls) } } +static int +tls_seqnum_ctrl(const struct ktls_session *tls) +{ + switch (tls->params.tls_vminor) { + case TLS_MINOR_VER_THREE: + return (0); + default: + return (3); + } +} + static int tls_cipher_key_size(const struct ktls_session *tls) { @@ -557,7 +574,7 @@ t4_tls_key_ctx(const struct ktls_session *tls, int direction, kctx->u.rxhdr.authmode_to_rxvalid = V_TLS_KEYCTX_TX_WR_AUTHMODE(t4_tls_auth_mode(tls)) | - V_TLS_KEYCTX_TX_WR_SEQNUMCTRL(3) | + V_TLS_KEYCTX_TX_WR_SEQNUMCTRL(tls_seqnum_ctrl(tls)) | V_TLS_KEYCTX_TX_WR_RXVALID(1); kctx->u.rxhdr.ivpresent_to_rxmk_size = @@ -607,7 +624,8 @@ t4_tls_key_ctx(const struct ktls_session *tls, int direction, _Static_assert(offsetof(struct tx_keyctx_hdr, txsalt) == offsetof(struct rx_keyctx_hdr, rxsalt), "salt offset mismatch"); - memcpy(kctx->u.txhdr.txsalt, tls->params.iv, SALT_SIZE); + memcpy(kctx->u.txhdr.txsalt, tls->params.iv, + tls->params.iv_len); t4_init_gmac_hash(tls->params.cipher_key, tls->params.cipher_key_len, hash); } else { From nobody Mon Sep 29 15:22: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 4cb4gb39PCz68NYw; Mon, 29 Sep 2025 15:22: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 4cb4gb0ddZz46Pq; Mon, 29 Sep 2025 15:22:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1PSvfBcKOVRBAxvfQsTA9L657XQzkbk/su1/U4S/+WE=; b=B5P7nRfo71doqQ+r2NPnGRcaAvv7DoBwQT6nQ290/YUQeCWLDC830knoBcU8IGonRf7Yov rqsZg34vLaXt9QORiqRaVNn44++RRsfdXz9I0MRVBaPn28IJ/Xdw63wB2WlcWdsR/N7BXv zvdcQUcyMBUWr+s/wxbjK+jbZz3MlgZ/4qhm8ev25/gEdcESw2X3/ZUF4Fgu/fyhCFFcxf i77q23jkWZMCdrVKLinNlzSgACko2VSWBY58OzsjbsNvEzHWLKAgdx9t0KbedMuNlLXoj3 V1wCIbSTYv/mi/U2xgCP2UEpMjiXmC1KD/Fa/Ab1G4l0ufUl/QwDmJgxzBe+MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159355; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1PSvfBcKOVRBAxvfQsTA9L657XQzkbk/su1/U4S/+WE=; b=m/xf2SeEgS9G29pOu5iI/hP4AFblxL3A/sUIZT8udTLa3U8eSMgsEt+GfqL0Wt7UPu3bN1 mUFbSEXiF6B+r3fhPK5VHnCvVAspR5qPdGR/+pJYydTN+wBaNkiM9VQWZuRxgsRl/ov2Sd Ge4lgEs0LH4xAItDyjvz9YsdS7NHCvXLOpNlZi4plwS4kZz/EODwGbQZiotXKm/s0FW97A V5gxmVhtjDpR3CFl/WA9c/sjjQlBgE/gm029hVdN15UvaXEzJNm/pdT+Fb7PdURScfNY1w oOorm7qaTgxsv0D0SsgKk+PFF+ZVLIg4gky+FzJdNxVuT+iDssAjpvec1xiWVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759159355; a=rsa-sha256; cv=none; b=DrHOsxncc0UJ0hr3anJtI9ToXv+9FzpF/lK6ZEjsQweyoy2XJxMLO6ERRgHdPfBnF8r5f0 OHF027qNptq75uZ4lrZeN5b7nNR2NIwrILaTLhPUt9mqqdMezaIXCUsUfoGhmcfnztvfrk kx27HqG9ySJ51NWKbsMqwoEJfxCcOV13tktsnTBt6d1S58oh0x2CqzifIUcL12LkEVNhpm KORSqQKtqvYBQbVMPXz7t7qIzJ0wU+FLGzbj+rGgzBkX37xB3cLPgz+SpSJzvfG2E8PORM tbs6X7Pq6TpFkZYiQft0NcimFVITqYLiGeeSzg3/X+pkvOSYuBlcXjZ+iQPPOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb4gb0BFkz19sh; Mon, 29 Sep 2025 15:22:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TFMYpo012017; Mon, 29 Sep 2025 15:22:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TFMYaD012014; Mon, 29 Sep 2025 15:22:34 GMT (envelope-from git) Date: Mon, 29 Sep 2025 15:22:34 GMT Message-Id: <202509291522.58TFMYaD012014@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 1e9849415ff9 - main - cxgbe TOE TLS: Better support for partial records for T7. 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1e9849415ff9ed958d63bc7e5128c39e991933d2 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=1e9849415ff9ed958d63bc7e5128c39e991933d2 commit 1e9849415ff9ed958d63bc7e5128c39e991933d2 Author: John Baldwin AuthorDate: 2025-09-29 15:06:46 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 15:19:12 +0000 cxgbe TOE TLS: Better support for partial records for T7. T7 is able to start TOE TLS receive offload more cleanly if a partial TLS record containing a full header and at least one other byte has been received. In that case it is able to request the remaining bytes for the current TLS record from the NIC. Once those bytes has been received TLS receive offload can then be received starting with the subsequent record. MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/tom/t4_tls.c | 165 +++++++++++++++++++++++++++++++-------------- 1 file changed, 114 insertions(+), 51 deletions(-) diff --git a/sys/dev/cxgbe/tom/t4_tls.c b/sys/dev/cxgbe/tom/t4_tls.c index 0e15a8ec6871..bc12d1f773a9 100644 --- a/sys/dev/cxgbe/tom/t4_tls.c +++ b/sys/dev/cxgbe/tom/t4_tls.c @@ -1091,33 +1091,60 @@ out: } /* - * Send a work request setting multiple TCB fields to enable - * ULP_MODE_TLS. + * Send a work request setting one or more TCB fields to partially or + * fully enable ULP_MODE_TLS. + * + * - If resid == 0, the socket buffer ends at a record boundary + * (either empty or contains one or more complete records). Switch + * to ULP_MODE_TLS (if not already) and enable TLS decryption. + * + * - If resid != 0, the socket buffer contains a partial record. In + * this case, switch to ULP_MODE_TLS partially and configure the TCB + * to pass along the remaining resid bytes undecrypted. Once they + * arrive, this is called again with resid == 0 and enables TLS + * decryption. */ static void -tls_update_tcb(struct adapter *sc, struct toepcb *toep, uint64_t seqno) +tls_update_tcb(struct adapter *sc, struct toepcb *toep, uint64_t seqno, + size_t resid) { struct mbuf *m; struct work_request_hdr *wrh; struct ulp_txpkt *ulpmc; int fields, key_offset, len; - KASSERT(ulp_mode(toep) == ULP_MODE_NONE, - ("%s: tid %d already ULP_MODE_TLS", __func__, toep->tid)); + /* + * If we are already in ULP_MODE_TLS, then we should now be at + * a record boundary and ready to finish enabling TLS RX. + */ + KASSERT(resid == 0 || ulp_mode(toep) == ULP_MODE_NONE, + ("%s: tid %d needs %zu more data but already ULP_MODE_TLS", + __func__, toep->tid, resid)); fields = 0; + if (ulp_mode(toep) == ULP_MODE_NONE) { + /* 2 writes for the overlay region */ + fields += 2; + } - /* 2 writes for the overlay region */ - fields += 2; + if (resid == 0) { + /* W_TCB_TLS_SEQ */ + fields++; - /* W_TCB_TLS_SEQ */ - fields++; + /* W_TCB_ULP_RAW */ + fields++; + } else { + /* W_TCB_PDU_LEN */ + fields++; - /* W_TCB_ULP_RAW */ - fields++; + /* W_TCB_ULP_RAW */ + fields++; + } - /* W_TCB_ULP_TYPE */ - fields ++; + if (ulp_mode(toep) == ULP_MODE_NONE) { + /* W_TCB_ULP_TYPE */ + fields ++; + } /* W_TCB_T_FLAGS */ fields++; @@ -1136,43 +1163,78 @@ tls_update_tcb(struct adapter *sc, struct toepcb *toep, uint64_t seqno) INIT_ULPTX_WRH(wrh, len, 1, toep->tid); /* atomic */ ulpmc = (struct ulp_txpkt *)(wrh + 1); - /* - * Clear the TLS overlay region: 1023:832. - * - * Words 26/27 are always set to zero. Words 28/29 - * contain seqno and are set when enabling TLS - * decryption. Word 30 is zero and Word 31 contains - * the keyid. - */ - ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, 26, - 0xffffffffffffffff, 0); + if (ulp_mode(toep) == ULP_MODE_NONE) { + /* + * Clear the TLS overlay region: 1023:832. + * + * Words 26/27 are always set to zero. Words 28/29 + * contain seqno and are set when enabling TLS + * decryption. Word 30 is zero and Word 31 contains + * the keyid. + */ + ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, 26, + 0xffffffffffffffff, 0); - /* - * RX key tags are an index into the key portion of MA - * memory stored as an offset from the base address in - * units of 64 bytes. - */ - key_offset = toep->tls.rx_key_addr - sc->vres.key.start; - ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, 30, - 0xffffffffffffffff, - (uint64_t)V_TCB_RX_TLS_KEY_TAG(key_offset / 64) << 32); - - CTR3(KTR_CXGBE, "%s: tid %d enable TLS seqno %lu", __func__, - toep->tid, seqno); - ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, W_TCB_RX_TLS_SEQ, - V_TCB_RX_TLS_SEQ(M_TCB_RX_TLS_SEQ), V_TCB_RX_TLS_SEQ(seqno)); - ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, W_TCB_ULP_RAW, - V_TCB_ULP_RAW(M_TCB_ULP_RAW), - V_TCB_ULP_RAW((V_TF_TLS_KEY_SIZE(3) | V_TF_TLS_CONTROL(1) | - V_TF_TLS_ACTIVE(1) | V_TF_TLS_ENABLE(1)))); - - toep->flags &= ~TPF_TLS_STARTING; - toep->flags |= TPF_TLS_RECEIVE; - - /* Set the ULP mode to ULP_MODE_TLS. */ - toep->params.ulp_mode = ULP_MODE_TLS; - ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, W_TCB_ULP_TYPE, - V_TCB_ULP_TYPE(M_TCB_ULP_TYPE), V_TCB_ULP_TYPE(ULP_MODE_TLS)); + /* + * RX key tags are an index into the key portion of MA + * memory stored as an offset from the base address in + * units of 64 bytes. + */ + key_offset = toep->tls.rx_key_addr - sc->vres.key.start; + ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, 30, + 0xffffffffffffffff, + (uint64_t)V_TCB_RX_TLS_KEY_TAG(key_offset / 64) << 32); + } + + if (resid == 0) { + /* + * The socket buffer is empty or only contains + * complete TLS records: Set the sequence number and + * enable TLS decryption. + */ + CTR3(KTR_CXGBE, "%s: tid %d enable TLS seqno %lu", __func__, + toep->tid, seqno); + ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, + W_TCB_RX_TLS_SEQ, V_TCB_RX_TLS_SEQ(M_TCB_RX_TLS_SEQ), + V_TCB_RX_TLS_SEQ(seqno)); + ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, + W_TCB_ULP_RAW, V_TCB_ULP_RAW(M_TCB_ULP_RAW), + V_TCB_ULP_RAW((V_TF_TLS_KEY_SIZE(3) | V_TF_TLS_CONTROL(1) | + V_TF_TLS_ACTIVE(1) | V_TF_TLS_ENABLE(1)))); + + toep->flags &= ~TPF_TLS_STARTING; + toep->flags |= TPF_TLS_RECEIVE; + } else { + /* + * The socket buffer ends with a partial record with a + * full header and needs at least 6 bytes. + * + * Set PDU length. This is treating the 'resid' bytes + * as a TLS PDU, so the first 5 bytes are a fake + * header and the rest are the PDU length. + */ + ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, + W_TCB_PDU_LEN, V_TCB_PDU_LEN(M_TCB_PDU_LEN), + V_TCB_PDU_LEN(resid - sizeof(struct tls_hdr))); + CTR3(KTR_CXGBE, "%s: tid %d setting PDU_LEN to %zu", + __func__, toep->tid, resid - sizeof(struct tls_hdr)); + + /* Clear all bits in ULP_RAW except for ENABLE. */ + ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, + W_TCB_ULP_RAW, V_TCB_ULP_RAW(M_TCB_ULP_RAW), + V_TCB_ULP_RAW(V_TF_TLS_ENABLE(1))); + + /* Wait for 'resid' bytes to be delivered as CPL_RX_DATA. */ + toep->tls.rx_resid = resid; + } + + if (ulp_mode(toep) == ULP_MODE_NONE) { + /* Set the ULP mode to ULP_MODE_TLS. */ + toep->params.ulp_mode = ULP_MODE_TLS; + ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, + W_TCB_ULP_TYPE, V_TCB_ULP_TYPE(M_TCB_ULP_TYPE), + V_TCB_ULP_TYPE(ULP_MODE_TLS)); + } /* Clear TF_RX_QUIESCE. */ ulpmc = mk_set_tcb_field_ulp(sc, ulpmc, toep->tid, W_TCB_T_FLAGS, @@ -1205,7 +1267,8 @@ tls_check_rx_sockbuf(struct adapter *sc, struct toepcb *toep, * size of a TLS record, re-enable receive and pause again once * we get more data to try again. */ - if (!have_header || resid != 0) { + if (!have_header || (resid != 0 && (resid < sizeof(struct tls_hdr) || + is_t6(sc)))) { CTR(KTR_CXGBE, "%s: tid %d waiting for more data", __func__, toep->tid); toep->flags &= ~TPF_TLS_RX_QUIESCED; @@ -1213,7 +1276,7 @@ tls_check_rx_sockbuf(struct adapter *sc, struct toepcb *toep, return; } - tls_update_tcb(sc, toep, seqno); + tls_update_tcb(sc, toep, seqno, resid); } void From nobody Mon Sep 29 15:22: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 4cb4gZ2w1nz68P7B; Mon, 29 Sep 2025 15:22: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 4cb4gY6WmZz46V1; Mon, 29 Sep 2025 15:22:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lRNkBFmQWaPtwQsKIoSZ6Oh9o7ol901hmlNy3aQwnmc=; b=ew6KKoVgJ9Zfo4JGPRwI6wEns47cSzq7ZOwQXiOViWS5IRhAPNEObUUN5DsqJje6FrkOVT +dRaWI78GcluCts0b3bzHwkYrHIPp2JFgokx5a/vWgOGzaweBjwcS9T3gcP8dHI8vfnUcY dD7FzAltxjthFpur1D+TOtoVsnhJPIHyP3oCLyBXN+i2t1ybwuC3pHeD/JnOBb0XSeEHnm ogG4oJ2oUv5yPmehDWmpmHN8tu7TZurZvAJcLw09iO1bBk0pHbpZDYPiC0VJa26c+dXm9C h9OIkxSmO4/xZYY91gKw1S/Cwpq6msluIWti93BbeZqUo2pLEybh/q7rgB1Dyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lRNkBFmQWaPtwQsKIoSZ6Oh9o7ol901hmlNy3aQwnmc=; b=d9t1huxzli4Y/Obv/dbwNgdaAqVrQeunvipRTUBD952HkiF1WdWUoAMiUe3JCVfeH9/wFQ x32iKXbw3shyqgF8iAtxMjodj0dsh3ynLV3SCyFLjP84zWyN+4wT6d9HXb56v2bgwjYYbn x5q10/MbeDhm/xkZkRHKViqloQtqIYEUeg0Y/rOCSWtgPSOFmp90iEPcN3sMPihHNy5Smv 8cTitJRTvt2EIqgROQnPPc4f3QHfSd2RYbQmh47x8r2SjdJWiRec3PphTCfjkI2XJZqMH7 TvDTRDW0EK0bSptCz0P84n5sXU7nVQM6p9FLx9kPvsCeYHNAvuLaEtfXqNVZJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759159353; a=rsa-sha256; cv=none; b=vzugF5A3KwI+dTP2WJTHZP5LxBqKYjQnAgVyFLqtiUG7ML6q+z+1IjtpdKdJu/n3E1kk/W 4lZ3gJLoaC7zvevdSMFxMtT8cwyd9QwrVlizfPv5bOyx5dYvxxh097sjJFNJ7ehe5NixCX LjQky9wen36gS5qQ4hDn1WhJqOEABnyKJ1JWyXZyyOkmszYUKwRLXaWaadM7MnLc0SxD42 COMv4CSBsUviOhpFm7x44HLaS3Z+hsulTLkdf3QaS7elLl/VV6G4rCgsjG0hGz2+ND3v8D pulIAqUt4P7MBtap9eVQjRmtebjAJM1RWIzElFRBLImUCRp4egrMQtbZhKolRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb4gY65Tmz19gk; Mon, 29 Sep 2025 15:22:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TFMX4b011983; Mon, 29 Sep 2025 15:22:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TFMX69011980; Mon, 29 Sep 2025 15:22:33 GMT (envelope-from git) Date: Mon, 29 Sep 2025 15:22:33 GMT Message-Id: <202509291522.58TFMX69011980@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 5b9dc22c9106 - main - cxgbe: Extend NIC TLS to support TLS 1.3. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5b9dc22c91068e206fb6cc18ee0cef27067223df Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=5b9dc22c91068e206fb6cc18ee0cef27067223df commit 5b9dc22c91068e206fb6cc18ee0cef27067223df Author: John Baldwin AuthorDate: 2025-09-29 15:04:44 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 15:19:12 +0000 cxgbe: Extend NIC TLS to support TLS 1.3. One unusual quirk is that the crypto engine requires the driver to provide an 8 byte placeholder as input before the AAD that is replaced with the middle 8 bytes of the nonce generated from the sequence number and key context. MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/crypto/t7_kern_tls.c | 101 ++++++++++++++++++++++++++++--------- 1 file changed, 77 insertions(+), 24 deletions(-) diff --git a/sys/dev/cxgbe/crypto/t7_kern_tls.c b/sys/dev/cxgbe/crypto/t7_kern_tls.c index 402b2cab20ba..5063648b2ba9 100644 --- a/sys/dev/cxgbe/crypto/t7_kern_tls.c +++ b/sys/dev/cxgbe/crypto/t7_kern_tls.c @@ -74,6 +74,7 @@ struct tlspcb { int tx_key_addr; bool inline_key; + bool tls13; unsigned char enc_mode; struct tls_scmd scmd0; @@ -131,14 +132,14 @@ t7_tls_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, struct vi_info *vi; struct inpcb *inp; struct sge_txq *txq; - int error, explicit_iv_size, keyid, mac_first; + int error, iv_size, keyid, mac_first; tls = params->tls.tls; - /* Only TLS 1.1 and TLS 1.2 are currently supported. */ + /* TLS 1.1 through TLS 1.3 are currently supported. */ if (tls->params.tls_vmajor != TLS_MAJOR_VER_ONE || tls->params.tls_vminor < TLS_MINOR_VER_ONE || - tls->params.tls_vminor > TLS_MINOR_VER_TWO) + tls->params.tls_vminor > TLS_MINOR_VER_THREE) return (EPROTONOSUPPORT); /* Sanity check values in *tls. */ @@ -161,12 +162,10 @@ t7_tls_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, default: return (EPROTONOSUPPORT); } - explicit_iv_size = AES_BLOCK_LEN; + iv_size = AES_BLOCK_LEN; mac_first = 1; break; case CRYPTO_AES_NIST_GCM_16: - if (tls->params.iv_len != SALT_SIZE) - return (EINVAL); switch (tls->params.cipher_key_len) { case 128 / 8: case 192 / 8: @@ -175,7 +174,13 @@ t7_tls_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, default: return (EINVAL); } - explicit_iv_size = 8; + + /* + * The IV size for TLS 1.2 is the explicit IV in the + * record header. For TLS 1.3 it is the size of the + * sequence number. + */ + iv_size = 8; mac_first = 0; break; default: @@ -186,6 +191,7 @@ t7_tls_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, sc = vi->adapter; tlsp = alloc_tlspcb(ifp, vi, M_WAITOK); + tlsp->tls13 = tls->params.tls_vminor == TLS_MINOR_VER_THREE; if (sc->tlst.inline_keys) keyid = -1; @@ -224,14 +230,19 @@ t7_tls_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, tlsp->tx_key_info_size = t4_tls_key_info_size(tls); /* The SCMD fields used when encrypting a full TLS record. */ - tlsp->scmd0.seqno_numivs = htobe32(V_SCMD_SEQ_NO_CTRL(3) | + if (tlsp->tls13) + tlsp->scmd0.seqno_numivs = V_SCMD_SEQ_NO_CTRL(0); + else + tlsp->scmd0.seqno_numivs = V_SCMD_SEQ_NO_CTRL(3); + tlsp->scmd0.seqno_numivs |= V_SCMD_PROTO_VERSION(t4_tls_proto_ver(tls)) | V_SCMD_ENC_DEC_CTRL(SCMD_ENCDECCTRL_ENCRYPT) | V_SCMD_CIPH_AUTH_SEQ_CTRL((mac_first == 0)) | V_SCMD_CIPH_MODE(tlsp->enc_mode) | V_SCMD_AUTH_MODE(t4_tls_auth_mode(tls)) | V_SCMD_HMAC_CTRL(t4_tls_hmac_ctrl(tls)) | - V_SCMD_IV_SIZE(explicit_iv_size / 2) | V_SCMD_NUM_IVS(1)); + V_SCMD_IV_SIZE(iv_size / 2) | V_SCMD_NUM_IVS(1); + tlsp->scmd0.seqno_numivs = htobe32(tlsp->scmd0.seqno_numivs); tlsp->scmd0.ivgen_hdrlen = V_SCMD_IV_GEN_CTRL(0) | V_SCMD_TLS_FRAG_ENABLE(0); @@ -390,20 +401,29 @@ ktls_is_short_record(struct tlspcb *tlsp, struct mbuf *m_tls, u_int *leading_waste, u_int *trailing_waste) { const struct tls_record_layer *hdr; - u_int new_tlen, rlen; + u_int new_tlen, trailer_len, rlen; MPASS(tlen > m_tls->m_epg_hdrlen); hdr = (void *)m_tls->m_epg_hdr; rlen = TLS_HEADER_LENGTH + ntohs(hdr->tls_length); + /* + * For TLS 1.3 treat the inner record type stored as the first + * byte of the trailer as part of the payload rather than part + * of the trailer. + */ + trailer_len = m_tls->m_epg_trllen; + if (tlsp->tls13) + trailer_len--; + /* * Default to sending the full record as input to the crypto * engine and relying on SplitMode to drop any waste. */ *header_len = m_tls->m_epg_hdrlen; *offset = 0; - *plen = rlen - (m_tls->m_epg_hdrlen + m_tls->m_epg_trllen); + *plen = rlen - (m_tls->m_epg_hdrlen + trailer_len); *leading_waste = mtod(m_tls, vm_offset_t); *trailing_waste = rlen - tlen; if (!tlsp->sc->tlst.short_records) @@ -420,7 +440,7 @@ ktls_is_short_record(struct tlspcb *tlsp, struct mbuf *m_tls, */ new_tlen = TLS_HEADER_LENGTH + roundup2(tlen - TLS_HEADER_LENGTH, AES_BLOCK_LEN); - if (rlen - new_tlen < m_tls->m_epg_trllen) + if (rlen - new_tlen < trailer_len) return (false); *trailing_waste = new_tlen - tlen; @@ -431,7 +451,7 @@ ktls_is_short_record(struct tlspcb *tlsp, struct mbuf *m_tls, * the end overlaps with the trailer. Otherwise, we * can use AES-CTR to encrypt a partial PDU. */ - if (rlen - tlen < m_tls->m_epg_trllen) + if (rlen - tlen < trailer_len) return (false); /* @@ -512,11 +532,14 @@ ktls_wr_len(struct tlspcb *tlsp, struct mbuf *m, struct mbuf *m_tls, /* * Headers (including the TLS header) are always sent as * immediate data. Short records include a raw AES IV as - * immediate data. + * immediate data. TLS 1.3 non-short records include a + * placeholder for the sequence number as immediate data. */ imm_len = m->m_len + header_len; if (short_record) imm_len += AES_BLOCK_LEN; + else if (tlsp->tls13) + imm_len += sizeof(uint64_t); wr_len += roundup2(imm_len, 16); /* TLS record payload via DSGL. */ @@ -1044,6 +1067,8 @@ ktls_write_tls_wr(struct tlspcb *tlsp, struct sge_txq *txq, imm_len = m->m_len + header_len; if (short_record) imm_len += AES_BLOCK_LEN; + else if (tlsp->tls13) + imm_len += sizeof(uint64_t); wr_len += roundup2(imm_len, 16); wr_len += ktls_sgl_size(nsegs); @@ -1141,15 +1166,25 @@ ktls_write_tls_wr(struct tlspcb *tlsp, struct sge_txq *txq, txq->kern_tls_short++; } else { /* - * AAD is TLS header. IV is after AAD. The cipher region - * starts after the IV. See comments in ccr_authenc() and - * ccr_gmac() in t4_crypto.c regarding cipher and auth - * start/stop values. + * AAD is TLS header. IV is after AAD for TLS < 1.3. + * For TLS 1.3, a placeholder for the TLS sequence + * number is provided as an IV before the AAD. The + * cipher region starts after the AAD and IV. See + * comments in ccr_authenc() and ccr_gmac() in + * t4_crypto.c regarding cipher and auth start/stop + * values. */ - aad_start = 1; - aad_stop = TLS_HEADER_LENGTH; - iv_offset = TLS_HEADER_LENGTH + 1; - cipher_start = m_tls->m_epg_hdrlen + 1; + if (tlsp->tls13) { + iv_offset = 1; + aad_start = 1 + sizeof(uint64_t); + aad_stop = sizeof(uint64_t) + TLS_HEADER_LENGTH; + cipher_start = aad_stop + 1; + } else { + aad_start = 1; + aad_stop = TLS_HEADER_LENGTH; + iv_offset = TLS_HEADER_LENGTH + 1; + cipher_start = m_tls->m_epg_hdrlen + 1; + } if (tlsp->enc_mode == SCMD_CIPH_MODE_AES_GCM) { cipher_stop = 0; auth_start = cipher_start; @@ -1162,7 +1197,8 @@ ktls_write_tls_wr(struct tlspcb *tlsp, struct sge_txq *txq, auth_insert = 0; } - sec_pdu->pldlen = htobe32(m_tls->m_epg_hdrlen + plen); + sec_pdu->pldlen = htobe32((tlsp->tls13 ? sizeof(uint64_t) : 0) + + m_tls->m_epg_hdrlen + plen); /* These two flits are actually a CPL_TLS_TX_SCMD_FMT. */ sec_pdu->seqno_numivs = tlsp->scmd0.seqno_numivs; @@ -1256,6 +1292,15 @@ ktls_write_tls_wr(struct tlspcb *tlsp, struct sge_txq *txq, newtcp->th_flags = tcp->th_flags & ~(TH_PUSH | TH_FIN); out += m->m_len; + /* + * Insert placeholder for sequence number as IV for TLS 1.3 + * non-short records. + */ + if (tlsp->tls13 && !short_record) { + memset(out, 0, sizeof(uint64_t)); + out += sizeof(uint64_t); + } + /* Populate the TLS header */ memcpy(out, m_tls->m_epg_hdr, header_len); out += header_len; @@ -1265,7 +1310,15 @@ ktls_write_tls_wr(struct tlspcb *tlsp, struct sge_txq *txq, iv = out; if (tlsp->enc_mode == SCMD_CIPH_MODE_AES_GCM) { memcpy(iv, tlsp->keyctx.u.txhdr.txsalt, SALT_SIZE); - memcpy(iv + 4, hdr + 1, 8); + if (tlsp->tls13) { + uint64_t value; + + value = be64dec(tlsp->keyctx.u.txhdr.txsalt + + 4); + value ^= m_tls->m_epg_seqno; + be64enc(iv + 4, value); + } else + memcpy(iv + 4, hdr + 1, 8); be32enc(iv + 12, 2 + offset / AES_BLOCK_LEN); } else memcpy(iv, hdr + 1, AES_BLOCK_LEN); From nobody Mon Sep 29 15:22: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 4cb4gc3gvgz68NfR; Mon, 29 Sep 2025 15:22: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 4cb4gc2Grtz46X2; Mon, 29 Sep 2025 15:22:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x06+Tv7XTf5cp5/8m/fJvO5bVFADSJI3YUiKdQ8oAX0=; b=spNM6/CFQ3FkUfhuPPcryFeEOuy/mwISfUmNbpQLXMnWsaFg4/6RMlN42RW1yacCluqNl6 8I0Qk3ItkrIpdVTuDzlOcOwQSXSFsvFlIr6MGsogPT2ZTKlrIzPZboZ5FgeXvGin/A04DG gjoKEOdqVXipW5tyifq0mNAS/1xhoKADn46t5Dhti6QaN6mEw8WtfJlXpExA3nbLydL75/ Z+1hNhkleZlD7GDTJ7j3rZ2PpLynXTaukqpeHV8wDQu2WLHYczu4NUBGB7g+DnFk7dE+fq XYVBYWgEvNdfp+i5OZSpf0y+WbhZ25a2+YWfT4QaOUIvcDnl0Xc7saN0wcOOeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x06+Tv7XTf5cp5/8m/fJvO5bVFADSJI3YUiKdQ8oAX0=; b=lCkjdgnbFjQD9tAJCzxjWLExYTTux0o5lHVMsViv3AEtSnq0WlanFOQKMldPj/jQWkSMdb EMa3z3sUKGcUdfaLUfnBX58vUzokCiDK0XZ2uSUJOd6Z13FklSqHx7lXGodbs4JqXN14XZ ntadKWgOy6o3hqaCaVO3W7A4pxGDREDOLl2/UGVyL0OyTFei2+6gdBZ1lgx31hDRoJB96n xDQpymqcyS6j78DIEKq1V8l4P2XWRuuvKrQYd0w1zkcXqV3L1RY1+XmVrBgvtoNaa6iEce yylUORb7u+7oFxwvUknyKNrqnofbkvCktg7EpV+AHTJEMYzVx4ToHO9/0b7/ZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759159356; a=rsa-sha256; cv=none; b=IKl27ZvnARZU3S2Lqty+OvxJ+l+8YeUICbc9S2XEY64FJzY8fKGg29OwVKdBmTtAws37VT 3qFaPUO1jeI/Tt+line1cHLPJf5Uqk01McY5YgR/ApGtNxyP74GR0ch9Tt4yWEbcsGIOmf Hhjh7dwPs918mVOhtbe8pCgjmZ1YYTtbbn60w1ELDsCbKQfhPLspXNr9wkFNFJ7/YYS5U4 eWCk5FDW6e+o2fangUGBYXnv0xANeIbiBx8LXwvFLF79+L0BJCC1V1ciEHcxRZ4RyyP5dt zfwuAW/CIKJfYDs0+jKTeMEcwQEYpLLc8WKn+dvMFFl9c65npfvPQGHPPb8Clg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb4gc1Hfzz191p; Mon, 29 Sep 2025 15:22:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TFMaL8012054; Mon, 29 Sep 2025 15:22:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TFMalL012051; Mon, 29 Sep 2025 15:22:36 GMT (envelope-from git) Date: Mon, 29 Sep 2025 15:22:36 GMT Message-Id: <202509291522.58TFMalL012051@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 7de77bea2a61 - main - cxgbe TOE TLS: Support for TLS 1.3 for transmit. 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7de77bea2a6136af55fdf9cc49fb5b6e7cb9615e Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=7de77bea2a6136af55fdf9cc49fb5b6e7cb9615e commit 7de77bea2a6136af55fdf9cc49fb5b6e7cb9615e Author: John Baldwin AuthorDate: 2025-09-29 15:09:03 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 15:19:12 +0000 cxgbe TOE TLS: Support for TLS 1.3 for transmit. MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/tom/t4_tls.c | 84 ++++++++++++++++++++++++++++++---------------- sys/dev/cxgbe/tom/t4_tls.h | 1 + 2 files changed, 56 insertions(+), 29 deletions(-) diff --git a/sys/dev/cxgbe/tom/t4_tls.c b/sys/dev/cxgbe/tom/t4_tls.c index bc12d1f773a9..677fd143e248 100644 --- a/sys/dev/cxgbe/tom/t4_tls.c +++ b/sys/dev/cxgbe/tom/t4_tls.c @@ -207,7 +207,7 @@ int tls_alloc_ktls(struct toepcb *toep, struct ktls_session *tls, int direction) { struct adapter *sc = td_adapter(toep->td); - int error, explicit_iv_size, mac_first; + int error, iv_size, mac_first; if (!can_tls_offload(sc)) return (EINVAL); @@ -228,6 +228,26 @@ tls_alloc_ktls(struct toepcb *toep, struct ktls_session *tls, int direction) } } + /* TLS 1.1 through TLS 1.3 are currently supported. */ + if (tls->params.tls_vmajor != TLS_MAJOR_VER_ONE || + tls->params.tls_vminor < TLS_MINOR_VER_ONE || + tls->params.tls_vminor > TLS_MINOR_VER_THREE) { + return (EPROTONOSUPPORT); + } + + /* TLS 1.3 is only supported on T7+. */ + if (tls->params.tls_vminor == TLS_MINOR_VER_THREE) { + if (is_t6(sc)) { + return (EPROTONOSUPPORT); + } + + /* Only TX for TLS 1.3 for now. */ + if (direction == KTLS_RX) { + return (EPROTONOSUPPORT); + } + } + + /* Sanity check values in *tls. */ switch (tls->params.cipher_algorithm) { case CRYPTO_AES_CBC: /* XXX: Explicitly ignore any provided IV. */ @@ -247,13 +267,10 @@ tls_alloc_ktls(struct toepcb *toep, struct ktls_session *tls, int direction) default: return (EPROTONOSUPPORT); } - explicit_iv_size = AES_BLOCK_LEN; + iv_size = AES_BLOCK_LEN; mac_first = 1; break; case CRYPTO_AES_NIST_GCM_16: - if (tls->params.iv_len != SALT_SIZE) { - return (EINVAL); - } switch (tls->params.cipher_key_len) { case 128 / 8: case 192 / 8: @@ -262,20 +279,19 @@ tls_alloc_ktls(struct toepcb *toep, struct ktls_session *tls, int direction) default: return (EINVAL); } - explicit_iv_size = 8; + + /* + * The IV size for TLS 1.2 is the explicit IV in the + * record header. For TLS 1.3 it is the size of the + * sequence number. + */ + iv_size = 8; mac_first = 0; break; default: return (EPROTONOSUPPORT); } - /* Only TLS 1.1 and TLS 1.2 are currently supported. */ - if (tls->params.tls_vmajor != TLS_MAJOR_VER_ONE || - tls->params.tls_vminor < TLS_MINOR_VER_ONE || - tls->params.tls_vminor > TLS_MINOR_VER_TWO) { - return (EPROTONOSUPPORT); - } - /* Bail if we already have a key. */ if (direction == KTLS_TX) { if (toep->tls.tx_key_addr != -1) @@ -290,6 +306,7 @@ tls_alloc_ktls(struct toepcb *toep, struct ktls_session *tls, int direction) return (error); if (direction == KTLS_TX) { + toep->tls.tls13 = tls->params.tls_vminor == TLS_MINOR_VER_THREE; toep->tls.scmd0.seqno_numivs = (V_SCMD_SEQ_NO_CTRL(3) | V_SCMD_PROTO_VERSION(t4_tls_proto_ver(tls)) | @@ -298,14 +315,14 @@ tls_alloc_ktls(struct toepcb *toep, struct ktls_session *tls, int direction) V_SCMD_CIPH_MODE(t4_tls_cipher_mode(tls)) | V_SCMD_AUTH_MODE(t4_tls_auth_mode(tls)) | V_SCMD_HMAC_CTRL(t4_tls_hmac_ctrl(tls)) | - V_SCMD_IV_SIZE(explicit_iv_size / 2)); + V_SCMD_IV_SIZE(iv_size / 2)); toep->tls.scmd0.ivgen_hdrlen = (V_SCMD_IV_GEN_CTRL(1) | V_SCMD_KEY_CTX_INLINE(0) | V_SCMD_TLS_FRAG_ENABLE(1)); - toep->tls.iv_len = explicit_iv_size; + toep->tls.iv_len = iv_size; toep->tls.frag_size = tls->params.max_frame_len; toep->tls.fcplenmax = get_tp_plen_max(tls); toep->tls.expn_per_ulp = tls->params.tls_hlen + @@ -352,7 +369,8 @@ tls_uninit_toep(struct toepcb *toep) static void write_tlstx_wr(struct fw_tlstx_data_wr *txwr, struct toepcb *toep, - unsigned int plen, unsigned int expn, uint8_t credits, int shove) + unsigned int plen, unsigned int expn, uint8_t credits, int shove, + int num_ivs) { struct tls_ofld_info *tls_ofld = &toep->tls; unsigned int len = plen + expn; @@ -365,7 +383,7 @@ write_tlstx_wr(struct fw_tlstx_data_wr *txwr, struct toepcb *toep, txwr->plen = htobe32(len); txwr->lsodisable_to_flags = htobe32(V_TX_ULP_MODE(ULP_MODE_TLS) | V_TX_URG(0) | /* F_T6_TX_FORCE | */ V_TX_SHOVE(shove)); - txwr->ctxloc_to_exp = htobe32(V_FW_TLSTX_DATA_WR_NUMIVS(1) | + txwr->ctxloc_to_exp = htobe32(V_FW_TLSTX_DATA_WR_NUMIVS(num_ivs) | V_FW_TLSTX_DATA_WR_EXP(expn) | V_FW_TLSTX_DATA_WR_CTXLOC(TLS_SFO_WR_CONTEXTLOC_DDR) | V_FW_TLSTX_DATA_WR_IVDSGL(0) | @@ -381,20 +399,20 @@ write_tlstx_wr(struct fw_tlstx_data_wr *txwr, struct toepcb *toep, static void write_tlstx_cpl(struct cpl_tx_tls_sfo *cpl, struct toepcb *toep, - struct tls_hdr *tls_hdr, unsigned int plen, uint64_t seqno) + struct tls_hdr *tls_hdr, unsigned int plen, uint8_t rec_type, + uint64_t seqno) { struct tls_ofld_info *tls_ofld = &toep->tls; int data_type, seglen; seglen = plen; - data_type = tls_content_type(tls_hdr->type); + data_type = tls_content_type(rec_type); cpl->op_to_seg_len = htobe32(V_CPL_TX_TLS_SFO_OPCODE(CPL_TX_TLS_SFO) | V_CPL_TX_TLS_SFO_DATA_TYPE(data_type) | V_CPL_TX_TLS_SFO_CPL_LEN(2) | V_CPL_TX_TLS_SFO_SEG_LEN(seglen)); cpl->pld_len = htobe32(plen); if (data_type == CPL_TX_TLS_SFO_TYPE_CUSTOM) - cpl->type_protover = htobe32( - V_CPL_TX_TLS_SFO_TYPE(tls_hdr->type)); + cpl->type_protover = htobe32(V_CPL_TX_TLS_SFO_TYPE(rec_type)); cpl->seqno_numivs = htobe32(tls_ofld->scmd0.seqno_numivs | V_SCMD_NUM_IVS(1)); cpl->ivgen_hdrlen = htobe32(tls_ofld->scmd0.ivgen_hdrlen); @@ -498,6 +516,7 @@ t4_push_ktls(struct adapter *sc, struct toepcb *toep, int drop) int tls_size, tx_credits, shove, sowwakeup; struct ofld_tx_sdesc *txsd; char *buf; + bool tls13; INP_WLOCK_ASSERT(inp); KASSERT(toep->flags & TPF_FLOWC_WR_SENT, @@ -533,6 +552,7 @@ t4_push_ktls(struct adapter *sc, struct toepcb *toep, int drop) return; } + tls13 = toep->tls.tls13; txsd = &toep->txsd[toep->txsd_pidx]; for (;;) { tx_credits = min(toep->tx_credits, MAX_OFLD_TX_CREDITS); @@ -599,9 +619,11 @@ t4_push_ktls(struct adapter *sc, struct toepcb *toep, int drop) sizeof(struct cpl_tx_tls_sfo) + sizeof(struct ulptx_idata) + sizeof(struct ulptx_sc_memrd); - /* Explicit IVs for AES-CBC and AES-GCM are <= 16. */ - MPASS(toep->tls.iv_len <= AES_BLOCK_LEN); - wr_len += AES_BLOCK_LEN; + if (!tls13) { + /* Explicit IVs for AES-CBC and AES-GCM are <= 16. */ + MPASS(toep->tls.iv_len <= AES_BLOCK_LEN); + wr_len += AES_BLOCK_LEN; + } /* Account for SGL in work request length. */ nsegs = count_ext_pgs_segs(m); @@ -671,8 +693,10 @@ t4_push_ktls(struct adapter *sc, struct toepcb *toep, int drop) expn_size = m->m_epg_hdrlen + m->m_epg_trllen; tls_size = m->m_len - expn_size; - write_tlstx_wr(txwr, toep, tls_size, expn_size, credits, shove); - write_tlstx_cpl(cpl, toep, thdr, tls_size, m->m_epg_seqno); + write_tlstx_wr(txwr, toep, tls_size, expn_size, credits, shove, + tls13 ? 0 : 1); + write_tlstx_cpl(cpl, toep, thdr, tls_size, + tls13 ? m->m_epg_record_type : thdr->type, m->m_epg_seqno); idata = (struct ulptx_idata *)(cpl + 1); idata->cmd_more = htobe32(V_ULPTX_CMD(ULP_TX_SC_NOOP)); @@ -683,10 +707,12 @@ t4_push_ktls(struct adapter *sc, struct toepcb *toep, int drop) V_ULPTX_LEN16(toep->tls.tx_key_info_size >> 4)); memrd->addr = htobe32(toep->tls.tx_key_addr >> 5); - /* Copy IV. */ buf = (char *)(memrd + 1); - memcpy(buf, thdr + 1, toep->tls.iv_len); - buf += AES_BLOCK_LEN; + if (!tls13) { + /* Copy IV. */ + memcpy(buf, thdr + 1, toep->tls.iv_len); + buf += AES_BLOCK_LEN; + } write_ktlstx_sgl(buf, m, nsegs); diff --git a/sys/dev/cxgbe/tom/t4_tls.h b/sys/dev/cxgbe/tom/t4_tls.h index 753a30890fdc..6faf946e9e3c 100644 --- a/sys/dev/cxgbe/tom/t4_tls.h +++ b/sys/dev/cxgbe/tom/t4_tls.h @@ -74,6 +74,7 @@ struct tls_ofld_info { unsigned short adjusted_plen; unsigned short expn_per_ulp; unsigned short pdus_per_ulp; + bool tls13; struct tls_scmd scmd0; u_int iv_len; unsigned int tx_key_info_size; From nobody Mon Sep 29 15:22:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cb4gd56qzz68Nkd; Mon, 29 Sep 2025 15:22:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb4gd204Vz46ZK; Mon, 29 Sep 2025 15:22:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TSP7mK6Tb78uL2dr19FQ8yDmp72VRKmM9cNrbhWmSRY=; b=SokejwTLqZMyGm9nu6xZXZCXAERiPN9s26tcSDjq3xmkZ8cKmHoE0M7gjT/Hv3B352xPug vmJMyPqnwkAn5Q/qiX40yCMl5oz1wL5WbN5NJ8H4V5bs19nRGM0NNxj6FdQKA+/pyT0fKR 0LoL2F2/Ng6OLDfRKzULHcXiw+qKNDo+rPSfCvPv+8cOoad2Z/Vj7nNvDnq2qasEOcu3hv 8yR3UA708nxvhYORkCB0vPAioXrH+fh8QomzwxCP/dzHjw7XZAcuUAxKuGY2AHe50neZou IiarHblRcqXUp8encJnJ8HZ7GvQnc/e8N3tyo2iHSMF+SUPrRTBuGfpGqyNpiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TSP7mK6Tb78uL2dr19FQ8yDmp72VRKmM9cNrbhWmSRY=; b=a2jwTPjrU3uaUgcC8r/twpmGNjJO7I5U7ANvVY9yAgQOeUGrnLTFBpWfPE9eaNU1x1V3t2 KVYQYtC6Y5lrvU4PfrLz/hWAbGRPncJ6QY7egPiH1NaZ0pup2Hv2rGc8IiY2swhV3aAQCt QTZ1Vi3vBbHJKWVqL90Sw9akuQ3vGXFM8HGt3Dg6EslRJMy4JmwAs6WE36jF+QBRnsbnny mid6nPfZA68W++1Vn1hUtSl/05Sl2aTblewcspXSmDNqsfq6/JTYWzA5pnyQGvlAL4VLrk Z1YzvmfcoXKszyYRgwV6T7dIQOR6VIaszZv1n0MTwNglURmQkSsjHrnebrIemA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759159357; a=rsa-sha256; cv=none; b=I8XVovbGYPSnUUAa0xY1caGihgrIrJEWiMBLQe5K8LpLSC0sZEqWBgy0puLSZQe7bl8I3X mFeiSnBRwJ2vAohxCv9YtqgEeW7A+QEHwXcqp1Qk05eRZzXPXDmk5Vb/C+hw6jlUXECg7Z dDPttBSBOFa+tq0h6vN5QY7gX0INSLdcjYFPbcg1UBw7Vhx4vzi3K+qC7dLdH6h5ABAkbw SUGfZup7z2X3Jh+TRrwcjRXzF1fo9eQQGQadfxLXmQhDqF2mISIMMtw9t/fv7r40RPA+ip QgMjS2d8kUIpN4i4gNQBUBgVZra/z8hhnGRU1q567ziAmgE6gTyuV0AhczJWvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb4gd1W8sz19gl; Mon, 29 Sep 2025 15:22:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TFMbFR012088; Mon, 29 Sep 2025 15:22:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TFMb2M012085; Mon, 29 Sep 2025 15:22:37 GMT (envelope-from git) Date: Mon, 29 Sep 2025 15:22:37 GMT Message-Id: <202509291522.58TFMb2M012085@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: e2fae07e093b - main - cxgbe TOE TLS: Support for TLS 1.3 for receive 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e2fae07e093bf4953ad7359b2aa9ca62b0d76adf Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=e2fae07e093bf4953ad7359b2aa9ca62b0d76adf commit e2fae07e093bf4953ad7359b2aa9ca62b0d76adf Author: John Baldwin AuthorDate: 2025-09-29 15:10:08 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 15:19:13 +0000 cxgbe TOE TLS: Support for TLS 1.3 for receive MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/tom/t4_tls.c | 51 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 10 deletions(-) diff --git a/sys/dev/cxgbe/tom/t4_tls.c b/sys/dev/cxgbe/tom/t4_tls.c index 677fd143e248..bbcc1c88c3db 100644 --- a/sys/dev/cxgbe/tom/t4_tls.c +++ b/sys/dev/cxgbe/tom/t4_tls.c @@ -240,11 +240,6 @@ tls_alloc_ktls(struct toepcb *toep, struct ktls_session *tls, int direction) if (is_t6(sc)) { return (EPROTONOSUPPORT); } - - /* Only TX for TLS 1.3 for now. */ - if (direction == KTLS_RX) { - return (EPROTONOSUPPORT); - } } /* Sanity check values in *tls. */ @@ -305,8 +300,8 @@ tls_alloc_ktls(struct toepcb *toep, struct ktls_session *tls, int direction) if (error) return (error); + toep->tls.tls13 = tls->params.tls_vminor == TLS_MINOR_VER_THREE; if (direction == KTLS_TX) { - toep->tls.tls13 = tls->params.tls_vminor == TLS_MINOR_VER_THREE; toep->tls.scmd0.seqno_numivs = (V_SCMD_SEQ_NO_CTRL(3) | V_SCMD_PROTO_VERSION(t4_tls_proto_ver(tls)) | @@ -834,8 +829,8 @@ do_rx_tls_cmp(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) struct sockbuf *sb; struct mbuf *tls_data; struct tls_get_record *tgr; - struct mbuf *control; - int pdu_length, trailer_len; + struct mbuf *control, *n; + int pdu_length, resid, trailer_len; #if defined(KTR) || defined(INVARIANTS) int len; #endif @@ -883,7 +878,9 @@ do_rx_tls_cmp(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) /* * The payload of this CPL is the TLS header followed by - * additional fields. + * additional fields. For TLS 1.3 the type field holds the + * inner record type and the length field has been updated to + * strip the inner record type, padding, and MAC. */ KASSERT(m->m_len >= sizeof(*tls_hdr_pkt), ("%s: payload too small", __func__)); @@ -895,7 +892,14 @@ do_rx_tls_cmp(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) ("%s: sequence mismatch", __func__)); } - /* Report decryption errors as EBADMSG. */ + /* + * Report decryption errors as EBADMSG. + * + * XXX: To support rekeying for TLS 1.3 this will eventually + * have to be updated to recrypt the data with the old key and + * then decrypt with the new key. Punt for now as KTLS + * doesn't yet support rekeying. + */ if ((tls_hdr_pkt->res_to_mac_error & M_TLSRX_HDR_PKT_ERROR) != 0) { CTR4(KTR_CXGBE, "%s: tid %u TLS error %#x ddp_vld %#x", __func__, toep->tid, tls_hdr_pkt->res_to_mac_error, @@ -913,6 +917,33 @@ do_rx_tls_cmp(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) return (0); } + /* For TLS 1.3 trim the header and trailer. */ + if (toep->tls.tls13) { + KASSERT(tls_data != NULL, ("%s: TLS 1.3 record without data", + __func__)); + MPASS(tls_data->m_pkthdr.len == pdu_length); + m_adj(tls_data, sizeof(struct tls_record_layer)); + if (tls_data->m_pkthdr.len > be16toh(tls_hdr_pkt->length)) + tls_data->m_pkthdr.len = be16toh(tls_hdr_pkt->length); + resid = tls_data->m_pkthdr.len; + if (resid == 0) { + m_freem(tls_data); + tls_data = NULL; + } else { + for (n = tls_data;; n = n->m_next) { + if (n->m_len < resid) { + resid -= n->m_len; + continue; + } + + n->m_len = resid; + m_freem(n->m_next); + n->m_next = NULL; + break; + } + } + } + /* Handle data received after the socket is closed. */ sb = &so->so_rcv; SOCKBUF_LOCK(sb); From nobody Mon Sep 29 15:22:38 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cb4gf4qdBz68P7N; Mon, 29 Sep 2025 15:22:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb4gf2ycQz46p8; Mon, 29 Sep 2025 15:22:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yf+px/mCQ2g5jxxhsMXKWZ4SLDd1yBGBksVQaPnxs7w=; b=jBs0NF4I4+iLwdpWa3kFCCA9jzOLJuMGrcmGJY1rYdXGMjojufBUlX8+nex37TkSsgp8rO MD2hkTyi65/JvVOkkzUqBYsNLujuHHyXSOJtVqhJT0clHyFo1576uXH5PVxd2GpjhcgMBd pEz6n6cqgMKJ87wK6UUm4XyIfOtTCymtBqK+tUx2tO3Dt6QbVY4stPUu2sV5YXMps+1FbW yVvzeY/XC+WjvPcfwjkWVGvOdaoCpuki4u/9ExExJZ30bjjQ+yVAeAi54g3zcedKGkKR8Z ytqpK/jrk+ZuM+rldbC1VWy6dM23bIC1ibkXHfw/PnbfsllSZDCMwaD9LWltZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yf+px/mCQ2g5jxxhsMXKWZ4SLDd1yBGBksVQaPnxs7w=; b=UW/NVI7BLUBmSkScmKUQECEJh0qnJrmkNaokFUYFG1/5K3xt6vqlWLmxPk8/vq2VDpLFUP rahvy3omejNdkoCqfke22h8vmqI9qjiA89irgINu+W6y1AEjXy5Bnr9DGD9Vs7WpdrLfjf QNKvrGFAIqgdvvS5BQiPzqueFIfy1GHMEloXrM4h3bcAT+BuFvQsykKYnCMqryAoaxULUE aso2u13SORCNTWJhLoctWOutQIcacxs7HX1yvDA+ff0QveALO9Vdw8GSFbBX0ERR/PUza8 hfX/LnM+OlVTd5ARiyOPmf8onnZU+KeRcb4p4TMsozIKNVSkucXblS6yj6yJ0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759159358; a=rsa-sha256; cv=none; b=n2Pa9DyjVyYKx0Rf1oLOO6JFaGZXXkWtrPKUuJpvWYg9ics80Y3kqRHltAphkPfWCbo73E c2XiJ1BWSZ9u/m/8djvgNg6P07818RTKOxncWeZ/TnKTO03dWR8NF1FDFLgZ1vO348Q6aK 5IAKKdI5dUMjLobDQZiN7EifZN99LY3MhKyFFbyZcWVnfgYj5LfOWyNtOI02tSjOmCSfaG t6tCA6aw4j3asrjhoIMEL3X3Ze4L031LDyshxUZ7bY2/XT3UUoNtP+X+U6bSMiUCo03Rkn RKQwrIntmbjLDHlHpQFBEPfG06t+xk33ygo7qQrpbw1DDpAH17evVh+eGZkMDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb4gf2WhHz19xh; Mon, 29 Sep 2025 15:22:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TFMcBI012122; Mon, 29 Sep 2025 15:22:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TFMcQ2012119; Mon, 29 Sep 2025 15:22:38 GMT (envelope-from git) Date: Mon, 29 Sep 2025 15:22:38 GMT Message-Id: <202509291522.58TFMcQ2012119@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 96054b97b418 - main - cxgbe mp_ring: Add mp_ring_enqueue_only 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 96054b97b418d1ff2b781e9e23cc86a79d91909a Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=96054b97b418d1ff2b781e9e23cc86a79d91909a commit 96054b97b418d1ff2b781e9e23cc86a79d91909a Author: John Baldwin AuthorDate: 2025-09-29 15:10:42 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 15:19:13 +0000 cxgbe mp_ring: Add mp_ring_enqueue_only Unlike mp_ring_enqueue, this function is meant to be called from within a drain routine to enqueue more packets to the queue currently being drained. To avoid recursion, it only enqueues additional items without becoming a consumer. MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_mp_ring.c | 81 +++++++++++++++++++++++++++++++++++++++++++++- sys/dev/cxgbe/t4_mp_ring.h | 1 + 2 files changed, 81 insertions(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/t4_mp_ring.c b/sys/dev/cxgbe/t4_mp_ring.c index 531fd356728e..916c363a0c2a 100644 --- a/sys/dev/cxgbe/t4_mp_ring.c +++ b/sys/dev/cxgbe/t4_mp_ring.c @@ -305,7 +305,6 @@ failed: } void - mp_ring_free(struct mp_ring *r) { int i; @@ -472,6 +471,86 @@ mp_ring_enqueue(struct mp_ring *r, void **items, int n, int budget) return (0); } +/* + * Enqueue n items but never drain the ring. Can be called + * to enqueue new items while draining the ring. + * + * Returns an errno. + */ +int +mp_ring_enqueue_only(struct mp_ring *r, void **items, int n) +{ + union ring_state os, ns; + uint16_t pidx_start, pidx_stop; + int i; + + MPASS(items != NULL); + MPASS(n > 0); + + /* + * Reserve room for the new items. Our reservation, if successful, is + * from 'pidx_start' to 'pidx_stop'. + */ + os.state = atomic_load_64(&r->state); + + /* Should only be used from the drain callback. */ + MPASS(os.flags == BUSY || os.flags == TOO_BUSY || + os.flags == TAKING_OVER); + + for (;;) { + if (__predict_false(space_available(r, os) < n)) { + /* Not enough room in the ring. */ + counter_u64_add(r->dropped, n); + return (ENOBUFS); + } + + /* There is room in the ring. */ + + ns.state = os.state; + ns.pidx_head = increment_idx(r, os.pidx_head, n); + critical_enter(); + if (atomic_fcmpset_64(&r->state, &os.state, ns.state)) + break; + critical_exit(); + cpu_spinwait(); + }; + + pidx_start = os.pidx_head; + pidx_stop = ns.pidx_head; + + /* + * Wait for other producers who got in ahead of us to enqueue their + * items, one producer at a time. It is our turn when the ring's + * pidx_tail reaches the beginning of our reservation (pidx_start). + */ + while (ns.pidx_tail != pidx_start) { + cpu_spinwait(); + ns.state = atomic_load_64(&r->state); + } + + /* Now it is our turn to fill up the area we reserved earlier. */ + i = pidx_start; + do { + r->items[i] = *items++; + if (__predict_false(++i == r->size)) + i = 0; + } while (i != pidx_stop); + + /* + * Update the ring's pidx_tail. The release style atomic guarantees + * that the items are visible to any thread that sees the updated pidx. + */ + os.state = atomic_load_64(&r->state); + do { + ns.state = os.state; + ns.pidx_tail = pidx_stop; + } while (atomic_fcmpset_rel_64(&r->state, &os.state, ns.state) == 0); + critical_exit(); + + counter_u64_add(r->not_consumer, 1); + return (0); +} + void mp_ring_check_drainage(struct mp_ring *r, int budget) { diff --git a/sys/dev/cxgbe/t4_mp_ring.h b/sys/dev/cxgbe/t4_mp_ring.h index 949174b9056d..07b15906cd43 100644 --- a/sys/dev/cxgbe/t4_mp_ring.h +++ b/sys/dev/cxgbe/t4_mp_ring.h @@ -62,6 +62,7 @@ int mp_ring_alloc(struct mp_ring **, int, void *, ring_drain_t, ring_can_drain_t, struct malloc_type *, struct mtx *, int); void mp_ring_free(struct mp_ring *); int mp_ring_enqueue(struct mp_ring *, void **, int, int); +int mp_ring_enqueue_only(struct mp_ring *, void **, int); void mp_ring_check_drainage(struct mp_ring *, int); void mp_ring_reset_stats(struct mp_ring *); bool mp_ring_is_idle(struct mp_ring *); From nobody Mon Sep 29 15:22:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cb4gh0jNGz68NZ6; Mon, 29 Sep 2025 15:22:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb4gg3YWPz46cg; Mon, 29 Sep 2025 15:22:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zo80kyc5cxuTUyw5hLZbGR+zv/ax6HRxC9jD9W2zW24=; b=LGNzLcDBcHps3NGALQSxxYcIYqWoM2JneRw7tmmm9/se5PkCtETDTwWE0goap7+nD1XfOS Io5cid7IBOE7XIW4U8YjosHkIH/TpCuyRi08yCTlrQfly5dMZ3ZlBADNl4udyZWXLiry3n xoG1HW81Hv9BNaTaRTHrz5XkJcM1a/3kNzcq8FRsbVEcAcVY5N625wnk4MmFXMuTQZeRuv roKQ9tA/BczCnkJb8pr+zD0N1cgB13+vsxt1L1Q5A/btJtiWqCdvZgcpCElZyhlek9aZBk +Ymk6zMLsJMycu3EGPzLbT6PG9SnfVnlVnzTtXiknBmUqKNQ4Ymj4BpJVh2f5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zo80kyc5cxuTUyw5hLZbGR+zv/ax6HRxC9jD9W2zW24=; b=Kd+1u+SOCyMAoCfYEg9UvvUlt9C9mxJE3AV7mpfw/NRe4V9JORH905ElcpHeMS1poFZq3C Pyc86/Y1waqpWp7HhaRryczsexG8zlOh8sqOcBJvATbmNW5ObKs14lJeJtbKNCT9jmpe4v HmBXa0b2+dREz8aMAqeF63X/lV5tUDhXt+g9Z2jdfcnP3RN9aOQBuUnvWkU3Qqr2Vv2A63 EpYQzFLwOD6C3bbYvFfJNzsKjJsWym9z41+Q8sRgkev5DOWQhJzPrYkHAiaqJSftKQdQjA ukPPhJBvzCSo6EtIhQEo1Vr1O899W4Ct+nn1KyGImHSarxmMd1a57seCZgF2hg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759159359; a=rsa-sha256; cv=none; b=GeXci7RQaBGeTFTNpF5gMITw4QMvYzc3viq+hlaD6oroudDpL0hb8FRr/nNywUjTTrE2Jj 2qn5dGdCDqQaTRajaClguGH2Kngi3qdSOKiZIEcMfRlenpjorCmBcG/x83gh3isz6IAgIo 55lgUsJ6AwuWPfWEYuBm8hGMhZxolcppwZFEFtXN4FcALJHs2W7kcEYJVREcCJKampkmCK zjkg4VgviwYvgiS0HgsAFYLxqJUNdwUi5HNtXz1uDESU3zuVDq86JNlg9pCDcAFrLR86wY 7nrx0vpVGHarINO5j1uDN8r/Te1PBXiIlXJnRIeLzSlSqpp7ucgWWSKBLEq34w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb4gg31cGz191q; Mon, 29 Sep 2025 15:22:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TFMdc8012156; Mon, 29 Sep 2025 15:22:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TFMdvE012153; Mon, 29 Sep 2025 15:22:39 GMT (envelope-from git) Date: Mon, 29 Sep 2025 15:22:39 GMT Message-Id: <202509291522.58TFMdvE012153@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 96469647bce1 - main - cxgbe: Permit multiple handlers for CPL6_FW_PLD 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 96469647bce10132408db9b436dae8941356453b Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=96469647bce10132408db9b436dae8941356453b commit 96469647bce10132408db9b436dae8941356453b Author: John Baldwin AuthorDate: 2025-09-29 15:12:09 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 15:19:13 +0000 cxgbe: Permit multiple handlers for CPL6_FW_PLD Currently this CPL is only used to handle replies from lookaside crypto requests submitted by ccr(4). However, in the future this request will be returned for other requests. Use the low bit in the cookie field as a way to identify replies to ccr(4) vs other use cases. This should be safe as 'struct cryptop' pointers should be word-aligned. MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/adapter.h | 17 +++++++++++++++++ sys/dev/cxgbe/crypto/t4_crypto.c | 27 +++++++++++++++++++++++---- sys/dev/cxgbe/t4_sge.c | 28 ++++++++++++++++++++++++++-- 3 files changed, 66 insertions(+), 6 deletions(-) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index 9064d148cba9..64fa4526d9f4 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -412,6 +412,23 @@ enum { NUM_CPL_COOKIES = 8 /* Limited by M_COOKIE. Do not increase. */ }; +/* + * Crypto replies use the low bit in the 64-bit cookie of CPL_FW6_PLD as a + * CPL cookie to identify the sender/receiver. + */ +enum { + CPL_FW6_COOKIE_CCR = 0, + + NUM_CPL_FW6_COOKIES = 2 /* Low bits of cookie value. */ +}; + +_Static_assert(powerof2(NUM_CPL_FW6_COOKIES), + "NUM_CPL_FW6_COOKIES must be a power of 2"); + +#define CPL_FW6_COOKIE_MASK (NUM_CPL_FW6_COOKIES - 1) + +#define CPL_FW6_PLD_COOKIE(cpl) (be64toh((cpl)->data[1]) & ~CPL_FW6_COOKIE_MASK) + struct sge_iq; struct rss_header; typedef int (*cpl_handler_t)(struct sge_iq *, const struct rss_header *, diff --git a/sys/dev/cxgbe/crypto/t4_crypto.c b/sys/dev/cxgbe/crypto/t4_crypto.c index 24dfdc1f23db..80e31b1159fd 100644 --- a/sys/dev/cxgbe/crypto/t4_crypto.c +++ b/sys/dev/cxgbe/crypto/t4_crypto.c @@ -208,6 +208,7 @@ struct ccr_softc { counter_u64_t stats_pad_error; counter_u64_t stats_sglist_error; counter_u64_t stats_process_error; + counter_u64_t stats_pointer_error; counter_u64_t stats_sw_fallback; struct sysctl_ctx_list ctx; @@ -1884,6 +1885,9 @@ ccr_sysctls(struct ccr_softc *sc) SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "process_error", CTLFLAG_RD, &sc->stats_process_error, "Requests failed during queueing"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "pointer_error", + CTLFLAG_RD, &sc->stats_pointer_error, + "Requests with a misaligned request pointer"); SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "sw_fallback", CTLFLAG_RD, &sc->stats_sw_fallback, "Requests processed by falling back to software"); @@ -1991,6 +1995,7 @@ ccr_attach(device_t dev) sc->stats_pad_error = counter_u64_alloc(M_WAITOK); sc->stats_sglist_error = counter_u64_alloc(M_WAITOK); sc->stats_process_error = counter_u64_alloc(M_WAITOK); + sc->stats_pointer_error = counter_u64_alloc(M_WAITOK); sc->stats_sw_fallback = counter_u64_alloc(M_WAITOK); ccr_sysctls(sc); @@ -2037,6 +2042,7 @@ ccr_detach(device_t dev) counter_u64_free(sc->stats_pad_error); counter_u64_free(sc->stats_sglist_error); counter_u64_free(sc->stats_process_error); + counter_u64_free(sc->stats_pointer_error); counter_u64_free(sc->stats_sw_fallback); for_each_port(sc->adapter, i) { ccr_free_port(sc, i); @@ -2534,6 +2540,16 @@ ccr_process(device_t dev, struct cryptop *crp, int hint) s = crypto_get_driver_session(crp->crp_session); sc = device_get_softc(dev); + /* + * Request pointers with the low bit set in the pointer can't + * be stored as the cookie in the CPL_FW6_PLD reply. + */ + if (((uintptr_t)crp & CPL_FW6_COOKIE_MASK) != 0) { + counter_u64_add(sc->stats_pointer_error, 1); + error = EINVAL; + goto out_unlocked; + } + mtx_lock(&s->lock); error = ccr_populate_sglist(s->sg_input, &crp->crp_buf); if (error == 0 && CRYPTO_HAS_OUTPUT_BUFFER(crp)) @@ -2640,6 +2656,7 @@ ccr_process(device_t dev, struct cryptop *crp, int hint) out: mtx_unlock(&s->lock); +out_unlocked: if (error) { crp->crp_etype = error; crypto_done(crp); @@ -2649,7 +2666,7 @@ out: } static int -do_cpl6_fw_pld(struct sge_iq *iq, const struct rss_header *rss, +fw6_pld_ccr(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) { struct ccr_softc *sc; @@ -2664,7 +2681,7 @@ do_cpl6_fw_pld(struct sge_iq *iq, const struct rss_header *rss, else cpl = (const void *)(rss + 1); - crp = (struct cryptop *)(uintptr_t)be64toh(cpl->data[1]); + crp = (struct cryptop *)(uintptr_t)CPL_FW6_PLD_COOKIE(cpl); s = crypto_get_driver_session(crp->crp_session); status = be64toh(cpl->data[0]); if (CHK_MAC_ERR_BIT(status) || CHK_PAD_ERR_BIT(status)) @@ -2718,10 +2735,12 @@ ccr_modevent(module_t mod, int cmd, void *arg) switch (cmd) { case MOD_LOAD: - t4_register_cpl_handler(CPL_FW6_PLD, do_cpl6_fw_pld); + t4_register_shared_cpl_handler(CPL_FW6_PLD, fw6_pld_ccr, + CPL_FW6_COOKIE_CCR); return (0); case MOD_UNLOAD: - t4_register_cpl_handler(CPL_FW6_PLD, NULL); + t4_register_shared_cpl_handler(CPL_FW6_PLD, NULL, + CPL_FW6_COOKIE_CCR); return (0); default: return (EOPNOTSUPP); diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index 155a47552b40..6a32aeae4a82 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -350,6 +350,7 @@ cpl_handler_t l2t_write_rpl_handlers[NUM_CPL_COOKIES]; cpl_handler_t act_open_rpl_handlers[NUM_CPL_COOKIES]; cpl_handler_t abort_rpl_rss_handlers[NUM_CPL_COOKIES]; cpl_handler_t fw4_ack_handlers[NUM_CPL_COOKIES]; +cpl_handler_t fw6_pld_handlers[NUM_CPL_FW6_COOKIES]; void t4_register_an_handler(an_handler_t h) @@ -479,6 +480,21 @@ fw4_ack_handler(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) return (fw4_ack_handlers[cookie](iq, rss, m)); } +static int +fw6_pld_handler(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) +{ + const struct cpl_fw6_pld *cpl; + uint64_t cookie; + + if (m != NULL) + cpl = mtod(m, const void *); + else + cpl = (const void *)(rss + 1); + cookie = be64toh(cpl->data[1]) & CPL_FW6_COOKIE_MASK; + + return (fw6_pld_handlers[cookie](iq, rss, m)); +} + static void t4_init_shared_cpl_handlers(void) { @@ -488,6 +504,7 @@ t4_init_shared_cpl_handlers(void) t4_register_cpl_handler(CPL_ACT_OPEN_RPL, act_open_rpl_handler); t4_register_cpl_handler(CPL_ABORT_RPL_RSS, abort_rpl_rss_handler); t4_register_cpl_handler(CPL_FW4_ACK, fw4_ack_handler); + t4_register_cpl_handler(CPL_FW6_PLD, fw6_pld_handler); } void @@ -496,8 +513,12 @@ t4_register_shared_cpl_handler(int opcode, cpl_handler_t h, int cookie) uintptr_t *loc; MPASS(opcode < nitems(t4_cpl_handler)); - MPASS(cookie > CPL_COOKIE_RESERVED); - MPASS(cookie < NUM_CPL_COOKIES); + if (opcode == CPL_FW6_PLD) { + MPASS(cookie < NUM_CPL_FW6_COOKIES); + } else { + MPASS(cookie > CPL_COOKIE_RESERVED); + MPASS(cookie < NUM_CPL_COOKIES); + } MPASS(t4_cpl_handler[opcode] != NULL); switch (opcode) { @@ -516,6 +537,9 @@ t4_register_shared_cpl_handler(int opcode, cpl_handler_t h, int cookie) case CPL_FW4_ACK: loc = (uintptr_t *)&fw4_ack_handlers[cookie]; break; + case CPL_FW6_PLD: + loc = (uintptr_t *)&fw6_pld_handlers[cookie]; + break; default: MPASS(0); return; From nobody Mon Sep 29 15:22:40 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cb4gj1cQqz68Ncd; Mon, 29 Sep 2025 15:22:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb4gh4dZLz46cw; Mon, 29 Sep 2025 15:22:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FdIvp91f+Zub02i+dj7EEdEVk8bAZ56SePjn3CIz65A=; b=LEjd1EGBauPVg1GtkaG2L2fNqv/NXPuGj3A5RJvEqYWXUb/ZKw3V8aS4z9Ha/wu4Z2MZcc WkciEYUakMs1E901nLA3xVpfTM9tJjHwtgf1De1I6VV2cqK1CAR/7ncWz+cTTai/NDbfjh RlB+EsDZsQW+Mp0R7+6na8QnMT0j8FrrA+0n4IaaBzvSnIUv2gEEnhJVB1q5eeyoc0hRRB ecM1jRqoHgWATA1r0p9FY+jhrcKFl3Z5ojrozaqNGh+hI9erSaDC1QQGiaH+GPCN2ZVH7M WoN/hw35Iv3XRvGShLM5apA8nxcFEWSd2/vb+d6LpM0gURAPj7FRr9oeNSWIuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759159360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FdIvp91f+Zub02i+dj7EEdEVk8bAZ56SePjn3CIz65A=; b=nrDtkbnTXY5qlmVm3nfRR18/vdHdzqKnJtyTAIyO7TUEnFGikWPFf9UC46kIHpfduzZQBT s/fHI9ClYOCGPLjIBo6RXvTDp+176xR/kJFroE/7yohdNBupPjgb/87xBe4/5FxO5ivTQx zDdy2OyqehwMWkBSdTXxWObxEMTNnW3VxU6ybNQ49sKVvOk0vNSJvvqM9dbR7KgiywpWks zVMrXPEgFsu1DVNz1GFVSXS66e4rcGdO0BzbQH8FnZkSSxd2+YYuJCHHhkx+TzRlj/it12 q3lnW4OhQEW282w9ACX/eihZceqhyJt/ZkWyaR7CQa7wKyLPIXrXuE6AuTWtnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759159360; a=rsa-sha256; cv=none; b=SgXF7sa7KOMkAvHdtRiFJOlrCYvXUmUsMBuu41qQRxS9Q3MlNkcBr/gIzdasJTADLLXaWX a126sLfIkYT3Iv2xf82F5+i938ogYJvwR0MZF7r9yucnuduKNaaYP7kkze5hcizZiT6tLx LUjnx6vhOKSguKvOa4nG1gjRWvYoOll0r/skMrmrqzMWnQdnBIaJhQAwCG1swj4f/crdek 9XLdJ+kUwW7KuFm11bPwAHxmgdrqJqGmIBpD0+3rdVEM4g5KlEphySxRKYSEAVVjkZf6P4 i1NSzg2zegTapY4hb4f5sBPV40KyApyNoImextc7tCyF+khhsgaBo9+9GdKOWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb4gh458Mz19vN; Mon, 29 Sep 2025 15:22:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TFMekQ012194; Mon, 29 Sep 2025 15:22:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TFMeJf012191; Mon, 29 Sep 2025 15:22:40 GMT (envelope-from git) Date: Mon, 29 Sep 2025 15:22:40 GMT Message-Id: <202509291522.58TFMeJf012191@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 9e269eafebfc - main - cxgbe: Use partial GCM mode for partial TLS records on T7 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9e269eafebfca6c876be76a78e4bda621a921e45 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=9e269eafebfca6c876be76a78e4bda621a921e45 commit 9e269eafebfca6c876be76a78e4bda621a921e45 Author: John Baldwin AuthorDate: 2025-09-29 15:14:26 +0000 Commit: Navdeep Parhar CommitDate: 2025-09-29 15:19:13 +0000 cxgbe: Use partial GCM mode for partial TLS records on T7 T7's crypto co-processor adds a new partial GCM mode. This permits an AES-GCM operation to be split into multiple requests. After each request, the partial GHASH state is returned to the host and must be included in the subsequent request to continue the GHASH computation. Make use of this when sending a TLS record that spans multiple TCP "request" (where a request can use TSO to span multiple segments). This permits computing the final GHASH value across multiple requests without having to re-send the entire TLS record for the final request. To ensure that intermediate GHASH results are available when needed, mbuf chains are queued in the TLS pcb and only dispatched one at a time to the NIC TXQ. Packets which do not request a GHASH result queue the next mbuf from the connection as soon as they are written into the TXQ. Packets which do request a GHASH result queue the next mbuf after the the GHASH result is returned by a message on a NIC RXQ. Note that partial GCM mode is only used for the in-order data at the "tip" of a connection and not for retransmits of earlier data. Retransmits will not request a GHASH result so will enqueue the next mbuf from the connection to the NIC TXQ after being written. Partial GCM mode is also not TLS-aware and only supports "plain" AES-GCM. Thus, TLS AAD must be explicitly constructed and sent as part of the work request in the TXQ at the start of each TLS record. However, by avoiding the need to retransmit the entire TLS record's contents for the last mbuf spanning a TLS record, the overall amount of "wasted" DMA is reduced by a factor of about 30. MFC after: 3 days Sponsored by: Chelsio Communications --- sys/dev/cxgbe/adapter.h | 7 + sys/dev/cxgbe/crypto/t7_kern_tls.c | 886 +++++++++++++++++++++++++++++++++---- sys/dev/cxgbe/offload.h | 13 +- sys/dev/cxgbe/t4_main.c | 29 +- sys/dev/cxgbe/t4_sge.c | 16 + 5 files changed, 854 insertions(+), 97 deletions(-) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index 64fa4526d9f4..55f09fefb7e3 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -418,6 +418,7 @@ enum { */ enum { CPL_FW6_COOKIE_CCR = 0, + CPL_FW6_COOKIE_KTLS, NUM_CPL_FW6_COOKIES = 2 /* Low bits of cookie value. */ }; @@ -669,8 +670,12 @@ struct sge_txq { }; struct { /* T7 only. */ + uint64_t kern_tls_ghash_received; + uint64_t kern_tls_ghash_requested; uint64_t kern_tls_lso; + uint64_t kern_tls_partial_ghash; uint64_t kern_tls_splitmode; + uint64_t kern_tls_trailer; }; }; @@ -1456,6 +1461,8 @@ int t6_ktls_write_wr(struct sge_txq *, void *, struct mbuf *, u_int); /* t7_kern_tls.c */ int t7_tls_tag_alloc(struct ifnet *, union if_snd_tag_alloc_params *, struct m_snd_tag **); +void t7_ktls_modload(void); +void t7_ktls_modunload(void); int t7_ktls_parse_pkt(struct mbuf *); int t7_ktls_write_wr(struct sge_txq *, void *, struct mbuf *, u_int); #endif diff --git a/sys/dev/cxgbe/crypto/t7_kern_tls.c b/sys/dev/cxgbe/crypto/t7_kern_tls.c index 5063648b2ba9..217459126361 100644 --- a/sys/dev/cxgbe/crypto/t7_kern_tls.c +++ b/sys/dev/cxgbe/crypto/t7_kern_tls.c @@ -47,6 +47,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include "common/common.h" #include "common/t4_regs.h" @@ -78,13 +80,29 @@ struct tlspcb { unsigned char enc_mode; struct tls_scmd scmd0; + struct tls_scmd scmd0_partial; struct tls_scmd scmd0_short; unsigned int tx_key_info_size; uint16_t prev_mss; - /* Only used outside of setup and teardown when using inline keys. */ + /* Fields used for GCM records using GHASH state. */ + uint16_t ghash_offset; + uint64_t ghash_tls_seqno; + char ghash[AES_GMAC_HASH_LEN]; + bool ghash_valid; + bool ghash_pending; + bool ghash_lcb; + bool queue_mbufs; + uint8_t rx_chid; + uint16_t rx_qid; + struct mbufq pending_mbufs; + + /* + * Only used outside of setup and teardown when using inline + * keys or for partial GCM mode. + */ struct tls_keyctx keyctx; }; @@ -92,6 +110,9 @@ static void t7_tls_tag_free(struct m_snd_tag *mst); static int ktls_setup_keys(struct tlspcb *tlsp, const struct ktls_session *tls, struct sge_txq *txq); +static void *zero_buffer; +static vm_paddr_t zero_buffer_pa; + static const struct if_snd_tag_sw t7_tls_tag_sw = { .snd_tag_free = t7_tls_tag_free, .type = IF_SND_TAG_TYPE_TLS @@ -118,6 +139,10 @@ alloc_tlspcb(struct ifnet *ifp, struct vi_info *vi, int flags) tlsp->vi = vi; tlsp->sc = sc; tlsp->tx_key_addr = -1; + tlsp->ghash_offset = -1; + tlsp->rx_chid = pi->rx_chan; + tlsp->rx_qid = sc->sge.rxq[pi->vi->first_rxq].iq.abs_id; + mbufq_init(&tlsp->pending_mbufs, INT_MAX); return (tlsp); } @@ -191,6 +216,16 @@ t7_tls_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, sc = vi->adapter; tlsp = alloc_tlspcb(ifp, vi, M_WAITOK); + + /* + * Pointers with the low bit set in the pointer can't + * be stored as the cookie in the CPL_FW6_PLD reply. + */ + if (((uintptr_t)tlsp & CPL_FW6_COOKIE_MASK) != 0) { + error = EINVAL; + goto failed; + } + tlsp->tls13 = tls->params.tls_vminor == TLS_MINOR_VER_THREE; if (sc->tlst.inline_keys) @@ -250,7 +285,7 @@ t7_tls_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, tlsp->scmd0.ivgen_hdrlen |= V_SCMD_KEY_CTX_INLINE(1); /* - * The SCMD fields used when encrypting a partial TLS record + * The SCMD fields used when encrypting a short TLS record * (no trailer and possibly a truncated payload). */ tlsp->scmd0_short.seqno_numivs = V_SCMD_SEQ_NO_CTRL(0) | @@ -274,6 +309,25 @@ t7_tls_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, if (tlsp->inline_key) tlsp->scmd0_short.ivgen_hdrlen |= V_SCMD_KEY_CTX_INLINE(1); + /* + * The SCMD fields used when encrypting a short TLS record + * using a partial GHASH. + */ + tlsp->scmd0_partial.seqno_numivs = V_SCMD_SEQ_NO_CTRL(0) | + V_SCMD_PROTO_VERSION(SCMD_PROTO_VERSION_GENERIC) | + V_SCMD_ENC_DEC_CTRL(SCMD_ENCDECCTRL_ENCRYPT) | + V_SCMD_CIPH_AUTH_SEQ_CTRL((mac_first == 0)) | + V_SCMD_CIPH_MODE(tlsp->enc_mode) | + V_SCMD_AUTH_MODE(t4_tls_auth_mode(tls)) | + V_SCMD_HMAC_CTRL(t4_tls_hmac_ctrl(tls)) | + V_SCMD_IV_SIZE(AES_BLOCK_LEN / 2) | V_SCMD_NUM_IVS(1); + tlsp->scmd0_partial.seqno_numivs = + htobe32(tlsp->scmd0_partial.seqno_numivs); + + tlsp->scmd0_partial.ivgen_hdrlen = V_SCMD_IV_GEN_CTRL(0) | + V_SCMD_TLS_FRAG_ENABLE(0) | V_SCMD_AADIVDROP(1) | + V_SCMD_KEY_CTX_INLINE(1); + TXQ_LOCK(txq); if (tlsp->enc_mode == SCMD_CIPH_MODE_AES_GCM) txq->kern_tls_gcm++; @@ -340,7 +394,7 @@ ktls_setup_keys(struct tlspcb *tlsp, const struct ktls_session *tls, } static u_int -ktls_base_wr_size(struct tlspcb *tlsp) +ktls_base_wr_size(struct tlspcb *tlsp, bool inline_key) { u_int wr_len; @@ -348,7 +402,7 @@ ktls_base_wr_size(struct tlspcb *tlsp) wr_len += sizeof(struct ulp_txpkt); // 8 wr_len += sizeof(struct ulptx_idata); // 8 wr_len += sizeof(struct cpl_tx_sec_pdu);// 32 - if (tlsp->inline_key) + if (inline_key) wr_len += tlsp->tx_key_info_size; else { wr_len += sizeof(struct ulptx_sc_memrd);// 8 @@ -396,18 +450,15 @@ ktls_sgl_size(u_int nsegs) * *trailing_waste - amount of crypto output to drop from the end */ static bool -ktls_is_short_record(struct tlspcb *tlsp, struct mbuf *m_tls, - u_int tlen, u_int *header_len, u_int *offset, u_int *plen, - u_int *leading_waste, u_int *trailing_waste) +ktls_is_short_record(struct tlspcb *tlsp, struct mbuf *m_tls, u_int tlen, + u_int rlen, u_int *header_len, u_int *offset, u_int *plen, + u_int *leading_waste, u_int *trailing_waste, bool send_partial_ghash, + bool request_ghash) { - const struct tls_record_layer *hdr; - u_int new_tlen, trailer_len, rlen; + u_int new_tlen, trailer_len; MPASS(tlen > m_tls->m_epg_hdrlen); - hdr = (void *)m_tls->m_epg_hdr; - rlen = TLS_HEADER_LENGTH + ntohs(hdr->tls_length); - /* * For TLS 1.3 treat the inner record type stored as the first * byte of the trailer as part of the payload rather than part @@ -446,30 +497,63 @@ ktls_is_short_record(struct tlspcb *tlsp, struct mbuf *m_tls, *trailing_waste = new_tlen - tlen; *plen = new_tlen - m_tls->m_epg_hdrlen; } else { - /* - * For AES-GCM we have to send the full record if - * the end overlaps with the trailer. Otherwise, we - * can use AES-CTR to encrypt a partial PDU. - */ - if (rlen - tlen < trailer_len) - return (false); + if (rlen - tlen < trailer_len || + (rlen - tlen == trailer_len && request_ghash)) { + /* + * For AES-GCM we have to send the full record + * if the end overlaps with the trailer and a + * partial GHASH isn't being sent. + */ + if (!send_partial_ghash) + return (false); + + /* + * Will need to treat any excess trailer bytes as + * trailing waste. *trailing_waste is already + * correct. + */ + } else { + /* + * We can use AES-CTR or AES-GCM in partial GHASH + * mode to encrypt a partial PDU. + * + * The last block can be partially encrypted + * without any trailing waste. + */ + *trailing_waste = 0; + *plen = tlen - m_tls->m_epg_hdrlen; + } /* - * The last record can be partially encrypted via - * AES-CTR without any trailing waste. + * If this request starts at the first byte of the + * payload (so the previous request sent the full TLS + * header as a tunnel packet) and a partial GHASH is + * being requested, the full TLS header must be sent + * as input for the GHASH. */ - *trailing_waste = 0; - *plen = tlen - m_tls->m_epg_hdrlen; + if (mtod(m_tls, vm_offset_t) == m_tls->m_epg_hdrlen && + request_ghash) + return (true); /* - * In addition, with AES-CTR, we can minimize leading - * waste by starting encryption at the start of the - * closest AES block. + * In addition, we can minimize leading waste by + * starting encryption at the start of the closest AES + * block. */ if (mtod(m_tls, vm_offset_t) >= m_tls->m_epg_hdrlen) { *header_len = 0; - *offset = rounddown2(mtod(m_tls, vm_offset_t) - - m_tls->m_epg_hdrlen, AES_BLOCK_LEN); + *offset = mtod(m_tls, vm_offset_t) - + m_tls->m_epg_hdrlen; + if (*offset >= *plen) + *offset = *plen; + else + *offset = rounddown2(*offset, AES_BLOCK_LEN); + + /* + * If the request is just bytes from the trailer, + * trim the offset to the end of the payload. + */ + *offset = min(*offset, *plen); *plen -= *offset; *leading_waste -= (m_tls->m_epg_hdrlen + *offset); } @@ -477,12 +561,22 @@ ktls_is_short_record(struct tlspcb *tlsp, struct mbuf *m_tls, return (true); } +/* Size of the AES-GCM TLS AAD for a given connection. */ +static int +ktls_gcm_aad_len(struct tlspcb *tlsp) +{ + return (tlsp->tls13 ? sizeof(struct tls_aead_data_13) : + sizeof(struct tls_aead_data)); +} + static int ktls_wr_len(struct tlspcb *tlsp, struct mbuf *m, struct mbuf *m_tls, int *nsegsp) { - u_int header_len, imm_len, offset, plen, tlen, wr_len; + const struct tls_record_layer *hdr; + u_int header_len, imm_len, offset, plen, rlen, tlen, wr_len; u_int leading_waste, trailing_waste; + bool inline_key, last_ghash_frag, request_ghash, send_partial_ghash; bool short_record; M_ASSERTEXTPG(m_tls); @@ -512,11 +606,61 @@ ktls_wr_len(struct tlspcb *tlsp, struct mbuf *m, struct mbuf *m_tls, return (wr_len); } - short_record = ktls_is_short_record(tlsp, m_tls, tlen, &header_len, - &offset, &plen, &leading_waste, &trailing_waste); + hdr = (void *)m_tls->m_epg_hdr; + rlen = TLS_HEADER_LENGTH + ntohs(hdr->tls_length); + + /* + * See if this request might make use of GHASH state. This + * errs on the side of over-budgeting the WR size. + */ + last_ghash_frag = false; + request_ghash = false; + send_partial_ghash = false; + if (tlsp->enc_mode == SCMD_CIPH_MODE_AES_GCM && + tlsp->sc->tlst.partial_ghash && tlsp->sc->tlst.short_records) { + u_int trailer_len; + + trailer_len = m_tls->m_epg_trllen; + if (tlsp->tls13) + trailer_len--; + KASSERT(trailer_len == AES_GMAC_HASH_LEN, + ("invalid trailer length for AES-GCM")); + + /* Is this the start of a TLS record? */ + if (mtod(m_tls, vm_offset_t) <= m_tls->m_epg_hdrlen) { + /* + * Might use partial GHASH if this doesn't + * send the full record. + */ + if (tlen < rlen) { + if (tlen < (rlen - trailer_len)) + send_partial_ghash = true; + request_ghash = true; + } + } else { + send_partial_ghash = true; + if (tlen < rlen) + request_ghash = true; + if (tlen >= (rlen - trailer_len)) + last_ghash_frag = true; + } + } + + /* + * Assume not sending partial GHASH for this call to get the + * larger size. + */ + short_record = ktls_is_short_record(tlsp, m_tls, tlen, rlen, + &header_len, &offset, &plen, &leading_waste, &trailing_waste, + false, request_ghash); + + inline_key = send_partial_ghash || tlsp->inline_key; /* Calculate the size of the work request. */ - wr_len = ktls_base_wr_size(tlsp); + wr_len = ktls_base_wr_size(tlsp, inline_key); + + if (send_partial_ghash) + wr_len += AES_GMAC_HASH_LEN; if (leading_waste != 0 || trailing_waste != 0) { /* @@ -534,23 +678,92 @@ ktls_wr_len(struct tlspcb *tlsp, struct mbuf *m, struct mbuf *m_tls, * immediate data. Short records include a raw AES IV as * immediate data. TLS 1.3 non-short records include a * placeholder for the sequence number as immediate data. + * Short records using a partial hash may also need to send + * TLS AAD. If a partial hash might be sent, assume a short + * record to get the larger size. */ imm_len = m->m_len + header_len; - if (short_record) + if (short_record || send_partial_ghash) { imm_len += AES_BLOCK_LEN; - else if (tlsp->tls13) + if (send_partial_ghash && header_len != 0) + imm_len += ktls_gcm_aad_len(tlsp); + } else if (tlsp->tls13) imm_len += sizeof(uint64_t); wr_len += roundup2(imm_len, 16); - /* TLS record payload via DSGL. */ + /* + * TLS record payload via DSGL. For partial GCM mode we + * might need an extra SG entry for a placeholder. + */ *nsegsp = sglist_count_mbuf_epg(m_tls, m_tls->m_epg_hdrlen + offset, plen); - wr_len += ktls_sgl_size(*nsegsp); + wr_len += ktls_sgl_size(*nsegsp + (last_ghash_frag ? 1 : 0)); + + if (request_ghash) { + /* AES-GCM records might return a partial hash. */ + wr_len += sizeof(struct ulp_txpkt); + wr_len += sizeof(struct ulptx_idata); + wr_len += sizeof(struct cpl_tx_tls_ack); + wr_len += sizeof(struct rss_header) + + sizeof(struct cpl_fw6_pld); + wr_len += AES_GMAC_HASH_LEN; + } wr_len = roundup2(wr_len, 16); return (wr_len); } +/* Queue the next pending packet. */ +static void +ktls_queue_next_packet(struct tlspcb *tlsp, bool enqueue_only) +{ +#ifdef KTR + struct ether_header *eh; + struct tcphdr *tcp; + tcp_seq tcp_seqno; +#endif + struct mbuf *m; + void *items[1]; + int rc; + + TXQ_LOCK_ASSERT_OWNED(tlsp->txq); + KASSERT(tlsp->queue_mbufs, ("%s: mbufs not being queued for %p", + __func__, tlsp)); + for (;;) { + m = mbufq_dequeue(&tlsp->pending_mbufs); + if (m == NULL) { + tlsp->queue_mbufs = false; + return; + } + +#ifdef KTR + eh = mtod(m, struct ether_header *); + tcp = (struct tcphdr *)((char *)eh + m->m_pkthdr.l2hlen + + m->m_pkthdr.l3hlen); + tcp_seqno = ntohl(tcp->th_seq); +#ifdef VERBOSE_TRACES + CTR(KTR_CXGBE, "%s: pkt len %d TCP seq %u", __func__, + m->m_pkthdr.len, tcp_seqno); +#endif +#endif + + items[0] = m; + if (enqueue_only) + rc = mp_ring_enqueue_only(tlsp->txq->r, items, 1); + else { + TXQ_UNLOCK(tlsp->txq); + rc = mp_ring_enqueue(tlsp->txq->r, items, 1, 256); + TXQ_LOCK(tlsp->txq); + } + if (__predict_true(rc == 0)) + return; + + CTR(KTR_CXGBE, "%s: pkt len %d TCP seq %u dropped", __func__, + m->m_pkthdr.len, tcp_seqno); + m_freem(m); + } +} + int t7_ktls_parse_pkt(struct mbuf *m) { @@ -561,7 +774,7 @@ t7_ktls_parse_pkt(struct mbuf *m) struct tcphdr *tcp; struct mbuf *m_tls; void *items[1]; - int nsegs; + int error, nsegs; u_int wr_len, tot_len; uint16_t eh_type; @@ -664,14 +877,42 @@ t7_ktls_parse_pkt(struct mbuf *m) } MPASS(tot_len != 0); - set_mbuf_len16(m, tot_len / 16); + + if (tlsp->enc_mode == SCMD_CIPH_MODE_AES_GCM) { + /* Defer packets beyond what has been sent so far. */ + TXQ_LOCK(tlsp->txq); + if (tlsp->queue_mbufs) { + error = mbufq_enqueue(&tlsp->pending_mbufs, m); + if (error == 0) { +#ifdef VERBOSE_TRACES + CTR(KTR_CXGBE, + "%s: %p len16 %d nsegs %d TCP seq %u deferred", + __func__, tlsp, mbuf_len16(m), + mbuf_nsegs(m), ntohl(tcp->th_seq)); +#endif + } + TXQ_UNLOCK(tlsp->txq); + return (error); + } + tlsp->queue_mbufs = true; + TXQ_UNLOCK(tlsp->txq); + } + #ifdef VERBOSE_TRACES CTR(KTR_CXGBE, "%s: %p len16 %d nsegs %d", __func__, tlsp, mbuf_len16(m), mbuf_nsegs(m)); #endif items[0] = m; - return (mp_ring_enqueue(tlsp->txq->r, items, 1, 256)); + error = mp_ring_enqueue(tlsp->txq->r, items, 1, 256); + if (__predict_false(error != 0)) { + if (tlsp->enc_mode == SCMD_CIPH_MODE_AES_GCM) { + TXQ_LOCK(tlsp->txq); + ktls_queue_next_packet(tlsp, false); + TXQ_UNLOCK(tlsp->txq); + } + } + return (error); } static inline bool @@ -741,6 +982,47 @@ write_lso_cpl(void *cpl, struct mbuf *m0, uint16_t mss, uint16_t eh_type, return (lso + 1); } +static inline void * +write_tx_tls_ack(void *dst, u_int rx_chid, u_int hash_len, bool ghash_lcb) +{ + struct cpl_tx_tls_ack *cpl; + uint32_t flags; + + flags = ghash_lcb ? F_CPL_TX_TLS_ACK_LCB : F_CPL_TX_TLS_ACK_PHASH; + cpl = dst; + cpl->op_to_Rsvd2 = htobe32(V_CPL_TX_TLS_ACK_OPCODE(CPL_TX_TLS_ACK) | + V_T7_CPL_TX_TLS_ACK_RXCHID(rx_chid) | F_CPL_TX_TLS_ACK_ULPTXLPBK | + flags); + + /* 32 == AckEncCpl, 16 == LCB */ + cpl->PldLen = htobe32(V_CPL_TX_TLS_ACK_PLDLEN(32 + 16 + hash_len)); + cpl->Rsvd3 = 0; + + return (cpl + 1); +} + +static inline void * +write_fw6_pld(void *dst, u_int rx_chid, u_int rx_qid, u_int hash_len, + uint64_t cookie) +{ + struct rss_header *rss; + struct cpl_fw6_pld *cpl; + + rss = dst; + memset(rss, 0, sizeof(*rss)); + rss->opcode = CPL_FW6_PLD; + rss->qid = htobe16(rx_qid); + rss->channel = rx_chid; + + cpl = (void *)(rss + 1); + memset(cpl, 0, sizeof(*cpl)); + cpl->opcode = CPL_FW6_PLD; + cpl->len = htobe16(hash_len); + cpl->data[1] = htobe64(cookie); + + return (cpl + 1); +} + static inline void * write_split_mode_rx_phys(void *dst, struct mbuf *m, struct mbuf *m_tls, u_int crypto_hdr_len, u_int leading_waste, u_int trailing_waste) @@ -790,7 +1072,7 @@ write_split_mode_rx_phys(void *dst, struct mbuf *m, struct mbuf *m_tls, * If the SGL ends on an address that is not 16 byte aligned, this function will * add a 0 filled flit at the end. */ -static void +static void * write_gl_to_buf(struct sglist *gl, caddr_t to) { struct sglist_seg *seg; @@ -829,10 +1111,11 @@ write_gl_to_buf(struct sglist *gl, caddr_t to) } MPASS((((uintptr_t)flitp) & 0xf) == 0); + return (flitp); } static inline void -copy_to_txd(struct sge_eq *eq, caddr_t from, caddr_t *to, int len) +copy_to_txd(struct sge_eq *eq, const char *from, caddr_t *to, int len) { MPASS((uintptr_t)(*to) >= (uintptr_t)&eq->desc[0]); @@ -857,8 +1140,8 @@ copy_to_txd(struct sge_eq *eq, caddr_t from, caddr_t *to, int len) static int ktls_write_tunnel_packet(struct sge_txq *txq, void *dst, struct mbuf *m, - struct mbuf *m_tls, u_int available, tcp_seq tcp_seqno, u_int pidx, - uint16_t eh_type) + const void *src, u_int len, u_int available, tcp_seq tcp_seqno, u_int pidx, + uint16_t eh_type, bool last_wr) { struct tx_sdesc *txsd; struct fw_eth_tx_pkt_wr *wr; @@ -874,14 +1157,8 @@ ktls_write_tunnel_packet(struct sge_txq *txq, void *dst, struct mbuf *m, TXQ_LOCK_ASSERT_OWNED(txq); M_ASSERTPKTHDR(m); - /* Locate the template TLS header. */ - M_ASSERTEXTPG(m_tls); - - /* This should always be the last TLS record in a chain. */ - MPASS(m_tls->m_next == NULL); - wr = dst; - pktlen = m->m_len + m_tls->m_len; + pktlen = m->m_len + len; ctrl = sizeof(struct cpl_tx_pkt_core) + pktlen; len16 = howmany(sizeof(struct fw_eth_tx_pkt_wr) + ctrl, 16); ndesc = tx_len16_to_desc(len16); @@ -938,17 +1215,17 @@ ktls_write_tunnel_packet(struct sge_txq *txq, void *dst, struct mbuf *m, copy_to_txd(&txq->eq, (caddr_t)(tcp + 1), &out, m->m_len - (m->m_pkthdr.l2hlen + m->m_pkthdr.l3hlen + sizeof(*tcp))); - /* Copy the subset of the TLS header requested. */ - copy_to_txd(&txq->eq, (char *)m_tls->m_epg_hdr + - mtod(m_tls, vm_offset_t), &out, m_tls->m_len); + /* Copy the payload data. */ + copy_to_txd(&txq->eq, src, &out, len); txq->imm_wrs++; txq->txpkt_wrs++; - txq->kern_tls_header++; - txsd = &txq->sdesc[pidx]; - txsd->m = m; + if (last_wr) + txsd->m = m; + else + txsd->m = NULL; txsd->desc_used = ndesc; return (ndesc); @@ -976,15 +1253,21 @@ ktls_write_tls_wr(struct tlspcb *tlsp, struct sge_txq *txq, u_int aad_start, aad_stop; u_int auth_start, auth_stop, auth_insert; u_int cipher_start, cipher_stop, iv_offset; - u_int header_len, imm_len, ndesc, nsegs, offset, plen, tlen, wr_len; + u_int header_len, offset, plen, rlen, tlen; + u_int imm_len, ndesc, nsegs, txpkt_lens[2], wr_len; u_int cpl_len, crypto_hdr_len, post_key_context_len; u_int leading_waste, trailing_waste; u_short ip_len; - bool last_wr, need_lso, short_record, split_mode, using_scratch; + bool inline_key, ghash_lcb, last_ghash_frag, last_wr, need_lso; + bool request_ghash, send_partial_ghash, short_record, split_mode; + bool using_scratch; MPASS(tlsp->txq == txq); M_ASSERTEXTPG(m_tls); + /* Final work request for this mbuf chain? */ + last_wr = (m_tls->m_next == NULL); + /* * The relative offset of the last byte to send from the TLS * record. @@ -999,12 +1282,20 @@ ktls_write_tls_wr(struct tlspcb *tlsp, struct sge_txq *txq, CTR(KTR_CXGBE, "%s: %p header-only TLS record %u", __func__, tlsp, (u_int)m_tls->m_epg_seqno); #endif - return (ktls_write_tunnel_packet(txq, dst, m, m_tls, available, - tcp_seqno, pidx, eh_type)); + /* This should always be the last TLS record in a chain. */ + MPASS(last_wr); + + txq->kern_tls_header++; + + return (ktls_write_tunnel_packet(txq, dst, m, + (char *)m_tls->m_epg_hdr + mtod(m_tls, vm_offset_t), + m_tls->m_len, available, tcp_seqno, pidx, eh_type, + last_wr)); } /* Locate the TLS header. */ hdr = (void *)m_tls->m_epg_hdr; + rlen = TLS_HEADER_LENGTH + ntohs(hdr->tls_length); #ifdef VERBOSE_TRACES CTR(KTR_CXGBE, "%s: offset %lu len %u TCP seq %u TLS record %u", @@ -1012,18 +1303,153 @@ ktls_write_tls_wr(struct tlspcb *tlsp, struct sge_txq *txq, (u_int)m_tls->m_epg_seqno); #endif - short_record = ktls_is_short_record(tlsp, m_tls, tlen, &header_len, - &offset, &plen, &leading_waste, &trailing_waste); + /* Should this request make use of GHASH state? */ + ghash_lcb = false; + last_ghash_frag = false; + request_ghash = false; + send_partial_ghash = false; + if (tlsp->enc_mode == SCMD_CIPH_MODE_AES_GCM && + tlsp->sc->tlst.partial_ghash && tlsp->sc->tlst.short_records) { + u_int trailer_len; + + trailer_len = m_tls->m_epg_trllen; + if (tlsp->tls13) + trailer_len--; + KASSERT(trailer_len == AES_GMAC_HASH_LEN, + ("invalid trailer length for AES-GCM")); + + /* Is this the start of a TLS record? */ + if (mtod(m_tls, vm_offset_t) <= m_tls->m_epg_hdrlen) { + /* + * If this is the very first TLS record or + * if this is a newer TLS record, request a partial + * hash, but not if we are going to send the whole + * thing. + */ + if ((tlsp->ghash_tls_seqno == 0 || + tlsp->ghash_tls_seqno < m_tls->m_epg_seqno) && + tlen < rlen) { + /* + * If we are only missing part or all + * of the trailer, send a normal full + * record but request the hash. + * Otherwise, use partial GHASH mode. + */ + if (tlen >= (rlen - trailer_len)) + ghash_lcb = true; + else + send_partial_ghash = true; + request_ghash = true; + tlsp->ghash_tls_seqno = m_tls->m_epg_seqno; + } + } else if (tlsp->ghash_tls_seqno == m_tls->m_epg_seqno && + tlsp->ghash_valid) { + /* + * Compute the offset of the first AES block as + * is done in ktls_is_short_record. + */ + if (rlen - tlen < trailer_len) + plen = rlen - (m_tls->m_epg_hdrlen + + trailer_len); + else + plen = tlen - m_tls->m_epg_hdrlen; + offset = mtod(m_tls, vm_offset_t) - m_tls->m_epg_hdrlen; + if (offset >= plen) + offset = plen; + else + offset = rounddown2(offset, AES_BLOCK_LEN); + if (tlsp->ghash_offset == offset) { + if (offset == plen) { + /* + * Send a partial trailer as a + * tunnelled packet as + * immediate data. + */ +#ifdef VERBOSE_TRACES + CTR(KTR_CXGBE, + "%s: %p trailer-only TLS record %u", + __func__, tlsp, + (u_int)m_tls->m_epg_seqno); +#endif + + txq->kern_tls_trailer++; + + offset = mtod(m_tls, vm_offset_t) - + (m_tls->m_epg_hdrlen + plen); + KASSERT(offset <= AES_GMAC_HASH_LEN, + ("offset outside of trailer")); + return (ktls_write_tunnel_packet(txq, + dst, m, tlsp->ghash + offset, + m_tls->m_len, available, tcp_seqno, + pidx, eh_type, last_wr)); + } + + /* + * If this request sends the end of + * the payload, it is the last + * fragment. + */ + if (tlen >= (rlen - trailer_len)) { + last_ghash_frag = true; + ghash_lcb = true; + } + + /* + * Only use partial GCM mode (rather + * than an AES-CTR short record) if + * there is input auth data to pass to + * the GHASH. That is true so long as + * there is at least one full block of + * payload data, or if the remaining + * payload data is the final partial + * block. + */ + if (plen - offset >= GMAC_BLOCK_LEN || + last_ghash_frag) { + send_partial_ghash = true; + + /* + * If not sending the complete + * end of the record, this is + * a middle request so needs + * to request an updated + * partial hash. + */ + if (tlen < rlen) + request_ghash = true; + } + } + } + } + + short_record = ktls_is_short_record(tlsp, m_tls, tlen, rlen, + &header_len, &offset, &plen, &leading_waste, &trailing_waste, + send_partial_ghash, request_ghash); + if (short_record) { #ifdef VERBOSE_TRACES CTR(KTR_CXGBE, "%s: %p short TLS record %u hdr %u offs %u plen %u", __func__, tlsp, (u_int)m_tls->m_epg_seqno, header_len, offset, plen); + if (send_partial_ghash) { + if (header_len != 0) + CTR(KTR_CXGBE, "%s: %p sending initial GHASH", + __func__, tlsp); + else + CTR(KTR_CXGBE, "%s: %p sending partial GHASH for offset %u%s", + __func__, tlsp, tlsp->ghash_offset, + last_ghash_frag ? ", last_frag" : ""); + } #endif + KASSERT(send_partial_ghash || !request_ghash, + ("requesting but not sending partial hash for short record")); + } else { + KASSERT(!send_partial_ghash, + ("sending partial hash with full record")); } - if ((short_record || trailing_waste != 0) && m_tls->m_next == NULL && + if (tlen < rlen && m_tls->m_next == NULL && (tcp->th_flags & TH_FIN) != 0) { txq->kern_tls_fin_short++; #ifdef INVARIANTS @@ -1031,21 +1457,28 @@ ktls_write_tls_wr(struct tlspcb *tlsp, struct sge_txq *txq, #endif } - /* Use cached value for first record in chain. */ - if (m->m_next == m_tls) + /* + * Use cached value for first record in chain if not using + * partial GCM mode. ktls_parse_pkt() calculates nsegs based + * on send_partial_ghash being false. + */ + if (m->m_next == m_tls && !send_partial_ghash) nsegs = mbuf_nsegs(m); else nsegs = sglist_count_mbuf_epg(m_tls, m_tls->m_epg_hdrlen + offset, plen); - /* Final work request for this mbuf chain? */ - last_wr = (m_tls->m_next == NULL); - /* Determine if we need an LSO header. */ need_lso = (m_tls->m_len > mss); /* Calculate the size of the TLS work request. */ - wr_len = ktls_base_wr_size(tlsp); + inline_key = send_partial_ghash || tlsp->inline_key; + wr_len = ktls_base_wr_size(tlsp, inline_key); + + if (send_partial_ghash) { + /* Inline key context includes partial hash in OPAD. */ + wr_len += AES_GMAC_HASH_LEN; + } /* * SplitMode is required if there is any thing we need to trim @@ -1065,14 +1498,33 @@ ktls_write_tls_wr(struct tlspcb *tlsp, struct sge_txq *txq, wr_len += sizeof(struct cpl_tx_pkt_lso_core); imm_len = m->m_len + header_len; - if (short_record) + if (short_record) { imm_len += AES_BLOCK_LEN; - else if (tlsp->tls13) + if (send_partial_ghash && header_len != 0) + imm_len += ktls_gcm_aad_len(tlsp); + } else if (tlsp->tls13) imm_len += sizeof(uint64_t); wr_len += roundup2(imm_len, 16); - wr_len += ktls_sgl_size(nsegs); - + wr_len += ktls_sgl_size(nsegs + (last_ghash_frag ? 1 : 0)); wr_len = roundup2(wr_len, 16); + txpkt_lens[0] = wr_len - sizeof(*wr); + + if (request_ghash) { + /* + * Requesting the hash entails a second ULP_TX_PKT + * containing CPL_TX_TLS_ACK, CPL_FW6_PLD, and space + * for the hash. + */ + txpkt_lens[1] = sizeof(struct ulp_txpkt); + txpkt_lens[1] += sizeof(struct ulptx_idata); + txpkt_lens[1] += sizeof(struct cpl_tx_tls_ack); + txpkt_lens[1] += sizeof(struct rss_header) + + sizeof(struct cpl_fw6_pld); + txpkt_lens[1] += AES_GMAC_HASH_LEN; + wr_len += txpkt_lens[1]; + } else + txpkt_lens[1] = 0; + ndesc = howmany(wr_len, EQ_ESIZE); MPASS(ndesc <= available); @@ -1098,8 +1550,9 @@ ktls_write_tls_wr(struct tlspcb *tlsp, struct sge_txq *txq, V_ULP_TXPKT_DATAMODIFY(0) | V_T7_ULP_TXPKT_CHANNELID(tlsp->vi->pi->port_id) | V_ULP_TXPKT_DEST(0) | + V_ULP_TXPKT_CMDMORE(request_ghash ? 1 : 0) | V_ULP_TXPKT_FID(txq->eq.cntxt_id) | V_ULP_TXPKT_RO(1)); - txpkt->len = htobe32(howmany(wr_len - sizeof(*wr), 16)); + txpkt->len = htobe32(howmany(txpkt_lens[0], 16)); /* ULPTX_IDATA sub-command */ idata = (void *)(txpkt + 1); @@ -1121,8 +1574,13 @@ ktls_write_tls_wr(struct tlspcb *tlsp, struct sge_txq *txq, cpl_len += sizeof(struct cpl_t7_rx_phys_dsgl); post_key_context_len = cpl_len + imm_len; - if (tlsp->inline_key) + if (inline_key) { idata->len += tlsp->tx_key_info_size + post_key_context_len; + if (send_partial_ghash) { + /* Partial GHASH in key context. */ + idata->len += AES_GMAC_HASH_LEN; + } + } idata->len = htobe32(idata->len); *** 519 LINES SKIPPED *** From nobody Mon Sep 29 15:45: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 4cb59k0VQzz68QMj; Mon, 29 Sep 2025 15:45:14 +0000 (UTC) (envelope-from christos@FreeBSD.org) Received: from margiolis.net (mail.margiolis.net [95.179.159.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb59j3Gkvz3G4v; Mon, 29 Sep 2025 15:45:13 +0000 (UTC) (envelope-from christos@FreeBSD.org) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=default; bh=69w75T1jCW+C zPAwM74xmR2Yej/Ac8CcPL5mrK9vIF4=; h=in-reply-to:references:to:from: subject:cc:date; d=margiolis.net; b=VGJAfILiYDGzlKqqiOa01jG1AQj99iNBhM viy2q/QLD2r3SWa4uVXWWfja1yc82AEMTyK9UuPN0epwJwa61cMr+VQOcw5sEbS9CXuC0S +RJR3AO9HeEvL/6o/2K7c+yeXMHMfKz66VwwXV8KAPU1F6jqGXsM1FQeQHAQQ0mq5zI= Received: from localhost (public-gprs544056.centertel.pl [31.61.244.121]) by margiolis.net (OpenSMTPD) with ESMTPSA id 09c48e0a (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 29 Sep 2025 09:45:10 -0600 (MDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 29 Sep 2025 17:45:09 +0200 Message-Id: Cc: , , Subject: Re: git: 9cab9fde5eda - main - virtual_oss: Port to base From: "Christos Margiolis" To: "Cy Schubert" X-Mailer: aerc 0.21.0 References: <202509280958.58S9wrww083342@gitrepo.freebsd.org> <20250929125925.0816B8AF@slippy.cwsent.com> In-Reply-To: <20250929125925.0816B8AF@slippy.cwsent.com> X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20473, ipnet:95.179.144.0/20, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cb59j3Gkvz3G4v On Mon Sep 29, 2025 at 2:59 PM CEST, Cy Schubert wrote: > In message <202509280958.58S9wrww083342@gitrepo.freebsd.org>, Christos=20 > Margioli > s writes: >> The branch main has been updated by christos: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=3D9cab9fde5edad9b409dd2317a= 2aec781 >> 5e6d6bed >> >> commit 9cab9fde5edad9b409dd2317a2aec7815e6d6bed >> Author: Christos Margiolis >> AuthorDate: 2025-09-28 09:56:52 +0000 >> Commit: Christos Margiolis >> CommitDate: 2025-09-28 09:56:52 +0000 > > Should this not have been imported using a vendor branch or are we=20 > intending on maintaining this ourselves without any further imports? I am the maintainer of virtual_oss nowadays, so there is no need to vendor import it. Development continues here. At some point I will probably retire the port entirely. Christos From nobody Mon Sep 29 16:18:06 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cb5vf5m8nz68SjL; Mon, 29 Sep 2025 16:18:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb5vf5BCLz3Lkw; Mon, 29 Sep 2025 16:18:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759162686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XxamYk0yWDXGH8DP3nbh/U/ZYOd5wnFcjdbBx2MaYzg=; b=MA9uC/E61mDXgYXRbdBM9rFRb3Jgj9K17a9J4vfFb+MwJRHPUqfQ1WqY2ZgamUbyE1yih2 Z56WsgFCT8cx2ESJ+ngYhkEZ2dEknPKFb4SeohFdjN9Qn7jxiEDMzYx/2Sd8JWP4Vf7bsM Eco7x3b+kOQNgz8id5juNIKMT5yzRHmjof6LlAdekjDNTmiCXaqgx+al2KHARrqUJeqjtp WSKaMwv3aaUGuhPdM5oMpq6BQDKJ6KQ52bZPVGSRj4eIwyjASBg9uZJHZjm93EkIvtkWI0 ymnOvcZ3KlNQPvXjUOmCKggGWVAadIbz3I0LsAEDa6bUoCvQHwTj4NtEqEIEFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759162686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XxamYk0yWDXGH8DP3nbh/U/ZYOd5wnFcjdbBx2MaYzg=; b=h7nzFdU7m2YbNHbYZnuSDmntpI5gMRtNfLHoPx3cciL3D6Xy2rWB6S5pSWK+77/b/pKLiE K5hKknOUi2z2+8dozeXYSs86oVi/nD9rWw5mrqmT55OXpeyz+r/i5gnzUEo0zpMFx45U2z RlQKu+lEhQ43ZR3bysoQkh3o3fp5XKxK8SNWAQXK4pfgmzSCBXDSuHNd2XmAtim3JKwe5N 5G0xiSM3TEOyYRaJYFadenSsf8S0gPJ12Svcf0RePHkRrZ7AbU72bj7OaHyy+758qc8Yfv UxSaDgqwlxc+R4DAVPsn028Bi5d8qRuUrfp5HneCVSGZDzQTYnuP+C78t2FHRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759162686; a=rsa-sha256; cv=none; b=C8Aao8qH8QnV4C3YOE4im6vdlwqCcZl5Dw9i7kY5YNxEFslJLlncc4u5YeHdtfYj0Y1JHc QriVPqNz8+p0ZdUuCZ+E6u8Ah5cbzd73fpRpSxMD/Rod1H5RaoaOm+cJd3W6hEbsE0FbB9 qpkWXdUHYUXIf2/Uc1vDDiq3o66kVwjvYXVFECERcaamuZimTEDrvHGpP8XGqmjDDmax71 at1zLShBDwA5D63HDddu0IfFJY1viOVFPtVVpKHnT9GGQpCgYbXeW1g18NaypXMrA2uhgF qlQMUfaA2yjL1+WNREHoQnyZ0n5QPRRRq1vSgob/pUSKKjxRKmv/bzBb+31xGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb5vf4jSpz1ByF; Mon, 29 Sep 2025 16:18:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TGI6Xb009262; Mon, 29 Sep 2025 16:18:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TGI6w2009259; Mon, 29 Sep 2025 16:18:06 GMT (envelope-from git) Date: Mon, 29 Sep 2025 16:18:06 GMT Message-Id: <202509291618.58TGI6w2009259@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 0532cd2d7713 - main - virtual_oss(8): Fix GCC errors and warnings 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: 0532cd2d771372d3266b97aebf4043d5b31b64bd Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=0532cd2d771372d3266b97aebf4043d5b31b64bd commit 0532cd2d771372d3266b97aebf4043d5b31b64bd Author: Christos Margiolis AuthorDate: 2025-09-29 16:16:26 +0000 Commit: Christos Margiolis CommitDate: 2025-09-29 16:16:26 +0000 virtual_oss(8): Fix GCC errors and warnings Reported by: CI Fixes: 9cab9fde5eda ("virtual_oss: Port to base") Sponsored by: The FreeBSD Foundation MFC after: 4 days --- usr.sbin/virtual_oss/virtual_oss/httpd.c | 10 ++++++---- usr.sbin/virtual_oss/virtual_oss/int.h | 6 +++++- usr.sbin/virtual_oss/virtual_oss/main.c | 6 +++--- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/usr.sbin/virtual_oss/virtual_oss/httpd.c b/usr.sbin/virtual_oss/virtual_oss/httpd.c index faea44f07f26..dc5d6036f39d 100644 --- a/usr.sbin/virtual_oss/virtual_oss/httpd.c +++ b/usr.sbin/virtual_oss/virtual_oss/httpd.c @@ -147,8 +147,9 @@ done: } static uint16_t -voss_ipv4_csum(const uint16_t *ptr, size_t count) +voss_ipv4_csum(const void *vptr, size_t count) { + const uint16_t *ptr = vptr; uint32_t sum = 0; while (count--) @@ -161,9 +162,11 @@ voss_ipv4_csum(const uint16_t *ptr, size_t count) } static uint16_t -voss_udp_csum(uint32_t sum, const uint16_t *hdr, size_t count, +voss_udp_csum(uint32_t sum, const void *vhdr, size_t count, const uint16_t *ptr, size_t length) { + const uint16_t *hdr = vhdr; + while (count--) sum += *hdr++; @@ -233,8 +236,7 @@ voss_httpd_send_rtp_sub(vclient_t *pvc, int fd, void *ptr, size_t len, uint32_t pvc->profile->http.rtp_seqnum++; pvc->profile->http.rtp_ts += len / (2 * pvc->channels); - if (writev(fd, iov, 2) < 0) - ; + (void)writev(fd, iov, 2); } static void diff --git a/usr.sbin/virtual_oss/virtual_oss/int.h b/usr.sbin/virtual_oss/virtual_oss/int.h index 4fea69f1a11f..a48e33d7f837 100644 --- a/usr.sbin/virtual_oss/virtual_oss/int.h +++ b/usr.sbin/virtual_oss/virtual_oss/int.h @@ -54,7 +54,11 @@ extern pthread_cond_t atomic_cv; (AFMT_U8 | AFMT_S8) #define VMAX_CHAN 64 -#define VMAX_STRING 64 /* characters */ +/* + * XXX 32 - strlen("/dev") to not exceed OSS_DEVNODE_SIZE in soundcard.h. Also + * silences GCC warnings. + */ +#define VMAX_STRING 27 #define VTYPE_OSS_DAT 0 #define VTYPE_WAV_HDR 1 diff --git a/usr.sbin/virtual_oss/virtual_oss/main.c b/usr.sbin/virtual_oss/virtual_oss/main.c index 760747e90091..3f7fb84ce4c6 100644 --- a/usr.sbin/virtual_oss/virtual_oss/main.c +++ b/usr.sbin/virtual_oss/virtual_oss/main.c @@ -1185,7 +1185,7 @@ vclient_ioctl_oss(struct cuse_dev *pdev, int fflags __unused, strlcpy(data.audioinfo.name, pvc->profile->oss_name, sizeof(data.audioinfo.name)); snprintf(data.audioinfo.devnode, sizeof(data.audioinfo.devnode), - _PATH_DEV "%s", pvc->profile->oss_name); + "/dev/%s", pvc->profile->oss_name); data.audioinfo.caps = DSP_CAP_INPUT | DSP_CAP_OUTPUT; data.audioinfo.iformats = VSUPPORTED_AFMT; data.audioinfo.oformats = VSUPPORTED_AFMT; @@ -2275,7 +2275,7 @@ parse_options(int narg, char **pparg, int is_main) if (voss_ctl_device[0]) return ("-t parameter may only be used once"); - strncpy(voss_ctl_device, optarg, sizeof(voss_ctl_device)); + strlcpy(voss_ctl_device, optarg, sizeof(voss_ctl_device)); break; case 'm': ptr = optarg; @@ -2529,7 +2529,7 @@ main(int argc, char **argv) { const char *ptrerr; struct sigaction sa; - struct cuse_dev *pdev; + struct cuse_dev *pdev = NULL; TAILQ_INIT(&virtual_profile_client_head); TAILQ_INIT(&virtual_profile_loopback_head); From nobody Mon Sep 29 16:28: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 4cb67j4ZRZz68TGY; Mon, 29 Sep 2025 16:28:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb67j3k6fz3MwH; Mon, 29 Sep 2025 16:28:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759163313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pv6rfi443UklmK7USRtQaD6jn3dt3qIwIIz9o0xBfVs=; b=Aja5jiZudXIzoxFeW2QtFC8MMZCaETBJfO72tirUfTLA1/3vq/xzAs9YWChs1WwIDYlu8p bVF+5m7RwQlYIHFBawdAPWU0m4E34iy2GVmh8GDJxo1scc7hTz4yn7ZUr6Ry03pzvjvMEn qFW0uMf/FyigL/JROaTCkIWS/lP3nzr2Y5JWlEz64QR9/1sTGWHocForF3O5YhxjV9ff21 ZAjzmIBGSCaUAsNYOrEmf7sSM/wNxGLyKaRThtshCGSegMahZRt/3rWHypC14oLUQ2mQuA LzAjtnY/QP60tEzM9m9p3D78Kte5rnk/qMKV4dlkkbdHckK1PHAQiZJ+yfzR5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759163313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pv6rfi443UklmK7USRtQaD6jn3dt3qIwIIz9o0xBfVs=; b=KCqBZTcaQ89HWDrZ0xmNW3tCESLew5KjrRAy45Z0pzne7+t8rwjRPcMzrXJikaID9awf4P ksyNryA5TlR9+d2nIWsDBrLqlYyZOtSxrowfnJgSUMKxFvfRRDFpN1ZwKhCAgTGJit8yja Ed30TpNJcR6h9TGv1JkXSlp3zexI6a/tES/2Rfy9Wd0OdMtZ2UvVBQeU/ds0pXbZCZeHyM VAoHzjFqw/qGpmhF5qQw56wHjO1E2BQwOXa7lrC+c2/jgOyB3foH+pWODNN6URj6L11vQu EsBwFqzho/041K4KAU4Wo2N/g4miEgXVWkw1hhNom/adJObf2MFyM04DAaCemA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759163313; a=rsa-sha256; cv=none; b=ZkBriIy7Jrr5/KJZ//cLs3Hy9Qecp5ueF9wRjHrTwmg3kkqxKffHRv6RCjFsarwJtY2vUN riufyeQttccJgJOPvKkREQLIdqR9/JqnSqoyQwAVwt/xFbMzGq0ewMCagYhfHuFAe+Lz5g 3RpXRCj1X5zk2y14TtA4uMVeUmaPOo3cuC3TwAlT7tPCBYX10U1L+zwMfSCVUa4YpLbElh +6YM/sTUevKkV8JTZdmX4YKLdAqrhmtYod9jVrWAX8xN4tQIoTUk5/wlwtdXzWmN9uiD/c 8n07iwStqRqdyYeQ6wUz/e1yvwMW+ITPGvnr/ZX0PlJsyaB3bvXqO6dcwsTOOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb67j1hY7z1Bn0; Mon, 29 Sep 2025 16:28:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TGSXbc028251; Mon, 29 Sep 2025 16:28:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TGSXZu028248; Mon, 29 Sep 2025 16:28:33 GMT (envelope-from git) Date: Mon, 29 Sep 2025 16:28:33 GMT Message-Id: <202509291628.58TGSXZu028248@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 307929b211e0 - main - ftpd: blocklist: Add an extra probe 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: 307929b211e07f91260105211b57678e906327af Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=307929b211e07f91260105211b57678e906327af commit 307929b211e07f91260105211b57678e906327af Author: Jose Luis Duran AuthorDate: 2025-09-29 16:26:54 +0000 Commit: Jose Luis Duran CommitDate: 2025-09-29 16:26:54 +0000 ftpd: blocklist: Add an extra probe Add a blocklist probe when user access is denied. Reviewed by: emaste Approved by: emaste (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52747 --- libexec/ftpd/ftpd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 751d77b218b7..3861036a5a8a 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -1043,6 +1043,7 @@ user(char *name) (checkuser(_PATH_FTPUSERS, name, 1, NULL, &ecode) || (ecode != 0 && ecode != ENOENT))) { reply(530, "User %s access denied.", name); + BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, STDIN_FILENO, "Access denied"); if (logging) syslog(LOG_NOTICE, "FTP LOGIN REFUSED FROM %s, %s", From nobody Mon Sep 29 16:28: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 4cb67k4dFvz68TBt; Mon, 29 Sep 2025 16:28: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 4cb67k3Cjfz3NDl; Mon, 29 Sep 2025 16:28:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759163314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5YqiXC7Y3GOhIsBnQsH+0Z35jdnmdOCVDQYsnClhoo4=; b=W1NkqeCJ+M7l0w+DH8aQlvNykTVpupmrbCE7y68G4MLCFnq7/qIKpfq+DbJ2TeGYArXwO4 PuUpawEF3RhhoA3WJMnDBlCQ51a5KosXZqQhZwbdt7YByTpdQv0B6kNx+pVNisvOK0kcTf SehFube5s9ymZa2q9fH6tPtJvzsgfrnaPpDX/VOItF29lB8iNZEWYEqcyhajM6EqZ4rQvn CgjdGl/OqLrYeCc1/L7LMFwW5ukkV6pgq1j5PilUkVRTv47zi5LDZ0ThVQQ/9OYFu3Mup5 MIxRC453jGheaanhh96x0hRXT5JDnHnJBskln61WnLdjowJpj8Dp3PByCFbYkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759163314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5YqiXC7Y3GOhIsBnQsH+0Z35jdnmdOCVDQYsnClhoo4=; b=XFE32BzDd9lapfDWJIWsz+cruUua3PkuVRjHJjxAD7ISBfzNYQRHZfX8qCoUhl9YlECzwI VvE/c21e1WntQ7vNRF+N6kQWfhJgxt90LEEECu6cY89VwtRPqJAK3CfyCLY7+OtaLHqDtI 1jDTcbFEXMNrHtH93lUzC7ILicKg8xqOnuucO9KPHaNkMEUpCAOQN9RSZSedveW9s2DEC/ L3EF88HQH6gFrL7nDp4lYFj+KEmVuL/kB5+KD0G2nbYGzr4dE9F2t0b6eObWJm/QJxIgP1 +p5FWfbUiu5bN26i6ERUXZOE9HaVlbVCMiYyhfArXE6f0LzQDbyuAPOwGh71jA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759163314; a=rsa-sha256; cv=none; b=XghDBPhoY8y6bNPbFa7c+WJIyOpCUAfx8HDuwxJcbCNfmUBFiCICT/rs6E/OdVrmEHAVv4 l0QNMhHij9pzvo5sORduoUBriu2iGO38OELHgbasAfhPYfHeLbdDyF3DpiSQiE/r8+iZ4U ihq+/YBybzNc1G2NIJSmHx/gsNI7vqPOhpyj0+v5wLrEcb/J08vpvBbL+yRJTmAz4U7kFA K6FaKe8wrZ+dKiQUjAiusNYDzCYG8pGA/gyoMLWy/uf2X11zq7CXVCTLt9LP2WO4/n6p8D 6L1I7G0Ur4PyZ92PipazkbnpKiGHym6niAQnAlWxB3Bsm57+2BX3rxDKlnGYOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb67k29TTz1C9Z; Mon, 29 Sep 2025 16:28:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TGSY5u028288; Mon, 29 Sep 2025 16:28:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TGSYPV028285; Mon, 29 Sep 2025 16:28:34 GMT (envelope-from git) Date: Mon, 29 Sep 2025 16:28:34 GMT Message-Id: <202509291628.58TGSYPV028285@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 1060684b04b0 - main - ftpd: blocklist: Add a permission denied probe 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: 1060684b04b0ee1e07c6c91f7c52978835ff676a Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=1060684b04b0ee1e07c6c91f7c52978835ff676a commit 1060684b04b0ee1e07c6c91f7c52978835ff676a Author: Jose Luis Duran AuthorDate: 2025-09-29 16:27:24 +0000 Commit: Jose Luis Duran CommitDate: 2025-09-29 16:27:24 +0000 ftpd: blocklist: Add a permission denied probe Reviewed by: emaste Approved by: emaste (mentor) Obtained from: NetBSD MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52746 --- libexec/ftpd/ftpd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 3861036a5a8a..9c3516710133 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -1425,6 +1425,7 @@ skip: *remote_ip = 0; remote_ip[sizeof(remote_ip) - 1] = 0; if (!auth_hostok(lc, remotehost, remote_ip)) { + BLACKLIST_NOTIFY(BLACKLIST_AUTH_FAIL, STDIN_FILENO, "Permission denied"); syslog(LOG_INFO|LOG_AUTH, "FTP LOGIN FAILED (HOST) as %s: permission denied.", pw->pw_name); From nobody Mon Sep 29 16:34: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 4cb6H80dbtz68SxB; Mon, 29 Sep 2025 16:35: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 4cb6H7730Vz3P5R; Mon, 29 Sep 2025 16:34:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759163700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T2AZBhmYE/8ntZPUT6E3bE/Shh2ZORSoAHii19aeJQ8=; b=GrS6rgvFto6+sYDS8i/O3m1R4DqOUlfy0TJrU209cpGtb3SnIXr96rmOMnGeMfbRTPYM1/ oF/KqVBf26KWXJXRdNVSa282GJGmBESXTrtC1RDP5ZUolDccuHhUWnxM07mHo84A7gRRmU vv1rqSjuwGPAwPkDpk1mDeXMktEYCOcXMfOuuw3EymnILC/GzY4YKp2Mr2ivqgpnX6gpgh cW7RfO/uUbIYN8gxgusvmsK97fn2LeFwC+jH+135JHZpUC4y3vSrcXpYdfghtdroJH7f2d U4sB3KtI5X1wVmt/meDEZdsVepJu9IuDH0EkWolXTszLsNYLuvplOvf7qDEfzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759163700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T2AZBhmYE/8ntZPUT6E3bE/Shh2ZORSoAHii19aeJQ8=; b=lMXGEB35bKojZ3Q1wblG80G3gVWaNtH93JN54y1Bxa31+k5WTcrhLT7rsY8LDahTEHnDJc aD41zfGf7P5RO2saF95x43qohSjrERu4JwoRu8Nv8yiKGeBL4JgwawpnI/cDrid4UClqYi OWS+7y9KKD6eAHe89Vd9zp9IiOVUzpJDrlrqNKF2Ss8fjju3XGUwmPh9eqS5JX0JXqBmLB CMGE17CsQ9suOYTlE7b5+lfbqLhMGzl8qeIEErGmuE+2WjuKUjQdr+DvsUpRQ8di4y4L7v zmmQIutbGYYoZaO2Gr+bElYW5VmqzubUsoZwDSwbg+2XbdLo5oWJZhlFIKdaRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759163700; a=rsa-sha256; cv=none; b=qjC2dvzGXE9i1QZLLflcACJyAUEyVZa+WlkXTOZXdOIfOF18Wgx0bxk3LMaeaRFvT66Fb8 SUR5s98lJ3jppD2+xp0915gMjFuXD7FtqkTSOViSBXc4oTlgqfO2X+JBWapbCgJZuuaWHj +7n8sfgo6VvYySWKIWUYGqaRql54KFkAG3PghGl3eW3pjutnhtlDXjfb6RWScCgX9IH/BG HPg9xst0eNEKDQ5yn05LjkS/5BApMWhGVbTAVCOv+nVYInvzE9PaPXv6vqJO5yzryFs2iL UsZ7KJlvWyTzbWN4n73BN3PeMiim7bZ2FiOVEugujcvZ59rs2sNeHAX+Glbpkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb6H76SFZz1CRw; Mon, 29 Sep 2025 16:34:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TGYxem045688; Mon, 29 Sep 2025 16:34:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TGYx5R045685; Mon, 29 Sep 2025 16:34:59 GMT (envelope-from git) Date: Mon, 29 Sep 2025 16:34:59 GMT Message-Id: <202509291634.58TGYx5R045685@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: e02003bce726 - main - openssh: blocklist: Use NetBSD probes 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: e02003bce726333872d65b7b9a1557d97b6d91a0 Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=e02003bce726333872d65b7b9a1557d97b6d91a0 commit e02003bce726333872d65b7b9a1557d97b6d91a0 Author: Jose Luis Duran AuthorDate: 2025-09-29 16:32:36 +0000 Commit: Jose Luis Duran CommitDate: 2025-09-29 16:32:36 +0000 openssh: blocklist: Use NetBSD probes Use NetBSD probe locations for consistency. We have submitted all improved or missing probes, keeping them synchronized with NetBSD (our blocklist upstream) should simplify upgrades and maintenance, as the locations of these probes are a moving target, depending on upstream OpenSSH changes. Additionally, use BLACKLIST_AUTH_FAIL exclusively for now. At the time of this commit BLACKLIST_BAD_USER, is a no-op. However, it will change in a future upgrade. Also, enhance blacklist notification messages for better debugging by making them more descriptive. Reviewed by: emaste Approved by: emaste (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52749 --- crypto/openssh/auth-pam.c | 4 ++-- crypto/openssh/auth.c | 6 ++++-- crypto/openssh/auth2.c | 5 +---- crypto/openssh/monitor.c | 14 ++++++++++++-- crypto/openssh/packet.c | 2 -- crypto/openssh/sshd-session.c | 15 +++++++++++---- 6 files changed, 30 insertions(+), 16 deletions(-) diff --git a/crypto/openssh/auth-pam.c b/crypto/openssh/auth-pam.c index f95f6abbcbe0..df08dbd99a9d 100644 --- a/crypto/openssh/auth-pam.c +++ b/crypto/openssh/auth-pam.c @@ -937,8 +937,8 @@ sshpam_query(void *ctx, char **name, char **info, sshbuf_free(buffer); return (0); } - BLACKLIST_NOTIFY(NULL, BLACKLIST_BAD_USER, - sshpam_authctxt->user); + BLACKLIST_NOTIFY(NULL, BLACKLIST_AUTH_FAIL, + "PAM illegal user"); error("PAM: %s for %s%.100s from %.100s", msg, sshpam_authctxt->valid ? "" : "illegal user ", sshpam_authctxt->user, sshpam_rhost); diff --git a/crypto/openssh/auth.c b/crypto/openssh/auth.c index 961082b76667..0a1c8f71b390 100644 --- a/crypto/openssh/auth.c +++ b/crypto/openssh/auth.c @@ -289,7 +289,8 @@ auth_log(struct ssh *ssh, int authenticated, int partial, else { authmsg = authenticated ? "Accepted" : "Failed"; if (authenticated) - BLACKLIST_NOTIFY(ssh, BLACKLIST_AUTH_OK, "ssh"); + BLACKLIST_NOTIFY(ssh, BLACKLIST_AUTH_OK, + "Authenticated"); } if ((extra = format_method_key(authctxt)) == NULL) { @@ -338,6 +339,7 @@ auth_maxtries_exceeded(struct ssh *ssh) { Authctxt *authctxt = (Authctxt *)ssh->authctxt; + BLACKLIST_NOTIFY(ssh, BLACKLIST_AUTH_FAIL, "Maximum attempts exceeded"); error("maximum authentication attempts exceeded for " "%s%.100s from %.200s port %d ssh2", authctxt->valid ? "" : "invalid user ", @@ -498,7 +500,7 @@ getpwnamallow(struct ssh *ssh, const char *user) aix_restoreauthdb(); #endif if (pw == NULL) { - BLACKLIST_NOTIFY(ssh, BLACKLIST_BAD_USER, user); + BLACKLIST_NOTIFY(ssh, BLACKLIST_AUTH_FAIL, "Invalid user"); logit("Invalid user %.100s from %.100s port %d", user, ssh_remote_ipaddr(ssh), ssh_remote_port(ssh)); #ifdef CUSTOM_FAILED_LOGIN diff --git a/crypto/openssh/auth2.c b/crypto/openssh/auth2.c index eac1d26a4aaf..82f6e6211259 100644 --- a/crypto/openssh/auth2.c +++ b/crypto/openssh/auth2.c @@ -52,7 +52,6 @@ #include "dispatch.h" #include "pathnames.h" #include "ssherr.h" -#include "blacklist_client.h" #ifdef GSSAPI #include "ssh-gss.h" #endif @@ -443,10 +442,8 @@ userauth_finish(struct ssh *ssh, int authenticated, const char *packet_method, } else { /* Allow initial try of "none" auth without failure penalty */ if (!partial && !authctxt->server_caused_failure && - (authctxt->attempt > 1 || strcmp(method, "none") != 0)) { + (authctxt->attempt > 1 || strcmp(method, "none") != 0)) authctxt->failures++; - BLACKLIST_NOTIFY(ssh, BLACKLIST_AUTH_FAIL, "ssh"); - } if (authctxt->failures >= options.max_authtries) { #ifdef SSH_AUDIT_EVENTS mm_audit_event(ssh, SSH_LOGIN_EXCEED_MAXTRIES); diff --git a/crypto/openssh/monitor.c b/crypto/openssh/monitor.c index 2179553d3401..b826ecdb9065 100644 --- a/crypto/openssh/monitor.c +++ b/crypto/openssh/monitor.c @@ -85,6 +85,8 @@ #include "misc.h" #include "servconf.h" #include "monitor.h" +#include "blacklist_client.h" + #ifdef GSSAPI #include "ssh-gss.h" #endif @@ -353,16 +355,24 @@ monitor_child_preauth(struct ssh *ssh, struct monitor *pmonitor) } } if (authctxt->failures > options.max_authtries) { + BLACKLIST_NOTIFY(ssh, BLACKLIST_AUTH_FAIL, + "Too many authentication attempts"); /* Shouldn't happen */ fatal_f("privsep child made too many authentication " "attempts"); } } - if (!authctxt->valid) + if (!authctxt->valid) { + BLACKLIST_NOTIFY(ssh, BLACKLIST_AUTH_FAIL, + "Authenticated invalid user"); fatal_f("authenticated invalid user"); - if (strcmp(auth_method, "unknown") == 0) + } + if (strcmp(auth_method, "unknown") == 0) { + BLACKLIST_NOTIFY(ssh, BLACKLIST_AUTH_FAIL, + "Authentication method name unknown"); fatal_f("authentication method name unknown"); + } debug_f("user %s authenticated by privileged process", authctxt->user); auth_attempted = 0; diff --git a/crypto/openssh/packet.c b/crypto/openssh/packet.c index cc114c837e31..9dea2cfc5188 100644 --- a/crypto/openssh/packet.c +++ b/crypto/openssh/packet.c @@ -96,7 +96,6 @@ #include "packet.h" #include "ssherr.h" #include "sshbuf.h" -#include "blacklist_client.h" #ifdef PACKET_DEBUG #define DBG(x) x @@ -2022,7 +2021,6 @@ sshpkt_vfatal(struct ssh *ssh, int r, const char *fmt, va_list ap) case SSH_ERR_NO_KEX_ALG_MATCH: case SSH_ERR_NO_HOSTKEY_ALG_MATCH: if (ssh->kex && ssh->kex->failed_choice) { - BLACKLIST_NOTIFY(ssh, BLACKLIST_AUTH_FAIL, "ssh"); ssh_packet_clear_keys(ssh); errno = oerrno; logdie("Unable to negotiate with %s: %s. " diff --git a/crypto/openssh/sshd-session.c b/crypto/openssh/sshd-session.c index 902718524279..62c76cc1c8aa 100644 --- a/crypto/openssh/sshd-session.c +++ b/crypto/openssh/sshd-session.c @@ -217,6 +217,8 @@ mm_is_monitor(void) static void grace_alarm_handler(int sig) { + BLACKLIST_NOTIFY(the_active_state, BLACKLIST_AUTH_FAIL, + "Grace period expired"); /* * Try to kill any processes that we have spawned, E.g. authorized * keys command helpers or privsep children. @@ -1201,6 +1203,8 @@ main(int ac, char **av) ssh_signal(SIGCHLD, SIG_DFL); ssh_signal(SIGINT, SIG_DFL); + BLACKLIST_INIT(); + /* * Register our connection. This turns encryption off because we do * not have a key. @@ -1277,8 +1281,10 @@ main(int ac, char **av) } if ((r = kex_exchange_identification(ssh, -1, - options.version_addendum)) != 0) + options.version_addendum)) != 0) { + BLACKLIST_NOTIFY(ssh, BLACKLIST_AUTH_FAIL, "Banner exchange"); sshpkt_fatal(ssh, r, "banner exchange"); + } ssh_packet_set_nonblocking(ssh); @@ -1298,8 +1304,6 @@ main(int ac, char **av) fatal("sshbuf_new loginmsg failed"); auth_debug_reset(); - BLACKLIST_INIT(); - if (privsep_preauth(ssh) != 1) fatal("privsep_preauth failed"); @@ -1425,7 +1429,10 @@ cleanup_exit(int i) audit_event(the_active_state, SSH_CONNECTION_ABANDON); #endif /* Override default fatal exit value when auth was attempted */ - if (i == 255 && auth_attempted) + if (i == 255 && auth_attempted) { + BLACKLIST_NOTIFY(the_active_state, BLACKLIST_AUTH_FAIL, + "Fatal exit"); _exit(EXIT_AUTH_ATTEMPTED); + } _exit(i); } From nobody Mon Sep 29 17:06:28 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 4cb6zT0pt6z68W64; Mon, 29 Sep 2025 17:06:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb6zS6w2Mz3RWG; Mon, 29 Sep 2025 17:06:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759165589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h4dINlPKIUurIiL/cyeHnZ9ECqwE5ozz8Kf84tiKnJA=; b=wG+4ya4kEdNWiPn78Udg90qjYIcoHUBAbeUS/87d9XmS+QtwnTWsrzJMoeN+QcG2yYxgW9 NAuuBdnm9PHqBzC9xc9SSNUydwl5loOmlw/dTOEL2Pf7ro7RXcVDFlpASHiQiT54R3ZrVy d0C7ufVTzfDkpMmn+KywwWAj2CDYZotooMOPxvzobYfA4pwD2DsrSwfnrPABVSlr04m+5c 3XPoviJdMWUSv/L6MEwZX3zPZNW/DubBQFz2+oiC2h2QIo+QsoEW1QMwLECdAWk5P3x/vi P284Ajs0HS4pEQmKJpQdM7AKF+lrnEGv51hiGE67BfMPuNwM9LAVQtFnY8PTSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759165589; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h4dINlPKIUurIiL/cyeHnZ9ECqwE5ozz8Kf84tiKnJA=; b=hGpXOBwNYUCrupbLKptt2xIC5E/eN434NhKChTX58cjB6kewkbc07oYYGcre3Balydpov8 CsVKtDTlkq6TjEsJ0JnDwbLFbjm5EQsSpPPPvGeeYmL0o5hDOPI1sX2s9t4klqyg+YToqk lUGzRuHqbaKMOKvKrrIhtLwbAZu3UiVAL+SFlMc3YuaG/RJ0W684S6GLznKx4689mxhkJX roSWkdPjR8csySD9nJmctzt0NQRapnxb83MsJDD0innvNnw1u8NbO3NmBMffqBUY55t2pK +DKccRw1BK9Z82O/ZL2C030lcpoGuKK5xbjb/A3Jga6kzQer3uyVrVr7Lh92tA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759165589; a=rsa-sha256; cv=none; b=xuR9R6HJa2fdnsmmZ2BMMH2borX8/RWaraS0BCcxu/S+Il0AgoMmkrwkGIy1XS4OsgR8eC 2dy02wUdVX5aLj9vTuTy8IPVhMniRlCQIg4EwWKgNCugpumMPqowYe3iju9aiLOtB4DjMd ZudzbXqSY34QS7ciqpYPcLfEvYFzCcKZNWWPccSXc6z3k+1SoqfCkjURSjzdv8UDHpaOt8 yJq1IVwY7zTRZdbdHz7CxdG7BkHz8HfvM0A4sL+79Yi5yaVCpLkb7IMbiXm8qeoRzbWvS1 nTK4h3t9WJHPW58Lw7Kjiv+x7qcNab+wN/AIel8lPR6Pt+xy2LcNSmouxS6qhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb6zS6MWyz1DYv; Mon, 29 Sep 2025 17:06:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TH6Sha003428; Mon, 29 Sep 2025 17:06:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TH6SFf003425; Mon, 29 Sep 2025 17:06:28 GMT (envelope-from git) Date: Mon, 29 Sep 2025 17:06:28 GMT Message-Id: <202509291706.58TH6SFf003425@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Tiago Gasiba Subject: git: d4cbdd9ad04a - main - committers-ports.dot: add tiga and mentors 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: tiga X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d4cbdd9ad04ab1d68046b62541b2a487e6df077e Auto-Submitted: auto-generated The branch main has been updated by tiga: URL: https://cgit.FreeBSD.org/src/commit/?id=d4cbdd9ad04ab1d68046b62541b2a487e6df077e commit d4cbdd9ad04ab1d68046b62541b2a487e6df077e Author: Tiago Gasiba AuthorDate: 2025-09-29 17:03:04 +0000 Commit: Tiago Gasiba CommitDate: 2025-09-29 17:03:04 +0000 committers-ports.dot: add tiga and mentors Onboard new ports committer Tiago Gasiba (tiga) in accordance with step 5 of sec. 7.1 committer's guide PR: 289889 Approved by: eduardo, flo (mentors) --- share/misc/committers-ports.dot | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/misc/committers-ports.dot b/share/misc/committers-ports.dot index fb6c168f1425..81870cf98af5 100644 --- a/share/misc/committers-ports.dot +++ b/share/misc/committers-ports.dot @@ -292,6 +292,7 @@ tagattie [label="Hiroki Tagato\ntagattie@FreeBSD.org\n2020/04/01"] tcberner [label="Tobias C. Berner\ntcberner@FreeBSD.org\n2016/07/06"] tdb [label="Tim Bishop\ntdb@FreeBSD.org\n2005/11/30"] thierry [label="Thierry Thomas\nthierry@FreeBSD.org\n2004/03/15"] +tiga [label="Tiago Gasiba\ntiga@FreeBSD.org\n2025/09/28"] tijl [label="Tijl Coosemans\ntijl@FreeBSD.org\n2013/03/27"] timur [label="Timur Bakeyev\ntimur@FreeBSD.org\n2007/06/07"] tobik [label="Tobias Kortkamp\ntobik@FreeBSD.org\n2017/02/08"] @@ -448,6 +449,7 @@ eadler -> tj eadler -> vg eduardo -> fuz +eduardo -> tiga edwin -> cperciva edwin -> erwin @@ -487,6 +489,7 @@ flo -> fuz flo -> jase flo -> jbeich flo -> grembo +flo -> tiga fluffy -> vishwin From nobody Mon Sep 29 17:34: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 4cb7bY6s9fz68YYd; Mon, 29 Sep 2025 17:34: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 4cb7bY6Z5Dz3W77; Mon, 29 Sep 2025 17:34:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759167257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7y9v7dpIpGCIIfiOTgl58kUS5kaIpR4NfyA6fSd3cJU=; b=cK/xw8DWIpSc2Iods/GzCKVGQ2M4m7l1pKbXl+sIJ9U/vADIRBjzgOlwM0S/WW57lROHXS Q0648z9E7SaiuZZzpuh7svPhWDzrVCIGxgB+xDAbKesR1KcNp66Ub3jT/EPiBaHyxtB1HN GouyUR8CkFLSQK7NGM5ahqb0taK9AvV+dxCPKDjR1BNOtEdftUEabpRfFc8Wd3JTkoBNrG MzGxO/ORS1Dv3Et7VS06XwO4IesrmDS7pM81h1owDiGmcv+y9B+Zl0bnDQl1uwaip9X4ry Wt7tgmtwBaK33jlcbQaFB2tCU9GijkR0JLoE2SguXQECqN387knhdTvyqW8yAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759167257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7y9v7dpIpGCIIfiOTgl58kUS5kaIpR4NfyA6fSd3cJU=; b=TMQ+DmolOGcFAbAfin+yr1vqKry5nPc+gEBXzAeqGzK6TPO/CGxtB1W58uwfpBbtg+Cr2P E7LrpyZfyTrgTO7kTE4bTZoLAaeivzdSkHuZmufdH9OQ65Yn7nD6O5ZYDA964imhKdgW4H YZJGIk4375nP4k+Rb64fkMmEl+Etkw+5wwubCYl7zwgFXwlc2LPG7IzxWSY4TJICbNqkk6 2QBx0JSrYVjnXUXibyK2xMTPDcUoDTevEAIImvfSdNFuGcMNroPyqFQrUXQ7yf0YAG0AtC KMcq9WoeLhFZz4lq7wVXI1KtDZHDb23+ZPTLenL09fEODayW7f5WQJXRxl7JFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759167257; a=rsa-sha256; cv=none; b=HrCdDwi73ClFRjGZGmOKXXYsv3ZYbOJrFrTykmairGpnNbfMH3VRrPlfyYiWGR4+a0LA5u GalYUxV6wI4Uxs9sIjyTkSg9Figkh84Uc/ONrB4gflFZdlErWQPpKjOIEyh/WvAyZ+eHDU DiKnvsJJdzLlzQZRYFyuC5Vid+kXwtK9KBZq0ZsJkLLEbPoewn0UGn0eA08rSZoI1qu+q4 bJQ4aqZuf3yW9XWnyo+gxbxv1hb2B4OMNAa4VpiwR8NFg6eUvTAfFVxVsCNmUeorrnHxd2 fPc8o2VvYola5W+RQVW2qTmPSv3netKNWF5EKpHkzTXrL03vPuAuU9pZuOge0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb7bY67Swz1FG1; Mon, 29 Sep 2025 17:34:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58THYHAp059657; Mon, 29 Sep 2025 17:34:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58THY9VL059625; Mon, 29 Sep 2025 17:34:09 GMT (envelope-from git) Date: Mon, 29 Sep 2025 17:34:09 GMT Message-Id: <202509291734.58THY9VL059625@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 59fc2b0166f7 - main - mandoc: Vendor import of upstream at 2025-09-26 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: 59fc2b0166f71c791113379d16b8cef7039f289d Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=59fc2b0166f71c791113379d16b8cef7039f289d commit 59fc2b0166f71c791113379d16b8cef7039f289d Merge: d4cbdd9ad04a 5fe5b2ed2d88 Author: Alexander Ziaee AuthorDate: 2025-09-29 17:31:38 +0000 Commit: Alexander Ziaee CommitDate: 2025-09-29 17:31:38 +0000 mandoc: Vendor import of upstream at 2025-09-26 Interesting changes: + mandoc db: Improve case sorting, found by our very own markj + history: Add macros for version 8 and 10 AT&T Unix + linter: Warn on blank lines in man(7) like mdoc(7) + manuals: Improve precision, man(7) syntax table, and roff(7) specifics + manuals: Fix PDF/PS footer regression detailed in our PR: 289786 PR: 289786 MFC after: 3 days contrib/mandoc/Makefile | 2 +- contrib/mandoc/dba.c | 7 +++--- contrib/mandoc/main.c | 52 +++++++++----------------------------------- contrib/mandoc/man.c | 3 ++- contrib/mandoc/man.options.1 | 35 +++++++++++++++++++++++++---- contrib/mandoc/mandoc.1 | 16 ++++++++------ contrib/mandoc/mdoc.7 | 35 +++++++++++++++++++---------- contrib/mandoc/roff_term.c | 2 +- contrib/mandoc/term_ps.c | 6 ++--- 9 files changed, 84 insertions(+), 74 deletions(-) diff --cc contrib/mandoc/Makefile index 0830c9f289a3,000000000000..d4a2c794b437 mode 100644,000000..100644 --- a/contrib/mandoc/Makefile +++ b/contrib/mandoc/Makefile @@@ -1,618 -1,0 +1,618 @@@ +# $Id: Makefile,v 1.543 2023/10/19 11:45:42 schwarze Exp $ +# +# Copyright (c) 2011, 2013-2022 Ingo Schwarze +# Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + - VERSION = 1.14.6s20250727 ++VERSION = 1.14.6s20250926 + +# === LIST OF FILES ==================================================== + +TESTSRCS = test-attribute.c \ + test-be32toh.c \ + test-cmsg.c \ + test-dirent-namlen.c \ + test-EFTYPE.c \ + test-err.c \ + test-fts.c \ + test-getline.c \ + test-getsubopt.c \ + test-isblank.c \ + test-mkdtemp.c \ + test-mkstemps.c \ + test-nanosleep.c \ + test-noop.c \ + test-ntohl.c \ + test-O_DIRECTORY.c \ + test-ohash.c \ + test-PATH_MAX.c \ + test-pledge.c \ + test-progname.c \ + test-reallocarray.c \ + test-recallocarray.c \ + test-recvmsg.c \ + test-rewb-bsd.c \ + test-rewb-sysv.c \ + test-sandbox_init.c \ + test-strcasestr.c \ + test-stringlist.c \ + test-strlcat.c \ + test-strlcpy.c \ + test-strndup.c \ + test-strptime.c \ + test-strsep.c \ + test-strtonum.c \ + test-vasprintf.c \ + test-wchar.c + +SRCS = arch.c \ + att.c \ + catman.c \ + cgi.c \ + chars.c \ + compat_err.c \ + compat_fts.c \ + compat_getline.c \ + compat_getsubopt.c \ + compat_isblank.c \ + compat_mkdtemp.c \ + compat_mkstemps.c \ + compat_ohash.c \ + compat_progname.c \ + compat_reallocarray.c \ + compat_recallocarray.c \ + compat_strcasestr.c \ + compat_stringlist.c \ + compat_strlcat.c \ + compat_strlcpy.c \ + compat_strndup.c \ + compat_strsep.c \ + compat_strtonum.c \ + compat_vasprintf.c \ + dba.c \ + dba_array.c \ + dba_read.c \ + dba_write.c \ + dbm.c \ + dbm_map.c \ + demandoc.c \ + eqn.c \ + eqn_html.c \ + eqn_term.c \ + html.c \ + lib.c \ + main.c \ + man.c \ + man_html.c \ + man_macro.c \ + man_term.c \ + man_validate.c \ + mandoc.c \ + mandoc_aux.c \ + mandoc_dbg.c \ + mandoc_msg.c \ + mandoc_ohash.c \ + mandoc_xr.c \ + mandocd.c \ + mandocdb.c \ + manpath.c \ + mansearch.c \ + mdoc.c \ + mdoc_argv.c \ + mdoc_html.c \ + mdoc_macro.c \ + mdoc_man.c \ + mdoc_markdown.c \ + mdoc_state.c \ + mdoc_term.c \ + mdoc_validate.c \ + msec.c \ + out.c \ + preconv.c \ + read.c \ + roff.c \ + roff_escape.c \ + roff_html.c \ + roff_term.c \ + roff_validate.c \ + soelim.c \ + st.c \ + tag.c \ + tbl.c \ + tbl_data.c \ + tbl_html.c \ + tbl_layout.c \ + tbl_opts.c \ + tbl_term.c \ + term.c \ + term_ascii.c \ + term_ps.c \ + term_tab.c \ + term_tag.c \ + tree.c + +DISTFILES = INSTALL \ + LICENSE \ + Makefile \ + Makefile.depend \ + NEWS \ + TODO \ + apropos.1 \ + catman.8 \ + cgi.h.example \ + compat_fts.h \ + compat_ohash.h \ + compat_stringlist.h \ + configure \ + configure.local.example \ + dba.h \ + dba_array.h \ + dba_write.h \ + dbm.h \ + dbm_map.h \ + demandoc.1 \ + eqn.7 \ + eqn.h \ + eqn_parse.h \ + gmdiff \ + html.h \ + lib.in \ + libman.h \ + libmandoc.h \ + libmdoc.h \ + main.h \ + makewhatis.8 \ + man.1 \ + man.7 \ + man.cgi.3 \ + man.cgi.8 \ + man.conf.5 \ + man.h \ + man.options.1 \ + manconf.h \ + mandoc.1 \ + mandoc.3 \ + mandoc.css \ + mandoc.db.5 \ + mandoc.h \ + mandoc_aux.h \ + mandoc_char.7 \ + mandoc_dbg.h \ + mandoc_dbg_init.3 \ + mandoc_escape.3 \ + mandoc_headers.3 \ + mandoc_html.3 \ + mandoc_malloc.3 \ + mandoc_ohash.h \ + mandoc_parse.h \ + mandoc_xr.h \ + mandocd.8 \ + mansearch.3 \ + mansearch.h \ + mchars_alloc.3 \ + mdoc.7 \ + mdoc.h \ + msec.in \ + out.h \ + predefs.in \ + roff.7 \ + roff.h \ + roff_int.h \ + soelim.1 \ + tag.h \ + tbl.3 \ + tbl.7 \ + tbl.h \ + tbl_int.h \ + tbl_parse.h \ + term.h \ + term_tag.h \ + $(SRCS) \ + $(TESTSRCS) + +LIBMAN_OBJS = man.o \ + man_macro.o \ + man_validate.o + +LIBMDOC_OBJS = att.o \ + lib.o \ + mdoc.o \ + mdoc_argv.o \ + mdoc_macro.o \ + mdoc_state.o \ + mdoc_validate.o \ + st.o + +LIBROFF_OBJS = eqn.o \ + roff.o \ + roff_escape.o \ + roff_validate.o \ + tbl.o \ + tbl_data.o \ + tbl_layout.o \ + tbl_opts.o + +LIBMANDOC_OBJS = $(LIBMAN_OBJS) \ + $(LIBMDOC_OBJS) \ + $(LIBROFF_OBJS) \ + $(DEBUG_OBJS) \ + arch.o \ + chars.o \ + mandoc.o \ + mandoc_aux.o \ + mandoc_msg.o \ + mandoc_ohash.o \ + mandoc_xr.o \ + msec.o \ + preconv.o \ + read.o \ + tag.o + +ALL_COBJS = compat_err.o \ + compat_fts.o \ + compat_getline.o \ + compat_getsubopt.o \ + compat_isblank.o \ + compat_mkdtemp.o \ + compat_mkstemps.o \ + compat_ohash.o \ + compat_progname.o \ + compat_reallocarray.o \ + compat_recallocarray.o \ + compat_strcasestr.o \ + compat_stringlist.o \ + compat_strlcat.o \ + compat_strlcpy.o \ + compat_strndup.o \ + compat_strsep.o \ + compat_strtonum.o \ + compat_vasprintf.o + +MANDOC_HTML_OBJS = eqn_html.o \ + html.o \ + man_html.o \ + mdoc_html.o \ + roff_html.o \ + tbl_html.o + +MANDOC_TERM_OBJS = eqn_term.o \ + man_term.o \ + mdoc_term.o \ + roff_term.o \ + term.o \ + term_ascii.o \ + term_ps.o \ + term_tab.o \ + term_tag.o \ + tbl_term.o + +DBM_OBJS = dbm.o \ + dbm_map.o \ + mansearch.o + +DBA_OBJS = dba.o \ + dba_array.o \ + dba_read.o \ + dba_write.o \ + mandocdb.o + +MAIN_OBJS = $(MANDOC_HTML_OBJS) \ + $(MANDOC_MAN_OBJS) \ + $(MANDOC_TERM_OBJS) \ + $(DBM_OBJS) \ + $(DBA_OBJS) \ + main.o \ + manpath.o \ + mdoc_man.o \ + mdoc_markdown.o \ + out.o \ + tree.o + +CGI_OBJS = $(MANDOC_HTML_OBJS) \ + $(DBM_OBJS) \ + cgi.o \ + out.o + +MANDOCD_OBJS = $(MANDOC_HTML_OBJS) \ + $(MANDOC_TERM_OBJS) \ + mandocd.o \ + out.o + +DEMANDOC_OBJS = demandoc.o + +WWW_MANS = apropos.1.html \ + demandoc.1.html \ + man.1.html \ + man.options.1.html \ + mandoc.1.html \ + soelim.1.html \ + man.cgi.3.html \ + mandoc.3.html \ + mandoc_dbg_init.3.html \ + mandoc_escape.3.html \ + mandoc_headers.3.html \ + mandoc_html.3.html \ + mandoc_malloc.3.html \ + mansearch.3.html \ + mchars_alloc.3.html \ + tbl.3.html \ + man.conf.5.html \ + mandoc.db.5.html \ + eqn.7.html \ + man.7.html \ + mandoc_char.7.html \ + mdoc.7.html \ + roff.7.html \ + tbl.7.html \ + catman.8.html \ + makewhatis.8.html \ + man.cgi.8.html \ + mandocd.8.html + +WWW_INCS = eqn.h.html \ + html.h.html \ + man.h.html \ + manconf.h.html \ + mandoc.h.html \ + mandoc_aux.h.html \ + mandoc_parse.h.html \ + mansearch.h.html \ + mdoc.h.html \ + roff.h.html \ + tbl.h.html \ + tbl_int.h.html \ + tbl_parse.h.html + +# === USER CONFIGURATION =============================================== + +include Makefile.local + +# === DEPENDENCY HANDLING ============================================== + +all: mandoc man demandoc soelim $(BUILD_TARGETS) Makefile.local + +install: base-install $(INSTALL_TARGETS) + +www: $(WWW_MANS) $(WWW_INCS) + +$(WWW_MANS) $(WWW_INCS): mandoc + +.PHONY: base-install cgi-install install www-install +.PHONY: clean distclean depend + +include Makefile.depend + +# === TARGETS CONTAINING SHELL COMMANDS ================================ + +distclean: clean + rm -f Makefile.local config.h config.h.old config.log config.log.old + +clean: + rm -f libmandoc.a $(LIBMANDOC_OBJS) $(ALL_COBJS) + rm -f mandoc man $(MAIN_OBJS) + rm -f man.cgi $(CGI_OBJS) + rm -f mandocd catman catman.o $(MANDOCD_OBJS) + rm -f demandoc $(DEMANDOC_OBJS) + rm -f soelim soelim.o + rm -f $(WWW_MANS) $(WWW_INCS) mandoc*.tar.gz mandoc*.sha256 + rm -f Makefile.tmp1 Makefile.tmp2 + rm -rf *.dSYM + +base-install: mandoc demandoc soelim + mkdir -p $(DESTDIR)$(BINDIR) + mkdir -p $(DESTDIR)$(SBINDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man1 + mkdir -p $(DESTDIR)$(MANDIR)/man5 + mkdir -p $(DESTDIR)$(MANDIR)/man7 + mkdir -p $(DESTDIR)$(MANDIR)/man8 + mkdir -p $(DESTDIR)$(MISCDIR) + $(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR) + $(INSTALL_PROGRAM) soelim $(DESTDIR)$(BINDIR)/$(BINM_SOELIM) + cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_MAN) + cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_APROPOS) + cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_WHATIS) + cd $(DESTDIR)$(SBINDIR) && \ + $(LN) ${BIN_FROM_SBIN}/mandoc $(BINM_MAKEWHATIS) + $(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1 + $(INSTALL_MAN) soelim.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1 + $(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 + $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 + cd $(DESTDIR)$(MANDIR)/man1 && $(LN) $(BINM_APROPOS).1 $(BINM_WHATIS).1 + $(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5 + $(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5 + $(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7 + $(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7 + $(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7 + $(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7 + $(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7 + $(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7 + $(INSTALL_MAN) makewhatis.8 \ + $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8 + $(INSTALL_DATA) mandoc.css $(DESTDIR)$(MISCDIR) + +lib-install: libmandoc.a + mkdir -p $(DESTDIR)$(LIBDIR) + mkdir -p $(DESTDIR)$(INCLUDEDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man3 + $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR) + $(INSTALL_LIB) eqn.h man.h mandoc.h mandoc_aux.h mandoc_parse.h \ + mdoc.h roff.h tbl.h $(DESTDIR)$(INCLUDEDIR) + $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \ + mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3 + +cgi-install: man.cgi + mkdir -p $(DESTDIR)$(CGIBINDIR) + mkdir -p $(DESTDIR)$(HTDOCDIR) + $(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR) + $(INSTALL_DATA) mandoc.css $(DESTDIR)$(HTDOCDIR) + +catman-install: mandocd catman + mkdir -p $(DESTDIR)$(SBINDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man8 + $(INSTALL_PROGRAM) mandocd $(DESTDIR)$(SBINDIR) + $(INSTALL_PROGRAM) catman $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN) + $(INSTALL_MAN) mandocd.8 $(DESTDIR)$(MANDIR)/man8 + $(INSTALL_MAN) catman.8 $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8 + +uninstall: + rm -f $(DESTDIR)$(BINDIR)/mandoc + rm -f $(DESTDIR)$(BINDIR)/demandoc + rm -f $(DESTDIR)$(BINDIR)/$(BINM_SOELIM) + rm -f $(DESTDIR)$(BINDIR)/$(BINM_MAN) + rm -f $(DESTDIR)$(BINDIR)/$(BINM_APROPOS) + rm -f $(DESTDIR)$(BINDIR)/$(BINM_WHATIS) + rm -f $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS) + rm -f $(DESTDIR)$(MANDIR)/man1/mandoc.1 + rm -f $(DESTDIR)$(MANDIR)/man1/demandoc.1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1 + rm -f $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5 + rm -f $(DESTDIR)$(MANDIR)/man5/mandoc.db.5 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7 + rm -f $(DESTDIR)$(MANDIR)/man7/mandoc_char.7 + rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8 + rm -f $(DESTDIR)$(CGIBINDIR)/man.cgi + rm -f $(DESTDIR)$(HTDOCDIR)/mandoc.css + rm -f $(DESTDIR)$(SBINDIR)/mandocd + rm -f $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN) + rm -f $(DESTDIR)$(MANDIR)/man8/mandocd.8 + rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8 + rm -f $(DESTDIR)$(LIBDIR)/libmandoc.a + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_escape.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_malloc.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mansearch.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mchars_alloc.3 + rm -f $(DESTDIR)$(MANDIR)/man3/tbl.3 + rm -f $(DESTDIR)$(INCLUDEDIR)/eqn.h + rm -f $(DESTDIR)$(INCLUDEDIR)/man.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_aux.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_parse.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mdoc.h + rm -f $(DESTDIR)$(INCLUDEDIR)/roff.h + rm -f $(DESTDIR)$(INCLUDEDIR)/tbl.h + [ ! -e $(DESTDIR)$(INCLUDEDIR) ] || rmdir $(DESTDIR)$(INCLUDEDIR) + +regress: all + cd regress && ./regress.pl + +regress-clean: + cd regress && ./regress.pl . clean + +Makefile.local config.h: configure $(TESTSRCS) + @echo "$@ is out of date; please run ./configure" + @exit 1 + +libmandoc.a: $(MANDOC_COBJS) $(LIBMANDOC_OBJS) + $(AR) rs $@ $(MANDOC_COBJS) $(LIBMANDOC_OBJS) + +mandoc: $(MAIN_OBJS) libmandoc.a + $(CC) -o $@ $(LDFLAGS) $(MAIN_OBJS) libmandoc.a $(LDADD) + +man: mandoc + $(LN) mandoc man + +man.cgi: $(CGI_OBJS) libmandoc.a + $(CC) $(STATIC) -o $@ $(LDFLAGS) $(CGI_OBJS) libmandoc.a $(LDADD) + +mandocd: $(MANDOCD_OBJS) libmandoc.a + $(CC) -o $@ $(LDFLAGS) $(MANDOCD_OBJS) libmandoc.a $(LDADD) + +catman: catman.o libmandoc.a + $(CC) -o $@ $(LDFLAGS) catman.o libmandoc.a $(LDADD) + +demandoc: $(DEMANDOC_OBJS) libmandoc.a + $(CC) -o $@ $(LDFLAGS) $(DEMANDOC_OBJS) libmandoc.a $(LDADD) + +soelim: $(SOELIM_COBJS) soelim.o + $(CC) -o $@ $(LDFLAGS) $(SOELIM_COBJS) soelim.o + +# --- maintainer targets --- + +www-install: www + $(INSTALL_DATA) mandoc.css $(HTDOCDIR) + $(INSTALL_DATA) $(WWW_MANS) $(HTDOCDIR)/man + $(INSTALL_DATA) $(WWW_INCS) $(HTDOCDIR)/includes + +depend: config.h + ./configure -depend + mkdep -f Makefile.tmp1 $(CFLAGS) $(SRCS) + perl -e 'undef $$/; $$_ = <>; s|/usr/include/\S+||g; \ + s|\\\n||g; s| +| |g; s| $$||mg; print;' \ + Makefile.tmp1 > Makefile.tmp2 + rm Makefile.tmp1 + mv Makefile.tmp2 Makefile.depend + +regress-distclean: + @find regress \ + -name '.#*' -o \ + -name '*.orig' -o \ + -name '*.rej' -o \ + -name '*.core' \ + -exec rm -i {} \; + +regress-distcheck: + @find regress ! -type d ! -type f + @find regress -type f \ + ! -path '*/CVS/*' \ + ! -name Makefile \ + ! -name Makefile.inc \ + ! -name '*.in' \ + ! -name '*.out_ascii' \ + ! -name '*.out_utf8' \ + ! -name '*.out_html' \ + ! -name '*.out_markdown' \ + ! -name '*.out_lint' \ + ! -path regress/regress.pl \ + ! -path regress/regress.pl.1 + +dist: mandoc-$(VERSION).sha256 + +mandoc-$(VERSION).sha256: mandoc-$(VERSION).tar.gz + sha256 mandoc-$(VERSION).tar.gz > $@ + +mandoc-$(VERSION).tar.gz: $(DISTFILES) + ls regress/*/*/*.mandoc_* && exit 1 || true + mkdir -p .dist/mandoc-$(VERSION)/ + $(INSTALL) -m 0644 $(DISTFILES) .dist/mandoc-$(VERSION) + cp -pR regress .dist/mandoc-$(VERSION) + find .dist/mandoc-$(VERSION)/regress \ + -type d -name CVS -print0 | xargs -0 rm -rf + chmod 755 .dist/mandoc-$(VERSION)/configure + ( cd .dist/ && tar zcf ../$@ mandoc-$(VERSION) ) + rm -rf .dist/ + +dist-install: dist + $(INSTALL_DATA) mandoc-$(VERSION).tar.gz mandoc-$(VERSION).sha256 \ + $(HTDOCDIR)/snapshots + +# === SUFFIX RULES ===================================================== + +.SUFFIXES: .1 .3 .5 .7 .8 .h +.SUFFIXES: .1.html .3.html .5.html .7.html .8.html .h.html + +.h.h.html: + highlight -I $< > $@ + +.1.1.html .3.3.html .5.5.html .7.7.html .8.8.html: + ./mandoc -Thtml -Wwarning,stop \ + -O 'style=/mandoc.css,man=/man/%N.%S.html;https://man.openbsd.org/%N.%S,includes=/includes/%I.html' \ + $< > $@ From nobody Mon Sep 29 17:38: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 4cb7h35lyfz68Yjr; Mon, 29 Sep 2025 17:38: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 4cb7h35GC9z3Wjp; Mon, 29 Sep 2025 17:38:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759167491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I81UzgxV5q5X5hiqBzWZW9P1WxgM7IruWWAJHfBX0KU=; b=MmbtCoVG8xrzQbLU+UdLobMNutCPZUZ+LbxqFOT9M7HIHH1pUR/4JnQyf2AnY0pnonpnoP MxjWjVPs0m50OUTak0BD4PpBF6FVCcTMGsoom92d9QlxbWk76PsDbMwYU55+31D4PpjGIV 6md29qmsDr9Q1HZz3krb0b/4UGJa1Ud2z4mWMd8VAKLawRETsyo0vTHzq0o/VuM6xtFjFK gPlFH8iYz5R+Kptm5l+W5kkRgh1MwNFFDCr3zZBHwXi0tsau4sTqsR8HKF0YuQI3m/GsTW Sr5lmxpvtrTOwhRgkGDd2BP1srt2PlX+Dt1rBNfVzRxQ9VT+FS3oS3NYi6vYVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759167491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I81UzgxV5q5X5hiqBzWZW9P1WxgM7IruWWAJHfBX0KU=; b=qAPhfpz3/hX2kJcuKoGNrSNz/efVymkPfyLeTJGio8Z9DiC/DWssckmO9jVuCGibGWG9Mn t965lQ7N4zwINhMKxoDrDC0MYrEPfc87ooSr/YHPii88pfHEvkl1VGndd3b3QSGQo7OC1r kW4Ve4Ico5a1eOO3ybHC2CMRUY4k0FcLgW20JBOT94JBo+uvvLwfVnrOK9MVhtmDQYLKpo ddisDK0spB7CKa9cJr4N1kkD2EWcMKnaxERdkSuv4QsPRhy58xadSyAHzOSebnnjFu6aI/ qM6diK2fpSXSX38HBELdnEeohT8qPNh93ANoRCuVeoIfAVBxJweVUnOF8YJKvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759167491; a=rsa-sha256; cv=none; b=coiqXBmzICY388+jlrq95StytbH6UWHl/cLig/ST+MkxItlHXILhsqCvfmbt9ALwxj/uDE OKvI3xPY4lwhZFcOjx9JKgadIkS1T+WK3AJeWAkKrl3mYGwCGiL7QxOemwqF70cTyveQ9r URk5lXye4UVuaWBcTKN7WLgRazKjiq+58dOT1oc/TyoslRSEzgOEV7pHzTfU9B5k+4BEOe lLr7a4/Y3FjzyMVyAj0SNhcN4zWc8djCFWczo55PkaxJhGL/8iwkx3XwQPNTmdITlD1tYf YxgU0hrDqWRUhe2ybC5dTyMmhE3vKP0N0bSGQMa3bpkcAARhXAId75Bh9r7ntA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb7h34rpRz1FBd; Mon, 29 Sep 2025 17:38:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58THcBgw060985; Mon, 29 Sep 2025 17:38:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58THcBjU060982; Mon, 29 Sep 2025 17:38:11 GMT (envelope-from git) Date: Mon, 29 Sep 2025 17:38:11 GMT Message-Id: <202509291738.58THcBjU060982@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: c5a813c9f486 - main - vfs cache: Add vn_fullpath_jail(), factor out common code List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c5a813c9f486da49551c3be2e7700ca0cb0a489a Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=c5a813c9f486da49551c3be2e7700ca0cb0a489a commit c5a813c9f486da49551c3be2e7700ca0cb0a489a Author: Olivier Certner AuthorDate: 2025-09-26 10:18:12 +0000 Commit: Olivier Certner CommitDate: 2025-09-29 17:37:08 +0000 vfs cache: Add vn_fullpath_jail(), factor out common code Introduce vn_fullpath_jail(), which returns a path to the passed vnode relative to the current jail's root. It will be used by mac_do(4) in a subsequent commit. Factor out common code between the new variant and vn_fullpath(). While here, rework the comments a bit. Add vn_fullpath_jail() to the vn_fullpath.9 manual page. While here, document all the existing public vn_fullpath*() functions. Reviewed by: kib (except latest manual page changes) MFC after: 3 days Event: EuroBSDCon 2025 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52757 --- share/man/man9/Makefile | 1 + share/man/man9/vn_fullpath.9 | 120 +++++++++++++++++++++++++++++++++++-------- sys/kern/vfs_cache.c | 52 ++++++++++++++++--- sys/sys/vnode.h | 1 + 4 files changed, 144 insertions(+), 30 deletions(-) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index d2282b3e5a80..67f3fdd2f6e5 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -2455,6 +2455,7 @@ MLINKS+=vm_page_insert.9 vm_page_remove.9 MLINKS+=vm_page_wire.9 vm_page_unwire.9 \ vm_page_wire.9 vm_page_unwire_noq.9 \ vm_page_wire.9 vm_page_wire_mapped.9 +MLINKS+=vn_fullpath.9 vn_fullpath_jail.9 MLINKS+=VOP_ACCESS.9 VOP_ACCESSX.9 MLINKS+=VOP_ATTRIB.9 VOP_GETATTR.9 \ VOP_ATTRIB.9 VOP_SETATTR.9 \ diff --git a/share/man/man9/vn_fullpath.9 b/share/man/man9/vn_fullpath.9 index 116f519ec8aa..9815abc3c86c 100644 --- a/share/man/man9/vn_fullpath.9 +++ b/share/man/man9/vn_fullpath.9 @@ -1,6 +1,13 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause .\" .\" Copyright (c) 2003 Robert N. M. Watson. .\" All rights reserved. +.\" Copyright (c) 2025 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Olivier Certner +.\" at Kumacom SARL under sponsorship from the FreeBSD +.\" Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -25,7 +32,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd June 15, 2021 +.Dd September 29, 2025 .Dt VN_FULLPATH 9 .Os .Sh NAME @@ -35,23 +42,64 @@ .In sys/param.h .In sys/vnode.h .Ft int -.Fo vn_fullpath -.Fa "struct vnode *vp" "char **retbuf" "char **freebuf" +.Fn vn_fullpath "struct vnode *vp" "char **retbuf" "char **freebuf" +.Ft int +.Fn vn_fullpath_jail "struct vnode *vp" "char **retbuf" "char **freebuf" +.Ft int +.Fn vn_fullpath_global "struct vnode *vp" "char **retbuf" "char **freebuf" +.Ft int +.Fo vn_fullpath_hardlink +.Fa "struct vnode *vp" "struct vnode *dvp" +.Fa "const char *hrdl_name" "size_t hrdl_name_length" +.Fa "char **retbuf" "char **freebuf" "size_t *buflen" .Fc .Sh DESCRIPTION The +.Fn vn_fullpath , +.Fn vn_fullpath_jail , +.Fn vn_fullpath_global +and +.Fn vn_fullpath_hardlink +functions make a +.Dq best effort +attempt at generating a string pathname for the passed vnode. +They differ in which directory the returned path is relative to, except for +.Fn vn_fullpath_hardlink +which behaves like .Fn vn_fullpath -function makes a -.Dq "best effort" -attempt to generate a string pathname for -the passed vnode; the resulting path, if any, will be relative to -the root directory of the process associated with the passed thread pointer. +in this respect and is described at the end. +.Pp The .Fn vn_fullpath -function -is implemented by inspecting the VFS name cache, and attempting to -reconstruct a path from the process root to the object. +function returns a path relative to the root directory of the process associated +with the passed thread pointer. +That root directory is either the system's or the thread's process' containing +jail's root directory, or some descendant directory of such established by some +.Xr chroot 2 +call. +The +.Fn vn_fullpath_jail +function returns a path relative to the passed thread's process' current jail's +root, ignoring intervening +.Xr chroot 2 +calls possibly made inside that jail. +The +.Fn vn_fullpath_global +function returns the full path from the system root, ignoring all jail roots and +.Xr chroot 2 +calls. +.Pp +Paths that the kernel intends to communicate to the passed user thread should +exclusively be obtained via +.Fn vn_fullpath . +Paths obtained via +.Fn vn_fullpath_jail +or +.Fn vn_fullpath_global +are only useful for specific kernel checks or auditing purposes. .Pp +All these functions are implemented by inspecting the VFS name cache, and +attempting to reconstruct a path from the process root to the object. This process is necessarily unreliable for several reasons: intermediate entries in the path may not be found in the cache; files may have more than one name (hard links), not all file systems use the name cache @@ -64,7 +112,7 @@ a vnode pointer value, or a device number and inode number. Code consuming the results of this function should anticipate (and properly handle) failure. .Pp -Its arguments are: +These functions take the following arguments: .Bl -tag -width ".Fa freebuf" .It Fa vp The vnode to search for. @@ -72,17 +120,13 @@ No need to be locked by the caller. .It Fa retbuf Pointer to a .Vt "char *" -that -.Fn vn_fullpath -may (on success) point at a newly -allocated buffer containing the resulting pathname. +that may be set (on success) to point at a newly allocated buffer containing the +resulting pathname. .It Fa freebuf Pointer to a .Vt "char *" -that -.Fn vn_fullpath -may (on success) point at a buffer -to be freed, when the caller is done with +that may be set (on success) to point at a buffer to be freed, when the caller +is done with .Fa retbuf . .El .Pp @@ -110,11 +154,43 @@ and if so, invoke .Xr free 9 with a pool type of .Dv M_TEMP . +.Pp +The +.Fn vn_fullpath_hardlink +function is a convenience wrapper which automatically appends the hardlink name +passed via arguments +.Fa hrdl_name +and +.Fa hrdl_name_length +to the result of calling +.Fn vn_fullpath +on the vnode's parent directory. +It requires the results of a prior call to +.Xr namei 9 +with flag +.Dv WANTPARENT +to be passed in the +.Fa vp +and +.Fa dvp +arguments. +Argument +.Fa buflen +must point to a valid storage containing the size of the desired buffer, which +will be reduced to +.Dv MAXPATHLEN +if in excess of it. .Sh RETURN VALUES If the vnode is successfully converted to a pathname, 0 is returned; otherwise, an error number is returned. .Sh SEE ALSO .Xr free 9 .Sh AUTHORS -This manual page was written by -.An Robert Watson Aq Mt rwatson@FreeBSD.org . +.An -nosplit +This manual page was initally written by +.An Robert Watson Aq Mt rwatson@FreeBSD.org +to describe the +.Fn vn_fullpath +function. +The descriptions of the other related functions were added by +.An Olivier Certner Aq Mt olce@FreeBSD.org . diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 13abb9171234..557e451f9a45 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -3340,12 +3340,10 @@ sys___realpathat(struct thread *td, struct __realpathat_args *uap) uap->flags, UIO_USERSPACE)); } -/* - * Retrieve the full filesystem path that correspond to a vnode from the name - * cache (if available) - */ -int -vn_fullpath(struct vnode *vp, char **retbuf, char **freebuf) +static int +vn_fullpath_up_to_pwd_vnode(struct vnode *vp, + struct vnode *(*const get_pwd_vnode)(const struct pwd *), + char **retbuf, char **freebuf) { struct pwd *pwd; char *buf; @@ -3359,11 +3357,13 @@ vn_fullpath(struct vnode *vp, char **retbuf, char **freebuf) buf = malloc(buflen, M_TEMP, M_WAITOK); vfs_smr_enter(); pwd = pwd_get_smr(); - error = vn_fullpath_any_smr(vp, pwd->pwd_rdir, buf, retbuf, &buflen, 0); + error = vn_fullpath_any_smr(vp, get_pwd_vnode(pwd), buf, retbuf, + &buflen, 0); VFS_SMR_ASSERT_NOT_ENTERED(); if (error < 0) { pwd = pwd_hold(curthread); - error = vn_fullpath_any(vp, pwd->pwd_rdir, buf, retbuf, &buflen); + error = vn_fullpath_any(vp, get_pwd_vnode(pwd), buf, retbuf, + &buflen); pwd_drop(pwd); } if (error == 0) @@ -3373,6 +3373,42 @@ vn_fullpath(struct vnode *vp, char **retbuf, char **freebuf) return (error); } +static inline struct vnode * +get_rdir(const struct pwd *pwd) +{ + return (pwd->pwd_rdir); +} + +/* + * Produce a filesystem path that starts from the current chroot directory and + * corresponds to the passed vnode, using the name cache (if available). + */ +int +vn_fullpath(struct vnode *vp, char **retbuf, char **freebuf) +{ + return (vn_fullpath_up_to_pwd_vnode(vp, get_rdir, retbuf, freebuf)); +} + +static inline struct vnode * +get_jdir(const struct pwd *pwd) +{ + return (pwd->pwd_jdir); +} + +/* + * Produce a filesystem path that starts from the current jail's root directory + * and corresponds to the passed vnode, using the name cache (if available). + * + * This function allows to ignore chroots done inside a jail (or the host), + * allowing path checks to remain unaffected by privileged or unprivileged + * chroot calls. + */ +int +vn_fullpath_jail(struct vnode *vp, char **retbuf, char **freebuf) +{ + return (vn_fullpath_up_to_pwd_vnode(vp, get_jdir, retbuf, freebuf)); +} + /* * This function is similar to vn_fullpath, but it attempts to lookup the * pathname relative to the global root mount point. This is required for the diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 6d50583dc1b3..0bf438a1b821 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -714,6 +714,7 @@ int speedup_syncer(void); int vn_vptocnp(struct vnode **vp, char *buf, size_t *buflen); int vn_getcwd(char *buf, char **retbuf, size_t *buflen); int vn_fullpath(struct vnode *vp, char **retbuf, char **freebuf); +int vn_fullpath_jail(struct vnode *vp, char **retbuf, char **freebuf); int vn_fullpath_global(struct vnode *vp, char **retbuf, char **freebuf); int vn_fullpath_hardlink(struct vnode *vp, struct vnode *dvp, const char *hdrl_name, size_t hrdl_name_length, char **retbuf, From nobody Mon Sep 29 17:38: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 4cb7h50GsQz68Yq2; Mon, 29 Sep 2025 17:38: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 4cb7h46hQDz3Wwc; Mon, 29 Sep 2025 17:38:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759167493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=en0iuLTEt4AnoeBl+hhfz/p1q7ARLHLJSrFW41oRW5U=; b=LHFTpj9cilIhff7RB2UrL14iXkxGxgM9A3C9sqxv2sqjknqvvrJFRlvyQCglRYOCWFY9Ho Nm7iEM3gba+FyRsAN8WOBGfZ9d7o3LqYbsa4vhPaTxYtwjY1SsqiAStb9YjZnYZbY+Z4bR MNcPguykaNWt0yu4JJ5VSack7BmL+Vh8H8R0ibxcgWoIS3cUM4Y9/95zXMyh5ZPi0RgVap bfqWtXoIi19+xfPaj38oc3c+wpbMnC2Z26YbUYbHmmkEYcN4H4sUcPgwCchA6d623/NPi7 mWeDeuh7jF5K0aDnZSBXt/L5+KvWgUD/yFc86Dcd7w3AMIr0W/YjUSklnEks0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759167493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=en0iuLTEt4AnoeBl+hhfz/p1q7ARLHLJSrFW41oRW5U=; b=L2EcKG4miMd1PjUGroBOGVXbl8utirlVOofpTdD5HwR8ZgG3jTZl9tJ5o6khGMgAOL8U6s HoNyume1/12W9hBG15PRaT3xDDU6ZT1IIvl3Qg50eIjomfjFB4Ty3/mdFXNIOO3qLhwWW6 1KW88vupxMvJEJONrljvBwnnct97ZVU1zFvv4zhqrcP1b37jEe7Uboz5sQ6adkiuUwikq2 xqiV3JJ3nkCfTCfkQPCmJKX0WiuF8yF5Z3eRg6E4aS+q3lRea7DUuo7xXygoc4dxrU9YBm V6TKDzsxBfM1XHXLP7v2Kk4sHXOij6cjcUAco6BWMV96OxyvLCJxXVoku56Inw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759167493; a=rsa-sha256; cv=none; b=mbCrxTdWWz6kvjPWHrGrtWrtgBFCX+9xewqF+0hczDp0FRkuGnhT7IpIjwmiNjV3m3NXel ZNskf8iCHljddh8VZ1U4rODbDCf7wS8G4DlwN1hKhhQc8SQltG6lSN3Mnn56cs5tHWXFnm ztq7fV9/LiIVmNiGNgS947OehTkVS2w+MZNd5NFvbu1TU/za2V43/nete4CvX5vLdahxiM ovDMXBkyegzCbapBCzf4tFTBQf7U4CV/foxWrlwbPqnlsV0aaXdUvidyiPlsy9fWOWIBL+ qVDc4dndhZ2mavNPZStUMMxobcr/JhNzy5UzfXrOzE39220rWYWwXuF/Q0dWWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb7h45njzz1DtD; Mon, 29 Sep 2025 17:38:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58THcCax061018; Mon, 29 Sep 2025 17:38:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58THcCqC061015; Mon, 29 Sep 2025 17:38:12 GMT (envelope-from git) Date: Mon, 29 Sep 2025 17:38:12 GMT Message-Id: <202509291738.58THcCqC061015@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 9f269a0a771a - main - MAC/do: Check executable path from the current jail's root 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9f269a0a771aff4f0a735211907a52c52fc0661b Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=9f269a0a771aff4f0a735211907a52c52fc0661b commit 9f269a0a771aff4f0a735211907a52c52fc0661b Author: Olivier Certner AuthorDate: 2025-09-27 09:56:33 +0000 Commit: Olivier Certner CommitDate: 2025-09-29 17:37:12 +0000 MAC/do: Check executable path from the current jail's root Contrary to my initial belief, vn_fullpath() does return a vnode's path from the current chroot, and not from the global root (which would have been a bug also, but without security consequences). This enables a "confused deputy"-like scenario where a chroot(2) can change which executable can be authorized by MAC/do, which is even more problematic for unprivileged chroot(2). This was found by re-examining the code following two close events: 1. Shawn Webb sent a mail to freebsd-hackers@ on 08/05 saying that in HardenedBSD they had added a check on P2_NO_NEW_PRIVS (in mac_do_priv_grant()), which I responded to on 08/20 saying that P2_NO_NEW_PRIVS was not necessary for mac_do(4), with a correct reasoning but based on the wrong above-mentioned assumption about vn_fullpath(). 2. I reviewed some code by Kushagra Srivastava (GSoC 2025 student working on mac_do(4)/mdo(1)) adding the ability to specify which executables can spawn processes that mac_do(4) may decide to authorize (others are simply ignored), which currently is hardcoded to '/usr/bin/mdo'. MFC after: 3 days Event: EuroBSDCon 2025 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52758 --- sys/security/mac_do/mac_do.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c index 6f3e63d06198..2bcff7bba973 100644 --- a/sys/security/mac_do/mac_do.c +++ b/sys/security/mac_do/mac_do.c @@ -1992,6 +1992,10 @@ check_proc(void) /* * Only grant privileges if requested by the right executable. * + * As MAC/do configuration is per-jail, in order to avoid confused + * deputy situations in chroots (privileged or unprivileged), make sure + * to check the path from the current jail's root. + * * XXXOC: We may want to base this check on a tunable path and/or * a specific MAC label. Going even further, e.g., envisioning to * completely replace the path check with the latter, we would need to @@ -2003,7 +2007,7 @@ check_proc(void) * setting a MAC label per file (perhaps via additions to mtree(1)). So * this probably isn't going to happen overnight, if ever. */ - if (vn_fullpath(curproc->p_textvp, &path, &to_free) != 0) + if (vn_fullpath_jail(curproc->p_textvp, &path, &to_free) != 0) return (EPERM); error = strcmp(path, "/usr/bin/mdo") == 0 ? 0 : EPERM; free(to_free, M_TEMP); From nobody Mon Sep 29 17:49:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cb7xg0ZZLz68Zr7; Mon, 29 Sep 2025 17:49:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb7xg03Zlz3Y2t; Mon, 29 Sep 2025 17:49:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759168199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QJsW5dMMmQIh2+b1gqUOn3gn7RXFaKpJhNk+gMbSsNg=; b=Tk+8AtxHFGyiDLVJ1s7GwYrvsNND/7DHkg3oV64URziVFbgVfLl5EqcXb8MTXi9cSo8NSC lJRoFtXyl9rTob6hp+yD4wU/fxsi+PaukeS90NrzhEZtzySVENUK5zKWB38dUUMnRQ0lIC 9LD9bvd9Fr0Kipz+zmBLux80b4YFlf2vAtnEQ/CuK7IgM9TgeKrfCqP0T2aopYUMmWOr2G nTWc4NACLgoebKdpBIBtm1l/OMk9IPygWbU+z5hD+yIh3NQ5+P6AvJ0IZzZNJY7N6MJfom FMrKcisCbXqMmwxTtcGKw4BumsIDfWmyArr0nfzuVKqiZ2sTNWi6TO2PZzTGgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759168199; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QJsW5dMMmQIh2+b1gqUOn3gn7RXFaKpJhNk+gMbSsNg=; b=oUeCGzIjymvtfYEAo7T08S1yFzvvZYiUl+gn7mW5SDbVCISFzlr4wXGl0G/y5981GQWV0f SSRHOpH5j8ts+BY6s5jPzgwRqCAhkYeHh9TB8wWwqeh0dvZ0nDmCxuRuw66uQ1tIg+zIOG PwQzKt+mulzhxMyYvnftgByy/ygTlB/ExPHurFotScTQ6FztjFq9caxVa7r3T4h9WcYsRI orCfmTke+v11aCOCdaYhHECgKpByLNDnw9CgEdOyvqPzrKyG2mNwz35H9q3jrzgkXh/X40 1Y0xSurkLd/eMjYJJNLHENSE7uasqBsM4ipESDdtbEGnNtdLl61V1lYls6Brdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759168199; a=rsa-sha256; cv=none; b=O2BUsIrPSGGK05bCx3vOU80ILSJFSI3EWbq836V8Mh6fo/HgpjqeDsEITsv2wBKKPtJFjy 8zmBppv3R3arfxosQNzIEYZZwQnBb8ZVPq+/B5BjZq3G5mTxnPEZZJFhtzm5gX97wBdyft fV8+GRVUDqTiCu/6ZtWJ2qQntEyvLXsEmccTojJbbHWVkGc9JG2jLdvjlo5nERc3SA/hT5 LFMpe1WaIqG04vlS2+7wAfZ5C430AGb5TKtkFz1fCIIQh7ekUF3oDSBc+NJhc4xvZzqXwi gmV8PIjmuomxGISoTp7WVF9qMrG3EDnDBpE3+KNXD1bYaLEkxZkmaOGbsgw4hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb7xf6dLlz1DtX; Mon, 29 Sep 2025 17:49:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58THnwt8080155; Mon, 29 Sep 2025 17:49:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58THnwdC080152; Mon, 29 Sep 2025 17:49:58 GMT (envelope-from git) Date: Mon, 29 Sep 2025 17:49:58 GMT Message-Id: <202509291749.58THnwdC080152@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 05e5de00b9ea - main - vn_fullpath.9: Add missing links for described functions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 05e5de00b9ea048f868522ff0bdae4e388685ddf Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=05e5de00b9ea048f868522ff0bdae4e388685ddf commit 05e5de00b9ea048f868522ff0bdae4e388685ddf Author: Olivier Certner AuthorDate: 2025-09-29 17:48:09 +0000 Commit: Olivier Certner CommitDate: 2025-09-29 17:49:27 +0000 vn_fullpath.9: Add missing links for described functions To reflect all the functions that are now described in the manual page. Fixes: 9f269a0a771a ("MAC/do: Check executable path ...") MFC after: 3 days Event: EuroBSDCon 2025 Sponsored by: The FreeBSD Foundation --- share/man/man9/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 67f3fdd2f6e5..7cd306702cc1 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -2455,7 +2455,9 @@ MLINKS+=vm_page_insert.9 vm_page_remove.9 MLINKS+=vm_page_wire.9 vm_page_unwire.9 \ vm_page_wire.9 vm_page_unwire_noq.9 \ vm_page_wire.9 vm_page_wire_mapped.9 -MLINKS+=vn_fullpath.9 vn_fullpath_jail.9 +MLINKS+=vn_fullpath.9 vn_fullpath_jail.9 \ + vn_fullpath.9 vn_fullpath_global.9 \ + vn_fullpath.9 vn_fullpath_hardlink.9 \ MLINKS+=VOP_ACCESS.9 VOP_ACCESSX.9 MLINKS+=VOP_ATTRIB.9 VOP_GETATTR.9 \ VOP_ATTRIB.9 VOP_SETATTR.9 \ From nobody Mon Sep 29 18:19: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 4cb8bp6X1xz68d67; Mon, 29 Sep 2025 18:19: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 4cb8bp61GHz3f5l; Mon, 29 Sep 2025 18:19:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759169974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qPqpcwWeUKhfEOp7x2NaP9rGJMYTH6uX1Yvd95DESBU=; b=x2WCt4KX+ruD/IG7t6ovss0WCplU2K2YNlmsCLZ5ARuHtE7z7Km6114qqY/Omlhdw4dkvG uc7AChXJJMxQat+6zrl2j+fchEH1FNqwyfX04F+R7O1IF9D1ph3dwpjx6Jq47oTsPCCsiF lHQoPHxRiDMHWMtc4jBKAHhrSw0nszK42l7zXgMiXGAgmmaTDBwX0thk1fZNE6QnKXTXAV P8RxrOQ6u/DC4XdALZj6xecQt6S/o5GVk9WC/8SHa3OhBWF4oZdNBmmcs3dTYuJQ8FcANP Yr/OQZba7EAznnsoGqOhYJ8+OcZ7nm4J0Lu3XnG6FZaP4q+Sfp4cGW5O20JMuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759169974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qPqpcwWeUKhfEOp7x2NaP9rGJMYTH6uX1Yvd95DESBU=; b=gGeplcFYi8QlRIsJK0Hzl2Vdkokm4TRZEweW+mxe6sw9KSrNqoT2JqSu3HcD9i+ibOkPr5 OzGs5J0I/2L5IFBg0d6G2dcuXFLYVGEtnn82WryfK8uTTJIILl3z/z+kqSMCZI/LgluSbg 14DPSU7mZ8HycWCL/jixVtVlefP3zd9NCe2Nbrxo3PzjciUgvKkpxNX7c8wpTpJijVL+pt 0uCyk5sE17sAJm511HIkSwhJMOK71t+VxgFgpI9I4V7kWQcwqfxsLm7ecOZ8H6BiW/L3wW kgWXY3BXgqxZHitwj9e1kOXwYZew9Jde9faV5c0tSMnewvnwV82x2NWrbZyRvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759169974; a=rsa-sha256; cv=none; b=cADF5PK9IEc/lal6nb5CntGYkbM9exB4r/5bynAQmsVdp1tSm8g5Y/9C2PPRYCgYQPHViJ Wyv+Woxe9q8DLOGoOw9EnUh6CfvD4sTAwtZV+MoeMwO0rogoCxtx1KJ1EJX8iLkHpPxOq+ E74yVIX/CupHVIaJ5FTpkZcfvNu4xghgGDxZaq2NXYarMxmvEhGE7M1zzvks/OCZ1DK170 dNavL5RzCqqhp5NlGUY2lYNxrkNmJ/UQNaPGKlGYcTvbdMiE0t/UWjGbUfElnLpMqp0v6j MFTv4S2qTCcT22AidpBD3YH7nh+YxYa4d02juUxLBU4/AWS1XoPXPOrL+S2EUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb8bp5T7Qz1FsX; Mon, 29 Sep 2025 18:19:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TIJYqT038977; Mon, 29 Sep 2025 18:19:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TIJYLZ038974; Mon, 29 Sep 2025 18:19:34 GMT (envelope-from git) Date: Mon, 29 Sep 2025 18:19:34 GMT Message-Id: <202509291819.58TIJYLZ038974@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 3ca1e69028ac - main - mdo(1): Add support and shortcuts for fully specifying users and groups 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3ca1e69028acdee30739c0e0856692395a36fd21 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=3ca1e69028acdee30739c0e0856692395a36fd21 commit 3ca1e69028acdee30739c0e0856692395a36fd21 Author: Olivier Certner AuthorDate: 2025-09-25 11:30:00 +0000 Commit: Olivier Certner CommitDate: 2025-09-29 18:19:02 +0000 mdo(1): Add support and shortcuts for fully specifying users and groups While preserving compatibility ('root' implied if no user is specified, option '-i' not setting groups), introduce options to control finely which user and group IDs are set in the launched process. To minimize the risks of user error, mdo(1) by default enforces that all user and group IDs are specified, either with explicit values from the command-line or, if a known user name is passed with '-u', from the corresponding content of the password and group databases. The other main type of use cases is to start from the current process' credentials, only amending part of them. It is now also possible to blend both approaches, where some parts must be specified and the others can just be amended or left as is. Options: * As before: -u: Specifies a user name or ID to change all user IDs to. If a known name is passed, also automatically sets all groups as per the password and group databases. -i: Starts from the current groups, instead of having to specify them by using '-u' with a known user name or explicitly. * New: -k: Starts from the current users (incompatible with '-u'). Implies '-i'. -g: Sets/overrides the primary group IDs with the passed group name or ID. -G: Sets/overrides the supplementary groups set with the passed list of comma-separated names or IDs. -s: Amend the supplementary groups set according to the list of comma-separated directives from the following: - @: Empties the set. Must be the first directive. Incompatible with '-G'. - +: Add a group to the set. - -: Remove a group from the set. Takes precedence over +. --euid: Overrides the effective user ID. --ruid: Overrides the real user ID. --svuid: Overrides the saved user ID. --egid: Overrides the effective group ID. --rgid: Overrides the real group ID. --svgid: Overrides the saved group ID. Option '-k' was introduced as a requirement to be explicit when one wants to keep the current user(s) instead of specifying new ones. This is both for the purpose of avoiding foot-shooting and preserving the possibility to omit '-u' to switch to 'root'. In order to avoid confusion, if any user or group overrides are specified, mdo(1) however enforces that either '-u' or '-k' has been specified (so, in practice, '-u root' is implied only in the absence of any other options except '-i'). Some base supplementary groups set is needed when '-s' is used without directive '@'. It can be an explicit one specified with '-G', effectively meaning that '-G' is processed before '-s'. Else, it is determined from the password/group database (see initgroups(3)) if '-u' with a user name was passed, or is simply the current set if '-i' (or '-k') was specified. Other cases require specifying the full set (using '-G' or '-s' with '@'), and will fail otherwise. As the release process for 15.0 is progressing, this is committed in advance of the still-in-progress tests and manual page updates. Note for MFC to stable/14: As initgroups() has its old behavior, consistently with it, remove the effective GID from being passed also as a supplementary group. Reviewed by: bapt MFC after: 3 days Relnotes: yes Event: EuroBSDCon 2025 Sponsored by: The FreeBSD Foundation Sponsored by: Google LLC (GSoC 2025) Co-authored-by: Kushagra Srivastava Differential Revision: https://reviews.freebsd.org/D52613 --- usr.bin/mdo/mdo.c | 857 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 816 insertions(+), 41 deletions(-) diff --git a/usr.bin/mdo/mdo.c b/usr.bin/mdo/mdo.c index 8435fc17f26f..3eb5d4e5c23f 100644 --- a/usr.bin/mdo/mdo.c +++ b/usr.bin/mdo/mdo.c @@ -1,13 +1,24 @@ /*- + * SPDX-License-Identifier: BSD-2-Clause + * * Copyright(c) 2024 Baptiste Daroussin + * Copyright (c) 2025 Kushagra Srivastava + * Copyright (c) 2025 The FreeBSD Foundation * - * SPDX-License-Identifier: BSD-2-Clause + * Portions of this software were developed by Olivier Certner + * at Kumacom SARL under sponsorship from the FreeBSD + * Foundation. */ +#include #include +#include #include +#include #include +#include +#include #include #include #include @@ -16,84 +27,848 @@ #include #include + static void usage(void) { - fprintf(stderr, "usage: mdo [-u username] [-i] [--] [command [args]]\n"); - exit(EXIT_FAILURE); + fprintf(stderr, + "Usage: mdo [options] [--] [command [args...]]\n" + "\n" + "Options:\n" + " -u Target user (name or UID; name sets groups)\n" + " -k Keep current user, allows selective overrides " + "(implies -i)\n" + " -i Keep current groups, unless explicitly overridden\n" + " -g Override primary group (name or GID)\n" + " -G Set supplementary groups (name or GID list)\n" + " -s Modify supplementary groups using:\n" + " @ (first) to reset, +group to add, -group to remove\n" + "\n" + "Advanced UID/GID overrides:\n" + " --euid Set effective UID\n" + " --ruid Set real UID\n" + " --svuid Set saved UID\n" + " --egid Set effective GID\n" + " --rgid Set real GID\n" + " --svgid Set saved GID\n" + "\n" + " -h Show this help message\n" + "\n" + "Examples:\n" + " mdo -u alice id\n" + " mdo -u 1001 -g wheel -G staff,operator sh\n" + " mdo -u bob -s +wheel,+operator id\n" + " mdo -k --ruid 1002 --egid 1004 id\n" + ); + exit(1); +} + +struct alloc { + void *start; + size_t size; +}; + +static const struct alloc ALLOC_INITIALIZER = { + .start = NULL, + .size = 0, +}; + +/* + * The default value should cover almost all cases. + * + * For getpwnam_r(), we assume: + * - 88 bytes for 'struct passwd' + * - Less than 16 bytes for the user name + * - A typical shadow hash of 106 bytes + * - Less than 16 bytes for the login class name + * - Less than 64 bytes for GECOS info + * - Less than 128 bytes for the home directory + * - Less than 32 bytes for the shell path + * Total: 256 + 88 + 106 = 450. + * + * For getgrnam_r(), we assume: + * - 32 bytes for 'struct group' + * - Less than 16 bytes for the group name + * - Some hash of 106 bytes + * - No more than 16 members, each of less than 16 bytes (=> 256 bytes) + * Total: 256 + 32 + 16 + 106 = 410. + * + * We thus choose 512 (leeway, power of 2). + */ +static const size_t ALLOC_FIRST_SIZE = 512; + +static bool +alloc_is_empty(const struct alloc *const alloc) +{ + if (alloc->size == 0) { + assert(alloc->start == NULL); + return (true); + } else { + assert(alloc->start != NULL); + return (false); + } +} + +static void +alloc_realloc(struct alloc *const alloc) +{ + const size_t old_size = alloc->size; + size_t new_size; + + if (old_size == 0) { + assert(alloc->start == NULL); + new_size = ALLOC_FIRST_SIZE; + } else if (old_size < PAGE_SIZE) + new_size = 2 * old_size; + else + /* + * We never allocate more than a page at a time when reaching + * a page (except perhaps for the first increment, up to two). + * Use roundup2() to be immune to previous cases' changes. */ + new_size = roundup2(old_size, PAGE_SIZE) + PAGE_SIZE; + + alloc->start = realloc(alloc->start, new_size); + if (alloc->start == NULL) + errx(EXIT_FAILURE, + "cannot realloc allocation (old size: %zu, new: %zu)", + old_size, new_size); + alloc->size = new_size; +} + +static void +alloc_free(struct alloc *const alloc) +{ + if (!alloc_is_empty(alloc)) { + free(alloc->start); + *alloc = ALLOC_INITIALIZER; + } +} + +struct alloc_wrap_data { + int (*func)(void *data, const struct alloc *alloc); +}; + +/* + * Wraps functions needing a backing allocation. + * + * Uses 'alloc' as the starting allocation, and may extend it as necessary. + * 'alloc' is never freed, even on failure of the wrapped function. + * + * The function is expected to return ERANGE if and only if the provided + * allocation is not big enough. All other values are passed through. + */ +static int +alloc_wrap(struct alloc_wrap_data *const data, struct alloc *alloc) +{ + int error; + + /* Avoid a systematic ERANGE on first iteration. */ + if (alloc_is_empty(alloc)) + alloc_realloc(alloc); + + for (;;) { + error = data->func(data, alloc); + if (error != ERANGE) + break; + alloc_realloc(alloc); + } + + return (error); +} + +struct getpwnam_wrapper_data { + struct alloc_wrap_data wrapped; + const char *name; + struct passwd **pwdp; +}; + +static int +wrapped_getpwnam_r(void *data, const struct alloc *alloc) +{ + struct passwd *const pwd = alloc->start; + struct passwd *result; + struct getpwnam_wrapper_data *d = data; + int error; + + assert(alloc->size >= sizeof(*pwd)); + + error = getpwnam_r(d->name, pwd, (char *)(pwd + 1), + alloc->size - sizeof(*pwd), &result); + + if (error == 0) { + if (result == NULL) + error = ENOENT; + } else + assert(result == NULL); + *d->pwdp = result; + return (error); +} + +/* + * Wraps getpwnam_r(), automatically dealing with memory allocation. + * + * 'alloc' may be any allocation (even empty), and will be extended as + * necessary. It is not freed on error. + * + * On success, '*pwdp' is filled with a pointer to the returned 'struct passwd', + * and on failure, is set to NULL. + */ +static int +alloc_getpwnam(const char *name, struct passwd **pwdp, + struct alloc *const alloc) +{ + struct getpwnam_wrapper_data data; + + data.wrapped.func = wrapped_getpwnam_r; + data.name = name; + data.pwdp = pwdp; + return (alloc_wrap((struct alloc_wrap_data *)&data, alloc)); +} + +struct getgrnam_wrapper_data { + struct alloc_wrap_data wrapped; + const char *name; + struct group **grpp; +}; + +static int +wrapped_getgrnam_r(void *data, const struct alloc *alloc) +{ + struct group *grp = alloc->start; + struct group *result; + struct getgrnam_wrapper_data *d = data; + int error; + + assert(alloc->size >= sizeof(*grp)); + + error = getgrnam_r(d->name, grp, (char *)(grp + 1), + alloc->size - sizeof(*grp), &result); + + if (error == 0) { + if (result == NULL) + error = ENOENT; + } else + assert(result == NULL); + *d->grpp = result; + return (error); +} + +/* + * Wraps getgrnam_r(), automatically dealing with memory allocation. + * + * 'alloc' may be any allocation (even empty), and will be extended as + * necessary. It is not freed on error. + * + * On success, '*grpp' is filled with a pointer to the returned 'struct group', + * and on failure, is set to NULL. + */ +static int +alloc_getgrnam(const char *const name, struct group **const grpp, + struct alloc *const alloc) +{ + struct getgrnam_wrapper_data data; + + data.wrapped.func = wrapped_getgrnam_r; + data.name = name; + data.grpp = grpp; + return (alloc_wrap((struct alloc_wrap_data *)&data, alloc)); +} + +/* + * Retrieve the UID from a user string. + * + * Tries first to interpret the string as a user name, then as a numeric ID + * (this order is prescribed by POSIX for a number of utilities). + * + * 'pwdp' and 'allocp' must be NULL or non-NULL together. If non-NULL, then + * 'allocp' can be any allocation (possibly empty) and will be extended to + * contain the result if necessary. It will not be freed (even on failure). + */ +static uid_t +parse_user_pwd(const char *s, struct passwd **pwdp, struct alloc *allocp) +{ + struct passwd *pwd; + struct alloc alloc = ALLOC_INITIALIZER; + const char *errp; + uid_t uid; + int error; + + assert((pwdp == NULL && allocp == NULL) || + (pwdp != NULL && allocp != NULL)); + + if (pwdp == NULL) { + pwdp = &pwd; + allocp = &alloc; + } + + error = alloc_getpwnam(s, pwdp, allocp); + if (error == 0) { + uid = (*pwdp)->pw_uid; + goto finish; + } else if (error != ENOENT) + errc(EXIT_FAILURE, error, + "cannot access the password database"); + + uid = strtonum(s, 0, UID_MAX, &errp); + if (errp != NULL) + errx(EXIT_FAILURE, "invalid UID '%s': %s", s, errp); + +finish: + if (allocp == &alloc) + alloc_free(allocp); + return (uid); +} + +/* See parse_user_pwd() for the doc. */ +static uid_t +parse_user(const char *s) +{ + return (parse_user_pwd(s, NULL, NULL)); +} + +/* + * Retrieve the GID from a group string. + * + * Tries first to interpret the string as a group name, then as a numeric ID + * (this order is prescribed by POSIX for a number of utilities). + */ +static gid_t +parse_group(const char *s) +{ + struct group *grp; + struct alloc alloc = ALLOC_INITIALIZER; + const char *errp; + gid_t gid; + int error; + + error = alloc_getgrnam(s, &grp, &alloc); + if (error == 0) { + gid = grp->gr_gid; + goto finish; + } else if (error != ENOENT) + errc(EXIT_FAILURE, error, "cannot access the group database"); + + gid = strtonum(s, 0, GID_MAX, &errp); + if (errp != NULL) + errx(EXIT_FAILURE, "invalid GID '%s': %s", s, errp); + +finish: + alloc_free(&alloc); + return (gid); +} + +struct group_array { + u_int nb; + gid_t *groups; +}; + +static const struct group_array GROUP_ARRAY_INITIALIZER = { + .nb = 0, + .groups = NULL, +}; + +static bool +group_array_is_empty(const struct group_array *const ga) +{ + return (ga->nb == 0); +} + +static void +realloc_groups(struct group_array *const ga, const u_int diff) +{ + const u_int new_nb = ga->nb + diff; + const size_t new_size = new_nb * sizeof(*ga->groups); + + assert(new_nb >= diff && new_size >= new_nb); + ga->groups = realloc(ga->groups, new_size); + if (ga->groups == NULL) + err(EXIT_FAILURE, "realloc of groups failed"); + ga->nb = new_nb; +} + +static int +gidp_cmp(const void *p1, const void *p2) +{ + const gid_t g1 = *(const gid_t *)p1; + const gid_t g2 = *(const gid_t *)p2; + + return ((g1 > g2) - (g1 < g2)); +} + +static void +sort_uniq_groups(struct group_array *const ga) +{ + size_t j = 0; + + if (ga->nb <= 1) + return; + + qsort(ga->groups, ga->nb, sizeof(gid_t), gidp_cmp); + + for (size_t i = 1; i < ga->nb; ++i) + if (ga->groups[i] != ga->groups[j]) + ga->groups[++j] = ga->groups[i]; +} + +/* + * Remove elements in 'set' that are in 'remove'. + * + * Expects both arrays to have been treated with sort_uniq_groups(). Works in + * O(n + m), modifying 'set' in place. + */ +static void +remove_groups(struct group_array *const set, + const struct group_array *const remove) +{ + u_int from = 0, to = 0, rem = 0; + gid_t cand, to_rem; + + if (set->nb == 0 || remove->nb == 0) + /* Nothing to remove. */ + return; + + cand = set->groups[0]; + to_rem = remove->groups[0]; + + for (;;) { + if (cand < to_rem) { + /* Keep. */ + if (to != from) + set->groups[to] = cand; + ++to; + cand = set->groups[++from]; + if (from == set->nb) + break; + } else if (cand == to_rem) { + cand = set->groups[++from]; + if (from == set->nb) + break; + to_rem = remove->groups[++rem]; /* No duplicates. */ + if (rem == remove->nb) + break; + } else { + to_rem = remove->groups[++rem]; + if (rem == remove->nb) + break; + } + } + + /* All remaining groups in 'set' must be kept. */ + if (from == to) + /* Nothing was removed. 'set' will stay the same. */ + return; + memmove(set->groups + to, set->groups + from, + (set->nb - from) * sizeof(gid_t)); + set->nb = to + (set->nb - from); } int main(int argc, char **argv) { - struct passwd *pw; - const char *username = "root"; + const char *const default_user = "root"; + + const char *user_name = NULL; + const char *primary_group = NULL; + char *supp_groups_str = NULL; + char *supp_mod_str = NULL; + bool start_from_current_groups = false; + bool start_from_current_users = false; + const char *euid_str = NULL; + const char *ruid_str = NULL; + const char *svuid_str = NULL; + const char *egid_str = NULL; + const char *rgid_str = NULL; + const char *svgid_str = NULL; + bool need_user = false; /* '-u' or '-k' needed. */ + + const int go_euid = 1000; + const int go_ruid = 1001; + const int go_svuid = 1002; + const int go_egid = 1003; + const int go_rgid = 1004; + const int go_svgid = 1005; + const struct option longopts[] = { + {"euid", required_argument, NULL, go_euid}, + {"ruid", required_argument, NULL, go_ruid}, + {"svuid", required_argument, NULL, go_svuid}, + {"egid", required_argument, NULL, go_egid}, + {"rgid", required_argument, NULL, go_rgid}, + {"svgid", required_argument, NULL, go_svgid}, + {NULL, 0, NULL, 0} + }; + int ch; + struct setcred wcred = SETCRED_INITIALIZER; u_int setcred_flags = 0; - bool uidonly = false; - int ch; - while ((ch = getopt(argc, argv, "u:i")) != -1) { + struct passwd *pw = NULL; + struct alloc pw_alloc = ALLOC_INITIALIZER; + struct group_array supp_groups = GROUP_ARRAY_INITIALIZER; + struct group_array supp_rem = GROUP_ARRAY_INITIALIZER; + + + /* + * Process options. + */ + while (ch = getopt_long(argc, argv, "+G:g:hiks:u:", longopts, NULL), + ch != -1) { switch (ch) { - case 'u': - username = optarg; + case 'G': + supp_groups_str = optarg; + need_user = true; + break; + case 'g': + primary_group = optarg; + need_user = true; break; + case 'h': + usage(); case 'i': - uidonly = true; + start_from_current_groups = true; + break; + case 'k': + start_from_current_users = true; + break; + case 's': + supp_mod_str = optarg; + need_user = true; + break; + case 'u': + user_name = optarg; + break; + case go_euid: + euid_str = optarg; + need_user = true; + break; + case go_ruid: + ruid_str = optarg; + need_user = true; + break; + case go_svuid: + svuid_str = optarg; + need_user = true; + break; + case go_egid: + egid_str = optarg; + need_user = true; + break; + case go_rgid: + rgid_str = optarg; + need_user = true; + break; + case go_svgid: + svgid_str = optarg; + need_user = true; break; default: usage(); } } + argc -= optind; argv += optind; - if ((pw = getpwnam(username)) == NULL) { - if (strspn(username, "0123456789") == strlen(username)) { - const char *errp = NULL; - uid_t uid = strtonum(username, 0, UID_MAX, &errp); - if (errp != NULL) - err(EXIT_FAILURE, "invalid user ID '%s'", - username); - pw = getpwuid(uid); + /* + * Determine users. + * + * We do that first as in some cases we need to retrieve the + * corresponding password database entry to be able to set the primary + * groups. + */ + + if (start_from_current_users) { + if (user_name != NULL) + errx(EXIT_FAILURE, "-k incompatible with -u"); + + /* + * If starting from the current user(s) as a base, finding one + * of them in the password database and using its groups would + * be quite surprising, so we instead let '-k' imply '-i'. + */ + start_from_current_groups = true; + } else { + uid_t uid; + + /* + * In the case of any overrides, we impose an explicit base user + * via '-u' or '-k' instead of implicitly taking 'root' as the + * base. + */ + if (user_name == NULL) { + if (need_user) + errx(EXIT_FAILURE, + "Some overrides specified, " + "'-u' or '-k' needed."); + user_name = default_user; } + + /* + * Even if all user overrides are present as well as primary and + * supplementary groups ones, in which case the final result + * doesn't depend on '-u', we still call parse_user_pwd() to + * check that the passed username is correct. + */ + uid = parse_user_pwd(user_name, &pw, &pw_alloc); + wcred.sc_uid = wcred.sc_ruid = wcred.sc_svuid = uid; + setcred_flags |= SETCREDF_UID | SETCREDF_RUID | + SETCREDF_SVUID; + } + + if (euid_str != NULL) { + wcred.sc_uid = parse_user(euid_str); + setcred_flags |= SETCREDF_UID; + } + + if (ruid_str != NULL) { + wcred.sc_ruid = parse_user(ruid_str); + setcred_flags |= SETCREDF_RUID; + } + + if (svuid_str != NULL) { + wcred.sc_svuid = parse_user(svuid_str); + setcred_flags |= SETCREDF_SVUID; + } + + /* + * Determine primary groups. + */ + + /* + * When not starting from the current groups, we need to set all + * primary groups. If '-g' was not passed, we use the primary + * group from the password database as the "base" to which + * overrides '--egid', '--rgid' and '--svgid' apply. But if all + * overrides were specified, we in fact just don't need the + * password database at all. + * + * '-g' is treated outside of this 'if' as it can also be used + * as an override. + */ + if (!start_from_current_groups && primary_group == NULL && + (egid_str == NULL || rgid_str == NULL || svgid_str == NULL)) { if (pw == NULL) - err(EXIT_FAILURE, "invalid username '%s'", username); + errx(EXIT_FAILURE, + "must specify primary groups or a user name " + "with an entry in the password database"); + + wcred.sc_gid = wcred.sc_rgid = wcred.sc_svgid = + pw->pw_gid; + setcred_flags |= SETCREDF_GID | SETCREDF_RGID | + SETCREDF_SVGID; + } + + if (primary_group != NULL) { + /* + * We always call parse_group() even in case all overrides are + * present to check that the passed group is valid. + */ + wcred.sc_gid = wcred.sc_rgid = wcred.sc_svgid = + parse_group(primary_group); + setcred_flags |= SETCREDF_GID | SETCREDF_RGID | SETCREDF_SVGID; + } + + if (egid_str != NULL) { + wcred.sc_gid = parse_group(egid_str); + setcred_flags |= SETCREDF_GID; + } + + if (rgid_str != NULL) { + wcred.sc_rgid = parse_group(rgid_str); + setcred_flags |= SETCREDF_RGID; + } + + if (svgid_str != NULL) { + wcred.sc_svgid = parse_group(svgid_str); + setcred_flags |= SETCREDF_SVGID; + } + + /* + * Determine supplementary groups. + */ + + /* + * This makes sense to catch user's mistakes. It is not a strong + * limitation of the code below (allowing this case is just a matter of, + * in the block treating '-s' with '@' below, replacing an assert() by + * a reset of 'supp_groups'). + */ + if (supp_groups_str != NULL && supp_mod_str != NULL && + supp_mod_str[0] == '@') + errx(EXIT_FAILURE, "'-G' and '-s' with '@' are incompatible"); + + /* + * Determine the supplementary groups to start with, but only if we + * really need to operate on them later (and set them back). + */ + if (!start_from_current_groups) { + assert(!start_from_current_users); + + if (supp_groups_str == NULL && (supp_mod_str == NULL || + supp_mod_str[0] != '@')) { + /* + * If we are to replace supplementary groups (i.e., + * neither '-i' nor '-k' was specified) and they are not + * completely specified (with '-g' or '-s' with '@'), we + * start from those in the groups database if we were + * passed a user name that is in the password database + * (this is a protection against erroneous ID/name + * conflation in the groups database), else we simply + * error. + */ + + if (pw == NULL) + errx(EXIT_FAILURE, + "must specify the full supplementary " + "groups set or a user name with an entry " + "in the password database"); + + const long ngroups_alloc = sysconf(_SC_NGROUPS_MAX) + 1; + gid_t *groups; + int ngroups; + + groups = malloc(sizeof(*groups) * ngroups_alloc); + if (groups == NULL) + errx(EXIT_FAILURE, + "cannot allocate memory to retrieve " + "user groups from the groups database"); + + ngroups = ngroups_alloc; + getgrouplist(user_name, pw->pw_gid, groups, &ngroups); + + if (ngroups > ngroups_alloc) + err(EXIT_FAILURE, + "too many groups for user '%s'", + user_name); + + realloc_groups(&supp_groups, ngroups); + memcpy(supp_groups.groups + supp_groups.nb - ngroups, + groups, ngroups * sizeof(*groups)); + free(groups); + + /* + * Have to set SETCREDF_SUPP_GROUPS here since we may be + * in the case where neither '-G' nor '-s' was passed, + * but we still have to set the supplementary groups to + * those of the groups database. + */ + setcred_flags |= SETCREDF_SUPP_GROUPS; + } + } else if (supp_groups_str == NULL && (supp_mod_str == NULL || + supp_mod_str[0] != '@')) { + const int ngroups = getgroups(0, NULL); + + if (ngroups > 0) { + realloc_groups(&supp_groups, ngroups); + + if (getgroups(ngroups, supp_groups.groups + + supp_groups.nb - ngroups) < 0) + err(EXIT_FAILURE, "getgroups() failed"); + } + + /* + * Setting SETCREDF_SUPP_GROUPS here is not necessary, we will + * do it below since 'supp_mod_str' != NULL. + */ } - wcred.sc_uid = wcred.sc_ruid = wcred.sc_svuid = pw->pw_uid; - setcred_flags |= SETCREDF_UID | SETCREDF_RUID | SETCREDF_SVUID; + if (supp_groups_str != NULL) { + char *p = supp_groups_str; + char *tok; - if (!uidonly) { /* - * If there are too many groups specified for some UID, setting - * the groups will fail. We preserve this condition by - * allocating one more group slot than allowed, as - * getgrouplist() itself is just some getter function and thus - * doesn't (and shouldn't) check the limit, and to allow - * setcred() to actually check for overflow. + * We will set the supplementary groups to exactly the set + * passed with '-G', and we took care above not to retrieve + * "base" groups (current ones or those from the groups + * database) in this case. */ - const long ngroups_alloc = sysconf(_SC_NGROUPS_MAX) + 2; - gid_t *const groups = malloc(sizeof(*groups) * ngroups_alloc); - int ngroups = ngroups_alloc; + assert(group_array_is_empty(&supp_groups)); + + /* WARNING: 'supp_groups_str' going to be modified. */ + while ((tok = strsep(&p, ",")) != NULL) { + gid_t g; + + if (*tok == '\0') + continue; + + g = parse_group(tok); + realloc_groups(&supp_groups, 1); + supp_groups.groups[supp_groups.nb - 1] = g; + } + + setcred_flags |= SETCREDF_SUPP_GROUPS; + } + + if (supp_mod_str != NULL) { + char *p = supp_mod_str; + char *tok; + gid_t gid; - if (groups == NULL) - err(EXIT_FAILURE, "cannot allocate memory for groups"); + /* WARNING: 'supp_mod_str' going to be modified. */ + while ((tok = strsep(&p, ",")) != NULL) { + switch (tok[0]) { + case '\0': + break; - getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups); + case '@': + if (tok != supp_mod_str) + errx(EXIT_FAILURE, "'@' must be " + "the first token in '-s' option"); + /* See same assert() above. */ + assert(group_array_is_empty(&supp_groups)); + break; + + case '+': + case '-': + gid = parse_group(tok + 1); + if (tok[0] == '+') { + realloc_groups(&supp_groups, 1); + supp_groups.groups[supp_groups.nb - 1] = gid; + } else { + realloc_groups(&supp_rem, 1); + supp_rem.groups[supp_rem.nb - 1] = gid; + } + break; + + default: + errx(EXIT_FAILURE, + "invalid '-s' token '%s' at index %zu", + tok, tok - supp_mod_str); + } + } - wcred.sc_gid = wcred.sc_rgid = wcred.sc_svgid = pw->pw_gid; - wcred.sc_supp_groups = groups + 1; - wcred.sc_supp_groups_nb = ngroups - 1; - setcred_flags |= SETCREDF_GID | SETCREDF_RGID | SETCREDF_SVGID | - SETCREDF_SUPP_GROUPS; + setcred_flags |= SETCREDF_SUPP_GROUPS; + } + + /* + * We don't need to pass the kernel a normalized representation of the + * new supplementary groups set (array sorted and without duplicates), + * so we don't do it here unless we need to remove some groups, where it + * enables more efficient algorithms (if the number of groups for some + * reason grows out of control). + */ + if (!group_array_is_empty(&supp_groups) && + !group_array_is_empty(&supp_rem)) { + sort_uniq_groups(&supp_groups); + sort_uniq_groups(&supp_rem); + remove_groups(&supp_groups, &supp_rem); + } + *** 20 LINES SKIPPED *** From nobody Mon Sep 29 18:50: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 4cb9Ht5W5Bz68fsn; Mon, 29 Sep 2025 18:50:50 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Received: from smtp6.goneo.de (smtp6.goneo.de [IPv6:2001:1640:5::8:31]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb9Ht266hz3jvH; Mon, 29 Sep 2025 18:50:50 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Authentication-Results: mx1.freebsd.org; none Received: from hub1.goneo.de (hub1.goneo.de [IPv6:2001:1640:5::8:52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp6.goneo.de (Postfix) with ESMTPS id 40D7C241076; Mon, 29 Sep 2025 20:50:38 +0200 (CEST) Received: from hub1.goneo.de (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by hub1.goneo.de (Postfix) with ESMTPS id 555E024048E; Mon, 29 Sep 2025 20:50:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walstatt-de.de; s=DKIM001; t=1759171836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0Xa6A4EKLak21H8gWt4lsAwjl2irE+dXVwbVAu+OHUA=; b=QOZz74qg66YiRKMs1L/OotfP+o/gVFJUIz2SsHrjlQkkDXyxMd6NHX68XSJ41y6Z3vFVWt tQeAoQfnSBxiqiHO+XDQQ6hKHPBBxx4395WzfEv6FAfQzhIG9crG3mI3UARtUvA2pfpRYm jac3NgFEKuBr3O8FeYA+rimcOpObNzCdqbK7uRK5/YJ44kiIMq7WfW5PQxguVMzZShQf1m 0zF2AK5KAQ+iZui/RQOREoi0oAONla/icSUUoaloriZnBm730BwS3UGylDbJj418mzzpzF zlbtn+2TgH3eYW8uI2ARjadUQzeMcHmHqEmKfrN1natgV9c5p4PiTjD7Jj+CEQ== Received: from thor.sb211.local (dynamic-2a02-3100-1bc2-8402-5759-b654-e122-b545.310.pool.telefonica.de [IPv6:2a02:3100:1bc2:8402:5759:b654:e122:b545]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hub1.goneo.de (Postfix) with ESMTPSA id DF81A240159; Mon, 29 Sep 2025 20:50:35 +0200 (CEST) Date: Mon, 29 Sep 2025 20:50:02 +0200 From: A FreeBSD User To: Alexander Ziaee Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 59fc2b0166f7 - main - mandoc: Vendor import of upstream at 2025-09-26 Message-ID: <20250929205029.53a83dde@thor.sb211.local> In-Reply-To: <202509291734.58THY9VL059625@gitrepo.freebsd.org> References: <202509291734.58THY9VL059625@gitrepo.freebsd.org> X-Mailer: Claws Mail 3.21.0 (GTK+ 2.24.33; amd64-portbld-freebsd15.0) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/0UXtACRchGVMaX5T7nZrGFr"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Rspamd-UID: e372dd X-Rspamd-UID: 1db33a X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cb9Ht266hz3jvH --Sig_/0UXtACRchGVMaX5T7nZrGFr Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Am Tage des Herren Mon, 29 Sep 2025 17:34:09 GMT Alexander Ziaee schrieb: > The branch main has been updated by ziaee: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D59fc2b0166f71c791113379d16= b8cef7039f289d >=20 > commit 59fc2b0166f71c791113379d16b8cef7039f289d > Merge: d4cbdd9ad04a 5fe5b2ed2d88 > Author: Alexander Ziaee > AuthorDate: 2025-09-29 17:31:38 +0000 > Commit: Alexander Ziaee > CommitDate: 2025-09-29 17:31:38 +0000 >=20 > mandoc: Vendor import of upstream at 2025-09-26 > =20 > Interesting changes: > + mandoc db: Improve case sorting, found by our very own markj > + history: Add macros for version 8 and 10 AT&T Unix > + linter: Warn on blank lines in man(7) like mdoc(7) > + manuals: Improve precision, man(7) syntax table, and roff(7) specif= ics > + manuals: Fix PDF/PS footer regression detailed in our PR: 289786 > =20 > PR: 289786 > MFC after: 3 days >=20 > contrib/mandoc/Makefile | 2 +- > contrib/mandoc/dba.c | 7 +++--- > contrib/mandoc/main.c | 52 +++++++++-----------------------------= ------ > contrib/mandoc/man.c | 3 ++- > contrib/mandoc/man.options.1 | 35 +++++++++++++++++++++++++---- > contrib/mandoc/mandoc.1 | 16 ++++++++------ > contrib/mandoc/mdoc.7 | 35 +++++++++++++++++++---------- > contrib/mandoc/roff_term.c | 2 +- > contrib/mandoc/term_ps.c | 6 ++--- > 9 files changed, 84 insertions(+), 74 deletions(-) >=20 > diff --cc contrib/mandoc/Makefile > index 0830c9f289a3,000000000000..d4a2c794b437 > mode 100644,000000..100644 > --- a/contrib/mandoc/Makefile > +++ b/contrib/mandoc/Makefile > @@@ -1,618 -1,0 +1,618 @@@ > +# $Id: Makefile,v 1.543 2023/10/19 11:45:42 schwarze Exp $ > +# > +# Copyright (c) 2011, 2013-2022 Ingo Schwarze > +# Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons > +# > +# Permission to use, copy, modify, and distribute this software for any > +# purpose with or without fee is hereby granted, provided that the above > +# copyright notice and this permission notice appear in all copies. > +# > +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANT= IES > +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF > +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE F= OR > +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES > +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN > +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT = OF > +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. > + > - VERSION =3D 1.14.6s20250727 > ++VERSION =3D 1.14.6s20250926 > + > +# =3D=3D=3D LIST OF FILES =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +TESTSRCS =3D test-attribute.c \ > + test-be32toh.c \ > + test-cmsg.c \ > + test-dirent-namlen.c \ > + test-EFTYPE.c \ > + test-err.c \ > + test-fts.c \ > + test-getline.c \ > + test-getsubopt.c \ > + test-isblank.c \ > + test-mkdtemp.c \ > + test-mkstemps.c \ > + test-nanosleep.c \ > + test-noop.c \ > + test-ntohl.c \ > + test-O_DIRECTORY.c \ > + test-ohash.c \ > + test-PATH_MAX.c \ > + test-pledge.c \ > + test-progname.c \ > + test-reallocarray.c \ > + test-recallocarray.c \ > + test-recvmsg.c \ > + test-rewb-bsd.c \ > + test-rewb-sysv.c \ > + test-sandbox_init.c \ > + test-strcasestr.c \ > + test-stringlist.c \ > + test-strlcat.c \ > + test-strlcpy.c \ > + test-strndup.c \ > + test-strptime.c \ > + test-strsep.c \ > + test-strtonum.c \ > + test-vasprintf.c \ > + test-wchar.c > + > +SRCS =3D arch.c \ > + att.c \ > + catman.c \ > + cgi.c \ > + chars.c \ > + compat_err.c \ > + compat_fts.c \ > + compat_getline.c \ > + compat_getsubopt.c \ > + compat_isblank.c \ > + compat_mkdtemp.c \ > + compat_mkstemps.c \ > + compat_ohash.c \ > + compat_progname.c \ > + compat_reallocarray.c \ > + compat_recallocarray.c \ > + compat_strcasestr.c \ > + compat_stringlist.c \ > + compat_strlcat.c \ > + compat_strlcpy.c \ > + compat_strndup.c \ > + compat_strsep.c \ > + compat_strtonum.c \ > + compat_vasprintf.c \ > + dba.c \ > + dba_array.c \ > + dba_read.c \ > + dba_write.c \ > + dbm.c \ > + dbm_map.c \ > + demandoc.c \ > + eqn.c \ > + eqn_html.c \ > + eqn_term.c \ > + html.c \ > + lib.c \ > + main.c \ > + man.c \ > + man_html.c \ > + man_macro.c \ > + man_term.c \ > + man_validate.c \ > + mandoc.c \ > + mandoc_aux.c \ > + mandoc_dbg.c \ > + mandoc_msg.c \ > + mandoc_ohash.c \ > + mandoc_xr.c \ > + mandocd.c \ > + mandocdb.c \ > + manpath.c \ > + mansearch.c \ > + mdoc.c \ > + mdoc_argv.c \ > + mdoc_html.c \ > + mdoc_macro.c \ > + mdoc_man.c \ > + mdoc_markdown.c \ > + mdoc_state.c \ > + mdoc_term.c \ > + mdoc_validate.c \ > + msec.c \ > + out.c \ > + preconv.c \ > + read.c \ > + roff.c \ > + roff_escape.c \ > + roff_html.c \ > + roff_term.c \ > + roff_validate.c \ > + soelim.c \ > + st.c \ > + tag.c \ > + tbl.c \ > + tbl_data.c \ > + tbl_html.c \ > + tbl_layout.c \ > + tbl_opts.c \ > + tbl_term.c \ > + term.c \ > + term_ascii.c \ > + term_ps.c \ > + term_tab.c \ > + term_tag.c \ > + tree.c > + > +DISTFILES =3D INSTALL \ > + LICENSE \ > + Makefile \ > + Makefile.depend \ > + NEWS \ > + TODO \ > + apropos.1 \ > + catman.8 \ > + cgi.h.example \ > + compat_fts.h \ > + compat_ohash.h \ > + compat_stringlist.h \ > + configure \ > + configure.local.example \ > + dba.h \ > + dba_array.h \ > + dba_write.h \ > + dbm.h \ > + dbm_map.h \ > + demandoc.1 \ > + eqn.7 \ > + eqn.h \ > + eqn_parse.h \ > + gmdiff \ > + html.h \ > + lib.in \ > + libman.h \ > + libmandoc.h \ > + libmdoc.h \ > + main.h \ > + makewhatis.8 \ > + man.1 \ > + man.7 \ > + man.cgi.3 \ > + man.cgi.8 \ > + man.conf.5 \ > + man.h \ > + man.options.1 \ > + manconf.h \ > + mandoc.1 \ > + mandoc.3 \ > + mandoc.css \ > + mandoc.db.5 \ > + mandoc.h \ > + mandoc_aux.h \ > + mandoc_char.7 \ > + mandoc_dbg.h \ > + mandoc_dbg_init.3 \ > + mandoc_escape.3 \ > + mandoc_headers.3 \ > + mandoc_html.3 \ > + mandoc_malloc.3 \ > + mandoc_ohash.h \ > + mandoc_parse.h \ > + mandoc_xr.h \ > + mandocd.8 \ > + mansearch.3 \ > + mansearch.h \ > + mchars_alloc.3 \ > + mdoc.7 \ > + mdoc.h \ > + msec.in \ > + out.h \ > + predefs.in \ > + roff.7 \ > + roff.h \ > + roff_int.h \ > + soelim.1 \ > + tag.h \ > + tbl.3 \ > + tbl.7 \ > + tbl.h \ > + tbl_int.h \ > + tbl_parse.h \ > + term.h \ > + term_tag.h \ > + $(SRCS) \ > + $(TESTSRCS) > + > +LIBMAN_OBJS =3D man.o \ > + man_macro.o \ > + man_validate.o > + > +LIBMDOC_OBJS =3D att.o \ > + lib.o \ > + mdoc.o \ > + mdoc_argv.o \ > + mdoc_macro.o \ > + mdoc_state.o \ > + mdoc_validate.o \ > + st.o > + > +LIBROFF_OBJS =3D eqn.o \ > + roff.o \ > + roff_escape.o \ > + roff_validate.o \ > + tbl.o \ > + tbl_data.o \ > + tbl_layout.o \ > + tbl_opts.o > + > +LIBMANDOC_OBJS =3D $(LIBMAN_OBJS) \ > + $(LIBMDOC_OBJS) \ > + $(LIBROFF_OBJS) \ > + $(DEBUG_OBJS) \ > + arch.o \ > + chars.o \ > + mandoc.o \ > + mandoc_aux.o \ > + mandoc_msg.o \ > + mandoc_ohash.o \ > + mandoc_xr.o \ > + msec.o \ > + preconv.o \ > + read.o \ > + tag.o > + > +ALL_COBJS =3D compat_err.o \ > + compat_fts.o \ > + compat_getline.o \ > + compat_getsubopt.o \ > + compat_isblank.o \ > + compat_mkdtemp.o \ > + compat_mkstemps.o \ > + compat_ohash.o \ > + compat_progname.o \ > + compat_reallocarray.o \ > + compat_recallocarray.o \ > + compat_strcasestr.o \ > + compat_stringlist.o \ > + compat_strlcat.o \ > + compat_strlcpy.o \ > + compat_strndup.o \ > + compat_strsep.o \ > + compat_strtonum.o \ > + compat_vasprintf.o > + > +MANDOC_HTML_OBJS =3D eqn_html.o \ > + html.o \ > + man_html.o \ > + mdoc_html.o \ > + roff_html.o \ > + tbl_html.o > + > +MANDOC_TERM_OBJS =3D eqn_term.o \ > + man_term.o \ > + mdoc_term.o \ > + roff_term.o \ > + term.o \ > + term_ascii.o \ > + term_ps.o \ > + term_tab.o \ > + term_tag.o \ > + tbl_term.o > + > +DBM_OBJS =3D dbm.o \ > + dbm_map.o \ > + mansearch.o > + > +DBA_OBJS =3D dba.o \ > + dba_array.o \ > + dba_read.o \ > + dba_write.o \ > + mandocdb.o > + > +MAIN_OBJS =3D $(MANDOC_HTML_OBJS) \ > + $(MANDOC_MAN_OBJS) \ > + $(MANDOC_TERM_OBJS) \ > + $(DBM_OBJS) \ > + $(DBA_OBJS) \ > + main.o \ > + manpath.o \ > + mdoc_man.o \ > + mdoc_markdown.o \ > + out.o \ > + tree.o > + > +CGI_OBJS =3D $(MANDOC_HTML_OBJS) \ > + $(DBM_OBJS) \ > + cgi.o \ > + out.o > + > +MANDOCD_OBJS =3D $(MANDOC_HTML_OBJS) \ > + $(MANDOC_TERM_OBJS) \ > + mandocd.o \ > + out.o > + > +DEMANDOC_OBJS =3D demandoc.o > + > +WWW_MANS =3D apropos.1.html \ > + demandoc.1.html \ > + man.1.html \ > + man.options.1.html \ > + mandoc.1.html \ > + soelim.1.html \ > + man.cgi.3.html \ > + mandoc.3.html \ > + mandoc_dbg_init.3.html \ > + mandoc_escape.3.html \ > + mandoc_headers.3.html \ > + mandoc_html.3.html \ > + mandoc_malloc.3.html \ > + mansearch.3.html \ > + mchars_alloc.3.html \ > + tbl.3.html \ > + man.conf.5.html \ > + mandoc.db.5.html \ > + eqn.7.html \ > + man.7.html \ > + mandoc_char.7.html \ > + mdoc.7.html \ > + roff.7.html \ > + tbl.7.html \ > + catman.8.html \ > + makewhatis.8.html \ > + man.cgi.8.html \ > + mandocd.8.html > + > +WWW_INCS =3D eqn.h.html \ > + html.h.html \ > + man.h.html \ > + manconf.h.html \ > + mandoc.h.html \ > + mandoc_aux.h.html \ > + mandoc_parse.h.html \ > + mansearch.h.html \ > + mdoc.h.html \ > + roff.h.html \ > + tbl.h.html \ > + tbl_int.h.html \ > + tbl_parse.h.html > + > +# =3D=3D=3D USER CONFIGURATION =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +include Makefile.local > + > +# =3D=3D=3D DEPENDENCY HANDLING =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D > + > +all: mandoc man demandoc soelim $(BUILD_TARGETS) Makefile.local > + > +install: base-install $(INSTALL_TARGETS) > + > +www: $(WWW_MANS) $(WWW_INCS) > + > +$(WWW_MANS) $(WWW_INCS): mandoc > + > +.PHONY: base-install cgi-install install www-install > +.PHONY: clean distclean depend > + > +include Makefile.depend > + > +# =3D=3D=3D TARGETS CONTAINING SHELL COMMANDS =3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +distclean: clean > + rm -f Makefile.local config.h config.h.old config.log config.log.old > + > +clean: > + rm -f libmandoc.a $(LIBMANDOC_OBJS) $(ALL_COBJS) > + rm -f mandoc man $(MAIN_OBJS) > + rm -f man.cgi $(CGI_OBJS) > + rm -f mandocd catman catman.o $(MANDOCD_OBJS) > + rm -f demandoc $(DEMANDOC_OBJS) > + rm -f soelim soelim.o > + rm -f $(WWW_MANS) $(WWW_INCS) mandoc*.tar.gz mandoc*.sha256 > + rm -f Makefile.tmp1 Makefile.tmp2 > + rm -rf *.dSYM > + > +base-install: mandoc demandoc soelim > + mkdir -p $(DESTDIR)$(BINDIR) > + mkdir -p $(DESTDIR)$(SBINDIR) > + mkdir -p $(DESTDIR)$(MANDIR)/man1 > + mkdir -p $(DESTDIR)$(MANDIR)/man5 > + mkdir -p $(DESTDIR)$(MANDIR)/man7 > + mkdir -p $(DESTDIR)$(MANDIR)/man8 > + mkdir -p $(DESTDIR)$(MISCDIR) > + $(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR) > + $(INSTALL_PROGRAM) soelim $(DESTDIR)$(BINDIR)/$(BINM_SOELIM) > + cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_MAN) > + cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_APROPOS) > + cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_WHATIS) > + cd $(DESTDIR)$(SBINDIR) && \ > + $(LN) ${BIN_FROM_SBIN}/mandoc $(BINM_MAKEWHATIS) > + $(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1 > + $(INSTALL_MAN) soelim.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1 > + $(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 > + $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 > + cd $(DESTDIR)$(MANDIR)/man1 && $(LN) $(BINM_APROPOS).1 $(BINM_WHATIS).1 > + $(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5 > + $(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5 > + $(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7 > + $(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7 > + $(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7 > + $(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7 > + $(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7 > + $(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7 > + $(INSTALL_MAN) makewhatis.8 \ > + $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8 > + $(INSTALL_DATA) mandoc.css $(DESTDIR)$(MISCDIR) > + > +lib-install: libmandoc.a > + mkdir -p $(DESTDIR)$(LIBDIR) > + mkdir -p $(DESTDIR)$(INCLUDEDIR) > + mkdir -p $(DESTDIR)$(MANDIR)/man3 > + $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR) > + $(INSTALL_LIB) eqn.h man.h mandoc.h mandoc_aux.h mandoc_parse.h \ > + mdoc.h roff.h tbl.h $(DESTDIR)$(INCLUDEDIR) > + $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \ > + mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3 > + > +cgi-install: man.cgi > + mkdir -p $(DESTDIR)$(CGIBINDIR) > + mkdir -p $(DESTDIR)$(HTDOCDIR) > + $(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR) > + $(INSTALL_DATA) mandoc.css $(DESTDIR)$(HTDOCDIR) > + > +catman-install: mandocd catman > + mkdir -p $(DESTDIR)$(SBINDIR) > + mkdir -p $(DESTDIR)$(MANDIR)/man8 > + $(INSTALL_PROGRAM) mandocd $(DESTDIR)$(SBINDIR) > + $(INSTALL_PROGRAM) catman $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN) > + $(INSTALL_MAN) mandocd.8 $(DESTDIR)$(MANDIR)/man8 > + $(INSTALL_MAN) catman.8 $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8 > + > +uninstall: > + rm -f $(DESTDIR)$(BINDIR)/mandoc > + rm -f $(DESTDIR)$(BINDIR)/demandoc > + rm -f $(DESTDIR)$(BINDIR)/$(BINM_SOELIM) > + rm -f $(DESTDIR)$(BINDIR)/$(BINM_MAN) > + rm -f $(DESTDIR)$(BINDIR)/$(BINM_APROPOS) > + rm -f $(DESTDIR)$(BINDIR)/$(BINM_WHATIS) > + rm -f $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS) > + rm -f $(DESTDIR)$(MANDIR)/man1/mandoc.1 > + rm -f $(DESTDIR)$(MANDIR)/man1/demandoc.1 > + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1 > + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 > + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 > + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1 > + rm -f $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5 > + rm -f $(DESTDIR)$(MANDIR)/man5/mandoc.db.5 > + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7 > + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7 > + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7 > + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7 > + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7 > + rm -f $(DESTDIR)$(MANDIR)/man7/mandoc_char.7 > + rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8 > + rm -f $(DESTDIR)$(CGIBINDIR)/man.cgi > + rm -f $(DESTDIR)$(HTDOCDIR)/mandoc.css > + rm -f $(DESTDIR)$(SBINDIR)/mandocd > + rm -f $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN) > + rm -f $(DESTDIR)$(MANDIR)/man8/mandocd.8 > + rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8 > + rm -f $(DESTDIR)$(LIBDIR)/libmandoc.a > + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc.3 > + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_escape.3 > + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_malloc.3 > + rm -f $(DESTDIR)$(MANDIR)/man3/mansearch.3 > + rm -f $(DESTDIR)$(MANDIR)/man3/mchars_alloc.3 > + rm -f $(DESTDIR)$(MANDIR)/man3/tbl.3 > + rm -f $(DESTDIR)$(INCLUDEDIR)/eqn.h > + rm -f $(DESTDIR)$(INCLUDEDIR)/man.h > + rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc.h > + rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_aux.h > + rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_parse.h > + rm -f $(DESTDIR)$(INCLUDEDIR)/mdoc.h > + rm -f $(DESTDIR)$(INCLUDEDIR)/roff.h > + rm -f $(DESTDIR)$(INCLUDEDIR)/tbl.h > + [ ! -e $(DESTDIR)$(INCLUDEDIR) ] || rmdir $(DESTDIR)$(INCLUDEDIR) > + > +regress: all > + cd regress && ./regress.pl > + > +regress-clean: > + cd regress && ./regress.pl . clean > + > +Makefile.local config.h: configure $(TESTSRCS) > + @echo "$@ is out of date; please run ./configure" > + @exit 1 > + > +libmandoc.a: $(MANDOC_COBJS) $(LIBMANDOC_OBJS) > + $(AR) rs $@ $(MANDOC_COBJS) $(LIBMANDOC_OBJS) > + > +mandoc: $(MAIN_OBJS) libmandoc.a > + $(CC) -o $@ $(LDFLAGS) $(MAIN_OBJS) libmandoc.a $(LDADD) > + > +man: mandoc > + $(LN) mandoc man > + > +man.cgi: $(CGI_OBJS) libmandoc.a > + $(CC) $(STATIC) -o $@ $(LDFLAGS) $(CGI_OBJS) libmandoc.a $(LDADD) > + > +mandocd: $(MANDOCD_OBJS) libmandoc.a > + $(CC) -o $@ $(LDFLAGS) $(MANDOCD_OBJS) libmandoc.a $(LDADD) > + > +catman: catman.o libmandoc.a > + $(CC) -o $@ $(LDFLAGS) catman.o libmandoc.a $(LDADD) > + > +demandoc: $(DEMANDOC_OBJS) libmandoc.a > + $(CC) -o $@ $(LDFLAGS) $(DEMANDOC_OBJS) libmandoc.a $(LDADD) > + > +soelim: $(SOELIM_COBJS) soelim.o > + $(CC) -o $@ $(LDFLAGS) $(SOELIM_COBJS) soelim.o > + > +# --- maintainer targets --- > + > +www-install: www > + $(INSTALL_DATA) mandoc.css $(HTDOCDIR) > + $(INSTALL_DATA) $(WWW_MANS) $(HTDOCDIR)/man > + $(INSTALL_DATA) $(WWW_INCS) $(HTDOCDIR)/includes > + > +depend: config.h > + ./configure -depend > + mkdep -f Makefile.tmp1 $(CFLAGS) $(SRCS) > + perl -e 'undef $$/; $$_ =3D <>; s|/usr/include/\S+||g; \ > + s|\\\n||g; s| +| |g; s| $$||mg; print;' \ > + Makefile.tmp1 > Makefile.tmp2 > + rm Makefile.tmp1 > + mv Makefile.tmp2 Makefile.depend > + > +regress-distclean: > + @find regress \ > + -name '.#*' -o \ > + -name '*.orig' -o \ > + -name '*.rej' -o \ > + -name '*.core' \ > + -exec rm -i {} \; > + > +regress-distcheck: > + @find regress ! -type d ! -type f > + @find regress -type f \ > + ! -path '*/CVS/*' \ > + ! -name Makefile \ > + ! -name Makefile.inc \ > + ! -name '*.in' \ > + ! -name '*.out_ascii' \ > + ! -name '*.out_utf8' \ > + ! -name '*.out_html' \ > + ! -name '*.out_markdown' \ > + ! -name '*.out_lint' \ > + ! -path regress/regress.pl \ > + ! -path regress/regress.pl.1 > + > +dist: mandoc-$(VERSION).sha256 > + > +mandoc-$(VERSION).sha256: mandoc-$(VERSION).tar.gz > + sha256 mandoc-$(VERSION).tar.gz > $@ > + > +mandoc-$(VERSION).tar.gz: $(DISTFILES) > + ls regress/*/*/*.mandoc_* && exit 1 || true > + mkdir -p .dist/mandoc-$(VERSION)/ > + $(INSTALL) -m 0644 $(DISTFILES) .dist/mandoc-$(VERSION) > + cp -pR regress .dist/mandoc-$(VERSION) > + find .dist/mandoc-$(VERSION)/regress \ > + -type d -name CVS -print0 | xargs -0 rm -rf > + chmod 755 .dist/mandoc-$(VERSION)/configure > + ( cd .dist/ && tar zcf ../$@ mandoc-$(VERSION) ) > + rm -rf .dist/ > + > +dist-install: dist > + $(INSTALL_DATA) mandoc-$(VERSION).tar.gz mandoc-$(VERSION).sha256 \ > + $(HTDOCDIR)/snapshots > + > +# =3D=3D=3D SUFFIX RULES =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +.SUFFIXES: .1 .3 .5 .7 .8 .h > +.SUFFIXES: .1.html .3.html .5.html .7.html .8.html .h.html > + > +.h.h.html: > + highlight -I $< > $@ > + > +.1.1.html .3.3.html .5.5.html .7.7.html .8.8.html: > + ./mandoc -Thtml -Wwarning,stop \ > + -O > 'style=3D/mandoc.css,man=3D/man/%N.%S.html;https://man.openbsd.org/%N.%S,= includes=3D/includes/%I.html' \ > + $< > $@ >=20 make installworld seems to fail (at least for me on several CURRENT boxes) = at: [...] install: link /usr/share/man/man9/MLINKS+=3DVOP_ACCESS.9.gz -> /usr/share/man/man9/VOP_ACCESSX.9.gz: No such file or directory *** Error c= ode 71 Stop. make[6]: stopped making "install" in /usr/src/share/man/man9 *** Error code 1 Stop. make[5]: stopped making "install" in /usr/src/share/man *** Error code 1 Stop. make[4]: stopped making "install" in /usr/src/share *** Error code 1 Stop. make[3]: stopped making "install" in /usr/src *** Error code 1 [...] Kind regards oh --=20 A FreeBSD user --Sig_/0UXtACRchGVMaX5T7nZrGFr Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRQheDybVktG5eW/1Kxzvs8OqokrwUCaNrU9QAKCRCxzvs8Oqok rxNuAP48FvjfIuXiGmcc9wncNB2IK6ltoQcKyIuo2XniuW1xbgEA1vd7seW0a8v1 CoOmxsvRykAFNuFy9uiJaViuCP28kAA= =Qxet -----END PGP SIGNATURE----- --Sig_/0UXtACRchGVMaX5T7nZrGFr-- From nobody Mon Sep 29 18:58:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cb9Ss3M6bz68gYY; Mon, 29 Sep 2025 18:58:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb9Ss2vb0z3ltN; Mon, 29 Sep 2025 18:58:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759172317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EgheF/37sdqNYuv8tEgeEeMWyIIoCqrtEoboxMgzip4=; b=jYaaKO/20uA81D6X/749FWAf+9EpduhcgB6VKS+uIZNfcVAfANYpsru7367lYnJGGmZEiU 90qJx5XNRrA3FtjkEmRvb+4UUx1X7Z5zdy1ESZ8B8kyALYdR3zBPlxaxX5EN8VgZwgoyUn EwpKS9XAwmgUVIhlDBGYFkaCGRK6GlS/KZkH92+MatAxuyy5T2QY0QJ7sSry4T07IzXVPD BSIx7webcImvZuTgLHkNXJx4oq/gWYS2rj1Fn6IoeTtsxCX9qqTm8TVgmoOomSulfcwnyO XPzGpJQukK+/Pf4bizGwOCW4JBkZH7OPgSocSjRwr//fRoPJ14wOgtDNvU9c2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759172317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EgheF/37sdqNYuv8tEgeEeMWyIIoCqrtEoboxMgzip4=; b=yAB4a94QNhyt7qbOYSiG4iVYbJNt3g8C5yw0GJvdr8plbrQGNqsSi9RUhXArzj/7Z0EYvA k8qgGBEYPEIUgLbxuuXXwmgAxWkNlS/enlmwPWgc6IDfWf/SkUnnm7xfFBz9MG/isAfiZH +oIdcBPPeWgFseOYJ46gX3kyMeJ+O8nlXWWkgrkHy5fkthOOP0yZW5XXDPDZWkYsWYNqaK wZXuaxMsq27NOz5bUjRDkRE9EnrhjiCsdoi9lQKLviKV9Kiji0NzDa5cDuFk7yMZx4p5QL vizOQ5Fk/CsNmRkSmSZbEgSLjL8174+VWteZOJIc4hAcip9zEHDTA2Mra3R2ww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759172317; a=rsa-sha256; cv=none; b=dKQuUd49h2WoLHnMq0bAuASApw2r6Pk46skRp+dKHNVzPwdM2MRcY0oecnyG6VCAR8MBJ9 e6gt2mMaBvjcp0IUJ1FEZPGcG4PedGBVVgbjHcWVCXCN8m0qdNlk6blvE2JpHYtHzmDQWF 2m4V5QyWv7on+FIE138x6HL5l5mxK7e4nU20RUNKk8dzMRV4otQt4y7W6vDMa8W5VdDqWT yuRiVKs1a7VeUjAN8AcK1dsRZs8zH1JZ/jjbj5M92UIkRGGvpgFQPmlyN0QJGHTMbUbVSd r0bFvG94AbwAUMOEgKyp5cfnubjhiTjC1ze5Lq5CEsx0T+g5W4xM/Lz6qppR0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cb9Ss29Xzz1GWZ; Mon, 29 Sep 2025 18:58:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TIwbdD013499; Mon, 29 Sep 2025 18:58:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TIwbdu013496; Mon, 29 Sep 2025 18:58:37 GMT (envelope-from git) Date: Mon, 29 Sep 2025 18:58:37 GMT Message-Id: <202509291858.58TIwbdu013496@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: c87a9f51a0de - main - share/man/man9: Fix compilation 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c87a9f51a0debf707cb4fc9a5e3b4425b08d154d Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=c87a9f51a0debf707cb4fc9a5e3b4425b08d154d commit c87a9f51a0debf707cb4fc9a5e3b4425b08d154d Author: Olivier Certner AuthorDate: 2025-09-29 18:58:03 +0000 Commit: Olivier Certner CommitDate: 2025-09-29 18:58:03 +0000 share/man/man9: Fix compilation I goofed in the previous commit. Fixes: 05e5de00b9ea ("vn_fullpath.9: Add missing links for described functions") MFC after: 3 days Event: EuroBSDCon 2025 Sponsored by: The FreeBSD Foundation --- share/man/man9/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 7cd306702cc1..3bccc92572d6 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -2457,7 +2457,7 @@ MLINKS+=vm_page_wire.9 vm_page_unwire.9 \ vm_page_wire.9 vm_page_wire_mapped.9 MLINKS+=vn_fullpath.9 vn_fullpath_jail.9 \ vn_fullpath.9 vn_fullpath_global.9 \ - vn_fullpath.9 vn_fullpath_hardlink.9 \ + vn_fullpath.9 vn_fullpath_hardlink.9 MLINKS+=VOP_ACCESS.9 VOP_ACCESSX.9 MLINKS+=VOP_ATTRIB.9 VOP_GETATTR.9 \ VOP_ATTRIB.9 VOP_SETATTR.9 \ From nobody Mon Sep 29 19:11: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 4cb9mG36KQz68hLW; Mon, 29 Sep 2025 19:11:58 +0000 (UTC) (envelope-from christos@freebsd.org) Received: from margiolis.net (mail.margiolis.net [95.179.159.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cb9mF4lnWz3mxS; Mon, 29 Sep 2025 19:11:57 +0000 (UTC) (envelope-from christos@freebsd.org) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=default; bh=karaMF1Ao+K3 RdVvsC78ZXLyaHaVnPHtIyUjVb6dE6s=; h=in-reply-to:references:subject:cc: to:from:date; d=margiolis.net; b=aHPPL/7euHw+kSJSbUIjFiY6QUfFHCgfMbFW5 JgDi+a8v5dK48TNaExzJaNS12AR7028bK+O41XNME7vt+7iilvOZEKlxlSqN9ejk2976/8 JlhL+7UJsluuzgFMgcYtY0gQjAnEJABZpUYsJy+WfcUfvCwthO6XoxTBlOWcr4ZQ= Received: from localhost (public-gprs552949.centertel.pl [37.225.23.54]) by margiolis.net (OpenSMTPD) with ESMTPSA id c70789a8 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 29 Sep 2025 13:11:54 -0600 (MDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 29 Sep 2025 21:11:53 +0200 Message-Id: From: "Christos Margiolis" To: "Peter Jeremy" Cc: , , Subject: Re: git: 9cab9fde5eda - main - virtual_oss: Port to base X-Mailer: aerc 0.21.0 References: <202509280958.58S9wrww083342@gitrepo.freebsd.org> In-Reply-To: X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20473, ipnet:95.179.144.0/20, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cb9mF4lnWz3mxS On Mon Sep 29, 2025 at 11:58 AM CEST, Peter Jeremy wrote: > On 2025-Sep-28 09:58:53 +0000, Christos Margiolis = wrote: >>The branch main has been updated by christos: >> >>URL: https://cgit.FreeBSD.org/src/commit/?id=3D9cab9fde5edad9b409dd2317a2= aec7815e6d6bed >> >>commit 9cab9fde5edad9b409dd2317a2aec7815e6d6bed >>Author: Christos Margiolis >>AuthorDate: 2025-09-28 09:56:52 +0000 >>Commit: Christos Margiolis >>CommitDate: 2025-09-28 09:56:52 +0000 >> >> virtual_oss: Port to base > > This fails to compile if "WITHOUT_BLUETOOTH=3Dyes" is specified (see belo= w) > because bluetooth.h isn't available (as expected). It looks like > virtual_oss isn't taking that option into account when working out what > to compile. > > # Meta data file /usr/obj/usr/src/arm64.aarch64/usr.sbin/virtual_oss/virt= ual_bt_speaker/bt_speaker.pieo.meta > CMD cc -target aarch64-unknown-freebsd16.0 --sysroot=3D/usr/obj/usr/src/a= rm64.aarch64/tmp -B/usr/obj/usr/src/arm64.aarch64/tmp/usr/bin -fpie -DPIC = -O2 -pipe -fno-common -I/usr/src/usr.sbin/virtual_oss/virtual_oss -I/usr/= src/lib/virtual_oss/bt -mcpu=3Dcortex-a53 -fPIE -g -gz=3Dzlib -std=3Dgnu17= -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Werror = -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissin= g-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wsw= itch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Wnested-ex= terns -Wold-style-definition -Wno-pointer-sign -Wdate-time -Wmissing-variab= le-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-u= nused-const-variable -Wno-error=3Dunused-but-set-parameter -Wno-error=3Dcas= t-function-type-mismatch -Qunused-arguments -c /usr/src/usr.sbin/virt= ual_oss/virtual_bt_speaker/bt_speaker.c -o bt_speaker.pieo > CMD=20 > CWD /usr/obj/usr/src/arm64.aarch64/usr.sbin/virtual_oss/virtual_bt_speake= r > TARGET bt_speaker.pieo > OODATE /usr/src/usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c > -- command output -- > /usr/src/usr.sbin/virtual_oss/virtual_bt_speaker/bt_speaker.c:45:10: fata= l error: 'bluetooth.h' file not found > 45 | #include > | ^~~~~~~~~~~~~ > 1 error generated. > > *** Error code 1 I haven't had time to test yet, but I will try tomorrow. Does the build work if you build virtual_bt_speaker(8) conditionally in the Makefile (i.e., usr.sbin/virtual_oss/Makefile)? Christos From nobody Mon Sep 29 19:46: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 4cbBWq4Nn0z68ktB; Mon, 29 Sep 2025 19:46:15 +0000 (UTC) (envelope-from olivier.freebsd@free.fr) Received: from smtp3-g21.free.fr (smtp3-g21.free.fr [IPv6:2a01:e0c:1:1599::12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbBWq1hd6z3qnt; Mon, 29 Sep 2025 19:46:15 +0000 (UTC) (envelope-from olivier.freebsd@free.fr) Authentication-Results: mx1.freebsd.org; none Received: from ehlo.thunderbird.net (unknown [92.184.107.102]) (Authenticated sender: olivier.freebsd@free.fr) by smtp3-g21.free.fr (Postfix) with ESMTPSA id 6E4DC13F8A2; Mon, 29 Sep 2025 21:46:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1759175167; bh=G8NsM29oJucS0Q+k0XgxmWgN9l7WWjrlluv2c3e8WfY=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=vazb0mIgVzoqTpfWVe8fqDha9LcfSbDcOwRJ/c1b0HFuZzCjJJynPsiCZEacVGDjd Xcm7l7ufDOmGInhr3c/lBknhZWDExeQRYlGInYUsGgyzzDxDMjtgqi1c30Smy6VUIf w87JVb9Bfo+z+U37K5kLBQQwyBkEWhzRKQPhKEJT530rxj7cI0hz8HD+j2r7AjBSTi 8n3dAnyamKn5QUws4eBJ9FbIhjfGnUjuDFBI73DiUEZmhdjpoqrlRoAi+DrX2IrvED +4L+zp/pGuoS9FWLicbxW9ZNwxkolKSUF5sK+Prv8fwSWv0gVxtHMT3M/WkuONyGI1 ORngN4w6v2mXg== Date: Mon, 29 Sep 2025 21:46:00 +0200 From: Olivier Certner To: A FreeBSD User , Alexander Ziaee CC: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: =?US-ASCII?Q?Re=3A_git=3A_59fc2b0166f7_-_main_-_mandoc=3A_?= =?US-ASCII?Q?Vendor_import_of_upstream__at_2025-09-26?= In-Reply-To: <20250929205029.53a83dde@thor.sb211.local> References: <202509291734.58THY9VL059625@gitrepo.freebsd.org> <20250929205029.53a83dde@thor.sb211.local> Message-ID: <6924CA21-A056-4DE3-99F8-86FBCA6F5188@free.fr> 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: multipart/alternative; boundary=----GUKP4165RYETKP53JBXLAISAFEXMT1 Content-Transfer-Encoding: 7bit X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:12322, ipnet:2a01:e00::/26, country:FR] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cbBWq1hd6z3qnt ------GUKP4165RYETKP53JBXLAISAFEXMT1 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Was my bad, and has been fixed ~45 min ago=2E Sorry for the inconvenience=2E -- Olivier Certner ------GUKP4165RYETKP53JBXLAISAFEXMT1 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi,

Was my bad, and has= been fixed ~45 min ago=2E

Sorry for the inconvenience=2E

--<= br>Olivier Certner
------GUKP4165RYETKP53JBXLAISAFEXMT1-- From nobody Mon Sep 29 20:01: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 4cbBs16YCCz68lmj; Mon, 29 Sep 2025 20:01:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbBs13bnTz3sr3; Mon, 29 Sep 2025 20:01:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759176069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QsANYcVJwehGxU15qvL3qQFTO+OPLwscsMnR01KfNW4=; b=M6O39zs3KptReZNsTI5F0961IykbtlP0cIMKKVwkqhYHZqNCTHMWduwOqJ8zxVmFeaDIRX Se/2N3xeQxVqdOassc7BT7uFWStEFZIWkY5Ska0msyU+07Q0jZNGA1DreK4I0mMvKCylU8 +XOu3sdwvdkKT4TRkth7s07NY9vUdwYTjtUYMEsiEZ0z+MwXDoB9tCYSyYena6RfM247KY G1gMxGVoGpgTXZxqtVpzXT58DkEU9ApG73WcL6EgUYtnsPl8ipXyffgRSVjQrhyqUFIbgb bkgQ92kKyr8onFHpIZJ9hILTr6uVepVjGDGD43GyJ5v30cPrG8/SuUDVVIwfAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759176069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QsANYcVJwehGxU15qvL3qQFTO+OPLwscsMnR01KfNW4=; b=R7iR8kqd2DJ7nTpXAxP8MTax0g6LDDsg9330Db6QdRbEjXcXotJGMv1KJPTqIzWpk0GBsd hubPAPl8/mbW/uOD1xL3GUm7Qilw4nxfjkw58RQyg7U6Xast0uB0U/njZ+yxIVIp8Qpo98 Kms73u09V+B6Yv0vGkb2A14H5ruMlWN+TJleUjJufSSNKgYD3RDuY9rWnIl19zvDwlpais XtJuM2e5rVY29CZyJDM/1cuMfIzYY9SEk23lZIpt2Cwzm6KNac8gDrwDft7a2r2Bo3/vej kuyIMXBGYPxG5AvRJ047DRRH6Hq9usHDDVnoxySuDtyW55L7Tx7GxtvQjzgmTw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759176069; a=rsa-sha256; cv=none; b=HcZiULYahyVnOTe5hD1J6Cmklhxh2BXyRXp9D1vGXvVKy1V8lTZcM5fAD1OTlrlexPg5yh nSdZVUVxrltqNBmv2UEDEOgIL+h1PymsVhWp5W0xl5m6MxNpnkGikxLBIKVZ2v2BeL7O3Z WbLV6KWOeKt2vheSO9OmEPLbEYJaZzG9UZWcWGLZgU/WWZRKp/vaJpj3dcDSj/lxQYu7po ui077AIJ24Oa0KnKCtx6cFQlxnhnObQ3+bDImrc9zcs3woVHPhjGnvVP4KdCeFdyvOM6QD t1vrzN2sIEgAojfGB306m7OnQ+Fvha+Xoq21mWYgWldAIqRHIzjAgNUd2oV1sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbBs13CSJz1Jkl; Mon, 29 Sep 2025 20:01:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TK198D038837; Mon, 29 Sep 2025 20:01:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TK19JK038834; Mon, 29 Sep 2025 20:01:09 GMT (envelope-from git) Date: Mon, 29 Sep 2025 20:01:09 GMT Message-Id: <202509292001.58TK19JK038834@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 17be686a39a0 - main - aac.4: Improve HARDWARE introductory sentance 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: 17be686a39a07958f61e42c4b5c797bb1d1e9895 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=17be686a39a07958f61e42c4b5c797bb1d1e9895 commit 17be686a39a07958f61e42c4b5c797bb1d1e9895 Author: Alexander Ziaee AuthorDate: 2025-09-29 19:58:48 +0000 Commit: Alexander Ziaee CommitDate: 2025-09-29 19:59:47 +0000 aac.4: Improve HARDWARE introductory sentance For the improvement of the hardware release notes. While here, tag SPDX. MFC after: 3 days --- share/man/man4/aac.4 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/share/man/man4/aac.4 b/share/man/man4/aac.4 index 7a7d0350dcdb..f4b431cc6b4f 100644 --- a/share/man/man4/aac.4 +++ b/share/man/man4/aac.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2000 Scott Long .\" All rights reserved. .\" @@ -21,7 +24,7 @@ .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. -.Dd July 10, 2009 +.Dd September 29, 2025 .Dt AAC 4 .Os .Sh NAME @@ -83,9 +86,10 @@ Linux-compatible interface for the management device will be enabled and will allow Linux-based management applications to control the card. .Sh HARDWARE -Controllers supported by the +The .Nm -driver include: +driver supports the following Parallel SCSI, SATA, and 3G SAS +RAID controllers from the Adaptec AAC family: .Pp .Bl -bullet -compact .It From nobody Mon Sep 29 21:16:59 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbDXW3Q29z68rlG; Mon, 29 Sep 2025 21:16:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbDXW2t3dz41pK; Mon, 29 Sep 2025 21:16:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759180619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CHCZWKeOIXJPKACjH3/zUq2zQXPzpqCjqOH13RhC7CU=; b=fsxKhd767ReRX0GdipF5qohs/dJl22LDJRhlTfvUs+Fxmptyizs/E3rVju1fCVG6guuwB+ qHBL4vqGuSxyZ5KwM8W4wzWmquHxPKNzy+/+nbLz7af542YdvvcpDuWdmenbYXfJRJ5gNp mChz7BPWk2zPnxMp1ayoRh25ZtuG6XT8jXwFiNWGHnHDsBifeUD+TlnbB7nP+wic6cGy/L u04hDhak7lDsc43gN8yx3/OQMy3gt3Rw48VIc1md4ZmdCrRM4pbfm4oeV6+WxTaU7GtbK/ 3i3ZA83Zrf4jBV2YhD+w17otrURQ0FNGhHOWIvh3TOvCcz+YqNKM8MyL3UoMFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759180619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CHCZWKeOIXJPKACjH3/zUq2zQXPzpqCjqOH13RhC7CU=; b=fH8pMs/sRP2dcL7XL7qJoebejuz/4D6/Q/qhkqJy7DOgOzQZ/KyDPUkLUFR81QkkDPYDEi Yywt6ck0mDi9Ncv9cR6c2mpFc4zk0esRRjhJ9/vj2B5l5CuoEvLHVocOHOMsuzj8fIZTiX adRwEbItkH/yEsZaal/3J7zFcDTKLa0/kbh1ljXB9hTPWB+Wj2zx6zFecN2dkqbeTjoad2 /MVth3vQ21AkKUMDTg3jwzsIlFBwoQT8UokI/0ZsDE/4Al1JKqcO/PW+9TRVPB+c3aToLO 5gl+lgzdU3ejUeCdiuWBNZKWDTWNUmRiyq++4zyoG9sIr2RcJL3exezIhBhPeA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759180619; a=rsa-sha256; cv=none; b=mciQ6dl/91WjLPp0ahlFUW9lH3bKEL7yUZwTjxAD9DQtgKMkd3g2QImYaOlJFLh1xJRvxr x+xuI7WdATa3nDKWRkTxJoC0L6JukMF9WUSH5XJy7i5g5HH9h3LueMLYH3NdI+cYO9Eqvd K7w7lzbeQzyaExahQdr4MC+aHUa3cEq2vCwMEJaUmknJV27zXzMR0I/lg2waPKmK4tCRgL v1HI+rOEBmtRLpqKHer8F5hXucCednWnSsVY3IIEBu0bcJjktq0sE7ov9jJWss5U93M2S8 ImWyDMRJ6u32tCV6iafL6INXc4aXcuAfa09EBO+LINw+AdmOpwwlgG3lKaa9Ug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbDXW2SHQz1LdK; Mon, 29 Sep 2025 21:16:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TLGxMQ078769; Mon, 29 Sep 2025 21:16:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TLGxWx078766; Mon, 29 Sep 2025 21:16:59 GMT (envelope-from git) Date: Mon, 29 Sep 2025 21:16:59 GMT Message-Id: <202509292116.58TLGxWx078766@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 4e7a375804e5 - main - IfAPI: Added missing accessor for if_home_vnet List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e7a375804e5ad4b244ce9a035fa971cbf2f0944 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=4e7a375804e5ad4b244ce9a035fa971cbf2f0944 commit 4e7a375804e5ad4b244ce9a035fa971cbf2f0944 Author: ItzBlinkzy AuthorDate: 2025-09-28 17:21:41 +0000 Commit: Kristof Provost CommitDate: 2025-09-29 21:15:55 +0000 IfAPI: Added missing accessor for if_home_vnet Reviewed by: kp Signed-off-by: Kevin Irabor --- share/man/man9/ifnet.9 | 10 +++++++++- sys/net/if.c | 6 ++++++ sys/net/if_var.h | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/share/man/man9/ifnet.9 b/share/man/man9/ifnet.9 index 3c45e4f29e2d..ac059b59eb81 100644 --- a/share/man/man9/ifnet.9 +++ b/share/man/man9/ifnet.9 @@ -26,7 +26,7 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 10, 2024 +.Dd September 29, 2025 .Dt IFNET 9 .Os .Sh NAME @@ -253,6 +253,8 @@ .Fn if_getlladdr "const if_t ifp" .Ft struct vnet * .Fn if_getvnet "const if_t ifp" +.Ft struct vnet * +.Fn if_gethomevnet "const if_t ifp" .Ft void * .Fn if_gethandle "u_char" .Ft void @@ -516,6 +518,12 @@ or A pointer to the virtual network stack instance. This is initialized by .Fn if_attach . +.It Fn if_gethomevnet +.Pq Vt "struct vnet *" +A pointer to the parent virtual network stack, +where this struct ifnet originates from. +This is initialized by +.Fn if_attach . .It Fn if_gethandle .It Fn if_vlancap .It Fn if_getcounter diff --git a/sys/net/if.c b/sys/net/if.c index b6a798aa0fab..6a68d627c07f 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -5116,6 +5116,12 @@ if_getvnet(if_t ifp) return (ifp->if_vnet); } +struct vnet * +if_gethomevnet(if_t ifp) +{ + return (ifp->if_home_vnet); +} + void * if_getafdata(if_t ifp, int af) { diff --git a/sys/net/if_var.h b/sys/net/if_var.h index f2df612b19c1..e71fe798fdec 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -648,6 +648,7 @@ u_int16_t if_getvtag(struct mbuf *m); int if_vlantrunkinuse(if_t ifp); char *if_getlladdr(const if_t ifp); struct vnet *if_getvnet(const if_t ifp); +struct vnet *if_gethomevnet(const if_t ifp); void *if_gethandle(u_char); void if_vlancap(if_t ifp); int if_transmit(if_t ifp, struct mbuf *m); From nobody Mon Sep 29 21:55:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbFP71jdYz68vQ9; Mon, 29 Sep 2025 21:55:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbFP71RTDz4799; Mon, 29 Sep 2025 21:55:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759182939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0e+2B1AA66k/QJcFNdRgpgNn1ztlvL0iB2WtX4Df6ug=; b=g5386OMizuJcvfWJjvPDzr6VQjbgeTTambDLNegpPqpXLzOwNKQ4eZLi9ecZOtcMxkCVh0 rOwauuFIoAD/fRHr4KPH4T+kJYPwSwlGveERoaFCPXzmHlwNFOQJOUeP9xUIV9dVR6C6fX zI90zm3XR3Tj5Q2D9fzlO58IYjkDv6sQKJ91axLtv2+IoNXv1gjBprPdFHkgneQ7SPjjbh xsB/zj7x1tdsUjjewzYEhrDZa4tYUKvzOCfR46Zl5DK0h0pHypq/cSPnq6fmZIAZNeaQJf 4Bd2GAbdURO4twwovgPodZpcTdYl5VZJ85HUrxaKJStY4V5X+8Qxh2eZzQCkig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759182939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0e+2B1AA66k/QJcFNdRgpgNn1ztlvL0iB2WtX4Df6ug=; b=mJgKPzIEA1sWFKkH4W/UHxzl/X9bdV5em2cAZL95AAMcaiBWdIBTi0AcEuHgyz1Es4PN5d ENiXvT6BD1nMkg0zpnyG42iBeVenz2Fb+WyK+xvW4BjbCzNgdkv70BZyK5nLanPdyLWbUa fcmPrsAbVhscQpu38anVZPG8QhPuvKs+8F+5MseX8AV3mWIAIUzaVLWI9Uw5mGLkW6zjOw YSha1BrR5j5VPvUVaRV3Ts2IaiMy1670negnk3fYiLIo/ZeuTb7XdF/eL0VIxJ//F6q8H3 k3ZhndJUNXTvP5vY+X+o8VedueIDDBMtMyoS9ZTZWPkRRG3rCeD90g6kWNkJCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759182939; a=rsa-sha256; cv=none; b=XfgTmHZpxemPNhzDLEBq06L4f5/Qt/cVEvY5+jGgvmnhvQXr+NQv5zRhtx2ezLy0f4o76y zuIA/P9SA+v3+fYCMipUsEYxueywJQcLIeifin4EX+2COPu4t+zCtXGiJUi+rWvoUqTSzq RmOt/Lsl6n06tPWe6dYVTq6ITn7i6rUa+97ZOfA8T/sZPZGiDPPIQc9tFAq1z3njR5XtJR S3tUCBrN4q1qQ3RfGLrDKIXgLAdKnM0ZrvJnbfjfhY9/h5lGckthe8Muf8Z1+k+ckVnAk3 Yh8EMVtmgAby5V3JFeaN+zc4TQQJMnTy8xPhWI23YrOMEEqivMexKt98Q1PaVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbFP710k2z1MXx; Mon, 29 Sep 2025 21:55:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TLtdXT052860; Mon, 29 Sep 2025 21:55:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TLtdI9052857; Mon, 29 Sep 2025 21:55:39 GMT (envelope-from git) Date: Mon, 29 Sep 2025 21:55:39 GMT Message-Id: <202509292155.58TLtdI9052857@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 614c8750ce11 - main - Remove ftpd(8) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 614c8750ce116865953916b8b5bab2467ee94187 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=614c8750ce116865953916b8b5bab2467ee94187 commit 614c8750ce116865953916b8b5bab2467ee94187 Author: Lexi Winter AuthorDate: 2025-09-29 20:26:26 +0000 Commit: Lexi Winter CommitDate: 2025-09-29 21:53:34 +0000 Remove ftpd(8) This was previously deprecated and is slated for removal in 15.0. Users who still need ftpd(8) can install the ftp/freebsd-ftpd port. Retain the ftp(d) PAM services since other FTP daemons use them. Update /etc/inetd.conf to point to /usr/local. Add ftpd to ObsoleteFiles, but do not list configuration files since users may want to preserve these to use with the freebsd-ftpd port. There is still some language in the manual referring to ftpd(8) which is relevant to the port, which has been retained but updated to reference the port. MFC after: 3 days Relnotes: yes Reviewed by: cperciva Differential Revision: https://reviews.freebsd.org/D52739 --- ObsoleteFiles.inc | 6 + UPDATING | 5 + contrib/tnftp/src/ftp.1 | 5 +- lib/libutil/login.conf.5 | 4 +- libexec/Makefile | 4 - libexec/ftpd/Makefile | 39 - libexec/ftpd/Makefile.depend | 21 - libexec/ftpd/Makefile.depend.options | 5 - libexec/ftpd/blacklist.c | 55 - libexec/ftpd/blacklist_client.h | 53 - libexec/ftpd/config.h | 280 -- libexec/ftpd/extern.h | 110 - libexec/ftpd/ftpchroot.5 | 118 - libexec/ftpd/ftpcmd.y | 1806 ------------- libexec/ftpd/ftpd.8 | 589 ----- libexec/ftpd/ftpd.c | 3448 ------------------------- libexec/ftpd/ftpusers | 28 - libexec/ftpd/logwtmp.c | 70 - libexec/ftpd/pathnames.h | 39 - libexec/ftpd/popen.c | 193 -- libexec/rc/rc.conf | 3 - libexec/rc/rc.d/Makefile | 6 - libexec/rc/rc.d/ftpd | 22 - release/tools/oci-image-notoolchain.conf | 1 - share/examples/etc/README.examples | 1 - share/man/man5/rc.conf.5 | 24 +- share/man/man5/src.conf.5 | 16 +- share/man/man7/hier.7 | 8 +- share/man/man7/security.7 | 1 - share/man/man8/intro.8 | 2 - tools/build/mk/OptionalObsoleteFiles.inc | 7 - tools/build/options/WITHOUT_BLACKLIST_SUPPORT | 3 +- tools/build/options/WITHOUT_FTP | 4 +- tools/build/options/WITHOUT_PAM_SUPPORT | 7 +- usr.sbin/inetd/inetd.8 | 4 +- usr.sbin/inetd/inetd.conf | 4 +- usr.sbin/newsyslog/newsyslog.conf.d/Makefile | 7 - usr.sbin/syslogd/Makefile | 6 - 38 files changed, 32 insertions(+), 6972 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 785ab4913f8d..06aacea24c69 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,12 @@ # xargs -n1 | sort | uniq -d; # done +# 20250929: Remove ftpd(8) +OLD_FILES+=etc/rc.d/ftpd +OLD_FILES+=usr/libexec/ftpd +OLD_FILES+=usr/share/man/man5/ftpchroot.5.gz +OLD_FILES+=usr/share/man/man8/ftpd.8.gz + # 20250917: VREF macro removed OLD_FILES+=usr/share/man/man9/VREF.9.gz diff --git a/UPDATING b/UPDATING index 73d3eddc2941..1f30b6b0b8f3 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20250929: + The deprecated ftpd(8) has been removed. Users who still need ftpd + can install the ftp/freebsd-ftpd port. pkgbase users should remove + the orphaned FreeBSD-ftpd package. + 20250923: Several changes which affect pkgbase users (only): diff --git a/contrib/tnftp/src/ftp.1 b/contrib/tnftp/src/ftp.1 index 34a88c23520b..e9f09ddca8cc 100644 --- a/contrib/tnftp/src/ftp.1 +++ b/contrib/tnftp/src/ftp.1 @@ -58,7 +58,7 @@ .\" .\" @(#)ftp.1 8.3 (Berkeley) 10/9/94 .\" -.Dd May 10, 2008 +.Dd September 25, 2025 .Dt FTP 1 .Os .Sh NAME @@ -2325,8 +2325,7 @@ for an example of how to make this automatic. .Sh SEE ALSO .Xr getservbyname 3 , .Xr editrc 5 , -.Xr services 5 , -.Xr ftpd 8 +.Xr services 5 .Sh STANDARDS .Nm attempts to be compliant with: diff --git a/lib/libutil/login.conf.5 b/lib/libutil/login.conf.5 index 27f37fb5fc30..942f3ecd2661 100644 --- a/lib/libutil/login.conf.5 +++ b/lib/libutil/login.conf.5 @@ -17,7 +17,7 @@ .\" 5. Modifications may be freely made to this file providing the above .\" conditions are met. .\" -.Dd June 28, 2023 +.Dd September 25, 2025 .Dt LOGIN.CONF 5 .Os .Sh NAME @@ -496,7 +496,7 @@ lists. .Xr pam 3 , .Xr passwd 5 , .Xr ttys 5 , -.Xr ftpd 8 , +.Xr ftpd 8 Pq Pa ports/ftp/freebsd-ftpd , .Xr pam_passwdqc 8 .Sh HISTORY The file diff --git a/libexec/Makefile b/libexec/Makefile index 55e586434087..7ce78321f08e 100644 --- a/libexec/Makefile +++ b/libexec/Makefile @@ -54,10 +54,6 @@ SUBDIR+= fingerd _phttpget= phttpget .endif -.if ${MK_FTP} != "no" -SUBDIR+= ftpd -.endif - .if ${MK_MAIL} != "no" _comsat= comsat .endif diff --git a/libexec/ftpd/Makefile b/libexec/ftpd/Makefile deleted file mode 100644 index a040fa57f7d7..000000000000 --- a/libexec/ftpd/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -.include - -PACKAGE= ftpd - -CONFS= ftpusers -PROG= ftpd -MAN= ftpd.8 ftpchroot.5 -SRCS= ftpd.c ftpcmd.y logwtmp.c popen.c - -CFLAGS+=-DSETPROCTITLE -DLOGIN_CAP -DVIRTUAL_HOSTING -CFLAGS+=-I${.CURDIR} -YFLAGS= -WARNS?= 2 -WFORMAT=0 - -LIBADD= crypt md util - -.PATH: ${SRCTOP}/bin/ls -SRCS+= ls.c cmp.c print.c util.c -CFLAGS+=-Dmain=ls_main -I${SRCTOP}/bin/ls -LIBADD+= m - -.if ${MK_BLACKLIST_SUPPORT} != "no" -CFLAGS+= -DUSE_BLACKLIST -I${SRCTOP}/contrib/blocklist/include -SRCS+= blacklist.c -LIBADD+= blacklist -LDFLAGS+=-L${LIBBLACKLISTDIR} -.endif - -.if ${MK_INET6_SUPPORT} != "no" -CFLAGS+=-DINET6 -.endif - -.if ${MK_PAM_SUPPORT} != "no" -CFLAGS+=-DUSE_PAM -LIBADD+= pam -.endif - -.include diff --git a/libexec/ftpd/Makefile.depend b/libexec/ftpd/Makefile.depend deleted file mode 100644 index b6e94a3cf93c..000000000000 --- a/libexec/ftpd/Makefile.depend +++ /dev/null @@ -1,21 +0,0 @@ -# Autogenerated - do NOT edit! - -DIRDEPS = \ - include \ - include/arpa \ - include/xlocale \ - lib/${CSU_DIR} \ - lib/libc \ - lib/libcompiler_rt \ - lib/libcrypt \ - lib/libmd \ - lib/libutil \ - lib/msun \ - usr.bin/yacc.host \ - - -.include - -.if ${DEP_RELDIR} == ${_DEP_RELDIR} -# local dependencies - needed for -jN in clean tree -.endif diff --git a/libexec/ftpd/Makefile.depend.options b/libexec/ftpd/Makefile.depend.options deleted file mode 100644 index 5f186bb031f2..000000000000 --- a/libexec/ftpd/Makefile.depend.options +++ /dev/null @@ -1,5 +0,0 @@ -# This file is not autogenerated - take care! - -DIRDEPS_OPTIONS= BLACKLIST_SUPPORT PAM_SUPPORT - -.include diff --git a/libexec/ftpd/blacklist.c b/libexec/ftpd/blacklist.c deleted file mode 100644 index 0a45f9369074..000000000000 --- a/libexec/ftpd/blacklist.c +++ /dev/null @@ -1,55 +0,0 @@ -/*- - * Copyright (c) 2016 The FreeBSD Foundation - * - * This software was developed by Kurt Lidl under sponsorship from the - * FreeBSD Foundation. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. */ - - -#include -#include -#include -#include - -#include -#include "blacklist_client.h" - -static struct blacklist *blstate; -extern int use_blacklist; - -void -blacklist_init(void) -{ - - if (use_blacklist) - blstate = blacklist_open(); -} - -void -blacklist_notify(int action, int fd, const char *msg) -{ - - if (blstate == NULL) - return; - (void)blacklist_r(blstate, action, fd, msg); -} diff --git a/libexec/ftpd/blacklist_client.h b/libexec/ftpd/blacklist_client.h deleted file mode 100644 index 0b6805dc218e..000000000000 --- a/libexec/ftpd/blacklist_client.h +++ /dev/null @@ -1,53 +0,0 @@ -/*- - * Copyright (c) 2016 The FreeBSD Foundation - * - * This software was developed by Kurt Lidl under sponsorship from the - * FreeBSD Foundation. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. */ - - -#ifndef BLACKLIST_CLIENT_H -#define BLACKLIST_CLIENT_H - -#ifndef BLACKLIST_API_ENUM -enum { - BLACKLIST_AUTH_OK = 0, - BLACKLIST_AUTH_FAIL -}; -#endif - -#ifdef USE_BLACKLIST -void blacklist_init(void); -void blacklist_notify(int, int, const char *); - -#define BLACKLIST_INIT() blacklist_init() -#define BLACKLIST_NOTIFY(x, y, z) blacklist_notify(x, y, z) - -#else - -#define BLACKLIST_INIT() -#define BLACKLIST_NOTIFY(x, y, z) - -#endif - -#endif /* BLACKLIST_CLIENT_H */ diff --git a/libexec/ftpd/config.h b/libexec/ftpd/config.h deleted file mode 100644 index c5ca1f01e10e..000000000000 --- a/libexec/ftpd/config.h +++ /dev/null @@ -1,280 +0,0 @@ - - -/* config.h. Generated automatically by configure. */ -/* config.h.in. Generated automatically from configure.in by autoheader. */ -/* $Id: config.h.in,v 1.15 2001/04/28 07:11:46 lukem Exp $ */ - - -/* Define if the closedir function returns void instead of int. */ -/* #undef CLOSEDIR_VOID */ - -/* Define to empty if the keyword does not work. */ -/* #undef const */ - -/* Define if your C compiler doesn't accept -c and -o together. */ -/* #undef NO_MINUS_C_MINUS_O */ - -/* Define if your Fortran 77 compiler doesn't accept -c and -o together. */ -/* #undef F77_NO_MINUS_C_MINUS_O */ - -/* Define to `long' if doesn't define. */ -/* #undef off_t */ - -/* Define to the type of arg1 for select(). */ -/* #undef SELECT_TYPE_ARG1 */ - -/* Define to the type of args 2, 3 and 4 for select(). */ -/* #undef SELECT_TYPE_ARG234 */ - -/* Define to the type of arg5 for select(). */ -/* #undef SELECT_TYPE_ARG5 */ - -/* Define if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Define if the closedir function returns void instead of int. */ -/* #undef VOID_CLOSEDIR */ - -/* The number of bytes in a off_t. */ -#define SIZEOF_OFF_T 0 - -/* Define if you have the err function. */ -#define HAVE_ERR 1 - -/* Define if you have the fgetln function. */ -#define HAVE_FGETLN 1 - -/* Define if you have the flock function. */ -#define HAVE_FLOCK 1 - -/* Define if you have the fparseln function. */ -#define HAVE_FPARSELN 1 - -/* Define if you have the fts_open function. */ -#define HAVE_FTS_OPEN 1 - -/* Define if you have the getaddrinfo function. */ -#define HAVE_GETADDRINFO 1 - -/* Define if you have the getgrouplist function. */ -#define HAVE_GETGROUPLIST 1 - -/* Define if you have the getnameinfo function. */ -#define HAVE_GETNAMEINFO 1 - -/* Define if you have the getspnam function. */ -/* #undef HAVE_GETSPNAM */ - -/* Define if you have the getusershell function. */ -#define HAVE_GETUSERSHELL 1 - -/* Define if you have the inet_net_pton function. */ -#define HAVE_INET_NET_PTON 1 - -/* Define if you have the inet_ntop function. */ -#define HAVE_INET_NTOP 1 - -/* Define if you have the inet_pton function. */ -#define HAVE_INET_PTON 1 - -/* Define if you have the lockf function. */ -#define HAVE_LOCKF 1 - -/* Define if you have the mkstemp function. */ -#define HAVE_MKSTEMP 1 - -/* Define if you have the setlogin function. */ -#define HAVE_SETLOGIN 1 - -/* Define if you have the setproctitle function. */ -#define HAVE_SETPROCTITLE 1 - -/* Define if you have the sl_init function. */ -#define HAVE_SL_INIT 1 - -/* Define if you have the snprintf function. */ -#define HAVE_SNPRINTF 1 - -/* Define if you have the strdup function. */ -#define HAVE_STRDUP 1 - -/* Define if you have the strerror function. */ -#define HAVE_STRERROR 1 - -/* Define if you have the strlcat function. */ -#define HAVE_STRLCAT 1 - -/* Define if you have the strlcpy function. */ -#define HAVE_STRLCPY 1 - -/* Define if you have the strmode function. */ -#define HAVE_STRMODE 1 - -/* Define if you have the strsep function. */ -#define HAVE_STRSEP 1 - -/* Define if you have the strtoll function. */ -#define HAVE_STRTOLL 1 - -/* Define if you have the user_from_uid function. */ -#define HAVE_USER_FROM_UID 1 - -/* Define if you have the usleep function. */ -#define HAVE_USLEEP 1 - -/* Define if you have the vfork function. */ -#define HAVE_VFORK 1 - -/* Define if you have the vsyslog function. */ -#define HAVE_VSYSLOG 1 - -/* Define if you have the header file. */ -#define HAVE_ARPA_NAMESER_H 1 - -/* Define if you have the header file. */ -#define HAVE_DIRENT_H 1 - -/* Define if you have the header file. */ -#define HAVE_ERR_H 1 - -/* Define if you have the header file. */ -#define HAVE_FTS_H 1 - -/* Define if you have the header file. */ -#define HAVE_LIBUTIL_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_NDIR_H */ - -/* Define if you have the header file. */ -#define HAVE_PATHS_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_DIR_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_SYS_NDIR_H */ - -/* Define if you have the header file. */ -/* #undef HAVE_SYS_SYSMACROS_H */ - -/* Define if you have the header file. */ -/* #undef HAVE_UTIL_H */ - -/* Define if you have the crypt library (-lcrypt). */ -#define HAVE_LIBCRYPT 1 - -/* Define if you have the nsl library (-lnsl). */ -/* #undef HAVE_LIBNSL */ - -/* Define if you have the skey library (-lskey). */ -/* #undef HAVE_LIBSKEY */ - -/* Define if you have the socket library (-lsocket). */ -/* #undef HAVE_LIBSOCKET */ - -/* Define if you have the util library (-lutil). */ -#define HAVE_LIBUTIL 1 - -/* Define if your compiler supports `long long' */ -#define HAVE_LONG_LONG 1 - -/* Define if *printf() uses %qd to print `long long' (otherwise uses %lld) */ -#define HAVE_PRINTF_QD 1 - -/* Define if in_port_t exists */ -#define HAVE_IN_PORT_T 1 - -/* Define if struct sockaddr.sa_len exists (implies sockaddr_in.sin_len, etc) */ -#define HAVE_SOCKADDR_SA_LEN 1 - -/* Define if socklen_t exists */ -#define HAVE_SOCKLEN_T 1 - -/* Define if AF_INET6 exists in */ -#define HAVE_AF_INET6 1 - -/* Define if `struct sockaddr_in6' exists in */ -#define HAVE_SOCKADDR_IN6 1 - -/* Define if `struct addrinfo' exists in */ -#define HAVE_ADDRINFO 1 - -/* - * Define if contains AI_NUMERICHOST et al. - * Systems which only implement RFC2133 will need this. - */ -#define HAVE_RFC2553_NETDB 1 - -/* Define if `struct direct' has a d_namlen element */ -#define HAVE_D_NAMLEN 1 - -/* Define if struct passwd.pw_expire exists. */ -#define HAVE_PW_EXPIRE 1 - -/* Define if GLOB_BRACE, gl_path and gl_match exist in */ -#define HAVE_WORKING_GLOB 1 - -/* Define if crypt() is declared in */ -#define HAVE_CRYPT_D 1 - -/* Define if fclose() is declared in */ -#define HAVE_FCLOSE_D 1 - -/* Define if optarg is declared in or */ -#define HAVE_OPTARG_D 1 - -/* Define if optind is declared in or */ -#define HAVE_OPTIND_D 1 - -/* Define if optreset exists */ -#define HAVE_OPTRESET 1 - -/* Define if pclose() is declared in */ -#define HAVE_PCLOSE_D 1 - -/* Define if getusershell() is declared in */ -#define HAVE_GETUSERSHELL_D 1 - -/* Define if `long long' is supported and sizeof(off_t) >= 8 */ -#define HAVE_QUAD_SUPPORT 1 - -/* Define if not using in-built /bin/ls code */ -/* #undef NO_INTERNAL_LS */ - -/* Define if using S/Key */ -/* #undef SKEY */ - -/* - * Define this if compiling with SOCKS (the firewall traversal library). - * Also, you must define connect, getsockname, bind, accept, listen, and - * select to their R-versions. - */ -/* #undef SOCKS */ -/* #undef SOCKS4 */ -/* #undef SOCKS5 */ -/* #undef connect */ -/* #undef getsockname */ -/* #undef bind */ -/* #undef accept */ -/* #undef listen */ -/* #undef select */ -/* #undef dup */ -/* #undef dup2 */ -/* #undef fclose */ -/* #undef gethostbyname */ -/* #undef getpeername */ -/* #undef read */ -/* #undef recv */ -/* #undef recvfrom */ -/* #undef rresvport */ -/* #undef send */ -/* #undef sendto */ -/* #undef shutdown */ -/* #undef write */ - -/* Define if you have the header file. */ -#define HAVE_FTP_NAMES 1 diff --git a/libexec/ftpd/extern.h b/libexec/ftpd/extern.h deleted file mode 100644 index 047e8573dd09..000000000000 --- a/libexec/ftpd/extern.h +++ /dev/null @@ -1,110 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-3-Clause - * - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -#include - -void blkfree(char **); -char **copyblk(char **); -void cwd(char *); -void delete(char *); -void dologout(int); -void fatalerror(char *); -void ftpd_logwtmp(char *, char *, struct sockaddr *addr); -int ftpd_pclose(FILE *); -FILE *ftpd_popen(char *, char *); -int get_line(char *, int, FILE *); -void lreply(int, const char *, ...) __printflike(2, 3); -void makedir(char *); -void nack(char *); -void pass(char *); -void passive(void); -void long_passive(char *, int); -void perror_reply(int, char *); -void pwd(void); -void removedir(char *); -void renamecmd(char *, char *); -char *renamefrom(char *); -void reply(int, const char *, ...) __printflike(2, 3); -void retrieve(char *, char *); -void send_file_list(char *); -void statcmd(void); -void statfilecmd(char *); -void store(char *, char *, int); -void upper(char *); -void user(char *); -void yyerror(char *); -int yyparse(void); -int ls_main(int, char **); - -extern int assumeutf8; -extern char cbuf[]; -extern union sockunion data_dest; -extern int epsvall; -extern int form; -extern int ftpdebug; -extern int guest; -extern union sockunion his_addr; -extern char *homedir; -extern int hostinfo; -extern char *hostname; -extern int maxtimeout; -extern int logged_in; -extern int logging; -extern int noepsv; -extern int noguestretr; -extern int noretr; -extern int paranoid; -extern struct passwd *pw; -extern int pdata; -extern char proctitle[]; -extern int readonly; -extern off_t restart_point; -extern int timeout; -extern char tmpline[]; -extern int type; -extern char *typenames[]; /* defined in included from ftpd.c */ -extern int usedefault; - -struct sockaddr_in; -struct sockaddr_in6; -union sockunion { - struct sockinet { - u_char si_len; - u_char si_family; - u_short si_port; - } su_si; - struct sockaddr_in su_sin; - struct sockaddr_in6 su_sin6; -}; -#define su_len su_si.si_len -#define su_family su_si.si_family -#define su_port su_si.si_port diff --git a/libexec/ftpd/ftpchroot.5 b/libexec/ftpd/ftpchroot.5 deleted file mode 100644 index cb2f15f719ad..000000000000 --- a/libexec/ftpd/ftpchroot.5 +++ /dev/null @@ -1,118 +0,0 @@ -.\" Copyright (c) 2003 FreeBSD Project -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.Dd January 26, 2003 -.Dt FTPCHROOT 5 -.Os -.Sh NAME -.Nm ftpchroot -.Nd "list users and groups subject to FTP access restrictions" -.Sh DESCRIPTION -The file -.Nm -is read by -.Xr ftpd 8 -at the beginning of an FTP session, after having authenticated the user. -Each line in -.Nm -corresponds to a user or group. -If a line in -.Nm -matches the current user or a group he is a member of, -access restrictions will be applied to this -session by changing its root directory with -.Xr chroot 2 -to that specified on the line or to the user's login directory. -.Pp -The order of records in -.Nm -is important because the first match will be used. -Fields on each line are separated by tabs or spaces. -.Pp -The first field specifies a user or group name. -If it is prefixed by an -.Dq at -sign, -.Ql @ , -it specifies a group name; -the line will match each user who is a member of this group. -As a special case, a single -.Ql @ -in this field will match any user. -A username is specified otherwise. -.Pp -The optional second field describes the directory for the user -or each member of the group to be locked up in using -.Xr chroot 2 . -Be it omitted, the user's login directory will be used. -If it is not an absolute pathname, then it will be relative -to the user's login directory. -If it contains the -.Pa /./ -separator, -.Xr ftpd 8 -will treat its left-hand side as the name of the directory to do -.Xr chroot 2 -to, and its right-hand side to change the current directory to afterwards. -.Sh FILES -.Bl -tag -width ".Pa /etc/ftpchroot" -compact -.It Pa /etc/ftpchroot -.El -.Sh EXAMPLES -These lines in -.Nm -will lock up the user -.Dq Li webuser -and each member of the group -.Dq Li hostee -in their respective login directories: -.Bd -literal -offset indent -webuser -@hostee -.Ed -.Pp -And this line will tell -.Xr ftpd 8 -to lock up the user -.Dq Li joe -in -.Pa /var/spool/ftp -and then to change the current directory to -.Pa /joe , -which is relative to the session's new root: -.Pp -.Dl "joe /var/spool/ftp/./joe" -.Pp -And finally the following line will lock up every user connecting -through FTP in his respective -.Pa ~/public_html , -thus lowering possible impact on the system -from intrinsic insecurity of FTP: -.Pp -.Dl "@ public_html" -.Sh SEE ALSO -.Xr chroot 2 , -.Xr group 5 , -.Xr passwd 5 , -.Xr ftpd 8 diff --git a/libexec/ftpd/ftpcmd.y b/libexec/ftpd/ftpcmd.y deleted file mode 100644 index c090130d8137..000000000000 --- a/libexec/ftpd/ftpcmd.y +++ /dev/null @@ -1,1806 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-3-Clause - * - * Copyright (c) 1985, 1988, 1993, 1994 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* - * Grammar for FTP commands. - * See RFC 959. - */ - -%{ - -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "extern.h" -#include "pathnames.h" - -#define yylex ftpcmd_yylex - -off_t restart_point; - -static int cmd_type; -static int cmd_form; -static int cmd_bytesz; -static int state; -char cbuf[512]; -char *fromname = NULL; - -%} - -%union { - struct { - off_t o; - int i; - } u; - char *s; -} - -%token - A B C E F I *** 6490 LINES SKIPPED *** From nobody Mon Sep 29 21:55:40 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbFP83qNDz68v3D; Mon, 29 Sep 2025 21:55:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbFP829ddz4778; Mon, 29 Sep 2025 21:55:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759182940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5XGkiVvqfWga3I80iW1A8Ve4FnW297cicnMJIJRkXws=; b=iFqVf5if5NqyNJscMqwBq7w1W7XawrUMzub8PJh/KNb+dkTlaj4Fu6ddliRHRlEmJYo9BG NkVDTOh6Bg2ert5f6Q/bi4AComkhBqj3t+0iO3PTx+wuve3yL1WNc5ij0y5JQuuPXJX7RZ okNG6GUTah8qaJ2VOF8k5xtnaJnuAvSTDQGFIvtOVQ3yMAPFxXIh4Ezl2Ts1NZWERp9dEY FOE6ZH1qhIgHn9bYvcqDFvJXFSUe4OjWCTX92EvzUBkIc/4axSc/yNrydazfvfUpFMETkR xKfSbTQKCT3D4De0kRPI8M8jsRR99OUb9F6xZvxkvBimHrR9Sgb4AxpRDfu0Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759182940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5XGkiVvqfWga3I80iW1A8Ve4FnW297cicnMJIJRkXws=; b=HZxLq+5mwZF/Jhv/Ivy2RkCmF5ACR43SnsIuUk22CLQqeceNbe+uYRuZVmKqLSLwEVHKKN TXcM2EzjlD1qI4ZRI5dj0ARGT/saVoblJ4DDlwGF5tlbRCVuOGNetZO4/BDhXcb/Dzoo4L WRM0BeV0JZG1bULlFgmG+qgDEX7zzrbxS8TMoNgO3SbcdLbZcxT1FYEBomlvQemKhTIhx6 RSR/ENZ8yJkHD4ScPskb3a7XnDYMopHVnqq0tgusyoW/Tv+h4FzvfB6/PziNwJnsfFeHDM 7ezNS20XATj1Q4mWbsJDnYkAGPBZN8zCfhIj3SYkBFNyhFVfL1qM0Df6/R8T6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759182940; a=rsa-sha256; cv=none; b=fosqveWKmZQMnwAzLI7FvoJoRz0sMfH7iDQypDqhl81oomjGld+7veNXzd3kxO9OT2yLVe S5g6gqS6Q0OljkaQmvT4wl7H/oxzSQK4jb5N/V+ZKI97mMnc3Z+o3TenRlPI/vHhqV/ixO ghNpRB6sfIHX+CF+mv6mMuE2MaoQudkc9aJDFzNognusC76A/APaMsdoHfgSBmWkAYuGnf eALIuAHN+9WKSuwvnQjbcNBPW3jdF1pyUJskhjYyn6F4lYGnTFjYm5dtkETO9nHpYFvTGJ 6EBfllOFTtGReUimSgk5nepbKjoeq6PX3sYi77zkEE/mAUfsxC4Yu0tauXveaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbFP81mN6z1M8c; Mon, 29 Sep 2025 21:55:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TLtejh052894; Mon, 29 Sep 2025 21:55:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TLtegb052891; Mon, 29 Sep 2025 21:55:40 GMT (envelope-from git) Date: Mon, 29 Sep 2025 21:55:40 GMT Message-Id: <202509292155.58TLtegb052891@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: eaecc9551ae4 - main - packages: Add an "optional" set 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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eaecc9551ae4d342fee921fb4c0a1eeb6bf68b86 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=eaecc9551ae4d342fee921fb4c0a1eeb6bf68b86 commit eaecc9551ae4d342fee921fb4c0a1eeb6bf68b86 Author: Lexi Winter AuthorDate: 2025-09-29 20:33:38 +0000 Commit: Lexi Winter CommitDate: 2025-09-29 21:53:34 +0000 packages: Add an "optional" set This is everything in "base" but without compilers. This means we have sets to support four basic workloads: - "minimal" for a small installation where the user intends to add other packages by hand. - "optional" for a complete installation on a production system which does not need to compile software. - "devel", which can be added to either minimal or optional when compilers are required. - "base" for a complete installation, including compilers, for users who don't want to interact with pkgbase and just want the complete system installed like it was before. This is probably the last set want to add; any further metapackages would be better treated as "task" packages intended to target one specific workload. MFC after: 3 days Reviewed by: cperciva, bapt Differential Revision: https://reviews.freebsd.org/D52777 --- release/packages/sets/base-jail.ucl | 6 ++++- release/packages/sets/base.ucl | 10 +++++++- release/packages/sets/optional-dbg.ucl | 31 ++++++++++++++++++++++++ release/packages/sets/optional-jail-dbg.ucl | 31 ++++++++++++++++++++++++ release/packages/sets/optional-jail.ucl | 34 +++++++++++++++++++++++++++ release/packages/sets/optional.ucl | 33 ++++++++++++++++++++++++++ release/packages/ucl/acct-all.ucl | 2 +- release/packages/ucl/acpi-all.ucl | 4 ++++ release/packages/ucl/apm-all.ucl | 4 ++++ release/packages/ucl/atf-all.ucl | 2 +- release/packages/ucl/audit-all.ucl | 2 +- release/packages/ucl/autofs-all.ucl | 2 +- release/packages/ucl/bhyve-all.ucl | 2 +- release/packages/ucl/blocklist-all.ucl | 2 +- release/packages/ucl/bluetooth-all.ucl | 4 ++++ release/packages/ucl/bsdconfig-all.ucl | 2 +- release/packages/ucl/bsdinstall-all.ucl | 2 +- release/packages/ucl/bsnmp-all.ucl | 2 +- release/packages/ucl/ccdconfig-all.ucl | 4 ++++ release/packages/ucl/console-tools-all.ucl | 4 ++++ release/packages/ucl/csh-all.ucl | 2 +- release/packages/ucl/ctl-all.ucl | 4 ++++ release/packages/ucl/cxgbe-tools-all.ucl | 4 ++++ release/packages/ucl/dma-all.ucl | 2 +- release/packages/ucl/dtrace-all.ucl | 4 ++++ release/packages/ucl/dwatch-all.ucl | 4 ++++ release/packages/ucl/ee-all.ucl | 2 +- release/packages/ucl/examples-all.ucl | 2 +- release/packages/ucl/fd-all.ucl | 4 ++++ release/packages/ucl/ftp-all.ucl | 2 +- release/packages/ucl/games-all.ucl | 2 +- release/packages/ucl/ggate-all.ucl | 4 ++++ release/packages/ucl/gssd-all.ucl | 2 +- release/packages/ucl/hast-all.ucl | 4 ++++ release/packages/ucl/hostapd-all.ucl | 4 ++++ release/packages/ucl/inetd-all.ucl | 2 +- release/packages/ucl/ipf-all.ucl | 2 +- release/packages/ucl/ipfw-all.ucl | 2 +- release/packages/ucl/iscsi-all.ucl | 4 ++++ release/packages/ucl/jail-all.ucl | 2 +- release/packages/ucl/kerberos-all.ucl | 2 +- release/packages/ucl/kerberos-kdc-all.ucl | 2 +- release/packages/ucl/kyua-all.ucl | 2 +- release/packages/ucl/lib9p-all.ucl | 2 +- release/packages/ucl/libarchive-all.ucl | 2 +- release/packages/ucl/libbegemot-all.ucl | 2 +- release/packages/ucl/libblocksruntime-all.ucl | 2 +- release/packages/ucl/libbsdstat-all.ucl | 2 +- release/packages/ucl/libbsm-all.ucl | 2 +- release/packages/ucl/libcasper-all.ucl | 2 +- release/packages/ucl/libcompat-all.ucl | 2 +- release/packages/ucl/libcompiler_rt-all.ucl | 2 +- release/packages/ucl/libcuse-all.ucl | 2 +- release/packages/ucl/libdwarf-all.ucl | 2 +- release/packages/ucl/libevent1-all.ucl | 2 +- release/packages/ucl/libexecinfo-all.ucl | 2 +- release/packages/ucl/libipt-all.ucl | 2 +- release/packages/ucl/libldns-all.ucl | 2 +- release/packages/ucl/liblzma-all.ucl | 2 +- release/packages/ucl/libmagic-all.ucl | 2 +- release/packages/ucl/libmilter-all.ucl | 2 +- release/packages/ucl/libpathconv-all.ucl | 2 +- release/packages/ucl/librpcsec_gss-all.ucl | 2 +- release/packages/ucl/librss-all.ucl | 2 +- release/packages/ucl/libsdp-all.ucl | 2 +- release/packages/ucl/libsqlite3-all.ucl | 2 +- release/packages/ucl/libstdbuf-all.ucl | 2 +- release/packages/ucl/libstdthreads-all.ucl | 2 +- release/packages/ucl/libthread_db-all.ucl | 2 +- release/packages/ucl/libucl-all.ucl | 2 +- release/packages/ucl/libvgl-all.ucl | 2 +- release/packages/ucl/libvmmapi-all.ucl | 2 +- release/packages/ucl/liby-all.ucl | 2 +- release/packages/ucl/libyaml-all.ucl | 2 +- release/packages/ucl/lp-all.ucl | 2 +- release/packages/ucl/mlx-tools-all.ucl | 4 ++++ release/packages/ucl/natd-all.ucl | 2 +- release/packages/ucl/netmap-all.ucl | 2 +- release/packages/ucl/nfs-all.ucl | 2 +- release/packages/ucl/ntp-all.ucl | 2 +- release/packages/ucl/nvme-tools-all.ucl | 4 ++++ release/packages/ucl/openssl-all.ucl | 2 +- release/packages/ucl/pf-all.ucl | 2 +- release/packages/ucl/pmc-all.ucl | 2 +- release/packages/ucl/quotacheck-all.ucl | 2 +- release/packages/ucl/rcmds-all.ucl | 2 +- release/packages/ucl/rdma-all.ucl | 2 +- release/packages/ucl/rip-all.ucl | 2 +- release/packages/ucl/sendmail-all.ucl | 2 +- release/packages/ucl/smbutils-all.ucl | 4 ++++ release/packages/ucl/ssh-all.ucl | 2 +- release/packages/ucl/syscons-data-all.ucl | 4 ++++ release/packages/ucl/tcpd-all.ucl | 2 +- release/packages/ucl/telnet-all.ucl | 2 +- release/packages/ucl/unbound-all.ucl | 2 +- release/packages/ucl/yp-all.ucl | 2 +- usr.sbin/bsdinstall/scripts/pkgbase.in | 3 ++- 97 files changed, 289 insertions(+), 75 deletions(-) diff --git a/release/packages/sets/base-jail.ucl b/release/packages/sets/base-jail.ucl index e6c52349d3cb..d1dc17bc9860 100644 --- a/release/packages/sets/base-jail.ucl +++ b/release/packages/sets/base-jail.ucl @@ -16,7 +16,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -comment = "Base jail system (metapackage)" +comment = "Base system for jails (metapackage)" vital = true @@ -30,6 +30,10 @@ deps { version = "${VERSION}" origin = "base" }, + "set-optional-jail" { + version = "${VERSION}" + origin = "base" + }, "set-devel" { version = "${VERSION}" origin = "base" diff --git a/release/packages/sets/base.ucl b/release/packages/sets/base.ucl index 7b86450ae5b2..823e2342fab8 100644 --- a/release/packages/sets/base.ucl +++ b/release/packages/sets/base.ucl @@ -21,7 +21,11 @@ comment = "Base system (metapackage)" vital = true desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +comment = "Optional software debug symbols (metapackage)" + +desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +comment = "Optional software debug symbols for jails (metapackage)" + +desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +comment = "Optional base system software for jails (metapackage)" + +vital = true + +desc = < + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +comment = "Optional base system software (metapackage)" + +vital = true + +desc = < To: Christos Margiolis Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 9cab9fde5eda - main - virtual_oss: Port to base Message-ID: References: <202509280958.58S9wrww083342@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="e/Z7ct8axfxIUQau" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://www.rulingia.com/keys/peter.pgp --e/Z7ct8axfxIUQau Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2025-Sep-29 21:11:53 +0200, Christos Margiolis wr= ote: >On Mon Sep 29, 2025 at 11:58 AM CEST, Peter Jeremy wrote: >> On 2025-Sep-28 09:58:53 +0000, Christos Margiolis = wrote: >>>The branch main has been updated by christos: >>> >>>URL: https://cgit.FreeBSD.org/src/commit/?id=3D9cab9fde5edad9b409dd2317a= 2aec7815e6d6bed >>> >>>commit 9cab9fde5edad9b409dd2317a2aec7815e6d6bed >>>Author: Christos Margiolis >>>AuthorDate: 2025-09-28 09:56:52 +0000 >>>Commit: Christos Margiolis >>>CommitDate: 2025-09-28 09:56:52 +0000 >>> >>> virtual_oss: Port to base >> >> This fails to compile if "WITHOUT_BLUETOOTH=3Dyes" is specified (see bel= ow) >> because bluetooth.h isn't available (as expected). It looks like >> virtual_oss isn't taking that option into account when working out what >> to compile. =2E.. > >I haven't had time to test yet, but I will try tomorrow. Does the build >work if you build virtual_bt_speaker(8) conditionally in the Makefile >(i.e., usr.sbin/virtual_oss/Makefile)? The following patch builds as expected both with and without WITHOUT_BLUETOOTH=3Dyes diff --git a/usr.sbin/virtual_oss/Makefile b/usr.sbin/virtual_oss/Makefile index bf73041377b3..0fc611832795 100644 --- a/usr.sbin/virtual_oss/Makefile +++ b/usr.sbin/virtual_oss/Makefile @@ -1,8 +1,9 @@ .include =20 -SUBDIR+=3D virtual_bt_speaker \ - virtual_oss_cmd \ +SUBDIR+=3D virtual_oss_cmd \ virtual_oss =20 +SUBDIR.${MK_BLUETOOTH}+=3D virtual_bt_speaker=20 + .include "Makefile.inc" .include --=20 Peter Jeremy --e/Z7ct8axfxIUQau Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAmjbBq5fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzTR2Q//QdTQu9kSPOzQnkjwGsXawq4VG+ygz80WGLwkLa2rjUXFG/qYZjXEXy9V W+PE5Fp6xV93N7Kkxtfy5hn34N2NLLWFkZNonAGRySzKBRQ2jxivnClRm4VpsKLw sQhjL9cA8bVDBgxRoXwkloQKBDax0TdMMy3Qt1ZWGbJ5YcTwcJo6khK8X1q7dL6Y ZzGCKcLal+RYd6rjoKfih0ZaGnnLdvyX6IpwPEYSmDlAoWlo+CxnIF0+KWInYGEz Ip7Ij/UqX6UO9XDZ7adDxsG+qDeOAnjg867TbRvrUStD3EfrREAEtRjdtYHs529d ZCYQrkF40jaRUp63OgjadwGVVCgVBMzRGy99L/kXMqxQE9D2P5T7U8CLTQ89npyL 0rxb+eMPuhNuurXsXyE+Su9LFZd1OuMcRLBKBZ+nqHp66Mzgy4BKm3Pyl+BJXcLb 7vVF7d1H5hvpuHydGmNAkzOwL9ahcQnZm9NXD8VS7jq/G3/iRtrure20HB2OP1i2 MPNip7VwECjIgU8Ribp/BPcT4KKu4a8cqt8yCCGZwVNFWWjhd3N+ioT04W5Akyp8 e9f4AijDdmCSt8VJK7gADnL9wkgYWJSTzu3akEKAijXVnTYFBmI3+hKuI5zDpGu9 HJjP9s41KmVgWEY59uz9FxQvG7m9PsqRt0T0KP4xTwNK4xFoQBI= =P4z8 -----END PGP SIGNATURE----- --e/Z7ct8axfxIUQau-- From nobody Mon Sep 29 22:38: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 4cbGM774bTz68yDw; Mon, 29 Sep 2025 22:38:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbGM76G4Qz3D8G; Mon, 29 Sep 2025 22:38:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759185539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WQmC6Skx+I+4jfb+P0jJooQ3vmRYv9CT1ccmpnqvJBE=; b=eyOtZyTnSKu6Nw4d+7f48Y1xjHD5DLVYtT4JibPrCzxHt33s3aurEBIbkt1PuoM5XLjeao klnnBSitpQk5NVBGwiama5UsFHk6514C8c4zo3EVg3ZsZxNWvih/qtldJnA7dW6sWQNO24 uXS7h8PdDUmtDcZk9seDGfG6Pq1s2pY753YGU5Zoy+x17uuY2lCDwBG07FFMA7zV88loR8 7pZpjNTLdcGJA9n8e6fh7Y8EynrCo+3quLTQ+OkqKQRbBSmZyLdDXNKbxWGWX03X3RVehF YWWDZSRnOOYldzu3wgEH7o4WzxYo9cRHa24A42UmqBAA2rRcaojSmW5kzB6X5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759185539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WQmC6Skx+I+4jfb+P0jJooQ3vmRYv9CT1ccmpnqvJBE=; b=AIBvytW2VpckQX7O1L62F5D11cLYtqYm7S7gnilNBhD7eCbrIxZ1mHLeKtnWD6FO9dc584 TlyMdYc2OzF51XSSu1+yaWbovsHxfp0n1JQXCgiOsHUN0OiF3/LUKCIgWhwW5JAyIyKRoR dIuFnTWsijyFrdcMrNi2em1/lSasfX5LWBmK0cFyXwnuNNrBzSwPJZKJL+HR9I85bxHeU4 caujAmTXoN3jXAJntgs6gfmWWbalal/C5+qvEPwjIWOr+3rPBGfPNiKlywNg2baSjzDPMO nqHh7TdoEBG94VOUDpRLBwAXWdRAg38WENiVr8mRlM1QdkB1/SkzyMhjzQZlew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759185539; a=rsa-sha256; cv=none; b=fLcoQ9JK1TSRFsVQeoTcwsBrY/N+2UmAiXlHZ+OK5HAA1FLGbvhmaBD80ya8CQdaUnz10Z QiDQiDz4wUddefo8MNjnBCgTvGhiLlbrP4fUDlvDnClvBV7f/j1cjqAqAYKxj4ijrYKT1Q 2l6CYy4S8kOxXb9QyQ2JqZTE5565zgB26QKq2JS5N8vJSLw+rAr+h2lglPz6C+0JabjS+w C96TW4LlIDWzInJoSyMuSdX4++6YuJmIeU+JYq7zysdg1lddJ75wybmwAZbyyQETTa29tW QfGJKxyDF4RGqR4wcLKpDuRlSuNnu5kcGATU0HhZTRqEpgXBFApyqn8SSEj02g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbGM75mBzz1NXm; Mon, 29 Sep 2025 22:38:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TMcxJZ029125; Mon, 29 Sep 2025 22:38:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TMcxmW029123; Mon, 29 Sep 2025 22:38:59 GMT (envelope-from git) Date: Mon, 29 Sep 2025 22:38:59 GMT Message-Id: <202509292238.58TMcxmW029123@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 2c2a2b8281be - main - ahc.4,ahd.4: Improve HARDWARE + tag SPDX 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: 2c2a2b8281be2f4270fd98eda743a3a8c2f36949 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=2c2a2b8281be2f4270fd98eda743a3a8c2f36949 commit 2c2a2b8281be2f4270fd98eda743a3a8c2f36949 Author: Alexander Ziaee AuthorDate: 2025-09-29 22:32:42 +0000 Commit: Alexander Ziaee CommitDate: 2025-09-29 22:36:29 +0000 ahc.4,ahd.4: Improve HARDWARE + tag SPDX Add some context for the Hardware Relnotes, and tag SPDX while here. MFC after: 3 days --- share/man/man4/ahc.4 | 10 ++++------ share/man/man4/ahd.4 | 6 ++++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/share/man/man4/ahc.4 b/share/man/man4/ahc.4 index 38712c1f08b6..72a1e092f1bc 100644 --- a/share/man/man4/ahc.4 +++ b/share/man/man4/ahc.4 @@ -1,4 +1,6 @@ .\" +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 1995, 1996, 1997, 1998, 2000 .\" Justin T. Gibbs. All rights reserved. .\" @@ -24,7 +26,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 15, 2017 +.Dd September 29, 2025 .Dt AHC 4 .Os .Sh NAME @@ -172,11 +174,7 @@ adapter, defaults to enabled (0 -- disabled, 1 -- enabled). .Sh HARDWARE The .Nm -driver supports the following -.Tn SCSI -host adapter chips and -.Tn SCSI -controller cards: +driver supports the following VL/ISA/PCI parallel SCSI controllers and cards: .Pp .Bl -bullet -compact .It diff --git a/share/man/man4/ahd.4 b/share/man/man4/ahd.4 index c173a8cef619..7fa08c12b5b5 100644 --- a/share/man/man4/ahd.4 +++ b/share/man/man4/ahd.4 @@ -1,4 +1,6 @@ .\" +.\" SPDX-License-Identifer: BSD-3-Clause +.\" .\" Copyright (c) 1995, 1996, 1997, 1998, 2000 .\" Justin T. Gibbs. All rights reserved. .\" Copyright (c) 2002 @@ -26,7 +28,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 4, 2004 +.Dd September 29, 2025 .Dt AHD 4 .Os .Sh NAME @@ -132,7 +134,7 @@ A hint to define whether the SCSI target mode is enabled (0 -- disabled, 1 -- en .Sh HARDWARE The .Nm -driver supports the following: +driver supports the following PCI/PCI-X parallel SCSI controllers: .Pp .Bl -bullet -compact .It From nobody Mon Sep 29 22:53:55 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbGhR01jtz68yyP; Mon, 29 Sep 2025 22:53:59 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta004.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbGhQ4kF7z3FWD; Mon, 29 Sep 2025 22:53:58 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTPS id 3DQfvNkX1PzKy3MknvBAKv; Mon, 29 Sep 2025 22:53:57 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id 3Mkmvhw9iJhBP3MknvlJ10; Mon, 29 Sep 2025 22:53:57 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=QY3Fvdbv c=1 sm=1 tr=0 ts=68db0e05 a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=yJojWOMRYYMA:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=wAQK-VOmmGBR283TWY0A:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy.cwsent.com [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 2E79C3B0; Mon, 29 Sep 2025 15:53:56 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id E2AB829D; Mon, 29 Sep 2025 15:53:55 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Lexi Winter cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 614c8750ce11 - main - Remove ftpd(8) In-reply-to: <202509292155.58TLtdI9052857@gitrepo.freebsd.org> References: <202509292155.58TLtdI9052857@gitrepo.freebsd.org> Comments: In-reply-to Lexi Winter message dated "Mon, 29 Sep 2025 21:55:39 +0000." List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 29 Sep 2025 15:53:55 -0700 Message-Id: <20250929225355.E2AB829D@slippy.cwsent.com> X-CMAE-Envelope: MS4xfDYorWWTtoMR6N4QNdBjsnOhaVTk5TP8bjy1vCRHADGI4ZxHpCGwLxoriT8ZWE78tO3uhHpiPhg1l0H8SFGge7p1eK/xLJ/ZJ3pAQEOctv36oEqb+OiV 7yCoFCTAuRyiO2xqjrURDKsAKjSwmRflEI4X3+mUypWDdHWwE92q6+uUJTEdsn7fDs1l/VSGFOunJS3neshAQJ9Ny41rVkDNQkQ45nEExdhKy/SJtx9HAp7m YDR1pHJJrJyVe2RqL+0QG8Hx6cONVYvj4oMbFdnhN3pF/Z0HKEGUOquH5uDFG40rNIFtXHR6OUzgkhcgMVW9//96h2yLaPpybaa1WenXSzc= X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cbGhQ4kF7z3FWD In message <202509292155.58TLtdI9052857@gitrepo.freebsd.org>, Lexi Winter write s: > The branch main has been updated by ivy: > > URL: https://cgit.FreeBSD.org/src/commit/?id=614c8750ce116865953916b8b5bab246 > 7ee94187 > > commit 614c8750ce116865953916b8b5bab2467ee94187 > Author: Lexi Winter > AuthorDate: 2025-09-29 20:26:26 +0000 > Commit: Lexi Winter > CommitDate: 2025-09-29 21:53:34 +0000 > > Remove ftpd(8) > > This was previously deprecated and is slated for removal in 15.0. > Users who still need ftpd(8) can install the ftp/freebsd-ftpd port. > > Retain the ftp(d) PAM services since other FTP daemons use them. > > Update /etc/inetd.conf to point to /usr/local. > > Add ftpd to ObsoleteFiles, but do not list configuration files since > users may want to preserve these to use with the freebsd-ftpd port. > > There is still some language in the manual referring to ftpd(8) > which is relevant to the port, which has been retained but updated > to reference the port. > > MFC after: 3 days > Relnotes: yes > Reviewed by: cperciva > Differential Revision: https://reviews.freebsd.org/D52739 Release notes should mention that ports/ftp/freebsd-ftpd is a snapshot of the FreeBSD ftpd. It is now maintained externally. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e**(i*pi)+1=0 From nobody Mon Sep 29 23:17: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 4cbHCT66hNz691RP; Mon, 29 Sep 2025 23:17:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbHCT5QnGz3JvQ; Mon, 29 Sep 2025 23:17:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759187845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jmE7RlD4dJSGy/Tow2xL61Q9U28GQJlNSi9UD8uCJ5A=; b=cPAXh4ZqjakL8o5XxwFOpInCFchaVXFZcPXbwSDB2246Erm0FaSCdkJvxcn3yqOmF90+EO Qk6fPZfzGx9sJTav3gasLLfiyTWvi5fipLafEav8djFgCyGpfFtNVhE74OkNsLpSgBsxia +edxfz0Kl8oAfQr8yrAmL8klXzSAAyYbsVarJ33MbhvbN8ZJIIx75kw+85NF8UqqganQeQ Ir6hkch6NuzY7/Qj2tgF5TXM7OrpinbiT11uZr/xHGloPbk3f4M0uAFTBcr7bnLkabKl+i TkYeLUJjRAzdfcNQuRruKNrzGF+3KierzAR+uhqgdT9Lllibd1Il6O8Yn4xBLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759187845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jmE7RlD4dJSGy/Tow2xL61Q9U28GQJlNSi9UD8uCJ5A=; b=APXjFG8QHEpwZtn7MfOjOMHyB2s7a0ERvGewsPdrtEq9tnRcs7DPP2fDWhZjPmKzORAOkb P3cFjFnZx8lUvSPjHDKDzg90dYTesmvOWIlxyhoDA/SEYJKnI2uaLVxG7zxJHbN+bikZND zuiT6Ki04hY25DAdG1XhG0Hk8XSsB/7d07BaK+8mhb0mPcYZrkdHMnG5ItK/d4dt2OAzmQ L2C/ZLE5Bf5JN6AAlBQ4oTGkd7SgFSM6O2068pVkN1kJCbz8urwhga2omO8Fj/rutl572U beR+1O3Mf7W3Oz8SSrgrVH3URVK0JOdiO/V4yL2vW3BpI4Zb24T1iEUDlAWu2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759187845; a=rsa-sha256; cv=none; b=ZyeXcO1CQM2kwQ7Ci72QpD21vqvIXx1WaFB1TPRi8K2WTkU10wjGSjA10Li21bP8ScGPdn snKwzxwTJ7cgCpbkUa21dZs3U9/0R2jNDUD7S5hX975nx7opNjVqo1/VLQOlpCf/BKd86C QhLLqlkHgDwSe5XvFV58I8Xku1RmGo/WoCRTZ8E7cQj7N87hNBIiy4aSZO7Ak4dkP5eIiW WLL+Viw4J+SyHF2woJoJSJbWMI9qevqno/7We+M1AbghqMMNQckUMfkKK9zrUD9R+3EhYw xfgn+n6gocME5eNCkVea8e3sNj1Zhf/DTZPEm9Ykdc3BHRIpgIPjx/ChkippVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbHCT4l2Xz1PJP; Mon, 29 Sep 2025 23:17:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TNHPho004587; Mon, 29 Sep 2025 23:17:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TNHPr9004584; Mon, 29 Sep 2025 23:17:25 GMT (envelope-from git) Date: Mon, 29 Sep 2025 23:17:25 GMT Message-Id: <202509292317.58TNHPr9004584@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 123c2dc6e15a - main - Reapply "LinuxKPI: pci: allocate entire pci_dev hiereachy up to root port on attach" 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: 123c2dc6e15a62ceba3469caf0f1a6801214a7d3 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=123c2dc6e15a62ceba3469caf0f1a6801214a7d3 commit 123c2dc6e15a62ceba3469caf0f1a6801214a7d3 Author: Bjoern A. Zeeb AuthorDate: 2025-09-29 21:29:17 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-09-29 23:16:18 +0000 Reapply "LinuxKPI: pci: allocate entire pci_dev hiereachy up to root port on attach" In linux_pci_attach_device() allocate a LinuxKPI pci_dev for each device in the hierarchy up to the root port[1] as we cannot do that later on demand as we may be in a context where we may not sleep. Take special care of DRM as there is a non-PCI device in the chain which needs to be skipped. iwlwifi(4) can hit this case called from a callout. While here leave a comment sa the cleanup order of linux_pci_attach_device() needs correction seperately. This reverts commit 3860afe99ec39b9942967941181f28f27f3fc548. Sponsored by: The FreeBSD Foundation (initially) PR: 283027 PR: 289647 Suggested by: jhb [1] MFC after: 3 days Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D52069 --- sys/compat/linuxkpi/common/src/linux_pci.c | 47 +++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index 43fd6ad28ac4..d0f1d5e3f9c5 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -342,6 +342,7 @@ lkpi_pci_dev_release(struct device *dev) static int lkpifill_pci_dev(device_t dev, struct pci_dev *pdev) { + struct pci_devinfo *dinfo; int error; error = kobject_init_and_add(&pdev->dev.kobj, &linux_dev_ktype, @@ -362,15 +363,24 @@ lkpifill_pci_dev(device_t dev, struct pci_dev *pdev) pdev->path_name = kasprintf(GFP_KERNEL, "%04d:%02d:%02d.%d", pci_get_domain(dev), pci_get_bus(dev), pci_get_slot(dev), pci_get_function(dev)); + pdev->bus = malloc(sizeof(*pdev->bus), M_DEVBUF, M_WAITOK | M_ZERO); - /* - * This should be the upstream bridge; pci_upstream_bridge() - * handles that case on demand as otherwise we'll shadow the - * entire PCI hierarchy. - */ - pdev->bus->self = pdev; pdev->bus->number = pci_get_bus(dev); pdev->bus->domain = pci_get_domain(dev); + + /* Check if we have reached the root to satisfy pci_is_root_bus() */ + dinfo = device_get_ivars(dev); + if (dinfo->cfg.pcie.pcie_location != 0 && + dinfo->cfg.pcie.pcie_type == PCIEM_TYPE_ROOT_PORT) { + pdev->bus->self = NULL; + } else { + /* + * This should be the upstream bridge; pci_upstream_bridge() + * handles that case on demand as otherwise we'll shadow the + * entire PCI hierarchy. + */ + pdev->bus->self = pdev; + } pdev->dev.bsddev = dev; pdev->dev.parent = &linux_root_device; pdev->dev.release = lkpi_pci_dev_release; @@ -395,7 +405,7 @@ lkpinew_pci_dev_release(struct device *dev) pdev = to_pci_dev(dev); if (pdev->root != NULL) pci_dev_put(pdev->root); - if (pdev->bus->self != pdev) + if (pdev->bus->self != pdev && pdev->bus->self != NULL) pci_dev_put(pdev->bus->self); free(pdev->bus, M_DEVBUF); if (pdev->msi_desc != NULL) { @@ -551,6 +561,7 @@ linux_pci_attach_device(device_t dev, struct pci_driver *pdrv, { struct resource_list_entry *rle; device_t parent; + struct pci_dev *pbus, *ppbus; uintptr_t rid; int error; bool isdrm; @@ -594,6 +605,27 @@ linux_pci_attach_device(device_t dev, struct pci_driver *pdrv, list_add(&pdev->links, &pci_devices); spin_unlock(&pci_lock); + /* + * Create the hierarchy now as we cannot on demand later. + * Take special care of DRM as there is a non-PCI device in the chain. + */ + pbus = pdev; + if (isdrm) { + pbus = lkpinew_pci_dev(parent); + if (pbus == NULL) { + error = ENXIO; + goto out_dma_init; + } + } + pcie_find_root_port(pbus); + if (isdrm) + pdev->root = pbus->root; + ppbus = pci_upstream_bridge(pbus); + while (ppbus != NULL && ppbus != pbus) { + pbus = ppbus; + ppbus = pci_upstream_bridge(pbus); + } + if (pdrv != NULL) { error = pdrv->probe(pdev, id); if (error) @@ -601,6 +633,7 @@ linux_pci_attach_device(device_t dev, struct pci_driver *pdrv, } return (0); +/* XXX the cleanup does not match the allocation up there. */ out_probe: free(pdev->bus, M_DEVBUF); spin_lock_destroy(&pdev->pcie_cap_lock); From nobody Mon Sep 29 23:17: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 4cbHCV6xKLz691RR; Mon, 29 Sep 2025 23:17: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 4cbHCV583zz3Jpy; Mon, 29 Sep 2025 23:17:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759187846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vEUdQYerJ7phCVpuwpSN811ktsSaqaoBw0Pi3CDRPLE=; b=B5lfXM6U1r4M4yYtus0luVePPtlZdlT2yStt/Azvf6Bvu20VpTiHC3RidXNBzuvDB3OrsW mEFJb1Ii4UNAPOV5k8/Fhu84AAl+aoM9NWveoAb4AMw2DtiwwMUfTWxNJAmPJviWiynL3Q FPWOeOQaqHaBdoKzK15I2vxgMJrsE/JFFB06+Aq9LFXRsftsCK3+sVti1cvs40d6/goWI1 NT0HVzaocmlILDgHebc99yq/MpeuDdDQWTTFGcpgMMeo3DT/4M5z4jegHSSscZLA+3vq/F 5NgkGl1BilyuG9L9E63NJKETYRqbgC90zwCGeo/GyK+pkP7Xuru+IrckEEkbuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759187846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vEUdQYerJ7phCVpuwpSN811ktsSaqaoBw0Pi3CDRPLE=; b=bA4NRsdZnt45wcUU7fyyd8qnNKZMvH+PmM5IA17dn43ChIAWrhO2LC5eLi9LE55vIJOAB8 E+xuQrwCgUMeqGQtuQsUZbotWsmUfd22cw/kJVS24O0zXUZMugyCOmcgH9AIgetarPYPff sthWZrYagIz5IZsuaefEIEYfOs9DZ1QBMs+l7S4Q9dJ8aNmyXO1zVpP6+bN6fux3DMP8/9 k4H9tngegE+33fRQqV4ABzMPiSEInfO7fLAfAFBf9GiG0ww6cGJadWWpvz6Fs+Hei16C0k HA63J2xt9bKQTH++LkkCKb/3Bm44AIte9ATW+BltsBx0UBt4nbYZjEI/m2Z2MA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759187846; a=rsa-sha256; cv=none; b=aUSiih8K4jzKeyTWUqPLWPfpCKFCQ8UGQtw5jHR9MzXeAiR382jzQuG3oA6AQcxTocc4zn DA8gHtqIz5uVxX8Ua1UJ/jodD7H4rLwr2g/gB3ZRU3y3VZIf7YrnVTbmunz9r02ubdRMTX 3pSupmlLETubWcYOYFaxzpGCSvEfRRcwedTgs9byKh0oG4lym5s5T5NyEoO0LpbTvJPIeW uQuexfm25KEqGfT+9EbhS7wuAZpaP8KwXwi3hf9Ecplrl6FRR11AoiqeFebMq+uIvrMNfU bCsQFtyGByXbBZ+qIR5rvlOYMbnL6z2ooC0shqcdjHR4Cn2LWyeBTqV3KbJ8xA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbHCV4h9hz1PJQ; Mon, 29 Sep 2025 23:17:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TNHQim004624; Mon, 29 Sep 2025 23:17:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TNHQW9004621; Mon, 29 Sep 2025 23:17:26 GMT (envelope-from git) Date: Mon, 29 Sep 2025 23:17:26 GMT Message-Id: <202509292317.58TNHQW9004621@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 4179e6b78297 - main - LinuxKPI: pci: implementation of [lkpi_]pci_get_slot() 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: 4179e6b78297369f0cf0eae1076e01e5151c5cbe Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4179e6b78297369f0cf0eae1076e01e5151c5cbe commit 4179e6b78297369f0cf0eae1076e01e5151c5cbe Author: Bjoern A. Zeeb AuthorDate: 2025-09-04 20:19:48 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-09-29 23:16:18 +0000 LinuxKPI: pci: implementation of [lkpi_]pci_get_slot() Like lkpi_pci_get_domain_bus_and_slot() implement lkpi_pci_get_slot() using pci_find_bsf() instead of pci_find_dbsf() (no domain). This is needed for a wireless driver. Unfortunately the name [pci_get_slot()] collides with the native PCI function. Add a guard around it and disable the use when the native version is required (in lkpifill_pci_dev() and in bnxt/bnxt_en; if the latter gets fixed we can probably also fix work around it in the former; further conflicts in drm-kmod 6.1-lts, 6.6-lts, and master were resolved). Sponsored by: The FreeBSD Foundation (initially) MFC aftre: 3 days Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D52065 --- sys/compat/linuxkpi/common/include/linux/pci.h | 6 ++++++ sys/compat/linuxkpi/common/src/linux_pci.c | 15 +++++++++++++++ sys/dev/bnxt/bnxt_en/if_bnxt.c | 1 + 3 files changed, 22 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index d891d0df3546..ffc2be600c22 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -1332,6 +1332,12 @@ struct pci_dev *lkpi_pci_get_domain_bus_and_slot(int domain, #define pci_get_domain_bus_and_slot(domain, bus, devfn) \ lkpi_pci_get_domain_bus_and_slot(domain, bus, devfn) +struct pci_dev *lkpi_pci_get_slot(struct pci_bus *, unsigned int); +#ifndef WANT_NATIVE_PCI_GET_SLOT +#define pci_get_slot(_pbus, _devfn) \ + lkpi_pci_get_slot(_pbus, _devfn) +#endif + static inline int pci_domain_nr(struct pci_bus *pbus) { diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index d0f1d5e3f9c5..8507a59a8df3 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -67,6 +67,7 @@ #include #include #include +#define WANT_NATIVE_PCI_GET_SLOT #include #include @@ -485,6 +486,20 @@ lkpi_pci_get_domain_bus_and_slot(int domain, unsigned int bus, return (pdev); } +struct pci_dev * +lkpi_pci_get_slot(struct pci_bus *pbus, unsigned int devfn) +{ + device_t dev; + struct pci_dev *pdev; + + dev = pci_find_bsf(pbus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); + if (dev == NULL) + return (NULL); + + pdev = lkpinew_pci_dev(dev); + return (pdev); +} + static int linux_pci_probe(device_t dev) { diff --git a/sys/dev/bnxt/bnxt_en/if_bnxt.c b/sys/dev/bnxt/bnxt_en/if_bnxt.c index feac3ce54a29..471e26a4b252 100644 --- a/sys/dev/bnxt/bnxt_en/if_bnxt.c +++ b/sys/dev/bnxt/bnxt_en/if_bnxt.c @@ -48,6 +48,7 @@ #include #include +#define WANT_NATIVE_PCI_GET_SLOT #include #include #include From nobody Mon Sep 29 23:17:27 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbHCX27N5z691Tw; Mon, 29 Sep 2025 23:17:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbHCW6pwrz3Jvf; Mon, 29 Sep 2025 23:17:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759187848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nxgEBROGDdJIx4GrKIEc3vBf1SIOn2z9Nbhd4nRvCFE=; b=YOMPe76xl/Fo4Hb6gUuH4AmvSNuKjYV180tau8nVddGodTT8X+Pe0IvsPe5/Svw9RFgyNN LeMKESc/vh3fKKhymuo2/55CD6H7mWazzWDF8ptfCRCpw3TjXvfi9zUUtHP5aO41eqs9tu d6+W7LjGRflbUjUI9gtbtFyfFZwi16QbehDwTzjrgprD2mceY4x48l5Za6vcZ0GqvZlsNs 8MZPlUe+/BJAMVlVWA2yL7uXA1746WNGoU6RlQAV+0vqIpjjbwlEKsRQCTZNIiFmSrdNbu HhdcAj2SElo2uH4h1d+W2JAVVERMz+zD2+9Sb/9DCgC9EqL1hIisz6OWXlni+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759187848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nxgEBROGDdJIx4GrKIEc3vBf1SIOn2z9Nbhd4nRvCFE=; b=wPzzKXeJ9Env990sS8gm6+Mg9aIcYFmOeiPFdRxH6F006STbFwUN1TMiU80iFrNBk1SCsQ siGm6jS7hmeO4hdKgo6ccgwD92T5xHdZ4/UDpwi7829OGmRtQ6Pc7t08rSN2ADoHamzDfI TCheH7ev3ZIu5/k3DgnhQWvkmXP93tjTnLctPRboVQAd/T60dRsW3FaN6Sm2T2EPImS+V3 XLGCxI0NxHzMfuBVtYzEYZRrRrSBQt1pOcf0osxUE9X8nX0uj/LHtmhQu5CPHdgektSrcw tVCYlOuzWFQ35ut+lN3ljmPveubhnmrvvoKCS++wYy3KxTKOICEQ1O9NRG12ZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759187848; a=rsa-sha256; cv=none; b=X3rU4JWCsMKFtzqfW/R5xqj+/uQYPj+Y7b+yrANqRo9KJAqbl1goFjWM796yjl01BdN2GV 5lZibofCho9HC4bLFF0zWt5SMwF25vlMC7zgYDbYecCIlRwJuWIIT7b3qsOdr9IKTOEQRu AjbCXZMYc+vtO9L8sbBxcjAC2y5JibScFfC1f2bAHGSJwW2cosuZkUHDMUD1QJfvnK8dnr dNNRRCfBuxJez0BcqJfRsEE1j3fvr3DL+BFL0OVozk6AWlIx0sxindoKvWEIgdcFhD1bir KpWUE+hRrUl0cVlXQ7mI+LKJ8sOBQgBlRQj8UM5jRXopYmGGCYbKD0mCqJPjng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbHCW5h86z1PJR; Mon, 29 Sep 2025 23:17:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58TNHRl6004670; Mon, 29 Sep 2025 23:17:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58TNHRUb004667; Mon, 29 Sep 2025 23:17:27 GMT (envelope-from git) Date: Mon, 29 Sep 2025 23:17:27 GMT Message-Id: <202509292317.58TNHRUb004667@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 52ce810302f7 - main - UPDATING: bump __FreeBSD_version for drm-kmod/nvidia-drm vs. LinuxLPI 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: 52ce810302f70cc7b995651eb1b19adfa014b351 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=52ce810302f70cc7b995651eb1b19adfa014b351 commit 52ce810302f70cc7b995651eb1b19adfa014b351 Author: Bjoern A. Zeeb AuthorDate: 2025-09-29 23:10:10 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-09-29 23:16:51 +0000 UPDATING: bump __FreeBSD_version for drm-kmod/nvidia-drm vs. LinuxLPI Both drm-kmod and nvidia-drm were updated to keep compiling and/or working after the latest LinuxKPI PCI changes. Some of what should have worked for a long time but did not or conflicted was hidden behind native PCI calls instead of using LinuxKPI. We cleaned this up. Bump __FreeBSD_version so that users will get the updated packages. MFC after: 3 days PR: 289647 --- UPDATING | 7 +++++++ sys/sys/param.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 1f30b6b0b8f3..cd7568885a26 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20250929: + Both drm-kmod and nividia-drm ports had to be updated to either no + longer conflict on LinuxKPI vs. native PCI changes and/or to keep + working after some LinuxKPI PCI adjustments which were previously + hidden behind native PCI. + Bump __FreeBSD_version 1600001 so users will pick up updated packages. + 20250929: The deprecated ftpd(8) has been removed. Users who still need ftpd can install the ftp/freebsd-ftpd port. pkgbase users should remove diff --git a/sys/sys/param.h b/sys/sys/param.h index ce91430909ce..8a71693cff3d 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -74,7 +74,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1600000 +#define __FreeBSD_version 1600001 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Tue Sep 30 02:38: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 4cbMgN0Zs3z69FdL; Tue, 30 Sep 2025 02:38:24 +0000 (UTC) (envelope-from zlei@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 4cbMgM6VM7z3cy1; Tue, 30 Sep 2025 02:38:23 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759199903; h=from:from:reply-to:subject:subject: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=dGFwm9q4CWj4Hcvr6F8dD31Vy/UcGCKsWGwQ7J+KlRo=; b=AIKo57OpqLa/83SzIB2QtLZQuxzXyDFGkSQ7YVluZK+3DKoA65rYiMDVLexAAwq+Pq4ki7 eYxsIA2M9j9zM/malx10Cuxg4ocD+1O19MgXF4UHsJD8p4z+Vg+d7zytT2kcV8SeYoTtLl SBTRgD6JH8ONB/5+PvSC5jGHTj3Zq8cOTsxHr3+oAdlj9Ky5xHH92luh7mwuE7i0gcs56o 6C+lDAvVmYvuGLUGorC9X+NnDKg2gw8fcTAbnE79oFCtC1pnaN9olayEzLvMb3BSIoIdkh HKzXPdD4JmZh8v3fWQ8E7CC9fFDD2AtgQr3dXj7VQ6i8p3PW3z3Q9Sqpu0aBkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759199903; h=from:from:reply-to:subject:subject: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=dGFwm9q4CWj4Hcvr6F8dD31Vy/UcGCKsWGwQ7J+KlRo=; b=GVHvWZVyFLk41uzRYu5oeV0E4hzexLoSUXVF8PRFx6DPSRbwCugbLHK6J8OLFSegJuu4tA UIzGc3hmxfauJQmDly6kCdTuKDLPDIBnx9QrAXvI3s+oXW0y6qtlcjfn/1YdaUg6Luzd+9 du+OH+zowDTVZSEEGIGXLn/lfXnAmgL45IQKS7O0i992FzOOIeyBUWs396tB9dicHECojT B2FHzdrtvGIEw6o4KlIW0CAZ6SA/wstCrGRtZy2l1vcf+4ryXyYinIjg+kbWHVKzaqfU+G dU71FNXxyDktL737TyHNjf7cZUXjsAnfcGJ7QWI9Hk+5I8UDyikx3uiIcaovtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759199903; a=rsa-sha256; cv=none; b=fFGkN7tppGvmSr2syMaGT2PHdGtSNXRLAJem75NwbSMHEgl60ZLkMCtYs15L4UXks6DS8n ZsaVjZf1PEQbH3O392W7mqbR0sHIHo2v5TLc1KzKxESDHGP8MjjhY3jNvWrDIDi+Blu1/j GGqfIpFh+ATAQsK2mqQogcUhnIQpw0GZqqumL2LYg1DaRBzkq0U3gvMNhoqh+C3WDxMdXW fsYzYVxRbM+82F5izA1Kyz9jZsELxwMX1yUK470WKeDDg10spDBjDMQeN6VhQEEWRPS8qH AR2IRcJ5nTGP6kgRsSTTpMwyk0ZZ1aBvTIenYpHxQVxiu102W+Ex416bRqu+TQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from smtpclient.apple (unknown [IPv6:2001:19f0:6001:9db:98f0:9fe0:3545:10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: zlei/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cbMgL1qQszP38; Tue, 30 Sep 2025 02:38:21 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.10\)) Subject: Re: svn commit: r256519 - in head/sys: net netatalk netinet netinet6 netipx From: Zhenlei Huang In-Reply-To: Date: Tue, 30 Sep 2025 10:38:10 +0800 Cc: Gleb Smirnoff , src-committers@freebsd.org, "" , "dev-commits-src-main@FreeBSD.org" Content-Transfer-Encoding: quoted-printable Message-Id: <35D99D40-5534-402A-8479-64C71604206B@FreeBSD.org> References: <201310151031.r9FAVgRP008282@svn.freebsd.org> To: Mateusz Guzik X-Mailer: Apple Mail (2.3696.120.41.1.10) > On Sep 29, 2025, at 10:29 PM, Mateusz Guzik wrote: >=20 > On Tue, Oct 15, 2013 at 12:31=E2=80=AFPM Gleb Smirnoff = wrote: >>=20 >> Author: glebius >> Date: Tue Oct 15 10:31:42 2013 >> New Revision: 256519 >> URL: http://svnweb.freebsd.org/changeset/base/256519 >>=20 >> Log: >> Remove ifa_init() and provide ifa_alloc() that will allocate and = setup >> struct ifaddr internally. >>=20 >> Sponsored by: Netflix >> Sponsored by: Nginx, Inc. >>=20 >> Modified: >> head/sys/net/if.c >> head/sys/net/if_var.h >> head/sys/netatalk/at_control.c >> head/sys/netinet/in.c >> head/sys/netinet6/in6.c >> head/sys/netipx/ipx.c >>=20 >> Modified: head/sys/net/if.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/net/if.c Tue Oct 15 10:19:24 2013 (r256518) >> +++ head/sys/net/if.c Tue Oct 15 10:31:42 2013 (r256519) >> @@ -633,8 +633,7 @@ if_attach_internal(struct ifnet *ifp, in >> socksize =3D sizeof(*sdl); >> socksize =3D roundup2(socksize, sizeof(long)); >> ifasize =3D sizeof(*ifa) + 2 * socksize; >> - ifa =3D malloc(ifasize, M_IFADDR, M_WAITOK | M_ZERO); >> - ifa_init(ifa); >> + ifa =3D ifa_alloc(ifasize, M_WAITOK); >> sdl =3D (struct sockaddr_dl *)(ifa + 1); >> sdl->sdl_len =3D socksize; >> sdl->sdl_family =3D AF_LINK; >> @@ -1417,13 +1416,23 @@ if_maddr_runlock(struct ifnet *ifp) >> /* >> * Initialization, destruction and refcounting functions for ifaddrs. >> */ >> -void >> -ifa_init(struct ifaddr *ifa) >> +struct ifaddr * >> +ifa_alloc(size_t size, int flags) >> { >> + struct ifaddr *ifa; >> + >> + KASSERT(size >=3D sizeof(struct ifaddr), >> + ("%s: invalid size %zu", __func__, size)); >> + >=20 > We have crashes stemming from this: >=20 > panic: ifa_alloc: invalid size 16 >=20 > panic() at panic+0x43/frame 0xfffffe009e777760 > ifa_alloc() at ifa_alloc+0xd6/frame 0xfffffe009e777780 > in6_ifadd() at in6_ifadd+0xd8/frame 0xfffffe009e7778a0 > nd6_ra_input() at nd6_ra_input+0x1023/frame 0xfffffe009e777a80 > icmp6_input() at icmp6_input+0x5b6/frame 0xfffffe009e777c00 > ip6_input() at ip6_input+0xc94/frame 0xfffffe009e777ce0 > sppp_input() at sppp_input+0x502/frame 0xfffffe009e777d70 > pppoe_data_input() at pppoe_data_input+0x1e7/frame 0xfffffe009e777de0 > swi_net() at swi_net+0x19b/frame 0xfffffe009e777e60 > ithread_loop() at ithread_loop+0x266/frame 0xfffffe009e777ef0 > fork_exit() at fork_exit+0x82/frame 0xfffffe009e777f30 > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe009e777f30 >=20 > in6_ifadd has: > struct in6_addr taddr; > ifa =3D ifa_alloc(sizeof(taddr), M_WAITOK); >=20 > should the assert be simply removed? Hi Mateusz, I believe you just found a bug. Try the following patch please, --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -1243,8 +1243,7 @@ in6_ifadd(struct nd_prefixctl *pr, int mcast) =20 /* No suitable LL address, get the ifid directly */ if (ifid_addr =3D=3D NULL) { - struct in6_addr taddr; - ifa =3D ifa_alloc(sizeof(taddr), M_WAITOK); + ifa =3D ifa_alloc(sizeof(struct in6_ifaddr), = M_WAITOK); if (ifa) { ib =3D (struct in6_ifaddr *)ifa; ifid_addr =3D &ib->ia_addr.sin6_addr; Best regards, Zhenlei >=20 >> + ifa =3D malloc(size, M_IFADDR, M_ZERO | flags); >> + if (ifa =3D=3D NULL) >> + return (NULL); >>=20 >> mtx_init(&ifa->ifa_mtx, "ifaddr", NULL, MTX_DEF); >> refcount_init(&ifa->ifa_refcnt, 1); >> ifa->if_data.ifi_datalen =3D sizeof(ifa->if_data); >> + >> + return (ifa); >> } >>=20 >> void >>=20 >> Modified: head/sys/net/if_var.h >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/net/if_var.h Tue Oct 15 10:19:24 2013 = (r256518) >> +++ head/sys/net/if_var.h Tue Oct 15 10:31:42 2013 = (r256519) >> @@ -819,8 +819,8 @@ struct ifaddr { >> #define IFA_LOCK(ifa) mtx_lock(&(ifa)->ifa_mtx) >> #define IFA_UNLOCK(ifa) mtx_unlock(&(ifa)->ifa_mtx) >>=20 >> +struct ifaddr * ifa_alloc(size_t size, int flags); >> void ifa_free(struct ifaddr *ifa); >> -void ifa_init(struct ifaddr *ifa); >> void ifa_ref(struct ifaddr *ifa); >> #endif >>=20 >>=20 >> Modified: head/sys/netatalk/at_control.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/netatalk/at_control.c Tue Oct 15 10:19:24 2013 = (r256518) >> +++ head/sys/netatalk/at_control.c Tue Oct 15 10:31:42 2013 = (r256519) >> @@ -199,16 +199,10 @@ at_control(struct socket *so, u_long cmd >> * allocate a fresh one. >> */ >> if (aa =3D=3D NULL) { >> - aa =3D malloc(sizeof(struct at_ifaddr), = M_IFADDR, >> - M_NOWAIT | M_ZERO); >> - if (aa =3D=3D NULL) { >> - error =3D ENOBUFS; >> - goto out; >> - } >> - callout_init(&aa->aa_callout, = CALLOUT_MPSAFE); >> + ifa =3D ifa_alloc(sizeof(struct at_ifaddr), = M_WAITOK); >> + aa =3D (struct at_ifaddr *)ifa; >>=20 >> - ifa =3D (struct ifaddr *)aa; >> - ifa_init(ifa); >> + callout_init(&aa->aa_callout, = CALLOUT_MPSAFE); >>=20 >> /* >> * As the at_ifaddr contains the actual = sockaddrs, >>=20 >> Modified: head/sys/netinet/in.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/netinet/in.c Tue Oct 15 10:19:24 2013 = (r256518) >> +++ head/sys/netinet/in.c Tue Oct 15 10:31:42 2013 = (r256519) >> @@ -404,16 +404,8 @@ in_control(struct socket *so, u_long cmd >> goto out; >> } >> if (ia =3D=3D NULL) { >> - ia =3D (struct in_ifaddr *) >> - malloc(sizeof *ia, M_IFADDR, M_NOWAIT = | >> - M_ZERO); >> - if (ia =3D=3D NULL) { >> - error =3D ENOBUFS; >> - goto out; >> - } >> - >> - ifa =3D &ia->ia_ifa; >> - ifa_init(ifa); >> + ifa =3D ifa_alloc(sizeof(struct in_ifaddr), = M_WAITOK); >> + ia =3D (struct in_ifaddr *)ifa; >> ifa->ifa_addr =3D (struct sockaddr = *)&ia->ia_addr; >> ifa->ifa_dstaddr =3D (struct sockaddr = *)&ia->ia_dstaddr; >> ifa->ifa_netmask =3D (struct sockaddr = *)&ia->ia_sockmask; >>=20 >> Modified: head/sys/netinet6/in6.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/netinet6/in6.c Tue Oct 15 10:19:24 2013 = (r256518) >> +++ head/sys/netinet6/in6.c Tue Oct 15 10:31:42 2013 = (r256519) >> @@ -1141,12 +1141,9 @@ in6_update_ifa(struct ifnet *ifp, struct >> * RA, it is called under an interrupt context. So, = we should >> * call malloc with M_NOWAIT. >> */ >> - ia =3D (struct in6_ifaddr *) malloc(sizeof(*ia), = M_IFADDR, >> - M_NOWAIT); >> + ia =3D (struct in6_ifaddr *)ifa_alloc(sizeof(*ia), = M_NOWAIT); >> if (ia =3D=3D NULL) >> return (ENOBUFS); >> - bzero((caddr_t)ia, sizeof(*ia)); >> - ifa_init(&ia->ia_ifa); >> LIST_INIT(&ia->ia6_memberships); >> /* Initialize the address and masks, and put time = stamp */ >> ia->ia_ifa.ifa_addr =3D (struct sockaddr = *)&ia->ia_addr; >>=20 >> Modified: head/sys/netipx/ipx.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/netipx/ipx.c Tue Oct 15 10:19:24 2013 = (r256518) >> +++ head/sys/netipx/ipx.c Tue Oct 15 10:31:42 2013 = (r256519) >> @@ -190,13 +190,8 @@ ipx_control(struct socket *so, u_long cm >> if (td && (error =3D priv_check(td, = PRIV_NET_SETLLADDR)) !=3D 0) >> goto out; >> if (ia =3D=3D NULL) { >> - ia =3D malloc(sizeof(*ia), M_IFADDR, M_NOWAIT = | M_ZERO); >> - if (ia =3D=3D NULL) { >> - error =3D ENOBUFS; >> - goto out; >> - } >> - ifa =3D (struct ifaddr *)ia; >> - ifa_init(ifa); >> + ifa =3D ifa_alloc(sizeof(struct ipx_ifaddr), = M_WAITOK); >> + ia =3D (struct ipx_ifaddr *)ifa; >> ia->ia_ifp =3D ifp; >> ifa->ifa_addr =3D (struct sockaddr = *)&ia->ia_addr; >> ifa->ifa_netmask =3D (struct sockaddr = *)&ipx_netmask; From nobody Tue Sep 30 02:57:18 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbN5C0TJQz69GjH; Tue, 30 Sep 2025 02:57:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbN5B74b0z3fmt; Tue, 30 Sep 2025 02:57:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759201039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6i7h6wo+21GJJiEsJtQcyFcsEMyBjUhC3ErJwJc/bnU=; b=UM4DxWxSA34OxKVafEvqQVb7+D+53vj46mSqE88rH3V1Monwz+2p7wCYfNomAN/sEqEVRq K5KhJN1KStTq5DlJKhJNzjAICXkfBufdhHbxMIzZjlfGC6RxhKaAcgq9Ao7Etnci8ilipR iiF2/ycfS/eviI/i3xe7h6MJpVsCrMymBkBliSa0+IpBUDdF+IQ+0M+oehTLZKG/Zd7RjK 4Cf4YdOEmeNku+fR6UGOi5rqV5OpXimHuGc0TDRTaHPN+sCFYKiG/8dmrz8dZcVJpUfUBW U2QEDJtQMyx562L9XX5a9KBGkGyIPWkQPV/HSR6KEndyLGRCL0WhIOJInOA4hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759201039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6i7h6wo+21GJJiEsJtQcyFcsEMyBjUhC3ErJwJc/bnU=; b=PWbf9CEWPoO4fvPDDRRhrHJ2xb9APHGCgqQm00IG4dz/FkGcuqDhKdTf1PmcLS3c3Uxsb6 o+SeY7KJ6c8Xy22IgPneDByTm6zXhtklH79nsYxqRjNK7C7LpoTrTUV/0jNTxfKnNJwnmu uhEgzLkGuVBg7l4rgK4Kg7O/HGRy0f8wkZIIh+PJ8gLR/WtlHN2Ihb3cf3JM69MGWy6+yO AcsCKOluDIGvcpSZ7KQIAtCOLEkzRr2ForgZhuj5RtmxawyeCM02Apyoktu+4Q3IO1HclA LV7hdgKXteAwYXAo2AqLu8vxANAFXVmhRQlEpRhGVH7a+VFxLIojkij3+l9SPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759201039; a=rsa-sha256; cv=none; b=FCYgTtHvCOiXi25WFoYVlU3nK891Lbcrvkw5ljxiC/4ljA82ksE1a/XIRvNTtIX66rOrzp fbdBKhnb8XzQDRHvXiYFRIFZvVtH6GdODQa7GHIvBwx4+uMiP/YYDYTQoBBOyVhGeEfCkG je1rwbx9VT3mdRKlL8iv2pm5qBYfE59WNXgSFX4CXrGuDDD+zIBcXDMT3J9eZK4XWDXogY fDlGpIWwMtuyZiOOfHP7uc9yfA8hsyNbI5Ux4btzQeQ9jac1J9nsM1mS3gO8wDrkRzoRzp 1/T+yRiev8fBUxd74kfzB6JYFS6oyqZ0ynDH3VoLeGqdWpD0mzbfV/hluxB5OA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbN5B6JGNz2q8; Tue, 30 Sep 2025 02:57:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58U2vIpf017507; Tue, 30 Sep 2025 02:57:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58U2vIWI017504; Tue, 30 Sep 2025 02:57:18 GMT (envelope-from git) Date: Tue, 30 Sep 2025 02:57:18 GMT Message-Id: <202509300257.58U2vIWI017504@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 494de51bc007 - main - bsdinstall: Add loader.efi to all ESPs we create List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 494de51bc0074472d1b01604f085daea0844f240 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=494de51bc0074472d1b01604f085daea0844f240 commit 494de51bc0074472d1b01604f085daea0844f240 Author: Warner Losh AuthorDate: 2025-09-30 02:46:57 +0000 Commit: Warner Losh CommitDate: 2025-09-30 02:55:46 +0000 bsdinstall: Add loader.efi to all ESPs we create For proper redundancy, add copies of loader.efi to each of the ESPs we create when we create multi-volume ZFS datasets. zfsboot creates a list of secondary ESPs, while bootpart doesn't create any (it's the UFS partitioning tool) because we don't supporg UFS over gmirror. The primary ESP is mounted and is what we use efibootmgr to boot from. The redundant copies allow the system to boot if the primary disks fails. Sponsored by: Netflix MFC After: 2 days PR: 208802 Reviewed by: cperciva Differential Revision: https://reviews.freebsd.org/D52780 --- usr.sbin/bsdinstall/scripts/auto | 3 ++ usr.sbin/bsdinstall/scripts/bootconfig | 61 ++++++++++++++++++++++------------ usr.sbin/bsdinstall/scripts/zfsboot | 28 +++++++++------- 3 files changed, 59 insertions(+), 33 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto index 0b47d496fdbd..61d52065af2a 100755 --- a/usr.sbin/bsdinstall/scripts/auto +++ b/usr.sbin/bsdinstall/scripts/auto @@ -178,6 +178,9 @@ environment_save rm -rf $BSDINSTALL_TMPETC mkdir $BSDINSTALL_TMPETC +# Reset the ESP list +: > ${TMPDIR:-"/tmp"}/bsdinstall-esps + # With pkgbase, pkg OOM has been observed with QEMU-default 128 MiB memory size. # Ensure we have at least about 256 MiB (with an allowance for rounding etc.). physmem=$(($(sysctl -n hw.physmem) / 1048576)) diff --git a/usr.sbin/bsdinstall/scripts/bootconfig b/usr.sbin/bsdinstall/scripts/bootconfig index 41243ad14b9b..6736e78b450a 100755 --- a/usr.sbin/bsdinstall/scripts/bootconfig +++ b/usr.sbin/bsdinstall/scripts/bootconfig @@ -63,6 +63,24 @@ dialog_uefi_entryname() 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD } +# Copy to the normal FreeBSD location. Also copy to the default location if it +# doesn't exist. This covers setups where UEFI NV variables can't be set and +# some buggy firmware, while preserving complex UEFI setups for multiple booting +# (rEFInd, etc). +uefi_copy_loader() +{ + local ldr=$1 + local freebsd_dir=$2 + local default_dir=$3 + local dest=$4 + + mkdir -p "${freebsd_dir}" "${default_dir}" + cp "${ldr}" "${freebsd_dir}" + if [ ! -f "${default_dir}/${dest}" ]; then + cp "${ldr}" "${default_dir}/${dest}" + fi +} + update_uefi_bootentry() { nentries=$(efibootmgr | grep -c "${EFI_LABEL_NAME}$") @@ -113,6 +131,7 @@ if [ -n "$(awk '{if ($2=="/boot/efi") printf("%s\n",$1);}' $PATH_FSTAB)" ]; then *) die "Unsupported arch $(uname -m) for UEFI install" esac + # Support the weird 32-bit firmware loading 64-bit kernels if [ `sysctl -n machdep.efi_arch` == i386 ]; then ARCHBOOTNAME=ia32 file=loader_ia32.efi @@ -120,31 +139,31 @@ if [ -n "$(awk '{if ($2=="/boot/efi") printf("%s\n",$1);}' $PATH_FSTAB)" ]; then file=loader.efi fi - BOOTDIR="/efi/boot" - BOOTNAME="${BOOTDIR}/boot${ARCHBOOTNAME}.efi" - FREEBSD_BOOTDIR="/efi/freebsd" - FREEBSD_BOOTNAME="${FREEBSD_BOOTDIR}/${file}" + # Copy the boot loader mntpt="$BSDINSTALL_CHROOT/boot/efi" - f_dprintf "Installing ${file} onto ESP" - mkdir -p "${mntpt}/${FREEBSD_BOOTDIR}" "${mntpt}/${BOOTDIR}" - cp "$BSDINSTALL_CHROOT/boot/${file}" "${mntpt}/${FREEBSD_BOOTNAME}" - - # - # UEFI defines a way to specifically select what to boot - # (which we do via efibootmgr). However, if we booted from an ia32 - # UEFI environment, we wouldn't have access to efirt. In addition, - # virtual environments often times lack support for the NV variables - # efibootmgr sets, and some UEFI implementations have features that - # interfere with the setting of these variables. To combat that, we - # install the default removable media boot file if it doesn't exist. - # We don't install it all the time since that can interfere with other - # installations on the drive (like rEFInd). - # - if [ ! -f "${mntpt}/${BOOTNAME}" ]; then - cp "$BSDINSTALL_CHROOT/boot/${file}" "${mntpt}/${BOOTNAME}" + uefi_copy_loader "$BSDINSTALL_CHROOT/boot/${file}" \ + "${mntpt}/efi/freebsd" "${mntpt}/efi/boot" \ + boot${ARCHBOOTNAME}.efi + + # zfsboot records the extra esp partitions it creates to -esps. These + # are newfs'd at the time of creation. We don't support installing ufs + # over gmirror, so we only do this for ZFS. + esps=${TMPDIR:-"/tmp"}/bsdinstall-esps + if [ -f "$esps" ]; then + mntpt=$(mktemp -d -t bsdinstall-esp) + for dev in $(cat $esps); do + f_dprintf "Installing ${file} onto redundant ESP ${dev}" + mount -t msdos "$dev" "$mntpt" + uefi_copy_loader "$BSDINSTALL_CHROOT/boot/${file}" \ + "${mntpt}/efi/freebsd" "${mntpt}/efi/boot" \ + boot${ARCHBOOTNAME}.efi + umount "$mntpt" + done + rmdir "${mntpt}" fi + # Try to set the UEFI NV BootXXXX variables to recod the boot location if [ "$BSDINSTALL_CONFIGCURRENT" ] && [ "$ARCHBOOTNAME" != ia32 ]; then update_uefi_bootentry fi diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot index 5fbf56ea59ac..95cbba3fa131 100755 --- a/usr.sbin/bsdinstall/scripts/zfsboot +++ b/usr.sbin/bsdinstall/scripts/zfsboot @@ -760,6 +760,7 @@ zfs_create_diskpart() { local funcname=zfs_create_diskpart local disk="$1" index="$2" + local efibootpart # Check arguments if [ ! "$disk" ]; then @@ -867,18 +868,22 @@ zfs_create_diskpart() $disk || return $FAILURE # We'll configure the ESP in bootconfig - if [ -z "$efibootpart" ]; then - efibootpart="/dev/gpt/efiboot$index" - f_dprintf "$funcname: configuring ESP at [%s]" \ - "${efibootpart}" - - f_eval_catch $funcname newfs_msdos "$NEWFS_ESP"\ - "$efibootpart" \ - || return $FAILURE + # Note: This will always be p1 + efibootpart="/dev/gpt/efiboot$index" + f_dprintf "$funcname: configuring ESP at [%s]" \ + "${efibootpart}" + + f_eval_catch $funcname newfs_msdos "$NEWFS_ESP"\ + "$efibootpart" \ + || return $FAILURE + if [ $index -eq 0 ]; then f_eval_catch $funcname printf "$PRINTF_FSTAB" \ - $efibootpart /boot/efi msdosfs \ - rw 2 2 "$BSDINSTALL_TMPETC/fstab" \ - || return $FAILURE + $efibootpart /boot/efi msdosfs \ + rw 2 2 "$BSDINSTALL_TMPETC/fstab" \ + || return $FAILURE + else + # Record the extra ones + echo "${efibootpart}" >> ${TMPDIR:-"/tmp"}/bsdinstall-esps fi fi @@ -1021,7 +1026,6 @@ zfs_create_boot() local isswapmirror local bootpart targetpart swappart # Set by zfs_create_diskpart() below local create_options - local efibootpart # # Pedantic checks; should never be seen From nobody Tue Sep 30 02:59:20 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbN7w1YsTz69Gnx for ; Tue, 30 Sep 2025 02:59:40 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbN7v6lY5z3fsL for ; Tue, 30 Sep 2025 02:59:39 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-62fbc90e6f6so9487843a12.3 for ; Mon, 29 Sep 2025 19:59:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759201173; x=1759805973; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=655sC4rpvlUfpg5dFj1G7w0VlmI5ubSOALC0/J9hhN4=; b=H7xtpS9It+/0z9y3XlpOVFn18xqEut7MR7/9BKsoI9RhZudWOet+KMFsUluSzjrZ/2 xuXHGlb8FYFLbyUJRTzU9bmRsQeLI1zc+u1jcxJpGhCIDH+5+k+a3HNMB3S/SvTG3Buz 6KLeCEt4GU705m+vxb105WEEe6QiFVof/69gVJSvS1CBAq5vutrkfM67Y7dDM8vqucnT 7HKwVr0vu3Y8cGWPPLlCiQfmxo3jS6lk+nljKprvF+q99T4oIVmUWVri9UHHld0liBAM QVCepTVaTa4velGGs2qzVGmJ32jfVSNXg89DtrdEkHUTqk93O3w1euXBOG3MofUyszO7 l90g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759201173; x=1759805973; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=655sC4rpvlUfpg5dFj1G7w0VlmI5ubSOALC0/J9hhN4=; b=ifpU1DFLRyiexB2y0ssqGvY3nNqQ40N+wLPSGUXyS/7WnUYr2U7/YDkqo3ubS67n0Q vWUCRb3hJoSFcjuaFsyWbCwYYs8Cp16qrSdbYq/pt+9Bck3SUXfgGqEWeFWGPM+aoxSD 0boTOpFaCfLKz9r0GtL3sRinfIP87ALYKN/Vv/uGmwM5PhUllfiWcXrnmZ/coxfby8UT 4uULvRji+ig8X2hAOjew/LGgxHeKZ1/Wpf9RisxyjmrKBcqc9MPT2m4wxdCbG4pF6btI nAzaFOrBLzH2KNOgJ7d8zdfnvh7k20FICaviXZXPztzFJxI6avYIsJ8UqIkA2SfOmnjI 5OKA== X-Forwarded-Encrypted: i=1; AJvYcCWqsqNalhMo3o0G5HXq1pUCvF1uk0JWfMDWscJ8ErYVR/5k4sFIGbKjoVF2TyZpNVNvlQZlx23ztKJlURfoajOZC8SqjQ==@freebsd.org X-Gm-Message-State: AOJu0YxfJw/Cz3IjqNx9svBiaRDQ9f2T7z30sjg+7kjcOj1WAs7LzbTN ie75dnVIZ5hrNWdVeXQNuOi3X6LoIan8YrfsF8IDg8DjNVNRSCgK6heDo0xUXxejTAxzM7DrRLI X4uyKFxI9PsFGO0GIeuEaOsbEfvLrB9c= X-Gm-Gg: ASbGncuyKedJoHvoSxxFsBsDWVr5kONx/aKTwpwt6mjKYy8SKDcDtNU18iEjYEc4oeN Ic/Ua3ouI+MGFYf9ZcCwRJcl1cpR5zTC5g2+QWZtiV6QMTgmKZl4FQZkKPBzQB7YAuBw+xIpW/N hLggatfrqVcylEksmHAvbcGy5vZyx9o1bUYzf86poSGbgpP3HmxcOIsvxAFVyeSRcEj4l5InzZw ZxR6MEqnOChwNDxUu6c5ZfMZcwC5PoZzR4sRiRy4o8jqlpagjVft2f5CzpQED+AFQ== X-Google-Smtp-Source: AGHT+IEoXD1jViEcnSBhOr6D0pARJe+iefpMfvWYn+udV9ZJFSNTs1uELINpJk6n3x3+Ll/V8EwykeVjheC6jlIfP3I= X-Received: by 2002:a17:907:7246:b0:b45:66f6:6a0a with SMTP id a640c23a62f3a-b4566f67105mr12259666b.44.1759201173362; Mon, 29 Sep 2025 19:59:33 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <201310151031.r9FAVgRP008282@svn.freebsd.org> <35D99D40-5534-402A-8479-64C71604206B@FreeBSD.org> In-Reply-To: <35D99D40-5534-402A-8479-64C71604206B@FreeBSD.org> From: Mateusz Guzik Date: Tue, 30 Sep 2025 04:59:20 +0200 X-Gm-Features: AS18NWClyPDAvNA4QCXOvMoVq1MdFsLhzIBf-mk842H40MiNGViONK0euTJgvAE Message-ID: Subject: Re: svn commit: r256519 - in head/sys: net netatalk netinet netinet6 netipx To: Zhenlei Huang Cc: Gleb Smirnoff , src-committers@freebsd.org, "" , "dev-commits-src-main@FreeBSD.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cbN7v6lY5z3fsL On Tue, Sep 30, 2025 at 4:38=E2=80=AFAM Zhenlei Huang wr= ote: > > > > > On Sep 29, 2025, at 10:29 PM, Mateusz Guzik wrote: > > > > On Tue, Oct 15, 2013 at 12:31=E2=80=AFPM Gleb Smirnoff wrote: > >> > >> Author: glebius > >> Date: Tue Oct 15 10:31:42 2013 > >> New Revision: 256519 > >> URL: http://svnweb.freebsd.org/changeset/base/256519 > >> > >> Log: > >> Remove ifa_init() and provide ifa_alloc() that will allocate and se= tup > >> struct ifaddr internally. > >> > >> Sponsored by: Netflix > >> Sponsored by: Nginx, Inc. > >> > >> Modified: > >> head/sys/net/if.c > >> head/sys/net/if_var.h > >> head/sys/netatalk/at_control.c > >> head/sys/netinet/in.c > >> head/sys/netinet6/in6.c > >> head/sys/netipx/ipx.c > >> > >> Modified: head/sys/net/if.c > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > >> --- head/sys/net/if.c Tue Oct 15 10:19:24 2013 (r256518) > >> +++ head/sys/net/if.c Tue Oct 15 10:31:42 2013 (r256519) > >> @@ -633,8 +633,7 @@ if_attach_internal(struct ifnet *ifp, in > >> socksize =3D sizeof(*sdl); > >> socksize =3D roundup2(socksize, sizeof(long)); > >> ifasize =3D sizeof(*ifa) + 2 * socksize; > >> - ifa =3D malloc(ifasize, M_IFADDR, M_WAITOK | M_ZERO); > >> - ifa_init(ifa); > >> + ifa =3D ifa_alloc(ifasize, M_WAITOK); > >> sdl =3D (struct sockaddr_dl *)(ifa + 1); > >> sdl->sdl_len =3D socksize; > >> sdl->sdl_family =3D AF_LINK; > >> @@ -1417,13 +1416,23 @@ if_maddr_runlock(struct ifnet *ifp) > >> /* > >> * Initialization, destruction and refcounting functions for ifaddrs. > >> */ > >> -void > >> -ifa_init(struct ifaddr *ifa) > >> +struct ifaddr * > >> +ifa_alloc(size_t size, int flags) > >> { > >> + struct ifaddr *ifa; > >> + > >> + KASSERT(size >=3D sizeof(struct ifaddr), > >> + ("%s: invalid size %zu", __func__, size)); > >> + > > > > We have crashes stemming from this: > > > > panic: ifa_alloc: invalid size 16 > > > > panic() at panic+0x43/frame 0xfffffe009e777760 > > ifa_alloc() at ifa_alloc+0xd6/frame 0xfffffe009e777780 > > in6_ifadd() at in6_ifadd+0xd8/frame 0xfffffe009e7778a0 > > nd6_ra_input() at nd6_ra_input+0x1023/frame 0xfffffe009e777a80 > > icmp6_input() at icmp6_input+0x5b6/frame 0xfffffe009e777c00 > > ip6_input() at ip6_input+0xc94/frame 0xfffffe009e777ce0 > > sppp_input() at sppp_input+0x502/frame 0xfffffe009e777d70 > > pppoe_data_input() at pppoe_data_input+0x1e7/frame 0xfffffe009e777de0 > > swi_net() at swi_net+0x19b/frame 0xfffffe009e777e60 > > ithread_loop() at ithread_loop+0x266/frame 0xfffffe009e777ef0 > > fork_exit() at fork_exit+0x82/frame 0xfffffe009e777f30 > > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe009e777f30 > > > > in6_ifadd has: > > struct in6_addr taddr; > > ifa =3D ifa_alloc(sizeof(taddr), M_WAITOK); > > > > should the assert be simply removed? > > Hi Mateusz, > > I believe you just found a bug. > > Try the following patch please, > > --- a/sys/netinet6/nd6_rtr.c > +++ b/sys/netinet6/nd6_rtr.c > @@ -1243,8 +1243,7 @@ in6_ifadd(struct nd_prefixctl *pr, int mcast) > > /* No suitable LL address, get the ifid directly */ > if (ifid_addr =3D=3D NULL) { > - struct in6_addr taddr; > - ifa =3D ifa_alloc(sizeof(taddr), M_WAITOK); > + ifa =3D ifa_alloc(sizeof(struct in6_ifaddr), M_WA= ITOK); > if (ifa) { > ib =3D (struct in6_ifaddr *)ifa; > ifid_addr =3D &ib->ia_addr.sin6_addr; > Thanks for the patch. I don't have means to readily test it. This panic was getting in the way of looking at another panic so I did not pay much attention. But now that you point this out, I don't think the patch is sufficient. in6_get_ifid starts with NET_EPOCH_ASSERT. At the same time malloc(..., M_WAITOK) is illegal to call from an epoch sec= tion. I don't know if in6_ifadd is called within net epoch, either way the above two are clearly contradictory. Is there are a reason to malloc this in the first place? From nobody Tue Sep 30 03:07:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbNJr3TLQz69HS2; Tue, 30 Sep 2025 03:07:24 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbNJr2s1Cz3gx2; Tue, 30 Sep 2025 03:07:24 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759201644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+AKObhsLT0HhU5UFt4PJ02XrLbJ4r9sNShUMB8o01SE=; b=EGc/iC5lVAQECo/pLO+MLJCAxIEdWtUmsYGK22pwXqAKcjvwVxbWc0wMAGtSQl05+UuNxa TF+YHL2i//4Zx4rAOWSuYZsyD85bxz/HkFiQ2X7KVZymN2LKky+MIipBLp6sbHgyHxepHH WxATWBt1Sbj1MJyH5392SZPLhMOlaNJprAIQzLY8fwq+qGwgdtAzjTWfiOqknvaX/OWPoc wSeakTtcX53fh5GjQR9uKiDvo4yM4KynYtDa1U2vmY/xt0eG9OHv6egGiJZvBpp5wiPLZt Xs84ki4d1cMC3uCcDKzVM/QiZH5AtQ5esIobJj0NmB29w2RauwyZyarIcrM+Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759201644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+AKObhsLT0HhU5UFt4PJ02XrLbJ4r9sNShUMB8o01SE=; b=tMPsgJS6sJWmRKi61qr5zWg4teR0ibQVUT5YdjN25WajJVu5A2kCGJgz1v7K5KKk+6YVsT fZKCfzNRXx6MBNpJp2haa/F5V6eQK5FPCzd806Ijq1kD6u/wM0oJFwuHHtpb6Pd5dzpW1K 14P99F6VN3hqpOy2EURO7LjBYRPbn06MpOadKREeovyI4GWkeIrYsWJ56C1a6gZ7JrmOFg pJBm+o0wJ08VpBXRn95ZGkSezFSAJz34KR0oARI9kisdGLet5gWD17eoNfempP402VDs/Q oHPILbUvc+CLT7HR3L5ad/YR+XgrV+ROLPZ7U25i2YPUcGLrZ5Eawcsif7427A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759201644; a=rsa-sha256; cv=none; b=UhosC1VAyi1RMGm6r2A9Ys4vZDXX+oSBdjAYl/KPmZ3TMno2YjDQCnFbeFgDPjTP6AIbYy Xbk6APAwhhooMzSRdjoSh+syYXPFtxqhqUbNLAqasrdOJUYWYhumxG6oYTXIMhcvjbbZZh K/WrwCk3hL8b+BU/nxU0k1KxQlKVLjb/W1liXnmAN8dFfFCej5tqgwbaEolOZ/JbSnoDO4 caXeJ1wntdCd58Mgs9d4B+tVKWIbGgz5+523a1MbwgPXFfulKaQm2nM/rcrwEV0QnR3UCk gBuD6Tvem5e2dpk2VkMjbWt7dGpy8m2AaE8ExYDHDpPsofGzVtbrRjqIHTT7hA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from smtpclient.apple (ns1.oxydns.net [45.32.91.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: zlei/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cbNJn6HCYzPZ4; Tue, 30 Sep 2025 03:07:21 +0000 (UTC) (envelope-from zlei@FreeBSD.org) From: Zhenlei Huang Message-Id: <13C41285-E7E1-4B49-B9A7-1B157B445CDD@FreeBSD.org> Content-Type: multipart/alternative; boundary="Apple-Mail=_8A8C8FF2-DB0E-4602-97BC-9632550436C9" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.10\)) Subject: Re: svn commit: r256519 - in head/sys: net netatalk netinet netinet6 netipx Date: Tue, 30 Sep 2025 11:07:15 +0800 In-Reply-To: Cc: Gleb Smirnoff , src-committers@freebsd.org, "" , "dev-commits-src-main@FreeBSD.org" , "Bjoern A. Zeeb" , Kristof Provost To: Mateusz Guzik References: <201310151031.r9FAVgRP008282@svn.freebsd.org> <35D99D40-5534-402A-8479-64C71604206B@FreeBSD.org> X-Mailer: Apple Mail (2.3696.120.41.1.10) --Apple-Mail=_8A8C8FF2-DB0E-4602-97BC-9632550436C9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Sep 30, 2025, at 10:59 AM, Mateusz Guzik wrote: >=20 > On Tue, Sep 30, 2025 at 4:38=E2=80=AFAM Zhenlei Huang = > wrote: >>=20 >>=20 >>=20 >>> On Sep 29, 2025, at 10:29 PM, Mateusz Guzik = wrote: >>>=20 >>> On Tue, Oct 15, 2013 at 12:31=E2=80=AFPM Gleb Smirnoff = wrote: >>>>=20 >>>> Author: glebius >>>> Date: Tue Oct 15 10:31:42 2013 >>>> New Revision: 256519 >>>> URL: http://svnweb.freebsd.org/changeset/base/256519 >>>>=20 >>>> Log: >>>> Remove ifa_init() and provide ifa_alloc() that will allocate and = setup >>>> struct ifaddr internally. >>>>=20 >>>> Sponsored by: Netflix >>>> Sponsored by: Nginx, Inc. >>>>=20 >>>> Modified: >>>> head/sys/net/if.c >>>> head/sys/net/if_var.h >>>> head/sys/netatalk/at_control.c >>>> head/sys/netinet/in.c >>>> head/sys/netinet6/in6.c >>>> head/sys/netipx/ipx.c >>>>=20 >>>> Modified: head/sys/net/if.c >>>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>>> --- head/sys/net/if.c Tue Oct 15 10:19:24 2013 (r256518) >>>> +++ head/sys/net/if.c Tue Oct 15 10:31:42 2013 (r256519) >>>> @@ -633,8 +633,7 @@ if_attach_internal(struct ifnet *ifp, in >>>> socksize =3D sizeof(*sdl); >>>> socksize =3D roundup2(socksize, sizeof(long)); >>>> ifasize =3D sizeof(*ifa) + 2 * socksize; >>>> - ifa =3D malloc(ifasize, M_IFADDR, M_WAITOK | = M_ZERO); >>>> - ifa_init(ifa); >>>> + ifa =3D ifa_alloc(ifasize, M_WAITOK); >>>> sdl =3D (struct sockaddr_dl *)(ifa + 1); >>>> sdl->sdl_len =3D socksize; >>>> sdl->sdl_family =3D AF_LINK; >>>> @@ -1417,13 +1416,23 @@ if_maddr_runlock(struct ifnet *ifp) >>>> /* >>>> * Initialization, destruction and refcounting functions for = ifaddrs. >>>> */ >>>> -void >>>> -ifa_init(struct ifaddr *ifa) >>>> +struct ifaddr * >>>> +ifa_alloc(size_t size, int flags) >>>> { >>>> + struct ifaddr *ifa; >>>> + >>>> + KASSERT(size >=3D sizeof(struct ifaddr), >>>> + ("%s: invalid size %zu", __func__, size)); >>>> + >>>=20 >>> We have crashes stemming from this: >>>=20 >>> panic: ifa_alloc: invalid size 16 >>>=20 >>> panic() at panic+0x43/frame 0xfffffe009e777760 >>> ifa_alloc() at ifa_alloc+0xd6/frame 0xfffffe009e777780 >>> in6_ifadd() at in6_ifadd+0xd8/frame 0xfffffe009e7778a0 >>> nd6_ra_input() at nd6_ra_input+0x1023/frame 0xfffffe009e777a80 >>> icmp6_input() at icmp6_input+0x5b6/frame 0xfffffe009e777c00 >>> ip6_input() at ip6_input+0xc94/frame 0xfffffe009e777ce0 >>> sppp_input() at sppp_input+0x502/frame 0xfffffe009e777d70 >>> pppoe_data_input() at pppoe_data_input+0x1e7/frame = 0xfffffe009e777de0 >>> swi_net() at swi_net+0x19b/frame 0xfffffe009e777e60 >>> ithread_loop() at ithread_loop+0x266/frame 0xfffffe009e777ef0 >>> fork_exit() at fork_exit+0x82/frame 0xfffffe009e777f30 >>> fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe009e777f30 >>>=20 >>> in6_ifadd has: >>> struct in6_addr taddr; >>> ifa =3D ifa_alloc(sizeof(taddr), M_WAITOK); >>>=20 >>> should the assert be simply removed? >>=20 >> Hi Mateusz, >>=20 >> I believe you just found a bug. >>=20 >> Try the following patch please, >>=20 >> --- a/sys/netinet6/nd6_rtr.c >> +++ b/sys/netinet6/nd6_rtr.c >> @@ -1243,8 +1243,7 @@ in6_ifadd(struct nd_prefixctl *pr, int mcast) >>=20 >> /* No suitable LL address, get the ifid directly */ >> if (ifid_addr =3D=3D NULL) { >> - struct in6_addr taddr; >> - ifa =3D ifa_alloc(sizeof(taddr), M_WAITOK); >> + ifa =3D ifa_alloc(sizeof(struct in6_ifaddr), = M_WAITOK); >> if (ifa) { >> ib =3D (struct in6_ifaddr *)ifa; >> ifid_addr =3D &ib->ia_addr.sin6_addr; >>=20 >=20 > Thanks for the patch. I don't have means to readily test it. >=20 > This panic was getting in the way of looking at another panic so I did > not pay much attention. >=20 > But now that you point this out, I don't think the patch is = sufficient. >=20 > in6_get_ifid starts with NET_EPOCH_ASSERT. >=20 > At the same time malloc(..., M_WAITOK) is illegal to call from an = epoch section. So M_NOWAIT should be used, instead of M_WAITOK . >=20 > I don't know if in6_ifadd is called within net epoch, either way the > above two are clearly contradictory. >=20 > Is there are a reason to malloc this in the first place? I have not look into the code throughly. That was introduced via commit = https://cgit.freebsd.org/src/commit/?id=3D9e792f7ef7298080c058fbc2d36a4e60= e596dae9 . See https://reviews.freebsd.org/D51778 for more context. Best regards, Zhenlei --Apple-Mail=_8A8C8FF2-DB0E-4602-97BC-9632550436C9 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Sep 30, 2025, at 10:59 AM, Mateusz Guzik <mjguzik@gmail.com> = wrote:

On Tue, Sep 30, 2025 at 4:38=E2=80=AFAM Zhenlei Huang = <zlei@freebsd.org> = wrote:



On Sep 29, 2025, at 10:29 PM, Mateusz Guzik <mjguzik@gmail.com> = wrote:

On Tue, Oct 15, 2013 at 12:31=E2=80=AF= PM Gleb Smirnoff <glebius@freebsd.org> wrote:

Author: glebius
Date: Tue Oct 15 10:31:42 2013
New Revision: = 256519
URL: http://svnweb.freebsd.org/changeset/base/256519

Log:
  Remove = ifa_init() and provide ifa_alloc() that will allocate and setup
struct ifaddr internally.

Sponsored by: Netflix
Sponsored by: Nginx, = Inc.

Modified:
head/sys/net/if.c
head/sys/net/if_var.h
head/sys/netatalk/at_control.c
head/sys/netinet/in.c
head/sys/netinet6/in6.c
head/sys/netipx/ipx.c

Modified: = head/sys/net/if.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D
--- head/sys/net/if.c =   Tue Oct 15 10:19:24 2013 =        (r256518)
+++ = head/sys/net/if.c   Tue Oct 15 10:31:42 2013 =        (r256519)
@@ = -633,8 +633,7 @@ if_attach_internal(struct ifnet *ifp, in
          &nb= sp;           socks= ize =3D sizeof(*sdl);
          &nb= sp;   socksize =3D roundup2(socksize, sizeof(long));
          &nb= sp;   ifasize =3D sizeof(*ifa) + 2 * socksize;
- =             &n= bsp; ifa =3D malloc(ifasize, M_IFADDR, M_WAITOK | M_ZERO);
- =             &n= bsp; ifa_init(ifa);
+ =             &n= bsp; ifa =3D ifa_alloc(ifasize, M_WAITOK);
          &nb= sp;   sdl =3D (struct sockaddr_dl *)(ifa + 1);
          &nb= sp;   sdl->sdl_len =3D socksize;
          &nb= sp;   sdl->sdl_family =3D AF_LINK;
@@ = -1417,13 +1416,23 @@ if_maddr_runlock(struct ifnet *ifp)
/*
* Initialization, destruction and = refcounting functions for ifaddrs.
*/
-void-ifa_init(struct ifaddr *ifa)
+struct ifaddr = *
+ifa_alloc(size_t size, int flags)
{
+       struct ifaddr *ifa;
+
+ =       KASSERT(size >=3D sizeof(struct = ifaddr),
+ =           ("%s: = invalid size %zu", __func__, size));
+

We have crashes stemming from = this:

panic: ifa_alloc: invalid size 16

panic() at panic+0x43/frame = 0xfffffe009e777760
ifa_alloc() at ifa_alloc+0xd6/frame = 0xfffffe009e777780
in6_ifadd() at in6_ifadd+0xd8/frame = 0xfffffe009e7778a0
nd6_ra_input() at = nd6_ra_input+0x1023/frame 0xfffffe009e777a80
icmp6_input() = at icmp6_input+0x5b6/frame 0xfffffe009e777c00
ip6_input() = at ip6_input+0xc94/frame 0xfffffe009e777ce0
sppp_input() = at sppp_input+0x502/frame 0xfffffe009e777d70
pppoe_data_input() at pppoe_data_input+0x1e7/frame = 0xfffffe009e777de0
swi_net() at swi_net+0x19b/frame = 0xfffffe009e777e60
ithread_loop() at = ithread_loop+0x266/frame 0xfffffe009e777ef0
fork_exit() at = fork_exit+0x82/frame 0xfffffe009e777f30
fork_trampoline() = at fork_trampoline+0xe/frame 0xfffffe009e777f30

in6_ifadd has:
          &nb= sp;           struc= t in6_addr taddr;
          &nb= sp;           ifa = =3D ifa_alloc(sizeof(taddr), M_WAITOK);

should the assert be simply removed?

Hi Mateusz,

I believe you just found a bug.

Try the following patch please,

--- a/sys/netinet6/nd6_rtr.c
+++ = b/sys/netinet6/nd6_rtr.c
@@ -1243,8 +1243,7 @@ = in6_ifadd(struct nd_prefixctl *pr, int mcast)

          &nb= sp;    /* No suitable LL address, get the ifid = directly */
          &nb= sp;    if (ifid_addr =3D=3D NULL) {
- =             &n= bsp;         struct = in6_addr taddr;
- =             &n= bsp;         ifa =3D = ifa_alloc(sizeof(taddr), M_WAITOK);
+ =             &n= bsp;         ifa =3D = ifa_alloc(sizeof(struct in6_ifaddr), M_WAITOK);
          &nb= sp;            = ;if (ifa) {
          &nb= sp;            = ;        ib =3D (struct = in6_ifaddr *)ifa;
          &nb= sp;            = ;        ifid_addr =3D = &ib->ia_addr.sin6_addr;


Thanks for the patch. I don't have means to readily test = it.

This panic = was getting in the way of looking at another panic so I did
not pay much = attention.

But now that = you point this out, I don't think the patch is sufficient.

in6_get_ifid = starts with NET_EPOCH_ASSERT.

At the same time malloc(..., M_WAITOK) is illegal to call = from an epoch section.

So M_NOWAIT should be used, instead of M_WAITOK = .


I don't know = if in6_ifadd is called within net epoch, either way the
above two are = clearly contradictory.

Is there are a reason to malloc this in the first = place?

I have not = look into the code throughly. That was introduced via commit https://cgit.freebsd.org/src/commit/?id=3D9e792f7ef7298080c058f= bc2d36a4e60e596dae9 .

See https://reviews.freebsd.org/D51778 for more = context.

Best regards,
Zhenlei

= --Apple-Mail=_8A8C8FF2-DB0E-4602-97BC-9632550436C9-- From nobody Tue Sep 30 03:32:19 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbNsb3PCdz69Jl2; Tue, 30 Sep 2025 03:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbNsb2fxFz3kCS; Tue, 30 Sep 2025 03:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759203139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PQKH2n5hFN8zqbOu6k22KpqlWJd5O7siknYnnygHC78=; b=dYZNURXilPTHEKMzEoIPUHYPAVD4b083zFBj88x86Y50XqT6XW0jBd88IWMKHFO0vwVwNg rcKd705+sl33CnCwXwDetTAmF/CZtI1olYrn44fLD1oYY6JSY8qGjmbqcliqA1R2PTJYXJ n1hRmhzMBdSFXpJtIvsFRkPH5ABJHr+assJJdDcrht4z2M1TS/dRlhSaaS5LmvSlhmLAsL Z4VYZxgFRRcD9EYhTKS2dShwrBsHnCv5pbUxr1KpTn0edXPS5vmE44khCLKZcix3oeOnBT 53FYQKyqO+kVbpchioUwWSDrpXcZNcSLWY9Sl3SnGXSp1mIossMeoXoDr218bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759203139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PQKH2n5hFN8zqbOu6k22KpqlWJd5O7siknYnnygHC78=; b=MW7WVluwG96Yvp42fAy1c+DGLo+7GTpF4tJvgvPI+U+1Bc1s0fg5HFWoZPmZcmBFMjVWK4 aPVcljYxu8h/SPzy2q5knMsEhKvhRebCGMd5MVQZF0ymkPM+lp5H/qvxh39ltbhLMRuUW8 mhHnk5Uw1WrDjxyVYudg9KnttyDO9OzYhAlkHTD1UYRxcy5UbMyeCfP0PWk8PG4GjX9GTs r8pAdIz3gZq50wNMEOkIJQwvFcoxzrZ0+aCwtKetAbipkcraphrWrcwoPbMs4NCYFjMZvn KYdmfX5qQPGdp/URdPXCQXxciu+8cL9wh8ZCoYUJbb9Vsex5Ty946lAitF6S/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759203139; a=rsa-sha256; cv=none; b=wcZOqvHG1yluaV7G3eYRtA12ZYswSojWVT+xtHwfQZAqi9NDWpRYMFuQyUXDSBHar/gtMI jEh7kyQlQvlx7sJOb0aK+2wWw+C7bCAk1VwLDRYXfR8K0gAEkSlSyg5W6QpxoObgejtVGV 4lLpY6J7yFm3lXjPPJFnY+XbHw8+86EeaI8EC+QcQGKLEaLRix1JKEZPJaDYQmpyw9hjfE 7Z//U9SKFxtvD6ukfXGHJo+2NGEvLivIZ/1grj+10evExgdVPzMn2apyPm6Po93tdyi0Ej QiOqCLn4W2pe09TFCHgvgI89fSczRcy2d53VETvrhouVPaiRrYIlYu2QF1HVfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbNsb24Htz3Y8; Tue, 30 Sep 2025 03:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58U3WJrQ093284; Tue, 30 Sep 2025 03:32:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58U3WJkx093281; Tue, 30 Sep 2025 03:32:19 GMT (envelope-from git) Date: Tue, 30 Sep 2025 03:32:19 GMT Message-Id: <202509300332.58U3WJkx093281@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 89eee8ee2ce5 - main - wlanstat(8): Rename from wlanstats(8) to keep consistency 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: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 89eee8ee2ce57b7884defb8f9af016cd28ef1562 Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=89eee8ee2ce57b7884defb8f9af016cd28ef1562 commit 89eee8ee2ce57b7884defb8f9af016cd28ef1562 Author: Li-Wen Hsu AuthorDate: 2025-09-30 03:30:08 +0000 Commit: Li-Wen Hsu CommitDate: 2025-09-30 03:30:08 +0000 wlanstat(8): Rename from wlanstats(8) to keep consistency All the status and statistics utilties in base are ending with "stat", the only exception is mailstats(8) but that's from sendmail. Reviewed by: imp, adrian MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52724 --- ObsoleteFiles.inc | 4 ++++ usr.sbin/Makefile | 2 +- usr.sbin/{wlanstats => wlanstat}/Makefile | 6 +++--- usr.sbin/{wlanstats => wlanstat}/main.c | 8 ++++---- usr.sbin/{wlanstats/wlanstats.8 => wlanstat/wlanstat.8} | 4 ++-- usr.sbin/{wlanstats/wlanstats.c => wlanstat/wlanstat.c} | 10 +++++----- usr.sbin/{wlanstats/wlanstats.h => wlanstat/wlanstat.h} | 8 ++++---- 7 files changed, 23 insertions(+), 19 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 06aacea24c69..55202d1c100c 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20250930: Rename wlanstats to wlanstat +OLD_FILES+=usr/sbin/wlanstats +OLD_FILES+=usr/share/man/man8/wlanstats.8.gz + # 20250929: Remove ftpd(8) OLD_FILES+=etc/rc.d/ftpd OLD_FILES+=usr/libexec/ftpd diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index 90b360ac55e6..e660c1e59157 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -210,7 +210,7 @@ SUBDIR.${MK_UTMPX}+= ac SUBDIR.${MK_UTMPX}+= lastlogin SUBDIR.${MK_UTMPX}+= utx SUBDIR.${MK_WIRELESS}+= wlandebug -SUBDIR.${MK_WIRELESS}+= wlanstats +SUBDIR.${MK_WIRELESS}+= wlanstat SUBDIR.${MK_WIRELESS}+= wpa SUBDIR.${MK_TESTS}+= tests diff --git a/usr.sbin/wlanstats/Makefile b/usr.sbin/wlanstat/Makefile similarity index 78% rename from usr.sbin/wlanstats/Makefile rename to usr.sbin/wlanstat/Makefile index 574a9c27137f..ec1fc3206267 100644 --- a/usr.sbin/wlanstats/Makefile +++ b/usr.sbin/wlanstat/Makefile @@ -1,13 +1,13 @@ .include -PROG= wlanstats -MAN= wlanstats.8 +PROG= wlanstat +MAN= wlanstat.8 CFLAGS= -I${SRCTOP}/lib/libbsdstat LIBADD= bsdstat SRCS= main.c \ - wlanstats.c + wlanstat.c CFLAGS.clang+= -fbracket-depth=512 -Wno-cast-align diff --git a/usr.sbin/wlanstats/main.c b/usr.sbin/wlanstat/main.c similarity index 97% rename from usr.sbin/wlanstats/main.c rename to usr.sbin/wlanstat/main.c index 85d10ad9012a..fba0b01a07d0 100644 --- a/usr.sbin/wlanstats/main.c +++ b/usr.sbin/wlanstat/main.c @@ -28,7 +28,7 @@ */ /* - * wlanstats [-i interface] + * wlanstat [-i interface] * (default interface is wlan0). */ @@ -45,7 +45,7 @@ #include #include -#include "wlanstats.h" +#include "wlanstat.h" static struct { const char *tag; @@ -158,7 +158,7 @@ static void usage(void) { - printf("wlanstats: [-h] [-i ifname] [-l] [-m station_MAC_address] [-o fmt] [interval]\n"); + printf("wlanstat: [-h] [-i ifname] [-l] [-m station_MAC_address] [-o fmt] [interval]\n"); } int @@ -176,7 +176,7 @@ main(int argc, char *argv[]) ifname = getenv("WLAN"); if (ifname == NULL) ifname = "wlan0"; - wf = wlanstats_new(ifname, getfmt("default")); + wf = wlanstat_new(ifname, getfmt("default")); #if 0 while ((c = getopt(argc, argv, "ahi:lm:o:")) != -1) { #else diff --git a/usr.sbin/wlanstats/wlanstats.8 b/usr.sbin/wlanstat/wlanstat.8 similarity index 97% rename from usr.sbin/wlanstats/wlanstats.8 rename to usr.sbin/wlanstat/wlanstat.8 index a8127726dd61..6e3df1ef3e5e 100644 --- a/usr.sbin/wlanstats/wlanstats.8 +++ b/usr.sbin/wlanstat/wlanstat.8 @@ -7,10 +7,10 @@ .\" SPDX-License-Identifier: BSD-2-Clause .\" .Dd March 14, 2025 -.Dt WLANSTATS 8 +.Dt WLANSTAT 8 .Os .Sh NAME -.Nm wlanstats +.Nm wlanstat .Nd query 802.11 wireless network statistics .Sh SYNOPSIS .Nm diff --git a/usr.sbin/wlanstats/wlanstats.c b/usr.sbin/wlanstat/wlanstat.c similarity index 99% rename from usr.sbin/wlanstats/wlanstats.c rename to usr.sbin/wlanstat/wlanstat.c index 83f5010341a9..468c4848004d 100644 --- a/usr.sbin/wlanstats/wlanstats.c +++ b/usr.sbin/wlanstat/wlanstat.c @@ -52,7 +52,7 @@ #include "../../sys/net80211/ieee80211_ioctl.h" -#include "wlanstats.h" +#include "wlanstat.h" #ifndef IEEE80211_ADDR_COPY #define IEEE80211_ADDR_COPY(dst, src) memcpy(dst, src, IEEE80211_ADDR_LEN) @@ -61,7 +61,7 @@ #define AFTER(prev) ((prev)+1) -static const struct fmt wlanstats[] = { +static const struct fmt wlanstat[] = { #define S_RX_BADVERSION 0 { 5, "rx_badversion", "bvers", "rx frame with bad version" }, #define S_RX_TOOSHORT AFTER(S_RX_BADVERSION) @@ -1032,14 +1032,14 @@ wlan_get_totstat(struct bsdstat *sf, int s, char b[], size_t bs) BSDSTAT_DEFINE_BOUNCE(wlanstatfoo) struct wlanstatfoo * -wlanstats_new(const char *ifname, const char *fmtstring) +wlanstat_new(const char *ifname, const char *fmtstring) { struct wlanstatfoo_p *wf; wf = calloc(1, sizeof(struct wlanstatfoo_p)); if (wf != NULL) { - bsdstat_init(&wf->base.base, "wlanstats", wlanstats, - nitems(wlanstats)); + bsdstat_init(&wf->base.base, "wlanstat", wlanstat, + nitems(wlanstat)); /* override base methods */ wf->base.base.collect_cur = wlan_collect_cur; wf->base.base.collect_tot = wlan_collect_tot; diff --git a/usr.sbin/wlanstats/wlanstats.h b/usr.sbin/wlanstat/wlanstat.h similarity index 93% rename from usr.sbin/wlanstats/wlanstats.h rename to usr.sbin/wlanstat/wlanstat.h index 8ab3c0558fd6..ed0150e11809 100644 --- a/usr.sbin/wlanstats/wlanstats.h +++ b/usr.sbin/wlanstat/wlanstat.h @@ -27,8 +27,8 @@ * THE POSSIBILITY OF SUCH DAMAGES. */ -#ifndef _WLANSTATS_H_ -#define _WLANSTATS_H_ +#ifndef _WLANSTAT_H_ +#define _WLANSTAT_H_ #include "bsdstat.h" @@ -50,5 +50,5 @@ struct wlanstatfoo { void (*setstamac)(struct wlanstatfoo *, const uint8_t mac[]); }; -struct wlanstatfoo *wlanstats_new(const char *ifname, const char *fmtstring); -#endif /* _WLANSTATS_H_ */ +struct wlanstatfoo *wlanstat_new(const char *ifname, const char *fmtstring); +#endif /* _WLANSTAT_H_ */ From nobody Tue Sep 30 03:32:20 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbNsc4M1mz69K4c; Tue, 30 Sep 2025 03:32:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbNsc3sQyz3kZ6; Tue, 30 Sep 2025 03:32:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759203140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hvlkn1IFd2hDjskAIfKcLoqznBIesa2YRHqLpsQMjRg=; b=hwjwO3egEuFFwNuxLDRYIglcHef5nC4Rx3lCepCr3gobJ3vmH5icwICAmv979hXTS5fnBp a5Ub/BdLPa1e1u6nXC/nDdLiuU48B2TAXJn6K5ccUQswTNCGORQD4TiU/mnff/EAn1ApQ9 uzFLs+OifmT2wIp14LviMHcVbXZ+aYJycqn4WhpVPmRktWVb/wBdlARKDoyEUtxGKp0PB2 V22aIsookRfBjZGVWHMQx8XYiNPhQNFk4GC/iz+MysufDrLbko5B/pBlzOKEFliVIIO+Ts GiT2hxzdrsQuWXKKixUqAKEIu58pnC02MOy92tKgNR5JOvc3r5h8fsrU7qOR3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759203140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hvlkn1IFd2hDjskAIfKcLoqznBIesa2YRHqLpsQMjRg=; b=A0lh5lnwNiPxZ2UMZd7+btx18E2KVSe7QrsrB4iTB4WHUsSZjy8ABZO0F1h5yfu+hMA2i1 iHLEfcPoiGIm/r7drd4Y1pBE3TuwhH2dqbKEsBmOFGCffoHOW3t91tw6RepxkvG+rVlUof 95T/Hy9QRRg7BGraw2DKTpAhveiJ6TwtnL/zZVzAkPOh2pEjz+lb25A5vhPq2CUubQXoYD igt9WkuyLpBEvSIw8EIyVcBUtZIqAM+5GY8JOeluQqccMkHQfLiL3tpyypAXm8AzxjD6q3 y4vY1Y+9fADe+MANxByy5yrQZsqmsmKmu90xbM0orTWnZkC7Mdb8HG5qxsCq+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759203140; a=rsa-sha256; cv=none; b=lSqMV7NxlKyoePv2JeF5wQ+Qwcls3yCTzeHyTxffn4ioWKqWMp2YaD5kE4wYxePurmLNkm ErTbWY/VX5RTppsCnrHelFhM1O0Wijr74xKyhtpz9AlpXL5OJMcJsQHJd0A36E4cXSIG2w YvruihNLRl2HB8X3i9Y5tiLG6rLp3SEc7dhMhe/g1AYyGn1s8B47Rxx7aKOX+4foOEys0n 6GjuTrDOxIzR0uWhHEU6ZbL+kum2D7RpAQfRQnyhmvbrBV7rwJ+aw0v7PMSygzCzG0uDF9 QQQ1xmB3kmuyagH9Z1bELoVuf1rGu8hv1+hnIMFO0gti0zppLSr4vg8Y4n8HYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbNsc2k7Xz3fV; Tue, 30 Sep 2025 03:32:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58U3WKI4093317; Tue, 30 Sep 2025 03:32:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58U3WK1r093314; Tue, 30 Sep 2025 03:32:20 GMT (envelope-from git) Date: Tue, 30 Sep 2025 03:32:20 GMT Message-Id: <202509300332.58U3WK1r093314@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 6952bb321c5c - main - wlanstat(8): Follow-ups after moving to /usr/sbin and renaming 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: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6952bb321c5cc14168a4f2638a0ce2483cc5149c Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=6952bb321c5cc14168a4f2638a0ce2483cc5149c commit 6952bb321c5cc14168a4f2638a0ce2483cc5149c Author: Li-Wen Hsu AuthorDate: 2025-09-30 03:31:12 +0000 Commit: Li-Wen Hsu CommitDate: 2025-09-30 03:31:12 +0000 wlanstat(8): Follow-ups after moving to /usr/sbin and renaming - Update related comments - Remove from tools/tools/net80211 Reviewed by: imp, adrian MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52726 --- lib/libbsdstat/bsdstat.h | 2 +- sys/net80211/ieee80211_var.h | 2 +- tools/tools/net80211/Makefile | 2 +- tools/tools/net80211/README | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/libbsdstat/bsdstat.h b/lib/libbsdstat/bsdstat.h index 1b0d1f24e93f..b293cd652a72 100644 --- a/lib/libbsdstat/bsdstat.h +++ b/lib/libbsdstat/bsdstat.h @@ -76,7 +76,7 @@ struct fmt { * classes derived from it are useful. */ struct bsdstat { - const char *name; /* statistics name, e.g. wlanstats */ + const char *name; /* statistics name, e.g. wlanstat */ const struct fmt *stats; /* statistics in class */ int nstats; /* number of stats */ #define FMTS_IS_STAT 0x80 /* the following two bytes are the stat id */ diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index b9bc2357428d..7b45261f59b1 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -1013,7 +1013,7 @@ ieee80211_get_node_txpower(struct ieee80211_node *ni) * Debugging facilities compiled in when IEEE80211_DEBUG is defined. * * The intent is that any problem in the net80211 layer can be - * diagnosed by inspecting the statistics (dumped by the wlanstats + * diagnosed by inspecting the statistics (dumped by the wlanstat * program) and/or the msgs generated by net80211. Messages are * broken into functional classes and can be controlled with the * wlandebug program. Certain of these msg groups are for facilities diff --git a/tools/tools/net80211/Makefile b/tools/tools/net80211/Makefile index b4b32899cd26..e87b754c4635 100644 --- a/tools/tools/net80211/Makefile +++ b/tools/tools/net80211/Makefile @@ -1,3 +1,3 @@ -SUBDIR= stumbler w00t wesside wlaninject wlanstats wlantxtime wlanwatch wlanwds +SUBDIR= stumbler w00t wesside wlaninject wlantxtime wlanwatch wlanwds .include diff --git a/tools/tools/net80211/README b/tools/tools/net80211/README index a73f086f5589..b34bcfedec73 100644 --- a/tools/tools/net80211/README +++ b/tools/tools/net80211/README @@ -8,7 +8,6 @@ stumbler view nearby networks using raw packet interface w00t variety of programs that use the raw packet interface wesside WEP frag attack tool using raw packet interface wlaninject inject 802.11 packets using the raw packet interface -wlanstats dump net80211 statistics wlanwatch monitor net80211 events via the routing socket wlanwds handling of WDS dynamic links using vaps From nobody Tue Sep 30 04:22:41 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbPzj34RGz69MYY; Tue, 30 Sep 2025 04:22:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbPzj2YZcz3pCD; Tue, 30 Sep 2025 04:22:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759206161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zt+OtW9o+yMm3E95VNHXUA+CG/f4VDpxgc8XM5X7Z2E=; b=e/nqsf9DqBl2ORIbp9Pg2APUP/YQRm00k+KKcS8Z5kJf2Ht8PrA3KtVmeMrbUeu45rkMF9 FSa1NFE/arHSOR73J9VJqC7BUnSljnN2egOoR/ws/h7jGFagpbbeRzApoLjw7i/wry+Um9 HV6sLWkZo95vjSdTFLRfM+DK8H51Yq/T1HnylLy0ySB4/Byptc6lv0tihaloFmwR1zngfK C+bAaUX781llWx1PORJhtRoq3xIzdnmg50yY3SdO+OPn9li1wMcyKKJolwel5ABa9Qt6nj 13GnKLrBlia1cOkWw0LlNXP+bCLjxSIuCt7WhOjU0X9bjEYB+tlPzYvtQwkDnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759206161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zt+OtW9o+yMm3E95VNHXUA+CG/f4VDpxgc8XM5X7Z2E=; b=hVs8tXq1RlMf7vuXCDslh3zw/Mbrgk3eoQhWLg4bjW6Z73Y8WIIgEH70/y/70LtHkpE3Lw KXw9mrL7aI3ltVTHUwii2H4NeIwPaaWh/b6dyMXc77m24cwfLm7fVPtAWxF+/0q9uDg+lP AapzVM9rwOPTHr7FurNnSJmJAPX8OEUAEZm6ib61VxIz+sCQ2JUjgwb5Q9wvOIKSZ7kbLH mNPbs2ls/RZDFGQtxpLNb53aSYMfBm9NfxIMkdsrPuWUQOsrF32s5ciAH2E4HojXdWPAXE CKEqrl+tRgRA1Pm7b5LZx13PZoCO8ROGI2D+++dIVM1wUE7YA4dW7DwJCdJ3hg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759206161; a=rsa-sha256; cv=none; b=iTMM+hXZg7P5OFSrcfVearQJ9aPELpI1MHN7VOAu/rTIMcvWxgXXqFN5qHQwBGJXqIC5ue UNyDy4ef1+9IYG+ocuNbs6H++DuUacc8jmHCSUETb6TiB9mik5D3urPHPxtrnLz9qA950R dzbtryRBRrNxbG3M4mqCdB3U3b0/Hix4bzF/+rcXwp9UOL9AEE6DMh5a1Dv/kDmPEaO732 WKRX1OPqSKcbe5Unse44TkOuoXPFqq6jIII2JkCar+e1y4zshTd+l/nouaeUyyv6giyTT0 5NKeyVEA2G9//cG/l7BMgy/yc1B7ZfMrwkZj2gzYHu2JIvh0pzaMJjOpcQQ+WA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbPzj22Pgz549; Tue, 30 Sep 2025 04:22:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58U4Mf6A088460; Tue, 30 Sep 2025 04:22:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58U4MfQq088457; Tue, 30 Sep 2025 04:22:41 GMT (envelope-from git) Date: Tue, 30 Sep 2025 04:22:41 GMT Message-Id: <202509300422.58U4MfQq088457@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ahmad Khalifa Subject: git: f1a372ed88b1 - main - gpio: implement bus_setup_intr and bus_teardown_intr 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: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f1a372ed88b11c1e096523c0b6cf62902c1db37c Auto-Submitted: auto-generated The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=f1a372ed88b11c1e096523c0b6cf62902c1db37c commit f1a372ed88b11c1e096523c0b6cf62902c1db37c Author: Ahmad Khalifa AuthorDate: 2025-09-30 04:19:37 +0000 Commit: Ahmad Khalifa CommitDate: 2025-09-30 04:20:05 +0000 gpio: implement bus_setup_intr and bus_teardown_intr Implement bus_setup_intr and bus_teardown_intr as bus_generic_setup_intr and bus_generic_teardown_intr respectively for GPIO drivers that support interrupts. This allows children to setup interrupts. Reported by: Evgenii Ivanov Reviewed by: imp MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D52197 --- sys/arm/allwinner/aw_gpio.c | 4 ++++ sys/arm/broadcom/bcm2835/bcm2835_gpio.c | 4 ++++ sys/arm/freescale/imx/imx_gpio.c | 4 ++++ sys/arm/mv/mvebu_gpio.c | 4 ++++ sys/arm/nvidia/tegra_gpio.c | 4 ++++ sys/arm/ti/ti_gpio.c | 4 ++++ sys/arm64/rockchip/rk_gpio.c | 4 ++++ sys/dev/gpio/pl061.c | 3 +-- 8 files changed, 29 insertions(+), 2 deletions(-) diff --git a/sys/arm/allwinner/aw_gpio.c b/sys/arm/allwinner/aw_gpio.c index f1b6f0bc9193..c90d61f7b45e 100644 --- a/sys/arm/allwinner/aw_gpio.c +++ b/sys/arm/allwinner/aw_gpio.c @@ -1531,6 +1531,10 @@ static device_method_t aw_gpio_methods[] = { DEVMETHOD(device_attach, aw_gpio_attach), DEVMETHOD(device_detach, aw_gpio_detach), + /* Bus interface */ + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + /* Interrupt controller interface */ DEVMETHOD(pic_disable_intr, aw_gpio_pic_disable_intr), DEVMETHOD(pic_enable_intr, aw_gpio_pic_enable_intr), diff --git a/sys/arm/broadcom/bcm2835/bcm2835_gpio.c b/sys/arm/broadcom/bcm2835/bcm2835_gpio.c index 93ee5d7c8bd3..ff5c4043dd86 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_gpio.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_gpio.c @@ -1321,6 +1321,10 @@ static device_method_t bcm_gpio_methods[] = { DEVMETHOD(device_attach, bcm_gpio_attach), DEVMETHOD(device_detach, bcm_gpio_detach), + /* Bus interface */ + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + /* GPIO protocol */ DEVMETHOD(gpio_get_bus, bcm_gpio_get_bus), DEVMETHOD(gpio_pin_max, bcm_gpio_pin_max), diff --git a/sys/arm/freescale/imx/imx_gpio.c b/sys/arm/freescale/imx/imx_gpio.c index 3b19ef1b5e67..60b8d79ab27e 100644 --- a/sys/arm/freescale/imx/imx_gpio.c +++ b/sys/arm/freescale/imx/imx_gpio.c @@ -918,6 +918,10 @@ static device_method_t imx51_gpio_methods[] = { DEVMETHOD(device_detach, imx51_gpio_detach), #ifdef INTRNG + /* Bus interface */ + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + /* Interrupt controller interface */ DEVMETHOD(pic_disable_intr, gpio_pic_disable_intr), DEVMETHOD(pic_enable_intr, gpio_pic_enable_intr), diff --git a/sys/arm/mv/mvebu_gpio.c b/sys/arm/mv/mvebu_gpio.c index 4cc9b7030a65..c27d5a204052 100644 --- a/sys/arm/mv/mvebu_gpio.c +++ b/sys/arm/mv/mvebu_gpio.c @@ -839,6 +839,10 @@ static device_method_t mvebu_gpio_methods[] = { DEVMETHOD(device_attach, mvebu_gpio_attach), DEVMETHOD(device_detach, mvebu_gpio_detach), + /* Bus interface */ + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + /* Interrupt controller interface */ DEVMETHOD(pic_disable_intr, mvebu_gpio_pic_disable_intr), DEVMETHOD(pic_enable_intr, mvebu_gpio_pic_enable_intr), diff --git a/sys/arm/nvidia/tegra_gpio.c b/sys/arm/nvidia/tegra_gpio.c index aa34537352be..ce24fccd3a40 100644 --- a/sys/arm/nvidia/tegra_gpio.c +++ b/sys/arm/nvidia/tegra_gpio.c @@ -853,6 +853,10 @@ static device_method_t tegra_gpio_methods[] = { DEVMETHOD(device_attach, tegra_gpio_attach), DEVMETHOD(device_detach, tegra_gpio_detach), + /* Bus interface */ + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + /* Interrupt controller interface */ DEVMETHOD(pic_disable_intr, tegra_gpio_pic_disable_intr), DEVMETHOD(pic_enable_intr, tegra_gpio_pic_enable_intr), diff --git a/sys/arm/ti/ti_gpio.c b/sys/arm/ti/ti_gpio.c index 01b9597a4418..b7e9909b8548 100644 --- a/sys/arm/ti/ti_gpio.c +++ b/sys/arm/ti/ti_gpio.c @@ -1048,6 +1048,10 @@ static device_method_t ti_gpio_methods[] = { DEVMETHOD(device_attach, ti_gpio_attach), DEVMETHOD(device_detach, ti_gpio_detach), + /* Bus interface */ + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + /* GPIO protocol */ DEVMETHOD(gpio_get_bus, ti_gpio_get_bus), DEVMETHOD(gpio_pin_max, ti_gpio_pin_max), diff --git a/sys/arm64/rockchip/rk_gpio.c b/sys/arm64/rockchip/rk_gpio.c index 145d9769f35f..8da37d516802 100644 --- a/sys/arm64/rockchip/rk_gpio.c +++ b/sys/arm64/rockchip/rk_gpio.c @@ -851,6 +851,10 @@ static device_method_t rk_gpio_methods[] = { DEVMETHOD(device_attach, rk_gpio_attach), DEVMETHOD(device_detach, rk_gpio_detach), + /* Bus interface */ + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + /* GPIO protocol */ DEVMETHOD(gpio_get_bus, rk_gpio_get_bus), DEVMETHOD(gpio_pin_max, rk_gpio_pin_max), diff --git a/sys/dev/gpio/pl061.c b/sys/dev/gpio/pl061.c index 32109e5982bc..9996b0253c7d 100644 --- a/sys/dev/gpio/pl061.c +++ b/sys/dev/gpio/pl061.c @@ -558,8 +558,7 @@ static device_method_t pl061_methods[] = { /* Bus interface */ DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), /* GPIO protocol */ DEVMETHOD(gpio_get_bus, pl061_get_bus), From nobody Tue Sep 30 04:30:04 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbQ8D3Nmjz69N41; Tue, 30 Sep 2025 04:30:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbQ8D2dFSz3pRt; Tue, 30 Sep 2025 04:30:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759206604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N+Sqfr2SJEG+nUVCz0C/iwtLuE3rNC/i24JKLbUhG+Q=; b=OLp2UCXE8R6Q2nydMXCOpg+eY1c9jx1XHQzXsjpXf6eG7nwvMjx75WoABY27k+VCcMjNdZ RVdR1T013RiEHrtSeVvj4kvVBkCaLe3XBKsKjc+Um0qDgAFnzxXfNDKtF/dSsop/CFUCKo FGjQ1xjY5sYHCBdRNZhrFurdXnQ/Az3KYRZ/91Lm8sgZmy3MM+7xmqRSkatUQevXloEVXJ nTdtEdOMdpnw3svdPMShqDCpRLsPw2AyXMDsI36U9gB/rPs6LST7ydzt1KDhaPyV/5iXBa +wLX3dshji6UU5Xbv1f3Yrc4kkfHzjKpaSPoh5vD2w7FoLq6oQlRKJPHjE5dvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759206604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N+Sqfr2SJEG+nUVCz0C/iwtLuE3rNC/i24JKLbUhG+Q=; b=X7fV9mmWxx7Gs7Fj7IDjilu2LOWP7sOjrfVcK74qtdsffZ/szGXZxndRbYglyHRHQw+XU0 iqtFlLJaJ1qj0WB8xzCe27c2AwnKMDApN/Ms8U3h6ama6Bg6XHVxX0y66aZQe82EQkvhMR mOWPZ6QxpzUWBOZfaVYSLCTK8FOYSa329UqNZ+lrUnhg2f0WB0nWSe4DOQj+6bUpi67uYb Q5ZwmeQjc22sHQu3YeBrgogAbTgwwMh+8TJbj6SdW7nhgpLVfUGHAuuKoJKagVdsBK58DT U2jU5pPMxAyQWZQuIShjvji6jm46AyaLE85Bkk3ecYDqoi6yHFUIMWanWXleDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759206604; a=rsa-sha256; cv=none; b=iULFqY7vvCHNI94oNBNnYBMTp/WuK1uPHBznmyxSm1PGSGTT8QkoCGrmUPCfnGCbK+8pfz mz1sYoynxjbm6rQJMjxamYJQvcZFKuRr5oxmn9W8+yOc92m9tUa89SCV6xZ8tngyySEqkf LqNEJiHvRzFmqckhGN2kvYNEk4ln8Qnhbgq7tYUkrK10wpM2YaTOCKMGk3sfa/KivQBDmm aR2lz6w0mfscCUoVJzgDmvr7J/Z43ppEulx2QKNfmZAJsiqN0098x66c0AvKP3YDx56KUZ JYUbmCsqxSGV/ZSZ9B0Cs+i+clIHowET5OQIL4qKp9eV6xZzcDNZqSssP1PapQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbQ8D1xs0z4Pr; Tue, 30 Sep 2025 04:30:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58U4U406093185; Tue, 30 Sep 2025 04:30:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58U4U4ZZ093180; Tue, 30 Sep 2025 04:30:04 GMT (envelope-from git) Date: Tue, 30 Sep 2025 04:30:04 GMT Message-Id: <202509300430.58U4U4ZZ093180@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: a087b4aec38c - main - create-sets.sh: Always build the base sets 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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a087b4aec38c37d47b888aa8411948250cdd4bc0 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=a087b4aec38c37d47b888aa8411948250cdd4bc0 commit a087b4aec38c37d47b888aa8411948250cdd4bc0 Author: Lexi Winter AuthorDate: 2025-09-30 04:25:38 +0000 Commit: Lexi Winter CommitDate: 2025-09-30 04:29:47 +0000 create-sets.sh: Always build the base sets Since all packages were moved to the optional set, no packages are directly in the base sets, which means nothing caused the base sets to be built. Add the base sets to create-sets.sh so they're always built. Fixes: eaecc9551ae4 ("packages: Add an "optional" set") MFC after: 1 day --- release/packages/create-sets.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/release/packages/create-sets.sh b/release/packages/create-sets.sh index 8c564ecfeb92..09567657c161 100755 --- a/release/packages/create-sets.sh +++ b/release/packages/create-sets.sh @@ -17,6 +17,10 @@ repodir="$1"; shift # generate-set-ucl.lua. UCL_VARS="$@" +# Nothing is explicitly added to set-base, so it wouldn't get built unless +# we list it here. +SETS="base base-dbg base-jail base-jail-dbg" + for pkg in "$repodir"/*.pkg; do # If the package name doesn't containing a '-', then it's # probably data.pkg or packagesite.pkg, which are not real From nobody Tue Sep 30 06:04: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 4cbSDn55xsz68VLl; Tue, 30 Sep 2025 06:04:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbSDn4Khvz3wCw; Tue, 30 Sep 2025 06:04:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759212249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ahxJmko8Mm6K2Kjs5mC7wII5hpCs/J9+uuwDqnGtEEM=; b=LMekGayDyW/Flz7kLUe7PYWjBVUU52pyupWccbg4xCXmyzFENgHiQYgCqyXQHMI6Y6+P9s rnO2ndh5Lp5dStyHWlAgb3FnpYMufcOz2P4pB+8NmdH9KKz5bZUN352QDfUClLFlowyqzl VgJYwH1ygmHxhnfxF61eFnH5SaQRrEG2c0Fifiw0ukEzBnZQopJEc0hbrepS5St0v/BOWB Q4SM33OwFp1RJO/wGiSKe8Lzap6iskj8zi/NuKslj8LeEWnhAcRUUgiOWClot2rA+jhC/2 zzeG7tohcB5Qq+GBmNxQ9GloXVn0jdAQTXLb2v0vCRFfu09xBJqNKODOkdj74g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759212249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ahxJmko8Mm6K2Kjs5mC7wII5hpCs/J9+uuwDqnGtEEM=; b=eVD/+fCfUKbkjXoxb0sIUVRDUvlU/f+KQBfWwPGbwx9fcHJELa17p8iqzGjjijvt0mI5Ci 2thr70942y0+guljl+5f2O/FH5RVyz1VsiQOLoHn8LjZkL7KgIVahxzAu03iUWv7QaNCTA UATy1+AU6FF+ex41p2ke2hJEl35X5kVgzfNNhWr06YqNB6K3JE0GIBGiGVOELyWIKHcngL EsK4qn7GWnK9Fsyao+NYae6ArLyWadO9UWHSeUNZ7mPGIoycjqxFsCbrOUPCXLgH6H8Xxu MvHkwyqribgjFYJfJsPKrohAu7V1urknL3BX6xmSW/RYnWOe5ftJOmN9GNl/NQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759212249; a=rsa-sha256; cv=none; b=Oy7iHm3jawj5HfnSb8pR3VAvfsZURaMYcFoWdGAFwGPaWz2h1h05SkwBmX88L6q9rrLups PSmSNyqgmtRakfKyeQVDDij7ZHeMZnQzp4HAInLWAJ7Y9tDbai/6ca2nxqD4nvdnNdPeip MPFfUOz+wLVhSDMUqm17590vj7iLKp5E+Pn4pVXnzExRn/UOMwbezey63L/ZjNSODcGZ3L Y0JyJHakfGL4rk+agl6dsgxstn8UMfjfh8/2ipiKNa1Igu13OGma/CX2k1mzP8N/MB25/+ W84HknhmokiY5jCBCbcLo2Rg05fgG6GbQV2xzJ7HqJtDX6+5fTJdOO1+wduVkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbSDn3xFSz7rn; Tue, 30 Sep 2025 06:04:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58U649V5077726; Tue, 30 Sep 2025 06:04:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58U649cc077723; Tue, 30 Sep 2025 06:04:09 GMT (envelope-from git) Date: Tue, 30 Sep 2025 06:04:09 GMT Message-Id: <202509300604.58U649cc077723@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: d31e342bcc8e - main - sh: Remove /.profile 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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d31e342bcc8e22d7eb25c21a711cd4b8a54db6c0 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=d31e342bcc8e22d7eb25c21a711cd4b8a54db6c0 commit d31e342bcc8e22d7eb25c21a711cd4b8a54db6c0 Author: Lexi Winter AuthorDate: 2025-09-30 06:02:06 +0000 Commit: Lexi Winter CommitDate: 2025-09-30 06:02:06 +0000 sh: Remove /.profile root's home directory was moved to /root many years ago, so there's no reason to keep this old link. This brings sh in line with csh, where /.cshrc was removed in dcb65c5a94d4. Relnotes: yes Approved by: re (cperciva) MFC after: 1 day PR: 289097 Reviewed by: cperciva, jilles, bapt, emaste Differential Revision: https://reviews.freebsd.org/D52161 --- bin/sh/Makefile | 9 --------- 1 file changed, 9 deletions(-) diff --git a/bin/sh/Makefile b/bin/sh/Makefile index 916bb88b57fa..dd073a52d23c 100644 --- a/bin/sh/Makefile +++ b/bin/sh/Makefile @@ -68,12 +68,3 @@ token.h: mktokens HAS_TESTS= SUBDIR.${MK_TESTS}+= tests - -beforeinstallconfig: - rm -f ${DESTDIR}/.profile - -LINKMODE=${CONFMODE} -afterinstallconfig: - ${INSTALL_LINK} ${TAG_ARGS:D${TAG_ARGS},config} ${DESTDIR}/root/.profile ${DESTDIR}/.profile - -.include From nobody Tue Sep 30 06:04:10 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbSDp6Vgkz68VRN; Tue, 30 Sep 2025 06:04:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbSDp5ZkCz3wB2; Tue, 30 Sep 2025 06:04:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759212250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+0BvLDD+XI3M3q3/WkmEApEtJJOjBgMpTbxYym6W8kU=; b=xKurOKm1cOEoDdF1TQ0LtRuEbcWCyyB6B7XvwlbzYVlf4SjBq2iCsy4vNAtIYyOX/r1T0u II3bNpzkc+aShjyPyYy5DlahFA11uYUGMh6Q06kuYLrE94UO84V0h4KjH9Vuttqcgde/C9 Ppo38LoAinbWCEQo0D5Dx2z41YSYhRKaH4S+IaEVcZUj9vkYRnLbCSN24hPz99hwu8Drt/ u3QSUpQbyeUOEokNL0tPK4VSY0X+ZegaB6PMle/bf/3AEhRm4HFuxZHq6yq5k2xCVPvULJ CkGyrm/wJfAjgNm4s0PR8DuNSVI1irmHM5eylJcgw4Cl1bPkFg8LNZrnfHHLxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759212250; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+0BvLDD+XI3M3q3/WkmEApEtJJOjBgMpTbxYym6W8kU=; b=yjA4U9vC8xOE0xFzcKMESGcORGoqxyJ/mpYfkSNFZFt5ZkniNN1HgAAOViOatK61BJGROi jSlQLOMThLRKtOFsF5U0JDjrA7n1K041aW+3Kj/qU1lgENbdI+YLh0NC67SFPZ4ZG77vxI CxMMGfnZZ8bie8bCvRa7HLzD83+PQro1uvS4LLlL8o8QfOtQAMl5rqLmTHWFrj19ntRVYh LXNWueAbdOYHKfst+l4z6x0g5vzTjMD2GZjMj7kfoV7yk++KbWWsez13HsHzGHKqOvaD9Y BK2FUrMVIVIEGL3/JUabqwaMqmmZJ8/3JVpzRlFOohSxpvypbpM+3I4AZ40XDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759212250; a=rsa-sha256; cv=none; b=t0foC9ZxazvNAivwyhPBG3uaeEku5d6LsDQ8vc9BOSmYZfcU2Je005VWhLS+CSZYT6SYRf w01O0z76E66DMcvcTPozFc4eFPcbeKq0Xeg396of6Xxh/BApSq89X1aV/VTcsypFC2WPRM kbeLvHusjSxykaoMXX3Go6CwcKVBPnTHn3mP+PCp/dhXZCH/aPWE8kGvgnEsQCCZWzX44V DD0MgDm0A79nWzkOIpsoEMdp/X/vTf5jNCsUvWe6hzYr2r3P1J26p3UD1EQVX9SJn5TWXJ E6BrdQyKkVumVQIGsyl+4z6CNNGLnH1Y0XE8qZpi02/x+Dwg1/eHisZTOvg02w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbSDp4yfZz7pn; Tue, 30 Sep 2025 06:04:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58U64A0X077758; Tue, 30 Sep 2025 06:04:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58U64A6B077755; Tue, 30 Sep 2025 06:04:10 GMT (envelope-from git) Date: Tue, 30 Sep 2025 06:04:10 GMT Message-Id: <202509300604.58U64A6B077755@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 2507698b630d - main - bsdinstall: Only offer to enable services which are installed 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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2507698b630db3d88b0aab12c348873f827255a2 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=2507698b630db3d88b0aab12c348873f827255a2 commit 2507698b630db3d88b0aab12c348873f827255a2 Author: Lexi Winter AuthorDate: 2025-09-30 06:02:51 +0000 Commit: Lexi Winter CommitDate: 2025-09-30 06:02:51 +0000 bsdinstall: Only offer to enable services which are installed With pkgbase, users may decide to install a minimal set of packages that's missing some daemons. Check which services are installed, and only include the ones which are present in the dialogue. MFC after: 1 day Reviewed by: cperciva Differential Revision: https://reviews.freebsd.org/D52646 --- usr.sbin/bsdinstall/scripts/services | 49 ++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/services b/usr.sbin/bsdinstall/scripts/services index 93282effbb3f..110b6f321ed1 100755 --- a/usr.sbin/bsdinstall/scripts/services +++ b/usr.sbin/bsdinstall/scripts/services @@ -40,21 +40,44 @@ fi echo -n > $BSDINSTALL_TMPETC/rc.conf.services +DAEMON_OPTIONS="" + +if [ -x "${BSDINSTALL_CHROOT}/etc/rc.d/sshd" ]; then + DAEMON_OPTIONS="$DAEMON_OPTIONS \ + sshd \"Secure shell daemon\" ${sshd_enable:-off}" +fi + +if [ -x "${BSDINSTALL_CHROOT}/etc/rc.d/ntpd" ]; then + DAEMON_OPTIONS="$DAEMON_OPTIONS \ + ntpd \"Synchronize system and network time\" ${ntpd_enable:-off} \ + ntpd_sync_on_start \"Sync time on ntpd startup, even if offset is high\" \ + ${ntpd_sync_on_start:-off}" +fi + +if [ -x "${BSDINSTALL_CHROOT}/etc/rc.d/local_unbound" ]; then + DAEMON_OPTIONS="$DAEMON_OPTIONS \ + local_unbound \"Local caching validating resolver\" \ + ${local_unbound_enable:-off}" +fi + +if [ -x "${BSDINSTALL_CHROOT}/etc/rc.d/powerd" ]; then + DAEMON_OPTIONS="$DAEMON_OPTIONS \ + powerd \"Adjust CPU frequency dynamically if supported\" \ + ${powerd_enable:-off}" +fi + +if [ -x "${BSDINSTALL_CHROOT}/etc/rc.d/moused" ]; then + DAEMON_OPTIONS="$DAEMON_OPTIONS \ + moused \"PS/2 mouse pointer on console\" ${moused_enable:-off}" +fi + exec 5>&1 -DAEMONS=$( bsddialog --backtitle "$OSNAME Installer" \ - --title "System Configuration" --no-cancel --separate-output \ - --checklist "Choose the services you would like to be started at boot:" \ +DAEMONS=$(eval bsddialog --backtitle \"$OSNAME Installer\" \ + --title \"System Configuration\" --no-cancel --separate-output \ + --checklist \"Choose the services you would like to be started at boot:\" \ 0 0 0 \ - local_unbound "Local caching validating resolver" \ - ${local_unbound_enable:-off} \ - sshd "Secure shell daemon" ${sshd_enable:-off} \ - moused "PS/2 mouse pointer on console" ${moused_enable:-off} \ - ntpd "Synchronize system and network time" ${ntpd_enable:-off} \ - ntpd_sync_on_start "Sync time on ntpd startup, even if offset is high" \ - ${ntpd_sync_on_start:-off} \ - powerd "Adjust CPU frequency dynamically if supported" \ - ${powerd_enable:-off} \ - dumpdev "Enable kernel crash dumps to /var/crash" ${dumpdev:-on} \ + $DAEMON_OPTIONS \ + dumpdev \"Enable kernel crash dumps to /var/crash\" ${dumpdev:-on} \ 2>&1 1>&5 ) retval=$? exec 5>&- From nobody Tue Sep 30 06:23: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 4cbSgp5y3Bz68WYh; Tue, 30 Sep 2025 06:24:06 +0000 (UTC) (envelope-from ivy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbSgp5PlJz3xms; Tue, 30 Sep 2025 06:24:06 +0000 (UTC) (envelope-from ivy@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759213446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=t0wDm/o/+po4wt5xQrF5xKp87cVvgDKLhJIp3d2FwCk=; b=WpdqorBMsLau3DemdgKWzOjvowcP3RepWIcvElrnXnF3upUKPUR4hx9L3VOeUcYlYbhUlf OrmjXGuLTOwi8IyHd7gTU+zCcg2dmaFQlkOWiVFO4BPPcgMsvMLmOgs9Cj3F0Rn8xNEpbb 4+t2ucwNUGrqkSBmgDEqmeqjV5S33Tv9g6esYMOp7zu7ZvLl29kjRbIfMRJvDF+h5Fkfzq 0qK3y+oEtjKC8RbiA4O6IY1EkFpIEH9r8N4ddFqnrBrscibx5jTYKkzbxPcSHPLeZ3/+aw +L62ZCxJ8NmnQej2tbUCwK3ofSdudV9ABLxGAPv0IWG5//eJQEFmyNxeD8vzGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759213446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=t0wDm/o/+po4wt5xQrF5xKp87cVvgDKLhJIp3d2FwCk=; b=Uqis8X+ANpcTjZJFbaOoc62M3DjBar8lWowSk+c+JwR+AdSWaULXT//qRWE4iWfFZy/Dz9 7BKQ/cIACvKOyVLz+repmJkr1Cm32ykcoQ+znatR/gO5ubobYOyYSeSoU0IsHJxL0jz9vJ VPHAZO6QRQq+8u4dAshqlgrXUpP+y+2QwwYgaFgjBTaMoZ2WJMfe1YoMPtSYDYhR8yU0mz LZDAoJ5mUhPBiEc1V+EqmdjYdwunKGXz3kvz2x6IBpHlJrRtbMf10/xySItJrKgqMK+SHr YhDuVhzCWbR7rQa/gXLHMqBSprZJBu+JuoUM0RwoEZXawHwujiDqQJPltxUf9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759213446; a=rsa-sha256; cv=none; b=MMXQtEoCxQFwvpM9vMgKRDgu7vgHz+1PXDL6AYCtGXvXVtVEe7fsSp76mD2OQZ8f+Ch4/L Xu3mwvwYZG4xh8vQ+F4WQrObRjtXvvj/DrfJN95R+5bB+nvmBSO3wksNFZP46j20pDNSW/ W9jhKqbwNYtD6tj8O+2n9aR91ZIFhkjRO9l3787rZiDUvmMmTUgL+rytdQk7BER5+uPxlm efUvVkKj26DsKQ1VwF7suv27Ytao4VwexJN5NPPZRcaNGT0agex3C+gzWE1qPoIj0hl64F 6gdnROMpiBuqurtZevE4y1CdxgZN5MLIjxVaeoH7ZWp0N00As2pPtJD+LpSIMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from amaryllis.le-fay.org (amaryllis.le-fay.org [IPv6:2a00:1098:6b:400::9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: ivy/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cbSgp23GHzkxq; Tue, 30 Sep 2025 06:24:06 +0000 (UTC) (envelope-from ivy@freebsd.org) Date: Tue, 30 Sep 2025 07:23:59 +0100 From: Lexi Winter To: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: d31e342bcc8e - main - sh: Remove /.profile Message-ID: Mail-Followup-To: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202509300604.58U649cc077723@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="NazPnN+LGMJuWVH6" Content-Disposition: inline In-Reply-To: <202509300604.58U649cc077723@gitrepo.freebsd.org> --NazPnN+LGMJuWVH6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Lexi Winter wrote in <202509300604.58U649cc077723@gitrepo.freebsd.org>: > sh: Remove /.profile > > -.include this obviously broke the build. sorry about that, a fix is incoming as soon as a test build finishes. i will wear the pointy hat for today. --NazPnN+LGMJuWVH6 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSyjTg96lp3RifySyn1nT63mIK/YAUCaNt3fAAKCRD1nT63mIK/ YKgFAP0fkDJM3KEHhVKn5Tl88Gb/CeAv162514G1trSPJMzYaQD/WfHyQ0/bgB+Y t0dLZxpAkf04xmfVd1dxh9WehmHAOQ0= =j6Lk -----END PGP SIGNATURE----- --NazPnN+LGMJuWVH6-- From nobody Tue Sep 30 06:28:35 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbSmz4F0fz68X50; Tue, 30 Sep 2025 06:28: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 4cbSmz3ZMwz40Hf; Tue, 30 Sep 2025 06:28:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759213715; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5n/IBH0ItC2xD1CPUStNW81MXUmDr3ZB38cFuddRfGI=; b=ivIMow67aYhNBlpiZl0ZEUwZuooFXe7bQD5FKupJ0F8CYLT///lYldQes5q2kEc58hkNr1 3wCuRnlxzcV2+Fg4ZGEz00NjrnF1wPAXw5b4mh5g/o7/GdlyOqyikxOBwsXQCjOATHwsAU y7gyCIq28Bqd4N2dRndt6+AzYioWwnsbh0psmiYwzQT9/Jvo/2A/ebjSu59W6DRYyQGae0 hq6A+sVT6O61iGGKHXykWIwEQnww29jeWf3XaeBh0ocx57Azwm4utcXTv7kcLHf2kT8XV4 vxtPz/Bde8+GX4EPTDBIscq/FQvJSH5Rdo92FKMGgqP/Ffy1InoXnd5Wsln8qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759213715; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5n/IBH0ItC2xD1CPUStNW81MXUmDr3ZB38cFuddRfGI=; b=VBqPxm24UOVXNTadOvq3BxD5PazFAEWWjOlUSkXY3Q44DWZxyaEcf4izRbXAgOs8r5wOxF wtO8hSVmIL/vf6q5SXIuRTBaaHIB5WxR0Zx4o0V3VXBDleJQMJm0X+/GpH7myteVLHPMLl YkU/CL/MR7gbcwwQc/A4eCk3CWQ7vbCq1i8IcNUMQ0WrQ12CIIV12jPtEvwj9uFn/NQp61 sSocTNm9sHVRneAhffwo8Z+zG0UwGB7YJ8Xoh1OC+Z0j6JXC8+k+yO4jLTW/Lec0vJZvpG e3CFenLrc+WhJ1OW0t7RaJzJl418ceefb7Uacs8rh78K9U7mDPPPMys5YHbVwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759213715; a=rsa-sha256; cv=none; b=VLXgm/rOp68vfOCBifbedqvvQ2DM095LWCMOZehz4F+Ue5hNdlvGFpu4WGQ8tz95ODRQD2 zFClJ/kQXjDnCatFL+9dfuoUuQOxQvFvaxsbWJLWnJ5BqWf1liicJNrn4RBc7u+sov2Nfb /TAhEZUFNR3/NZpUGPTo5vyeDLXfpZgPQJ6QbZulG7WtCg3VjBNBbqRtrHg9givV7ebkDF KLt72gEhs6RgEA7Iu9vXuQuMo/gjQQTwAZtDr/AvnTeNB9dA2/HDRk46WH5u6LR7yaV67J j3XeMjXIvsnbhdBVlDoWvq052OkTIiROaZVC2ONGz6FLlgFyZdnVCjg9fLtpUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbSmz2x9qz85M; Tue, 30 Sep 2025 06:28:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58U6SZSo015926; Tue, 30 Sep 2025 06:28:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58U6SZR9015923; Tue, 30 Sep 2025 06:28:35 GMT (envelope-from git) Date: Tue, 30 Sep 2025 06:28:35 GMT Message-Id: <202509300628.58U6SZR9015923@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: bb0955ee4db8 - main - bin/sh: Fix the build 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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bb0955ee4db8870bb013cf7d208ad9b2fc27b619 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=bb0955ee4db8870bb013cf7d208ad9b2fc27b619 commit bb0955ee4db8870bb013cf7d208ad9b2fc27b619 Author: Lexi Winter AuthorDate: 2025-09-30 06:22:39 +0000 Commit: Lexi Winter CommitDate: 2025-09-30 06:26:28 +0000 bin/sh: Fix the build Removing was unintentional; put it back. Fixes: d31e342bcc8e ("sh: Remove /.profile") MFC after: 1 day --- bin/sh/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/sh/Makefile b/bin/sh/Makefile index dd073a52d23c..2b1eca8e4b31 100644 --- a/bin/sh/Makefile +++ b/bin/sh/Makefile @@ -68,3 +68,5 @@ token.h: mktokens HAS_TESTS= SUBDIR.${MK_TESTS}+= tests + +.include From nobody Tue Sep 30 06:44: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 4cbT7869wDz68Xvr for ; Tue, 30 Sep 2025 06:44:20 +0000 (UTC) (envelope-from wschnr@googlemail.com) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbT770ysVz429J for ; Tue, 30 Sep 2025 06:44:19 +0000 (UTC) (envelope-from wschnr@googlemail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of wschnr@googlemail.com designates 209.85.221.41 as permitted sender) smtp.mailfrom=wschnr@googlemail.com Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-3ee15b5435bso3106131f8f.0 for ; Mon, 29 Sep 2025 23:44:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759214658; x=1759819458; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JSF2VuVD5k26QUOovJXXCRbTj108i6ijhYi/x+u0ZC4=; b=pA0ZHrPiecT2NH7DsvvG2Un25K1Mrx99E6HO3ZUcvravEQgZpdm+toh653UXCHVcXw +evu8HTlFuFYL3Bk1/a/y4qo02xbeXKdGfOjAnjvTCWd3sEZmqaN4lJXDkNHd3uuU3ob znbjz4dIxhYulqoLxW35/yNWu4tIpYJHWu2w0VhDL/Hpdw5U5at8FakGLaiZN5dbq1N2 q9+Fxhe6K1juazWkxlL2ch08xCz63yhuyqFMeCeCmWLCCGprb0sQC6TJHSWuYkQELsmc 9WJuk6fSez/gQZhFCIloCy5jC4hOQjsIrYZKbSZHYNOTmXgJgwZWm9Wg/KB2UcbBgJ+x TrjA== X-Forwarded-Encrypted: i=1; AJvYcCUDO7ucQK17l8Dp8JSbvgsNr38BVgscWK8xuXALecEs+HxWTgnX+b+jJYfo9r7/3b3bZi7/DAW4YzGwv3aSrOE7KXxwHw==@freebsd.org X-Gm-Message-State: AOJu0Yy8XNGEHKZUZipUkN/7yQTNEfx/bxySmJ8sUSBbxJ7ZXabQfjZm jNmwT4jsRiyBY8T9itq7wS8wL5o8Kd/ixyVi4E+z4r2WtX/YCqZumIe4qKZNauhfAmXjihYQgws l86i/SWY8nmfYjxGXkYevyqbaclrabw13kK9I X-Gm-Gg: ASbGncvkWD0f/1bmZbAC1YU3MOb2PpjiTjtgUQc3SMb9wn3OMACPG33ZRUCDzCF63c9 dNINXoRzRZUlvfTPDxtnjeD8vnetLSpVyJUcYi6keJfhwni1Kr/3RIRcGXhHb9bqxjilN/kJ9kn pYGD0t4zXYffsS5AA5e+CEVqFlAYsc1vVtjXUcBiblIaMhBVXg01EMh2CuxtyWOWtAMwOh3WzmM IZ6Cr5/qaZoEbG9QZXigjYmFaRRNTNm X-Google-Smtp-Source: AGHT+IGhAWln1Z13pzotzO8KHHHlAQodD/xTo6LqWdytqQRdCzKdpFr2sGa2vYi8wWRWJ4xiId52gVkGpyQvgVpuUJk= X-Received: by 2002:a05:6000:2382:b0:3e7:4893:f9be with SMTP id ffacd0b85a97d-40e42502eacmr16275623f8f.12.1759214657311; Mon, 29 Sep 2025 23:44:17 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202509271713.58RHDTTL008060@gitrepo.freebsd.org> In-Reply-To: <202509271713.58RHDTTL008060@gitrepo.freebsd.org> From: Wolfram Schneider Date: Tue, 30 Sep 2025 08:44:03 +0200 X-Gm-Features: AS18NWDwcYsH_bDurutGYqaJLqJyOqka7tkynyTE9L67zB7zkUHUSW7tahM9tr0 Message-ID: Subject: Re: git: 2ed9833791f2 - main - thunderbolt: Import USB4 code To: Aymeric Wibo Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Bar: / X-Spamd-Result: default: False [-0.88 / 15.00]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; NEURAL_HAM_SHORT(-1.00)[-0.996]; NEURAL_HAM_LONG(-0.98)[-0.980]; FORGED_SENDER(0.30)[wosch@freebsd.org,wschnr@googlemail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVFROM(0.00)[googlemail.com]; RCVD_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.41:from]; MISSING_XM_UA(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[wosch@freebsd.org,wschnr@googlemail.com]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.41:from] X-Rspamd-Queue-Id: 4cbT770ysVz429J I'm now getting a stale symlink: ./tools/build/stale-symlink-buildworld.sh stale symlink detected: lrwxrwxr-x 1 wosch wheel 91 Sep 29 22:14 /var/tmp/freebsd-obj-wosch/home/projects/freebsd-src/amd64.amd64/sys/GENERIC/modules/home/projects/freebsd-src/sys/modules/thunderbolt/opt_acpi_wmi.h -> /var/tmp/freebsd-obj-wosch/home/projects/freebsd-src/amd64.amd64/sys/GENERIC/opt_acpi_wmi.h the only reference to the file "opt_acpi_wmi.h" is in the Makefile sys/modules/thunderbolt/Makefile:SRCS+= opt_acpi.h opt_acpi_wmi.h acpi_if.h acpi_wmi_if.h What is this file supposed to do, where does it come from? -Wolfram On Sat, 27 Sept 2025 at 19:13, Aymeric Wibo wrote: > > The branch main has been updated by obiwac: > > URL: https://cgit.FreeBSD.org/src/commit/?id=2ed9833791f28e14843ac813f90cb030e45948dc > > commit 2ed9833791f28e14843ac813f90cb030e45948dc > Author: Aymeric Wibo > AuthorDate: 2025-09-27 11:50:43 +0000 > Commit: Aymeric Wibo > CommitDate: 2025-09-27 17:13:13 +0000 > > thunderbolt: Import USB4 code > > Add initial USB4 code written by Scott Long and originally passed on to > HPS (source: https://github.com/hselasky/usb4), minus the ICM code and > with some small fixes. > > For context, older TB chips implemented the connection manager in > firmware (ICM) instead of in the OS (HCM), but maintaining the ICM code > would be a huge burden for not many chips. > > Mostly completed work: > > - Debug/trace framework. > - NHI controller driver. > - PCIe bridge driver. > - Router and config space layer handling (just reading in this commit). > > Link to the email where Scott shared details about the initial USB4 > work: > > https://lists.freebsd.org/archives/freebsd-hackers/2024-July/003411.html > > Glanced at by: emaste, imp > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D49450 > Event: EuroBSDcon 2025 > --- > sys/dev/thunderbolt/hcm.c | 223 +++++++ > sys/dev/thunderbolt/hcm_var.h | 47 ++ > sys/dev/thunderbolt/nhi.c | 1170 ++++++++++++++++++++++++++++++++++++ > sys/dev/thunderbolt/nhi_pci.c | 529 ++++++++++++++++ > sys/dev/thunderbolt/nhi_reg.h | 332 ++++++++++ > sys/dev/thunderbolt/nhi_var.h | 277 +++++++++ > sys/dev/thunderbolt/nhi_wmi.c | 198 ++++++ > sys/dev/thunderbolt/router.c | 939 +++++++++++++++++++++++++++++ > sys/dev/thunderbolt/router_var.h | 242 ++++++++ > sys/dev/thunderbolt/tb_acpi_pcib.c | 181 ++++++ > sys/dev/thunderbolt/tb_debug.c | 334 ++++++++++ > sys/dev/thunderbolt/tb_debug.h | 93 +++ > sys/dev/thunderbolt/tb_dev.c | 331 ++++++++++ > sys/dev/thunderbolt/tb_dev.h | 41 ++ > sys/dev/thunderbolt/tb_if.m | 121 ++++ > sys/dev/thunderbolt/tb_ioctl.h | 52 ++ > sys/dev/thunderbolt/tb_pcib.c | 614 +++++++++++++++++++ > sys/dev/thunderbolt/tb_pcib.h | 93 +++ > sys/dev/thunderbolt/tb_reg.h | 52 ++ > sys/dev/thunderbolt/tb_var.h | 54 ++ > sys/dev/thunderbolt/tbcfg_reg.h | 363 +++++++++++ > sys/modules/Makefile | 5 + > sys/modules/thunderbolt/Makefile | 13 + > 23 files changed, 6304 insertions(+) > > diff --git a/sys/dev/thunderbolt/hcm.c b/sys/dev/thunderbolt/hcm.c > new file mode 100644 > index 000000000000..b8f703fc3b52 > --- /dev/null > +++ b/sys/dev/thunderbolt/hcm.c > @@ -0,0 +1,223 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause > + * > + * Copyright (c) 2022 Scott Long > + * All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include "opt_thunderbolt.h" > + > +/* Host Configuration Manager (HCM) for USB4 and later TB3 */ > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +static void hcm_cfg_task(void *, int); > + > +int > +hcm_attach(struct nhi_softc *nsc) > +{ > + struct hcm_softc *hcm; > + > + tb_debug(nsc, DBG_HCM|DBG_EXTRA, "hcm_attach called\n"); > + > + hcm = malloc(sizeof(struct hcm_softc), M_THUNDERBOLT, M_NOWAIT|M_ZERO); > + if (hcm == NULL) { > + tb_debug(nsc, DBG_HCM, "Cannot allocate hcm object\n"); > + return (ENOMEM); > + } > + > + hcm->dev = nsc->dev; > + hcm->nsc = nsc; > + nsc->hcm = hcm; > + > + hcm->taskqueue = taskqueue_create("hcm_event", M_NOWAIT, > + taskqueue_thread_enqueue, &hcm->taskqueue); > + if (hcm->taskqueue == NULL) > + return (ENOMEM); > + taskqueue_start_threads(&hcm->taskqueue, 1, PI_DISK, "tbhcm%d_tq", > + device_get_unit(nsc->dev)); > + TASK_INIT(&hcm->cfg_task, 0, hcm_cfg_task, hcm); > + > + return (0); > +} > + > +int > +hcm_detach(struct nhi_softc *nsc) > +{ > + struct hcm_softc *hcm; > + > + hcm = nsc->hcm; > + if (hcm->taskqueue) > + taskqueue_free(hcm->taskqueue); > + > + return (0); > +} > + > +int > +hcm_router_discover(struct hcm_softc *hcm) > +{ > + > + taskqueue_enqueue(hcm->taskqueue, &hcm->cfg_task); > + > + return (0); > +} > + > +static void > +hcm_cfg_task(void *arg, int pending) > +{ > + struct hcm_softc *hcm; > + struct router_softc *rsc; > + struct router_cfg_cap cap; > + struct tb_cfg_router *cfg; > + struct tb_cfg_adapter *adp; > + struct tb_cfg_cap_lane *lane; > + uint32_t *buf; > + uint8_t *u; > + u_int error, i, offset; > + > + hcm = (struct hcm_softc *)arg; > + > + tb_debug(hcm, DBG_HCM|DBG_EXTRA, "hcm_cfg_task called\n"); > + > + buf = malloc(8 * 4, M_THUNDERBOLT, M_NOWAIT|M_ZERO); > + if (buf == NULL) { > + tb_debug(hcm, DBG_HCM, "Cannot alloc memory for discovery\n"); > + return; > + } > + > + rsc = hcm->nsc->root_rsc; > + error = tb_config_router_read(rsc, 0, 5, buf); > + if (error != 0) { > + free(buf, M_NHI); > + return; > + } > + > + cfg = (struct tb_cfg_router *)buf; > + > + cap.space = TB_CFG_CS_ROUTER; > + cap.adap = 0; > + cap.next_cap = GET_ROUTER_CS_NEXT_CAP(cfg); > + while (cap.next_cap != 0) { > + error = tb_config_next_cap(rsc, &cap); > + if (error != 0) > + break; > + > + if ((cap.cap_id == TB_CFG_CAP_VSEC) && (cap.vsc_len == 0)) { > + tb_debug(hcm, DBG_HCM, "Router Cap= %d, vsec= %d, " > + "len= %d, next_cap= %d\n", cap.cap_id, > + cap.vsc_id, cap.vsec_len, cap.next_cap); > + } else if (cap.cap_id == TB_CFG_CAP_VSC) { > + tb_debug(hcm, DBG_HCM, "Router cap= %d, vsc= %d, " > + "len= %d, next_cap= %d\n", cap.cap_id, > + cap.vsc_id, cap.vsc_len, cap.next_cap); > + } else > + tb_debug(hcm, DBG_HCM, "Router cap= %d, " > + "next_cap= %d\n", cap.cap_id, cap.next_cap); > + if (cap.next_cap > TB_CFG_CAP_OFFSET_MAX) > + cap.next_cap = 0; > + } > + > + u = (uint8_t *)buf; > + error = tb_config_get_lc_uuid(rsc, u); > + if (error == 0) { > + tb_debug(hcm, DBG_HCM, "Router LC UUID: %02x%02x%02x%02x-" > + "%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\n", > + u[0], u[1], u[2], u[3], u[4], u[5], u[6], u[7], u[8], > + u[9], u[10], u[11], u[12], u[13], u[14], u[15]); > + } else > + tb_printf(hcm, "Error finding LC registers: %d\n", error); > + > + for (i = 1; i <= rsc->max_adap; i++) { > + error = tb_config_adapter_read(rsc, i, 0, 8, buf); > + if (error != 0) { > + tb_debug(hcm, DBG_HCM, "Adapter %d: no adapter\n", i); > + continue; > + } > + adp = (struct tb_cfg_adapter *)buf; > + tb_debug(hcm, DBG_HCM, "Adapter %d: %s, max_counters= 0x%08x," > + " adapter_num= %d\n", i, > + tb_get_string(GET_ADP_CS_TYPE(adp), tb_adapter_type), > + GET_ADP_CS_MAX_COUNTERS(adp), GET_ADP_CS_ADP_NUM(adp)); > + > + if (GET_ADP_CS_TYPE(adp) != ADP_CS2_LANE) > + continue; > + > + error = tb_config_find_adapter_cap(rsc, i, TB_CFG_CAP_LANE, > + &offset); > + if (error) > + continue; > + > + error = tb_config_adapter_read(rsc, i, offset, 3, buf); > + if (error) > + continue; > + > + lane = (struct tb_cfg_cap_lane *)buf; > + tb_debug(hcm, DBG_HCM, "Lane Adapter State= %s %s\n", > + tb_get_string((lane->current_lws & CAP_LANE_STATE_MASK), > + tb_adapter_state), (lane->targ_lwp & CAP_LANE_DISABLE) ? > + "disabled" : "enabled"); > + > + if ((lane->current_lws & CAP_LANE_STATE_MASK) == > + CAP_LANE_STATE_CL0) { > + tb_route_t newr; > + > + newr.hi = rsc->route.hi; > + newr.lo = rsc->route.lo | (i << rsc->depth * 8); > + > + tb_printf(hcm, "want to add router at 0x%08x%08x\n", > + newr.hi, newr.lo); > + error = tb_router_attach(rsc, newr); > + tb_printf(rsc, "tb_router_attach returned %d\n", error); > + } > + } > + > + free(buf, M_THUNDERBOLT); > +} > diff --git a/sys/dev/thunderbolt/hcm_var.h b/sys/dev/thunderbolt/hcm_var.h > new file mode 100644 > index 000000000000..a11c8e9b6a92 > --- /dev/null > +++ b/sys/dev/thunderbolt/hcm_var.h > @@ -0,0 +1,47 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > + * Copyright (c) 2022 Scott Long > + * All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + * > + * $FreeBSD$ > + */ > + > +#ifndef _HCM_VAR_H > +#define _HCM_VAR_H > + > +struct hcm_softc { > + u_int debug; > + device_t dev; > + struct nhi_softc *nsc; > + > + struct task cfg_task; > + struct taskqueue *taskqueue; > +}; > + > +int hcm_attach(struct nhi_softc *); > +int hcm_detach(struct nhi_softc *); > +int hcm_router_discover(struct hcm_softc *); > + > +#endif /* _HCM_VAR_H */ > diff --git a/sys/dev/thunderbolt/nhi.c b/sys/dev/thunderbolt/nhi.c > new file mode 100644 > index 000000000000..205e69c16253 > --- /dev/null > +++ b/sys/dev/thunderbolt/nhi.c > @@ -0,0 +1,1170 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > + * Copyright (c) 2022 Scott Long > + * All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include "opt_thunderbolt.h" > + > +/* PCIe interface for Thunderbolt Native Host Interface (nhi) */ > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include "tb_if.h" > + > +static int nhi_alloc_ring(struct nhi_softc *, int, int, int, > + struct nhi_ring_pair **); > +static void nhi_free_ring(struct nhi_ring_pair *); > +static void nhi_free_rings(struct nhi_softc *); > +static int nhi_configure_ring(struct nhi_softc *, struct nhi_ring_pair *); > +static int nhi_activate_ring(struct nhi_ring_pair *); > +static int nhi_deactivate_ring(struct nhi_ring_pair *); > +static int nhi_alloc_ring0(struct nhi_softc *); > +static void nhi_free_ring0(struct nhi_softc *); > +static void nhi_fill_rx_ring(struct nhi_softc *, struct nhi_ring_pair *); > +static int nhi_init(struct nhi_softc *); > +static void nhi_post_init(void *); > +static int nhi_tx_enqueue(struct nhi_ring_pair *, struct nhi_cmd_frame *); > +static int nhi_setup_sysctl(struct nhi_softc *); > + > +SYSCTL_NODE(_hw, OID_AUTO, nhi, CTLFLAG_RD, 0, "NHI Driver Parameters"); > + > +MALLOC_DEFINE(M_NHI, "nhi", "nhi driver memory"); > + > +#ifndef NHI_DEBUG_LEVEL > +#define NHI_DEBUG_LEVEL 0 > +#endif > + > +/* 0 = default, 1 = force-on, 2 = force-off */ > +#ifndef NHI_FORCE_HCM > +#define NHI_FORCE_HCM 0 > +#endif > + > +void > +nhi_get_tunables(struct nhi_softc *sc) > +{ > + devclass_t dc; > + device_t ufp; > + char tmpstr[80], oid[80]; > + u_int val; > + > + /* Set local defaults */ > + sc->debug = NHI_DEBUG_LEVEL; > + sc->max_ring_count = NHI_DEFAULT_NUM_RINGS; > + sc->force_hcm = NHI_FORCE_HCM; > + > + /* Inherit setting from the upstream thunderbolt switch node */ > + val = TB_GET_DEBUG(sc->dev, &sc->debug); > + if (val != 0) { > + dc = devclass_find("tbolt"); > + if (dc != NULL) { > + ufp = devclass_get_device(dc, device_get_unit(sc->dev)); > + if (ufp != NULL) > + TB_GET_DEBUG(ufp, &sc->debug); > + } else { > + if (TUNABLE_STR_FETCH("hw.tbolt.debug_level", oid, > + 80) != 0) > + tb_parse_debug(&sc->debug, oid); > + } > + } > + > + /* > + * Grab global variables. Allow nhi debug flags to override > + * thunderbolt debug flags, if present. > + */ > + bzero(oid, 80); > + if (TUNABLE_STR_FETCH("hw.nhi.debug_level", oid, 80) != 0) > + tb_parse_debug(&sc->debug, oid); > + if (TUNABLE_INT_FETCH("hw.nhi.max_rings", &val) != 0) { > + val = min(val, NHI_MAX_NUM_RINGS); > + sc->max_ring_count = max(val, 1); > + } > + if (TUNABLE_INT_FETCH("hw.nhi.force_hcm", &val) != 0) > + sc->force_hcm = val; > + > + /* Grab instance variables */ > + bzero(oid, 80); > + snprintf(tmpstr, sizeof(tmpstr), "dev.nhi.%d.debug_level", > + device_get_unit(sc->dev)); > + if (TUNABLE_STR_FETCH(tmpstr, oid, 80) != 0) > + tb_parse_debug(&sc->debug, oid); > + snprintf(tmpstr, sizeof(tmpstr), "dev.nhi.%d.max_rings", > + device_get_unit(sc->dev)); > + if (TUNABLE_INT_FETCH(tmpstr, &val) != 0) { > + val = min(val, NHI_MAX_NUM_RINGS); > + sc->max_ring_count = max(val, 1); > + } > + snprintf(tmpstr, sizeof(tmpstr), "dev, nhi.%d.force_hcm", > + device_get_unit(sc->dev)); > + if (TUNABLE_INT_FETCH(tmpstr, &val) != 0) > + sc->force_hcm = val; > + > + return; > +} > + > +static void > +nhi_configure_caps(struct nhi_softc *sc) > +{ > + > + if (NHI_IS_USB4(sc) || (sc->force_hcm == NHI_FORCE_HCM_ON)) > + sc->caps |= NHI_CAP_HCM; > + if (sc->force_hcm == NHI_FORCE_HCM_OFF) > + sc->caps &= ~NHI_CAP_HCM; > +} > + > +struct nhi_cmd_frame * > +nhi_alloc_tx_frame(struct nhi_ring_pair *r) > +{ > + struct nhi_cmd_frame *cmd; > + > + mtx_lock(&r->mtx); > + cmd = nhi_alloc_tx_frame_locked(r); > + mtx_unlock(&r->mtx); > + > + return (cmd); > +} > + > +void > +nhi_free_tx_frame(struct nhi_ring_pair *r, struct nhi_cmd_frame *cmd) > +{ > + mtx_lock(&r->mtx); > + nhi_free_tx_frame_locked(r, cmd); > + mtx_unlock(&r->mtx); > +} > + > +/* > + * Push a command and data dword through the mailbox to the firmware. > + * Response is either good, error, or timeout. Commands that return data > + * do so by reading OUTMAILDATA. > + */ > +int > +nhi_inmail_cmd(struct nhi_softc *sc, uint32_t cmd, uint32_t data) > +{ > + uint32_t val; > + u_int error, timeout; > + > + mtx_lock(&sc->nhi_mtx); > + /* > + * XXX Should a defer/reschedule happen here, or is it not worth > + * worrying about? > + */ > + if (sc->hwflags & NHI_MBOX_BUSY) { > + mtx_unlock(&sc->nhi_mtx); > + tb_debug(sc, DBG_MBOX, "Driver busy with mailbox\n"); > + return (EBUSY); > + } > + sc->hwflags |= NHI_MBOX_BUSY; > + > + val = nhi_read_reg(sc, TBT_INMAILCMD); > + tb_debug(sc, DBG_MBOX|DBG_FULL, "Reading INMAILCMD= 0x%08x\n", val); > + if (val & INMAILCMD_ERROR) > + tb_debug(sc, DBG_MBOX, "Error already set in INMAILCMD\n"); > + if (val & INMAILCMD_OPREQ) { > + mtx_unlock(&sc->nhi_mtx); > + tb_debug(sc, DBG_MBOX, > + "INMAILCMD request already in progress\n"); > + return (EBUSY); > + } > + > + nhi_write_reg(sc, TBT_INMAILDATA, data); > + nhi_write_reg(sc, TBT_INMAILCMD, cmd | INMAILCMD_OPREQ); > + > + /* Poll at 1s intervals */ > + timeout = NHI_MAILBOX_TIMEOUT; > + while (timeout--) { > + DELAY(1000000); > + val = nhi_read_reg(sc, TBT_INMAILCMD); > + tb_debug(sc, DBG_MBOX|DBG_EXTRA, > + "Polling INMAILCMD= 0x%08x\n", val); > + if ((val & INMAILCMD_OPREQ) == 0) > + break; > + } > + sc->hwflags &= ~NHI_MBOX_BUSY; > + mtx_unlock(&sc->nhi_mtx); > + > + error = 0; > + if (val & INMAILCMD_OPREQ) { > + tb_printf(sc, "Timeout waiting for mailbox\n"); > + error = ETIMEDOUT; > + } > + if (val & INMAILCMD_ERROR) { > + tb_printf(sc, "Firmware reports error in mailbox\n"); > + error = EINVAL; > + } > + > + return (error); > +} > + > +/* > + * Pull command status and data from the firmware mailbox. > + */ > +int > +nhi_outmail_cmd(struct nhi_softc *sc, uint32_t *val) > +{ > + > + if (val == NULL) > + return (EINVAL); > + *val = nhi_read_reg(sc, TBT_OUTMAILCMD); > + return (0); > +} > + > +int > +nhi_attach(struct nhi_softc *sc) > +{ > + uint32_t val; > + int error = 0; > + > + if ((error = nhi_setup_sysctl(sc)) != 0) > + return (error); > + > + mtx_init(&sc->nhi_mtx, "nhimtx", "NHI Control Mutex", MTX_DEF); > + > + nhi_configure_caps(sc); > + > + /* > + * Get the number of TX/RX paths. This sizes some of the register > + * arrays during allocation and initialization. USB4 spec says that > + * the max is 21. Alpine Ridge appears to default to 12. > + */ > + val = GET_HOST_CAPS_PATHS(nhi_read_reg(sc, NHI_HOST_CAPS)); > + tb_debug(sc, DBG_INIT|DBG_NOISY, "Total Paths= %d\n", val); > + if ((val == 0) || (val > 21) || ((NHI_IS_AR(sc) && val != 12))) { > + tb_printf(sc, "WARN: unexpected number of paths: %d\n", val); > + /* return (ENXIO); */ > + } > + sc->path_count = val; > + > + SLIST_INIT(&sc->ring_list); > + > + error = nhi_pci_configure_interrupts(sc); > + if (error == 0) > + error = nhi_alloc_ring0(sc); > + if (error == 0) { > + nhi_configure_ring(sc, sc->ring0); > + nhi_activate_ring(sc->ring0); > + nhi_fill_rx_ring(sc, sc->ring0); > + } > + > + if (error == 0) > + error = tbdev_add_interface(sc); > + > + if ((error == 0) && (NHI_USE_ICM(sc))) > + tb_printf(sc, "WARN: device uses an internal connection manager\n"); > + if ((error == 0) && (NHI_USE_HCM(sc))) > + ; > + error = hcm_attach(sc); > + > + if (error == 0) > + error = nhi_init(sc); > + > + return (error); > +} > + > +int > +nhi_detach(struct nhi_softc *sc) > +{ > + > + if (NHI_USE_HCM(sc)) > + hcm_detach(sc); > + > + if (sc->root_rsc != NULL) > + tb_router_detach(sc->root_rsc); > + > + tbdev_remove_interface(sc); > + > + nhi_pci_disable_interrupts(sc); > + > + nhi_free_ring0(sc); > + > + /* XXX Should the rings be marked as !VALID in the descriptors? */ > + nhi_free_rings(sc); > + > + mtx_destroy(&sc->nhi_mtx); > + > + return (0); > +} > + > +static void > +nhi_memaddr_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) > +{ > + bus_addr_t *addr; > + > + addr = arg; > + if (error == 0 && nsegs == 1) { > + *addr = segs[0].ds_addr; > + } else > + *addr = 0; > +} > + > +static int > +nhi_alloc_ring(struct nhi_softc *sc, int ringnum, int tx_depth, int rx_depth, > + struct nhi_ring_pair **rp) > +{ > + bus_dma_template_t t; > + bus_addr_t ring_busaddr; > + struct nhi_ring_pair *r; > + int ring_size, error; > + u_int rxring_len, txring_len; > + char *ring; > + > + if (ringnum >= sc->max_ring_count) { > + tb_debug(sc, DBG_INIT, "Tried to allocate ring number %d\n", > + ringnum); > + return (EINVAL); > + } > + > + /* Allocate the ring structure and the RX ring tacker together. */ > + rxring_len = rx_depth * sizeof(void *); > + txring_len = tx_depth * sizeof(void *); > + r = malloc(sizeof(struct nhi_ring_pair) + rxring_len + txring_len, > + M_NHI, M_NOWAIT|M_ZERO); > + if (r == NULL) { > + tb_printf(sc, "ERROR: Cannot allocate ring memory\n"); > + return (ENOMEM); > + } > + > + r->sc = sc; > + TAILQ_INIT(&r->tx_head); > + TAILQ_INIT(&r->rx_head); > + r->ring_num = ringnum; > + r->tx_ring_depth = tx_depth; > + r->tx_ring_mask = tx_depth - 1; > + r->rx_ring_depth = rx_depth; > + r->rx_ring_mask = rx_depth - 1; > + r->rx_pici_reg = NHI_RX_RING_PICI + ringnum * 16; > + r->tx_pici_reg = NHI_TX_RING_PICI + ringnum * 16; > + r->rx_cmd_ring = (struct nhi_cmd_frame **)((uint8_t *)r + sizeof (*r)); > + r->tx_cmd_ring = (struct nhi_cmd_frame **)((uint8_t *)r->rx_cmd_ring + > + rxring_len); > + > + snprintf(r->name, NHI_RING_NAMELEN, "nhiring%d\n", ringnum); > + mtx_init(&r->mtx, r->name, "NHI Ring Lock", MTX_DEF); > + tb_debug(sc, DBG_INIT | DBG_FULL, "Allocated ring context at %p, " > + "mutex %p\n", r, &r->mtx); > + > + /* Allocate the RX and TX buffer descriptor rings */ > + ring_size = sizeof(struct nhi_tx_buffer_desc) * r->tx_ring_depth; > + ring_size += sizeof(struct nhi_rx_buffer_desc) * r->rx_ring_depth; > + tb_debug(sc, DBG_INIT | DBG_FULL, "Ring %d ring_size= %d\n", > + ringnum, ring_size); > + > + bus_dma_template_init(&t, sc->parent_dmat); > + t.alignment = 4; > + t.maxsize = t.maxsegsize = ring_size; > + t.nsegments = 1; > + if ((error = bus_dma_template_tag(&t, &r->ring_dmat)) != 0) { > + tb_printf(sc, "Cannot allocate ring %d DMA tag: %d\n", > + ringnum, error); > + return (ENOMEM); > + } > + if (bus_dmamem_alloc(r->ring_dmat, (void **)&ring, BUS_DMA_NOWAIT, > + &r->ring_map)) { > + tb_printf(sc, "Cannot allocate ring memory\n"); > + return (ENOMEM); > + } > + bzero(ring, ring_size); > + bus_dmamap_load(r->ring_dmat, r->ring_map, ring, ring_size, > + nhi_memaddr_cb, &ring_busaddr, 0); > + > + r->ring = ring; > + > + r->tx_ring = (union nhi_ring_desc *)(ring); > + r->tx_ring_busaddr = ring_busaddr; > + ring += sizeof(struct nhi_tx_buffer_desc) * r->tx_ring_depth; > + ring_busaddr += sizeof(struct nhi_tx_buffer_desc) * r->tx_ring_depth; > + > + r->rx_ring = (union nhi_ring_desc *)(ring); > + r->rx_ring_busaddr = ring_busaddr; > + > + tb_debug(sc, DBG_INIT | DBG_EXTRA, "Ring %d: RX %p [0x%jx] " > + "TX %p [0x%jx]\n", ringnum, r->tx_ring, r->tx_ring_busaddr, > + r->rx_ring, r->rx_ring_busaddr); > + > + *rp = r; > + return (0); > +} > + > +static void > +nhi_free_ring(struct nhi_ring_pair *r) > +{ > + > + tb_debug(r->sc, DBG_INIT, "Freeing ring %d resources\n", r->ring_num); > + nhi_deactivate_ring(r); > + > + if (r->tx_ring_busaddr != 0) { > + bus_dmamap_unload(r->ring_dmat, r->ring_map); > + r->tx_ring_busaddr = 0; > + } > + if (r->ring != NULL) { > + bus_dmamem_free(r->ring_dmat, r->ring, r->ring_map); > + r->ring = NULL; > + } > + if (r->ring_dmat != NULL) { > + bus_dma_tag_destroy(r->ring_dmat); > + r->ring_dmat = NULL; > + } > + mtx_destroy(&r->mtx); > +} > + > +static void > +nhi_free_rings(struct nhi_softc *sc) > +{ > + struct nhi_ring_pair *r; > + > + while ((r = SLIST_FIRST(&sc->ring_list)) != NULL) { > + nhi_free_ring(r); > + mtx_lock(&sc->nhi_mtx); > + SLIST_REMOVE_HEAD(&sc->ring_list, ring_link); > + mtx_unlock(&sc->nhi_mtx); > + free(r, M_NHI); > + } > + > + return; > +} > + > +static int > +nhi_configure_ring(struct nhi_softc *sc, struct nhi_ring_pair *ring) > +{ > + bus_addr_t busaddr; > + uint32_t val; > + int idx; > + > + idx = ring->ring_num * 16; > + > + /* Program the TX ring address and size */ > + busaddr = ring->tx_ring_busaddr; > + nhi_write_reg(sc, NHI_TX_RING_ADDR_LO + idx, busaddr & 0xffffffff); > + nhi_write_reg(sc, NHI_TX_RING_ADDR_HI + idx, busaddr >> 32); > + nhi_write_reg(sc, NHI_TX_RING_SIZE + idx, ring->tx_ring_depth); > + nhi_write_reg(sc, NHI_TX_RING_TABLE_TIMESTAMP + idx, 0x0); > + tb_debug(sc, DBG_INIT, "TX Ring %d TX_RING_SIZE= 0x%x\n", > + ring->ring_num, ring->tx_ring_depth); > + > + /* Program the RX ring address and size */ > + busaddr = ring->rx_ring_busaddr; > + val = (ring->rx_buffer_size << 16) | ring->rx_ring_depth; > + nhi_write_reg(sc, NHI_RX_RING_ADDR_LO + idx, busaddr & 0xffffffff); > + nhi_write_reg(sc, NHI_RX_RING_ADDR_HI + idx, busaddr >> 32); > + nhi_write_reg(sc, NHI_RX_RING_SIZE + idx, val); > + nhi_write_reg(sc, NHI_RX_RING_TABLE_BASE1 + idx, 0xffffffff); > + tb_debug(sc, DBG_INIT, "RX Ring %d RX_RING_SIZE= 0x%x\n", > + ring->ring_num, val); > + > + return (0); > +} > + > +static int > +nhi_activate_ring(struct nhi_ring_pair *ring) > +{ > + struct nhi_softc *sc = ring->sc; > + int idx; > + > + nhi_pci_enable_interrupt(ring); > + > + idx = ring->ring_num * 32; > + tb_debug(sc, DBG_INIT, "Activating ring %d at idx %d\n", > + ring->ring_num, idx); > + nhi_write_reg(sc, NHI_TX_RING_TABLE_BASE0 + idx, > + TX_TABLE_RAW | TX_TABLE_VALID); > + nhi_write_reg(sc, NHI_RX_RING_TABLE_BASE0 + idx, > + RX_TABLE_RAW | RX_TABLE_VALID); > + > + return (0); > +} > + > +static int > +nhi_deactivate_ring(struct nhi_ring_pair *r) > +{ > + struct nhi_softc *sc = r->sc; > + int idx; > + > + idx = r->ring_num * 32; > + tb_debug(sc, DBG_INIT, "Deactiving ring %d at idx %d\n", > + r->ring_num, idx); > + nhi_write_reg(sc, NHI_TX_RING_TABLE_BASE0 + idx, 0); > + nhi_write_reg(sc, NHI_RX_RING_TABLE_BASE0 + idx, 0); > + > + idx = r->ring_num * 16; > + tb_debug(sc, DBG_INIT, "Setting ring %d sizes to 0\n", r->ring_num); > + nhi_write_reg(sc, NHI_TX_RING_SIZE + idx, 0); > + nhi_write_reg(sc, NHI_RX_RING_SIZE + idx, 0); > + > + return (0); > +} > + > +static int > +nhi_alloc_ring0(struct nhi_softc *sc) > +{ > + bus_addr_t frames_busaddr; > + bus_dma_template_t t; > + struct nhi_intr_tracker *trkr; > + struct nhi_ring_pair *r; > + struct nhi_cmd_frame *cmd; > + char *frames; > + int error, size, i; > + > + if ((error = nhi_alloc_ring(sc, 0, NHI_RING0_TX_DEPTH, > + NHI_RING0_RX_DEPTH, &r)) != 0) { > + tb_printf(sc, "Error allocating control ring\n"); > + return (error); > + } > + > + r->rx_buffer_size = NHI_RING0_FRAME_SIZE;/* Control packets are small */ > + > + /* Allocate the RX and TX buffers that are used for Ring0 comms */ > + size = r->tx_ring_depth * NHI_RING0_FRAME_SIZE; > + size += r->rx_ring_depth * NHI_RING0_FRAME_SIZE; > + > + bus_dma_template_init(&t, sc->parent_dmat); > + t.maxsize = t.maxsegsize = size; > + t.nsegments = 1; > + if (bus_dma_template_tag(&t, &sc->ring0_dmat)) { > + tb_printf(sc, "Error allocating control ring buffer tag\n"); > + return (ENOMEM); > + } > + > + if (bus_dmamem_alloc(sc->ring0_dmat, (void **)&frames, BUS_DMA_NOWAIT, > + &sc->ring0_map) != 0) { > + tb_printf(sc, "Error allocating control ring memory\n"); > + return (ENOMEM); > + } > + bzero(frames, size); > + bus_dmamap_load(sc->ring0_dmat, sc->ring0_map, frames, size, > + nhi_memaddr_cb, &frames_busaddr, 0); > + sc->ring0_frames_busaddr = frames_busaddr; > + sc->ring0_frames = frames; > + > + /* Allocate the driver command trackers */ > + sc->ring0_cmds = malloc(sizeof(struct nhi_cmd_frame) * > + (r->tx_ring_depth + r->rx_ring_depth), M_NHI, M_NOWAIT | M_ZERO); > + if (sc->ring0_cmds == NULL) > + return (ENOMEM); > + > + /* Initialize the RX frames so they can be used */ > + mtx_lock(&r->mtx); > + for (i = 0; i < r->rx_ring_depth; i++) { > + cmd = &sc->ring0_cmds[i]; > + cmd->data = (uint32_t *)(frames + NHI_RING0_FRAME_SIZE * i); > + cmd->data_busaddr = frames_busaddr + NHI_RING0_FRAME_SIZE * i; > + cmd->flags = CMD_MAPPED; > + cmd->idx = i; > + TAILQ_INSERT_TAIL(&r->rx_head, cmd, cm_link); > + } > + > + /* Inititalize the TX frames */ > + for ( ; i < r->tx_ring_depth + r->rx_ring_depth - 1; i++) { > + cmd = &sc->ring0_cmds[i]; > + cmd->data = (uint32_t *)(frames + NHI_RING0_FRAME_SIZE * i); > + cmd->data_busaddr = frames_busaddr + NHI_RING0_FRAME_SIZE * i; > + cmd->flags = CMD_MAPPED; > + cmd->idx = i; > + nhi_free_tx_frame_locked(r, cmd); > + } > + mtx_unlock(&r->mtx); > + > + /* Do a 1:1 mapping of rings to interrupt vectors. */ > + /* XXX Should be abstracted */ > + trkr = &sc->intr_trackers[0]; > + trkr->ring = r; > + r->tracker = trkr; > + > + /* XXX Should be an array */ > + sc->ring0 = r; > + SLIST_INSERT_HEAD(&sc->ring_list, r, ring_link); > + > + return (0); > +} > + > +static void > +nhi_free_ring0(struct nhi_softc *sc) > +{ > + if (sc->ring0_cmds != NULL) { > + free(sc->ring0_cmds, M_NHI); > + sc->ring0_cmds = NULL; > + } > + > + if (sc->ring0_frames_busaddr != 0) { > + bus_dmamap_unload(sc->ring0_dmat, sc->ring0_map); > + sc->ring0_frames_busaddr = 0; > *** 5529 LINES SKIPPED *** -- Wolfram Schneider https://wolfram.schneider.org From nobody Tue Sep 30 08:18:29 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbWCn5R74z68gjw; Tue, 30 Sep 2025 08:18:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbWCn4yGFz4FGV; Tue, 30 Sep 2025 08:18:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759220309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Rq51uTrvBtqw0cdnjtP6HXzwg5rAZVOF/t+lmpidaE=; b=MyVoVqlng5E0RXU6r+jjtjWCJ5RrG2o0l/gw4p1Xl5V7YXosYKxb+7VagDPfWRoZPGJqxt Ipt0x6hCq9t2+q1IYPlf2zfO1Cs0Ouj0wH9sc3PXAMred68p8Yg+KeuBSAbAJ+b2gON66+ nRrx74ZcveZZw9NMMP8ide65ihtouq440C9cpTK68nPlLAny3pH1CScHMidCMJfQcMY5i8 dJ1PGBZFDyjd32X3efAB/uU+vDvxjRr4LqA9VlRCpjJfD1YEI4Ksq4rz4Ln7mivVul7ZSc 37ZPbzapruGN7rMrtPl6Uy7pR2kTsz4+QRNxJ86Yq5QTyhuLu37oInnRRb4b1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759220309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Rq51uTrvBtqw0cdnjtP6HXzwg5rAZVOF/t+lmpidaE=; b=uhnLt8qRTx+dXW366Qk87cwf7oK8ngeVHrD/4YKUr24o114A6axoqyCExTzIMx6FLMnLh6 nLfYeFM+bNyLkCVOAHpSre84HfbrOMtdOrfrkZb+WolHXRTZTuL7u2rGNZfreiRT8kI7aB hAS5KaslvNL1dEzMqLTpN6lChVTzTU11ARL+cRbEqLouItb1RpgSr+Oz8F2RxZSE7KWbeN u0R+BCyDXurMsVX/E0QA4gbM/NS/L7dFUAb/jFkPo4uRIv3auKH50si1OflEAUz9xA3Me5 T0V5qNOsKIENoXKVVnXMT34gTl4RXMgXbU9dHyP6MpJytDI/FaCQbD68dqJgmQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759220309; a=rsa-sha256; cv=none; b=LZ+Dy3TxE/yEZX/AkAzYR+yM4njwPpMnMkH+cdLxLY0UFoe/pNRg5HJwzVEQQ+vqcNkAmt ZrABHW7gZiDD5nmNw8xoMdpmx7hW9oOiXaG41sT/RC3Mtr95ZF4Jo1lRQkqgoVdYFRbq/v xsgAW7TBM61S4AK1e+G5X4KY7hv/Xs2MXxmROYQyBDT5XnC5zP1ym5XkmcaOy/iU99jupn an741zvzDjLH6n/8soWhfwmQITCn0elqRT1RJxXZqI0JgxzgNkBamYEwmBEp9fAdg+2DbV alfUWpmHckFHqtWSrGy4yB616Tqj4BIN9AtYCmgnpR3cooQCZ3oUQIeosi0DVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbWCn4STJzBPx; Tue, 30 Sep 2025 08:18:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58U8IT2b024719; Tue, 30 Sep 2025 08:18:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58U8ITHc024716; Tue, 30 Sep 2025 08:18:29 GMT (envelope-from git) Date: Tue, 30 Sep 2025 08:18:29 GMT Message-Id: <202509300818.58U8ITHc024716@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: b0f25a38d721 - main - liby: Move to toolchain package 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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b0f25a38d7217b04dcdf7f2272ecf5f2f314d314 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=b0f25a38d7217b04dcdf7f2272ecf5f2f314d314 commit b0f25a38d7217b04dcdf7f2272ecf5f2f314d314 Author: Lexi Winter AuthorDate: 2025-09-30 08:10:32 +0000 Commit: Lexi Winter CommitDate: 2025-09-30 08:14:05 +0000 liby: Move to toolchain package We don't need an entire package for this trivial library. Move it to toolchain, which in practice means it's installed in toolchain-dev as it only contains a static library. MFC after: 1 day Reviewed by: bapt Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52793 --- lib/liby/Makefile | 2 +- release/packages/ucl/liby-all.ucl | 28 ---------------------------- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/lib/liby/Makefile b/lib/liby/Makefile index 93f72ee440f8..ace8f8457d22 100644 --- a/lib/liby/Makefile +++ b/lib/liby/Makefile @@ -1,4 +1,4 @@ -PACKAGE=lib${LIB} +PACKAGE=toolchain LIB= y SRCS= main.c yyerror.c NO_PIC= diff --git a/release/packages/ucl/liby-all.ucl b/release/packages/ucl/liby-all.ucl deleted file mode 100644 index 313058e08710..000000000000 --- a/release/packages/ucl/liby-all.ucl +++ /dev/null @@ -1,28 +0,0 @@ -/* - * SPDX-License-Identifier: ISC - * - * Copyright (c) 2025 Lexi Winter - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -comment = "YACC runtime library" - -desc = < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 11709058bf68 - main - libstdthreads: Move to the runtime package 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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 11709058bf680f5738c6656597f2ff9e662c9400 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=11709058bf680f5738c6656597f2ff9e662c9400 commit 11709058bf680f5738c6656597f2ff9e662c9400 Author: Lexi Winter AuthorDate: 2025-09-30 08:11:14 +0000 Commit: Lexi Winter CommitDate: 2025-09-30 08:14:38 +0000 libstdthreads: Move to the runtime package This library is required for C11 conformance, and is tiny (11kB), so instead of creating a bunch of packages for it, put it in runtime. Although this is a core C library and might be expected to live in clibs, kib objected to this on the basis that almost nothing actually uses libstdthreads and putting it in clibs would be wasteful. MFC after: 1 day Reviewed by: kib Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52792 --- lib/libstdthreads/Makefile | 2 +- release/packages/ucl/libstdthreads-all.ucl | 28 ---------------------------- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/lib/libstdthreads/Makefile b/lib/libstdthreads/Makefile index 49d024052420..dcdac58efc12 100644 --- a/lib/libstdthreads/Makefile +++ b/lib/libstdthreads/Makefile @@ -1,4 +1,4 @@ -PACKAGE=lib${LIB} +PACKAGE=runtime LIB= stdthreads SHLIB_MAJOR= 0 diff --git a/release/packages/ucl/libstdthreads-all.ucl b/release/packages/ucl/libstdthreads-all.ucl deleted file mode 100644 index 493a1cce1a46..000000000000 --- a/release/packages/ucl/libstdthreads-all.ucl +++ /dev/null @@ -1,28 +0,0 @@ -/* - * SPDX-License-Identifier: ISC - * - * Copyright (c) 2025 Lexi Winter - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -comment = "C11 threading library" - -desc = < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 9124ace751eb - main - packages: Rename liblzma package to xz 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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9124ace751eb9c856c50c3698cf93ede45a9897d Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=9124ace751eb9c856c50c3698cf93ede45a9897d commit 9124ace751eb9c856c50c3698cf93ede45a9897d Author: Lexi Winter AuthorDate: 2025-09-30 08:11:55 +0000 Commit: Lexi Winter CommitDate: 2025-09-30 08:14:46 +0000 packages: Rename liblzma package to xz Rename liblzma to xz, and use LIB_PACKAGE to create an xz-lib package for runtime libraries. MFC after: 1 day Reviewed by: bapt Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52791 --- lib/liblzma/Makefile | 4 +++- release/packages/ucl/{liblzma-all.ucl => xz-all.ucl} | 7 ++++--- usr.bin/lzmainfo/Makefile | 2 ++ usr.bin/xz/Makefile | 2 ++ usr.bin/xzdec/Makefile | 2 ++ 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/liblzma/Makefile b/lib/liblzma/Makefile index 27e0521f5884..9c6ece74ffd0 100644 --- a/lib/liblzma/Makefile +++ b/lib/liblzma/Makefile @@ -1,4 +1,6 @@ -PACKAGE=lib${LIB} +PACKAGE= xz +LIB_PACKAGE= + LIB= lzma LZMADIR= ${SRCTOP}/contrib/xz/src/liblzma diff --git a/release/packages/ucl/liblzma-all.ucl b/release/packages/ucl/xz-all.ucl similarity index 78% rename from release/packages/ucl/liblzma-all.ucl rename to release/packages/ucl/xz-all.ucl index d5698d48332a..16da8b76f0ac 100644 --- a/release/packages/ucl/liblzma-all.ucl +++ b/release/packages/ucl/xz-all.ucl @@ -16,11 +16,12 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -comment = "XZ LZMA library" +comment = "LZMA2 data compression" desc = < +PACKAGE=xz + PROG= xz LINKS= ${BINDIR}/xz ${BINDIR}/unxz diff --git a/usr.bin/xzdec/Makefile b/usr.bin/xzdec/Makefile index 7c43b2e03d78..6bf3dc07a408 100644 --- a/usr.bin/xzdec/Makefile +++ b/usr.bin/xzdec/Makefile @@ -1,3 +1,5 @@ +PACKAGE=xz + PROG= xzdec LINKS= ${BINDIR}/xzdec ${BINDIR}/lzdec From nobody Tue Sep 30 08:18: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 4cbWCs6xCgz68gqN; Tue, 30 Sep 2025 08:18:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbWCs0X54z4Dv1; Tue, 30 Sep 2025 08:18:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759220313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1PBZOuFxrJ1gWmAG9wQfiqHsMTbvLp7dU+Jiug92SHg=; b=b4JNcpRCvSlE5lzzyoG1VHxgeIP6craABNKr6RuLE5BFb5gc2I2m4/eYkunX0c2AivLpnr ddtw6whbqumxHLT+0XcwSvbPu4EijQzNI8YQEYIsQImBvXZZeb7xw5q1C9oUbCFowepic8 IhO7RSibgmOu5+YJF+/pJlVGUWSa4GtSRJ8bRoqK8w4GUGH6WS+w0cqhurABJXsnM7Xyor MFPQv+Efgz+N8+Y8RNzGnlqoo+XAoVhI3IHFmoKOLZ9vYUxVT1+I97L1PN9+e9pf/645Y5 OoOtL7U1gJhfz8AdTfExzLWSq90vuf3hfk7By0xo4T6b8r94zCws0iTlleAlkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759220313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1PBZOuFxrJ1gWmAG9wQfiqHsMTbvLp7dU+Jiug92SHg=; b=DVjkYJYoH3wXNFudyAl+O1srqg1ElAKbfQka9bEbdWTsYoQ6bEyiA4OGz2wkBOxbq+u+vo G53f1WUOMB08UK589uZCXvOlqyv6l2QUDah08eyaWXqqF5YBAWmJhPtc4MNtR+DUrabhtD oZi2gfe9i4Q7kmu5X9FLbW8nTkdZ8U1KB+LDuao6f7k0vdxSfQ63MHXFJdDNCQmmirQIIM 5IU5VmKncZ7Qocck+3iwZiWhX+0g+MRBOGtT6NpNlo6BnK05lvuwhupgMncKhJswyqu+x5 6xn4iD3MrUgf01nvCePk6MO6DYXsOD55ZRlrSuoeczpFdQSd6zJhkl1YWl1HNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759220313; a=rsa-sha256; cv=none; b=c8cS3mYQeAf4yKcXMym5YCHsghbQJt+n8yFxLv/zIZXfP9y7aojF+DK4En6zruCdGxTKBo 6O/+v3IC4aCsEneVSgHS5LmxHpu1HeJzTizx84ee8MXadh19zuvqDzgbxVkpjsQcfpc/Zf cKoq3TSbyvSgYrWiqE+2Rjvcx/33DDuKVdFLHuALjr4kuW5DMx3GSjfM0XQTLGlwBkaX8/ /jAep6mtDydSgwcRVSVvRmzuVqWtJsRjqOyXrz4W0EcPJ4X7fmY3Brcc2CtK//z9OKeSnE q1tpPlTWVhPAe7Pc1tZb9EwVruDqXQIIds3C0eyV7wFC/+HOZqXE8+WK3thSag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbWCr71myzBh7; Tue, 30 Sep 2025 08:18:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58U8IW3L024827; Tue, 30 Sep 2025 08:18:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58U8IWTu024824; Tue, 30 Sep 2025 08:18:32 GMT (envelope-from git) Date: Tue, 30 Sep 2025 08:18:32 GMT Message-Id: <202509300818.58U8IWTu024824@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 41ee4321cc52 - main - libsdp: Move to bluetooth-lib package 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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 41ee4321cc528b1f72d6a674fafdd5337be83f95 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=41ee4321cc528b1f72d6a674fafdd5337be83f95 commit 41ee4321cc528b1f72d6a674fafdd5337be83f95 Author: Lexi Winter AuthorDate: 2025-09-30 08:12:28 +0000 Commit: Lexi Winter CommitDate: 2025-09-30 08:14:51 +0000 libsdp: Move to bluetooth-lib package Instead of creating a separate libsdp package, use LIB_PACKAGE to ship this in bluetooth-lib. MFC after: 1 day Reviewed by: bapt Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52790 --- lib/libsdp/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libsdp/Makefile b/lib/libsdp/Makefile index f0153e756dfd..8177c9bdbd1a 100644 --- a/lib/libsdp/Makefile +++ b/lib/libsdp/Makefile @@ -1,6 +1,7 @@ # $Id: Makefile,v 1.2 2003/09/07 20:34:19 max Exp $ -PACKAGE=lib${LIB} +PACKAGE= bluetooth +LIB_PACKAGE= LIB= sdp MAN= sdp.3 From nobody Tue Sep 30 08:18: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 4cbWCt3C1bz68gsk; Tue, 30 Sep 2025 08:18: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 4cbWCt20Mfz4FHP; Tue, 30 Sep 2025 08:18:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759220314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z4IXGktclQyLYkcZdg0PSuHKl5GxdMfpoHFG8uIh8qM=; b=Q2coJjLIR3rSFb6rmd+t0636JONLT6v/NzQl2K1upFWfZgS9jG8QvLHRv2kPJQnPu5oeRC mtd68GYH+0u8tjbxnublHrcuYvLX7GqsCVJuRxlAMjaVtDYPQj8VziO/D+xcNjHeTsUpIw 3U20L+pAiN2PHQ4WscJs1bE8j8mWmwtaPKkLsuJoxH1Zb2Y+nrUibvPIjqEsi1Vfv4EX6B ZyiB+3/doLaHhuY1u+50ZdnsKH0NHyeiIBKq70JRDOMZRlQoP7TE+vzmj52NwPF8lo2PNd 0Fipusrp0gj07gQCiEf0WoOsyhRnC/jItbl41MMJiKJSIjpesLB+pABBF/2CGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759220314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z4IXGktclQyLYkcZdg0PSuHKl5GxdMfpoHFG8uIh8qM=; b=uLYaO6qs6ZxWIZhFOHzzmZGT/HtnyMoKqSpasec2k2EBR6u1L189DCkZtL/JS7aHY8LfD5 WB8Ic5ZO+E6irFn81Jn6G/jJpgKzuT5hPS2Hzrr8dMk6IAvQlfNEOyjyBR+PQ5PkzVA3Fk tMIvYJHYZi/4SkhuqacoyCYkt8mj54G1zJsRPHxnkYhSlLQ6q61O4c8D/LEQSjihgn0/7r lXok82vx7sU+ctt2gyZJB5UXp7peqMGAh2GCsGSpR5qQkzHqnQzB+0TrIpB2LIElFj02lX e7brQt4xfGnfT/iNs5YZ3oU0WCxsxNv5z0XS1EFlGZOdsKlaI8R76rMLs9Iriw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759220314; a=rsa-sha256; cv=none; b=wdrmXSn9ByxciTYn6DadxEOidTDbZkv4Gjfz09tz1qBs4bmjGFUYhDmViSc/4DYHKdLcHP qGLUqhniDAoxXQhbEmRrXF0le6vZa6RQZDczGMd+yVOxhDCi7a9fIOErNeAM6DOfuPTwkK HnfYw7lYpZMBxZLjyAHzNw2vBlruCa+hPaXIuKAkMvblTY7dZDYstr9GTrRKQu97LNi86W QNLGAyixDJeCJV16KvWXrRNf3QABygaggbmhQQfAmQyq3y6EzTiBy4UYnr/CVJ56rYVEnQ JmbjBT4q6oWjh4+ExujMvdl3hHhIjeafEgHBCagFtEsMqxFc55TYZVC29oUOgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbWCt1BdfzBh8; Tue, 30 Sep 2025 08:18:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58U8IYjZ024861; Tue, 30 Sep 2025 08:18:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58U8IYX6024858; Tue, 30 Sep 2025 08:18:34 GMT (envelope-from git) Date: Tue, 30 Sep 2025 08:18:34 GMT Message-Id: <202509300818.58U8IYX6024858@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: a053f948ade6 - main - libbsm: Rename package to audit-lib 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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a053f948ade60e8a63ebdaa676bf95c5ce38af07 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=a053f948ade60e8a63ebdaa676bf95c5ce38af07 commit a053f948ade60e8a63ebdaa676bf95c5ce38af07 Author: Lexi Winter AuthorDate: 2025-09-30 08:13:03 +0000 Commit: Lexi Winter CommitDate: 2025-09-30 08:14:58 +0000 libbsm: Rename package to audit-lib This is part of audit, so use the new LIB_PACKAGE feature to name the package audit-lib, rather than libbsm. MFC after: 1 day Reviewed by: bapt Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52789 --- include/Makefile | 4 ++-- lib/libbsm/Makefile | 9 ++++----- release/packages/ucl/libbsm-all.ucl | 40 ------------------------------------- 3 files changed, 6 insertions(+), 47 deletions(-) diff --git a/include/Makefile b/include/Makefile index 07890362d7a6..661b2ee131ca 100644 --- a/include/Makefile +++ b/include/Makefile @@ -94,14 +94,14 @@ BSM= audit.h \ audit_fcntl.h \ audit_kevents.h \ audit_socket_type.h -BSMPACKAGE= libbsm +BSMPACKAGE= audit BSMDIR= ${INCLUDEDIR}/bsm .PATH: ${SRCTOP}/sys/security SECAUDIT= audit/audit.h \ audit/audit_ioctl.h \ audit/audit_private.h -SECAUDITPACKAGE= libbsm +SECAUDITPACKAGE= audit SECAUDITDIR= ${INCLUDEDIR}/security/audit .PATH: ${SRCTOP}/sys/cam diff --git a/lib/libbsm/Makefile b/lib/libbsm/Makefile index 67802eef62ac..4413a5dd79f7 100644 --- a/lib/libbsm/Makefile +++ b/lib/libbsm/Makefile @@ -1,9 +1,8 @@ -# -# +PACKAGE= audit +LIB_PACKAGE= -PACKAGE= lib${LIB} -OPENBSMDIR= ${SRCTOP}/contrib/openbsm -_LIBBSMDIR= ${OPENBSMDIR}/libbsm +OPENBSMDIR= ${SRCTOP}/contrib/openbsm +_LIBBSMDIR= ${OPENBSMDIR}/libbsm LIB= bsm SHLIB_MAJOR= 3 diff --git a/release/packages/ucl/libbsm-all.ucl b/release/packages/ucl/libbsm-all.ucl deleted file mode 100644 index 02022b91f83a..000000000000 --- a/release/packages/ucl/libbsm-all.ucl +++ /dev/null @@ -1,40 +0,0 @@ -/* - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2005-2007 Robert N. M. Watson - * Copyright (c) 2008-2009 Apple Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHORS 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 AUTHORS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -comment = "Basic Security Module (BSM) audit library" - -desc = < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 4c8bbf5897b7 - main - libstdbuf: Move to the utilities package 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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4c8bbf5897b7e8e580f8ecb1d9d93f5d6d6c7f24 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=4c8bbf5897b7e8e580f8ecb1d9d93f5d6d6c7f24 commit 4c8bbf5897b7e8e580f8ecb1d9d93f5d6d6c7f24 Author: Lexi Winter AuthorDate: 2025-09-30 08:13:34 +0000 Commit: Lexi Winter CommitDate: 2025-09-30 08:15:04 +0000 libstdbuf: Move to the utilities package This is a niche tool which is only useful in a small number of specific situations. It's very small (8kB), and the executable component /usr/bin/stdbuf is already in -utilities, so move the shlib to -utilities as well. MFC after: 1 day Reviewed by: bapt Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52788 --- lib/libstdbuf/Makefile | 1 - release/packages/ucl/libstdbuf-all.ucl | 39 ---------------------------------- 2 files changed, 40 deletions(-) diff --git a/lib/libstdbuf/Makefile b/lib/libstdbuf/Makefile index 102c6745c593..9e289e0018fc 100644 --- a/lib/libstdbuf/Makefile +++ b/lib/libstdbuf/Makefile @@ -1,6 +1,5 @@ .include -PACKAGE=lib${LIB} LIB= stdbuf SRCS= stdbuf.c SHLIB_MAJOR= 1 diff --git a/release/packages/ucl/libstdbuf-all.ucl b/release/packages/ucl/libstdbuf-all.ucl deleted file mode 100644 index d3e4a6a62478..000000000000 --- a/release/packages/ucl/libstdbuf-all.ucl +++ /dev/null @@ -1,39 +0,0 @@ -/* - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2012 Jeremie Le Hen - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code and documentation must retain the above - * copyright notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -comment = "Preloaded library to change standard streams initial buffering" - -desc = < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 25d551b5fb1d - main - virtual_bt_speaker(8): Do not build if WITHOUT_BLUETOOTH is set 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: 25d551b5fb1d28ed485d56d9d637993eb2d223b1 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=25d551b5fb1d28ed485d56d9d637993eb2d223b1 commit 25d551b5fb1d28ed485d56d9d637993eb2d223b1 Author: Christos Margiolis AuthorDate: 2025-09-30 09:10:01 +0000 Commit: Christos Margiolis CommitDate: 2025-09-30 09:10:01 +0000 virtual_bt_speaker(8): Do not build if WITHOUT_BLUETOOTH is set virtual_bt_speaker(8) includes bluetooth.h, which won't exist if WITHOUT_BLUETOOTH is set, which will result in a build failure. Reported by: peterj Fixes: 9cab9fde5eda ("virtual_oss: Port to base") Sponsored by: The FreeBSD Foundation MFC after: 3 days --- usr.sbin/virtual_oss/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.sbin/virtual_oss/Makefile b/usr.sbin/virtual_oss/Makefile index bf73041377b3..6c497ad71d46 100644 --- a/usr.sbin/virtual_oss/Makefile +++ b/usr.sbin/virtual_oss/Makefile @@ -1,8 +1,9 @@ .include -SUBDIR+= virtual_bt_speaker \ - virtual_oss_cmd \ +SUBDIR+= virtual_oss_cmd \ virtual_oss +SUBDIR.${MK_BLUETOOTH}+= virtual_bt_speaker + .include "Makefile.inc" .include From nobody Tue Sep 30 09:14:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbXS44Syqz68m0s; Tue, 30 Sep 2025 09:14:12 +0000 (UTC) (envelope-from christos@freebsd.org) Received: from margiolis.net (mail.margiolis.net [95.179.159.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbXS36hJZz4QY3; Tue, 30 Sep 2025 09:14:11 +0000 (UTC) (envelope-from christos@freebsd.org) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=default; bh=jPAZ4mdJ+9kX ykIifQzY+OX1Ob8JE2diHLGGM+w+XI0=; h=in-reply-to:references:to:from: subject:cc:date; d=margiolis.net; b=SNigtDPORYVcZkRPVFcCXebHuGyO1nFD2T 4CWckbNaCxYf1CB7v8gFPcijBnk54F34aKQU/GivG/Yg2NIlCmgnTJNGN475PNU9Dzxgru tXNeubDE0GmZjmSJoOxVT7TfpFBfTTTnUnDuzKM14086f/nJJUTjGA6DBY1xxnNglu4= Received: from localhost (public-gprs552949.centertel.pl [37.225.23.54]) by margiolis.net (OpenSMTPD) with ESMTPSA id 7e2e707e (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 30 Sep 2025 03:14:09 -0600 (MDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 30 Sep 2025 11:14:07 +0200 Message-Id: Cc: , , Subject: Re: git: 9cab9fde5eda - main - virtual_oss: Port to base From: "Christos Margiolis" To: "Peter Jeremy" X-Mailer: aerc 0.21.0 References: <202509280958.58S9wrww083342@gitrepo.freebsd.org> In-Reply-To: X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cbXS36hJZz4QY3 On Tue Sep 30, 2025 at 12:22 AM CEST, Peter Jeremy wrote: > On 2025-Sep-29 21:11:53 +0200, Christos Margiolis = wrote: >>On Mon Sep 29, 2025 at 11:58 AM CEST, Peter Jeremy wrote: >>> On 2025-Sep-28 09:58:53 +0000, Christos Margiolis wrote: >>>>The branch main has been updated by christos: >>>> >>>>URL: https://cgit.FreeBSD.org/src/commit/?id=3D9cab9fde5edad9b409dd2317= a2aec7815e6d6bed >>>> >>>>commit 9cab9fde5edad9b409dd2317a2aec7815e6d6bed >>>>Author: Christos Margiolis >>>>AuthorDate: 2025-09-28 09:56:52 +0000 >>>>Commit: Christos Margiolis >>>>CommitDate: 2025-09-28 09:56:52 +0000 >>>> >>>> virtual_oss: Port to base >>> >>> This fails to compile if "WITHOUT_BLUETOOTH=3Dyes" is specified (see be= low) >>> because bluetooth.h isn't available (as expected). It looks like >>> virtual_oss isn't taking that option into account when working out what >>> to compile. > ... >> >>I haven't had time to test yet, but I will try tomorrow. Does the build >>work if you build virtual_bt_speaker(8) conditionally in the Makefile >>(i.e., usr.sbin/virtual_oss/Makefile)? > > The following patch builds as expected both with and without > WITHOUT_BLUETOOTH=3Dyes > > diff --git a/usr.sbin/virtual_oss/Makefile b/usr.sbin/virtual_oss/Makefil= e > index bf73041377b3..0fc611832795 100644 > --- a/usr.sbin/virtual_oss/Makefile > +++ b/usr.sbin/virtual_oss/Makefile > @@ -1,8 +1,9 @@ > .include > =20 > -SUBDIR+=3D virtual_bt_speaker \ > - virtual_oss_cmd \ > +SUBDIR+=3D virtual_oss_cmd \ > virtual_oss > =20 > +SUBDIR.${MK_BLUETOOTH}+=3D virtual_bt_speaker=20 > + > .include "Makefile.inc" > .include Fixed: https://cgit.freebsd.org/src/commit/?id=3D25d551b5fb1d28ed485d56d9d637993eb= 2d223b1 Thanks for reporting. Christos From nobody Tue Sep 30 09:56:38 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbYP26G3jz68q0R; Tue, 30 Sep 2025 09:56:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbYP25kzqz3HyZ; Tue, 30 Sep 2025 09:56:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759226198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uL2zlZAWsqQab23P87hHFIqe0agq1wiK2saHYjlQX1Y=; b=S4oBC2dfKmu3Johrtut4HJ5OrueTUESJUD5A2D7iMmA+iVJQSYVwthSNrXrl5/SNY+9+Ba 0BGvOfmcQfEw+REhzq4rglBpgAOxSsN+QNfjf734iOtJaAW0Qxivxx0zEPqfnx/R22hDhL 0huoX+fb8hTNTq72ueUiDJaHof0HRbktPXfyrCDQatWr8I6hJxVbO2KESkTZNs44Kb8aGk 8E+FcQXlTTl/5hIskUWrCc7whJeFCey/m+P5gfRf9gpNZuOK5TNvWytTXYBO0RnX36Djv6 j1VVZBC4hGm0H+yexkpd9jlPZeIWrDV5badKrAYEjDBz99/mM9/Dy0FzLfeKGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759226198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uL2zlZAWsqQab23P87hHFIqe0agq1wiK2saHYjlQX1Y=; b=PxPiOoiC/N44CktfDnTm2sqP2BMVKLBkXhNtJ9Ovqms36sbIzdILl4XgpWjMcdYdaj4vMM E1DqfR/IolWST3CkT9eyiGobmLNEUtQGFLi/iKcwFx5xkI6+htkBvPMyQOWUs31PUKML7V dRbAUOu27SCAKrqVRXc35gJ3SLVp2Vk+qUc4sZUT7wmcKG5jyOQxZv+abbKFw26mO0SyC3 hRGNbbaqxhimTMU5GH9IHIqdWv1k7jj96+DPF081tLKTOatseMX5Hb9I4GZeu8dJNWD3eA EHPga+woLcBVcRHkkpNx34lDR82S6LUVhL7/VijnEuKgooZXBwUrcRCRKJ/IHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759226198; a=rsa-sha256; cv=none; b=VrDsBIzb9Y7BNnqoR2G+LrAK4kjvVQquJtd2ptjCf5veWg6nqTn1FodcXLnwf0RSqRPs/q 6Jv2e+8BeFK2PAWkoc0ekgSkG/a5qepRMNyKLqhMWb5HFGHUGJL861j2Oej28DP3OuWqfh 02rU2ZhcO6Vq3I0jxddxYqizifw/PyJ24oEK+Mq3t8xjYpLp5nzpWDtx5C+JwbAzrRwaSM wDkFkbHMeeT8qowlF4xaZkJStS5yvuYfeXwBWPkbq5Geb1oPNeisUIxBbrUJVJ+Y+xltml zJhmms3HetVD24nLOohXSAeEg+hfn6Byfp1uNCCQnT06ejAyg98VrChzh8Cwyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbYP25LF2zWpF; Tue, 30 Sep 2025 09:56:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58U9ucZJ014060; Tue, 30 Sep 2025 09:56:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58U9uc8P014057; Tue, 30 Sep 2025 09:56:38 GMT (envelope-from git) Date: Tue, 30 Sep 2025 09:56:38 GMT Message-Id: <202509300956.58U9uc8P014057@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 24e4dcf4ba5e - main - packages: Move ctf-tools to ctf 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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 24e4dcf4ba5e9dedcf89efd358ea3e1fe5867020 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=24e4dcf4ba5e9dedcf89efd358ea3e1fe5867020 commit 24e4dcf4ba5e9dedcf89efd358ea3e1fe5867020 Author: Lexi Winter AuthorDate: 2025-09-30 08:29:37 +0000 Commit: Lexi Winter CommitDate: 2025-09-30 09:56:09 +0000 packages: Move ctf-tools to ctf Remove the ctf-tools package. Add a new package which contains the previous contents of ctf-tools along with libctf. This removes CDDL-licensed code from the utilities package. Set LIB_PACKAGE for libctf so that DTrace runtime doesn't need to install the tools. MFC after: 1 day Reviewed by: bapt Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52776 --- cddl/lib/libctf/Makefile | 2 ++ cddl/usr.bin/ctfconvert/Makefile | 2 +- cddl/usr.bin/ctfdump/Makefile | 2 +- cddl/usr.bin/ctfmerge/Makefile | 2 +- release/packages/ucl/{ctf-tools-all.ucl => ctf-all.ucl} | 5 +++-- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/cddl/lib/libctf/Makefile b/cddl/lib/libctf/Makefile index 10854482cd21..1c605182bc1d 100644 --- a/cddl/lib/libctf/Makefile +++ b/cddl/lib/libctf/Makefile @@ -2,6 +2,8 @@ .PATH: ${SRCTOP}/cddl/contrib/opensolaris/lib/libctf/common .PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/ctf +PACKAGE= ctf +LIB_PACKAGE= LIB= ctf SRCS= ctf_create.c \ ctf_decl.c \ diff --git a/cddl/usr.bin/ctfconvert/Makefile b/cddl/usr.bin/ctfconvert/Makefile index cd9f850f480c..df53c46b7246 100644 --- a/cddl/usr.bin/ctfconvert/Makefile +++ b/cddl/usr.bin/ctfconvert/Makefile @@ -3,7 +3,7 @@ .PATH: ${SRCTOP}/cddl/contrib/opensolaris/tools/ctf/common .PATH: ${SRCTOP}/cddl/contrib/opensolaris/tools/ctf/cvt -PACKAGE= ctf-tools +PACKAGE= ctf PROG= ctfconvert SRCS= alist.c \ ctf.c \ diff --git a/cddl/usr.bin/ctfdump/Makefile b/cddl/usr.bin/ctfdump/Makefile index 23ded7458bed..357598583ae7 100644 --- a/cddl/usr.bin/ctfdump/Makefile +++ b/cddl/usr.bin/ctfdump/Makefile @@ -1,7 +1,7 @@ .PATH: ${SRCTOP}/cddl/contrib/opensolaris/tools/ctf/common .PATH: ${SRCTOP}/cddl/contrib/opensolaris/tools/ctf/dump -PACKAGE= ctf-tools +PACKAGE= ctf PROG= ctfdump SRCS= dump.c \ symbol.c \ diff --git a/cddl/usr.bin/ctfmerge/Makefile b/cddl/usr.bin/ctfmerge/Makefile index 4cd9511f911c..81bccc047a25 100644 --- a/cddl/usr.bin/ctfmerge/Makefile +++ b/cddl/usr.bin/ctfmerge/Makefile @@ -1,7 +1,7 @@ .PATH: ${SRCTOP}/cddl/contrib/opensolaris/tools/ctf/common .PATH: ${SRCTOP}/cddl/contrib/opensolaris/tools/ctf/cvt -PACKAGE= ctf-tools +PACKAGE= ctf PROG= ctfmerge SRCS= alist.c \ barrier.c \ diff --git a/release/packages/ucl/ctf-tools-all.ucl b/release/packages/ucl/ctf-all.ucl similarity index 88% rename from release/packages/ucl/ctf-tools-all.ucl rename to release/packages/ucl/ctf-all.ucl index df2955dafab5..941990908373 100644 --- a/release/packages/ucl/ctf-tools-all.ucl +++ b/release/packages/ucl/ctf-all.ucl @@ -21,7 +21,7 @@ * text is licensed under the CDDL. */ -comment = "Compact C Type Format (CTF) utilities" +comment = "Compact C Type Format (CTF)" desc = < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 3cbd1f816888 - main - package: Use correct license for clang 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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3cbd1f81688855a91f826ee4e04618ceace101ca Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=3cbd1f81688855a91f826ee4e04618ceace101ca commit 3cbd1f81688855a91f826ee4e04618ceace101ca Author: Lexi Winter AuthorDate: 2025-09-30 08:31:17 +0000 Commit: Lexi Winter CommitDate: 2025-09-30 09:56:09 +0000 package: Use correct license for clang LLVM was relicensed under Apache 2.0 with LLVM exception a while ago. MFC after: 1 day Reviewed by: bapt, imp (previous version) Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D51769 --- release/packages/ucl/clang-all.ucl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/packages/ucl/clang-all.ucl b/release/packages/ucl/clang-all.ucl index e0372940ed42..86cac409fa9e 100644 --- a/release/packages/ucl/clang-all.ucl +++ b/release/packages/ucl/clang-all.ucl @@ -25,7 +25,7 @@ This package provides the clang(1) frontend as well as related utilities for working with object files. EOD -licenses = [ NCSA ] +licenses = [ "Apache-2.0 WITH LLVM-exception" ] annotations { set = devel From nobody Tue Sep 30 10:52: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 4cbZf31nyNz68tJn; Tue, 30 Sep 2025 10:52:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbZf319hzz3R8W; Tue, 30 Sep 2025 10:52:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759229579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iZZ64ZyozRyodkrtdeEqX17lhFJli9gGYRk93FtnpJo=; b=m7thipxf/iM/BO4fczItj3mpqJdfTbPDMQAEIXa7jJCzEmQ1bgQVAMWFv+3J1AHebQuqFY L9i3Qi2Cy1im8f/BBz5vjkXzIfHhYj3yJYerZ0QPJ2TIDz6nAYHY+X9B43Ihrg/QyQA+wO 3z3q72hnQnYCB6OLgUTokqNTo5zR0xj7L4XS9GwlHCvM+B6/Gqt7LaR0xpfXO9vwQX/y3P dEmsLYzzz7jUdeMbzh7DIT1Rxv3bo8ofebbiAwQDnr38jqKkQp/4qzlye1AJLwxorg/YZk wbTm++XL2gtY0FRuM6lEh/thrWZ0w3zo6ijY0RhaiwWs0rTCaDlLouVFDy5T2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759229579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iZZ64ZyozRyodkrtdeEqX17lhFJli9gGYRk93FtnpJo=; b=MIf5kJBSQwlG7aQ6XsRzMCvjowNWsTEz5756HoFYqXpwEoI+SMSHKJDC3o6BmJJO7trJCt oBQhm/+mzN9qZ7EIyQzg2gELeYOExCm+BTrQnKbo9ZV+G4BUeN4YeUbITCFmHY725wfUrZ h/lQkDsVYYf7yWzZeCFn4qkrdwXBhv6Ncd2C4FRhDr5YMSerdDvtdLVvIkUgT9JnKj5Z3Z tar0n7kUL3wOLvVOufxK1XFDYo8Q91wDCOK6Bcn9mhW6M0cxziLTgsd3t8quAOOZk5hebq klgUho+cLJ/aFZ68XeLQd5i1gRdO3TArbV9gdSaTWm2OuO4arVQNYQRvd8fCLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759229579; a=rsa-sha256; cv=none; b=Ec+Gy+/0goxALYQErcReRFTDVGrgv5wkrLidKh4xogK0jBalcC/dqhV7fUObL2uVMMOpuJ rdQMSw2EwpI1HXUYr3T/RCh4XLbJfEzpA/KeJVuvujREIg6uVFVB+wzMjIY0Nn8YNK2Zer oEnrYT/7LIIfcEanO4zuY2uphqD5GsYTTMQN1bS98nvofeW0YtSbI000DsrIfJFDS2/2pf hHeARVOLe4zqY3CRjbn56HWF3xbg1IqyIwdaBsGlSpTjG6tU+Ji4/Z2EWmOreKSkA554I8 E8qpz5VNS5WGX0Nw3jtIflmdeoAQ5JkjEDSY+yOVCBtq5x3HD85IfF0L8hRB0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbZf30W4HzYqv; Tue, 30 Sep 2025 10:52:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58UAqxCi026268; Tue, 30 Sep 2025 10:52:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58UAqxgM026265; Tue, 30 Sep 2025 10:52:59 GMT (envelope-from git) Date: Tue, 30 Sep 2025 10:52:59 GMT Message-Id: <202509301052.58UAqxgM026265@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 2ffaca551eaf - main - snd_hda: Implement automatic redirection between associations 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: 2ffaca551eaf32c17f701762ecf29a961cf19aa4 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=2ffaca551eaf32c17f701762ecf29a961cf19aa4 commit 2ffaca551eaf32c17f701762ecf29a961cf19aa4 Author: Christos Margiolis AuthorDate: 2025-09-30 10:52:44 +0000 Commit: Christos Margiolis CommitDate: 2025-09-30 10:52:44 +0000 snd_hda: Implement automatic redirection between associations For audio to be redirected to the headphones/headset after plugging the jack, or back to the speaker/internal mic when unplugging it, the speaker and headphone pins need to be part of the same association (i.e., the same PCM device). This patch makes it possible to redirect audio even between different associations, which can reduce the need for manual pin patching. The idea is that we issue a devctl_notify() from within the jack detection callback whenever a jack is (un-)plugged to redirect audio to the appropriate device. Then the snd.conf devd script is responsible for using virtual_oss to change the playback/recording device to whatever snd_hda(4) selected. The reason for requiring virtual_oss is that it has hot-swapping support, which is necessary for jack redirection. Sponsored by: The FreeBSD Foundation MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D50070 --- sbin/devd/Makefile | 5 +++++ sbin/devd/devd.conf.5 | 16 +++++++++++++ sbin/devd/snd.conf | 23 +++++++++++++++++++ sys/dev/sound/pci/hda/hdaa.c | 53 +++++++++++++++++++++++++++++++++----------- 4 files changed, 84 insertions(+), 13 deletions(-) diff --git a/sbin/devd/Makefile b/sbin/devd/Makefile index 5d5721d16884..f65eee93dd4b 100644 --- a/sbin/devd/Makefile +++ b/sbin/devd/Makefile @@ -51,6 +51,11 @@ NVMEDIR= ${DEVDDIR} NVME+= nvmf.conf NVMEPACKAGE= nvme-tools +CONFGROUPS+= SND +SNDDIR= ${DEVDDIR} +SND+= snd.conf +SNDPACKAGE= snd + .if ${MK_USB} != "no" DEVD+= uath.conf ulpt.conf .endif diff --git a/sbin/devd/devd.conf.5 b/sbin/devd/devd.conf.5 index baf4b9d3a183..8df3e910e076 100644 --- a/sbin/devd/devd.conf.5 +++ b/sbin/devd/devd.conf.5 @@ -652,6 +652,22 @@ and for details. .El .Pp +.Bl -column "System" "Subsystem" "1234567" -compact +.Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description" +.It Li SND Ta Ta Ta +Events related to the +.Xr sound 4 +driver. +.It Li SND Ta Li CONN Ta Li IN Ta +Connected input device specified in +.Pa cdev +variable. +.It Li SND Ta Li CONN Ta Li OUT Ta +Connected output device specified in +.Pa cdev +variable. +.El +.Pp .\" .\" End of tables .\" diff --git a/sbin/devd/snd.conf b/sbin/devd/snd.conf new file mode 100644 index 000000000000..cf9cd9e94191 --- /dev/null +++ b/sbin/devd/snd.conf @@ -0,0 +1,23 @@ +# Audio redirection +notify 0 { + match "system" "SND"; + match "subsystem" "CONN"; + match "type" "IN"; + match "cdev" "dsp[0-9]+"; + + # FIXME: We are hardcoding /dev/vdsp.ctl here, simply because it is a + # common virtual_oss control device name. Until we find a proper way to + # define control devices here, /dev/vdsp.ctl can be changed to the + # control device of choice. + action "/usr/sbin/virtual_oss_cmd /dev/vdsp.ctl -R /dev/$cdev"; +}; + +notify 0 { + match "system" "SND"; + match "subsystem" "CONN"; + match "type" "OUT"; + match "cdev" "dsp[0-9]+"; + + # FIXME: See comment above. + action "/usr/sbin/virtual_oss_cmd /dev/vdsp.ctl -P /dev/$cdev"; +}; diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c index 1e486b01b168..5dbb5c4f4453 100644 --- a/sys/dev/sound/pci/hda/hdaa.c +++ b/sys/dev/sound/pci/hda/hdaa.c @@ -532,9 +532,11 @@ static void hdaa_presence_handler(struct hdaa_widget *w) { struct hdaa_devinfo *devinfo = w->devinfo; - struct hdaa_audio_as *as; + struct hdaa_audio_as *as, *asp; + char buf[32]; uint32_t res; - int connected, old; + int connected, old, i; + bool active; if (w->enable == 0 || w->type != HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) @@ -552,13 +554,6 @@ hdaa_presence_handler(struct hdaa_widget *w) if (connected == old) return; w->wclass.pin.connected = connected; - HDA_BOOTVERBOSE( - if (connected || old != 2) { - device_printf(devinfo->dev, - "Pin sense: nid=%d sense=0x%08x (%sconnected)\n", - w->nid, res, !connected ? "dis" : ""); - } - ); as = &devinfo->as[w->bindas]; if (as->hpredir >= 0 && as->pins[15] == w->nid) @@ -567,6 +562,38 @@ hdaa_presence_handler(struct hdaa_widget *w) hdaa_autorecsrc_handler(as, w); if (old != 2) hdaa_channels_handler(as); + + if (connected || old != 2) { + HDA_BOOTVERBOSE( + device_printf(devinfo->dev, + "Pin sense: nid=%d sense=0x%08x (%sconnected)\n", + w->nid, res, !connected ? "dis" : ""); + ); + if (as->hpredir >= 0) + return; + for (i = 0, active = false; i < devinfo->num_devs; i++) { + if (device_get_unit(devinfo->devs[i].dev) == snd_unit) { + active = true; + break; + } + } + /* Proceed only if we are currently using this codec. */ + if (!active) + return; + for (i = 0; i < devinfo->ascnt; i++) { + asp = &devinfo->as[i]; + if (!asp->enable) + continue; + if ((connected && asp->index == as->index) || + (!connected && asp->dir == as->dir)) { + snprintf(buf, sizeof(buf), "cdev=dsp%d", + device_get_unit(asp->pdevinfo->dev)); + devctl_notify("SND", "CONN", + asp->dir == HDAA_CTL_IN ? "IN" : "OUT", buf); + break; + } + } + } } /* @@ -6193,16 +6220,16 @@ hdaa_configure(device_t dev) device_printf(dev, "Applying direct built-in patches...\n"); ); hdaa_patch_direct(devinfo); - HDA_BOOTHVERBOSE( - device_printf(dev, "Pin sense init...\n"); - ); - hdaa_sense_init(devinfo); HDA_BOOTHVERBOSE( device_printf(dev, "Creating PCM devices...\n"); ); hdaa_unlock(devinfo); hdaa_create_pcms(devinfo); hdaa_lock(devinfo); + HDA_BOOTHVERBOSE( + device_printf(dev, "Pin sense init...\n"); + ); + hdaa_sense_init(devinfo); HDA_BOOTVERBOSE( if (devinfo->quirks != 0) { From nobody Tue Sep 30 11:21:29 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbbGx4Kdwz68xLG; Tue, 30 Sep 2025 11:21:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbbGx3dq0z3mtl; Tue, 30 Sep 2025 11:21:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759231289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lJHPPEaNxINv6BoguWwWkFWVKHWYkuOSxZz/3ACL+k0=; b=CMtU+zSirKPWilPU+05Ne2LrAZn1kiDJ6H67vwvDNeWxIDw7XUi0QGXWTO12K3528fgCk2 kM3+0y3xCzeXRDIzsbg/jCXxlmyW51Xcu4gEFtY6AadAzzoKC//f6BxXWu4n01+PJXFz77 tSXjEwDFw8pmULaw+ivfYw0Z1rJyjSlFA5c2jyWLQHplItzY1rhH9A4yOTufuLQt3hbOzb SI1gjIisvCWjF9Qy8Im9TjNrpVp0OM+F6UYkCuZxVw1xzyOMm/iBajt+kpYKRoqDE3JZhV PSm58BCXkVxaDlco9ZZIX+0AhyDyVPWkw6IwKq5PUd+rBtbKG8/wB+5HFFrLhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759231289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lJHPPEaNxINv6BoguWwWkFWVKHWYkuOSxZz/3ACL+k0=; b=ngZDeaZkulcutJO4aNzyU6WdfsR+HQPMO0Ue1PnEFoIefl3ItBhyijM1jEKMfL9n3shv5D xKqPMwIrsVB5LQcKLM+9tQ91swGW0oAOzYYU0MraM4u0lwz3+mAWp8WXyuUZP2GabHnC7B MiYub26RVipBkxrBIhgaVH9cXbVFeJN6QHJdwoeyw6zXdZiizHIYBDzuIGsaGM/PeF4yWc +RGf/31unsUSE2Ng8TTTh0IMDfZn18LWdbJ0yRackX/qGb7S463GGMmPJhtDk1N08NLAry gL+u+LhSBGz2nHiFBPAPCScXLDvyBA87EeviUGXjfcIB/PrV1bbkwsE/CkdYIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759231289; a=rsa-sha256; cv=none; b=r8bSmQHoh3AU54reE4JH+24r9lVTIT2X1Cy4NMTuI0W29UM0ijae+wP89JGsUuIu2GHhLu Dpiw3uuSnwnkXWB9c8yeA4KYwZb8Put4kn//fghK5O8nRVISDX2APjsWwzRJPfHQIxEIy9 cHTdbIUEG1tlPkdjWMZXgQrqLmWid6KjF02NIEvVyFTGrWMwLZRPM4ToJIrpqthqS48C7K sG8Fifi71/yKEzv88p9bgTipNt/oJawem1EgZLnuUYKbBeK6FVlK/wqavfTJD5e3tlR9cP LlFYdIy1Qwd5YeBw8vQdZSIMuJYXfaL/uKqPy35ST6L6vqJ/lGxNtPipL9vyaQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbbGx396ZzZjD; Tue, 30 Sep 2025 11:21:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58UBLTIX087915; Tue, 30 Sep 2025 11:21:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58UBLTBc087912; Tue, 30 Sep 2025 11:21:29 GMT (envelope-from git) Date: Tue, 30 Sep 2025 11:21:29 GMT Message-Id: <202509301121.58UBLTBc087912@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ahmad Khalifa Subject: git: fa26e445544e - main - gpioc: allocate priv->events with the correct size 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: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa26e445544eb88f05779258e2ab9c96384fe74d Auto-Submitted: auto-generated The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=fa26e445544eb88f05779258e2ab9c96384fe74d commit fa26e445544eb88f05779258e2ab9c96384fe74d Author: Ahmad Khalifa AuthorDate: 2025-09-30 11:09:28 +0000 Commit: Ahmad Khalifa CommitDate: 2025-09-30 11:20:25 +0000 gpioc: allocate priv->events with the correct size MFC after: 1 day --- sys/dev/gpio/gpioc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/gpio/gpioc.c b/sys/dev/gpio/gpioc.c index 5a60f939dc78..b56fe6b4c37f 100644 --- a/sys/dev/gpio/gpioc.c +++ b/sys/dev/gpio/gpioc.c @@ -704,7 +704,7 @@ gpioc_open(struct cdev *dev, int oflags, int devtype, struct thread *td) * npins isn't a horrible fifo size for that either. */ priv->numevents = priv->sc->sc_npins * 2; - priv->events = malloc(priv->numevents * sizeof(struct gpio_event_detail), + priv->events = malloc(priv->numevents * sizeof(struct gpioc_pin_event), M_GPIOC, M_WAITOK | M_ZERO); priv->evidx_head = priv->evidx_tail = 0; @@ -925,7 +925,7 @@ gpioc_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, free(priv->events, M_GPIOC); priv->numevents = evcfg->gp_fifo_size; priv->events = malloc(priv->numevents * - sizeof(struct gpio_event_detail), M_GPIOC, + sizeof(struct gpioc_pin_event), M_GPIOC, M_WAITOK | M_ZERO); priv->evidx_head = priv->evidx_tail = 0; } From nobody Tue Sep 30 11:21:30 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbbGy5vgyz68x9M; Tue, 30 Sep 2025 11:21:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbbGy4prgz3mtn; Tue, 30 Sep 2025 11:21:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759231290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6qqvGwVxE6iIXMbkAAzQGXc/f8tiGA8wyk5/xfwwqAY=; b=ZkjOI3hukak7FfQQKp2PBfObWY3Xg5sun2fz0pKjyVE/MFj9ZP2uRhxpNwA0L/TkM4+9qG QQU1Ps3AYT6oNM8aem3ztckfW987csXIkXH6QQ7htiVXy5gQP87g7k8jK8u7Nm8s0TbFsQ +orZDA6rmXlrQeJ4RyESX2wIwAZB7HO2mXRSfhULO61cgng1oORyYYgRgB2l04qWGnbdyW RJtUBAxC7VD+N1J+5fw6i3Wuav9tlxaVD/xbcxO6rzJBMX19zMd06SktBzQJOImsTTL+t6 wWgZrr1PF8fXD+XR2C+T3NSXAT5W6q+BvTzyhgzkGvKOU2nHbRgDM7lXqBiyAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759231290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6qqvGwVxE6iIXMbkAAzQGXc/f8tiGA8wyk5/xfwwqAY=; b=DyRr8qXDgezu+r90QA0xjwzJOWqqkkqk/F/VttRcWSRNTNBSBYP2Lzbu7iOvWcdArLWZcE uKUTqiPWEkfYkgkR9uTrW1+d96gOyKzL9sDD0fnRbH/MoUvG63gPOQ2Wp3B/m7RwuQtyua 0PPdtBeoTTxsEiAtUNQQmw+a41ZaCCtX6z4Q9IkZG2DWUzVSDwg2C9buOdjHw16/u10oqc AZDz51cHzKusctmRNo9Xml1pNWNplVcp1WtG7Qv8e6XK08qA16CSJxTEH8iTC+INvMV+pR am5nG14xTH3RpPCzik4UfpMRINX6kqWIozK5BMfQSHC5GGPEytJwkJOh3EsG7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759231290; a=rsa-sha256; cv=none; b=UTTA70C7hs4oc2475hepF9dfyyGtMxjKjT1rAOKBASEr2iWKSWd6WEpbBox689mAMpZZj/ ZTqC+Dq2kpcyJ2V1rRnpcN9/XtZc0zBf2HQ9yHBDOAtV/+Gv48/MfNf/k1rQv5rg65VUp8 qZCyYjW75vqoXKgK14NiRUtNtar3PfEGKl1AwOvLY2bbqojIZHpcV/HNMNq8jlNWfBHdgV nsB0Lgbo8zypF+UeAnK6HqViazNpB9oozY0T3luwcaPWhRYY5a0tK4+fnEIvYqNVNoNPDX OY4r8U5L56MVr30G9XyTSmVNZzUH02cXuoVYM6bnc7uMU53GsqhHM/DkZda+Sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbbGy4N4mzZjF; Tue, 30 Sep 2025 11:21:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58UBLUuA087951; Tue, 30 Sep 2025 11:21:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58UBLUV6087948; Tue, 30 Sep 2025 11:21:30 GMT (envelope-from git) Date: Tue, 30 Sep 2025 11:21:30 GMT Message-Id: <202509301121.58UBLUV6087948@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ahmad Khalifa Subject: git: d000adfe41e6 - main - gpioc: fix race in ioctl(GPIOCONFIGEVENTS) 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: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d000adfe41e6f2fe8f3dbe92d8fc2d34ae882086 Auto-Submitted: auto-generated The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=d000adfe41e6f2fe8f3dbe92d8fc2d34ae882086 commit d000adfe41e6f2fe8f3dbe92d8fc2d34ae882086 Author: Ahmad Khalifa AuthorDate: 2025-09-30 11:09:50 +0000 Commit: Ahmad Khalifa CommitDate: 2025-09-30 11:20:25 +0000 gpioc: fix race in ioctl(GPIOCONFIGEVENTS) A race can occur in gpioc_ioctl when it is called with GPIOCONFIGEVENTS closely followed by GPIOSETCONFIG. GPIOSETCONFIG can alter the priv->pins list, making it no longer empty and opening the door for access to priv->events while we are reallocating it. Fix this by holding priv->mtx while handling GPIOCONFIGEVENTS. Reported by: Qiu-ji Chen PR: 289120 Reviewed by: mmel MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D52783 --- sys/dev/gpio/gpioc.c | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/sys/dev/gpio/gpioc.c b/sys/dev/gpio/gpioc.c index b56fe6b4c37f..9b297bcb1a77 100644 --- a/sys/dev/gpio/gpioc.c +++ b/sys/dev/gpio/gpioc.c @@ -793,6 +793,7 @@ gpioc_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, struct gpio_access_32 *a32; struct gpio_config_32 *c32; struct gpio_event_config *evcfg; + struct gpioc_pin_event *tmp; uint32_t caps, intrflags; switch (cmd) { @@ -908,27 +909,35 @@ gpioc_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, res = devfs_get_cdevpriv((void **)&priv); if (res != 0) break; - /* If any pins have been configured, changes aren't allowed. */ - if (!SLIST_EMPTY(&priv->pins)) { - res = EINVAL; - break; - } if (evcfg->gp_report_type != GPIO_EVENT_REPORT_DETAIL && evcfg->gp_report_type != GPIO_EVENT_REPORT_SUMMARY) { res = EINVAL; break; } - priv->report_option = evcfg->gp_report_type; /* Reallocate the events buffer if the user wants it bigger. */ - if (priv->report_option == GPIO_EVENT_REPORT_DETAIL && + tmp = NULL; + if (evcfg->gp_report_type == GPIO_EVENT_REPORT_DETAIL && priv->numevents < evcfg->gp_fifo_size) { - free(priv->events, M_GPIOC); - priv->numevents = evcfg->gp_fifo_size; - priv->events = malloc(priv->numevents * + tmp = malloc(priv->numevents * sizeof(struct gpioc_pin_event), M_GPIOC, M_WAITOK | M_ZERO); + } + mtx_lock(&priv->mtx); + /* If any pins have been configured, changes aren't allowed. */ + if (!SLIST_EMPTY(&priv->pins)) { + mtx_unlock(&priv->mtx); + free(tmp, M_GPIOC); + res = EINVAL; + break; + } + if (tmp != NULL) { + free(priv->events, M_GPIOC); + priv->events = tmp; + priv->numevents = evcfg->gp_fifo_size; priv->evidx_head = priv->evidx_tail = 0; } + priv->report_option = evcfg->gp_report_type; + mtx_unlock(&priv->mtx); break; case FIONBIO: /* From nobody Tue Sep 30 12:05: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 4cbcFL6Nk7z690vl; Tue, 30 Sep 2025 12:05: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 4cbcFL5l1Lz3sjc; Tue, 30 Sep 2025 12:05:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759233910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZorlN4heJ/0iKKvzGlRb1QHx5bIQRk4dcDwGSLe0BTM=; b=FEYOuNYTxJf7G+rHHx6QP7yKKwl8qlwavVPUOvszJRIkP/71FL4KdMfpDhDg6Rfw/yxsWc IqL2GB6PejjZnyxEgXjDoPtgXcxk7QdG7inRk3VLWXXgWXOWGPLqhz9/ZdpMbbR+05QaK9 7PXliEFXJcDAnnUhbnR1YvSw5WFCNnr3aJlLYf51xZodw74q+e/miBoy3KleMJsvZJuYc/ nPdbhy1GjJvsRqRHcF3NMvT4KQsGLPyGG/Oqz1GbnmiePWZIkyEDTDPgTstAq7w9RfOe1P D0WWupsv0Y06r6oiDx5m5vbuqDOgqXLpr125FU3tRGBvZITjt2qaSp5Gan4AUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759233910; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZorlN4heJ/0iKKvzGlRb1QHx5bIQRk4dcDwGSLe0BTM=; b=WAxBHWKmvtgP4Wzq3L2ZNrrhia0kJ8wdoqy3yPjpai8SFJbWcjhK5a2sc9tIBMSDdfZU2d I4MMXiwmsyI6rDEncQhDTr4z6RS95ZAdRp5lyBxgoJQrBZBkeoLT6C2aIQWYYwlhU/Ekmk Mh5J5BbyxbKEO9w2Mh5kRx2EywM6/31Aycp1oIrPL3W2uRpKgwoRV2y2T1wKPV4IRoOfzK biaZNV8d12Xy1TfGPGm6qBoNF2fSmXX+gSXp1tUS1tjDa7QjzNipmQ0mIf/qbG5jsNqAQx DPzTVSbj6vEdM7fCJuh632Nsmzyoj/tG/UCZhu+Qnz+ymnzOqlXkOeGwaufBWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759233910; a=rsa-sha256; cv=none; b=hZK6a25+F1Lv0wVyk0tuKDdTDVatiBCgP/d9/ZZGnvxnScnNFNoqwAZ/VppZJMKUFN0gGC zDRuuRPjwgiQw2QuW3zg3D6vX3YDkTqmtoWAWovY2PSNohsWxFd1KwSoYC5y5kBE21gLo/ jgpwqH9lwwGE0HOOFzOg7eyYIDQpXfd/pgjRkd6oD9SFABVY1wAx93vN8EJ/nBPPfXufjL m28COAGgX+Sae8a/njVNIT3EKBABCpvGNvvDsvhmSkiRwnmjyOhHePjnhBQZTR2htGRlwf c8DohfgZ+/FmBT1bvd/k7N/7uWAx22oDDP2dSHrdVQ+BEfe43MwGoQja0Qp/qQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbcFL59BQzcT8; Tue, 30 Sep 2025 12:05:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58UC5AUG068761; Tue, 30 Sep 2025 12:05:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58UC5AVb068758; Tue, 30 Sep 2025 12:05:10 GMT (envelope-from git) Date: Tue, 30 Sep 2025 12:05:10 GMT Message-Id: <202509301205.58UC5AVb068758@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ahmad Khalifa Subject: git: 2679636b4412 - main - gpioc: allocate new fifo size 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: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2679636b4412927242e46d3806fbb58e2702eddb Auto-Submitted: auto-generated The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=2679636b4412927242e46d3806fbb58e2702eddb commit 2679636b4412927242e46d3806fbb58e2702eddb Author: Ahmad Khalifa AuthorDate: 2025-09-30 11:55:34 +0000 Commit: Ahmad Khalifa CommitDate: 2025-09-30 12:02:05 +0000 gpioc: allocate new fifo size This slipped through after I resolved some merge conflicts. Fixes: d000adfe MFC after: 1 day --- sys/dev/gpio/gpioc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/gpio/gpioc.c b/sys/dev/gpio/gpioc.c index 9b297bcb1a77..6c6f79227166 100644 --- a/sys/dev/gpio/gpioc.c +++ b/sys/dev/gpio/gpioc.c @@ -918,7 +918,7 @@ gpioc_ioctl(struct cdev *cdev, u_long cmd, caddr_t arg, int fflag, tmp = NULL; if (evcfg->gp_report_type == GPIO_EVENT_REPORT_DETAIL && priv->numevents < evcfg->gp_fifo_size) { - tmp = malloc(priv->numevents * + tmp = malloc(evcfg->gp_fifo_size * sizeof(struct gpioc_pin_event), M_GPIOC, M_WAITOK | M_ZERO); } From nobody Tue Sep 30 12:22: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 4cbccm6qVwz691pn; Tue, 30 Sep 2025 12:22: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 4cbccm6G1fz3w8H; Tue, 30 Sep 2025 12:22:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759234920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qvlh2FfL++vzg0aAOyQt4EfLGfbgUB7oLucRaaKE8To=; b=QjCnUwObb6od4/ZqetbwfzpL1YLD/7HK5lYHc06n2+YgmNXbEhRjDozC2ftSz4qYleqYoE h5qqvp8emkICAVtpGyULWG1Oo2UShWHxy+Jv6PVQi4xUdCxnn+HsNdyZRXYhDh9AZOz5fh ghAGe8UZjQPHWV6Vqo1RF24/gcRQlLIg1Rs9ECaPzDrFfM2DwADJnvn27dyNxclRXBHfRL 5oGqxYOvkDMb2ydja379mSg0+GAfdL8jf6EA+G0uM3Y/5WroKeSesphWfkZMAH8pHEjfiy JyFCV4bJTjr70jihYkv0cv2G3N1sdD7ex2OZGWwlTVuVOizDU7UhdfWVvciHqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759234920; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qvlh2FfL++vzg0aAOyQt4EfLGfbgUB7oLucRaaKE8To=; b=aycIb8TaFRZ3wRldRfCa3NcEbaM2uwW30nADte2p0BXNxiArNN2yQxs/kyXVSiHyp3bvEn 0Vi+ALjYBHJMpG0hiW6hzI1ZRoEsiseql07Y6jKur6AFFi7K8jCPevp21bqZzxYS+kxQhv 19RGIbb11Po5kCbuJCWVZsiZ30c9pLijvEju6RKli+y873h59U1jRIRsen2T5oZbio94Oe pmwAhye1ntdeBiX8+LExzRGJod4azQSE9A3QC4c7mQv55zXzWfNQsBb/kLMuCSEFjpIJk5 7fOaEcQShWs5FWUiSgklNuBGvb434EFh08b1XtpyCwvRGso0UiEgyahRS6neEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759234920; a=rsa-sha256; cv=none; b=qn5wGdjYW/E4g8M0I6VrUb0IM3zxl/h9rzIYgLMdmYrdUmKGjZtNpTrSsl/rSkwaTj4uMX SN+rfdukVX0RPb3tucK5UHxeGAOy7Ly9GxXLitH5B17gKRorG+K0N5P25RSKOYCyTs4JWA 8Q/2HLcWXnme6u2lPzNRZLQge2s8ZodbSalsM9pp3Gs7XbGZt43gIMvvbME5EiIOz5FaMJ GKxhk4UTFkVug4q2rB8DvJtbO7gCi5oGTOnIGNaZEBkyVBWXIX9Z0IVhftbfSpUGnB42l2 /m1UC+mimdZX4oGKYwPZFtSJT2cwWxOYV//7UC/dOo6vZ4gzXPcPojKyGARnfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbccm5sB2zcyg; Tue, 30 Sep 2025 12:22:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58UCM0Jt003916; Tue, 30 Sep 2025 12:22:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58UCM0MP003913; Tue, 30 Sep 2025 12:22:00 GMT (envelope-from git) Date: Tue, 30 Sep 2025 12:22:00 GMT Message-Id: <202509301222.58UCM0MP003913@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 06afa0a55e0a - main - pkgbase: move ncurses into its own package 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 06afa0a55e0acc00823f08fe17305df13502f235 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=06afa0a55e0acc00823f08fe17305df13502f235 commit 06afa0a55e0acc00823f08fe17305df13502f235 Author: Kyle Evans AuthorDate: 2025-09-30 12:21:33 +0000 Commit: Kyle Evans CommitDate: 2025-09-30 12:21:33 +0000 pkgbase: move ncurses into its own package Pushing ncurses into clibs adds extra upgrade risk to a package that otherwise consists of integral libs with non-trivial interdependencies. Adding it to -runtime was considered, but the move was historically motivated to some extent by allowing a much smaller set of base libs to be installed for smaller VM images that don't really need all of the runtime package. This also fixes the ncurses build to ensure that libmenuw is grouped with the rest of the ncurses libraries, which doesn't seem to have been an intentional omission. Reviewed by: ivy MFC after: 2 days (pkgbase movement) Differential Revision: https://reviews.freebsd.org/D52786 --- lib/ncurses/Makefile.inc | 1 + lib/ncurses/form/Makefile | 1 - lib/ncurses/ncurses/Makefile | 1 - lib/ncurses/panel/Makefile | 1 - lib/ncurses/tinfo/Makefile | 1 - release/packages/ucl/ncurses-all.ucl | 39 ++++++++++++++++++++++++++++++++++++ 6 files changed, 40 insertions(+), 4 deletions(-) diff --git a/lib/ncurses/Makefile.inc b/lib/ncurses/Makefile.inc index f2ed84e2e38f..eea49908474c 100644 --- a/lib/ncurses/Makefile.inc +++ b/lib/ncurses/Makefile.inc @@ -1,5 +1,6 @@ # This is to include src/lib/Makefile.inc +PACKAGE?= ncurses WARNS?= 3 .include "../Makefile.inc" diff --git a/lib/ncurses/form/Makefile b/lib/ncurses/form/Makefile index d4774a5f51a8..7d8963b05ae8 100644 --- a/lib/ncurses/form/Makefile +++ b/lib/ncurses/form/Makefile @@ -3,7 +3,6 @@ SRCDIR= ${NCURSES_DIR}/form -PACKAGE= clibs LIB= formw SHLIB_MAJOR= 6 diff --git a/lib/ncurses/ncurses/Makefile b/lib/ncurses/ncurses/Makefile index 512a452ad6d0..b60760281b39 100644 --- a/lib/ncurses/ncurses/Makefile +++ b/lib/ncurses/ncurses/Makefile @@ -1,4 +1,3 @@ -PACKAGE= clibs SHLIBDIR?= /lib .include diff --git a/lib/ncurses/panel/Makefile b/lib/ncurses/panel/Makefile index a51129df42e3..dfb478aa5f5b 100644 --- a/lib/ncurses/panel/Makefile +++ b/lib/ncurses/panel/Makefile @@ -3,7 +3,6 @@ SRCDIR= ${NCURSES_DIR}/panel -PACKAGE= clibs LIB= panelw SHLIB_MAJOR= 6 diff --git a/lib/ncurses/tinfo/Makefile b/lib/ncurses/tinfo/Makefile index 476df54bb72a..8f01557edaee 100644 --- a/lib/ncurses/tinfo/Makefile +++ b/lib/ncurses/tinfo/Makefile @@ -1,4 +1,3 @@ -PACKAGE= clibs SHLIBDIR?= /lib .include diff --git a/release/packages/ucl/ncurses-all.ucl b/release/packages/ucl/ncurses-all.ucl new file mode 100644 index 000000000000..ded994ebb3aa --- /dev/null +++ b/release/packages/ucl/ncurses-all.ucl @@ -0,0 +1,39 @@ +/* + * Copyright 2018-2023,2024 Thomas E. Dickey + * Copyright 1998-2017,2018 Free Software Foundation, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, distribute with modifications, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name(s) of the above copyright + * holders shall not be used in advertising or otherwise to promote the + * sale, use or other dealings in this Software without prior written + * authorization. + */ + +comment = "ncurses terminal control library" +desc = < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 5e4e12ae64b3 - main - pkgbase: move libedit into the -runtime package 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5e4e12ae64b3e0377984d22610a6b3d6ccd6cee6 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=5e4e12ae64b3e0377984d22610a6b3d6ccd6cee6 commit 5e4e12ae64b3e0377984d22610a6b3d6ccd6cee6 Author: Kyle Evans AuthorDate: 2025-09-30 12:21:34 +0000 Commit: Kyle Evans CommitDate: 2025-09-30 12:21:34 +0000 pkgbase: move libedit into the -runtime package libedit isn't as foundational as the rest of -clibs, but various bits of -runtime do need it. Give it a new home over in -runtime. This also fixes the libedit build to group the readline bits into the same package as the libedit that implements them. Reviewed by: ivy MFC after: 2 days (pkgbase movement) Differential Revision: https://reviews.freebsd.org/D52787 --- lib/libedit/Makefile | 3 +-- lib/libedit/Makefile.inc | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libedit/Makefile b/lib/libedit/Makefile index f0254c1f42bc..c7a54253dae9 100644 --- a/lib/libedit/Makefile +++ b/lib/libedit/Makefile @@ -1,7 +1,5 @@ # $NetBSD: Makefile,v 1.56 2016/03/02 19:24:20 christos Exp $ -PACKAGE=clibs - EDITDIR= ${SRCTOP}/contrib/libedit .PATH: ${EDITDIR} @@ -93,6 +91,7 @@ tc1.o: ${EDITDIR}/TEST/tc1.c test: tc1.o libedit.a ${DPADD} ${LIBTERMCAP} ${CC} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} libedit.a ${LDADD} +.include "Makefile.inc" .include CWARNFLAGS.chartype.c= ${NO_WUSE_AFTER_FREE} diff --git a/lib/libedit/Makefile.inc b/lib/libedit/Makefile.inc new file mode 100644 index 000000000000..9ec65b0d266f --- /dev/null +++ b/lib/libedit/Makefile.inc @@ -0,0 +1 @@ +PACKAGE?=runtime From nobody Tue Sep 30 12:53:35 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbdKC5DTXz693jH; Tue, 30 Sep 2025 12:53:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbdKC2rlWz41bC; Tue, 30 Sep 2025 12:53:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759236815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TLLSgMYd5kIaJA/hubv3NqxWoOdZ2IR6bRa111snVYw=; b=q2rJuNcRR9AskHnjzP7Swf18QxQ3ec0wHHKYE2MnRegIjjXyH+3nkW/W1M5tb+SWE8p7HD SKdrj2kRWrNJIe9pifdtiJpaKZ4oPZjMCr++QF3h8RwHq6vh69GeyRuz8+dpTyoq3PCKTu /pA73iUvAQ7gOED6TsTnTGz0ue4QU27l+th4KMP3b9QbvPGtuX/xCtlTGcyZmG0dJ29Atd HkMyZd0BY/RHX9RpBdtzYNVWL7jik8lVoYnaU9R2ea6TTBZbTrRq5m8R/eQJVVknFu3Mda ypUz2z47Ng0HM879ObWcFKatkFAyT7QY4aKd2T20VgNuXDIjOqXF+P7wA33jcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759236815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TLLSgMYd5kIaJA/hubv3NqxWoOdZ2IR6bRa111snVYw=; b=Z8y+wVMqwK3Sshvn1P4PEKaPaQc/Fg0GlkWVr7kCQDgtPaY9uQm8FMq1RbbrEHoQoCbgZB zLAk3HKez/p0yQyOZuWSWMcUqulPszL3T3tWTiZz5z83DBi7bF6Rcnt4cEs8RL+jjYeXTv xcI4CZh4CJBxvzWIdKstXcKoMJNhh7YvYqmWpSCwDfDFkzVhsBaXODTFh81sc7pRambViy NqQTEoC2wKarjjnM8jpWN4ZRf8y4Iawc8armGpBJjlxZSu+3ystTuqIHnp144EtN7trPjh tYOnDzZImbB7LHhZfJKT/96h0AFW7YT6U/noutVt3O6tSenhByFlNGdMKXPaOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759236815; a=rsa-sha256; cv=none; b=O5rQGxUNaaSR2EG89spgwW2l70HY3/MIcnyTvdCJYrKjmNFpOv8s0cWX08YVl1OoJQZzQB G0p/whxgio983BfAGJzhofHJZ7sajKRw+1decyp1n/8bscod9DKAQeYH/8I0YV10jcAvBE WfVsvoIONRdholtcYaHrbqjvr1FRKgbAjRrYGlEjgJmkkxDw1zEwaK2MVkxekBG7JpFTP7 6UsQLWTAYMJLS2MWaHlJtY1yuSkw/Veds1SwJq1jmKJFXnCG27MoUnPX6iWtj2anz0iqtu JLXFvXoal5udUGqkbUNOcJUlnUGtSTj683ac69NnaUxoeafHcVR+5duY1cXP3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbdKC2CcmzdD8; Tue, 30 Sep 2025 12:53:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58UCrZEc061726; Tue, 30 Sep 2025 12:53:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58UCrZSw061723; Tue, 30 Sep 2025 12:53:35 GMT (envelope-from git) Date: Tue, 30 Sep 2025 12:53:35 GMT Message-Id: <202509301253.58UCrZSw061723@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 2213e158886f - main - atf_python: allow test scripts to pass jail options List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2213e158886f72f45f288c94069a9a40c4f334ed Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2213e158886f72f45f288c94069a9a40c4f334ed commit 2213e158886f72f45f288c94069a9a40c4f334ed Author: Kristof Provost AuthorDate: 2025-09-27 14:38:19 +0000 Commit: Kristof Provost CommitDate: 2025-09-30 12:53:17 +0000 atf_python: allow test scripts to pass jail options Test scripts based on atf_python can now pass jail command options via the 'opts' key in the 'vnetX' key of TOPOLOGY. Reviewed by: melifaro MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D52761 --- tests/atf_python/sys/net/vnet.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/atf_python/sys/net/vnet.py b/tests/atf_python/sys/net/vnet.py index c96eb5d671fc..f75a3eaa693e 100644 --- a/tests/atf_python/sys/net/vnet.py +++ b/tests/atf_python/sys/net/vnet.py @@ -283,14 +283,15 @@ class VnetFactory(object): time.sleep(0.1) return not_matched - def create_vnet(self, vnet_alias: str, ifaces: List[VnetInterface]): + def create_vnet(self, vnet_alias: str, ifaces: List[VnetInterface], opts: List[str]): vnet_name = "pytest:{}".format(convert_test_name(self.topology_id)) if self._vnets: # add number to distinguish jails vnet_name = "{}_{}".format(vnet_name, len(self._vnets) + 1) iface_cmds = " ".join(["vnet.interface={}".format(i.name) for i in ifaces]) - cmd = "/usr/sbin/jail -i -c name={} persist vnet {}".format( - vnet_name, iface_cmds + opt_cmds = " ".join(["{}".format(i) for i in opts]) + cmd = "/usr/sbin/jail -i -c name={} persist vnet {} {}".format( + vnet_name, iface_cmds, opt_cmds ) jid = 0 try: @@ -421,7 +422,10 @@ class VnetTestTemplate(BaseTest): idx = len(iface_map[iface_alias].vnet_aliases) iface_map[iface_alias].vnet_aliases.append(obj_name) vnet_ifaces.append(iface_map[iface_alias].ifaces[idx]) - vnet = vnet_factory.create_vnet(obj_name, vnet_ifaces) + opts = [] + if "opts" in obj_data: + opts = obj_data["opts"] + vnet = vnet_factory.create_vnet(obj_name, vnet_ifaces, opts) vnet_map[obj_name] = vnet # Allow reference to VNETs as attributes setattr(self, obj_name, vnet) From nobody Tue Sep 30 12:53: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 4cbdKD4Xwhz69486; Tue, 30 Sep 2025 12:53:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbdKD3w0lz41dq; Tue, 30 Sep 2025 12:53:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759236816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aCTMMjHC1qQk6GB3DE37sXNFfveZYMc+7NMI2GnHvlE=; b=LvpjEBatiO4Hf4wBYi5SZ3qSWmwPeFT678LudIxXbNoXmYW2UNDBND5rjvdIpcX+hJpM9Y v/CKn70dZGmEEy78Vj19EBDaz2SlPViNqRRJI2LOexDBQnlieiA24Bq+6y4z8AkXc44umN upaVzMd3ZNSkzLNx0JDBl34/x5NhRNXvvphttd+CP3D5u66xptC3eKt3lWyuFw0WuKPiA9 eHdrVfoWm1abANeKt2A8fhDux9seUj3AgJBylU1HfYjF/2TaXx8xtFVI8pv48QE3I7d8wp 5duJCwLC/Ad1LbReQFOxbFljBYSAC+AmD9i2pZLUqZFPgqETfolf2H14Do1TAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759236816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aCTMMjHC1qQk6GB3DE37sXNFfveZYMc+7NMI2GnHvlE=; b=gisXDH27t2tNJVl3fToEjK5GkXtmGabNbXrZ5tNiOYHhLl6AQ1Lv+rR4matM08JrdPZqJk uTRyHpfuSYkvxCfDVCZ724sSPLLEY3a77KeBjnfRkkWnT9JcQ3Qw6hcoMM3MedcCeZx3iu 1npKcD4Xl64PijGnCcBgi1LEXVZ6hHNVhU7DZqydN4h0q4DE/eNMN/SktTLsCKLyO0MJrs bwUGnVDcaDDB7SMKy3fT44W8eew0XkUKFo2YZ/4XGhy22a4t6UglTUiIm8VOR/gxVYVNCw NjSJoQL7uLo281kBnLSdNMm7GL+Tto/l1qpmI4ywtubE12XEhbAbN0iPYaw1Ew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759236816; a=rsa-sha256; cv=none; b=y1g8/eFDFltdHkGxo+CHzcBXyyAv0cjw3sH+cUASZ8qFMlfAxJAvEA7EToKVuTDOanXMbr 1ZXTblqhuxAGQtMFlCIgaHpwJfG6ufphBYQkg6JFmzTAjrCuw5hdyLw+h7VtSCDz0SKcH1 h4QXu7PjG03mPYnjhHRbUzrtXRmWiZYFDNzr9VPNSb4F1m7cYwPqRAVgbaSRO7boXTz4RU 8mlVQeQC8oPf3Wemgwoi1kpMqC6kH9lwYQAY7V6sP4bIKTY1S3Le/xtQg+sYrFJaXhvvDP URYdmHTepCklmNOSgUi5XLwN6BH2eCzqg0kxPTl93IQHwR3y8C7ShVM4bMn2og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbdKD39hzzdMl; Tue, 30 Sep 2025 12:53:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58UCraB7061763; Tue, 30 Sep 2025 12:53:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58UCraB0061760; Tue, 30 Sep 2025 12:53:36 GMT (envelope-from git) Date: Tue, 30 Sep 2025 12:53:36 GMT Message-Id: <202509301253.58UCraB0061760@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: a57f6ce4792f - main - pf tests: fix intermittent mld test failures List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a57f6ce4792f12bebdbe3e46d6d9d39da10055db Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a57f6ce4792f12bebdbe3e46d6d9d39da10055db commit a57f6ce4792f12bebdbe3e46d6d9d39da10055db Author: Kristof Provost AuthorDate: 2025-09-27 14:41:30 +0000 Commit: Kristof Provost CommitDate: 2025-09-30 12:53:21 +0000 pf tests: fix intermittent mld test failures We can't reliably check for the absence of replies to our MLD queries (because a host may announce its multicast subscriptions), so enable pf logging and check for the relevant error message instead. PR: 289821 MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D52762 --- tests/sys/netpfil/pf/Makefile | 2 +- tests/sys/netpfil/pf/mld.py | 35 +++++++++++++++-------------------- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index 99500fc90806..b363e0b17c76 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -72,7 +72,7 @@ ATF_TESTS_PYTEST+= tcp.py # Allow tests to run in parallel in their own jails TEST_METADATA+= execenv="jail" -TEST_METADATA+= execenv_jail_params="vnet allow.raw_sockets" +TEST_METADATA+= execenv_jail_params="vnet allow.raw_sockets allow.read_msgbuf" ${PACKAGE}FILES+= \ bsnmpd.conf \ diff --git a/tests/sys/netpfil/pf/mld.py b/tests/sys/netpfil/pf/mld.py index d118a34c8a7d..b3ef6c21b3de 100644 --- a/tests/sys/netpfil/pf/mld.py +++ b/tests/sys/netpfil/pf/mld.py @@ -32,23 +32,22 @@ from atf_python.sys.net.vnet import VnetTestTemplate class TestMLD(VnetTestTemplate): REQUIRED_MODULES = [ "pf" ] TOPOLOGY = { - "vnet1": {"ifaces": ["if1"]}, + "vnet1": {"ifaces": ["if1"], "opts": ["allow.read_msgbuf"]}, "vnet2": {"ifaces": ["if1"]}, "if1": {"prefixes6": [("2001:db8::2/64", "2001:db8::1/64")]}, } def vnet2_handler(self, vnet): ifname = vnet.iface_alias_map["if1"].name - #ToolsHelper.print_output("/sbin/pfctl -e") + ToolsHelper.print_output("/sbin/pfctl -e") ToolsHelper.pf_rules([ "pass", ]) ToolsHelper.print_output("/sbin/pfctl -x loud") - #ToolsHelper.print_output("echo \"j 230.0.0.1 %s\ns 3600\nq\" | /usr/sbin/mtest" % ifname) def find_mld_reply(self, pkt, ifname): pkt.show() - s = DelayedSend(pkt) + s = DelayedSend(pkt, ifname) found = False packets = self.sp.sniff(iface=ifname, timeout=5) @@ -66,7 +65,6 @@ class TestMLD(VnetTestTemplate): def test_router_alert(self): """Verify that we allow MLD packets with router alert extension header""" ifname = self.vnet.iface_alias_map["if1"].name - #ToolsHelper.print_output("/sbin/ifconfig %s inet6 -ifdisable" % ifname) ToolsHelper.print_output("/sbin/ifconfig") # Import in the correct vnet, so at to not confuse Scapy @@ -76,20 +74,17 @@ class TestMLD(VnetTestTemplate): self.sp = sp self.sc = sc - # A correct MLD query gets a reply - pkt = sp.IPv6(src="fe80::1%%%s" % ifname, dst="ff02::1", hlim=1) \ - / sp.RouterAlert(value=0) \ + # MLD packets with an incorrect hop limit get dropped. + pkt = sp.Ether() \ + / sp.IPv6(src="fe80::1%%%s" % ifname, dst="ff02::1", hlim=2) \ + / sp.IPv6ExtHdrHopByHop(options=[ \ + sp.RouterAlert(value=0) \ + ]) \ / sp.ICMPv6MLQuery2() - assert self.find_mld_reply(pkt, ifname) + # We can't reliably test this by checking for a reply, because + # the other jail may just send a spontaneous MLD reply. + self.find_mld_reply(pkt, ifname) - # The wrong extension header does not - pkt = sp.IPv6(src="fe80::1%%%s" % ifname, dst="ff02::1", hlim=1) \ - / sp.IPv6ExtHdrRouting() \ - / sp.ICMPv6MLQuery2() - assert not self.find_mld_reply(pkt, ifname) - - # Neither does an incorrect hop limit - pkt = sp.IPv6(src="fe80::1%%%s" % ifname, dst="ff02::1", hlim=2) \ - / sp.RouterAlert(value=0) \ - / sp.ICMPv6MLQuery2() - assert not self.find_mld_reply(pkt, ifname) + # Check if we logged dropping the MLD paacket + dmesg = ToolsHelper.get_output("/sbin/dmesg") + assert dmesg.find("Invalid MLD") != -1 From nobody Tue Sep 30 13:18: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 4cbdsZ6r9Cz695YH; Tue, 30 Sep 2025 13:18: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 4cbdsZ6K4rz442n; Tue, 30 Sep 2025 13:18:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759238290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PDt3YTXGCduzuMbrobTAylYTuuWNNVFTO6MzYWkLc40=; b=XNHSEEXTZ8YJJtQrDuOcZDNp9yjW32biCsI22LOsiRdG1k5oZk5FcscakBjRAX30qqB3rl 2tR5I4P/xmeiqQ8titrleEsKwCk884Qe2SFdKGSAUG+XvjnG+DBLEr4a4doYFkzX7X7KMW uZct1YoK16K3FugQy6NfiLtUO8Ve/+6eboxtNS2Y/qdh4HsucXc5PRDvTFVjEHU+F4l8Cs HQ5K7MttoBaQcTT62JgqIruwub6em/q2GZBoavKKqnZQ/muYkcDvdx9ACaqDOe+w4LyyjG L1PAyysPI7GQhWzhl8RmCoQkOC9vMhyTkkED3GnjS7qR5i4bXKOd2t94DGB0oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759238290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PDt3YTXGCduzuMbrobTAylYTuuWNNVFTO6MzYWkLc40=; b=xFbpb6ZRbUETIw7V7hnHGCupZDqwR5E8h5Ba+FwJljTg/7C3IxfGg1UPDaGOaqexqZUwrD qAQuW8P7Pqwv+HeoHogPzKy6wCra+A7Ntlbm/PtMjXMgGccrz6/dzjXcYU2NZFMqnus/pu MElQRQ17BjDU7KUVtxYtqsLV+SRILInzUJNro5HndQBhUOPVEmzD5hdfeFR/5dVLnVCbpO O61U1MGJVm5ZSc+iyuA9J0L5YA3ikWb4E11/axZHV6lfFa7N0lVW6zMhIXgik2HTExGrUl maiNTLPXYD4WMA+MP3tm99HIqg0PJd77zK9T0mDbgVzYyfmox2yO6TrZu5mUBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759238290; a=rsa-sha256; cv=none; b=x2C29bvN31knZsix6GnFj3s16sr8M/aFu9PxE7qLjdifTklERf9+JQsnwn5Fw5hrYJa5Q6 Yb8SrLoYSutrP9d84z15isSHMDKXO36c3WjZIKX1MCOItnXmtuMMHqwUnm6xH+FrQYnNkh UnZbiEw92mQnBK4RaYfanfZzFSB1PJfSgfPkoj2D1WkTVVFdyc+CjgWeZ0dt8GNFBhNYZ3 Ew0nz2/1H2lErTom3e/VCS4AveicMLWas1iGb2Lr56Fr3T1bRdX1SSRc6S0tqxRMEWGjub 5MzV9Bw3n0fppB+uK/y1Q2aRAT0O3B6E+gBe5L0Ir9vyjdb5HJe68mNul1CWRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbdsZ5k86zddG; Tue, 30 Sep 2025 13:18:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58UDIAMh002454; Tue, 30 Sep 2025 13:18:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58UDIA5Z002450; Tue, 30 Sep 2025 13:18:10 GMT (envelope-from git) Date: Tue, 30 Sep 2025 13:18:10 GMT Message-Id: <202509301318.58UDIA5Z002450@gitrepo.freebsd.org> 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=B8rgrav?= Subject: git: be8830612314 - main - libc: Add missing MLINK for tzname(3) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be8830612314d9afb64b5c040db689de44eb4b85 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=be8830612314d9afb64b5c040db689de44eb4b85 commit be8830612314d9afb64b5c040db689de44eb4b85 Author: Dag-Erling Smørgrav AuthorDate: 2025-09-30 12:27:24 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-09-30 13:18:00 +0000 libc: Add missing MLINK for tzname(3) While here, fix manlint warnings and a typo in tzset(3). MFC after: 3 days --- lib/libc/stdtime/Makefile.inc | 3 ++- lib/libc/stdtime/tzset.3 | 57 +++++++++++++++++-------------------------- 2 files changed, 24 insertions(+), 36 deletions(-) diff --git a/lib/libc/stdtime/Makefile.inc b/lib/libc/stdtime/Makefile.inc index 647cbe6f40ba..1baa39a6c0a6 100644 --- a/lib/libc/stdtime/Makefile.inc +++ b/lib/libc/stdtime/Makefile.inc @@ -32,4 +32,5 @@ MLINKS+=strftime.3 strftime_l.3 MLINKS+=strptime.3 strptime_l.3 MLINKS+=time2posix.3 posix2time.3 MLINKS+=tzset.3 daylight.3 \ - tzset.3 timezone.3 + tzset.3 timezone.3 \ + tzset.3 tzname.3 diff --git a/lib/libc/stdtime/tzset.3 b/lib/libc/stdtime/tzset.3 index 94ccbec9aba7..33e6a556306d 100644 --- a/lib/libc/stdtime/tzset.3 +++ b/lib/libc/stdtime/tzset.3 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd December 25, 2023 +.Dd September 30, 2025 .Dt TZSET 3 .Os .Sh NAME @@ -58,8 +58,8 @@ specifies how this is done. .Pp If .Ev TZ -does not appear in the environment, the best available approximation to -local wall clock time, as specified by the +does not appear in the environment, the best available approximation +to local wall clock time, as specified by the .Xr tzfile 5 Ns -format file .Pa /etc/localtime @@ -68,9 +68,7 @@ is used. If .Ev TZ appears in the environment but its value is a null string, Coordinated -Universal Time -.Pq Tn UTC -is used (without leap second correction). +Universal Time (UTC) is used (without leap second correction). .Pp If .Ev TZ @@ -81,13 +79,12 @@ the rest of its value is used as a pathname of a file from which to read the time conversion information. If the first character of the pathname is a slash .Pq Ql / -it is used as -an absolute pathname; otherwise, it is used as a pathname relative to -the system time conversion information directory. +it is used as an absolute pathname; otherwise, it is used as a +pathname relative to the system time conversion information directory. .Pp -If its value does not begin with a colon, it is first used as the pathname -of a file (as described above) from which to read the time conversion -information. +If its value does not begin with a colon, it is first used as the +pathname of a file (as described above) from which to read the time +conversion information. If that file cannot be read, the value is then interpreted as a direct specification (the format is described below) of the time conversion information. @@ -96,24 +93,23 @@ If the .Ev TZ environment variable does not specify a .Xr tzfile 5 Ns -format -file and cannot be interpreted as a direct specification, -.Tn UTC -is used. +file and cannot be interpreted as a direct specification, UTC is used. .Pp After the first call to .Nm tzset , the .Vt timezone -variable is set to the difference, in seconds, between Coordinated Universal -Time (UTC) and the local time. +variable is set to the difference, in seconds, between Coordinated +Universal Time (UTC) and the local time. The .Vt daylight variable is set to 0 if the local timezone is observing standard time. -It is set to 1 if the local timezone ever observes an alternate time, such as summer time. +It is set to 1 if the local timezone ever observes an alternate time, +such as summer time. The first element of the .Vt tzname -array is the timezone name of standard time, while the second element is the -name of the altnerative time zone. +array is the timezone name of standard time, while the second element +is the name of the altnerative time zone. .Sh SPECIFICATION FORMAT When .Ev TZ @@ -151,8 +147,7 @@ minus .Pq Ql \- , plus .Pq Ql + , -and -.Tn ASCII +and ASCII .Dv NUL are allowed. .It Em offset @@ -294,10 +289,8 @@ by the file .Em posixrules in the system time conversion information directory are used, with the -standard and summer time offsets from -.Tn UTC -replaced by those specified by -the +standard and summer time offsets from UTC replaced by those specified +by the .Em offset values in .Ev TZ . @@ -315,20 +308,14 @@ local time zone file .It Pa /usr/share/zoneinfo time zone directory .It Pa /usr/share/zoneinfo/posixrules -rules for -.Tn POSIX Ns -style -.Tn TZ Ns 's +rules for POSIX-style TZs .It Pa /usr/share/zoneinfo/Etc/GMT -for -.Tn UTC -leap seconds +for UTC leap seconds .El .Pp If the file .Pa /usr/share/zoneinfo/UTC -does not exist, -.Tn UTC -leap seconds are loaded from +does not exist, UTC leap seconds are loaded from .Pa /usr/share/zoneinfo/posixrules . .Sh SEE ALSO .Xr date 1 , From nobody Tue Sep 30 13:27:04 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbf3r4TLMz695vR; Tue, 30 Sep 2025 13:27:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbf3r3r5rz45GJ; Tue, 30 Sep 2025 13:27:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759238824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S6tgiw7L7iwUuQYW+932naAfcVrNR4HJoKzadZ3Dhoc=; b=ZrSUgshGpm44vtZx84nzBEm9ldZ2Ee5wB4OQ847VjfCAcvEBjFWhPxdirfUoh+DoeMlJtk FLDQqQrj8+XmMzHexZeuEJScfaveLMm0F+rNEtDDQU7S5cCCCU9V/dcGT29zt0RejGMW3z z7rNKA/2OL+Wx/Njf6BgaeN/NSt/Plr1l3HpvnwCAU7Bti8ytWiIdctnNxH1Lh89xiIgI7 5Ui1CZKcgNMFyW7iRfkBW48ToWZ7n+waS0Y259idrS66zptBz/TmYf+PG2wHcNeANort+t qOLNXLdi4q+dcztEGExJtCgMj1U6jig5qsI/bvyXrB+m+QiCvCkc/tiCxsd+XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759238824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S6tgiw7L7iwUuQYW+932naAfcVrNR4HJoKzadZ3Dhoc=; b=gWJXWedOGV/v1cJgjX0H6+ntnEb7pRsukTyNAfSG8t4FdDW5KfE0rst5nSvR5iGymctxZa c50O8tQtzwKVI2/zplaBq8DlrLdZFVwkGPDjq9HK3ovMsc/9jhxhmJU6xd9VE5hM80bGDO v4T8sx8m9c8U8fopoo8F9fFwQg7CzulRq/iZJKbOTo/vxrUOSYXI5gumTAUk7E5ww5kzVA 3KtYsoTro9ohBxI/0Ckmg/HfD1ASaNEBpyycX0AnhjRkiQCVorXmOIwGQzE55BtdtOHHFV uY1lcOVlryYRJKFHHeyrx3pglJwGj3qsIoJR9Y01yCHqpdUguc0Jyj9IL5EnQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759238824; a=rsa-sha256; cv=none; b=FOACOM6/jaoeyIRyUY0pbT0CJVK6wF9sI8DPrXNwvqNmSjjRKf5GK18Mt+L1AQn4el4MlW jdMXyI3iBO2guufR1jjy6yYDfmV8dC+1+hGsysekECMqgLmIkCZQaA+L7erDPvRFBZoUem QvgnYur8ML0u6H8hXwOjvxcXdVcavPmZkI3o4Z80/lKgQU1yjKcirMTBqrKelSlaCCxPzZ OPxCijqeEhl2aYrLgfk5GG7i2uQRiqMB+HeMoSLgIsWgPKLwmc8HquPEmqpR91ONFmkZ4n SAPVl0mgCdtSmSlzXvLgiaPzlbq6H5fUJyUqNAiP5kaumaImp30CNSNbV+Satg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbf3r3BhZzfKT; Tue, 30 Sep 2025 13:27:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58UDR4er020317; Tue, 30 Sep 2025 13:27:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58UDR4u4020313; Tue, 30 Sep 2025 13:27:04 GMT (envelope-from git) Date: Tue, 30 Sep 2025 13:27:04 GMT Message-Id: <202509301327.58UDR4u4020313@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 8af6aee96ed6 - main - virtual_oss(8): Remove floating point formats from preference list 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: 8af6aee96ed609456900c6dd92dafabac5e89c0a Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=8af6aee96ed609456900c6dd92dafabac5e89c0a commit 8af6aee96ed609456900c6dd92dafabac5e89c0a Author: Christos Margiolis AuthorDate: 2025-09-30 13:13:46 +0000 Commit: Christos Margiolis CommitDate: 2025-09-30 13:25:53 +0000 virtual_oss(8): Remove floating point formats from preference list virtual_oss(8) chooses formats based on preference lists (see VPREFERRED_*) for each sample depth (-b option). However, if we, for example, use 32 bits LE for the sample depth, what will end up happening is that the format chosen will be 0x10001000, which corresponds to AFMT_S32_LE *and* AFMT_F32_LE OR'd together. This happens because the preference lists include both AFMT_S32_* and AFMT_F32_* in the 32-bit cases. Because we essentially end up using an invalid format, sound(4) will eventually reach pcm_sample_write()'s (sys/dev/sound/pcm/pcm.h) __assert_unreachable() case. This patch is a temporary fix to address the panic, until a proper solution for using floating point formats is found. PR: 289904 Sponsored by: The FreeBSD Foundation MFC after: 2 days --- usr.sbin/virtual_oss/virtual_oss/int.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/virtual_oss/virtual_oss/int.h b/usr.sbin/virtual_oss/virtual_oss/int.h index a48e33d7f837..b3cc573ba8a9 100644 --- a/usr.sbin/virtual_oss/virtual_oss/int.h +++ b/usr.sbin/virtual_oss/virtual_oss/int.h @@ -65,13 +65,13 @@ extern pthread_cond_t atomic_cv; #define VTYPE_WAV_DAT 2 #define VPREFERRED_SNE_AFMT \ - (AFMT_S8 | AFMT_S16_NE | AFMT_S24_NE | AFMT_S32_NE | AFMT_F32_NE) + (AFMT_S8 | AFMT_S16_NE | AFMT_S24_NE | AFMT_S32_NE) #define VPREFERRED_UNE_AFMT \ (AFMT_U8 | AFMT_U16_NE | AFMT_U24_NE | AFMT_U32_NE) #define VPREFERRED_SLE_AFMT \ - (AFMT_S8 | AFMT_S16_LE | AFMT_S24_LE | AFMT_S32_LE | AFMT_F32_LE) + (AFMT_S8 | AFMT_S16_LE | AFMT_S24_LE | AFMT_S32_LE) #define VPREFERRED_SBE_AFMT \ - (AFMT_S8 | AFMT_S16_BE | AFMT_S24_BE | AFMT_S32_BE | AFMT_F32_BE) + (AFMT_S8 | AFMT_S16_BE | AFMT_S24_BE | AFMT_S32_BE) #define VPREFERRED_ULE_AFMT \ (AFMT_U8 | AFMT_U16_LE | AFMT_U24_LE | AFMT_U32_LE) #define VPREFERRED_UBE_AFMT \ From nobody Tue Sep 30 13:56:06 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbfjN0BHLz697hx; Tue, 30 Sep 2025 13:56:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbfjM6lRKz4817; Tue, 30 Sep 2025 13:56:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759240568; h=from:from:reply-to:subject:subject: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=l0Ye/nS8/iMi4iVRHB481BxGu9dmGBgXG+6TMWSyaOE=; b=p08eBm/77sPqnYik+vGA1W1oUQwE5PSIGOAKu+6sMcMTJYj7efxmFq30H1FKfCI1SbwMlr 17Xgfry48kmd7s2phJUmGvVgPtTRIRNbt91W5zzafSzCullI/3uDclwe+0WolaRu3+j+8v eDT3nSJbhkCBPTn2BENRYiOi6huUpQufGmJ+86PEcrdYGwc6nSKdvBb6mxDrMK1ysR1Xrn waZgz2SNFXa/MiK9te6C7fiD1XnrCEjeIwTz3+k3ThQFWJJFCe3oGS3uZGCVuxHz7/eRxF RXuwXwAx5merYCm+UXCBxE0hg0qPR1qjn3wuZTttbZvFrA0QA5Z5E59OYBnhzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759240568; h=from:from:reply-to:subject:subject: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=l0Ye/nS8/iMi4iVRHB481BxGu9dmGBgXG+6TMWSyaOE=; b=EDFd5/vZaEqiQozariTfeg83YhsIt0xdUuAa33oO2Jn/r0EMMc1/Jy8rFlJ/XHAbBi5rz4 UDtKzACxlPJeUHug2Vk5iohoFwUx9DaIwE3uetN5fx487JzwtgcqbAxvf54W8pIY0ZlXr+ DuP2BYaSE/kXMODTv7KsqE6aYuZ8on8V2wu0casBImkC5mp6g5NyN8hVeGs2pCtwvBIJ2C WwazZ1bnE3dRmPiL/C0E5S33exU4l7MgFNsd+vGkSv7bUwjUSh0rj59GTqb2yH8S+zRxO3 1DiqgmQHfS4iI1NMwS92QUj6bq8gFgkERfLsD0LoFfwesQk/TbyOiAtv8LdJGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759240568; a=rsa-sha256; cv=none; b=nN9ds+sReCYtzx10m2B4Da6fG7/ovK5eAb1RIJhM5wkhGBxDQnECvVgBNeSzgBYutSYImp PlJb7bshfLutW7XL/7BHaFXGphpwWVilIEMOeV6BFKSG1J6N2Y0vX6Xd5+nLKWMNe+Ni+Q seAsd5+vrD1R8yDERIpl+KX1A4Gn9wDlOPeDv878HTo5n/Uwys4Q7gbU94VeKg65Ork2u/ 4QsWjnDm9EtxXsT2ouc0SopP+476aYU6TOToUlKzbpQzdHPhs5/toxDKG7PJsd4Kgm4zH2 +qFAxfciO0dqJM4cLvamcQtegLJpwPw+1REBN3Zv/TS+k2nVsFnkOypuzThZqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2601:5c0:4202:5670:a58c:4b56:81a5:e4ee] (unknown [IPv6:2601:5c0:4202:5670:a58c:4b56:81a5:e4ee]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cbfjM4XHjzvRS; Tue, 30 Sep 2025 13:56:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Tue, 30 Sep 2025 09:56:06 -0400 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: d58339f39874 - main - tzcode: Drop libc namespace Content-Language: en-US To: Konstantin Belousov , =?UTF-8?Q?Dag-Erling_Sm=C3=B8rgrav?= Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202509271707.58RH7ajb090983@gitrepo.freebsd.org> <86frc6bzcm.fsf@ltc.des.dev> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 9/28/25 20:59, Konstantin Belousov wrote: > On Sun, Sep 28, 2025 at 01:17:29PM +0200, Dag-Erling Smørgrav wrote: >> Konstantin Belousov writes: >>> It does change the behavior. Now a user-provided open/fstat/pthread_* >>> functions can interpose the system functions, making tz code doing something >>> that was not intended. >>> >>> In other words, namespacing guaranteed that tzcode was not affected by >>> the app playing with libc namespace. >> >> That is a side effect of namespace.h but not its original purpose, which >> was to allow libc to call pthread functions, which would be stubbed out >> when libc_r was not loaded. This is no longer needed, and namespace.h >> has bitrotted and is missing a bunch of syscalls and functions >> (including nearly every *at() system call, with the sole exception of >> openat()). > Well, this is same as the biology: most features current uses have nothing > to do with the cause of its appearance. > > But still, I think we should decide if we want to keep this guarantee of > the libc semantic in presence of user interposing. Then we can either > fix the missing overrides or drop the feature altogether. > > For ELF, I believe that we can implement this resilience to interposing > much cleaner using protected symbol visibility for symbols exported by > libc. But still, we need to decide what we do. The only trick with protected symbols is that copy relocations don't work correctly, but that only matters for data symbols not functions. FWIW, after my linker talk at EuroBSDCon a few days ago, multiple folks mentioned to me that protected symbols should be used more. One suggested that ELF should even default to "protected" instead of "default" visibility requiring overridable-symbols to be marked as such explicitly. However, protected symbols for functions is a fairly clean fix that doesn't depend on namespace mangling or inline assembly hacks, etc. -- John Baldwin From nobody Tue Sep 30 14:33:18 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbgXV10Jjz69B0r; Tue, 30 Sep 2025 14:33:30 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbgXT4YgFz3G5l; Tue, 30 Sep 2025 14:33:29 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 58UEXIYa071246; Tue, 30 Sep 2025 17:33:21 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 58UEXIYa071246 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 58UEXIjQ071245; Tue, 30 Sep 2025 17:33:18 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 30 Sep 2025 17:33:18 +0300 From: Konstantin Belousov To: John Baldwin Cc: Dag-Erling =?utf-8?B?U23DuHJncmF2?= , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: d58339f39874 - main - tzcode: Drop libc namespace Message-ID: References: <202509271707.58RH7ajb090983@gitrepo.freebsd.org> <86frc6bzcm.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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cbgXT4YgFz3G5l On Tue, Sep 30, 2025 at 09:56:06AM -0400, John Baldwin wrote: > On 9/28/25 20:59, Konstantin Belousov wrote: > > On Sun, Sep 28, 2025 at 01:17:29PM +0200, Dag-Erling Smørgrav wrote: > > > Konstantin Belousov writes: > > > > It does change the behavior. Now a user-provided open/fstat/pthread_* > > > > functions can interpose the system functions, making tz code doing something > > > > that was not intended. > > > > > > > > In other words, namespacing guaranteed that tzcode was not affected by > > > > the app playing with libc namespace. > > > > > > That is a side effect of namespace.h but not its original purpose, which > > > was to allow libc to call pthread functions, which would be stubbed out > > > when libc_r was not loaded. This is no longer needed, and namespace.h > > > has bitrotted and is missing a bunch of syscalls and functions > > > (including nearly every *at() system call, with the sole exception of > > > openat()). > > Well, this is same as the biology: most features current uses have nothing > > to do with the cause of its appearance. > > > > But still, I think we should decide if we want to keep this guarantee of > > the libc semantic in presence of user interposing. Then we can either > > fix the missing overrides or drop the feature altogether. > > > > For ELF, I believe that we can implement this resilience to interposing > > much cleaner using protected symbol visibility for symbols exported by > > libc. But still, we need to decide what we do. > > The only trick with protected symbols is that copy relocations don't work > correctly, but that only matters for data symbols not functions. FWIW, > after my linker talk at EuroBSDCon a few days ago, multiple folks mentioned > to me that protected symbols should be used more. One suggested that ELF > should even default to "protected" instead of "default" visibility requiring > overridable-symbols to be marked as such explicitly. > > However, protected symbols for functions is a fairly clean fix that doesn't > depend on namespace mangling or inline assembly hacks, etc. I thought about using the protected visibility in libc more, meantime. The case that is not fixed just by applying protected to exported functions is the use of that functions in related system libraries. E.g. we do want that call to exit() from libthr was directed to libc exit() and not to a user interposer. So we still need some symbol exported in the private version space, for use in libthr (or libm, or some other libraries: the scope needs to be defined), to ensure that no legal interposers are involved. From nobody Tue Sep 30 15:17:20 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbhWv5TzWz69DSg; Tue, 30 Sep 2025 15:18:03 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbhWv532Zz3Kf6; Tue, 30 Sep 2025 15:18:03 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759245483; h=from:from:reply-to:subject:subject: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=yN9RHlNA5wPgJnT/Nu5mgkqKJPN8xT6Ql/iVOYZZ04E=; b=gn9hh8vPMYdml/ecz6R72v246z/wW3NB7kH6jaaAfrzey24iLfG0CTxtCbdUT7j4RVj+Tp 8LgJOKbzHMzHPh5Ja3yBuCl9SBjuOzQ+f5LEbm69WQjVmxTHuAX21MZTdeoJTA/FMLsPb/ 4JHlnVsXhsOUrshoQ/SIPlQNMuHkQxPw/35PQ7nUJ/MVZjqpg/pTUGtgmqbZEEnCSylpwU c//Vx3oXU4ikg2ZPEzWUQnLnJ0986TxgBX2LWujAdvc/u3xl8WzzQKzxERO9tTaq7rncKq PXixQeBsbKMbIg7wmAUJUj4LsJfe59/mDXvF5X2x6Yz/UCcMluIEvfXC6yCZbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759245483; h=from:from:reply-to:subject:subject: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=yN9RHlNA5wPgJnT/Nu5mgkqKJPN8xT6Ql/iVOYZZ04E=; b=Exv5MkcX4Vqrj69tAECUNsELlhCCOTZ8/myuFs7J0G9uIKX1SMPlt87z7y54zZREafkkDc VXc/YrS03i/p6gKxkUxfr/oNoG6kNM9+ZtDdzQsTLXCGIiAOHEtrkRPbGbydIWyScJACmL E73BHl/b5wce7UV8MxTlQIO73HKjK5M4Fvs/XmTxxS/FK5apDka0ip9sf+JFxE52R+Vdbd DbSQFRW9MzQ5QXc4rQPUXSzrZSytd9dF5KmGtMPj7huUWS2bSFoAYj7dHq8RxgfMhguHhJ BZOIrCoDMKQENxB0HpyhJElyzMYNcpcA73LB8s6L4PztOHbvMTLJ+GyJ5RCM6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759245483; a=rsa-sha256; cv=none; b=puQz+gRNdp3lCgWNUidrnmNTerp9zNo+vEKWvd1rxik5hglE2kuk8IGFmgR/S04NbKOzWe tA+9JwqxcLb6b0qwKdSKEOMk7x1yJ9qiXnExc/n0UTXR2gZ7OnE5fhaiDMlgIruWxtdQf5 QovRC2IajNGwGi9ZmNqjaeYNZ+UGh8DcbZsKDZQTAk+esz02t9Mpb6xLGFAksiVGg9mVwS OWoJhAYjYjgoesSt/9tt2CwvqT+wlNc36mQHz4RaZXSKUgj6avovAZ9UHF+UibjDYIs2Hy GDooIy193nZGkiMhJjpakJAW80+sjK3fK4UvDw6hJcDfpEfFL+D5cxbjNwTKCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from smtpclient.apple (ns1.oxydns.net [45.32.91.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: zlei/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cbhWg5PyFzwMd; Tue, 30 Sep 2025 15:17:51 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.10\)) Subject: Re: git: 2ed9833791f2 - main - thunderbolt: Import USB4 code From: Zhenlei Huang In-Reply-To: <202509271713.58RHDTTL008060@gitrepo.freebsd.org> Date: Tue, 30 Sep 2025 23:17:20 +0800 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <76A05154-90E6-4237-851F-EFA35D29D3CC@FreeBSD.org> References: <202509271713.58RHDTTL008060@gitrepo.freebsd.org> To: Aymeric Wibo X-Mailer: Apple Mail (2.3696.120.41.1.10) Nice work ! Now my thunderbolt ethernet is correctly recognized and works great on = my old MBP. Cheers ! Best regards, Zhenlei > On Sep 28, 2025, at 1:13 AM, Aymeric Wibo wrote: >=20 > The branch main has been updated by obiwac: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D2ed9833791f28e14843ac813f90cb030= e45948dc >=20 > commit 2ed9833791f28e14843ac813f90cb030e45948dc > Author: Aymeric Wibo > AuthorDate: 2025-09-27 11:50:43 +0000 > Commit: Aymeric Wibo > CommitDate: 2025-09-27 17:13:13 +0000 >=20 > thunderbolt: Import USB4 code >=20 > Add initial USB4 code written by Scott Long and originally passed = on to > HPS (source: https://github.com/hselasky/usb4), minus the ICM code = and > with some small fixes. >=20 > For context, older TB chips implemented the connection manager in > firmware (ICM) instead of in the OS (HCM), but maintaining the ICM = code > would be a huge burden for not many chips. >=20 > Mostly completed work: >=20 > - Debug/trace framework. > - NHI controller driver. > - PCIe bridge driver. > - Router and config space layer handling (just reading in this = commit). >=20 > Link to the email where Scott shared details about the initial USB4 > work: >=20 > = https://lists.freebsd.org/archives/freebsd-hackers/2024-July/003411.html >=20 > Glanced at by: emaste, imp > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D49450 > Event: EuroBSDcon 2025 > --- > sys/dev/thunderbolt/hcm.c | 223 +++++++ > sys/dev/thunderbolt/hcm_var.h | 47 ++ > sys/dev/thunderbolt/nhi.c | 1170 = ++++++++++++++++++++++++++++++++++++ > sys/dev/thunderbolt/nhi_pci.c | 529 ++++++++++++++++ > sys/dev/thunderbolt/nhi_reg.h | 332 ++++++++++ > sys/dev/thunderbolt/nhi_var.h | 277 +++++++++ > sys/dev/thunderbolt/nhi_wmi.c | 198 ++++++ > sys/dev/thunderbolt/router.c | 939 = +++++++++++++++++++++++++++++ > sys/dev/thunderbolt/router_var.h | 242 ++++++++ > sys/dev/thunderbolt/tb_acpi_pcib.c | 181 ++++++ > sys/dev/thunderbolt/tb_debug.c | 334 ++++++++++ > sys/dev/thunderbolt/tb_debug.h | 93 +++ > sys/dev/thunderbolt/tb_dev.c | 331 ++++++++++ > sys/dev/thunderbolt/tb_dev.h | 41 ++ > sys/dev/thunderbolt/tb_if.m | 121 ++++ > sys/dev/thunderbolt/tb_ioctl.h | 52 ++ > sys/dev/thunderbolt/tb_pcib.c | 614 +++++++++++++++++++ > sys/dev/thunderbolt/tb_pcib.h | 93 +++ > sys/dev/thunderbolt/tb_reg.h | 52 ++ > sys/dev/thunderbolt/tb_var.h | 54 ++ > sys/dev/thunderbolt/tbcfg_reg.h | 363 +++++++++++ > sys/modules/Makefile | 5 + > sys/modules/thunderbolt/Makefile | 13 + > 23 files changed, 6304 insertions(+) >=20 > diff --git a/sys/dev/thunderbolt/hcm.c b/sys/dev/thunderbolt/hcm.c > new file mode 100644 > index 000000000000..b8f703fc3b52 > --- /dev/null > +++ b/sys/dev/thunderbolt/hcm.c > @@ -0,0 +1,223 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause > + * > + * Copyright (c) 2022 Scott Long > + * All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above = copyright > + * notice, this list of conditions and the following disclaimer in = the > + * documentation and/or other materials provided with the = distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' = AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, = THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR = PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE = LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR = CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE = GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS = INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN = CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN = ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE = POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include "opt_thunderbolt.h" > + > +/* Host Configuration Manager (HCM) for USB4 and later TB3 */ > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +static void hcm_cfg_task(void *, int); > + > +int > +hcm_attach(struct nhi_softc *nsc) > +{ > + struct hcm_softc *hcm; > + > + tb_debug(nsc, DBG_HCM|DBG_EXTRA, "hcm_attach called\n"); > + > + hcm =3D malloc(sizeof(struct hcm_softc), M_THUNDERBOLT, = M_NOWAIT|M_ZERO); > + if (hcm =3D=3D NULL) { > + tb_debug(nsc, DBG_HCM, "Cannot allocate hcm object\n"); > + return (ENOMEM); > + } > + > + hcm->dev =3D nsc->dev; > + hcm->nsc =3D nsc; > + nsc->hcm =3D hcm; > + > + hcm->taskqueue =3D taskqueue_create("hcm_event", M_NOWAIT, > + taskqueue_thread_enqueue, &hcm->taskqueue); > + if (hcm->taskqueue =3D=3D NULL) > + return (ENOMEM); > + taskqueue_start_threads(&hcm->taskqueue, 1, PI_DISK, = "tbhcm%d_tq", > + device_get_unit(nsc->dev)); > + TASK_INIT(&hcm->cfg_task, 0, hcm_cfg_task, hcm); > + > + return (0); > +} > + > +int > +hcm_detach(struct nhi_softc *nsc) > +{ > + struct hcm_softc *hcm; > + > + hcm =3D nsc->hcm; > + if (hcm->taskqueue) > + taskqueue_free(hcm->taskqueue); > + > + return (0); > +} > + > +int > +hcm_router_discover(struct hcm_softc *hcm) > +{ > + > + taskqueue_enqueue(hcm->taskqueue, &hcm->cfg_task); > + > + return (0); > +} > + > +static void > +hcm_cfg_task(void *arg, int pending) > +{ > + struct hcm_softc *hcm; > + struct router_softc *rsc; > + struct router_cfg_cap cap; > + struct tb_cfg_router *cfg; > + struct tb_cfg_adapter *adp; > + struct tb_cfg_cap_lane *lane; > + uint32_t *buf; > + uint8_t *u; > + u_int error, i, offset; > + > + hcm =3D (struct hcm_softc *)arg; > + > + tb_debug(hcm, DBG_HCM|DBG_EXTRA, "hcm_cfg_task called\n"); > + > + buf =3D malloc(8 * 4, M_THUNDERBOLT, M_NOWAIT|M_ZERO); > + if (buf =3D=3D NULL) { > + tb_debug(hcm, DBG_HCM, "Cannot alloc memory for = discovery\n"); > + return; > + } > + > + rsc =3D hcm->nsc->root_rsc; > + error =3D tb_config_router_read(rsc, 0, 5, buf); > + if (error !=3D 0) { > + free(buf, M_NHI); > + return; > + } > + > + cfg =3D (struct tb_cfg_router *)buf; > + > + cap.space =3D TB_CFG_CS_ROUTER; > + cap.adap =3D 0; > + cap.next_cap =3D GET_ROUTER_CS_NEXT_CAP(cfg); > + while (cap.next_cap !=3D 0) { > + error =3D tb_config_next_cap(rsc, &cap); > + if (error !=3D 0) > + break; > + > + if ((cap.cap_id =3D=3D TB_CFG_CAP_VSEC) && (cap.vsc_len = =3D=3D 0)) { > + tb_debug(hcm, DBG_HCM, "Router Cap=3D %d, vsec=3D = %d, " > + "len=3D %d, next_cap=3D %d\n", cap.cap_id, > + cap.vsc_id, cap.vsec_len, cap.next_cap); > + } else if (cap.cap_id =3D=3D TB_CFG_CAP_VSC) { > + tb_debug(hcm, DBG_HCM, "Router cap=3D %d, vsc=3D = %d, " > + "len=3D %d, next_cap=3D %d\n", cap.cap_id, > + cap.vsc_id, cap.vsc_len, cap.next_cap); > + } else > + tb_debug(hcm, DBG_HCM, "Router cap=3D %d, " > + "next_cap=3D %d\n", cap.cap_id, = cap.next_cap); > + if (cap.next_cap > TB_CFG_CAP_OFFSET_MAX) > + cap.next_cap =3D 0; > + } > + > + u =3D (uint8_t *)buf; > + error =3D tb_config_get_lc_uuid(rsc, u); > + if (error =3D=3D 0) { > + tb_debug(hcm, DBG_HCM, "Router LC UUID: = %02x%02x%02x%02x-" > + = "%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\n", > + u[0], u[1], u[2], u[3], u[4], u[5], u[6], u[7], = u[8], > + u[9], u[10], u[11], u[12], u[13], u[14], u[15]); > + } else > + tb_printf(hcm, "Error finding LC registers: %d\n", = error); > + > + for (i =3D 1; i <=3D rsc->max_adap; i++) { > + error =3D tb_config_adapter_read(rsc, i, 0, 8, buf); > + if (error !=3D 0) { > + tb_debug(hcm, DBG_HCM, "Adapter %d: no = adapter\n", i); > + continue; > + } > + adp =3D (struct tb_cfg_adapter *)buf; > + tb_debug(hcm, DBG_HCM, "Adapter %d: %s, max_counters=3D = 0x%08x," > + " adapter_num=3D %d\n", i, > + tb_get_string(GET_ADP_CS_TYPE(adp), = tb_adapter_type), > + GET_ADP_CS_MAX_COUNTERS(adp), = GET_ADP_CS_ADP_NUM(adp)); > + > + if (GET_ADP_CS_TYPE(adp) !=3D ADP_CS2_LANE) > + continue; > + > + error =3D tb_config_find_adapter_cap(rsc, i, = TB_CFG_CAP_LANE, > + &offset); > + if (error) > + continue; > + > + error =3D tb_config_adapter_read(rsc, i, offset, 3, = buf); > + if (error) > + continue; > + > + lane =3D (struct tb_cfg_cap_lane *)buf; > + tb_debug(hcm, DBG_HCM, "Lane Adapter State=3D %s %s\n", > + tb_get_string((lane->current_lws & = CAP_LANE_STATE_MASK), > + tb_adapter_state), (lane->targ_lwp & = CAP_LANE_DISABLE) ? > + "disabled" : "enabled"); > + > + if ((lane->current_lws & CAP_LANE_STATE_MASK) =3D=3D > + CAP_LANE_STATE_CL0) { > + tb_route_t newr; > + > + newr.hi =3D rsc->route.hi; > + newr.lo =3D rsc->route.lo | (i << rsc->depth * = 8); > + > + tb_printf(hcm, "want to add router at = 0x%08x%08x\n", > + newr.hi, newr.lo); > + error =3D tb_router_attach(rsc, newr); > + tb_printf(rsc, "tb_router_attach returned %d\n", = error); > + } > + } > + > + free(buf, M_THUNDERBOLT); > +} > diff --git a/sys/dev/thunderbolt/hcm_var.h = b/sys/dev/thunderbolt/hcm_var.h > new file mode 100644 > index 000000000000..a11c8e9b6a92 > --- /dev/null > +++ b/sys/dev/thunderbolt/hcm_var.h > @@ -0,0 +1,47 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > + * Copyright (c) 2022 Scott Long > + * All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above = copyright > + * notice, this list of conditions and the following disclaimer in = the > + * documentation and/or other materials provided with the = distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' = AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, = THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR = PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE = LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR = CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE = GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS = INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN = CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN = ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE = POSSIBILITY OF > + * SUCH DAMAGE. > + * > + * $FreeBSD$ > + */ > + > +#ifndef _HCM_VAR_H > +#define _HCM_VAR_H > + > +struct hcm_softc { > + u_int debug; > + device_t dev; > + struct nhi_softc *nsc; > + > + struct task cfg_task; > + struct taskqueue *taskqueue; > +}; > + > +int hcm_attach(struct nhi_softc *); > +int hcm_detach(struct nhi_softc *); > +int hcm_router_discover(struct hcm_softc *); > + > +#endif /* _HCM_VAR_H */ > diff --git a/sys/dev/thunderbolt/nhi.c b/sys/dev/thunderbolt/nhi.c > new file mode 100644 > index 000000000000..205e69c16253 > --- /dev/null > +++ b/sys/dev/thunderbolt/nhi.c > @@ -0,0 +1,1170 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > + * Copyright (c) 2022 Scott Long > + * All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above = copyright > + * notice, this list of conditions and the following disclaimer in = the > + * documentation and/or other materials provided with the = distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' = AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, = THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR = PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE = LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR = CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE = GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS = INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN = CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN = ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE = POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include "opt_thunderbolt.h" > + > +/* PCIe interface for Thunderbolt Native Host Interface (nhi) */ > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include "tb_if.h" > + > +static int nhi_alloc_ring(struct nhi_softc *, int, int, int, > + struct nhi_ring_pair **); > +static void nhi_free_ring(struct nhi_ring_pair *); > +static void nhi_free_rings(struct nhi_softc *); > +static int nhi_configure_ring(struct nhi_softc *, struct = nhi_ring_pair *); > +static int nhi_activate_ring(struct nhi_ring_pair *); > +static int nhi_deactivate_ring(struct nhi_ring_pair *); > +static int nhi_alloc_ring0(struct nhi_softc *); > +static void nhi_free_ring0(struct nhi_softc *); > +static void nhi_fill_rx_ring(struct nhi_softc *, struct nhi_ring_pair = *); > +static int nhi_init(struct nhi_softc *); > +static void nhi_post_init(void *); > +static int nhi_tx_enqueue(struct nhi_ring_pair *, struct = nhi_cmd_frame *); > +static int nhi_setup_sysctl(struct nhi_softc *); > + > +SYSCTL_NODE(_hw, OID_AUTO, nhi, CTLFLAG_RD, 0, "NHI Driver = Parameters"); > + > +MALLOC_DEFINE(M_NHI, "nhi", "nhi driver memory"); > + > +#ifndef NHI_DEBUG_LEVEL > +#define NHI_DEBUG_LEVEL 0 > +#endif > + > +/* 0 =3D default, 1 =3D force-on, 2 =3D force-off */ > +#ifndef NHI_FORCE_HCM > +#define NHI_FORCE_HCM 0 > +#endif > + > +void > +nhi_get_tunables(struct nhi_softc *sc) > +{ > + devclass_t dc; > + device_t ufp; > + char tmpstr[80], oid[80]; > + u_int val; > + > + /* Set local defaults */ > + sc->debug =3D NHI_DEBUG_LEVEL; > + sc->max_ring_count =3D NHI_DEFAULT_NUM_RINGS; > + sc->force_hcm =3D NHI_FORCE_HCM; > + > + /* Inherit setting from the upstream thunderbolt switch node */ > + val =3D TB_GET_DEBUG(sc->dev, &sc->debug); > + if (val !=3D 0) { > + dc =3D devclass_find("tbolt"); > + if (dc !=3D NULL) { > + ufp =3D devclass_get_device(dc, = device_get_unit(sc->dev)); > + if (ufp !=3D NULL) > + TB_GET_DEBUG(ufp, &sc->debug); > + } else { > + if (TUNABLE_STR_FETCH("hw.tbolt.debug_level", = oid, > + 80) !=3D 0) > + tb_parse_debug(&sc->debug, oid); > + } > + } > + > + /* > + * Grab global variables. Allow nhi debug flags to override > + * thunderbolt debug flags, if present. > + */ > + bzero(oid, 80); > + if (TUNABLE_STR_FETCH("hw.nhi.debug_level", oid, 80) !=3D 0) > + tb_parse_debug(&sc->debug, oid); > + if (TUNABLE_INT_FETCH("hw.nhi.max_rings", &val) !=3D 0) { > + val =3D min(val, NHI_MAX_NUM_RINGS); > + sc->max_ring_count =3D max(val, 1); > + } > + if (TUNABLE_INT_FETCH("hw.nhi.force_hcm", &val) !=3D 0) > + sc->force_hcm =3D val; > + > + /* Grab instance variables */ > + bzero(oid, 80); > + snprintf(tmpstr, sizeof(tmpstr), "dev.nhi.%d.debug_level", > + device_get_unit(sc->dev)); > + if (TUNABLE_STR_FETCH(tmpstr, oid, 80) !=3D 0) > + tb_parse_debug(&sc->debug, oid); > + snprintf(tmpstr, sizeof(tmpstr), "dev.nhi.%d.max_rings", > + device_get_unit(sc->dev)); > + if (TUNABLE_INT_FETCH(tmpstr, &val) !=3D 0) { > + val =3D min(val, NHI_MAX_NUM_RINGS); > + sc->max_ring_count =3D max(val, 1); > + } > + snprintf(tmpstr, sizeof(tmpstr), "dev, nhi.%d.force_hcm", > + device_get_unit(sc->dev)); > + if (TUNABLE_INT_FETCH(tmpstr, &val) !=3D 0) > + sc->force_hcm =3D val; > + > + return; > +} > + > +static void > +nhi_configure_caps(struct nhi_softc *sc) > +{ > + > + if (NHI_IS_USB4(sc) || (sc->force_hcm =3D=3D NHI_FORCE_HCM_ON)) > + sc->caps |=3D NHI_CAP_HCM; > + if (sc->force_hcm =3D=3D NHI_FORCE_HCM_OFF) > + sc->caps &=3D ~NHI_CAP_HCM; > +} > + > +struct nhi_cmd_frame * > +nhi_alloc_tx_frame(struct nhi_ring_pair *r) > +{ > + struct nhi_cmd_frame *cmd; > + > + mtx_lock(&r->mtx); > + cmd =3D nhi_alloc_tx_frame_locked(r); > + mtx_unlock(&r->mtx); > + > + return (cmd); > +} > + > +void > +nhi_free_tx_frame(struct nhi_ring_pair *r, struct nhi_cmd_frame *cmd) > +{ > + mtx_lock(&r->mtx); > + nhi_free_tx_frame_locked(r, cmd); > + mtx_unlock(&r->mtx); > +} > + > +/* > + * Push a command and data dword through the mailbox to the firmware. > + * Response is either good, error, or timeout. Commands that return = data > + * do so by reading OUTMAILDATA. > + */ > +int > +nhi_inmail_cmd(struct nhi_softc *sc, uint32_t cmd, uint32_t data) > +{ > + uint32_t val; > + u_int error, timeout; > + > + mtx_lock(&sc->nhi_mtx); > + /* > + * XXX Should a defer/reschedule happen here, or is it not worth > + * worrying about? > + */ > + if (sc->hwflags & NHI_MBOX_BUSY) { > + mtx_unlock(&sc->nhi_mtx); > + tb_debug(sc, DBG_MBOX, "Driver busy with mailbox\n"); > + return (EBUSY); > + } > + sc->hwflags |=3D NHI_MBOX_BUSY; > + > + val =3D nhi_read_reg(sc, TBT_INMAILCMD); > + tb_debug(sc, DBG_MBOX|DBG_FULL, "Reading INMAILCMD=3D 0x%08x\n", = val); > + if (val & INMAILCMD_ERROR) > + tb_debug(sc, DBG_MBOX, "Error already set in = INMAILCMD\n"); > + if (val & INMAILCMD_OPREQ) { > + mtx_unlock(&sc->nhi_mtx); > + tb_debug(sc, DBG_MBOX, > + "INMAILCMD request already in progress\n"); > + return (EBUSY); > + } > + > + nhi_write_reg(sc, TBT_INMAILDATA, data); > + nhi_write_reg(sc, TBT_INMAILCMD, cmd | INMAILCMD_OPREQ); > + > + /* Poll at 1s intervals */ > + timeout =3D NHI_MAILBOX_TIMEOUT; > + while (timeout--) { > + DELAY(1000000); > + val =3D nhi_read_reg(sc, TBT_INMAILCMD); > + tb_debug(sc, DBG_MBOX|DBG_EXTRA, > + "Polling INMAILCMD=3D 0x%08x\n", val); > + if ((val & INMAILCMD_OPREQ) =3D=3D 0) > + break; > + } > + sc->hwflags &=3D ~NHI_MBOX_BUSY; > + mtx_unlock(&sc->nhi_mtx); > + > + error =3D 0; > + if (val & INMAILCMD_OPREQ) { > + tb_printf(sc, "Timeout waiting for mailbox\n"); > + error =3D ETIMEDOUT; > + } > + if (val & INMAILCMD_ERROR) { > + tb_printf(sc, "Firmware reports error in mailbox\n"); > + error =3D EINVAL; > + } > + > + return (error); > +} > + > +/* > + * Pull command status and data from the firmware mailbox. > + */ > +int > +nhi_outmail_cmd(struct nhi_softc *sc, uint32_t *val) > +{ > + > + if (val =3D=3D NULL) > + return (EINVAL); > + *val =3D nhi_read_reg(sc, TBT_OUTMAILCMD); > + return (0); > +} > + > +int > +nhi_attach(struct nhi_softc *sc) > +{ > + uint32_t val; > + int error =3D 0; > + > + if ((error =3D nhi_setup_sysctl(sc)) !=3D 0) > + return (error); > + > + mtx_init(&sc->nhi_mtx, "nhimtx", "NHI Control Mutex", MTX_DEF); > + > + nhi_configure_caps(sc); > + > + /* > + * Get the number of TX/RX paths. This sizes some of the = register > + * arrays during allocation and initialization. USB4 spec says = that > + * the max is 21. Alpine Ridge appears to default to 12. > + */ > + val =3D GET_HOST_CAPS_PATHS(nhi_read_reg(sc, NHI_HOST_CAPS)); > + tb_debug(sc, DBG_INIT|DBG_NOISY, "Total Paths=3D %d\n", val); > + if ((val =3D=3D 0) || (val > 21) || ((NHI_IS_AR(sc) && val !=3D = 12))) { > + tb_printf(sc, "WARN: unexpected number of paths: %d\n", = val); > + /* return (ENXIO); */ > + } > + sc->path_count =3D val; > + > + SLIST_INIT(&sc->ring_list); > + > + error =3D nhi_pci_configure_interrupts(sc); > + if (error =3D=3D 0) > + error =3D nhi_alloc_ring0(sc); > + if (error =3D=3D 0) { > + nhi_configure_ring(sc, sc->ring0); > + nhi_activate_ring(sc->ring0); > + nhi_fill_rx_ring(sc, sc->ring0); > + } > + > + if (error =3D=3D 0) > + error =3D tbdev_add_interface(sc); > + > + if ((error =3D=3D 0) && (NHI_USE_ICM(sc))) > + tb_printf(sc, "WARN: device uses an internal connection = manager\n"); > + if ((error =3D=3D 0) && (NHI_USE_HCM(sc))) > + ; > + error =3D hcm_attach(sc); > + > + if (error =3D=3D 0) > + error =3D nhi_init(sc); > + > + return (error); > +} > + > +int > +nhi_detach(struct nhi_softc *sc) > +{ > + > + if (NHI_USE_HCM(sc)) > + hcm_detach(sc); > + > + if (sc->root_rsc !=3D NULL) > + tb_router_detach(sc->root_rsc); > + > + tbdev_remove_interface(sc); > + > + nhi_pci_disable_interrupts(sc); > + > + nhi_free_ring0(sc); > + > + /* XXX Should the rings be marked as !VALID in the descriptors? = */ > + nhi_free_rings(sc); > + > + mtx_destroy(&sc->nhi_mtx); > + > + return (0); > +} > + > +static void > +nhi_memaddr_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int = error) > +{ > + bus_addr_t *addr; > + > + addr =3D arg; > + if (error =3D=3D 0 && nsegs =3D=3D 1) { > + *addr =3D segs[0].ds_addr; > + } else > + *addr =3D 0; > +} > + > +static int > +nhi_alloc_ring(struct nhi_softc *sc, int ringnum, int tx_depth, int = rx_depth, > + struct nhi_ring_pair **rp) > +{ > + bus_dma_template_t t; > + bus_addr_t ring_busaddr; > + struct nhi_ring_pair *r; > + int ring_size, error; > + u_int rxring_len, txring_len; > + char *ring; > + > + if (ringnum >=3D sc->max_ring_count) { > + tb_debug(sc, DBG_INIT, "Tried to allocate ring number = %d\n", > + ringnum); > + return (EINVAL); > + } > + > + /* Allocate the ring structure and the RX ring tacker together. = */ > + rxring_len =3D rx_depth * sizeof(void *); > + txring_len =3D tx_depth * sizeof(void *); > + r =3D malloc(sizeof(struct nhi_ring_pair) + rxring_len + = txring_len, > + M_NHI, M_NOWAIT|M_ZERO); > + if (r =3D=3D NULL) { > + tb_printf(sc, "ERROR: Cannot allocate ring memory\n"); > + return (ENOMEM); > + } > + > + r->sc =3D sc; > + TAILQ_INIT(&r->tx_head); > + TAILQ_INIT(&r->rx_head); > + r->ring_num =3D ringnum; > + r->tx_ring_depth =3D tx_depth; > + r->tx_ring_mask =3D tx_depth - 1; > + r->rx_ring_depth =3D rx_depth; > + r->rx_ring_mask =3D rx_depth - 1; > + r->rx_pici_reg =3D NHI_RX_RING_PICI + ringnum * 16; > + r->tx_pici_reg =3D NHI_TX_RING_PICI + ringnum * 16; > + r->rx_cmd_ring =3D (struct nhi_cmd_frame **)((uint8_t *)r + = sizeof (*r)); > + r->tx_cmd_ring =3D (struct nhi_cmd_frame **)((uint8_t = *)r->rx_cmd_ring + > + rxring_len); > + > + snprintf(r->name, NHI_RING_NAMELEN, "nhiring%d\n", ringnum); > + mtx_init(&r->mtx, r->name, "NHI Ring Lock", MTX_DEF); > + tb_debug(sc, DBG_INIT | DBG_FULL, "Allocated ring context at %p, = " > + "mutex %p\n", r, &r->mtx); > + > + /* Allocate the RX and TX buffer descriptor rings */ > + ring_size =3D sizeof(struct nhi_tx_buffer_desc) * = r->tx_ring_depth; > + ring_size +=3D sizeof(struct nhi_rx_buffer_desc) * = r->rx_ring_depth; > + tb_debug(sc, DBG_INIT | DBG_FULL, "Ring %d ring_size=3D %d\n", > + ringnum, ring_size); > + > + bus_dma_template_init(&t, sc->parent_dmat); > + t.alignment =3D 4; > + t.maxsize =3D t.maxsegsize =3D ring_size; > + t.nsegments =3D 1; > + if ((error =3D bus_dma_template_tag(&t, &r->ring_dmat)) !=3D 0) = { > + tb_printf(sc, "Cannot allocate ring %d DMA tag: %d\n", > + ringnum, error); > + return (ENOMEM); > + } > + if (bus_dmamem_alloc(r->ring_dmat, (void **)&ring, = BUS_DMA_NOWAIT, > + &r->ring_map)) { > + tb_printf(sc, "Cannot allocate ring memory\n"); > + return (ENOMEM); > + } > + bzero(ring, ring_size); > + bus_dmamap_load(r->ring_dmat, r->ring_map, ring, ring_size, > + nhi_memaddr_cb, &ring_busaddr, 0); > + > + r->ring =3D ring; > + > + r->tx_ring =3D (union nhi_ring_desc *)(ring); > + r->tx_ring_busaddr =3D ring_busaddr; > + ring +=3D sizeof(struct nhi_tx_buffer_desc) * r->tx_ring_depth; > + ring_busaddr +=3D sizeof(struct nhi_tx_buffer_desc) * = r->tx_ring_depth; > + > + r->rx_ring =3D (union nhi_ring_desc *)(ring); > + r->rx_ring_busaddr =3D ring_busaddr; > + > + tb_debug(sc, DBG_INIT | DBG_EXTRA, "Ring %d: RX %p [0x%jx] " > + "TX %p [0x%jx]\n", ringnum, r->tx_ring, r->tx_ring_busaddr, > + r->rx_ring, r->rx_ring_busaddr); > + > + *rp =3D r; > + return (0); > +} > + > +static void > +nhi_free_ring(struct nhi_ring_pair *r) > +{ > + > + tb_debug(r->sc, DBG_INIT, "Freeing ring %d resources\n", = r->ring_num); > + nhi_deactivate_ring(r); > + > + if (r->tx_ring_busaddr !=3D 0) { > + bus_dmamap_unload(r->ring_dmat, r->ring_map); > + r->tx_ring_busaddr =3D 0; > + } > + if (r->ring !=3D NULL) { > + bus_dmamem_free(r->ring_dmat, r->ring, r->ring_map); > + r->ring =3D NULL; > + } > + if (r->ring_dmat !=3D NULL) { > + bus_dma_tag_destroy(r->ring_dmat); > + r->ring_dmat =3D NULL; > + } > + mtx_destroy(&r->mtx); > +} > + > +static void > +nhi_free_rings(struct nhi_softc *sc) > +{ > + struct nhi_ring_pair *r; > + > + while ((r =3D SLIST_FIRST(&sc->ring_list)) !=3D NULL) { > + nhi_free_ring(r); > + mtx_lock(&sc->nhi_mtx); > + SLIST_REMOVE_HEAD(&sc->ring_list, ring_link); > + mtx_unlock(&sc->nhi_mtx); > + free(r, M_NHI); > + } > + > + return; > +} > + > +static int > +nhi_configure_ring(struct nhi_softc *sc, struct nhi_ring_pair *ring) > +{ > + bus_addr_t busaddr; > + uint32_t val; > + int idx; > + > + idx =3D ring->ring_num * 16; > + > + /* Program the TX ring address and size */ > + busaddr =3D ring->tx_ring_busaddr; > + nhi_write_reg(sc, NHI_TX_RING_ADDR_LO + idx, busaddr & = 0xffffffff); > + nhi_write_reg(sc, NHI_TX_RING_ADDR_HI + idx, busaddr >> 32); > + nhi_write_reg(sc, NHI_TX_RING_SIZE + idx, ring->tx_ring_depth); > + nhi_write_reg(sc, NHI_TX_RING_TABLE_TIMESTAMP + idx, 0x0); > + tb_debug(sc, DBG_INIT, "TX Ring %d TX_RING_SIZE=3D 0x%x\n", > + ring->ring_num, ring->tx_ring_depth); > + > + /* Program the RX ring address and size */ > + busaddr =3D ring->rx_ring_busaddr; > + val =3D (ring->rx_buffer_size << 16) | ring->rx_ring_depth; > + nhi_write_reg(sc, NHI_RX_RING_ADDR_LO + idx, busaddr & = 0xffffffff); > + nhi_write_reg(sc, NHI_RX_RING_ADDR_HI + idx, busaddr >> 32); > + nhi_write_reg(sc, NHI_RX_RING_SIZE + idx, val); > + nhi_write_reg(sc, NHI_RX_RING_TABLE_BASE1 + idx, 0xffffffff); > + tb_debug(sc, DBG_INIT, "RX Ring %d RX_RING_SIZE=3D 0x%x\n", > + ring->ring_num, val); > + > + return (0); > +} > + > +static int > +nhi_activate_ring(struct nhi_ring_pair *ring) > +{ > + struct nhi_softc *sc =3D ring->sc; > + int idx; > + > + nhi_pci_enable_interrupt(ring); > + > + idx =3D ring->ring_num * 32; > + tb_debug(sc, DBG_INIT, "Activating ring %d at idx %d\n", > + ring->ring_num, idx); > + nhi_write_reg(sc, NHI_TX_RING_TABLE_BASE0 + idx, > + TX_TABLE_RAW | TX_TABLE_VALID); > + nhi_write_reg(sc, NHI_RX_RING_TABLE_BASE0 + idx, > + RX_TABLE_RAW | RX_TABLE_VALID); > + > + return (0); > +} > + > +static int > +nhi_deactivate_ring(struct nhi_ring_pair *r) > +{ > + struct nhi_softc *sc =3D r->sc; > + int idx; > + > + idx =3D r->ring_num * 32; > + tb_debug(sc, DBG_INIT, "Deactiving ring %d at idx %d\n", > + r->ring_num, idx); > + nhi_write_reg(sc, NHI_TX_RING_TABLE_BASE0 + idx, 0); > + nhi_write_reg(sc, NHI_RX_RING_TABLE_BASE0 + idx, 0); > + > + idx =3D r->ring_num * 16; > + tb_debug(sc, DBG_INIT, "Setting ring %d sizes to 0\n", = r->ring_num); > + nhi_write_reg(sc, NHI_TX_RING_SIZE + idx, 0); > + nhi_write_reg(sc, NHI_RX_RING_SIZE + idx, 0); > + > + return (0); > +} > + > +static int > +nhi_alloc_ring0(struct nhi_softc *sc) > +{ > + bus_addr_t frames_busaddr; > + bus_dma_template_t t; > + struct nhi_intr_tracker *trkr; > + struct nhi_ring_pair *r; > + struct nhi_cmd_frame *cmd; > + char *frames; > + int error, size, i; > + > + if ((error =3D nhi_alloc_ring(sc, 0, NHI_RING0_TX_DEPTH, > + NHI_RING0_RX_DEPTH, &r)) !=3D 0) { > + tb_printf(sc, "Error allocating control ring\n"); > + return (error); > + } > + > + r->rx_buffer_size =3D NHI_RING0_FRAME_SIZE;/* Control packets = are small */ > + > + /* Allocate the RX and TX buffers that are used for Ring0 comms = */ > + size =3D r->tx_ring_depth * NHI_RING0_FRAME_SIZE; > + size +=3D r->rx_ring_depth * NHI_RING0_FRAME_SIZE; > + > + bus_dma_template_init(&t, sc->parent_dmat); > + t.maxsize =3D t.maxsegsize =3D size; > + t.nsegments =3D 1; > + if (bus_dma_template_tag(&t, &sc->ring0_dmat)) { > + tb_printf(sc, "Error allocating control ring buffer = tag\n"); > + return (ENOMEM); > + } > + > + if (bus_dmamem_alloc(sc->ring0_dmat, (void **)&frames, = BUS_DMA_NOWAIT, > + &sc->ring0_map) !=3D 0) { > + tb_printf(sc, "Error allocating control ring memory\n"); > + return (ENOMEM); > + } > + bzero(frames, size); > + bus_dmamap_load(sc->ring0_dmat, sc->ring0_map, frames, size, > + nhi_memaddr_cb, &frames_busaddr, 0); > + sc->ring0_frames_busaddr =3D frames_busaddr; > + sc->ring0_frames =3D frames; > + > + /* Allocate the driver command trackers */ > + sc->ring0_cmds =3D malloc(sizeof(struct nhi_cmd_frame) * > + (r->tx_ring_depth + r->rx_ring_depth), M_NHI, M_NOWAIT | = M_ZERO); > + if (sc->ring0_cmds =3D=3D NULL) > + return (ENOMEM); > + > + /* Initialize the RX frames so they can be used */ > + mtx_lock(&r->mtx); > + for (i =3D 0; i < r->rx_ring_depth; i++) { > + cmd =3D &sc->ring0_cmds[i]; > + cmd->data =3D (uint32_t *)(frames + NHI_RING0_FRAME_SIZE = * i); > + cmd->data_busaddr =3D frames_busaddr + = NHI_RING0_FRAME_SIZE * i; > + cmd->flags =3D CMD_MAPPED; > + cmd->idx =3D i; > + TAILQ_INSERT_TAIL(&r->rx_head, cmd, cm_link); > + } > + > + /* Inititalize the TX frames */ > + for ( ; i < r->tx_ring_depth + r->rx_ring_depth - 1; i++) { > + cmd =3D &sc->ring0_cmds[i]; > + cmd->data =3D (uint32_t *)(frames + NHI_RING0_FRAME_SIZE = * i); > + cmd->data_busaddr =3D frames_busaddr + = NHI_RING0_FRAME_SIZE * i; > + cmd->flags =3D CMD_MAPPED; > + cmd->idx =3D i; > + nhi_free_tx_frame_locked(r, cmd); > + } > + mtx_unlock(&r->mtx); > + > + /* Do a 1:1 mapping of rings to interrupt vectors. */ > + /* XXX Should be abstracted */ > + trkr =3D &sc->intr_trackers[0]; > + trkr->ring =3D r; > + r->tracker =3D trkr; > + > + /* XXX Should be an array */ > + sc->ring0 =3D r; > + SLIST_INSERT_HEAD(&sc->ring_list, r, ring_link); > + > + return (0); > +} > + > +static void > +nhi_free_ring0(struct nhi_softc *sc) > +{ > + if (sc->ring0_cmds !=3D NULL) { > + free(sc->ring0_cmds, M_NHI); > + sc->ring0_cmds =3D NULL; > + } > + > + if (sc->ring0_frames_busaddr !=3D 0) { > + bus_dmamap_unload(sc->ring0_dmat, sc->ring0_map); > + sc->ring0_frames_busaddr =3D 0; > *** 5529 LINES SKIPPED *** From nobody Tue Sep 30 15: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 4cbhgq5XQrz69F2q; Tue, 30 Sep 2025 15:24:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbhgq1W63z3Q8q; Tue, 30 Sep 2025 15:24:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759245895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hEzWBqBUGU/QZthHu0F+rIzI6vPyNaJox0Guy66XXc4=; b=hkH0qQHKBPQLS1Zh1uC44VpT4Hg7goSc2LCSvyIqcVPBRulXsWPqlVfq+CoteZ8MGA3EmC W7R/5S3MxmUH8ECU+6a/R6DzL6L5ko7S4bVKB4L11via0JdOEaSrhjHHWty2Bh94Binrjm FaYDuPvt+HNonpvxz2QxXN/hDZnXqX/ljZDu0QTTXl8M5hJg3S0bmhfOGp04BFeh5OPt/R cDVsMuPO0rsQCYkBlUdl+Tf26MSJDbbuT/C4JXpVyL1k04lGPTkPdn0ytDlWl51Evrxk+L AnvnqbkH25sZw2o8Xzg0RsrER5wVBCtZ1U4WK2VNz0ikIpuapEjtkj/9WWxH+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759245895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hEzWBqBUGU/QZthHu0F+rIzI6vPyNaJox0Guy66XXc4=; b=yVLoWn8mK5g5hXTqGIm1NNc93HIiAyp9VfC9HnudwSYVvk7eFesJG84ot44JN23Mp90/Zh CFCBlNy0NGcD1tPX3L+yVpc3+5agadUoILIQ4H4Z5itn/FeJvBBCcj0ehggxQfZ6eDPbdt SfF0XWPGPPIq2NMzm2vZ3IfRMJGD7GwxjT2cLeZrv3CW/JB1PQneEiZg2ry1ZTcCCdNttD 36FrTA9/WB/rQ3vIKbAESs0kW2ld9q4xpJjrWGuE5HFaoeN1WDV58rzoVrYTI75lsZqlSG Xe1e4jqRm6QJiC0yGvCBIPyREXBKo/qXO7Zs2YG6cOpl/KvRqxUx1LK9odpDDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759245895; a=rsa-sha256; cv=none; b=X8QJzgusoP0Lc3GN4QQrNQFM4Kzj4ZBI4HlhfJTZho00qeTAgYvqRJG+Csi5kjJfmly/SD N8tpWTianSLHrdhLQ3cVR4KvYHOf+sAqLAsaviqaUbWs6Js/AW5W0nKbXu4PLiWmeoLJ2o +NAtpxM2jOZ+yz2rWeLjAkapAjD9R/PRjfBm/RQUSBWv37J345pOTB3wTIDtB/xuSOvZAF y8b7pSoLDQ1A16TKz9s/4MkJ+scRdvCeo6CP/Zj6CPkyHlZ2lOwCheYzKd4gO/Oz14m/Qp eoGt5FONt5PPaeich2vtxdqtKMesilDo3VPzRlwKfqPik+6H5bF1HvWkzC1RVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbhgq0jBdzj0B; Tue, 30 Sep 2025 15:24:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58UFOtoe046661; Tue, 30 Sep 2025 15:24:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58UFOtRQ046658; Tue, 30 Sep 2025 15:24:55 GMT (envelope-from git) Date: Tue, 30 Sep 2025 15:24:55 GMT Message-Id: <202509301524.58UFOtRQ046658@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Tetlow Subject: git: aa1afb69dced - main - Fix multiple security issues in OpenSSL. 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: gordon X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aa1afb69dcedfc68859815987c46997500f834c3 Auto-Submitted: auto-generated The branch main has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=aa1afb69dcedfc68859815987c46997500f834c3 commit aa1afb69dcedfc68859815987c46997500f834c3 Author: Gordon Tetlow AuthorDate: 2025-09-30 15:23:01 +0000 Commit: Gordon Tetlow CommitDate: 2025-09-30 15:23:01 +0000 Fix multiple security issues in OpenSSL. Out-of-bounds read & write in RFC 3211 KEK Unwrap (CVE-2025-9230) Timing side-channel in SM2 algorithm on 64 bit ARM (CVE-2025-9231) Out-of-bounds read in HTTP client no_proxy handling (CVE-2025-9232) Obtained from: OpenSSL Approved by: so Security: FreeBSD-SA-25:08.openssl Security: CVE-2025-9230 Security: CVE-2025-9231 Security: CVE-2025-9232 --- crypto/openssl/crypto/cms/cms_pwri.c | 2 +- crypto/openssl/crypto/ec/ecp_sm2p256.c | 101 +-------------------------------- crypto/openssl/crypto/http/http_lib.c | 1 + 3 files changed, 5 insertions(+), 99 deletions(-) diff --git a/crypto/openssl/crypto/cms/cms_pwri.c b/crypto/openssl/crypto/cms/cms_pwri.c index a7d609f83791..ee1b8aa6ed61 100644 --- a/crypto/openssl/crypto/cms/cms_pwri.c +++ b/crypto/openssl/crypto/cms/cms_pwri.c @@ -242,7 +242,7 @@ static int kek_unwrap_key(unsigned char *out, size_t *outlen, /* Check byte failure */ goto err; } - if (inlen < (size_t)(tmp[0] - 4)) { + if (inlen < 4 + (size_t)tmp[0]) { /* Invalid length value */ goto err; } diff --git a/crypto/openssl/crypto/ec/ecp_sm2p256.c b/crypto/openssl/crypto/ec/ecp_sm2p256.c index 7668b61378b6..ffb58399dfd0 100644 --- a/crypto/openssl/crypto/ec/ecp_sm2p256.c +++ b/crypto/openssl/crypto/ec/ecp_sm2p256.c @@ -56,10 +56,6 @@ ALIGN32 static const BN_ULONG def_p[P256_LIMBS] = { 0xffffffffffffffff, 0xffffffff00000000, 0xffffffffffffffff, 0xfffffffeffffffff }; -ALIGN32 static const BN_ULONG def_ord[P256_LIMBS] = { - 0x53bbf40939d54123, 0x7203df6b21c6052b, - 0xffffffffffffffff, 0xfffffffeffffffff -}; ALIGN32 static const BN_ULONG ONE[P256_LIMBS] = {1, 0, 0, 0}; @@ -177,13 +173,6 @@ static ossl_inline void ecp_sm2p256_mod_inverse(BN_ULONG* out, BN_MOD_INV(out, in, ecp_sm2p256_div_by_2, ecp_sm2p256_sub, def_p); } -/* Modular inverse mod order |out| = |in|^(-1) % |ord|. */ -static ossl_inline void ecp_sm2p256_mod_ord_inverse(BN_ULONG* out, - const BN_ULONG* in) { - BN_MOD_INV(out, in, ecp_sm2p256_div_by_2_mod_ord, ecp_sm2p256_sub_mod_ord, - def_ord); -} - /* Point double: R <- P + P */ static void ecp_sm2p256_point_double(P256_POINT *R, const P256_POINT *P) { @@ -454,52 +443,6 @@ static int ecp_sm2p256_is_affine_G(const EC_POINT *generator) } #endif -/* - * Convert Jacobian coordinate point into affine coordinate (x,y) - */ -static int ecp_sm2p256_get_affine(const EC_GROUP *group, - const EC_POINT *point, - BIGNUM *x, BIGNUM *y, BN_CTX *ctx) -{ - ALIGN32 BN_ULONG z_inv2[P256_LIMBS] = {0}; - ALIGN32 BN_ULONG z_inv3[P256_LIMBS] = {0}; - ALIGN32 BN_ULONG x_aff[P256_LIMBS] = {0}; - ALIGN32 BN_ULONG y_aff[P256_LIMBS] = {0}; - ALIGN32 BN_ULONG point_x[P256_LIMBS] = {0}; - ALIGN32 BN_ULONG point_y[P256_LIMBS] = {0}; - ALIGN32 BN_ULONG point_z[P256_LIMBS] = {0}; - - if (EC_POINT_is_at_infinity(group, point)) { - ECerr(ERR_LIB_EC, EC_R_POINT_AT_INFINITY); - return 0; - } - - if (ecp_sm2p256_bignum_field_elem(point_x, point->X) <= 0 - || ecp_sm2p256_bignum_field_elem(point_y, point->Y) <= 0 - || ecp_sm2p256_bignum_field_elem(point_z, point->Z) <= 0) { - ECerr(ERR_LIB_EC, EC_R_COORDINATES_OUT_OF_RANGE); - return 0; - } - - ecp_sm2p256_mod_inverse(z_inv3, point_z); - ecp_sm2p256_sqr(z_inv2, z_inv3); - - if (x != NULL) { - ecp_sm2p256_mul(x_aff, point_x, z_inv2); - if (!bn_set_words(x, x_aff, P256_LIMBS)) - return 0; - } - - if (y != NULL) { - ecp_sm2p256_mul(z_inv3, z_inv3, z_inv2); - ecp_sm2p256_mul(y_aff, point_y, z_inv3); - if (!bn_set_words(y, y_aff, P256_LIMBS)) - return 0; - } - - return 1; -} - /* r = sum(scalar[i]*point[i]) */ static int ecp_sm2p256_windowed_mul(const EC_GROUP *group, P256_POINT *r, @@ -689,44 +632,6 @@ static int ecp_sm2p256_field_sqr(const EC_GROUP *group, BIGNUM *r, return 1; } -static int ecp_sm2p256_inv_mod_ord(const EC_GROUP *group, BIGNUM *r, - const BIGNUM *x, BN_CTX *ctx) -{ - int ret = 0; - ALIGN32 BN_ULONG t[P256_LIMBS] = {0}; - ALIGN32 BN_ULONG out[P256_LIMBS] = {0}; - - if (bn_wexpand(r, P256_LIMBS) == NULL) { - ECerr(ERR_LIB_EC, ERR_R_BN_LIB); - goto err; - } - - if ((BN_num_bits(x) > 256) || BN_is_negative(x)) { - BIGNUM *tmp; - - if ((tmp = BN_CTX_get(ctx)) == NULL - || !BN_nnmod(tmp, x, group->order, ctx)) { - ECerr(ERR_LIB_EC, ERR_R_BN_LIB); - goto err; - } - x = tmp; - } - - if (!ecp_sm2p256_bignum_field_elem(t, x)) { - ECerr(ERR_LIB_EC, EC_R_COORDINATES_OUT_OF_RANGE); - goto err; - } - - ecp_sm2p256_mod_ord_inverse(out, t); - - if (!bn_set_words(r, out, P256_LIMBS)) - goto err; - - ret = 1; -err: - return ret; -} - const EC_METHOD *EC_GFp_sm2p256_method(void) { static const EC_METHOD ret = { @@ -747,7 +652,7 @@ const EC_METHOD *EC_GFp_sm2p256_method(void) ossl_ec_GFp_simple_point_copy, ossl_ec_GFp_simple_point_set_to_infinity, ossl_ec_GFp_simple_point_set_affine_coordinates, - ecp_sm2p256_get_affine, + ossl_ec_GFp_simple_point_get_affine_coordinates, 0, 0, 0, ossl_ec_GFp_simple_add, ossl_ec_GFp_simple_dbl, @@ -763,7 +668,7 @@ const EC_METHOD *EC_GFp_sm2p256_method(void) ecp_sm2p256_field_mul, ecp_sm2p256_field_sqr, 0 /* field_div */, - 0 /* field_inv */, + ossl_ec_GFp_simple_field_inv, 0 /* field_encode */, 0 /* field_decode */, 0 /* field_set_to_one */, @@ -779,7 +684,7 @@ const EC_METHOD *EC_GFp_sm2p256_method(void) ossl_ecdsa_simple_sign_setup, ossl_ecdsa_simple_sign_sig, ossl_ecdsa_simple_verify_sig, - ecp_sm2p256_inv_mod_ord, + 0, /* use constant‑time fallback for inverse mod order */ 0, /* blind_coordinates */ 0, /* ladder_pre */ 0, /* ladder_step */ diff --git a/crypto/openssl/crypto/http/http_lib.c b/crypto/openssl/crypto/http/http_lib.c index fcf8a69e07a8..022b8c194cbe 100644 --- a/crypto/openssl/crypto/http/http_lib.c +++ b/crypto/openssl/crypto/http/http_lib.c @@ -263,6 +263,7 @@ static int use_proxy(const char *no_proxy, const char *server) /* strip leading '[' and trailing ']' from escaped IPv6 address */ sl -= 2; strncpy(host, server + 1, sl); + host[sl] = '\0'; server = host; } From nobody Tue Sep 30 16:15:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbjnm19wqz69HpT; Tue, 30 Sep 2025 16:15:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbjnm0hpWz3j1F; Tue, 30 Sep 2025 16:15:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759248908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hLfLeVljI5G1aUSPuXI9MHeWkX0nhADdcvZIYLJqUWo=; b=JIFJI3p/LAgbtPygDe87avg54cS+JrY0KPq2SCeoxhhaCt0BSBXhhanti5emMiwOqrsi6z RIZZdNnhlCingru93fTaC4mWpfMbIwLaJhSFVmr19AIhPRfRZNJmNCzeH7365VMdDucjN0 r0mxgWZ4cb8yKj2CV2N3ni+lDym1TdVqIKRi4v15ubui684sGn4CHmfNtczoT3XlW+TKrj LjPfM9OZdFVMuWDqaHfNS1IPUi13AuO3weWARK3pbZlxvdBApAGdaSQbxU7NE0S0OraQ81 8tlYINpD4eOkf0SuTAVG5wgLJud6x8mSUfQQS2/opUZntsYuDfRbTpyNYjuShQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759248908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hLfLeVljI5G1aUSPuXI9MHeWkX0nhADdcvZIYLJqUWo=; b=Ra5egeunCgH312T3D56FqRvAGfpI509l1jxaZbfOfNa2a+TOMLXYI2vzzXlS8qBKCOrMh4 WMnMBcmIPGA8wV1uOWC7MCeDet27Giv4vScJeT8Y4wDiH5dcREnsvv4Z71TUWrnlRgjp6t fd6REd9NfWaVlncVgcwpJM2GVs7MFjqfPic/1+x3oSkYts7+dpHQy+bP80LyjlZnZqD3js EdwMriyQnyCyKDVricM7AUkN9yOBS4HFRoVanxFrae7ZknMdm8XzGrnzGMv4hH0VljRJdH tAesd0RkvRDstvjBdDELrYduSIuFSYijWk+ZMSJ5dmMpCulH8jrd6jES2NVRxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759248908; a=rsa-sha256; cv=none; b=TnYKEfB4o4PpFrs7CkanLgBjBKoN+TaJW61x8VaOMnIx9DvJqy5kKVKHDLnyM7lVlaoCKT ftFFhXdVs5WeyBfRM4fcdPWp91DCDcegIfZhh1bg+bf3AyCw0mmCMhAhrmlQkZlmfwfct+ tGQ2XAM8Z9ysU1vZ3ahQBJQIWnVWbgvu5FmPs54mjV1ndlah6Av+IqlWnikRrn4b2FayXf bfb34ondyYqenF5pCQvjaTuu/nF/55c2EQZG7J9xmsHdEL3oi6jLNk9G4v+SPPap48SqRS /Z89CiNxn/6PIWSqsvx27qaD4m43dThgDpdd2up1EkRy2bxqG55nNOaLcctKNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbjnm0HcTzkb5; Tue, 30 Sep 2025 16:15:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58UGF7J8043331; Tue, 30 Sep 2025 16:15:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58UGF7CO043328; Tue, 30 Sep 2025 16:15:07 GMT (envelope-from git) Date: Tue, 30 Sep 2025 16:15:07 GMT Message-Id: <202509301615.58UGF7CO043328@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 2bdc89535a88 - main - amd64: bump sleepq hash size to 2048 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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2bdc89535a8837347bb3b523715bba021dea4418 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=2bdc89535a8837347bb3b523715bba021dea4418 commit 2bdc89535a8837347bb3b523715bba021dea4418 Author: Mateusz Guzik AuthorDate: 2025-09-30 14:06:48 +0000 Commit: Mateusz Guzik CommitDate: 2025-09-30 16:14:55 +0000 amd64: bump sleepq hash size to 2048 This is the most contended lock type during the first hour of -j 104 poudriere. Drops significantly with the change. Note there are suspicous acquires which most likely don't need to happen, artificially exacerbating tehe problem.. --- sys/amd64/include/param.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/amd64/include/param.h b/sys/amd64/include/param.h index 5a9c3162e14c..0654bb9de790 100644 --- a/sys/amd64/include/param.h +++ b/sys/amd64/include/param.h @@ -150,6 +150,15 @@ (((va) >= kva_layout.dmap_low && (va) < kva_layout.dmap_high) || \ ((va) >= kva_layout.km_low && (va) < kva_layout.km_high)) -#define SC_TABLESIZE 1024 /* Must be power of 2. */ +/* + * Must be power of 2. + * + * Perhaps should be autosized on boot based on found ncpus. + */ +#if MAXCPU > 256 +#define SC_TABLESIZE 2048 +#else +#define SC_TABLESIZE 1024 +#endif #endif /* !_AMD64_INCLUDE_PARAM_H_ */ From nobody Tue Sep 30 17:01: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 4cbkqb1RFgz69MQv; Tue, 30 Sep 2025 17:01:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbkqb0qD9z49l0; Tue, 30 Sep 2025 17:01:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759251707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VJF3Yc+KKK73W//4nKxi/+LFtjxjgnTBWIk+kiOyez0=; b=uHbP5FxdpXh2iY1glwCLMtlFrjcgpwss4gmI07mP6feKAatKyMqNFpas6Nvf31Mq+7gAUR ThA3zBUxBbb2ABlvJ+1UeeXMLu9yDpeVnEmxFXNnKGbC82gOfaiAdpkHJfS0R7ZPHES2/1 SKkMk7YK1GC/dp1rtrECK7Y+xC3wXXyM6TO7bz7UlhD/xc15+lwaN5qcwn6eRgSpr9gREb 31O1OJRZo92mQDTZkCpQcTUZhKkJEeayCym88jG6UNKxSd0Y+7p3k0VIEaW7nxF2Yj8bHm BdurHHsYXm3iyQLleaEtTqAnaViRTiTe+mQIJjXWJzPub3Lp9TFnGG5OUqvcOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759251707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VJF3Yc+KKK73W//4nKxi/+LFtjxjgnTBWIk+kiOyez0=; b=CowD0A9OCNTc3uPIDfjPG2kho9v0CkenIj3c53NzzKwSn8PVoFOHGu/C3P84LE4iTS9uD0 uKxcoD5OblPU95AH79fNHSoYNr98uuacY0qHHIYYkUZWxGOHqzNXobukUsyoVCfAP4O/13 3NiThAQRlCu10sbnXOcSvGeGigLfp78Yoc6sXrIbdPNzbOIqrodK4G3pwa8zyoMJrgimSs chPpbMzxzbIe0oMuvbAGWbUL8+IVMJW2UWdYzYWvv9wIge7ma/Xf0t6RjSx4+dcIMTLiA5 a0rCVgaa0MiiGp+yG9Tb8CPwI5mCjQEWXw80XDPNfqGmFwvHKMkzVLCuHv0PNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759251707; a=rsa-sha256; cv=none; b=JmCtJkZQns3mT7yh3nzMYMquvif/117hqBIF5UJgZa7XqnkBk67hrXKN5UbrxbXewT7hM1 dYY1CRMXwXz5uH5jgZavhyNzcavTKcujYusUOpkonhQ2kD6cILGpgSac5eDqyk3Ttze0TI fY+3KVnmxljXzgHz4xJt0URnW+VwmBuewsdlMiXaCDhYJVUPJ7tG7kgXCfYZqlXuFelANH Th9zJP0+8k2va6WD+xCEDt1JUEhsAqwvLQuTcThJWFsCTq9hDJv8YXSTzciZFCsO7mlJeO Fwd94o4Xm1nAgngPpIW+ogGG71bOXiWQJVAg88FsZLYbbAnS6wQPKey3jIlWnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbkqb0QVHzmD2; Tue, 30 Sep 2025 17:01:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58UH1kt5035982; Tue, 30 Sep 2025 17:01:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58UH1k0q035979; Tue, 30 Sep 2025 17:01:46 GMT (envelope-from git) Date: Tue, 30 Sep 2025 17:01:46 GMT Message-Id: <202509301701.58UH1k0q035979@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: f040ee6e4078 - main - virtual_oss: Do not build if WITHOUT_CUSE is set 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: f040ee6e407832fc9f08d85cd792d1cfb8104976 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=f040ee6e407832fc9f08d85cd792d1cfb8104976 commit f040ee6e407832fc9f08d85cd792d1cfb8104976 Author: Christos Margiolis AuthorDate: 2025-09-30 17:01:37 +0000 Commit: Christos Margiolis CommitDate: 2025-09-30 17:01:37 +0000 virtual_oss: Do not build if WITHOUT_CUSE is set PR: 289920 Fixes: 9cab9fde5eda ("virtual_oss: Port to base") Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D52807 --- lib/Makefile | 4 ++-- libexec/rc/rc.d/Makefile | 7 ++++++- usr.sbin/Makefile | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/Makefile b/lib/Makefile index bf38a489911d..d43e4d395f56 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -115,8 +115,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ libz \ libzstd \ ncurses \ - nss_tacplus \ - virtual_oss + nss_tacplus # Inter-library dependencies. When the makefile for a library contains LDADD # libraries, those libraries should be listed as build order dependencies here. @@ -175,6 +174,7 @@ SUBDIR+= clang .endif SUBDIR.${MK_CUSE}+= libcuse +SUBDIR.${MK_CUSE}+= virtual_oss SUBDIR.${MK_TOOLCHAIN}+=libpe SUBDIR.${MK_DIALOG}+= libdpv libfigpar SUBDIR.${MK_FDT}+= libfdt diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile index e4c330afbab7..cd55a05f545e 100644 --- a/libexec/rc/rc.d/Makefile +++ b/libexec/rc/rc.d/Makefile @@ -75,7 +75,6 @@ CONFS= DAEMON \ ugidfw \ var \ var_run \ - virtual_oss \ watchdogd CONFGROUPS+= DEVD @@ -216,6 +215,12 @@ CCD= ccd CCDPACKAGE= ccdconfig .endif +.if ${MK_CUSE} != "no" +CONFGROUPS+= VOSS +VOSS= virtual_oss +VOSSPACKAGE= virtual_oss +.endif + .if ${MK_KERBEROS_SUPPORT} != "no" CONFGROUPS+= GSSD GSSD= gssd diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index e660c1e59157..3c5fd0973a43 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -99,7 +99,6 @@ SUBDIR= adduser \ valectl \ vigr \ vipw \ - virtual_oss \ wake \ watch \ watchdogd \ @@ -129,6 +128,7 @@ SUBDIR.${MK_BSNMP}+= bsnmpd .if ${MK_CAROOT} != "no" SUBDIR.${MK_OPENSSL}+= certctl .endif +SUBDIR.${MK_CUSE}+= virtual_oss SUBDIR.${MK_CXGBETOOL}+= cxgbetool SUBDIR.${MK_EFI}+= efivar efidp efibootmgr efitable efiwake .if ${MK_OPENSSL} != "no" From nobody Tue Sep 30 17:14: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 4cbl6c0shRz69NYW; Tue, 30 Sep 2025 17:14:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbl6b5y3nz3D8K; Tue, 30 Sep 2025 17:14:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759252487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zHrIy374vh/l0JAPHgV65iaZB3Oy0NxWjVZ/OTO/AAA=; b=GIarX+B8ByWK7fL9y8OfnBMrRCzyL6MEnJpUF4EZG+3+UTFG6l+4xUf6vAIls5nfQ+59Bv xXrPTwyFhBi0z+DScr8dnUgXPrcPNs6hY3j0TD6q/1+s9j+xx+z0G0PWvMar+1W3iEK56p xauQDtCR83pQAp/R78ccXq2cfVCVqH2W8w9BYMVJjBhfPekdAWyaWPirU+wVHv9h6/1yVM pb58Qxs8YulxRx3ydWeT/m9gQp0rByEk429W9/WL2S3jLyWreiojFECj5+gQ/6vDcc/Eu5 bx98cW6v8K1aHV+HtlFIYrvV5kxIeaPq9GoLC8JdihYIMgfw8c4FgCXM1f2GIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759252487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zHrIy374vh/l0JAPHgV65iaZB3Oy0NxWjVZ/OTO/AAA=; b=oau5J9KGwZvxVmGyyZvgKOQCzojTUh8dBDOoD201VZFkLk+YDbTqVa1M2OMb0egDoVuhDb eYjdx9OUcNBobptFdQQfWwlMiBx3WhoTVHCfifBtcD270rwdXK+En/vVAL8HJqTpDNJ0P0 kYWYyYbhJd7k/UZslhS9QMLlDSMPpX9zpwhH1nKv6spMd8l+89g+mbjyAr8+p9WXMKxd9d 6ER1be2wWrpgN8Duw9bSLqKJAvEPVFG2YvKzW9Fs37QJmuw1BMlFp5Ixu1PDdnn47EiaNm mbJ2AiSuidcwydSYGTBk7NLJOAQJ8Pj1R5NqthhdqDkFy4ctLzFnvR48NPk5JA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759252487; a=rsa-sha256; cv=none; b=Fu5notIgotoJWdQW9O57qu+lBiaVq9MRq8lrlO6IklM1a1aBtc/rRFKkI5x6B4WzVTTGi5 M9zKWDSQryYvQfHHzaZJqqjC3SCy2aBf+JPSWr76aFd8Ayq07mPs4pp7vYJJcQDsz5+Gsc Z/kDTj7j4pkARyFzZNZJF8YNQwPl7RCYw+U/jqZFxZrsWyPRxMOTlutw+CylGqVV5Y4pGY 4bOukGU3WVWajnAZquNo4sqG0Dr/d9QxeQpFcjXyFNjF3Zm/fsLe8D3TtGErElX7/jjeY2 7uS67zNa5F8SL2QmS7/LCJent46WSxD4x2ToCDiqvW73va698kv6WEI5MyoRCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbl6b5XhgzmFQ; Tue, 30 Sep 2025 17:14:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58UHElKU055419; Tue, 30 Sep 2025 17:14:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58UHElqv055416; Tue, 30 Sep 2025 17:14:47 GMT (envelope-from git) Date: Tue, 30 Sep 2025 17:14:47 GMT Message-Id: <202509301714.58UHElqv055416@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 6e4b811009d6 - main - vtnet: disable hardware TCP LRO 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6e4b811009d63f33c59d51f28fd4a030ca90843e Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=6e4b811009d63f33c59d51f28fd4a030ca90843e commit 6e4b811009d63f33c59d51f28fd4a030ca90843e Author: Michael Tuexen AuthorDate: 2025-09-29 23:58:37 +0000 Commit: Michael Tuexen CommitDate: 2025-09-30 00:03:49 +0000 vtnet: disable hardware TCP LRO by default Hardware TCP LRO results in problems in settings with IP forwarding being enabled. In case of nodes without IP forwarding, using software LRO is also beneficial in general, since it can provide better information about what was received on the wire. Therefore, disable hardware TCP LRO by default. By tuning the loader tunable, this can be changed. PR: 263229 Reviewed by: Timo Völker MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D52684 --- share/man/man4/vtnet.4 | 22 +++++++++++++++++----- sys/dev/virtio/network/if_vtnet.c | 2 +- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/share/man/man4/vtnet.4 b/share/man/man4/vtnet.4 index 636ce4cc9b60..fd41b36882a6 100644 --- a/share/man/man4/vtnet.4 +++ b/share/man/man4/vtnet.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 26, 2025 +.Dd September 30, 2025 .Dt VTNET 4 .Os .Sh NAME @@ -54,6 +54,18 @@ TCP segmentation offload (TSO), TCP large receive offload (LRO), hardware VLAN tag stripping/insertion features, a multicast hash filter, as well as Jumbo Frames (up to 9216 bytes), which can be configured via the interface MTU setting. +.Pp +Two flavors of TCP LRO are supported: +Hardware TCP LRO, which is performed by the host providing TCP segments larger +than the MTU to the guest, and Software TCP LRO, which is performed by the +network stack of the guest processing TCP segments in an optimized way. +Only one flavour of TCP LRO should be used. +Since hardware TCP LRO can have bad interactions with IP forwarding and +software TCP LRO mitigates several drawbacks of hardware TCP LRO, the default +setting is to disable hardware TCP LRO. +See the loader tunable +.Va hw.vtnet. Ns Ar X Ns Va .lro_disable . +.Pp TCP/UDP receive checksum offload cannot be configured independently for IPv4 and IPv6. Selecting an MTU larger than 1500 bytes with the @@ -94,8 +106,8 @@ This tunable disables TCP segmentation offloading. The default value is 0. .It Va hw.vtnet.lro_disable .It Va hw.vtnet. Ns Ar X Ns Va .lro_disable -This tunable disables large receive offload. -The default value is 0. +This tunable disables hardware TCP LRO. +The default value is 1. .It Va hw.vtnet.mq_disable .It Va hw.vtnet. Ns Ar X Ns Va .mq_disable This tunable disables multiqueue. @@ -119,11 +131,11 @@ This tunable sets the number of RX segments processed in one pass. The default value is 1024. .It Va hw.vtnet.lro_entry_count .It Va hw.vtnet. Ns Ar X Ns Va .lro_entry_count -This tunable sets the software LRO entry count. +This tunable sets the software TCP LRO entry count. The default value is 128, the minimum value is 8. .It Va hw.vtnet.lro_mbufq_depth .It Va hw.vtnet. Ns Ar X Ns Va .lro_mbufq_depth -This tunable sets the depth of the software LRO mbuf queue. +This tunable sets the depth of the software TCP LRO mbuf queue. The default value is 0. .It Va hw.vtnet.altq_disable This tunable disables ALTQ support, allowing the use of multiqueue instead. diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index 634ba0de2d55..471c6b3714b2 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -281,7 +281,7 @@ static int vtnet_tso_disable = 0; SYSCTL_INT(_hw_vtnet, OID_AUTO, tso_disable, CTLFLAG_RDTUN, &vtnet_tso_disable, 0, "Disables TSO"); -static int vtnet_lro_disable = 0; +static int vtnet_lro_disable = 1; SYSCTL_INT(_hw_vtnet, OID_AUTO, lro_disable, CTLFLAG_RDTUN, &vtnet_lro_disable, 0, "Disables hardware LRO"); From nobody Tue Sep 30 17:25:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cblLs1PC3z69Pw4; Tue, 30 Sep 2025 17:25:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cblLs0jPyz3FN8; Tue, 30 Sep 2025 17:25:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759253125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wt54aEwtWgr4YklODWmka5r2AZwUkmY2LJ1kjW4tsZs=; b=RwCPADUBBJ8NfXy4+3qbaWhk5r4LD0bqQGTL7gMJdz6XCB6cUBYhIvNKnDR6QekR6flpuK BgGhIUt6pxdQLgMy/DpOSku8gO11kgVXoNbcEV00HJNOnP24i6pGB8rBODG/5ry6yYQf1E qTNxbt/lN1J8QLrkx4QHwB41wlRZ/VJU6jtT19nzOF/Nuo8FhVYsktTGj31pcWKZXkH/mC N4mMoSRTxatJLUGNsIfYXpOjvRid/vJZO/Z0JrFmwpIKXH8IFr2iUlvEuy9Y5WBDpLnEk+ 21YE2Nd0gdnebFHarMbm5b44sHxK0eFYkd7H+rbXYLfH8HV/SGQNZuE2ewYEdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759253125; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wt54aEwtWgr4YklODWmka5r2AZwUkmY2LJ1kjW4tsZs=; b=Y+7IlorAtR6NuO5hORGPWi3VSI1MRxNwV0d84hltJrLaQoFq2JNzVLBTOE/dLblHhMGBvd mjC67merWirmiIyfiGp5B1qFt4gQKjW/Iqn58xIiOUlodXO906Z4zORmwwzIg2lzS8CMdA qCSNli3d31duAkiTjbkRtJ8Z9bO0H8T0vVwKIinvE2Vb+VQQOlyycOGVGqolMh2u8ke4CC xAJn108QBPDm5M0WPH6L/cdL017IkDe22Hg1ACp+QybWXKr5Y/KVV88zLtUUkwalrkKFeY 5JsfV8Pyo0AkrWn8piBbeTE/2iTl5lF930ra6z3TwRH2UDXg1f/UeXF0bnZerA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759253125; a=rsa-sha256; cv=none; b=vu5lngmFAKBWBSFba99WVXA2h56jqq/dUr+R5DED9gG5Iovh3INlwbaFgA/OryXThVQ9sH 1Rw/cQC2BO9fWtIUN+fEJhBpEDNqyVxNVZjdXK/xxenve1vSnbcJOQLXdfINXEIRY22pXb KmFkSLIZ4zPFA/JMEmSAU8NsiN697WpntUfMor8Ny9tTQFUBnOOHbpLymMFL2gdypiqG4+ N3lrc9Vq8pn7c8gA9BEy7ZKODgGaTWxWlDk3ohG54fjgkFxirJqvSXYGtng7RPjV87F39s FoPeOT0A5oHb0qEZi07cmEApDXT3VIrBWBLqYVzgjQMOO51fH1rrW0YsbGMpsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cblLs02ClzmWj; Tue, 30 Sep 2025 17:25:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58UHPONW075364; Tue, 30 Sep 2025 17:25:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58UHPO5H075362; Tue, 30 Sep 2025 17:25:24 GMT (envelope-from git) Date: Tue, 30 Sep 2025 17:25:24 GMT Message-Id: <202509301725.58UHPO5H075362@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: f45608124286 - main - namei.9: Remove duplicate WANTPARENT description 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: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f45608124286a7e0616d1d23b9506709f10c12fc Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=f45608124286a7e0616d1d23b9506709f10c12fc commit f45608124286a7e0616d1d23b9506709f10c12fc Author: Olivier Certner AuthorDate: 2025-09-30 17:05:24 +0000 Commit: Olivier Certner CommitDate: 2025-09-30 17:25:08 +0000 namei.9: Remove duplicate WANTPARENT description Fixes: 5673462af533 ("namei.9: sort operational modifiers in numerical order") MFC after: 2 days Sponsored by: The FreeBSD Foundation --- share/man/man9/namei.9 | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/share/man/man9/namei.9 b/share/man/man9/namei.9 index 5bdffce8c360..a42043587432 100644 --- a/share/man/man9/namei.9 +++ b/share/man/man9/namei.9 @@ -31,7 +31,7 @@ .\" If you integrate this manpage in another OS, I'd appreciate a note .\" - eivind@FreeBSD.org .\" -.Dd May 16, 2025 +.Dd September 30, 2025 .Dt NAMEI 9 .Os .Sh NAME @@ -206,12 +206,6 @@ This flag allows the function to return the parent (directory) vnode in an unlocked state. The parent vnode must be released separately by using .Xr vrele 9 . -.It Dv WANTPARENT -This flag allows the -.Fn namei -function to return the parent (directory) vnode in an unlocked state. -The parent vnode must be released separately by using -.Xr vrele 9 . .It Dv FAILIFEXISTS Makes the .Nm From nobody Tue Sep 30 17:35:30 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cblZY3Wj5z69QlP; Tue, 30 Sep 2025 17:35:33 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cblZY338Xz3GM3; Tue, 30 Sep 2025 17:35:33 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759253733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=w2/RgdLhLSYQnIVewohMFFk3CX3XWNtJmjWYDGyQvEQ=; b=O/nZ4c/F3l50m2RQKUeNDkJN4hmo4HFPhxsFI+BlPDGVGvuKDpHwlN5V4jC9wKmTI5RJ6j ET/p3+DihsJL2mWGWcyPTRwOFPdWhZPKfMAk/3yy0MRzYFdCUXziiYi+D7lxE0U4Bg1urV eOZqoQOrW9ItLOJzPvidFE7mCVByTzpa19GBherJyyvtkdpJUBhsBlvQ6AyIAShi1ShYz/ zpaXZm5V++F6swIx0PiwXriiWzbDdK2waycKc0CE5SjZYpSMS+XHS3mYaMoQ8mkFu0FdgK fNOt5eH5+knuRr6nH2e+PbC7mgjFAuIkp2q/2DQq2Mk4zhNNDBY+oEKP20cvkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759253733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=w2/RgdLhLSYQnIVewohMFFk3CX3XWNtJmjWYDGyQvEQ=; b=u3TQFQXZWfkAg/uzwmGxgH1pzXd4qGNCmGB+Ti7B2AV7v9H+ieV2k97qVl+3fltHwa4nYg WzrYXgNqsfTEwaP2e9SdjjerNA+2Qr4pUnDjFeRASxykW98jR/zL0iEsJit51WscsNsVCL H4g2FTVlHDNfSyg+B3oDujwlZDeE8zUhW+4i6sikYlx0Nv4/y6NTdJyjVAUUQ98xwSOTII AiZD26Dtc1IUbDGuG/duKqdhCykdZWt26UNWM2PVRwU7QP0pwh/6nCsTgf+M4LtflDaPqK DfPyMhDHrufAF8koOyg+UBAcVaN/C1dbQ+/8r4epcOKPWyCCTK4Zz1Wl33/uAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759253733; a=rsa-sha256; cv=none; b=GU31bP9guGPl53rxiStBaJpU9Z0fpOsCfKSApGB6LM25DPd1NEtILBA4puqpER8i6MhjcF P1FbqgZIrOVrilNbnzB0yIH0dKiR1/s8YDqKAtlV2TC4GlsNQ0VQg0nwAz527QbAlhiqPF /1AAs79lvtlFv1fH1x4zHXcw04/ITOjJpBzlJFQ/fqyUA1NCCHUGbMiLSRQPCp8R+8NhAi 310xqBRa7JgP/Zu4pZxukliVN4I8IcfL0VsHVawxyjhRuwdgMlB2wZu/gSov+gtvR8BKu3 +YVNG5d9N8DKkV/K9mIfJigWUhxZd3gCyRHiEiWuLN/CujTkITsBIGJ4/vM+Mg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cblZX5GXcz10RB; Tue, 30 Sep 2025 17:35:32 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Tue, 30 Sep 2025 10:35:30 -0700 From: Gleb Smirnoff To: Mateusz Guzik , Zhenlei Huang Cc: src-committers@freebsd.org, "" , "dev-commits-src-main@FreeBSD.org" Subject: Re: svn commit: r256519 - in head/sys: net netatalk netinet netinet6 netipx Message-ID: References: <201310151031.r9FAVgRP008282@svn.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Mateusz, On Mon, Sep 29, 2025 at 04:29:10PM +0200, Mateusz Guzik wrote: M> We have crashes stemming from this: M> M> panic: ifa_alloc: invalid size 16 M> M> panic() at panic+0x43/frame 0xfffffe009e777760 M> ifa_alloc() at ifa_alloc+0xd6/frame 0xfffffe009e777780 M> in6_ifadd() at in6_ifadd+0xd8/frame 0xfffffe009e7778a0 M> nd6_ra_input() at nd6_ra_input+0x1023/frame 0xfffffe009e777a80 M> icmp6_input() at icmp6_input+0x5b6/frame 0xfffffe009e777c00 M> ip6_input() at ip6_input+0xc94/frame 0xfffffe009e777ce0 M> sppp_input() at sppp_input+0x502/frame 0xfffffe009e777d70 M> pppoe_data_input() at pppoe_data_input+0x1e7/frame 0xfffffe009e777de0 M> swi_net() at swi_net+0x19b/frame 0xfffffe009e777e60 M> ithread_loop() at ithread_loop+0x266/frame 0xfffffe009e777ef0 M> fork_exit() at fork_exit+0x82/frame 0xfffffe009e777f30 M> fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe009e777f30 M> M> in6_ifadd has: M> struct in6_addr taddr; M> ifa = ifa_alloc(sizeof(taddr), M_WAITOK); M> M> should the assert be simply removed? As Zhenlei already noticed sizeof(taddr) is incorrect there. But why are you the first to catch this panic? Even before my change in 2013 this code was incorrect, it would allocate too little memory for struct ifaddr and would later lead to trashing adjacent memory. Even the function itself will immeditely read memory in front of the allocation. I guess this branch was never ever executed since export from KAME. There are two possibilities here: 1) in6ifa_ifpforlinklocal() returns NULL. Your external pppoe/sppp interface doesn't have link local address assigned, but is already receiving incoming traffic. This is what needs to be fixed. I'm not netinet6 expert enough to say what mechanism prevents other ifnet types to get into this state, but definitely there something special about yours. 2) We are hitting (prefixlen != plen0) branch. Do you see the printf "%s: wrong prefixlen for %s (prefix=%d ifid=%d)\n" before the panic? Most likely this is 1). Your interace type needs to be fixed and this function reduced of code that shall never happen. -- Gleb Smirnoff From nobody Tue Sep 30 17:39:27 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cblg646B3z69Qlg; Tue, 30 Sep 2025 17:39:30 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cblg63Dzrz3GJ2; Tue, 30 Sep 2025 17:39:30 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759253970; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gSKiPeWN8CpROQPc6hepjKTvAaIxAVhL2XhufXR1+7w=; b=dJXn5wG+qMj761GqWsHJj15guNqPk6Uc4zpKPm8F7fHqnTYaAuWpD2WPWkFFVrZ4Zl1zYm MF4HLsec+Qg8LuegnQlpUlzpqcmE+hYk2JaBRXrr9N3Ph116xbTIhb/QFz9hoqjE9Cdz5M qPb31Q6xu2yPEfkEXta1XQRhf5oWwFD1vmuF63CjnIh/6L7CC449XXvxgThh0ie/3ictBg T/2/KRRaoyWq1eJKXI5Z3GMdmb2K+iXZ12u7VQ5q+S++b2KVbSnoALL/grcm/iRrGSdVGO Ii4K7XvP9+ktGqWe/Qs8MS4Yop4vndwxHaswygoXPj5zuNFVtGQre8EXhhV7cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759253970; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gSKiPeWN8CpROQPc6hepjKTvAaIxAVhL2XhufXR1+7w=; b=pEjn3myAhetgJv1YS3IPt6a/U2TY/tJlEb0qfqWiXwrn38nIidQ6dCi7tHJ02g744OlDfs 4+OU2oVbnu1MrEQ5ishXVoCN8xkAf5KVaKfR/TlnLmh8OZZSfAz78jB+7WyvusZdjVMywK K2SJYkEVZ3Fv6DCNIERrEs09NnO9qL/iqqQ9c5Bk3oI2v8m1VToytlCKK03yZzT126YzVo +55rjpyrx3kxKqHYe5kujuImTgfg7JQfvuBUMdeqodAQlT1qgKFY88kVkueuEom344mAO4 yhAxRgkD7i5FgO5ts4bFBPfO5iQZrb2fC1E/l/3+Zq33YZIL28M7F+HaqDjCsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759253970; a=rsa-sha256; cv=none; b=PkWPsmpMF7OhGO8TL2dGIt26RA/14P00FONAdKRtGlLwWpAcZUPW9R8ujRvo5o8SIPyMIS m6J1MGdLvBcOBzKby7E2c5WAUV6Nqa5oRENMWcpt9XLrMTzEsxDeBPMyBEQCJ44X5jsnuB VR0larDnDRdqJZzpxdHqkFe+gSqWIdJw3pEsWZKk3yoEYAb7oQko+/2Phsig7y1uOz3MqJ 9NpXFwfg9Tj80YqGU1Z6oGM16K9Ie9coTIzr7x3gDSlhAgBGdasdcsEH9ClfK/1K+XLog8 BE3WLZsxaZLucCLd10JFlZMIMHUd//DFZoXvmjVXkGgzwdaMHqWJTSgosJzNyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cblg54gD2zy7C; Tue, 30 Sep 2025 17:39:29 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Tue, 30 Sep 2025 10:39:27 -0700 From: Gleb Smirnoff To: Kristof Provost , ItzBlinkzy , Kevin Irabor Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 4e7a375804e5 - main - IfAPI: Added missing accessor for if_home_vnet Message-ID: References: <202509292116.58TLGxWx078766@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202509292116.58TLGxWx078766@gitrepo.freebsd.org> Hi, On Mon, Sep 29, 2025 at 09:16:59PM +0000, Kristof Provost wrote: K> URL: https://cgit.FreeBSD.org/src/commit/?id=4e7a375804e5ad4b244ce9a035fa971cbf2f0944 K> K> commit 4e7a375804e5ad4b244ce9a035fa971cbf2f0944 K> Author: ItzBlinkzy K> AuthorDate: 2025-09-28 17:21:41 +0000 K> Commit: Kristof Provost K> CommitDate: 2025-09-29 21:15:55 +0000 K> K> IfAPI: Added missing accessor for if_home_vnet K> K> Reviewed by: kp K> Signed-off-by: Kevin Irabor So, who is the actual author of the patch kitey13579@gmail.com or ? The actual question is whether there is a driver that really needs to access this field or was this added by the logic that if a field exists in struct ifnet, a function to access it shall exist? -- Gleb Smirnoff From nobody Tue Sep 30 17:51:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cblwY6CBJz68y4H; Tue, 30 Sep 2025 17:51:09 +0000 (UTC) (envelope-from kp@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 4cblwY3CQSz3Hsj; Tue, 30 Sep 2025 17:51:09 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759254669; h=from:from:reply-to:subject:subject: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=l2Y8ZWRbnK7NLklDc/+r0qpFp6Y4oUEaUF4RdUgm6oI=; b=ReI5bH7ETSyu4F0L9tbFr3lIFuQShmQHrkvCJy7lTOFTAFS0D7voF8j8SS9/WloTFgFPkv YIcqk6lzwWn6DFBIotk8modACVJYj+qDXR0iWkvF/QFXuXPJOZ8wXxOuMUkr+JPGz0aVH8 8N0BPblemJXMiLGfUBPKIZGg/Nq/J6k2OXgJ75VjxGobaxTzsRBDriWx+3C7ECndcoZeun rLuxlzRF49DuStTxzzDgCafwf67oTdZ8xBp4fYrDy3Vk9emnBssc9bKbDtOwrp26bzdbX/ +NWKTbwYwWQZEFpTnlt2pB6hoJawIjNIT4EmnL5GJxj10JrZm5/7gi0Iu86KXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759254669; h=from:from:reply-to:subject:subject: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=l2Y8ZWRbnK7NLklDc/+r0qpFp6Y4oUEaUF4RdUgm6oI=; b=h5SeBUe/NXbjKPVGsB7YID2MMzMs8KxyFMpapawOQBAteuVlo0WN0HdGLgFP+RPRcx1znS WroL91ue+DPuW5iN7kOOXeJbq7XGrg9YGLyKS6vy9K+9Iw4GNnsJL7kKWCRCYrBFE61iYS xmfCSM8B3vnZxIrGOfdfichsU7UjvdCXN9kGav5sSF+Tl/SgCX5TcGSzw3zxKy/RMGrF3Q MyyFi1MQox6K/UfIdFue1spVKnss3SmcAdIT57UbCtOU3Sfm5F0yOUVeYUSClYPH+U5miT MovC/m+ZFZUBh90aiM8kxZCg4JWMn3YUd/BbHP9JAyA2ZIaa2xZMkxLkJFRtGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759254669; a=rsa-sha256; cv=none; b=KE33LomXux6qWy8fWFkFeLpVrUguns5+iPrSVzGUVt/d/39rBSocGBb4PT+WNNjQwRsWLa i+Om88KuKjzS6bOqj0SV/PPtXzkqMkLm9Y5fAOlv2ro9Cm2LmZdGWiS3ipCSWm9FiVN4DR wjUgRxWVAP3RT2+U9/URmepWgOlYMYpybrRFOR1546OsZh8K6+PGmHPmJ9hcfe5iq/Zy2v riIPGfxP0d8jbeYy1A61i8VrR95AmjWc67D2U46M6HTO5U0mSQYexVhqSWNVK7b78xxp18 EJwANYAqHfms9TVO1ocP2TmBdYBawmywBscZWISC9zjEZ1HeecNcnchkSeB+ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R11" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cblwY1nSHz10lT; Tue, 30 Sep 2025 17:51:09 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id AC1DF80E0; Tue, 30 Sep 2025 19:51:06 +0200 (CEST) From: Kristof Provost To: Gleb Smirnoff Cc: ItzBlinkzy , Kevin Irabor , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 4e7a375804e5 - main - IfAPI: Added missing accessor for if_home_vnet Date: Tue, 30 Sep 2025 19:51:05 +0200 X-Mailer: MailMate (2.0r6272) Message-ID: <9E63C594-08DD-43CD-BD76-3E9B9E80AA60@FreeBSD.org> In-Reply-To: References: <202509292116.58TLGxWx078766@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; markup=markdown Content-Transfer-Encoding: quoted-printable On 30 Sep 2025, at 19:39, Gleb Smirnoff wrote: > On Mon, Sep 29, 2025 at 09:16:59PM +0000, Kristof Provost wrote: > K> URL: https://cgit.FreeBSD.org/src/commit/?id=3D4e7a375804e5ad4b244ce= 9a035fa971cbf2f0944 > K> > K> commit 4e7a375804e5ad4b244ce9a035fa971cbf2f0944 > K> Author: ItzBlinkzy > K> AuthorDate: 2025-09-28 17:21:41 +0000 > K> Commit: Kristof Provost > K> CommitDate: 2025-09-29 21:15:55 +0000 > K> > K> IfAPI: Added missing accessor for if_home_vnet > K> > K> Reviewed by: kp > K> Signed-off-by: Kevin Irabor > > So, who is the actual author of the patch kitey13579@gmail.com or > ? > I=E2=80=99d assume they=E2=80=99re the same person, but yeah, it=E2=80=99= s not ideal. I pulled this from GitHub and missed the discrepancy. > The actual question is whether there is a driver that really needs to a= ccess > this field or was this added by the logic that if a field exists in str= uct > ifnet, a function to access it shall exist? > It=E2=80=99s hard to predict what fields will be relevant for out-of-tree= consumers, but it seems reasonable to allow access to this one given we = already allow the current vnet to be accessed too. Best regards, Kristof From nobody Tue Sep 30 18:11: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 4cbmMh4xHWz690wZ; Tue, 30 Sep 2025 18:11:12 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbmMh34myz3KVL; Tue, 30 Sep 2025 18:11:12 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759255872; h=from:from:reply-to:subject:subject: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=ZmfxV/6EexLIUWGuOowMzJcoAq4QFpogQTLRjzBtyRQ=; b=K8BqLYxIKpYZ2lWeXv7PuKmMgLOwuplFDcVqYAx7owQGDA31GgmfVqjb6rJwxVu80pJ+h0 zGWDXHyt3QasqDzc4rNtUj+KOYqKL1qhkYjuMaMEDRmvqmta14yHqrYScTocEc2Md5YX7k pKp52UdoM1DJMqB8csOP5gAh5v6pCZxU+lvQ7wjcyCkXaGGw8uRfEMqTXzpaPTJWWj/8Of 3OkTOjmATUO5zETphriD8YBf7ewZ0g5C8SZTHnB5354/GaPQZAX8r0GNBvCe3sMlItuIEZ kfI4Hh6J+/hJaTWBwVeAaqvajfIEguHx3T2OTTQcxMgU/DLjfPK4FqLWZqGtQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759255872; h=from:from:reply-to:subject:subject: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=ZmfxV/6EexLIUWGuOowMzJcoAq4QFpogQTLRjzBtyRQ=; b=XFW8jkI7E9F8Ng3P+mcGLstbmBVZ7D8rbhEQPc1HnGkRvs8Bz9yl32PAG+tSJCZOczDvtT WQc27KgCcENilb3fmnrQhZWeTpkqMgKqPQS4I4ktR+jHGod8NztKq1wSqApJcaAKQn+M2w LsugToCkawd2VbiQXpXM+jdnU0c1jMTs4wlW3eE1thtMevamHIdiZJYtABGlSGs8rDjERP IqbBmR+1jd3EWs8yHu1JzeWcaoIH7y1yCqRnrsX54vZWqGtNoKREe1UCuJpCw2M9WVLCw4 3P0kxZOWCtwKkQCMloj/EY0+iq+Zx8SJkGlTly4vAd4ekbDcDj0L20Z6dCx96Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759255872; a=rsa-sha256; cv=none; b=EqoJ8XEabGu2cCgn6lm8ze+dCsIc3uzycAHWe6eET3YN/9ldyrPVH6kCydu0exvPEOzF3g 5Ucpme3f8r6XdNp5/QOc1L8aFSFE2KiVAD86r4cpGhDs7DPuYR6Prv9CcowETvgmbtl9p0 Oww80gvqERAXXHMsLMSAwJfbkay5413g1EIY3rvODgqRFFSYsWz3QrWkHMPjF4flq6k6hW ug7ERUlDPcf9yQoVLslrCNMd7b9QhRVmsWTo9S5o2E8xtRRIOLf2lqGHN/g6VGaKW70UGn LnIdWqtIviAGUnMsJf+q1KqaURntnTo3KNa4Lw+HtaZHYmI1uBIq3WcZWV5LJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cbmMg4zH4z10WB; Tue, 30 Sep 2025 18:11:11 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Tue, 30 Sep 2025 11:11:09 -0700 From: Gleb Smirnoff To: Kristof Provost Cc: ItzBlinkzy , Kevin Irabor , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 4e7a375804e5 - main - IfAPI: Added missing accessor for if_home_vnet Message-ID: References: <202509292116.58TLGxWx078766@gitrepo.freebsd.org> <9E63C594-08DD-43CD-BD76-3E9B9E80AA60@FreeBSD.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9E63C594-08DD-43CD-BD76-3E9B9E80AA60@FreeBSD.org> On Tue, Sep 30, 2025 at 07:51:05PM +0200, Kristof Provost wrote: K> > The actual question is whether there is a driver that really needs to access K> > this field or was this added by the logic that if a field exists in struct K> > ifnet, a function to access it shall exist? K> > K> It’s hard to predict what fields will be relevant for out-of-tree consumers, but it seems reasonable to allow access to this one given we already allow the current vnet to be accessed too. As we discussed earlier through the last decade, the ifnet is poorly designed and we need a new API. But as that was a heavy weight to lift, that was never finished. Juniper came with a plan to provide accessors. They would not make API any better or prettier, but would basically provide binary compatibility for a case when struct ifnet grows or is rearranged but all existing fields remain! We agreed that this is an interim step towards a better API in a future. The Juniper's API shall provide access to minimal set of ifnet fields that current drivers use. It should not encourage use of fields that belong to the stack, not to the drivers. So, the question is what is the driver that needs if_home_vnet? Who is maintaining it and what are they going to do if I remove if_home_vnet together with if_vmove? -- Gleb Smirnoff From nobody Tue Sep 30 19:15:41 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbnpC27Dgz696qm; Tue, 30 Sep 2025 19:15:47 +0000 (UTC) (envelope-from fluffy@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 4cbnpC1dCpz3TpZ; Tue, 30 Sep 2025 19:15:47 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759259747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=H3LRSohYchqejY3JYtVh49BWcs3MYvFs7DE0BaGUFXs=; b=Zr133/AGfjCrnvQ0YiZCp1V1W+7g58pHXK109Ac8aClzajSgSpEVAWgr7sg9WAarZuYxYk wFUEYKZGN5aKmsVRXm1Q3+lN/fggtKgkNUW0bXwx+PY5WnSpiCsVwD01ai7/DiiCwT3VQP GCDNRHFJx4mrEta6tvsI4QpFkKspRlyaKzKHHlDk5Al6/U+nwID/1Gbc5XTUY2lNZ1Nf5E jweBP/j0jE7NW5HcARm0OvLRWbsTvwVm9m3YkqCeEJxRGX4I01o4/J7QN43wzD6kUpHTr4 d3v4s7Ef7kIj2/tB2T0DgAsRtrfPMfqyJfNIAyHy1fFISQx8oT6pxFtmgYuPrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759259747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=H3LRSohYchqejY3JYtVh49BWcs3MYvFs7DE0BaGUFXs=; b=WZRTauzRfnpqd4yj3SLt6IgEmIGkGrv7FiYZoymsGihQ3G4LQuG/fop0RmywXNnvsO4/C0 bO06mnW8E4zcnms4hwVd1LwvNpVFOS4ivFCzVBIcPwaxYXDikZXQa1TPgb8SYIrHLjCZn4 +qyQ+eGnpJL7iyLyNC0aVL1MsDn1pEqmT7h+ILzN0bDg2SgFJQgqjVCb+uAxuGOTNHzwPG VuxWxoFvd5e3gP+03DDpwvOuLlVnJ6QcvBR+T6p2OX1huYGxBRFPaNpHxZieBTGw9Kf7Xa +wUqFBjsxvEwEzNIG/BXqK58P+AIn3Ki4nm+3XVrdudUhdLkkwQBMQtDqpGdjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759259747; a=rsa-sha256; cv=none; b=FUaXiI0IWhzdm8Tye6JQalZ0ptKKhH0g2ZSCdBXj7w+Lj0uk7Ixd1k7y9Dr6ubydnh4Bs5 UMZvbm5pgwc6GedvE5x1jBDHLrPBHCGrtncsdrtQz8mtkGc2X6Y4OtwAGaDvMZ3UTkaAgI ifL7UfdrckRAansRspFE0LXh+D4SMOZbGPFPIfyt3NIr1U9JzmL0fNBRn80RCGoOd+OZz/ uaV28nga1jPhEfhT4BvUf0U2zKi+WCaDbXICATXPbmQaFjV8LW9VMSDrn2dj0wNRFb563L biwUy5qIV5t3DqC2QFn5n6UK+8QpJ2HZvWkeGjzRx1P1PVziJFn44YTACJ4AWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2a05:3580:e727:cd00:786b:f4a9:c57e:b2d0] (unknown [IPv6:2a05:3580:e727:cd00:786b:f4a9:c57e:b2d0]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: fluffy) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cbnpB2Pm9z121T; Tue, 30 Sep 2025 19:15:46 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Message-ID: Date: Tue, 30 Sep 2025 22:15:41 +0300 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 06afa0a55e0a - main - pkgbase: move ncurses into its own package To: Kyle Evans , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202509301222.58UCM0MP003913@gitrepo.freebsd.org> Content-Language: ru, en-GB From: Dima Panov Autocrypt: addr=fluffy@FreeBSD.org; keydata= xsFNBEp+xiUBEAD01RkOYcyzU/Fnam2FI7PPwYqW00SwVmfUHihvVniiaMwzaYzchb+mzSha NsqRgjIN/i59OBpnS25OXMLEpQP7jDJnY2xKyJN2H4qn1HPHkF9cYuqvqkm+r5459g+2ZoGY 9Sr1PA0XSzXJMSQ1nRK3cFfqlN/L2//P36U5VuOWXGZUTwr/n2B/N0HAsYsqDOdjofLg7x9z 8p8elqwJbT/O4ltg8JBVAnof+FzqefYW4CzqkHRjq/9ORiGYh14ST9ECsCaVpfdDUTor0wgp JqzCN1HsQcHqgdMmOqigWIgN7Eg4MRQU3LDCISrNJ/45zvcKUXR0RHOjnSuflYba74q58XhZ 4eCTqHeMHjA8st4IWRzy9l0V4RunnZxjOTb806jyIhdxcb2m8o5tXwsqjf0TQ7vYowDHrQ6g XlhPg4Jvvwf+BwlB2p+w7Cs/Y9QA0YHnIOIVZAwU1wv66YSI9IDL2AbnY2gQGx+dkHiC3S5L G8HcPrMcjayyThKKIi5KQsWa3snFeK5ky+cRpVEOPQfUXFOas++91v90Xe9j+lsmRofsyvuy gzoaZE2fud0kCsOgYEg+kiLPlQicNAx5IToOs8BrVFLcxmbPKuVBfbLdWsYLjXGzbXEmzV9f NDZ1r1uNmVema8YYCiNjUDZhxIfKt8nbp6cx8UgVLGRVDEfXeQARAQABzTdEaW1hIFBhbm92 IChGcmVlQlNELk9SRyBDb21taXR0ZXIpIDxmbHVmZnlARnJlZUJTRC5PUkc+wsF2BBMBAgAg BQJKfsYlAhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQ+4ugndU5jyk6dhAArHclTYjw VRjDnoRfO3Zfj9Ssab9Vrbo7DNFWeAqPE3OTCmiq9Q0fzRHzmhVyedYMm9qNA3i0J1De3KTn LanXOrBIqsmmZpSqmrp/xXdZngDLW5H6hpE0f2PeAPwxrb9uBQax8WMR7Z4STSHAP4GRjve3 0wNNS0MlawGllcs9VKRxG5PsDA8k3ACTSjdpQ76RWldORN4LA8M40yHRX377SGMzO+XsCeOw ad65GKyLrx+6Gnd3PMOjVCJCrqd04Jgqg9G0xKNImchwIZ5ulx9jAt+ixfNbY6hwslleqimr 2t5+MMqo6dRrvJ+BsR8NHt9vGi2Jy4+4smg05fR18fck0Sk4vCYyVvtvnOk3qZf0F8zJu06G cjWWC2ZbDPbmksWXFIMxoJbyVxK55xOqcFs0t12sR6gbVJb8Nb88WrQub3MgePyMF6R3Tkfa OqkjvQur1xC2AXESTxtJw1FkdGSb3UopNKgvSPHSLFW8B0LbyDxdYRTRWPGGEUhFP6tdXi5R vb1210ks2EQAqF4Cm3iRIhYgtZvQqQgMSiO9fVyeJ0U6dYGDtg2Boi+NtXKRdmtL7pRSnI3n fAbVJ05Hhd7PBnJeob6R08nHRo9DdAG7o8ToM+egUAuEsEvoRV+v4f6k3mShdxE7gG/anwVy eh3n6LGwg9KHDr1X2FODsLLxgUjOwU0ESn7GJQEQAMBTMHQgb0vcPMAiRvb357ihlh/YYA22 FXj4p3XTrDlBlRL0QCRq1I8XDeQmL3mG3s3NBtDXSefnNM06jZ3XCAfHIDBdxJJvQZZCXfvL p/JK7nnEuqoeqT6/oKs1MeZVdUnvh1nZhphs+Z6dl01GIE8YDpzT1JMD2f3G9PHChGi3Ddzq m3VdXt/87khYJkPbaf6EN5+vDthKgMjba8jwbQ+7IUPqkfnNFIZS6irZ2LYb79BLNI5JSl9l ReSfEX2d8ByQlLzuf0TS4voy3nWGeCyj6BIOMiRSxg+hZmJLYxhNkyK4GQVCt/rLT7dIfBQM syBbX0Qw2NOcfba9VgdPZBgdrawwB4/xF9SA3NB0J0lUjhjpH9iG8NxlpleEg8OSUApyFZEJ q2A/flns4kKzNH7AGYDOFORytDzA3qkgCJrZ7nzQSsdtZ2qbyAoze0tl+YrShJhOcmQBtFem omhWVeJ8T/Bw1KH8M1ihrENBTSzYzLvN18YjNP6P0Dh/7Zda5yYI8fNqd84K3Uq5xBiI0S6+ qxViw84z2tJj8TxiNqFAk7Tbeo2Ximtq7uQ9UnFRSK3jw96yi19KU9rQQZs0xUjN5gn/tF5l BZWKjwuZCkcOiI0EWHAR+ATAEsFNXcuoC9CAGK5HFW4nI4WtE3pv1KYvivlGtF1wzf0Qrhye RrmxABEBAAHCwV8EGAECAAkFAkp+xiUCGwwACgkQ+4ugndU5jymgKg//RvnI7zEDKv6nQUqK RyLawPTrCKCtQ2vSoWyTNgRB6byNS1w5wNSAMnqaESx2bdhauaxe167VEJYqgQy241yFslpC 6v/xlH25Ppos+Jg6AKaQG/JABHO6Co4tHtBbNmM+14HESxAodA4NJuEU19iIPjRhUKC8F8R9 xBmW1uLpPiljU9Km0P3EIKjAdtdZNeMLhwsbSHBwJROFrxFGiTzWNREWZoZpQxgSbHYhwYbx HEbJi1cybl9IQvSGHrysctZsxD04Jxh6ogaziiT8aV6ear6BNh008yRf61FvrinfG3USLR3i JO8aHap4QGCPjZ3cyT+DEq8/zVfDdeidTeNEhSgRKk856RcA+yAE79KYdKkvmDUiC8poAJ7F GEYHMB+g/1+LczCr2g9GYkiB/53boYfU9esYYlarxCgedCrwXv6T48FZ3xxoH3XJ2KV8K6M8 CUb04jj3kEeCwq+R6Bk2ZXrnMzyQmmn223X+Zp89B/gchH32JY8y3j7BICcoZmgMu62XNMgW I/hRgfi3JlVCne6XPj3/w00JYG7vo+eTJOflqYr3WRTPYh7DxzYtshZswHmmkZtwizUQUZzF 9dX2CM8nY7cKucEmtcnUpjGwXMOufa/DmCTlk8ggRZ0ukCUZOlIA4ILxp95sS2oqyucARv+p wMWvrqJ/LfbZexSsIjI= Organization: FreeBSD.org In-Reply-To: <202509301222.58UCM0MP003913@gitrepo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------v4jbyCKO10KbmCf40Ea9DWua" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------v4jbyCKO10KbmCf40Ea9DWua Content-Type: multipart/mixed; boundary="------------lPRjTeO2RJozQBjIZqoBsyyq"; protected-headers="v1" From: Dima Panov To: Kyle Evans , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Message-ID: Subject: Re: git: 06afa0a55e0a - main - pkgbase: move ncurses into its own package References: <202509301222.58UCM0MP003913@gitrepo.freebsd.org> In-Reply-To: <202509301222.58UCM0MP003913@gitrepo.freebsd.org> --------------lPRjTeO2RJozQBjIZqoBsyyq Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 SGVsbG8hDQoNCkl0IGZhaWxzIDooDQoNCi9vcHQvcG91ZHJpZXJlL2phaWxzLzE2MGFtZDY0 L3Vzci9zcmMvcmVsZWFzZS9wYWNrYWdlcy9nZW5lcmF0ZS11Y2wubHVhOiBmYWlsIHRvIHBh cnNlKC9vcHQvcG91ZHJpZXJlL2phaWxzLzE2MGFtZDY0L3Vzci9zcmMvcmVsZWFzZS9wYWNr YWdlcy90ZW1wbGF0ZS51Y2wpOiBlcnJvciB3aGlsZSBwYXJzaW5nIC9vcHQvcG91ZHJpZXJl L2phaWxzLzE2MGFtZDY0L3Vzci9zcmMvcmVsZWFzZS9wYWNrYWdlcy91Y2wvbmN1cnNlcy1h bGwudWNsOiBhdCB0aGUgZW5kIG9mIGNodW5rOiB1bmZpbmlzaGVkIG11bHRpbGluZSBjb21t ZW50DQoqKiogW2NyZWF0ZS13b3JsZC1wYWNrYWdlLW5jdXJzZXMtZGJnLWxpYjMyXSBFcnJv ciBjb2RlIDENCg0KDQpPbiAzMC4wOS4yMDI1IDE1OjIyLCBLeWxlIEV2YW5zIHdyb3RlOg0K PiBUaGUgYnJhbmNoIG1haW4gaGFzIGJlZW4gdXBkYXRlZCBieSBrZXZhbnM6DQo+IA0KPiBV Ukw6IGh0dHBzOi8vY2dpdC5GcmVlQlNELm9yZy9zcmMvY29tbWl0Lz9pZD0wNmFmYTBhNTVl MGFjYzAwODIzZjA4ZmUxNzMwNWRmMTM1MDJmMjM1DQo+IA0KPiBjb21taXQgMDZhZmEwYTU1 ZTBhY2MwMDgyM2YwOGZlMTczMDVkZjEzNTAyZjIzNQ0KPiBBdXRob3I6ICAgICBLeWxlIEV2 YW5zIDxrZXZhbnNARnJlZUJTRC5vcmc+DQo+IEF1dGhvckRhdGU6IDIwMjUtMDktMzAgMTI6 MjE6MzMgKzAwMDANCj4gQ29tbWl0OiAgICAgS3lsZSBFdmFucyA8a2V2YW5zQEZyZWVCU0Qu b3JnPg0KPiBDb21taXREYXRlOiAyMDI1LTA5LTMwIDEyOjIxOjMzICswMDAwDQo+IA0KPiAg ICAgIHBrZ2Jhc2U6IG1vdmUgbmN1cnNlcyBpbnRvIGl0cyBvd24gcGFja2FnZQ0KPiAgICAg IA0KPiAgICAgIFB1c2hpbmcgbmN1cnNlcyBpbnRvIGNsaWJzIGFkZHMgZXh0cmEgdXBncmFk ZSByaXNrIHRvIGEgcGFja2FnZSB0aGF0DQo+ICAgICAgb3RoZXJ3aXNlIGNvbnNpc3RzIG9m IGludGVncmFsIGxpYnMgd2l0aCBub24tdHJpdmlhbCBpbnRlcmRlcGVuZGVuY2llcy4NCj4g ICAgICANCj4gICAgICBBZGRpbmcgaXQgdG8gLXJ1bnRpbWUgd2FzIGNvbnNpZGVyZWQsIGJ1 dCB0aGUgbW92ZSB3YXMgaGlzdG9yaWNhbGx5DQo+ICAgICAgbW90aXZhdGVkIHRvIHNvbWUg ZXh0ZW50IGJ5IGFsbG93aW5nIGEgbXVjaCBzbWFsbGVyIHNldCBvZiBiYXNlIGxpYnMgdG8N Cj4gICAgICBiZSBpbnN0YWxsZWQgZm9yIHNtYWxsZXIgVk0gaW1hZ2VzIHRoYXQgZG9uJ3Qg cmVhbGx5IG5lZWQgYWxsIG9mIHRoZQ0KPiAgICAgIHJ1bnRpbWUgcGFja2FnZS4NCj4gICAg ICANCj4gICAgICBUaGlzIGFsc28gZml4ZXMgdGhlIG5jdXJzZXMgYnVpbGQgdG8gZW5zdXJl IHRoYXQgbGlibWVudXcgaXMgZ3JvdXBlZA0KPiAgICAgIHdpdGggdGhlIHJlc3Qgb2YgdGhl IG5jdXJzZXMgbGlicmFyaWVzLCB3aGljaCBkb2Vzbid0IHNlZW0gdG8gaGF2ZSBiZWVuDQo+ ICAgICAgYW4gaW50ZW50aW9uYWwgb21pc3Npb24uDQo+ICAgICAgDQo+ICAgICAgUmV2aWV3 ZWQgYnk6ICAgIGl2eQ0KPiAgICAgIE1GQyBhZnRlcjogICAgICAyIGRheXMgKHBrZ2Jhc2Ug bW92ZW1lbnQpDQo+ICAgICAgRGlmZmVyZW50aWFsIFJldmlzaW9uOiAgaHR0cHM6Ly9yZXZp ZXdzLmZyZWVic2Qub3JnL0Q1Mjc4Ng0KPiAtLS0NCj4gICBsaWIvbmN1cnNlcy9NYWtlZmls ZS5pbmMgICAgICAgICAgICAgfCAgMSArDQo+ICAgbGliL25jdXJzZXMvZm9ybS9NYWtlZmls ZSAgICAgICAgICAgIHwgIDEgLQ0KPiAgIGxpYi9uY3Vyc2VzL25jdXJzZXMvTWFrZWZpbGUg ICAgICAgICB8ICAxIC0NCj4gICBsaWIvbmN1cnNlcy9wYW5lbC9NYWtlZmlsZSAgICAgICAg ICAgfCAgMSAtDQo+ICAgbGliL25jdXJzZXMvdGluZm8vTWFrZWZpbGUgICAgICAgICAgIHwg IDEgLQ0KPiAgIHJlbGVhc2UvcGFja2FnZXMvdWNsL25jdXJzZXMtYWxsLnVjbCB8IDM5ICsr KysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKw0KPiAgIDYgZmlsZXMgY2hhbmdl ZCwgNDAgaW5zZXJ0aW9ucygrKSwgNCBkZWxldGlvbnMoLSkNCj4gDQo+IGRpZmYgLS1naXQg YS9saWIvbmN1cnNlcy9NYWtlZmlsZS5pbmMgYi9saWIvbmN1cnNlcy9NYWtlZmlsZS5pbmMN Cj4gaW5kZXggZjJlZDg0ZTJlMzhmLi5lZWE0OTkwODQ3NGMgMTAwNjQ0DQo+IC0tLSBhL2xp Yi9uY3Vyc2VzL01ha2VmaWxlLmluYw0KPiArKysgYi9saWIvbmN1cnNlcy9NYWtlZmlsZS5p bmMNCj4gQEAgLTEsNSArMSw2IEBADQo+ICAgIyBUaGlzIGlzIHRvIGluY2x1ZGUgc3JjL2xp Yi9NYWtlZmlsZS5pbmMNCj4gICANCj4gK1BBQ0tBR0U/PQluY3Vyc2VzDQo+ICAgV0FSTlM/ PQkzDQo+ICAgDQo+ICAgLmluY2x1ZGUgIi4uL01ha2VmaWxlLmluYyINCj4gZGlmZiAtLWdp dCBhL2xpYi9uY3Vyc2VzL2Zvcm0vTWFrZWZpbGUgYi9saWIvbmN1cnNlcy9mb3JtL01ha2Vm aWxlDQo+IGluZGV4IGQ0Nzc0YTVmNTFhOC4uN2Q4OTYzYjA1YWU4IDEwMDY0NA0KPiAtLS0g YS9saWIvbmN1cnNlcy9mb3JtL01ha2VmaWxlDQo+ICsrKyBiL2xpYi9uY3Vyc2VzL2Zvcm0v TWFrZWZpbGUNCj4gQEAgLTMsNyArMyw2IEBADQo+ICAgDQo+ICAgU1JDRElSPQkke05DVVJT RVNfRElSfS9mb3JtDQo+ICAgDQo+IC1QQUNLQUdFPQljbGlicw0KPiAgIExJQj0JZm9ybXcN Cj4gICBTSExJQl9NQUpPUj0JNg0KPiAgIA0KPiBkaWZmIC0tZ2l0IGEvbGliL25jdXJzZXMv bmN1cnNlcy9NYWtlZmlsZSBiL2xpYi9uY3Vyc2VzL25jdXJzZXMvTWFrZWZpbGUNCj4gaW5k ZXggNTEyYTQ1MmFkNmQwLi5iNjA3NjAyODFiMzkgMTAwNjQ0DQo+IC0tLSBhL2xpYi9uY3Vy c2VzL25jdXJzZXMvTWFrZWZpbGUNCj4gKysrIGIvbGliL25jdXJzZXMvbmN1cnNlcy9NYWtl ZmlsZQ0KPiBAQCAtMSw0ICsxLDMgQEANCj4gLVBBQ0tBR0U9CWNsaWJzDQo+ICAgU0hMSUJE SVI/PQkvbGliDQo+ICAgDQo+ICAgLmluY2x1ZGUgPHNyYy5vcHRzLm1rPg0KPiBkaWZmIC0t Z2l0IGEvbGliL25jdXJzZXMvcGFuZWwvTWFrZWZpbGUgYi9saWIvbmN1cnNlcy9wYW5lbC9N YWtlZmlsZQ0KPiBpbmRleCBhNTExMjlkZjQyZTMuLmRmYjQ3OGFhNWY1YiAxMDA2NDQNCj4g LS0tIGEvbGliL25jdXJzZXMvcGFuZWwvTWFrZWZpbGUNCj4gKysrIGIvbGliL25jdXJzZXMv cGFuZWwvTWFrZWZpbGUNCj4gQEAgLTMsNyArMyw2IEBADQo+ICAgDQo+ICAgU1JDRElSPQkk e05DVVJTRVNfRElSfS9wYW5lbA0KPiAgIA0KPiAtUEFDS0FHRT0JY2xpYnMNCj4gICBMSUI9 CXBhbmVsdw0KPiAgIFNITElCX01BSk9SPQk2DQo+ICAgDQo+IGRpZmYgLS1naXQgYS9saWIv bmN1cnNlcy90aW5mby9NYWtlZmlsZSBiL2xpYi9uY3Vyc2VzL3RpbmZvL01ha2VmaWxlDQo+ IGluZGV4IDQ3NmRmNTRiYjcyYS4uOGYwMTU1N2VkYWVlIDEwMDY0NA0KPiAtLS0gYS9saWIv bmN1cnNlcy90aW5mby9NYWtlZmlsZQ0KPiArKysgYi9saWIvbmN1cnNlcy90aW5mby9NYWtl ZmlsZQ0KPiBAQCAtMSw0ICsxLDMgQEANCj4gLVBBQ0tBR0U9CWNsaWJzDQo+ICAgU0hMSUJE SVI/PQkvbGliDQo+ICAgDQo+ICAgLmluY2x1ZGUgPHNyYy5vcHRzLm1rPg0KPiBkaWZmIC0t Z2l0IGEvcmVsZWFzZS9wYWNrYWdlcy91Y2wvbmN1cnNlcy1hbGwudWNsIGIvcmVsZWFzZS9w YWNrYWdlcy91Y2wvbmN1cnNlcy1hbGwudWNsDQo+IG5ldyBmaWxlIG1vZGUgMTAwNjQ0DQo+ IGluZGV4IDAwMDAwMDAwMDAwMC4uZGVkOTk0ZWJiM2FhDQo+IC0tLSAvZGV2L251bGwNCj4g KysrIGIvcmVsZWFzZS9wYWNrYWdlcy91Y2wvbmN1cnNlcy1hbGwudWNsDQo+IEBAIC0wLDAg KzEsMzkgQEANCj4gKy8qDQo+ICsgKiBDb3B5cmlnaHQgMjAxOC0yMDIzLDIwMjQgVGhvbWFz IEUuIERpY2tleQ0KPiArICogQ29weXJpZ2h0IDE5OTgtMjAxNywyMDE4IEZyZWUgU29mdHdh cmUgRm91bmRhdGlvbiwgSW5jLg0KPiArICoNCj4gKyAqIFBlcm1pc3Npb24gaXMgaGVyZWJ5 IGdyYW50ZWQsIGZyZWUgb2YgY2hhcmdlLCB0byBhbnkgcGVyc29uIG9idGFpbmluZyBhDQo+ ICsgKiBjb3B5IG9mIHRoaXMgc29mdHdhcmUgYW5kIGFzc29jaWF0ZWQgZG9jdW1lbnRhdGlv biBmaWxlcyAodGhlDQo+ICsgKiAiU29mdHdhcmUiKSwgdG8gZGVhbCBpbiB0aGUgU29mdHdh cmUgd2l0aG91dCByZXN0cmljdGlvbiwgaW5jbHVkaW5nDQo+ICsgKiB3aXRob3V0IGxpbWl0 YXRpb24gdGhlIHJpZ2h0cyB0byB1c2UsIGNvcHksIG1vZGlmeSwgbWVyZ2UsIHB1Ymxpc2gs DQo+ICsgKiBkaXN0cmlidXRlLCBkaXN0cmlidXRlIHdpdGggbW9kaWZpY2F0aW9ucywgc3Vi bGljZW5zZSwgYW5kL29yIHNlbGwNCj4gKyAqIGNvcGllcyBvZiB0aGUgU29mdHdhcmUsIGFu ZCB0byBwZXJtaXQgcGVyc29ucyB0byB3aG9tIHRoZSBTb2Z0d2FyZSBpcw0KPiArICogZnVy bmlzaGVkIHRvIGRvIHNvLCBzdWJqZWN0IHRvIHRoZSBmb2xsb3dpbmcgY29uZGl0aW9uczoN Cj4gKyAqDQo+ICsgKiBUaGUgYWJvdmUgY29weXJpZ2h0IG5vdGljZSBhbmQgdGhpcyBwZXJt aXNzaW9uIG5vdGljZSBzaGFsbCBiZSBpbmNsdWRlZA0KPiArICogaW4gYWxsIGNvcGllcyBv ciBzdWJzdGFudGlhbCBwb3J0aW9ucyBvZiB0aGUgU29mdHdhcmUuDQo+ICsgKg0KPiArICog VEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIsIFdJVEhPVVQgV0FSUkFOVFkgT0Yg QU5ZIEtJTkQsIEVYUFJFU1MNCj4gKyAqIE9SIElNUExJRUQsIElOQ0xVRElORyBCVVQgTk9U IExJTUlURUQgVE8gVEhFIFdBUlJBTlRJRVMgT0YNCj4gKyAqIE1FUkNIQU5UQUJJTElUWSwg RklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UgQU5EIE5PTklORlJJTkdFTUVOVC4N Cj4gKyAqIElOIE5PIEVWRU5UIFNIQUxMIFRIRSBBQk9WRSBDT1BZUklHSFQgSE9MREVSUyBC RSBMSUFCTEUgRk9SIEFOWSBDTEFJTSwNCj4gKyAqIERBTUFHRVMgT1IgT1RIRVIgTElBQklM SVRZLCBXSEVUSEVSIElOIEFOIEFDVElPTiBPRiBDT05UUkFDVCwgVE9SVCBPUg0KPiArICog T1RIRVJXSVNFLCBBUklTSU5HIEZST00sIE9VVCBPRiBPUiBJTiBDT05ORUNUSU9OIFdJVEgg VEhFIFNPRlRXQVJFIE9SDQo+ICsgKiBUSEUgVVNFIE9SIE9USEVSIERFQUxJTkdTIElOIFRI RSBTT0ZUV0FSRS4NCj4gKyAqDQo+ICsgKiBFeGNlcHQgYXMgY29udGFpbmVkIGluIHRoaXMg bm90aWNlLCB0aGUgbmFtZShzKSBvZiB0aGUgYWJvdmUgY29weXJpZ2h0DQo+ICsgKiBob2xk ZXJzIHNoYWxsIG5vdCBiZSB1c2VkIGluIGFkdmVydGlzaW5nIG9yIG90aGVyd2lzZSB0byBw cm9tb3RlIHRoZQ0KPiArICogc2FsZSwgdXNlIG9yIG90aGVyIGRlYWxpbmdzIGluIHRoaXMg U29mdHdhcmUgd2l0aG91dCBwcmlvciB3cml0dGVuDQo+ICsgKiBhdXRob3JpemF0aW9uLg0K PiArICovDQo+ICsNCj4gK2NvbW1lbnQgPSAibmN1cnNlcyB0ZXJtaW5hbCBjb250cm9sIGxp YnJhcnkiDQo+ICtkZXNjID0gPDxFT0QNCj4gK1RoZSBuY3Vyc2VzIHBhY2thZ2UgaXMgYSBz dWJyb3V0aW5lIGxpYnJhcnkgZm9yIHRlcm1pbmFsLWluZGVwZW5kZW50DQo+ICtzY3JlZW4t cGFpbnRpbmcgYW5kIGlucHV0LWV2ZW50IGhhbmRsaW5nIHdoaWNoIHByZXNlbnRzIGEgaGln aCBsZXZlbCBzY3JlZW4NCj4gK21vZGVsIHRvIHRoZSBwcm9ncmFtbWVyLiAgbmN1cnNlcyBp bXBsZW1lbnRzIHRoZSBTeXN0ZW0gViBSZWxlYXNlIDQuMCAoU1ZSNCkNCj4gK2N1cnNlcyBp bnRlcmZhY2UsIGFuZCBpcyBhbHNvIGJhY2t3YXJkIGNvbXBhdGlibGUgd2l0aCB0cmFkaXRp b25hbCBCU0QgY3Vyc2VzLg0KPiArDQo+ICtUaGlzIHBhY2thZ2Ugc2hpcHMgd2l0aCBhIGxp bWl0ZWQgdGVybWNhcCBkYXRhYmFzZSwgYnV0IGl0IGlzIGRlc2lnbmVkIHRvIHVzZQ0KPiAr YSB0ZXJtaW5mbyBkYXRhYmFzZSBwcm92aWRlZCBieSBwb3J0cywgc3VjaCBhcyBpbiBtaXNj L3Rlcm1pbmZvLWRiLg0KPiArRU9EDQo+IA0KDQotLSANClNpbmNlcmVseSwNCkRpbWEgKGZs dWZmeUBGcmVlQlNELm9yZywgaHR0cHM6Ly90Lm1lL0ZsdWZmeUJTRCwgQGZsdWZmeTptYXRy aXgtZGV2LmZyZWVic2Qub3JnKQ0KKGRlc2t0b3AsIGtkZSwgeDExLCBvZmZpY2UsIHBvcnRz LXNlY3RlYW0pQEZyZWVCU0QgdGVhbQ0KDQo= --------------lPRjTeO2RJozQBjIZqoBsyyq-- --------------v4jbyCKO10KbmCf40Ea9DWua Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEELTAsy5mEEwxvh7r8+4ugndU5jykFAmjcLF0FAwAAAAAACgkQ+4ugndU5jymn Vw//WtQ9TmYE61jDrf18RNF56D/ZhxfQz+wOuaaGk99mHLuVKAy0BoKes9tzyspANruf4yuc1Aoc cPMafali4+7poTDUf0nyTHgGFX2Ab/ZQ9eJCDeBNt/8U1qcWpajTZ4AxKoCq4YsT67DweOufH4Ma 4HcQR2WvYSBFE/SUX5FMA/+eFsyJfOj7u+izgNCc2lr4inFOSx2/7esKluSSxbpX0dolS9ygXMSQ KVMxriPISIWFeoPBk2xbCnBiTQJIHKSW1HTzjIdwW/VWN7dxw8WzmIrB88kxGTLnvwZUBnYXCL7I P/IDAwX74R9dvoLCz39DOvuWBAFWVFbelVSVxxefCO2gW8KzBXjzmAfbEWBFtYQAjduGll3nw256 SvStMi1Otfgp+II/JO8VnMGTrae6mvPTMQjQDB3fOi2UCWzi/a2/CMqYrZ+HpDZusgXxQJME4eFn lttMk/ntdxBB+Iqr2xkwnHd+wrxReLP3eWeKaIY4iRMzvLW0Gl9fMgsDH+szahvuF1QTtz0o5F0E 5XFioeZ3VlAWVlZUq0nBfgikzI4XzqYnFpSUyfXcIhQJnSERQcYF9F4fdJ0390Ym+DBDJYbAIZBm SokaXuKmzpPdk1Zi66I1C6oLYU9QEzOjjgLHKxJW4tGMKiFFdBxbd9+pDHTUsx0T1fZ9+Yoa5pLK w/s= =mZFR -----END PGP SIGNATURE----- --------------v4jbyCKO10KbmCf40Ea9DWua-- From nobody Tue Sep 30 19:22: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 4cbny54LV1z697hf; Tue, 30 Sep 2025 19:22:37 +0000 (UTC) (envelope-from mad@madpilot.net) Received: from vogon.madpilot.net (vogon.madpilot.net [159.69.1.99]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbny51YgPz3WBn; Tue, 30 Sep 2025 19:22:37 +0000 (UTC) (envelope-from mad@madpilot.net) Authentication-Results: mx1.freebsd.org; none Received: from localhost (mail [IPv6:fd5c:5351:d272::3]) by vogon.madpilot.net (Postfix) with ESMTP id 4cbnxx6k0BzLlyr; Tue, 30 Sep 2025 21:22:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=madpilot.net; h= content-transfer-encoding:content-type:content-type:in-reply-to :from:from:content-language:references:subject:subject:date:date :message-id:received; s=cyq4qetkgngm; t=1759260147; x= 1761074548; bh=x76nfHBOwOj5KsHfLzMTrf1d3BfGooz+GydIozS5iQ4=; b=W 0ranWZiEWRj6Y6u2tvYLQM7pCS+od1u94ffgaCjBm7012sHla+hB1cDhU1utMcR9 KWGn1Z+9tbkeaPPyQHoH5KUI9R8KzZ1s8M8LI0uF4Z5AGOKrwN1EQ/kFQ00yschC c+aqN9wEF6eRdMO9Xf5v2GG2Lq2THFbjWIXoGkfOiucZsek3QiNPJ5ce74kJ1dCh mIzyr5b7pncfUhfRHklvtka6gKSfmnlRGeyf4rJL75UPLZgKE+ucPN6CtxR8Uv/L S2/GwEKc7r8JP29ZXdwtPcnI54nzl+T4dWQRRP2nuqh9v3o2b0vmbhR1MTwCtbg1 vqIUAA0EXbAaqDnWKxBrw== Received: from vogon.madpilot.net ([IPv6:fd5c:5351:d272::3]) by localhost (vogon.madpilot.net [IPv6:fd5c:5351:d272::3]) (amavis, port 10026) with ESMTP id SrLHOusee8sP; Tue, 30 Sep 2025 21:22:27 +0200 (CEST) Message-ID: Date: Tue, 30 Sep 2025 21:22:26 +0200 Subject: Re: git: 2ffaca551eaf - main - snd_hda: Implement automatic redirection between associations To: Christos Margiolis , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202509301052.58UAqxgM026265@gitrepo.freebsd.org> Content-Language: en-US From: Guido Falsi Autocrypt: addr=mad@madpilot.net; keydata= xsBNBE+G+l0BCADi/WBQ0aRJfnE7LBPsM0G3m/m3Yx7OPu4iYFvS84xawmRHtCNjWIntsxuX fptkmEo3Rsw816WUrek8dxoUAYdHd+EcpBcnnDzfDH5LW/TZ4gbrFezrHPdRp7wdxi23GN80 qPwHEwXuF0X4Wy5V0OO8B6VT/nA0ADYnBDhXS52HGIJ/GCUjgqJn+phDTdCFLvrSFdmgx4Wl c0W5Z1p5cmDF9l8L/hc959AeyNf7I9dXnjekGM9gVv7UDUYzCifR3U8T0fnfdMmS8NeI9NC+ wuREpRO4lKOkTnj9TtQJRiptlhcHQiAlG1cFqs7EQo57Tqq6cxD1FycZJLuC32bGbgalABEB AAHNHkd1aWRvIEZhbHNpIDxtYWRAbWFkcGlsb3QubmV0PsLAeQQTAQgAIwIbAwIeAQIXgAUL CQgHAwUVCgkICwQWAgMBBQJS79AgAhkBAAoJEBrmhg5Wy9KTc0kH/RO64ORBlTbTHaUaOj8F Je5O5NU2Pt9Cyt5ZWBRvxntr1zPTJGKRPS9ihlIfqT4ZvEngQGp57EUyFbCpI0UWasTerImM tt5WACnGmCzUTB39UXx8Oy4b1EgWeTJQ747e/F1mQLXTNa6ijRBE9fYlTb4gAkPN88/wVV9v 3PZozKLTg16ghBzHM/P7Lk8L7clPEZChX1FTa/6eSt3nvzfCuTMZbBPJF/ph+q1KyPqRgVfh tyhu5dvgMoPz/ni41IfeSrkJTD5RXzdyGR9q4Z1NYeBsLkRjC4LxKAP5KqUsvlOUjKvO1byj ApYdMarol+IGkaSk9e3zVYAJkWKjn/ni8XbOwU0EUxB7QQEQAKFhrDceoPdK/IHDSmoj6SQY isvM7VdhcleS7E9DoEAVt7yMbf6HbbMVTTY6ckvwTWQssywLBXNVqxgc4WLJjzfUhgef+WE7 5M3+WFYlOVQLGZY/zEVgma1raYnOHNAOzeHLDmEXjbZP6vGAeDyBbGfQPpE7qGYZ7ubeT3Xw QO+PklcCrvOPj2ZPcAxGNS2xVU/LzONqCrJqLMJSIcCdsbiSP4G5PnDFHtMokaTY6OEr8OEQ fOAerhcHUa/z7Uu8YtmaqKH+QGkE/WEgaRqSiTnv0JOTD+DxehaqvoKPPZ++2NpCZMHB2i6A /xifmQwEiIjEXtcueBRzkNUQkxhqZyS13SrhocL9ydtaVPBzZatAEjUDDEJmAMLVFs45qfyh MiNapHJo2n3MW/E5omqCvEkDdWX/en3P7CK2TemeaDghMsgkNKax/z0wNo5UZCkOPOz0xpNi UilOVbkuezZZNg65741qee2lfXhQIaZ66yT7hphc/N/z3PIAtLeze4u1VR2EXAuZ2sWAdlKC NTlJMsaU/x70BV11Wd/ypnVzM68dfdQIIAj1iMFAD/lXGlEUmKXg5Ov2VQDlTntQoanCYrAg +8CttPzjrydgLZFq3hrtQmfc0se5yv1WHS69+BsUOG09RvvawUDZxUjW19kyeN9THaNRgow3 kSuArUp6zSmJABEBAAHCwF8EGAEIAAkFAlMQe0ECGwwACgkQGuaGDlbL0pMN5wgA4bCkX/qw EVC06ToeR6C2putmSWQMgpDaqrv65Hubo+QGmg2P4ewTYQQ4g6oYWS03qHxqVVWhKz7FjfrV +dH8qbCLfSgIcvdBha7ayGZVrsiuMLKGbw36fcmkZPpSDOfHcP0XH8Z+u9CWj0xUkTxAlZ/7 i6gYSUpG2JWNtdmE/X8VVEyXusCLwy0K0BI60A/4dRTIX3C4QKrJ3ZbUXegz70ynjHf+lQMZ 9IZKASoRMuS5FozPQh6abvmwZEPdf5I9riUElzvHrqJ8Bx0t3Pujdoth+yNHpnBxrtO8LkQd rQ58P0SwcaIX33T2U9pG8bhu5YVR88FQ8OQ0cEsPBpDncg== In-Reply-To: <202509301052.58UAqxgM026265@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:159.69.0.0/16, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cbny51YgPz3WBn 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 On 9/30/25 12:52, Christos Margiolis wrote: > The branch main has been updated by christos: > > URL: https://cgit.FreeBSD.org/src/commit/?id=2ffaca551eaf32c17f701762ecf29a961cf19aa4 > > commit 2ffaca551eaf32c17f701762ecf29a961cf19aa4 > Author: Christos Margiolis > AuthorDate: 2025-09-30 10:52:44 +0000 > Commit: Christos Margiolis > CommitDate: 2025-09-30 10:52:44 +0000 > > snd_hda: Implement automatic redirection between associations > > For audio to be redirected to the headphones/headset after plugging the > jack, or back to the speaker/internal mic when unplugging it, the > speaker and headphone pins need to be part of the same association > (i.e., the same PCM device). This patch makes it possible to redirect > audio even between different associations, which can reduce the need for > manual pin patching. > > The idea is that we issue a devctl_notify() from within the jack > detection callback whenever a jack is (un-)plugged to redirect audio to > the appropriate device. Then the snd.conf devd script is responsible for > using virtual_oss to change the playback/recording device to whatever > snd_hda(4) selected. The reason for requiring virtual_oss is that it has > hot-swapping support, which is necessary for jack redirection. > > Sponsored by: The FreeBSD Foundation > MFC after: 2 days > Differential Revision: https://reviews.freebsd.org/D50070 > --- > sbin/devd/Makefile | 5 +++++ > sbin/devd/devd.conf.5 | 16 +++++++++++++ > sbin/devd/snd.conf | 23 +++++++++++++++++++ > sys/dev/sound/pci/hda/hdaa.c | 53 +++++++++++++++++++++++++++++++++----------- > 4 files changed, 84 insertions(+), 13 deletions(-) > > diff --git a/sbin/devd/Makefile b/sbin/devd/Makefile > index 5d5721d16884..f65eee93dd4b 100644 > --- a/sbin/devd/Makefile > +++ b/sbin/devd/Makefile > @@ -51,6 +51,11 @@ NVMEDIR= ${DEVDDIR} > NVME+= nvmf.conf > NVMEPACKAGE= nvme-tools > > +CONFGROUPS+= SND > +SNDDIR= ${DEVDDIR} > +SND+= snd.conf > +SNDPACKAGE= snd Looks like this is causing the package building step of the build to look for a src/release/packages/ucl/snd-all.ucl file. Is it intentional to cause this to produce a new base package? Looks like in this case an ucl file for the description is needed? -- Guido Falsi From nobody Tue Sep 30 19:23:49 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbnzT67c2z697f1; Tue, 30 Sep 2025 19:23: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 4cbnzT5dqFz3WfQ; Tue, 30 Sep 2025 19:23:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759260229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=54uKhNOT/z74jUwR2NdZOvjSPcegX8xTvwXVX/YM4To=; b=oaTt4hVesYTcDv6s2FIXOBs+ZDiD7SrgBOeRzk5Oh5zOw4S+cTHABNDaxj96Vg4WWq5L9b Ds5+8roJ29m2N3BkghC5ABcl4h7L2yAxgDjPs1NK/HBnxRJ6OOoseoSuqbet0wE7bakOOz 6y4+23SAtvpIMdh9LsMCs/r0fUitoAFrABa80jFoyK8fOUEizW6Er2YLzq7nidGa0TZ/wn OOrnUNcE3CRIoapaCu4afXDdU7/8r1vW08jdspsoZqA6g/zeBWqqlbu9JkDDK4K8MNzXLt p++wS7mcRVqImIx+ZznKzQehpFEkeoghczJEa0AZ/NoN6x1okMCz6Umg0AFz+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759260229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=54uKhNOT/z74jUwR2NdZOvjSPcegX8xTvwXVX/YM4To=; b=nbd3db6Sr8xSw556HGF9tEpB36EJWJe2APfs33SjPRn5bKmzvRr2Pm01fyajx1TR/+pgoB x2xa+1RKUEZ53NYDKqkLPJbxe20srYq6HGJ+jAeG2cZ3Xp1GyjEUxHEi/5CyWHiRPZi6qU bip10KsKCzdnc4DpBThFqvK+VO0Kc8mAnP5l27ZzUeYyylHRBwqg1F7pAy3mqYf4SCywjc spHlPpj5B9gblRQoB/VOLZ42yc+GmKMIaoxslvnsjav/i2yU8aDjnvYmp76nZHhKLvF8SP xlVwH3+K95yPU1M5iVcfk9tZ9W2MD5IOyadja1orW2M3dZyiXzqAjHluTwktkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759260229; a=rsa-sha256; cv=none; b=S7NBSTEAXBpuEdLFK8tGUO+kv+dheMuiozCln+mtb52vnGmPsHJsnPsI2F/QAJ3fFxEgx3 iW25p82kUktGnQ2ini9VFEx/9tw7M41ktwnf88hvz86eEJ9qZ7cLRj6rrwYyyDL+/KX3o/ UtowNt2ffG5s58fVGmc7mlvGBfblu3lQGdqsdo0CWbK606vh9bAFfiwpQbBhPb4jY9oQda zAIp/dutq0M2hA7GboxVPFCb08+ixh8CoXzbpnzxWMT8DPWdMtq4mnMImW2DCwE+GbctzB wJs7kykRj3ntZxn8P85qLfLeQyVoY0aVIGwfSiB1vhlsZRcXxaz0NeuVncd6kw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbnzT5F3xzqDg; Tue, 30 Sep 2025 19:23:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58UJNnDw001043; Tue, 30 Sep 2025 19:23:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58UJNn79001040; Tue, 30 Sep 2025 19:23:49 GMT (envelope-from git) Date: Tue, 30 Sep 2025 19:23:49 GMT Message-Id: <202509301923.58UJNn79001040@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: fb77d8e546e1 - main - release: Use standard Azure disk image extension List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb77d8e546e1894300843600409c48596644b3b6 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fb77d8e546e1894300843600409c48596644b3b6 commit fb77d8e546e1894300843600409c48596644b3b6 Author: Ed Maste AuthorDate: 2023-02-24 18:31:26 +0000 Commit: Ed Maste CommitDate: 2025-09-30 19:16:37 +0000 release: Use standard Azure disk image extension Azure images are Microsoft VHD files which use the .vhd extension. We use the mkimg format arg "vhdf" to specify the fixed vhd format, but the extension should remain .vhd. Reviewed by: lwhsu, whu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D38761 --- release/Makefile.azure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/Makefile.azure b/release/Makefile.azure index 577221ee3899..09dcde6af636 100644 --- a/release/Makefile.azure +++ b/release/Makefile.azure @@ -39,7 +39,7 @@ azure-check-depends: .endif .for _FS in ${AZURE_FSLIST} -AZURE_IMG_${_FS}= ${.OBJDIR}/azure.${_FS}.vhdf +AZURE_IMG_${_FS}= ${.OBJDIR}/azure.${_FS}.vhd AZURE_TARGET_${_FS}= ${OSRELEASE}-${_FS}${SNAPSHOT_DATE} azure-do-upload-${_FS}: From nobody Tue Sep 30 19:25: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 4cbp0w6H2wz697fB; Tue, 30 Sep 2025 19:25:04 +0000 (UTC) (envelope-from mad@madpilot.net) Received: from vogon.madpilot.net (vogon.madpilot.net [159.69.1.99]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbp0w5QkVz3X0w; Tue, 30 Sep 2025 19:25:04 +0000 (UTC) (envelope-from mad@madpilot.net) Authentication-Results: mx1.freebsd.org; none Received: from localhost (mail [IPv6:fd5c:5351:d272::3]) by vogon.madpilot.net (Postfix) with ESMTP id 4cbp0v4bnkzLlyr; Tue, 30 Sep 2025 21:25:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=madpilot.net; h= content-transfer-encoding:content-type:content-type:in-reply-to :from:from:content-language:references:subject:subject:date:date :message-id:received; s=cyq4qetkgngm; t=1759260301; x= 1761074702; bh=e967tN4J40YzaEJSbFfQVPgySv+n8VoUF2ioFNgOwTI=; b=n xz2+ZYbujiFUl9XK6yvsGqzMvxJvKfmAEuuFjHbRmfsn0Bgj6g8SYY2XeAONKHhv XQ+XShem7SlWowHROg+inxZBBucNgGagmjtTFqiCtXmKKz1y0DmioZYlYnANEHPc 7VvAT+cEb6FesFUxlAoGUSknIoQlvpb4gY835tL3DB4QFKUxu6OaawWAf+kVPHn7 6MyM7GEwTMTY4R01uK4JJ3o8V9BsFWMcFWAJW+C+R29+aCgBj9+CE/ePS2uqByzL EzzByEIN/TWpT0u6BiFDgAZuXy7k++ORmFrXiUvpFoKSGx2/RU8iG/T5dStpclMl 7Q8N5lboO/PdlS6XWzFjQ== Received: from vogon.madpilot.net ([IPv6:fd5c:5351:d272::3]) by localhost (vogon.madpilot.net [IPv6:fd5c:5351:d272::3]) (amavis, port 10026) with ESMTP id MxDRaVz-xeKZ; Tue, 30 Sep 2025 21:25:01 +0200 (CEST) Message-ID: Date: Tue, 30 Sep 2025 21:25:00 +0200 Subject: Re: git: 06afa0a55e0a - main - pkgbase: move ncurses into its own package To: Dima Panov , Kyle Evans , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202509301222.58UCM0MP003913@gitrepo.freebsd.org> Content-Language: en-US From: Guido Falsi Autocrypt: addr=mad@madpilot.net; keydata= xsBNBE+G+l0BCADi/WBQ0aRJfnE7LBPsM0G3m/m3Yx7OPu4iYFvS84xawmRHtCNjWIntsxuX fptkmEo3Rsw816WUrek8dxoUAYdHd+EcpBcnnDzfDH5LW/TZ4gbrFezrHPdRp7wdxi23GN80 qPwHEwXuF0X4Wy5V0OO8B6VT/nA0ADYnBDhXS52HGIJ/GCUjgqJn+phDTdCFLvrSFdmgx4Wl c0W5Z1p5cmDF9l8L/hc959AeyNf7I9dXnjekGM9gVv7UDUYzCifR3U8T0fnfdMmS8NeI9NC+ wuREpRO4lKOkTnj9TtQJRiptlhcHQiAlG1cFqs7EQo57Tqq6cxD1FycZJLuC32bGbgalABEB AAHNHkd1aWRvIEZhbHNpIDxtYWRAbWFkcGlsb3QubmV0PsLAeQQTAQgAIwIbAwIeAQIXgAUL CQgHAwUVCgkICwQWAgMBBQJS79AgAhkBAAoJEBrmhg5Wy9KTc0kH/RO64ORBlTbTHaUaOj8F Je5O5NU2Pt9Cyt5ZWBRvxntr1zPTJGKRPS9ihlIfqT4ZvEngQGp57EUyFbCpI0UWasTerImM tt5WACnGmCzUTB39UXx8Oy4b1EgWeTJQ747e/F1mQLXTNa6ijRBE9fYlTb4gAkPN88/wVV9v 3PZozKLTg16ghBzHM/P7Lk8L7clPEZChX1FTa/6eSt3nvzfCuTMZbBPJF/ph+q1KyPqRgVfh tyhu5dvgMoPz/ni41IfeSrkJTD5RXzdyGR9q4Z1NYeBsLkRjC4LxKAP5KqUsvlOUjKvO1byj ApYdMarol+IGkaSk9e3zVYAJkWKjn/ni8XbOwU0EUxB7QQEQAKFhrDceoPdK/IHDSmoj6SQY isvM7VdhcleS7E9DoEAVt7yMbf6HbbMVTTY6ckvwTWQssywLBXNVqxgc4WLJjzfUhgef+WE7 5M3+WFYlOVQLGZY/zEVgma1raYnOHNAOzeHLDmEXjbZP6vGAeDyBbGfQPpE7qGYZ7ubeT3Xw QO+PklcCrvOPj2ZPcAxGNS2xVU/LzONqCrJqLMJSIcCdsbiSP4G5PnDFHtMokaTY6OEr8OEQ fOAerhcHUa/z7Uu8YtmaqKH+QGkE/WEgaRqSiTnv0JOTD+DxehaqvoKPPZ++2NpCZMHB2i6A /xifmQwEiIjEXtcueBRzkNUQkxhqZyS13SrhocL9ydtaVPBzZatAEjUDDEJmAMLVFs45qfyh MiNapHJo2n3MW/E5omqCvEkDdWX/en3P7CK2TemeaDghMsgkNKax/z0wNo5UZCkOPOz0xpNi UilOVbkuezZZNg65741qee2lfXhQIaZ66yT7hphc/N/z3PIAtLeze4u1VR2EXAuZ2sWAdlKC NTlJMsaU/x70BV11Wd/ypnVzM68dfdQIIAj1iMFAD/lXGlEUmKXg5Ov2VQDlTntQoanCYrAg +8CttPzjrydgLZFq3hrtQmfc0se5yv1WHS69+BsUOG09RvvawUDZxUjW19kyeN9THaNRgow3 kSuArUp6zSmJABEBAAHCwF8EGAEIAAkFAlMQe0ECGwwACgkQGuaGDlbL0pMN5wgA4bCkX/qw EVC06ToeR6C2putmSWQMgpDaqrv65Hubo+QGmg2P4ewTYQQ4g6oYWS03qHxqVVWhKz7FjfrV +dH8qbCLfSgIcvdBha7ayGZVrsiuMLKGbw36fcmkZPpSDOfHcP0XH8Z+u9CWj0xUkTxAlZ/7 i6gYSUpG2JWNtdmE/X8VVEyXusCLwy0K0BI60A/4dRTIX3C4QKrJ3ZbUXegz70ynjHf+lQMZ 9IZKASoRMuS5FozPQh6abvmwZEPdf5I9riUElzvHrqJ8Bx0t3Pujdoth+yNHpnBxrtO8LkQd rQ58P0SwcaIX33T2U9pG8bhu5YVR88FQ8OQ0cEsPBpDncg== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:159.69.0.0/16, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cbp0w5QkVz3X0w 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 On 9/30/25 21:15, Dima Panov wrote: > Hello! > > It fails :( > > /opt/poudriere/jails/160amd64/usr/src/release/packages/generate-ucl.lua: > fail to parse(/opt/poudriere/jails/160amd64/usr/src/release/packages/ > template.ucl): error while parsing /opt/poudriere/jails/160amd64/usr/ > src/release/packages/ucl/ncurses-all.ucl: at the end of chunk: > unfinished multiline comment > *** [create-world-package-ncurses-dbg-lib32] Error code 1 > I was able to get through this error by locally removing the comment and adding empty lines around each statement in the file. Not sure which of the two worked, but if I should guess it was removing the comment. But I have no idea why it was failing, really. After this though I stumbled on the snd issue I reported right now. > > On 30.09.2025 15:22, Kyle Evans wrote: >> The branch main has been updated by kevans: >> >> URL: https://cgit.FreeBSD.org/src/commit/? >> id=06afa0a55e0acc00823f08fe17305df13502f235 >> >> commit 06afa0a55e0acc00823f08fe17305df13502f235 >> Author:     Kyle Evans >> AuthorDate: 2025-09-30 12:21:33 +0000 >> Commit:     Kyle Evans >> CommitDate: 2025-09-30 12:21:33 +0000 >> >>      pkgbase: move ncurses into its own package >>      Pushing ncurses into clibs adds extra upgrade risk to a package that >>      otherwise consists of integral libs with non-trivial >> interdependencies. >>      Adding it to -runtime was considered, but the move was historically >>      motivated to some extent by allowing a much smaller set of base >> libs to >>      be installed for smaller VM images that don't really need all of the >>      runtime package. >>      This also fixes the ncurses build to ensure that libmenuw is grouped >>      with the rest of the ncurses libraries, which doesn't seem to >> have been >>      an intentional omission. >>      Reviewed by:    ivy >>      MFC after:      2 days (pkgbase movement) >>      Differential Revision:  https://reviews.freebsd.org/D52786 >> --- >>   lib/ncurses/Makefile.inc             |  1 + >>   lib/ncurses/form/Makefile            |  1 - >>   lib/ncurses/ncurses/Makefile         |  1 - >>   lib/ncurses/panel/Makefile           |  1 - >>   lib/ncurses/tinfo/Makefile           |  1 - >>   release/packages/ucl/ncurses-all.ucl | 39 ++++++++++++++++++++++++++ >> ++++++++++ >>   6 files changed, 40 insertions(+), 4 deletions(-) >> >> diff --git a/lib/ncurses/Makefile.inc b/lib/ncurses/Makefile.inc >> index f2ed84e2e38f..eea49908474c 100644 >> --- a/lib/ncurses/Makefile.inc >> +++ b/lib/ncurses/Makefile.inc >> @@ -1,5 +1,6 @@ >>   # This is to include src/lib/Makefile.inc >> +PACKAGE?=    ncurses >>   WARNS?=    3 >>   .include "../Makefile.inc" >> diff --git a/lib/ncurses/form/Makefile b/lib/ncurses/form/Makefile >> index d4774a5f51a8..7d8963b05ae8 100644 >> --- a/lib/ncurses/form/Makefile >> +++ b/lib/ncurses/form/Makefile >> @@ -3,7 +3,6 @@ >>   SRCDIR=    ${NCURSES_DIR}/form >> -PACKAGE=    clibs >>   LIB=    formw >>   SHLIB_MAJOR=    6 >> diff --git a/lib/ncurses/ncurses/Makefile b/lib/ncurses/ncurses/Makefile >> index 512a452ad6d0..b60760281b39 100644 >> --- a/lib/ncurses/ncurses/Makefile >> +++ b/lib/ncurses/ncurses/Makefile >> @@ -1,4 +1,3 @@ >> -PACKAGE=    clibs >>   SHLIBDIR?=    /lib >>   .include >> diff --git a/lib/ncurses/panel/Makefile b/lib/ncurses/panel/Makefile >> index a51129df42e3..dfb478aa5f5b 100644 >> --- a/lib/ncurses/panel/Makefile >> +++ b/lib/ncurses/panel/Makefile >> @@ -3,7 +3,6 @@ >>   SRCDIR=    ${NCURSES_DIR}/panel >> -PACKAGE=    clibs >>   LIB=    panelw >>   SHLIB_MAJOR=    6 >> diff --git a/lib/ncurses/tinfo/Makefile b/lib/ncurses/tinfo/Makefile >> index 476df54bb72a..8f01557edaee 100644 >> --- a/lib/ncurses/tinfo/Makefile >> +++ b/lib/ncurses/tinfo/Makefile >> @@ -1,4 +1,3 @@ >> -PACKAGE=    clibs >>   SHLIBDIR?=    /lib >>   .include >> diff --git a/release/packages/ucl/ncurses-all.ucl b/release/packages/ >> ucl/ncurses-all.ucl >> new file mode 100644 >> index 000000000000..ded994ebb3aa >> --- /dev/null >> +++ b/release/packages/ucl/ncurses-all.ucl >> @@ -0,0 +1,39 @@ >> +/* >> + * Copyright 2018-2023,2024 Thomas E. Dickey >> + * Copyright 1998-2017,2018 Free Software Foundation, Inc. >> + * >> + * Permission is hereby granted, free of charge, to any person >> obtaining a >> + * copy of this software and associated documentation files (the >> + * "Software"), to deal in the Software without restriction, including >> + * without limitation the rights to use, copy, modify, merge, publish, >> + * distribute, distribute with modifications, sublicense, and/or sell >> + * copies of the Software, and to permit persons to whom the Software is >> + * furnished to do so, subject to the following conditions: >> + * >> + * The above copyright notice and this permission notice shall be >> included >> + * in all copies or substantial portions of the Software. >> + * >> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, >> EXPRESS >> + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF >> + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND >> NONINFRINGEMENT. >> + * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY >> CLAIM, >> + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR >> + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR >> + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. >> + * >> + * Except as contained in this notice, the name(s) of the above >> copyright >> + * holders shall not be used in advertising or otherwise to promote the >> + * sale, use or other dealings in this Software without prior written >> + * authorization. >> + */ >> + >> +comment = "ncurses terminal control library" >> +desc = <> +The ncurses package is a subroutine library for terminal-independent >> +screen-painting and input-event handling which presents a high level >> screen >> +model to the programmer.  ncurses implements the System V Release 4.0 >> (SVR4) >> +curses interface, and is also backward compatible with traditional >> BSD curses. >> + >> +This package ships with a limited termcap database, but it is >> designed to use >> +a terminfo database provided by ports, such as in misc/terminfo-db. >> +EOD >> > -- Guido Falsi From nobody Tue Sep 30 19:36: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 4cbpGR5MHbz699C3; Tue, 30 Sep 2025 19:36: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 4cbpGR4GTWz3YBk; Tue, 30 Sep 2025 19:36:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759261007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=96Z8D1/fF42ug1xuUYbBujsHjjGTi9mtn4ff/x3X0rU=; b=eRb6k1tpQ3dogXzMvZi4le4QwPKZeM6BqyJap8yWSwEDuQZR//RuqsebrjueFYz6FV0w2S GVZ3f/SXvGMFdAUMT56l92KmJiobVPwJK+afWCjQWJhbsRT/DSDOycTX5hEfdDZP/5Ddp3 owFKN+MtDZS+gqAEt7CILtwNWKF8iMssSF9TuRZA9kJ3Cx+r4crUXT4O/t5cnKjpeT7IP4 QV48AeAMX1D4XQKUwH3UvDW2hkZM+1J2Lsy+IgSVNxBM4ZTH3l6A02UN9jVpVR5HvJRxrF PAkThwCpV0v1+K3si4pp/LYNuEarxtRhVaI/WyQsBJKx7xJ55fD1Fa4WDwsfuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759261007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=96Z8D1/fF42ug1xuUYbBujsHjjGTi9mtn4ff/x3X0rU=; b=ENJk0N1KJSEKkfrFKh05szaBRXFXf4xAa146y5f801ebkmrp30Y1dadHttnNfYBokR5z7+ 7BWXSpxUPsYAOeHi2AGG1Gv1lFn7PHJtx3nTv/2hh2MIq1XAhH5+zxGZ68Ca2Hp8/LQOPk 4DHkZOx/AxkOzqtqQkovoaW1uBk59klinYyjfbX1Kb1nzlNjoVNIWNOz+oecCOmQ+d+ic+ JlkZ1D3haJD/UOlfAZVbBpts1U6mH2TNRnoEdITyTntypG3hEwkHW0lJ0ce1H6iqiVDrn4 o0qVbQAJidVpCvzG55A1l+XBkAyVAJu++DgtEOnR4Be/FsUksqVIfVGmJnUWZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759261007; a=rsa-sha256; cv=none; b=Ky874bsQANQzfiBJ7PcmsMwY27N6bcQQ5tnDHqUl+jVeDceBXVFNHtYtnn0tWuOZ8gwLUP rdYZYiSvPaotLHUif7QyeMIaIKES1xXrsHYYpbjxd+4GlZJMJgNd8LoMyrBQ6p+iwR7iHl cTb23gnO2qA04XxDFA/eE4/IM5BH5IgtThUiNfMq1aEF3UrBEuMy97VnWGZ1KUJ4TZfWOq aRZzC5AwylpgmtyAzNYyE/UqveQH7PNHlDdKnW2+yUQVBUQENtUKNle8M5sMo1vn+V6lSf fr5APGG2DXeDKLQZb9smR6OD8gvBMoBhMVfn6gwx2n/4oZ38jOXvWD6ZvZObdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbpGR3KgjzqnG; Tue, 30 Sep 2025 19:36:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58UJalEr021542; Tue, 30 Sep 2025 19:36:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58UJalZY021539; Tue, 30 Sep 2025 19:36:47 GMT (envelope-from git) Date: Tue, 30 Sep 2025 19:36:47 GMT Message-Id: <202509301936.58UJalZY021539@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: df74ea7f4109 - main - packages: remove ncurses-all license text 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df74ea7f41090f38d9fa1c739029b135cd199a45 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=df74ea7f41090f38d9fa1c739029b135cd199a45 commit df74ea7f41090f38d9fa1c739029b135cd199a45 Author: Kyle Evans AuthorDate: 2025-09-30 19:34:31 +0000 Commit: Kyle Evans CommitDate: 2025-09-30 19:36:03 +0000 packages: remove ncurses-all license text The "Software" line in the license text seems to trip some kind of UCL parsing bug. Replace it with an SPDX tag and a pointer to the file for the time being. Reported by: fluffy, madpilot Fixes: 06afa0a55e0ac ("pkgbase: move ncurses into its own package") --- release/packages/ucl/ncurses-all.ucl | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/release/packages/ucl/ncurses-all.ucl b/release/packages/ucl/ncurses-all.ucl index ded994ebb3aa..c0d52e046e78 100644 --- a/release/packages/ucl/ncurses-all.ucl +++ b/release/packages/ucl/ncurses-all.ucl @@ -2,29 +2,9 @@ * Copyright 2018-2023,2024 Thomas E. Dickey * Copyright 1998-2017,2018 Free Software Foundation, Inc. * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, distribute with modifications, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: + * SPDX-License-Identifier: X11 * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR - * THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name(s) of the above copyright - * holders shall not be used in advertising or otherwise to promote the - * sale, use or other dealings in this Software without prior written - * authorization. + * See contrib/ncurses/COPYING for the full license text. */ comment = "ncurses terminal control library" From nobody Tue Sep 30 19:37:43 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbpHY2qHLz699S5; Tue, 30 Sep 2025 19:37:45 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbpHY1p0lz3YfK; Tue, 30 Sep 2025 19:37:45 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759261065; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RB8wM/6PLkpz1wjbxre/VjDjHRnEvIsZup47xbe3f50=; b=KXDjW2xJD03Z7BVuKDA+hhyTIAjmTNbD6ip+Ru/HqHdGht0NfDeXT3L1rVY0rONef3fV9k ff9Qezz6b1NghDB14dkyGQJCOseAIj9mfMn8h7ZhP3yTQPjAknyBwcbcwmpuaYPg+aX0M7 fvZUS/53xJ48G1wpgghzsPJPqOXx+G9msx0yYR3VU2zruqdivnzZzRl4PJmmmllcqH2Atx j+HnW/5vf17Uyi1tI9/OQzjNceVYxGiBdLyjw61lah4WCt+cO7bc7biwjSFIrMKx7sPo2A oMbVjyPwS6tm8V5TgYvYFsTg9ss1Zv8F5tdLnD6aDbhnkT3+tsW0UUw3iDqUGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759261065; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RB8wM/6PLkpz1wjbxre/VjDjHRnEvIsZup47xbe3f50=; b=WSqTuV8supvswlEosjjcj4LQWuUnDqNfVhPP5eSqSf8HVGpiXxIZg1dcAoLjgvvI35sjMd G8mORfcRI/ZgW+6imKcWTJbqmb3cZNMD0truh/T3aKTZ3cvQ9NnxYsHBfw5CS8V6I86bMr HiGOLGPKuU+wc4y+Yhi09L0aJtp3jKROSU3LNvkgvRWiEi7JbThakGXsW+h4oATPqAVIoz 6OefTSqptN7bQ+NN6w8QTNShgU9bLOCHpqlq73oVSJqvL2EeVQJKu4BgsQKgFfcE6oJwJO U/dtldjgCKBBypMJ/p2pLKDYNJ8+/Ci4yz/2EIcepDlX95D2E++khuWWxIE7og== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759261065; a=rsa-sha256; cv=none; b=VEKzTwnqQJaCClwUL/r41RRyk+zJAUIyZgpg4G3c0n+yN2NbWjDwKkXeCGGdrY0PZ5BXXS q0V6t3OuP9YhU4oiwdyo+qH9cwAOOBcVUldarVwOlT5NNJ8YmT40VDjEuFeUWs13cvxg+W AxzojtsPKKSjRJszwAlUGS49RSeUcdb7gnj01z0Xka5QAQ4rdH9sEy4mfDmU+dlmk4rdk9 vQe8o5CMvvF3I6hL1fFjTW6nJlRR38I4Gmf6zx3dCXh/zsFcoAKtkQ6ODYAL90FM0fLU11 COrVXj8cmUtIRA4jhSt8DOvIyGQ83Xg1VemojUIkSVg8RSM2bMCbTXiyoXSlNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cbpHX5Bnqz11gl; Tue, 30 Sep 2025 19:37:44 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: <54000d86-ae74-4f00-bba3-0df348daeef6@FreeBSD.org> Date: Tue, 30 Sep 2025 14:37:43 -0500 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 06afa0a55e0a - main - pkgbase: move ncurses into its own package To: Guido Falsi , Dima Panov , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202509301222.58UCM0MP003913@gitrepo.freebsd.org> Content-Language: en-US From: Kyle Evans In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/30/25 14:25, Guido Falsi wrote: > On 9/30/25 21:15, Dima Panov wrote: >> Hello! >> >> It fails :( >> >> /opt/poudriere/jails/160amd64/usr/src/release/packages/generate-ucl.lua: fail to parse(/opt/poudriere/jails/160amd64/usr/src/release/packages/ template.ucl): error while parsing /opt/poudriere/jails/160amd64/usr/ src/release/packages/ucl/ncurses-all.ucl: at the end of chunk: unfinished multiline comment >> *** [create-world-package-ncurses-dbg-lib32] Error code 1 >> > > I was able to get through this error by locally removing the comment and adding empty lines around each statement in the file. > > Not sure which of the two worked, but if I should guess it was removing the comment. But I have no idea why it was failing, really. > > After this though I stumbled on the snd issue I reported right now. > Sorry for the breakage, I seem to have built out of the wrong tree or something. I committed df74ea7f4109 to strip the license text and include a pointer, since it seems to trip some kind of UCL parsing bug. Thanks, Kyle Evans From nobody Tue Sep 30 19:39: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 4cbpL11wjSz699Xm for ; Tue, 30 Sep 2025 19:39:53 +0000 (UTC) (envelope-from jessicawuttig83@gmail.com) Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbpL03lRvz3b98 for ; Tue, 30 Sep 2025 19:39:52 +0000 (UTC) (envelope-from jessicawuttig83@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=kzTVZat0; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of jessicawuttig83@gmail.com designates 2a00:1450:4864:20::134 as permitted sender) smtp.mailfrom=jessicawuttig83@gmail.com Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-57ea78e0618so6462617e87.0 for ; Tue, 30 Sep 2025 12:39:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759261185; x=1759865985; darn=freebsd.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=eNjPAX9/rmEx9Bm+wC9jwGFV8nXrbbg297YXMEcY8Rk=; b=kzTVZat0eS9HrkK0cGowYiBtH9HjTJLdh+YqKcNaLVxYshb9lcyxa8PxSA3lG4xRMg i4KOmdea95rU4zhdpIkTqqW+FMAz42vKm0aFXxkRmgqGRU3HczNFYsdCAMqwbDKuBv+Y UwrQJvtiumK/TJvwbkPklkwzd7OVXfolLSiTyzRZu7Sam2Ohoe+b7DQRp2VVieyRrW2x EIm/Y8t4aZ1rMXlTR8x29LY2cDCWpLGN4SElo1/F35NG4O3cdDjPToB9pzML1/k4VAdN qyCR7s+jzYG+cPvc7r1Jmz6Fd2xcjMFhUOUi7qarm+kdB94LsQJ0oRrx7b2yZ+wCn2fn 1YfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759261185; x=1759865985; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=eNjPAX9/rmEx9Bm+wC9jwGFV8nXrbbg297YXMEcY8Rk=; b=m2TNOLwGJ0yJptDblWEUaWuOdzeMi3bDpYI2bOaRs+RTolEmAZVW9BFJa3CnGEIHkx By8fllwMkl0BO2a96RP/oQx8G2wlu1Fd+PGpZRA5Er9jTfU6qKDnC9FCRyJS53+1+4xW +ElgZgtrVXJ0IDjcrFAP1/XD++ZqVHlnsF0Td6inzWBbfSXDyWKGUpizEDUofyyDBAot +afWmPjlhm+VCptTb10bu8FPjd4ED4+D5iVuOOEj5UzRFZovrfHCU+1dc7BlBAf34gnz WiF7XIR1eQ5jWLow9OHNcwFvWqAZlxDAFzrDxAArpC9EYh19/eSezWirPNPXCCRX4TRk JnYg== X-Gm-Message-State: AOJu0Yw/AoW4NrS56YCWRMJpOKwFp1KJuRqw7PKgIJW78uABNvH+4z5b t2L7KWPJWetH3QU09aNgE6TsSt8oenx2doAP6kKDbsbKKHuXRvsL/w5CZf3MFLshGTve/vGUTEX 9Ay9r83TNda6XEsOc4GTux2u63sc+MZX9Yu4AG5JiRw== X-Gm-Gg: ASbGncv0wKsUwAgB3ksUAfavBpTyVwCnDXkGYD9Sr33TNr78QfkCFLbolmVxQ1gIjd+ K9QEdCS+3H5/9hnpKc4XQie4mEHjr1erx8ZtEcZPFxnaOiS061QgEj18Gx+SDYBt+4wfzCLXOLF lPsnCSamwTKW9kzIhv/HHM9MqqTMWyGTqPHq6/TnE9oi5j1hcyQlF0h8Esx40UD3hSGePvvSSR5 16la41jb6ehHLSAnPWq49CqO2gt37R4vCPLeIBN8iwqFuO7lBSdVWu1UdwOBaYe1a+joSN0bXVR JQ== X-Google-Smtp-Source: AGHT+IH0k1YgkbMTb4ry5VwKKXIho46VLlPpXcdvyTbIz7N4OPysEr1ekM5hKqSVNzk6CNhv7hbCsuHmf/VgLiNdSbQ= X-Received: by 2002:a05:6512:1245:b0:57e:a78d:fe33 with SMTP id 2adb3069b0e04-58af9f1f977mr224005e87.17.1759261185241; Tue, 30 Sep 2025 12:39:45 -0700 (PDT) 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 From: Jessica Wuttig Date: Tue, 30 Sep 2025 20:39:32 +0100 X-Gm-Features: AS18NWCXiD6lrDiuaLARwgC6f9DnrsWdN-HvpiGi8BZyU3YaD83F1Q7w8dKwmUE Message-ID: Subject: =?UTF-8?B?2KfZhti22YUg2YTYrdiz2KfYqCBDYW52YSBQcm8g2YXYrNin2YbZi9inINin2YTYotmG?= To: dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="000000000000037afc064009eac6" X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.992]; R_MIXED_CHARSET(0.56)[subject]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_SPAM_MEDIUM(0.33)[0.332]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_BASE64_TEXT(0.10)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MISSING_XM_UA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::134:from]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; TO_DN_NONE(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MID_RHS_MATCH_FROMTLD(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RCVD_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[] X-Rspamd-Queue-Id: 4cbpL03lRvz3b98 --000000000000037afc064009eac6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: base64 2KfZhti22YUg2KfZhNii2YYg2KXZhNmJINit2LPYp9ioIENhbnZhIFBybyDZhdis2KfZhtmL2Kcg 2LnYqNixINix2KfYqNi3INin2YTYr9i52YjYqSDYp9mE2YXYrti12LUg2YTZhNmF2LnZhNmF2YrZ hiDZiNin2YTYt9mE2KfYqA0K2YHZiiAyMDI12Iwg2YjYp9iz2KrZgdivINmF2YYg2KzZhdmK2Lkg 2KfZhNmF2LLYp9mK2Kcg2KfZhNmF2K/ZgdmI2LnYqSDYr9mI2YYg2KPZiiDYqtmD2YTZgdipLiDZ gdmKINmH2LDYpyDYp9mE2YXZgtin2YQg2YbZiNi22K0NCtmE2YMg2YPZitmB2YrYqSDYp9mE2K3Y tdmI2YQg2LnZhNmJINiv2LnZiNipINmF2KzYp9mG2YrYqSDZhNit2LPYp9ioIENhbnZhIFBybyBF ZHXYjCDZiNmF2Kcg2KfZhNiw2Yog2YrZhdmK2LLZhyDYudmGDQrYp9mE2K3Ys9in2KjYp9iqINin 2YTYo9iu2LHZidiMINmI2KfZhNiu2LfZiNin2Kog2KfZhNi52YXZhNmK2Kkg2YTZhNiq2LPYrNmK 2YQuDQpodHRwczovL3d3dy50YXJnaXIuY29tLzIwMjUvMDIvY2FudmEtcHJvLmh0bWwNCtmF2Kcg 2YfZiCBDYW52YSBQcm/Ynw0KQ2FudmEg2YXZhti12Kkg2KrYtdmF2YrZhSDZhdi02YfZiNix2Kkg 2LnYp9mE2YXZitmL2Kcg2KrYqtmK2K0g2KXZhti02KfYoSDYudix2YjYtiDYqtmC2K/ZitmF2YrY qdiMINmF2YTYtdmC2KfYqtiMINmF2YbYtNmI2LHYp9iqDQrYp9is2KrZhdin2LnZitip2Iwg2YHZ itiv2YrZiNmH2KfYqiDZiNi62YrYsSDYsNmE2YMg2KjYs9mH2YjZhNipLiDYp9mE2K3Ys9in2Kgg 2KfZhNmF2KzYp9mG2Yog2YrZiNmB2LEg2KPYr9mI2KfYqiDZiNmC2YjYp9mE2KgNCtmF2K3Yr9mI 2K/YqdiMINio2YrZhtmF2Kcg2YrZgtiv2YUgQ2FudmEgUHJvINmF2YPYqtio2Kkg2LbYrtmF2Kkg 2YXZhiDYp9mE2LXZiNixINmI2KfZhNmB2YrYr9mK2YjZh9in2KrYjCDYo9iv2YjYp9iqDQrYp9it 2KrYsdin2YHZitipINmF2KvZhCDYpdiy2KfZhNipINin2YTYrtmE2YHZitip2Iwg2YjYqtiu2LLZ itmGINiz2K3Yp9io2Yog2KjYs9i52Kkg2YPYqNmK2LHYqS4NCg0K2KPZhtmI2KfYuSDYp9mE2K3Y s9in2KjYp9iqDQoNCtin2YTYrdiz2KfYqCDYp9mE2YXYrNin2YbZijog2YrYqtmK2K0g2KfZhNmI 2LXZiNmEINmE2KLZhNin2YEg2KfZhNmC2YjYp9mE2Kgg2YjYtdmI2LEg2YjYsdiz2YjZhdin2Kog 2YXYrdiv2YjYr9ip2Iwg2YXYuSA1INis2YrYrNinDQrYqtiu2LLZitmGLiDZhdmG2KfYs9ioINmE 2YTZhdio2KrYr9im2YrZhi4NCg0KQ2FudmEgUHJvOiDZhdiv2YHZiNi5INmK2YjZgdixINij2YPY q9ixINmF2YYgMTAwINmF2YTZitmI2YYg2LXZiNix2KnYjCDZgtmI2KfZhNioINmF2KrZhdmK2LLY qdiMIDEg2KrZitix2KfYqNin2YrYqg0K2KrYrtiy2YrZhtiMINmI2KPYr9mI2KfYqiDZhdir2YQg 2KrYutmK2YrYsSDZhdmC2KfYs9in2Kog2KfZhNiq2LXZhdmK2YUuDQoNCkNhbnZhIFRlYW1zOiDZ hdi12YXZhSDZhNmE2YXYpNiz2LPYp9iq2Iwg2YXYuSDZhdiy2KfZitinINiq2LnYp9mI2YYg2YHZ iNix2Yog2YjYqtiu2LXZiti1INin2YTYudmE2KfZhdipINin2YTYqtis2KfYsdmK2KkuDQoNCkNh bnZhIFBybyBFZHU6INmF2KzYp9mG2Yog2YTZhNmF2LnZhNmF2YrZhiDZiNin2YTYt9mE2KfYqNiM INmK2K3YqtmI2Yog2LnZhNmJINis2YXZiti5INmF2YrYstin2KogQ2FudmEgUHJvDQrYqNin2YTY pdi22KfZgdipINil2YTZiSDYo9iv2YjYp9iqINiq2LnZhNmK2YXZitipLg0KDQrZg9mK2YEg2KrY rdi12YQg2LnZhNmJIENhbnZhIFBybyBFZHUg2YXYrNin2YbZi9in2J8NCuKAkyDYp9mE2KrYs9is 2YrZhCDYudio2LEg2LHYp9io2Lcg2K/YudmI2Kkg2LHYs9mF2Yog2K7Yp9i1INio2KfZhNiq2LnZ hNmK2YUuDQrigJMg2KXZhti02KfYoSDYrdiz2KfYqCDYrNiv2YrYryDYo9mIINin2LPYqtiu2K/Y p9mFINio2LHZitiv2YMg2KfZhNiq2LnZhNmK2YXZiiDYpdmGINiq2YjZgdixLg0K4oCTINio2LnY ryDZgtio2YjZhCDYp9mE2K/YudmI2KnYjCDZitiq2K3ZiNmEINit2LPYp9io2YMg2KrZhNmC2KfY ptmK2YvYpyDYpdmE2YkgQ2FudmEgUHJvIEVkdSDZhdis2KfZhtmKINio2YPYp9mF2YQNCtin2YTZ hdiy2KfZitinLg0KDQrZhdin2LDYpyDYqtit2KrYp9isINmE2YTYqtiz2KzZitmE2J8NCuKAkyDY o9mGINiq2YPZiNmGINmF2LnZhNmF2YvYpyDYo9mIINi32KfZhNio2YvYpyDYqNmF2KTYs9iz2Kkg 2KrYudmE2YrZhdmK2KkuDQrigJMg2KjYsdmK2K8g2KXZhNmD2KrYsdmI2YbZiiDZhdix2KrYqNi3 INio2KfZhNiq2LnZhNmK2YUgKNmF2KvZhCBlZHUpLg0K4oCTINin2YTYp9mG2LbZhdin2YUg2LnY qNixINix2KfYqNi3INiv2LnZiNipINmG2LTYty4NCg0K2YfZhCDZitmF2YPZhiDYp9mE2K3YtdmI 2YQg2LnZhNmJIENhbnZhIFBybyDYqNi32LHZgiDYo9iu2LHZidifDQrZhti52YXYjCDZh9mG2KfZ gyDZhtiz2K7YqSDYqtis2LHZitio2YrYqSDZhdis2KfZhtmK2Kkg2YTZhdiv2KkgMzAg2YrZiNmF 2YvYpyDZhdiq2KfYrdipINmE2YTYrNmF2YrYuSDYudio2LEg2KfZhNmF2YjZgti5INin2YTYsdiz 2YXZii4NCtiu2YTYp9mEINmH2LDZhyDYp9mE2YHYqtix2Kkg2KrYs9iq2YXYqti5INio2KzZhdmK 2Lkg2KfZhNmF2LLYp9mK2KfYjCDZiNmK2YXZg9mG2YMg2KXZhNi62KfYoSDYp9mE2KfYtNiq2LHY p9mDINmC2KjZhCDYp9mG2KrZh9in2KbZh9inDQrZhNiq2KzZhtioINin2YTYsdiz2YjZhS4g2KPZ hdinINin2YTYrdi12YjZhCDYudmE2YkgQ2FudmEgUHJvINi02K7YtdmKINiv2KfYptmF2YvYpyDY qNi02YPZhCDZhdis2KfZhtmKINmB2LrZitixINmF2YXZg9mGINil2YTYpw0K2LnYqNixINin2YTY r9i52YjYqSDYp9mE2KrYudmE2YrZhdmK2KkuDQoNCtij2YfZhSDYp9mE2YXYstin2YrYpyDYp9mE 2KrZiiDZitmC2K/ZhdmH2KcgQ2FudmEgUHJvIEVkdSDZhdis2KfZhtmL2KcNCuKAkyDZhdmD2KrY qNipINiq2LbZhSDYo9mD2KvYsSDZhdmGIDEwMCDZhdmE2YrZiNmGINi12YjYsdipINmI2LHYs9mI 2YUg2YjZgdmK2K/ZitmI2YfYp9iqLg0K4oCTINij2YPYq9ixINmF2YYgNjAwINij2YTZgSDZgtin 2YTYqCDYp9it2KrYsdin2YHZii4NCuKAkyDYo9iv2YjYp9iqINmF2KrZgtiv2YXYqSDZhdir2YQg 2KXYstin2YTYqSDYp9mE2K7ZhNmB2YrYqSDZiNiq2LrZitmK2LEg2YXZgtin2LPYp9iqINin2YTY qti12KfZhdmK2YUuDQrigJMg2KrYrtiy2YrZhiDYs9it2KfYqNmKIDEg2KrZitix2KfYqNin2YrY qi4NCuKAkyDYpdmF2YPYp9mG2YrYqSDYp9mE2LnZhdmEINin2YTYrNmF2KfYudmKINmF2Lkg2KfZ hNi32YTYp9ioINmI2KfZhNiy2YXZhNin2KEg2LnZhNmJINmF2LTYp9ix2YrYuSDZhdi02KrYsdmD 2KkuDQoNCtmE2YXYp9iw2Kcg2KrYrtiq2KfYsSBDYW52YSBQcm8gRWR12J8NCtmH2LDYpyDYp9mE 2K3Ys9in2Kgg2YrZhdmG2K3ZgyDYrNmF2YrYuSDYo9iv2YjYp9iqIENhbnZhIFBybyDYr9mI2YYg 2KrZg9mE2YHYqdiMINmI2YfZiCDZhdir2KfZhNmKINmE2YTZhdiv2LHYs9mK2YYg2YTYpdi52K/Y p9ivDQrYr9ix2YjYsyDYqtmB2KfYudmE2YrYqdiMINmI2YTZhNi32YTYp9ioINmE2KXZhti02KfY oSDZhdi02KfYsdmK2Lkg2YjYudix2YjYtiDYp9it2KrYsdin2YHZitipLiDZitiz2KfYudiv2YMg 2LnZhNmJINix2YHYuSDYrNmI2K/YqQ0K2KPYudmF2KfZhNmDINmI2YrZiNmB2LEg2YXZiNin2LHY ryDYttiu2YXYqSDYrNin2YfYstipINmE2YTYp9iz2KrYrtiv2KfZhS4NCg0K2K7Yp9iq2YXYqQ0K 2KXYsNinINmD2YbYqiDYt9in2YTYqNmL2Kcg2KPZiCDZhdi52YTZhdmL2KfYjCDZgdil2YYg2KPZ gdi22YQg2LfYsdmK2YLYqSDZhNmE2K3YtdmI2YQg2LnZhNmJIENhbnZhIFBybyDZhdis2KfZhtmL 2Kcg2YfZiiDYudio2LENCtix2KfYqNi3INin2YTYr9i52YjYqSDYpdmE2YkgQ2FudmEgUHJvIEVk dS4g2KjZh9iw2Ycg2KfZhNiu2LfZiNipINiz2KrZgdiq2K0g2YTZgyDYrNmF2YrYuSDYp9mE2KPY r9mI2KfYqiDYp9mE2YXZhdmK2LLYqQ0K2K/ZiNmGINij2Yog2LHYs9mI2YUuINiz2KzZkdmEINin 2YTYotmGINmI2KfYs9iq2YHYryDZhdmGINmB2LHYtdipINmF2LDZh9mE2Kkg2KrYqtmK2K0g2YTZ gyDYqti32YjZitixINiq2LXYp9mF2YrZhdmDINin2YTYqti52YTZitmF2YrYqQ0K2YjYp9mE2LTY rti12YrYqdiMINmI2KfZhNmI2LXZiNmEINil2YTZiSDZhdiz2KrZiNmJINin2K3Yqtix2KfZgdmK INio2KfYs9iq2K7Yr9in2YUgQ2FudmEgUHJvIEVkdSDZgdmKIDIwMjUuDQo= --000000000000037afc064009eac6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: base64 PGRpdiBkaXI9Imx0ciI+2KfZhti22YUg2KfZhNii2YYg2KXZhNmJINit2LPYp9ioIENhbnZhIFBy byDZhdis2KfZhtmL2Kcg2LnYqNixINix2KfYqNi3INin2YTYr9i52YjYqSDYp9mE2YXYrti12LUg 2YTZhNmF2LnZhNmF2YrZhiDZiNin2YTYt9mE2KfYqCDZgdmKIDIwMjXYjCDZiNin2LPYqtmB2K8g 2YXZhiDYrNmF2YrYuSDYp9mE2YXYstin2YrYpyDYp9mE2YXYr9mB2YjYudipINiv2YjZhiDYo9mK INiq2YPZhNmB2KkuINmB2Yog2YfYsNinINin2YTZhdmC2KfZhCDZhtmI2LbYrSDZhNmDINmD2YrZ gdmK2Kkg2KfZhNit2LXZiNmEINi52YTZiSDYr9i52YjYqSDZhdis2KfZhtmK2Kkg2YTYrdiz2KfY qCBDYW52YSBQcm8gRWR12Iwg2YjZhdinINin2YTYsNmKINmK2YXZitiy2Ycg2LnZhiDYp9mE2K3Y s9in2KjYp9iqINin2YTYo9iu2LHZidiMINmI2KfZhNiu2LfZiNin2Kog2KfZhNi52YXZhNmK2Kkg 2YTZhNiq2LPYrNmK2YQuPGJyPjxhIGhyZWY9Imh0dHBzOi8vd3d3LnRhcmdpci5jb20vMjAyNS8w Mi9jYW52YS1wcm8uaHRtbCI+aHR0cHM6Ly93d3cudGFyZ2lyLmNvbS8yMDI1LzAyL2NhbnZhLXBy by5odG1sPC9hPjxicj7ZhdinINmH2YggQ2FudmEgUHJv2J88YnI+Q2FudmEg2YXZhti12Kkg2KrY tdmF2YrZhSDZhdi02YfZiNix2Kkg2LnYp9mE2YXZitmL2Kcg2KrYqtmK2K0g2KXZhti02KfYoSDY udix2YjYtiDYqtmC2K/ZitmF2YrYqdiMINmF2YTYtdmC2KfYqtiMINmF2YbYtNmI2LHYp9iqINin 2KzYqtmF2KfYudmK2KnYjCDZgdmK2K/ZitmI2YfYp9iqINmI2LrZitixINiw2YTZgyDYqNiz2YfZ iNmE2KkuINin2YTYrdiz2KfYqCDYp9mE2YXYrNin2YbZiiDZitmI2YHYsSDYo9iv2YjYp9iqINmI 2YLZiNin2YTYqCDZhdit2K/ZiNiv2KnYjCDYqNmK2YbZhdinINmK2YLYr9mFIENhbnZhIFBybyDZ hdmD2KrYqNipINi22K7ZhdipINmF2YYg2KfZhNi12YjYsSDZiNin2YTZgdmK2K/ZitmI2YfYp9iq 2Iwg2KPYr9mI2KfYqiDYp9it2KrYsdin2YHZitipINmF2KvZhCDYpdiy2KfZhNipINin2YTYrtmE 2YHZitip2Iwg2YjYqtiu2LLZitmGINiz2K3Yp9io2Yog2KjYs9i52Kkg2YPYqNmK2LHYqS48YnI+ PGJyPtij2YbZiNin2Lkg2KfZhNit2LPYp9io2KfYqjxicj48YnI+2KfZhNit2LPYp9ioINin2YTZ hdis2KfZhtmKOiDZitiq2YrYrSDYp9mE2YjYtdmI2YQg2YTYotmE2KfZgSDYp9mE2YLZiNin2YTY qCDZiNi12YjYsSDZiNix2LPZiNmF2KfYqiDZhdit2K/ZiNiv2KnYjCDZhdi5IDUg2KzZitis2Kcg 2KrYrtiy2YrZhi4g2YXZhtin2LPYqCDZhNmE2YXYqNiq2K/YptmK2YYuPGJyPjxicj5DYW52YSBQ cm86INmF2K/ZgdmI2Lkg2YrZiNmB2LEg2KPZg9ir2LEg2YXZhiAxMDAg2YXZhNmK2YjZhiDYtdmI 2LHYqdiMINmC2YjYp9mE2Kgg2YXYqtmF2YrYstip2IwgMSDYqtmK2LHYp9io2KfZitiqINiq2K7Y stmK2YbYjCDZiNij2K/ZiNin2Kog2YXYq9mEINiq2LrZitmK2LEg2YXZgtin2LPYp9iqINin2YTY qti12YXZitmFLjxicj48YnI+Q2FudmEgVGVhbXM6INmF2LXZhdmFINmE2YTZhdik2LPYs9in2KrY jCDZhdi5INmF2LLYp9mK2Kcg2KrYudin2YjZhiDZgdmI2LHZiiDZiNiq2K7YtdmK2LUg2KfZhNi5 2YTYp9mF2Kkg2KfZhNiq2KzYp9ix2YrYqS48YnI+PGJyPkNhbnZhIFBybyBFZHU6INmF2KzYp9mG 2Yog2YTZhNmF2LnZhNmF2YrZhiDZiNin2YTYt9mE2KfYqNiMINmK2K3YqtmI2Yog2LnZhNmJINis 2YXZiti5INmF2YrYstin2KogQ2FudmEgUHJvINio2KfZhNil2LbYp9mB2Kkg2KXZhNmJINij2K/Z iNin2Kog2KrYudmE2YrZhdmK2KkuPGJyPjxicj7Zg9mK2YEg2KrYrdi12YQg2LnZhNmJIENhbnZh IFBybyBFZHUg2YXYrNin2YbZi9in2J88YnI+4oCTINin2YTYqtiz2KzZitmEINi52KjYsSDYsdin 2KjYtyDYr9i52YjYqSDYsdiz2YXZiiDYrtin2LUg2KjYp9mE2KrYudmE2YrZhS48YnI+4oCTINil 2YbYtNin2KEg2K3Ys9in2Kgg2KzYr9mK2K8g2KPZiCDYp9iz2KrYrtiv2KfZhSDYqNix2YrYr9mD INin2YTYqti52YTZitmF2Yog2KXZhiDYqtmI2YHYsS48YnI+4oCTINio2LnYryDZgtio2YjZhCDY p9mE2K/YudmI2KnYjCDZitiq2K3ZiNmEINit2LPYp9io2YMg2KrZhNmC2KfYptmK2YvYpyDYpdmE 2YkgQ2FudmEgUHJvIEVkdSDZhdis2KfZhtmKINio2YPYp9mF2YQg2KfZhNmF2LLYp9mK2KcuPGJy Pjxicj7Zhdin2LDYpyDYqtit2KrYp9isINmE2YTYqtiz2KzZitmE2J88YnI+4oCTINij2YYg2KrZ g9mI2YYg2YXYudmE2YXZi9inINij2Ygg2LfYp9mE2KjZi9inINio2YXYpNiz2LPYqSDYqti52YTZ itmF2YrYqS48YnI+4oCTINio2LHZitivINil2YTZg9iq2LHZiNmG2Yog2YXYsdiq2KjYtyDYqNin 2YTYqti52YTZitmFICjZhdir2YQgZWR1KS48YnI+4oCTINin2YTYp9mG2LbZhdin2YUg2LnYqNix INix2KfYqNi3INiv2LnZiNipINmG2LTYty48YnI+PGJyPtmH2YQg2YrZhdmD2YYg2KfZhNit2LXZ iNmEINi52YTZiSBDYW52YSBQcm8g2KjYt9ix2YIg2KPYrtix2YnYnzxicj7Zhti52YXYjCDZh9mG 2KfZgyDZhtiz2K7YqSDYqtis2LHZitio2YrYqSDZhdis2KfZhtmK2Kkg2YTZhdiv2KkgMzAg2YrZ iNmF2YvYpyDZhdiq2KfYrdipINmE2YTYrNmF2YrYuSDYudio2LEg2KfZhNmF2YjZgti5INin2YTY sdiz2YXZii4g2K7ZhNin2YQg2YfYsNmHINin2YTZgdiq2LHYqSDYqtiz2KrZhdiq2Lkg2KjYrNmF 2YrYuSDYp9mE2YXYstin2YrYp9iMINmI2YrZhdmD2YbZgyDYpdmE2LrYp9ihINin2YTYp9i02KrY sdin2YMg2YLYqNmEINin2YbYqtmH2KfYptmH2Kcg2YTYqtis2YbYqCDYp9mE2LHYs9mI2YUuINij 2YXYpyDYp9mE2K3YtdmI2YQg2LnZhNmJIENhbnZhIFBybyDYtNiu2LXZiiDYr9in2KbZhdmL2Kcg 2KjYtNmD2YQg2YXYrNin2YbZiiDZgdi62YrYsSDZhdmF2YPZhiDYpdmE2Kcg2LnYqNixINin2YTY r9i52YjYqSDYp9mE2KrYudmE2YrZhdmK2KkuPGJyPjxicj7Yo9mH2YUg2KfZhNmF2LLYp9mK2Kcg 2KfZhNiq2Yog2YrZgtiv2YXZh9inIENhbnZhIFBybyBFZHUg2YXYrNin2YbZi9inPGJyPuKAkyDZ hdmD2KrYqNipINiq2LbZhSDYo9mD2KvYsSDZhdmGIDEwMCDZhdmE2YrZiNmGINi12YjYsdipINmI 2LHYs9mI2YUg2YjZgdmK2K/ZitmI2YfYp9iqLjxicj7igJMg2KPZg9ir2LEg2YXZhiA2MDAg2KPZ hNmBINmC2KfZhNioINin2K3Yqtix2KfZgdmKLjxicj7igJMg2KPYr9mI2KfYqiDZhdiq2YLYr9mF 2Kkg2YXYq9mEINil2LLYp9mE2Kkg2KfZhNiu2YTZgdmK2Kkg2YjYqti62YrZitixINmF2YLYp9iz 2KfYqiDYp9mE2KrYtdin2YXZitmFLjxicj7igJMg2KrYrtiy2YrZhiDYs9it2KfYqNmKIDEg2KrZ itix2KfYqNin2YrYqi48YnI+4oCTINil2YXZg9in2YbZitipINin2YTYudmF2YQg2KfZhNis2YXY p9i52Yog2YXYuSDYp9mE2LfZhNin2Kgg2YjYp9mE2LLZhdmE2KfYoSDYudmE2Ykg2YXYtNin2LHZ iti5INmF2LTYqtix2YPYqS48YnI+PGJyPtmE2YXYp9iw2Kcg2KrYrtiq2KfYsSBDYW52YSBQcm8g RWR12J88YnI+2YfYsNinINin2YTYrdiz2KfYqCDZitmF2YbYrdmDINis2YXZiti5INij2K/ZiNin 2KogQ2FudmEgUHJvINiv2YjZhiDYqtmD2YTZgdip2Iwg2YjZh9mIINmF2KvYp9mE2Yog2YTZhNmF 2K/Ysdiz2YrZhiDZhNil2LnYr9in2K8g2K/YsdmI2LMg2KrZgdin2LnZhNmK2KnYjCDZiNmE2YTY t9mE2KfYqCDZhNil2YbYtNin2KEg2YXYtNin2LHZiti5INmI2LnYsdmI2LYg2KfYrdiq2LHYp9mB 2YrYqS4g2YrYs9in2LnYr9mDINi52YTZiSDYsdmB2Lkg2KzZiNiv2Kkg2KPYudmF2KfZhNmDINmI 2YrZiNmB2LEg2YXZiNin2LHYryDYttiu2YXYqSDYrNin2YfYstipINmE2YTYp9iz2KrYrtiv2KfZ hS48YnI+PGJyPtiu2KfYqtmF2Kk8YnI+2KXYsNinINmD2YbYqiDYt9in2YTYqNmL2Kcg2KPZiCDZ hdi52YTZhdmL2KfYjCDZgdil2YYg2KPZgdi22YQg2LfYsdmK2YLYqSDZhNmE2K3YtdmI2YQg2LnZ hNmJIENhbnZhIFBybyDZhdis2KfZhtmL2Kcg2YfZiiDYudio2LEg2LHYp9io2Lcg2KfZhNiv2LnZ iNipINil2YTZiSBDYW52YSBQcm8gRWR1LiDYqNmH2LDZhyDYp9mE2K7Yt9mI2Kkg2LPYqtmB2KrY rSDZhNmDINis2YXZiti5INin2YTYo9iv2YjYp9iqINin2YTZhdmF2YrYstipINiv2YjZhiDYo9mK INix2LPZiNmFLiDYs9is2ZHZhCDYp9mE2KLZhiDZiNin2LPYqtmB2K8g2YXZhiDZgdix2LXYqSDZ hdiw2YfZhNipINiq2KrZititINmE2YMg2KrYt9mI2YrYsSDYqti12KfZhdmK2YXZgyDYp9mE2KrY udmE2YrZhdmK2Kkg2YjYp9mE2LTYrti12YrYqdiMINmI2KfZhNmI2LXZiNmEINil2YTZiSDZhdiz 2KrZiNmJINin2K3Yqtix2KfZgdmKINio2KfYs9iq2K7Yr9in2YUgQ2FudmEgUHJvIEVkdSDZgdmK IDIwMjUuPC9kaXY+DQo= --000000000000037afc064009eac6-- From nobody Tue Sep 30 19:40:21 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbpLf320Mz699QH; Tue, 30 Sep 2025 19:40:26 +0000 (UTC) (envelope-from mad@madpilot.net) Received: from vogon.madpilot.net (vogon.madpilot.net [159.69.1.99]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbpLf28H9z3b9t; Tue, 30 Sep 2025 19:40:26 +0000 (UTC) (envelope-from mad@madpilot.net) Authentication-Results: mx1.freebsd.org; none Received: from localhost (mail [IPv6:fd5c:5351:d272::3]) by vogon.madpilot.net (Postfix) with ESMTP id 4cbpLc4wWbzLly1; Tue, 30 Sep 2025 21:40:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=madpilot.net; h= content-transfer-encoding:content-type:content-type:in-reply-to :from:from:content-language:references:subject:subject:date:date :message-id:received; s=cyq4qetkgngm; t=1759261222; x= 1761075623; bh=msO4GfmkSb/g02Yec1bLs9j/udDORZV0YTKe1XJNLFg=; b=o x8wJCpE2feBj0iyN9A3Dg/9AkVNDeUvlK2src0JbJGisH+CjqB5DP+dIheUyG0Fh zFTBqcG0LDpmIVbmg+kviNDMasCGgnP370iy6txGV3PM3A4vp7mWzHTHx7Y2R903 Nhd5KWKg2W5jzz2GmEyUGq2VRT/ChtljuZe5NPAeA4NlYmp2T1+nfD1LgQZDXkpJ a/OW5j5N3WHbs+4xzKz3yxxvpSYOOudDeXRmQyt1vIxk2yIVxG0qcSIEQG7XyyZJ LJh2MAb6zMi0HEZhkTGOBrbQ46+UAJddlV57k29n4JIyPm59N9FBek89LR5qWELM oS+/+aHnR0fsAS+Z5B08Q== Received: from vogon.madpilot.net ([IPv6:fd5c:5351:d272::3]) by localhost (vogon.madpilot.net [IPv6:fd5c:5351:d272::3]) (amavis, port 10026) with ESMTP id 6WluBPLkE2wH; Tue, 30 Sep 2025 21:40:22 +0200 (CEST) Message-ID: <6340c752-f960-4ef6-8bd4-258d24b121e2@madpilot.net> Date: Tue, 30 Sep 2025 21:40:21 +0200 Subject: Re: git: 06afa0a55e0a - main - pkgbase: move ncurses into its own package To: Kyle Evans , Dima Panov , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202509301222.58UCM0MP003913@gitrepo.freebsd.org> <54000d86-ae74-4f00-bba3-0df348daeef6@FreeBSD.org> Content-Language: en-US From: Guido Falsi Autocrypt: addr=mad@madpilot.net; keydata= xsBNBE+G+l0BCADi/WBQ0aRJfnE7LBPsM0G3m/m3Yx7OPu4iYFvS84xawmRHtCNjWIntsxuX fptkmEo3Rsw816WUrek8dxoUAYdHd+EcpBcnnDzfDH5LW/TZ4gbrFezrHPdRp7wdxi23GN80 qPwHEwXuF0X4Wy5V0OO8B6VT/nA0ADYnBDhXS52HGIJ/GCUjgqJn+phDTdCFLvrSFdmgx4Wl c0W5Z1p5cmDF9l8L/hc959AeyNf7I9dXnjekGM9gVv7UDUYzCifR3U8T0fnfdMmS8NeI9NC+ wuREpRO4lKOkTnj9TtQJRiptlhcHQiAlG1cFqs7EQo57Tqq6cxD1FycZJLuC32bGbgalABEB AAHNHkd1aWRvIEZhbHNpIDxtYWRAbWFkcGlsb3QubmV0PsLAeQQTAQgAIwIbAwIeAQIXgAUL CQgHAwUVCgkICwQWAgMBBQJS79AgAhkBAAoJEBrmhg5Wy9KTc0kH/RO64ORBlTbTHaUaOj8F Je5O5NU2Pt9Cyt5ZWBRvxntr1zPTJGKRPS9ihlIfqT4ZvEngQGp57EUyFbCpI0UWasTerImM tt5WACnGmCzUTB39UXx8Oy4b1EgWeTJQ747e/F1mQLXTNa6ijRBE9fYlTb4gAkPN88/wVV9v 3PZozKLTg16ghBzHM/P7Lk8L7clPEZChX1FTa/6eSt3nvzfCuTMZbBPJF/ph+q1KyPqRgVfh tyhu5dvgMoPz/ni41IfeSrkJTD5RXzdyGR9q4Z1NYeBsLkRjC4LxKAP5KqUsvlOUjKvO1byj ApYdMarol+IGkaSk9e3zVYAJkWKjn/ni8XbOwU0EUxB7QQEQAKFhrDceoPdK/IHDSmoj6SQY isvM7VdhcleS7E9DoEAVt7yMbf6HbbMVTTY6ckvwTWQssywLBXNVqxgc4WLJjzfUhgef+WE7 5M3+WFYlOVQLGZY/zEVgma1raYnOHNAOzeHLDmEXjbZP6vGAeDyBbGfQPpE7qGYZ7ubeT3Xw QO+PklcCrvOPj2ZPcAxGNS2xVU/LzONqCrJqLMJSIcCdsbiSP4G5PnDFHtMokaTY6OEr8OEQ fOAerhcHUa/z7Uu8YtmaqKH+QGkE/WEgaRqSiTnv0JOTD+DxehaqvoKPPZ++2NpCZMHB2i6A /xifmQwEiIjEXtcueBRzkNUQkxhqZyS13SrhocL9ydtaVPBzZatAEjUDDEJmAMLVFs45qfyh MiNapHJo2n3MW/E5omqCvEkDdWX/en3P7CK2TemeaDghMsgkNKax/z0wNo5UZCkOPOz0xpNi UilOVbkuezZZNg65741qee2lfXhQIaZ66yT7hphc/N/z3PIAtLeze4u1VR2EXAuZ2sWAdlKC NTlJMsaU/x70BV11Wd/ypnVzM68dfdQIIAj1iMFAD/lXGlEUmKXg5Ov2VQDlTntQoanCYrAg +8CttPzjrydgLZFq3hrtQmfc0se5yv1WHS69+BsUOG09RvvawUDZxUjW19kyeN9THaNRgow3 kSuArUp6zSmJABEBAAHCwF8EGAEIAAkFAlMQe0ECGwwACgkQGuaGDlbL0pMN5wgA4bCkX/qw EVC06ToeR6C2putmSWQMgpDaqrv65Hubo+QGmg2P4ewTYQQ4g6oYWS03qHxqVVWhKz7FjfrV +dH8qbCLfSgIcvdBha7ayGZVrsiuMLKGbw36fcmkZPpSDOfHcP0XH8Z+u9CWj0xUkTxAlZ/7 i6gYSUpG2JWNtdmE/X8VVEyXusCLwy0K0BI60A/4dRTIX3C4QKrJ3ZbUXegz70ynjHf+lQMZ 9IZKASoRMuS5FozPQh6abvmwZEPdf5I9riUElzvHrqJ8Bx0t3Pujdoth+yNHpnBxrtO8LkQd rQ58P0SwcaIX33T2U9pG8bhu5YVR88FQ8OQ0cEsPBpDncg== In-Reply-To: <54000d86-ae74-4f00-bba3-0df348daeef6@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:159.69.0.0/16, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cbpLf28H9z3b9t 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 On 9/30/25 21:37, Kyle Evans wrote: > On 9/30/25 14:25, Guido Falsi wrote: >> On 9/30/25 21:15, Dima Panov wrote: >>> Hello! >>> >>> It fails :( >>> >>> /opt/poudriere/jails/160amd64/usr/src/release/packages/generate- >>> ucl.lua: fail to parse(/opt/poudriere/jails/160amd64/usr/src/release/ >>> packages/ template.ucl): error while parsing /opt/poudriere/ >>> jails/160amd64/usr/ src/release/packages/ucl/ncurses-all.ucl: at the >>> end of chunk: unfinished multiline comment >>> *** [create-world-package-ncurses-dbg-lib32] Error code 1 >>> >> >> I was able to get through this error by locally removing the comment >> and adding empty lines around each statement in the file. >> >> Not sure which of the two worked, but if I should guess it was >> removing the comment. But I have no idea why it was failing, really. >> >> After this though I stumbled on the snd issue I reported right now. >> > > Sorry for the breakage, I seem to have built out of the wrong tree or > something.  I committed df74ea7f4109 > to strip the license text and include a pointer, since it seems to trip > some kind of UCL parsing bug. No worry, such things can happen, this was also quite difficult to spot. Thanks for the quick fix! -- Guido Falsi From nobody Tue Sep 30 20:08:49 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cbpzQ0DTGz69D43; Tue, 30 Sep 2025 20:08:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbpzP6dd4z3kN6; Tue, 30 Sep 2025 20:08:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759262930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1LhaL9s8I/DNuJ4+JMVpwubb6P8Y1GPkQVX8yZyaeYs=; b=c+qn+SEGI/5nJu0iKdqeFRLqJ5+9W6o2cZDZuixCTE8/3GCyPjB3DtiyUbsm7MaDq8Qmqd kQ8fPwRymvwuZI/a3ETq+ytOnAT9j0QH91mQKNOmy5M5ZPHOIBy04u9WzbyUdQOeKGyX5u wNCGwqeTU716Rnna+76mhU6RV/t6t35s8D9sG3CveQvU+j0Q+rjNu6asEWu3zGCgAOXQ/Y Shdpf1bGllctTvEcz2y8aSKyB7IlqKRR9hNpbLHt7aWpwod9eFaaEQXQfKP8dg09upSnpV 26XL1786t1RkT33OS+MpSTEx0ifQnXTQEVMm9JNg7vfUjhtrqsozmCme4EZcpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759262930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1LhaL9s8I/DNuJ4+JMVpwubb6P8Y1GPkQVX8yZyaeYs=; b=PBc1GdPVbPWFWq7o+8zEz7piHA2jPXYzdYhJP7iy4OnneorqWV17rwg9ATmqrN1GiyuTlg oyHEFqxUVAnPuCITbjraGbYAuCnSRJAOLAL7bqIRG/nHvYbQA0Tcoum7DjC5ml3YuEdiBY IkcOfKGBwciNUJuQAvb/D1/ok6mV+Z7R66F5h0BsNUKa7wZgBDu/2C6ETDmDSKwvTQ6ruS MCU2rzeqLq6wXLghFjZ/YsKNsELJI8uw7TOMpOj/gI7ofsVelliSLu80Evgk8KFWFmrkjT 7qzkV7vEsqAPtfaacQPLmSQkPcIKOWhoNuyiX9SmQWJX8In2/CZeb5D23EHt/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759262930; a=rsa-sha256; cv=none; b=DowgbYEphuXkQvLePnPfzIuNbM4B0wKhfMtCTqZD2Z9qkeSmCaQcdphLJSPL65fKLdUtMI q0ZKWW+HF1/pf/MbfD1IX4/NqtDGDmDunqIS5lZshKZcHuzGapf5Nauh7xKdLJynaR9GuR M221Ho4KT2xvG7V8qgQC90EXGWZhzOcqmMXzvz0HD1rD7/a2U+TOkMlohzMfr5QYCbUyhn xoiFSQFWccpJxDfzi442pULWH93DqkNkaw1NxJkaGADFZdBEjQcxCcni+qXVPjfoFH/3sc f+qF51jfHoBz9R/d/VPzja1y0LvC42r7gq0pBhQr80UUp2e6OE/x4yn5b2YDOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbpzP6C6HzrpQ; Tue, 30 Sep 2025 20:08:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 58UK8nFC078897; Tue, 30 Sep 2025 20:08:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58UK8nBT078894; Tue, 30 Sep 2025 20:08:49 GMT (envelope-from git) Date: Tue, 30 Sep 2025 20:08:49 GMT Message-Id: <202509302008.58UK8nBT078894@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: c2900b6e8255 - main - tcp: apply rate limits to challenge ACKs 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c2900b6e8255ba4f54dbd897cf42427db577ed3d Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=c2900b6e8255ba4f54dbd897cf42427db577ed3d commit c2900b6e8255ba4f54dbd897cf42427db577ed3d Author: Michael Tuexen AuthorDate: 2025-09-30 20:06:33 +0000 Commit: Michael Tuexen CommitDate: 2025-09-30 20:06:33 +0000 tcp: apply rate limits to challenge ACKs When sending challenge ACKs from the SYN-cache, apply the same rate limiting as in other states. Reviewed by: cc, rrs MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D52754 --- sys/netinet/tcp_syncache.c | 28 ++++++++++++++++++++++++---- sys/netinet/tcp_syncache.h | 2 ++ 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 1ee6c6e31f33..72e9dccea9a5 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -122,6 +122,7 @@ static void syncache_drop(struct syncache *, struct syncache_head *); static void syncache_free(struct syncache *); static void syncache_insert(struct syncache *, struct syncache_head *); static int syncache_respond(struct syncache *, const struct mbuf *, int); +static int syncache_send_challenge_ack(struct syncache *, struct mbuf *); static struct socket *syncache_socket(struct syncache *, struct socket *, struct mbuf *m); static void syncache_timeout(struct syncache *sc, struct syncache_head *sch, @@ -694,10 +695,7 @@ syncache_chkrst(struct in_conninfo *inc, struct tcphdr *th, struct mbuf *m, "sending challenge ACK\n", s, __func__, th->th_seq, sc->sc_irs + 1, sc->sc_wnd); - if (syncache_respond(sc, m, TH_ACK) == 0) { - TCPSTAT_INC(tcps_sndacks); - TCPSTAT_INC(tcps_sndtotal); - } else { + if (syncache_send_challenge_ack(sc, m) != 0) { syncache_drop(sc, sch); TCPSTAT_INC(tcps_sc_dropped); } @@ -963,6 +961,10 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) if (sc->sc_rxmits > 1) tp->snd_cwnd = 1; + /* Copy over the challenge ACK state. */ + tp->t_challenge_ack_end = sc->sc_challenge_ack_end; + tp->t_challenge_ack_cnt = sc->sc_challenge_ack_cnt; + #ifdef TCP_OFFLOAD /* * Allow a TOE driver to install its hooks. Note that we hold the @@ -2053,6 +2055,24 @@ syncache_respond(struct syncache *sc, const struct mbuf *m0, int flags) return (error); } +static int +syncache_send_challenge_ack(struct syncache *sc, struct mbuf *m) +{ + int error; + + if (tcp_challenge_ack_check(&sc->sc_challenge_ack_end, + &sc->sc_challenge_ack_cnt)) { + error = syncache_respond(sc, m, TH_ACK); + if (error == 0) { + TCPSTAT_INC(tcps_sndacks); + TCPSTAT_INC(tcps_sndtotal); + } + } else { + error = 0; + } + return (error); +} + /* * The purpose of syncookies is to handle spoofed SYN flooding DoS attacks * that exceed the capacity of the syncache by avoiding the storage of any diff --git a/sys/netinet/tcp_syncache.h b/sys/netinet/tcp_syncache.h index a336571f12c9..37f6ff3d6ca9 100644 --- a/sys/netinet/tcp_syncache.h +++ b/sys/netinet/tcp_syncache.h @@ -67,6 +67,8 @@ struct syncache { u_int8_t sc_requested_s_scale:4, sc_requested_r_scale:4; u_int16_t sc_flags; + u_int32_t sc_challenge_ack_cnt; /* chall. ACKs sent in epoch */ + sbintime_t sc_challenge_ack_end; /* End of chall. ack epoch */ #if defined(TCP_OFFLOAD) struct toedev *sc_tod; /* entry added by this TOE */ void *sc_todctx; /* TOE driver context */ From nobody Tue Sep 30 20:10: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 4cbq2438drz69Cr2; Tue, 30 Sep 2025 20:11:08 +0000 (UTC) (envelope-from mad@madpilot.net) Received: from vogon.madpilot.net (vogon.madpilot.net [IPv6:2a01:4f8:1c1c:11e5::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbq2317VGz3kbD; Tue, 30 Sep 2025 20:11:07 +0000 (UTC) (envelope-from mad@madpilot.net) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=madpilot.net header.s=cyq4qetkgngm header.b="T xtnAhP"; dmarc=pass (policy=quarantine) header.from=madpilot.net; spf=pass (mx1.freebsd.org: domain of mad@madpilot.net designates 2a01:4f8:1c1c:11e5::1 as permitted sender) smtp.mailfrom=mad@madpilot.net Received: from localhost (mail [IPv6:fd5c:5351:d272::3]) by vogon.madpilot.net (Postfix) with ESMTP id 4cbq1t3rFbzLmvv; Tue, 30 Sep 2025 22:10:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=madpilot.net; h= content-transfer-encoding:content-type:content-type:in-reply-to :content-language:references:from:from:subject:subject:date:date :message-id:received; s=cyq4qetkgngm; t=1759263056; x= 1761077457; bh=tnSrBtNMI3z2P6vNzmPN8CHp51M5l+1vBh6bzLcKaVI=; b=T xtnAhPjKbn9tBnrlKL7/kg1ewdUs8Ql0/tWwK/z5XLFwCEHqY/6oSrQrlWMxMtDs ODLuZrUg9SymXv9YTE9LBQqOSNsiPuXgS8HMPxMrQSTdbrtT8skT51T1z9V4Extm q5STT4AXLooJHqAgwqtEzfTt+eX4zcRfO5hbNXBSYpXaYN90UGf7mh+C/ZrPZDfd 2Y3+ao4H18RHUrttZuEDKD54OtD3ZuDCceL1Ia80oVt+ftRGFAJnIWktXyTA4Bnx JcZgaQ6f28qsr0IIQRh/oOU/UygjBketxRuQprw3jEMG3luJsmv/a99QX5wBM6Si MjsR8OoADZ0nKRzRv60oA== Received: from vogon.madpilot.net ([IPv6:fd5c:5351:d272::3]) by localhost (vogon.madpilot.net [IPv6:fd5c:5351:d272::3]) (amavis, port 10026) with ESMTP id S-ufNn9BehFt; Tue, 30 Sep 2025 22:10:56 +0200 (CEST) Message-ID: <9bb0f51a-cb7f-45c4-9a48-bffbadf99845@madpilot.net> Date: Tue, 30 Sep 2025 22:10:55 +0200 Subject: Re: git: 2ffaca551eaf - main - snd_hda: Implement automatic redirection between associations From: Guido Falsi To: Christos Margiolis , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202509301052.58UAqxgM026265@gitrepo.freebsd.org> Content-Language: en-US Autocrypt: addr=mad@madpilot.net; keydata= xsBNBE+G+l0BCADi/WBQ0aRJfnE7LBPsM0G3m/m3Yx7OPu4iYFvS84xawmRHtCNjWIntsxuX fptkmEo3Rsw816WUrek8dxoUAYdHd+EcpBcnnDzfDH5LW/TZ4gbrFezrHPdRp7wdxi23GN80 qPwHEwXuF0X4Wy5V0OO8B6VT/nA0ADYnBDhXS52HGIJ/GCUjgqJn+phDTdCFLvrSFdmgx4Wl c0W5Z1p5cmDF9l8L/hc959AeyNf7I9dXnjekGM9gVv7UDUYzCifR3U8T0fnfdMmS8NeI9NC+ wuREpRO4lKOkTnj9TtQJRiptlhcHQiAlG1cFqs7EQo57Tqq6cxD1FycZJLuC32bGbgalABEB AAHNHkd1aWRvIEZhbHNpIDxtYWRAbWFkcGlsb3QubmV0PsLAeQQTAQgAIwIbAwIeAQIXgAUL CQgHAwUVCgkICwQWAgMBBQJS79AgAhkBAAoJEBrmhg5Wy9KTc0kH/RO64ORBlTbTHaUaOj8F Je5O5NU2Pt9Cyt5ZWBRvxntr1zPTJGKRPS9ihlIfqT4ZvEngQGp57EUyFbCpI0UWasTerImM tt5WACnGmCzUTB39UXx8Oy4b1EgWeTJQ747e/F1mQLXTNa6ijRBE9fYlTb4gAkPN88/wVV9v 3PZozKLTg16ghBzHM/P7Lk8L7clPEZChX1FTa/6eSt3nvzfCuTMZbBPJF/ph+q1KyPqRgVfh tyhu5dvgMoPz/ni41IfeSrkJTD5RXzdyGR9q4Z1NYeBsLkRjC4LxKAP5KqUsvlOUjKvO1byj ApYdMarol+IGkaSk9e3zVYAJkWKjn/ni8XbOwU0EUxB7QQEQAKFhrDceoPdK/IHDSmoj6SQY isvM7VdhcleS7E9DoEAVt7yMbf6HbbMVTTY6ckvwTWQssywLBXNVqxgc4WLJjzfUhgef+WE7 5M3+WFYlOVQLGZY/zEVgma1raYnOHNAOzeHLDmEXjbZP6vGAeDyBbGfQPpE7qGYZ7ubeT3Xw QO+PklcCrvOPj2ZPcAxGNS2xVU/LzONqCrJqLMJSIcCdsbiSP4G5PnDFHtMokaTY6OEr8OEQ fOAerhcHUa/z7Uu8YtmaqKH+QGkE/WEgaRqSiTnv0JOTD+DxehaqvoKPPZ++2NpCZMHB2i6A /xifmQwEiIjEXtcueBRzkNUQkxhqZyS13SrhocL9ydtaVPBzZatAEjUDDEJmAMLVFs45qfyh MiNapHJo2n3MW/E5omqCvEkDdWX/en3P7CK2TemeaDghMsgkNKax/z0wNo5UZCkOPOz0xpNi UilOVbkuezZZNg65741qee2lfXhQIaZ66yT7hphc/N/z3PIAtLeze4u1VR2EXAuZ2sWAdlKC NTlJMsaU/x70BV11Wd/ypnVzM68dfdQIIAj1iMFAD/lXGlEUmKXg5Ov2VQDlTntQoanCYrAg +8CttPzjrydgLZFq3hrtQmfc0se5yv1WHS69+BsUOG09RvvawUDZxUjW19kyeN9THaNRgow3 kSuArUp6zSmJABEBAAHCwF8EGAEIAAkFAlMQe0ECGwwACgkQGuaGDlbL0pMN5wgA4bCkX/qw EVC06ToeR6C2putmSWQMgpDaqrv65Hubo+QGmg2P4ewTYQQ4g6oYWS03qHxqVVWhKz7FjfrV +dH8qbCLfSgIcvdBha7ayGZVrsiuMLKGbw36fcmkZPpSDOfHcP0XH8Z+u9CWj0xUkTxAlZ/7 i6gYSUpG2JWNtdmE/X8VVEyXusCLwy0K0BI60A/4dRTIX3C4QKrJ3ZbUXegz70ynjHf+lQMZ 9IZKASoRMuS5FozPQh6abvmwZEPdf5I9riUElzvHrqJ8Bx0t3Pujdoth+yNHpnBxrtO8LkQd rQ58P0SwcaIX33T2U9pG8bhu5YVR88FQ8OQ0cEsPBpDncg== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Bar: - X-Spamd-Result: default: False [-2.00 / 15.00]; MISSING_MIME_VERSION(2.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[madpilot.net,quarantine]; R_SPF_ALLOW(-0.20)[+mx]; R_DKIM_ALLOW(-0.20)[madpilot.net:s=cyq4qetkgngm]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MISSING_XM_UA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-main@FreeBSD.org]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCPT_COUNT_THREE(0.00)[4]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RECEIVED_HELO_LOCALHOST(0.00)[]; DKIM_TRACE(0.00)[madpilot.net:+] X-Rspamd-Queue-Id: 4cbq2317VGz3kbD 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 On 9/30/25 21:22, Guido Falsi wrote: > On 9/30/25 12:52, Christos Margiolis wrote: >> The branch main has been updated by christos: >> >> URL: https://cgit.FreeBSD.org/src/commit/? >> id=2ffaca551eaf32c17f701762ecf29a961cf19aa4 >> >> commit 2ffaca551eaf32c17f701762ecf29a961cf19aa4 >> Author:     Christos Margiolis >> AuthorDate: 2025-09-30 10:52:44 +0000 >> Commit:     Christos Margiolis >> CommitDate: 2025-09-30 10:52:44 +0000 >> >>      snd_hda: Implement automatic redirection between associations >>      For audio to be redirected to the headphones/headset after >> plugging the >>      jack, or back to the speaker/internal mic when unplugging it, the >>      speaker and headphone pins need to be part of the same association >>      (i.e., the same PCM device). This patch makes it possible to >> redirect >>      audio even between different associations, which can reduce the >> need for >>      manual pin patching. >>      The idea is that we issue a devctl_notify() from within the jack >>      detection callback whenever a jack is (un-)plugged to redirect >> audio to >>      the appropriate device. Then the snd.conf devd script is >> responsible for >>      using virtual_oss to change the playback/recording device to >> whatever >>      snd_hda(4) selected. The reason for requiring virtual_oss is that >> it has >>      hot-swapping support, which is necessary for jack redirection. >>      Sponsored by:   The FreeBSD Foundation >>      MFC after:      2 days >>      Differential Revision:  https://reviews.freebsd.org/D50070 >> --- >>   sbin/devd/Makefile           |  5 +++++ >>   sbin/devd/devd.conf.5        | 16 +++++++++++++ >>   sbin/devd/snd.conf           | 23 +++++++++++++++++++ >>   sys/dev/sound/pci/hda/hdaa.c | 53 ++++++++++++++++++++++++++++++++ >> +----------- >>   4 files changed, 84 insertions(+), 13 deletions(-) >> >> diff --git a/sbin/devd/Makefile b/sbin/devd/Makefile >> index 5d5721d16884..f65eee93dd4b 100644 >> --- a/sbin/devd/Makefile >> +++ b/sbin/devd/Makefile >> @@ -51,6 +51,11 @@ NVMEDIR=        ${DEVDDIR} >>   NVME+=            nvmf.conf >>   NVMEPACKAGE=        nvme-tools >> +CONFGROUPS+=    SND >> +SNDDIR=        ${DEVDDIR} >> +SND+=        snd.conf >> +SNDPACKAGE=    snd > > Looks like this is causing the package building step of the build to > look for a src/release/packages/ucl/snd-all.ucl file. > > Is it intentional to cause this to produce a new base package? > > Looks like in this case an ucl file for the description is needed? > After working around this one locally, I get a similar issue with virtual_oss missing its ucl file too. Just reporting this right away so it is known. -- Guido Falsi From nobody Wed Oct 1 02:24: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 4cbzJd6VDQz69pRB; Wed, 01 Oct 2025 02:24:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbzJd5hc5z3G5s; Wed, 01 Oct 2025 02:24:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759285457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sDgmwT3d5qcUch7KDlZWrkdtkpWynDLVTQWhVCxtaY0=; b=xXBRmSYNEgXVbT3xPGJmRCuomXamjdMp64xnhYDeTD9v/AxjwM8WeLbCcX9yTwCviK9KuJ Z6gp/BE0nLedBs/kKImaQnJ6zfr5Zg5OulDjKM8Fo8xsWu+3Jh1A1B+xTHgKb7/4hDwpHI SH71sf+GpaXLtCy/cOLd1Jaiy0CtYPfG0PSrMMt39b9m19w6UuX+4t0iiGn89lg+3Zs6oW /dAMLsrKIJd18RVEz6SHfDfq4/zco5kj8hfmJ1Snal3DbjGNfSjg6xGMO7uaxeu2QBZpCO T5EM7QqSxEsrxKBGUmv/Jg5ori1nn7VcaGcv8enPY+bW4w50h8l1COUXx5la8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759285457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sDgmwT3d5qcUch7KDlZWrkdtkpWynDLVTQWhVCxtaY0=; b=i0PpQ5rAyb92X2X8p6b6gyb36nvZjIV1nKeDIdvK9vS+t/M4qxNXt+jRqDDz6nxuqVv2Tn PvpjhNIX6bVNj5RiULXvPOOW3h4TNs6E1e4rA+2OK2EezEQNGIL8Rif5cHq9EK2hQ2057w xJVc50KNijHSyWIUapM9k6lZ2oF7LcZwVLr4z4mNaQofo8khIppwyYlNzt6Pn1CqUMSnkm tIB1VjmDVURX9Evf+Yyot1R8AmMmeMZ9bB36RI0qDIvPhFuBQqhAFiyq8pJNOFpDgAjyQM WSN2RMoK4kggudKs/AIQLiV5IhHwvPplGCOKDD2zquno+iA5V1oc36HulalILw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759285457; a=rsa-sha256; cv=none; b=NqbkW83C/Eg7X2fSypwGJLrOHotJyQC2oVM8PNEvMFnvQzMZv1d0fD33Jk4MCG3xaerF7A 9r2kZAtO4zm3ahWvUijERPCt0WM0V7HuuR28T9l+uBviqy6cymd/pnOV1c69vFuMevo3zS 76KRfT8u+2myo6vu9nDmVgp7CfbLPtPLtBChVihOF7TIw/m7sS08LAyxsPfhkjL+GXRNdU D5c40K4d9aBp1dboj9xRdmb9y/QhnQmnvBScLgg+YTbFJXmkvXBaNI/bY9OuRJXqTipLme VqrbWrxWzDbr0opPvEmCvYYm3Kpcq9S51xvkTTuG3ajUy00N0W45I0DY/OPv5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cbzJd4zM8z12nx; Wed, 01 Oct 2025 02:24:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5912OHSM092992; Wed, 1 Oct 2025 02:24:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5912OHFM092989; Wed, 1 Oct 2025 02:24:17 GMT (envelope-from git) Date: Wed, 1 Oct 2025 02:24:17 GMT Message-Id: <202510010224.5912OHFM092989@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: f7aad20db592 - main - ath: fix ath_buf leak if ath_tx_tag_crypto() returns an error 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: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f7aad20db59210a4411559d07976a48809b3b0a7 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=f7aad20db59210a4411559d07976a48809b3b0a7 commit f7aad20db59210a4411559d07976a48809b3b0a7 Author: Adrian Chadd AuthorDate: 2025-10-01 02:21:01 +0000 Commit: Adrian Chadd CommitDate: 2025-10-01 02:21:01 +0000 ath: fix ath_buf leak if ath_tx_tag_crypto() returns an error If ath_tx_tag_crypto() returns an error, then ath_tx_normal_setup() should consume the mbuf and return an error, so the caller knows to free the ath_buf. But it wasn't. This fixes issues I've seen locally where a an AP VAP constantly hits error conditions (due to other RF/PHY/MAC chipset issues which I haven't yet figured out) and encryption fails because the station goes away whilst something's being queued. Locally tested: * AR9380, AP mode (2G HT20, 5G HT20, 5G HT40) --- sys/dev/ath/if_ath_tx.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sys/dev/ath/if_ath_tx.c b/sys/dev/ath/if_ath_tx.c index deadd63c3d18..9ac591c14943 100644 --- a/sys/dev/ath/if_ath_tx.c +++ b/sys/dev/ath/if_ath_tx.c @@ -971,6 +971,12 @@ ath_legacy_xmit_handoff(struct ath_softc *sc, struct ath_txq *txq, ath_tx_handoff_hw(sc, txq, bf); } +/* + * Setup a frame for encryption. + * + * If this fails, then an non-zero error is returned. The mbuf + * must be freed by the caller. + */ static int ath_tx_tag_crypto(struct ath_softc *sc, struct ieee80211_node *ni, struct mbuf *m0, int iswep, int isfrag, int *hdrlen, int *pktlen, @@ -1547,6 +1553,10 @@ ath_tx_xmit_normal(struct ath_softc *sc, struct ath_txq *txq, * * Note that this may cause the mbuf to be reallocated, so * m0 may not be valid. + * + * If there's a problem then the mbuf is freed and an error + * is returned. The ath_buf then needs to be freed by the + * caller. */ static int ath_tx_normal_setup(struct ath_softc *sc, struct ieee80211_node *ni, @@ -2073,9 +2083,8 @@ ath_tx_start(struct ath_softc *sc, struct ieee80211_node *ni, /* This also sets up the DMA map; crypto; frame parameters, etc */ r = ath_tx_normal_setup(sc, ni, bf, m0, txq); - if (r != 0) - goto done; + return (r); /* At this point m0 could have changed! */ m0 = bf->bf_m; @@ -2132,7 +2141,6 @@ ath_tx_start(struct ath_softc *sc, struct ieee80211_node *ni, ath_tx_leak_count_update(sc, tid, bf); ath_tx_xmit_normal(sc, txq, bf); #endif -done: return 0; } From nobody Wed Oct 1 04:07:14 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cc1bQ6sBlz69ybQ; Wed, 01 Oct 2025 04:07:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cc1bQ1m5dz3W24; Wed, 01 Oct 2025 04:07:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759291634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yLSFHqT5tE6pNeLKV49n8cgjRjpX2Gpd0qUABmwR9zw=; b=S4qv8GyvQmqYudS8ObG8kPziHLGoeXij9+vMKltqI3l0oiWDKbmgN7AHLnHwS01QtzcbaE PMid21M6A+Pa2Eq3zZELa2+veXpm80Wcn3uw7dejNC23zwehpimVptyzClXnhteZi3CRh4 Iw+ghI6l5NngRnxCkNHOhP7FThZGw8QhepHPEJfkaEx+B5lkbd3+u82mcbFtRUiqei5JEV CnbkaaNb3pLEuO0vWNPUr4eJIojX10UDX6c/u3Em0BAWc10kwmkyMXPudmox38DWbibauC gOEXbgPtG8+4BoFaPJZNCrJXaCXC1S+FIw3hD2ArpmiH7Hyk4AxJebnQyn7W9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759291634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yLSFHqT5tE6pNeLKV49n8cgjRjpX2Gpd0qUABmwR9zw=; b=IY4mMB1/xGRFaae6Amk6pdbLnmSDxQqijLFr+o4tK4CqKrKYMTyEae1IXl/RQPvjaKDJ+H jdggiRVnqH7MUu5i+Cdd8vnkhfL1rtqQAkcDRM3uyv2QjJPajqvoygZsscJrudOUl4RbZD 5W9kjDMMjq5MEMolB6crbHVmpKsPJrY5t4iitL656rV+MKRRiNWUXA1AprZgI0jCXflb00 3xedoqaFwEjri4Baxj8JgpWQcqUumjL2ZiJ5Wl1/m5Ub3UF2z/w9mS6nZYBXK8hEQP+w7c rH8FcYggIgEkSRc/0bw3pi99aIU5kDNk6cusvA/NA+Sw4Y4B4vPfrqmBzbHAYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759291634; a=rsa-sha256; cv=none; b=CEy0Vz1WSqtLnFjcZrSQZXuOwQMPilMXRtxx7w8AQMatfAu97Ae2V53UfQLqLosaooFgFo 9WF1FAX49RZ8kQeZo8bzMFR4s5VGULnNiCtfFjqtRpPYK3wbGpQZ8QgSF9Wa/kc7abGKIF cUlh1rR7quCInyQdilbJ94aCPr6jlUG7vJV+fs6d/WdAoosvpPoVmDWG6Da4WrUu+dBbQ1 3XaWc+EKCkJaA86kGRD67VTZxggcOKCt5Cdy7zukkN0KDQ1kQ6A1SeNM02xgv1pBRBOrtl VxwugF4EX7YB54TgMwohdChXsLb93jXjMId4VUL9NgYLVvNfbv+U+nh+/+eapQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cc1bQ18HNz15Yt; Wed, 01 Oct 2025 04:07:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59147E1H085979; Wed, 1 Oct 2025 04:07:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59147EGI085976; Wed, 1 Oct 2025 04:07:14 GMT (envelope-from git) Date: Wed, 1 Oct 2025 04:07:14 GMT Message-Id: <202510010407.59147EGI085976@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eugene Grosbein Subject: git: 5d8fde850768 - main - trim.8: update the manual with references to zpool-trim and fsck_ffs -E List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5d8fde850768d31f722de6177204ec7cab199bd1 Auto-Submitted: auto-generated The branch main has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=5d8fde850768d31f722de6177204ec7cab199bd1 commit 5d8fde850768d31f722de6177204ec7cab199bd1 Author: Eugene Grosbein AuthorDate: 2025-10-01 04:05:54 +0000 Commit: Eugene Grosbein CommitDate: 2025-10-01 04:05:54 +0000 trim.8: update the manual with references to zpool-trim and fsck_ffs -E MFC after: 3 days --- usr.sbin/trim/trim.8 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/usr.sbin/trim/trim.8 b/usr.sbin/trim/trim.8 index a4874c54c183..eef369703715 100644 --- a/usr.sbin/trim/trim.8 +++ b/usr.sbin/trim/trim.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 20, 2025 +.Dd October 1, 2025 .Dt TRIM 8 .Os .Sh NAME @@ -48,9 +48,16 @@ The .Nm utility erases specified region of the device. -It is mostly relevant for storage that implement trim (like flash based, +It is mostly relevant for a storage that implements trim (like flash based, or thinly provisioned storage). .Sy All erased data is lost. +Alternatively, refer to the +.Xr fsck_ffs 8 +command having a flag +.Fl E +to trim populated UFS, and to the +.Xr zpool-trim 8 +command to trim existing ZFS pool. .Pp The following options are available: .Bl -tag -width indent @@ -156,7 +163,9 @@ is special device file not supporting DIOCGMEDIASIZE .Xr sysexits 3 , .Xr ada 4 , .Xr da 4 , -.Xr nda 4 +.Xr nda 4 , +.Xr fsck_ffs 8 , +.Xr zpool-trim 8 .Sh HISTORY The .Nm From nobody Wed Oct 1 07:12:04 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cc5hh5kxqz691Yc; Wed, 01 Oct 2025 07:12:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cc5hh5Crkz3qvG; Wed, 01 Oct 2025 07:12:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759302724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F0RDFBWL5ubZZL1zeJi9rSP6K9cwYgXBJp5dNfsLydU=; b=GWSXhcKjgmzZ5YIiogZ3gxu+CHr06x2eVfN1cXpNoNtO9F6rroqiey0q/vdRLWSaqqTjUZ lX3ULu2Vnz8wcijeU1jIEnPyALIqUosuXpLMZQm9bxDxHIOt0dLanBf+J6uNI6s8QBx9zY Z7RPdhI0MnBkF4eu318ZklA9DKcF4B/KKzimBfvh2R0pZB3iucnGbp0CmqheZkK/IiHavM bspQqfkzEH6tCki2lR0NKaLzPW+VKLU4XxQrtcMgwfW0lN8b+oKoQsli+Ql0SSY2QC9Uy6 iWd22ghbsJ5zLqKI1G4t5gm+gLtXDyZaDeRIPr+rykw+BskJoeqlmcgt1glxIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759302724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F0RDFBWL5ubZZL1zeJi9rSP6K9cwYgXBJp5dNfsLydU=; b=IhuzLIFGOBiD7UFVsss/IRyImabQdd1B1EF0W+lI5yGK+ANl1MQKVUVX7N2X8nQG7z3BsV XLb9I0l4QDsOixUObg4lc02Gnf34vfOj3RLkopdRERGvbedSaQm4pdXVgxnJ2ckmSD9+kg jh1hnAXF/KuFuTeyVAHhaCswoQpveuSFAHSEWJLF6+ycbD8MO3LRHcIe/ScgU5BRqwxl4K /Fy3jP4uqUIY1lkDFbgZjZs9yAoCaY+BeUgCH7AI392t6w/SIbIXzVrXVdPgtSfJTPaLnP Tp7cPP+0RYNtP8UzwEG28c7wSsL2QJvIHIByzIGHsKeNFu0ah2ERUBRx9l7OwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759302724; a=rsa-sha256; cv=none; b=Y29EMtYZDVzOXnq19MmZ2Pl/+q0PJJ2sNkoz/kvzmHtrFu+iFXRARfUoDfBVqruHcGMzJU Q/X8oGBs/IeX2bu8MVc7+SX8ba2vBSCsDPZglxIYRKiD9j7whWCLsgQXC9C/u78+2S/dlf EU3bvt1aUl0R6yu2zi9bUiF1+mLgJJqyoqt75SoiqQ3+6FABHnxrUQLXMvSC77TTXUvYLO whybNgh6qVCd6N/kTAIF2k1eDnAnyCqe9N+m91Mm8RUyzWcTexF2+gRZhP909r8Lsp1CGO S0+A5wvQUJcyRYdaY9IfRbry8Iwrri7I4z9kMI2tgCajmGgtRW7wWXr41shNLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cc5hh4qd6z1BMX; Wed, 01 Oct 2025 07:12:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5917C4hK040891; Wed, 1 Oct 2025 07:12:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5917C4Wq040888; Wed, 1 Oct 2025 07:12:04 GMT (envelope-from git) Date: Wed, 1 Oct 2025 07:12:04 GMT Message-Id: <202510010712.5917C4Wq040888@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 4e0997d1d492 - main - zfs: retire zfs_zstd_compress_wrap 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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e0997d1d492eb955bb20a970a7fce189269498c Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=4e0997d1d492eb955bb20a970a7fce189269498c commit 4e0997d1d492eb955bb20a970a7fce189269498c Author: Mateusz Guzik AuthorDate: 2025-10-01 07:09:10 +0000 Commit: Mateusz Guzik CommitDate: 2025-10-01 07:09:10 +0000 zfs: retire zfs_zstd_compress_wrap The function is unused, already disappeared upstream and results in compilation warnings. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/contrib/openzfs/module/zstd/zfs_zstd.c | 58 ------------------------------ 1 file changed, 58 deletions(-) diff --git a/sys/contrib/openzfs/module/zstd/zfs_zstd.c b/sys/contrib/openzfs/module/zstd/zfs_zstd.c index 3db196953f74..c403c001086a 100644 --- a/sys/contrib/openzfs/module/zstd/zfs_zstd.c +++ b/sys/contrib/openzfs/module/zstd/zfs_zstd.c @@ -441,64 +441,6 @@ zstd_enum_to_level(enum zio_zstd_levels level, int16_t *zstd_level) } #ifndef IN_LIBSA -static size_t -zfs_zstd_compress_wrap(void *s_start, void *d_start, size_t s_len, size_t d_len, - int level) -{ - int16_t zstd_level; - if (zstd_enum_to_level(level, &zstd_level)) { - ZSTDSTAT_BUMP(zstd_stat_com_inval); - return (s_len); - } - /* - * A zstd early abort heuristic. - * - * - Zeroth, if this is <= zstd-3, or < zstd_abort_size (currently - * 128k), don't try any of this, just go. - * (because experimentally that was a reasonable cutoff for a perf win - * with tiny ratio change) - * - First, we try LZ4 compression, and if it doesn't early abort, we - * jump directly to whatever compression level we intended to try. - * - Second, we try zstd-1 - if that errors out (usually, but not - * exclusively, if it would overflow), we give up early. - * - * If it works, instead we go on and compress anyway. - * - * Why two passes? LZ4 alone gets you a lot of the way, but on highly - * compressible data, it was losing up to 8.5% of the compressed - * savings versus no early abort, and all the zstd-fast levels are - * worse indications on their own than LZ4, and don't improve the LZ4 - * pass noticably if stacked like this. - */ - size_t actual_abort_size = zstd_abort_size; - if (zstd_earlyabort_pass > 0 && zstd_level >= zstd_cutoff_level && - s_len >= actual_abort_size) { - int pass_len = 1; - pass_len = zfs_lz4_compress(s_start, d_start, s_len, d_len, 0); - if (pass_len < d_len) { - ZSTDSTAT_BUMP(zstd_stat_lz4pass_allowed); - goto keep_trying; - } - ZSTDSTAT_BUMP(zstd_stat_lz4pass_rejected); - - pass_len = zfs_zstd_compress(s_start, d_start, s_len, d_len, - ZIO_ZSTD_LEVEL_1); - if (pass_len == s_len || pass_len <= 0 || pass_len > d_len) { - ZSTDSTAT_BUMP(zstd_stat_zstdpass_rejected); - return (s_len); - } - ZSTDSTAT_BUMP(zstd_stat_zstdpass_allowed); - } else { - ZSTDSTAT_BUMP(zstd_stat_passignored); - if (s_len < actual_abort_size) { - ZSTDSTAT_BUMP(zstd_stat_passignored_size); - } - } -keep_trying: - return (zfs_zstd_compress(s_start, d_start, s_len, d_len, level)); - -} - /* Compress block using zstd */ static size_t zfs_zstd_compress_impl(void *s_start, void *d_start, size_t s_len, size_t d_len, From nobody Wed Oct 1 07:41: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 4cc6LP6Fcbz694Fp; Wed, 01 Oct 2025 07:41: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 4cc6LP2Q1Lz3tDv; Wed, 01 Oct 2025 07:41:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759304477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pINGnBkgtGv/9XTYYO0CUhxA/eJAv7cy3kFwUnoGoKU=; b=crm42Gd550+sc5De/sh87rvoFT4obrZv4tdhbV19JppMYXj6zXtRSqFova/ERFxCW0SZzG x4UGBdSu4R9diaevjfGxfxu9426xOH5u6xK0PV7bDExomem8G8ruymwvNNFMjgpy02sIyZ omob4hbrMq0CFNCSga0dgGWVUD2+aCj5MSlWVzpWIlUXjKuVUCXSwH4T61bm0tQZ9RBT0n U/V8FElijisRUcApKOQ4LWfv14k/Duuym4uFtif+jFsGV9qSbXbzsMPQbyCnFzH51jQRP+ z+Mt1edfx0fKcMxMslfwbI6Eh9rU+hgog47rpn8Uyz00j4zGSZvfUSE1f8vVVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759304477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pINGnBkgtGv/9XTYYO0CUhxA/eJAv7cy3kFwUnoGoKU=; b=Q3FDVM+6+YH+9B7HUl9x6wH9acqAJQbXgmkWJqPsiTkv1Cjwm8kfLpPSQYSNiytXE5Lfv2 gXwvu5L6EbOjhColXJOKBkc6a0CsjdUA+5PpEhCb1RuXqH9skUuq3SiPkXDmuGeTtqTlN3 hj/l0t38lOO2aJ0VDzO5waQFCr+y8nrlkYe0AhVcpRpeGc55P37pvdsKPQlUxVU6w2DjCK dEic4fWn3nlWxxDe9nkH4ULAPVRutBUG4flqb75tSrcfgGw/wB0Al32g4+1c+EaPyeTWCl 1CvqY3fN2V85DZJMcNB2aQtujjUld8ceK6q+m/I+4uzfgJ8/+jx+9UDJfGJb5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759304477; a=rsa-sha256; cv=none; b=aujWIgtLlentdEpe8Hvxj/+dena0PdRiNQw0gLBXGO13bBZ+Nz5T1Fgfa2QeC25/x9CpiS g85UCxon987Hh6r5/znZo+XSdB9sBAR+L7rNMhd662nZXio7kXqYdeZxiFSRRKnG+FxDzr 8cQLsspD5aOU/gC2UeuBSJWQrEKZx4LLsGUBLsRZfsIE3DfrpH0zXI2fc/9jSUuPlWjugG 4ULHNuIokDbreefzqxMV4lNIiMqVbpRurbxonl64LPf3Ul4AyGTkIPE5jwtpUAElZHzSCh NhvU2cN9xzLehs+1K8nNn/qa6R5zOkjxSjnwWwTsKhFmjAtQ+lIqgUqZ3XJj0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cc6LP0wWWz1BXV; Wed, 01 Oct 2025 07:41:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5917fH9q093786; Wed, 1 Oct 2025 07:41:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5917fHm8093783; Wed, 1 Oct 2025 07:41:17 GMT (envelope-from git) Date: Wed, 1 Oct 2025 07:41:17 GMT Message-Id: <202510010741.5917fHm8093783@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 5b63afc09a86 - main - watchdog: ifdef wd_ioctl_patpat on COMPAT_FREEBSD14 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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5b63afc09a86318fa8bf09a786a1b084e000cc51 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=5b63afc09a86318fa8bf09a786a1b084e000cc51 commit 5b63afc09a86318fa8bf09a786a1b084e000cc51 Author: Mateusz Guzik AuthorDate: 2025-10-01 07:40:31 +0000 Commit: Mateusz Guzik CommitDate: 2025-10-01 07:40:31 +0000 watchdog: ifdef wd_ioctl_patpat on COMPAT_FREEBSD14 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/dev/watchdog/watchdog.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/watchdog/watchdog.c b/sys/dev/watchdog/watchdog.c index e1b2e08c3f10..c599db56bf95 100644 --- a/sys/dev/watchdog/watchdog.c +++ b/sys/dev/watchdog/watchdog.c @@ -204,6 +204,7 @@ wd_valid_act(int act) return true; } +#ifdef COMPAT_FREEBSD14 static int wd_ioctl_patpat(caddr_t data) { @@ -223,6 +224,7 @@ wd_ioctl_patpat(caddr_t data) return (wdog_kern_pat(u)); } +#endif static int wd_get_time_left(struct thread *td, time_t *remainp) From nobody Wed Oct 1 07:49:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cc6WX0VQwz6952F; Wed, 01 Oct 2025 07:49:12 +0000 (UTC) (envelope-from kp@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 4cc6WX00LVz3wv1; Wed, 01 Oct 2025 07:49:12 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759304952; h=from:from:reply-to:subject:subject: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=tTEs356THfIVZwnuiWjkfVEcWUHRlm4hA5v3UOsGmYQ=; b=F/8ftIFvva95/M2kgik1Jj60kuxvmLG0uRYd0L8+duWnpVfnvILqh5gdCJw9siNng9Njh8 u4RnY14op/jW39CEO7f8aQXO/FhqtknRXrEe65IJ0y+666y0daVE1HKAwcR1t9jqkWdxEP bF9n2A4r/PiBkdh6U0S32vJ/jC4+Keh3TynUGHt9pbbfnEG5sRGNdSoOdRuA2H9YKOB9P0 kUSqIzKopTAdO/CNWeUPep2TQHGPNc7Ye1ttF7X03ZclmhsMKDuWWCtPqlzz0JsbSg5PHg NbRYYbYyOnmFxc7V1EP9D7XBWchB+oi7L0vtSMA8f6kMxeWZfMhdyEJ0OhL2xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759304952; h=from:from:reply-to:subject:subject: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=tTEs356THfIVZwnuiWjkfVEcWUHRlm4hA5v3UOsGmYQ=; b=JnVSzK/hEc8CU02QMfaRJ/8LTLqrHxoYj6wNYETSKHniRBrPWc4xTP04GNwRd9uKiKc7UY lUGk0OvHmxhwrCGPqAf/nFDNnYekrSrtwKCotnUtBg0t4rQ+hlGRRdh75jTj16YKIohR1r +q3LtMzMimxOJm/rRDIA9qAzICNStFlAnXZh7dbwPrtpChrLc6n3RpQB2mwCnaI5jvZRBb WhD/RgVV6/LKn7E+uGiWgQCvg86KKD7a77wrua+/qyqNv7/XuUSjVfOa9hf6cmL3YETDtj YxhOBC529/LQz9E0lkVoXE+yb5X+H/3rytruaRHLNyMF/8FjgRTvyfTR8d6pAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759304952; a=rsa-sha256; cv=none; b=ugHLmOXRMsw26laQIcJp5uHsXBZQ8/Rx7WhwQHHsDJAVGNuXbXBn/n3OxOqW+LgmxBcaAi DLM5YtYjYVglkbSa5VcVnncR3j6ZSbMWkQfNp9p5iTkBGt3VYkb7RXVEffvTl2HQ8jv8Iv bEXdA47U/51GbdPSXJlYzGKrOF0WkBzfE+QU3ic0k4m6K1nF6r3Pq+IYs/qaftptlRs9uu bxJNJH2ZXwLbJ/hYXald/+KnlA5d8S8DDGWraWYIWdK+Wui+wJDKDiTJ8kBiBXc/dMYdrh V07+DpSmO+XdyVtoRvXqxlgDBf5NsYqBoQKQx3DU/snRA83iysnU4TeXrHcFug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R11" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cc6WW5dQ4z41R; Wed, 01 Oct 2025 07:49:11 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 98A0210052; Wed, 01 Oct 2025 09:49:09 +0200 (CEST) From: Kristof Provost To: Gleb Smirnoff Cc: ItzBlinkzy , Kevin Irabor , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 4e7a375804e5 - main - IfAPI: Added missing accessor for if_home_vnet Date: Wed, 01 Oct 2025 09:49:08 +0200 X-Mailer: MailMate (2.0r6272) Message-ID: In-Reply-To: References: <202509292116.58TLGxWx078766@gitrepo.freebsd.org> <9E63C594-08DD-43CD-BD76-3E9B9E80AA60@FreeBSD.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; markup=markdown Content-Transfer-Encoding: quoted-printable On 30 Sep 2025, at 20:11, Gleb Smirnoff wrote: > On Tue, Sep 30, 2025 at 07:51:05PM +0200, Kristof Provost wrote: > K> > The actual question is whether there is a driver that really needs= to access > K> > this field or was this added by the logic that if a field exists i= n struct > K> > ifnet, a function to access it shall exist? > K> > > K> It=E2=80=99s hard to predict what fields will be relevant for out-of= -tree consumers, but it seems reasonable to allow access to this one give= n we already allow the current vnet to be accessed too. > > As we discussed earlier through the last decade, the ifnet is poorly de= signed > and we need a new API. But as that was a heavy weight to lift, that wa= s never > finished. Juniper came with a plan to provide accessors. They would n= ot make > API any better or prettier, but would basically provide binary compatib= ility > for a case when struct ifnet grows or is rearranged but all existing fi= elds > remain! We agreed that this is an interim step towards a better API in = a > future. The Juniper's API shall provide access to minimal set of ifnet= fields > that current drivers use. It should not encourage use of fields that be= long to > the stack, not to the drivers. So, the question is what is the driver t= hat > needs if_home_vnet? Who is maintaining it and what are they going to do= if I > remove if_home_vnet together with if_vmove? > Good questions. I hope Kevin can tell us what his use case for this is, b= ecause it=E2=80=99s always easier to think about these things with specif= ic problems in mind. =E2=80=94 Kristof From nobody Wed Oct 1 08:24:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cc7JP6s7Pz698QJ; Wed, 01 Oct 2025 08:24:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cc7JP4pZPz42xb; Wed, 01 Oct 2025 08:24:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759307077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nFlRLbTIsK4/CZlyF+0g1IAMxKR0ltQcI8CmJED0VRM=; b=tiYIEQ39pzhERnOFsfoT0s0ejEvoz8C59x6q5c7LC+AFgaxjHws65dR5iEI+ptcpBQ44z0 3p8ta87nYs57yQIKLQhUMGylOGvV6DHY6uXTBjZA/Z+iFulL+Ioh+a9LNFBpTsSVPtezRS 4jqDWAQKeY4i3/zgXlgUVr84jYm1xcFC35FHzLZ9uplnWhEVlv19/RIgOCPE+kSrqlWdgH lCF4XNc7ELXQPDn2ZautN8mQIRiuVte9K8joh0GguZ+UQxDZkxnKk2n7K9t/chogUHmZ5n yrVb2Dq/zDQ7IfV1JD2W+GzQU8yANi2sEGDb8jOAjqQ7I2AEsb8k/oO6dfPioA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759307077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nFlRLbTIsK4/CZlyF+0g1IAMxKR0ltQcI8CmJED0VRM=; b=IRH+PP+brebB94MwUWMl4fa1n9dv7HtbKizMThQl1bkYWc0TCjvas1IOpTC22g8AoYSRXB yrp0hLqQE/Q/vUPkUhKPwcnce1mFsIpe4YIMkSl76SqQeK4ycnp45GySEzeuOCG2X6ISZL B1fnOyULOFkfHN8jrajnYvpMK/v23nbFh4M0Y0oi3m0TxjYLYJH4tyZeGWYk6vwRKzqDgm D0b9hDyDeC+WQMVhqgPElIqCUzy3Lsw6qowepNXOjvgClkong7YCowkF8KjKv23KOUzwLv CcjnR9xoUovs4jz4PE/tTuUNzIoOV3Gcy9XhcHBpFDQ8VUsyG6UG7DWmjrRSMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759307077; a=rsa-sha256; cv=none; b=twsYyTeZhVB1MzYsIdHYXg73fMOFH+vzuC2zDJZcdbdZzFqc99ZIakh7kOdWkgbl9AFNW0 JwGuhjsxsIidQ2fNwixRA8C1yMWzSIa5rplB98vT+RZY6toDHEhMp4aoWJMJ7WOQbL+bN2 +LWAKCWI2b2MquJljOa9jwU059l4LoTh9FJlsJUwDzOQw1EbA353f8Mr1NYMKY0G684Dgq SYFuNDA+YTjNZAyk6aa97UfRQhjxFj5CNjmSeq2riI8ZJQYYViNdiYP2TX9SZIgjzd+zR/ A3UAMSohgbsaP+rBOXSDzGRDJrYcrolWWI7p7pnqds/fmRa9fGjEryfogjbtNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cc7JP4Lwcz1ClS; Wed, 01 Oct 2025 08:24:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5918ObpS082254; Wed, 1 Oct 2025 08:24:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5918ObF6082251; Wed, 1 Oct 2025 08:24:37 GMT (envelope-from git) Date: Wed, 1 Oct 2025 08:24:37 GMT Message-Id: <202510010824.5918ObF6082251@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 5cc36854ee63 - main - devd: Remove SND package 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: 5cc36854ee63dc695d90a841d9db587bec67ba24 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=5cc36854ee63dc695d90a841d9db587bec67ba24 commit 5cc36854ee63dc695d90a841d9db587bec67ba24 Author: Christos Margiolis AuthorDate: 2025-10-01 08:18:32 +0000 Commit: Christos Margiolis CommitDate: 2025-10-01 08:23:02 +0000 devd: Remove SND package This was done by accident, build snd.conf always. Reported by: ivy Fixes: 2ffaca551eaf ("snd_hda: Implement automatic redirection between associations") Sponsored by: The FreeBSD Foundation MFC after: 1 day --- sbin/devd/Makefile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sbin/devd/Makefile b/sbin/devd/Makefile index f65eee93dd4b..dad6f4f9c340 100644 --- a/sbin/devd/Makefile +++ b/sbin/devd/Makefile @@ -4,7 +4,7 @@ WARNS?= 6 PACKAGE=devd CONFGROUPS= CONFS DEVD CONFS= devd.conf -DEVD= devmatch.conf +DEVD= devmatch.conf snd.conf DEVDDIR= /etc/devd .if ${MK_ACPI} != "no" DEVD+= asus.conf @@ -51,11 +51,6 @@ NVMEDIR= ${DEVDDIR} NVME+= nvmf.conf NVMEPACKAGE= nvme-tools -CONFGROUPS+= SND -SNDDIR= ${DEVDDIR} -SND+= snd.conf -SNDPACKAGE= snd - .if ${MK_USB} != "no" DEVD+= uath.conf ulpt.conf .endif From nobody Wed Oct 1 08:27:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cc7MY1Dv4z698ZS for ; Wed, 01 Oct 2025 08:27:21 +0000 (UTC) (envelope-from kevin.irabor04@gmail.com) Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cc7MX6HtYz43gc for ; Wed, 01 Oct 2025 08:27:20 +0000 (UTC) (envelope-from kevin.irabor04@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-3352018e050so6332807a91.2 for ; Wed, 01 Oct 2025 01:27:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759307239; x=1759912039; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Bw/t/YkIZEVDad0Hjx/eOkSBU4Bg/A4YLM0uTIa1HyI=; b=KrnE8mImxX1eyBhTwJCZgZgT4dg1XB6W7KPBPJJz8EZmc4eDeQQxzH9vlcfSXPQ5Ht xyBuSNbxA5l/Atyc6C0tgy0vt9/d5Jtph8omwsDV+oepDaqH+x3JpY+p9rI9vZtRdvS6 nVnc0Zm2enud1jrstQMkzDr0Rh3ee225iZlHbLGHcMZ6cmgcVCfugiXow53Pi/NyzrcY DMxZJFfOqEcnf2XVEhcHbolbBlk3/qcgeKfDUIjTAKtUOrHbvv61ZRmcRXi2M08mF2BT 1g3IF0epy3C3DmeJ/AjTqCh0AWzoeWJzRSl4WAVgncDIX4qnIQ+TT3LAyXYYy+LowrXG 3vhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759307239; x=1759912039; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Bw/t/YkIZEVDad0Hjx/eOkSBU4Bg/A4YLM0uTIa1HyI=; b=d2QPUWhcO9HDLgkW/3e48GasdfDJ23kUcPm3CVL0deB4FEkNyMe9BgxxlWrX88INRT OvB8TktDnsxvUGrGaGOKeenZ0Kdfr4IPrW8AIImB2v+xGRKXjuZPr/pKt2ACS5va4IcM hBCkgLwL8WHpIPrL9UzxnEODTqqOa+b3qgB7a194t6I6gCG2/HuUQiQPMxpJMhFJ7zJB 6Fi0wvHvU13+JlbKnhQDGVedAQ8LEAAv1ozd5UrTl9HXyKse4dtZKzdyEE7zJVYSsdGH m+lNk10HcrnaV6sAjQBA/WubhS7s4B9uXL+naF9S6OAcHFgVV3gCIFFE5m5VN4TfvdLN vvkw== X-Forwarded-Encrypted: i=1; AJvYcCXq/7+jLAgp19nCY5ztJm5eA18B8TOggiC13P79Yv1pMGMyO9xCHKlm3RVzjceDX0wcQ2AVZVa4Vk/nrPQMiIVDohF9EA==@freebsd.org X-Gm-Message-State: AOJu0YwmGFdhpsiOtBDU7VJxGTIMEIE2nNDbaALuX9UXScWCTzQCGdNW hugCO0JmXldwQF1DTWiZUl1hoVoFeSylbcGj1PiADe9ry6XcB7GxIY2EEgh9EXNZ5vZaAxZu8ng smZFOdI6o9WrlwwZLxsjCfwDI9M+B8cM= X-Gm-Gg: ASbGncuFQVjDDWCBjBB+L/ubcIyuWdYogOGkkQbRQ8ZKDc4oJLz/N1TuD20JSEWfjcm 8wtJP5/AwnHKoUztuNfnbYd8opV3T0sj8FJOQDYU6yUdwmrvtlXL/xvMrhpiPmykYSezOowxe1a /huJ6jmegDseKyqAim6BOHtGkGP+l7mhafbpkSvK/rc+lND/lk10cM2guTuFNYFtvIhqXTWY7Bf C49XP1vgGV8KlL3+o4LUybjBNOJfh19 X-Google-Smtp-Source: AGHT+IGBrjnmrx8lyvquOSZbENC7qc3wPHZGo6aXldWpWxMC7kA5AQLhpaAcLfQv2pnBo9zFONIiNIoQLn/ET5JHN3Q= X-Received: by 2002:a17:90b:3911:b0:32e:4924:690f with SMTP id 98e67ed59e1d1-339a6e63b8fmr2875389a91.6.1759307238515; Wed, 01 Oct 2025 01:27:18 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202509292116.58TLGxWx078766@gitrepo.freebsd.org> <9E63C594-08DD-43CD-BD76-3E9B9E80AA60@FreeBSD.org> In-Reply-To: From: Kevin Irabor Date: Wed, 1 Oct 2025 09:27:05 +0100 X-Gm-Features: AS18NWANaIRQyhoiXwZu8Em4aWy0FVwkJYfp74PzVR002IxE4NOcyIrVixDcDls Message-ID: Subject: Re: git: 4e7a375804e5 - main - IfAPI: Added missing accessor for if_home_vnet To: Kristof Provost Cc: Gleb Smirnoff , ItzBlinkzy , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000000a82c064014a3b0" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cc7MX6HtYz43gc --00000000000000a82c064014a3b0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, Both emails are mine - one I use as my GitHub email and the one I signed off with is my personal email. Sorry for the confusion there. To answer your questions: I was browsing the ifnet code and saw the earlier IfAPI commits that were made. I assumed the pattern was to provide accessors for every field in struct ifnet, and to maintain consistency I added this one since it was missing. I'm not aware of any drivers that need if_home_vnet and if_vmove Regards, Kevin. On Wed, Oct 1, 2025 at 8:49=E2=80=AFAM Kristof Provost wro= te: > On 30 Sep 2025, at 20:11, Gleb Smirnoff wrote: > > On Tue, Sep 30, 2025 at 07:51:05PM +0200, Kristof Provost wrote: > > K> > The actual question is whether there is a driver that really needs > to access > > K> > this field or was this added by the logic that if a field exists i= n > struct > > K> > ifnet, a function to access it shall exist? > > K> > > > K> It=E2=80=99s hard to predict what fields will be relevant for out-of= -tree > consumers, but it seems reasonable to allow access to this one given we > already allow the current vnet to be accessed too. > > > > As we discussed earlier through the last decade, the ifnet is poorly > designed > > and we need a new API. But as that was a heavy weight to lift, that wa= s > never > > finished. Juniper came with a plan to provide accessors. They would > not make > > API any better or prettier, but would basically provide binary > compatibility > > for a case when struct ifnet grows or is rearranged but all existing > fields > > remain! We agreed that this is an interim step towards a better API in = a > > future. The Juniper's API shall provide access to minimal set of ifnet > fields > > that current drivers use. It should not encourage use of fields that > belong to > > the stack, not to the drivers. So, the question is what is the driver > that > > needs if_home_vnet? Who is maintaining it and what are they going to do > if I > > remove if_home_vnet together with if_vmove? > > > Good questions. I hope Kevin can tell us what his use case for this is, > because it=E2=80=99s always easier to think about these things with speci= fic > problems in mind. > > =E2=80=94 > Kristof > --00000000000000a82c064014a3b0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello= ,
Both emails are mine - one I use as my GitHu= b email and the one I signed off with is my personal email. Sorry for the c= onfusion there.
To answe= r your questions:
I was browsing the ifnet code and saw the earlier IfAPI commits that were = made. I assumed the pattern was to provide accessors for every field in str= uct ifnet, and to maintain consistency I added this one since it was missin= g.
I'm= not aware of any drivers that need if_home_vnet and if_vmove
<= div>Regards,
Kevin.


On Wed, Oct 1, 2025 at 8:49=E2=80=AFAM Kristof Provost &l= t;kp@freebsd.org> wrote:
=
On 30 Sep 2025, at 20:11,= Gleb Smirnoff wrote:
> On Tue, Sep 30, 2025 at 07:51:05PM +0200, Kristof Provost wrote:
> K> > The actual question is whether there is a driver that reall= y needs to access
> K> > this field or was this added by the logic that if a field e= xists in struct
> K> > ifnet, a function to access it shall exist?
> K> >
> K> It=E2=80=99s hard to predict what fields will be relevant for ou= t-of-tree consumers, but it seems reasonable to allow access to this one gi= ven we already allow the current vnet to be accessed too.
>
> As we discussed earlier through the last decade, the ifnet is poorly d= esigned
> and we need a new API.=C2=A0 But as that was a heavy weight to lift, t= hat was never
> finished.=C2=A0 Juniper came with a plan to provide accessors.=C2=A0 T= hey would not make
> API any better or prettier, but would basically provide binary compati= bility
> for a case when struct ifnet grows or is rearranged but all existing f= ields
> remain! We agreed that this is an interim step towards a better API in= a
> future.=C2=A0 The Juniper's API shall provide access to minimal se= t of ifnet fields
> that current drivers use. It should not encourage use of fields that b= elong to
> the stack, not to the drivers. So, the question is what is the driver = that
> needs if_home_vnet? Who is maintaining it and what are they going to d= o if I
> remove if_home_vnet together with if_vmove?
>
Good questions. I hope Kevin can tell us what his use case for this is, bec= ause it=E2=80=99s always easier to think about these things with specific p= roblems in mind.

=E2=80=94
Kristof
--00000000000000a82c064014a3b0-- From nobody Wed Oct 1 08:28:04 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cc7NR41Hmz698Vc; Wed, 01 Oct 2025 08:28:07 +0000 (UTC) (envelope-from christos@FreeBSD.org) Received: from margiolis.net (mail.margiolis.net [95.179.159.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cc7NQ53t3z44hM; Wed, 01 Oct 2025 08:28:06 +0000 (UTC) (envelope-from christos@FreeBSD.org) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=default; bh=m/CxLQP5olt2 +7cNxCkNN0I4nndH7iY257EAlRYlsdU=; h=in-reply-to:references:subject:to: from:date; d=margiolis.net; b=EMI4cn4MLBXGQr2TvsgD7lp1cE28OVhZNPkLQmtQ VOJ9STlx8xuCNacS5BxFVMbwfhY2vbSM5W5RNMO/bXVy2rDHO3rFwi7p4/mUU8LwTR1PGa nA7zd3WzW1EvdNgfakNaPDZgLuHyoCJCeOWnSrYkIz2JT+FOpgP17q9pSEkc8= Received: from localhost (public-gprs559638.centertel.pl [37.225.49.87]) by margiolis.net (OpenSMTPD) with ESMTPSA id 12c050d3 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 1 Oct 2025 02:28:05 -0600 (MDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 01 Oct 2025 10:28:04 +0200 Message-Id: From: "Christos Margiolis" To: "Guido Falsi" , , , Subject: Re: git: 2ffaca551eaf - main - snd_hda: Implement automatic redirection between associations X-Mailer: aerc 0.21.0 References: <202509301052.58UAqxgM026265@gitrepo.freebsd.org> <9bb0f51a-cb7f-45c4-9a48-bffbadf99845@madpilot.net> In-Reply-To: <9bb0f51a-cb7f-45c4-9a48-bffbadf99845@madpilot.net> X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20473, ipnet:95.179.144.0/20, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cc7NQ53t3z44hM On Tue Sep 30, 2025 at 10:10 PM CEST, Guido Falsi wrote: > On 9/30/25 21:22, Guido Falsi wrote: >> On 9/30/25 12:52, Christos Margiolis wrote: >>> The branch main has been updated by christos: >>> >>> URL: https://cgit.FreeBSD.org/src/commit/?=20 >>> id=3D2ffaca551eaf32c17f701762ecf29a961cf19aa4 >>> >>> commit 2ffaca551eaf32c17f701762ecf29a961cf19aa4 >>> Author:=C2=A0=C2=A0=C2=A0=C2=A0 Christos Margiolis >>> AuthorDate: 2025-09-30 10:52:44 +0000 >>> Commit:=C2=A0=C2=A0=C2=A0=C2=A0 Christos Margiolis >>> CommitDate: 2025-09-30 10:52:44 +0000 >>> >>> =C2=A0=C2=A0=C2=A0=C2=A0 snd_hda: Implement automatic redirection betwe= en associations >>> =C2=A0=C2=A0=C2=A0=C2=A0 For audio to be redirected to the headphones/h= eadset after=20 >>> plugging the >>> =C2=A0=C2=A0=C2=A0=C2=A0 jack, or back to the speaker/internal mic when= unplugging it, the >>> =C2=A0=C2=A0=C2=A0=C2=A0 speaker and headphone pins need to be part of = the same association >>> =C2=A0=C2=A0=C2=A0=C2=A0 (i.e., the same PCM device). This patch makes = it possible to=20 >>> redirect >>> =C2=A0=C2=A0=C2=A0=C2=A0 audio even between different associations, whi= ch can reduce the=20 >>> need for >>> =C2=A0=C2=A0=C2=A0=C2=A0 manual pin patching. >>> =C2=A0=C2=A0=C2=A0=C2=A0 The idea is that we issue a devctl_notify() fr= om within the jack >>> =C2=A0=C2=A0=C2=A0=C2=A0 detection callback whenever a jack is (un-)plu= gged to redirect=20 >>> audio to >>> =C2=A0=C2=A0=C2=A0=C2=A0 the appropriate device. Then the snd.conf devd= script is=20 >>> responsible for >>> =C2=A0=C2=A0=C2=A0=C2=A0 using virtual_oss to change the playback/recor= ding device to=20 >>> whatever >>> =C2=A0=C2=A0=C2=A0=C2=A0 snd_hda(4) selected. The reason for requiring = virtual_oss is that=20 >>> it has >>> =C2=A0=C2=A0=C2=A0=C2=A0 hot-swapping support, which is necessary for j= ack redirection. >>> =C2=A0=C2=A0=C2=A0=C2=A0 Sponsored by:=C2=A0=C2=A0 The FreeBSD Foundati= on >>> =C2=A0=C2=A0=C2=A0=C2=A0 MFC after:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 2 day= s >>> =C2=A0=C2=A0=C2=A0=C2=A0 Differential Revision:=C2=A0 https://reviews.f= reebsd.org/D50070 >>> --- >>> =C2=A0 sbin/devd/Makefile=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 |=C2=A0 5 +++++ >>> =C2=A0 sbin/devd/devd.conf.5=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = | 16 +++++++++++++ >>> =C2=A0 sbin/devd/snd.conf=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 | 23 +++++++++++++++++++ >>> =C2=A0 sys/dev/sound/pci/hda/hdaa.c | 53 ++++++++++++++++++++++++++++++= ++=20 >>> +----------- >>> =C2=A0 4 files changed, 84 insertions(+), 13 deletions(-) >>> >>> diff --git a/sbin/devd/Makefile b/sbin/devd/Makefile >>> index 5d5721d16884..f65eee93dd4b 100644 >>> --- a/sbin/devd/Makefile >>> +++ b/sbin/devd/Makefile >>> @@ -51,6 +51,11 @@ NVMEDIR=3D=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= ${DEVDDIR} >>> =C2=A0 NVME+=3D=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 nvmf.conf >>> =C2=A0 NVMEPACKAGE=3D=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 nvme-to= ols >>> +CONFGROUPS+=3D=C2=A0=C2=A0=C2=A0 SND >>> +SNDDIR=3D=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ${DEVDDIR} >>> +SND+=3D=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 snd.conf >>> +SNDPACKAGE=3D=C2=A0=C2=A0=C2=A0 snd >>=20 >> Looks like this is causing the package building step of the build to=20 >> look for a src/release/packages/ucl/snd-all.ucl file. >>=20 >> Is it intentional to cause this to produce a new base package? >>=20 >> Looks like in this case an ucl file for the description is needed? >>=20 > > After working around this one locally, I get a similar issue with=20 > virtual_oss missing its ucl file too. > > Just reporting this right away so it is known. That should fix it: https://cgit.freebsd.org/src/commit/?id=3D5cc36854ee63dc695d90a841d9db587be= c67ba24 Sorry for the breakage once again. Christos From nobody Wed Oct 1 08:29: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 4cc7Q72Yv5z698gP; Wed, 01 Oct 2025 08:29:35 +0000 (UTC) (envelope-from christos@FreeBSD.org) Received: from margiolis.net (mail.margiolis.net [95.179.159.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cc7Q66Xgfz45CN; Wed, 01 Oct 2025 08:29:34 +0000 (UTC) (envelope-from christos@FreeBSD.org) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=default; bh=B7uCUIE5cR2g zwOYbaupZ/WWJD1/fpXdLGvwNFSpw0I=; h=in-reply-to:references:subject:to: from:date; d=margiolis.net; b=oOskPuJw2qgnFiv8y17wTz11FLP2Z/HfI99jAP2D f3tF0QpjXXqo1dEvuWldWQ7qsjN34H7J6W2fc+qaXi42/kQyAL6DXdfuHLqIFw50oT7134 azkPzz8XstC+fr47oRzNnCZUUrTVWH/onwXOG9sxyxr+7Btmp3M95nXJJItI8= Received: from localhost (public-gprs559638.centertel.pl [37.225.49.87]) by margiolis.net (OpenSMTPD) with ESMTPSA id 77a3a28c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 1 Oct 2025 02:29:33 -0600 (MDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 01 Oct 2025 10:29:32 +0200 Message-Id: From: "Christos Margiolis" To: "Guido Falsi" , , , Subject: Re: git: 2ffaca551eaf - main - snd_hda: Implement automatic redirection between associations X-Mailer: aerc 0.21.0 References: <202509301052.58UAqxgM026265@gitrepo.freebsd.org> <9bb0f51a-cb7f-45c4-9a48-bffbadf99845@madpilot.net> In-Reply-To: <9bb0f51a-cb7f-45c4-9a48-bffbadf99845@madpilot.net> X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20473, ipnet:95.179.144.0/20, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cc7Q66Xgfz45CN On Tue Sep 30, 2025 at 10:10 PM CEST, Guido Falsi wrote: > On 9/30/25 21:22, Guido Falsi wrote: >> On 9/30/25 12:52, Christos Margiolis wrote: >>> The branch main has been updated by christos: >>> >>> URL: https://cgit.FreeBSD.org/src/commit/?=20 >>> id=3D2ffaca551eaf32c17f701762ecf29a961cf19aa4 >>> >>> commit 2ffaca551eaf32c17f701762ecf29a961cf19aa4 >>> Author:=C2=A0=C2=A0=C2=A0=C2=A0 Christos Margiolis >>> AuthorDate: 2025-09-30 10:52:44 +0000 >>> Commit:=C2=A0=C2=A0=C2=A0=C2=A0 Christos Margiolis >>> CommitDate: 2025-09-30 10:52:44 +0000 >>> >>=20 >> Looks like this is causing the package building step of the build to=20 >> look for a src/release/packages/ucl/snd-all.ucl file. >>=20 >> Is it intentional to cause this to produce a new base package? >>=20 >> Looks like in this case an ucl file for the description is needed? >>=20 > > After working around this one locally, I get a similar issue with=20 > virtual_oss missing its ucl file too. > > Just reporting this right away so it is known. Is there an error log for that? Christos From nobody Wed Oct 1 08:37:13 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cc7b25Vwcz699c6; Wed, 01 Oct 2025 08:37:18 +0000 (UTC) (envelope-from mad@madpilot.net) Received: from vogon.madpilot.net (vogon.madpilot.net [159.69.1.99]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cc7b23DwLz46wg; Wed, 01 Oct 2025 08:37:18 +0000 (UTC) (envelope-from mad@madpilot.net) Authentication-Results: mx1.freebsd.org; none Received: from localhost (mail [IPv6:fd5c:5351:d272::3]) by vogon.madpilot.net (Postfix) with ESMTP id 4cc7b05lKXzLmxw; Wed, 01 Oct 2025 10:37:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=madpilot.net; h= content-transfer-encoding:content-type:content-type:in-reply-to :from:from:content-language:references:subject:subject:date:date :message-id:received; s=cyq4qetkgngm; t=1759307834; x= 1761122235; bh=vlexMQjXnJfYE1y5XmMFs2WYEzprPl6hHdPL7P0iaH8=; b=s 54K4IoxoIZd0bGDeG6toocsQAnRAbE9gXcL31Clr7TVMoceWEoXLYWHyPy+KAue3 M9/QaA27DlmJs5ccnCUySZXiL4IyyTvla0R3yCw8c8x1zLqbw20i3ai3yMzL81Ln QNHG3N2JvJRjEZcpSL73RlIkRW2s+iDMSB4l0VMeI7XKeBXnBbD3TTMtS3lMSArH vjsT7BoOCdEHcdO20AdZtAgjTtdAgZvR56CFZJ2oYUHmvy4aW3uTvj5nYaV7aUuo +pZozFpXaCAcOMYM9Qa89d2jCxicfrhZoF39jo4J/Hwh35eB4N9pGHJ+k9y23dsS KlnmIvC8QHoowPdPbWDuw== Received: from vogon.madpilot.net ([IPv6:fd5c:5351:d272::3]) by localhost (vogon.madpilot.net [IPv6:fd5c:5351:d272::3]) (amavis, port 10026) with ESMTP id QhEmu2TC1sKc; Wed, 1 Oct 2025 10:37:14 +0200 (CEST) Message-ID: Date: Wed, 1 Oct 2025 10:37:13 +0200 Subject: Re: git: 2ffaca551eaf - main - snd_hda: Implement automatic redirection between associations To: Christos Margiolis , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202509301052.58UAqxgM026265@gitrepo.freebsd.org> <9bb0f51a-cb7f-45c4-9a48-bffbadf99845@madpilot.net> Content-Language: en-US, it, en-GB From: Guido Falsi Autocrypt: addr=mad@madpilot.net; keydata= xsBNBE+G+l0BCADi/WBQ0aRJfnE7LBPsM0G3m/m3Yx7OPu4iYFvS84xawmRHtCNjWIntsxuX fptkmEo3Rsw816WUrek8dxoUAYdHd+EcpBcnnDzfDH5LW/TZ4gbrFezrHPdRp7wdxi23GN80 qPwHEwXuF0X4Wy5V0OO8B6VT/nA0ADYnBDhXS52HGIJ/GCUjgqJn+phDTdCFLvrSFdmgx4Wl c0W5Z1p5cmDF9l8L/hc959AeyNf7I9dXnjekGM9gVv7UDUYzCifR3U8T0fnfdMmS8NeI9NC+ wuREpRO4lKOkTnj9TtQJRiptlhcHQiAlG1cFqs7EQo57Tqq6cxD1FycZJLuC32bGbgalABEB AAHNHkd1aWRvIEZhbHNpIDxtYWRAbWFkcGlsb3QubmV0PsLAeQQTAQgAIwIbAwIeAQIXgAUL CQgHAwUVCgkICwQWAgMBBQJS79AgAhkBAAoJEBrmhg5Wy9KTc0kH/RO64ORBlTbTHaUaOj8F Je5O5NU2Pt9Cyt5ZWBRvxntr1zPTJGKRPS9ihlIfqT4ZvEngQGp57EUyFbCpI0UWasTerImM tt5WACnGmCzUTB39UXx8Oy4b1EgWeTJQ747e/F1mQLXTNa6ijRBE9fYlTb4gAkPN88/wVV9v 3PZozKLTg16ghBzHM/P7Lk8L7clPEZChX1FTa/6eSt3nvzfCuTMZbBPJF/ph+q1KyPqRgVfh tyhu5dvgMoPz/ni41IfeSrkJTD5RXzdyGR9q4Z1NYeBsLkRjC4LxKAP5KqUsvlOUjKvO1byj ApYdMarol+IGkaSk9e3zVYAJkWKjn/ni8XbOwU0EUxB7QQEQAKFhrDceoPdK/IHDSmoj6SQY isvM7VdhcleS7E9DoEAVt7yMbf6HbbMVTTY6ckvwTWQssywLBXNVqxgc4WLJjzfUhgef+WE7 5M3+WFYlOVQLGZY/zEVgma1raYnOHNAOzeHLDmEXjbZP6vGAeDyBbGfQPpE7qGYZ7ubeT3Xw QO+PklcCrvOPj2ZPcAxGNS2xVU/LzONqCrJqLMJSIcCdsbiSP4G5PnDFHtMokaTY6OEr8OEQ fOAerhcHUa/z7Uu8YtmaqKH+QGkE/WEgaRqSiTnv0JOTD+DxehaqvoKPPZ++2NpCZMHB2i6A /xifmQwEiIjEXtcueBRzkNUQkxhqZyS13SrhocL9ydtaVPBzZatAEjUDDEJmAMLVFs45qfyh MiNapHJo2n3MW/E5omqCvEkDdWX/en3P7CK2TemeaDghMsgkNKax/z0wNo5UZCkOPOz0xpNi UilOVbkuezZZNg65741qee2lfXhQIaZ66yT7hphc/N/z3PIAtLeze4u1VR2EXAuZ2sWAdlKC NTlJMsaU/x70BV11Wd/ypnVzM68dfdQIIAj1iMFAD/lXGlEUmKXg5Ov2VQDlTntQoanCYrAg +8CttPzjrydgLZFq3hrtQmfc0se5yv1WHS69+BsUOG09RvvawUDZxUjW19kyeN9THaNRgow3 kSuArUp6zSmJABEBAAHCwF8EGAEIAAkFAlMQe0ECGwwACgkQGuaGDlbL0pMN5wgA4bCkX/qw EVC06ToeR6C2putmSWQMgpDaqrv65Hubo+QGmg2P4ewTYQQ4g6oYWS03qHxqVVWhKz7FjfrV +dH8qbCLfSgIcvdBha7ayGZVrsiuMLKGbw36fcmkZPpSDOfHcP0XH8Z+u9CWj0xUkTxAlZ/7 i6gYSUpG2JWNtdmE/X8VVEyXusCLwy0K0BI60A/4dRTIX3C4QKrJ3ZbUXegz70ynjHf+lQMZ 9IZKASoRMuS5FozPQh6abvmwZEPdf5I9riUElzvHrqJ8Bx0t3Pujdoth+yNHpnBxrtO8LkQd rQ58P0SwcaIX33T2U9pG8bhu5YVR88FQ8OQ0cEsPBpDncg== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:159.69.0.0/16, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cc7b23DwLz46wg 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 On 10/1/25 10:29, Christos Margiolis wrote: > On Tue Sep 30, 2025 at 10:10 PM CEST, Guido Falsi wrote: >> On 9/30/25 21:22, Guido Falsi wrote: >>> On 9/30/25 12:52, Christos Margiolis wrote: >>>> The branch main has been updated by christos: >>>> >>>> URL: https://cgit.FreeBSD.org/src/commit/? >>>> id=2ffaca551eaf32c17f701762ecf29a961cf19aa4 >>>> >>>> commit 2ffaca551eaf32c17f701762ecf29a961cf19aa4 >>>> Author:     Christos Margiolis >>>> AuthorDate: 2025-09-30 10:52:44 +0000 >>>> Commit:     Christos Margiolis >>>> CommitDate: 2025-09-30 10:52:44 +0000 >>>> >>> >>> Looks like this is causing the package building step of the build to >>> look for a src/release/packages/ucl/snd-all.ucl file. >>> >>> Is it intentional to cause this to produce a new base package? >>> >>> Looks like in this case an ucl file for the description is needed? >>> >> >> After working around this one locally, I get a similar issue with >> virtual_oss missing its ucl file too. >> >> Just reporting this right away so it is known. > > Is there an error log for that? Unluckily I did not keep a copy but was the same as the dns one, with s/snd-all/virtual_oss/ The problem is caused by lines 218-222 in libexec/rc/rc.d/Makefile [1], which, if I understand correctly, instruct to create a new virtual_oss base package for which the description ucl file is missing. I fixed locally by creating that ucl file (src/release/packages/ucl/virtual_oss-all.ucl [1] https://github.com/freebsd/freebsd-src/blob/5cc36854ee63dc695d90a841d9db587bec67ba24/libexec/rc/rc.d/Makefile#L218 -- Guido Falsi From nobody Wed Oct 1 09:21:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cc8YY6yKhz69FHK; Wed, 01 Oct 2025 09:21:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cc8YY6HzFz3DPk; Wed, 01 Oct 2025 09:21:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759310465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aCZV05zRWuH+CYQRUEiTmqxBKMI+TlEBgYQeZzpiE+Q=; b=vCJ77QBSK9R6CFXG2iPPIFx/WEGG4jITOHVelVLsOka9+9+/bAd4JF6BfJvW/wf8bhxf6v JiVTNMBy+ywkojM4Cfad7BMExborQN7/kNfruaq13rt68UH+jlMJSVUZwlxkTRF3cTaRPi y26HFjReH/CJHn7QBWFAbdNfv7pp6Pq0jTcH88I1oubNFq8gNZLKTMMnr7bkAcD+7xRgdW wxI7K8e0goTpvymASb930hvxps6kTAkAF7DQBpKXnM/3b+lVMZkzr0egkhbkc5dvIS+fIt QS6dxQ143gegvq9HZH2XDSXPS/z3cbQy5MW/lbd/z4+p0Cc1eTrRmIwbT1OkSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759310465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aCZV05zRWuH+CYQRUEiTmqxBKMI+TlEBgYQeZzpiE+Q=; b=anVOQS43VsBX32OdgfWJSGqUnYVlbhdpH7z1jSHG+gQiwPh+41/3ji1ECP2QOs9d90WDvh DtXYaRdQ2/W/FAy8LT8C3jl81DyqCCVDh80zImXHE546zrqO/hm7hGmcPa3/CFkgUhMyRU LokfDlodNKW6Rt/ZpbzaO4yt35kQE7aq2ptdm0wmX0m3RsZVpforoREm90OJTH+dT8xhcl Tz2hqKmYVJ1UgAqEOlircIpXXu1cOptpjsDcJnqSdeRw3QTqFabS4dTU73k21AqAMDYF/d qTHrniKcSKPLxJxJkX72xb7T1pCj6KWMj3Rehk/R3v6Qg+2wE4dl5Vill6CYWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759310465; a=rsa-sha256; cv=none; b=UGf9kRE7AfJVfKVGZMF0uncVOKvV2yhF1ZYLHi65vq8l4d9HglJ8J1CqDOerubzFrA9X72 Ny+3iPsIi3ZBIPSpGkEDBCA92nfIlySDWt+vlz0pkDlHR1POrPNTCcyUir7aazH1sCcsN1 UZ84cllBaESUm6HWu6GVqiG0YyaikcelalPBA7r6M9se/Q2PBLIxE1TVZhgh0SkTXlZSwz +joHKs/c3d42XYTWlb19jX9TYyVd3lotmhD8PaRSBOTTRZmCBA2vnItODvX2zVVvRCFTPM mW3zNW7MaawdQLXyLkXC1IOndXTVT0XQ7zMvv1vv4PgobvEuYbnqczLeabTawA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cc8YY5vQHzxt; Wed, 01 Oct 2025 09:21:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5919L5St093963; Wed, 1 Oct 2025 09:21:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5919L5Ng093960; Wed, 1 Oct 2025 09:21:05 GMT (envelope-from git) Date: Wed, 1 Oct 2025 09:21:05 GMT Message-Id: <202510010921.5919L5Ng093960@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: 7bc6ec1a255d - main - Revert "acpi_powerres: Fix turning off power resources on first D-state switch" 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: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7bc6ec1a255da6678a72330d65a1f320de538727 Auto-Submitted: auto-generated The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=7bc6ec1a255da6678a72330d65a1f320de538727 commit 7bc6ec1a255da6678a72330d65a1f320de538727 Author: Aymeric Wibo AuthorDate: 2025-10-01 09:13:56 +0000 Commit: Aymeric Wibo CommitDate: 2025-10-01 09:13:56 +0000 Revert "acpi_powerres: Fix turning off power resources on first D-state switch" This reverts commit a13f28d57ecfd136ce73493659c28a47fa1a4b9f. Reported by: phk Tested by: phk Sponsored by: The FreeBSD Foundation --- sys/dev/acpica/acpi_powerres.c | 110 ++--------------------------------------- 1 file changed, 5 insertions(+), 105 deletions(-) diff --git a/sys/dev/acpica/acpi_powerres.c b/sys/dev/acpica/acpi_powerres.c index 0baa5c595470..29d1690f1bdd 100644 --- a/sys/dev/acpica/acpi_powerres.c +++ b/sys/dev/acpica/acpi_powerres.c @@ -76,13 +76,6 @@ struct acpi_powerconsumer { /* Device which is powered */ ACPI_HANDLE ac_consumer; int ac_state; - - struct { - bool prx_has; - size_t prx_count; - ACPI_HANDLE *prx_deps; - } ac_prx[ACPI_D_STATE_COUNT]; - TAILQ_ENTRY(acpi_powerconsumer) ac_link; TAILQ_HEAD(,acpi_powerreference) ac_references; }; @@ -103,7 +96,9 @@ static TAILQ_HEAD(acpi_powerconsumer_list, acpi_powerconsumer) ACPI_SERIAL_DECL(powerres, "ACPI power resources"); static ACPI_STATUS acpi_pwr_register_consumer(ACPI_HANDLE consumer); +#ifdef notyet static ACPI_STATUS acpi_pwr_deregister_consumer(ACPI_HANDLE consumer); +#endif /* notyet */ static ACPI_STATUS acpi_pwr_register_resource(ACPI_HANDLE res); #ifdef notyet static ACPI_STATUS acpi_pwr_deregister_resource(ACPI_HANDLE res); @@ -226,84 +221,6 @@ acpi_pwr_deregister_resource(ACPI_HANDLE res) } #endif /* notyet */ -/* - * Evaluate the _PRx (power resources each D-state depends on). This also - * populates the acpi_powerresources queue with the power resources discovered - * during this step. - * - * ACPI 7.3.8 - 7.3.11 guarantee that _PRx will return the same data each - * time they are evaluated. - * - * If this function fails, acpi_pwr_deregister_consumer() must be called on the - * power consumer to free already allocated memory. - */ -static ACPI_STATUS -acpi_pwr_get_power_resources(ACPI_HANDLE consumer, struct acpi_powerconsumer *pc) -{ - ACPI_INTEGER status; - ACPI_STRING reslist_name; - ACPI_HANDLE reslist_handle; - ACPI_STRING reslist_names[] = {"_PR0", "_PR1", "_PR2", "_PR3"}; - ACPI_BUFFER reslist; - ACPI_OBJECT *reslist_object; - ACPI_OBJECT *dep; - ACPI_HANDLE *res; - - ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); - ACPI_SERIAL_ASSERT(powerres); - - MPASS(consumer != NULL); - - for (int state = ACPI_STATE_D0; state <= ACPI_STATE_D3_HOT; state++) { - pc->ac_prx[state].prx_has = false; - pc->ac_prx[state].prx_count = 0; - pc->ac_prx[state].prx_deps = NULL; - - reslist_name = reslist_names[state - ACPI_STATE_D0]; - if (ACPI_FAILURE(AcpiGetHandle(consumer, reslist_name, &reslist_handle))) - continue; - - reslist.Pointer = NULL; - reslist.Length = ACPI_ALLOCATE_BUFFER; - status = AcpiEvaluateObjectTyped(reslist_handle, NULL, NULL, &reslist, - ACPI_TYPE_PACKAGE); - if (ACPI_FAILURE(status) || reslist.Pointer == NULL) - /* - * ACPI_ALLOCATE_BUFFER entails everything will be freed on error - * by AcpiEvaluateObjectTyped. - */ - continue; - - reslist_object = (ACPI_OBJECT *)reslist.Pointer; - pc->ac_prx[state].prx_has = true; - pc->ac_prx[state].prx_count = reslist_object->Package.Count; - - if (reslist_object->Package.Count == 0) { - AcpiOsFree(reslist_object); - continue; - } - - pc->ac_prx[state].prx_deps = mallocarray(pc->ac_prx[state].prx_count, - sizeof(*pc->ac_prx[state].prx_deps), M_ACPIPWR, M_NOWAIT); - if (pc->ac_prx[state].prx_deps == NULL) { - AcpiOsFree(reslist_object); - return_ACPI_STATUS (AE_NO_MEMORY); - } - - for (size_t i = 0; i < reslist_object->Package.Count; i++) { - dep = &reslist_object->Package.Elements[i]; - res = dep->Reference.Handle; - pc->ac_prx[state].prx_deps[i] = res; - - /* It's fine to attempt to register the same resource twice. */ - acpi_pwr_register_resource(res); - } - AcpiOsFree(reslist_object); - } - - return_ACPI_STATUS (AE_OK); -} - /* * Register a power consumer. * @@ -312,7 +229,6 @@ acpi_pwr_get_power_resources(ACPI_HANDLE consumer, struct acpi_powerconsumer *pc static ACPI_STATUS acpi_pwr_register_consumer(ACPI_HANDLE consumer) { - ACPI_INTEGER status; struct acpi_powerconsumer *pc; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); @@ -323,27 +239,12 @@ acpi_pwr_register_consumer(ACPI_HANDLE consumer) return_ACPI_STATUS (AE_OK); /* Allocate a new power consumer */ - if ((pc = malloc(sizeof(*pc), M_ACPIPWR, M_NOWAIT | M_ZERO)) == NULL) + if ((pc = malloc(sizeof(*pc), M_ACPIPWR, M_NOWAIT)) == NULL) return_ACPI_STATUS (AE_NO_MEMORY); TAILQ_INSERT_HEAD(&acpi_powerconsumers, pc, ac_link); TAILQ_INIT(&pc->ac_references); pc->ac_consumer = consumer; - /* - * Get all its power resource dependencies, if it has _PRx. We do this now - * as an opportunity to populate the acpi_powerresources queue. - * - * If this fails, immediately deregister it. - */ - status = acpi_pwr_get_power_resources(consumer, pc); - if (ACPI_FAILURE(status)) { - ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, - "failed to get power resources for %s\n", - acpi_name(consumer))); - acpi_pwr_deregister_consumer(consumer); - return_ACPI_STATUS (status); - } - /* XXX we should try to find its current state */ pc->ac_state = ACPI_STATE_UNKNOWN; @@ -353,6 +254,7 @@ acpi_pwr_register_consumer(ACPI_HANDLE consumer) return_ACPI_STATUS (AE_OK); } +#ifdef notyet /* * Deregister a power consumer. * @@ -377,9 +279,6 @@ acpi_pwr_deregister_consumer(ACPI_HANDLE consumer) /* Pull the consumer off the list and free it */ TAILQ_REMOVE(&acpi_powerconsumers, pc, ac_link); - for (size_t i = 0; i < sizeof(pc->ac_prx) / sizeof(*pc->ac_prx); i++) - if (pc->ac_prx[i].prx_deps != NULL) - free(pc->ac_prx[i].prx_deps, M_ACPIPWR); free(pc, M_ACPIPWR); ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "deregistered power consumer %s\n", @@ -387,6 +286,7 @@ acpi_pwr_deregister_consumer(ACPI_HANDLE consumer) return_ACPI_STATUS (AE_OK); } +#endif /* notyet */ /* * Set a power consumer to a particular power state. From nobody Wed Oct 1 09:39: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 4cc8yR0TDzz69Gd6; Wed, 01 Oct 2025 09:39: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 4cc8yQ3qkPz3HSl; Wed, 01 Oct 2025 09:39:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759311550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7+boV47q/mJNB9vIY77QXtElUtcI3YSS1IZZYt/YRL8=; b=Keg7+BdBoLcItQDkREjzsal2brnew0UkgoMHE5J4sx+HU/ap/XDgAT6ncnZO44axg3VHQl Nq7DbAFUIhEyG9DRsy4GdIVxaVOQVRo7aRUyJBE2iOjEd1FtEh4UaERZvERu8Q9eb/X6zC aEI9rZ5288qWGyUit3KOL4d80kthLynJxPAVvDzqE+q85avrO4XEljmG9d7v2dPiVNiIJ3 Ids9r7og+hZA4Fc96ivYwCL6TyZds9/sYddEhlB/uR85KidL8Eg1NHHHvpi521n9vbSv52 VxEXMGv7xqba7MdcSYElG5ZfOFo2mjG5GYKyNOEfmo1xVaMHNJffoIexuVUViQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759311550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7+boV47q/mJNB9vIY77QXtElUtcI3YSS1IZZYt/YRL8=; b=wqRdDdz0FrrQe5bwdl4rTBaXPmY9TOzUKfHyO+bx3f723SACqkKKgfj279lD0qgUQR8gfS FS6EzCkPxvId/042KSYUtfKbCXNJ6Ec2U0NSA4Rz/2X7nukWlObTIjcyeaTt0vYIrY2cMn cbKJj3p87vT4irC8dD7FSMuqwIfzW7XsGHAv3qKO22dGvptaK/UAnd3H4KAtWJTCTMtH6J CB8nkYqLkObRQ4z9NGj9cop/Y0M1D52y9/6Tz40L1a2Z6czVPzR6/IpBlRygc7Lr7vsgg1 zDSu7g4aC/W9GjYamZfVcyV9MhOqPJ2DLpQewKRH/KJdLgtTH8bpf7VmompZSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759311550; a=rsa-sha256; cv=none; b=ZxZERUKo9oXTuxYXphMuRlovg1nwGB0e+uzgmv2rn2cX7qtFxS05MDT7BQoApal3ffTE25 lVZuFrFA6ikwBxSXO8nvTr6I+6uADaIGEJGXuxIm0yd/jZuW+0N2YUMin2CybdWpmkm+GX u+zRYP+YSb92/vllWzIDNFGJTX5GKhvE3UTH46jaPQETod3eLTwCgC+5WIS2gmqg9Xu3aS 2MIB8+CLe/YA3renLC69ImLmGhzq4Pb1qDvEGrbbGXzqokIv+uRxH7Kuf5dc/1ORSpkS0x O4nlY9zgGh3L6buWzPKvjCd3wz/9AHitRcINkbkF7+7OGjPGhtF5uWs1SSmLDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cc8yQ3N1Qz2JK; Wed, 01 Oct 2025 09:39:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5919dAAr017248; Wed, 1 Oct 2025 09:39:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5919dABY017245; Wed, 1 Oct 2025 09:39:10 GMT (envelope-from git) Date: Wed, 1 Oct 2025 09:39:10 GMT Message-Id: <202510010939.5919dABY017245@gitrepo.freebsd.org> 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=B8rgrav?= Subject: git: b5e2bd5ef381 - main - libucl: Fix bugs in C-style comment parser 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: b5e2bd5ef38181ce4a445ec19f1fa5cb6c8ea692 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b5e2bd5ef38181ce4a445ec19f1fa5cb6c8ea692 commit b5e2bd5ef38181ce4a445ec19f1fa5cb6c8ea692 Author: Dag-Erling Smørgrav AuthorDate: 2025-10-01 09:28:30 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-01 09:28:56 +0000 libucl: Fix bugs in C-style comment parser When an asterisk is encountered inside a C-style comment, we first check if there is at least one more character left in the buffer, and if that character is a slash, which would terminate the comment. If that is not the case, the next two characters are consumed without being inspected. If one of those is a double quote, or the initial asterisk of an asterisk-slash pair, we end up misparsing the comment. MFC after: 3 days Reviewed by: kevans, bofh Differential Revision: https://reviews.freebsd.org/D52808 --- contrib/libucl/src/ucl_parser.c | 77 ++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 39 deletions(-) diff --git a/contrib/libucl/src/ucl_parser.c b/contrib/libucl/src/ucl_parser.c index 6be16d12169c..728cd6381056 100644 --- a/contrib/libucl/src/ucl_parser.c +++ b/contrib/libucl/src/ucl_parser.c @@ -164,51 +164,50 @@ start: } } } - else if (chunk->remain >= 2 && *p == '/') { - if (p[1] == '*') { - beg = p; - ucl_chunk_skipc (chunk, p); - comments_nested ++; - ucl_chunk_skipc (chunk, p); - - while (p < chunk->end) { - if (*p == '"' && *(p - 1) != '\\') { - quoted = !quoted; - } - - if (!quoted) { - if (*p == '*') { - ucl_chunk_skipc (chunk, p); - if (chunk->remain > 0 && *p == '/') { - comments_nested --; - if (comments_nested == 0) { - if (parser->flags & UCL_PARSER_SAVE_COMMENTS) { - ucl_save_comment (parser, beg, p - beg + 1); - beg = NULL; - } - - ucl_chunk_skipc (chunk, p); - goto start; - } - } - ucl_chunk_skipc (chunk, p); - } - else if (p[0] == '/' && chunk->remain >= 2 && p[1] == '*') { - comments_nested ++; - ucl_chunk_skipc (chunk, p); - ucl_chunk_skipc (chunk, p); - continue; + else if (chunk->remain >= 2 && *p == '/' && p[1] == '*') { + beg = p; + comments_nested ++; + ucl_chunk_skipc (chunk, p); + ucl_chunk_skipc (chunk, p); + while (p < chunk->end) { + if (*p == '"' && *(p - 1) != '\\') { + /* begin or end double-quoted string */ + quoted = !quoted; + ucl_chunk_skipc (chunk, p); + } + else if (quoted) { + /* quoted character */ + ucl_chunk_skipc (chunk, p); + } + else if (chunk->remain >= 2 && *p == '*' && p[1] == '/') { + /* end of comment */ + ucl_chunk_skipc (chunk, p); + ucl_chunk_skipc (chunk, p); + comments_nested --; + if (comments_nested == 0) { + if (parser->flags & UCL_PARSER_SAVE_COMMENTS) { + ucl_save_comment (parser, beg, p - beg + 1); + beg = NULL; } + goto start; } - + } + else if (chunk->remain >= 2 && *p == '/' && p[1] == '*') { + /* start of nested comment */ + comments_nested ++; + ucl_chunk_skipc (chunk, p); ucl_chunk_skipc (chunk, p); } - if (comments_nested != 0) { - ucl_set_err (parser, UCL_ENESTED, - "unfinished multiline comment", &parser->err); - return false; + else { + /* anything else */ + ucl_chunk_skipc (chunk, p); } } + if (comments_nested != 0) { + ucl_set_err (parser, UCL_ENESTED, + "unfinished multiline comment", &parser->err); + return false; + } } if (beg && p > beg && (parser->flags & UCL_PARSER_SAVE_COMMENTS)) { From nobody Wed Oct 1 10:09:49 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cc9dp1496z69K9J; Wed, 01 Oct 2025 10:09:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cc9dp0YGZz3SxN; Wed, 01 Oct 2025 10:09:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759313390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Wn4mNFLOGFNQtPTaF3O44Gcjapmbxp+KmoQb2RTPi0=; b=Bhpt7BcvR987/XwBpDS4dPQztzt+w3WBONBWZbL/JxDQdd/mqFKMaVXS7pKgWEngpMyZti 5yJmOAJHOCn5AlBr2hKNa1FK1OOV+bbMvmoHjdGZfOrYiYcA0wnMgNSUuueWINxkfL8VQW 9x4zici69h2b5kdPz91b960bXxJhtpjaRI04hQL0eySojspmigsf6YqFk/lYb5Gq86XCtX kBrqeeBcN1QKhGnyZVCal+Xy52Vs9VBEHh9x/Y3lSa9IXasKxOPClvCLSSGYjt18FOmvE4 YVadI9rB1spuCirB+gGraD4Z41/6bvjBzfORROeWRC2Nu7Nl2+dhPYmhvzv48w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759313390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Wn4mNFLOGFNQtPTaF3O44Gcjapmbxp+KmoQb2RTPi0=; b=VeE+zbkDuMP23I6HFUcBkLKeL+mOOecUVg2mDnJEhQ5408jwDWFlJT/BPbSSfevBGqcdBu CwWylnJzULnfC6geA6rTwMSlVe612uvGbmuNOrqJSv93rm2Pg3qK8NRT63rQej76b8stKL Bly7Pcthih7iWkRM81EExEoFG9wja10jPDMvg/4cwJASoY0FpmYzQXXBBaY+6jO1NLVrqn skv92syM4yFgJ1MUCVRiy+A6GQnfxDUcYmAaqT/3Wm2zX07vW92WT/I039XPAUVQyXIQD0 ViJk439cNp18PdgzZMuv2RIEFum4G5LodXca/G42wcWBmYVo3pAmFuOFnezIow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759313390; a=rsa-sha256; cv=none; b=ZX4RaY2YmMBtgS7rJFttm+XI5e3OcyDvdODG+QJh9v4M+ObM7fuWJ3ZJz+4ZU+c4thuWQA 7p75+1zwcJdDawgEQqFwc+DONgIDEYx0QRZYkh5hlzDsZ3W4OE+h4aoWPFPWUuEHn9ITYy LX/KOEI56AEnJGOAYNpO+aMvzA10M/iAVSRGVATWMV+c/A2n2wp4mPZyG4xM7T56/z19wF 3+A58F6TThMSUqxp1xA03t6GBlXkk3/vzvd9juamYeK406ksHxyDwuh/s+Noop9zKSpn0w gw04fOWbIKh3PtP0CU9zhfmwJrE+xvcd6Yq2b0oD5CA2A5GHvoeUaM3hkkpn8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cc9dn6zRtz2w8; Wed, 01 Oct 2025 10:09:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 591A9nDU075330; Wed, 1 Oct 2025 10:09:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 591A9nne075327; Wed, 1 Oct 2025 10:09:49 GMT (envelope-from git) Date: Wed, 1 Oct 2025 10:09:49 GMT Message-Id: <202510011009.591A9nne075327@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: bce8cdaf4cb1 - main - rc.d: Fix package for virtual_oss 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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bce8cdaf4cb184db577a5633e82bdabe24239af1 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=bce8cdaf4cb184db577a5633e82bdabe24239af1 commit bce8cdaf4cb184db577a5633e82bdabe24239af1 Author: Lexi Winter AuthorDate: 2025-10-01 10:04:19 +0000 Commit: Lexi Winter CommitDate: 2025-10-01 10:06:55 +0000 rc.d: Fix package for virtual_oss There is no virtual_oss package. Install the virtual_oss script in rc, since there's currently no specific package for sound utilities. This fixes the pkgbase build. Fixes: f040ee6e4078 ("virtual_oss: Do not build if WITHOUT_CUSE is set") --- libexec/rc/rc.d/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile index cd55a05f545e..4f2d63c06e19 100644 --- a/libexec/rc/rc.d/Makefile +++ b/libexec/rc/rc.d/Makefile @@ -216,9 +216,7 @@ CCDPACKAGE= ccdconfig .endif .if ${MK_CUSE} != "no" -CONFGROUPS+= VOSS -VOSS= virtual_oss -VOSSPACKAGE= virtual_oss +CONFS+= virtual_oss .endif .if ${MK_KERBEROS_SUPPORT} != "no" From nobody Wed Oct 1 10:18: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 4cc9rL2l5pz69Ksf; Wed, 01 Oct 2025 10:18:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cc9rL1cwfz3WQW; Wed, 01 Oct 2025 10:18:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759313938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZIBU/1wAGivJznzlty7hLZpBjsUijijrKsOYqE+lTfk=; b=u2n2YTXwjwvyrVxIfzX2NSxnz8RbtFkvof5lib6VF2LzXvzngLfhyi6qoXVJNTSThgNxZq wnRcaiV5aeiZQDx8bN/o6rlrLNvKej8EVIgBVeKu1yZO7Cmd/CJTqVCF9dgivr6n6GmBMZ TGkTZd6bH38TJO2AogXclYc+Iic89yg+fXgqwMRmgsXZ1uj+oVe058CGg4KqDie1mMp4n1 GervHTZe7FsYkfBOGojCFIbZ6OmF9ewRInf2kSNMVMl8VcciANo/1Mb6a8j7s4EdWyiWvl cnhKLGGXi0tmtrq4lWngoKL9ZlDI5U5xT1CPLkqJ2gKeHbPdQnFsNB0QNO1pOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759313938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZIBU/1wAGivJznzlty7hLZpBjsUijijrKsOYqE+lTfk=; b=kec0Kqf98bRfQWbFsUxw8l76gNFlY4oyVnoHrJUgsUWWVKZ9CMkMz0bmw5mN3rr8+t1WRG qJqCVS5n7E9/4OyXo28c5syIwCtGo0PdmNbkWUTWA0deuMPmV7u4GMfLJyf3BP9lH94ziN /oAJVJYF93H1qPvhTMgUHRiB6/YVuxlHKteUvsOsWrdlOdYg64zgHI/s8vOnfRodz3UIde IQ03QEEK497k8lrfCvmJ/aiKvg3BvcZLUp5gIKqYWl8Xvr5unVdvnBG46Lk65q8bNV8Pw5 QoRHJ3OfKvGrDtEZCmV8dXyeyKivnWTIfDkcWzGkPtaGRHDlawMp5dYKdYaCPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759313938; a=rsa-sha256; cv=none; b=YuiK5pAY5ZrZ2jAvYToTsWukhfqtMVyTSiWBio9HxMiMrbqzW8KIaun4STuQuPY81jLYCb cm6B+qDY+/dgWUW0h+EW/+0NWeajewbWoVj4LBvtJASzmUw+39kEbgtXh8qGZehDdoLGPP bP+op0IP7BfbrH1/lUjkssYLw74bBONNN24Fw9ppvRaonNSV3qRJA/M78EhasDJ0hpVGSG uMgEY3lIet5WouPrWXkYgd7QCtkND5xspBQMtl0a9PEm5NvdqOSWBHCD5qysqSuDQv1Y+M V+ARagGJI2cu0bCKH4sqpVojPxMJ/2/Li7ILQRmGVVSii2kUisbCSo+K2uL/Vw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cc9rL0vmRz3BQ; Wed, 01 Oct 2025 10:18:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 591AIvWY093755; Wed, 1 Oct 2025 10:18:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 591AIvio093752; Wed, 1 Oct 2025 10:18:57 GMT (envelope-from git) Date: Wed, 1 Oct 2025 10:18:57 GMT Message-Id: <202510011018.591AIvio093752@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 1bbc898dbf72 - main - zfs: annotate arc_buf_is_shared with __maybe_unused 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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1bbc898dbf72638ac0dfbc666f62d39dbd68258a Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=1bbc898dbf72638ac0dfbc666f62d39dbd68258a commit 1bbc898dbf72638ac0dfbc666f62d39dbd68258a Author: Mateusz Guzik AuthorDate: 2025-10-01 10:17:14 +0000 Commit: Mateusz Guzik CommitDate: 2025-10-01 10:18:53 +0000 zfs: annotate arc_buf_is_shared with __maybe_unused To avoid a compilation warning. The routine turned out to be rather stubborn when it comes to trying to ifdef it out. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/contrib/openzfs/module/zfs/arc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/contrib/openzfs/module/zfs/arc.c b/sys/contrib/openzfs/module/zfs/arc.c index bd6dc8edd8ca..591e2dade59e 100644 --- a/sys/contrib/openzfs/module/zfs/arc.c +++ b/sys/contrib/openzfs/module/zfs/arc.c @@ -1392,6 +1392,7 @@ arc_get_complevel(arc_buf_t *buf) return (buf->b_hdr->b_complevel); } +__maybe_unused static inline boolean_t arc_buf_is_shared(arc_buf_t *buf) { From nobody Wed Oct 1 10:52: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 4ccBbY5333z69NYT; Wed, 01 Oct 2025 10:52:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccBbY4JtVz3ZDk; Wed, 01 Oct 2025 10:52:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759315977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lYtbgI+gU5cQFdOqlKk7ok9vfz9vrQxfmWAShGohdhE=; b=NG5X4W2LFXW9Cu3TmT4hpa9uMm7kQyE8GbCMg8CiMpdxQdL/2ZT8/HORSIv7MB5YtxkUUk bEPa2ZpWFZE3xLpW+uOrhrsJ0U3kHiZx7VOvmGJuUvpw4EAiA7nULjZyXrOTGieY8DAWN5 Hr0CQT5Bo/Fd7NkxFhrQm/3q5t73GVGAdnpmVr6vuCRVCShgsg1Phl4gsap247Wt5uZ0HJ 4Pv7ZcafxMzbvWK/KfR7Q53OLkTG18jcQUawreKrTl5gmqJq6GLMYYWNZ5zzmBnz+NZrE6 3Hg+UEqT6tU9opRp+bag2HV7bVRvLNI80mFyW4YRCOhgWILfH6g7KMfnsd/NVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759315977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lYtbgI+gU5cQFdOqlKk7ok9vfz9vrQxfmWAShGohdhE=; b=lrp4nkG6gYizdCqGDB6drE5lWlCQOwy+nfE2hZHvbyUTJUjV1TZD0vvaMkALUMKkFXYqkh 30gwDN6wzZTy0DNKZMX2yHyNYI7lRk5XILLFPJC9QUSGVYMNCf/HfnU3Reb9OmdD644m2u dx2GG7kfvMRJj4dzjAt/7YS0DeEzC2vnHxldGJrPXqhvWHf6ECeHzfIoQwvUCn0bklcuIG E34EHwYICahWmsuj9AGIz3aZe+s793TDl2mSqf/HxjCUfxbeMNIkAoDGvdNyLwplTaIZgE 2GSSThke217A9czQZ7bv/jpWqTHBsgjWdwvMiZ9ytC5DTvHRc2tP10cwOyVLPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759315977; a=rsa-sha256; cv=none; b=dj3+DiRf9jSlvMl859Bo2pgWUTTI3SW2hACEPGgQhX34fl2I41zqPwAkfj4GUUpmOkraWA SSxS1KBBnEb3o/bJQKTYTiqmNB4yoG7GLLPkYQ0/XsFbvlEWEzlPTXTOfEU7xfenrbmdpD SWxufiZYIrTi0etnzro+NoGgeskWPcD3SfhtS606OYZJ+SMYBUXwxxsm5eIkJhWCuchSz4 bK98HuFiGt3ucXeVteTbAmI9LJ6ehjRP+Y44JeyirwIIbGIb5/LCsMgQL2vswvMSuEgPMs sj9UzdCNSS3JAiL3xWj86K3Sq5nyNVfuan0Ag+pGqJFV6jPHdVgvAQGUg2pFvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccBbY3mRMz3p2; Wed, 01 Oct 2025 10:52:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 591AqvoO067473; Wed, 1 Oct 2025 10:52:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 591AqvU3067470; Wed, 1 Oct 2025 10:52:57 GMT (envelope-from git) Date: Wed, 1 Oct 2025 10:52:57 GMT Message-Id: <202510011052.591AqvU3067470@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: cf583997282f - main - .github: Update to use llvm 15 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cf583997282f962d9e8bf478667d5087f7c1f2da Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=cf583997282f962d9e8bf478667d5087f7c1f2da commit cf583997282f962d9e8bf478667d5087f7c1f2da Author: Andrew Turner AuthorDate: 2025-09-11 07:22:38 +0000 Commit: Andrew Turner CommitDate: 2025-09-11 20:30:07 +0000 .github: Update to use llvm 15 This is the latest supported version in Ubuntu 22.04 Reviewed by: vexeduxr, imp, emaste Sponsored by: Arm Ltd Pull Request: https://github.com/freebsd/freebsd-src/pull/1862 --- .github/workflows/cross-bootstrap-tools.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cross-bootstrap-tools.yml b/.github/workflows/cross-bootstrap-tools.yml index 8f0dd933ef09..a99c3d31f2f1 100644 --- a/.github/workflows/cross-bootstrap-tools.yml +++ b/.github/workflows/cross-bootstrap-tools.yml @@ -22,9 +22,9 @@ jobs: include: # TODO: both Ubuntu and macOS have bmake packages, we should try them instead of bootstrapping our own copy. - os: ubuntu-22.04 - compiler: clang-14 - cross-bindir: /usr/lib/llvm-14/bin - pkgs: bmake libarchive-dev clang-14 lld-14 + compiler: clang-15 + cross-bindir: /usr/lib/llvm-15/bin + pkgs: bmake libarchive-dev clang-15 lld-15 - os: ubuntu-24.04 compiler: clang-18 cross-bindir: /usr/lib/llvm-18/bin From nobody Wed Oct 1 12:18: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 4ccDVm1Hsjz69WHv; Wed, 01 Oct 2025 12:18:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccDVm0Rwxz3kTS; Wed, 01 Oct 2025 12:18:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759321136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HSSXbYw9X7paVhjAqJKjjGR+7tmv6JQ2PWW/0DY5tm8=; b=oGWIu9MJtKYBWOH3V4egb2oUnKwerPIoOw16VPyHKFCyFKm0C4evbIjBOwtDYoSQ4io5z9 obSSwzkopbZvKvmAVIDhEYyLCVX5ospJtVeHjMHOY9en/QU6kmx9JMGVUZFeEXRFIRum79 YDx0N6Kb9XujMqM0Er7ryivYvQiHl+Y2BZt2xOo6yvK1vSfH2T6zPK+NSjDU4Zm3V6wT00 3nC/pS33/uUknAU9+w42A60bNlb7jTHx4xCKZIq/qJbUN81fTW1g6hB25Q0ZiGzs2M13m5 yY+kKkdEL5PLdPqMN9c5VVcm0cu5aSCzwe04g3Tc7Hab6dR+RtF5Gufj9gk+uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759321136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HSSXbYw9X7paVhjAqJKjjGR+7tmv6JQ2PWW/0DY5tm8=; b=i6kGMchM7Uu86rzTzD1ouoOMzaZmMxWU3naBLgMO5Ya+WMP/dZV+kZSlOtcKsREHMZPZtm tp0ZD+v9QjPugIuHm/Aflysiu67RicKYCDB3iFtawVa3rEg0oiBnxCCMrAsc/jYVEHrGU8 4V82ceG3mnmXLNP4lVJrWwLHv8IqnI9UTdkOtyABVsFAy7RJoLGdt1wNrjY44p3rWYXb5k d9kIaz510oCm0gc5mgNhFx/QIcLCYmWTWcXZqyG38v/SktX6bT1Ad5ML9Hy+qjFNFbQK7O AvjzEzAVaCVdHOh8KcbBYUb6d+ASTMqwCy90B2jRhEKG8psA85GSy9TuMe3ZZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759321136; a=rsa-sha256; cv=none; b=xLLqcGUS05tS9qZj7D8lVXFOUL9hSg3p9bcGtyjGzRjceKUoidJ+ouy/e5Ljbv8FxmuUqQ LFiyMi0q6WlNJyj73g5VF4UK6yfIG7Asn7xbCDziI2UibwQRhaL52wls4bGpLbYpqZRCS8 Rt8kvLYADzcKmb82JXrglttFXOylk5GAR0BZBxgNXzAvjtRBkNYcQam5Pvx3wacPjFxyoo g6b8ykPSmkMN62f1paJkYGgHDbNRjcUjk8CdOY4+Ye2fORRfHwXr8v/WgwzVHTIRrv+nMN S5U5WeCbVPYAblCkrIYidDHab4joDhPMm9yOYkBIR6eaOaMNhIyCxza7haZCqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccDVl6X9sz64R; Wed, 01 Oct 2025 12:18:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 591CItdJ021677; Wed, 1 Oct 2025 12:18:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 591CItrX021674; Wed, 1 Oct 2025 12:18:55 GMT (envelope-from git) Date: Wed, 1 Oct 2025 12:18:55 GMT Message-Id: <202510011218.591CItrX021674@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: bdb205c53ed7 - main - libpfctl: fix memory leak in pfctl_get_status() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bdb205c53ed769ad9f5e8da1ec6d05c48992dbf8 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=bdb205c53ed769ad9f5e8da1ec6d05c48992dbf8 commit bdb205c53ed769ad9f5e8da1ec6d05c48992dbf8 Author: Kristof Provost AuthorDate: 2025-10-01 09:41:25 +0000 Commit: Kristof Provost CommitDate: 2025-10-01 12:09:39 +0000 libpfctl: fix memory leak in pfctl_get_status() Remember to also free ncounters. Fixes: c00aca9a71 ("pf: Show pf fragment reassembly counters.") MFC after: 3 days Sponsored by: Rubicon Communications, LLC ("Netgate") --- lib/libpfctl/libpfctl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 4b579de38ad0..8c4b26b98054 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -561,6 +561,10 @@ pfctl_free_status(struct pfctl_status *status) free(c->name); free(c); } + TAILQ_FOREACH_SAFE(c, &status->ncounters, entry, tmp) { + free(c->name); + free(c); + } free(status); } From nobody Wed Oct 1 13:24:51 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ccFyq4hX3z69cW9; Wed, 01 Oct 2025 13:24:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccFyq3xfDz40PZ; Wed, 01 Oct 2025 13:24:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759325091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y7BW0byLrAIHpPmznWyALrgpvAF2NLonn92WZNnCJ2s=; b=VPMqVWdx3t44EZntM4xOp6a+mXkUxRYXt3G0k2iUoKd5XqxnFM+57Puo8m/XLNKqjhLw+D MXnyq5GrQEbgGJXoQnSH9tuPAFpe+jPOQ1ELrlw95Ojy2dWZTH2oUMJiQxJmo4R3SxRKhk mkPmj+O/xYnRSpRhxaAcLp2oTDcGrRzoyjttBvYAG0Ckb2ip8m8tJyrymS171O41Dxi3YG 4j5SkzMvJI9HOIze9pv11ckgGMxFBKKm4yrrOAbxegwW4taeL33XQxlgYrL4kLyE7t9lIl 9FOujSmQ83SqMK1LPC0yBKCxHQhDl7GXlKDh/yWOWS5ySfzOnVDgkyOo0auQCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759325091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y7BW0byLrAIHpPmznWyALrgpvAF2NLonn92WZNnCJ2s=; b=s9cDvtjN48ZajYlKP3tMKR6AXVSEQCP1doAAK0DQvVmjTsZIxEmFnAV3i4RgyNKkVpASeJ 9fX2jWOFjIWKHlPRe156qQ1J/T+u6T87H+wtizFe/qT1MvZbp6BwsAkNwWshitdIzt4Ky8 p7qzv/EI4Y8GE9YX/91upB6vJf9y0wWkQateARlRUo+qjvRM9azH483C2sHaw3ci55GsFr tegsfh/+7yQ4GZeOFymQfxIEbE2BAaZDq0t1cMuZ873cxuxCABUEm0PNNq0o/+UQ01mXtz XzdcE3gKqV5bo9DJMc9M7Y6mwW4g0hyWYaiJXVncPkj3pGPbsQ4fCHX1Q04Gqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759325091; a=rsa-sha256; cv=none; b=YasjIBB7MhoAyZiPDnx3N1ZcPCK3B0Py1ezqWn3ud8uOiHZi/e5iEx2DUNuMiRxEbrTVh3 sVhAzXmEobPB46HYXzxEWZx/7LxS/1uNFOxBftPE7w23KD3KVz38Yqu/jq2l/Xl/nXPO0V SUuI8r9ywmcy8MIBysWS3pbT9ISaoDB+No8WUlVhVYLEJnaL0KsNt/ZK3A6Z8HhhW3WJPO 7ZJuW6v/EL+8TvQujHLgGl8oalR94LSKfrXnp/b7r4i2Sv/Vj7yu+5O+9hb/gL4mCzDaBz sLg7wepFgNGIdKW65HuURoecY1XSvXswBO/m5IhEfpK+4eeR3rkJZAS5r9RQAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccFyq3G6Zz7b1; Wed, 01 Oct 2025 13:24:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 591DOppL053259; Wed, 1 Oct 2025 13:24:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 591DOpWT053256; Wed, 1 Oct 2025 13:24:51 GMT (envelope-from git) Date: Wed, 1 Oct 2025 13:24:51 GMT Message-Id: <202510011324.591DOpWT053256@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: e7258c42520c - main - diff3: Move to own package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e7258c42520c18c034f644b97377d8d2a0ad8b7c Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e7258c42520c18c034f644b97377d8d2a0ad8b7c commit e7258c42520c18c034f644b97377d8d2a0ad8b7c Author: Ed Maste AuthorDate: 2025-10-01 09:28:56 +0000 Commit: Ed Maste CommitDate: 2025-10-01 13:23:40 +0000 diff3: Move to own package diff3 is the last remaining GPL-licensed userland component. Move it to its own package, so that it may be excluded if desired. Reviewed by: ivy Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52810 --- gnu/usr.bin/diff3/Makefile | 3 ++- release/packages/ucl/diff3-all.ucl | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/gnu/usr.bin/diff3/Makefile b/gnu/usr.bin/diff3/Makefile index 4d7bb8a82e1c..568733801a6b 100644 --- a/gnu/usr.bin/diff3/Makefile +++ b/gnu/usr.bin/diff3/Makefile @@ -1,8 +1,9 @@ +PACKAGE= diff3 + DIFFSRC=${SRCTOP}/contrib/diff/src .PATH: ${DIFFSRC} \ ${SRCTOP}/contrib/diff/lib \ ${SRCTOP}/contrib/diff/man - PROG= diff3 SRCS= diff3.c version-etc.c \ xmalloc.c error.c c-stack.c exitfail.c cmpbuf.c diff --git a/release/packages/ucl/diff3-all.ucl b/release/packages/ucl/diff3-all.ucl new file mode 100644 index 000000000000..b4e53e63c67f --- /dev/null +++ b/release/packages/ucl/diff3-all.ucl @@ -0,0 +1,15 @@ +/* + * SPDX-License-Identifier: ISC + */ + +comment = "GNU 3-way file comparison and merge utility" + +desc = < To: Kevin Irabor Cc: Kristof Provost , ItzBlinkzy , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 4e7a375804e5 - main - IfAPI: Added missing accessor for if_home_vnet Message-ID: References: <202509292116.58TLGxWx078766@gitrepo.freebsd.org> <9E63C594-08DD-43CD-BD76-3E9B9E80AA60@FreeBSD.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Oct 01, 2025 at 09:27:05AM +0100, Kevin Irabor wrote: K> Hello, K> Both emails are mine - one I use as my GitHub email and the one I signed K> off with is my personal email. Sorry for the confusion there. K> To answer your questions: K> I was browsing the ifnet code and saw the earlier IfAPI commits that were K> made. I assumed the pattern was to provide accessors for every field in K> struct ifnet, and to maintain consistency I added this one since it was K> missing. K> I'm not aware of any drivers that need if_home_vnet and if_vmove Thanks Kevin! I'd suggest to revert the change as we don't expect any driver to ever use this field. And if one uses, that would be a problem. If you want to help with current state of IfAPI, then there is a task to categorize the existing accessors into few groups: - those that all NIC drivers use - those that a few NIC drivers use - those that in-stack drivers (e.g. vlan(4), lagg(4), etc) use - those that no one uses A minimal documentation (a comment in the source code) with the results of this categorization will be helpful. And jumping forward, I would suggest to remove the accessors that belong to class 4 - no one uses. -- Gleb Smirnoff From nobody Wed Oct 1 16:56:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ccLgS6Jxwz68y2j; Wed, 01 Oct 2025 16:56:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccLgS5fxsz3ZfW; Wed, 01 Oct 2025 16:56:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759337812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tY8nCNB/oJjE1sjOz4mOv7djtOhnie3+b/Vz2VVluLE=; b=JUcxe/g4RqO1SD2/THI4N+NS0JsAZ/yIC/4eCVIkEtCf4gueRM1KcAgDOws73JBIwk0inL RMLO9FPa/jXjAqV8dxFaM0PEMqewEInUtSjLlIHkVUXgK8SEV6esX5ANhhh0MhRfZiEFuz 29K8/mqFsSVrNny5Ci35wRfMBseHSeBIZoMHLTOnfhla0Y9pJeoUUNfkv8S92Id6E5KAnT bc2adBSQ6omByZq63BTkiJiGJJoEIIM95oMscfSkHk6vqf7bswImWv8gwacsuYiqMQIEK7 5PAZ0QjznwBKf0dLzDNukurYy5T6tpfbfdFsRt+p/MVmz3tpxC14ffR5r1q36A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759337812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tY8nCNB/oJjE1sjOz4mOv7djtOhnie3+b/Vz2VVluLE=; b=TZXNqlxAC7tpZ7h0/FwXlrSDYclvHBvPHyDUqawv5KK7Gc4k7d0b+hxNRH6oTUvLvO4cGC Cs/ZX7L4HlAG9C76qPmU5aH/tRTKaDdI0s5spHLNw7MvuoDdisitkDRqm0ZWX2fFE26hYx wMj2PyKpuDZcKkLr8NuU9JbI7cpOGk7MFxPhK33/ZdWggfWVJHqqctRb6hN8cy0RWjJ2kh y+M/Cuj5NQk1MMgy4mLLYbJfVh+iPYu4aDn+KIPxEP3jQC9AmqEERLFf5gznaRkwzya655 zDaWVOtlST+FFc25fNYcXGDpa3QYkvy7tBXmQegASppUTpL2VJC9YCjeBzUeVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759337812; a=rsa-sha256; cv=none; b=FgZuYyTzarMwhf1iZR3COT823D+nw78jSGLflRojo4usqqCdSIz0oeWJXsbZmLeOMpzAew zCEjpIvSyH1oHE9f41lFaJR2GQXyD/9V8YKSEznVTUOQpOJFY25FhBI6HSHEUeeqn2DgyX j29ptNxVmeQ+XumNi7xqL3ElKdvLNfexwCkxNUbSrcE7uyNJ1LKMPZ3Rb8895RR861JnOt EHqvxaU1g3zj7bOUnf8YWkPsb4GmuBc0+V7FLW/cjNQOctFflmMzZqCUAqKVFd6dBxwrAB jdWhvsiTEnuIuS52hKA2Lr2B3WycxiQw7X5WNSLt8Z44C5mKGsubgZNWXrJJpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccLgS59xCzWGW; Wed, 01 Oct 2025 16:56:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 591Guqk7050221; Wed, 1 Oct 2025 16:56:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 591GuqVF050218; Wed, 1 Oct 2025 16:56:52 GMT (envelope-from git) Date: Wed, 1 Oct 2025 16:56:52 GMT Message-Id: <202510011656.591GuqVF050218@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: ebb60d47a535 - main - Revert "IfAPI: Added missing accessor for if_home_vnet" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ebb60d47a5350e5d752b97cba8b3b0c3be8aa1eb Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=ebb60d47a5350e5d752b97cba8b3b0c3be8aa1eb commit ebb60d47a5350e5d752b97cba8b3b0c3be8aa1eb Author: Kristof Provost AuthorDate: 2025-10-01 16:13:54 +0000 Commit: Kristof Provost CommitDate: 2025-10-01 16:13:54 +0000 Revert "IfAPI: Added missing accessor for if_home_vnet" This reverts commit 4e7a375804e5ad4b244ce9a035fa971cbf2f0944. We do not want out-of-tree consumers to access the home_vnet variable. As discussed with the author and Gleb Smirnoff. --- share/man/man9/ifnet.9 | 10 +--------- sys/net/if.c | 6 ------ sys/net/if_var.h | 1 - 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/share/man/man9/ifnet.9 b/share/man/man9/ifnet.9 index ac059b59eb81..3c45e4f29e2d 100644 --- a/share/man/man9/ifnet.9 +++ b/share/man/man9/ifnet.9 @@ -26,7 +26,7 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 29, 2025 +.Dd December 10, 2024 .Dt IFNET 9 .Os .Sh NAME @@ -253,8 +253,6 @@ .Fn if_getlladdr "const if_t ifp" .Ft struct vnet * .Fn if_getvnet "const if_t ifp" -.Ft struct vnet * -.Fn if_gethomevnet "const if_t ifp" .Ft void * .Fn if_gethandle "u_char" .Ft void @@ -518,12 +516,6 @@ or A pointer to the virtual network stack instance. This is initialized by .Fn if_attach . -.It Fn if_gethomevnet -.Pq Vt "struct vnet *" -A pointer to the parent virtual network stack, -where this struct ifnet originates from. -This is initialized by -.Fn if_attach . .It Fn if_gethandle .It Fn if_vlancap .It Fn if_getcounter diff --git a/sys/net/if.c b/sys/net/if.c index 6a68d627c07f..b6a798aa0fab 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -5116,12 +5116,6 @@ if_getvnet(if_t ifp) return (ifp->if_vnet); } -struct vnet * -if_gethomevnet(if_t ifp) -{ - return (ifp->if_home_vnet); -} - void * if_getafdata(if_t ifp, int af) { diff --git a/sys/net/if_var.h b/sys/net/if_var.h index e71fe798fdec..f2df612b19c1 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -648,7 +648,6 @@ u_int16_t if_getvtag(struct mbuf *m); int if_vlantrunkinuse(if_t ifp); char *if_getlladdr(const if_t ifp); struct vnet *if_getvnet(const if_t ifp); -struct vnet *if_gethomevnet(const if_t ifp); void *if_gethandle(u_char); void if_vlancap(if_t ifp); int if_transmit(if_t ifp, struct mbuf *m); From nobody Wed Oct 1 18:10: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 4ccNJV6Vskz695gq; Wed, 01 Oct 2025 18:10: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 4ccNJV5vDsz3j46; Wed, 01 Oct 2025 18:10:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759342234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0+nGmyZs5vUFPmzxClVhnOY5Fr57+XvWwnnbNilnOdc=; b=GFaTU5wobvifTNW35F/9Q7KvtXnZGw/UMkHOyCZ7Uzg51XGuAMnPirm8BCNG49+X+hQcoh P6bgwPSjFEs/PCqqI5u/8/n8uDGiy0Aqb2HiKXFm+gfoAwdiTA8nQwh5M6L0EyecvgzhwD enZwWjd+mnHrXRGOTBsrUgQt4sVjWRax9mxanvGdweAcsiXc/VJGOLb8y77R66LAcpNwP3 o6vCGaFrbxBnGquLaYHW2HD3HNIMTKwbpXSgDsreiyIFSyqiAKuB1TJDvLGn1xn/9pp25N K9J4HGM4GHbtIsUWaVmXtCOHW+j4ZqI1fzYBTBo3onkcfiNhXlRaQ2E+MC1B4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759342234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0+nGmyZs5vUFPmzxClVhnOY5Fr57+XvWwnnbNilnOdc=; b=awmGDCsC3sRHzCZry9y3mdjQVyn0J4oXHIoaMMglXPqk+J3MOTDOW50mtPe2QQ/A//lKjM Qpo1I/q5rcGaYCL0eSSvdAWvVhNkpL5mC86nuvrpZlEURQ8ZkEsqfU02dPImUxhFpeaSO9 7qAEI05gBQp6fEG5vyhTvgjr/vSmyBT8Ihn9zGw6Inemn6G+xswYpUlidj8OHRkWNNHGgd oFM08LR2ECg1iisX8s9nU7xcXPEAbDiMCrXUxMyU+knG322W6Bq2pWRapqVV4D8ceohJx8 IpUJU+vrIZ4qwLpc74tFMR3EgGOLRqzMvLsSni/MaWr074TI7O1PnyfFe70FvA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759342234; a=rsa-sha256; cv=none; b=e1EEw1pVPZErr07lXhTsRGrBq+UuG7KApqQwyJ6BtIGWeY0cvQalItMZfpyU9dU0HlhKhv SD51KqacWCprb1E42d0h9xsORwUF/DdErtwoDKmE6udvV2sKTatA9U/lxakKCQe/YpZMIs YpdbqW5tU1krtX9G/PPQszerVKLmiS8givYbuFt5buuvc23wh+e7OxIugP6y/7cePreD+D vNeolChtvjSk38wecqBJ7A4kU+3A/htEuAvntAKb8ZuiWyyn6q5dYmBU+F1R5aX7gTilHE axjwnnaiGX4tqq3hdEaYErXxH7A73xZA0v5GQ/grsCG8iWso6V5dkdiLUwXlxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccNJV4x6fzYqT; Wed, 01 Oct 2025 18:10:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 591IAYG6095393; Wed, 1 Oct 2025 18:10:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 591IAYq1095390; Wed, 1 Oct 2025 18:10:34 GMT (envelope-from git) Date: Wed, 1 Oct 2025 18:10:34 GMT Message-Id: <202510011810.591IAYq1095390@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 300aa267efaa - main - Makefile.inc1: Force NO_ROOT for distribute* and package* List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 300aa267efaa08564337797e89590737a7cc6af0 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=300aa267efaa08564337797e89590737a7cc6af0 commit 300aa267efaa08564337797e89590737a7cc6af0 Author: Ed Maste AuthorDate: 2024-12-11 13:50:55 +0000 Commit: Ed Maste CommitDate: 2025-10-01 18:07:55 +0000 Makefile.inc1: Force NO_ROOT for distribute* and package* These targets are used to produce legacy dist sets for install media and now always use NO_ROOT mode. Extend existing logic that forces NO_ROOT mode to these cases to ensure they do not run in the wrong mode. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50551 --- Makefile.inc1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 92570d1d2fb9..dfd31456ad5a 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -198,13 +198,18 @@ _GCC_BROKEN=boot code linker script issues. .endif .if ${.MAKE.OS} != "FreeBSD" -CROSSBUILD_HOST=${.MAKE.OS} +CROSSBUILD_HOST=${.MAKE.OS} # Unset for native FreeBSD builds .if ${.MAKE.OS} != "Linux" && ${.MAKE.OS} != "Darwin" .warning Unsupported crossbuild system: ${.MAKE.OS}. Build will probably fail! .endif +.endif # We need to force NO_ROOT/DB_FROM_SRC builds when building on other operating # systems since the BSD.foo.dist specs contain users and groups that do not -# exist by default on a Linux/MacOS system. +# exist by default on a Linux/MacOS system. The distribute* and package* +# targets used for install media legacy distribution sets also always use and +# require NO_ROOT mode. +.if defined(CROSSBUILD_HOST) || make(distributeworld) || make(packageworld) || \ + make(distributekernel) || make(packagekernel) NO_ROOT:= 1 DB_FROM_SRC:= 1 .export NO_ROOT From nobody Wed Oct 1 18:33: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 4ccNps528Xz697Yc; Wed, 01 Oct 2025 18:33:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccNps4VDFz3lp3; Wed, 01 Oct 2025 18:33:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759343605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Y9ezyVW/VpeUKmAFim+2emHKIYJ5SdrGF3UOKQaP0Q=; b=OZyKYoQIG8pZh7fUn02/wFtfFRgX6DDy5TWgjA2+rK0Jm5+GqB9YzaJ1k3EaDfbcmq/w3X PeL/OfH9nOKFKHBh2S4OUO9dJdc0d071YB8hD44mTm/98LS0dHkGrDBtA6iwBzNIy0B/Io Ek5vIBqEmlWInv7tzQmr77nMUZC8OxeZU7n8RijCZfKg8pDVnpg8RFl0Ca4DBbQCruJhY1 FtG+0M67sMMsnrlo2StK5HKFIzJUVU9pvS+JV3kaD1V2XzfZ/QxLlFKCXBrVi4NKli0jsj elW6ta49FO+KgFM7deK+9vqrWRm+wjIdRzoTt84O1lKEu6h2JybWccdawL77Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759343605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Y9ezyVW/VpeUKmAFim+2emHKIYJ5SdrGF3UOKQaP0Q=; b=oaFrrFFKoMXG3/uRvxOs80Yh+BZqVoO8mzQiWKSz/H3ZC1f9Q6e3HLfQq4Fa5GczZvHx4Z kcNdQmONfY38iLgjd42YlvdO3gI7aeLELSpfdopg4MhXwJzCOv1N21bIF6tuzHZH7LYBEb y5acXS2/MP29JASOmvdrSj8IgkK3xENMtvYsmmciVRFWUH/FJbQq7zeILCHA8WYSDm1Uz0 wVDn7N/jTOT9Qy7y1pZyC9+MtgqBm5qE4cDbbqj7lqf3Q6cnvc99zCMhO7yO/Hdxg1KZN4 tOkOae3a3bFOdy+XGzsL0SB5Gk5E/uzzqHW+1ZkVbmmSv9OPp2EZwIMFUSslcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759343605; a=rsa-sha256; cv=none; b=dv+IJdoc/cU1tGuXGdeUdx+5qytfNayDPA9SnAyS1ZWT57q49MSpk/a7evfAY8Us+VWYAE 8MQ+VvVN3tUQW+gSXLb9n+Z0wPIOVSiPKJutz0O4+1sVLCcJeXo4unj2QTptzx1HQnVUvG 3pyQxBOCREKBkr6ecEe4ZmHPm+9bL+i3DFVBJGxc+HcfDA85w7qF27WHVm4QPUAGnGluW8 S/DrcprW+OK099jGjijjJ4+vDdndWDFoCKSVRkQAimH0gwTXxHnVFstIj61nT3RvU66hES W3YwnDLHGfmYjP18lnB0E2oIP7KE91e67ybR0gE7bzxRtw82B6N2EqHY8QegPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccNps43LNzbBG; Wed, 01 Oct 2025 18:33:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 591IXPfV040962; Wed, 1 Oct 2025 18:33:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 591IXPtQ040959; Wed, 1 Oct 2025 18:33:25 GMT (envelope-from git) Date: Wed, 1 Oct 2025 18:33:25 GMT Message-Id: <202510011833.591IXPtQ040959@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 76157a63a0c6 - main - ddb show lockedvnods: avoid trap for ufs vnode under construction 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: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 76157a63a0c63dd7363f6c8ae60edc814b3c138a Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=76157a63a0c63dd7363f6c8ae60edc814b3c138a commit 76157a63a0c63dd7363f6c8ae60edc814b3c138a Author: Ryan Libby AuthorDate: 2025-10-01 18:25:27 +0000 Commit: Ryan Libby CommitDate: 2025-10-01 18:25:27 +0000 ddb show lockedvnods: avoid trap for ufs vnode under construction ddb show lockedvnods might find a ufs vnode after it is inserted into the mount queue in ffs_vgetf but before the dinode is allocated. Avoid trapping by testing for the dinode pointer. Reviewed by: markj Discussed with: mjg Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D52795 --- sys/ufs/ufs/ufs_vnops.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 0921eee92b9d..736c5a66267e 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -2592,8 +2592,12 @@ ufs_print( printf("\tnlink=%d, effnlink=%d, size=%jd", ip->i_nlink, ip->i_effnlink, (intmax_t)ip->i_size); - if (I_IS_UFS2(ip)) - printf(", extsize %d", ip->i_din2->di_extsize); + if (I_IS_UFS2(ip)) { + if (ip->i_din2 == NULL) + printf(", dinode=NULL (fields omitted)"); + else + printf(", extsize=%d", ip->i_din2->di_extsize); + } printf("\n\tgeneration=%jx, uid=%d, gid=%d, flags=0x%b\n", (uintmax_t)ip->i_gen, ip->i_uid, ip->i_gid, (uint32_t)ip->i_flags, PRINT_INODE_FLAGS); From nobody Wed Oct 1 18:35:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ccNsj6PSkz6989L; Wed, 01 Oct 2025 18:35:53 +0000 (UTC) (envelope-from garga@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 4ccNsj5P47z3lwP; Wed, 01 Oct 2025 18:35:53 +0000 (UTC) (envelope-from garga@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759343753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=WBmr/s79lNR0i0k/7Ws/Z0ov+DIJhUen6T5MhlqIjaU=; b=U/l5VAzPKeiaahhTBLBbacLxllyFRL1OLOVjiLgVa/mzbtnkrFdgntN+H7G8XmXlPQ7yyz 6AXsK3ekh6p/7K8rg12M7k6VnVr9AMGpILoEr6LozXra72YRuxGSe/Gd0ZCD7iwfeZRADI XGvNCX4pl3tl+0VQTwJXCxvrIJ/jCzlDkg1ipipQzx6oZUIbz/75D2qluhN3w0xtneEY9S vU0ln5/p/XN57SOz5PQjS3xf6TzT6t6C/DUwu5efE1ouktRZC14p/L2USbZ3iagDtBmUxk djly0vPg53BskrGYWuY06TGHaU0RznBlMJKqQuO6b88WeK3qYkjdGiao0OVM5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759343753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=WBmr/s79lNR0i0k/7Ws/Z0ov+DIJhUen6T5MhlqIjaU=; b=budiB7//KIz7zX6NJ8tJisQFHog2Q+U3pctMXj0CbAgh68HDNBNYsWev14cV2k+Xne4KE4 NnMuCfX5pd1RZOqMLJV6gJ2dmTrWcGQtEdm7yqRtpQnWJPy9hYdV6lCHAH31vzdNC5YSb5 QrveRS7wpE4mczTCWOwSgOsf6rbwZ/KvUgWvSdjph1AKYxc56Ex2njaKE3KwtvkucGOO3v TcYfQJDcvj261F60ShS0WGdZDX/ux2t5WUtWNqhZGaeKL7BLTPTq+yfPsCNkaTWCdPc56v xu73RLsdH+1CjSgIO6tgZTa/Vxd4dYtZGOxAnVGw4/7sqpwyaUZQv0UpRr6f6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759343753; a=rsa-sha256; cv=none; b=EVHh3Xn/yP4NEqvLruODGQavVjBX31XKKG60EC087sFGtsOV3w8+81tLmnzYqDa7Pqmpe8 NVKueUC6B3R354KBlFCnMd/G09nb8bApKsAi20XAEXp7svsK05jP96jxKg/di4R8ycAcP4 aE8H3PHFqV/e1wOO3RmNlZxwjYwCaIm75I6cfsPMfyt0H2tpjyhi42IRmKJVhj3A+z5bJf 1b4tOKCj0Fh8qNehR0ickrxg/kJOtIDdIdyBXU57fVnwi3L0YFVvCfbVREKRJxHHUYBo2N kcS1Q5uHo3UVIXeoB8OwYjhc9/7MJWNFQRT1IzTqt8vxkwjQwNr8ILZw5VMVig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2804:f1c:3e:b01:b0aa:d62b:23d6:ca2] (unknown [IPv6:2804:f1c:3e:b01:b0aa:d62b:23d6:ca2]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: garga) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ccNsj0Fw7zJKq; Wed, 01 Oct 2025 18:35:52 +0000 (UTC) (envelope-from garga@FreeBSD.org) Message-ID: <85c486e1-6fde-4f4a-b4ce-bfbec7bb693f@FreeBSD.org> Date: Wed, 1 Oct 2025 15:35:50 -0300 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 08f06aa1b4fb - main - vfs: retire the VCALL macro To: Mateusz Guzik , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202509270401.58R41A7b014829__21824.1523530864$1758945716$gmane$org@gitrepo.freebsd.org> Content-Language: en-US From: Renato Botelho Autocrypt: addr=garga@FreeBSD.org; keydata= xsBNBGStavwBCACjNlp/9+Y+VFe9ieR2h/WWbdvjz4Mb2z/f22bGoaskzCfvVNbo/v3i34I9 H6OdgZkGqheQEAD2jNfRbmPr4z40xDMUpYGLds+1Mvg7G3Hms3j5Ef8KaLSWUNWIfwKdfSVR Qs35ccSJxAdRW5YdI6J3xZgika+3Bc4eJ05YE/nWW+PNTYevt5rqD50N3zybVYIcLoqVPpBi AZE/sf5SLiLACIJb1t/s4x+pi8vgWevxVVT9u8V1f8zYErmHSLSqjxii0B3eRZphX9NCJOv9 +tfFZhnENInhn9gT7H4e2YumUltEy3jacONHJF3CC1pvvWEa6lEyypclMOkHQwNON7DLABEB AAHNLFJlbmF0byBCb3RlbGhvIChGcmVlQlNEKSA8Z2FyZ2FARnJlZUJTRC5vcmc+wsCXBBMB CgBBAhsDBQkFo5qABQsJCAcDBRUKCQgLBRYDAgEAAh4FAheAFiEERL7Dxegbnh7xTiQ5Ob6P xxJcZXoFAmSta78CGQEACgkQOb6PxxJcZXrYlggAgaZmr6c1yIWzN8VksHrHpwt/uxONEP+h ljy3yfrMsgfS5wx5Uzgfih1xYZUFC6jiI63CetqBqJpp3g1klRS1UWYKx2NeXphDMYZEdPm/ a6sXh4bKZbk6IE8Yn0/YiRT57d9DtbvswC7Gn7Igj/MSbhl49TvTGyvuB6juaffVoYZViomx 5zMoee8Ml2o2qj3MrCJ+/K8GU54RlpOGqGRsqdwVdr9XEWub6fF2YFwR46cjmbiU3P5urFHH nkJlBGPIwKxHimTW0lZsdx9aCKRDd/D80/WOEzXmk3k8B9lv/GsvOluHmveLhJG1R1tIJ31I f2q8dfTvqsQXnu8CcWRcgc7ATQRkrWr8AQgA1DufoxScA+CWQbUR6zExIu8wXQKrhuRt4DG2 BgynT7EMUvEBadcbQRZXsBpemNfncc9Axyut/+rWiyKJf9BLQuo/9QYmSRvW1U6+0LJUYmdg kMyBeYaPk+vnssv/u9jLuvV7FVgyE0yk1iaWIKOVDD+XrQCOvGw9uSceBrQyCyo3A/eRM/+p vnDCaywR63PKE+3axk6lfNdGK3TnaWmS30/ZDCZlNsXuqprqR4JdT5wXids5o36dsuJ5EZ20 s5hNMD34s4Yr1Y1R9elH6qBsFCpozs0+jwrArxq+UJJCR6hH5W8ZEwJtRC8tzR8mRE1WywzX BXYj0YhfGztQIxZckQARAQABwsB8BBgBCgAmFiEERL7Dxegbnh7xTiQ5Ob6PxxJcZXoFAmSt avwCGwwFCQWjmoAACgkQOb6PxxJcZXr1vgf/SKXhoZcUU5I7TqcbHg0lJz9tICTupCGHWr/s SQgjh9oEM5j1wqW7FlCGP90Tl9K0g3ow9YdbhU7VK470o6pymX9V9eLHzGgkZO/KMEtGBeK1 u+5ePjCJ/MK5B21KODLSU7WrIL1VN5ceXfQPLYt02LMLtPri+oduHD6RNBeA7US1DUzleq5F 9NHGbvV2U7BdDUezpiO8NaFjFZVB11I5d99FxUM5XGVstI3VhsRKZxjY0KnqJzaQgTFsPGmv AUfZVIN1pXgXiedhPXpr8+Y64jP+pHVwpVmh1zYWL6+q3kqFOUVP6c5iiMeoEXZvgJz7x/AC ek3X5gvu8Hpcv+MZIg== In-Reply-To: <202509270401.58R41A7b014829__21824.1523530864$1758945716$gmane$org@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 27/09/25 01:01, Mateusz Guzik wrote: > The branch main has been updated by mjg: > > URL: https://cgit.FreeBSD.org/src/commit/?id=08f06aa1b4fb6db0d8beb3e1c328b1c1adbec13a > > commit 08f06aa1b4fb6db0d8beb3e1c328b1c1adbec13a > Author: Mateusz Guzik > AuthorDate: 2025-09-27 02:01:32 +0000 > Commit: Mateusz Guzik > CommitDate: 2025-09-27 04:00:59 +0000 > > vfs: retire the VCALL macro > > There is precisely one place using it and even that should probably go > away. > --- > sys/fs/nullfs/null_vnops.c | 2 +- > sys/sys/vnode.h | 5 ----- > 2 files changed, 1 insertion(+), 6 deletions(-) > > diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c > index 74c1a8f3acb6..ba29b0485326 100644 > --- a/sys/fs/nullfs/null_vnops.c > +++ b/sys/fs/nullfs/null_vnops.c > @@ -306,7 +306,7 @@ null_bypass(struct vop_generic_args *ap) > * with the modified argument structure. > */ > if (vps_p[0] != NULL && *vps_p[0] != NULL) { > - error = VCALL(ap); > + error = ap->a_desc->vdesc_call(ap); > } else { > printf("null_bypass: no map for %s\n", descp->vdesc_name); > error = EINVAL; > diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h > index 6ef9bbec9446..fcfb8716fc52 100644 > --- a/sys/sys/vnode.h > +++ b/sys/sys/vnode.h > @@ -594,11 +594,6 @@ void assert_vop_unlocked(struct vnode *vp, const char *str); > > #endif /* INVARIANTS */ > > -/* > - * This call works for vnodes in the kernel. > - */ > -#define VCALL(c) ((c)->a_desc->vdesc_call(c)) > - > #define DOINGASYNC(vp) \ > (((vp)->v_mount->mnt_kern_flag & MNTK_ASYNC) != 0 && \ > ((curthread->td_pflags & TDP_SYNCIO) == 0)) > > FYI, this commit along with retirement of NULLVP and VREF broke open-vm-kmod build on current. I wonder if there are move ports that could be affected. -- Renato Botelho From nobody Wed Oct 1 19:01: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 4ccPS51FXbz69BVR for ; Wed, 01 Oct 2025 19:02:13 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccPS461Ljz3r41 for ; Wed, 01 Oct 2025 19:02:12 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-631787faf35so445219a12.3 for ; Wed, 01 Oct 2025 12:02:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759345330; x=1759950130; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=tZlFF6UX6UdWtMYNYKUCsaA/yqPx4KuP6FOYM9p3mFI=; b=MXpyDezUouUkJBeN/i+xCJjju5pHCA5ZJySHTp0w0dACMEErQxHKPSJkxQExawxPG0 mpBFl7fYJnVUezZp273OVFfaLIWGhg/YGL7jdrhHPwr0g7XbKOOGkGGTw48C8vhFMM6a odkAw484pzOzKGl9YAU4bDKwPH1QZFCTlyDHnMXWqKbexbND5yzpIaqkxw/WF2vBk270 IiC8XmCPIc8rZkzPcZsQr90ACIKeWxn4gyLybyTtW+VyxYK5+mqb0kgsBqmyjmaKw4PN 3JnCQXl12dvykfbavIS0YTEsDRymzA17ymh/K8PVw0nA30B4qjczR/wooUrU3zq2NE34 xQGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759345330; x=1759950130; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tZlFF6UX6UdWtMYNYKUCsaA/yqPx4KuP6FOYM9p3mFI=; b=pGMo2zOmqkL1fOi4o2QUoKEIEWsFTzIcXyVlpC25RWVxnP5tJEMdvZytzf/kJyjmhm oQ+RuIKDISgFUOIEeUGMps/flkHz4Qo9Udd0lUagx8HO/uR2R88It5h4dRVUiBTac53d aEhwSI7cpIi5M/Ig/BebizW+KQKje4WzcoFtdpGqKBZstT48NpxCu8y9TaTjCsIYoRR9 wdbmqv/PYjtRHqJv3TmsrrXbm2e6e9ERZRAkDJPtjLZlIvpgd+Sb5agjezy6ozgdlqzL sCLRHXw1ouN2n+KQbDHA0Zmof3tRNs5TOJ7nI+PM9Ix57WGpgPmzpfk2sehcr5t0vXi/ sN2A== X-Forwarded-Encrypted: i=1; AJvYcCUJzEo8Gv4qQ5nDxJERHEWUPQdkHpn6K9IvnF2zJNBuU/hQ1B+rv4Num45vz1clBpA0dO6Mj8kNOj2yxAMkHbNFr0Sq2w==@freebsd.org X-Gm-Message-State: AOJu0Yz0UndQKPrw5443/S8xKkGre33mIGcbBEWgKUuJMXn9Lqb3EKPm K6L/GVxBu6jXKW0Qwg4fcs8XxQ0JgRYpk5t7wqOtk+pIwLvIG+mpdkikOqflD1vL5P+SQa1TXCh Mv9mKcyaXNg4YWFyJhStLTG9ackYUWHw= X-Gm-Gg: ASbGnctn73S58H2LUj/beq2X9gVW4tSFSPRKjKltL4P7ZgtoJ1fZacUpmbxjUUs1I3Y +HlxfeR2V2Ss9VGN2uxIvlvLBUZBmDE/9NBB0x8rsZbFpuyrFhqE/ZuguHiqP2aZ4S5zRy9TKMq zpqWCzIavizvYIFlNTgVTWOTIJDyxyT0hVMRTnzfTsEUXv6dZQYKL45A5FPqz4C4uI3xnCaylog eRRBQBccMCwBGd52yibwSamEsahgowuD8nhwUURciIA8eaVYcZ1oSZYB0dmbzm6MkO6hq/BY7Qn X-Google-Smtp-Source: AGHT+IHr2apRMhHVsNK+1A9plCmVrsB6gIBUnC+49lg4IWJLgImm5lnpyFwLAcm3FWW3FOR2jAFqBlUbjk6h8YiN1V8= X-Received: by 2002:a17:907:608b:b0:b45:1063:fb52 with SMTP id a640c23a62f3a-b46e479ffb8mr624627466b.39.1759345329614; Wed, 01 Oct 2025 12:02:09 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202509270401.58R41A7b014829__21824.1523530864$1758945716$gmane$org@gitrepo.freebsd.org> <85c486e1-6fde-4f4a-b4ce-bfbec7bb693f@FreeBSD.org> In-Reply-To: <85c486e1-6fde-4f4a-b4ce-bfbec7bb693f@FreeBSD.org> From: Mateusz Guzik Date: Wed, 1 Oct 2025 21:01:57 +0200 X-Gm-Features: AS18NWBPGSrdcWCLk_MRHUAlUAubzIc5ihH8S99NsaQmjcsE7MHib4svioVWjzo Message-ID: Subject: Re: git: 08f06aa1b4fb - main - vfs: retire the VCALL macro To: Renato Botelho Cc: Mateusz Guzik , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4ccPS461Ljz3r41 On Wed, Oct 1, 2025 at 8:35=E2=80=AFPM Renato Botelho w= rote: > > On 27/09/25 01:01, Mateusz Guzik wrote: > > The branch main has been updated by mjg: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D08f06aa1b4fb6db0d8beb3e1= c328b1c1adbec13a > > > > commit 08f06aa1b4fb6db0d8beb3e1c328b1c1adbec13a > > Author: Mateusz Guzik > > AuthorDate: 2025-09-27 02:01:32 +0000 > > Commit: Mateusz Guzik > > CommitDate: 2025-09-27 04:00:59 +0000 > > > > vfs: retire the VCALL macro > > > > There is precisely one place using it and even that should probabl= y go > > away. > > --- > > sys/fs/nullfs/null_vnops.c | 2 +- > > sys/sys/vnode.h | 5 ----- > > 2 files changed, 1 insertion(+), 6 deletions(-) > > > > diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c > > index 74c1a8f3acb6..ba29b0485326 100644 > > --- a/sys/fs/nullfs/null_vnops.c > > +++ b/sys/fs/nullfs/null_vnops.c > > @@ -306,7 +306,7 @@ null_bypass(struct vop_generic_args *ap) > > * with the modified argument structure. > > */ > > if (vps_p[0] !=3D NULL && *vps_p[0] !=3D NULL) { > > - error =3D VCALL(ap); > > + error =3D ap->a_desc->vdesc_call(ap); > > } else { > > printf("null_bypass: no map for %s\n", descp->vdesc_name)= ; > > error =3D EINVAL; > > diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h > > index 6ef9bbec9446..fcfb8716fc52 100644 > > --- a/sys/sys/vnode.h > > +++ b/sys/sys/vnode.h > > @@ -594,11 +594,6 @@ void assert_vop_unlocked(struct vnode *vp, con= st char *str); > > > > #endif /* INVARIANTS */ > > > > -/* > > - * This call works for vnodes in the kernel. > > - */ > > -#define VCALL(c) ((c)->a_desc->vdesc_call(c)) > > - > > #define DOINGASYNC(vp) \ > > (((vp)->v_mount->mnt_kern_flag & MNTK_ASYNC) !=3D 0 && \ > > ((curthread->td_pflags & TDP_SYNCIO) =3D=3D 0)) > > > > > > FYI, this commit along with retirement of NULLVP and VREF broke > open-vm-kmod build on current. I wonder if there are move ports that > could be affected. > I could bump __freebsd_version for it, but what you can do is simply not use the old stuff on any supported branch. From nobody Wed Oct 1 19:17: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 4ccPnm5WsJz69D19; Wed, 01 Oct 2025 19:17: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 4ccPnm4ng9z3tqm; Wed, 01 Oct 2025 19:17:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759346252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WnCzYw07tCbQ6dsekYKO0emhbLGojgqbDFPd6oz7ShM=; b=FJPLvAnRrFm8hCIaE9/c7SvlQdHD7b1S0kTAt5RrVH4sblDXPeAcX9ss0KP8iBGiVVUweY bKWW/2j4RQXEdGRk+vhc8nQ/XsNv5Sa4yUW8LqlxpKkQnYa/NBrRulg48U+zVD59zJLuOn a4srUXkdurJ92YfbVVc7XyHJXZyxmp/l/iKlqOEvylFdKrojs3nY6W84ZRrPpLj6oyFuN4 8kE8aech/VcAXeSj7S+P7htHJIoPOyh4ivkETH+FyjWrL/0DVTJNLenTyoRGsmpH2W1qFJ XSOjvR/6JrGwLX8es+d4sChGBz/yuyy4erObkDxqHJxivOLnDwDyJx1kljf2GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759346252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WnCzYw07tCbQ6dsekYKO0emhbLGojgqbDFPd6oz7ShM=; b=JDsFZODqSiK0Qg334bhDXCcP5fjKBH2oyApZ0gZYSDafOKl2V2ePrK6E/6g0e3kSK04Oiy 89AwXeXEEdWg5kSQHuYMmTUZYHjtWKjXRyGO2PYpst++4xTDzW2+07oMuSA5/5lAguAujQ iQsVwEdYR6J8yAdIJZ824X2aA1s6axxxpdPhGNxwfzwKqy4n6ABaxjOmWNz25T7530V6Qp XyL13z4SFLy/zV3F+sOM+FCrRgjca0OgUtUblln2rvV+Au4jW54I82bVSrhrqrpraaojex S0xwKCvY+E709c0+/7hNQKGtmHnWjzLEoFTTs97cT3zkCAupGoQrU+e0w4wolw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759346252; a=rsa-sha256; cv=none; b=LUSCtbgxVLEIASASHoDahdtqu1WpaubaJSCjAPaEMResXPHJ0AsAPtcq8wRea75V49yBKy N0kXgHOAo2u2F+RohQxUJiwIwQxoGR0II/eH3bI8yN0P2weqGbM+rympotK+phr700g+Ng UM2PXcgiElwvWr+6XzGGyDRnHDO/lJf8pFSmUEPHrmzEDDm1AxEhDl6iz7yRtL8FnY4OYe zamz5mJwu/tYRJ5pmaTGqO26gX7jcIqq+v8mef3t4iONHxc1frJ85lZxNzMNFwb+8+/mvG /Rl1v52f3rzvRRu8nEoEMemSdVUtrI592DG4XMbAgYIjH7cr6MUTSccA+0K21A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccPnm49qszbyb; Wed, 01 Oct 2025 19:17:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 591JHWTs019840; Wed, 1 Oct 2025 19:17:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 591JHW5u019837; Wed, 1 Oct 2025 19:17:32 GMT (envelope-from git) Date: Wed, 1 Oct 2025 19:17:32 GMT Message-Id: <202510011917.591JHW5u019837@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 3034fa3d4321 - main - tcp: cleanup syncache_expand() 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3034fa3d4321fdc487428c9050711de9ce234567 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=3034fa3d4321fdc487428c9050711de9ce234567 commit 3034fa3d4321fdc487428c9050711de9ce234567 Author: Michael Tuexen AuthorDate: 2025-10-01 19:14:23 +0000 Commit: Michael Tuexen CommitDate: 2025-10-01 19:14:23 +0000 tcp: cleanup syncache_expand() Only validate SEG.SEQ and SEG.ACK when processing a real SYN-cache entry. In the SYN-cookie case, these conditions are always true, since the SYN-cache entry on the stack is constructed from the incoming TCP segment. While there, fix the logging messages. Reviewed by: Nick Banks MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D52816 --- sys/netinet/tcp_syncache.c | 52 ++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 72e9dccea9a5..518cef66e7fa 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -1260,6 +1260,35 @@ syncache_expand(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, return (-1); /* Do not send RST */ } } + + /* + * SEG.ACK validation: + * SEG.ACK must match our initial send sequence number + 1. + */ + if (th->th_ack != sc->sc_iss + 1) { + SCH_UNLOCK(sch); + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) + log(LOG_DEBUG, "%s; %s: ACK %u != ISS+1 %u, " + "segment rejected\n", + s, __func__, th->th_ack, sc->sc_iss + 1); + goto failed; + } + + /* + * SEG.SEQ validation: + * The SEG.SEQ must be in the window starting at our + * initial receive sequence number + 1. + */ + if (SEQ_LEQ(th->th_seq, sc->sc_irs) || + SEQ_GT(th->th_seq, sc->sc_irs + sc->sc_wnd)) { + SCH_UNLOCK(sch); + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) + log(LOG_DEBUG, "%s; %s: SEQ %u != IRS+1 %u, " + "segment rejected\n", + s, __func__, th->th_seq, sc->sc_irs + 1); + goto failed; + } + TAILQ_REMOVE(&sch->sch_bucket, sc, sc_hash); sch->sch_length--; #ifdef TCP_OFFLOAD @@ -1272,29 +1301,6 @@ syncache_expand(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, SCH_UNLOCK(sch); } - /* - * Segment validation: - * ACK must match our initial sequence number + 1 (the SYN|ACK). - */ - if (th->th_ack != sc->sc_iss + 1) { - if ((s = tcp_log_addrs(inc, th, NULL, NULL))) - log(LOG_DEBUG, "%s; %s: ACK %u != ISS+1 %u, segment " - "rejected\n", s, __func__, th->th_ack, sc->sc_iss); - goto failed; - } - - /* - * The SEQ must fall in the window starting at the received - * initial receive sequence number + 1 (the SYN). - */ - if (SEQ_LEQ(th->th_seq, sc->sc_irs) || - SEQ_GT(th->th_seq, sc->sc_irs + sc->sc_wnd)) { - if ((s = tcp_log_addrs(inc, th, NULL, NULL))) - log(LOG_DEBUG, "%s; %s: SEQ %u != IRS+1 %u, segment " - "rejected\n", s, __func__, th->th_seq, sc->sc_irs); - goto failed; - } - *lsop = syncache_socket(sc, *lsop, m); if (__predict_false(*lsop == NULL)) { From nobody Wed Oct 1 19:41:01 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 4ccQJx3gTtz69FjK; Wed, 01 Oct 2025 19:41:05 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccQJx39Skz3y1N; Wed, 01 Oct 2025 19:41:05 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759347665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9r4b+6QmgVyz6du4f1Rns+FmWbPEYjaxe4BrgJ8kNpQ=; b=rRQhWR3zSlcxNPVUdkMHXrfhF4xZs9VY11EC+AWRQS63fUu6hWpLAAZA97POGwuUQMOXEJ qXsE9+7emtj4IvpL15653II/VztT0vN2oa/SKvJl8vJJ1Z2UEJvjQ7p8O/4XG5ssi/mUW9 qUnB5Jk3zrPntxpolzO34fOqFg3FwppPzEdmcp9LCXP+4Mq3S9vMv20KUM84/d/OQdQz4Z mDchh6QeBcmJIPgZsLWO9AuKI5Kh4u62Tidq0iN57rnIt/cI2gT5xwG+DBxmcIzydb1eY1 EOV9mvHj4swmGebhvFH3YFxOmTisds26GLpwlfcNbVE3EboSHSBIAR8i/yPLww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759347665; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9r4b+6QmgVyz6du4f1Rns+FmWbPEYjaxe4BrgJ8kNpQ=; b=yae05AInAWLUQpdwguY9HdDw+cUOsi8Oob7nqs54KQn9awqbOZ95r1bifukpAI+rvNm37o cqHg1hIzoVm0T+X3AVDIMZN5H/hegC+LhGTi3ykGIic0XuOlOjzLiwZuELjKOCVk0MFN+w kaOediQ5z3skFyNdgzVURX3VSOlmAdQtAYgbRbDUzUl3wNMTkD12RyA1QV4+XZIsTlVltZ IALhLLUxjBXKwAzsH8NFuYlYTNr4+/MZz63/2he+GhwoQzReAYgPQMLRb9XIpsxmGaP1i0 WjWqTtu/yoS40V7vG9yk0vItiUUukllg1+1uIJffgW6WUl/tbTiLZcVCOwVJug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759347665; a=rsa-sha256; cv=none; b=sgAGuIVlE/YpHWXPiiW9s4AxPmPZM8kT/hORkkgH/5i5jdwFuAbJzuFXVJsuj7qMAKoJ7e Jp8dNSxbcs8kzgl5FukT2Y2xBieM7E9WsQ6oEcCkkgOBgJI/qFPPBEqOpLTT9YnsS9Mpqa PFOANoapOKKGDs5UPIV0+IRac3p1yIZfE2lSQ/1eC4tVYCPa4OLVrFxMbEJIlna8ZbMjBW LeqOZK5z14ZYSnEvLBK2iLP3lLK0QFe/ahMlTW9pCC6+dhA/P6+Vhzt3w6cfbP1X8QxthI cPm4hfsGbiNXIgwEvs2oI7+A+orZxbu3ItIWckXa0LwqMDserWQhgUWQuUfDQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ccQJw5FKPzJt2; Wed, 01 Oct 2025 19:41:04 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Wed, 1 Oct 2025 12:41:01 -0700 From: Gleb Smirnoff To: Mateusz Guzik Cc: Renato Botelho , Mateusz Guzik , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 08f06aa1b4fb - main - vfs: retire the VCALL macro Message-ID: References: <202509270401.58R41A7b014829__21824.1523530864$1758945716$gmane$org@gitrepo.freebsd.org> <85c486e1-6fde-4f4a-b4ce-bfbec7bb693f@FreeBSD.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Oct 01, 2025 at 09:01:57PM +0200, Mateusz Guzik wrote: M> > FYI, this commit along with retirement of NULLVP and VREF broke M> > open-vm-kmod build on current. I wonder if there are move ports that M> > could be affected. M> > M> M> I could bump __freebsd_version for it, but what you can do is simply M> not use the old stuff on any supported branch. It is responsibility of src committer who broke a port to take care of it or at least be helpful to fix its build. -- Gleb Smirnoff From nobody Wed Oct 1 21:24:23 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ccSc7479Bz69RRg; Wed, 01 Oct 2025 21:24:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccSc73fy0z3DbP; Wed, 01 Oct 2025 21:24:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759353863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/VTt6HKIEQjxogEdpa0YWPnIKBRTlrwHpkEyLROXaZ8=; b=mhmoLRR0EOV/9f7ZygXjLt3mAmF71tqwNH3J4ll5dS6AkfRIgiD3hkrc1oD+CvXLiGwlCC WTVL6OP1q1UOM9k7I7zXT3cdf+IS0V55KEDrYldLYdcIXy3aJwnJ/FuWrlRmdg19cJCP51 AUa7bT3HDAbP9qZJxue7BKpbq2sQpGx8xUCsxuOKk/NP8uHIMGgm0Bt2eI1utVYr7JvIyY ZXmkNrk6fYCP141ZF/Oj8efsHyoDr+n//GkdbAOt4ZYe0dXpIq/AnYHXhxbu6wa4ydgtMA TPufBlWzVuuDm5+GjaeYw+2DKH0gBetpTiTV5468nQC0JNJ2nbLtdtwe+FIZfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759353863; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/VTt6HKIEQjxogEdpa0YWPnIKBRTlrwHpkEyLROXaZ8=; b=oMnACmuIZCKOpbEMxH09vqQFJvHBalQDGV0Gy/4kW0mlaga0/CzExqK5mK2F63Fvo3qpD3 9HJK4i20XdcE8m7dSYe1sbRLlOwVpiSe6HZ0Td087x63oXOf0FSs99T9M5g+lwK1MLL8V4 SXZwq6O70Ju3tUtJeS+2bd73AtxSnlL3OxGAhbFgnkzu4LwB4TlNOKfEkp8g/XBnJ8wq/B PWeQ9/L1vQiQdd0LaCDAOrY4iMOWEcC2sfzk7wsfnVxKZX30HetiVoiSKmKhmH37yEgZPD 6HfU5hrr2l4nVy1M65wAPnYmTmXoPh80InbfgEQj5a1D78frLHavXcFC7BrZKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759353863; a=rsa-sha256; cv=none; b=qciioqS9tFH7wYTy+kBZizCOveuSHcABcWeJ3nudhXKXERU3rZ+m1Oyqp8jaHUfqgMOOEY Kk0TkcAlEmjeGg+gJ5u00wUXkZKErfS+yq3aE+w1UeebuP9sD5Sjhrpy78vdkVDMRDpqQF k+8olegNotghuGfsZeilrKwidTpMH4DHlDE8kQ72zKmy0JBLWqKnejnsrviZGGvPDmPUa4 auEibxNhidfy6bYtsk2WWurnpL7tzF0OiYdVuQcAo/KImNuDyiSwFortp4HtwJbdaYtsPh AxfSrogTl4oRUH1it8dqeija7K4Gxaxi66k+fwTlKMHUY1NDj//GXnKlvdRswg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccSc73GGYzg0W; Wed, 01 Oct 2025 21:24:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 591LONT1063963; Wed, 1 Oct 2025 21:24:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 591LONNN063960; Wed, 1 Oct 2025 21:24:23 GMT (envelope-from git) Date: Wed, 1 Oct 2025 21:24:23 GMT Message-Id: <202510012124.591LONNN063960@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: e91fc88bca02 - main - ip(4): fix description of struct ip_mreqn 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: e91fc88bca02a74ea972ebf7f66aef3a3298ad54 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=e91fc88bca02a74ea972ebf7f66aef3a3298ad54 commit e91fc88bca02a74ea972ebf7f66aef3a3298ad54 Author: Gleb Smirnoff AuthorDate: 2025-09-29 22:50:42 +0000 Commit: Gleb Smirnoff CommitDate: 2025-10-01 19:41:51 +0000 ip(4): fix description of struct ip_mreqn This is a minor bug, since the kernel ignores imr_address and applications are not supposed to initialize it. --- share/man/man4/ip.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/ip.4 b/share/man/man4/ip.4 index c52715a43380..fb5ea398c840 100644 --- a/share/man/man4/ip.4 +++ b/share/man/man4/ip.4 @@ -575,7 +575,7 @@ is the following structure: .Bd -literal struct ip_mreqn { struct in_addr imr_multiaddr; /* IP multicast address of group */ - struct in_addr imr_interface; /* local IP address of interface */ + struct in_addr imr_address; /* local IP address of interface */ int imr_ifindex; /* interface index */ } .Ed From nobody Wed Oct 1 21:24:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ccSc862Bjz69RPb; Wed, 01 Oct 2025 21:24:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccSc84sKJz3DWT; Wed, 01 Oct 2025 21:24:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759353864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8yrovgAZh/DBAQxKQDcGSQsSCbmHypdr0U+HxCgCD1o=; b=rVRJuLJWckhX9DNuwvECH+hcli+Z5ytFDebSgSUtrX4PPXreHiNCZVkyyrWvzzx1fP3Oju AxqG5Ddez8PlwbT+z6ptgrbaNEdxVRLe5a1DKAPbbB1mJrVvR8oZF99++4op7NLxAdbL5k gVuNHSjAesERvt0/aqA6dsedzm+0SDsIY0i4RZl3UjTIMxyXSfXJrh4UF/Td235cjWsvnb OFh716ksw9kSRJOzgifgjlQ1l0ot8Ve/qA1izI3+TL6+c1ytSrF0ntlDUZ7ajuDiYZLPoV va8XtIOrcru6WrR0t5Qe8dKRNKqkO+ZkhOdvHDGqXvv8S8bLQfGqmNRPNg2Jcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759353864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8yrovgAZh/DBAQxKQDcGSQsSCbmHypdr0U+HxCgCD1o=; b=WmUDPgrbxgDwPbSj27//I/tOig+bjzLieksMjq9aYyIiEE3mm9sqIvwdr3wuDQvtRSQF3D I5p1a0RiZ8Fbh/rPvohUTCWmNWxZ7W+mBl07S24JTl7h2i3GwCCw9MfXmS+eNwuI1+VxqH 3V1rxLvmaj6ectkbEzP2wlJ0f0nqgOz7Jm5yhIozAM/oNUWPpYZSjivOmRVn+XuFKYcdup drEsgOkKd0UxUAgu6FORe171Vz6eI6EWauu40YDxAO/3D2oF7p1hEp529ySX33Jkyya7os TQLqmAJHFIZ6PW94FrcdU+jl/xt7tpxQB8GB61D75mT8ChwJgNITv7N1tY2+Jw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759353864; a=rsa-sha256; cv=none; b=QDFbwYm3fy/i3BNTxL+dUocMG3gC9/yrt6VSVwrXqcNy4bXWIw3I/0SedBCF2CGmbMEbfP 9nmos4mCaLMXzBtFFm9K4pSS9uqJBZrWoGb9vXQN4ufQ7JQUoUwO/srnZd5STsGImNm3Vm 7lWNqTlHrWQblEkxRSx1PFR3GNrXEHyBjo/3J1tYO8uOq3AgIxW8u9bwHa64hwKLyRst8u LEH7IVXfWgZuIWwIszxXpJZyOCYjXKAb7cNv2gNOqbuA5NXa10mXqCVhcaD2Hfl+N7D8mS OX1UIdMU/aUTHV6JTKzFes+DiiEIYLgZC5v9/L4qEJXntu247RxIYSPHAeeKIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccSc84JQWzfYl; Wed, 01 Oct 2025 21:24:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 591LOOOE063997; Wed, 1 Oct 2025 21:24:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 591LOOqX063994; Wed, 1 Oct 2025 21:24:24 GMT (envelope-from git) Date: Wed, 1 Oct 2025 21:24:24 GMT Message-Id: <202510012124.591LOOqX063994@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 36f2eda25171 - main - tests/netinet: rename and extend sendto-IP_MULTICAST_IF.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: 36f2eda251713d4d38f41cf269876b069e3897ff Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=36f2eda251713d4d38f41cf269876b069e3897ff commit 36f2eda251713d4d38f41cf269876b069e3897ff Author: Gleb Smirnoff AuthorDate: 2025-09-30 02:34:13 +0000 Commit: Gleb Smirnoff CommitDate: 2025-10-01 19:41:52 +0000 tests/netinet: rename and extend sendto-IP_MULTICAST_IF.c Rename this test helper app to multicast-send.c. Extend it to send from/to arbitrary addresses and arbitrary payload so that it can be used in more test scenarios. --- ObsoleteFiles.inc | 3 ++ tests/sys/netinet/Makefile | 2 +- .../{sendto-IP_MULTICAST_IF.c => multicast-send.c} | 62 +++++++++++++++++----- tests/sys/netinet/multicast.sh | 3 +- 4 files changed, 54 insertions(+), 16 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 55202d1c100c..539ab7d54460 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20251001: test helper sendto-IP_MULTICAST_IF renamed +OLD_FILES+=usr/tests/sys/netinet/sendto-IP_MULTICAST_IF + # 20250930: Rename wlanstats to wlanstat OLD_FILES+=usr/sbin/wlanstats OLD_FILES+=usr/share/man/man8/wlanstats.8.gz diff --git a/tests/sys/netinet/Makefile b/tests/sys/netinet/Makefile index cc525bf24480..1880709112c8 100644 --- a/tests/sys/netinet/Makefile +++ b/tests/sys/netinet/Makefile @@ -48,7 +48,7 @@ TEST_METADATA.forward+= required_programs="python" \ TEST_METADATA.output+= required_programs="python" TEST_METADATA.redirect+= required_programs="python" -PROGS= udp_dontroute tcp_user_cookie sendto-IP_MULTICAST_IF +PROGS= udp_dontroute tcp_user_cookie multicast-send ${PACKAGE}FILES+= redirect.py diff --git a/tests/sys/netinet/sendto-IP_MULTICAST_IF.c b/tests/sys/netinet/multicast-send.c similarity index 56% rename from tests/sys/netinet/sendto-IP_MULTICAST_IF.c rename to tests/sys/netinet/multicast-send.c index d478e4da0b3b..f10b2b6338dd 100644 --- a/tests/sys/netinet/sendto-IP_MULTICAST_IF.c +++ b/tests/sys/netinet/multicast-send.c @@ -28,35 +28,69 @@ #include #include #include +#include #include +#include +#include +#include +#include +#include #include +static in_port_t +atop(const char *c) +{ + unsigned long ul; + + errno = 0; + if ((ul = strtol(c, NULL, 10)) < 1 || ul > IPPORT_MAX || errno != 0) + err(1, "can't parse %s", c); + + return ((in_port_t)ul); +} + int main(int argc, char *argv[]) { - struct sockaddr_in sin = { + struct sockaddr_in src = { + .sin_family = AF_INET, + .sin_len = sizeof(struct sockaddr_in), + }, dst = { .sin_family = AF_INET, .sin_len = sizeof(struct sockaddr_in), }; + struct ip_mreqn mreqn; struct in_addr in; - int s, rv; + int s; + bool index; - if (argc < 2) - errx(1, "Usage: %s IPv4-address", argv[0]); + if (argc < 7) + errx(1, "Usage: %s src-IPv4 src-port dst-IPv4 dst-port " + "interface payload", argv[0]); - if (inet_pton(AF_INET, argv[1], &in) != 1) + if (inet_pton(AF_INET, argv[1], &src.sin_addr) != 1) err(1, "inet_pton(%s) failed", argv[1]); + src.sin_port = htons(atop(argv[2])); + if (inet_pton(AF_INET, argv[3], &dst.sin_addr) != 1) + err(1, "inet_pton(%s) failed", argv[3]); + dst.sin_port = htons(atop(argv[4])); + if (inet_pton(AF_INET, argv[5], &in) == 1) + index = false; + else if ((mreqn.imr_ifindex = if_nametoindex(argv[5])) > 0) + index = true; + else + err(1, "if_nametoindex(%s) failed", argv[5]); assert((s = socket(PF_INET, SOCK_DGRAM, 0)) > 0); - assert(bind(s, (struct sockaddr *)&sin, sizeof(sin)) == 0); - assert(setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF, &in, sizeof(in)) - == 0); - /* RFC 6676 */ - assert(inet_pton(AF_INET, "233.252.0.1", &sin.sin_addr) == 1); - sin.sin_port = htons(6676); - rv = sendto(s, &sin, sizeof(sin), 0, - (struct sockaddr *)&sin, sizeof(sin)); - if (rv != sizeof(sin)) + assert(bind(s, (struct sockaddr *)&src, sizeof(src)) == 0); + if (index) + assert(setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF, &mreqn, + sizeof(mreqn)) == 0); + else + assert(setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF, &in, + sizeof(in)) == 0); + if (sendto(s, argv[6], strlen(argv[6]) + 1, 0, (struct sockaddr *)&dst, + sizeof(dst)) != (ssize_t)strlen(argv[6]) + 1) err(1, "sendto failed"); return (0); diff --git a/tests/sys/netinet/multicast.sh b/tests/sys/netinet/multicast.sh index eb2b962dac70..1826e1e7c4ee 100644 --- a/tests/sys/netinet/multicast.sh +++ b/tests/sys/netinet/multicast.sh @@ -47,7 +47,8 @@ IP_MULTICAST_IF_body() jexec mjail ifconfig ${epair}a up jexec mjail ifconfig ${epair}a 192.0.2.1/24 atf_check -s exit:0 -o empty \ - jexec mjail $(atf_get_srcdir)/sendto-IP_MULTICAST_IF 192.0.2.1 + jexec mjail $(atf_get_srcdir)/multicast-send \ + 0.0.0.0 0 233.252.0.1 6676 192.0.2.1 hello } IP_MULTICAST_IF_cleanup() From nobody Wed Oct 1 21:24: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 4ccScB2QSwz69RZp; Wed, 01 Oct 2025 21:24: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 4ccSc96yWCz3Dk3; Wed, 01 Oct 2025 21:24:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759353866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EfDfSDTVFmfjZ24rCP20LjOvOsxg5hlcDH/UfLHn7GM=; b=dc9bmLNut/dR1Sb4Jts3KEVLvdnVyb5cp6evTprPIZkEG5NQGC2FG6N2JBsusCEzaVDbbK 1Dcpuyq4koBsk+x2Zh8LAXZY8fR05geIeyrJZDke9fv8m/RL0JkTpM+ZUZbTZhRSIzGCIV Qon1gzKZEakEL33arjWxYM/MIlp8NHyMIIIqx4T/7KG0pmjRvt7v4I0fYdHgbLMfCEHm4V 60DrL8RRmbTaLJnawuJQ5iujOQBqVOXEMRqRgM0Fa6U2Bl8yLPlXWjBG785cCbVRyRQhzG 0TAnU2IfejfMCcyxduntMr3JRB/iaq1oCzeEjIpJVw04PUtyfFvndH/mKgVxGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759353866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EfDfSDTVFmfjZ24rCP20LjOvOsxg5hlcDH/UfLHn7GM=; b=aJxiDlxr3ahEXUe1XrlHH0Omza1IlMau2xw3p/OtIu47bscAuxslguQT6C/nkP7o5rCrkE wrk4KghPSbF5zKJAl4Eo4nO1mxY1NL2GLPaAQM4NszY4JkhFroBupCatoMC6RSqo/jw7yL kiYu8M+BRdDCwl7QiQ97nIQ1BLHOoAJschBgbfXb+9TKSWl/o3zuh6y2H9q+PF+98Fr2b9 W78hMR/bZHRKI2zsi8zsrDH4YzU+SzU3O89vLJLOoHaSPEU2eLk9Yb5zG7zrIGUN9mLmkw EdzuzErzDHlqzlChhF1WKUm85cAUGTj6lHGuMzanqKdxES4dgJJWYovmX0El1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759353866; a=rsa-sha256; cv=none; b=ctK4c87OntIhpiKR54SfQ8ANMRNAMIYy26Lpb2i59ymGPIl1Owe4DW6RGjlfRsBS5Wgkxi BBnlvm8b87HZ2IHM2huA45sPSm5FYeXyn2x4A55ky+wZP9ciOcfxPzIRXXYNmmjhaEImZ8 RAcDPQxPjClByCZnbWqFC4/fccOFJtLGGjSW6YXAopL8Usm6DgTibknEQNxqMUxirUcdFT VqCgA9sqixYfYMDTOq2ehleCoTgxBa2yGCpZhra0VhoV5B3aE9BcUoRU2Cs7S5XkJleZyY BBg3KCbCisLAN8gcOAMxCYLbr1iiDZnPtSNHnn/yyWelENiO60IY6aSIhghBQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccSc95rgzzgGg; Wed, 01 Oct 2025 21:24:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 591LOP83064030; Wed, 1 Oct 2025 21:24:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 591LOPtb064027; Wed, 1 Oct 2025 21:24:25 GMT (envelope-from git) Date: Wed, 1 Oct 2025 21:24:25 GMT Message-Id: <202510012124.591LOPtb064027@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: d0c8a0b3e6fc - main - tests/netinet: extend IPv4 multicast testing framework 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: d0c8a0b3e6fc5372428eb4fddcd4f8c65b5b0ee0 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=d0c8a0b3e6fc5372428eb4fddcd4f8c65b5b0ee0 commit d0c8a0b3e6fc5372428eb4fddcd4f8c65b5b0ee0 Author: Gleb Smirnoff AuthorDate: 2025-09-29 23:23:28 +0000 Commit: Gleb Smirnoff CommitDate: 2025-10-01 19:41:52 +0000 tests/netinet: extend IPv4 multicast testing framework Provide a helper program multicast-receive.c that joins arbitrary group on arbitrary specified interface and receives a single datagram and prints it out. In multicast.sh provide a template with two jails connected by two interface pairs, so that we can check sends/receives in presence of multiple interfaces. Compose a few basic tests to check legacy and new IP_ADD_MEMBERSHIP and MCAST_JOIN_GROUP. --- tests/sys/netinet/Makefile | 2 +- tests/sys/netinet/multicast-receive.c | 130 ++++++++++++++++++++++++++++++++++ tests/sys/netinet/multicast.sh | 125 +++++++++++++++++++++++++++----- 3 files changed, 239 insertions(+), 18 deletions(-) diff --git a/tests/sys/netinet/Makefile b/tests/sys/netinet/Makefile index 1880709112c8..b742342beecb 100644 --- a/tests/sys/netinet/Makefile +++ b/tests/sys/netinet/Makefile @@ -48,7 +48,7 @@ TEST_METADATA.forward+= required_programs="python" \ TEST_METADATA.output+= required_programs="python" TEST_METADATA.redirect+= required_programs="python" -PROGS= udp_dontroute tcp_user_cookie multicast-send +PROGS= udp_dontroute tcp_user_cookie multicast-send multicast-receive ${PACKAGE}FILES+= redirect.py diff --git a/tests/sys/netinet/multicast-receive.c b/tests/sys/netinet/multicast-receive.c new file mode 100644 index 000000000000..81d0f10f5cfe --- /dev/null +++ b/tests/sys/netinet/multicast-receive.c @@ -0,0 +1,130 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 Gleb Smirnoff + * + * 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 +#include + +static in_port_t +atop(const char *c) +{ + unsigned long ul; + + errno = 0; + if ((ul = strtol(c, NULL, 10)) < 1 || ul > IPPORT_MAX || errno != 0) + err(1, "can't parse %s", c); + + return ((in_port_t)ul); +} + +int +main(int argc, char *argv[]) +{ + char buf[IP_MAXPACKET + 1]; + struct sockaddr_in sin = { + .sin_family = AF_INET, + .sin_len = sizeof(struct sockaddr_in), + }; + socklen_t slen = sizeof(struct sockaddr_in); + struct in_addr maddr, ifaddr; + ssize_t len; + int s, ifindex; + bool index; + + if (argc < 4) +usage: + errx(1, "Usage: %s (ip_mreq|ip_mreqn|group_req) " + "IPv4-group port interface", argv[0]); + + if (inet_pton(AF_INET, argv[2], &maddr) != 1) + err(1, "inet_pton(%s) failed", argv[2]); + sin.sin_port = htons(atop(argv[3])); + if (inet_pton(AF_INET, argv[4], &ifaddr) == 1) + index = false; + else if ((ifindex = if_nametoindex(argv[4])) > 0) + index = true; + else if (strcmp(argv[4], "0") == 0) { + ifindex = 0; + index = true; + } else + err(1, "if_nametoindex(%s) failed", argv[4]); + + assert((s = socket(PF_INET, SOCK_DGRAM, 0)) > 0); + assert(bind(s, (struct sockaddr *)&sin, sizeof(sin)) == 0); + + if (strcmp(argv[1], "ip_mreq") == 0) { + if (index) + errx(1, "ip_mreq doesn't accept index"); + struct ip_mreq mreq = { + .imr_multiaddr = maddr, + .imr_interface = ifaddr, + }; + assert(setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, + sizeof(mreq)) == 0); + } else if (strcmp(argv[1], "ip_mreqn") == 0) { + /* + * ip_mreqn shall be used with index, but for testing + * purposes accept address too. + */ + struct ip_mreqn mreqn = { + .imr_multiaddr = maddr, + .imr_address = index ? (struct in_addr){ 0 } : ifaddr, + .imr_ifindex = index ? ifindex : 0, + }; + assert(setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreqn, + sizeof(mreqn)) == 0); + } else if (strcmp(argv[1], "group_req") == 0) { + if (!index) + errx(1, "group_req expects index"); + struct group_req greq = { .gr_interface = ifindex }; + struct sockaddr_in *gsa = (struct sockaddr_in *)&greq.gr_group; + + gsa->sin_family = AF_INET; + gsa->sin_len = sizeof(struct sockaddr_in); + gsa->sin_addr = maddr; + assert(setsockopt(s, IPPROTO_IP, MCAST_JOIN_GROUP, &greq, + sizeof(greq)) == 0); + } else + goto usage; + + assert((len = recvfrom(s, buf, sizeof(buf) - 1, 0, + (struct sockaddr *)&sin, &slen)) > 0); + buf[len] = '\0'; + printf("%s:%u %s\n", inet_ntoa(sin.sin_addr), ntohs(sin.sin_port), buf); + + return (0); +} diff --git a/tests/sys/netinet/multicast.sh b/tests/sys/netinet/multicast.sh old mode 100644 new mode 100755 index 1826e1e7c4ee..2ce6be68e44d --- a/tests/sys/netinet/multicast.sh +++ b/tests/sys/netinet/multicast.sh @@ -26,37 +26,128 @@ . $(atf_get_srcdir)/../common/vnet.subr -# See regression fixed in baad45c9c12028964acd0b58096f3aaa0fb22859 -atf_test_case "IP_MULTICAST_IF" "cleanup" -IP_MULTICAST_IF_head() +# Set up two jails, mjail1 and mjail2, connected with two interface pairs +multicast_vnet_init() { - atf_set descr \ - 'sendto() for IP_MULTICAST_IF socket does not do routing lookup' + + vnet_init + epair1=$(vnet_mkepair) + epair2=$(vnet_mkepair) + vnet_mkjail mjail1 ${epair1}a ${epair2}a + jexec mjail1 ifconfig ${epair1}a up + jexec mjail1 ifconfig ${epair1}a 192.0.2.1/24 + jexec mjail1 ifconfig ${epair2}a up + jexec mjail1 ifconfig ${epair2}a 192.0.3.1/24 + vnet_mkjail mjail2 ${epair1}b ${epair2}b + jexec mjail2 ifconfig ${epair1}b up + jexec mjail2 ifconfig ${epair1}b 192.0.2.2/24 + jexec mjail2 ifconfig ${epair2}b up + jexec mjail2 ifconfig ${epair2}b 192.0.3.2/24 +} + +atf_test_case "IP_ADD_MEMBERSHIP_ip_mreq" "cleanup" +IP_ADD_MEMBERSHIP_ip_mreq_head() +{ + atf_set descr 'IP_ADD_MEMBERSHIP / IP_MULTICAST_IF with ip_mreq' atf_set require.user root +} +IP_ADD_MEMBERSHIP_ip_mreq_body() +{ + multicast_vnet_init + + # join group on interface with IP address 192.0.2.2 + jexec mjail2 $(atf_get_srcdir)/multicast-receive \ + ip_mreq 233.252.0.1 6676 192.0.2.2 > out & pid=$! + atf_check -s exit:0 -o empty \ + jexec mjail1 $(atf_get_srcdir)/multicast-send \ + 0.0.0.0 6676 233.252.0.1 6676 192.0.2.1 hello + atf_check -s exit:0 sh -c "wait $pid; exit $?" + atf_check -s exit:0 -o inline:"192.0.2.1:6676 hello\n" cat out + # join group on interface with IP address 192.0.3.2 + jexec mjail2 $(atf_get_srcdir)/multicast-receive \ + ip_mreq 233.252.0.1 6676 192.0.3.2 > out & pid=$! + atf_check -s exit:0 -o empty \ + jexec mjail1 $(atf_get_srcdir)/multicast-send \ + 0.0.0.0 6676 233.252.0.1 6676 192.0.3.1 hello + atf_check -s exit:0 sh -c "wait $pid; exit $?" + atf_check -s exit:0 -o inline:"192.0.3.1:6676 hello\n" cat out +} +IP_ADD_MEMBERSHIP_ip_mreq_cleanup() +{ + rm out + vnet_cleanup } -IP_MULTICAST_IF_body() +atf_test_case "IP_ADD_MEMBERSHIP_ip_mreqn" "cleanup" +IP_ADD_MEMBERSHIP_ip_mreqn_head() +{ + atf_set descr 'IP_ADD_MEMBERSHIP / IP_MULTICAST_IF with ip_mreqn' + atf_set require.user root +} +IP_ADD_MEMBERSHIP_ip_mreqn_body() { - local epair mjail + multicast_vnet_init - vnet_init - # The test doesn't use our half of epair - epair=$(vnet_mkepair) - vnet_mkjail mjail ${epair}a - jexec mjail ifconfig ${epair}a up - jexec mjail ifconfig ${epair}a 192.0.2.1/24 + # join group on interface epair2 + jexec mjail2 $(atf_get_srcdir)/multicast-receive \ + ip_mreqn 233.252.0.1 6676 ${epair1}b > out & pid=$! + atf_check -s exit:0 -o empty \ + jexec mjail1 $(atf_get_srcdir)/multicast-send \ + 0.0.0.0 6676 233.252.0.1 6676 ${epair1}a hello + atf_check -s exit:0 sh -c "wait $pid; exit $?" + atf_check -s exit:0 -o inline:"192.0.2.1:6676 hello\n" cat out + + # join group on interface epair2 + jexec mjail2 $(atf_get_srcdir)/multicast-receive \ + ip_mreqn 233.252.0.1 6676 ${epair2}b > out & pid=$! atf_check -s exit:0 -o empty \ - jexec mjail $(atf_get_srcdir)/multicast-send \ - 0.0.0.0 0 233.252.0.1 6676 192.0.2.1 hello + jexec mjail1 $(atf_get_srcdir)/multicast-send \ + 0.0.0.0 6676 233.252.0.1 6676 ${epair2}a hello + atf_check -s exit:0 sh -c "wait $pid; exit $?" +} +IP_ADD_MEMBERSHIP_ip_mreqn_cleanup() +{ + rm out + vnet_cleanup } -IP_MULTICAST_IF_cleanup() +atf_test_case "MCAST_JOIN_GROUP" "cleanup" +MCAST_JOIN_GROUP_head() +{ + atf_set descr 'MCAST_JOIN_GROUP' + atf_set require.user root +} +MCAST_JOIN_GROUP_body() +{ + multicast_vnet_init + + # join group on interface epair2 + jexec mjail2 $(atf_get_srcdir)/multicast-receive \ + group_req 233.252.0.1 6676 ${epair1}b > out & pid=$! + atf_check -s exit:0 -o empty \ + jexec mjail1 $(atf_get_srcdir)/multicast-send \ + 0.0.0.0 6676 233.252.0.1 6676 ${epair1}a hello + atf_check -s exit:0 sh -c "wait $pid; exit $?" + atf_check -s exit:0 -o inline:"192.0.2.1:6676 hello\n" cat out + + # join group on interface epair2 + jexec mjail2 $(atf_get_srcdir)/multicast-receive \ + group_req 233.252.0.1 6676 ${epair2}b > out & pid=$! + atf_check -s exit:0 -o empty \ + jexec mjail1 $(atf_get_srcdir)/multicast-send \ + 0.0.0.0 6676 233.252.0.1 6676 ${epair2}a hello + atf_check -s exit:0 sh -c "wait $pid; exit $?" +} +MCAST_JOIN_GROUP_cleanup() { + rm out vnet_cleanup } atf_init_test_cases() { - atf_add_test_case "IP_MULTICAST_IF" + atf_add_test_case "IP_ADD_MEMBERSHIP_ip_mreq" + atf_add_test_case "IP_ADD_MEMBERSHIP_ip_mreqn" + atf_add_test_case "MCAST_JOIN_GROUP" } From nobody Wed Oct 1 22:57: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 4ccVgD5CG0z69bD3; Wed, 01 Oct 2025 22:57: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 4ccVgD3NlZz3N8d; Wed, 01 Oct 2025 22:57:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759359432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WsT42u6VS/rB4ebksaMc4Yia/4h4wz6et4hjeyAMRws=; b=eG8IOqsHT8wrjuUiEnf/0YP8lienEhljbQ242Pu04EZOGFW3C3GoOiFHYaz54RwLM7CL/c owrTi0QeN0PZoSMbrSldHgrlFSr9sXdRKGE+6HHMcIl7esx4B0v6BwVq1U0syABh/W43bb 0slrSWh+BGf9FrFb5u7qPJMnVQNKb3S7xE9sz62pFp2klAN/U/2qVSvirC9sU2eu4ve00m yix+46Ds08m7hNYgIDCoP9BWaXjcocKoh0wHmhBHrr0Yx85J8TiqY0f/waUY6gkyZHgJR0 L6r1KJMPdgGSKuZEdkNLFWkQXZze1+sPW4XY3mr8+FY6PB+4R5DNNXCpRI+y/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759359432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WsT42u6VS/rB4ebksaMc4Yia/4h4wz6et4hjeyAMRws=; b=wHfBObombjp8EMlsqRdTm6taZTEDujKszgf56+YUBxDr2IeLieQWgkT0b1fxNO9CRFQU75 wzp9jqeyHWfrnpPiIUmdkUjrZ0zfDQUwtxRHS8D7O0XiotUkMUr4rI18kBsIsTS0/fOh/b 4nck9xZrLqZjQ3GavLjzqrRguTTIf0MQ0FvCgKiYnDDAmAG1vyGz+9Myc9fBlpWiuuC0HZ wgrrcMgmwvWjLHNkP0POOmbm7oNqGgNS7hVrv0dtFHK/K4+cguuFp6lWBOq1WdE1RT2VPP A/40TJTnFDVQ9ihP+pAlZTKg161oIcJbDmvea74uPZ1nqF7bJN8AfpyUhwiUqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759359432; a=rsa-sha256; cv=none; b=eVb3z2teWVa+JMkIlYPu3nlFP1q95lSbAb0UfNnGFrdG5Hhtr5qnZUAJb7xvHLtybC5KeP mDHeOCCFLyJ2asTUKcz1x8f1dK4Epd5WQswz/dAlpmv8jl38ukbI6oOAOder/oRm7kUlX9 Xd5sw7TOWUw5UrjBZYMW//1c2LgEvEir7iG476QxyzP2Wjo93E+TZZH8IiWzmtOhLJ1gOr FisR3SZiGypdqVWSnluQSprkCDjVKOsDa/drdRvcNHp3PFDvWrpPDl5pJvkiDc/suki3WO jG1YZsA02lm2bRlHu/6ElAixEQWtsXWpD7EDp4RmjSFwK5EdKm7H14c5s6tyag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccVgD2svxzj2f; Wed, 01 Oct 2025 22:57:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 591MvCJr033598; Wed, 1 Oct 2025 22:57:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 591MvCth033595; Wed, 1 Oct 2025 22:57:12 GMT (envelope-from git) Date: Wed, 1 Oct 2025 22:57:12 GMT Message-Id: <202510012257.591MvCth033595@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: 213170eb956f - main - iflib: Implement tx desc reclaim threshold List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 213170eb956fa7eec93c2ab4159d6ed68e8e1b1d Auto-Submitted: auto-generated The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=213170eb956fa7eec93c2ab4159d6ed68e8e1b1d commit 213170eb956fa7eec93c2ab4159d6ed68e8e1b1d Author: Andrew Gallatin AuthorDate: 2025-10-01 22:43:05 +0000 Commit: Andrew Gallatin CommitDate: 2025-10-01 22:55:00 +0000 iflib: Implement tx desc reclaim threshold On some iflib drivers, the txd reclaim routine can be fairly expensive at high packet rates. Iflib was designed with the intent of only reclaiming tx descriptors above a configurable threshold, but this logic was left unimplemented. This change: - implements 2 new knobs, iflib.tx_reclaim_thresh and iflib.tx_reclaim_ticks. - moves tx reclaim thresh from the if_shared_ctx and into the iflib_ctx as drivers don't need to see it, and it needs to be changed, so it can't be const - tx_reclaim_thresh and ticks are replicated into the txq to improve cache locality of data accessed in the hot path - ticks is used rather than more expensive timekeeping mechanism so as to keep things simple and cheap This change substantially improves packet rates on bnxt. It has been tested on bxnt and ixl Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D52561 Reviewed by: markj (initial version) --- sys/net/iflib.c | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++------ sys/net/iflib.h | 2 +- 2 files changed, 101 insertions(+), 13 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index e2005aa28c5c..d2625da19cd2 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -202,6 +202,8 @@ struct iflib_ctx { uint16_t ifc_sysctl_extra_msix_vectors; bool ifc_cpus_are_physical_cores; bool ifc_sysctl_simple_tx; + uint16_t ifc_sysctl_tx_reclaim_thresh; + uint16_t ifc_sysctl_tx_reclaim_ticks; qidx_t ifc_sysctl_ntxds[8]; qidx_t ifc_sysctl_nrxds[8]; @@ -345,7 +347,9 @@ struct iflib_txq { uint16_t ift_npending; uint16_t ift_db_pending; uint16_t ift_rs_pending; - /* implicit pad */ + uint32_t ift_last_reclaim; + uint16_t ift_reclaim_thresh; + uint16_t ift_reclaim_ticks; uint8_t ift_txd_size[8]; uint64_t ift_processed; uint64_t ift_cleaned; @@ -729,7 +733,7 @@ static void iflib_free_intr_mem(if_ctx_t ctx); #ifndef __NO_STRICT_ALIGNMENT static struct mbuf *iflib_fixup_rx(struct mbuf *m); #endif -static __inline int iflib_completed_tx_reclaim(iflib_txq_t txq, int thresh); +static __inline int iflib_completed_tx_reclaim(iflib_txq_t txq); static SLIST_HEAD(cpu_offset_list, cpu_offset) cpu_offsets = SLIST_HEAD_INITIALIZER(cpu_offsets); @@ -3084,8 +3088,6 @@ txq_max_rs_deferred(iflib_txq_t txq) #define QIDX(ctx, m) ((((m)->m_pkthdr.flowid & ctx->ifc_softc_ctx.isc_rss_table_mask) % NTXQSETS(ctx)) + FIRST_QSET(ctx)) #define DESC_RECLAIMABLE(q) ((int)((q)->ift_processed - (q)->ift_cleaned - (q)->ift_ctx->ifc_softc_ctx.isc_tx_nsegments)) -/* XXX we should be setting this to something other than zero */ -#define RECLAIM_THRESH(ctx) ((ctx)->ifc_sctx->isc_tx_reclaim_thresh) #define MAX_TX_DESC(ctx) MAX((ctx)->ifc_softc_ctx.isc_tx_tso_segments_max, \ (ctx)->ifc_softc_ctx.isc_tx_nsegments) @@ -3642,7 +3644,7 @@ defrag: * cxgb */ if (__predict_false(nsegs + 2 > TXQ_AVAIL(txq))) { - (void)iflib_completed_tx_reclaim(txq, RECLAIM_THRESH(ctx)); + (void)iflib_completed_tx_reclaim(txq); if (__predict_false(nsegs + 2 > TXQ_AVAIL(txq))) { txq->ift_no_desc_avail++; bus_dmamap_unload(buf_tag, map); @@ -3785,14 +3787,21 @@ iflib_tx_desc_free(iflib_txq_t txq, int n) } static __inline int -iflib_completed_tx_reclaim(iflib_txq_t txq, int thresh) +iflib_completed_tx_reclaim(iflib_txq_t txq) { - int reclaim; + int reclaim, thresh; + uint32_t now; if_ctx_t ctx = txq->ift_ctx; + thresh = txq->ift_reclaim_thresh; KASSERT(thresh >= 0, ("invalid threshold to reclaim")); MPASS(thresh /*+ MAX_TX_DESC(txq->ift_ctx) */ < txq->ift_size); + now = ticks; + if (now <= (txq->ift_last_reclaim + txq->ift_reclaim_ticks) && + txq->ift_in_use < thresh) + return (0); + txq->ift_last_reclaim = now; /* * Need a rate-limiting check so that this isn't called every time */ @@ -3873,7 +3882,7 @@ iflib_txq_drain(struct ifmp_ring *r, uint32_t cidx, uint32_t pidx) DBG_COUNTER_INC(txq_drain_notready); return (0); } - reclaimed = iflib_completed_tx_reclaim(txq, RECLAIM_THRESH(ctx)); + reclaimed = iflib_completed_tx_reclaim(txq); rang = iflib_txd_db_check(txq, reclaimed && txq->ift_db_pending); avail = IDXDIFF(pidx, cidx, r->size); @@ -3952,7 +3961,7 @@ iflib_txq_drain(struct ifmp_ring *r, uint32_t cidx, uint32_t pidx) } /* deliberate use of bitwise or to avoid gratuitous short-circuit */ - ring = rang ? false : (iflib_min_tx_latency | err); + ring = rang ? false : (iflib_min_tx_latency | err | (!!txq->ift_reclaim_thresh)); iflib_txd_db_check(txq, ring); if_inc_counter(ifp, IFCOUNTER_OBYTES, bytes_sent); if_inc_counter(ifp, IFCOUNTER_OPACKETS, pkt_sent); @@ -4032,7 +4041,7 @@ _task_fn_tx(void *context) #endif if (ctx->ifc_sysctl_simple_tx) { mtx_lock(&txq->ift_mtx); - (void)iflib_completed_tx_reclaim(txq, RECLAIM_THRESH(ctx)); + (void)iflib_completed_tx_reclaim(txq); mtx_unlock(&txq->ift_mtx); goto skip_ifmp; } @@ -5883,6 +5892,7 @@ iflib_queues_alloc(if_ctx_t ctx) device_printf(dev, "Unable to allocate buf_ring\n"); goto err_tx_desc; } + txq->ift_reclaim_thresh = ctx->ifc_sysctl_tx_reclaim_thresh; } for (rxconf = i = 0; i < nrxqsets; i++, rxconf++, rxq++) { @@ -6774,6 +6784,74 @@ mp_ndesc_handler(SYSCTL_HANDLER_ARGS) return (rc); } +static int +iflib_handle_tx_reclaim_thresh(SYSCTL_HANDLER_ARGS) +{ + if_ctx_t ctx = (void *)arg1; + iflib_txq_t txq; + int i, err; + int thresh; + + thresh = ctx->ifc_sysctl_tx_reclaim_thresh; + err = sysctl_handle_int(oidp, &thresh, arg2, req); + if (err != 0) { + return err; + } + + if (thresh == ctx->ifc_sysctl_tx_reclaim_thresh) + return 0; + + if (thresh > ctx->ifc_softc_ctx.isc_ntxd[0] / 2) { + device_printf(ctx->ifc_dev, "TX Reclaim thresh must be <= %d\n", + ctx->ifc_softc_ctx.isc_ntxd[0] / 2); + return (EINVAL); + } + + ctx->ifc_sysctl_tx_reclaim_thresh = thresh; + if (ctx->ifc_txqs == NULL) + return (err); + + txq = &ctx->ifc_txqs[0]; + for (i = 0; i < NTXQSETS(ctx); i++, txq++) { + txq->ift_reclaim_thresh = thresh; + } + return (err); +} + +static int +iflib_handle_tx_reclaim_ticks(SYSCTL_HANDLER_ARGS) +{ + if_ctx_t ctx = (void *)arg1; + iflib_txq_t txq; + int i, err; + int ticks; + + ticks = ctx->ifc_sysctl_tx_reclaim_ticks; + err = sysctl_handle_int(oidp, &ticks, arg2, req); + if (err != 0) { + return err; + } + + if (ticks == ctx->ifc_sysctl_tx_reclaim_ticks) + return 0; + + if (ticks > hz) { + device_printf(ctx->ifc_dev, + "TX Reclaim ticks must be <= hz (%d)\n", hz); + return (EINVAL); + } + + ctx->ifc_sysctl_tx_reclaim_ticks = ticks; + if (ctx->ifc_txqs == NULL) + return (err); + + txq = &ctx->ifc_txqs[0]; + for (i = 0; i < NTXQSETS(ctx); i++, txq++) { + txq->ift_reclaim_ticks = ticks; + } + return (err); +} + #define NAME_BUFLEN 32 static void iflib_add_device_sysctl_pre(if_ctx_t ctx) @@ -6862,6 +6940,16 @@ iflib_add_device_sysctl_post(if_ctx_t ctx) node = ctx->ifc_sysctl_node; child = SYSCTL_CHILDREN(node); + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "tx_reclaim_thresh", + CTLTYPE_INT | CTLFLAG_RWTUN, ctx, + 0, iflib_handle_tx_reclaim_thresh, "I", + "Number of TX descs outstanding before reclaim is called"); + + SYSCTL_ADD_PROC(ctx_list, child, OID_AUTO, "tx_reclaim_ticks", + CTLTYPE_INT | CTLFLAG_RWTUN, ctx, + 0, iflib_handle_tx_reclaim_ticks, "I", + "Number of ticks before a TX reclaim is forced"); + if (scctx->isc_ntxqsets > 100) qfmt = "txq%03d"; else if (scctx->isc_ntxqsets > 10) @@ -7109,7 +7197,7 @@ iflib_debugnet_poll(if_t ifp, int count) return (EBUSY); txq = &ctx->ifc_txqs[0]; - (void)iflib_completed_tx_reclaim(txq, RECLAIM_THRESH(ctx)); + (void)iflib_completed_tx_reclaim(txq); NET_EPOCH_ENTER(et); for (i = 0; i < scctx->isc_nrxqsets; i++) @@ -7159,7 +7247,7 @@ iflib_simple_transmit(if_t ifp, struct mbuf *m) else if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); } - (void)iflib_completed_tx_reclaim(txq, RECLAIM_THRESH(ctx)); + (void)iflib_completed_tx_reclaim(txq); mtx_unlock(&txq->ift_mtx); if_inc_counter(ifp, IFCOUNTER_OBYTES, bytes_sent); if_inc_counter(ifp, IFCOUNTER_OPACKETS, pkt_sent); diff --git a/sys/net/iflib.h b/sys/net/iflib.h index 3817445228d0..e65c936fc4b4 100644 --- a/sys/net/iflib.h +++ b/sys/net/iflib.h @@ -272,7 +272,7 @@ struct if_shared_ctx { int isc_ntxqs; /* # of tx queues per tx qset - usually 1 */ int isc_nrxqs; /* # of rx queues per rx qset - intel 1, chelsio 2, broadcom 3 */ int __spare0__; - int isc_tx_reclaim_thresh; + int __spare1__; int isc_flags; }; From nobody Thu Oct 2 01:37: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 4ccZDf6r3Wz69rln; Thu, 02 Oct 2025 01:37:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccZDf5w49z3d8l; Thu, 02 Oct 2025 01:37:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759369074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZDq5VYw3SokQ6vYwlvgFnHU2JoRgQiYELYTMFaQMhqc=; b=R79185g+5pbQCSB8+h8T9k/Pv9dCprBHp4c+BeSso5rjGaPkJ4LWi4sRKMlrYa0TYJgl2Q 2MX5Z/rwvvh2nobZg03twzN/s7EeFIBSqgMzyISyKuEoGE5HWrKhf1TLFaeZG3FhgdzsEf BkNZ6xsYP9F6wr77XbdxVPZ5CmUziWrMxoyXhhgvXy9aL5vxBcWFOa+vBCMuLtPJungOvB pcvwIr22bBP9uk9/OpP5klxJ9celZ+OItFsuVemB3uNW4vR7mGudJMn9GWFnF8xy6/j6Kf 9C8tJxy0jJtTtZDuQzwo3N1ATBU6i2J/t9wcxI78NBrWnOletPjgrl5KKEh/og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759369074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZDq5VYw3SokQ6vYwlvgFnHU2JoRgQiYELYTMFaQMhqc=; b=b04EEVtddFcktGOZW2nmdEBGw8f69cGpGPS8V0Kt03Pg4z8hb7M/AwT4hwdhX6oQZ8opKV YZHmmqbvQ3sgApuosdy9YgvoPUKvMC7cLmrxKvxPPn7KKir3FixXwAbKrS5VYhcExygs2e h+J+F57hM452ZYD3k6Vo8OBlqmexdWSFrKDkvDgRDO/dgdEi6efWtE3dQTGL+ISVi2Uqr+ gMq1HXVnJ9R6172sOr7l0+2ZIKpPnG8QNpqmbG+OJkjfLG7t/p8pVCA93l3k1rplz8TQpv nQEHFhkYSXB4Lwh5qwDlrIcNlerkDowYaq0PxemuCqZy2ts0ArMvE0se94fROA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759369074; a=rsa-sha256; cv=none; b=GlohRR1G2wVdcAlYQn/1j7kTSxxlfYVqFJw3TxneueEFBXI1glpbk020fHAhv7gWNJcbRX LzidTAH80djjt0c2EyK7h4dOhD6q7WAvHpBTEmmpVlJbBD8aVixEi9a7TimLbLYwB6RD1D 8sUFawfvH/BiOQnIp8MpHV8ml7o/+cH5X/5g6kIfXjY8WLX82otsTkvzxu/LNto4HLCn71 D/OT+pRnZI4ttEbZ6/bAKmpPrOL199xU6pecNGggPBnu31igIB4P7m0NsJxZrH/L/StxWU iHXGjkl/jm7qnBffIgmUsP7LfQP9R0cd/kFuMM9ZidbWorO65YkGgRNkTjTsmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccZDf5FPMznBS; Thu, 02 Oct 2025 01:37:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5921bso8035607; Thu, 2 Oct 2025 01:37:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5921bsx1035605; Thu, 2 Oct 2025 01:37:54 GMT (envelope-from git) Date: Thu, 2 Oct 2025 01:37:54 GMT Message-Id: <202510020137.5921bsx1035605@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 09cd3decf0fa - main - etc, ypserv: Fix symlink creation for pkgbase 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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 09cd3decf0fae4b769b04c1e900ed5935c40957e Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=09cd3decf0fae4b769b04c1e900ed5935c40957e commit 09cd3decf0fae4b769b04c1e900ed5935c40957e Author: Lexi Winter AuthorDate: 2025-10-02 01:10:28 +0000 Commit: Lexi Winter CommitDate: 2025-10-02 01:37:35 +0000 etc, ypserv: Fix symlink creation for pkgbase The Makefile logic for /etc/aliases, /var/yp/Makefile and /etc/unbound tries to avoid creating the symlink if it already exists in the target, but this breaks with pkgbase since the symlink won't be installed (and therefore won't be added to METALOG) if building with an existing worldstage, meaning it's missing from the generated package. Change the logic to forcibly install the symlink if NO_ROOT is defined, but keep the existing logic for non-package builds to avoid trashing the user's custom symlinks on non-pkgbase installworld. MFC after: 3 seconds Reported by: cperciva Reviewed by: cperciva, emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52834 --- etc/Makefile | 23 +++++++++++++++-------- usr.sbin/ypserv/Makefile | 5 ++++- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/etc/Makefile b/etc/Makefile index ab799b2f6c80..93d4b489ec7d 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -64,9 +64,12 @@ distribution: ${INSTALL_SYMLINK} -T "package=runtime" ../var/run/os-release \ ${DESTDIR}/etc/os-release .if ${MK_UNBOUND} != "no" - if [ ! -e ${DESTDIR}/etc/unbound ]; then \ - ${INSTALL_SYMLINK} -T "package=unbound" \ - ../var/unbound ${DESTDIR}/etc/unbound; \ +# If NO_ROOT is defined, we are doing a stage install and always need to +# install the /etc/unbound symlink, otherwise, don't overwrite the user's +# existing symlink. + if [ "${NO_ROOT:Dtrue}" = true -o ! -e ${DESTDIR}/etc/unbound ]; then \ + ${INSTALL_SYMLINK} -Tpackage=unbound ../var/unbound \ + ${DESTDIR}/etc/unbound; \ fi .endif .if ${MK_SENDMAIL} != "no" @@ -82,12 +85,16 @@ distribution: .if ${MK_MAIL} != "no" cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ -T "package=runtime,config" ${ETCMAIL} ${DESTDIR}/etc/mail - if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \ - ! -f ${DESTDIR}/etc/aliases ]; then \ - ${INSTALL_SYMLINK} -T "package=runtime" \ - mail/aliases ${DESTDIR}/etc/aliases; \ +# If NO_ROOT is defined, we are doing a stage install and always need to +# install the /etc/aliases symlink, otherwise, don't overwrite the user's +# existing symlink. + if [ "${NO_ROOT:Dtrue}" = true -o \( -f ${DESTDIR}/etc/mail/aliases -a \ + ! -f ${DESTDIR}/etc/aliases \) ]; then \ + ${INSTALL_SYMLINK} -Tpackage=runtime mail/aliases \ + ${DESTDIR}/etc/aliases; \ fi -.endif +.endif # ${MK_MAIL} != "no" + .if ${MK_SENDMAIL} != "no" cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ -T "package=sendmail" ${ETCMAIL_SENDMAIL} ${DESTDIR}/etc/mail diff --git a/usr.sbin/ypserv/Makefile b/usr.sbin/ypserv/Makefile index ba7eb1f86267..b4e59b719692 100644 --- a/usr.sbin/ypserv/Makefile +++ b/usr.sbin/ypserv/Makefile @@ -41,7 +41,10 @@ FILESNAME= Makefile.dist FILESDIR= /var/yp SCRIPTS= ypinit.sh -.if !exists(${DESTDIR}${FILESDIR}/Makefile) +# If NO_ROOT is defined, we are doing a stage install and always need to +# install the symlink, otherwise, don't overwrite the user's existing +# symlink. +.if defined(NO_ROOT) || !exists(${DESTDIR}${FILESDIR}/Makefile) SYMLINKS= ${FILESNAME} ${FILESDIR}/Makefile .endif From nobody Thu Oct 2 01:37: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 4ccZDg6QjWz69ryq; Thu, 02 Oct 2025 01:37:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccZDg5lGjz3d8m; Thu, 02 Oct 2025 01:37:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759369075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mjyPWqrDEXqTJM1V0DwzELRm4lI8nfvWsC7OOqFpqp8=; b=mlVyF88iENKBi6TwKkD/87Or1psFL1ZWQNlFzVMoVmk2SxWK4Zj8UqbVmzkQBGPTAsfr1J Ek6jOLivOd/DIul5/DvJKqxcI1q4BzJVoEIwR5nyChV2Pzbik6D/0e/KI6CDubcFyUsa5+ +gCLzetRGBbl208MbPuaxAsBj4ynuYkbkbFPZDaPA0q+L0t0Qgqy1vLqplp/hU9DDo4i/3 BmXt+k8SZhtDLm0pOvArnLo3P1qkEFwHi7aBeauJzlHecR7sRZbLDkBTq/RVkepFgVqg6w CZ593Z4mimfx82HEtAyfTk5G9NoHg1/ePvuFvvZ9LbWwl1G5YfIMIrybLUFXNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759369075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mjyPWqrDEXqTJM1V0DwzELRm4lI8nfvWsC7OOqFpqp8=; b=gfcavmR3WZ5BVGX2JUSMe9JrFcOfzBP6Gx5EDutaE+6+rYw60Fqf/Ce8bMyEpPaPoTxSwJ NM/dGJTD2X+WKSFb1OWRGs/GzvugrVYVHDjGgDYg0zd7mqPRwwA4xk64VTK9uXNqpfuw9Q AmfEaPg76GcTX3r8Fhe0WY57JomNecSfQiypJEeECyktIifEJ/+zZ0ICyhVLdsd50ULITM jee2H4EAKSgYSjuw0ezDwOpbc/mL+d7t7bVpb3OoofMh2RCGoeF31CR5Lt5jFGTiy24aWM ahf74mzneesQzqcqGmmLETKvkHIj/VyyP0tMmRQL0tJA0baRQnoCa82w+pl6CA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759369075; a=rsa-sha256; cv=none; b=n609KSPlvwOGm1CkP4C6i9dAkKVdorxYUgDbJoR4CudKfJdR+svuLvnb4ws/kX72q5l0uU RypI8bIradIZ+feL/taqm2cfVQqPprSkIZD6Pk/+Yd5R6wds+s6IIewf2GgetmIE+JABIM OfryX6qTmVwHPllUdbhYOlrKaUBfb0/Cv6G4PhI0kG3DE4rOihyqPU9p0EXGQkJBMjgmA+ 8t8KPAD7ekgyEjy8wHkbsxF2cqRubN/KkliPQHPDPGGhgbuyTH9EZq2a6lAlsy1y2cMX0P fOVBvQB1x7EFXdIvg4IiQJuS1pJpD+qtaQtMrcEBDrPWymO4IK3+mRpBphF0QA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccZDg5LXzznWq; Thu, 02 Oct 2025 01:37:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5921btdb035641; Thu, 2 Oct 2025 01:37:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5921bt7T035638; Thu, 2 Oct 2025 01:37:55 GMT (envelope-from git) Date: Thu, 2 Oct 2025 01:37:55 GMT Message-Id: <202510020137.5921bt7T035638@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 63ce00f5d0b5 - main - libexec: Move blacklistd-helper to the blocklist package 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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 63ce00f5d0b5dc34d57fb8d3969b875732c93eb2 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=63ce00f5d0b5dc34d57fb8d3969b875732c93eb2 commit 63ce00f5d0b5dc34d57fb8d3969b875732c93eb2 Author: Lexi Winter AuthorDate: 2025-10-02 01:12:01 +0000 Commit: Lexi Winter CommitDate: 2025-10-02 01:37:35 +0000 libexec: Move blacklistd-helper to the blocklist package Reviewed by: emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52830 --- libexec/blacklistd-helper/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libexec/blacklistd-helper/Makefile b/libexec/blacklistd-helper/Makefile index 50fd3b5c982b..d32b69c278a8 100644 --- a/libexec/blacklistd-helper/Makefile +++ b/libexec/blacklistd-helper/Makefile @@ -1,5 +1,7 @@ BLOCKLIST_DIR=${SRCTOP}/contrib/blocklist +PACKAGE= blocklist + SCRIPTS= ${BLOCKLIST_DIR}/libexec/blacklistd-helper .include From nobody Thu Oct 2 01:37:56 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ccZDj2N1xz69ryt; Thu, 02 Oct 2025 01:37:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccZDj0QnPz3d90; Thu, 02 Oct 2025 01:37:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759369077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2/xkm0x0zDkSqjnENnvqDXX+JHHDew//wP60DntJXGg=; b=xFMsoy/LErsrlgXdSjhw8LD/5VvOu2gbazQlcXUiqVewl486F5NRgaQo3D5ce41jYXTC59 Cv1/0YWig0IN6McOgJucYIm1FNd2nqBi3M0hDUrxd5GG3UTYJ79dNNrM0otD9r+MtPspGs inCFO7pm0Kody9/rUYsWczgiZvVBjOIq8ZhSAIG6VfjcP8ZIU91Q7+oF01aSZwoUl8Iluq tk9JvD0yV+agEw2r5a3vD5gZ1o0dwrgKUhijJFC8ZLiJPaR2DMe4p8dy2QjfigisHkv0Kk 3stYp/YakjLo8tdxA5TLnsxt32OljV2gTw+0vC/xYsv0fCBd0+DpBw6mrYxQ3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759369077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2/xkm0x0zDkSqjnENnvqDXX+JHHDew//wP60DntJXGg=; b=HzwA1AzQ0CE5yJsKMLpXtt257/bmcTcjeieSiMTMQkYbH/FA1lpGbpwESSMbfPl6xgSBwg ODhDcrYjzWisQ2dwhn0eojuMr/ART1KHD+s+S9DKUfnCxmLRYluHFdfW/33fFZx2YXJS+U fp58qqcWy4oP/iB8ufnsTKGKZXTJUDgJuqRjDZ7copc5x84W5j44xWX3nEMzqMvgkCYYI5 nPMhwYguxoEZASLXk3qgc+DKSTnuvCMlZcVzSn8kqIxZDU2N2+pSwXd6Qg/KNh5QqoL4se o3Ec9RQNtrd0rE5O4SGopBil9NJ+8jLgz2HtlWSE0sOJS2+iTqI6JHc9D6DtQg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759369077; a=rsa-sha256; cv=none; b=IU644l17PQKUg0gr01YEiHC0P7OxMXqYsdSPx3cdLCLOvog9k0q3Sl8/uEiIxLNpY7N9ib lA+cWvSbBPbHaCOT7zGAfxs+/UUMRtco9+IQLj98DgDilzgDomi8CP78l/V8aRVpgBorIm NBgig0mO1zLlLc60fyXuqWaOiLxvPpmYkZGui4oJ9P+6gqdbLuIvfADtu0qIOu4XEaC+zb ZpyhNGWQSRp7m6RmbWqWUvA/eVEPJMz1V7aRUwIinYZjsgc/OWePf4HCd/FDwHzHQP0SRQ zceJhiwbHSvLGILIVTb+gYTnxxsg/i1Rnc4Gy9i4diAHAjTGd3Mm4dtcu+ECUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccZDh6KDYznWr; Thu, 02 Oct 2025 01:37:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5921buGh035681; Thu, 2 Oct 2025 01:37:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5921buv8035678; Thu, 2 Oct 2025 01:37:56 GMT (envelope-from git) Date: Thu, 2 Oct 2025 01:37:56 GMT Message-Id: <202510020137.5921buv8035678@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: ed6716207deb - main - bsdinstall/pkgbase: Restore the kernel-dbg component 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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ed6716207debca81c37a1399ecf1d799be0e688d Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=ed6716207debca81c37a1399ecf1d799be0e688d commit ed6716207debca81c37a1399ecf1d799be0e688d Author: Lexi Winter AuthorDate: 2025-10-02 01:13:56 +0000 Commit: Lexi Winter CommitDate: 2025-10-02 01:37:35 +0000 bsdinstall/pkgbase: Restore the kernel-dbg component Commit 561dc357c2f5 changed the way we handle components in the prompt, and accidentally resulted in the kernel-dbg component not being listed since we now hide all components ending in "-dbg". Add an exception for kernel-dbg to bring it back. Fixes: 561dc357c2f5 ("bsdinstall: Use package sets for pkgbase install") MFC after: 3 seconds Reviewed by: emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52826 --- usr.sbin/bsdinstall/scripts/pkgbase.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/pkgbase.in b/usr.sbin/bsdinstall/scripts/pkgbase.in index d02d89b23865..14ef67723d59 100755 --- a/usr.sbin/bsdinstall/scripts/pkgbase.in +++ b/usr.sbin/bsdinstall/scripts/pkgbase.in @@ -117,7 +117,7 @@ local function select_components(components, options) -- are only offered if no_kernel is set. if component ~= "pkg" and not component:match("^minimal") and - not component:match("%-dbg$") and + not (component:match("%-dbg$") and component ~= "kernel-dbg") and not (component == "kernels") and not (not options.no_kernel and component:match("%-jail$")) then table.insert(sorted_components, component) From nobody Thu Oct 2 01:37: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 4ccZDk2rvZz69rqd; Thu, 02 Oct 2025 01:37:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccZDk0XySz3cx3; Thu, 02 Oct 2025 01:37:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759369078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9vEeSTVoieyPZWHwOYRtviBaxePtAL3M38llhN7rtHk=; b=rp6unSfUBl74yOPwdijB1YHO9r2LdjUIjhmO3FWFkwYjjcnkTsP0U7wyVrzzXhWwRAFAOQ cVI6luIKUEHIAauyUuIXL7GMcSr4xocDwL3A8u0aaOuCSTDiWzl0bKjQGk1lWYffKJ/V0z wTwSO5U97a35rtHrW3ttOuyfcxaiFBUrxyRKuv3Rqb4jd0Kc3P4w7w/A6JF8GpO+UIQ3Nq AnUIcVwryNvjtqZu6pk47EZAG19hBHvdyQcjHBY9Qv5NkgN7HX4Nz6Nwzyehl/2RCxzFbS 2NfQUPEVhhXaAnO01/nuy8sBFcu3ub+0V4qV9Ujj2pJZSX3V2NCUVy5oj1VXKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759369078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9vEeSTVoieyPZWHwOYRtviBaxePtAL3M38llhN7rtHk=; b=vujbOk4pMuTwsg8UCTOUulo+mcE4ZO7kwjWhDYFZ0A0Y5lTIU9v9IvPmOZySj7nW9EzAo8 xv6kjPx7Yd2lgqk/yEZaNTczP1F3mxGAKdE0zHDlD9AhC3g2arFB9NTY5BGcRoo4t2I27l u0/YkHFkL0BY4O9dhW3d1Nj+LnSITPZWN2dJxVHte49mdJ3zliQJmjo0y5BQpMlI85c7Nc A/7lT6hmTquagB9uniah1oH48qc9dIFKF7BLztp4O1z4DCaL4dfZpni2O12d9d25ftlYfs v+Z/9486jUVRlJtZ2Q9CsOSMf49uzoXeL6lP5DoKtQFnfxOowc8fD5C+UjJjHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759369078; a=rsa-sha256; cv=none; b=qe0gZgk55KVkgJRxUBeHiv14v+kr5mjI/vwR+QJheAU2x/Btff+xelgxVejrxlJeg252x3 OgPMX9t+r50K+Xz+O6lmgxS3U3khfN1V5UJD6DBTXv5DHpb/N7kLuPG9ZgdfQzrwvZmK/w dbNu0g8RIS1gq4hwGDI9/r3atRySlUMKrwp3V/UJVVcI/WVKfFKLiDBCrP2GpPnSur7RA4 nf8Z9n3IN83hcwA2UMkm4HsJreXz4R1QA5vAEhF+6LnANMaf/aF2hPwArWD/QvqP1YORji +55xvsp6k9ZkKXy/Nl2r/vRGKvbiSEhfp1b25OHc534O3tEV7GtzLwK2MOK8lg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccZDk01wXznTD; Thu, 02 Oct 2025 01:37:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5921bvOt035715; Thu, 2 Oct 2025 01:37:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5921bvZh035712; Thu, 2 Oct 2025 01:37:57 GMT (envelope-from git) Date: Thu, 2 Oct 2025 01:37:57 GMT Message-Id: <202510020137.5921bvZh035712@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 1b806e607f52 - main - packages: Add a sound package 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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1b806e607f52285f973fb1106491668fd28da6a4 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=1b806e607f52285f973fb1106491668fd28da6a4 commit 1b806e607f52285f973fb1106491668fd28da6a4 Author: Lexi Winter AuthorDate: 2025-10-02 01:16:11 +0000 Commit: Lexi Winter CommitDate: 2025-10-02 01:37:35 +0000 packages: Add a sound package Put virtual_oss, /etc/devd/snd.conf and the other audio-related tools into a new "sound" package. Don't create a separate -lib package, since it's unlikely someone will want mixer(3) without mixer(8). Put the sound package in the optional set rather than minimal, since it's not actually required for audio hardware support, and many systems (including nearly all servers) won't want it installed. MFC after: 3 seconds Reviewed by: christos Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52823 --- UPDATING | 6 ++++++ lib/libmixer/Makefile | 2 ++ lib/libsamplerate/Makefile | 2 ++ libexec/rc/rc.d/Makefile | 4 +++- release/packages/ucl/sound-all.ucl | 42 ++++++++++++++++++++++++++++++++++++++ sbin/devd/Makefile | 7 ++++++- usr.bin/beep/Makefile | 2 ++ usr.bin/mididump/Makefile | 2 ++ usr.sbin/mixer/Makefile | 2 ++ usr.sbin/sndctl/Makefile | 2 ++ usr.sbin/virtual_oss/Makefile.inc | 2 ++ 11 files changed, 71 insertions(+), 2 deletions(-) diff --git a/UPDATING b/UPDATING index cd7568885a26..4460898fca2d 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 16.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20251002: + Audio-related utilities including mixer(8) and virtual_oss(8) have + moved to the new FreeBSD-sound package. If you have set-optional or + set-base installed this package will be installed automatically, + otherwise you should install it manually if you need these utilities. + 20250929: Both drm-kmod and nividia-drm ports had to be updated to either no longer conflict on LinuxKPI vs. native PCI changes and/or to keep diff --git a/lib/libmixer/Makefile b/lib/libmixer/Makefile index a0bb37a85fb8..49621ad1f188 100644 --- a/lib/libmixer/Makefile +++ b/lib/libmixer/Makefile @@ -1,3 +1,5 @@ +PACKAGE= sound + LIB= mixer SRCS= ${LIB}.c INCS= ${LIB}.h diff --git a/lib/libsamplerate/Makefile b/lib/libsamplerate/Makefile index 6ca87d8b20ca..4c55d5c2cb82 100644 --- a/lib/libsamplerate/Makefile +++ b/lib/libsamplerate/Makefile @@ -1,5 +1,7 @@ .PATH: ${SRCTOP}/contrib/libsamplerate +PACKAGE= sound + LIB= samplerate PRIVATELIB= diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile index 4f2d63c06e19..03f0933533ca 100644 --- a/libexec/rc/rc.d/Makefile +++ b/libexec/rc/rc.d/Makefile @@ -216,7 +216,9 @@ CCDPACKAGE= ccdconfig .endif .if ${MK_CUSE} != "no" -CONFS+= virtual_oss +CONFGROUPS+= VOSS +VOSS= virtual_oss +VOSSPACKAGE= sound .endif .if ${MK_KERBEROS_SUPPORT} != "no" diff --git a/release/packages/ucl/sound-all.ucl b/release/packages/ucl/sound-all.ucl new file mode 100644 index 000000000000..6a8ad098c6b1 --- /dev/null +++ b/release/packages/ucl/sound-all.ucl @@ -0,0 +1,42 @@ +/* + * SPDX-License-Identifier: ISC + * + * Copyright (c) 2025 Lexi Winter + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +comment = "Audio utilities" + +desc = < +PACKAGE= sound + PROG= mididump SRCS= ${PROG}.c MAN= ${PROG}.1 diff --git a/usr.sbin/mixer/Makefile b/usr.sbin/mixer/Makefile index 9e96c2f2d2e8..6c75e65d2a9b 100644 --- a/usr.sbin/mixer/Makefile +++ b/usr.sbin/mixer/Makefile @@ -1,5 +1,7 @@ .include +PACKAGE= sound + PROG= mixer SRCS= ${PROG}.c MAN= ${PROG}.8 diff --git a/usr.sbin/sndctl/Makefile b/usr.sbin/sndctl/Makefile index c1830413f931..d6697bb88fd5 100644 --- a/usr.sbin/sndctl/Makefile +++ b/usr.sbin/sndctl/Makefile @@ -1,5 +1,7 @@ .include +PACKAGE= sound + PROG= sndctl SRCS= ${PROG}.c MAN= ${PROG}.8 diff --git a/usr.sbin/virtual_oss/Makefile.inc b/usr.sbin/virtual_oss/Makefile.inc index 01b5f23410c8..d2b0d74fa8c4 100644 --- a/usr.sbin/virtual_oss/Makefile.inc +++ b/usr.sbin/virtual_oss/Makefile.inc @@ -1 +1,3 @@ +PACKAGE?= sound + .include "../Makefile.inc" From nobody Thu Oct 2 05:40: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 4ccgdL3KMJz692N8 for ; Thu, 02 Oct 2025 05:41:10 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic303-23.consmr.mail.gq1.yahoo.com (sonic303-23.consmr.mail.gq1.yahoo.com [98.137.64.204]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccgdK0tqwz44xg for ; Thu, 02 Oct 2025 05:41:09 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=hthQ69hZ; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.64.204 as permitted sender) smtp.mailfrom=marklmi@yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1759383662; bh=zq6OjEqkQt41mCbX5mL7cK0ebiST7EmGfb71O0RZvdw=; h=From:Subject:Date:Cc:To:References:From:Subject:Reply-To; b=hthQ69hZkDJe4GUfS3zuz3rYtbcVLr7kjg4plfscHQIrnCSzEhTJF0lFwY7CSqUrJBrWN8lc+GLwRbb3Gw4B4o+PQGdmC02EKqZoK7XFaCQY9ds3pQC0iYdFeC+CU8ovJTJs6v3VvIKSBdPjzT+OI1dOAD9zVIYbe7qu5kM3YZBvNWvPqOwzQcYukEGAI27E3phwh+naK0XEkSVlIwyvoQW74igqwUGGgRlxnbn3Q88xzbLYTp4TKibovAHJ3BozbrpPYzjgWINGGeUthPtMCxXPL5Z9qbKcyaYUBQF4ZWjulB2lgImiC7YL+IFmNC1jraIIfYabEK1XUIHsm84AaQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1759383662; bh=cqY5RBdw/JI4rhnC7Ao/E1+8av49dNlhlgBLDqUlfrb=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=RNXjSQ69cjPTP3H8aJvawqjpEpumMNxLBQjpbZpN4V8MlJCz9FAlmUurY+2HEAHGfl/xfFWOYPOacwsAbkm0PP3U1h4pfAaQH31fMFHZWIj+spE3RQHVuglob2bmMFihJdM4t/CBw7mSAGPfxL0foiJc0Fbtlh2HzuKaXpzvuawtxTmHuUwrlmbUfqWHSU5+IAKZQPWzDLzmCw4H0tULNqhAqJzRsNCpMDHoa8n0OZ+l6d5J0t0TPn1rNOcaX749F9u7s2+X2faWq2Jtg4H6IpzWKzMT9UGOF+zKk4LT0B79z6kFpUoS2MyVvmxiKjlvDVQl2t29IRpxNV+wNnA9lQ== X-YMail-OSG: xKEweOYVM1km.2JqHthTk5kFdvp3m6QGybFPcGMayiO8ajOgBCWBjB8A22g1c0k PYI39nCY4T66lU.aNH0jt4LKNBpmyYgqGYCZkq8wUmTgm06bfQjrD31ewz6db_Jn5V9JF9z.i4Dh R9UIm_Ft7JgBh54sZtCwgSa5sjru0w58jGn2ORubAGzZdADbCcgZdlah8kbmwhO7FV9UIu7XBbjK CZP4no5Gq4U.jTyYVne5NvZGca9wlKxvN_psRC77_3iBDifVBPk08_DY5CL5BUk26mR51aF04nlU cLhfA0.12.ior5oGlt6UWhPkJVtlakNCQtFcY2Csf5VSfGuKhCwEkvBNUUzD1ZzT40.CHHk_68Yz 7XjyHSYh5J37PKK0UotfDXMPgRGq_tEwvrCjkzP99mTGFo3iwQ.4lNxC2GCYcbJkEu8zD_BPs8HT fjfdHMIacMlt0FEhZ22KNfYhmQU3C0cvh9chrO1YE3nuEPaFUC_QdqrXqXROC8QzfwOgfOybS_l5 GbwWk.sEiYBTUWbGbwY3.cN75r_IEqQlXT4mh0rbU03QR2kamUvvWhsXsnSrQa8HtOgKu8ic57K6 iaRfDy9JSAcERRao3d15OkqGFYPfuBTkqrsiKec9dS8U.oQb0HFVWSe0PshPUJkSY6seiEE4q30h jof3q5iKO8aov0S3CFije0eG2MAHKvJDbS3PKDrUHNAvNvyvVZxWVAo0S2D3R.Uisnm8qtFpZc64 lM80pC4v_Z1NkUbFiIxFOoxdmVJsPJWec3jrkUIMcRy0XKzc4nZdgzSZhxGzlLv4Tt4Ucm98l5Fm 6bchVYByzMFkdvMCamU.1xjyYo52ZBr1MSTwVzBH1ri0lqAI069r6hA74oZz2lU5cwMbSRIcJu1F adkATyepxrH9zydPmPUh2xvuCudsm2JJgB_KUxHVdE593KW5RJlxANJsEPPX3R7jpFsmn11kb_6U HMOj97VzsbLFNgKl9YStja955MrNe2cD3il9yvCF04gPzyMFJDmsa_S7_ZGOcVTFkQTYpbeXJDGX wN3fMx5sBQqBdTKNqWHTZDYIq.1A7Dgv27B.Hxu4GMdPVKXbwDjBkrEbrtswi6dVwbtKOcAnqeyQ iQavAYXe3_EYyWiY3enBCzOksqecCUAMCGAue1zVulb7BjDBlFq6qaDxiCqSmBKIq5RH71CZGrpW tOwj_qKmz0Z_ZMX4zZsym4vTWV_SA5jSCOpYf2iRN9rPJ2W5MkaR_PzK67aGKgwPvcsptHUDjXeY 2n4Gv5K0SlZFRkTjiLtDtUiNBFb.QeT.6TH8Nx3a0KIrVZJqzUSsUbxvHIK3lcI8A3UXyiRn_Ysc uH2RsMKHGrH4qDgqTPEVQvbz7nnRBqRFz71yCESFNTh20ciODf874nyikZmawYcg3eP2LP19J.WQ yRUQbVG2R5uzSj5Ml6nhXrn_pGgTDaW4xfr68TJy1DDfmconUlWNBgBQNMpytkz6wz_ha61YjRAg axch4MJJVZCK.1XVidQIPn.bpLNuAJPnoTRLMQ0OTuw8CwDYxgJXQUcrVFx02l13szth9S8ipPrC 4c9XPZg4.4DhXOf6NED8yPi2b_L.6GWruzBvSB.W5iDg4Rgpj93D2Y9p8ZdZUlaiirLqJME.OXHV _et6esOUXeSDxe7XZA5_TzTwPOBQNoFVhVj9pILbjbYIS_p.yzFLpCWDaol.RFHVdr2AFQaHoxx. Nrwv0imekKPFAdDJgjnLN7R6Z1ebOIDSR5nDazUXpGv5PID5ZeXWDM7Z4E5W2yeP6UeqiEFA6Z13 wvdF1wEn0rUNGbwLQwfGJjd3oal7A_YtKIKtfgUTxrXxqp6q04D3Ob0P80jD1UVQPVxhWzZpltpz Cl9zDqXk5Z.pLEfvqi9nGJvsGgOmTQanx5LtDVnkYyejZyK2NyqnjIh_m3_nXPE5VeoqWeC.Xj.C ibaBW1LgZYC78anVOLIUyf5y3MW0WFbqJpREKhVKDTPy8dCM0ZYxthfOShQPugoa5FNGQdHaqf87 54HyZNyefkUNZ2Qhf5PSm7UYx3E_lPB_sTBKON3fmMzk6ukD0j6agytIrRAnlefx5mZ_uIBeQaqR LlFxlnW98tqneDOPXG9DmpecQuYAsyEl2ea6UU7j5aSaboFiK7zViSE471q6A4Hf_oX6d8GwsQIb whAOrexFY9gXoUfPse4UFuqg7EybnUOesdsp.92HINICR10nN_KrYCjHTJtKec1XHfxgbNt22m35 x.laDDKRhTLCVejwZ0pD7HV9bfa7i5_WpBHdonu4U6hhzcCMTitSq6Cr.F8.m7kyO.rcLFitaxHv JwqCyEDIU_qhsFDGmHaDupWVDzw-- X-Sonic-MF: X-Sonic-ID: 282c65dc-a7b7-47ad-8fe6-fa5e69d2d0ce Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.gq1.yahoo.com with HTTP; Thu, 2 Oct 2025 05:41:02 +0000 Received: by hermes--production-gq1-66b66ffd5-sxgwb (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 65a5c940001b5c8c2bacef0c716d5f31; Thu, 02 Oct 2025 05:40:58 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: RE: git: e7258c42520c - main - diff3: Move to own package Message-Id: Date: Wed, 1 Oct 2025 22:40:47 -0700 Cc: Lexi Winter , Baptiste Daroussin To: "emaste@freebsd.org" , dev-commits-src-main@freebsd.org X-Mailer: Apple Mail (2.3826.700.81) References: X-Spamd-Bar: --- X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ARC_NA(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; TO_DN_SOME(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.204:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; APPLE_MAILER_COMMON(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.204:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim] X-Rspamd-Queue-Id: 4ccgdK0tqwz44xg Ed Maste wrote on Date: Wed, 01 Oct 2025 13:24:51 UTC : > The branch main has been updated by emaste: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3De7258c42520c18c034f644b97377d8d2= a0ad8b7c >=20 > commit e7258c42520c18c034f644b97377d8d2a0ad8b7c > Author: Ed Maste > AuthorDate: 2025-10-01 09:28:56 +0000 > Commit: Ed Maste > CommitDate: 2025-10-01 13:23:40 +0000 >=20 > diff3: Move to own package >=20 > diff3 is the last remaining GPL-licensed userland component. Move it > to its own package, so that it may be excluded if desired. I am not sure that this achieved all its hoped-for goals as things are. Using a delete to show dependencies (for a main 16 context): # pkg del FreeBSD-diff3 pkg: Warning: Major OS version upgrade detected. Running "pkg bootstrap = -f" recommended Cannot solve problem using SAT solver, trying another plan Cannot solve problem using SAT solver, trying another plan Cannot solve problem using SAT solver, trying another plan Cannot solve problem using SAT solver, trying another plan Cannot solve problem using SAT solver, trying another plan Checking integrity... done (0 conflicting) Deinstallation has been requested for the following 6 packages (of 0 = packages in the universe): Installed packages to be REMOVED: FreeBSD-diff3-dbg: 16.snap20251001134546 FreeBSD-set-optional-dbg: 16.snap20251001134546 FreeBSD-set-optional-jail-dbg: 16.snap20251001134546 FreeBSD-set-tests: 16.snap20250916221226 FreeBSD-tests: 16.snap20251001223513 FreeBSD-tests-dbg: 16.snap20251001223513 First off, the delete is not trying to delete everything that was requested, just some of it and related stuff. But, using the -dbg references to see some of what requires FreeBSD-diff3 to be present: FreeBSD-set-optional FreeBSD-set-optional-jail FreeBSD-set-tests FreeBSD-tests . Was the intent to allow, say, FreeBSD-set-optional* use without FreeBSD-diff3 needing to be involved? Note: In my context, all of FreeBSD-* is not-automatic because of how I install and upgrade. > Reviewed by: ivy > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D52810 . . . =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Thu Oct 2 06:59: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 4ccjN11pVgz69BNC; Thu, 02 Oct 2025 06:59:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccjN11KBWz4DhP; Thu, 02 Oct 2025 06:59:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759388385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u/yl8iH5cDpGbhfwpEcaEUUuL3NEfairiDST/oBnsQw=; b=iu/gjss4+NnJNk09vdBL5aldrp2+3OFPm2bzUFMoc8EW0xpts/pTGtTQIC7ANPgcJenJdb K7vtRgF/cQgf59gQ7lDsr+HKZCrkDA/raQ4rdP3VS0vYQ5VFnCHDPRhr8JUVAUI8cpZPLU VNQIkV7BdjWspvcsiLGQMykgSbDWMuZ4TQHiX/VTY6USUK/ST87ijv8XgdFRIdWx+BMkUY 3tNNqIAUEiVCu1qzzN6dGX8XK7yTGTnPE13HycI85V0kDEmwdRIdoCNgwAMsuyoIosPPJx nEo+A9MYvZDpaQ2MNv3OLao5/Tq41czj3hsm7JShojkREz/7H+93dujRi5VsXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759388385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u/yl8iH5cDpGbhfwpEcaEUUuL3NEfairiDST/oBnsQw=; b=BQcRs/+ti5MP180m0P+o0I8x7L0b51O65W3ne7KJcUpxBTjEHNzimavj3KAONuemaSO5Oy S9CSxAAVYfN/XshqGKQgWFw9EP81ppuA6HBgoawPhnMWPJc/zty/xWgl2w3XrEgkzPss7k ieqOa6SLGV7bSGwqeIeeAwGSkfT+1fcjs+cAlGLj6MEgG2ptb36+IG9fewYv/o/Psd9cDn VaSVUjnh/WUbk6NtsNVZZPYryMGaQWu3UlRsd1TNCtFSjnXIKggpdBYDT54f7Ccrg8GB6N B8ngy24qwIfaCtCw564VTEb3zDr6/ruWBSkU9otupyKgkD6QH0Y669Iq8qlcVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759388385; a=rsa-sha256; cv=none; b=nzeEwv03uH/vHnSuVQpzWr4Mts58TRewuIajtmfvy9G9hJK3xE8ZPaa9OxLdpqEo9lo8v0 n/h2oR8EftafJkIZ6OsZeGYhWoqOuB+FfejDENbpgDHTzsncNrvF23URndDRVOqINlsTje 92aEZ40aBcm/1VhrXtqgn5Ru+YOIwZb+e8LF+eLxQr1K2e49zle2jWawqVLPGUeHLZDvTj zu5DBHp1UzI624XJJjWT1c01nue+4LRKcIr5OK/fGsESJk0u/VxyVqrdMYLMI7UiviY332 O5qP9J/FaV4e8rs3DB1G3YSnvzr6xWxsWjLwCn9x0jDo7GPfnk6f/dg8PCUo3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccjN10NJJzxVX; Thu, 02 Oct 2025 06:59:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5926xisA057380; Thu, 2 Oct 2025 06:59:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5926xioJ057377; Thu, 2 Oct 2025 06:59:44 GMT (envelope-from git) Date: Thu, 2 Oct 2025 06:59:44 GMT Message-Id: <202510020659.5926xioJ057377@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 7841b44f8491 - main - tcp: keep SYN-cache entry when sending of challenge ACK fails 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7841b44f8491d69c75207d0f3a1eb34501d99edd Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=7841b44f8491d69c75207d0f3a1eb34501d99edd commit 7841b44f8491d69c75207d0f3a1eb34501d99edd Author: Michael Tuexen AuthorDate: 2025-10-02 06:57:14 +0000 Commit: Michael Tuexen CommitDate: 2025-10-02 06:57:14 +0000 tcp: keep SYN-cache entry when sending of challenge ACK fails Don't drop a SYN-cache entry just because a challenge ACK couldn't be sent. This might only be a temporary failure. Reviewed by: Nick Banks, glebius, jtl MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D52840 --- sys/netinet/tcp_syncache.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 518cef66e7fa..778ab0583735 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -122,7 +122,7 @@ static void syncache_drop(struct syncache *, struct syncache_head *); static void syncache_free(struct syncache *); static void syncache_insert(struct syncache *, struct syncache_head *); static int syncache_respond(struct syncache *, const struct mbuf *, int); -static int syncache_send_challenge_ack(struct syncache *, struct mbuf *); +static void syncache_send_challenge_ack(struct syncache *, struct mbuf *); static struct socket *syncache_socket(struct syncache *, struct socket *, struct mbuf *m); static void syncache_timeout(struct syncache *sc, struct syncache_head *sch, @@ -695,10 +695,7 @@ syncache_chkrst(struct in_conninfo *inc, struct tcphdr *th, struct mbuf *m, "sending challenge ACK\n", s, __func__, th->th_seq, sc->sc_irs + 1, sc->sc_wnd); - if (syncache_send_challenge_ack(sc, m) != 0) { - syncache_drop(sc, sch); - TCPSTAT_INC(tcps_sc_dropped); - } + syncache_send_challenge_ack(sc, m); } } else { if ((s = tcp_log_addrs(inc, th, NULL, NULL))) @@ -2061,22 +2058,16 @@ syncache_respond(struct syncache *sc, const struct mbuf *m0, int flags) return (error); } -static int +static void syncache_send_challenge_ack(struct syncache *sc, struct mbuf *m) { - int error; - if (tcp_challenge_ack_check(&sc->sc_challenge_ack_end, &sc->sc_challenge_ack_cnt)) { - error = syncache_respond(sc, m, TH_ACK); - if (error == 0) { + if (syncache_respond(sc, m, TH_ACK) == 0) { TCPSTAT_INC(tcps_sndacks); TCPSTAT_INC(tcps_sndtotal); } - } else { - error = 0; } - return (error); } /* From nobody Thu Oct 2 07:27:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cck0S2q4qz69Db9; Thu, 02 Oct 2025 07:27:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cck0S2BxPz4HNf; Thu, 02 Oct 2025 07:27:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759390072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wPKeSjAKBth4louHs4TLDnpWNyqx3w7K33mdF1nmkdE=; b=sliYsQqPCGh90UyCDXpNpjwDFbbJYuFq2Y4T/qadSFNfaTenwQ7a7TOIJ888PFt9inbWs9 dLVSRj050wgPIgdxJjz0TNtq89x/xeZeX0DU5G4J1unUJcSor3o/D8EmQUwNozTyZw/DF4 mRuk9b36T+6NeDyhQkf91tO6zNFVZH11+kHh13y27rDF4L4Wl2h6gy0OpwnTaRue4wjdA/ hMjyh+1ciJi81AjNKG3Z7jUfoF0HOatlj7JiZsPrfRVNev32RlFq8wJ8cTcSiEWc9VWr3V FvwKnxKGY0RBg6cV3aIqb6+SZW7WXeV/W9msMQ9IPmv7KDHuw96hOWG+rMEYDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759390072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wPKeSjAKBth4louHs4TLDnpWNyqx3w7K33mdF1nmkdE=; b=AUcHEJrVKMExYf1q8U9YSxNPV1dJouBHZMKVR6IIg3tnRh+c2nVEtLsOGe6gUgm95veo+J keHYHB4fzfu4uK0r9OeBSFSUzj/3ZId0N98a84I5kOYN+WzNQg2hOe6mJLQuTvJFwSzHA5 ZDJr9ysr8Mw9MB4cOjmm4jr7fKNYXpKNhSbPS/Yy2E4Lgrl9DvMgl3lpoJhXfFJvlnwu/H Af4570JnNj48p2Q+Ajd+2gFEyPQgmrPcdLbMEmz5b0mE7wrnIkmKhXEXu1dF/f5FbYchHH mOXTtmiuqOEgVrzQMYmwZEHxpRSr0QYK2s27m+5xgnSq42mTGMXUENsDWr3FKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759390072; a=rsa-sha256; cv=none; b=uDP3zXXzV2vUEo+YllxhRMdWhDjzFpK+JqED59PKmDVC5bz3xFoGsutCFHJheeNECVkC7D UW1m1TxQ7hiKLv7NmZD/DrnFtzEf6wyBmG7No3u8Mg7vFftt2YlFGofcWmvaNzpdgF6FNv BethKqkZjoslqQH7rnfN2zlKMbVlI2dKKvlbjEBTEUVlqjG5REoAut2kYRmqx0z+MIgprP goLHJk5lCez/bhPWoiFVpfe6VinS8IaMGPP46OKln8oxRlGs2O4EGm3LS6Xvxlp/C/yzVt yvMkQaY/v6yOdylZ1/oWUI5uSpYPlqYDpLbQeOis0eZAW6N2vBz5g4nJmwWvRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cck0S1WjpzxwD; Thu, 02 Oct 2025 07:27:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5927RqUi015209; Thu, 2 Oct 2025 07:27:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5927Rqr8015206; Thu, 2 Oct 2025 07:27:52 GMT (envelope-from git) Date: Thu, 2 Oct 2025 07:27:52 GMT Message-Id: <202510020727.5927Rqr8015206@gitrepo.freebsd.org> 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=B8rgrav?= Subject: git: e98d3416916c - main - nss_tacplus: Fix typo in Makefile 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: e98d3416916cdb6285d4d1807582baf6faa3ddcc Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=e98d3416916cdb6285d4d1807582baf6faa3ddcc commit e98d3416916cdb6285d4d1807582baf6faa3ddcc Author: Dag-Erling Smørgrav AuthorDate: 2025-10-02 07:24:52 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-02 07:27:18 +0000 nss_tacplus: Fix typo in Makefile Reported by: ivy@ MFC after: 3 days --- lib/nss_tacplus/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nss_tacplus/Makefile b/lib/nss_tacplus/Makefile index f39788cfbdea..a969cd85778d 100644 --- a/lib/nss_tacplus/Makefile +++ b/lib/nss_tacplus/Makefile @@ -1,5 +1,5 @@ LIB= nss_tacplus -SRCS= ${LIB}.8 +SRCS= ${LIB}.c SHLIB_MAJOR= 1 SHLIB_NAME= ${LIB}.so.${SHLIB_MAJOR} LIBADD= tacplus From nobody Thu Oct 2 08:25: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 4cclGY752Jz69L9g; Thu, 02 Oct 2025 08:25:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cclGY6WxJz3GsG; Thu, 02 Oct 2025 08:25:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759393509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vQcN5EFWma02IQCyUQl+/ZhbfDs+l/AEb9uBDCq/xNk=; b=W0lJrIuOUQcLA1haI5ArBaqslmClA1fhtdHBlD9JgSoaFReX9obUX6lbrvqzmNMwaqf5Mf 8n70T7LRgtwzYkLTbobMUDJ7NVxr5j2tdwTGVpiNsChMePFPkAaaAdl65JZONnDSku73cX qVFRjqUvx6ZKsyVIx7TU7ZqngoPqjJp6PyEmw/CMzkrsm8wQ1BNizeNl3oT1GTXMWEOzrr 93tNK453EbbhFHxscaqqd6QP5rUZFA5Cf7RswwAo1v1CgH95octMN0+xyxrXuoLga7Hd68 26uzmpGch7eemrdHLzbxXhmYS86neo5mWxghyzF08zJ/kq0XRm5KoiMg3UNF8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759393509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vQcN5EFWma02IQCyUQl+/ZhbfDs+l/AEb9uBDCq/xNk=; b=VSgvXbZTrSZzWnOvs6RrL03jhp3Zq7x5a1U0Lw139gZNueqqOko/9CROpWfB6lyXbL/Dhd w9hckhUN+Y6Nvd9Y8y2ph2ES6U1s2KKKFedCkeowOmU0U6Mgg1yP8wOeG9I12u5mZlMUTd oUr1N+WLHl6yDeRPOf3mjwgpFwXgaq6ISC5jSHw2ZbJyzl/Q+pGH1EY9timSNYXDOBKtfW oey3mc/et+wTdqoPSoN46OiZCLgjo/HmSB/xt11oj7Ews3Ym1srA5DuYCrn2sFR1tJVegN s45Jy+4mOL/jSrgeYtEbyws6ewq/EJdX81dfGX+xerPWds4g4apjLaib+6uBeg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759393509; a=rsa-sha256; cv=none; b=Xm1hDM4Utm3LRx4z/veRAxEacyM+3dO9uYAljX1JbiMhJjb07EB7OAuMO/C3H3HaIBkPok ovPBRaCGuTQvZ9k/k6TzZj0fSL4yVZvsNYpdMRNvfRE06FASPgYc29VG5BDWvI+jrGaecL NlmbT6PPHzCXRGPYeubg/8kpohboCd9gv8H62cwUWCEjdJIsxGMUOF7jlJfvIr4yUDS610 Y0Le86cMWlgcdTvkQkqNFGkQOy16Y3uJgl2uS4wGZuotiTgeDxAAIVrtWHh3hIknNtuJYu S4F5E4KVqJPnX4lKnH7mIWD6TfrlSeQ3NIA/piHi9vNImLW2aXtuA2k/Th3SIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cclGY5yJTz10b5; Thu, 02 Oct 2025 08:25:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5928P9f4032274; Thu, 2 Oct 2025 08:25:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5928P9pq032271; Thu, 2 Oct 2025 08:25:09 GMT (envelope-from git) Date: Thu, 2 Oct 2025 08:25:09 GMT Message-Id: <202510020825.5928P9pq032271@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Poul-Henning Kamp Subject: git: 97d395d91025 - main - Tcopy: add -r option to usage() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: phk X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97d395d91025b5b652f2998c90716c253600dcd1 Auto-Submitted: auto-generated The branch main has been updated by phk: URL: https://cgit.FreeBSD.org/src/commit/?id=97d395d91025b5b652f2998c90716c253600dcd1 commit 97d395d91025b5b652f2998c90716c253600dcd1 Author: Poul-Henning Kamp AuthorDate: 2025-10-02 08:24:52 +0000 Commit: Poul-Henning Kamp CommitDate: 2025-10-02 08:24:52 +0000 Tcopy: add -r option to usage() --- usr.bin/tcopy/tcopy.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.bin/tcopy/tcopy.cc b/usr.bin/tcopy/tcopy.cc index 37a146376c2e..a1dd35682aac 100644 --- a/usr.bin/tcopy/tcopy.cc +++ b/usr.bin/tcopy/tcopy.cc @@ -580,7 +580,9 @@ getspace(size_t blk) static void usage(void) { - fprintf(stderr, "usage: tcopy [-cvx] [-s maxblk] [src [dest]]\n"); + fprintf(stderr, + "usage: tcopy [-crvx] [-l logfile] [-s maxblk] [src [dest]]\n" + ); exit(1); } From nobody Thu Oct 2 09:29:06 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ccmhL4gK9z69Rn4; Thu, 02 Oct 2025 09:29:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccmhL3wSQz3Rx6; Thu, 02 Oct 2025 09:29:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759397346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c8F+LESusQyusPJz50xrOEQvrWtV8Jtav9cN1fzsLag=; b=c7Yj5mSZ8CSCce2PiPR8YFCQOjySwu+CxhHtgFck3xfG/xqGpOyUG5f2VFJSc3H5iDGg3A d8gOuAjU8b7PZNLI4m8EDkA+virg4C+JoD/EboYFVScQY/HOf6YlJVGWQYw/Yc2/NZZSc5 g2sXCm6xEhlbvPRH2AaKvPoGSphrIQG7AjaxV6/1JLyeAgCam4+xI9iYKiOFJBBMOMThnk 4UlDKVASm3SoF//XLncmerhnUwM0rwN2j+K82mb+axvjxQ76knhY4fPySbArySulF2xxMk tVi3XDfdpl7rL5VewHE4A53fc7+bBN2aEv/SaX1WxQuCRx3s7ljmdST70ih/VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759397346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c8F+LESusQyusPJz50xrOEQvrWtV8Jtav9cN1fzsLag=; b=mrGjGcQIILov+6Wk6FtVYyoa5C8QnKmPGluXc3jnXw0jOw2rMvUWnT4lf/kba+TT5B7IB+ 7064hvTorvH3aXbSSRDGWo3innAyrDmiWxUgUPmllXDv71vP/VmCTqq2y2F50QCYZlJ1ZO INQKFWabvoCaKsYEPniuLHXoVpJThYVXEncZi07NVHe3PMgJts4ha1ZE+XvZ2oUDV1wA5k Gsa5xIPqAi/h9xzhav9s1qZN9sKiJFO1pQcjp/i+nz47vHxC8qDAgE74R6Wacay+Y1D4Vo DYPXgQZFAaAXp4WCxBQwnVQiMpFh18BrATUIpYCWEZphMoOGjmBzrCkvIlfxsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759397346; a=rsa-sha256; cv=none; b=DL7OBhQirSHbp+KVSeMMbz+1wzyzzhnAU/T5aoTdfWcYwLkKUwqpYUMiRM7+52ZubvvWLt q2QMfmMQXKqBED6egddV7ZjpyxutcK5LHoPjJ9LGoH/7RnFYCJ1owb3aZ1ii1UlvOm5GOe 9iRMhffUjUwshfET0SGC5r+OX5KCUMbYmSaZLyqKe8FyM+zG6KsG/poLUiLORWwU7RR1Uq pMMKpz5IoYKlamWWh0XOKi/BlgqB/Jsfi7LTZlb9oTHkmcbW8a2AZ7F69wKwddkAyjlZpl VUDIGOpCuZqyK9iLoTPuBx75SSBoJGO/DZS6FoUJWCIxxjJF94bG5jNOHMuzSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccmhL3K6zz12Nq; Thu, 02 Oct 2025 09:29:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5929T6CG051117; Thu, 2 Oct 2025 09:29:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5929T6Dw051115; Thu, 2 Oct 2025 09:29:06 GMT (envelope-from git) Date: Thu, 2 Oct 2025 09:29:06 GMT Message-Id: <202510020929.5929T6Dw051115@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 90d2aedbb964 - main - bsd.cpu.mk: Fix whitespace appending to MACHINE_ABI List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 90d2aedbb964bb39ecc23e736dc26ff45603562f Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=90d2aedbb964bb39ecc23e736dc26ff45603562f commit 90d2aedbb964bb39ecc23e736dc26ff45603562f Author: Brooks Davis AuthorDate: 2025-10-02 09:23:38 +0000 Commit: Brooks Davis CommitDate: 2025-10-02 09:28:35 +0000 bsd.cpu.mk: Fix whitespace appending to MACHINE_ABI No functional change. Effort: CHERI upstreaming Reviewed by: imp Fixes: 426fc376afaf ("bsd.cpu.mk: Introduce MACHINE_ABI") Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D52833 --- share/mk/bsd.cpu.mk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk index 1225d690e908..d11b8994dcd7 100644 --- a/share/mk/bsd.cpu.mk +++ b/share/mk/bsd.cpu.mk @@ -396,19 +396,19 @@ MACHINE_ABI+= hard-float # (which uses arm64/arm). .if ${MACHINE_ARCH:M*64*} || \ (defined(BOOTSTRAPPING) && ${.MAKE.OS} == "Darwin" && ${MACHINE} == "arm64") -MACHINE_ABI+= long64 +MACHINE_ABI+= long64 .else -MACHINE_ABI+= long32 +MACHINE_ABI+= long32 .endif .if ${MACHINE_ABI:Mlong64} -MACHINE_ABI+= ptr64 +MACHINE_ABI+= ptr64 .else -MACHINE_ABI+= ptr32 +MACHINE_ABI+= ptr32 .endif .if ${MACHINE_ARCH} == "i386" -MACHINE_ABI+= time32 +MACHINE_ABI+= time32 .else -MACHINE_ABI+= time64 +MACHINE_ABI+= time64 .endif .if ${MACHINE_ARCH:Mpowerpc*} && !${MACHINE_ARCH:M*le} MACHINE_ABI+= big-endian From nobody Thu Oct 2 09:29:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ccmhM5TFFz69Rbk; Thu, 02 Oct 2025 09:29:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccmhM4BG9z3Rtg; Thu, 02 Oct 2025 09:29:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759397347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HLmK+UhMndnl3I+w/mO8+KugTJzBqYfQevWKXTpHtqs=; b=YIIHs1bHomNb5j2wzbYKZr4yJkczqtUQgu/TM31GtD1EqPWLl3c+NKxQZUPz4sVklgT/Sn VrE7/0pJLMU8EKZm75oElCmObHQADobW9G94pbGhISnPDly6IaMDiZo4P1viyuoS3Xe+5S sHSxBYqoOCWMtk7SjSAPd7EKh8hxAlHqXEfwIpgNtRfqec2QTMQES/H8QawNJc7+e/UUe7 iHKsHDqdZTV8CoHmq2wvlz7HeQMoWCB5SUlG9OkilNst9bzxIj37GCO3uc2rsbWS/TNqid hOQudpy1ueDuEhXPaXyB+8dWrCPNGnGIYKkCdmGFAaeyY3gLMP1TzcYiNtADow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759397347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HLmK+UhMndnl3I+w/mO8+KugTJzBqYfQevWKXTpHtqs=; b=AwSrUPycXY9FrtzKiC1vpT7KkwEf1dffs9WrTTzdo6AAtocnlpElyRnQhYreBfGLTP4zpO f+aYbxo30ne13q4OCptJ64FKapiJa8qrvYaMHpv0gn1WLwmPatNjTBmVWJ2DtZD1ho6xTy r0G4ORHyBwx5aolvEhq5uCrQfJfBlGsTAmsFVmLtrhV9H875GiKnxlcmvDKN2H2g6x+Fbg 395Fgzfxqvu5BEuLu2bCih0KtYEMu1pAETS/d7/h9WDT9bLwcVWE+ukJOJ8UuFTyzPb8ot VvQcFLkG4tcMfhWSbBbwdCcISlAWkO4psUpSSIf7iYERMElbR1dLkuSHMpugKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759397347; a=rsa-sha256; cv=none; b=FPgvd57Qsha0ZFQwUtiYOTLMX4FdbevSuOjowwRbcTf235gMURycE77ZLzCfYqyBP9jnwf REZ6rFlrfnsUdNlg3LrFofFvU1L6bbvsG8orMAiQXVgvKrBt+R78YQavlAQ8xiQaXzVuO/ Yy92wKdYMwTAZs842gWcrwLMctcg9dmTGyS9rujOoir8Y91SjyGlN3OzSRCU8vpv599g6S pJ8NTi3jataTfJri8fy5rfp2uL5Fi2bGx07WU46qFrv44xc6v6OxsZbFibRg+ZHjaRo/pA woVuX140hN2IU/VtgowMJyQd5C0dUrlVSzKX0qg7iDD7P1cW656/Fyl6IIUxfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccmhM3m5Tz128R; Thu, 02 Oct 2025 09:29:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5929T7fO051153; Thu, 2 Oct 2025 09:29:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5929T72s051149; Thu, 2 Oct 2025 09:29:07 GMT (envelope-from git) Date: Thu, 2 Oct 2025 09:29:07 GMT Message-Id: <202510020929.5929T72s051149@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 0a551f8a7d68 - main - arch.7: Remove mention of PDP11_ENDIAN List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a551f8a7d68ca42d60824682123f12bba76c477 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=0a551f8a7d68ca42d60824682123f12bba76c477 commit 0a551f8a7d68ca42d60824682123f12bba76c477 Author: Brooks Davis AuthorDate: 2025-10-02 09:25:01 +0000 Commit: Brooks Davis CommitDate: 2025-10-02 09:28:35 +0000 arch.7: Remove mention of PDP11_ENDIAN AFACT, this was never accurate. When there was support (such as it was) for PDP endian it seems to have been spelled PDP_ENDIAN. Reviewed by: imp, kib, emaste Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D52817 --- share/man/man7/arch.7 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7 index b29fedbfd4ec..3b7576dc67cb 100644 --- a/share/man/man7/arch.7 +++ b/share/man/man7/arch.7 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 14, 2025 +.Dd October 1, 2025 .Dt ARCH 7 .Os .Sh NAME @@ -345,9 +345,6 @@ Common type size and endianness macros: .It Dv __LP64__ Ta 64-bit (8-byte) long and pointer, 32-bit (4-byte) int .It Dv __ILP32__ Ta 32-bit (4-byte) int, long and pointer .It Dv BYTE_ORDER Ta Either Dv BIG_ENDIAN or Dv LITTLE_ENDIAN . -.Dv PDP11_ENDIAN -is not used on -.Fx . .El .Pp Architecture-specific macros: From nobody Thu Oct 2 09:29:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ccmhP0Fxvz69Rhv; Thu, 02 Oct 2025 09:29:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccmhN5T29z3S2X; Thu, 02 Oct 2025 09:29:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759397348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lK3bqYolY5Chw8ZizdWeyyvz4PXkxECr+Vjhhk2APBo=; b=GsezVHqWekIiQfhNfBdHjUmtseenfBu8VSnoWUgEaw/guIyJOdGMUxv3BuHhFus4xvFmfH PsRrJB6ThTJ7ne+y3lFRj6q4OPrlFIj3GvBQQ1ZlKVO4jhVNUPwGisHBB6luxI2EZDqeFR GP1ywEYQxGdOlACE13N90jK4UMZiWOTT+V0I5QNyy2+GEFrKOzSwAnd4ECuSw/fV/pDaGw 49jREhhbX0joXAzTAltki0kZlbz44wsNO9FXTQOHYnOUJCBEeRi/E4MzX50O5bJIOOLxvB xi20EhLRSKzSJS66kGZKXdWLoZb6zMzgj9nVxYLeZZZSGsub+R4C533YVI9YTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759397348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lK3bqYolY5Chw8ZizdWeyyvz4PXkxECr+Vjhhk2APBo=; b=MYJ6r8MZncLrxIUkSZUspdbG+R/3iAgcC4QznnjssvXLbLFaZB6D4I5n2sjXdSPeKvDbFp msvlcpoPRx03K4YpUbJ3B8aRVTnokgVwagu3prsjBj/RJ9DGNUuc2VzMtIdjMkD0gCMAqz 5yK3MR+/dgwgg0pEOzTgE6TysgkMFnaxniCS+DhZkR/a+Q1JlgsCzaw8aD1AKPO6SGlIM3 UhNlT4f6Wg6VwYmHTZhnXgAsWoAkrOvmE+sZA4Twh8T8OM0wS4deaIO4LlsBq+a+XKKe7L OFdXOhG0XqBUXeR7oOhGspzBoafIL6G5RJWJizyLD2tAgKHEdD9rXSirK7Fsxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759397348; a=rsa-sha256; cv=none; b=jdOaFRIOPuPVNYFfkdphmf5n1i0P+TaMkM6ukUjt/C3YPEcQTQXY/8CUVtuQhohWBRKJbJ VX0sertC4xPwaYRlDCRk+FZMxvr5vtYWpSGyzx1SIGWxd5Z+5z2/MMezeb5dPTECN5L2q5 0/zSoSrExo8XGrMvujmSGkolJhHobBV3XdFp53dMeiX5YoblLMyaAHr0KFFVWMJ050xPbW rC55PVpLTQu1nM1szXE0Y4/cN05G934LYlil1v8xNOQWzkVkyTBM9tic/FG0BZU2HPtLNb 8hJ8G8MrHqCLHQvvxExKaWtwSSjWL5FkKy8LLo5q1E/IqnSnXXOnRADErHd05g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccmhN51mXz128S; Thu, 02 Oct 2025 09:29:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5929T8h4051189; Thu, 2 Oct 2025 09:29:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5929T8SG051186; Thu, 2 Oct 2025 09:29:08 GMT (envelope-from git) Date: Thu, 2 Oct 2025 09:29:08 GMT Message-Id: <202510020929.5929T8SG051186@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: f7b6ea699b23 - main - arch.7: correct claim about ILP32 alignment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f7b6ea699b23b3af81866ef3aafb398c2c0d45af Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=f7b6ea699b23b3af81866ef3aafb398c2c0d45af commit f7b6ea699b23b3af81866ef3aafb398c2c0d45af Author: Brooks Davis AuthorDate: 2025-10-02 09:25:53 +0000 Commit: Brooks Davis CommitDate: 2025-10-02 09:28:35 +0000 arch.7: correct claim about ILP32 alignment Only i386 lays out structures with weak (4-byte) alightment. It may be that access works when weakly aligned, but from an ABI perspective, it's all about struct layout. Reviewed by: kib, emaste Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D52818 --- share/man/man7/arch.7 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7 index 3b7576dc67cb..5de441aed699 100644 --- a/share/man/man7/arch.7 +++ b/share/man/man7/arch.7 @@ -183,9 +183,9 @@ On all supported architectures: Integers are represented in two's complement. Alignment of integer and pointer types is natural, that is, the address of the variable must be congruent to zero modulo the type size. -Most ILP32 ABIs, except -.Dv arm , -require only 4-byte alignment for 64-bit integers. +The sole exception is that +.Dv i386 +requires only 4-byte alignment for 64-bit integers. .Pp Machine-dependent type sizes: .Bl -column -offset indent "Architecture" "void *" "long double" "time_t" From nobody Thu Oct 2 09:32:51 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ccmmg5fFTz69S0G; Thu, 02 Oct 2025 09:32:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccmmg50WMz3Tl6; Thu, 02 Oct 2025 09:32:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759397571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QJLNHJJEyvmh7VUNsWiCp+jLFrdUnaqXpDcKrDZb7Wg=; b=CZmbjGkFzF6luvvOYwuhSVXTgO1aHqYP8ke0U4Bttve/12LJIVar1ms9odRC7iwc6z7jL3 guEuNdajrvAS6z1LDE+sBgAw2MQrlCdZeCE/nJaUHLWHUWncK4Srcs2qXNrMIaEkUgQLIP U3UG7ybX+xF5CRP/8GzJAcRps1UGVLIbf+bZtzHDvqqEokH7vHZUGXtsNeIBdMzHaltspw NFFybogV17TAD3iUfGgV/KIrdxz/cURCtHmpmvlt/L0s8ZPWhCpAXBPSusbS7dG9qGPL/K Asg7zSbkWhuL2ozxPYIdhLn8Ctk9zR0eQFIKZixmqThip8DLf+GlCOxyhDG8IA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759397571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QJLNHJJEyvmh7VUNsWiCp+jLFrdUnaqXpDcKrDZb7Wg=; b=M1e5yxYf7lHYCTxikRW2raCsa8MK8dzUXAjN8kpkxMU/64Tgrm+v3e84ptJGPvLRMA69Tp mK8K3kI2epQM9kJOpS+ydU12M9aWymufaZaMLsr875KXdIJn98kcZbRAtdOSCTW/q0hObY TdHXTsTaTyGXsPmF87w9oTHpJyAtILWlCtLbcV8QjylpT1jVDLzMIO6Gjv8DIcafhaAW0i Hpcm2t61Kfo5Egh0mv5KmAJQ5GQC3CutYfvP8QuGSd/w+sk5nB5+8SaUmDsPOroKH/u2/N 5n8NkoSd0029VdJml/tijmbs6GSbOOoL3l9jCEVYAMVEGFyxIutIrBTdXUJtzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759397571; a=rsa-sha256; cv=none; b=Xt+ZMjN6WjDerxav5wKkVarcGjDNJArHOJj46mfAlrGFO7MBDVD/3MJ4N35vwXOauoWsNu faRVry8GBrgsjloCusb3H1Az7Ge4TIKMcuY5c+j5om16oUUX7wQ9dXgiUzupNbBNYOUy2g Pv3oXXvo4X9IpeG/a+63u/lFBmppk8ywXEVf4kHPeu7YsjNYdcxgCGJoHOCJdW79dYsi4N ZKIWEaVo1asl0GS17xIlXJXZtG/LASlQ1mLc1ewCyfSAiIuV75bhW1tnNtZoZVSrrUrOug iSiYCWG51n77bTRvCLHVevpnPv4GksLBhD7V2rrHCTtHH/7FntBErXBfzvyCKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccmmg4PfGz12b2; Thu, 02 Oct 2025 09:32:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5929WpWD067759; Thu, 2 Oct 2025 09:32:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5929WpJi067756; Thu, 2 Oct 2025 09:32:51 GMT (envelope-from git) Date: Thu, 2 Oct 2025 09:32:51 GMT Message-Id: <202510020932.5929WpJi067756@gitrepo.freebsd.org> 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=B8rgrav?= Subject: git: 5ead817c3b7a - main - rc: Teach netwait to wait for DAD 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: 5ead817c3b7af6d6b5fea222ab144db2c3167b22 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5ead817c3b7af6d6b5fea222ab144db2c3167b22 commit 5ead817c3b7af6d6b5fea222ab144db2c3167b22 Author: Dag-Erling Smørgrav AuthorDate: 2025-10-02 09:28:05 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-02 09:31:16 +0000 rc: Teach netwait to wait for DAD In some configurations, especially in jails, it is possible for the system to boot so fast that we end up launching daemons while duplicate address detection is still ongoing. If that happens, said daemons may fail to bind to IPv6 addresses, as they are still tentative. Teach the netwait service to wait (up to 10 seconds, by default) for the tentative flag to vanish. MFC after: 1 week Reviewed by: olce Differential Revision: https://reviews.freebsd.org/D51889 --- libexec/rc/rc.conf | 2 ++ libexec/rc/rc.d/netwait | 84 ++++++++++++++++++++++++++++++++++-------------- share/man/man5/rc.conf.5 | 24 +++++++++----- 3 files changed, 78 insertions(+), 32 deletions(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index c354aec44430..2589e2614c35 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -500,6 +500,8 @@ netwait_enable="NO" # Enable rc.d/netwait (or NO) netwait_timeout="60" # Total number of seconds to perform pings. #netwait_if="" # Wait for active link on each intf in this list. netwait_if_timeout="30" # Total number of seconds to monitor link state. +netwait_dad="NO" # Wait for DAD to complete +netwait_dad_timeout="10" # Total number of seconds to wait for DAD. ### Miscellaneous network options: ### icmp_bmcastecho="NO" # respond to broadcast ping packets diff --git a/libexec/rc/rc.d/netwait b/libexec/rc/rc.d/netwait index 3f374806d97c..b609440a2e4e 100755 --- a/libexec/rc/rc.d/netwait +++ b/libexec/rc/rc.d/netwait @@ -2,12 +2,14 @@ # # PROVIDE: netwait # REQUIRE: devd ipfw pf routing -# KEYWORD: nojail # -# The netwait script helps handle two situations: +# The netwait script helps handle three situations: # - Systems with USB or other late-attaching network hardware which # is initialized by devd events. The script waits for all the # interfaces named in the netwait_if list to appear. +# - Systems with IPv6 addresses, especially jails, where we need to +# wait for DAD to complete before starting daemons, as they will +# otherwise fail to bind to IN6ADDR_ANY. # - Systems with statically-configured IP addresses in rc.conf(5). # The IP addresses in the netwait_ip list are pinged. The script # waits for any single IP in the list to respond to the ping. If your @@ -29,28 +31,36 @@ netwait_start() { local ip rc count output link wait_if got_if any_error - if [ -z "${netwait_if}" ] && [ -z "${netwait_ip}" ]; then - err 1 "No interface or IP addresses listed, nothing to wait for" + if [ -z "${netwait_if}" ] && [ -z "${netwait_ip}" ] && + ! checkyesno netwait_dad ; then + err 1 "Nothing to wait for" fi - if [ ${netwait_timeout} -lt 1 ]; then + if ! [ "${netwait_if_timeout}" -ge 1 ]; then + err 1 "netwait_if_timeout must be >= 1" + fi + if ! [ "${netwait_dad_timeout}" -ge 1 ]; then + err 1 "netwait_dad_timeout must be >= 1" + fi + if ! [ "${netwait_timeout}" -ge 1 ]; then err 1 "netwait_timeout must be >= 1" fi + any_error=false + if [ -n "${netwait_if}" ]; then - any_error=0 for wait_if in ${netwait_if}; do echo -n "Waiting for ${wait_if}" link="" - got_if=0 + got_if=false count=1 - # Handle SIGINT (Ctrl-C); force abort of while() loop + # Handle SIGINT (Ctrl-C); force abort of while loop trap break SIGINT while [ ${count} -le ${netwait_if_timeout} ]; do if output=`/sbin/ifconfig ${wait_if} 2>/dev/null`; then - if [ ${got_if} -eq 0 ]; then + if ! ${got_if}; then echo -n ", interface present" - got_if=1 + got_if=true fi link=`expr "${output}" : '.*[[:blank:]]status: \(no carrier\)'` if [ -z "${link}" ]; then @@ -63,22 +73,45 @@ netwait_start() done # Restore default SIGINT handler trap - SIGINT - if [ ${got_if} -eq 0 ]; then + if ! ${got_if}; then echo ", wait failed: interface never appeared." - any_error=1 + any_error=true elif [ -n "${link}" ]; then echo ", wait failed: interface still has no link." - any_error=1 + any_error=true fi done - if [ ${any_error} -eq 1 ]; then - warn "Continuing with startup, but be aware you may not have " - warn "a fully functional networking layer at this point." - fi fi + if checkyesno netwait_dad; then + got_dad=false + # Handle SIGINT (Ctrl-C); force abort of while loop + trap break SIGINT + + echo -n "Waiting for DAD to complete" + count=1 + while [ ${count} -le ${netwait_dad_timeout} ]; do + if ! ifconfig | grep -q 'inet6.*tentative'; then + echo ', done.' + got_dad=true + break + fi + sleep 1 + count=$((count+1)) + done + + # Restore default SIGINT handler + trap - SIGINT + + if ! ${got_dad}; then + echo ', timed out.' + any_error=true + fi + fi + if [ -n "${netwait_ip}" ]; then - # Handle SIGINT (Ctrl-C); force abort of for() loop + got_ip=false + # Handle SIGINT (Ctrl-C); force abort of for loop trap break SIGINT for ip in ${netwait_ip}; do @@ -90,11 +123,9 @@ netwait_start() rc=$? if [ $rc -eq 0 ]; then - # Restore default SIGINT handler - trap - SIGINT - echo ', got response.' - return + got_ip=false + break 2 fi count=$((count+1)) done @@ -104,10 +135,15 @@ netwait_start() # Restore default SIGINT handler trap - SIGINT - warn "Exhausted IP list. Continuing with startup, but be aware you may" - warn "not have a fully functional networking layer at this point." + if ! ${got_ip}; then + any_error=true + fi fi + if ${any_error}; then + warn "Continuing with startup, but be aware you may not have " + warn "a fully functional networking layer at this point." + fi } load_rc_config $name diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index b8c72fc07083..c0048f27c740 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 25, 2025 +.Dd October 2, 2025 .Dt RC.CONF 5 .Os .Sh NAME @@ -4563,20 +4563,16 @@ If set to .Dq Li YES , delays the start of network-reliant services until .Va netwait_if -is up and ICMP packets to a destination defined in +is up, duplicate address discovery (DAD) has completed, and ICMP +packets to a destination defined in .Va netwait_ip are flowing. -Link state is examined first, followed by +Link state is examined first, followed by DAD, then .Dq Li pinging an IP address to verify network usability. If no destination can be reached or timeouts are exceeded, network services are started anyway with no guarantee that the network is usable. -Use of this variable requires both -.Va netwait_ip -and -.Va netwait_if -to be set. .It Va netwait_ip .Pq Vt str Empty by default. @@ -4612,6 +4608,18 @@ interface if desired. Defines the total number of seconds to wait for link to become usable, polled at a 1-second interval. The default is 30. +.It Va netwait_dad +.Pq Vt str +Set to +.Dq Li NO +by default. +Set to +.Dq Li YES +to enable waiting for DAD to complete. +.It Va netwait_dad_timeout +.Pq Vt int +Indicates the total number of seconds to wait for DAD to complete. +The default is 10. .It Va rctl_enable .Pq Vt bool If set to From nobody Thu Oct 2 10:01:29 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ccnPj4JBpz69VW3; Thu, 02 Oct 2025 10:01:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccnPj2zZrz3c8K; Thu, 02 Oct 2025 10:01:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759399289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bLzJjMx0EnDduvqUyc6uGoQpVPJzta+bhO8Hj4ZWqEg=; b=mEZljg2T7j9yNDceFBrajj6feL9xK96e7jx8vAHTsFCyW68HOEu89i4WmJR6wyEYQ0LXua MjPTStm+N/wQ6zQAIVkdnWNlgNKC+PZEJgWqH6pkfJDW1URr4GaRvK5tIUV09CeY1BeYug 9Pswj8ibkIbZl3ot6YYG4Gnr9UyxdTnLbposSwYyjBJSQR2zqu2LMkT3Y8vT9jeKXqOdb+ Kihzamxfl1B5aUWG+HIK8hlNcj+AVoM4lf5rg3lcaN3qa3lGtzPj4iWPJG7gCRaPyAuyER aE/q2KkiYAcrDQOIzkNmYRXCnV/WH0lSMPttupfBUytgXIYlW12vxTfsQMCazA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759399289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bLzJjMx0EnDduvqUyc6uGoQpVPJzta+bhO8Hj4ZWqEg=; b=XmznrVlSMljqSoEhgPW1cTGyK+raQxzaZeAirSO5jWqD2F1o89XkV+5hvEGVYllnDer9Ue f/Wj+38mkAOws8tsNrogXbXgjVU1I8Dbt5yD8la5asH8djH9tc5oyd6nWyqJPqL1uZIUQq yI3Yr9x8sK8Sm4PwdOMs+y7PgSvd1+V0Ia08ZwkBevJzgDDde1iNQk04L6NGPsEOu2aj23 uDTpr4X5H9YDFrbjyxe+wZq/nqZTtiNjWw5vo6hNriZn0lE0nKRDsjNsw/RwuVdk6cbYrq 3NiQIIWDEbzal0qmcXkrvU1kSt9cDNuqzuSPjYLu3e901zwKO1JIDTB2dRYuig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759399289; a=rsa-sha256; cv=none; b=dhlBYJ2pjNOQNL2eM2K/T4USFU8P4+GKV5MbLMPCtJVSkb5dx1fdBnJa1K1gZsLX3D1DwN e4RpjhxH5VnrK10Dlo99eOjFlze0hUCRg1w7RnAZDfk0MfjKXLK6vVM0BYZm5P9QNfaHlB AxP2uxOiB8JRBDPcPk/a9cR/i8YGcHY2/MjqyvaPeDypDkvpB/9VuHT/kczD7TCtZ7YVGo Tn6MLOFp99tWT9nZXompZsS9qLN+RgQn6YghOyO1jm77ZZVDhWXuS78XRVRO37ISniOZ13 n2UnTpy86AF7ZylTNR9mt5OD/KzzkUedAQyCw8WOzqnpkvO8wekXZP+qGGI6Xw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccnPj1vxgz13Vs; Thu, 02 Oct 2025 10:01:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592A1Tb9025544; Thu, 2 Oct 2025 10:01:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592A1TGb025541; Thu, 2 Oct 2025 10:01:29 GMT (envelope-from git) Date: Thu, 2 Oct 2025 10:01:29 GMT Message-Id: <202510021001.592A1TGb025541@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 244a5188e768 - main - pf: mark pf_match_translation() static List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 244a5188e7681bf8d98a49c78439df61e6816c93 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=244a5188e7681bf8d98a49c78439df61e6816c93 commit 244a5188e7681bf8d98a49c78439df61e6816c93 Author: Kristof Provost AuthorDate: 2025-10-01 15:51:33 +0000 Commit: Kristof Provost CommitDate: 2025-10-02 10:01:14 +0000 pf: mark pf_match_translation() static It's only used in this file. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf_lb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c index b8b5157c9b15..fb1b121d0bc0 100644 --- a/sys/netpfil/pf/pf_lb.c +++ b/sys/netpfil/pf/pf_lb.c @@ -73,7 +73,7 @@ VNET_DEFINE_STATIC(int, pf_rdr_srcport_rewrite_tries) = 16; static uint64_t pf_hash(struct pf_addr *, struct pf_addr *, struct pf_poolhashkey *, sa_family_t); -struct pf_krule *pf_match_translation(int, struct pf_test_ctx *); +static struct pf_krule *pf_match_translation(int, struct pf_test_ctx *); static enum pf_test_status pf_step_into_translation_anchor(int, struct pf_test_ctx *, struct pf_krule *); static int pf_get_sport(struct pf_pdesc *, struct pf_krule *, @@ -273,7 +273,7 @@ pf_step_into_translation_anchor(int rs_num, struct pf_test_ctx *ctx, struct pf_k return (rv); } -struct pf_krule * +static struct pf_krule * pf_match_translation(int rs_num, struct pf_test_ctx *ctx) { enum pf_test_status rv; From nobody Thu Oct 2 11:46:38 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ccql24Wsyz69g28; Thu, 02 Oct 2025 11:46:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccql23yDZz3nBF; Thu, 02 Oct 2025 11:46:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759405598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=az8IH4abe9bKG/+QDkO6vY3L02M2mq37HCGd/NgxErk=; b=bT0njJBTYBeZqwmzgkTh9YJZTxEmRmpL9b9CXhqMMtlbp9w/uELg10vTdzOIDb9ziCiOTy 6wGTm9MI0z8eSgViVCwRh99Zn4Lzi7er/G7Xlf2bSHM0hnpWtkmSRJAG8QDzA9XDkRBUjs slB4jNeODBnTyUdl/ja4V1z1/O0/urAXg9kCYjnnXZS4s1UrNHS+CqEpzTwjLm01+sX0W1 /WFNg2JTAlwzXXOIJ78VEKbyOBvW3VHD3m8MIsrWdD1lv1Nk8s2rUFVl5DUgNvQgVY1a+a EV4RTF9j5YAySZ/k7iLmLRnKH3urM+FLDH9qj/ldffhBUUSOo45QvWR7Uq28NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759405598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=az8IH4abe9bKG/+QDkO6vY3L02M2mq37HCGd/NgxErk=; b=LWf/boBC8LvVyVLAxi2q6Tf3XK9bxqj1ZLYpFyDL4lusJ0naQtLOe0XeDRSGPutFTVUktU wR43LD+4yDW/pCUreli2evdBhqAxhvcw2Fn4o1HpmHLD+9G0wNonjOLdpQ92+UBfm4RU71 D+DK70Otf/dY/4EQDzgj2jtAWAIczC7kyCZs1vLxSLW3FbWgxsGrD8k0bPcb1YSIjGkHsf D/No3rWtdoUHgjt5vE6ZIIVpVPdgSAA6Q2hR6s6pZiV4nJ+fBuS8G34XLLElPCX1JsDIcP 3QgtK+yhUhgyNrVjmAzTkzPUdlTjK2iKkkppVqyfe1/3/IUwbjg/A303e8DHFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759405598; a=rsa-sha256; cv=none; b=SwR4Slf3Ci29OLLp5k0AL1tbYWfWSzVfJhV+hE1/xRf366kMzQCNd3IfA9BtuiuGsSEpap byLq4eXi0OVvWPNo1f36FTl1KuUgv3nW0gMaU1IaV3v5LZgMNrhUIvIeDMpQnvmZ/JL9vZ A4S2EU8XzpnZqOuKMCEIr6diLv3d6ePKXFzeQvHBDEPlLWGZHcGfyO8ILxAyDlkOXql2u1 yhOV/5UN12qU/x+5aQOS/rvB5BOv4KULYZ+47tKmNqHYoqkRrPGcuK5lbl4S47pKRdhj4z SRIwxL0fruHkrkQerGzCNp8HgUtCH2KQA2cEch09U8YmtI44Z+Mdd3ZmtkJWWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccql23TKmz168W; Thu, 02 Oct 2025 11:46:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592BkcL2022449; Thu, 2 Oct 2025 11:46:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592BkcEV022446; Thu, 2 Oct 2025 11:46:38 GMT (envelope-from git) Date: Thu, 2 Oct 2025 11:46:38 GMT Message-Id: <202510021146.592BkcEV022446@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 3b9d89e1c90f - main - release: Install pkg(8) from the release repo on bootonly 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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3b9d89e1c90fd3b2667c07d5a0bfd300bf635bb3 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=3b9d89e1c90fd3b2667c07d5a0bfd300bf635bb3 commit 3b9d89e1c90fd3b2667c07d5a0bfd300bf635bb3 Author: Lexi Winter AuthorDate: 2025-10-02 11:45:09 +0000 Commit: Lexi Winter CommitDate: 2025-10-02 11:46:26 +0000 release: Install pkg(8) from the release repo on bootonly Although bootonly doesn't contain an offline package repository, we still want pkg installed so the user can use it to repair an existing system. Installing it from the release repository ensures it's always available without depending on pkg.freebsd.org. While here, fix a typo in PKGBASE_REPO_ARGS. MFC after: 3 seconds Reviewed by: cperciva Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52848 --- release/Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/release/Makefile b/release/Makefile index 82617c1f4dd7..f907bf985893 100644 --- a/release/Makefile +++ b/release/Makefile @@ -82,7 +82,7 @@ PKG_ENV+= ASSUME_ALWAYS_YES=yes PKG_ARGS+= -o METALOG=METALOG PKG_ARGS+= -r ${.TARGET} PKG_REPO_ARGS= -o REPOS_DIR=${.CURDIR}/pkg_repos -PKGBASE_REPO_ARGS=-o REPOS_DIR=${.OBJDIR}/pkgbase-repo-conf +PKGBASE_REPO_ARGS=-o REPOS_DIR=${.OBJDIR}/pkgbase-repo-dir # Pass -f to make sure pkg writes to the METALOG even if the package # is already installed from a previous build PKG_INSTALL= env ${PKG_ENV} ${PKG_CMD} ${PKG_ARGS} ${PKG_REPO_ARGS} install -f @@ -278,7 +278,7 @@ disc1: ${PKGBASE_REPO_DIR} echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG touch ${.TARGET} -bootonly: +bootonly: ${PKGBASE_REPO_DIR} # Install system mkdir -p ${.TARGET} ( cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \ @@ -297,7 +297,12 @@ bootonly: echo "./usr/freebsd-dist/MANIFEST type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG .endif .if ${.MAKE.OS} == "FreeBSD" && (!defined(NOPKG) || empty(NOPKG)) - ${PKG_INSTALL} pkg || true +.if !defined(NOPKGBASE) || empty(NOPKGBASE) + ${PKGBASE_INSTALL} pkg + ${PKGBASE_CLEAN} +.else + ${PKG_INSTALL} pkg +.endif ${PKG_INSTALL} wifi-firmware-iwlwifi-kmod wifi-firmware-rtw88-kmod || true ${PKG_CLEAN} || true .endif From nobody Thu Oct 2 12:15:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ccrN00qx9z69jsD; Thu, 02 Oct 2025 12:15:12 +0000 (UTC) (envelope-from garga@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 4ccrN00By6z3rW9; Thu, 02 Oct 2025 12:15:12 +0000 (UTC) (envelope-from garga@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759407312; h=from:from:reply-to:subject:subject: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:autocrypt:autocrypt; bh=3glQiS/jZOTuSQDTkawP+I8oOcaLKqs78cVcEtUtiAc=; b=l5w2awgYSDHqmw5kCQgfLVaTGwODFcxEAz75C4AHBR1MMFS8xUtowQh1yHDyUH3MmnDFGd +7WlXeEfEiw2+Y9UwRtuu7+dYilbiIr9ATl9PibhCs42JFaf7o7EpL3/Uj8d6dKoADI27v aGKJQg+M7oET6i7eyHiEBYb9H7AU50lKypmQwKldbICmE2TVuNXFUj3qmuchgPBVC6lvpa qGUJj4sBiK8y4WDbbgSGEu0hX+qcQXMsFjlSevZNlTO5Z6GujSR9OuJ6yzYGNpl4ck6CiA yRw46aDxRG0Ic2RNsBObE1D90CaGKAIzLUJggod3r85OYu84opow6DM0QOs4jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759407312; h=from:from:reply-to:subject:subject: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:autocrypt:autocrypt; bh=3glQiS/jZOTuSQDTkawP+I8oOcaLKqs78cVcEtUtiAc=; b=gXtESydi1X0QGNalwuIju70NMWHiJ00hfyzn7HgM1//Jt4D7u7NLq9K1xkFqzXgv9zpiV1 qfN9ifE6Jow2hLhRuAE7KSLETZtJJmRhTcFDT0CyTg45ItM/B9Y64SAS33jaQr29ZB/VCB V1nc452bE7ZbJZLQ5BYux5cGvRXlH/pAV1vGGb5ZuGXUaFDxJ9JU1cRn8XRhb2RTqhWQA+ /ILY8KzekSFl85B4200muD31g8F04WpbZM2UbZR1n/4fb4MWRyZciD/3P2dznm+ucOQss+ SdOSyBQ9JHsELSYvutpJIw6WvbVwmD8jeCJYUFJz4lfOO9ldzB4qL7zPu/Dtlg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759407312; a=rsa-sha256; cv=none; b=dFOsTjUzQdQC+4vZ67Rb3xMLAdrX3A7afP+kuCvkJtoo/lnMyglcfWcjqO5v87IiRC8IMI Jbq5rszBxEhBL5JKvbgWRBLRcrLI0GDgTclsgp79AgRQTzgIwVI6kVsiiosTDHkby5z7Le VwFBPwES/g4t6f0N0xbQtqvyf8itlLS0yWt0YnrcISuc6FcRqP/r0vYaaZojPpjfBQRAi1 rKNW0lY2qf5V3yBiTUXkx21jffiXMx99+nzjib5ziquE30PSeznODJ8osRdyCAT9ORIwL3 DaEKdD5vDHmHEImc7+VtCMqYyp+gSdc+O+vUyNs9RQQhAq8UnaYZ7vzUvqNFhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2804:f1c:3e:b01:c1f1:ca24:3d73:8d59] (unknown [IPv6:2804:f1c:3e:b01:c1f1:ca24:3d73:8d59]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: garga) by smtp.freebsd.org (Postfix) with ESMTPSA id 4ccrMz1NYxzx3M; Thu, 02 Oct 2025 12:15:11 +0000 (UTC) (envelope-from garga@FreeBSD.org) Message-ID: Date: Thu, 2 Oct 2025 09:15:05 -0300 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 08f06aa1b4fb - main - vfs: retire the VCALL macro To: Mateusz Guzik Cc: Mateusz Guzik , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202509270401.58R41A7b014829__21824.1523530864$1758945716$gmane$org@gitrepo.freebsd.org> <85c486e1-6fde-4f4a-b4ce-bfbec7bb693f@FreeBSD.org> Content-Language: en-US From: Renato Botelho Autocrypt: addr=garga@FreeBSD.org; keydata= xsBNBGStavwBCACjNlp/9+Y+VFe9ieR2h/WWbdvjz4Mb2z/f22bGoaskzCfvVNbo/v3i34I9 H6OdgZkGqheQEAD2jNfRbmPr4z40xDMUpYGLds+1Mvg7G3Hms3j5Ef8KaLSWUNWIfwKdfSVR Qs35ccSJxAdRW5YdI6J3xZgika+3Bc4eJ05YE/nWW+PNTYevt5rqD50N3zybVYIcLoqVPpBi AZE/sf5SLiLACIJb1t/s4x+pi8vgWevxVVT9u8V1f8zYErmHSLSqjxii0B3eRZphX9NCJOv9 +tfFZhnENInhn9gT7H4e2YumUltEy3jacONHJF3CC1pvvWEa6lEyypclMOkHQwNON7DLABEB AAHNLFJlbmF0byBCb3RlbGhvIChGcmVlQlNEKSA8Z2FyZ2FARnJlZUJTRC5vcmc+wsCXBBMB CgBBAhsDBQkFo5qABQsJCAcDBRUKCQgLBRYDAgEAAh4FAheAFiEERL7Dxegbnh7xTiQ5Ob6P xxJcZXoFAmSta78CGQEACgkQOb6PxxJcZXrYlggAgaZmr6c1yIWzN8VksHrHpwt/uxONEP+h ljy3yfrMsgfS5wx5Uzgfih1xYZUFC6jiI63CetqBqJpp3g1klRS1UWYKx2NeXphDMYZEdPm/ a6sXh4bKZbk6IE8Yn0/YiRT57d9DtbvswC7Gn7Igj/MSbhl49TvTGyvuB6juaffVoYZViomx 5zMoee8Ml2o2qj3MrCJ+/K8GU54RlpOGqGRsqdwVdr9XEWub6fF2YFwR46cjmbiU3P5urFHH nkJlBGPIwKxHimTW0lZsdx9aCKRDd/D80/WOEzXmk3k8B9lv/GsvOluHmveLhJG1R1tIJ31I f2q8dfTvqsQXnu8CcWRcgc7ATQRkrWr8AQgA1DufoxScA+CWQbUR6zExIu8wXQKrhuRt4DG2 BgynT7EMUvEBadcbQRZXsBpemNfncc9Axyut/+rWiyKJf9BLQuo/9QYmSRvW1U6+0LJUYmdg kMyBeYaPk+vnssv/u9jLuvV7FVgyE0yk1iaWIKOVDD+XrQCOvGw9uSceBrQyCyo3A/eRM/+p vnDCaywR63PKE+3axk6lfNdGK3TnaWmS30/ZDCZlNsXuqprqR4JdT5wXids5o36dsuJ5EZ20 s5hNMD34s4Yr1Y1R9elH6qBsFCpozs0+jwrArxq+UJJCR6hH5W8ZEwJtRC8tzR8mRE1WywzX BXYj0YhfGztQIxZckQARAQABwsB8BBgBCgAmFiEERL7Dxegbnh7xTiQ5Ob6PxxJcZXoFAmSt avwCGwwFCQWjmoAACgkQOb6PxxJcZXr1vgf/SKXhoZcUU5I7TqcbHg0lJz9tICTupCGHWr/s SQgjh9oEM5j1wqW7FlCGP90Tl9K0g3ow9YdbhU7VK470o6pymX9V9eLHzGgkZO/KMEtGBeK1 u+5ePjCJ/MK5B21KODLSU7WrIL1VN5ceXfQPLYt02LMLtPri+oduHD6RNBeA7US1DUzleq5F 9NHGbvV2U7BdDUezpiO8NaFjFZVB11I5d99FxUM5XGVstI3VhsRKZxjY0KnqJzaQgTFsPGmv AUfZVIN1pXgXiedhPXpr8+Y64jP+pHVwpVmh1zYWL6+q3kqFOUVP6c5iiMeoEXZvgJz7x/AC ek3X5gvu8Hpcv+MZIg== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 01/10/25 16:01, Mateusz Guzik wrote: > On Wed, Oct 1, 2025 at 8:35 PM Renato Botelho wrote: >> >> On 27/09/25 01:01, Mateusz Guzik wrote: >>> The branch main has been updated by mjg: >>> >>> URL: https://cgit.FreeBSD.org/src/commit/?id=08f06aa1b4fb6db0d8beb3e1c328b1c1adbec13a >>> >>> commit 08f06aa1b4fb6db0d8beb3e1c328b1c1adbec13a >>> Author: Mateusz Guzik >>> AuthorDate: 2025-09-27 02:01:32 +0000 >>> Commit: Mateusz Guzik >>> CommitDate: 2025-09-27 04:00:59 +0000 >>> >>> vfs: retire the VCALL macro >>> >>> There is precisely one place using it and even that should probably go >>> away. >>> --- >>> sys/fs/nullfs/null_vnops.c | 2 +- >>> sys/sys/vnode.h | 5 ----- >>> 2 files changed, 1 insertion(+), 6 deletions(-) >>> >>> diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c >>> index 74c1a8f3acb6..ba29b0485326 100644 >>> --- a/sys/fs/nullfs/null_vnops.c >>> +++ b/sys/fs/nullfs/null_vnops.c >>> @@ -306,7 +306,7 @@ null_bypass(struct vop_generic_args *ap) >>> * with the modified argument structure. >>> */ >>> if (vps_p[0] != NULL && *vps_p[0] != NULL) { >>> - error = VCALL(ap); >>> + error = ap->a_desc->vdesc_call(ap); >>> } else { >>> printf("null_bypass: no map for %s\n", descp->vdesc_name); >>> error = EINVAL; >>> diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h >>> index 6ef9bbec9446..fcfb8716fc52 100644 >>> --- a/sys/sys/vnode.h >>> +++ b/sys/sys/vnode.h >>> @@ -594,11 +594,6 @@ void assert_vop_unlocked(struct vnode *vp, const char *str); >>> >>> #endif /* INVARIANTS */ >>> >>> -/* >>> - * This call works for vnodes in the kernel. >>> - */ >>> -#define VCALL(c) ((c)->a_desc->vdesc_call(c)) >>> - >>> #define DOINGASYNC(vp) \ >>> (((vp)->v_mount->mnt_kern_flag & MNTK_ASYNC) != 0 && \ >>> ((curthread->td_pflags & TDP_SYNCIO) == 0)) >>> >>> >> >> FYI, this commit along with retirement of NULLVP and VREF broke >> open-vm-kmod build on current. I wonder if there are move ports that >> could be affected. >> > > I could bump __freebsd_version for it, but what you can do is simply > not use the old stuff on any supported branch. I'm working on open-vm-* upgrade to 13.0.5 and will get it fixed, just sent a FYI because there could be more broken ports around. -- Renato Botelho From nobody Thu Oct 2 13:23:16 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ccstY1p9Cz69qfC; Thu, 02 Oct 2025 13:23: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 4ccstY17h6z42tR; Thu, 02 Oct 2025 13:23:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759411397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sCyIwXrVeTyln9chOBNIm6w3ecTnsZacpd6EHJ7Kb08=; b=kA/LnrbxVBf4caHJF1icPU57/qVODsVH6F9igcdHKPvbJVm8tHMYXLiMlHc38Ulz6pve6v ODM59xYBYUt3gqj5s/kdvSI56zPdBWY9EjnFRoKZ6Y+dfRrhV8KOVDTnWVkMLyxBuHjE8i r7YhICD/k0Xx+aqVa9uYEcMfoqmVnMVHBK9YgYyjOMMWo4zkVEquFhwFsB7ANzxV38/xf0 E15E4Y7uSJbSfSJcDlv7dvaLjZYpvQKiaYcrywFGDWEOpPCobFtdBlkyjiCLbo4mKUkwyw /WvO0t3g/WwtLBXi8Zn74GeO67kguhZ4yvbprtAzIYQXCyg5o4rbOFYnarIK4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759411397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sCyIwXrVeTyln9chOBNIm6w3ecTnsZacpd6EHJ7Kb08=; b=tLzdc8Mn6xwh4fYSbNaUHpH7/j46FWv4yXuVt/FUAOh4OhuIuCWLSAtOtFLhVIGHpT5C02 rveXep71yia68gUbYUUqUgR/p9jl6czTtSdSx22k5a0b7uDzfLZm5sPrxoAKpMnpahfisR yv5fiAMhso7IXlLENHYq1mmc/c1yq+fiPT6RN2PVLhorJIGePti9hFaOGrPYo/B0dDEGUD bg9WjT+12BPWfEloAYLSvjUBh69Fa9fqD48oI4DOkEfYEB+/eIyeky61KBG8pt2zgogMhi 6BFvd4YT7TcQbwm6u6vzxFdKFEzQggoyk/FFVKv/lwTMSkvBY9b8HgzBVp+xAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759411397; a=rsa-sha256; cv=none; b=D81SpFY4ObtviFPtwmRnDnf+RMzimBTLnoo3A75BS8bHxa1lLZTRXjjZQAKAPUZ0aX9vfC RmabGmR3VgsCxBjwdEbZuMj1EwEw1FxqG1q5W5Up065T9Ds3YVl1DnmB02WhLJi/E7jz9O FF4wZCaAxTQhS+6j9lVPliw2FfFQDPPHxorlzAyZV+imXOx26ffEiRulaC/7Xka/NO8Lax pHW/darV0WIefX2IRkTQhMG1gWqoNcpDhJjY9P2Aop2sYSDxY1TwocmAFmsik4LL2M8aCM eI50O0xNth1cMy5J6Rh9W339H5dFii23o4MzDAmUlWulR4Sp/AWWm+/WB7uR8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccstY0SVpz182K; Thu, 02 Oct 2025 13:23:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592DNGnb016678; Thu, 2 Oct 2025 13:23:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592DNGuX016675; Thu, 2 Oct 2025 13:23:16 GMT (envelope-from git) Date: Thu, 2 Oct 2025 13:23:16 GMT Message-Id: <202510021323.592DNGuX016675@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: a733ea831a00 - main - tests/netinet: add a few missing atf_checks in multicast.sh 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: a733ea831a00d4c0ee4b67824c9ac4e5ba82be08 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=a733ea831a00d4c0ee4b67824c9ac4e5ba82be08 commit a733ea831a00d4c0ee4b67824c9ac4e5ba82be08 Author: Gleb Smirnoff AuthorDate: 2025-10-02 13:22:43 +0000 Commit: Gleb Smirnoff CommitDate: 2025-10-02 13:22:43 +0000 tests/netinet: add a few missing atf_checks in multicast.sh Fixes: d0c8a0b3e6fc5372428eb4fddcd4f8c65b5b0ee0 --- tests/sys/netinet/multicast.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/sys/netinet/multicast.sh b/tests/sys/netinet/multicast.sh index 2ce6be68e44d..a3854fd2fd20 100755 --- a/tests/sys/netinet/multicast.sh +++ b/tests/sys/netinet/multicast.sh @@ -105,6 +105,7 @@ IP_ADD_MEMBERSHIP_ip_mreqn_body() jexec mjail1 $(atf_get_srcdir)/multicast-send \ 0.0.0.0 6676 233.252.0.1 6676 ${epair2}a hello atf_check -s exit:0 sh -c "wait $pid; exit $?" + atf_check -s exit:0 -o inline:"192.0.3.1:6676 hello\n" cat out } IP_ADD_MEMBERSHIP_ip_mreqn_cleanup() { @@ -138,6 +139,7 @@ MCAST_JOIN_GROUP_body() jexec mjail1 $(atf_get_srcdir)/multicast-send \ 0.0.0.0 6676 233.252.0.1 6676 ${epair2}a hello atf_check -s exit:0 sh -c "wait $pid; exit $?" + atf_check -s exit:0 -o inline:"192.0.3.1:6676 hello\n" cat out } MCAST_JOIN_GROUP_cleanup() { From nobody Thu Oct 2 14:25: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 4ccvGQ72Fmz69DGB; Thu, 02 Oct 2025 14:25: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 4ccvGQ5Ljcz3FR8; Thu, 02 Oct 2025 14:25:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759415134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v/+R2i8RNCDAvdNF7Vq5snHjwYMT5dwNMc26ZZnUHaw=; b=GyEbD/bofyQ2fR1AIhTrH2iSiLQle3aas0Rs6NLv0/dUfrJtPV1UmnS+/jLS7sEWlUllHh QVAnPfx3SMHriSKKtySm7BJBuuspK0w3TkOCDA6ZY7hyPWpFaRGsyFRMI8SMqscCINuqHo Zjp3n7KO8ZfhWLs24LgFWaPvFVA2rWhfVLlw1lMNCU9TJPTsq/zDP6BVUkerTj1PO7qKXU QaFIXU4gWScx7T121IDw/gHMJjzRlYMsizf+jh/JWCWBb7l1okyeXAsCBQpA/G5og4Nnvu /YezB6OfuaeyJ8yq3q7OrUeCDHBSWM1rUuWbmCTOr1+GdPzSKZ8KZHNuILl4Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759415134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v/+R2i8RNCDAvdNF7Vq5snHjwYMT5dwNMc26ZZnUHaw=; b=sDMW3fqgVIE8DyWr/WrXaF2qCQC8QPXZKpN+bM7NpNtT+ari5SpaNrw3o2VpH5TKqLoi47 oV2cRez6IZEo05WNE5tdiuuMxjPLMmPYXGqaKprESjhqXPfC+Dj62cG0ZvqtyoiDSTuiGs ex+KQwS5Fm4doOEzQBGWlXFcBw07cfSbvHiJf5C7QWdC9AvhAoY+a9NrGWB3EsXk7xm8vd 4/MQ7QWL9ON8/V+3s01/L7S2+0Ej7DjwW6nB64B9arkuukHhS1vax36NRs0N3VgFEzPsdK NdCYC4/KhsnLjZNz5x4aiOt8sM5Tbmn+Yq0QJ1x8E+t3Y1tt/pfAaLT9ToTC5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759415134; a=rsa-sha256; cv=none; b=K/mSro/D09YLYR7Jt8CmrppT1ecetGZJM7ieLPOqUVBguc67FX3rxs4Spfn8XikpFebrWO z+rrb7Dm3NaD/dWRcvyu40HAB8EijWbx8qh32QNRbeoKuTFX5w2h0Ki15XU9hDjikxzUIV ZRRnScmQ86ZjkwCAvJlTdBM6zhjmI+xua9/l7M16/0U66qoTAkr0UjfKmDBGQtb7np9AAA v0PTaR3l7e8X4w/xohFB4IE1RiUvJ87D10hvPJgJPTSNWIWltgj/rCsHR7mBOJ9am5AaZB 7DXFFcYIgo5Z7S3oVqnp7qWOb6X8PB+TW3IHv2NtfwJvJtw3nkP/BLL/fttGvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccvGQ4lpnz1BDK; Thu, 02 Oct 2025 14:25:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592EPYnF034146; Thu, 2 Oct 2025 14:25:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592EPYXH034143; Thu, 2 Oct 2025 14:25:34 GMT (envelope-from git) Date: Thu, 2 Oct 2025 14:25:34 GMT Message-Id: <202510021425.592EPYXH034143@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: f9fc93690aef - main - sys/netinet6: fix memory corruption in in6_ifadd List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f9fc93690aef7a56f62a051de6231fe2af699728 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f9fc93690aef7a56f62a051de6231fe2af699728 commit f9fc93690aef7a56f62a051de6231fe2af699728 Author: Mateusz Guzik AuthorDate: 2025-09-29 15:01:53 +0000 Commit: Kristof Provost CommitDate: 2025-10-02 13:33:17 +0000 sys/netinet6: fix memory corruption in in6_ifadd The routine allocates the wrong size and then passes it to in6_get_ifid. At the same time it violates invariants by issuing malloc with M_WAITOK while within net epoch section. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netinet6/nd6_rtr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c index 78dc55dd292f..f9684b085767 100644 --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -1243,9 +1243,8 @@ in6_ifadd(struct nd_prefixctl *pr, int mcast) /* No suitable LL address, get the ifid directly */ if (ifid_addr == NULL) { - struct in6_addr taddr; - ifa = ifa_alloc(sizeof(taddr), M_WAITOK); - if (ifa) { + ifa = ifa_alloc(sizeof(struct in6_ifaddr), M_NOWAIT); + if (ifa != NULL) { ib = (struct in6_ifaddr *)ifa; ifid_addr = &ib->ia_addr.sin6_addr; if(in6_get_ifid(ifp, NULL, ifid_addr) != 0) { From nobody Thu Oct 2 14:25:35 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ccvGS2D2xz69DMg; Thu, 02 Oct 2025 14:25: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 4ccvGS0GRZz3FML; Thu, 02 Oct 2025 14:25:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759415136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Z5DgNQ5e0leqOIWB9sWXatbLLbv4rWCJ8yYSWvM9Cc=; b=XkhDgh0VrXBh4vkOpXeiIsni5uAot9gqVSaEP5HGbWCaizOenjezkPkLo4sSYq33zahvOt bQw+a0HaaMT9ZYht6Y9+0AGtaA5BSctpeOBW3pze/SFvQiLsgcNRW8MdhlOek/U+x3FAmH LQktAL2Fnyml65IRNW6m3v/JCEeF+dA4nPvzI+SxPDo40apvGw/mnYuxMildid2BSFWZvN 4pgviVpO9w4Pg68OdzYUovds9xb+HRGEXHM2oQ6ZU1Q0mFR+8Dw1tfokVXgls2aif6M+oS Wxm0W016G3Q576PBMWCz4AqLE7N3no6V4+Ba1riJdaL3rGrccEFHwcY6ddGO8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759415136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Z5DgNQ5e0leqOIWB9sWXatbLLbv4rWCJ8yYSWvM9Cc=; b=NHcf7ZIvICeQv0oXiJe+U6Ms0I6DLNuaq7S+dBBis5jCs2Czl8abOj3fYCEG5yoOreq/Fq uM3Cll44mzEAqw+JKdbyNj/rrc3KJEelFydqg5OBHuBpWr3ORgN1kZS8M9r1s+CbX5fP4l YlbUdMJ18dPmEdG8CcZ3BXTZ27j4p8gAdU3t1JMwzk5WJJj8DMB/mtTDHj8mJQBGcES1WU u3jOemD1GQKj8afKH+bWp24KYswRWiL0Cd4YCRonbMQHWfuoLo/6eQUV6FQJFb+qQ9fDh6 t//pNlujyfUPfof/zX8c9E2KvzZHd4wdcKSfBUwF/FMLs2+ZU8r031EPL4gi6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759415136; a=rsa-sha256; cv=none; b=YMjZvpa1+tHyrJE2Wzz8kGBNRdU7MQf5O9kK0bKMJl33kmTQtfMWil3APVy43uJMeZG3/W RQ+zz27C5w5QY/8X1Wbg5ytnnNT4/ueuA8H6+25zq37UNin1b8+1Zun4LqdYDnej1k+xk5 7ztfGdZXgBg2ch3EO8FykwNuESGnARJQIUB9pSgoTRCHs1ydPqHPE/Q+5l8zdfga+6agRT pEUL99xv40EflEFZJbcNv/VwkYH7A/eBUgB3Zj7Xh5783KYMvxUD0o9lOqOqSsEGgz0hg8 lhlDLs0ys900NNOx4B8RyqTsDdiYXcY8Z//YoZ7gtyICWz0/m9d1UeRRZ7oroQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccvGR5hH7z1BFl; Thu, 02 Oct 2025 14:25:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592EPZ1h034188; Thu, 2 Oct 2025 14:25:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592EPZ2i034185; Thu, 2 Oct 2025 14:25:35 GMT (envelope-from git) Date: Thu, 2 Oct 2025 14:25:35 GMT Message-Id: <202510021425.592EPZ2i034185@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: c23b64fba9fb - main - netinet6 tests: accept an RA on an interface without /64 address List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c23b64fba9fb9715397a9e6ecbae670ee791dce9 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c23b64fba9fb9715397a9e6ecbae670ee791dce9 commit c23b64fba9fb9715397a9e6ecbae670ee791dce9 Author: Kristof Provost AuthorDate: 2025-10-02 11:47:33 +0000 Commit: Kristof Provost CommitDate: 2025-10-02 13:33:17 +0000 netinet6 tests: accept an RA on an interface without /64 address Excercise the code introduced in 9e792f7ef729 ("sys/netinet6: Fix SLAAC for interfaces with no /64 LL address"). Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netinet6/ndp.sh | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/tests/sys/netinet6/ndp.sh b/tests/sys/netinet6/ndp.sh index bac9764ee3c9..21a50cda02ba 100755 --- a/tests/sys/netinet6/ndp.sh +++ b/tests/sys/netinet6/ndp.sh @@ -188,9 +188,48 @@ ndp_slaac_default_route_cleanup() { vnet_cleanup } +atf_test_case "ndp_prefix_len_mismatch" "cleanup" +ndp_prefix_len_mismatch_head() { + atf_set descr 'Test RAs on an interface without a /64 lladdr' + atf_set require.user root + atf_set require.progs python3 scapy +} + +ndp_prefix_len_mismatch_body() { + vnet_init + + epair=$(vnet_mkepair) + + vnet_mkjail alcatraz ${epair}a + + jexec alcatraz ifconfig ${epair}a inet6 -auto_linklocal + jexec alcatraz ifconfig ${epair}a inet6 -ifdisabled + jexec alcatraz ifconfig ${epair}a inet6 accept_rtadv + jexec alcatraz ifconfig ${epair}a inet6 fe80::5a9c:fcff:fe10:5d07/127 + jexec alcatraz ifconfig ${epair}a up + + ifconfig ${epair}b inet6 -ifdisabled + ifconfig ${epair}b up + + atf_check -e ignore python3 $(atf_get_srcdir)/ra.py \ + --sendif ${epair}b \ + --dst $(ndp_if_lladdr ${epair}a alcatraz) \ + --src $(ndp_if_lladdr ${epair}b) \ + --prefix "2001:db8:ffff:1000::" --prefixlen 64 + + atf_check \ + -o match:"inet6 2001:db8:ffff:1000:.* prefixlen 64.*autoconf.*" \ + jexec alcatraz ifconfig ${epair}a +} + +ndp_prefix_len_mismatch_cleanup() { + vnet_cleanup +} + atf_init_test_cases() { atf_add_test_case "ndp_add_gu_success" atf_add_test_case "ndp_del_gu_success" atf_add_test_case "ndp_slaac_default_route" + atf_add_test_case "ndp_prefix_len_mismatch" } From nobody Thu Oct 2 14:54:27 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ccvvm0sn3z69Hh8; Thu, 02 Oct 2025 14:54:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccvvl71ggz3LJ6; Thu, 02 Oct 2025 14:54:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759416868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nv9USDPrBHXe6Y/dn93OaryTp1u+MTeUyKmaGV7K+mk=; b=kZlr7IhmOmdjE/7PwNCIq3qy+GaSvm7+FsCXaRPo1zmWKk1CCiWjVxyBT527WD/O6BTtAa mo3oagJE9shyvU37kKSlLQtcckLsF7V2ZaDj//fDaHGee2bZBRAcXaXokEI6T71KXD6bV2 X0qaxxHaNmojMmgYQPkcT1nBSA3FKxrH5fUqq+Vg89SGR8SmWME84DtQX6qV+3NBeO2bSE tv9CX8w1iSaFrObTK/57HP6NLOHfLgihS77WeLfWgqyZgc04r+mX/05VlmIFAmxlHOYmrX SW7hWdDJLpouNZySA+iwksaa36cjNS4xDWetJympZ3C4q9a421vkeFDlhASYIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759416868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nv9USDPrBHXe6Y/dn93OaryTp1u+MTeUyKmaGV7K+mk=; b=JJlYZiWaEpZqXl8IjX96eVXSBhac6JnNk+x/UKCX3xk2lF19kU0b6bubPQkjQPqdCz/8Kt C3XA3i6VvClU1MWOzPuoCfW1rndb4kVXqlWc0WMZLhBXIDhgUP423san7bU9ptdVh+zejo FCMnudiTlF48nakcOukkgqDevCXZVwfssyy/qUOC9TnQmnH779YVNVVqCr4qF5Qcdzar0D oydpeqw6XV96zCHwXZcPcdFzOuvDCrlZVZRIuyv9Mv0ORuOa3NY65vOj7eGY52cLZibTQ0 B1iEkKqGq597/8uPNtzHsr/455DVopdM4ZSOXIGvYRTOwLhrtqa8j1eNhWo9Nw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759416868; a=rsa-sha256; cv=none; b=IScNKM6YLM0fw4z7yC9NqFgm05DjQ/0/1PvM/ogbs014p6Dld84ZPJq2EAHuSXcXGCCXT2 KBvGgAKAuFj2GL7QHnMiUC6e/4IIondnC0CoL+d6C5AluDIEgJwlJdDet1vzp3E4e8bKl+ CL0Wm5pd4ikoX1o+ZUfLBl2kWSHk1YZ59ujMwSOyUu0lC4/9+eriG68J+dyYtDitzYS6TO 5cZpMUm/3WK4WdCgFid2HbuBuazkSOMWo/7GhyrHybvGxWlKg0NsBiXNKBnXnKXoudNkOp xRAK7yrCsHcECExG4c864AchHzDTHe3IXkQ+d8M9pkXgEzNrvxC0c/tshCyw+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccvvl6JkZz1Bth; Thu, 02 Oct 2025 14:54:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592EsRUQ091027; Thu, 2 Oct 2025 14:54:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592EsRHr091024; Thu, 2 Oct 2025 14:54:27 GMT (envelope-from git) Date: Thu, 2 Oct 2025 14:54:27 GMT Message-Id: <202510021454.592EsRHr091024@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: b7118461f909 - main - tcp: improve segment validation in SYN-RECEIVED 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b7118461f9099876cb2c2923948f8fb647defd57 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=b7118461f9099876cb2c2923948f8fb647defd57 commit b7118461f9099876cb2c2923948f8fb647defd57 Author: Michael Tuexen AuthorDate: 2025-10-02 14:51:09 +0000 Commit: Michael Tuexen CommitDate: 2025-10-02 14:51:09 +0000 tcp: improve segment validation in SYN-RECEIVED The validation of SEG.SEQ (first step in SEGMENT ARRIVES of RFC 9293) should be done before the validation of SEG.ACK (fifth step in SEGMENT ARRIVES in RFC 9293). Furthermore, when the SEG.SEQ validation fails, a challenge ACK should be sent instead of sending a RST-segment and moving the endpoint to CLOSED. Reported by: Tilnel on freebsd-net Reviewed by: Nick Banks MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D52849 --- sys/netinet/tcp_syncache.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 778ab0583735..7f842512858d 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -1258,19 +1258,6 @@ syncache_expand(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, } } - /* - * SEG.ACK validation: - * SEG.ACK must match our initial send sequence number + 1. - */ - if (th->th_ack != sc->sc_iss + 1) { - SCH_UNLOCK(sch); - if ((s = tcp_log_addrs(inc, th, NULL, NULL))) - log(LOG_DEBUG, "%s; %s: ACK %u != ISS+1 %u, " - "segment rejected\n", - s, __func__, th->th_ack, sc->sc_iss + 1); - goto failed; - } - /* * SEG.SEQ validation: * The SEG.SEQ must be in the window starting at our @@ -1278,11 +1265,26 @@ syncache_expand(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, */ if (SEQ_LEQ(th->th_seq, sc->sc_irs) || SEQ_GT(th->th_seq, sc->sc_irs + sc->sc_wnd)) { - SCH_UNLOCK(sch); if ((s = tcp_log_addrs(inc, th, NULL, NULL))) log(LOG_DEBUG, "%s; %s: SEQ %u != IRS+1 %u, " - "segment rejected\n", + "sending challenge ACK\n", s, __func__, th->th_seq, sc->sc_irs + 1); + syncache_send_challenge_ack(sc, m); + SCH_UNLOCK(sch); + free(s, M_TCPLOG); + return (-1); /* Do not send RST */; + } + + /* + * SEG.ACK validation: + * SEG.ACK must match our initial send sequence number + 1. + */ + if (th->th_ack != sc->sc_iss + 1) { + SCH_UNLOCK(sch); + if ((s = tcp_log_addrs(inc, th, NULL, NULL))) + log(LOG_DEBUG, "%s; %s: ACK %u != ISS+1 %u, " + "segment rejected\n", + s, __func__, th->th_ack, sc->sc_iss + 1); goto failed; } From nobody Thu Oct 2 15:14:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ccwLS0TQTz69KgR; Thu, 02 Oct 2025 15:14:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccwLR6wnhz3NxS; Thu, 02 Oct 2025 15:14:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759418048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZJY8frJpIAhNa452GqZRO+e/qTcPbNXO1S6F8CI9Lw0=; b=v+AZt0iJyB/vAc7qq8LJUlHxQqwnx3/BOGrRRehZ/W6FZBZQuGmJCa2U1rXEq/HarUJfwl jbKc6QdfKC9rFWIgezvn0+PF9PFdPz0wqkRFmTAV6ssEM/q7VPG+UEXx5ZHrbKKNX0vVZY fTCjHB8cEa0oTVKr4ccc5CI4cRnqZIpDXeE+PWGt0CbscM40nnmNiAmdgsUvoyLXZhws6z 0pqX+uxXTdxykbMOYvRY9S7kkfSwrgnCwfXsB5KGMPggLse1IR/I06DZbSVejGz0SmMkot a4w3O6zEblX8GCR98khsjHQmYAtpYMqOHoIwCBXqvLLgawvWBx3x5qbeMaG/Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759418048; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZJY8frJpIAhNa452GqZRO+e/qTcPbNXO1S6F8CI9Lw0=; b=SgEYncI8GKcidoDm+e7FlYYlXDUNW8N4Z/5IG/tAPuhVARoelN2sH5ZwA7n/6ogYuJYruD 4C9BSKK1ybbztE8VcRqezn+4lYGylCvHgLIJaGtNDZ4OybAFs1bQG0FSzwCqnRwzRlrLt3 EzTgPPSrqizTdSWCNXgY7JX1X1DcubcHZOPm+RgrD7TuMFNnXyfqRF4wYmTYM3NwU8wuNn NrY+nHsrW3pQBggirHGyGpCFR26Q+dICd4c6h3lC7xyuyqyrADvkJp1yLARnZYuJHDLCJN u+/V6FmtsSmPrEmMV1twLkryrYYBlK7W+CE7cGrVhxDZzoxXmB1Bl6qrNvvMLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759418048; a=rsa-sha256; cv=none; b=v3gpI9CbogQDqhy9jQUa1hQwWQ3WXecQEi1vHEY/jBA4jbHPF1+Dj7bADDLw2b/OtWQ1hB eM6ZR9KQbnJPb854efVZhqTarluQPBKuNQJyqFahUFmgpkGWaMh2Xk7v16lUhGM5H0bB7P FVH5u5gjaDLjJFdGQf26e/KFf8BpUnVAIb61WcPZ63ilt1aBLfnz6qBZEE9OdWo67tIqxu zV5X83pAW8YXgE0MwRzimaFifK+eDNBLzUdaZAFZjZ4hGR2SzyiWHgA2WznMbOKxUv7Zok sVeaf2Cs8gbAYtI6EKLd6ylACU3v1ydFvjlOFs9VUO4YQSipY2NaBCC25/B1dA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccwLR6Gl9z1BwY; Thu, 02 Oct 2025 15:14:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592FE7Kj030850; Thu, 2 Oct 2025 15:14:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592FE7VW030847; Thu, 2 Oct 2025 15:14:07 GMT (envelope-from git) Date: Thu, 2 Oct 2025 15:14:07 GMT Message-Id: <202510021514.592FE7VW030847@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 2f7a796b590e - main - thunderbolt.4: Initial manual for HW Relnotes 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: 2f7a796b590e67c5d123f2b00b3aaf7ba7a32a13 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=2f7a796b590e67c5d123f2b00b3aaf7ba7a32a13 commit 2f7a796b590e67c5d123f2b00b3aaf7ba7a32a13 Author: Alexander Ziaee AuthorDate: 2025-10-02 12:05:25 +0000 Commit: Alexander Ziaee CommitDate: 2025-10-02 15:12:48 +0000 thunderbolt.4: Initial manual for HW Relnotes This manual contains nothing and is only suitable for the HW Relnotes, but lets get it in so we have something and then can iterate on it. MFC after: 3 minutes Fixes: 2ed9833791f2 (thunderbolt: Import USB4 code) Discussed with: obiwac Differential Revision: https://reviews.freebsd.org/D52847 --- share/man/man4/Makefile | 1 + share/man/man4/thunderbolt.4 | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index f5d7a0e081fc..6e076722c786 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -589,6 +589,7 @@ MAN= aac.4 \ tdfx.4 \ termios.4 \ textdump.4 \ + thunderbolt.4 \ ti.4 \ timecounters.4 \ tmpfs.4 \ diff --git a/share/man/man4/thunderbolt.4 b/share/man/man4/thunderbolt.4 new file mode 100644 index 000000000000..3477c11fb60d --- /dev/null +++ b/share/man/man4/thunderbolt.4 @@ -0,0 +1,22 @@ +.\" +.\" Copyright (c) 2025 Alexander Ziaee +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.Dd October 2, 2025 +.Dt THUNDERBOLT 4 +.Os +.Sh NAME +.Nm thunderbolt +.Nd USB4 controller driver +.Sh SYNOPSIS +.Cd device thunderbolt +.Sh HARDWARE +The +.Nm +driver supports USB4 controllers. +.Sh HISTORY +The +.Nm +driver appeared in +.Fx 15.0 . From nobody Thu Oct 2 15:14:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ccwLT1qJqz69LCs; Thu, 02 Oct 2025 15:14:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccwLT0Gntz3NsJ; Thu, 02 Oct 2025 15:14:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759418049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gqfpAnd65hjjYjeYE6LRHiDRpCr5EqT58ieaT4R8PoE=; b=AlA/LcMBsU7Geqp8llIUrxTFfXkvLcIgh0y151ErVgShJvi7cCcarIKwcXNrxLKmN1WoMs dA17HK2xY3b1BCQMgpGXjGaAEvfC0UbKNyWTyxNNLiDOcwGIHnUJn1u4pvrl/G7nTM9Ej2 ce6W7sl7UCEdG8h+UqRsCEaisCWEi1fG+xGLMrPEXPBfI/xmBLIPqxKXJb1Tv9udQTRawe cG6uaXffxhQT2YRisPeC4G3tR4l9ajKWgV49lSE8Lra0wExkTHu6IkH6QWHwRcOijQWTDj FyzjngLBTIY2LdLFUB6CXBievkIl2mjb9vdFWWu6Cu3l3k9FCywifuxZm58aWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759418049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gqfpAnd65hjjYjeYE6LRHiDRpCr5EqT58ieaT4R8PoE=; b=On4yrs4xCKBM/UHu3Y1KJLFRXBsscPzutUWBgwAzaevvRCpPOHuHgDlqHVx4nLE2nfKehn XH0PEAJNBXT7eWE6pCO5lVzdfDuTMK2C9bZtgXf3Xo9djKb3013NMzdEv2ait/aFakk8x7 7/5w5fk28y0vsCVch72JTVIJ/F5huITObBxufJA1Pyg3ZXOpRXwIQcmEDC6OMzMq6YP1Iy rLQnZ6B0pM0AAzrxbvY0RWRxpV8BeCY83Eeov9hr4u4g5VDWx8TIge6pk0P7kt9XDV2w0h hx78PKoUPntSXlII5pon+Ozlv4ditqYm02cN5tMdrbW+9RbT/MYqC6l2WgV+3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759418049; a=rsa-sha256; cv=none; b=SEn0/WaGLYc4aXbO2vAAZ1EdWF+0N5B5ZeH/1YXBy5kD31ZTxBCAh+8q5JLMPNxbD3AAnx AmmDAu6zQZ9yOHONFZOOKgYGJDZrAbyiYjTo7m/YsR8T1IIyM6xhvyIdZToSIHRKeYBboI 0ybFaLzDTpDucBp5c7JR9uaFLQKtoiz48mn7Nf2GABuH8/ms3MEDhU5TPTQ+toZQz19rm9 fkinWlONB5raTDgngBR+75atz1yaVNXLC2dx2bzMurzD6vURTWG0mT/XQLR234laet2pjp qpPkflGQKMQ1GYmdNdZzBYuaKYitd6UNi4qmpngBMKJ5amtxBc/2FlC1541z6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccwLS6wvxz1BsH; Thu, 02 Oct 2025 15:14:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592FE8hr030882; Thu, 2 Oct 2025 15:14:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592FE8qn030879; Thu, 2 Oct 2025 15:14:08 GMT (envelope-from git) Date: Thu, 2 Oct 2025 15:14:08 GMT Message-Id: <202510021514.592FE8qn030879@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 0c1c81c479be - main - mmcsd.4: s/DESCRIPTION/HARDWARE + HISTORY + SPDX 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: 0c1c81c479bef8d3e67f93ea00fc5d34ccf5af33 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=0c1c81c479bef8d3e67f93ea00fc5d34ccf5af33 commit 0c1c81c479bef8d3e67f93ea00fc5d34ccf5af33 Author: Alexander Ziaee AuthorDate: 2025-10-02 14:55:18 +0000 Commit: Alexander Ziaee CommitDate: 2025-10-02 15:13:31 +0000 mmcsd.4: s/DESCRIPTION/HARDWARE + HISTORY + SPDX This manual only describes a tiny amount suitable for the HW Relnotes. Remove the description section and replace it with a hardware section which will appear there. MFC after: 3 minutes Reported by: ivy History Ref: 5bcb64f20afff21be511cc5 (Add mmc and mmcsd) --- share/man/man4/mmcsd.4 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/share/man/man4/mmcsd.4 b/share/man/man4/mmcsd.4 index 7466bc546b91..07d7e963b596 100644 --- a/share/man/man4/mmcsd.4 +++ b/share/man/man4/mmcsd.4 @@ -1,4 +1,6 @@ .\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2007 M. Warner Losh .\" .\" Redistribution and use in source and binary forms, with or without @@ -21,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 10, 2021 +.Dd October 2, 2025 .Dt MMCSD 4 .Os .Sh NAME @@ -29,7 +31,7 @@ .Nd MMC and SD memory card driver .Sh SYNOPSIS .Cd device mmcsd -.Sh DESCRIPTION +.Sh HARDWARE The .Nm driver implements direct access block device for MMC and SD memory cards. @@ -42,3 +44,8 @@ driver implements direct access block device for MMC and SD memory cards. .Rs .%T "The MultiMediaCard System Specification" .Re +.Sh HISTORY +The +.Nm +driver appeared in +.Fx 7.0 . From nobody Thu Oct 2 15:25:49 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ccwby2FLfz69Md3; Thu, 02 Oct 2025 15:25:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccwby1Yz9z3RJp; Thu, 02 Oct 2025 15:25:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759418750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JuwNBt4kpBg/Ixj5u9/sF0yaMGK3tszwI2hWfHBf7Gk=; b=f9CvyR+E4xCQ2BSnZ7UuR3oUhoEqsyh3unMszRLZZVap/t7vASWUZCydD8cHdV+7ldLgo6 IHdeGOoHPTsehhoyBTwMma1bBLILXfMGEx+kLrDb1vhLzxc+D+LHwj8oMP3mxcSC6pD3Wv qI0E3EvNWOwqEIRl7yabZITJE7OViVQoLwZy9EXTbb+LzY57uy4ZWwAsFaKG2GxEuZ2fcJ 7arRA8mFvkFFG9AI/jVRBUibxUJTQ+GMudfoida27HPPROZwdn0k6OCDxzatFbrNes4H76 8oLXQsMYwxNNWNpKrGIB3EySrNCvZfk3IFyhO+vCpDMT6Xg2Wwipy8X7O3wD+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759418750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JuwNBt4kpBg/Ixj5u9/sF0yaMGK3tszwI2hWfHBf7Gk=; b=cR8plW+gJ/RqIkYLFsMGmpgjNJo4NbJFZHWJoT/2BdZ0l6yCksEicvPiDKSlat4PVQjUom qGza5f/5mevNl9LtYY/tDt9GONPZzjbakS3F3Dp3Y0fP1jkgE5Uo5gLJSiKgZxE2+/ezmE 6Kdrv25r7RcgRRA5QO540yYYxHY8IV0pnMyn51Mhu2Aq00lhv7emPtjAvruEbgPbQFhCHt 5j3XOjMNtnaf0ldwjZ0TydV+6eLdLlCJvKKzLEyQ3AkskVjeGCgj3qv7N4eIPaKI8uTyrj XswGKaGZzvKrYvS1XFe4sPD4u3+DBFrqV9ggbttu9hDobFZo87TTdXn9d6kD0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759418750; a=rsa-sha256; cv=none; b=DEvUVgHaO1JcaGdL9aqokuPhpkWBT1lniAe5f1XC7uKwyEwomeX4lgMRqXiniiuSZEO7J3 5yzg/AUauAoff8YxyfEvdtLoMPFIlO/qBC5IcahyxZrHsyiTiu/MDtooanmhA/Jb4Y1Miz 3+3xvr6eYpWcJE3hn/YM/x06h1pTvJ/FbYm/Mdb51HxB0IKHT9/nR/dCGlT1dADgn42sLC 1+aucQzyAXDmuPTK0JyIcjzfVhTnOP6qboa0650BbHt3PzVO5B5LvUqzjDaBexvIYtzidR o/LBrgpS1vKZxagDEOAJIL1aPNdEXgyxwe1mSbA1UyFtMNTb5cF9xGkFpML+OQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccwby0byvz1Cq7; Thu, 02 Oct 2025 15:25:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592FPncQ051490; Thu, 2 Oct 2025 15:25:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592FPnIG051487; Thu, 2 Oct 2025 15:25:49 GMT (envelope-from git) Date: Thu, 2 Oct 2025 15:25:49 GMT Message-Id: <202510021525.592FPnIG051487@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 5bba547a678b - main - Cirrus-CI: Use nproc instead of sysctl -n hw.ncpu List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5bba547a678beb280bf4080375f45b04ceb44fc5 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5bba547a678beb280bf4080375f45b04ceb44fc5 commit 5bba547a678beb280bf4080375f45b04ceb44fc5 Author: Ed Maste AuthorDate: 2025-10-02 14:37:19 +0000 Commit: Ed Maste CommitDate: 2025-10-02 15:19:44 +0000 Cirrus-CI: Use nproc instead of sysctl -n hw.ncpu It is available on all supproted FreeBSD versions. Sponsored by: The FreeBSD Foundation --- .cirrus.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 84efa04f1ccb..4e7fd0616949 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -154,10 +154,10 @@ task: - su user -c "git config --global --add safe.directory $(pwd -P)" build_world_script: - - su user -c "make -j$(sysctl -n hw.ncpu) ${EXTRA_MAKE_FLAGS} CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes buildworld" + - su user -c "make -j$(nproc) ${EXTRA_MAKE_FLAGS} CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes buildworld" build_kernel_script: - - su user -c "make -j$(sysctl -n hw.ncpu) CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes buildkernel" + - su user -c "make -j$(nproc) CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes buildkernel" package_script: - su user -c "make CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes packages" From nobody Thu Oct 2 15:35:30 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ccwq62VSkz69MbM; Thu, 02 Oct 2025 15:35:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccwq61q9jz3S6H; Thu, 02 Oct 2025 15:35:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759419330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VLsDC233+6m2PzPtmbS7zZ0WUt8mxSHN7ahJIRDVHrQ=; b=dq6bfm94QRdJFaGXr7JBW1uYEFDTPJpA5aCjD7a3lfB1NbbLdNZmlePM8KEyL1tnngUIXx NRrvZrjIHyxRQZ0xQAJb3bX7peuuMezD3ETexWvcA9j9vRjqh2fkk2Ob7hGyKpW9Cy+TTA /a0PKV4DI7VmEOcZ2YNPjEcBvcKLFseULQEaoZyM13VhJmSoooWPR+l4/eAdm94Cb1vBEB EALWmuBNvUEptLsMAoSrLmiQD4KigFEH5sLi359nDBhYpcwTmDiPOZiNpyNIEW/EmdoEGv HIpq30f05x3B8KH5QQaaZKX5grf7Bn+YC3wbusuDRhxa8a5vpXQD3vrcNaxqQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759419330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VLsDC233+6m2PzPtmbS7zZ0WUt8mxSHN7ahJIRDVHrQ=; b=AeuLNgaeieJJkPdadp0JnbOIHbHs/jtbS16c2sI05GiI281HSEi5ZZ3kDH6VRkDv8l8809 M6FBs2j5IssgwUyylgfi+YBoyPE6j8/rhFQ5P2oHlHrDUmbkjjlygSTTNOASnnvp14gquh McygT+fQzV0fA3bqyHmHDsj2tLuaqxdQSngv54cDs+pOFzo4miriKwvcRfyFzmLASNvsLS 5jJ6s/YaPnHtxZ/mEbjZ0WU+DR4Epp8gVcnumArpZvV9v1sz/3lFq5FG4c0a+YOKS3A+RL YfWVxIVSR+sT8Y8S1VVp1yGYdU65x6F8PfQmFyAo/SqJB03gejfjYubz4ihk0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759419330; a=rsa-sha256; cv=none; b=ebpWELJcEJJqkp33z4kMHeQ0+zhmGXp4yXpQAyYzryoGoWIVUXxvBzQvkM7xvQXcZ1xXFV tu6g1GE+s3vsb3jdA7RWDAHB2c5s/iohkiyORfzej3tFx/8M+ymlp1psZ6z/gSDiGP+sRw 9yluXpqOdFZLbNni/7DYIIZwc5hHDRLCVv/ZrTo/W6DGrz7adZc685DjqVQJ5zR+LyaeHU nN0KgdEtujI90OgOv4eTB9JwhGA2yo5o7Vaz1YFJ2+8fdK48bn8LfAIO0pP14Ww6AWNEi1 0Gr8P+74ao505ntYFGVL9dGTQtiFoxCq28zTg3sapxZweX7TJzsx9PkvymhtNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccwq61Bqpz1Ct0; Thu, 02 Oct 2025 15:35:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592FZUvN070820; Thu, 2 Oct 2025 15:35:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592FZUP6070817; Thu, 2 Oct 2025 15:35:30 GMT (envelope-from git) Date: Thu, 2 Oct 2025 15:35:30 GMT Message-Id: <202510021535.592FZUP6070817@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: e2796f0359af - main - Cirrus-CI: Build packages in parallel List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e2796f0359afad522113c25d720fa30677a044ab Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e2796f0359afad522113c25d720fa30677a044ab commit e2796f0359afad522113c25d720fa30677a044ab Author: Ed Maste AuthorDate: 2025-10-02 14:39:11 +0000 Commit: Ed Maste CommitDate: 2025-10-02 15:35:06 +0000 Cirrus-CI: Build packages in parallel Reviewed by: ivy Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52857 --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 4e7fd0616949..a282ddf789ed 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -160,7 +160,7 @@ task: - su user -c "make -j$(nproc) CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes buildkernel" package_script: - - su user -c "make CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes packages" + - su user -c "make -j$(nproc) CROSS_TOOLCHAIN=${TOOLCHAIN} WITHOUT_TOOLCHAIN=yes packages" package_check_script: - su user -c "/usr/libexec/flua tools/pkgbase/metalog_reader.lua -c /usr/obj/$(pwd -P)/${TARGET}.${TARGET_ARCH}/worldstage/METALOG" From nobody Thu Oct 2 15:38: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 4ccwt329h3z69NRY; Thu, 02 Oct 2025 15:38: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 4ccwt314fhz3Skk; Thu, 02 Oct 2025 15:38:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759419483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pKuFtf+4z3R/mSoauI19tfYxBLSZYnaBHSyTYInuC7M=; b=N1Q8wLEenclpMifqowOVvnpjO6gHh1Z+np7lCg12oX/Ikk7y7xRqwytxSUn/2fveIJKWa+ 1kY+JyLTOeMKqc+6nwGFJRFoRkLnKh5KqUqZ9eubv9cd8JPsGtUNzu7ShgDFgDc6/y1RUZ dixr80mBats0beKrbFkZUB0w17Kxu9PFlWaKLPEVaWED2dFumUD7vtV0xuKSRzaid2tX2p brrBT2MY+nJuze7fWV8APOJWVI1DDc/El+WeowkVjcv80ukJeyT+mhXFP+A50zEW59MQa4 17k+zlNw7yvxRjD8Dm67npNbaHesRjw8ymdO6d7G5CXViU61Rn8VKN9MEpxmCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759419483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pKuFtf+4z3R/mSoauI19tfYxBLSZYnaBHSyTYInuC7M=; b=CanGBw5uktNhz8QMi6ilO+JKk8yiSJYjLtRnmjR7SgfjevuddvwcSuXq4GlQ/KDUbEN2Of pi+4fdCI5K9D9Oqb6X1iaIW2i4rHMz/luFLmw+z6RmHeBCyT8PHT74Z5kHCjIkqD6eOGoi zrpPDfBQ33tYkj1wOPWS5hj5nNauwaCCYCmxdkqPmRa/iZL+j+uJNUvYD6AoyFh0WvcrBI YzZnxLuXeSiL3w44sCqsy5K0UU/9n7ucTa+8fq2NbZ/TJFI80JLQRvKHsyX0xZisHE4NGE ILta6Mxs56ihAUBZt4JZpMWKJRxoU7VtowOGoH1G/blzgCsjOcmoFl0Bp0chKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759419483; a=rsa-sha256; cv=none; b=TMXi2l0YNlS51notwSygWMRJyHw+iL+hb7m2ZVbtVez90jQ8YJ/o955/ujHR1TLUOydOvw MMtowA8CR3OT+f/qDRSoeE70jFN83meGrW25LpcB8IACfXW80g+b4BMiz/06C8z7EQ/+A7 QQe7QG+M487jaP0U5U0XcnhkoIgAKohy2lPgM8lPiQJT7OO+8t8sVuzAHL39GP2UaBhkmn fj/wbC0VObDrrvbR1mAvi1H//pbShmpKDDSg0d6CG38iQ3ZWZaw5zv2NwSq64T/mrHhqmW XWcO4W5hdyQb4uihSbAAk47bLHrhsQXMLl6OL2frNF7wAoPZRPRlWQbAkqxIOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccwt30d9sz3m; Thu, 02 Oct 2025 15:38:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592Fc2VC071851; Thu, 2 Oct 2025 15:38:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592Fc2X2071848; Thu, 2 Oct 2025 15:38:02 GMT (envelope-from git) Date: Thu, 2 Oct 2025 15:38:02 GMT Message-Id: <202510021538.592Fc2X2071848@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: e4e412e45a17 - main - thunderbolt.4: Mention Thunderbolt 3 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e4e412e45a17d2f63f6693d41b274379d108c82f Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=e4e412e45a17d2f63f6693d41b274379d108c82f commit e4e412e45a17d2f63f6693d41b274379d108c82f Author: Alexander Ziaee AuthorDate: 2025-10-02 15:27:43 +0000 Commit: Alexander Ziaee CommitDate: 2025-10-02 15:37:12 +0000 thunderbolt.4: Mention Thunderbolt 3 MFC after: 1 hr Reported by: emaste Fixes: 2f7a796b590e (thunderbolt.4: Initial manual) --- share/man/man4/thunderbolt.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/thunderbolt.4 b/share/man/man4/thunderbolt.4 index 3477c11fb60d..fd7cb1f3f338 100644 --- a/share/man/man4/thunderbolt.4 +++ b/share/man/man4/thunderbolt.4 @@ -14,7 +14,7 @@ .Sh HARDWARE The .Nm -driver supports USB4 controllers. +driver supports Thunderbolt 3 and USB4 controllers. .Sh HISTORY The .Nm From nobody Thu Oct 2 16:18:04 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ccxmF1ghnz69T2n; Thu, 02 Oct 2025 16:18:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccxmF1BMmz3Zls; Thu, 02 Oct 2025 16:18:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759421885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qwl8GA9/RJ9N6l45QYmmiVj4hkCtxXjFsyhur5diugE=; b=Kd+XNBDY5COxWhEqQk9gD5JhSDQj5+8spUFcyE8hvrzWfdqi0JTI9gGgbU/D+qRSCKFi6n KDSQSnWcvsIHito23zjF4gxWnOqOAXOT9Y3O3vzObJJ0fLqqQ2Xb1lCG2crww/rR32RkgI /uVrQ39BKB+r+tDSgcBM97K0/zhaEcSHhcmU4n42yrLTwkod2u0UM2rrJ5+p+/+otj8F3g GfOFsNR4+APnkFVwQogqd+aZBWCnFCSpzoE2qROP4YktdLelYpKnWM5cLW2V3F8tD1/ShR wJdGsvErG7g75+k9DgzacXPB4Avrz89SP+7QQa3ZM5kvzYT+lV48YV5NIQxEOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759421885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qwl8GA9/RJ9N6l45QYmmiVj4hkCtxXjFsyhur5diugE=; b=e/ki0AkhpZNyyVcCB6WAmlRqJIn2mAbUIor5PqjXVUjAXUpPELDEe2E9MRB32uTP1JDAQp dDIuTBJPU2Dz0B8cduv7O4uNy3FUJOZTBvcgFmQ5FxcWB205C3jrYYTAF1RCkqQzmehlFQ iWMt5zc4mwO11TGv6i02a9cCWzQxdfZxkTymEAi9rvSU/pTHpxtldTXENUFGkU0T2QWlk/ xwmA9zz2TkJm/RimCQrASBIDKwv2s8I49Aj3Q6ywgukd1qpxkIzJUAQ+G7kVHcZbOkMKpu 6B6Acw6iAD/tuEC4sTMt2IJn27qVAxyfeaFgnWL17HFkiraibXm8P+DrwBj+wA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759421885; a=rsa-sha256; cv=none; b=m04XyF1U4yvYOiOhqWendSpVLhvM78RTmzqOcNvckUG1u/BU5NgeGyjEZGVdcyuYfYf8Hy SRW4grFnet1IfFFeLVuAtmepbuxI9KAkIDd4ZyymDAlgQkIMpkIhnlH9+5RPi1r2ARHFCe lWHZFVAawCBtXG+EOEkR798PuzXrruLvs8M/ra6iEsbVI3eAz7NxTKrFngMTqgaHNypE07 SmrSqnE6u6ntqVqq9NxBjVLqtp+s6jQZhR4CR3AW0s7wACbzYPvGesUTJt2nBQobkryhuw xv2d00qLFFzTun4WpSD+XT/pvuchYAuh8a6s7WmHH+rZK94oivZpu+cbPwr6Vg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccxmF0WK7zwn; Thu, 02 Oct 2025 16:18:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592GI4tE049689; Thu, 2 Oct 2025 16:18:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592GI40e049686; Thu, 2 Oct 2025 16:18:04 GMT (envelope-from git) Date: Thu, 2 Oct 2025 16:18:04 GMT Message-Id: <202510021618.592GI40e049686@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 7b18bf2a225a - main - usbhid.4: Note that it was enabled by default for 15.0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7b18bf2a225af348c2d56ad345862fe0f1055839 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7b18bf2a225af348c2d56ad345862fe0f1055839 commit 7b18bf2a225af348c2d56ad345862fe0f1055839 Author: Ed Maste AuthorDate: 2025-10-02 16:14:35 +0000 Commit: Ed Maste CommitDate: 2025-10-02 16:17:53 +0000 usbhid.4: Note that it was enabled by default for 15.0 Also add cross-references to hkbd.4 and hms.4. Sponsored by: The FreeBSD Foundation --- share/man/man4/usbhid.4 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/share/man/man4/usbhid.4 b/share/man/man4/usbhid.4 index e5ba370cd025..4c7f254bdace 100644 --- a/share/man/man4/usbhid.4 +++ b/share/man/man4/usbhid.4 @@ -21,7 +21,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 30, 2025 +.Dd October 2, 2025 .Dt USBHID 4 .Os .Sh NAME @@ -70,6 +70,8 @@ Default is 0. .El .Sh SEE ALSO .Xr ehci 4 , +.Xr hkbd 4 , +.Xr hms 4 , .Xr ohci 4 , .Xr uhci 4 , .Xr usb 4 , @@ -80,6 +82,8 @@ The .Nm driver first appeared in .Fx 13.0 . +It was enabled by default in +.Fx 15.0 . .Sh AUTHORS .An -nosplit The From nobody Thu Oct 2 16:22: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 4ccxrx64f8z69TXb; Thu, 02 Oct 2025 16:22:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccxrx4MHNz3bVl; Thu, 02 Oct 2025 16:22:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759422129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z+zre2oKEYz2XenXh0/ydw8e5YTxRafEhAbJ6hW8kIs=; b=B1A0RpgZbyUaQYbM9B/g3UcHuEevlVjOJysxTin0JdOIzaiA8PMUNQwhbgP1Nz5MsnRkbI e82Fyh+8T765e5ng3WIM0Ni+iBjA0Ue6loPpHL2h2hvfWF2dqUZllKi5b2R4wKiAwhDBVu UKEEVGFyOah7yBouTQB/1v/PP5RJkrKGUuEvzp7xrqII17BXButakmewQKVV42bOzSZtuS lsUZ1943K7e39oYGon+eNXMoHoWPdxpIxi0J9+BGl0Bydk7+ErN1BED1mFzYRbBCxC5djQ bXGnpCcLO0MCP1lrNJv3V1DhgKVa6OldnXLV+wXKgzWs56CSG7FfpzfsRnpLlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759422129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z+zre2oKEYz2XenXh0/ydw8e5YTxRafEhAbJ6hW8kIs=; b=mRc3z37b8TH4KzYGHaDFycruvo94rMgnSHxXRKTSzSDefRoy45ckNqaydw01EcJn/Q4T+M qOGdz3rHsPJ2S4GR2jReNXVxbRms99AlAniavt4169aCRIrcv2/hqNG+k7WQEVB4vVzi2c kfVBit4xFa6JKlYKXltpWvR7iVfUZ/vYzz2sLsMQuzt2vZudSzMjN8LHgpoG/fgOj6Icwa 0Z+K0toJge5wEStCy7Vtqw7nPQOIUXEta59qK606GcGLvNj6WfanYWZyRdOhUFFR2HoyBJ PnmZI3FX8CznmKQtQ7zRaSNjayXnQrAx1DJC4S6Y+HDkRHNkh2FsZd4IEFT1lA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759422129; a=rsa-sha256; cv=none; b=gJwle0s8O3WdCsGgQF0QnSmt1V0QO68lckl1dEooz7Uc5HXCsdOdECTbgXvzSZtOLL2hKk bFdSPVwFKKI3m690DPqMBgCK4Jhe9PwXXWXp2E+B3X1qyOJGA98W8csq24kMwOQ0BFt1cg Cb1uj6BoFkefiNPmYGjElqZsAu0CA/oa6K21sdRhxw2vYkZt/qnfYJB/kUylXfYaI4i5uV o95y6XnSZ3uAOHGL1Ee2pdNcZBEHvTklfKbURe7FCfp0bqHCz45f2N0gLMjmRuXhhUt8oX 0ZAk43pP78PxrK357emHFwGdDQ/Z6/u1+ZSzUaaGelBfcWI6YbEMHPoQKGTgjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccxrx3mJ7z1B3; Thu, 02 Oct 2025 16:22:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592GM9Pe065985; Thu, 2 Oct 2025 16:22:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592GM9Ll065982; Thu, 2 Oct 2025 16:22:09 GMT (envelope-from git) Date: Thu, 2 Oct 2025 16:22:09 GMT Message-Id: <202510021622.592GM9Ll065982@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: c1723bbe2aa7 - main - arm64/vmm: Clear all pmc fields 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c1723bbe2aa7f6c8b23d3aa97379d89e883b0a93 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=c1723bbe2aa7f6c8b23d3aa97379d89e883b0a93 commit c1723bbe2aa7f6c8b23d3aa97379d89e883b0a93 Author: Andrew Turner AuthorDate: 2025-10-02 15:34:23 +0000 Commit: Andrew Turner CommitDate: 2025-10-02 16:21:33 +0000 arm64/vmm: Clear all pmc fields When clearing pmcntenclr_el0, pmintenclr_el1, and pmovsclr_el0 clear all bits as new fields may be added in the upper 32-bits. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D52801 --- sys/arm64/vmm/vmm_hyp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arm64/vmm/vmm_hyp.c b/sys/arm64/vmm/vmm_hyp.c index 345535318f6e..c6eeca28b712 100644 --- a/sys/arm64/vmm/vmm_hyp.c +++ b/sys/arm64/vmm/vmm_hyp.c @@ -338,11 +338,11 @@ vmm_hyp_reg_restore(struct hypctx *hypctx, struct hyp *hyp, bool guest, WRITE_SPECIALREG(pmccntr_el0, hypctx->pmccntr_el0); WRITE_SPECIALREG(pmccfiltr_el0, hypctx->pmccfiltr_el0); /* Clear all events/interrupts then enable them */ - WRITE_SPECIALREG(pmcntenclr_el0, 0xfffffffful); + WRITE_SPECIALREG(pmcntenclr_el0, ~0ul); WRITE_SPECIALREG(pmcntenset_el0, hypctx->pmcntenset_el0); - WRITE_SPECIALREG(pmintenclr_el1, 0xfffffffful); + WRITE_SPECIALREG(pmintenclr_el1, ~0ul); WRITE_SPECIALREG(pmintenset_el1, hypctx->pmintenset_el1); - WRITE_SPECIALREG(pmovsclr_el0, 0xfffffffful); + WRITE_SPECIALREG(pmovsclr_el0, ~0ul); WRITE_SPECIALREG(pmovsset_el0, hypctx->pmovsset_el0); switch ((hypctx->pmcr_el0 & PMCR_N_MASK) >> PMCR_N_SHIFT) { From nobody Thu Oct 2 16:22: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 4ccxry6VdWz69TXh; Thu, 02 Oct 2025 16:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccxry4s4Qz3bSX; Thu, 02 Oct 2025 16:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759422130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l8wOg+YYXSlfwBQZsRacT7Y6S9zJr7SETWhvCIktd4c=; b=w76Pz3Z05i4h1gn41Oo3wtk3tKqXO3gdWfGEfc7PTyrgJEoY06MsJOaEjSeWBD/X10+9xD LTpxmWocL5j81FsCrDIJHgIG2ZzQFwAgdGf32dExjrGT3Pc1pdNrHoRcq7TJNfj17ze7+p 7dZ/C6o7EL6d7r+teBhreQSPhl8tv55NCmhwNmK3YTNzGYKvX6dbUJ83MRHlk90TM9qgAn FdnVF6+GzNieCDE9DEeuXHL+cHSxUJLdtF84rQzgxW+xh4N7ukz1k0mB0wHjWSUrF++jVr 8RH122cJLAcsZMBx4T9Dz/9+QrJF52TMZ2z0PUbRrP8L5ULMI8qsHsYmnfs4hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759422130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l8wOg+YYXSlfwBQZsRacT7Y6S9zJr7SETWhvCIktd4c=; b=KxJi6GMLY2hyAz+zNU8uY9HUQhnClTTh1/b9ocuosNISTOVYgkJgGqAVNTcHk9ZeVB0hVg DzEYhTFzVMj7+Iq4MarFWC0WBVl9D1QbMdJqsRKzPBqFhs7VzIZJ0LjNBB6mPHP1sRz7LH JWrTyzeOeWML6e+vVEraQzih7uhTZ1i3zBm63FHBmgSRIfzDrhoRdTQHOXWCddcuzDf0Q0 60s11ty+qhqfXTiVxL2SbUZ/hCN08QQR1aVprre5L7ApiGDEtzCsN5s6IZTL02Hw6xsM0u UdYNeheZSYfzIAgpDc1BlG7zMnQBTuiOgpDSahAvS5Nk1e3OJ/PPCSYh8qQu3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759422130; a=rsa-sha256; cv=none; b=ESmckuASt4eZ/TZvlVjRVGNi0GVhbc6USBPXEYRDVZQ28RhU3wV9HBhyCa+5UhkUowSldZ wIDyga3qiWJhrd0gazdpeDMugOv2ty7PpFC9lOAdVXARoCrBHV385ojwvyhmYQ3fmh+Jvs HSPUIab0GNGnstWwfjR9h30WJIhEY/8m5Z8FWFweLaBH1XdTECBc+zoJtLSC/paG7tAYnl 0jyLFV6jsXbE8ixeWdyb1w4hJuV/Eo9KeAEDypbO476pcHEyvn9arAMVfA7I4Sm8xJfDdk ZzfSa4cDEY9zL1xL8VXLGsSOLboXJFg63kmcUAJ6R9QtgFX2Qz3NBvozzLhUsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccxry4SPSz1Nk; Thu, 02 Oct 2025 16:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592GMAWf066023; Thu, 2 Oct 2025 16:22:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592GMAJq066020; Thu, 2 Oct 2025 16:22:10 GMT (envelope-from git) Date: Thu, 2 Oct 2025 16:22:10 GMT Message-Id: <202510021622.592GMAJq066020@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 35d0c9efb17a - main - arm64/vmm: Save more PMU registers 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 35d0c9efb17a9a7fea57c3a4a056141b21dad18f Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=35d0c9efb17a9a7fea57c3a4a056141b21dad18f commit 35d0c9efb17a9a7fea57c3a4a056141b21dad18f Author: Andrew Turner AuthorDate: 2025-10-02 15:34:35 +0000 Commit: Andrew Turner CommitDate: 2025-10-02 16:21:33 +0000 arm64/vmm: Save more PMU registers These were missed in the initial vmm.ko change. While here keep the order the same in all locations we handle these. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D52802 --- sys/arm64/vmm/arm64.h | 5 +++-- sys/arm64/vmm/vmm_hyp.c | 8 +++++++- sys/arm64/vmm/vmm_reset.c | 4 +++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/sys/arm64/vmm/arm64.h b/sys/arm64/vmm/arm64.h index 82c4481b8692..29279f16d151 100644 --- a/sys/arm64/vmm/arm64.h +++ b/sys/arm64/vmm/arm64.h @@ -78,11 +78,12 @@ struct hypctx { uint64_t pmcr_el0; /* Performance Monitors Control Register */ uint64_t pmccntr_el0; uint64_t pmccfiltr_el0; + uint64_t pmuserenr_el0; + uint64_t pmselr_el0; + uint64_t pmxevcntr_el0; uint64_t pmcntenset_el0; uint64_t pmintenset_el1; uint64_t pmovsset_el0; - uint64_t pmselr_el0; - uint64_t pmuserenr_el0; uint64_t pmevcntr_el0[31]; uint64_t pmevtyper_el0[31]; diff --git a/sys/arm64/vmm/vmm_hyp.c b/sys/arm64/vmm/vmm_hyp.c index c6eeca28b712..b7a621c782b7 100644 --- a/sys/arm64/vmm/vmm_hyp.c +++ b/sys/arm64/vmm/vmm_hyp.c @@ -180,10 +180,13 @@ vmm_hyp_reg_store(struct hypctx *hypctx, struct hyp *hyp, bool guest, hypctx->pmcr_el0 = READ_SPECIALREG(pmcr_el0); hypctx->pmccntr_el0 = READ_SPECIALREG(pmccntr_el0); hypctx->pmccfiltr_el0 = READ_SPECIALREG(pmccfiltr_el0); + hypctx->pmuserenr_el0 = READ_SPECIALREG(pmuserenr_el0); + hypctx->pmselr_el0 = READ_SPECIALREG(pmselr_el0); + hypctx->pmxevcntr_el0 = READ_SPECIALREG(pmxevcntr_el0); hypctx->pmcntenset_el0 = READ_SPECIALREG(pmcntenset_el0); hypctx->pmintenset_el1 = READ_SPECIALREG(pmintenset_el1); hypctx->pmovsset_el0 = READ_SPECIALREG(pmovsset_el0); - hypctx->pmuserenr_el0 = READ_SPECIALREG(pmuserenr_el0); + switch ((hypctx->pmcr_el0 & PMCR_N_MASK) >> PMCR_N_SHIFT) { #define STORE_PMU(x) \ case (x + 1): \ @@ -337,6 +340,9 @@ vmm_hyp_reg_restore(struct hypctx *hypctx, struct hyp *hyp, bool guest, WRITE_SPECIALREG(pmcr_el0, hypctx->pmcr_el0); WRITE_SPECIALREG(pmccntr_el0, hypctx->pmccntr_el0); WRITE_SPECIALREG(pmccfiltr_el0, hypctx->pmccfiltr_el0); + WRITE_SPECIALREG(pmuserenr_el0, hypctx->pmuserenr_el0); + WRITE_SPECIALREG(pmselr_el0, hypctx->pmselr_el0); + WRITE_SPECIALREG(pmxevcntr_el0, hypctx->pmxevcntr_el0); /* Clear all events/interrupts then enable them */ WRITE_SPECIALREG(pmcntenclr_el0, ~0ul); WRITE_SPECIALREG(pmcntenset_el0, hypctx->pmcntenset_el0); diff --git a/sys/arm64/vmm/vmm_reset.c b/sys/arm64/vmm/vmm_reset.c index 79d022cf33e8..c4102277131d 100644 --- a/sys/arm64/vmm/vmm_reset.c +++ b/sys/arm64/vmm/vmm_reset.c @@ -100,10 +100,12 @@ reset_vm_el01_regs(void *vcpu) el2ctx->pmcr_el0 |= PMCR_LC; set_arch_unknown(el2ctx->pmccntr_el0); set_arch_unknown(el2ctx->pmccfiltr_el0); + set_arch_unknown(el2ctx->pmuserenr_el0); + set_arch_unknown(el2ctx->pmselr_el0); + set_arch_unknown(el2ctx->pmxevcntr_el0); set_arch_unknown(el2ctx->pmcntenset_el0); set_arch_unknown(el2ctx->pmintenset_el1); set_arch_unknown(el2ctx->pmovsset_el0); - set_arch_unknown(el2ctx->pmuserenr_el0); memset(el2ctx->pmevcntr_el0, 0, sizeof(el2ctx->pmevcntr_el0)); memset(el2ctx->pmevtyper_el0, 0, sizeof(el2ctx->pmevtyper_el0)); } From nobody Thu Oct 2 16:22: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 4ccxs02pTLz69TDq; Thu, 02 Oct 2025 16:22: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 4ccxrz67n5z3bKb; Thu, 02 Oct 2025 16:22:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759422131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F3+cecWxAAxSh/X8Rg72VsPtalodUY/musilJ4hV/tQ=; b=Q+MoSqruGuQvKwpQciMbtHSIHSWhZSAqfmV2MaX5RYdJ2RIXGL6ETtI6efbeVHSsbbCxdB lV0j2oY2yQ8gWPxasJiqWaXLZTEuDZvtjg7tghThpabh3bfg6SpaEk8tVrRabRNJa3hNym t268mDlbC2JDyhO8zofILhwji71iQcgvuQgUpJweeWTCsfAe2kGoolTzkE8W8xALhiB9Me dNBrBWOlsysjPM5gnj5k/N2zdwVyJbmB7cPTRrOWYdtigYe6es3igj5/IC3lmPaGVX/2e1 y0hHqbLWBXQOjienJgI/dFnkkWkUcZrOXSlvwr8F1qHs8rFoKTO3qFNYyJt16A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759422131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F3+cecWxAAxSh/X8Rg72VsPtalodUY/musilJ4hV/tQ=; b=DshiAOZ+exOiNpv3UxdVTBIErt66gHx3usTxu1cDtHx8s79HUqyOaE79dGXp7Qdo/XAvYA jYqPq6lTjyama7lSVp8SvVv07RwvvgPaAn1o7Lgs+hd9RqfUoQLowoSmfpWBNZI7wVcbnX 0PC/mAh0/+8W2uZUeki6L11Ve2yDvnVaPl6vIcJPmcXXvM768/AdwHK99cM/nNKjh1aFM6 t2b4rR9eqmdncIcntv6C9M61hxSnTQaMoPVzPu4a1hNZU77cJNwscHkcqSyI7ooEuc1OeI G4E749xb43brD2E/TYdE2M1KoRSO0bgbY5UOW8Z0z2nwOq8h8J1Ap1TbZDYUwg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759422131; a=rsa-sha256; cv=none; b=x7QymwkO/uhJM2FOoNWZ3DGyEJJyTLx5+SA868sz60P5Sw8TKm5I3U/w+yqnuqFccDytwE x4o+RvnGEeovs7Xg5Wkgc6c3Dw+9vZnzFxnuy9gBcliInmobrVyVMNy0lAkJXTYCZ+aI3Q xVqKlNuAj4FA8G2kb8mB6FGZQbCV/YYCXkoYaDVkf3gH0543N2mOeYQrCluFxui3TGjGfz mC4NXHG1oYwBMdTc4s3esmEQGBsb4kq4zfKPGGmKx4GR5PqoCerKLTeWGAqAofAi+tvilb 4XD4st9XoJyNujDQwmKnP7s8R8nUScKduqJkXvOxnxhOVj8D3Ouo/8dGcjVq4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccxrz5l2KzhL; Thu, 02 Oct 2025 16:22:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592GMBn2066055; Thu, 2 Oct 2025 16:22:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592GMBr3066052; Thu, 2 Oct 2025 16:22:11 GMT (envelope-from git) Date: Thu, 2 Oct 2025 16:22:11 GMT Message-Id: <202510021622.592GMBr3066052@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 4954ec00c420 - main - arm64/vmm: Save dbgclaimset_el1 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4954ec00c4200d8bfd29875fc13f541942209824 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=4954ec00c4200d8bfd29875fc13f541942209824 commit 4954ec00c4200d8bfd29875fc13f541942209824 Author: Andrew Turner AuthorDate: 2025-10-02 15:34:43 +0000 Commit: Andrew Turner CommitDate: 2025-10-02 16:21:33 +0000 arm64/vmm: Save dbgclaimset_el1 It may be used by the guest. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D52803 --- sys/arm64/vmm/arm64.h | 1 + sys/arm64/vmm/vmm_hyp.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/sys/arm64/vmm/arm64.h b/sys/arm64/vmm/arm64.h index 29279f16d151..334b795832a3 100644 --- a/sys/arm64/vmm/arm64.h +++ b/sys/arm64/vmm/arm64.h @@ -87,6 +87,7 @@ struct hypctx { uint64_t pmevcntr_el0[31]; uint64_t pmevtyper_el0[31]; + uint64_t dbgclaimset_el1; uint64_t dbgbcr_el1[16]; /* Debug Breakpoint Control Registers */ uint64_t dbgbvr_el1[16]; /* Debug Breakpoint Value Registers */ uint64_t dbgwcr_el1[16]; /* Debug Watchpoint Control Registers */ diff --git a/sys/arm64/vmm/vmm_hyp.c b/sys/arm64/vmm/vmm_hyp.c index b7a621c782b7..b8c6d2ab7a9a 100644 --- a/sys/arm64/vmm/vmm_hyp.c +++ b/sys/arm64/vmm/vmm_hyp.c @@ -121,6 +121,8 @@ vmm_hyp_reg_store(struct hypctx *hypctx, struct hyp *hyp, bool guest, } } + hypctx->dbgclaimset_el1 = READ_SPECIALREG(dbgclaimset_el1); + dfr0 = READ_SPECIALREG(id_aa64dfr0_el1); switch (ID_AA64DFR0_BRPs_VAL(dfr0) - 1) { #define STORE_DBG_BRP(x) \ @@ -394,6 +396,9 @@ vmm_hyp_reg_restore(struct hypctx *hypctx, struct hyp *hyp, bool guest, #undef LOAD_PMU } + WRITE_SPECIALREG(dbgclaimclr_el1, ~0ul); + WRITE_SPECIALREG(dbgclaimclr_el1, hypctx->dbgclaimset_el1); + dfr0 = READ_SPECIALREG(id_aa64dfr0_el1); switch (ID_AA64DFR0_BRPs_VAL(dfr0) - 1) { #define LOAD_DBG_BRP(x) \ From nobody Thu Oct 2 16:22: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 4ccxs12yWSz69TvJ; Thu, 02 Oct 2025 16:22: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 4ccxs06xL0z3bXq; Thu, 02 Oct 2025 16:22:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759422133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pAtRoWDcILgcQwrg3kRaSiEyfnhbk4Rjf1baV2q1KQo=; b=LBnAQbhv8Fvga1GYRpbtU/XF7zg5Sq5vAoucxiPMDsuxGe+kzK/mxcNM0SfwVNNgalfSdv 5+wTDeD7D+MfviER0ZkDAI+LFh+Txq5P52e4lDWYfcPMhSVgmirRoGlei3cqSa/1zzWoxU 3RyrHCw71xIL2xPjWX8qPaB0HUj2BOjc7Os7RiXmAUxtkg4KBWBgAP2nMEghmPYg6dEEG7 fKfPt7mKGSwo9aew4j2C1FFkhQwY8NQ94HgV7ffYKYjTM1OetC3nZ4dKyYTA1U+2mjkdlP ln/YAvWN9OZWMk6nzxcn/MUASLzeNmXxT8m4yEJgXwRSpt6S/BHwa1vxL3WxBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759422133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pAtRoWDcILgcQwrg3kRaSiEyfnhbk4Rjf1baV2q1KQo=; b=OHUO36ISaiHQeZxQphyGC562l3Ur2Vr/iTYyy1ledt0A9mrJI4vs+4dp0AMb4Tnj0ZUTEb dQBKZ/heRtsUMoOEJKuZlsP0CizcngYu/hy6y47qzMTBjyR2QaP5XfE63hmR1RtCltY4DO C9b72o7YQQvz9F3NnXGcyk53qVYn8MJwTSeSJ3np0NUhIJxbbb8UPfBFgJCqScuJV9WktW mpeVtGWfVLdRDxx3MO6ZG/zh2iVQAruDTYnMVBlJvKiS/l+4MZk8Kd/bXPm2vH7D+fB4WU 7xFp+p2x+5m2Pw6Df4eo58RNi22Rk4B2Zz2DlbCMLtDv2ZJ1H3oPwzzgsMv8mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759422133; a=rsa-sha256; cv=none; b=Cm+xrJXMlTcX4kx2eZQgfKJLHgwd3fZyDY7aTPVOEsHzND7L/sXFY02UhoFisNyu1xrmb7 nnYh7Jo3hO2eLTIETez2jWN0KbsTOkLbJL6WE3u3eR/a3jcuACi0oI7Y6/I21Q4egrdI8U n7kPWPcm509bBYkdOqX+lIFov21EuQh/yH1TCnnZleH9eFi1QRzhLOG1VWWB1v0HCIcotE gOZHjgyGuRLGGfJF1W8lMxc/yQLPsUjVQP7CztOfoxU8xaXCD45QKHfYIXs1db/o1Em/IB DK/jxkv1NZKfZXOkpgj5JRLEybXTJ8ygycXEpL5dCq++iZcxN5esWih9rmfz6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccxs06HDmz17Q; Thu, 02 Oct 2025 16:22:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592GMCjh066093; Thu, 2 Oct 2025 16:22:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592GMCof066090; Thu, 2 Oct 2025 16:22:12 GMT (envelope-from git) Date: Thu, 2 Oct 2025 16:22:12 GMT Message-Id: <202510021622.592GMCof066090@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: d552556b7e6d - main - arm64: Rename the MDCR_EL2 macros 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d552556b7e6d226887ebb6da30e4f1dcff3cb407 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=d552556b7e6d226887ebb6da30e4f1dcff3cb407 commit d552556b7e6d226887ebb6da30e4f1dcff3cb407 Author: Andrew Turner AuthorDate: 2025-10-02 15:34:54 +0000 Commit: Andrew Turner CommitDate: 2025-10-02 16:21:33 +0000 arm64: Rename the MDCR_EL2 macros To be consistent within the register prefix all fields with MDCR_EL2_. Reviewed by: emaste Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D52804 --- sys/arm64/include/hypervisor.h | 60 +++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/sys/arm64/include/hypervisor.h b/sys/arm64/include/hypervisor.h index 04e15b55b218..894da24c7a16 100644 --- a/sys/arm64/include/hypervisor.h +++ b/sys/arm64/include/hypervisor.h @@ -373,35 +373,35 @@ #define MDCR_EL2_TDOSA (0x1UL << MDCR_EL2_TDOSA_SHIFT) #define MDCR_EL2_TDRA_SHIFT 11 #define MDCR_EL2_TDRA (0x1UL << MDCR_EL2_TDRA_SHIFT) -#define MDCR_E2PB_SHIFT 12 -#define MDCR_E2PB_MASK (0x3UL << MDCR_E2PB_SHIFT) -#define MDCR_TPMS_SHIFT 14 -#define MDCR_TPMS (0x1UL << MDCR_TPMS_SHIFT) -#define MDCR_EnSPM_SHIFT 15 -#define MDCR_EnSPM (0x1UL << MDCR_EnSPM_SHIFT) -#define MDCR_HPMD_SHIFT 17 -#define MDCR_HPMD (0x1UL << MDCR_HPMD_SHIFT) -#define MDCR_TTRF_SHIFT 19 -#define MDCR_TTRF (0x1UL << MDCR_TTRF_SHIFT) -#define MDCR_HCCD_SHIFT 23 -#define MDCR_HCCD (0x1UL << MDCR_HCCD_SHIFT) -#define MDCR_E2TB_SHIFT 24 -#define MDCR_E2TB_MASK (0x3UL << MDCR_E2TB_SHIFT) -#define MDCR_HLP_SHIFT 26 -#define MDCR_HLP (0x1UL << MDCR_HLP_SHIFT) -#define MDCR_TDCC_SHIFT 27 -#define MDCR_TDCC (0x1UL << MDCR_TDCC_SHIFT) -#define MDCR_MTPME_SHIFT 28 -#define MDCR_MTPME (0x1UL << MDCR_MTPME_SHIFT) -#define MDCR_HPMFZO_SHIFT 29 -#define MDCR_HPMFZO (0x1UL << MDCR_HPMFZO_SHIFT) -#define MDCR_PMSSE_SHIFT 30 -#define MDCR_PMSSE_MASK (0x3UL << MDCR_PMSSE_SHIFT) -#define MDCR_HPMFZS_SHIFT 36 -#define MDCR_HPMFZS (0x1UL << MDCR_HPMFZS_SHIFT) -#define MDCR_PMEE_SHIFT 40 -#define MDCR_PMEE_MASK (0x3UL << MDCR_PMEE_SHIFT) -#define MDCR_EBWE_SHIFT 43 -#define MDCR_EBWE (0x1UL << MDCR_EBWE_SHIFT) +#define MDCR_EL2_E2PB_SHIFT 12 +#define MDCR_EL2_E2PB_MASK (0x3UL << MDCR_EL2_E2PB_SHIFT) +#define MDCR_EL2_TPMS_SHIFT 14 +#define MDCR_EL2_TPMS (0x1UL << MDCR_EL2_TPMS_SHIFT) +#define MDCR_EL2_EnSPM_SHIFT 15 +#define MDCR_EL2_EnSPM (0x1UL << MDCR_EL2_EnSPM_SHIFT) +#define MDCR_EL2_HPMD_SHIFT 17 +#define MDCR_EL2_HPMD (0x1UL << MDCR_EL2_HPMD_SHIFT) +#define MDCR_EL2_TTRF_SHIFT 19 +#define MDCR_EL2_TTRF (0x1UL << MDCR_EL2_TTRF_SHIFT) +#define MDCR_EL2_HCCD_SHIFT 23 +#define MDCR_EL2_HCCD (0x1UL << MDCR_EL2_HCCD_SHIFT) +#define MDCR_EL2_E2TB_SHIFT 24 +#define MDCR_EL2_E2TB_MASK (0x3UL << MDCR_EL2_E2TB_SHIFT) +#define MDCR_EL2_HLP_SHIFT 26 +#define MDCR_EL2_HLP (0x1UL << MDCR_EL2_HLP_SHIFT) +#define MDCR_EL2_TDCC_SHIFT 27 +#define MDCR_EL2_TDCC (0x1UL << MDCR_EL2_TDCC_SHIFT) +#define MDCR_EL2_MTPME_SHIFT 28 +#define MDCR_EL2_MTPME (0x1UL << MDCR_EL2_MTPME_SHIFT) +#define MDCR_EL2_HPMFZO_SHIFT 29 +#define MDCR_EL2_HPMFZO (0x1UL << MDCR_EL2_HPMFZO_SHIFT) +#define MDCR_EL2_PMSSE_SHIFT 30 +#define MDCR_EL2_PMSSE_MASK (0x3UL << MDCR_EL2_PMSSE_SHIFT) +#define MDCR_EL2_HPMFZS_SHIFT 36 +#define MDCR_EL2_HPMFZS (0x1UL << MDCR_EL2_HPMFZS_SHIFT) +#define MDCR_EL2_PMEE_SHIFT 40 +#define MDCR_EL2_PMEE_MASK (0x3UL << MDCR_EL2_PMEE_SHIFT) +#define MDCR_EL2_EBWE_SHIFT 43 +#define MDCR_EL2_EBWE (0x1UL << MDCR_EL2_EBWE_SHIFT) #endif /* !_MACHINE_HYPERVISOR_H_ */ From nobody Thu Oct 2 16:22:13 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ccxs22sX4z69TdP; Thu, 02 Oct 2025 16:22:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccxs20YKxz3bsg; Thu, 02 Oct 2025 16:22:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759422134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SX4E+WTep9lfQQvPz0PS9927u66l9Xj/eUNVqOQclXI=; b=bIWHfJi+E2wT8L9OktBuf5hGf9z3S9CgIJuJTvCMAYH6ncCltVuqAeJbhIpez7qnA5etNi INKD/vuFkJQE2f9XS6unHQYmfcYNK2yOQ6E4SghihIQF/XR80ABS9FdGMFSrjrV1BtO3aD 0bJcyjUH1ldeB6uau/R6rFyJlGXB2T5WRQJOPQhhVm9FcDULSNM3LwMCY8XCtVxiIJmPO8 ssFWBAJ0ar8K08n1Q2moTQ21NogLVaIJgHIqXsexde0vX3IUlVCGMaGvcu5W7ObnF5kMng /XuqTOA2mXau6rPW/68oadHpyoXqfXx4bKxHklRc1G9mts8YREUXjHTLJtDDKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759422134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SX4E+WTep9lfQQvPz0PS9927u66l9Xj/eUNVqOQclXI=; b=imKRZWJrVFpkTuBWnxKfQKPap/ywS5CaTp/xX9tdpvsiGrn3wTmiUJhzpCNvXO52CnvSXI yYmYXy2KbdQ4rSuYrEK5HJudXp4PDqMITAK2HwnQqqKpENhas0C8fJSRs/KC1TTnfRY+7i alkqfysCQmquBjVdHetXFi75lJHiTYCXNsU52SC0MnhHWRMmrgufFDtio/XCUZjOggMcQw btvhptuzzae56lIIT5rN+tihoIKzGbmfAD0L4++tmk/SEdKgKfRKfJMv52aTrdWdFmydXH KK95IZp46mPEqVAz70nutv4bkuEGAohqQDwhenwhVZE9mSbgu+bmTJAkMRi2AA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759422134; a=rsa-sha256; cv=none; b=lih0hPULu8naGsgZ8v9W+dNEauW6j2+FPpjzeQCcdlhaL3JvJC2eRG0xuX3n0nMTaB4tyt 72hYuv+V3CvdfLSKfz5ULdPog3+xVSAgKanKlfK233NDWS9HcMaaUgLYkeE6IJ7507IPEW Ssacpmoo614zkoeqmXqYGk1zIB41MJiBrZ19v0kEHdgR1QERpClQqoB7+3djNRqj6IEHIy beunRe2W161Ah/51BL1r3QdtAgOCsy8KqWn1X8/MwO1oqzihD7e4sjR1VH3Wucqe0bM6IL YpdwzvpPFCf6plWdLGbfaeonJAdsA1oESitlH64ihR8XSSSuHMiZBaXQj3mq/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccxs206fmz1B7; Thu, 02 Oct 2025 16:22:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592GMDbH066127; Thu, 2 Oct 2025 16:22:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592GMD8a066124; Thu, 2 Oct 2025 16:22:13 GMT (envelope-from git) Date: Thu, 2 Oct 2025 16:22:13 GMT Message-Id: <202510021622.592GMD8a066124@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 4aa762f3cb97 - main - arm64: Sort hypervisor.h List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4aa762f3cb97402f0345ce5112c47a303dd4107d Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=4aa762f3cb97402f0345ce5112c47a303dd4107d commit 4aa762f3cb97402f0345ce5112c47a303dd4107d Author: Andrew Turner AuthorDate: 2025-10-02 15:35:04 +0000 Commit: Andrew Turner CommitDate: 2025-10-02 16:21:33 +0000 arm64: Sort hypervisor.h Move the MDCR_EL2 macros into the correct alphabetical location. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D52805 --- sys/arm64/include/hypervisor.h | 96 +++++++++++++++++++++--------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/sys/arm64/include/hypervisor.h b/sys/arm64/include/hypervisor.h index 894da24c7a16..8feabd2b981b 100644 --- a/sys/arm64/include/hypervisor.h +++ b/sys/arm64/include/hypervisor.h @@ -247,6 +247,54 @@ #define ICC_SRE_EL2_SRE (1UL << 0) #define ICC_SRE_EL2_EN (1UL << 3) +/* MDCR_EL2 - Hyp Debug Control Register */ +#define MDCR_EL2_HPMN_MASK 0x1f +#define MDCR_EL2_HPMN_SHIFT 0 +#define MDCR_EL2_TPMCR_SHIFT 5 +#define MDCR_EL2_TPMCR (0x1UL << MDCR_EL2_TPMCR_SHIFT) +#define MDCR_EL2_TPM_SHIFT 6 +#define MDCR_EL2_TPM (0x1UL << MDCR_EL2_TPM_SHIFT) +#define MDCR_EL2_HPME_SHIFT 7 +#define MDCR_EL2_HPME (0x1UL << MDCR_EL2_HPME_SHIFT) +#define MDCR_EL2_TDE_SHIFT 8 +#define MDCR_EL2_TDE (0x1UL << MDCR_EL2_TDE_SHIFT) +#define MDCR_EL2_TDA_SHIFT 9 +#define MDCR_EL2_TDA (0x1UL << MDCR_EL2_TDA_SHIFT) +#define MDCR_EL2_TDOSA_SHIFT 10 +#define MDCR_EL2_TDOSA (0x1UL << MDCR_EL2_TDOSA_SHIFT) +#define MDCR_EL2_TDRA_SHIFT 11 +#define MDCR_EL2_TDRA (0x1UL << MDCR_EL2_TDRA_SHIFT) +#define MDCR_EL2_E2PB_SHIFT 12 +#define MDCR_EL2_E2PB_MASK (0x3UL << MDCR_EL2_E2PB_SHIFT) +#define MDCR_EL2_TPMS_SHIFT 14 +#define MDCR_EL2_TPMS (0x1UL << MDCR_EL2_TPMS_SHIFT) +#define MDCR_EL2_EnSPM_SHIFT 15 +#define MDCR_EL2_EnSPM (0x1UL << MDCR_EL2_EnSPM_SHIFT) +#define MDCR_EL2_HPMD_SHIFT 17 +#define MDCR_EL2_HPMD (0x1UL << MDCR_EL2_HPMD_SHIFT) +#define MDCR_EL2_TTRF_SHIFT 19 +#define MDCR_EL2_TTRF (0x1UL << MDCR_EL2_TTRF_SHIFT) +#define MDCR_EL2_HCCD_SHIFT 23 +#define MDCR_EL2_HCCD (0x1UL << MDCR_EL2_HCCD_SHIFT) +#define MDCR_EL2_E2TB_SHIFT 24 +#define MDCR_EL2_E2TB_MASK (0x3UL << MDCR_EL2_E2TB_SHIFT) +#define MDCR_EL2_HLP_SHIFT 26 +#define MDCR_EL2_HLP (0x1UL << MDCR_EL2_HLP_SHIFT) +#define MDCR_EL2_TDCC_SHIFT 27 +#define MDCR_EL2_TDCC (0x1UL << MDCR_EL2_TDCC_SHIFT) +#define MDCR_EL2_MTPME_SHIFT 28 +#define MDCR_EL2_MTPME (0x1UL << MDCR_EL2_MTPME_SHIFT) +#define MDCR_EL2_HPMFZO_SHIFT 29 +#define MDCR_EL2_HPMFZO (0x1UL << MDCR_EL2_HPMFZO_SHIFT) +#define MDCR_EL2_PMSSE_SHIFT 30 +#define MDCR_EL2_PMSSE_MASK (0x3UL << MDCR_EL2_PMSSE_SHIFT) +#define MDCR_EL2_HPMFZS_SHIFT 36 +#define MDCR_EL2_HPMFZS (0x1UL << MDCR_EL2_HPMFZS_SHIFT) +#define MDCR_EL2_PMEE_SHIFT 40 +#define MDCR_EL2_PMEE_MASK (0x3UL << MDCR_EL2_PMEE_SHIFT) +#define MDCR_EL2_EBWE_SHIFT 43 +#define MDCR_EL2_EBWE (0x1UL << MDCR_EL2_EBWE_SHIFT) + /* SCTLR_EL2 - System Control Register */ #define SCTLR_EL2_RES1 0x30c50830 #define SCTLR_EL2_M_SHIFT 0 @@ -356,52 +404,4 @@ /* Assumed to be 0 by locore.S */ #define VTTBR_HOST 0x0000000000000000 -/* MDCR_EL2 - Hyp Debug Control Register */ -#define MDCR_EL2_HPMN_MASK 0x1f -#define MDCR_EL2_HPMN_SHIFT 0 -#define MDCR_EL2_TPMCR_SHIFT 5 -#define MDCR_EL2_TPMCR (0x1UL << MDCR_EL2_TPMCR_SHIFT) -#define MDCR_EL2_TPM_SHIFT 6 -#define MDCR_EL2_TPM (0x1UL << MDCR_EL2_TPM_SHIFT) -#define MDCR_EL2_HPME_SHIFT 7 -#define MDCR_EL2_HPME (0x1UL << MDCR_EL2_HPME_SHIFT) -#define MDCR_EL2_TDE_SHIFT 8 -#define MDCR_EL2_TDE (0x1UL << MDCR_EL2_TDE_SHIFT) -#define MDCR_EL2_TDA_SHIFT 9 -#define MDCR_EL2_TDA (0x1UL << MDCR_EL2_TDA_SHIFT) -#define MDCR_EL2_TDOSA_SHIFT 10 -#define MDCR_EL2_TDOSA (0x1UL << MDCR_EL2_TDOSA_SHIFT) -#define MDCR_EL2_TDRA_SHIFT 11 -#define MDCR_EL2_TDRA (0x1UL << MDCR_EL2_TDRA_SHIFT) -#define MDCR_EL2_E2PB_SHIFT 12 -#define MDCR_EL2_E2PB_MASK (0x3UL << MDCR_EL2_E2PB_SHIFT) -#define MDCR_EL2_TPMS_SHIFT 14 -#define MDCR_EL2_TPMS (0x1UL << MDCR_EL2_TPMS_SHIFT) -#define MDCR_EL2_EnSPM_SHIFT 15 -#define MDCR_EL2_EnSPM (0x1UL << MDCR_EL2_EnSPM_SHIFT) -#define MDCR_EL2_HPMD_SHIFT 17 -#define MDCR_EL2_HPMD (0x1UL << MDCR_EL2_HPMD_SHIFT) -#define MDCR_EL2_TTRF_SHIFT 19 -#define MDCR_EL2_TTRF (0x1UL << MDCR_EL2_TTRF_SHIFT) -#define MDCR_EL2_HCCD_SHIFT 23 -#define MDCR_EL2_HCCD (0x1UL << MDCR_EL2_HCCD_SHIFT) -#define MDCR_EL2_E2TB_SHIFT 24 -#define MDCR_EL2_E2TB_MASK (0x3UL << MDCR_EL2_E2TB_SHIFT) -#define MDCR_EL2_HLP_SHIFT 26 -#define MDCR_EL2_HLP (0x1UL << MDCR_EL2_HLP_SHIFT) -#define MDCR_EL2_TDCC_SHIFT 27 -#define MDCR_EL2_TDCC (0x1UL << MDCR_EL2_TDCC_SHIFT) -#define MDCR_EL2_MTPME_SHIFT 28 -#define MDCR_EL2_MTPME (0x1UL << MDCR_EL2_MTPME_SHIFT) -#define MDCR_EL2_HPMFZO_SHIFT 29 -#define MDCR_EL2_HPMFZO (0x1UL << MDCR_EL2_HPMFZO_SHIFT) -#define MDCR_EL2_PMSSE_SHIFT 30 -#define MDCR_EL2_PMSSE_MASK (0x3UL << MDCR_EL2_PMSSE_SHIFT) -#define MDCR_EL2_HPMFZS_SHIFT 36 -#define MDCR_EL2_HPMFZS (0x1UL << MDCR_EL2_HPMFZS_SHIFT) -#define MDCR_EL2_PMEE_SHIFT 40 -#define MDCR_EL2_PMEE_MASK (0x3UL << MDCR_EL2_PMEE_SHIFT) -#define MDCR_EL2_EBWE_SHIFT 43 -#define MDCR_EL2_EBWE (0x1UL << MDCR_EL2_EBWE_SHIFT) - #endif /* !_MACHINE_HYPERVISOR_H_ */ From nobody Thu Oct 2 16:22:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ccxs34x7gz69TdQ; Thu, 02 Oct 2025 16:22:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccxs31TQkz3bwB; Thu, 02 Oct 2025 16:22:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759422135; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K7KWuKLVdPTs0lbD7KNPUNUXncv7lQ+EJ2yeGoaczWw=; b=tUlnGCggFpvjq/NfCcMVXizz+OIIE5t1Nz9PoTWdrSNCB2Fx6jh6Z3JeFDKdfyxQfZAO0e 20XAhOPbGUWFPyPbO7cNgIkNpFMDnFPDwMY9lmb8jwUBtHZ68jZxWCDMbWTyUQWexd/rWn w/a1GI70x4+4ieLQGZqOXybbjXBD15JWOqgr+ZdNfIcwmxLCWxNyJXVXK2R+auMET4J8O3 akvvsNHFPdEcI+fvtBI/okeUVteog7x1rJD8DI6kK50d1zyiB6fcF5ORi6QCsVHDe5c6uV uIzlltW26+ChpWsp2jK9oAp3BnfzA/iQXaBRMSk6uk6As+5DO+aGnV2PcjHR4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759422135; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K7KWuKLVdPTs0lbD7KNPUNUXncv7lQ+EJ2yeGoaczWw=; b=DD3oEUatedbatCkFlNRAmNVAyihoH6vHCI6A2S+xNomBPWGP2c9W4jrQlfXkFpKUwCPQP/ IaOY6qt4jx2I+/kAiQxi6w3ref1gzhyLqVwM3qzyzSv9x5JJhteQPgD80gbKQUWaLGA0W5 N2wae4oBpLHyoWF/qoSozZajSN6WUrZR0Lhdwm9Or6cLGM/B1xRXEVR9rIdiSCx/TjXYm0 pqJKwmAp3oKKhINzcBenaJ2hG1gxM0UKMWEMNaQ4zdhfis3/i7QL2rb0RjjCxvfCd8EcVN CqMsxPfFSN0ipjNa56SINywVtcgsacOJz2AbzIQMv7voNtFDTUiLto909ntEsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759422135; a=rsa-sha256; cv=none; b=SG44YFYsBbYmprft9ODIcj3W+tJm2vXD0bMl5lUF+vH7lgk5zdc4uIbsqgffwVvlxQVNiv 9O9O2EgCeNee7uzvdZt2SMhC66nZFvyWquMy8CqaqeoOI8aYNLN0QqWf3J8AV2ltlpgD/t iz1cQk1LnNkTKST6qhOznfrHl2ihCES23lLZm9Z/MGfM8Q6BRG7jwSEt2jFynU15l2Xhgl 8WxgJjVjUKUFvrCND8iErE95FlqZX+7xm//FXJdukS0UcymcGoNwH+6CMluF/Ap6/F8I9g RnrDEmCcErJo1DlOWrObwv31867uxGalPo95FP0J+7GWgN+AKj1QnKgpcj8uHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccxs314f9z17T; Thu, 02 Oct 2025 16:22:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592GMFQl066159; Thu, 2 Oct 2025 16:22:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592GMFSa066156; Thu, 2 Oct 2025 16:22:15 GMT (envelope-from git) Date: Thu, 2 Oct 2025 16:22:15 GMT Message-Id: <202510021622.592GMFSa066156@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: c67ea2707d2b - main - arm64/vmm: Add missing debug traps 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c67ea2707d2b5e6deb5986710f520ff69e4f78a3 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=c67ea2707d2b5e6deb5986710f520ff69e4f78a3 commit c67ea2707d2b5e6deb5986710f520ff69e4f78a3 Author: Andrew Turner AuthorDate: 2025-10-02 15:35:11 +0000 Commit: Andrew Turner CommitDate: 2025-10-02 16:21:33 +0000 arm64/vmm: Add missing debug traps These are features we don't support or advertise to the guest so can safely be trapped. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D52806 --- sys/arm64/vmm/vmm_reset.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/arm64/vmm/vmm_reset.c b/sys/arm64/vmm/vmm_reset.c index c4102277131d..1240c3ed16ec 100644 --- a/sys/arm64/vmm/vmm_reset.c +++ b/sys/arm64/vmm/vmm_reset.c @@ -145,7 +145,8 @@ reset_vm_el2_regs(void *vcpu) /* Set the Extended Hypervisor Configuration Register */ el2ctx->hcrx_el2 = 0; /* TODO: Trap all extensions we don't support */ - el2ctx->mdcr_el2 = 0; + el2ctx->mdcr_el2 = MDCR_EL2_TDOSA | MDCR_EL2_TDRA | MDCR_EL2_TPMS | + MDCR_EL2_TTRF; /* PMCR_EL0.N is read from MDCR_EL2.HPMN */ el2ctx->mdcr_el2 |= (el2ctx->pmcr_el0 & PMCR_N_MASK) >> PMCR_N_SHIFT; From nobody Thu Oct 2 16:42:56 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ccyJx0LPyz69Wdk; Thu, 02 Oct 2025 16:42:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccyJw6d16z3k92; Thu, 02 Oct 2025 16:42:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759423376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lqAPFVLYZAZhUiu6xkHxPzKrZVBqQch9YmMyqC49H24=; b=calHdT19Lo8ByOhU/r5x6S8SjfdfGC2H1PKv2bOswrCPvNIYiXGtFmsXuzfrVqy1+ra2NF HIoIW5nfcKTixXRRYGXe+xaz1ETSBcAxT3YsnYI7mNjohZoMUnSmOTcUn1gRXBQAMHh3yB JffiVIlxsZzJzJuIZRxmJ/0pwKhy28KVhg/xRZsAycXAQFX2sX8swpXblpa9mP3fhrew38 gPRhmsEZMG0DrPVsiSIncLi/UL8bNdEedWtkujuwvJGU2JkihaLA+Wy9rq9vE6qMXIiSJI 9A8JONVmFCvmqTN2OoVh2oPSrTvraDxRGmE5AMy/MAuvSmHnKul5TByRjaj42A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759423376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lqAPFVLYZAZhUiu6xkHxPzKrZVBqQch9YmMyqC49H24=; b=BxlGne6fStJtMq4SecuYDBUOP+wrSEMjYpk9LS5eZhzhVAFindM8Jmuj3OK7JcqjARbQ8h bSJBGK+9jjok0EsMnUjexcoye3nHRHbBe31MKDQ0NrixN4qe2imoRdi3sbkPpJpp5yrP44 IbWJsn0zv7I7t8UYVwBSKvXHKqQe8atJN6nXxOVCw6UOb7SCA90i5TE1g/dqwVNrWPvIRy +wknXwHLmImDygU+NuH2Q8tFYAy5vbsX3hwxwMoxzPy+UikcKxgMn1LoAKqgdqJONIhpx+ 0NybKzWmyjclqvbnSMN1TZBy11Klo1zxALjpwBNNQovoNQlg/d3tHtQe4xB5tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759423376; a=rsa-sha256; cv=none; b=fYB52mhOIeEZP0IoKWgeQAtC2HMH3a0bB+8f8yMTzeWG2QNV37TRu2gQBTwZgqJh0/i8bf agIiyi6FOdeUJ3BjRZ/URDIuuDBZv5HEFSLw7OGMlyZeuqt86sRJOUQM7GxSlZPW14yIaM 17727vJ1x+syCHEdPXLRc27sw7yQ3H2FgaKpb1Dgxezpkr/oT+xkGnbfTDI23nY9rCITbU ZCRa2fGg+bi4Ea8N7AUuKsXyG10HEuBGg25hWIZ2zOZlPJgkBlEVt6E64W2A5bOUElxZXc 1EB0A4O2ILknnbYiGkn+EQkOfzwXa8bBQgs7XY97jYue4PEJqb6mxd774KQlmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccyJw6CSVz1xR; Thu, 02 Oct 2025 16:42:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592Gguaj006291; Thu, 2 Oct 2025 16:42:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592GguT1006288; Thu, 2 Oct 2025 16:42:56 GMT (envelope-from git) Date: Thu, 2 Oct 2025 16:42:56 GMT Message-Id: <202510021642.592GguT1006288@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 54b24b9da8be - main - bitstring_test: fix bit_nclear/bit_nset tests for last iteration 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: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 54b24b9da8be70192b7baaeae8fc26fda6581222 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=54b24b9da8be70192b7baaeae8fc26fda6581222 commit 54b24b9da8be70192b7baaeae8fc26fda6581222 Author: Ryan Libby AuthorDate: 2025-10-02 16:40:16 +0000 Commit: Ryan Libby CommitDate: 2025-10-02 16:40:16 +0000 bitstring_test: fix bit_nclear/bit_nset tests for last iteration Also convert nearby ATF_REQUIRE_MSG to ATF_REQUIRE_INTEQ_MSG. Reported by: GCC -Wint-in-bool-context Reviewed by: asomers, des Differential Revision: https://reviews.freebsd.org/D45893 --- tests/sys/sys/bitstring_test.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/sys/sys/bitstring_test.c b/tests/sys/sys/bitstring_test.c index a48042a4a063..bf436040c00f 100644 --- a/tests/sys/sys/bitstring_test.c +++ b/tests/sys/sys/bitstring_test.c @@ -559,14 +559,13 @@ BITSTRING_TC_DEFINE(bit_nclear) bit_nclear(bitstr, i, j); bit_ffc(bitstr, nbits, &found_clear_bit); - ATF_REQUIRE_MSG( - found_clear_bit == i, + ATF_REQUIRE_INTEQ_MSG(i, found_clear_bit, "bit_nclear_%d_%d_%d%s: Failed with result %d", nbits, i, j, memloc, found_clear_bit); bit_ffs_at(bitstr, i, nbits, &found_set_bit); - ATF_REQUIRE_MSG( - (j + 1 < nbits) ? found_set_bit == j + 1 : -1, + ATF_REQUIRE_INTEQ_MSG((j + 1 < nbits) ? j + 1 : -1, + found_set_bit, "bit_nset_%d_%d_%d%s: Failed with result %d", nbits, i, j, memloc, found_set_bit); } @@ -586,14 +585,13 @@ BITSTRING_TC_DEFINE(bit_nset) bit_nset(bitstr, i, j); bit_ffs(bitstr, nbits, &found_set_bit); - ATF_REQUIRE_MSG( - found_set_bit == i, + ATF_REQUIRE_INTEQ_MSG(i, found_set_bit, "bit_nset_%d_%d_%d%s: Failed with result %d", nbits, i, j, memloc, found_set_bit); bit_ffc_at(bitstr, i, nbits, &found_clear_bit); - ATF_REQUIRE_MSG( - (j + 1 < nbits) ? found_clear_bit == j + 1 : -1, + ATF_REQUIRE_INTEQ_MSG((j + 1 < nbits) ? j + 1 : -1, + found_clear_bit, "bit_nset_%d_%d_%d%s: Failed with result %d", nbits, i, j, memloc, found_clear_bit); } From nobody Thu Oct 2 16:47: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 4ccyQ93nrtz69X4B for ; Thu, 02 Oct 2025 16:47:29 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic316-54.consmr.mail.gq1.yahoo.com (sonic316-54.consmr.mail.gq1.yahoo.com [98.137.69.30]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccyQ65kS5z3lNt for ; Thu, 02 Oct 2025 16:47:26 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=q0VKdFIO; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.69.30 as permitted sender) smtp.mailfrom=marklmi@yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1759423644; bh=TRnLyI3OeXqfz53plTqQplqYUbJ2yoejwxbnL3X9IHs=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=q0VKdFIO8F//AvZ16YtGSZaEklC2OlMxN1JN61j9jZxGlAT3rJsjio6p1ppm4f5SCGrQP81umqCzPtsNsoQ2i6Ze3XfvN6I0x/cKCxBlBR/V9q8CX7WFsm2pgqUFsQGmzWgx6kN3vYCuiey5LOwrrzzg1MTP9h9mBo3SxI95RdV4Sp/vJpXmFPPsrFqncp51UDdHlAb1WUHaTUZd9MIZ3j3m2erh4t5xkRRuG78bz4/YIeQ9arUZC86Y/e0T1yFA/nfDTJdVhbSzJFjOn4mr4W40dJIEagrXgRviZc3qfRdmSiW6hgCQyvQfi9jXHFOeI/VjRnvmPBuW3OziOyK+Zg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1759423644; bh=GL8lY+8H+QDR7YceWDrLrT8cAWGJZmygpvBI8TTsNJJ=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=c+4IqF62zl1vEZH8/JFagI7fBTDjlxnbPm3nrlgAM5zL8X5C1Z/9gHfhk+NNCwcgWUhjReKiq0BCbDxqCbg9m/RcEHolckYKqARey4KDb4ilM5PNJ4UJdnd5PwTxxlGwk8UXCtXBgPYpAW0p05biZ0r4RWYksUdFlKHnkxLp6ZgPPbeR2020lauMp7A0/iHYmAGiBMsFSn5B5hEzGfBguqz0KLUcGqO0cf966I7FqMf5WO222BXEln74BC41p5BHgm9oOyP09dh4Gs735uJ78AHC8ZB/S2y/YaVPIinJp5VqxUN6IIw3azYqknVuRJipqYc7UuL+1a9s9hqrdJh+yw== X-YMail-OSG: uH2NezwVM1kaYtXbjhTqWi4A5m7xRa9WCiS1cFaRoLY.sSo0kQ8Fqk_J1u4b0VO f8QL7Cg8V3NecdVdQVfIqKZBUN_K.t7htvxS0k98siqKlSVj5vSJxNU00s_2wOaEz3h5zttw1ny7 PXRJbq_CJjLpfUAqWmhRRAPCejZWdd4A8YE5b0jCxpJmIrjD2ETRWrnhk3FRlUQQxKwr2S3yD7_L tTPRfC5jeRRRzcvlMgOJy7YBbJ.bscmY45Aq6Hit5zCxyxG4EKaam8Ammfw0ObbFINAKvwOxSZ0A vfY8fadP_2DCYwiJ_sp36Xm_B_5Y8qkruHLFqauBK3KvtqEdeu7jKLeuNvOjdENogGYBeHjXhgIV 9HbVxJfVPYOnMBiIyp74ttR6zrFpv01LM99ZLPTHCAutXVkW6c0dt6IAcl.Xxtqy5t9tBE8Kdxwq 6pwDhIpWVI08Ckq7vpJKW_2mRBno3fp8Lv3ct4cNPcLq9Yvis84UXbtuXiWLXQlqGWSIfo9n2MUD PIEGfrjbVfJhyfOnO.Y8ZnLq70V0oF3.00ZcOVuP39KESrimIJmSek_IvJpzMl01wPLyjmCr_RCq _q8ZPyChI0zoVOObduzc5qyqSwQTirDXHKTnb1sBsjxK5o4zQEzHgE5YrnIJ3wzPjl.L0tIj_UgT H85B3YB8jRytEC0XZWWQArDjDEnTPojsMBuquXJlMmAulHEWBUEZ4KnZhWbTLtfM2XHrcdpldFIl nRmGAubBgxV7s3Sg5WrT5bjqeEpiVDRkavO.Jx2tn2cUcbCuRv65po1CSJJeIKnazNEZ7nyDvtEu wD2rrfaw4kwext6w9hECxfA2tOCZSQD5l_XggPedHnVlii343HhcvoAYqq5ojFrazfbDi7l6JTwe jCS4hU4PAXEiz4xYuGqQQ4SzbeA4u5IJErKUEY2Ian_firtUCACMnVCgtNoE75G2j4pJcR00o2F7 0wXN.cVPdELHw99W2k9MuXKNvEqqtaAZiJjkV9l44Si415azSotM.RhvZFIkqvF..5YT1GniYrQX pbzwMpCqnQYqeXLGXdLYOoE0wTFWifp0XexRMGV4jBHKeClF8aeqRiBdYeEvxJTm8uglJCqFzWZY WKqX1KplQAkFbTvYsbEcXks1W7M8usfF2PLUu_LyzitGDaIz433_BFdBskR.lfO5e5pOMJtYEMzu pbJFSK7L6oXY0jfMxiLJA56e1OVj2x4CRO2QUqAaT7PJ.9Izd6Gr6FathQZDdYd.Qs_TNNP7Beku T7fX.38nZnOup7L2YiqAtjojmN5bOuGRkqKygn_6Fs9UdF8xTr.xbZLA_yj185awM3ae_uK.cq0c HIwx3ZlzQdy7AeI7l.F3Yw2zzEqT0H12GCXtOd8TfQBnqHQi56i5Iy.blezypjD.4iiTTVv.fsvM jbQKSpCexWajKw2bM8WR8AIVj7Q_AwVrQGO9y2hzkQQWyDxw_1YXveVw1bKrEy_YMqAijrGPVQbx Nm7sBn2n3YZdsU7W.ey7XGoI8QIHvbGnk0dGAM_iPZ7HppmsZwxgUmfLbohiEjZec9dR1a4xnby8 Xg6DCpCv1VdWL4khLZMJxw.KX8Y35CFXIZu72SxLS2_L8C3KLX_Lo8hGpJ9kF4cflTE0gkqGm6RG u9PPo7l2YXkyR0xMH1uZpq0IeXzahSH_K50nKaF.K8lomwtwmhApRJXjE5yCCbj2RiLZmXulUOPi IwpxGyPNzypC2RYhkqTG7MuGsUHxWUce4oLE_SsJFAGOdi.jjYiHs6qu2ysjQsorT46JyFwmUZST ws03MCiCFbNsii3loqdDboyfOftKRA9dAy_ytwFSpSMtFQl2gboaTbjUmkKVTvuirl1ixgpVU1Tk M9_.utlLuunHGFNmKScbQpYSE2Dfwm7f6Z57itjPeJ5CcwW_a7890Mx4crQuJEk.hEfHq0YNu_Tf 6HRc3b76uJ21fjnSsBShJ.QHmAIxHZGOe1OiXKxKVmb7Kv3e1B6x8EyXvmvs7zBLXcXSwx8VLgZi BIG7t6v52BwpGchpBWlcFFK1JpCsX2Fc9igMP0NvdzOukGAbP6KPBKL5oVxyHljYN0.Q2K4tU541 qJpq77NWswN_LXQ67hvwMsPJidr25JnOv7jfQ2QdBSZHkaRdGP_0G6qMiKZiYnraj6Wdh.QkWSGA 1D45HHVIuJdP.7myjpapEI53oApPrj0Lt9Arn2QoxR3KVw46jLoe1cxtp7ZOHw_HLsx5cMO8TmId 8u.DOhFA7d.2LnFF..bRp4nrK.FLUGabE0nWBhtMfOjUGgCQcHgaQ54SkIgZVzdzQ.kyrHWmeA6c slf0- X-Sonic-MF: X-Sonic-ID: ebcd8b65-b96e-44d8-a7be-e1ef4aeb7f32 Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.gq1.yahoo.com with HTTP; Thu, 2 Oct 2025 16:47:24 +0000 Received: by hermes--production-gq1-66b66ffd5-cl26f (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 427ddc4b3dbf9a497a10e40a095ba758; Thu, 02 Oct 2025 16:47:22 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: RE: git: 2f7a796b590e - main - thunderbolt.4: Initial manual for HW Relnotes Message-Id: <1F1B3FF4-A31E-4E9C-8CFC-7BB7F1A38AFD@yahoo.com> Date: Thu, 2 Oct 2025 09:47:11 -0700 To: ziaee@freebsd.org, dev-commits-src-main@freebsd.org X-Mailer: Apple Mail (2.3826.700.81) References: <1F1B3FF4-A31E-4E9C-8CFC-7BB7F1A38AFD.ref@yahoo.com> X-Spamd-Bar: --- X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.997]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_FROM(0.00)[yahoo.com]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; DKIM_TRACE(0.00)[yahoo.com:+]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.69.30:from]; APPLE_MAILER_COMMON(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.30:from] X-Rspamd-Queue-Id: 4ccyQ65kS5z3lNt Alexander Ziaee wrote on Date: Thu, 02 Oct 2025 15:14:07 UTC : > The branch main has been updated by ziaee: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D2f7a796b590e67c5d123f2b00b3aaf7b= a7a32a13 >=20 > commit 2f7a796b590e67c5d123f2b00b3aaf7ba7a32a13 > Author: Alexander Ziaee > AuthorDate: 2025-10-02 12:05:25 +0000 > Commit: Alexander Ziaee > CommitDate: 2025-10-02 15:12:48 +0000 >=20 > thunderbolt.4: Initial manual for HW Relnotes >=20 > This manual contains nothing and is only suitable for the HW Relnotes, > but lets get it in so we have something and then can iterate on it. >=20 > MFC after: 3 minutes > Fixes: 2ed9833791f2 (thunderbolt: Import USB4 code) > Discussed with: obiwac > Differential Revision: https://reviews.freebsd.org/D52847 > --- > share/man/man4/Makefile | 1 + > share/man/man4/thunderbolt.4 | 22 ++++++++++++++++++++++ > 2 files changed, 23 insertions(+) >=20 > diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile > index f5d7a0e081fc..6e076722c786 100644 > --- a/share/man/man4/Makefile > +++ b/share/man/man4/Makefile > @@ -589,6 +589,7 @@ MAN=3D aac.4 \ > tdfx.4 \ > termios.4 \ > textdump.4 \ > + thunderbolt.4 \ > ti.4 \ > timecounters.4 \ > tmpfs.4 \ > diff --git a/share/man/man4/thunderbolt.4 = b/share/man/man4/thunderbolt.4 > new file mode 100644 > index 000000000000..3477c11fb60d > --- /dev/null > +++ b/share/man/man4/thunderbolt.4 > @@ -0,0 +1,22 @@ > +.\" > +.\" Copyright (c) 2025 Alexander Ziaee > +.\" > +.\" SPDX-License-Identifier: BSD-2-Clause > +.\" > +.Dd October 2, 2025 > +.Dt THUNDERBOLT 4 > +.Os > +.Sh NAME > +.Nm thunderbolt > +.Nd USB4 controller driver > +.Sh SYNOPSIS > +.Cd device thunderbolt > +.Sh HARDWARE > +The > +.Nm > +driver supports USB4 controllers. As I understand things, being fairly explicit related the following is likely required (not a proposed wording or presentation): Quoting USB4 V2: "A USB4 Host or USB4 Peripheral Device can optionally support interoperability with Thunderbolt 3 (TBT3) products." Quoting USB4 V1: "A USB4 host or USB4 peripheral device can optionally support interoperability with Thunderbolt 3 (TBT3) products." In both, this is tied to Chapter 13, "Interoperability with Thunderbolt(tm) 3 systems". As I understand FreeBSD is not trying to meet the criteria in that chapter, for example. USB4 does not require a certification process, as I remember. Thunderbolt 4 and 5 do, as I remember. As I remember, a distinction between USB4 and Thunderbolt 4 and 5 was that Thunderbolt 4 and 5 require (nearly?) all optional items from the matching USB4 version to be implemented (so: not optional if Thunderbolt 4 or 5 is claimed/certified). Also, it seems unlikely that FreeBSD would go through a Thunderbolt 4 or 5 certification process. Overall this seems to mean not meeting the Thunderbolt 4 and/or 5 criteria fully and not supporting Thunderbolt 3 --but just meeting the criteria for one or both of: ) USB4 V1 without "TBT3" support ) USB4 V2 without "TBT3" support That would be a subset of the Thunderbolt 4 or 5 criteria in a way that excludes Thunderbolt 3. Referencing Thunderbolt without someplace being fairly explicit about those types of relationships could easily leave a misimpression (even if I've gotten some of the status wrong above). My guess here is that enough is known about the intent in this area to be able to have material about this type of thing in place at any time. > +.Sh HISTORY > +The > +.Nm > +driver appeared in > +.Fx 15.0 . >=20 =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Thu Oct 2 16:47:48 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 4ccyQX5hVGz69XPY; Thu, 02 Oct 2025 16:47:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccyQX4ndZz3lgC; Thu, 02 Oct 2025 16:47:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759423668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hqS5lR0zd325fNSE5HM4U76nMmV1oBIx5a8l8yMAMfg=; b=nLHWP0g/CdI5YHuwA4mRTdMaqTkom+eZn+EDlLSA67gou4jgvXc1NIiKbVDUjIXQtc93aj J7dlZ38z/CFmKkFzwwi5tVPW59MLsD+zG2HcTsKQRXvSkNMj13FpUC7F8a6/jWcjpHQLuf 4SHBTrfyhth9ZTYbZIDHfzBZcnatNDfAHU57ruUWjA7JFWqhGWhnkRKB6ejf7UdJsEBT37 RvwSGeZpJ5iHvccdLs30e8wnTLgIfWQusIE7eyfsf3I79REXRddNSjIru1tUcYBWnxqKYj r0tKj2jMWiKEHQQS1JGkHhVFT06hgBqfYEQcOgyYIoz/3MOnZ/L0d5uOrDtzSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759423668; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hqS5lR0zd325fNSE5HM4U76nMmV1oBIx5a8l8yMAMfg=; b=Oh1sUxVHf9+JwgBVWSGW3MybGKxle/V398bWYQoSXxm+Q1JRGWI7yJBxZkBgJqdAuW5cnj DPfCfcVfhp7sxCaq7e7K4ZYt4s2cgADufstzb9P8qHD9r6kQD9zJSytyds2oBX8IKi0XAx rFDk5sLI23LMz6z1uNYWCKOLyBpDCjGJ9WCveqP8Ma8pJPJtHOPn4U4Y30kcQshTiB10Hy xgq3Tf57ihcFyhh4XXbC6J9/vQP9/Iu42GZMukoHmyvjZVd8uPdtZah+YdxNS9zZSsEt86 JaXIQdPbVOIBLNZHeN3iBrkWBhdJySFtUdib8m9mK44R0PwoEtJfwefiBudNjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759423668; a=rsa-sha256; cv=none; b=Js8x6fnlwUz9stEC3FwIH+Yb9rRE/w40o5ntVcnf/J1x3XOUSF37XnN3v6Q+44kIgBCfpw 7ct7HFbDAF3fiPxMs2rq7ywFLPoI96zvZYlyovN7iqgGzvyCHQLz0Kzc/XS4OTpGWa9cAb HUn8DE/Urklf0Y2Lr19Ni3r56WskKRwlRT3HudgxK9IQFsk8hajiEzYkpnNfF080YyHemh y0BWE5E4eDkBPYdkWGOOgrstzSI/bdW6Z/tVlTbcIdYE7ZvmRICNMn3yBJKf7jboNwSfcH XhwJIj0hkyEA37jY3qcJdQtjXBRHlBpyAfETOItcxYtgdEubBRVubUJtrXPMmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccyQX3D2Pz1G3; Thu, 02 Oct 2025 16:47:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592GlmUq008581; Thu, 2 Oct 2025 16:47:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592Glmt2008578; Thu, 2 Oct 2025 16:47:48 GMT (envelope-from git) Date: Thu, 2 Oct 2025 16:47:48 GMT Message-Id: <202510021647.592Glmt2008578@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Joseph Mingrone Subject: git: e57d72a7f35c - main - mfc-candidates: Improve branch detection and repository handling List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e57d72a7f35c3fc80dc9ac744056b2354b1be741 Auto-Submitted: auto-generated The branch main has been updated by jrm: URL: https://cgit.FreeBSD.org/src/commit/?id=e57d72a7f35c3fc80dc9ac744056b2354b1be741 commit e57d72a7f35c3fc80dc9ac744056b2354b1be741 Author: Joseph Mingrone AuthorDate: 2025-09-22 18:18:20 +0000 Commit: Joseph Mingrone CommitDate: 2025-10-02 16:47:26 +0000 mfc-candidates: Improve branch detection and repository handling - Use git to detect the latest stable branch rather than hardcoding it. - Handle the case where the script is run outside a src or ports repository. - Fix a pattern to match .git instead of *git. Reviewed by: andrew, releng (emaste) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52681 --- tools/tools/git/mfc-candidates.lua | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tools/tools/git/mfc-candidates.lua b/tools/tools/git/mfc-candidates.lua index d2865a892971..a1420dc726da 100755 --- a/tools/tools/git/mfc-candidates.lua +++ b/tools/tools/git/mfc-candidates.lua @@ -129,16 +129,18 @@ local function main() local author = os.getenv("USER") or "" local dirspec = nil - local url = exec_command("git remote get-url freebsd") - local freebsd_repo = string.match(url, "[^/]+$") - freebsd_repo = string.gsub(freebsd_repo, ".git$", "") + local url = exec_command("git remote get-url freebsd 2>/dev/null") + local freebsd_repo + if url and url ~= "" then + freebsd_repo = string.match(url, "[^/]+$") + freebsd_repo = string.gsub(freebsd_repo, "%.git$", "") + end if freebsd_repo == "ports" or freebsd_repo == "freebsd-ports" then local year = os.date("%Y") local month = os.date("%m") local qtr = math.ceil(month / 3) to_branch = "freebsd/" .. year .. "Q" .. qtr elseif freebsd_repo == "src" or freebsd_repo == "freebsd-src" then - to_branch = "freebsd/stable/14" -- If pwd is a stable or release branch tree, default to it. local cur_branch = exec_command("git symbolic-ref --short HEAD") if string.match(cur_branch, "^stable/") then @@ -147,6 +149,11 @@ local function main() to_branch = cur_branch local major = string.match(cur_branch, "%d+") from_branch = "freebsd/stable/" .. major + else + -- Use latest stable branch. + to_branch = exec_command("git for-each-ref --sort=-v:refname " .. + "--format='%(refname:lstrip=2)' " .. + "refs/remotes/freebsd/stable/* --count=1") end else print("pwd is not under a ports or src repository.") From nobody Thu Oct 2 16:52:14 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ccyWf4vYvz69XPx; Thu, 02 Oct 2025 16:52:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ccyWf44Tvz3mTc; Thu, 02 Oct 2025 16:52:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759423934; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7m3lXv3ksKTGrCwz+xaIaem6aGriEU8HKfmyw8jckcg=; b=YYiFFzM7RFafBSx+MpMBWqhuGr6FCD+1BaEWdD7qTmJi8AybqwDw6qFJCPqzgUa5YOWdXF efat5eV6wdBTixhEGMrt4Ny68U1x+kcA2kHs6+y5dXXOxlIkqR6GFttW8TAsWxe4usWjH3 Eu2V2Z+Px3OVpM3xhaLbg9TH6Rw8pFyqQDRmnMKXraekaXNKvIMX3M4GMehZFKrZBV+PGz SLh6jbjDlZNkcPZs3L0fsc4ItJ7tS7gjhK/HcBl5tAmsNb3KmKOGMyZac3ixC0JW1NreNm tDIlE3ow4CXQFYn5h8FDasi74j7qSdgFGch1L3/cLG8TlhQm+l8cHhp4+5Az5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759423934; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7m3lXv3ksKTGrCwz+xaIaem6aGriEU8HKfmyw8jckcg=; b=Ji8Ng2MW2bLYAaSIRbJyi0gtdLelCvgCxGQQd52NMMzgdnZQ6XU58aQNuolixZqU1gXMf0 s6y7le8sz8Ss/Zw9a/S2NHoK8/x2Xvsn/sTIklpn3cmfLwObFspS9o0Fx/D1lC8oC/2Z4L mokJXF4I6imBqy27TXbm4GdkFLLXkBwGwKa/gOTvQut4JwGrHYTHtx8k3mA0L6O+qhf/aa SgRJJxYGTG0YKu7khBg6XaCE7wS6wMMLXQ+ToHsbPDAY223Cq72Ldnrpw7ewOvl3V9JgwK D/qn//oMzzA3eymIIzK6+wHQ7wnYUQ2S6LQcKYR5nyk1nObUaAbraLhyt+Gd3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759423934; a=rsa-sha256; cv=none; b=IMPnDpO+ToP0OdGHL61Rdy9RAL/8oOriN9PSryiyB/q9XYxflGN5Xit6xVr0VmHz7r6+lu sGNzBT/c25nKU2iQ9OpClU2wOZDE1pd4W+6/a0/1Gn/P9wyDYtvhOFygjxZEY+zlesaqao fleRqj3khhKKrJEGahbIqH+FkkbZo2rACnAhExjW/OQxwxdtgDUlDWurDYzRYEUSo39FwR aWcB+NQsucu9/Hcm0uraG08hIGH+srMRhfg5M3MujhGBqawxX+1PXOFP+A31a0mgi88z2J GipF+s7ubi0GBg3brFy+2FTH9hhVQJWJMyABSmi3QO5D+c6D/Vl0nfhUUyPo5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ccyWf3hJHz1ps; Thu, 02 Oct 2025 16:52:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592GqEtj025093; Thu, 2 Oct 2025 16:52:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592GqEZv025090; Thu, 2 Oct 2025 16:52:14 GMT (envelope-from git) Date: Thu, 2 Oct 2025 16:52:14 GMT Message-Id: <202510021652.592GqEZv025090@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 44f3e9f7f6c9 - main - usbhid.4: Note where debug messages go List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 44f3e9f7f6c9afed33d2967c1ed48361bb6b404b Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=44f3e9f7f6c9afed33d2967c1ed48361bb6b404b commit 44f3e9f7f6c9afed33d2967c1ed48361bb6b404b Author: Ed Maste AuthorDate: 2025-10-02 16:50:15 +0000 Commit: Ed Maste CommitDate: 2025-10-02 16:51:58 +0000 usbhid.4: Note where debug messages go PR: 280377 Sponsored by: The FreeBSD Foundation --- share/man/man4/usbhid.4 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/man/man4/usbhid.4 b/share/man/man4/usbhid.4 index 4c7f254bdace..0b2e7230e3f4 100644 --- a/share/man/man4/usbhid.4 +++ b/share/man/man4/usbhid.4 @@ -67,6 +67,8 @@ Default is 1. Debug output level, where 0 is debugging disabled and larger values increase debug message verbosity. Default is 0. +Debug messages are printed on the system console and can be viewed using +.Xr dmesg 8 . .El .Sh SEE ALSO .Xr ehci 4 , From nobody Thu Oct 2 17:25:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cczGN5ymLz69cNQ for ; Thu, 02 Oct 2025 17:25:48 +0000 (UTC) (envelope-from ziaee@runbox.com) Received: from mailtransmit04.runbox.com (mailtransmit04.runbox.com [IPv6:2a0c:5a00:149::25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cczGN3gBSz3vy4; Thu, 02 Oct 2025 17:25:48 +0000 (UTC) (envelope-from ziaee@runbox.com) Authentication-Results: mx1.freebsd.org; none Received: from mailtransmit03.runbox ([10.9.9.163] helo=aibo.runbox.com) by mailtransmit04.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1v4N3k-00GDIV-6r; Thu, 02 Oct 2025 19:25:40 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=selector1; h=Message-Id:In-Reply-To:Date:Subject:To:From:MIME-Version: Content-Transfer-Encoding:Content-Type; bh=iEueauTkmCduOgadbd9lYl9I0/wz3DpkQKhvIW+QzfY=; b=0EXwYuSDwy606tq7NmymCEOeD8 EVgkYmsBo2XKVH88gNs7GELna+IwLCQitB6OW98Z4g8LcBpwFJ5I0ZaevgmwC7RPnJ2/U5lWj0cs4 euXPum6q3uybFdZrAahz5286/5HSF2+9hYg2iO2kRfI3WWuHedViy7vko/y9J53a5lopz0N6LxaDA 6SUTi2dwGXXzsAbuAJbPfFgrewPdKioIeIak7+sq1ZuDUTnVquyHR8e7dcssZvaBKHiAtpQ2otsq1 10Bv12g5wnI/oT9YD/HBpRAM9LRuU6ltuWqVmnAW8DHE/4j3Hp6M5Dneqoyx9+os2bW+xaB/GibtV IHVVvEbw==; Received: from [10.9.9.128] (helo=rmmprod06.runbox) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1v4N3j-0007wm-E7; Thu, 02 Oct 2025 19:25:39 +0200 Received: from mail by rmmprod06.runbox with local (Exim 4.86_2) (envelope-from ) id 1v4N3j-0004oU-CX; Thu, 02 Oct 2025 19:25:39 +0200 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 Received: from [Authenticated alias (1191889)] by runbox.com with http (RMM6); Thu, 02 Oct 2025 17:25:39 GMT From: "Alexander Ziaee" To: "Mark Millard" , "ziaee" , "dev-commits-src-main" , "obiwac" Subject: Re: git: 2f7a796b590e - main - thunderbolt.4: Initial manual for HW Relnotes Date: Thu, 02 Oct 2025 17:25:39 +0000 (UTC) X-RMM-Aliasid: 1191889 X-Mailer: RMM6 In-Reply-To: <1F1B3FF4-A31E-4E9C-8CFC-7BB7F1A38AFD@yahoo.com> Message-Id: X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cczGN3gBSz3vy4 On 2025-10-02 12:47 -04:00 EDT, "Mark Millard" wrote: > Alexander Ziaee wrote on > Date: Thu, 02 Oct 2025 15:14:07 UTC : >=20 >> The branch main has been updated by ziaee: >>=20 >> URL: https://cgit.FreeBSD.org/src/commit/?id=3D2f7a796b590e67c5d123f2b00= b3aaf7ba7a32a13 >>=20 >> commit 2f7a796b590e67c5d123f2b00b3aaf7ba7a32a13 >> Author: Alexander Ziaee >> AuthorDate: 2025-10-02 12:05:25 +0000 >> Commit: Alexander Ziaee >> CommitDate: 2025-10-02 15:12:48 +0000 >>=20 >> thunderbolt.4: Initial manual for HW Relnotes >>=20 >> This manual contains nothing and is only suitable for the HW Relnotes, >> but lets get it in so we have something and then can iterate on it. >>=20 >> MFC after: 3 minutes >> Fixes: 2ed9833791f2 (thunderbolt: Import USB4 code) >> Discussed with: obiwac >> Differential Revision: https://reviews.freebsd.org/D52847 >> --- >> share/man/man4/Makefile | 1 + >> share/man/man4/thunderbolt.4 | 22 ++++++++++++++++++++++ >> 2 files changed, 23 insertions(+) >>=20 >> diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile >> index f5d7a0e081fc..6e076722c786 100644 >> --- a/share/man/man4/Makefile >> +++ b/share/man/man4/Makefile >> @@ -589,6 +589,7 @@ MAN=3D aac.4 \ >> tdfx.4 \ >> termios.4 \ >> textdump.4 \ >> + thunderbolt.4 \ >> ti.4 \ >> timecounters.4 \ >> tmpfs.4 \ >> diff --git a/share/man/man4/thunderbolt.4 b/share/man/man4/thunderbolt.4 >> new file mode 100644 >> index 000000000000..3477c11fb60d >> --- /dev/null >> +++ b/share/man/man4/thunderbolt.4 >> @@ -0,0 +1,22 @@ >> +.\" >> +.\" Copyright (c) 2025 Alexander Ziaee >> +.\" >> +.\" SPDX-License-Identifier: BSD-2-Clause >> +.\" >> +.Dd October 2, 2025 >> +.Dt THUNDERBOLT 4 >> +.Os >> +.Sh NAME >> +.Nm thunderbolt >> +.Nd USB4 controller driver >> +.Sh SYNOPSIS >> +.Cd device thunderbolt >> +.Sh HARDWARE >> +The >> +.Nm >> +driver supports USB4 controllers. >=20 > As I understand things, being fairly explicit related the > following is likely required (not a proposed wording or > presentation): >=20 > Quoting USB4 V2: "A USB4 Host or USB4 Peripheral Device can > optionally support interoperability with Thunderbolt 3 > (TBT3) products." >=20 > Quoting USB4 V1: "A USB4 host or USB4 peripheral device can > optionally support interoperability with Thunderbolt 3 > (TBT3) products." >=20 > In both, this is tied to Chapter 13, "Interoperability with > Thunderbolt(tm) 3 systems". As I understand FreeBSD is not > trying to meet the criteria in that chapter, for example. >=20 > USB4 does not require a certification process, as I > remember. Thunderbolt 4 and 5 do, as I remember. >=20 > As I remember, a distinction between USB4 and Thunderbolt 4 > and 5 was that Thunderbolt 4 and 5 require (nearly?) all > optional items from the matching USB4 version to be > implemented (so: not optional if Thunderbolt 4 or 5 is > claimed/certified). Also, it seems unlikely that FreeBSD > would go through a Thunderbolt 4 or 5 certification process. >=20 > Overall this seems to mean not meeting the Thunderbolt 4 > and/or 5 criteria fully and not supporting Thunderbolt 3 > --but just meeting the criteria for one or both of: >=20 > ) USB4 V1 without "TBT3" support > ) USB4 V2 without "TBT3" support >=20 > That would be a subset of the Thunderbolt 4 or 5 criteria > in a way that excludes Thunderbolt 3. >=20 > Referencing Thunderbolt without someplace being fairly > explicit about those types of relationships could easily > leave a misimpression (even if I've gotten some of the > status wrong above). >=20 > My guess here is that enough is known about the intent > in this area to be able to have material about this type > of thing in place at any time. My impression is that actually nothing works yet, but we now have a driver = called thunderbolt which is made to support these controllers. The driver i= s in, allegedly, and so it's existence needs to be mentioned in the canonic= al places where we mention our drivers because people are looking for them = for assorted reasons. Patches to the doc are extremely welcome! Best, Alex >> +.Sh HISTORY >> +The >> +.Nm >> +driver appeared in >> +.Fx 15.0 . >>=20 >=20 > =3D=3D=3D > Mark Millard > marklmi at yahoo.com >=20 >=20= From nobody Thu Oct 2 17:46:49 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cczkd72CDz69fPm; Thu, 02 Oct 2025 17:46: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 4cczkd6Vjkz3y4K; Thu, 02 Oct 2025 17:46:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759427209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aAJSR0PNr8EYmaFroGuriZbh2sUdgCARWXYQJvUL9ho=; b=pRzORfHqx+8xml+TZeKgUKnR99kK+SG/eOx3HfkVDD8X6i0P7e97nHlxUiM8vu/rzRc8YF +2fCFA28WwDGWfUZNTz3rcsOODtnvauaES6BmaT46U7ExV+xx6eIll/QC2ND7EJsJ1aSgn uY6zjke6DkIGbVP6HbTzPnPWminaDds3by5nxQFMUVCAvCbW/B7QY4nca/u+ZSZz2aXQaH xRYOYLazJ4zuLPo7KXSXpA+wDOY/BfHH93mPjWYVdgqXVBag5XsYMy4TINvhFfVQdESo7g dXdh+2Rm0DpZII1Y786LXN90D/elhzPw9/dUQRQdFdA3hsgXu/avxA332mrpdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759427209; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aAJSR0PNr8EYmaFroGuriZbh2sUdgCARWXYQJvUL9ho=; b=NR/pR3t14ZXbroMkdtu+MVDh6xFwzX4be94NhrYSzNZ2i2htGzGUcxM1DLs/5nKtPhBl3k 3ZrVlRfUyXfSAoE3KvPZGuwB58HKKab3Rp7F0m/ZzKQQSqZk5Hq0zg/+H3eEuxcYF25LhU z+Mz8SJdBaiAGevDjLAjxZx5+y3qlwdYC1LBvieenOQWRPeMtGkJqXCce+cHU3MbWfClvT MkSPsgv/GgrNxtL6eB0ETpMfoJIPSgqGaiAklgPoTdniEWv2/gCjatunmcTZTthURqivyM rG/Coo9KdxG5qb3f3+7Bps4JH3KhG7VPN2AQXM/lPZnN89fOS8cuEugm0/NI/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759427209; a=rsa-sha256; cv=none; b=Idsm8ppyNxpnVebdbIQoLY18VEdrvtKU2J5JmdNXN8qISty7u5rXbr1sCpKp/q+K80/3nV Xj03VAUh83E1di8Ivaoosv0FSvXLvDXBoo+03+Vj+pDBYIlEIbCOyggrHZLP+2ihOknG25 M3UdDuB/q597NhTWYkidNR8iBVtcVc1wsgT0TqdFxStZr9D2I9IKTaouONbXxWucFKKddH nhur/fPd1T2yp/dznFyVCPf7Tlb/BDQlCZwb++ZZuho75e3SU9QP6cmr5C7ZQsbqCH7PSS YOV1Iu3fSjd6tt6Ot/TiRAO+JqwXTK0C41IYv6t2aiTxj9srQtG2vyG1gr0BeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cczkd5nz6z3TZ; Thu, 02 Oct 2025 17:46:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592HknId023438; Thu, 2 Oct 2025 17:46:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592Hkn36023435; Thu, 2 Oct 2025 17:46:49 GMT (envelope-from git) Date: Thu, 2 Oct 2025 17:46:49 GMT Message-Id: <202510021746.592Hkn36023435@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 70993c2fbe1a - main - umass.4: Add HISTORY, HARDWARE, and SPDX 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: 70993c2fbe1acb68f45bea5fc5fa086650876e23 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=70993c2fbe1acb68f45bea5fc5fa086650876e23 commit 70993c2fbe1acb68f45bea5fc5fa086650876e23 Author: Alexander Ziaee AuthorDate: 2025-10-02 17:37:27 +0000 Commit: Alexander Ziaee CommitDate: 2025-10-02 17:45:15 +0000 umass.4: Add HISTORY, HARDWARE, and SPDX While here, break a long line that agitates the linter. Fixes: cc16f1b9d9261f18 (Add umass.c) MFC after: 1 hour Discussed with: imp, ivy diff --git a/sys/dev/usb/FILES b/sys/dev/usb/FILES --- share/man/man4/umass.4 | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/share/man/man4/umass.4 b/share/man/man4/umass.4 index 03e8b6ff6ef1..9164f02b7d1e 100644 --- a/share/man/man4/umass.4 +++ b/share/man/man4/umass.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 1999 .\" Nick Hibma . All rights reserved. .\" @@ -22,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 27, 2020 +.Dd October 2, 2025 .Dt UMASS 4 .Os .Sh NAME @@ -71,6 +74,22 @@ requires and .Xr scbus 4 to be included in the kernel. +.Sh HARDWARE +The +.Nm +driver supports USB Mass Storage devices such as: +.Pp +.Bl -bullet -compact +.It +USB thumb drives +.It +USB hard disk drives +.It +USB floppy drives +.El +.Sh CACHE EFFECTS +Many direct access devices are equipped with read and/or write caches. +Parameters affecting the device's cache are stored in mode page 8, .Sh EXAMPLES .Bd -literal -offset indent device umass @@ -92,7 +111,8 @@ camcontrol rescan 0:0:3 Rescan all slots on a multi-slot flash reader, where the slots map to separate LUNs on a single SCSI ID. Typically only the first slot will be enabled at boot time. -This assumes that the flash reader is the first SCSI bus in the system and has 4 slots. +This assumes that +the flash reader is the first SCSI bus in the system and has 4 slots. .Sh SEE ALSO .Xr cfumass 4 , .Xr ehci 4 , @@ -101,7 +121,11 @@ This assumes that the flash reader is the first SCSI bus in the system and has 4 .Xr usb 4 , .Xr xhci 4 , .Xr camcontrol 8 -.\".Sh HISTORY +.Sh HISTORY +The +.Nm +driver appeared in +.Fx 4.3 . .Sh AUTHORS .An -nosplit The From nobody Thu Oct 2 18:06:06 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cd09C0bcZz69h8L for ; Thu, 02 Oct 2025 18:06:23 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic317-20.consmr.mail.gq1.yahoo.com (sonic317-20.consmr.mail.gq1.yahoo.com [98.137.66.146]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cd0994GFPz43Sh for ; Thu, 02 Oct 2025 18:06:21 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b="CFLX/zHC"; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.66.146 as permitted sender) smtp.mailfrom=marklmi@yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1759428379; bh=Zh7nkrfvHQdgv5NX0t7xwdEZ88swAjVKFm/SrO3qAxc=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=CFLX/zHCcMZzqnBI/svxYc6wTxtYoKe18Fo6pnT4EBzr+Y7E2EF5TvlA6a6vqqFb5UMi1TpbSGasQ8FDxF765IcTmVDlz48AonFkgovk/uO4kIyOozT0Qfuzp811Ik8/NnZicQOcpEAxWV2EiO28m7wpgjcm6Wy7uXOJgLUie3KtOn2YREkDCDI9O1GznmoiwaZnkly9HUWUOCUYNc+VmX+lAMNOckJKUS0eNDuyWzDC3Inal1WJnYrhcmA2d1Fsa9IrIqyodAUw6X6hVgKmoG4QK7mlAn/YGwCW6GhqYgaPjGSeoSDRFnFMXIFTwLjYDd4c5lQzGdDyh+ojA+S4sg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1759428379; bh=k3ZOUcAfS5YxUGoONDbfBFMsdxMWhmla+IQsolf6hFj=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=UEHqBXlXE0PiPRM6JxHkuqMtJbYaGD9fGC3D/XbdTmPLUEoKreL3OcGPYkpmPaFFxlgTdKAtJtt4R4tB6EBniJMB3NMdesPrR2yeVIDe9ofguY12XC2QDrHZx21qBLe9DwvzretALJz4akwlhOMKUeesNmiU1RCg7D9gXlEvf8e+BfhNCvQYqQALUMGUBf6V8x+AgRTCO1ijNqbBkngxaW5mEHZHdX9n7S8fUChGwaaCAZEj6YYcxLZjV3ebHFEVasTm3EhDiTrM+VA/a2V/aJUsP0mrmMfpQKI2l2Xy0FUHsq5AITOODYUtzrTtSKG3lOx0Ggkmn1F4iTqCZoXiew== X-YMail-OSG: UzL1EFgVM1nLlD9YwhgM14ol9oXplNS_aQqyxjJyO78xWrkPllJw2HaYKJYzZtt dZnOarN10IPM0aHJW4iP3bUdntc1OzdGXhRjxj.ag2tDRMpIRlmv2RHjVbzKXLe0WeFPGc004xP6 cvP29jPXFOAtIKVnzNYZ0zoR1Jt5X4SYRorES2TpLSwxwO7zGl2ATU3TRnELV5e4mzEcK8hi37a6 fuE2QVDvZ30s3rxgX.qkqGVljGjTX1O1Y_kij85j694r1MLohKlolIkYtaNelXEMNfE3aaYtdJMN NCXAKOKjRtGbd91VIWu.avxYoRRth7L1f2FqsdBblBMOg3ajGytKfMeiZV77Zpn3WbtrUpexctsT sVS76qkqZLNeEApNCTYf5s7.pITNrczt2cCynJBXSW78eGum6BCfkQb_ygR8snOY9DW0CeB0E3x3 D9GzdYJC1dK6Zj0m1xo3hSnkqJU3vihlX1189yDEjB2j_x9Hff1AXzVFZcMofjp4HXq9QnTmyXeq AvvEOr5pSvBaHevoC7UpTv7MFW6OBTqCfZ8w0uLaKMAEiC_Qoe6cv1lTaNXibaSiHH5E650ZJa.D h9ZDa9T7FY2ZYpOMv.7QvouvPqz4ourxmKidE_PoqPp1AORA.3TMkI_wm_or4KzG2o0CYtpLiU.3 7_jdr9ZDt3QqN4eVp3cWIoezP9sZ1v1FhaNCKfGmUANpW82ubDnhODl1TczYI8MJ0l_gIH3lPjq3 fMDK1evsJ3Vh_.VaGHY.WUP0raug_gqpGCNL9ubAo453jVPsgmVuVtuQnO3gkEfk4fChGxpJP0C. DrwVSsDDIl0VBBGTubWgjk1SQSk7a.mMKSetNKoN3OtJZHU51zpEDLxK_kvkwjWgqlD6mIZYVswW hN2RFuvJ.kKIXhrEJNZ8UPzruXoFMx6TbFQ9nyoCOVIbWFI8oxJWC6DrZVndUOCbzvbSGados7NZ 5aZavhUEDaLwzGSetfYwluK34noSCO5nuXyCEhTOSW18UVXdBeU8ovdch4t9mJXH4RKlGuWoP3A_ O.pY8IaQkaMNtX1sUumEnvcucKEKj7DiDrog4DFGx_gcbeI_N65n8EZJvElvART0.csooojy1Q4J z2q9JtJ8RYDBNV1.Vy3UwXeHzyZcswc7QCZQTuHRpUb471WeZPBagH6lgIkUUoF0nVe_prmfb_yn 9.tQkW3NmO8USBPFCOEycbxlXgdXsnGQGtpRwIODzQuQbhwG4reUZ0aFuf..iCHkDZtpA.Dw6x_9 Pp_UYiRlRSus56DSlkJ6OKI__VQNXrLCSnwG2zAvQsdVc8Ei0ApucLe302gHAnt3rpEahAk7WPvE A4.hfw_98T04zAepdgwbLBuVpswVhltK9xFjq2h_Ny4uWYa0E08mkfqGe.MQjMVKXM2FsuPBslLV kjA15JB0DfVyRVgV1sEMqlqvoc71m.xMj0HVwwfB.ZiCApHhoz1mAVZkrsqUwVOjMkElagiqkg3W vP8RAZabPlLCyPxC55MhInWgvSmTW9OqOpa8MWcLt9Qsa8YDl7rXdRHLqLl91DYUpjislMdUut9D z9QNCx7thiBBfsO9ztr_naYzdq_iyt4oPSetwIVuGn3wC6Tvuv08RQ2UTysll7uLo9HSId6bl6Ba fLSQiUHumZml3872donLVbWP6LC2mJYy1z1APctYc4g3dheC2IUSl7C1TPOauJx9qBrTBLWQ7Kcn kLWQNbxA93rnOPaSw9LBCMRtw82fQtOXHCOzKWFru1kGdscV0lZoi7axW9NBdLIzcmL.tGXKBc_r FE_BjYhNJge30bIsRL7I4x7dGvexFWtQ7cWYe0S47siqS9HSyNjKURI8IA_XhWTZBt_yUCxdP20V u9mNZQ7GjLGtChA_F7ge8Qi7jfob61faUaXVk4Mwk3o8U59AHVOj0rPA1kYgX92GlN_Lk0uZvw5. mEo5d_j131mkAX7J92u1v1XtWu8Sk4y2j3y03WWkK9wd9FY18MtU_a89m4knhU_xwkA5CBNec5sn 7Gh4wyN7tYuS9QUmsDRvDh79stLO7BUhES673mLjD0RJN3PBv4rZhoilSsu19w465YhyEvRN0RfW 3pt7RXXCdgLHdJn3CpxLk6_zTVxPx2H3yHk4J5W_iubQdZlueF4BJHt1tULPqtqC5LfN2wbmm3gb hpx_A.6EG7Pkl1F7dgcW171HRuvEXolN7dy1BNr.SuTKIF9_QeqjAoz.iSeRo.Qs77BlIVE2hA21 ia995Ms4WAiakCuxgzu2Eq4QE8F3u.zn1Ltyu7aODCdrjL1H32DV50ZGnzJrqAI1HC4cGzvvBhSd hot2S4v1yciuO_5UYTeeC4dQNvWrLzL3xwpiys1M- X-Sonic-MF: X-Sonic-ID: e5010be7-0626-4d7f-bb07-ee25f17256ca Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.gq1.yahoo.com with HTTP; Thu, 2 Oct 2025 18:06:19 +0000 Received: by hermes--production-gq1-66b66ffd5-kjp7g (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 80f901699df57316d0d0dfcdf989a489; Thu, 02 Oct 2025 18:06:17 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: RE: git: 2ed9833791f2 - main - thunderbolt: Import USB4 code [more explicit note now that Thunderbotl 3 is mentioned] Message-Id: <51FCEFDE-7112-4C60-AE63-77E814967A63@yahoo.com> Date: Thu, 2 Oct 2025 11:06:06 -0700 To: ziaee@freebsd.org, dev-commits-src-main@freebsd.org X-Mailer: Apple Mail (2.3826.700.81) References: <51FCEFDE-7112-4C60-AE63-77E814967A63.ref@yahoo.com> X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.99 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.985]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_FROM(0.00)[yahoo.com]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; DKIM_TRACE(0.00)[yahoo.com:+]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.66.146:from]; APPLE_MAILER_COMMON(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.66.146:from] X-Rspamd-Queue-Id: 4cd0994GFPz43Sh Alexander Ziaee wrote on Date: Thu, 02 Oct 2025 15:38:02 UTC : > The branch main has been updated by ziaee: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3De4e412e45a17d2f63f6693d41b274379= d108c82f >=20 > commit e4e412e45a17d2f63f6693d41b274379d108c82f > Author: Alexander Ziaee > AuthorDate: 2025-10-02 15:27:43 +0000 > Commit: Alexander Ziaee > CommitDate: 2025-10-02 15:37:12 +0000 >=20 > thunderbolt.4: Mention Thunderbolt 3 >=20 > MFC after: 1 hr > Reported by: emaste > Fixes: 2f7a796b590e (thunderbolt.4: Initial manual) > --- > share/man/man4/thunderbolt.4 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/share/man/man4/thunderbolt.4 = b/share/man/man4/thunderbolt.4 > index 3477c11fb60d..fd7cb1f3f338 100644 > --- a/share/man/man4/thunderbolt.4 > +++ b/share/man/man4/thunderbolt.4 > @@ -14,7 +14,7 @@ > .Sh HARDWARE > The > .Nm > -driver supports USB4 controllers. > +driver supports Thunderbolt 3 and USB4 controllers. USB4 V1 and V2 both have a Chapter 13, "Interoperability with Thunderbolt(tm) 3 systems" that "describes the additional requirements for a Router that supports TBT3-compatible interoperability". Also: "When interoperating with a TBT3 product, Thunderbolt Alt Mode is established on the link between products. The USB Type-C Specification describes how a USB4 product negotiates and enters Thunderbolt Alt Mode." Quoting USB4 V2: "A USB4 Host or USB4 Peripheral Device can optionally support interoperability with Thunderbolt 3 (TBT3) products." Quoting USB4 V1: "A USB4 host or USB4 peripheral device can optionally support interoperability with Thunderbolt 3 (TBT3) products." Given this context, = https://lists.freebsd.org/archives/dev-commits-src-main/2025-September/036= 033.html had written: QUOTE For context, older TB chips implemented the connection manager in firmware (ICM) instead of in the OS (HCM), but maintaining the ICM code would be a huge burden for not many chips. END QUOTE That seems to leave out at least some "Thunderbolt 3 controllers". It had been my impression that the above meant not meeting the full USB4 V1 or V2 criteria for claiming the optional support of Thunderbolt 3 inoperability by the USB4 V1 or V2 chapter 13 criteria and possibly material elsewhere in USB4 V1 and or V2 or in USB Type-C Specification's Thunderbolt Alt Mode material. May be the implication is interoperability with only some types of Thunderbolt 3 contexts but not meeting the official criteria for the range of USB4 Thunderbolt 3 support? My impressions are definitely not those of an expert. This seems to be an area where implications of loose statements are not clearly traceable to clear answers, unfortunately. Another area of note: Being explicit about USB4 V2 vs. USB4 V1 likely is important. It seems that in some ways V2 has dropped some V1 criteria in ways that simplify some things, although I'm not sure how much that applies to hosts. A non-host example is USB4 V2 Dock's do not need their upstream facing port to support "TBT3-compatibility" but USB4 V1 requires that support. > .Sh HISTORY > The > .Nm =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Thu Oct 2 18:06: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 4cd09s2mJCz69gs4; Thu, 02 Oct 2025 18:06:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cd09s26Gpz43Qw; Thu, 02 Oct 2025 18:06:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759428417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n8EfBlN6KjPgvmSRHsPkzN+PoW1+epD6rzO4L74OU5k=; b=p7pVuO2K2RyAaRtnbGqKqI+pN8WtXXKEOLgVayKuTIighhvlTlpvQTvSHj7KBCdZGpSfcT qLvIil/VN9lIlz9voXX8IpcY5c3xIdVySHlFYtnQs7hJ7gZLjiVKg0d94vZjYiFSua2E7n ym3eS3TxejNFzdmBG2Cjj5ghn5wiQ/75DW0buXUaer9K8gCwhV7x2p1OVcENyIHq0IYPjy LAIqL1jX4FPDPeGII814ObsUmelJsOS8hfEpscqJs6HLvAUFZvqyb6rCDmc26bHO8U4CbR lWTBAbMlOV95adzD5UWc5oFcaaT5SQOZOD6gZoJseELE0E7veQfZKk6DaLzP+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759428417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n8EfBlN6KjPgvmSRHsPkzN+PoW1+epD6rzO4L74OU5k=; b=JgjY1fqWNwjxKJcfzS25U9VeXmMXvczxziHmstRePVVOvz14WEoHU9XgOdVruUsXV/ru7i YSwtoD93EmmoQBRRfQ1nmRO2g1pUNXL2FbNIySMtDjolqwFPAx6i77YDb0SaC8ZaHSbO23 iKBBGVAaeGTAPKr1pxBh9GKq1EM2meWIa0fT4UpRXpHrfjv5G2hS3Z18JFmtSb4o11PTvX E6kOrYwb5ZD9v+hToF5Hj8iJkjy0BRNIA58Xeivkcx6gXhlZ+uj/VfxaGVUFufbUNFcLsk V9seBN0Iu4+xsaCd4bMuCzm/4NQbyBO5KbjBBUcIJ8kKViujoAQRKM2x3TZ0qw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759428417; a=rsa-sha256; cv=none; b=Hi4J716e0WCqSvrc5yTBsvtLmAm/kqqOrW1QMb8glQBMdvmcHXMuknAZRp8VlaO7s6QDGc HWFPLY7u4GfWgq2++bI59fpE/d/O+ncsoUqtx1Q8PgevY9muLRg43OaCkE33oEh1jPfxJH GZvKzH9joqcbKp8sMT0JZngU+pUMxbqlVL5ySaS7KxlqeY7SQdQ935O4VXxZPZxWzyKMIs Y9V5Ji2nu00slaFjapxoLUZMKVmTNDMn5FwM/ylnFDtOvwooLbFOiCuQd6S/giG15gWW43 CdX+4FnEDkfd8TFIRDsr2DM9qFtrWV6rk4zvqQPehUGQkAiaVEciXzRVik4ZaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cd09s1bZ8z3Xf; Thu, 02 Oct 2025 18:06:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592I6vGZ062248; Thu, 2 Oct 2025 18:06:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592I6vDX062245; Thu, 2 Oct 2025 18:06:57 GMT (envelope-from git) Date: Thu, 2 Oct 2025 18:06:57 GMT Message-Id: <202510021806.592I6vDX062245@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 34a2b5b09afe - main - umass.4: Remove some extra lines which snuck in 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: 34a2b5b09afe2a2fa3672f448d522b4665db9272 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=34a2b5b09afe2a2fa3672f448d522b4665db9272 commit 34a2b5b09afe2a2fa3672f448d522b4665db9272 Author: Alexander Ziaee AuthorDate: 2025-10-02 18:02:01 +0000 Commit: Alexander Ziaee CommitDate: 2025-10-02 18:02:01 +0000 umass.4: Remove some extra lines which snuck in Fixes: 70993c2fbe1ac (umass.4: Add HISTORY, HARDWARE, and SPDX) MFC with: 70993c2fbe1ac (umass.4: Add HISTORY, HARDWARE, and SPDX) --- share/man/man4/umass.4 | 3 --- 1 file changed, 3 deletions(-) diff --git a/share/man/man4/umass.4 b/share/man/man4/umass.4 index 9164f02b7d1e..db4e6f0890f2 100644 --- a/share/man/man4/umass.4 +++ b/share/man/man4/umass.4 @@ -87,9 +87,6 @@ USB hard disk drives .It USB floppy drives .El -.Sh CACHE EFFECTS -Many direct access devices are equipped with read and/or write caches. -Parameters affecting the device's cache are stored in mode page 8, .Sh EXAMPLES .Bd -literal -offset indent device umass From nobody Thu Oct 2 18:17: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 4cd0Q66Rvqz69j8G; Thu, 02 Oct 2025 18:17: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 4cd0Q65GGNz45FJ; Thu, 02 Oct 2025 18:17:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759429054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ag6FhnwUedi00bkJjg1RTdfZ1Ih3DVuyGSkBRqneiU4=; b=mCH5RzUrWnKMdcdFVNGdJSn5A8K8sQ6rDaRQ3erXdtbAI2T4ve66q8gifO2JmWsqF7YZtJ 7Gdc/S6ZPfZu1c2z5yRy5tn+A+mMBcsWHVmXIeaV/oX/MnoBoxYB4bGGkl7FH84Lybrdlo l1mZwgUDCIiSxG5AO8UJoyX5uMm5KZFUQL+wF05SQUFZ37W2iSoVqe1TOivI2/fYVBdcUM ydkQNPGvcQMQi9Z6WIOqVLFRo2QBSfoe/3FyLiHhIDmcdDXgQpE69PuAO/ITqo3ujWhqZw UFv+Qr/b+qmRJZIA1MV8WlXG28EtYFtHAfxS8bXExTkMtfBJMbBXIkrGXw4R1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759429054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ag6FhnwUedi00bkJjg1RTdfZ1Ih3DVuyGSkBRqneiU4=; b=ep4N9W+E1VnC6E0d5PZyVbEqSTwC4q/+bZkLDadZsp+FNDGzeMjZornRCiHG7vY9Egq2cK xPnpNR+nCtUaE2Z5tiAR+SUR5XqwSCYnnLvsB/jRPgNL/RbKjI7zUimmHQCBQjHVy3j7Xf S+eb6x5xrEPYPizxZCpL3XA/y5hLhyZwRNZ1GI7JFi9t4qbqKcHk+nZty5FJpzOSSsDw5G kIIuA+O2DNOMOv9i7VJ87j1l/IVY/jX4rXvxoWsVaLnBPbK9f5bYbultiIkqnhpbJ6WEfy TdIffHmfHLhKXKiokfm29dDcWRkHYQVto8wCu64k0u7wBew2Og/+DpohPRnmGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759429054; a=rsa-sha256; cv=none; b=hAoU29yFeZqsXXGhvfPr9HyTThxBpdmZ5z5QwK96VRyBET/uwwzAwHTXZfQrAvkcnXeUP+ vqfOTnhqI01L5cTz9tlqLdm442D/7q2NKZW0QvU1t3k5hFl9t4sRqW8K4RNQCxBXzl7alM mB5tvVKAKSSHRVSRmWLttVOM+l2KQPZMUNv/7L3YtazPs3/cW4POHmAnmea1oqPZtw5IwK 8zDmRRtyhtn3JmCh2A2BBmFA7uihXPRhFDY0LfaNMlhGOL/EC3za2CVUcU8ayxd8iR02rq a/vdbk0N4I8tzXWC0vi5lYw/HUYC+ySNAohxF8I4pHMpipGwH+5q1S4CQ90EQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cd0Q64sBvz429; Thu, 02 Oct 2025 18:17:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592IHYIO082360; Thu, 2 Oct 2025 18:17:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592IHYaU082357; Thu, 2 Oct 2025 18:17:34 GMT (envelope-from git) Date: Thu, 2 Oct 2025 18:17:34 GMT Message-Id: <202510021817.592IHYaU082357@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Maxim Konovalov Subject: git: 2ed9abe1d873 - main - snl.3: escape \n propertly 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: maxim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2ed9abe1d873465d375b47ece0a379e1dbd99719 Auto-Submitted: auto-generated The branch main has been updated by maxim: URL: https://cgit.FreeBSD.org/src/commit/?id=2ed9abe1d873465d375b47ece0a379e1dbd99719 commit 2ed9abe1d873465d375b47ece0a379e1dbd99719 Author: Maxim Konovalov AuthorDate: 2025-10-02 18:15:16 +0000 Commit: Maxim Konovalov CommitDate: 2025-10-02 18:15:16 +0000 snl.3: escape \n propertly Reported by: Bruno Silvestre --- share/man/man3/snl.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man3/snl.3 b/share/man/man3/snl.3 index 9a6eceb66a32..f678d6cb2cea 100644 --- a/share/man/man3/snl.3 +++ b/share/man/man3/snl.3 @@ -288,7 +288,7 @@ main(int ac, char *argv[]) struct nl_parsed_link link = {}; if (!snl_parse_nlmsg(&ss, hdr, &link_parser, &link)) continue; - printf("Link#%u %s mtu %u\n", link.ifi_index, link.ifla_ifname, link.ifla_mtu); + printf("Link#%u %s mtu %u\\n", link.ifi_index, link.ifla_ifname, link.ifla_mtu); } return (0); From nobody Thu Oct 2 19:06:16 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cd1VJ5sxLz69pKY; Thu, 02 Oct 2025 19:06:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cd1VJ54v9z3D0X; Thu, 02 Oct 2025 19:06:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759431976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sLOQrYk7gi8xM6YHzebY6tothxDUu30cRfVJ2FXjCt4=; b=gQEepBRotLcJsyQpR7BimwaGiNeiXuCNpi9DXFa/+SCrVR724vGpcAi8dXrYubtKhZ966x WEHhOELaH3HojKdyhHLBHXhUzYrqWNhp/VMoQDEDHxhxit66AUdYoX/wJhqLSJojU9rr/E EHlVm7FxH00d7le5Kw9E+lcWzgbjZ3YDeGBLAtY4I0sLp9Cd8R7/oISK1hoPNsdxNT5qCa nZkK3rh9H8YCUeuWvErztp6d5kHEysvcchPU6xA2EOlSHsjQvWXw6EqVxxLu++RjIiUA0B FlGZ/deWimphJo7siGTfWji+sBrff1rN27m/u7pMMOkykaiKiXtzHwjmTBYQ9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759431976; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sLOQrYk7gi8xM6YHzebY6tothxDUu30cRfVJ2FXjCt4=; b=iDhvhAp9az7NY95KHhAU3PwX8uxEgUtNyRieM366YhBr7ICfLbL4Wl0KO749HO7MYUx1uy hK0zHp9S5aZE40RvtVc8sRgvGwI6NiVH2T/JUUa0bbk1xFCF/hJEimjIaxdQvqfjXUIO1y bQX13q3048TWC7juTl3Bs9KgfTn/que8vKk7ZGnX620MQ1VcbqIT6j7ffi1a4q9qC00kXZ 4LJVxoTxeQDG6CrfTDnghTKTAFjH4ZezeKkIB8VOQRujc/hY5p5H2w9/ge8369mq5T6qV9 jzlmJuLeW4IfAKW9XDKHTjyBaaUQUPjUNnZ77QfmotSEwmy2cP3F5CbC50/j0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759431976; a=rsa-sha256; cv=none; b=h4ZsvyGSTBDvdpKMxUTIOXp499daJ7vrTdpqEh7h7VRajuJSzz5O/0D+vxqFRbZhm8S7VB WxWpq8/xBp1CBTW/PmSdVUqNOCuTGCNwmOZZdNq85dVQcKymY9UL/kObJHqBJYkjlWi1zh sXqZdV+mG7Wcn1gW+amGAeHxnM+najErcbIuqNZm/9V9MA0FpGyA/UM5PIbTLXAJsNsHxb 5t7jgbAP/Ip2jWGrlnVPseib9CJi7JfW1gy5MOIFIMwePm1bVZbmgHOzT8Ezil5r+MjjU9 ro4OqkxBGzqZn6SrfVTq7M9JjBQtalmerdSRJtSlqMrI77sZkaPJvq9lpolLCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cd1VJ4hB7z5ST; Thu, 02 Oct 2025 19:06:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592J6Gbu078690; Thu, 2 Oct 2025 19:06:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592J6GO3078687; Thu, 2 Oct 2025 19:06:16 GMT (envelope-from git) Date: Thu, 2 Oct 2025 19:06:16 GMT Message-Id: <202510021906.592J6GO3078687@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 94758e72fdbd - main - ipfilter ippool: Flag deleted entries with "#" 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: 94758e72fdbd6b218e79884e22347eb357a7e51d Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=94758e72fdbd6b218e79884e22347eb357a7e51d commit 94758e72fdbd6b218e79884e22347eb357a7e51d Author: Cy Schubert AuthorDate: 2022-11-02 05:28:19 +0000 Commit: Cy Schubert CommitDate: 2025-10-02 19:03:35 +0000 ipfilter ippool: Flag deleted entries with "#" List deleted entries prefixed by "#". This is consistent with other ippool list functions. Fixes: 7531c434a593 MFC after: 1 week --- sbin/ipf/libipf/printpooldata.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbin/ipf/libipf/printpooldata.c b/sbin/ipf/libipf/printpooldata.c index bd5af316eb19..b203522734be 100644 --- a/sbin/ipf/libipf/printpooldata.c +++ b/sbin/ipf/libipf/printpooldata.c @@ -13,6 +13,8 @@ printpooldata(ip_pool_t *pool, int opts) { if (opts & OPT_SAVEOUT) { + if ((pool->ipo_flags & IPOOL_DELETE) != 0) + PRINTF("# "); PRINTF("pool "); } else if ((opts & OPT_DEBUG) == 0) { if ((pool->ipo_flags & IPOOL_ANON) != 0) From nobody Thu Oct 2 19:06: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 4cd1VL06cnz69pS1; Thu, 02 Oct 2025 19:06:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cd1VK60jRz3Cx4; Thu, 02 Oct 2025 19:06:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759431977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MlN7sfLPIt2vz7FAdVk+esNV/Q1aQt+xPMI8ha3rgz8=; b=hPJkPw405e0Fs7tVcZ6KBQao0IuPNDF9a0We69H0YxSSQeuvg0TckQVuexARM0o8Np6CvT maSe4+2s893pBIt+F7XP2JcTKzrgO8FFYzUA9cRkRxKH3BMx69gRXhCg3egyDfUZtMLMB3 8OJvLFMLhRDVmC4y88Tc6akLbNe3i8D0bG2A7/wroTUXqw7pjGYepL7+L8ssSChfNN/4i6 23uxzKw8bozH8WaJw/Gi8LXnWzRbF+B+wRaq7w3+VzD2AGVpwz2gblz/jUx7vq45i6ngEw Fxu/Ao6xymLet3skHtuiGHPDJWZKrttHkMDhrRDPF2uX8S++g3hpSlKqz8PWeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759431977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MlN7sfLPIt2vz7FAdVk+esNV/Q1aQt+xPMI8ha3rgz8=; b=l0znkSpUlFbSMAjXfmDTZsTONi9M5iHQ3rKHFX4hz6P65hOLUk9yx0bBgxrXOSN9TEs+JT nhJrhBgilubcEyJmrpppXFGcRVdSdUuZDCb5SPYsS2CdQxd7Q8MRo2Szn1lKU3HycfJ4lB vmhkZ951Pb9aQ/P+DEXQyR9Bg/tI+PB9g3OWjHP07l7oKeAaD7uL5NypHtwq2LlMXKgmCc 9EtICqzfkRA73xi0RF0t/s5PGyxozFx0ULTkveiTFQZ4MGjSkcVtQ3fL5WKIHRMUzVPClK tLe5c/zBwiop8IYPXSamMBgg5clS2zQcx9B5+zGSjxo3k3zCyLnQ1wWLckMlig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759431977; a=rsa-sha256; cv=none; b=L9FGKJW9l/XyR6w6Wm1hjjhGswUFYdq5aZXcQlvFVOoyzDcB+E74OZ+0UmrRbZ7bLXo7EL s7//F2VlszriKH+upVxlW6O2bIYGXjjrVVN5zHiCzN5aDo0dHbLb6c0bWxAx2YqjLNHhbO ZlvI7QkmrRA0kYUZiYx9ubb9x0/+UMDC3pWw1Z7zzhXCKUS1aN+W/f8aycyFsRVYIqEWeY IwAomoWK9bzyUhR29U7Dbpr2MUUG6y1H7HMqq2n9FhyQ6k5NJZYPms3oQa3xguOPwSZLIt ld4vaid5E92HY062doiNAPYLvEazLwS2AmU8xsdCy4wTS6T4ohtyXzs79FQMHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cd1VK5c56z4sr; Thu, 02 Oct 2025 19:06:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592J6Hou078724; Thu, 2 Oct 2025 19:06:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592J6Htp078721; Thu, 2 Oct 2025 19:06:17 GMT (envelope-from git) Date: Thu, 2 Oct 2025 19:06:17 GMT Message-Id: <202510021906.592J6Htp078721@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: f3ff6abb9d81 - main - ipfilter ippool: Prefix deleted entries with "#" 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: f3ff6abb9d816a68e65af5ed55552d152a58b5e4 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=f3ff6abb9d816a68e65af5ed55552d152a58b5e4 commit f3ff6abb9d816a68e65af5ed55552d152a58b5e4 Author: Cy Schubert AuthorDate: 2022-11-02 05:34:54 +0000 Commit: Cy Schubert CommitDate: 2025-10-02 19:03:35 +0000 ipfilter ippool: Prefix deleted entries with "#" To maintain consistency with ippool list functions, prefix deleted entries with "#". MFC after: 1 week --- sbin/ipf/libipf/printhashdata.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbin/ipf/libipf/printhashdata.c b/sbin/ipf/libipf/printhashdata.c index 690243d63f1e..ba96a75a94d7 100644 --- a/sbin/ipf/libipf/printhashdata.c +++ b/sbin/ipf/libipf/printhashdata.c @@ -37,6 +37,8 @@ printhashdata(iphtable_t *hp, int opts) } PRINTF(" role="); } else { + if ((hp->iph_flags & IPHASH_DELETE) == IPHASH_DELETE) + PRINTF("# "); PRINTF("Hash Table %s: %s", ISDIGIT(*hp->iph_name) ? "Number" : "Name", hp->iph_name); From nobody Thu Oct 2 19:06:18 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cd1VM1x33z69pWd; Thu, 02 Oct 2025 19:06:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cd1VM01ldz3D38; Thu, 02 Oct 2025 19:06:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759431979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KX1xvs48D73mEcSBEQ930wyVPvtWaL9Huo1LAz2AOoU=; b=QEQ6WCZ8p2t03HwuSXTBpJZOEUvhP5U+iEWxgLRgV1W2e3Ih+heje8m+idxztkX6jT6DdG w+oHxfaCY0HfQ/95z8aY+5qJBmLKAX/ueeZHghroPX8OPH3jCbtR3ap1//w8FTZpHDCZst Fip/nvnZF9lPtnxUcGnzsc/DwGTIA93cDIy04hubTx4YQf1N0fKPaQnN4rl/Z7UR5nKCez W2ys6CTRrXTaOho4IVTZj55aXcJ2bjGN4npceqIQH1pkZEEb3FIrUIQm3ZSgKYa8tVGVvZ z5R1Vo4jWypvpNu9MpsHBZP0wJjgmb+Lwhf4UIF/rqr7nYdqCguWp6cokOW3Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759431979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KX1xvs48D73mEcSBEQ930wyVPvtWaL9Huo1LAz2AOoU=; b=Jeej1ODP5OMeNR2YJJQgAn3qQHLn2ox7T3YGG7oD+2T8NM+EWuKtk0PYxO7FWTXkPKrgSX i1vKGYjtYzJ6fSTjiBHbT42fW1n0XmAp/9pTKAmlfx77jlpxtEqbj1eOCz5oY6OvfiecgW oP/3UdDd7NvSfhqyBpp6tsXtJpdOpCRulPAvtqJsBALWWMacknuZstT3vhEpz1zOzA5mOT cDzHAQ+i8wfx+JYNy+IFvLCxROuD/4KdYejr1AquBfqo0ddg9QuPdsdrcYrEfDe47BB4DH zrufv/Ktwsknwy6SFiMpKMbGVOn/comklLzSVf2sya59q2481i9rp+bA0L8QYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759431979; a=rsa-sha256; cv=none; b=YJ93aGN1lgiDvnHwLH2yLjnE7oSxtSZEp/vrZYbqcvUMQLRLPPF6nZUx4hX5LHlqDiug2Q BNg0yBS62eugJJE7mm7Yfg7Kp/MQypfZ4I285rCBVkBTuOLFVT+9o7pFwixOORzr6lDAeM pBPJdERdL82VhdgBTW8o/9RzFbN/BrYK8+gBYpWLuKbE7M9Z3w4PElUJLjBLIpAAe5cCju DNHv1ZGNi3B7jpUZi6Yfo/7j2aBS/571c94tcr6S0YfkcfWhyz3FCUEU6+Ffby9zyvnnDu y1OC2YGit8Q4A23vf42lBMGH+PXzSknooqX1fVHmqmiwRhmKd27bVgZCVtXj2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cd1VL62Xcz5SV; Thu, 02 Oct 2025 19:06:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592J6IB0078756; Thu, 2 Oct 2025 19:06:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592J6ITR078753; Thu, 2 Oct 2025 19:06:18 GMT (envelope-from git) Date: Thu, 2 Oct 2025 19:06:18 GMT Message-Id: <202510021906.592J6ITR078753@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 2f30b43fa269 - main - ipfilter/ippool: Dump a copy of ippool hash data in "new" format 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: 2f30b43fa269bc63086b0428f45c79e982abb02f Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=2f30b43fa269bc63086b0428f45c79e982abb02f commit 2f30b43fa269bc63086b0428f45c79e982abb02f Author: Cy Schubert AuthorDate: 2022-11-02 05:46:41 +0000 Commit: Cy Schubert CommitDate: 2025-10-02 19:03:35 +0000 ipfilter/ippool: Dump a copy of ippool hash data in "new" format As with 7531c434a593, which dumped ippool table data in the "new" format, print hash data in the "new" format. MFC after: 1 week --- sbin/ipf/libipf/printhash_live.c | 8 ++++++-- sbin/ipf/libipf/printhashdata.c | 17 +++++++++++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/sbin/ipf/libipf/printhash_live.c b/sbin/ipf/libipf/printhash_live.c index b8ee31b27597..427daa18316b 100644 --- a/sbin/ipf/libipf/printhash_live.c +++ b/sbin/ipf/libipf/printhash_live.c @@ -26,7 +26,9 @@ printhash_live(iphtable_t *hp, int fd, char *name, int opts, wordtab_t *fields) if ((hp->iph_flags & IPHASH_DELETE) != 0) PRINTF("# "); - if ((opts & OPT_DEBUG) == 0) + if (opts & OPT_SAVEOUT) + PRINTF("{\n"); + else if ((opts & OPT_DEBUG) == 0) PRINTF("\t{"); obj.ipfo_rev = IPFILTER_VERSION; @@ -50,6 +52,8 @@ printhash_live(iphtable_t *hp, int fd, char *name, int opts, wordtab_t *fields) last = 1; if (bcmp(&zero, &entry, sizeof(zero)) == 0) break; + if (opts & OPT_SAVEOUT) + PRINTF("\t"); (void) printhashnode(hp, &entry, bcopywrap, opts, fields); printed++; } @@ -59,7 +63,7 @@ printhash_live(iphtable_t *hp, int fd, char *name, int opts, wordtab_t *fields) if (printed == 0) putchar(';'); - if ((opts & OPT_DEBUG) == 0) + if ((opts & OPT_DEBUG) == 0 || (opts & OPT_SAVEOUT)) PRINTF(" };\n"); (void) ioctl(fd,SIOCIPFDELTOK, &iter.ili_key); diff --git a/sbin/ipf/libipf/printhashdata.c b/sbin/ipf/libipf/printhashdata.c index ba96a75a94d7..6fa62e67556d 100644 --- a/sbin/ipf/libipf/printhashdata.c +++ b/sbin/ipf/libipf/printhashdata.c @@ -12,7 +12,11 @@ void printhashdata(iphtable_t *hp, int opts) { - if ((opts & OPT_DEBUG) == 0) { + if (opts & OPT_SAVEOUT) { + if ((hp->iph_flags & IPHASH_DELETE) == IPHASH_DELETE) + PRINTF("# "); + PRINTF("pool "); + } else if ((opts & OPT_DEBUG) == 0) { if ((hp->iph_type & IPHASH_ANON) == IPHASH_ANON) PRINTF("# 'anonymous' table refs %d\n", hp->iph_ref); if ((hp->iph_flags & IPHASH_DELETE) == IPHASH_DELETE) @@ -50,7 +54,16 @@ printhashdata(iphtable_t *hp, int opts) printunit(hp->iph_unit); - if ((opts & OPT_DEBUG) == 0) { + if ((opts & OPT_SAVEOUT)) { + if ((hp->iph_type & ~IPHASH_ANON) == IPHASH_LOOKUP) + PRINTF("/hash"); + PRINTF("(%s \"%s\"; size %lu;", + ISDIGIT(*hp->iph_name) ? "number" : "name", + hp->iph_name, (u_long)hp->iph_size); + if (hp->iph_seed != 0) + PRINTF(" seed %lu;", hp->iph_seed); + PRINTF(")\n", hp->iph_seed); + } else if ((opts & OPT_DEBUG) == 0) { if ((hp->iph_type & ~IPHASH_ANON) == IPHASH_LOOKUP) PRINTF(" type=hash"); PRINTF(" %s=%s size=%lu", From nobody Thu Oct 2 19:06:19 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cd1VN2jSPz69pM9; Thu, 02 Oct 2025 19:06:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cd1VN0HVKz3D5Z; Thu, 02 Oct 2025 19:06:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759431980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xXNQ1HW0iu2faCdkT6+JpivzEKwBO0u7vnbLYg0Ie6k=; b=jhsyp+kAqA3+5ANxe+dyq7DK5y/ViC6t7OsKjhIlTWtEbF16KoADUVKJud5P4lCwgBU3ml SErdJojffOGINfIjvCMtL9h1KGJ0GMdbGVaUdv6lsl1U+P2z9nwRymSXAUxst+4aL2UHIJ gJXrqN6tUMvxvESkkLQ10iL6noJDhdMj+RIP/yeaneyzB3C8/C2W1dJdz5YDDlOgvb7+zI zpSh4KO3u9djuSZ2Z1J+MVyH/+uEBOtIHMoZOAEwNGSs82Lkn84U3s19veX4EyOoZp/KPw H07FLmNlfr+u0sd3YCleOl+aKOalAAujprbg3iXyHCUuUlLQ7BYcWMql71hJaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759431980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xXNQ1HW0iu2faCdkT6+JpivzEKwBO0u7vnbLYg0Ie6k=; b=RiZrE/W4tvqHuaL7WXE3t5JbVbp5hCuNkjXSWnTtRKvtxIcpEQHxrCQntqEIbulzpjP4AD VT8tXH6Yr/Jb3JlCRIDlPsaCAYdHGnlmjLXm+HQHaDkUf2MEo9sllx7XvoD9rsKevOIhcE HBwU6WKObirf0UFQzuWfVcktu3A3tUS3mw9y/4TSyZJnEMKplCg9NCu1QKz4x58F1iA8XM rH2p48BYWEe0/LsLR0MCC9sHFAw8VgtnDPbnv6Tb+wr+qrJfZe5CCDaaI2EQo8jpopADbc JvNWLia6PJBKN+ZDxmckBJAduNGQE1ZTtu+aBhK1aIZuAp/1TL2c2011HNBEqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759431980; a=rsa-sha256; cv=none; b=ncCyGUAesCN17ceVEqJR14YWD4bO+4mzk+ewn5lt71R53NjaXSiYUZs4yHTb70iWhScRMJ 5KR0lE0ZUua8tDbw3Ua4QC42U+3+EG8qz/ePWO5WxABxQBARh+9IZjADGsherHkstULzMy D7gSiZb77glXXIQOfsNYHD6kZGEKmZq6FoH8AdI/cz1o3eBbvirATM3w7akiwsdARy0mhs iJYarNmTSywW4h3nDjBa+Z1ab3N0DrKayuoISFIRZIEJSAFDHbdKumd6P3nxJOM+f33nNu xzAnvU+BMm1FiJd22MA+LxNnYru1k1V+ZLFSXgfmYX1It5R9HQfQciKQBxYoKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cd1VM6zCBz4ss; Thu, 02 Oct 2025 19:06:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592J6JGh078789; Thu, 2 Oct 2025 19:06:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592J6JXp078786; Thu, 2 Oct 2025 19:06:19 GMT (envelope-from git) Date: Thu, 2 Oct 2025 19:06:19 GMT Message-Id: <202510021906.592J6JXp078786@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: eee36ffa0d87 - main - ipfilter/ippool: Dump a copy of ippool dstlist data in "new" format 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: eee36ffa0d874f1c8aca912f7c2a8eba34509927 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=eee36ffa0d874f1c8aca912f7c2a8eba34509927 commit eee36ffa0d874f1c8aca912f7c2a8eba34509927 Author: Cy Schubert AuthorDate: 2023-03-01 03:18:07 +0000 Commit: Cy Schubert CommitDate: 2025-10-02 19:03:35 +0000 ipfilter/ippool: Dump a copy of ippool dstlist data in "new" format As with 7531c434a593, which dumped ippool table data in the "new" format, print dstlist data in the "new" format. MFC after: 1 week --- sbin/ipf/libipf/printdstl_live.c | 3 +++ sbin/ipf/libipf/printdstlist.c | 2 ++ sbin/ipf/libipf/printdstlistdata.c | 5 ++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sbin/ipf/libipf/printdstl_live.c b/sbin/ipf/libipf/printdstl_live.c index 088448e6656d..72cb75a832c9 100644 --- a/sbin/ipf/libipf/printdstl_live.c +++ b/sbin/ipf/libipf/printdstl_live.c @@ -40,6 +40,9 @@ printdstl_live( ippool_dst_t *d, int fd, char *name, int opts, if ((d->ipld_flags & IPHASH_DELETE) != 0) PRINTF("# "); + if (opts & OPT_SAVEOUT) + PRINTF("{\n"); + if ((opts & OPT_DEBUG) == 0) PRINTF("\t{"); diff --git a/sbin/ipf/libipf/printdstlist.c b/sbin/ipf/libipf/printdstlist.c index 2cf41ffe414c..497d7004c94c 100644 --- a/sbin/ipf/libipf/printdstlist.c +++ b/sbin/ipf/libipf/printdstlist.c @@ -42,6 +42,8 @@ printdstlist( ippool_dst_t *pp, copyfunc_t copyfunc, char *name, int opts, return (NULL); } + if (opts & OPT_SAVEOUT) + PRINTF("\t"); node = printdstlistnode(n, bcopywrap, opts, fields); free(n); diff --git a/sbin/ipf/libipf/printdstlistdata.c b/sbin/ipf/libipf/printdstlistdata.c index 7940d2ae021b..546bf35cabf6 100644 --- a/sbin/ipf/libipf/printdstlistdata.c +++ b/sbin/ipf/libipf/printdstlistdata.c @@ -11,8 +11,7 @@ void printdstlistdata( ippool_dst_t *pool, int opts) { - - if ((opts & OPT_DEBUG) == 0) { + if ((opts & OPT_DEBUG) == 0 || opts & OPT_SAVEOUT) { if ((pool->ipld_flags & IPDST_DELETE) != 0) PRINTF("# "); PRINTF("pool "); @@ -24,7 +23,7 @@ printdstlistdata( ippool_dst_t *pool, int opts) printunit(pool->ipld_unit); - if ((opts & OPT_DEBUG) == 0) { + if ((opts & OPT_DEBUG) == 0 || opts & OPT_SAVEOUT) { PRINTF("/dstlist (name %s;", pool->ipld_name); if (pool->ipld_policy != IPLDP_NONE) { PRINTF(" policy "); From nobody Thu Oct 2 19:19: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 4cd1p14WhVz69r5k; Thu, 02 Oct 2025 19:19: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 4cd1p13nrTz3G4t; Thu, 02 Oct 2025 19:19:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759432793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bFzTqCHJhp0MHWa+M7mEnnpmNMPlqKfFulwsRUQqeeA=; b=tn2ZXzY6EAGxxPo1aa0iyydux1XvZN/PUumTdpG8yZEMCoyMibWyRcj3UgH1qTEjdm3uMB 2WS7SI8PTXOOi18Cou6zgrR7zBnQrGhOLquhHdfn+cPD9Jxz2u4vb8cLmXpJRKuV0vpgjm Ph2ggy1rCSOmGkcdac493jsjOYCHVXnrU0Jo3p8LPOuVQ3NnYx4DHBgmqW3Ixv4ioLi130 RlF4/EA4VdNFnR3D08T3ErAWvfScNNtXNGXd0nPPVHTwzToDxPcme/7AoOGUcPXHQaUd6S NisgDAemlLP7T0odlRtbjik5grAiqkPCfmXrDqKF36KR4zXwtoTEt8wO6ZupbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759432793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bFzTqCHJhp0MHWa+M7mEnnpmNMPlqKfFulwsRUQqeeA=; b=IFNtoRohPqJCW2IRaONoljiM9G1g7Er2ZhZrSJE1TkVyxGnuSxzrmNFkST9QEQASipd+Dn 3rOfT4DEv93vRbbWyYGmws0QVlBfaF0nRQe4KlTBuAdGNWoL0U1dwnTc/fqp3uhF3Df4tw DmAH2FQQD4PDqo70wCs6qaAFtCdcezOSzTbiKdiW5SUltdWiyqhaZyUvrec+IbWkObhCTc 07o981axSKFgfL0k1PK4UsYMetBat8dAbKC9mYZTtsu3EfDRpEJGnCZW09huZq+PI6wFaA m7BW+6bQlHoAeggQG7b+btTk8VTmI8bmYpMC3xZicx/SvpMWNJFVJGHJUP8m5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759432793; a=rsa-sha256; cv=none; b=Z4pgOtSAomeiZJaSiMY2NMYV/gvokm29fq62YG1WwAux0dO0HSpddqmxlJWHK5ZX1Db50k otL5NzVu9uG8G4U5AkZaw2HnsRG8LLS8e+7u0XdaEXAZJtszQPkYLi4+IIS3qEEacAzsja p9pKA30Rs2CEK5Z0Xm2N5X0ZzkpoK3HTvgwrujF1GOqPK0IPiV2f6xiy9hwm2BL9Qd1WVT 4w+IbTadwXX9p187gotuLRCxQKGY2hqUYyQncUAvJiSN8LMU0EbCTdoI+AtpKkFmUs33LV I93P5yQMtyUzSN4RJ8uFdCPZGsgJ9M1QR8UPd1LBDUfmVBp5On21muqp//Y34A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cd1p12qgnz5lk; Thu, 02 Oct 2025 19:19:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592JJrCp098813; Thu, 2 Oct 2025 19:19:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592JJrfv098810; Thu, 2 Oct 2025 19:19:53 GMT (envelope-from git) Date: Thu, 2 Oct 2025 19:19:53 GMT Message-Id: <202510021919.592JJrfv098810@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: dd2fc08d8543 - main - pf: fix possibe SCTP panic List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd2fc08d85431e10ad60e01e97b98e9dc23322bd Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=dd2fc08d85431e10ad60e01e97b98e9dc23322bd commit dd2fc08d85431e10ad60e01e97b98e9dc23322bd Author: Kristof Provost AuthorDate: 2025-10-02 14:48:22 +0000 Commit: Kristof Provost CommitDate: 2025-10-02 19:17:00 +0000 pf: fix possibe SCTP panic While processing SCTP packets we can enqueue work for later, in the sctp_multihome_jobs queue. This deferred job includes a copy of the current struct pf_pdesc, which must contain a valid pcksum pointer (in case of NAT). However, jobs could be enqueued before we'd actually set this pointer in pf_setup_pdesc(). Set this pointer before we scan the SCTP chunk headers (and could enqueue deferred jobs.) While here sprinkle in a few more assertions to ensure we got this right. Reported-by: syzbot+974d0fb7e53c9aa31b90@syzkaller.appspotmail.com MFC after: 3 days Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 2c6d62078e6a..25ae1193bfff 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -3364,7 +3364,7 @@ pf_change_ap(struct pf_pdesc *pd, struct pf_addr *a, u_int16_t *p, u_int16_t po; uint8_t u = pd->virtual_proto == IPPROTO_UDP; - MPASS(pd->pcksum); + MPASS(pd->pcksum != NULL); if (pd->af == AF_INET) { MPASS(pd->ip_sum); } @@ -7634,6 +7634,7 @@ again: nj->pd.m = j->pd.m; nj->op = j->op; + MPASS(nj->pd.pcksum); TAILQ_INSERT_TAIL(&pd->sctp_multihome_jobs, nj, next); } PF_SCTP_ENDPOINTS_UNLOCK(); @@ -7753,6 +7754,7 @@ pf_multihome_scan(int start, int len, struct pf_pdesc *pd, int op) job->pd.m = pd->m; job->op = op; + MPASS(job->pd.pcksum); TAILQ_INSERT_TAIL(&pd->sctp_multihome_jobs, job, next); break; } @@ -7786,6 +7788,7 @@ pf_multihome_scan(int start, int len, struct pf_pdesc *pd, int op) job->pd.m = pd->m; job->op = op; + MPASS(job->pd.pcksum); TAILQ_INSERT_TAIL(&pd->sctp_multihome_jobs, job, next); break; } @@ -10634,17 +10637,21 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, REASON_SET(reason, PFRES_SHORT); return (-1); } - if (pf_scan_sctp(pd) != PF_PASS) { - *action = PF_DROP; - REASON_SET(reason, PFRES_SHORT); - return (-1); - } + /* * Placeholder. The SCTP checksum is 32-bits, but * pf_test_state() expects to update a 16-bit checksum. * Provide a dummy value which we'll subsequently ignore. + * Do this before pf_scan_sctp() so any jobs we enqueue + * have a pcksum set. */ pd->pcksum = &pd->sctp_dummy_sum; + + if (pf_scan_sctp(pd) != PF_PASS) { + *action = PF_DROP; + REASON_SET(reason, PFRES_SHORT); + return (-1); + } break; } case IPPROTO_ICMP: { From nobody Thu Oct 2 19:19: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 4cd1p26Xm8z69r3x; Thu, 02 Oct 2025 19:19:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cd1p24Fq6z3GMf; Thu, 02 Oct 2025 19:19:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759432794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5GIFgOZDcqWRRtGPdvvm9HpdiMrKvDQWUZA3GrCrx6M=; b=EtG62+2XlT7qfMk4P1q0baux9g4rU4J2pXnF7X7ZYEW6CCEniHvkFcNSMDQVy1O+1OA7yX EbscIQG17EobbeyOZx4t81n2LXwIe0P5cxlzjsYeX9q139EOpFGkrUSnjvP0HOwAiQkb4+ dFi8VIGf6ImlNpeUEJgHKtKw2+XEY9mvcyHa5YJR2eOVVfO5BEyLPa9g+YS0D6wr8Yrqs/ LLAPry57f8y9bJvqxLbXJSWJnkLNyCOF1W+/0wj4NbIMoolN3sgXv6MGC7459LolKVOIt4 t4cMJj49AQz/g8/LmjVqdCmBlN5bbNix5J35vgPD2zzBbDBQaaUhHOwPyixEyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759432794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5GIFgOZDcqWRRtGPdvvm9HpdiMrKvDQWUZA3GrCrx6M=; b=NReSZG6cBBomrbiPiulKAog7Q7/DYifP5zmpmxXd6ohofkAQqRriofPEMg+PjwwyAvmQIK pK/IUV4+v7F6LbtiqmerF99wqmexQn9gNjrE4zGzCaWBuCJ6BrnFYju1sk0XC7Sx1/TFLX SZtAAaOSaGPDLGOK7zrK7Rp/75sxEgyhD6X2s6CSEEFynWKB0ZGi9zwJ7NwzUgyyEn7ccG Hcw3vCqTPE4duxeZJYDj6vnwp0MiUV9JExLDwz8ZW4X1RaPPBjmMh9ANonkCzyXJyEBT0g oKSfJnNqrTiMaba93FeZFOBFIqDo4pCeW6hA8czTV9JCB9e+bKr9Ldh1xFrSUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759432794; a=rsa-sha256; cv=none; b=EEC7R3oLbwBOWuhrzLLuWt1DwH6A/aVBXSAiYmx/xMaFuTchpmxA0uUfUAXBBR1FdAaiqA XiqLibrFNvFN69zcJZGQRtgwieiq9gcqndenv1ZtGUUYEYchivM24jLVlLRuFFO09D1Epw bZzAV3hYRrU4Qw3q1amtiXdR3l+clS0FLQ+es1zgVf7DO2mB8LIOhoJP3y5sGgRhOnR3Qq QQv0V8hVUSlldzNEPYPpXNTxI10wI6AZQM23Ne4xtSEbU4OYqJAYvBLpE9te3gfWZIRsro aOv8UJ0IOc47uM77GyMyUDSNXt51OC7C9w5WftDJMcjimakwv66Rhwinuxer+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cd1p23jxQz5TY; Thu, 02 Oct 2025 19:19:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592JJsSm098853; Thu, 2 Oct 2025 19:19:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592JJsLn098850; Thu, 2 Oct 2025 19:19:54 GMT (envelope-from git) Date: Thu, 2 Oct 2025 19:19:54 GMT Message-Id: <202510021919.592JJsLn098850@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 5d210f396e3f - main - pf: return PF_PASS/PF_DROP from pf_setup_pdesc() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5d210f396e3f00698caa45077330dea8ffe979b5 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=5d210f396e3f00698caa45077330dea8ffe979b5 commit 5d210f396e3f00698caa45077330dea8ffe979b5 Author: Kristof Provost AuthorDate: 2025-10-02 14:55:07 +0000 Commit: Kristof Provost CommitDate: 2025-10-02 19:17:00 +0000 pf: return PF_PASS/PF_DROP from pf_setup_pdesc() We returned 'PF_DROP' instead of '-1' in one case, which would lead to us continuing the processing for an invalid packet. This also aligns us closer to OpenBSD, and reduces the odds of future similar mixups. MFC after: 3 days Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 25ae1193bfff..4440263ec600 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -10446,28 +10446,28 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, __func__); *action = PF_DROP; REASON_SET(reason, PFRES_SHORT); - return (-1); + return (PF_DROP); } h = mtod(pd->m, struct ip *); if (pd->m->m_pkthdr.len < ntohs(h->ip_len)) { *action = PF_DROP; REASON_SET(reason, PFRES_SHORT); - return (-1); + return (PF_DROP); } if (pf_normalize_ip(reason, pd) != PF_PASS) { /* We do IP header normalization and packet reassembly here */ *m0 = pd->m; *action = PF_DROP; - return (-1); + return (PF_DROP); } *m0 = pd->m; h = mtod(pd->m, struct ip *); if (pf_walk_header(pd, h, reason) != PF_PASS) { *action = PF_DROP; - return (-1); + return (PF_DROP); } pd->src = (struct pf_addr *)&h->ip_src; @@ -10497,7 +10497,7 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, ", pullup failed", __func__); *action = PF_DROP; REASON_SET(reason, PFRES_SHORT); - return (-1); + return (PF_DROP); } h = mtod(pd->m, struct ip6_hdr *); @@ -10505,7 +10505,7 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, sizeof(struct ip6_hdr) + ntohs(h->ip6_plen)) { *action = PF_DROP; REASON_SET(reason, PFRES_SHORT); - return (-1); + return (PF_DROP); } /* @@ -10514,12 +10514,12 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, */ if (htons(h->ip6_plen) == 0) { *action = PF_DROP; - return (-1); + return (PF_DROP); } if (pf_walk_header6(pd, h, reason) != PF_PASS) { *action = PF_DROP; - return (-1); + return (PF_DROP); } h = mtod(pd->m, struct ip6_hdr *); @@ -10541,13 +10541,13 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, PF_PASS) { *m0 = pd->m; *action = PF_DROP; - return (-1); + return (PF_DROP); } *m0 = pd->m; if (pd->m == NULL) { /* packet sits in reassembly queue, no error */ *action = PF_PASS; - return (-1); + return (PF_DROP); } /* Update pointers into the packet. */ @@ -10559,7 +10559,7 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, if (pf_walk_header6(pd, h, reason) != PF_PASS) { *action = PF_DROP; - return (-1); + return (PF_DROP); } if (m_tag_find(pd->m, PACKET_TAG_PF_REASSEMBLED, NULL) != NULL) { @@ -10589,7 +10589,7 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, reason, af)) { *action = PF_DROP; REASON_SET(reason, PFRES_SHORT); - return (-1); + return (PF_DROP); } pd->hdrlen = sizeof(*th); pd->p_len = pd->tot_len - pd->off - (th->th_off << 2); @@ -10605,7 +10605,7 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, reason, af)) { *action = PF_DROP; REASON_SET(reason, PFRES_SHORT); - return (-1); + return (PF_DROP); } pd->hdrlen = sizeof(*uh); if (uh->uh_dport == 0 || @@ -10613,7 +10613,7 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, ntohs(uh->uh_ulen) < sizeof(struct udphdr)) { *action = PF_DROP; REASON_SET(reason, PFRES_SHORT); - return (-1); + return (PF_DROP); } pd->sport = &uh->uh_sport; pd->dport = &uh->uh_dport; @@ -10625,7 +10625,7 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, reason, af)) { *action = PF_DROP; REASON_SET(reason, PFRES_SHORT); - return (-1); + return (PF_DROP); } pd->hdrlen = sizeof(pd->hdr.sctp); pd->p_len = pd->tot_len - pd->off; @@ -10635,7 +10635,7 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, if (pd->hdr.sctp.src_port == 0 || pd->hdr.sctp.dest_port == 0) { *action = PF_DROP; REASON_SET(reason, PFRES_SHORT); - return (-1); + return (PF_DROP); } /* @@ -10650,7 +10650,7 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, if (pf_scan_sctp(pd) != PF_PASS) { *action = PF_DROP; REASON_SET(reason, PFRES_SHORT); - return (-1); + return (PF_DROP); } break; } @@ -10659,7 +10659,7 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, reason, af)) { *action = PF_DROP; REASON_SET(reason, PFRES_SHORT); - return (-1); + return (PF_DROP); } pd->pcksum = &pd->hdr.icmp.icmp_cksum; pd->hdrlen = ICMP_MINLEN; @@ -10673,7 +10673,7 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, reason, af)) { *action = PF_DROP; REASON_SET(reason, PFRES_SHORT); - return (-1); + return (PF_DROP); } /* ICMP headers we look further into to match state */ switch (pd->hdr.icmp6.icmp6_type) { @@ -10699,7 +10699,7 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, reason, af)) { *action = PF_DROP; REASON_SET(reason, PFRES_SHORT); - return (-1); + return (PF_DROP); } pd->hdrlen = icmp_hlen; pd->pcksum = &pd->hdr.icmp6.icmp6_cksum; @@ -10722,7 +10722,7 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, MPASS(pd->pcksum != NULL); - return (0); + return (PF_PASS); } static __inline void @@ -10984,7 +10984,7 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 PF_RULES_RLOCK(); if (pf_setup_pdesc(af, dir, &pd, m0, &action, &reason, - kif, default_actions) == -1) { + kif, default_actions) != PF_PASS) { if (action != PF_PASS) pd.act.log |= PF_LOG_FORCE; goto done; From nobody Thu Oct 2 19:22:45 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cd1sc32RRz69rh9 for ; Thu, 02 Oct 2025 19:23:00 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic316-54.consmr.mail.gq1.yahoo.com (sonic316-54.consmr.mail.gq1.yahoo.com [98.137.69.30]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cd1sb5y2Lz3HB8 for ; Thu, 02 Oct 2025 19:22:59 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1759432977; bh=B+TinOrQMFwTeXJsIC/zslOBdwNSrFlfdFOvHVl+oeI=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=kazyhLxIdtS/YXnDi3j7pd03kaoFpmw0GRHj023KDoKu082uzSmPbNr61NR4qr9YmHEpB4shqMbKksfHuxd0PPSiVm5NyKnzMg+l721T/Uo5XZiRPPOhGaH2rXJOUYKRdf4yAzetVyWMXJMybdSLycwiQxmx527oIq9TY9ovZ1yB4pKYerAmAFh12xIp21BlwmEO0X9CIWd9n5pDIFOGM4tr8/9bRbwqZQzygDTMeNNFEvaAS7jPvJ6MPyciISJiu4egFcsUuXvAMPAGETaZ722kJs2p7iAErUTajwS8QlSlilJoP3j0+xfgos5hM2nOTTKBhHkkx3p1j4Ti4yIvUQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1759432977; bh=8FqFnonQDsch5terGGF9Imb5hRLJ+lR9KNU+8odH1Lh=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=WImcYXM8ye/lWF9y3J+TkLguTqPLWY3qs2lel1fD3Capj/q3m7EBrflvzzWi4V45Ptwuy0Az6U9PbOBAfhPhWIUBNvXMOKg4oPKmTqFwMvBWoFoHNEWo4w3PgFan4ExVAYEhdKw0o1TSLGKU/8ZKTqJClEEu21Uy74ESJd1c85CaSh7bYKaeBCq/Agau2UqoZlR/w8iaucowmIoLeZwYgTi9E2T/AgHcgJmNjS8E4HduJIBj+lCgdsDwv1jQq5GJ/OUs82nH+gS7FMwpHKmxj+MSRqR2NwJXNFWOXtL72PzpkMDo3ZYXrVe/M6BfcHjAK6wnXeBN00CJE7EG3rfmQA== X-YMail-OSG: UMWNInwVM1mWBoI1pvZwciepbvK0wR2VWR2J0C75_eYxtU9hcRRRKNYBBavWvec 85CSkTTS9e6Q4U5UKeCLSuFXJ_44nKUR3nU6CRNf2B2T3GZaGPrZNJdiHowu0jmbSly6qENZ2qEm o_Y6thYe4bRARtr3CB2Wvxl9BoQ6UHY2YoaUkh_MPm17KH7xvmF_bj3WAlikG0LBU8RyccpXqHWa nH5EmBQ6m81p71CARIFNt8S0367fYZgBerPkshNofCFmwJTeDc6fp3KS_7Jujg_JBlPu1Z9I3J9U gwdFIlyHvfnK_._QAxOnVCBCW9fuFiucG9D.porHUCovHzXJO39qnGjsVhF09K9Ws3QfReRWo.dk BRLp0_d2HvaBZdHCBZw1wQfUHg4E5rYt7.CpaZCRRycHdUEeIklG95IC6SWyxci7F3OiiymperHZ DYhMyuHs2oQdZ.QdU1XEkvnMDgqZjThzQbcewj1P6oxpf7ytBC6y08yMDYSJYbXFjLQ2nkIPN36u spZ0BDK4lOOqnans2OvRs4AD.zyfuT8bgVNp6qnuzWNHQcGO4E5xjBM6lvgC.nZUQtACVngL.tWV kXWf69fCgdTvZ6Ch3PbkEiE7MQiYiwN1SrzlSRJ.b7YAKDGUa8kfaUttHw_t5PfqP5bUrSqQjKdX 4zMBEMA7RGnQqMEFS14pBm3NG1EyAOBSjvCR325TPpX28fDMon2foH.PDcS3dvJ6cOZbtffq_NSo JdmxFEYSoTEBPZijA9RmNLlAuUFtV1ewleuCzHx5iZSZiD5c6QRa_8Z9KnDqCaWJpB8TSg.KE9vH lc6aic7DAU79VwzJd3DBMoBAHSqJymiCLT8YAKf1D9V1.Q6rzOpUyvpOvo6K4ZTGYsiqYoXRjzS6 325Z4VqPczxC_m4tOsm6sHwWPzR4s9tbPslae94eKjZiQ1PfjfaAW5UKSZCnfhY4EM0fq2Gk2sIv j.of5mnCE648hUOXTR6zm0IAk8APLjDXgXclo9poLqGpqNe6XV.B3ZWZr9HVQEyqq7tDV4f_igzv 8LMT4t8ma7U7u4_PuTrGkJysn2sM372_o949iS4fpr1IGDHEcatCrFKBZhR.7eqd1p85MJwQlksj QeFIqJGe66wsTdAPuYT5ggc7o5IFezPqt9lFuAmxZ_FqHgnIcsndGa1wG1z3qgb286RMT9z.dH6J X5VXM0WVtrGx_I93wGmMxjUoBJ4RbFPDgvPT_lav.H18i6WLxVr3pU8FvQOfovzqd_lxFZ5LJziX 8X0xIvBZtrzkw0jIcAY97XpG0sMfZOvs7GisaI1E1CgFnLG6GXxNyhPKdAznEtAJHgT8_tHrhXFk yxX8NvdPajno5K__sXj8O_MKabnI9c74crQXQhnxMp3Qvuy94qYoW5kJ_8EIi78Gqr.Q4KXi7HLQ 5xFsOaTkMn4KTTa6a8NOM2.WyzqFOnAHESQl86Du75_LBLhxlshvPEStO6OJocertEYq6uLK6xd8 Q7AI3TAL0TuE5dLMeK1clwFnwbz3waOofUlulhi8YNnnHvqBbMl6A8Rb4e4Q_HOjSeLu4IOolJJL UDys.s0v7KpBXjGtwhqI7KF6Pu5cKK62tPjgyxdKL02AhrAY.1lepc7ENmSAXl885qbpycl9QKzf RXSStgqbetTiu2lrmRGu08EpDQEDh4.t4hFv4PCG3Rtz_P1hu8AkBuBLLbx562TVJbEL0yFrT0es M21fZTgQ5crIOxu7DoX1BRG1D8FvB2qbbdQ0QBgq8u.ZUUo8dmN2teLGCCsYuoErZok7x4EPdb_x f2MXLZ0v0R4c11JJw0KhjQqjIxYAmU9hNx5NGAGY3qxcbJHK4psBtzzRz6UH4Qt7Qho05Jy8iKmI s2k53tMEu4Kl3JPZe7InVj.OcvmhnK7neL1oz1bLyFgqjoRNaqw1Q1ZNZ7DJ_ZJpf8WedDfRIaXQ QZ5W30hjDvNrfQmgQe8wOh2QgWSKMkehnx.cUtpUcnqTK2eKg3KI2V__0KaJHZJTIwiuW74AcXZi fuQSO0qx9ivCkefaO9KmC3c_kBk4ned2ipiWQdqX_.K0WsYeA4BQNawjfJ9w8MOLytFx4CqNG3Ir JNtPJw9ZMRdD2lcJB6wyp0lMC26wdJ7gytLTR0UxarEd2gAMUTMOs2X9r5zOiFG0Wggq2rmTVF2s Cs4ibZwuUzkKE4a1obyFOol9qIzSBC1t5PzQXq.2Jv07IL7Q6u6vxWavX0.Ij4swtbXEHl3pVPsq VrIPKi_kDd_iYqFTjUZvw8YPU5HM- X-Sonic-MF: X-Sonic-ID: 08078370-9a0f-4f7c-b613-cd7b9266a81a Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.gq1.yahoo.com with HTTP; Thu, 2 Oct 2025 19:22:57 +0000 Received: by hermes--production-gq1-66b66ffd5-ls9xm (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 5bd33aa0565942b6ec12bd50e35fdd58; Thu, 02 Oct 2025 19:22:56 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: git: 2f7a796b590e - main - thunderbolt.4: Initial manual for HW Relnotes From: Mark Millard In-Reply-To: Date: Thu, 2 Oct 2025 12:22:45 -0700 Cc: ziaee , dev-commits-src-main , obiwac Content-Transfer-Encoding: quoted-printable Message-Id: <8C91D367-E9E5-4750-AA81-8C673000778E@yahoo.com> References: To: Alexander Ziaee X-Mailer: Apple Mail (2.3826.700.81) X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cd1sb5y2Lz3HB8 On Oct 2, 2025, at 10:25, Alexander Ziaee wrote: > On 2025-10-02 12:47 -04:00 EDT, "Mark Millard" = wrote: >> Alexander Ziaee wrote on >> Date: Thu, 02 Oct 2025 15:14:07 UTC : >>=20 >>> The branch main has been updated by ziaee: >>>=20 >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D2f7a796b590e67c5d123f2b00b3aaf7b= a7a32a13 >>>=20 >>> commit 2f7a796b590e67c5d123f2b00b3aaf7ba7a32a13 >>> Author: Alexander Ziaee >>> AuthorDate: 2025-10-02 12:05:25 +0000 >>> Commit: Alexander Ziaee >>> CommitDate: 2025-10-02 15:12:48 +0000 >>>=20 >>> thunderbolt.4: Initial manual for HW Relnotes >>>=20 >>> This manual contains nothing and is only suitable for the HW = Relnotes, >>> but lets get it in so we have something and then can iterate on it. >>>=20 >>> MFC after: 3 minutes >>> Fixes: 2ed9833791f2 (thunderbolt: Import USB4 code) >>> Discussed with: obiwac >>> Differential Revision: https://reviews.freebsd.org/D52847 >>> --- >>> share/man/man4/Makefile | 1 + >>> share/man/man4/thunderbolt.4 | 22 ++++++++++++++++++++++ >>> 2 files changed, 23 insertions(+) >>>=20 >>> diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile >>> index f5d7a0e081fc..6e076722c786 100644 >>> --- a/share/man/man4/Makefile >>> +++ b/share/man/man4/Makefile >>> @@ -589,6 +589,7 @@ MAN=3D aac.4 \ >>> tdfx.4 \ >>> termios.4 \ >>> textdump.4 \ >>> + thunderbolt.4 \ >>> ti.4 \ >>> timecounters.4 \ >>> tmpfs.4 \ >>> diff --git a/share/man/man4/thunderbolt.4 = b/share/man/man4/thunderbolt.4 >>> new file mode 100644 >>> index 000000000000..3477c11fb60d >>> --- /dev/null >>> +++ b/share/man/man4/thunderbolt.4 >>> @@ -0,0 +1,22 @@ >>> +.\" >>> +.\" Copyright (c) 2025 Alexander Ziaee >>> +.\" >>> +.\" SPDX-License-Identifier: BSD-2-Clause >>> +.\" >>> +.Dd October 2, 2025 >>> +.Dt THUNDERBOLT 4 >>> +.Os >>> +.Sh NAME >>> +.Nm thunderbolt >>> +.Nd USB4 controller driver >>> +.Sh SYNOPSIS >>> +.Cd device thunderbolt >>> +.Sh HARDWARE >>> +The >>> +.Nm >>> +driver supports USB4 controllers. >>=20 >> As I understand things, being fairly explicit related the >> following is likely required (not a proposed wording or >> presentation): >>=20 >> Quoting USB4 V2: "A USB4 Host or USB4 Peripheral Device can >> optionally support interoperability with Thunderbolt 3 >> (TBT3) products." >>=20 >> Quoting USB4 V1: "A USB4 host or USB4 peripheral device can >> optionally support interoperability with Thunderbolt 3 >> (TBT3) products." >>=20 >> In both, this is tied to Chapter 13, "Interoperability with >> Thunderbolt(tm) 3 systems". As I understand FreeBSD is not >> trying to meet the criteria in that chapter, for example. >>=20 >> USB4 does not require a certification process, as I >> remember. Thunderbolt 4 and 5 do, as I remember. >>=20 >> As I remember, a distinction between USB4 and Thunderbolt 4 >> and 5 was that Thunderbolt 4 and 5 require (nearly?) all >> optional items from the matching USB4 version to be >> implemented (so: not optional if Thunderbolt 4 or 5 is >> claimed/certified). Also, it seems unlikely that FreeBSD >> would go through a Thunderbolt 4 or 5 certification process. >>=20 >> Overall this seems to mean not meeting the Thunderbolt 4 >> and/or 5 criteria fully and not supporting Thunderbolt 3 >> --but just meeting the criteria for one or both of: >>=20 >> ) USB4 V1 without "TBT3" support >> ) USB4 V2 without "TBT3" support >>=20 >> That would be a subset of the Thunderbolt 4 or 5 criteria >> in a way that excludes Thunderbolt 3. >>=20 >> Referencing Thunderbolt without someplace being fairly >> explicit about those types of relationships could easily >> leave a misimpression (even if I've gotten some of the >> status wrong above). >>=20 >> My guess here is that enough is known about the intent >> in this area to be able to have material about this type >> of thing in place at any time. >=20 > My impression is that actually nothing works yet, but we now have a = driver called thunderbolt which is made to support these controllers. = The driver is in, allegedly, and so it's existence needs to be mentioned = in the canonical places where we mention our drivers because people are = looking for them for assorted reasons. I've actually booted a Dell Precision 5490 via external USB4 media, but only when it was downstream of a Thunderbolt 3 hub. All 4 USB ports are USB4 on this 5490. And that was some time ago: early 2025-Feb with 1500031 of main 15. It saw the USB4 media as nda0 at nvme0 . This only works as much as it does because the UEFI/ACPI involved supports enough to make some things possible such that FreeBSD does not need to be as involved. As I remember, I set up and did some live-plugging/unlugging experiments any they lead to panics. The configuration had to be as it was at boot time. If I remember right this looked like Thunderbolt 3 mishandling (no surprise). Directly connected, the transition from the kernel to the world/root mount for the USB4 media fails instead. I've not yet tried updating the USB4 media with a more recent FreeBSD main 16 to see what happens now. > Patches to the doc are extremely welcome! I'd need a lot more certainty about interpreting the more informal references that are around vs. the terminology in the USB4 specifications (or other such). I've been more trying to point out subject areas than knowing for sure the details that I used for illustration. > Best, > Alex >=20 >>> +.Sh HISTORY >>> +The >>> +.Nm >>> +driver appeared in >>> +.Fx 15.0 . >>>=20 >>=20 >> =3D=3D=3D >> Mark Millard >> marklmi at yahoo.com >=20 >=20 =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Thu Oct 2 20:09: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 4cd2vZ6GZGz69xFG; Thu, 02 Oct 2025 20:09:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cd2vZ5WKRz3QCZ; Thu, 02 Oct 2025 20:09:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759435786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h4m1mFSxHBBcY06e16d5oZ/jGtceQTPERr7s028Rb1c=; b=N0jc7hxAzfUzEfm99PUUqlHTzJTlWttypperNHcFDF9LmYYSsrsl1i5ql8ZFL+DCWUzarg JQAOdJOu9Nkk+F6OhyzaLxRdMJl8HBrxkzVKqYAN22UuuYdMSevT1oS3qo56GcseSN/NAu FkYWpmgCqEVpaNdhOTOPeAg2O40iZVCcnvzbajy1WNC6ZQGvNVupLHFSTc1Kvmufwpz5iz 8AMV16Q4UC5b0PEy3iQrO2kZUqLaLCtSnAJb5tRyg1kE/iLjx8Vgr2tNY03tFB0DQDVTqg qNJR3UNSF437g3f0mSHbJC2qeH0ORnLrqRzh2VzoxUGc/JgAiP4J9z5r4iKbtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759435786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h4m1mFSxHBBcY06e16d5oZ/jGtceQTPERr7s028Rb1c=; b=c3PaY9SxFDbJDCcC2YURrXELrcavwQiCxt4WQTEGJ8hOUs3pBw64N82d/JPoHILd3ytxxm 82Ag8ncVxYnDQcH0fF12MVEA45qL4yivkToCcTm5ckvWbDwxs4vRENxnPal9idpk13OKo/ pzWXHBhS+2bwRt7Qtyomz2c+iRNVmlshtzCQrfMx0f+8iKGNu7e9oAGGz8znj62Z3vNC1I wY4MhGJ9o8QqvqvC3fvmub0uvNmunLBvm6I4NfIvgixUDU+KNHe0jdOToVedC6CkNkHHMF FjzEZj7YweRm2AS9GYoxqVZMx9GFV8L+7A75Df56ERFdOYCWWBd2gv0girtK3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759435786; a=rsa-sha256; cv=none; b=wP3nVGP9lhcWkeKUu+aYHLAe1VheByltRCx6/mJfIKDcRKLIAM9iWJ9gTJTRNbaQZzq0dR inJxYvh+X1RB6a5A5IHtYY5vlhSYyxi2nS23CSkQ7LhXSTn3hbnwVxCyW6M5c9Xvl3ULZY xItTOd2njHjmbAcAeYW61L4TBVZuk08xtRO0nVU/cHAjOvcjR34x1MUuFx9ODE8+HzXaC6 AXhCn0OMkdj1pvoFXodIvFR7ihNaVOmw4X/dq6CrnyObudO1oXKP10q2vseQxOwU8rnUsk Pqglw5vzZxFw4mHf7fCLhaQxo3InTCBBAvGm6KpAk9Bj4GHXhM4ZqnNK4B7TiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cd2vZ4ygmz77x; Thu, 02 Oct 2025 20:09:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592K9k4q096845; Thu, 2 Oct 2025 20:09:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592K9kqH096842; Thu, 2 Oct 2025 20:09:46 GMT (envelope-from git) Date: Thu, 2 Oct 2025 20:09:46 GMT Message-Id: <202510022009.592K9kqH096842@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Jonathan T. Looney" Subject: git: ad38f6a0b466 - main - tcp: close two minor races with debug messages 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: jtl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ad38f6a0b466bf05a0d40ce1daa8c7bce0936271 Auto-Submitted: auto-generated The branch main has been updated by jtl: URL: https://cgit.FreeBSD.org/src/commit/?id=ad38f6a0b466bf05a0d40ce1daa8c7bce0936271 commit ad38f6a0b466bf05a0d40ce1daa8c7bce0936271 Author: Jonathan T. Looney AuthorDate: 2025-10-02 17:26:03 +0000 Commit: Jonathan T. Looney CommitDate: 2025-10-02 20:07:50 +0000 tcp: close two minor races with debug messages The syncache entry is locked by the hash bucket lock. After running SCH_UNLOCK(), we have no guarantee that the syncache entry still exists. Resolve the race by moving SCH_UNLOCK() after the log() call which reads variables from the syncache entry. Reviewed by: rrs, tuexen, Nick Banks Sponsored by: Netflix MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D52868 --- sys/netinet/tcp_syncache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 7f842512858d..def6bc886617 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -1201,7 +1201,6 @@ syncache_expand(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, */ if (sc->sc_flags & SCF_TIMESTAMP && to->to_flags & TOF_TS && TSTMP_LT(to->to_tsval, sc->sc_tsreflect)) { - SCH_UNLOCK(sch); if ((s = tcp_log_addrs(inc, th, NULL, NULL))) { log(LOG_DEBUG, "%s; %s: SEG.TSval %u < TS.Recent %u, " @@ -1209,6 +1208,7 @@ syncache_expand(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, to->to_tsval, sc->sc_tsreflect); free(s, M_TCPLOG); } + SCH_UNLOCK(sch); return (-1); /* Do not send RST */ } @@ -1280,11 +1280,11 @@ syncache_expand(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, * SEG.ACK must match our initial send sequence number + 1. */ if (th->th_ack != sc->sc_iss + 1) { - SCH_UNLOCK(sch); if ((s = tcp_log_addrs(inc, th, NULL, NULL))) log(LOG_DEBUG, "%s; %s: ACK %u != ISS+1 %u, " "segment rejected\n", s, __func__, th->th_ack, sc->sc_iss + 1); + SCH_UNLOCK(sch); goto failed; } From nobody Thu Oct 2 20:47: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 4cd3kX5bC3z6B1xs; Thu, 02 Oct 2025 20:47: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 4cd3kX51bCz3WFk; Thu, 02 Oct 2025 20:47:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759438020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bwAwftW6dYrTHJ9I2SzP+HaI0tA3AZ4EC6FL0R750HM=; b=hf+iG7Y99jnQng3ssqlp/f0lji+HjREcn9X/jQ2NihvKb3Z2vbP80KZ76AQG/Ko+Wck3ne XYGkh6eB7CC2oaF6D0juxdeHRmDr9prjwBnR4k+FGGOJGJ1DbxxF/db89OboGs4qw0rxNb UgDVfIAPI6UwLkQv7S/hJDCAhH/069NsSVKKkwlgaSjZFKFtRnthCzqSqIn7sn5Gd0AvrD k+A9uKOrLbqpGhJ+YAwFsBTl9kw3vfWtUDGIJZujK7RoKqvl4rd9jEucvEHz3CidWcuC52 wVcphteZTWmcCQlr8mfKigXKZVy23HmwWTwT9x+Juz/Xxy9DU7NQG+I/DyroUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759438020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bwAwftW6dYrTHJ9I2SzP+HaI0tA3AZ4EC6FL0R750HM=; b=UA9DYuAyi/jQ2brzhGraeyLSN1GLTs11TAmOJzLAhJKxEMFXARnbYCyuFdG0R7f67d594E sr4ptsISaKv4FB3lxK0WTrgyXqyITVHux0EbkUgu6LX+VKqw9H2lqbuajHVt0kJ4eTol20 FUl4y0uBdKgZeBni7HrV/krTjhXCQbSlk3CfFWzAu0EEgqB/wesk5I5yT4P5uYtS5Zlw9e CI6b3qCtx2B4y3rw4IV+eLiYwRf1io4ygRyhVqivJCiEagspPpDxhoHQFqpr/CnaNf4PXf zZObkfEgKtH/iB+aeYGsl99ipftCCQcdcQ4sbVQ7EECK6l+kR4OS2VL0rSte3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759438020; a=rsa-sha256; cv=none; b=lBydhXG57Q5SGrG3M1Hcpy7HXNhzSyOhrBQ9l0EJgzhWL6AEXDQcJWe+TIBDk44OLt69jv 4ddRO6Y+/1+BWT3im0JuPgOtOH3DoYxQs3HJxzobzBs9XlmffGWQx/6y70KU64vAbu/e2K 1yiYjYn2yWtcc1XVeL5hTHlqtgXsduCdlJjtAs71FLxHpH9gV5GvSYARh58C2D+JA6zK6a bZp/cET7WrA/VgDkk/BJwFbGFw6+gGJfUxP/Kh8OzbRg5QfZ4TwyxTY6Zr5M9/zHzjwTPj TOnerN5TzB/4e0/5QQi2R7KqB0p++JqnKTADseKZFaQviaLlvJyqN0xlLVkyVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cd3kX4YqKz7yh; Thu, 02 Oct 2025 20:47:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592Kl0tI072785; Thu, 2 Oct 2025 20:47:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592Kl0XD072782; Thu, 2 Oct 2025 20:47:00 GMT (envelope-from git) Date: Thu, 2 Oct 2025 20:47:00 GMT Message-Id: <202510022047.592Kl0XD072782@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: b93394a38bc4 - main - pf: fix 'natpass' List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b93394a38bc41f8afceaf0c03ed5d8b8b5a9aefb Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b93394a38bc41f8afceaf0c03ed5d8b8b5a9aefb commit b93394a38bc41f8afceaf0c03ed5d8b8b5a9aefb Author: Kristof Provost AuthorDate: 2025-09-30 17:40:08 +0000 Commit: Kristof Provost CommitDate: 2025-10-02 20:46:43 +0000 pf: fix 'natpass' If an rdr (or nat) rule specifies 'pass' we don't run the filter rules, we just pass the traffic. Or at least, we did until that got unintentionally broken. Restore that behaviour and add a test case. While here also fix nat:dummynet_mask, which relied on the broken behaviour. MFC after: 3 days Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D52838 --- sys/netpfil/pf/pf.c | 59 ++++++++++++++++++++++++--------------------- tests/sys/netpfil/pf/nat.sh | 2 +- tests/sys/netpfil/pf/rdr.sh | 58 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+), 28 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 4440263ec600..d6fc24a23fe9 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -5965,37 +5965,42 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, ctx.nat_pool = &(ctx.nr->rdr); } - ruleset = &pf_main_ruleset; - rv = pf_match_rule(&ctx, ruleset, match_rules); - if (rv == PF_TEST_FAIL) { - /* - * Reason has been set in pf_match_rule() already. - */ - goto cleanup; - } - - r = *ctx.rm; /* matching rule */ - ctx.a = *ctx.am; /* rule that defines an anchor containing 'r' */ - ruleset = *ctx.rsm; /* ruleset of the anchor defined by the rule 'a' */ - ctx.aruleset = ctx.arsm; /* ruleset of the 'a' rule itself */ + if (ctx.nr && ctx.nr->natpass) { + r = ctx.nr; + ruleset = *ctx.rsm; + } else { + ruleset = &pf_main_ruleset; + rv = pf_match_rule(&ctx, ruleset, match_rules); + if (rv == PF_TEST_FAIL) { + /* + * Reason has been set in pf_match_rule() already. + */ + goto cleanup; + } - REASON_SET(&ctx.reason, PFRES_MATCH); + r = *ctx.rm; /* matching rule */ + ctx.a = *ctx.am; /* rule that defines an anchor containing 'r' */ + ruleset = *ctx.rsm; /* ruleset of the anchor defined by the rule 'a' */ + ctx.aruleset = ctx.arsm; /* ruleset of the 'a' rule itself */ - /* apply actions for last matching pass/block rule */ - pf_rule_to_actions(r, &pd->act); - transerror = pf_rule_apply_nat(&ctx, r); - switch (transerror) { - case PFRES_MATCH: - /* Translation action found in rule and applied successfully */ - case PFRES_MAX: - /* No translation action found in rule */ - break; - default: - /* Translation action found in rule but failed to apply */ - REASON_SET(&ctx.reason, transerror); - goto cleanup; + /* apply actions for last matching pass/block rule */ + pf_rule_to_actions(r, &pd->act); + transerror = pf_rule_apply_nat(&ctx, r); + switch (transerror) { + case PFRES_MATCH: + /* Translation action found in rule and applied successfully */ + case PFRES_MAX: + /* No translation action found in rule */ + break; + default: + /* Translation action found in rule but failed to apply */ + REASON_SET(&ctx.reason, transerror); + goto cleanup; + } } + REASON_SET(&ctx.reason, PFRES_MATCH); + if (r->log) { if (ctx.rewrite) m_copyback(pd->m, pd->off, pd->hdrlen, pd->hdr.any); diff --git a/tests/sys/netpfil/pf/nat.sh b/tests/sys/netpfil/pf/nat.sh index 170d813d57fe..e55f46418221 100644 --- a/tests/sys/netpfil/pf/nat.sh +++ b/tests/sys/netpfil/pf/nat.sh @@ -838,7 +838,7 @@ dummynet_mask_body() jexec gw dnctl pipe 1 config delay 100 mask src-ip 0xffffff00 jexec gw pfctl -e pft_set_rules gw \ - "nat pass on ${epair_srv}b inet from 192.0.2.0/24 to any -> (${epair_srv}b)" \ + "nat on ${epair_srv}b inet from 192.0.2.0/24 to any -> (${epair_srv}b)" \ "pass out dnpipe 1" atf_check -s exit:0 -o ignore \ diff --git a/tests/sys/netpfil/pf/rdr.sh b/tests/sys/netpfil/pf/rdr.sh index f7c920bbfa8f..24b95b2047f4 100644 --- a/tests/sys/netpfil/pf/rdr.sh +++ b/tests/sys/netpfil/pf/rdr.sh @@ -281,8 +281,66 @@ srcport_pass_cleanup() pft_cleanup } +atf_test_case "natpass" "cleanup" +natpass_head() +{ + atf_set descr 'Test rdr pass' + atf_set require.user root +} + +natpass_body() +{ + pft_init + + epair=$(vnet_mkepair) + epair_link=$(vnet_mkepair) + + ifconfig ${epair}a 192.0.2.2/24 up + + vnet_mkjail alcatraz ${epair}b ${epair_link}a + jexec alcatraz ifconfig lo0 inet 127.0.0.1/8 up + jexec alcatraz ifconfig ${epair}b inet 192.0.2.1/24 up + jexec alcatraz ifconfig ${epair_link}a 198.51.100.1/24 up + jexec alcatraz sysctl net.inet.ip.forwarding=1 + + vnet_mkjail srv ${epair_link}b + jexec srv ifconfig ${epair_link}b inet 198.51.100.2/24 up + jexec srv route add default 198.51.100.1 + + # Sanity check + atf_check -s exit:0 -o ignore \ + ping -c 1 192.0.2.1 + atf_check -s exit:0 -o ignore \ + jexec alcatraz ping -c 1 198.51.100.2 + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "rdr pass on ${epair}b proto udp from any to 192.0.2.1 port 80 -> 198.51.100.2" \ + "nat on ${epair}b inet from 198.51.100.0/24 to any -> 192.0.2.1" \ + "block in proto udp from any to any port 80" \ + "pass in proto icmp" + + echo "foo" | jexec srv nc -u -l 80 & + sleep 1 # Give the above a moment to start + + out=$(echo 1 | nc -u -w 1 192.0.2.1 80) + echo "out ${out}" + if [ "${out}" != "foo" ]; + then + jexec alcatraz pfctl -sn -vv + jexec alcatraz pfctl -ss -vv + atf_fail "rdr failed" + fi +} + +natpass_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { + atf_add_test_case "natpass" atf_add_test_case "tcp_v6_compat" atf_add_test_case "tcp_v6_pass" atf_add_test_case "srcport_compat" From nobody Thu Oct 2 21:17:40 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cd4Q82jfwz6B4lr for ; Thu, 02 Oct 2025 21:17:52 +0000 (UTC) (envelope-from eduardo@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 4cd4Q80rHdz3Ym2 for ; Thu, 02 Oct 2025 21:17:52 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759439872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Qwbt+pDBDwRA8lnpPaDcDiB1/grMxsN8qy4FI99ML5A=; b=JRJp7nGW/X2MOLsx+rnIinpO7R1eStkU3yKnAzNhZ8lY5FhEYYQt1wfsGz7P6PQpk1KLLa YwLaHXei4WUpo8ggm3tx48HkZyuwF6z3FJY1QEXa9pZBi3JPJ+QcVl1RVOyuDBlsyXrZTO hj1+h5fT7tn15dDz9DuaEvelXu3j0aH6yVxgiqNgd8RC7OZCpUl7Lf982BdLd/SOK8CaWz 5M9Gg5Zz5pIxhc4Mi+qbxhb1OvNAvqo0PK2CjSmMxedIg4+BY0wU0DoeXNTRtXwZ0HncIN Vf6yELJOKf6oPopdQizAUj7sstAgUqDC1jp29ElznSw2MVB4OXMuzk/7cyY25w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759439872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Qwbt+pDBDwRA8lnpPaDcDiB1/grMxsN8qy4FI99ML5A=; b=Tc7xkTfCMGkSEUAwNHhmiZgvTw3xKcgZWKnsF7cq0F/llAklmH2gNiiaQmwU27vamyhqie 1g6RDe6ROmGxrtM+BUeMns3XGGDPnVIXSz9Yt7a2o2rj20PigYFY+jYqEhii/wYYZt1grU fr2qSQazSk3prdJemuJQSQKDVjNoMudfHw5/XNWd2jUuwoUyPHNF+tfzzopIvMRf+5WTe7 WuMjryjqFG2WN4jQb+MzkcB9DuHDfCbc3dicVk4/e0Ap5Q0p7dMBVZQci2jTATdMay3eaW 9YCYWwE3vSre46sTgGpvoyJxrFHr0m6qRWA/VRP94FXVUl6bU0JK2aNexPwwZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759439872; a=rsa-sha256; cv=none; b=kncsjRYgaU9y4aEstZHLC46KEJPQCdXpBdxTMJuZxcmct4gLDQYIaDt4eQGeHOLp9lxQt1 mu8U87N5AWyapSFPXi4uQJTmt6GDOiEeEeq5oid+XMi1kftMF7J+1AQmt1lAsADFDwNDOD TtI+mxHIr+lKJCLINc6eIyvyBgRHBh/Iw/aBMhUcj1Z26TSQzsw9yNm87+mRnJszCMAzZs iNVId0KfxUgliZ2SatCI+sSddg6i6yBG/fe2bossVysGEQXaPuf4HUUJTddF/9lDfsC9Pk jSnpYo0b9WuOnqpWhhLtc+DDLaVz1Vf2aYho15SVsPem5sXEIqfDFDNfJowYHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cd4Q7677hz17jJ for ; Thu, 02 Oct 2025 21:17:51 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-4dffec0f14eso1872321cf.0 for ; Thu, 02 Oct 2025 14:17:51 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCWgHh46S66aWQdcPPWZB1UPvlva0GzB76kjs7XVuAxKJUrcB8kQVfTwO8A+UDuHyZ0IQw8buelubneyYzZigkAQn0xTpQ==@freebsd.org X-Gm-Message-State: AOJu0YwjFQAifglEwEOzzbNyrdpOeW/tqZjeeVG7bvnkd3FXWijmaqGg 84u2WaVpqlYpAlDuEwG8Z+jHu7NynNOA4qSJyBb9B0VsgU+a71zqVc8nr08QaEtNmwKCUduUuNn JuW2OF48kYYCApRAPzoElw9AhInHGsnY= X-Google-Smtp-Source: AGHT+IF6EhDf/XOCe8lmPLv/PqaSkaQ9MnDB+hvGF18Ng7cPiGCK0QeTaefioiC+tMxZxVVr1O5M9EqIUDYLt2CM1H4= X-Received: by 2002:a05:622a:7391:b0:4b5:f521:30f7 with SMTP id d75a77b69052e-4e576b13f65mr6884331cf.4.1759439871139; Thu, 02 Oct 2025 14:17:51 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <202509271713.58RHDTTL008060@gitrepo.freebsd.org> In-Reply-To: From: Nuno Teixeira Date: Thu, 2 Oct 2025 22:17:40 +0100 X-Gmail-Original-Message-ID: X-Gm-Features: AS18NWDu3FdJ61eDau00qp4NE-zGhKcVeUFYvqSwWPUmz227_dVgFGg_DRrygAs Message-ID: Subject: Re: git: 2ed9833791f2 - main - thunderbolt: Import USB4 code To: Wolfram Schneider Cc: Aymeric Wibo , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000085e79c0640338477" --00000000000085e79c0640338477 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable yep, seing that symlink too. Wolfram Schneider escreveu (ter=C3=A7a, 30/09/2025 =C3= =A0(s) 07:44): > I'm now getting a stale symlink: > > ./tools/build/stale-symlink-buildworld.sh > stale symlink detected: lrwxrwxr-x 1 wosch wheel 91 Sep 29 22:14 > > /var/tmp/freebsd-obj-wosch/home/projects/freebsd-src/amd64.amd64/sys/GENE= RIC/modules/home/projects/freebsd-src/sys/modules/thunderbolt/opt_acpi_wmi.= h > -> > /var/tmp/freebsd-obj-wosch/home/projects/freebsd-src/amd64.amd64/sys/GENE= RIC/opt_acpi_wmi.h > > the only reference to the file "opt_acpi_wmi.h" is in the Makefile > > sys/modules/thunderbolt/Makefile:SRCS+=3D opt_acpi.h opt_acpi_wmi.h > acpi_if.h acpi_wmi_if.h > > What is this file supposed to do, where does it come from? > > -Wolfram > > On Sat, 27 Sept 2025 at 19:13, Aymeric Wibo wrote: > > > > The branch main has been updated by obiwac: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D2ed9833791f28e14843ac813f90cb03= 0e45948dc > > > > commit 2ed9833791f28e14843ac813f90cb030e45948dc > > Author: Aymeric Wibo > > AuthorDate: 2025-09-27 11:50:43 +0000 > > Commit: Aymeric Wibo > > CommitDate: 2025-09-27 17:13:13 +0000 > > > > thunderbolt: Import USB4 code > > > > Add initial USB4 code written by Scott Long and originally passed o= n > to > > HPS (source: https://github.com/hselasky/usb4), minus the ICM code > and > > with some small fixes. > > > > For context, older TB chips implemented the connection manager in > > firmware (ICM) instead of in the OS (HCM), but maintaining the ICM > code > > would be a huge burden for not many chips. > > > > Mostly completed work: > > > > - Debug/trace framework. > > - NHI controller driver. > > - PCIe bridge driver. > > - Router and config space layer handling (just reading in this > commit). > > > > Link to the email where Scott shared details about the initial USB4 > > work: > > > > > https://lists.freebsd.org/archives/freebsd-hackers/2024-July/003411.html > > > > Glanced at by: emaste, imp > > Sponsored by: The FreeBSD Foundation > > Differential Revision: https://reviews.freebsd.org/D49450 > > Event: EuroBSDcon 2025 > > --- > > sys/dev/thunderbolt/hcm.c | 223 +++++++ > > sys/dev/thunderbolt/hcm_var.h | 47 ++ > > sys/dev/thunderbolt/nhi.c | 1170 > ++++++++++++++++++++++++++++++++++++ > > sys/dev/thunderbolt/nhi_pci.c | 529 ++++++++++++++++ > > sys/dev/thunderbolt/nhi_reg.h | 332 ++++++++++ > > sys/dev/thunderbolt/nhi_var.h | 277 +++++++++ > > sys/dev/thunderbolt/nhi_wmi.c | 198 ++++++ > > sys/dev/thunderbolt/router.c | 939 ++++++++++++++++++++++++++++= + > > sys/dev/thunderbolt/router_var.h | 242 ++++++++ > > sys/dev/thunderbolt/tb_acpi_pcib.c | 181 ++++++ > > sys/dev/thunderbolt/tb_debug.c | 334 ++++++++++ > > sys/dev/thunderbolt/tb_debug.h | 93 +++ > > sys/dev/thunderbolt/tb_dev.c | 331 ++++++++++ > > sys/dev/thunderbolt/tb_dev.h | 41 ++ > > sys/dev/thunderbolt/tb_if.m | 121 ++++ > > sys/dev/thunderbolt/tb_ioctl.h | 52 ++ > > sys/dev/thunderbolt/tb_pcib.c | 614 +++++++++++++++++++ > > sys/dev/thunderbolt/tb_pcib.h | 93 +++ > > sys/dev/thunderbolt/tb_reg.h | 52 ++ > > sys/dev/thunderbolt/tb_var.h | 54 ++ > > sys/dev/thunderbolt/tbcfg_reg.h | 363 +++++++++++ > > sys/modules/Makefile | 5 + > > sys/modules/thunderbolt/Makefile | 13 + > > 23 files changed, 6304 insertions(+) > > > > diff --git a/sys/dev/thunderbolt/hcm.c b/sys/dev/thunderbolt/hcm.c > > new file mode 100644 > > index 000000000000..b8f703fc3b52 > > --- /dev/null > > +++ b/sys/dev/thunderbolt/hcm.c > > @@ -0,0 +1,223 @@ > > +/*- > > + * SPDX-License-Identifier: BSD-2-Clause > > + * > > + * Copyright (c) 2022 Scott Long > > + * All rights reserved. > > + * > > + * Redistribution and use in source and binary forms, with or without > > + * modification, are permitted provided that the following conditions > > + * are met: > > + * 1. Redistributions of source code must retain the above copyright > > + * notice, this list of conditions and the following disclaimer. > > + * 2. Redistributions in binary form must reproduce the above copyrigh= t > > + * 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, T= HE > > + * 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 INTERRUPTIO= N) > > + * 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 "opt_thunderbolt.h" > > + > > +/* Host Configuration Manager (HCM) for USB4 and later TB3 */ > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include > > +#include > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +static void hcm_cfg_task(void *, int); > > + > > +int > > +hcm_attach(struct nhi_softc *nsc) > > +{ > > + struct hcm_softc *hcm; > > + > > + tb_debug(nsc, DBG_HCM|DBG_EXTRA, "hcm_attach called\n"); > > + > > + hcm =3D malloc(sizeof(struct hcm_softc), M_THUNDERBOLT, > M_NOWAIT|M_ZERO); > > + if (hcm =3D=3D NULL) { > > + tb_debug(nsc, DBG_HCM, "Cannot allocate hcm object\n"); > > + return (ENOMEM); > > + } > > + > > + hcm->dev =3D nsc->dev; > > + hcm->nsc =3D nsc; > > + nsc->hcm =3D hcm; > > + > > + hcm->taskqueue =3D taskqueue_create("hcm_event", M_NOWAIT, > > + taskqueue_thread_enqueue, &hcm->taskqueue); > > + if (hcm->taskqueue =3D=3D NULL) > > + return (ENOMEM); > > + taskqueue_start_threads(&hcm->taskqueue, 1, PI_DISK, > "tbhcm%d_tq", > > + device_get_unit(nsc->dev)); > > + TASK_INIT(&hcm->cfg_task, 0, hcm_cfg_task, hcm); > > + > > + return (0); > > +} > > + > > +int > > +hcm_detach(struct nhi_softc *nsc) > > +{ > > + struct hcm_softc *hcm; > > + > > + hcm =3D nsc->hcm; > > + if (hcm->taskqueue) > > + taskqueue_free(hcm->taskqueue); > > + > > + return (0); > > +} > > + > > +int > > +hcm_router_discover(struct hcm_softc *hcm) > > +{ > > + > > + taskqueue_enqueue(hcm->taskqueue, &hcm->cfg_task); > > + > > + return (0); > > +} > > + > > +static void > > +hcm_cfg_task(void *arg, int pending) > > +{ > > + struct hcm_softc *hcm; > > + struct router_softc *rsc; > > + struct router_cfg_cap cap; > > + struct tb_cfg_router *cfg; > > + struct tb_cfg_adapter *adp; > > + struct tb_cfg_cap_lane *lane; > > + uint32_t *buf; > > + uint8_t *u; > > + u_int error, i, offset; > > + > > + hcm =3D (struct hcm_softc *)arg; > > + > > + tb_debug(hcm, DBG_HCM|DBG_EXTRA, "hcm_cfg_task called\n"); > > + > > + buf =3D malloc(8 * 4, M_THUNDERBOLT, M_NOWAIT|M_ZERO); > > + if (buf =3D=3D NULL) { > > + tb_debug(hcm, DBG_HCM, "Cannot alloc memory for > discovery\n"); > > + return; > > + } > > + > > + rsc =3D hcm->nsc->root_rsc; > > + error =3D tb_config_router_read(rsc, 0, 5, buf); > > + if (error !=3D 0) { > > + free(buf, M_NHI); > > + return; > > + } > > + > > + cfg =3D (struct tb_cfg_router *)buf; > > + > > + cap.space =3D TB_CFG_CS_ROUTER; > > + cap.adap =3D 0; > > + cap.next_cap =3D GET_ROUTER_CS_NEXT_CAP(cfg); > > + while (cap.next_cap !=3D 0) { > > + error =3D tb_config_next_cap(rsc, &cap); > > + if (error !=3D 0) > > + break; > > + > > + if ((cap.cap_id =3D=3D TB_CFG_CAP_VSEC) && (cap.vsc_len= =3D=3D > 0)) { > > + tb_debug(hcm, DBG_HCM, "Router Cap=3D %d, vsec= =3D > %d, " > > + "len=3D %d, next_cap=3D %d\n", cap.cap_id, > > + cap.vsc_id, cap.vsec_len, cap.next_cap); > > + } else if (cap.cap_id =3D=3D TB_CFG_CAP_VSC) { > > + tb_debug(hcm, DBG_HCM, "Router cap=3D %d, vsc= =3D %d, > " > > + "len=3D %d, next_cap=3D %d\n", cap.cap_id, > > + cap.vsc_id, cap.vsc_len, cap.next_cap); > > + } else > > + tb_debug(hcm, DBG_HCM, "Router cap=3D %d, " > > + "next_cap=3D %d\n", cap.cap_id, cap.next_ca= p); > > + if (cap.next_cap > TB_CFG_CAP_OFFSET_MAX) > > + cap.next_cap =3D 0; > > + } > > + > > + u =3D (uint8_t *)buf; > > + error =3D tb_config_get_lc_uuid(rsc, u); > > + if (error =3D=3D 0) { > > + tb_debug(hcm, DBG_HCM, "Router LC UUID: > %02x%02x%02x%02x-" > > + > "%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\n", > > + u[0], u[1], u[2], u[3], u[4], u[5], u[6], u[7], u[8= ], > > + u[9], u[10], u[11], u[12], u[13], u[14], u[15]); > > + } else > > + tb_printf(hcm, "Error finding LC registers: %d\n", > error); > > + > > + for (i =3D 1; i <=3D rsc->max_adap; i++) { > > + error =3D tb_config_adapter_read(rsc, i, 0, 8, buf); > > + if (error !=3D 0) { > > + tb_debug(hcm, DBG_HCM, "Adapter %d: no > adapter\n", i); > > + continue; > > + } > > + adp =3D (struct tb_cfg_adapter *)buf; > > + tb_debug(hcm, DBG_HCM, "Adapter %d: %s, max_counters=3D > 0x%08x," > > + " adapter_num=3D %d\n", i, > > + tb_get_string(GET_ADP_CS_TYPE(adp), tb_adapter_type= ), > > + GET_ADP_CS_MAX_COUNTERS(adp), > GET_ADP_CS_ADP_NUM(adp)); > > + > > + if (GET_ADP_CS_TYPE(adp) !=3D ADP_CS2_LANE) > > + continue; > > + > > + error =3D tb_config_find_adapter_cap(rsc, i, > TB_CFG_CAP_LANE, > > + &offset); > > + if (error) > > + continue; > > + > > + error =3D tb_config_adapter_read(rsc, i, offset, 3, buf= ); > > + if (error) > > + continue; > > + > > + lane =3D (struct tb_cfg_cap_lane *)buf; > > + tb_debug(hcm, DBG_HCM, "Lane Adapter State=3D %s %s\n", > > + tb_get_string((lane->current_lws & > CAP_LANE_STATE_MASK), > > + tb_adapter_state), (lane->targ_lwp & > CAP_LANE_DISABLE) ? > > + "disabled" : "enabled"); > > + > > + if ((lane->current_lws & CAP_LANE_STATE_MASK) =3D=3D > > + CAP_LANE_STATE_CL0) { > > + tb_route_t newr; > > + > > + newr.hi =3D rsc->route.hi; > > + newr.lo =3D rsc->route.lo | (i << rsc->depth * = 8); > > + > > + tb_printf(hcm, "want to add router at > 0x%08x%08x\n", > > + newr.hi, newr.lo); > > + error =3D tb_router_attach(rsc, newr); > > + tb_printf(rsc, "tb_router_attach returned %d\n"= , > error); > > + } > > + } > > + > > + free(buf, M_THUNDERBOLT); > > +} > > diff --git a/sys/dev/thunderbolt/hcm_var.h > b/sys/dev/thunderbolt/hcm_var.h > > new file mode 100644 > > index 000000000000..a11c8e9b6a92 > > --- /dev/null > > +++ b/sys/dev/thunderbolt/hcm_var.h > > @@ -0,0 +1,47 @@ > > +/*- > > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > > + * > > + * Copyright (c) 2022 Scott Long > > + * All rights reserved. > > + * > > + * Redistribution and use in source and binary forms, with or without > > + * modification, are permitted provided that the following conditions > > + * are met: > > + * 1. Redistributions of source code must retain the above copyright > > + * notice, this list of conditions and the following disclaimer. > > + * 2. Redistributions in binary form must reproduce the above copyrigh= t > > + * 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, T= HE > > + * 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 INTERRUPTIO= N) > > + * 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. > > + * > > + * $FreeBSD$ > > + */ > > + > > +#ifndef _HCM_VAR_H > > +#define _HCM_VAR_H > > + > > +struct hcm_softc { > > + u_int debug; > > + device_t dev; > > + struct nhi_softc *nsc; > > + > > + struct task cfg_task; > > + struct taskqueue *taskqueue; > > +}; > > + > > +int hcm_attach(struct nhi_softc *); > > +int hcm_detach(struct nhi_softc *); > > +int hcm_router_discover(struct hcm_softc *); > > + > > +#endif /* _HCM_VAR_H */ > > diff --git a/sys/dev/thunderbolt/nhi.c b/sys/dev/thunderbolt/nhi.c > > new file mode 100644 > > index 000000000000..205e69c16253 > > --- /dev/null > > +++ b/sys/dev/thunderbolt/nhi.c > > @@ -0,0 +1,1170 @@ > > +/*- > > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > > + * > > + * Copyright (c) 2022 Scott Long > > + * All rights reserved. > > + * > > + * Redistribution and use in source and binary forms, with or without > > + * modification, are permitted provided that the following conditions > > + * are met: > > + * 1. Redistributions of source code must retain the above copyright > > + * notice, this list of conditions and the following disclaimer. > > + * 2. Redistributions in binary form must reproduce the above copyrigh= t > > + * 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, T= HE > > + * 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 INTERRUPTIO= N) > > + * 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 "opt_thunderbolt.h" > > + > > +/* PCIe interface for Thunderbolt Native Host Interface (nhi) */ > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include > > +#include > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include "tb_if.h" > > + > > +static int nhi_alloc_ring(struct nhi_softc *, int, int, int, > > + struct nhi_ring_pair **); > > +static void nhi_free_ring(struct nhi_ring_pair *); > > +static void nhi_free_rings(struct nhi_softc *); > > +static int nhi_configure_ring(struct nhi_softc *, struct nhi_ring_pair > *); > > +static int nhi_activate_ring(struct nhi_ring_pair *); > > +static int nhi_deactivate_ring(struct nhi_ring_pair *); > > +static int nhi_alloc_ring0(struct nhi_softc *); > > +static void nhi_free_ring0(struct nhi_softc *); > > +static void nhi_fill_rx_ring(struct nhi_softc *, struct nhi_ring_pair > *); > > +static int nhi_init(struct nhi_softc *); > > +static void nhi_post_init(void *); > > +static int nhi_tx_enqueue(struct nhi_ring_pair *, struct nhi_cmd_frame > *); > > +static int nhi_setup_sysctl(struct nhi_softc *); > > + > > +SYSCTL_NODE(_hw, OID_AUTO, nhi, CTLFLAG_RD, 0, "NHI Driver Parameters"= ); > > + > > +MALLOC_DEFINE(M_NHI, "nhi", "nhi driver memory"); > > + > > +#ifndef NHI_DEBUG_LEVEL > > +#define NHI_DEBUG_LEVEL 0 > > +#endif > > + > > +/* 0 =3D default, 1 =3D force-on, 2 =3D force-off */ > > +#ifndef NHI_FORCE_HCM > > +#define NHI_FORCE_HCM 0 > > +#endif > > + > > +void > > +nhi_get_tunables(struct nhi_softc *sc) > > +{ > > + devclass_t dc; > > + device_t ufp; > > + char tmpstr[80], oid[80]; > > + u_int val; > > + > > + /* Set local defaults */ > > + sc->debug =3D NHI_DEBUG_LEVEL; > > + sc->max_ring_count =3D NHI_DEFAULT_NUM_RINGS; > > + sc->force_hcm =3D NHI_FORCE_HCM; > > + > > + /* Inherit setting from the upstream thunderbolt switch node */ > > + val =3D TB_GET_DEBUG(sc->dev, &sc->debug); > > + if (val !=3D 0) { > > + dc =3D devclass_find("tbolt"); > > + if (dc !=3D NULL) { > > + ufp =3D devclass_get_device(dc, > device_get_unit(sc->dev)); > > + if (ufp !=3D NULL) > > + TB_GET_DEBUG(ufp, &sc->debug); > > + } else { > > + if (TUNABLE_STR_FETCH("hw.tbolt.debug_level", > oid, > > + 80) !=3D 0) > > + tb_parse_debug(&sc->debug, oid); > > + } > > + } > > + > > + /* > > + * Grab global variables. Allow nhi debug flags to override > > + * thunderbolt debug flags, if present. > > + */ > > + bzero(oid, 80); > > + if (TUNABLE_STR_FETCH("hw.nhi.debug_level", oid, 80) !=3D 0) > > + tb_parse_debug(&sc->debug, oid); > > + if (TUNABLE_INT_FETCH("hw.nhi.max_rings", &val) !=3D 0) { > > + val =3D min(val, NHI_MAX_NUM_RINGS); > > + sc->max_ring_count =3D max(val, 1); > > + } > > + if (TUNABLE_INT_FETCH("hw.nhi.force_hcm", &val) !=3D 0) > > + sc->force_hcm =3D val; > > + > > + /* Grab instance variables */ > > + bzero(oid, 80); > > + snprintf(tmpstr, sizeof(tmpstr), "dev.nhi.%d.debug_level", > > + device_get_unit(sc->dev)); > > + if (TUNABLE_STR_FETCH(tmpstr, oid, 80) !=3D 0) > > + tb_parse_debug(&sc->debug, oid); > > + snprintf(tmpstr, sizeof(tmpstr), "dev.nhi.%d.max_rings", > > + device_get_unit(sc->dev)); > > + if (TUNABLE_INT_FETCH(tmpstr, &val) !=3D 0) { > > + val =3D min(val, NHI_MAX_NUM_RINGS); > > + sc->max_ring_count =3D max(val, 1); > > + } > > + snprintf(tmpstr, sizeof(tmpstr), "dev, nhi.%d.force_hcm", > > + device_get_unit(sc->dev)); > > + if (TUNABLE_INT_FETCH(tmpstr, &val) !=3D 0) > > + sc->force_hcm =3D val; > > + > > + return; > > +} > > + > > +static void > > +nhi_configure_caps(struct nhi_softc *sc) > > +{ > > + > > + if (NHI_IS_USB4(sc) || (sc->force_hcm =3D=3D NHI_FORCE_HCM_ON)) > > + sc->caps |=3D NHI_CAP_HCM; > > + if (sc->force_hcm =3D=3D NHI_FORCE_HCM_OFF) > > + sc->caps &=3D ~NHI_CAP_HCM; > > +} > > + > > +struct nhi_cmd_frame * > > +nhi_alloc_tx_frame(struct nhi_ring_pair *r) > > +{ > > + struct nhi_cmd_frame *cmd; > > + > > + mtx_lock(&r->mtx); > > + cmd =3D nhi_alloc_tx_frame_locked(r); > > + mtx_unlock(&r->mtx); > > + > > + return (cmd); > > +} > > + > > +void > > +nhi_free_tx_frame(struct nhi_ring_pair *r, struct nhi_cmd_frame *cmd) > > +{ > > + mtx_lock(&r->mtx); > > + nhi_free_tx_frame_locked(r, cmd); > > + mtx_unlock(&r->mtx); > > +} > > + > > +/* > > + * Push a command and data dword through the mailbox to the firmware. > > + * Response is either good, error, or timeout. Commands that return > data > > + * do so by reading OUTMAILDATA. > > + */ > > +int > > +nhi_inmail_cmd(struct nhi_softc *sc, uint32_t cmd, uint32_t data) > > +{ > > + uint32_t val; > > + u_int error, timeout; > > + > > + mtx_lock(&sc->nhi_mtx); > > + /* > > + * XXX Should a defer/reschedule happen here, or is it not wort= h > > + * worrying about? > > + */ > > + if (sc->hwflags & NHI_MBOX_BUSY) { > > + mtx_unlock(&sc->nhi_mtx); > > + tb_debug(sc, DBG_MBOX, "Driver busy with mailbox\n"); > > + return (EBUSY); > > + } > > + sc->hwflags |=3D NHI_MBOX_BUSY; > > + > > + val =3D nhi_read_reg(sc, TBT_INMAILCMD); > > + tb_debug(sc, DBG_MBOX|DBG_FULL, "Reading INMAILCMD=3D 0x%08x\n"= , > val); > > + if (val & INMAILCMD_ERROR) > > + tb_debug(sc, DBG_MBOX, "Error already set in > INMAILCMD\n"); > > + if (val & INMAILCMD_OPREQ) { > > + mtx_unlock(&sc->nhi_mtx); > > + tb_debug(sc, DBG_MBOX, > > + "INMAILCMD request already in progress\n"); > > + return (EBUSY); > > + } > > + > > + nhi_write_reg(sc, TBT_INMAILDATA, data); > > + nhi_write_reg(sc, TBT_INMAILCMD, cmd | INMAILCMD_OPREQ); > > + > > + /* Poll at 1s intervals */ > > + timeout =3D NHI_MAILBOX_TIMEOUT; > > + while (timeout--) { > > + DELAY(1000000); > > + val =3D nhi_read_reg(sc, TBT_INMAILCMD); > > + tb_debug(sc, DBG_MBOX|DBG_EXTRA, > > + "Polling INMAILCMD=3D 0x%08x\n", val); > > + if ((val & INMAILCMD_OPREQ) =3D=3D 0) > > + break; > > + } > > + sc->hwflags &=3D ~NHI_MBOX_BUSY; > > + mtx_unlock(&sc->nhi_mtx); > > + > > + error =3D 0; > > + if (val & INMAILCMD_OPREQ) { > > + tb_printf(sc, "Timeout waiting for mailbox\n"); > > + error =3D ETIMEDOUT; > > + } > > + if (val & INMAILCMD_ERROR) { > > + tb_printf(sc, "Firmware reports error in mailbox\n"); > > + error =3D EINVAL; > > + } > > + > > + return (error); > > +} > > + > > +/* > > + * Pull command status and data from the firmware mailbox. > > + */ > > +int > > +nhi_outmail_cmd(struct nhi_softc *sc, uint32_t *val) > > +{ > > + > > + if (val =3D=3D NULL) > > + return (EINVAL); > > + *val =3D nhi_read_reg(sc, TBT_OUTMAILCMD); > > + return (0); > > +} > > + > > +int > > +nhi_attach(struct nhi_softc *sc) > > +{ > > + uint32_t val; > > + int error =3D 0; > > + > > + if ((error =3D nhi_setup_sysctl(sc)) !=3D 0) > > + return (error); > > + > > + mtx_init(&sc->nhi_mtx, "nhimtx", "NHI Control Mutex", MTX_DEF); > > + > > + nhi_configure_caps(sc); > > + > > + /* > > + * Get the number of TX/RX paths. This sizes some of the > register > > + * arrays during allocation and initialization. USB4 spec says > that > > + * the max is 21. Alpine Ridge appears to default to 12. > > + */ > > + val =3D GET_HOST_CAPS_PATHS(nhi_read_reg(sc, NHI_HOST_CAPS)); > > + tb_debug(sc, DBG_INIT|DBG_NOISY, "Total Paths=3D %d\n", val); > > + if ((val =3D=3D 0) || (val > 21) || ((NHI_IS_AR(sc) && val !=3D= 12))) { > > + tb_printf(sc, "WARN: unexpected number of paths: %d\n", > val); > > + /* return (ENXIO); */ > > + } > > + sc->path_count =3D val; > > + > > + SLIST_INIT(&sc->ring_list); > > + > > + error =3D nhi_pci_configure_interrupts(sc); > > + if (error =3D=3D 0) > > + error =3D nhi_alloc_ring0(sc); > > + if (error =3D=3D 0) { > > + nhi_configure_ring(sc, sc->ring0); > > + nhi_activate_ring(sc->ring0); > > + nhi_fill_rx_ring(sc, sc->ring0); > > + } > > + > > + if (error =3D=3D 0) > > + error =3D tbdev_add_interface(sc); > > + > > + if ((error =3D=3D 0) && (NHI_USE_ICM(sc))) > > + tb_printf(sc, "WARN: device uses an internal connection > manager\n"); > > + if ((error =3D=3D 0) && (NHI_USE_HCM(sc))) > > + ; > > + error =3D hcm_attach(sc); > > + > > + if (error =3D=3D 0) > > + error =3D nhi_init(sc); > > + > > + return (error); > > +} > > + > > +int > > +nhi_detach(struct nhi_softc *sc) > > +{ > > + > > + if (NHI_USE_HCM(sc)) > > + hcm_detach(sc); > > + > > + if (sc->root_rsc !=3D NULL) > > + tb_router_detach(sc->root_rsc); > > + > > + tbdev_remove_interface(sc); > > + > > + nhi_pci_disable_interrupts(sc); > > + > > + nhi_free_ring0(sc); > > + > > + /* XXX Should the rings be marked as !VALID in the descriptors? > */ > > + nhi_free_rings(sc); > > + > > + mtx_destroy(&sc->nhi_mtx); > > + > > + return (0); > > +} > > + > > +static void > > +nhi_memaddr_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int erro= r) > > +{ > > + bus_addr_t *addr; > > + > > + addr =3D arg; > > + if (error =3D=3D 0 && nsegs =3D=3D 1) { > > + *addr =3D segs[0].ds_addr; > > + } else > > + *addr =3D 0; > > +} > > + > > +static int > > +nhi_alloc_ring(struct nhi_softc *sc, int ringnum, int tx_depth, int > rx_depth, > > + struct nhi_ring_pair **rp) > > +{ > > + bus_dma_template_t t; > > + bus_addr_t ring_busaddr; > > + struct nhi_ring_pair *r; > > + int ring_size, error; > > + u_int rxring_len, txring_len; > > + char *ring; > > + > > + if (ringnum >=3D sc->max_ring_count) { > > + tb_debug(sc, DBG_INIT, "Tried to allocate ring number > %d\n", > > + ringnum); > > + return (EINVAL); > > + } > > + > > + /* Allocate the ring structure and the RX ring tacker together. > */ > > + rxring_len =3D rx_depth * sizeof(void *); > > + txring_len =3D tx_depth * sizeof(void *); > > + r =3D malloc(sizeof(struct nhi_ring_pair) + rxring_len + > txring_len, > > + M_NHI, M_NOWAIT|M_ZERO); > > + if (r =3D=3D NULL) { > > + tb_printf(sc, "ERROR: Cannot allocate ring memory\n"); > > + return (ENOMEM); > > + } > > + > > + r->sc =3D sc; > > + TAILQ_INIT(&r->tx_head); > > + TAILQ_INIT(&r->rx_head); > > + r->ring_num =3D ringnum; > > + r->tx_ring_depth =3D tx_depth; > > + r->tx_ring_mask =3D tx_depth - 1; > > + r->rx_ring_depth =3D rx_depth; > > + r->rx_ring_mask =3D rx_depth - 1; > > + r->rx_pici_reg =3D NHI_RX_RING_PICI + ringnum * 16; > > + r->tx_pici_reg =3D NHI_TX_RING_PICI + ringnum * 16; > > + r->rx_cmd_ring =3D (struct nhi_cmd_frame **)((uint8_t *)r + siz= eof > (*r)); > > + r->tx_cmd_ring =3D (struct nhi_cmd_frame **)((uint8_t > *)r->rx_cmd_ring + > > + rxring_len); > > + > > + snprintf(r->name, NHI_RING_NAMELEN, "nhiring%d\n", ringnum); > > + mtx_init(&r->mtx, r->name, "NHI Ring Lock", MTX_DEF); > > + tb_debug(sc, DBG_INIT | DBG_FULL, "Allocated ring context at %p= , > " > > + "mutex %p\n", r, &r->mtx); > > + > > + /* Allocate the RX and TX buffer descriptor rings */ > > + ring_size =3D sizeof(struct nhi_tx_buffer_desc) * r->tx_ring_de= pth; > > + ring_size +=3D sizeof(struct nhi_rx_buffer_desc) * > r->rx_ring_depth; > > + tb_debug(sc, DBG_INIT | DBG_FULL, "Ring %d ring_size=3D %d\n", > > + ringnum, ring_size); > > + > > + bus_dma_template_init(&t, sc->parent_dmat); > > + t.alignment =3D 4; > > + t.maxsize =3D t.maxsegsize =3D ring_size; > > + t.nsegments =3D 1; > > + if ((error =3D bus_dma_template_tag(&t, &r->ring_dmat)) !=3D 0)= { > > + tb_printf(sc, "Cannot allocate ring %d DMA tag: %d\n", > > + ringnum, error); > > + return (ENOMEM); > > + } > > + if (bus_dmamem_alloc(r->ring_dmat, (void **)&ring, > BUS_DMA_NOWAIT, > > + &r->ring_map)) { > > + tb_printf(sc, "Cannot allocate ring memory\n"); > > + return (ENOMEM); > > + } > > + bzero(ring, ring_size); > > + bus_dmamap_load(r->ring_dmat, r->ring_map, ring, ring_size, > > + nhi_memaddr_cb, &ring_busaddr, 0); > > + > > + r->ring =3D ring; > > + > > + r->tx_ring =3D (union nhi_ring_desc *)(ring); > > + r->tx_ring_busaddr =3D ring_busaddr; > > + ring +=3D sizeof(struct nhi_tx_buffer_desc) * r->tx_ring_depth; > > + ring_busaddr +=3D sizeof(struct nhi_tx_buffer_desc) * > r->tx_ring_depth; > > + > > + r->rx_ring =3D (union nhi_ring_desc *)(ring); > > + r->rx_ring_busaddr =3D ring_busaddr; > > + > > + tb_debug(sc, DBG_INIT | DBG_EXTRA, "Ring %d: RX %p [0x%jx] " > > + "TX %p [0x%jx]\n", ringnum, r->tx_ring, r->tx_ring_busaddr, > > + r->rx_ring, r->rx_ring_busaddr); > > + > > + *rp =3D r; > > + return (0); > > +} > > + > > +static void > > +nhi_free_ring(struct nhi_ring_pair *r) > > +{ > > + > > + tb_debug(r->sc, DBG_INIT, "Freeing ring %d resources\n", > r->ring_num); > > + nhi_deactivate_ring(r); > > + > > + if (r->tx_ring_busaddr !=3D 0) { > > + bus_dmamap_unload(r->ring_dmat, r->ring_map); > > + r->tx_ring_busaddr =3D 0; > > + } > > + if (r->ring !=3D NULL) { > > + bus_dmamem_free(r->ring_dmat, r->ring, r->ring_map); > > + r->ring =3D NULL; > > + } > > + if (r->ring_dmat !=3D NULL) { > > + bus_dma_tag_destroy(r->ring_dmat); > > + r->ring_dmat =3D NULL; > > + } > > + mtx_destroy(&r->mtx); > > +} > > + > > +static void > > +nhi_free_rings(struct nhi_softc *sc) > > +{ > > + struct nhi_ring_pair *r; > > + > > + while ((r =3D SLIST_FIRST(&sc->ring_list)) !=3D NULL) { > > + nhi_free_ring(r); > > + mtx_lock(&sc->nhi_mtx); > > + SLIST_REMOVE_HEAD(&sc->ring_list, ring_link); > > + mtx_unlock(&sc->nhi_mtx); > > + free(r, M_NHI); > > + } > > + > > + return; > > +} > > + > > +static int > > +nhi_configure_ring(struct nhi_softc *sc, struct nhi_ring_pair *ring) > > +{ > > + bus_addr_t busaddr; > > + uint32_t val; > > + int idx; > > + > > + idx =3D ring->ring_num * 16; > > + > > + /* Program the TX ring address and size */ > > + busaddr =3D ring->tx_ring_busaddr; > > + nhi_write_reg(sc, NHI_TX_RING_ADDR_LO + idx, busaddr & > 0xffffffff); > > + nhi_write_reg(sc, NHI_TX_RING_ADDR_HI + idx, busaddr >> 32); > > + nhi_write_reg(sc, NHI_TX_RING_SIZE + idx, ring->tx_ring_depth); > > + nhi_write_reg(sc, NHI_TX_RING_TABLE_TIMESTAMP + idx, 0x0); > > + tb_debug(sc, DBG_INIT, "TX Ring %d TX_RING_SIZE=3D 0x%x\n", > > + ring->ring_num, ring->tx_ring_depth); > > + > > + /* Program the RX ring address and size */ > > + busaddr =3D ring->rx_ring_busaddr; > > + val =3D (ring->rx_buffer_size << 16) | ring->rx_ring_depth; > > + nhi_write_reg(sc, NHI_RX_RING_ADDR_LO + idx, busaddr & > 0xffffffff); > > + nhi_write_reg(sc, NHI_RX_RING_ADDR_HI + idx, busaddr >> 32); > > + nhi_write_reg(sc, NHI_RX_RING_SIZE + idx, val); > > + nhi_write_reg(sc, NHI_RX_RING_TABLE_BASE1 + idx, 0xffffffff); > > + tb_debug(sc, DBG_INIT, "RX Ring %d RX_RING_SIZE=3D 0x%x\n", > > + ring->ring_num, val); > > + > > + return (0); > > +} > > + > > +static int > > +nhi_activate_ring(struct nhi_ring_pair *ring) > > +{ > > + struct nhi_softc *sc =3D ring->sc; > > + int idx; > > + > > + nhi_pci_enable_interrupt(ring); > > + > > + idx =3D ring->ring_num * 32; > > + tb_debug(sc, DBG_INIT, "Activating ring %d at idx %d\n", > > + ring->ring_num, idx); > > + nhi_write_reg(sc, NHI_TX_RING_TABLE_BASE0 + idx, > > + TX_TABLE_RAW | TX_TABLE_VALID); > > + nhi_write_reg(sc, NHI_RX_RING_TABLE_BASE0 + idx, > > + RX_TABLE_RAW | RX_TABLE_VALID); > > + > > + return (0); > > +} > > + > > +static int > > +nhi_deactivate_ring(struct nhi_ring_pair *r) > > +{ > > + struct nhi_softc *sc =3D r->sc; > > + int idx; > > + > > + idx =3D r->ring_num * 32; > > + tb_debug(sc, DBG_INIT, "Deactiving ring %d at idx %d\n", > > + r->ring_num, idx); > > + nhi_write_reg(sc, NHI_TX_RING_TABLE_BASE0 + idx, 0); > > + nhi_write_reg(sc, NHI_RX_RING_TABLE_BASE0 + idx, 0); > > + > > + idx =3D r->ring_num * 16; > > + tb_debug(sc, DBG_INIT, "Setting ring %d sizes to 0\n", > r->ring_num); > > + nhi_write_reg(sc, NHI_TX_RING_SIZE + idx, 0); > > + nhi_write_reg(sc, NHI_RX_RING_SIZE + idx, 0); > > + > > + return (0); > > +} > > + > > +static int > > +nhi_alloc_ring0(struct nhi_softc *sc) > > +{ > > + bus_addr_t frames_busaddr; > > + bus_dma_template_t t; > > + struct nhi_intr_tracker *trkr; > > + struct nhi_ring_pair *r; > > + struct nhi_cmd_frame *cmd; > > + char *frames; > > + int error, size, i; > > + > > + if ((error =3D nhi_alloc_ring(sc, 0, NHI_RING0_TX_DEPTH, > > + NHI_RING0_RX_DEPTH, &r)) !=3D 0) { > > + tb_printf(sc, "Error allocating control ring\n"); > > + return (error); > > + } > > + > > + r->rx_buffer_size =3D NHI_RING0_FRAME_SIZE;/* Control packets a= re > small */ > > + > > + /* Allocate the RX and TX buffers that are used for Ring0 comms > */ > > + size =3D r->tx_ring_depth * NHI_RING0_FRAME_SIZE; > > + size +=3D r->rx_ring_depth * NHI_RING0_FRAME_SIZE; > > + > > + bus_dma_template_init(&t, sc->parent_dmat); > > + t.maxsize =3D t.maxsegsize =3D size; > > + t.nsegments =3D 1; > > + if (bus_dma_template_tag(&t, &sc->ring0_dmat)) { > > + tb_printf(sc, "Error allocating control ring buffer > tag\n"); > > + return (ENOMEM); > > + } > > + > > + if (bus_dmamem_alloc(sc->ring0_dmat, (void **)&frames, > BUS_DMA_NOWAIT, > > + &sc->ring0_map) !=3D 0) { > > + tb_printf(sc, "Error allocating control ring memory\n")= ; > > + return (ENOMEM); > > + } > > + bzero(frames, size); > > + bus_dmamap_load(sc->ring0_dmat, sc->ring0_map, frames, size, > > + nhi_memaddr_cb, &frames_busaddr, 0); > > + sc->ring0_frames_busaddr =3D frames_busaddr; > > + sc->ring0_frames =3D frames; > > + > > + /* Allocate the driver command trackers */ > > + sc->ring0_cmds =3D malloc(sizeof(struct nhi_cmd_frame) * > > + (r->tx_ring_depth + r->rx_ring_depth), M_NHI, M_NOWAIT | > M_ZERO); > > + if (sc->ring0_cmds =3D=3D NULL) > > + return (ENOMEM); > > + > > + /* Initialize the RX frames so they can be used */ > > + mtx_lock(&r->mtx); > > + for (i =3D 0; i < r->rx_ring_depth; i++) { > > + cmd =3D &sc->ring0_cmds[i]; > > + cmd->data =3D (uint32_t *)(frames + NHI_RING0_FRAME_SIZ= E * > i); > > + cmd->data_busaddr =3D frames_busaddr + > NHI_RING0_FRAME_SIZE * i; > > + cmd->flags =3D CMD_MAPPED; > > + cmd->idx =3D i; > > + TAILQ_INSERT_TAIL(&r->rx_head, cmd, cm_link); > > + } > > + > > + /* Inititalize the TX frames */ > > + for ( ; i < r->tx_ring_depth + r->rx_ring_depth - 1; i++) { > > + cmd =3D &sc->ring0_cmds[i]; > > + cmd->data =3D (uint32_t *)(frames + NHI_RING0_FRAME_SIZ= E * > i); > > + cmd->data_busaddr =3D frames_busaddr + > NHI_RING0_FRAME_SIZE * i; > > + cmd->flags =3D CMD_MAPPED; > > + cmd->idx =3D i; > > + nhi_free_tx_frame_locked(r, cmd); > > + } > > + mtx_unlock(&r->mtx); > > + > > + /* Do a 1:1 mapping of rings to interrupt vectors. */ > > + /* XXX Should be abstracted */ > > + trkr =3D &sc->intr_trackers[0]; > > + trkr->ring =3D r; > > + r->tracker =3D trkr; > > + > > + /* XXX Should be an array */ > > + sc->ring0 =3D r; > > + SLIST_INSERT_HEAD(&sc->ring_list, r, ring_link); > > + > > + return (0); > > +} > > + > > +static void > > +nhi_free_ring0(struct nhi_softc *sc) > > +{ > > + if (sc->ring0_cmds !=3D NULL) { > > + free(sc->ring0_cmds, M_NHI); > > + sc->ring0_cmds =3D NULL; > > + } > > + > > + if (sc->ring0_frames_busaddr !=3D 0) { > > + bus_dmamap_unload(sc->ring0_dmat, sc->ring0_map); > > + sc->ring0_frames_busaddr =3D 0; > > *** 5529 LINES SKIPPED *** > > > > -- > Wolfram Schneider https://wolfram.schneider.org > > --=20 Nuno Teixeira FreeBSD UNIX: Web: https://FreeBSD.org --00000000000085e79c0640338477 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
yep, seing that symlink too.

Wolfram = Schneider <wosch@freebsd.org>= ; escreveu (ter=C3=A7a, 30/09/2025 =C3=A0(s) 07:44):
I'm now getting a stale symlink:
./tools/build/stale-symlink-buildworld.sh
stale symlink detected: lrwxrwxr-x=C2=A0 1 wosch wheel 91 Sep 29 22:14
/var/tmp/freebsd-obj-wosch/home/projects/freebsd-src/amd64.amd64/sys/GENERI= C/modules/home/projects/freebsd-src/sys/modules/thunderbolt/opt_acpi_wmi.h<= br> -> /var/tmp/freebsd-obj-wosch/home/projects/freebsd-src/amd64.amd64/sys/= GENERIC/opt_acpi_wmi.h

the only reference to the file "opt_acpi_wmi.h" is in the Makefil= e

sys/modules/thunderbolt/Makefile:SRCS+=3D opt_acpi.h opt_acpi_wmi.h
acpi_if.h acpi_wmi_if.h

What is this file supposed to do, where does it come from?

-Wolfram

On Sat, 27 Sept 2025 at 19:13, Aymeric Wibo <obiwac@freebsd.org> wrote:
>
> The branch main has been updated by obiwac:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3D2ed9833791f28e14843ac813f90cb030e45948dc<= /a>
>
> commit 2ed9833791f28e14843ac813f90cb030e45948dc
> Author:=C2=A0 =C2=A0 =C2=A0Aymeric Wibo <obiwac@FreeBSD.org>
> AuthorDate: 2025-09-27 11:50:43 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Aymeric Wibo <obiwac@FreeBSD.org>
> CommitDate: 2025-09-27 17:13:13 +0000
>
>=C2=A0 =C2=A0 =C2=A0thunderbolt: Import USB4 code
>
>=C2=A0 =C2=A0 =C2=A0Add initial USB4 code written by Scott Long and ori= ginally passed on to
>=C2=A0 =C2=A0 =C2=A0HPS (source:
https://github.com/hselasky/usb= 4), minus the ICM code and
>=C2=A0 =C2=A0 =C2=A0with some small fixes.
>
>=C2=A0 =C2=A0 =C2=A0For context, older TB chips implemented the connect= ion manager in
>=C2=A0 =C2=A0 =C2=A0firmware (ICM) instead of in the OS (HCM), but main= taining the ICM code
>=C2=A0 =C2=A0 =C2=A0would be a huge burden for not many chips.
>
>=C2=A0 =C2=A0 =C2=A0Mostly completed work:
>
>=C2=A0 =C2=A0 =C2=A0- Debug/trace framework.
>=C2=A0 =C2=A0 =C2=A0- NHI controller driver.
>=C2=A0 =C2=A0 =C2=A0- PCIe bridge driver.
>=C2=A0 =C2=A0 =C2=A0- Router and config space layer handling (just read= ing in this commit).
>
>=C2=A0 =C2=A0 =C2=A0Link to the email where Scott shared details about = the initial USB4
>=C2=A0 =C2=A0 =C2=A0work:
>
>=C2=A0 =C2=A0 =C2=A0http= s://lists.freebsd.org/archives/freebsd-hackers/2024-July/003411.html >
>=C2=A0 =C2=A0 =C2=A0Glanced at by:=C2=A0 emaste, imp
>=C2=A0 =C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0The FreeBSD Foundation >=C2=A0 =C2=A0 =C2=A0Differential Revision:=C2=A0 https://revie= ws.freebsd.org/D49450
>=C2=A0 =C2=A0 =C2=A0Event:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 EuroBSDcon= 2025
> ---
>=C2=A0 sys/dev/thunderbolt/hcm.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2= =A0 223 +++++++
>=C2=A0 sys/dev/thunderbolt/hcm_var.h=C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A0= 47 ++
>=C2=A0 sys/dev/thunderbolt/nhi.c=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | 11= 70 ++++++++++++++++++++++++++++++++++++
>=C2=A0 sys/dev/thunderbolt/nhi_pci.c=C2=A0 =C2=A0 =C2=A0 |=C2=A0 529 ++= ++++++++++++++
>=C2=A0 sys/dev/thunderbolt/nhi_reg.h=C2=A0 =C2=A0 =C2=A0 |=C2=A0 332 ++= ++++++++
>=C2=A0 sys/dev/thunderbolt/nhi_var.h=C2=A0 =C2=A0 =C2=A0 |=C2=A0 277 ++= +++++++
>=C2=A0 sys/dev/thunderbolt/nhi_wmi.c=C2=A0 =C2=A0 =C2=A0 |=C2=A0 198 ++= ++++
>=C2=A0 sys/dev/thunderbolt/router.c=C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 9= 39 +++++++++++++++++++++++++++++
>=C2=A0 sys/dev/thunderbolt/router_var.h=C2=A0 =C2=A0|=C2=A0 242 +++++++= +
>=C2=A0 sys/dev/thunderbolt/tb_acpi_pcib.c |=C2=A0 181 ++++++
>=C2=A0 sys/dev/thunderbolt/tb_debug.c=C2=A0 =C2=A0 =C2=A0|=C2=A0 334 ++= ++++++++
>=C2=A0 sys/dev/thunderbolt/tb_debug.h=C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0= 93 +++
>=C2=A0 sys/dev/thunderbolt/tb_dev.c=C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 3= 31 ++++++++++
>=C2=A0 sys/dev/thunderbolt/tb_dev.h=C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 = =C2=A041 ++
>=C2=A0 sys/dev/thunderbolt/tb_if.m=C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 1= 21 ++++
>=C2=A0 sys/dev/thunderbolt/tb_ioctl.h=C2=A0 =C2=A0 =C2=A0|=C2=A0 =C2=A0= 52 ++
>=C2=A0 sys/dev/thunderbolt/tb_pcib.c=C2=A0 =C2=A0 =C2=A0 |=C2=A0 614 ++= +++++++++++++++++
>=C2=A0 sys/dev/thunderbolt/tb_pcib.h=C2=A0 =C2=A0 =C2=A0 |=C2=A0 =C2=A0= 93 +++
>=C2=A0 sys/dev/thunderbolt/tb_reg.h=C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 = =C2=A052 ++
>=C2=A0 sys/dev/thunderbolt/tb_var.h=C2=A0 =C2=A0 =C2=A0 =C2=A0|=C2=A0 = =C2=A054 ++
>=C2=A0 sys/dev/thunderbolt/tbcfg_reg.h=C2=A0 =C2=A0 |=C2=A0 363 +++++++= ++++
>=C2=A0 sys/modules/Makefile=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0|=C2=A0 =C2=A0 5 +
>=C2=A0 sys/modules/thunderbolt/Makefile=C2=A0 =C2=A0|=C2=A0 =C2=A013 +<= br> >=C2=A0 23 files changed, 6304 insertions(+)
>
> diff --git a/sys/dev/thunderbolt/hcm.c b/sys/dev/thunderbolt/hcm.c
> new file mode 100644
> index 000000000000..b8f703fc3b52
> --- /dev/null
> +++ b/sys/dev/thunderbolt/hcm.c
> @@ -0,0 +1,223 @@
> +/*-
> + * SPDX-License-Identifier: BSD-2-Clause
> + *
> + * Copyright (c) 2022 Scott Long
> + * All rights reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without=
> + * modification, are permitted provided that the following conditions=
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright<= br> > + *=C2=A0 =C2=A0 notice, this list of conditions and the following dis= claimer.
> + * 2. Redistributions in binary form must reproduce the above copyrig= ht
> + *=C2=A0 =C2=A0 notice, this list of conditions and the following dis= claimer in the
> + *=C2=A0 =C2=A0 documentation and/or other materials provided with th= e distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS&#= 39;' AND
> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, = THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR= PURPOSE
> + * ARE DISCLAIMED.=C2=A0 IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS= BE LIABLE
> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSE= QUENTIAL
> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE = GOODS
> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTI= ON)
> + * 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 POSSIBILIT= Y OF
> + * SUCH DAMAGE.
> + */
> +
> +#include "opt_thunderbolt.h"
> +
> +/* Host Configuration Manager (HCM) for USB4 and later TB3 */
> +#include <sys/types.h>
> +#include <sys/param.h>
> +#include <sys/systm.h>
> +#include <sys/kernel.h>
> +#include <sys/module.h>
> +#include <sys/bus.h>
> +#include <sys/conf.h>
> +#include <sys/malloc.h>
> +#include <sys/queue.h>
> +#include <sys/sysctl.h>
> +#include <sys/lock.h>
> +#include <sys/mutex.h>
> +#include <sys/taskqueue.h>
> +#include <sys/gsb_crc32.h>
> +#include <sys/endian.h>
> +#include <vm/vm.h>
> +#include <vm/pmap.h>
> +
> +#include <machine/bus.h>
> +#include <machine/stdarg.h>
> +
> +#include <dev/thunderbolt/nhi_reg.h>
> +#include <dev/thunderbolt/nhi_var.h>
> +#include <dev/thunderbolt/tb_reg.h>
> +#include <dev/thunderbolt/tb_var.h>
> +#include <dev/thunderbolt/tb_debug.h>
> +#include <dev/thunderbolt/tbcfg_reg.h>
> +#include <dev/thunderbolt/router_var.h>
> +#include <dev/thunderbolt/hcm_var.h>
> +
> +static void hcm_cfg_task(void *, int);
> +
> +int
> +hcm_attach(struct nhi_softc *nsc)
> +{
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0struct hcm_softc *hcm;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0tb_debug(nsc, DBG_HCM|DBG_EXTRA, "hcm= _attach called\n");
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0hcm =3D malloc(sizeof(struct hcm_softc), M= _THUNDERBOLT, M_NOWAIT|M_ZERO);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (hcm =3D=3D NULL) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tb_debug(nsc, = DBG_HCM, "Cannot allocate hcm object\n");
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (ENOMEM= );
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0hcm->dev =3D nsc->dev;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0hcm->nsc =3D nsc;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0nsc->hcm =3D hcm;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0hcm->taskqueue =3D taskqueue_create(&qu= ot;hcm_event", M_NOWAIT,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0taskqueue_thread_enqueue, &a= mp;hcm->taskqueue);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (hcm->taskqueue =3D=3D NULL)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (ENOMEM= );
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0taskqueue_start_threads(&hcm->taskq= ueue, 1, PI_DISK, "tbhcm%d_tq",
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0device_get_unit(nsc->dev)= );
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0TASK_INIT(&hcm->cfg_task, 0, hcm_cf= g_task, hcm);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0return (0);
> +}
> +
> +int
> +hcm_detach(struct nhi_softc *nsc)
> +{
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0struct hcm_softc *hcm;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0hcm =3D nsc->hcm;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (hcm->taskqueue)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0taskqueue_free= (hcm->taskqueue);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0return (0);
> +}
> +
> +int
> +hcm_router_discover(struct hcm_softc *hcm)
> +{
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0taskqueue_enqueue(hcm->taskqueue, &= hcm->cfg_task);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0return (0);
> +}
> +
> +static void
> +hcm_cfg_task(void *arg, int pending)
> +{
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0struct hcm_softc *hcm;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0struct router_softc *rsc;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0struct router_cfg_cap cap;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0struct tb_cfg_router *cfg;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0struct tb_cfg_adapter *adp;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0struct tb_cfg_cap_lane *lane;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0uint32_t *buf;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0uint8_t *u;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0u_int error, i, offset;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0hcm =3D (struct hcm_softc *)arg;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0tb_debug(hcm, DBG_HCM|DBG_EXTRA, "hcm= _cfg_task called\n");
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0buf =3D malloc(8 * 4, M_THUNDERBOLT, M_NOW= AIT|M_ZERO);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (buf =3D=3D NULL) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tb_debug(hcm, = DBG_HCM, "Cannot alloc memory for discovery\n");
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0rsc =3D hcm->nsc->root_rsc;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0error =3D tb_config_router_read(rsc, 0, 5,= buf);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (error !=3D 0) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0free(buf, M_NH= I);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0cfg =3D (struct tb_cfg_router *)buf;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0cap.space =3D TB_CFG_CS_ROUTER;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0cap.adap =3D 0;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0cap.next_cap =3D GET_ROUTER_CS_NEXT_CAP(cf= g);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0while (cap.next_cap !=3D 0) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0error =3D tb_c= onfig_next_cap(rsc, &cap);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (error !=3D= 0)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0break;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((cap.cap_i= d =3D=3D TB_CFG_CAP_VSEC) && (cap.vsc_len =3D=3D 0)) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0tb_debug(hcm, DBG_HCM, "Router Cap=3D %d, vsec=3D %d, &q= uot;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0"len=3D %d, next_cap=3D %d\n", cap.ca= p_id,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0cap.vsc_id, cap.vsec_len, cap.next_cap);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0} else if (cap= .cap_id =3D=3D TB_CFG_CAP_VSC) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0tb_debug(hcm, DBG_HCM, "Router cap=3D %d, vsc=3D %d, &qu= ot;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0"len=3D %d, next_cap=3D %d\n", cap.ca= p_id,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0cap.vsc_id, cap.vsc_len, cap.next_cap);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0} else
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0tb_debug(hcm, DBG_HCM, "Router cap=3D %d, "
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0"next_cap=3D %d\n", cap.cap_id, cap.n= ext_cap);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (cap.next_c= ap > TB_CFG_CAP_OFFSET_MAX)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0cap.next_cap =3D 0;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0u =3D (uint8_t *)buf;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0error =3D tb_config_get_lc_uuid(rsc, u); > +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (error =3D=3D 0) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tb_debug(hcm, = DBG_HCM, "Router LC UUID: %02x%02x%02x%02x-"
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= "%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\n",
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= u[0], u[1], u[2], u[3], u[4], u[5], u[6], u[7], u[8],
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= u[9], u[10], u[11], u[12], u[13], u[14], u[15]);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0} else
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tb_printf(hcm,= "Error finding LC registers: %d\n", error);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0for (i =3D 1; i <=3D rsc->max_adap; = i++) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0error =3D tb_c= onfig_adapter_read(rsc, i, 0, 8, buf);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (error !=3D= 0) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0tb_debug(hcm, DBG_HCM, "Adapter %d: no adapter\n", = i);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0continue;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0adp =3D (struc= t tb_cfg_adapter *)buf;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tb_debug(hcm, = DBG_HCM, "Adapter %d: %s, max_counters=3D 0x%08x,"
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= " adapter_num=3D %d\n", i,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= tb_get_string(GET_ADP_CS_TYPE(adp), tb_adapter_type),
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= GET_ADP_CS_MAX_COUNTERS(adp), GET_ADP_CS_ADP_NUM(adp));
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (GET_ADP_CS= _TYPE(adp) !=3D ADP_CS2_LANE)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0continue;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0error =3D tb_c= onfig_find_adapter_cap(rsc, i, TB_CFG_CAP_LANE,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= &offset);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (error)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0continue;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0error =3D tb_c= onfig_adapter_read(rsc, i, offset, 3, buf);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (error)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0continue;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0lane =3D (stru= ct tb_cfg_cap_lane *)buf;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tb_debug(hcm, = DBG_HCM, "Lane Adapter State=3D %s %s\n",
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= tb_get_string((lane->current_lws & CAP_LANE_STATE_MASK),
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= tb_adapter_state), (lane->targ_lwp & CAP_LANE_DISABLE) ?
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= "disabled" : "enabled");
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((lane->= current_lws & CAP_LANE_STATE_MASK) =3D=3D
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= CAP_LANE_STATE_CL0) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0tb_route_t newr;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0newr.hi =3D rsc->route.hi;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0newr.lo =3D rsc->route.lo | (i << rsc->depth * 8)= ;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0tb_printf(hcm, "want to add router at 0x%08x%08x\n"= ,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0newr.hi, newr.lo);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0error =3D tb_router_attach(rsc, newr);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0tb_printf(rsc, "tb_router_attach returned %d\n", er= ror);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0free(buf, M_THUNDERBOLT);
> +}
> diff --git a/sys/dev/thunderbolt/hcm_var.h b/sys/dev/thunderbolt/hcm_v= ar.h
> new file mode 100644
> index 000000000000..a11c8e9b6a92
> --- /dev/null
> +++ b/sys/dev/thunderbolt/hcm_var.h
> @@ -0,0 +1,47 @@
> +/*-
> + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
> + *
> + * Copyright (c) 2022 Scott Long
> + * All rights reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without=
> + * modification, are permitted provided that the following conditions=
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright<= br> > + *=C2=A0 =C2=A0 notice, this list of conditions and the following dis= claimer.
> + * 2. Redistributions in binary form must reproduce the above copyrig= ht
> + *=C2=A0 =C2=A0 notice, this list of conditions and the following dis= claimer in the
> + *=C2=A0 =C2=A0 documentation and/or other materials provided with th= e distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS&#= 39;' AND
> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, = THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR= PURPOSE
> + * ARE DISCLAIMED.=C2=A0 IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS= BE LIABLE
> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSE= QUENTIAL
> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE = GOODS
> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTI= ON)
> + * 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 POSSIBILIT= Y OF
> + * SUCH DAMAGE.
> + *
> + * $FreeBSD$
> + */
> +
> +#ifndef _HCM_VAR_H
> +#define _HCM_VAR_H
> +
> +struct hcm_softc {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0u_int=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0debug;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0device_t=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 dev;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0struct nhi_softc=C2=A0 =C2=A0 =C2=A0 =C2= =A0 *nsc;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0struct task=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0cfg_task;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0struct taskqueue=C2=A0 =C2=A0 =C2=A0 =C2= =A0 *taskqueue;
> +};
> +
> +int hcm_attach(struct nhi_softc *);
> +int hcm_detach(struct nhi_softc *);
> +int hcm_router_discover(struct hcm_softc *);
> +
> +#endif /* _HCM_VAR_H */
> diff --git a/sys/dev/thunderbolt/nhi.c b/sys/dev/thunderbolt/nhi.c
> new file mode 100644
> index 000000000000..205e69c16253
> --- /dev/null
> +++ b/sys/dev/thunderbolt/nhi.c
> @@ -0,0 +1,1170 @@
> +/*-
> + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
> + *
> + * Copyright (c) 2022 Scott Long
> + * All rights reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without=
> + * modification, are permitted provided that the following conditions=
> + * are met:
> + * 1. Redistributions of source code must retain the above copyright<= br> > + *=C2=A0 =C2=A0 notice, this list of conditions and the following dis= claimer.
> + * 2. Redistributions in binary form must reproduce the above copyrig= ht
> + *=C2=A0 =C2=A0 notice, this list of conditions and the following dis= claimer in the
> + *=C2=A0 =C2=A0 documentation and/or other materials provided with th= e distribution.
> + *
> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS&#= 39;' AND
> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, = THE
> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR= PURPOSE
> + * ARE DISCLAIMED.=C2=A0 IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS= BE LIABLE
> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSE= QUENTIAL
> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE = GOODS
> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTI= ON)
> + * 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 POSSIBILIT= Y OF
> + * SUCH DAMAGE.
> + */
> +
> +#include "opt_thunderbolt.h"
> +
> +/* PCIe interface for Thunderbolt Native Host Interface (nhi) */
> +#include <sys/types.h>
> +#include <sys/param.h>
> +#include <sys/systm.h>
> +#include <sys/kernel.h>
> +#include <sys/module.h>
> +#include <sys/bus.h>
> +#include <sys/conf.h>
> +#include <sys/malloc.h>
> +#include <sys/queue.h>
> +#include <sys/sysctl.h>
> +#include <sys/lock.h>
> +#include <sys/mutex.h>
> +#include <sys/taskqueue.h>
> +#include <sys/gsb_crc32.h>
> +#include <sys/endian.h>
> +#include <vm/vm.h>
> +#include <vm/pmap.h>
> +
> +#include <machine/bus.h>
> +#include <machine/stdarg.h>
> +
> +#include <dev/thunderbolt/nhi_reg.h>
> +#include <dev/thunderbolt/nhi_var.h>
> +#include <dev/thunderbolt/tb_reg.h>
> +#include <dev/thunderbolt/tb_var.h>
> +#include <dev/thunderbolt/tb_debug.h>
> +#include <dev/thunderbolt/hcm_var.h>
> +#include <dev/thunderbolt/tbcfg_reg.h>
> +#include <dev/thunderbolt/router_var.h>
> +#include <dev/thunderbolt/tb_dev.h>
> +#include "tb_if.h"
> +
> +static int nhi_alloc_ring(struct nhi_softc *, int, int, int,
> +=C2=A0 =C2=A0 struct nhi_ring_pair **);
> +static void nhi_free_ring(struct nhi_ring_pair *);
> +static void nhi_free_rings(struct nhi_softc *);
> +static int nhi_configure_ring(struct nhi_softc *, struct nhi_ring_pai= r *);
> +static int nhi_activate_ring(struct nhi_ring_pair *);
> +static int nhi_deactivate_ring(struct nhi_ring_pair *);
> +static int nhi_alloc_ring0(struct nhi_softc *);
> +static void nhi_free_ring0(struct nhi_softc *);
> +static void nhi_fill_rx_ring(struct nhi_softc *, struct nhi_ring_pair= *);
> +static int nhi_init(struct nhi_softc *);
> +static void nhi_post_init(void *);
> +static int nhi_tx_enqueue(struct nhi_ring_pair *, struct nhi_cmd_fram= e *);
> +static int nhi_setup_sysctl(struct nhi_softc *);
> +
> +SYSCTL_NODE(_hw, OID_AUTO, nhi, CTLFLAG_RD, 0, "NHI Driver Param= eters");
> +
> +MALLOC_DEFINE(M_NHI, "nhi", "nhi driver memory");=
> +
> +#ifndef NHI_DEBUG_LEVEL
> +#define NHI_DEBUG_LEVEL 0
> +#endif
> +
> +/* 0 =3D default, 1 =3D force-on, 2 =3D force-off */
> +#ifndef NHI_FORCE_HCM
> +#define NHI_FORCE_HCM 0
> +#endif
> +
> +void
> +nhi_get_tunables(struct nhi_softc *sc)
> +{
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0devclass_t dc;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0device_t ufp;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0char=C2=A0 =C2=A0 tmpstr[80], oid[80];
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0u_int=C2=A0 =C2=A0val;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0/* Set local defaults */
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0sc->debug =3D NHI_DEBUG_LEVEL;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0sc->max_ring_count =3D NHI_DEFAULT_NUM_= RINGS;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0sc->force_hcm =3D NHI_FORCE_HCM;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0/* Inherit setting from the upstream thund= erbolt switch node */
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0val =3D TB_GET_DEBUG(sc->dev, &sc-&= gt;debug);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (val !=3D 0) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0dc =3D devclas= s_find("tbolt");
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (dc !=3D NU= LL) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0ufp =3D devclass_get_device(dc, device_get_unit(sc->dev));=
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0if (ufp !=3D NULL)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0TB_GET_DEBUG(ufp, &sc->deb= ug);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0} else {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0if (TUNABLE_STR_FETCH("hw.tbolt.debug_level", oid,<= br> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A080) !=3D 0)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tb_parse_debug(&sc->debug,= oid);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0/*
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 * Grab global variables.=C2=A0 Allow nhi = debug flags to override
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 * thunderbolt debug flags, if present. > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 */
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0bzero(oid, 80);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (TUNABLE_STR_FETCH("hw.nhi.debug_l= evel", oid, 80) !=3D 0)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tb_parse_debug= (&sc->debug, oid);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (TUNABLE_INT_FETCH("hw.nhi.max_rin= gs", &val) !=3D 0) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0val =3D min(va= l, NHI_MAX_NUM_RINGS);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sc->max_rin= g_count =3D max(val, 1);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (TUNABLE_INT_FETCH("hw.nhi.force_h= cm", &val) !=3D 0)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sc->force_h= cm =3D val;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0/* Grab instance variables */
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0bzero(oid, 80);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0snprintf(tmpstr, sizeof(tmpstr), "dev= .nhi.%d.debug_level",
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0device_get_unit(sc->dev))= ;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (TUNABLE_STR_FETCH(tmpstr, oid, 80) != =3D 0)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tb_parse_debug= (&sc->debug, oid);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0snprintf(tmpstr, sizeof(tmpstr), "dev= .nhi.%d.max_rings",
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0device_get_unit(sc->dev))= ;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (TUNABLE_INT_FETCH(tmpstr, &val) != =3D 0) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0val =3D min(va= l, NHI_MAX_NUM_RINGS);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sc->max_rin= g_count =3D max(val, 1);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0snprintf(tmpstr, sizeof(tmpstr), "dev= , nhi.%d.force_hcm",
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0device_get_unit(sc->dev))= ;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (TUNABLE_INT_FETCH(tmpstr, &val) != =3D 0)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sc->force_h= cm =3D val;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0return;
> +}
> +
> +static void
> +nhi_configure_caps(struct nhi_softc *sc)
> +{
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (NHI_IS_USB4(sc) || (sc->force_hcm = =3D=3D NHI_FORCE_HCM_ON))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sc->caps |= =3D NHI_CAP_HCM;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (sc->force_hcm =3D=3D NHI_FORCE_HCM_= OFF)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sc->caps &a= mp;=3D ~NHI_CAP_HCM;
> +}
> +
> +struct nhi_cmd_frame *
> +nhi_alloc_tx_frame(struct nhi_ring_pair *r)
> +{
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0struct nhi_cmd_frame *cmd;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0mtx_lock(&r->mtx);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0cmd =3D nhi_alloc_tx_frame_locked(r);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0mtx_unlock(&r->mtx);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0return (cmd);
> +}
> +
> +void
> +nhi_free_tx_frame(struct nhi_ring_pair *r, struct nhi_cmd_frame *cmd)=
> +{
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0mtx_lock(&r->mtx);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_free_tx_frame_locked(r, cmd);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0mtx_unlock(&r->mtx);
> +}
> +
> +/*
> + * Push a command and data dword through the mailbox to the firmware.=
> + * Response is either good, error, or timeout.=C2=A0 Commands that re= turn data
> + * do so by reading OUTMAILDATA.
> + */
> +int
> +nhi_inmail_cmd(struct nhi_softc *sc, uint32_t cmd, uint32_t data)
> +{
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0uint32_t val;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0u_int error, timeout;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0mtx_lock(&sc->nhi_mtx);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0/*
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 * XXX Should a defer/reschedule happen he= re, or is it not worth
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 * worrying about?
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 */
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (sc->hwflags & NHI_MBOX_BUSY) {<= br> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0mtx_unlock(&am= p;sc->nhi_mtx);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tb_debug(sc, D= BG_MBOX, "Driver busy with mailbox\n");
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (EBUSY)= ;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0sc->hwflags |=3D NHI_MBOX_BUSY;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0val =3D nhi_read_reg(sc, TBT_INMAILCMD); > +=C2=A0 =C2=A0 =C2=A0 =C2=A0tb_debug(sc, DBG_MBOX|DBG_FULL, "Read= ing INMAILCMD=3D 0x%08x\n", val);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (val & INMAILCMD_ERROR)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tb_debug(sc, D= BG_MBOX, "Error already set in INMAILCMD\n");
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (val & INMAILCMD_OPREQ) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0mtx_unlock(&am= p;sc->nhi_mtx);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tb_debug(sc, D= BG_MBOX,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= "INMAILCMD request already in progress\n");
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (EBUSY)= ;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_write_reg(sc, TBT_INMAILDATA, data); > +=C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_write_reg(sc, TBT_INMAILCMD, cmd | INM= AILCMD_OPREQ);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0/* Poll at 1s intervals */
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0timeout =3D NHI_MAILBOX_TIMEOUT;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0while (timeout--) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0DELAY(1000000)= ;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0val =3D nhi_re= ad_reg(sc, TBT_INMAILCMD);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tb_debug(sc, D= BG_MBOX|DBG_EXTRA,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= "Polling INMAILCMD=3D 0x%08x\n", val);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if ((val &= INMAILCMD_OPREQ) =3D=3D 0)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0break;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0sc->hwflags &=3D ~NHI_MBOX_BUSY; > +=C2=A0 =C2=A0 =C2=A0 =C2=A0mtx_unlock(&sc->nhi_mtx);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0error =3D 0;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (val & INMAILCMD_OPREQ) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tb_printf(sc, = "Timeout waiting for mailbox\n");
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0error =3D ETIM= EDOUT;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (val & INMAILCMD_ERROR) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tb_printf(sc, = "Firmware reports error in mailbox\n");
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0error =3D EINV= AL;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0return (error);
> +}
> +
> +/*
> + * Pull command status and data from the firmware mailbox.
> + */
> +int
> +nhi_outmail_cmd(struct nhi_softc *sc, uint32_t *val)
> +{
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (val =3D=3D NULL)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (EINVAL= );
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0*val =3D nhi_read_reg(sc, TBT_OUTMAILCMD);=
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0return (0);
> +}
> +
> +int
> +nhi_attach(struct nhi_softc *sc)
> +{
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0uint32_t val;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0int error =3D 0;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if ((error =3D nhi_setup_sysctl(sc)) !=3D = 0)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (error)= ;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0mtx_init(&sc->nhi_mtx, "nhimtx= ", "NHI Control Mutex", MTX_DEF);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_configure_caps(sc);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0/*
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 * Get the number of TX/RX paths.=C2=A0 Th= is sizes some of the register
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 * arrays during allocation and initializa= tion.=C2=A0 USB4 spec says that
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 * the max is 21.=C2=A0 Alpine Ridge appea= rs to default to 12.
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 */
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0val =3D GET_HOST_CAPS_PATHS(nhi_read_reg(s= c, NHI_HOST_CAPS));
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0tb_debug(sc, DBG_INIT|DBG_NOISY, "Tot= al Paths=3D %d\n", val);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if ((val =3D=3D 0) || (val > 21) || ((N= HI_IS_AR(sc) && val !=3D 12))) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tb_printf(sc, = "WARN: unexpected number of paths: %d\n", val);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* return (ENX= IO); */
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0sc->path_count =3D val;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0SLIST_INIT(&sc->ring_list);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0error =3D nhi_pci_configure_interrupts(sc)= ;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (error =3D=3D 0)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0error =3D nhi_= alloc_ring0(sc);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (error =3D=3D 0) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_configure_= ring(sc, sc->ring0);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_activate_r= ing(sc->ring0);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_fill_rx_ri= ng(sc, sc->ring0);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (error =3D=3D 0)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0error =3D tbde= v_add_interface(sc);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if ((error =3D=3D 0) && (NHI_USE_I= CM(sc)))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tb_printf(sc, = "WARN: device uses an internal connection manager\n");
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if ((error =3D=3D 0) && (NHI_USE_H= CM(sc)))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0error =3D hcm_attach(sc);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (error =3D=3D 0)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0error =3D nhi_= init(sc);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0return (error);
> +}
> +
> +int
> +nhi_detach(struct nhi_softc *sc)
> +{
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (NHI_USE_HCM(sc))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0hcm_detach(sc)= ;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (sc->root_rsc !=3D NULL)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tb_router_deta= ch(sc->root_rsc);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0tbdev_remove_interface(sc);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_pci_disable_interrupts(sc);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_free_ring0(sc);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0/* XXX Should the rings be marked as !VALI= D in the descriptors? */
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_free_rings(sc);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0mtx_destroy(&sc->nhi_mtx);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0return (0);
> +}
> +
> +static void
> +nhi_memaddr_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int err= or)
> +{
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0bus_addr_t *addr;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0addr =3D arg;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (error =3D=3D 0 && nsegs =3D=3D= 1) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*addr =3D segs= [0].ds_addr;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0} else
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*addr =3D 0; > +}
> +
> +static int
> +nhi_alloc_ring(struct nhi_softc *sc, int ringnum, int tx_depth, int r= x_depth,
> +=C2=A0 =C2=A0 struct nhi_ring_pair **rp)
> +{
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0bus_dma_template_t t;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0bus_addr_t ring_busaddr;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0struct nhi_ring_pair *r;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0int ring_size, error;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0u_int rxring_len, txring_len;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0char *ring;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (ringnum >=3D sc->max_ring_count)= {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tb_debug(sc, D= BG_INIT, "Tried to allocate ring number %d\n",
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= ringnum);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (EINVAL= );
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0/* Allocate the ring structure and the RX = ring tacker together. */
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0rxring_len =3D rx_depth * sizeof(void *);<= br> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0txring_len =3D tx_depth * sizeof(void *);<= br> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0r =3D malloc(sizeof(struct nhi_ring_pair) = + rxring_len + txring_len,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0M_NHI, M_NOWAIT|M_ZERO);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (r =3D=3D NULL) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tb_printf(sc, = "ERROR: Cannot allocate ring memory\n");
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (ENOMEM= );
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0r->sc =3D sc;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0TAILQ_INIT(&r->tx_head);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0TAILQ_INIT(&r->rx_head);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0r->ring_num =3D ringnum;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0r->tx_ring_depth =3D tx_depth;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0r->tx_ring_mask =3D tx_depth - 1;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0r->rx_ring_depth =3D rx_depth;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0r->rx_ring_mask =3D rx_depth - 1;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0r->rx_pici_reg =3D NHI_RX_RING_PICI + r= ingnum * 16;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0r->tx_pici_reg =3D NHI_TX_RING_PICI + r= ingnum * 16;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0r->rx_cmd_ring =3D (struct nhi_cmd_fram= e **)((uint8_t *)r + sizeof (*r));
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0r->tx_cmd_ring =3D (struct nhi_cmd_fram= e **)((uint8_t *)r->rx_cmd_ring +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0rxring_len);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0snprintf(r->name, NHI_RING_NAMELEN, &qu= ot;nhiring%d\n", ringnum);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0mtx_init(&r->mtx, r->name, "= ;NHI Ring Lock", MTX_DEF);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0tb_debug(sc, DBG_INIT | DBG_FULL, "Al= located ring context at %p, "
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"mutex %p\n", r, &= amp;r->mtx);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0/* Allocate the RX and TX buffer descripto= r rings */
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0ring_size =3D sizeof(struct nhi_tx_buffer_= desc) * r->tx_ring_depth;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0ring_size +=3D sizeof(struct nhi_rx_buffer= _desc) * r->rx_ring_depth;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0tb_debug(sc, DBG_INIT | DBG_FULL, "Ri= ng %d ring_size=3D %d\n",
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ringnum, ring_size);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0bus_dma_template_init(&t, sc->paren= t_dmat);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0t.alignment =3D 4;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0t.maxsize =3D t.maxsegsize =3D ring_size;<= br> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0t.nsegments =3D 1;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if ((error =3D bus_dma_template_tag(&t= , &r->ring_dmat)) !=3D 0) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tb_printf(sc, = "Cannot allocate ring %d DMA tag: %d\n",
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= ringnum, error);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (ENOMEM= );
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (bus_dmamem_alloc(r->ring_dmat, (voi= d **)&ring, BUS_DMA_NOWAIT,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&r->ring_map)) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tb_printf(sc, = "Cannot allocate ring memory\n");
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (ENOMEM= );
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0bzero(ring, ring_size);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0bus_dmamap_load(r->ring_dmat, r->rin= g_map, ring, ring_size,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_memaddr_cb, &ring_bu= saddr, 0);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0r->ring =3D ring;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0r->tx_ring =3D (union nhi_ring_desc *)(= ring);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0r->tx_ring_busaddr =3D ring_busaddr; > +=C2=A0 =C2=A0 =C2=A0 =C2=A0ring +=3D sizeof(struct nhi_tx_buffer_desc= ) * r->tx_ring_depth;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0ring_busaddr +=3D sizeof(struct nhi_tx_buf= fer_desc) * r->tx_ring_depth;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0r->rx_ring =3D (union nhi_ring_desc *)(= ring);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0r->rx_ring_busaddr =3D ring_busaddr; > +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0tb_debug(sc, DBG_INIT | DBG_EXTRA, "R= ing %d: RX %p [0x%jx] "
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"TX %p [0x%jx]\n",= ringnum, r->tx_ring, r->tx_ring_busaddr,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0r->rx_ring, r->rx_ring= _busaddr);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0*rp =3D r;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0return (0);
> +}
> +
> +static void
> +nhi_free_ring(struct nhi_ring_pair *r)
> +{
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0tb_debug(r->sc, DBG_INIT, "Freeing= ring %d resources\n", r->ring_num);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_deactivate_ring(r);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (r->tx_ring_busaddr !=3D 0) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bus_dmamap_unl= oad(r->ring_dmat, r->ring_map);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0r->tx_ring_= busaddr =3D 0;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (r->ring !=3D NULL) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bus_dmamem_fre= e(r->ring_dmat, r->ring, r->ring_map);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0r->ring =3D= NULL;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (r->ring_dmat !=3D NULL) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bus_dma_tag_de= stroy(r->ring_dmat);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0r->ring_dma= t =3D NULL;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0mtx_destroy(&r->mtx);
> +}
> +
> +static void
> +nhi_free_rings(struct nhi_softc *sc)
> +{
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0struct nhi_ring_pair *r;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0while ((r =3D SLIST_FIRST(&sc->ring= _list)) !=3D NULL) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_free_ring(= r);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0mtx_lock(&= sc->nhi_mtx);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0SLIST_REMOVE_H= EAD(&sc->ring_list, ring_link);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0mtx_unlock(&am= p;sc->nhi_mtx);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0free(r, M_NHI)= ;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0return;
> +}
> +
> +static int
> +nhi_configure_ring(struct nhi_softc *sc, struct nhi_ring_pair *ring)<= br> > +{
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0bus_addr_t busaddr;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0uint32_t val;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0int idx;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0idx =3D ring->ring_num * 16;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0/* Program the TX ring address and size */=
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0busaddr =3D ring->tx_ring_busaddr;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_write_reg(sc, NHI_TX_RING_ADDR_LO + id= x, busaddr & 0xffffffff);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_write_reg(sc, NHI_TX_RING_ADDR_HI + id= x, busaddr >> 32);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_write_reg(sc, NHI_TX_RING_SIZE + idx, = ring->tx_ring_depth);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_write_reg(sc, NHI_TX_RING_TABLE_TIMEST= AMP + idx, 0x0);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0tb_debug(sc, DBG_INIT, "TX Ring %d TX= _RING_SIZE=3D 0x%x\n",
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ring->ring_num, ring->= tx_ring_depth);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0/* Program the RX ring address and size */=
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0busaddr =3D ring->rx_ring_busaddr;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0val =3D (ring->rx_buffer_size << = 16) | ring->rx_ring_depth;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_write_reg(sc, NHI_RX_RING_ADDR_LO + id= x, busaddr & 0xffffffff);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_write_reg(sc, NHI_RX_RING_ADDR_HI + id= x, busaddr >> 32);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_write_reg(sc, NHI_RX_RING_SIZE + idx, = val);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_write_reg(sc, NHI_RX_RING_TABLE_BASE1 = + idx, 0xffffffff);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0tb_debug(sc, DBG_INIT, "RX Ring %d RX= _RING_SIZE=3D 0x%x\n",
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ring->ring_num, val);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0return (0);
> +}
> +
> +static int
> +nhi_activate_ring(struct nhi_ring_pair *ring)
> +{
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0struct nhi_softc *sc =3D ring->sc;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0int idx;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_pci_enable_interrupt(ring);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0idx =3D ring->ring_num * 32;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0tb_debug(sc, DBG_INIT, "Activating ri= ng %d at idx %d\n",
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ring->ring_num, idx);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_write_reg(sc, NHI_TX_RING_TABLE_BASE0 = + idx,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0TX_TABLE_RAW | TX_TABLE_VALI= D);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_write_reg(sc, NHI_RX_RING_TABLE_BASE0 = + idx,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0RX_TABLE_RAW | RX_TABLE_VALI= D);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0return (0);
> +}
> +
> +static int
> +nhi_deactivate_ring(struct nhi_ring_pair *r)
> +{
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0struct nhi_softc *sc =3D r->sc;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0int idx;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0idx =3D r->ring_num * 32;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0tb_debug(sc, DBG_INIT, "Deactiving ri= ng %d at idx %d\n",
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0r->ring_num, idx);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_write_reg(sc, NHI_TX_RING_TABLE_BASE0 = + idx, 0);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_write_reg(sc, NHI_RX_RING_TABLE_BASE0 = + idx, 0);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0idx =3D r->ring_num * 16;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0tb_debug(sc, DBG_INIT, "Setting ring = %d sizes to 0\n", r->ring_num);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_write_reg(sc, NHI_TX_RING_SIZE + idx, = 0);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_write_reg(sc, NHI_RX_RING_SIZE + idx, = 0);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0return (0);
> +}
> +
> +static int
> +nhi_alloc_ring0(struct nhi_softc *sc)
> +{
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0bus_addr_t frames_busaddr;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0bus_dma_template_t t;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0struct nhi_intr_tracker *trkr;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0struct nhi_ring_pair *r;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0struct nhi_cmd_frame *cmd;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0char *frames;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0int error, size, i;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if ((error =3D nhi_alloc_ring(sc, 0, NHI_R= ING0_TX_DEPTH,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0NHI_RING0_RX_DEPTH, &r))= !=3D 0) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tb_printf(sc, = "Error allocating control ring\n");
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (error)= ;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0r->rx_buffer_size =3D NHI_RING0_FRAME_S= IZE;/* Control packets are small */
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0/* Allocate the RX and TX buffers that are= used for Ring0 comms */
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0size =3D r->tx_ring_depth * NHI_RING0_F= RAME_SIZE;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0size +=3D r->rx_ring_depth * NHI_RING0_= FRAME_SIZE;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0bus_dma_template_init(&t, sc->paren= t_dmat);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0t.maxsize =3D t.maxsegsize =3D size;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0t.nsegments =3D 1;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (bus_dma_template_tag(&t, &sc-&= gt;ring0_dmat)) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tb_printf(sc, = "Error allocating control ring buffer tag\n");
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (ENOMEM= );
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (bus_dmamem_alloc(sc->ring0_dmat, (v= oid **)&frames, BUS_DMA_NOWAIT,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&sc->ring0_map) !=3D = 0) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tb_printf(sc, = "Error allocating control ring memory\n");
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (ENOMEM= );
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0bzero(frames, size);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0bus_dmamap_load(sc->ring0_dmat, sc->= ring0_map, frames, size,
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_memaddr_cb, &frames_= busaddr, 0);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0sc->ring0_frames_busaddr =3D frames_bus= addr;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0sc->ring0_frames =3D frames;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0/* Allocate the driver command trackers */=
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0sc->ring0_cmds =3D malloc(sizeof(struct= nhi_cmd_frame) *
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(r->tx_ring_depth + r->= ;rx_ring_depth), M_NHI, M_NOWAIT | M_ZERO);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (sc->ring0_cmds =3D=3D NULL)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return (ENOMEM= );
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0/* Initialize the RX frames so they can be= used */
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0mtx_lock(&r->mtx);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0for (i =3D 0; i < r->rx_ring_depth; = i++) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cmd =3D &s= c->ring0_cmds[i];
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cmd->data = =3D (uint32_t *)(frames + NHI_RING0_FRAME_SIZE * i);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cmd->data_b= usaddr =3D frames_busaddr + NHI_RING0_FRAME_SIZE * i;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cmd->flags = =3D CMD_MAPPED;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cmd->idx = =3D i;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0TAILQ_INSERT_T= AIL(&r->rx_head, cmd, cm_link);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0/* Inititalize the TX frames */
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0for ( ; i < r->tx_ring_depth + r->= ;rx_ring_depth - 1; i++) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cmd =3D &s= c->ring0_cmds[i];
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cmd->data = =3D (uint32_t *)(frames + NHI_RING0_FRAME_SIZE * i);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cmd->data_b= usaddr =3D frames_busaddr + NHI_RING0_FRAME_SIZE * i;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cmd->flags = =3D CMD_MAPPED;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0cmd->idx = =3D i;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0nhi_free_tx_fr= ame_locked(r, cmd);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0mtx_unlock(&r->mtx);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0/* Do a 1:1 mapping of rings to interrupt = vectors. */
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0/* XXX Should be abstracted */
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0trkr =3D &sc->intr_trackers[0];
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0trkr->ring =3D r;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0r->tracker =3D trkr;
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0/* XXX Should be an array */
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0sc->ring0 =3D r;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0SLIST_INSERT_HEAD(&sc->ring_list, r= , ring_link);
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0return (0);
> +}
> +
> +static void
> +nhi_free_ring0(struct nhi_softc *sc)
> +{
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (sc->ring0_cmds !=3D NULL) {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0free(sc->ri= ng0_cmds, M_NHI);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sc->ring0_c= mds =3D NULL;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0}
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0if (sc->ring0_frames_busaddr !=3D 0) {<= br> > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bus_dmamap_unl= oad(sc->ring0_dmat, sc->ring0_map);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sc->ring0_f= rames_busaddr =3D 0;
> *** 5529 LINES SKIPPED ***



--
Wolfram Schneider <wosch@FreeBSD.org> https://wolfram.schneider.o= rg



--
Nuno Teixeira
=
FreeBSD UNIX:=C2=A0 <eduardo@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 https://Fr= eeBSD.org
--00000000000085e79c0640338477-- From nobody Thu Oct 2 21:25: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 4cd4bS229vz6B55D; Thu, 02 Oct 2025 21:25:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cd4bR6ssRz3Zxg; Thu, 02 Oct 2025 21:25:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759440356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RyLLQKBTb6dv3lXaVlfLjAhfNP1KLaRA908gHQkPrU0=; b=YKl7J1wBeo0o8J7DmorbG7PMfTzlasWqbBat2ALKyMiX/1qtsFv5mIxLC3/qJeGyx7xsz8 vjTd7WydkckbE+RhZo56xC/Bbq4gMQNOCWmhxo1PopHUt0dqj/bRhMqAT7+ev2wxMz8qXD Ejyia07hPsjQPtYACwcJjimffa9+xXLzKUkryma3o2AR61OwwZv8zM1mdOgTAuKJeKacb9 onD2c/Hkf48P1WgaGn205Yn2QvC2WNJ5My2dZFisALUtklIXFE/RsenNmbLcQNGiZdN46k GDwXdRZd6duZeRMDWfuW8rDu+91li6wFYrlq3neQKB7XTT3FFfTy+MJLOtkcHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759440356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RyLLQKBTb6dv3lXaVlfLjAhfNP1KLaRA908gHQkPrU0=; b=I8UkRljk8wDDhqZwc2/uCuJ2Nb7Gm3RWCHnzktpXTYG51WO8kdpXbqqv+tzOHUY3PuM8XA 3p0Qe3wuzvtcKknl7QJcRQVhFwFRajTi2JXyh8WAdev2Hs45EE/Nm7GAfqV13ah0DpcMNK gyhwMKPUHzVoW7QoPEjiiDBsn/JsqMS+hJDteg1cFWJfBPvsAVg8l2zUfFGxjIag6Gm5My XRO0Q8xIMpsM1t9B/q52obNPiXB28fOfdQ5lSDy/fUkVWBBJ4twAyiQY88z+nDb8lT40pi F7/GraFcMtf3mI/6MUeeuheuBZjgnBsDvcg1sx8iVmndwiuTWYb8NM7aMNaj7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759440356; a=rsa-sha256; cv=none; b=l/qBkYvDKLc35POm9u36iTcPJYQD2IbPFf8jX+tjLE9A21ZEPdafzKxY70vlKAbBvI/jwj lLMGCGAEjpcDRzZK0jgPcsa7q6Tl1HGsLizQK9ImPQfBEA1xvNcYck7WyvQRZWGEw/oz2R 7p4urplc0mH86EfkJrnmfVshZlUc05VXziSZUApyT1B0aLaSBKXvdB514aQ3UZSILC6GDM 3BGyDD35Cik8xBPbB9GEhMFiZygDCBKPk6VsoYFKUqBZeCp+MTmpxubSR3UeKmd9yF8Xf3 m8JaiPmJEdcKT67/wr6Ljx9Toxf5jrjjo2H9j+XmUJ9oGdCwcGhB1x1/yOyBNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cd4bR6MFwz9RF; Thu, 02 Oct 2025 21:25:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 592LPt8T049930; Thu, 2 Oct 2025 21:25:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 592LPtKF049927; Thu, 2 Oct 2025 21:25:55 GMT (envelope-from git) Date: Thu, 2 Oct 2025 21:25:55 GMT Message-Id: <202510022125.592LPtKF049927@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Tiago Gasiba Subject: git: da25573ee07f - main - calendar.freebsd: Update calendar for tiga@ 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: tiga X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: da25573ee07f7f36bd0bd90820f1c5e359cd9d5a Auto-Submitted: auto-generated The branch main has been updated by tiga: URL: https://cgit.FreeBSD.org/src/commit/?id=da25573ee07f7f36bd0bd90820f1c5e359cd9d5a commit da25573ee07f7f36bd0bd90820f1c5e359cd9d5a Author: Tiago Gasiba AuthorDate: 2025-09-30 20:42:08 +0000 Commit: Tiago Gasiba CommitDate: 2025-10-02 21:22:09 +0000 calendar.freebsd: Update calendar for tiga@ PR: 289948 Approved by: eduardo (mentor) --- usr.bin/calendar/calendars/calendar.freebsd | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/calendar/calendars/calendar.freebsd b/usr.bin/calendar/calendars/calendar.freebsd index a664f5d1145c..b6e18083e24b 100644 --- a/usr.bin/calendar/calendars/calendar.freebsd +++ b/usr.bin/calendar/calendars/calendar.freebsd @@ -480,6 +480,7 @@ 12/05 Ivan Voras born in Slavonski Brod, Croatia, 1981 12/06 Stefan Farfeleder born in Wien, Austria, 1980 12/08 Michael Tuexen born in Oldenburg, Germany, 1966 +12/09 Tiago Gasiba born in Porto, Portugal, 1978 12/10 Hiroki Tagato born in Shiga, Japan, 1971 12/11 Ganael Laplanche born in Reims, France, 1980 12/11 Koichiro Iwao born in Oita, Japan, 1987 From nobody Thu Oct 2 22:29:16 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cd60w2JlBz6BCKX for ; Thu, 02 Oct 2025 22:29:36 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic301-22.consmr.mail.gq1.yahoo.com (sonic301-22.consmr.mail.gq1.yahoo.com [98.137.64.148]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cd60v0fNlz3h1G for ; Thu, 02 Oct 2025 22:29:35 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=NTEaxmdm; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.64.148 as permitted sender) smtp.mailfrom=marklmi@yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1759444169; bh=+uN8iOZPDUx+BalkF78GrD5UurRk6kxsYJYZd1TkQm0=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=NTEaxmdm48Cw7uqQ80sAlhVgq5iaG41rk+r/bXmBRFCND8K0ZZf3wbGskbmb/Cuj95W94d4SWXJxQ7ppFCTtb71xbEEqWdUsPt+ebKNkKpwVXSFDolkUywLkiaV2Vz4fM6NCggXOyxpu3k6uED2oI05zaiDk1624y7ICVakwAlJCDutLU/d9jSg/pP6Iaix0QChlMzBSP0LG9dPnUVrPUi6oA74jgo26dSZouJScUMlk0Pd8sIe4yjEErTtiZT3V8h7hhZuE44RxDH4KGB1kYEN+cROMCo/B7I6zEpf7OAsclxxRG0L7vAdWCY9LqdZX1eOapJggAP2QuAJNRnJAlQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1759444169; bh=tT7oNm0pQsXgFgzRmmN7Mt/ZZRGJ71nkc23wtaDwTif=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=OLnvuL6M/Ol2dJzMFcSpOVjCqZxPlmUkrF3/OJLyvUR950VxTbQ3av6fanowAeJj5Yjt8R5wtaubPptDUoS+7ir6Q7NJHAFPw5yYQBE8RZJov8o1lEoWfWFhNsLF2x1SbyFafOGtjGjQW7NtBhVqAkUOk8L7/jtDJZ6uzbLDjWahE2t6F98er2tROcrG6PuUw7YxvlleMW1lkVo8xMCHKWHKKn9QmJgKlCG1GYXUxs4TD0I8T3fpWPzn2J7+zhVYYIomwvRlGeHluHKnvCnmnTBxiBXpjR3QTiv0yucGyY4poQWxtFTcPq1wddji1fNWCK68kGCgAPF11FB0OZLqDQ== X-YMail-OSG: 8VcRcaUVM1mORVtPaGKbECRVscekInuYV_rwRftj6zf_.uLN5W.DoxDxMxRsp27 R1SjXtcw76u5vptDvg0np571.LPEAVlhjI8szwoC7Nr60H1Ls3E9Y9WG5VQgaHpyXNSVMQYOiiaq LYuRk_yXLLgWCCHemOmZfPSo_6FmRRBDSTD.ql26fYDnlsjr0eQEvM0MqSD9MygDVs.njOc9Mfzy X2Pc73FXGbSPoYBJWAmzM4YNeTeRLTnLE4vwpQtwjXUXbFcPA9vUX5ajS3.VWCp8Gtx27zciOmyF 31W2YTERP6oGXLxXlLZtYR6zRRgLVS9b6Hdq.CPwlJNovU0tXO9sFBI0upEGBamQXC4kmxy07a.s IWdgHnEJtLtuxemRnQxSNiHk7zyaHeRoZDPuUO1Vsutll7gIqjXDlsWmwSUc5brtho40ZGdMazLE mHCZyF35bO_fuuL77fC.zY9g8ujGb0zvr_.oIIthmhb3DuKw_Zh99XLpRgTopm1jvRruBKv9fB9_ i8Cry0MjJfrUU_GvawEEVXP6iuAJTjv_v9Blc.akWAgPJYpG.6fKbOufTF.D24vdtnJEy4b35McN E65rIsEWbAmOFL2ABwyRkByYD_kxpR4z4DIeTOIiNB5CnnTKTvGXBuEamisIam8YxxLxL_YbSMT5 VxDBV37UtrkMWqJlsOaScqt_t9kuNdGw1uJABUanr0txD78Piivg7uIvM.BHWlwyV6X1omKOMxN4 RPjAxO9duZcTo2.lkO482lL1FzKfn8pkvnFUYxqgG2MwOQNGQPsvcJsYvQ2V.oNBWjQ_FXKISzij PVn0Nuk5ak6sEDHH5Ya_TQzbhkU5JEqkPgiXsMA5LbvIodaHJpj3vTywwONaqosggCpsNaoAbC5B WqNP9nN4ujk.KQWSRQ8_HTFLCp0kHRIARCbst.XNJNRvBOULZqcvKgJQr8AFR2Qlos_0hfhStt5V RjzAJ5ugdw2oVh9JNXsb_qpUgooGBtToAZguK6jOQS4m9Kec6Ash0hZorLgacCefnKESHldAjUnI 8zJILnBvdiAudnK4vaWBJc5AHc01H5Rs8sjj0Ho5UCSx1NyF5f2Lpkyj8SLdw8ShpRbobSNrCJAR JQaVL4OiVPx6aRnp9uT3rYhufAms2wMUx0v1gatONJoingP0OQxUenFG_8nqVFgMgMNQ5elWcA74 1hATzAGQk6jmeaM1TGJLs6voVunJ9wLZvSBHoq6EY2xOqouE7EFx.PPXyO36agaxlxJt5EVy7SKO SAcWktG2VWCjpWRKAiIQyzaY.FfsqCyhU4klBUyzYz0YEzz0nbGmcxNv8.ynEHGCO3vF6pyf7qss zn.Fa1I7geAEUkyoEuwpfeimCyokuI9JQOgRo_d3j1az.KgXsxeut2gXb6byHz1QRqQtpE7uygmH L.lCNBF6q7D12WzLybTm_8L49CmWbEsa_HLOPnDqkuCyNp73j1flf9KOQsXY3klL5wq0x5ahKnrT L1h8cFsrPcPz1mLNDLIdDwHB2NPMJQjLC6IznVzT_iLSCg6.f86MBicRLj0bdv51XqOW7fh4Oqn3 HKCUmdR1ZYlkWXjf_Z1JQf94W6ESa0ADdofzrKCXuTvb7CSsXcK4JJLI23s_KPjiPXMRj9e7GNHG ZCmS4a1OtekVzP1.yQcG37G8b.ybAF6hrx.2wJ94DIeFpWvWgCi9PWpK8QZWKCOJ6Vc3WFl8rMUc toB9BU0uMOgfp8hxzMCIxfXlm_D6vcpDyr8A_tVtnLg4hiP6em5C6UK5_PEKnKTiARKrcIcaDIrG dMyNp.Xkf3B3rwQYnRcAOdr03PCoNtHlRA24r.jUfzses1BzIOYaBxLta4Pp.vHNx8NoMJyp2MgF xV1pDVyyoLW2faZ7Ym0_jYb6de1pUtJ2uKUMvoeLKgOMtrd7YfL9CSbLIRYULNCBFdH9toog9PS_ TorcBFL6MjXRQU7PIk7r9sY6nrGzPnxpy.BiYhL0P2dyOtoV.cNgf2strA1cmfvLjLth5XNWStvV 8DQU2EQ5eiGviZaHlFewwSqxoKOwrx7zh6bTi.48mIZnNuo1prlkmPTZK9siTFWG7Oj3l7jLZNYT HJnGeWGF3i2ZJ2rECPowhYt3xF32ZswI44x075hvW.jwfK8QabIrfDoDefZ4yKPYJPHL4Un2JTdm ErwCCx_Q6wlwGJMoprgRJ.wRC9w28.glsOHAFiT4rH8JsQJ46mCSufrakyKHHk2vcSeU2HVJgJxg i5iPEImTq1ghKFESeEF4cM4yYqTkMv4xq8qKFlZ7muGBPDjC0RiUd7CJUFYkOymdHiNSm1Ig.Bmj Oqa0V X-Sonic-MF: X-Sonic-ID: 9b920002-9618-4a38-a29a-88f3d99eb647 Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.gq1.yahoo.com with HTTP; Thu, 2 Oct 2025 22:29:29 +0000 Received: by hermes--production-gq1-66b66ffd5-rbd2r (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID d84a0225789024c13bb8928c4c33c00c; Thu, 02 Oct 2025 22:29:28 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: git: 2f7a796b590e - main - thunderbolt.4: Initial manual for HW Relnotes From: Mark Millard In-Reply-To: <8C91D367-E9E5-4750-AA81-8C673000778E@yahoo.com> Date: Thu, 2 Oct 2025 15:29:16 -0700 Cc: ziaee , dev-commits-src-main , obiwac Content-Transfer-Encoding: quoted-printable Message-Id: References: <8C91D367-E9E5-4750-AA81-8C673000778E@yahoo.com> To: Alexander Ziaee X-Mailer: Apple Mail (2.3826.700.81) X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-0.50)[-0.497]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; TO_DN_ALL(0.00)[]; FREEMAIL_TO(0.00)[runbox.com]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; FREEMAIL_FROM(0.00)[yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; APPLE_MAILER_COMMON(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.148:from]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.148:from] X-Rspamd-Queue-Id: 4cd60v0fNlz3h1G On Oct 2, 2025, at 12:22, Mark Millard wrote: > On Oct 2, 2025, at 10:25, Alexander Ziaee wrote: >=20 >> On 2025-10-02 12:47 -04:00 EDT, "Mark Millard" = wrote: >>> Alexander Ziaee wrote on >>> Date: Thu, 02 Oct 2025 15:14:07 UTC : >>>=20 >>>> The branch main has been updated by ziaee: >>>>=20 >>>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D2f7a796b590e67c5d123f2b00b3aaf7b= a7a32a13 >>>>=20 >>>> commit 2f7a796b590e67c5d123f2b00b3aaf7ba7a32a13 >>>> Author: Alexander Ziaee >>>> AuthorDate: 2025-10-02 12:05:25 +0000 >>>> Commit: Alexander Ziaee >>>> CommitDate: 2025-10-02 15:12:48 +0000 >>>>=20 >>>> thunderbolt.4: Initial manual for HW Relnotes >>>>=20 >>>> This manual contains nothing and is only suitable for the HW = Relnotes, >>>> but lets get it in so we have something and then can iterate on it. >>>>=20 >>>> MFC after: 3 minutes >>>> Fixes: 2ed9833791f2 (thunderbolt: Import USB4 code) >>>> Discussed with: obiwac >>>> Differential Revision: https://reviews.freebsd.org/D52847 >>>> --- >>>> share/man/man4/Makefile | 1 + >>>> share/man/man4/thunderbolt.4 | 22 ++++++++++++++++++++++ >>>> 2 files changed, 23 insertions(+) >>>>=20 >>>> diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile >>>> index f5d7a0e081fc..6e076722c786 100644 >>>> --- a/share/man/man4/Makefile >>>> +++ b/share/man/man4/Makefile >>>> @@ -589,6 +589,7 @@ MAN=3D aac.4 \ >>>> tdfx.4 \ >>>> termios.4 \ >>>> textdump.4 \ >>>> + thunderbolt.4 \ >>>> ti.4 \ >>>> timecounters.4 \ >>>> tmpfs.4 \ >>>> diff --git a/share/man/man4/thunderbolt.4 = b/share/man/man4/thunderbolt.4 >>>> new file mode 100644 >>>> index 000000000000..3477c11fb60d >>>> --- /dev/null >>>> +++ b/share/man/man4/thunderbolt.4 >>>> @@ -0,0 +1,22 @@ >>>> +.\" >>>> +.\" Copyright (c) 2025 Alexander Ziaee >>>> +.\" >>>> +.\" SPDX-License-Identifier: BSD-2-Clause >>>> +.\" >>>> +.Dd October 2, 2025 >>>> +.Dt THUNDERBOLT 4 >>>> +.Os >>>> +.Sh NAME >>>> +.Nm thunderbolt >>>> +.Nd USB4 controller driver >>>> +.Sh SYNOPSIS >>>> +.Cd device thunderbolt >>>> +.Sh HARDWARE >>>> +The >>>> +.Nm >>>> +driver supports USB4 controllers. >>>=20 >>> As I understand things, being fairly explicit related the >>> following is likely required (not a proposed wording or >>> presentation): >>>=20 >>> Quoting USB4 V2: "A USB4 Host or USB4 Peripheral Device can >>> optionally support interoperability with Thunderbolt 3 >>> (TBT3) products." >>>=20 >>> Quoting USB4 V1: "A USB4 host or USB4 peripheral device can >>> optionally support interoperability with Thunderbolt 3 >>> (TBT3) products." >>>=20 >>> In both, this is tied to Chapter 13, "Interoperability with >>> Thunderbolt(tm) 3 systems". As I understand FreeBSD is not >>> trying to meet the criteria in that chapter, for example. >>>=20 >>> USB4 does not require a certification process, as I >>> remember. Thunderbolt 4 and 5 do, as I remember. >>>=20 >>> As I remember, a distinction between USB4 and Thunderbolt 4 >>> and 5 was that Thunderbolt 4 and 5 require (nearly?) all >>> optional items from the matching USB4 version to be >>> implemented (so: not optional if Thunderbolt 4 or 5 is >>> claimed/certified). Also, it seems unlikely that FreeBSD >>> would go through a Thunderbolt 4 or 5 certification process. >>>=20 >>> Overall this seems to mean not meeting the Thunderbolt 4 >>> and/or 5 criteria fully and not supporting Thunderbolt 3 >>> --but just meeting the criteria for one or both of: >>>=20 >>> ) USB4 V1 without "TBT3" support >>> ) USB4 V2 without "TBT3" support >>>=20 >>> That would be a subset of the Thunderbolt 4 or 5 criteria >>> in a way that excludes Thunderbolt 3. >>>=20 >>> Referencing Thunderbolt without someplace being fairly >>> explicit about those types of relationships could easily >>> leave a misimpression (even if I've gotten some of the >>> status wrong above). >>>=20 >>> My guess here is that enough is known about the intent >>> in this area to be able to have material about this type >>> of thing in place at any time. >>=20 >> My impression is that actually nothing works yet, but we now have a = driver called thunderbolt which is made to support these controllers. = The driver is in, allegedly, and so it's existence needs to be mentioned = in the canonical places where we mention our drivers because people are = looking for them for assorted reasons. >=20 > I've actually booted a Dell Precision 5490 via external > USB4 media, but only when it was downstream of a Thunderbolt > 3 hub. All 4 USB ports are USB4 on this 5490. And that was > some time ago: early 2025-Feb with 1500031 of main 15. It > saw the USB4 media as nda0 at nvme0 . >=20 > This only works as much as it does because the UEFI/ACPI > involved supports enough to make some things possible > such that FreeBSD does not need to be as involved. >=20 > As I remember, I set up and did some live-plugging/unlugging > experiments any they lead to panics. The configuration had > to be as it was at boot time. If I remember right this > looked like Thunderbolt 3 mishandling (no surprise). >=20 > Directly connected, the transition from the kernel to > the world/root mount for the USB4 media fails instead. >=20 > I've not yet tried updating the USB4 media with a more > recent FreeBSD main 16 to see what happens now. I updated the USB4 boot media to be based on: # uname -apKU FreeBSD USB4sys 16.0-CURRENT FreeBSD 16.0-CURRENT = main-n280801-213170eb956f GENERIC-NODEBUG amd64 amd64 1600001 1600001 (It is from official pkgbase distribution use, a copy of another boot media with some parameters replaced afterwards.) I tried it and the system booted --via the USB4 media being "da0": # gpart show -p =3D> 34 500118125 nda0 GPT (238G) 34 2014 - free - (1.0M) 2048 1925120 nda0p1 efi (940M) 1927168 25165824 nda0p2 ms-reserved (12G) 27092992 473024512 nda0p3 linux-data (226G) 500117504 655 - free - (328K) =3D> 40 3907029088 da0 GPT (1.8T) 40 409600 da0p1 efi (200M) 409640 3638558720 da0p2 freebsd-ufs (1.7T) 3638968360 251658240 da0p3 freebsd-swap (120G) 3890626600 16402528 - free - (7.8G) No external hub involved. (As before, the external USB Ethernet plugged into one of the USB4 ports works too.) (The internal nvme showing up as nda0 has a ubuntu installation on it, as distributed by Dell.) I've only done basic boot testing and minimal use after that. Some basic testing of plugging and unplugging Thunderbolt 3 media did not lead to any crashes. This was both via a USB4 port and via the Thunderbolt 3 hub. An example for a USB4 port produced: pci12: on pcib8 pcib17: at device 0.0 on pci12 pcib17: failed to allocate initial I/O port window: 0-0xfff pcib17: failed to allocate initial memory window: 0-0xfffff pcib17: failed to allocate initial prefetch window: 0-0xfffff pci13: on pcib17 pcib18: at device 1.0 on pci13 pcib18: failed to allocate initial I/O port window: 0-0xfff pcib18: failed to allocate initial memory window: 0-0xfffff pcib18: failed to allocate initial prefetch window: 0-0xfffff pci14: on pcib18 pcib19: at device 2.0 on pci13 pcib19: failed to allocate initial I/O port window: 0-0xfff pcib19: failed to allocate initial memory window: 0-0xfffff pcib19: failed to allocate initial prefetch window: 0-0xfffff pci15: on pcib19 xhci2: mem = 0x73e00000-0x73e0ffff at device 0.0 on pci15 xhci2: 32 bytes context size, 64-bit DMA xhci2: xECP capabilities = usbus2 on xhci2 usbus2: 5.0Gbps Super Speed USB v3.0 pcib20: at device 4.0 on pci13 pcib20: failed to allocate initial I/O port window: 0-0xfff pcib20: failed to allocate initial memory window: 0-0xfffff pcib20: failed to allocate initial prefetch window: 0-0xfffff ugen2.1: at usbus2 uhub6 on usbus2 uhub6: on usbus2 uhub6: 4 ports with 4 removable, self powered pcib20: detached uhub6: detached ugen2.1: at usbus2 (disconnected) unknown: at usbus2, port 1, addr 1 (disconnected) usbus2: detached xhci2: Controller reset timeout. xhci2: detached pci15: detached pcib19: detached pci14: detached pcib18: detached pci13: detached pcib17: detached pci12: detached FYI: CPU: Intel(R) Core(TM) Ultra 7 165H (3072.00-MHz K8-class CPU) Origin=3D"GenuineIntel" Id=3D0xa06a4 Family=3D0x6 Model=3D0xaa = Stepping=3D4 . . . WARNING: L3 data cache covers more APIC IDs than a package (6 > 3) FreeBSD/SMP: Multiprocessor System Detected: 22 CPUs FreeBSD/SMP: Non-uniform topology # dmesg -a | grep "no driver attached" pci0: at device 5.0 (no driver attached) pci1: at device 0.0 (no driver attached) pci0: at device 11.0 (no driver attached) pci0: at device 13.2 (no driver attached) pci0: at device 13.3 (no driver attached) pci0: at device 18.0 (no driver attached) pci0: at device 20.2 (no driver attached) pci0: at device 21.0 (no driver attached) pci0: at device 21.3 (no driver attached) pci0: at device 22.0 (no driver attached) pci4: at device 0.0 (no driver attached) pci0: at device 31.5 (no driver attached) >> Patches to the doc are extremely welcome! >=20 > I'd need a lot more certainty about interpreting the > more informal references that are around vs. the > terminology in the USB4 specifications (or other > such). >=20 > I've been more trying to point out subject areas than > knowing for sure the details that I used for > illustration. >=20 >> Best, >> Alex >>=20 >>>> +.Sh HISTORY >>>> +The >>>> +.Nm >>>> +driver appeared in >>>> +.Fx 15.0 . >>>>=20 >>>=20 >>> =3D=3D=3D >>> Mark Millard >>> marklmi at yahoo.com =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Fri Oct 3 00:30:41 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cd8hf1TLZz6BQHv; Fri, 03 Oct 2025 00:30:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cd8hf0KdYz45Bm; Fri, 03 Oct 2025 00:30:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759451442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=22xgp4MH9HCoF4QrIqp3j3kUxJTZEDmDsG1qV0hh+Vs=; b=u+PCOJaQYq6m1vLGsjI4vhYlt4ImS2lxOZFZYD58/FCGxLnS6FgpB3yjGUUQJ3NlEGSgdz FbFYcCjtlndYHxGnCJvfr8vFGJcItiG3PMzy9c+KcFdxjCBN/RHa2y2s6nCELlWudY7qCL xmVkA8NE/jae3Qx8/Jo0Sy3B+nf1eOLSCMbqzCfruegnS9pGy9A0mz0MJztV9oY/SYNbsR ivpBgeBsF+1ZbIs+paBTJn4uMgGq9+sqf6D7hKhEScTlu8SbLeN+KfcS4yy9FKLhFx4To7 BCJHCXIeoiyz044f1nUKKmY/4WWheeHgx7OODd5etHjuzmv+ISmvqJ1N4PGtRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759451442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=22xgp4MH9HCoF4QrIqp3j3kUxJTZEDmDsG1qV0hh+Vs=; b=UvgjSB1hasrOUAbsJbVAM47EFwkrm9SHq+7f9MFPUpr52pYlq3DRV6FC/7dyNh+IsM5oIF oR/Ifk+L+5qkSj5nVe0FB8eblnRAIpX7gF59UHOPKs9CT2KrIYvahJc3Fm7hjpqPRkz3st U4PamqlGhrrQGe0xrUoEsGxbUsyL9+J5T8/DvtAVPVsC0X8Lgz5rI21tBnWssPyeBOIAxS ZHxRY0dp3BKijtcUOa0uRCuTMeFk5pMYeqQNdepmtweOpVZw+EXxXt3t7mcu5ZBP4cD3VR zvn+QSZo2kol4g5+oA8oOtRmq6CUq86AHyf1IwZjDq9zptoDByy8fNdneqNLtQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759451442; a=rsa-sha256; cv=none; b=NptpGCwIYSsiIGQxYDggHKfJmPlAFjXo4dwh6N4uo4A62EDvnAdmsr79ghwh1NydFGSeRT jE7RAkoL5jiAq1JsKVq7brD79LENERHJHJHfGfNSeiNQj3NwAQ4emuDKqTz79dYeFaDYyx l5H6akYPpXbrMKhUQ31zQ31FD3rT77Hemn3rzP++NtinpT0jpVAVwcs0D67evFvzWO4Qgq o77liffj0UuT6BgDeUuGxYomM3zyd7ErTFhspulXre1iUhjwIugyLz1fFDM5Liqwz/no6E q1Tr3MV5TtBShnYy7BDf8NXTGpLF0hS1mWZfzu6mFWiPJtLp7DQmADqCqOyWLg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cd8hd72pzzXKL; Fri, 03 Oct 2025 00:30:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5930UfbB007060; Fri, 3 Oct 2025 00:30:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5930UfVr007057; Fri, 3 Oct 2025 00:30:41 GMT (envelope-from git) Date: Fri, 3 Oct 2025 00:30:41 GMT Message-Id: <202510030030.5930UfVr007057@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 5c5c0571c298 - main - release: Fix NO_ROOT cross-building VM images List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c5c0571c2984669024dca5356f973ffc18a3e02 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5c5c0571c2984669024dca5356f973ffc18a3e02 commit 5c5c0571c2984669024dca5356f973ffc18a3e02 Author: Ed Maste AuthorDate: 2025-10-02 22:07:04 +0000 Commit: Ed Maste CommitDate: 2025-10-03 00:30:07 +0000 release: Fix NO_ROOT cross-building VM images Pass PKG_ABI to virtual machine image builds. Reviewed by: cperciva Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52874 --- release/Makefile | 15 ++++++++------- release/Makefile.vm | 2 ++ release/tools/vmimage.subr | 3 ++- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/release/Makefile b/release/Makefile index f907bf985893..70e5795bae0f 100644 --- a/release/Makefile +++ b/release/Makefile @@ -75,11 +75,19 @@ VOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET_ARCH} .endfor .endif +.if !defined(NOPKGBASE) || empty(NOPKGBASE) +PKGBASE_REPO_DIR= pkgbase-repo-dir +WSTAGEDIR!= ${IMAKE} -f Makefile.inc1 -C ${WORLDDIR} -V WSTAGEDIR +PKG_ABI_FILE= ${WSTAGEDIR}/usr/bin/uname +PKG_ABI= $$(${PKG_CMD} -o ABI_FILE=${PKG_ABI_FILE} config ABI) +.endif + .if ${.MAKE.OS} == "FreeBSD" # For installing packages into the release media. PKG_ENV+= INSTALL_AS_USER=yes PKG_ENV+= ASSUME_ALWAYS_YES=yes PKG_ARGS+= -o METALOG=METALOG +PKG_ARGS+= -o ABI=${PKG_ABI} PKG_ARGS+= -r ${.TARGET} PKG_REPO_ARGS= -o REPOS_DIR=${.CURDIR}/pkg_repos PKGBASE_REPO_ARGS=-o REPOS_DIR=${.OBJDIR}/pkgbase-repo-dir @@ -194,13 +202,6 @@ bootonly: packagesystem dvd: packagesystem .endif -.if !defined(NOPKGBASE) || empty(NOPKGBASE) -PKGBASE_REPO_DIR= pkgbase-repo-dir -WSTAGEDIR!= ${IMAKE} -f Makefile.inc1 -C ${WORLDDIR} -V WSTAGEDIR -PKG_ABI_FILE= ${WSTAGEDIR}/usr/bin/uname -PKG_ABI= $$(${PKG_CMD} -o ABI_FILE=${PKG_ABI_FILE} config ABI) -.endif - pkgbase-repo: mkdir -p pkgbase-repo mkdir -p /tmp/ports /tmp/distfiles diff --git a/release/Makefile.vm b/release/Makefile.vm index eafd1d6abf71..336e8fc82299 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -134,6 +134,7 @@ cw-${_CW:tl}-${_FS}-${_FMT}: ${QEMUTGT} ${PKGBASE_REPO_DIR} ${WITHOUT_QEMU:DWITHOUT_QEMU=true} \ ${NO_ROOT:DNO_ROOT=true} \ PKG_CMD=${PKG_CMD:Upkg} \ + PKG_ABI=${PKG_ABI} \ PKG_REPOS_DIR=${PKG_REPOS_DIR:U${.OBJDIR}/${.TARGET}/etc/pkg} \ PKG_REPO_NAME=${PKG_REPO_NAME:UFreeBSD-ports} \ PKG_INSTALL_EPOCH=${PKG_INSTALL_EPOCH:U${GITEPOCH}} \ @@ -192,6 +193,7 @@ vm-image: ${QEMUTGT} ${PKGBASE_REPO_DIR} ${WITHOUT_QEMU:DWITHOUT_QEMU=true} \ ${NO_ROOT:DNO_ROOT=true} \ PKG_CMD=${PKG_CMD:Upkg} \ + PKG_ABI=${PKG_ABI} \ PKG_REPOS_DIR=${PKG_REPOS_DIR:U${.OBJDIR}/${.TARGET}-${FORMAT}-${FS}/etc/pkg} \ PKG_REPO_NAME=${PKG_REPO_NAME:UFreeBSD-ports} \ PKG_INSTALL_EPOCH=${PKG_INSTALL_EPOCH:U${GITEPOCH}} \ diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index 577abaac73cf..f307e7888e93 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -94,7 +94,7 @@ vm_install_base() { local pkg_cmd pkg_cmd="pkg --rootdir ${DESTDIR} --repo-conf-dir ${PKGBASE_REPO_DIR} -o ASSUME_ALWAYS_YES=yes -o IGNORE_OSVERSION=yes - -o INSTALL_AS_USER=yes " + -o ABI=${PKG_ABI} -o INSTALL_AS_USER=yes " $pkg_cmd update selected=$($pkg_cmd rquery -U -r FreeBSD-base %n | \ vm_filter_base_packages | vm_extra_filter_base_packages) @@ -198,6 +198,7 @@ vm_extra_install_packages() { for pkg in ${VM_EXTRA_PACKAGES}; do INSTALL_AS_USER=yes \ ${PKG_CMD} \ + -o ABI=${PKG_ABI} \ -o METALOG=${DESTDIR}/METALOG.pkg \ -o REPOS_DIR=${PKG_REPOS_DIR} \ -o PKG_DBDIR=${DESTDIR}/var/db/pkg \ From nobody Fri Oct 3 01:08:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cd9Wz4Y4jz690sJ; Fri, 03 Oct 2025 01:08:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cd9Wz1zJNz49gF; Fri, 03 Oct 2025 01:08:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759453695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8mjsv349m881iXbuLdj1OfMc8lCuDO+DUsZRdRiMNqk=; b=uuYKRppCizzFQp3v7oojAKZvywGh4OxtpLsq5jArvHfRJpEa3g/sncaHy2ouXgVvsUIrWW JbThawpE48ODc5Vf4MkRzFXBzm3FtgsJ7urmklUVNNoSV/9aXzhDwe/A6LoF00t7s0ZL0R NLS1Lo4xC9UhDa2hKatR77H43ntx92tXA2WXUVrcSioycg2Rrt9h15icMttbZx43m2uwvw Zro7mJzlu5VbbOadR1IRz2JyQwmp+uLDEvN7VBIaZ8QDGpQSnN7npzhwXUBLZU65bq6o1I kEFWl6/pWCGzFw1OJIBvsypFn13JPvBBQ9hbv4px39Hm4ihsBEMJUlLaG1JOSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759453695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8mjsv349m881iXbuLdj1OfMc8lCuDO+DUsZRdRiMNqk=; b=l5ft8Rqrsv8LXD1ug51EwGhPk9H6NTqVBmpy9+1DK817vU/V7QGybvb4D8yCnKxtGEyuWT SXgmZq2rzM/0y7jmXLmMcmg+fa6ugXCfm9nbcXy1ZzsRV1IeYf8kKgL4kgw7vW3u8SggzT pqkOZSVgO57jakvqygPtI5a4kmBaVdfvZ7GOa5vZ67GPcx2J7+dvn1nHERDgNhgz52AHdy g/3cPbl7kfg98rJi4WO/hH86Wt2HPTtIFvLkrUMb++TYkT4zOCEgsMVtKH/lcbCwHuypZH RwcqipzfCk8I5z9bng6pnFdiXu7YKi+qmIn4qWYdUhkXwLDS+0SeOgX7Ro0mOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759453695; a=rsa-sha256; cv=none; b=OdnRFc1jPUq0T1js6nRnIrBsdtvZg0Q4ZKn87EAhdSM2u/KLU99F4iu1ScCnIgiluCUKmX 44RJwDuMyfDS5Z/LQvT6o/7ykA6h9vD/QoUARDtgiU77Qccfq+eDVb1Wz1VbzyZ6FU1/cT O+6pYR/LR5/kGppQxemOdXGlndxXDcBy8Yk6a4eGwW+Tek5HTL8PFsgB0kpeXbh8d7bMrQ kyEQdPkneqR4jY6iPzUFNL4jkJBQsfugGFt0hNNxzq2rh2v61d5Z59ixYMHcUOooNEJjEE 0xQ61V7FPpM8ZMr/JccPccNJzJVOrpe6Ank1o8KIBMxJUcFHTr7x+z4LrIj1Ig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cd9Wz1XQ9zYp2; Fri, 03 Oct 2025 01:08:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59318FkW072929; Fri, 3 Oct 2025 01:08:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59318FQN072926; Fri, 3 Oct 2025 01:08:15 GMT (envelope-from git) Date: Fri, 3 Oct 2025 01:08:15 GMT Message-Id: <202510030108.59318FQN072926@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 86221f965c06 - main - vmimage.subr: Fix NO_ROOT build in ..._rmcache 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 86221f965c06efa1cd5b2da640ae23edded7c8b9 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=86221f965c06efa1cd5b2da640ae23edded7c8b9 commit 86221f965c06efa1cd5b2da640ae23edded7c8b9 Author: Colin Percival AuthorDate: 2025-10-03 01:06:44 +0000 Commit: Colin Percival CommitDate: 2025-10-03 01:06:44 +0000 vmimage.subr: Fix NO_ROOT build in ..._rmcache When doing a NO_ROOT build we can't run pkg inside a chroot, for multiple reasons including not having /dev mounted. MFC after: 6 hours Sponsored by: https://www.patreon.com/cperciva --- release/tools/vmimage.subr | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index f307e7888e93..fba09d532b4a 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -250,9 +250,16 @@ vm_emulation_cleanup() { } vm_extra_pkg_rmcache() { - if [ -e ${DESTDIR}/usr/local/sbin/pkg ]; then - chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ - /usr/local/sbin/pkg clean -y -a + if [ -n "${NO_ROOT}" ]; then + ${PKG_CMD} \ + -o ASSUME_ALWAYS_YES=yes \ + -r ${DESTDIR} \ + clean -y -a + else + if [ -e ${DESTDIR}/usr/local/sbin/pkg ]; then + chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \ + /usr/local/sbin/pkg clean -y -a + fi fi return 0 From nobody Fri Oct 3 04:00:14 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdFLR0BgZz69NVs; Fri, 03 Oct 2025 04:00:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdFLQ6pDgz3QHn; Fri, 03 Oct 2025 04:00:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759464015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f/bydkR1d2twNfQpfSZPYekJx/7dGbDEkU5/hCyP+Xo=; b=edgpmoo49jUgzNoz/epzywYPR13/el8zuHokIh+Icxw9KJaCMuO6E2oYnIhc+BzCNpx2Sf bTImuSbiZdOVNFhZWiZ9cZSkFDTrneCHfP5Qz2MNUnXlcUtXNf5mTds1CTx73Dowry6zs7 8Aty0ArXLL8iVIjQmDE66v2ZQgCrw8Ay2YPzIMxf71LtJ0YX7wrVBvZpCM2zN+Sd6EdigR xE+viWxkepfuj67wueba6iqHENt9pzoC3OhwnFl1Qk2/nkKLHL5jW3q0R5TwojoxC+QgGf XlgAi67iukFACj4KO+AiXYJhWghwgj3FyvO3CMDCbacDjQYjvh7V37EZgNIBgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759464015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f/bydkR1d2twNfQpfSZPYekJx/7dGbDEkU5/hCyP+Xo=; b=YWbsw7VXoGn0Arirz/8Yz9D7lBYwAJDKGFgDpNBqLL0ZJ0A7bBuW93UAk6ykgrFm2+vr3y kruR3nG5UWSENFi4x6Qgr9DZafQsCcM1kx6iqJel6nQ3cVDgtoUuhi6F9zBEra2zv8bhPG 4acsPPV/wUxn/mM6U47tPPPLQYKpuwTMCsM8ac9T+zDQw14H4Q1F8z/Ujqid1A1cVpOwiz NvpWrVFGMV/jvSazwSlR1he0MIg/UjFHFvcrJi1cAD2bo2FiRJEPz+K+tDQZERgg3MixuO jMH0MFhop75KdLffPC9+gzQouH9RzwUTuHRCyloY4RNH8NjBD1FigjtuOG5otA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759464015; a=rsa-sha256; cv=none; b=rCpK0Q6wXSeRUqpo1G9ovmjEMgPuV6XoWmWS3VqO0MzUpU8ZRv8gNIgNqwZ19QDsjgbImv TWSwhLYVjzZMOVpBpeBZT52e4BPa5X3kaInlqikxWp+LBsgwfEBMDfHKpCwoQuKfhNAcsY UksaOuhLJJChWJheKCWZ0LN1ym0fAD8og1FgE1+WgNvADG7g71spGSmcFfx9nE2C0hfyYQ h//pgRAKCCCD2dLbjy3b76mFFCaVEKPmyA2vTc3++2vdenZDvqRYlEGv0SVODTUHKOjaWG lwbj0+NZ9XonzowWJ9Az5Pw4RSK9D5z6MpfmFm/FUewdkI33CBeLVChr3O79eg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdFLQ690CzdkJ; Fri, 03 Oct 2025 04:00:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59340EMM002427; Fri, 3 Oct 2025 04:00:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59340EJG002418; Fri, 3 Oct 2025 04:00:14 GMT (envelope-from git) Date: Fri, 3 Oct 2025 04:00:14 GMT Message-Id: <202510030400.59340EJG002418@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: a22f8bd45701 - main - create-sets.sh: Add missing copyright header 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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a22f8bd45701ce1535147ddd71291fd1de769ecf Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=a22f8bd45701ce1535147ddd71291fd1de769ecf commit a22f8bd45701ce1535147ddd71291fd1de769ecf Author: Lexi Winter AuthorDate: 2025-10-03 03:58:06 +0000 Commit: Lexi Winter CommitDate: 2025-10-03 03:58:06 +0000 create-sets.sh: Add missing copyright header I wrote this file and am the only person who has modified it since it was added. MFC after: 3 days --- release/packages/create-sets.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/release/packages/create-sets.sh b/release/packages/create-sets.sh index 09567657c161..3780e8ee46c6 100755 --- a/release/packages/create-sets.sh +++ b/release/packages/create-sets.sh @@ -1,4 +1,20 @@ #! /bin/sh +# +# SPDX-License-Identifier: ISC +# +# Copyright (c) 2025 Lexi Winter +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # Generate metapackage sets. We do this by examining the annotations field # of the packages we previously built. From nobody Fri Oct 3 05:44:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdHfS16fLz69bNv; Fri, 03 Oct 2025 05:44:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdHfS0Qk2z3g2K; Fri, 03 Oct 2025 05:44:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759470256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ncCWzARybj82auyjxSAKqzSHbQIXuyVEWfhabhnCobE=; b=XqTdtvjtJuGGZ62/GKBRu63tOPcPELmbWDbZsRO4t7nXduN4Pn5sRRBvDdun2LUC6um7hC 7NVoxpqVdgKKexqfbkar0QoPuX2tK1RoGUnOoXyV47+pJ67bg32ONxNIKuESmqQ2Co8p5J Aw6xpOArhsuM7qFGuoI9gkTcb1LnENok4etf/Ig5zPHjZir4Dzu6xV+9r1ZgP6Qjjhz2JQ kqTEI0X4znaG7Z/4lJ5w+CanjUIifhJhYuAa+3zEXIqNOgUWiOevU4sznaIQ32qXcwdjZG 5ZVb+cHpioayx5ip/FZxs7iPKcKobFunbsP13Q4dYeRoIp3LwcZsTm5K9ARGGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759470256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ncCWzARybj82auyjxSAKqzSHbQIXuyVEWfhabhnCobE=; b=l7OMN1jIo5G2ckEZGPXI6CrZTokbntPELRwn4E2hc1m3yPqTZi+lDTCcikWcDhCkJViNfv RFDbckzdJBiJL6hbf81pzmPJrNpufE0BeQZrvlxhTfe2AMOBswO5YluXZAp5A9tlUr2ETX LwehwqRme3ioisYVNEVh6dtYN6/yDBv6d2iQqa+b4mhl3V0Q1TnMoyN7JORiIcpDz6VGK8 WYCDj0ck5lHqKcrTCrUZYeYdFoVna3bRA6CpBGH7tNU+ypj/zzBULmeTOxABHChCFc6E/+ UwfI4bsQ6KdZFOGBH3v92My/i1nS5CqCT+jqwsqd4atGs4g0wa96GUVe4WarZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759470256; a=rsa-sha256; cv=none; b=IN796z8zAKC2Xx3RxqaOm1y6NtmYkJ5t79ZBSJTBQv2Ddc5z5VEQ88EMrvgyyAp8Ip/DMa 2w3/HIYxK1yUpFG/8teYCpWxqf/bwZ4EaOwreEr2alUAEYs0O/TKnJrQZZVCN4bQy1MByv UHA0ApmRZjZDDXsPwBLk0xvUAqRi2WoRl7AZs+m4DggzCcPd2ej5XBjtCWvSxXm+raIxCr QcqtwcPA0abMQEspTPglk6CjTF1jmPUAp+Ca8flJK1jaMtl/yjy9154/QTWBNPC8C/pBrl 8Og/Jik8+vbq0DMsDkN6+veHXse9Pe/x7qn/c6UpVbLFGZryeUl5sKQKvvD4Yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdHfR6xvYzhxg; Fri, 03 Oct 2025 05:44:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5935iF7P099182; Fri, 3 Oct 2025 05:44:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5935iFG4099179; Fri, 3 Oct 2025 05:44:15 GMT (envelope-from git) Date: Fri, 3 Oct 2025 05:44:15 GMT Message-Id: <202510030544.5935iFG4099179@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: dfc9da624849 - main - Makefile: Fix ordering for (update-)packages 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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dfc9da6248491072e31f924f5ae6b6238603089a Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=dfc9da6248491072e31f924f5ae6b6238603089a commit dfc9da6248491072e31f924f5ae6b6238603089a Author: Lexi Winter AuthorDate: 2025-10-03 05:43:15 +0000 Commit: Lexi Winter CommitDate: 2025-10-03 05:43:15 +0000 Makefile: Fix ordering for (update-)packages The (update-)packages targets require buildworld and buildkernel to run first. Add some .ORDER statements to ensure this happens. This fixes 'make -j8 buildworld buildkernel packages'. PR: 289969 Reported by: yasu MFC after: 3 days Reviewed by: yasu, emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52877 --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 383430307495..664f31a48abf 100644 --- a/Makefile +++ b/Makefile @@ -219,6 +219,8 @@ META_TGT_WHITELIST+= build${libcompat} .ORDER: buildworld distribute .ORDER: buildworld distributeworld .ORDER: buildworld buildkernel +.ORDER: buildworld packages +.ORDER: buildworld update-packages .ORDER: distrib-dirs distribute .ORDER: distrib-dirs distributeworld .ORDER: distrib-dirs installworld @@ -232,6 +234,8 @@ META_TGT_WHITELIST+= build${libcompat} .ORDER: buildkernel installkernel.debug .ORDER: buildkernel reinstallkernel .ORDER: buildkernel reinstallkernel.debug +.ORDER: buildkernel packages +.ORDER: buildkernel update-packages .ORDER: kernel-toolchain buildkernel # Only sanitize PATH on FreeBSD. From nobody Fri Oct 3 05:55:16 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdHv864RRz69c6Y; Fri, 03 Oct 2025 05:55:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdHv85PJpz3glN; Fri, 03 Oct 2025 05:55:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759470916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5s+0zMuWe5/pW0RreC0MiPjFld2yqKCCe2ZeeGVsY2A=; b=VRoyj9LCmD2WbovBgkurgAMjDmKoihzy6fca0nll+UCWWsoX77srm1fxddAEHxumZEwUU/ Xbh+2HBTwlfm2XHpGH0K4BdYrojruHJylaCy4lvXpe5ag8zAoBOYYKoiDTXQAF3EOl4eJd Hg+QZYCcaIQ8puEmyMw7I563dvHUwW7IzsPomy1OS/algTEeX69ZbYQRyBjg48+UScWMZa Xxo9ZlsS0hA0BqWPwGMj9VI9HUtktTiBbcDVSyBNAnwcitEOuYfAOGPA/R8I45RQo/SdZs 9tizWw9KZsPIJLZB1pU0C2wQu8QnEETo7Sc5nj0DnSggsI10KUCWo9yvpfR82A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759470916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5s+0zMuWe5/pW0RreC0MiPjFld2yqKCCe2ZeeGVsY2A=; b=m3oSaVsIO/SriwK7nNQilC1Vn4DN9aqHa5taDE44w/JDaKiggLHakCKDXKizlrf9glFkHA Yn5TxoOhI7F2PuD2u8/yFOZEsqUz/zoFPEn2E0gG5UkUYXnLVCfeqKRSQFkZiIPNMU6VV4 ElF9VoBVbWRnmU/a9k4zeEBnEMl/SYymhDioiGpHCXOZKyq5CjEccIfl1mzHv1ssG09HF4 kdq7mqMxF65Q816ZhnpObZs7ZQ5rJlXUiMqg5AJew/jfasQ9CUMgeWB0/jfmI+0QYniIEx WfVBCDzNTVI9K4Pf1vf5gIvlG5fTdOoFlY4hxpnCdBxdzquDGJUEpDRZ6WdmVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759470916; a=rsa-sha256; cv=none; b=uMRQaZZ71kBLCO3cWhuOagrghyuCU950pLGs9xJcG2aExzJOwxxqDiv1/vYKQVW3UxBOWr uUxxf677+UkpqGXEMxjNr+Gv2Cof5ow6dAGs+cGwjQ78NR4jc/jEM1IYF6R7nHUMda5SkG 7sHIwdI77Pr4lkuEgJp1/lOoBiziMbmCDd0gY/ks1tLiSm0GZyvlHPqk/LE1gDjLgyByFW qhc7Ls/tdUkLKa4Kk4RaFm2V/0pGOoaaAwxZWXxAJwXFfw72KpmCLntaY6E/Xjw6Z02QUM LLK81nAzcQtZxYRU3fdSxTc5L+2RlyD1GknBJOaDdAinn9Hbx3i8Fl/3HsnaKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdHv84tKmzjFk; Fri, 03 Oct 2025 05:55:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5935tGW9018029; Fri, 3 Oct 2025 05:55:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5935tGss018026; Fri, 3 Oct 2025 05:55:16 GMT (envelope-from git) Date: Fri, 3 Oct 2025 05:55:16 GMT Message-Id: <202510030555.5935tGss018026@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: e7e958d83d85 - main - ddb show allchains: avoid traps and show pointers for lockmgr and sx 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: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e7e958d83d8503c3b8714f68418d4509b8288ed9 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=e7e958d83d8503c3b8714f68418d4509b8288ed9 commit e7e958d83d8503c3b8714f68418d4509b8288ed9 Author: Ryan Libby AuthorDate: 2025-10-03 05:47:47 +0000 Commit: Ryan Libby CommitDate: 2025-10-03 05:47:47 +0000 ddb show allchains: avoid traps and show pointers for lockmgr and sx When trying to walk lock chains, we have to deduce what a thread is blocked on. Checking LOCK_CLASS(td->td_wchan) is not a very reliable method by itself, as it just tests whether a particular 4 bits near where td_wchan points have a particular value. Misinterpreting wait channel pointers of other sleeps as lockmgr locks would frequently cause ddb show allchains (or show lockchain) to trap, or to produce incorrect output. Now, check the sleepq_type. When calling sleepq_add, we use SLEEPQ_LK for lockmgr locks and SLEEPQ_SX for sx locks. This is a more reliable indication that the td_wchan is actually a lock. While here, also make the output of lockmgr and sx locks consistent with the output for other locks (see print_lockchain). Outputting a pointer to the lock allows it to be inspected further with ddb show lock or other methods. Reviewed by: markj Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D52794 --- sys/kern/kern_lock.c | 6 ++++-- sys/kern/kern_sx.c | 11 +++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index 31bff6d2c1aa..76f68677e292 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -1780,9 +1780,11 @@ lockmgr_chain(struct thread *td, struct thread **ownerp) lk = td->td_wchan; - if (LOCK_CLASS(&lk->lock_object) != &lock_class_lockmgr) + if (!TD_ON_SLEEPQ(td) || sleepq_type(td->td_wchan) != SLEEPQ_LK || + LOCK_CLASS(&lk->lock_object) != &lock_class_lockmgr) return (0); - db_printf("blocked on lockmgr %s", lk->lock_object.lo_name); + db_printf("blocked on lock %p (%s) \"%s\" ", &lk->lock_object, + lock_class_lockmgr.lc_name, lk->lock_object.lo_name); if (lk->lk_lock & LK_SHARE) db_printf("SHARED (count %ju)\n", (uintmax_t)LK_SHARERS(lk->lk_lock)); diff --git a/sys/kern/kern_sx.c b/sys/kern/kern_sx.c index c005e112d3b9..249faf5b1ec4 100644 --- a/sys/kern/kern_sx.c +++ b/sys/kern/kern_sx.c @@ -1539,16 +1539,19 @@ sx_chain(struct thread *td, struct thread **ownerp) /* * Check to see if this thread is blocked on an sx lock. - * First, we check the lock class. If that is ok, then we - * compare the lock name against the wait message. + * The thread should be on a sleep queue with type SLEEPQ_SX, the + * purported lock should have the lock class index of sx, and the lock + * name should match the wait message. */ sx = td->td_wchan; - if (LOCK_CLASS(&sx->lock_object) != &lock_class_sx || + if (!TD_ON_SLEEPQ(td) || sleepq_type(td->td_wchan) != SLEEPQ_SX || + LOCK_CLASS(&sx->lock_object) != &lock_class_sx || sx->lock_object.lo_name != td->td_wmesg) return (0); /* We think we have an sx lock, so output some details. */ - db_printf("blocked on sx \"%s\" ", td->td_wmesg); + db_printf("blocked on lock %p (%s) \"%s\" ", &sx->lock_object, + lock_class_sx.lc_name, td->td_wmesg); *ownerp = sx_xholder(sx); if (sx->sx_lock & SX_LOCK_SHARED) db_printf("SLOCK (count %ju)\n", From nobody Fri Oct 3 06:20:22 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdJS66zbWz69fDx; Fri, 03 Oct 2025 06:20:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdJS66Fh0z3kfW; Fri, 03 Oct 2025 06:20:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759472422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pR9agoIWhn5M8oKg7wAukTTr9MR5qkhkcQMQ2+9/4AY=; b=E6+bjEDf6NsN65D9GWX6dujH44ukQf+Df+BoZd8gZpUe0dDJQSOx3n2gKmN4Th6++JhmzK sx6E3LElPEPVsTEnKd6iQDrDmnyKf+w9iFkIgRvz/XF0PqZv8nFcAt6W9n4MhhyQbnKMY2 X5UnnvZh09w2w+8PF2J90PQe6bzuJqc+7Y2PzWgOCVchiqDDjgkJk+5IwcTP5u5ixCHHHu xkJLYBjlpoGEVxKAYM+z+OPVgSKSkLRSCqibggOax1jf5r92t8tBU7hvp7tSWEudRhxVBV YyjNlWrVXWesbcqIvk4CP16KgHzN1kUmtUYB6zRP5pcXgCJAODL3PsHjKe7VCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759472422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pR9agoIWhn5M8oKg7wAukTTr9MR5qkhkcQMQ2+9/4AY=; b=mpiZbLiozv3KeiX6/MgGOeO+i8MwuS/kfwiUXQEHiM0L3EtTy7IWpqItbf+Jf9KaJroTYM f7d9uqdo1vzEZA1FlxBXLtLk7GwPvVTuYP0ufvnJW1lRMQn7obH113zKtVqZcYFImVL9rM 3Xd/kJIQCeuE1Uo6niSEpezJ2yJvRwVzYZDurNz3Ydm7u5Orp5mH2tWjU9dTN6YxJ8pil3 AurZw2mPKGbiPGMvzEqLxLgb1/5atnQtZJ3ehnUQopDtpM8LK1Sv1HirJ0+ovOrLEgB/C6 LaqbnxGES1TUE6DnUFwyjYohYMvhQtvMMbRgnjJq54hRDvq/MlRzBcdAXGHrQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759472422; a=rsa-sha256; cv=none; b=JfpdPt8AlxpAskPauChQyXFh4ORdh62vnKyWZ+fPAVZR+2iyn6eO/AJnYmoKr4IaRlCfHB H9G3zcxEOZyVe68PT4axCiI/HM29N7Ern+6XIVlHiDhHTh1wAy1dOHGqI4U5KOBVBvFz5X PV+BfDCn5Ptpf0elhJdWHSmHRCdI+vMgYRH8EQ5SGjZ/apQzBzzfoBl7eVkmNWi6ZEaK8X gNHZ2UZeBcs4Dm2gEuQNipyV3+kaNBKRlfvUzr2NIVQHAX74Ov5bR2hffDNiv4EdNb5adU V05Xx16gF+XSm9bU8aFKranhPogxEuHvZxyZ+cdUJoszHNOuyCExEZrFi2Fg5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdJS65ZbSzjYY; Fri, 03 Oct 2025 06:20:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5936KMVe067062; Fri, 3 Oct 2025 06:20:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5936KMQA067059; Fri, 3 Oct 2025 06:20:22 GMT (envelope-from git) Date: Fri, 3 Oct 2025 06:20:22 GMT Message-Id: <202510030620.5936KMQA067059@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: ShengYi Hung Subject: git: f32ffd11b547 - main - isa_common: allow multiple device instances 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: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f32ffd11b54792d7bdd37b6dfc0f904a561b879c Auto-Submitted: auto-generated The branch main has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=f32ffd11b54792d7bdd37b6dfc0f904a561b879c commit f32ffd11b54792d7bdd37b6dfc0f904a561b879c Author: ShengYi Hung AuthorDate: 2025-10-01 08:33:19 +0000 Commit: ShengYi Hung CommitDate: 2025-10-03 06:20:04 +0000 isa_common: allow multiple device instances In some devices, there may be multiple isa bridges available from different sources. Therefore, we allow multiple lpc devices to be generated so that pcie bus won't show "none" anymore. For example, in my AMD based Framework Laptop, there are two such bridges. One is acpi hinted, another is from pcie. Reviewed by: imp Approved by: lwhsu (mentor) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D52815 --- sys/isa/isa_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/isa/isa_common.c b/sys/isa/isa_common.c index 8e4064af1455..1a6df7bf6046 100644 --- a/sys/isa/isa_common.c +++ b/sys/isa/isa_common.c @@ -1114,7 +1114,7 @@ isab_attach(device_t dev) { device_t child; - child = device_add_child(dev, "isa", 0); + child = device_add_child(dev, "isa", DEVICE_UNIT_ANY); if (child == NULL) return (ENXIO); bus_attach_children(dev); From nobody Fri Oct 3 07:25:16 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdKv05jV9z69mhM; Fri, 03 Oct 2025 07:25:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdKv05BnQz3t1H; Fri, 03 Oct 2025 07:25:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759476316; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o4UN293TD/cjx6p0/j53Oy3E2SmNeNoyfiu6hWOY3G0=; b=bkPPTsxG/d3L9oWmugKGPzzLTEs3/Eg9gxV4eOD0bbZX6wGvj8/ms+pTjiK/O9IC6nDXys Mn1SWTS3s3WCgVrb0eO76dPvuIEhV1C2XD1SDrQQ3mxMF7FsBRPfFZkrRSw9R/STpDT58/ RjJy34FPbVQDfdYR45hIwk//bs0JAu/eBVOZBShmMuYV5yDQ5A0iBOUKHA+XA7FWRu2M8E 4xFpEuIktQHYTRZfWQGXUsHUZqjg/R+tFTgkFAK9Kfdj30KvtgT0llI+IFmeJMxO3b84ge UCKpSQiEs2sKpxSjq0glCbSe6XXok941GdGe1+WPjvVXbDSxImeqhrSEmewwPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759476316; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o4UN293TD/cjx6p0/j53Oy3E2SmNeNoyfiu6hWOY3G0=; b=UJQIFHQWNlfncwsqVse6ZezGAkmjP1RFVz/XrQ7RL0FML2tZUz2kTn6AFD8mD4ENgDd5zz YKTyxuRA++Tr8U5RDYicguEUvH3UXu8u7L3zGAYC8JDMucUAmKXMf1Th5rd/cqiMARXAhz VpxHPopjD+L4owXp2vBFKSrFcBYaINXjx+Zr6pFS6ZPT8uV3LS7r1CHEOCqZ5mH4Ousour pL57HCmyhSknvfWsHeha1w3xKEex7gI1dHFWpUXPDJpnR4WtWAh+wyJbYbquc93eOiD/SD Duz+ukcoH7OGvq1wtGslll/bnFF3ahJBdhz87PKqNstcL/foUtBOA2klZJ8YMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759476316; a=rsa-sha256; cv=none; b=nZyVwKBIVCAuvfMa6MQm1k/0UNAG3t1l6F8Ewj8/FGUrSY5DmQZDY4KFCEWrlqHPS909BQ 5uceUH6UDpbo0FYOwGHGYyQNfvZGbnBe3UnYOxPEhigbzqWpg5Oq1RuzwLtLQ37IjTeS6e SvqoN4w2u++nwF3NEXbgR8+tOXTuJxw7EBrncs5uLxswT9fiOEPovK3RBSpLhcjlOgLHEv 7kvXMOgAQVEBIXsHks6JvVrj3AE6BjGRyJer/qg+FmdscvJ8DakqG1ykcejpcUlzZJmThN AOGsvL1vX6OQzRMwUFyxVzQdqNFeu9WaW5LsJOJxm5HTpSdSSqiY+pRGyFbUKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdKv04W7yzklb; Fri, 03 Oct 2025 07:25:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5937PG9b089506; Fri, 3 Oct 2025 07:25:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5937PGqq089503; Fri, 3 Oct 2025 07:25:16 GMT (envelope-from git) Date: Fri, 3 Oct 2025 07:25:16 GMT Message-Id: <202510030725.5937PGqq089503@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 08b497dc6c4d - main - vmimage.subr: Support NO_ROOT pkgbase 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 08b497dc6c4da23be83f7cd51edff07f09d63fd6 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=08b497dc6c4da23be83f7cd51edff07f09d63fd6 commit 08b497dc6c4da23be83f7cd51edff07f09d63fd6 Author: Colin Percival AuthorDate: 2025-10-03 07:23:43 +0000 Commit: Colin Percival CommitDate: 2025-10-03 07:25:05 +0000 vmimage.subr: Support NO_ROOT pkgbase We need to tell pkg to record files in METALOG; otherwise when we create the VM image it's almost empty. MFC after: 6 hours Sponsored by: https://www.patreon.com/cperciva --- release/tools/vmimage.subr | 3 +++ 1 file changed, 3 insertions(+) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index fba09d532b4a..27cca78be6e3 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -95,6 +95,9 @@ vm_install_base() { pkg_cmd="pkg --rootdir ${DESTDIR} --repo-conf-dir ${PKGBASE_REPO_DIR} -o ASSUME_ALWAYS_YES=yes -o IGNORE_OSVERSION=yes -o ABI=${PKG_ABI} -o INSTALL_AS_USER=yes " + if -n "${NO_ROOT}" ]; then + pkg_cmd="$pkg_cmd -o METALOG=METALOG" + fi $pkg_cmd update selected=$($pkg_cmd rquery -U -r FreeBSD-base %n | \ vm_filter_base_packages | vm_extra_filter_base_packages) From nobody Fri Oct 3 08:02: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 4cdLjs659nz69rH8; Fri, 03 Oct 2025 08:02:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdLjs5spkz3y5y; Fri, 03 Oct 2025 08:02:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759478545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PbzeEbcPfHAYybP7nA2POl7yIrz2RZ4qXdWSEQ4Wgio=; b=P8ER5fMz+YoguzkCuUyGZlLphhRS8PXoIKYnWA6GL00FC+OUnkHQxTTlG0Rs4CHZ+a1lyd tzTmQm6x9eExvZIYJbmIAdEkFegUZzkVAtrA2xELKXUSjyP4Zjs0pAht4Xq5x4jkDb4qyK T5j5NdVm1WXjOSO1Xxp/xMrUBJNLGbOpw+cWesNtB26K8ZizfCUsAoy4t5b6Scwzz+Uy6F BpvXz5ZkTNHEcFXxCx5tYtB7HBWd6+kcdRQNfltmkD2eAFP1W8a+qQQWeFYbd714/uRu8P lqPDvvltosHQWrzXxOnTzjY++4tQN4VeyTTeuF3ck3nJ9bJj9jQDiNBCpTQdIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759478545; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PbzeEbcPfHAYybP7nA2POl7yIrz2RZ4qXdWSEQ4Wgio=; b=wMELnCd4G6uTU9PvjzClbkXNa05SPzHiZEkoQ36R4gboIEMzDLQtJ6Ou1/RJ1hB4CakbQP S2ASeGGxkIJv3+2bqkHGeYbY8sl4MAdGBIBe3pPzJ0vaFxw0eqAzfQI1ZpyXMvPPk4wu8Q JAYRrUaSmcJU5JKIBMudnYCKEv6jB6Vh6UntCfXUjTvrolsJ+UewS0/N8Vidb1Da+FlE7x UVTlvwEQvz/Z05hB2T/BKiiso1swwI71i8w5na23P+mr8+v3hb/VRtzYmSfV2Y97rV/WUv 6A3wjG8eA0Karr77Is8PKCh0OokDL9RQ+etfbJUtap8u9WUpbAhPTV5K3oTPIA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759478545; a=rsa-sha256; cv=none; b=Bju30VKySkLOezD4VegyoKPxvbPiMJqB47miqRL0u4Zf6mA/fmf7IS+8XiR4+v0ptCzoh2 KBIhHMGp2jQM+AWHjkQlxKjuwb7GVJxy7vyiNL9+mgPw0VY9SZ07tOy/z8HWoxQxw8Sdky 2d+/n1T+2STOxrt9wUplCL4ier5DVnoqq8ArD0h5/WpfKE0ko09HrSdIjqD3A5NyomByeD gXC9RlipDRU1H1uGsMSSzX9g4h9YWGd8Kfp7nCYm7uXt/4xRS6IXFvYqtI9sXYNvedeNzC 6fwuN5tw4Q6hn2THrzY6Ic8YDWgAiNoBQfpnS9t8ZEj6dw4jiaFYTRIu6Gfigg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdLjs5Db4zmb7; Fri, 03 Oct 2025 08:02:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59382PXO063852; Fri, 3 Oct 2025 08:02:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59382PmL063849; Fri, 3 Oct 2025 08:02:25 GMT (envelope-from git) Date: Fri, 3 Oct 2025 08:02:25 GMT Message-Id: <202510030802.59382PmL063849@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Andrey V. Elsukov" Subject: git: 716acd9367df - main - carp6: revise the generation of ND6 NA 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: ae X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 716acd9367df49d44f29eeb783706025f3a04c65 Auto-Submitted: auto-generated The branch main has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=716acd9367df49d44f29eeb783706025f3a04c65 commit 716acd9367df49d44f29eeb783706025f3a04c65 Author: Andrey V. Elsukov AuthorDate: 2025-10-03 07:57:44 +0000 Commit: Andrey V. Elsukov CommitDate: 2025-10-03 07:57:44 +0000 carp6: revise the generation of ND6 NA * use ND_NA_FLAG_ROUTER flag in carp_send_na() when we work as router. * use in6addr_any as destination address for nd6_na_output(), then it will use ipv6-all-nodes multicast address. * add in6_selectsrc_nbr() function that accepts additional argument ip6_moptions. Use this function from ND6 code to avoid cases when nd6_na_output/nd6_ns_output can not find source address for multicast destinations. * add some comments from RFC2461 for better understanding. * use tlladdr argument as flags and use ND6_NA_OPT_LLA when we need to add target link-layer address option, and ND6_NA_CARP_MASTER when we know that target address is CARP master. Then we can prepare correct CARP's mac address if target address is CARP master. * move blocks of code where multicast options is initialized and use it when destination address is multicast. Reviewed by: kp Obtained from: Yandex LLC MFC after: 2 weeks Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D52825 --- sys/netinet/ip_carp.c | 27 ++++++++--- sys/netinet6/in6_src.c | 54 ++++++++++++++++------ sys/netinet6/ip6_var.h | 2 + sys/netinet6/nd6.h | 4 ++ sys/netinet6/nd6_nbr.c | 121 ++++++++++++++++++++++--------------------------- 5 files changed, 119 insertions(+), 89 deletions(-) diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index d3d7957cf087..4f553b9aac5e 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1640,18 +1640,31 @@ carp_iamatch(struct ifaddr *ifa, uint8_t **enaddr) static void carp_send_na(struct carp_softc *sc) { - static struct in6_addr mcast = IN6ADDR_LINKLOCAL_ALLNODES_INIT; struct ifaddr *ifa; - struct in6_addr *in6; + int flags; + /* + * Sending Unsolicited Neighbor Advertisements + * + * If the node is a router, we MUST set the Router flag to one. + * We set Override flag to one and send link-layer address option, + * thus neighboring nodes will install the new link-layer address. + */ + flags = ND_NA_FLAG_OVERRIDE; + if (V_ip6_forwarding) + flags |= ND_NA_FLAG_ROUTER; CARP_FOREACH_IFA(sc, ifa) { if (ifa->ifa_addr->sa_family != AF_INET6) continue; - - in6 = IFA_IN6(ifa); - nd6_na_output(sc->sc_carpdev, &mcast, in6, - ND_NA_FLAG_OVERRIDE, 1, NULL); - DELAY(1000); /* XXX */ + /* + * We use unspecified address as destination here to avoid + * scope initialization for each call. + * nd6_na_output() will use all nodes multicast address if + * destinaion address is unspecified. + */ + nd6_na_output(sc->sc_carpdev, &in6addr_any, IFA_IN6(ifa), + flags, ND6_NA_OPT_LLA | ND6_NA_CARP_MASTER, NULL); + DELAY(1000); /* RetransTimer */ } } diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c index dd6864482b3c..3e55c6e5fc05 100644 --- a/sys/netinet6/in6_src.c +++ b/sys/netinet6/in6_src.c @@ -132,8 +132,8 @@ static int in6_selectif(struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct ifnet **, struct ifnet *, u_int); static int in6_selectsrc(uint32_t, struct sockaddr_in6 *, - struct ip6_pktopts *, struct inpcb *, struct ucred *, - struct ifnet **, struct in6_addr *); + struct ip6_pktopts *, struct ip6_moptions *, struct inpcb *, + struct ucred *, struct ifnet **, struct in6_addr *); static struct in6_addrpolicy *lookup_addrsel_policy(struct sockaddr_in6 *); @@ -173,8 +173,8 @@ static struct in6_addrpolicy *match_addrsel_policy(struct sockaddr_in6 *); static int in6_selectsrc(uint32_t fibnum, struct sockaddr_in6 *dstsock, - struct ip6_pktopts *opts, struct inpcb *inp, struct ucred *cred, - struct ifnet **ifpp, struct in6_addr *srcp) + struct ip6_pktopts *opts, struct ip6_moptions *mopts, struct inpcb *inp, + struct ucred *cred, struct ifnet **ifpp, struct in6_addr *srcp) { struct rm_priotracker in6_ifa_tracker; struct in6_addr dst, tmp; @@ -186,7 +186,6 @@ in6_selectsrc(uint32_t fibnum, struct sockaddr_in6 *dstsock, u_int32_t odstzone; int prefer_tempaddr; int error; - struct ip6_moptions *mopts; NET_EPOCH_ASSERT(); KASSERT(srcp != NULL, ("%s: srcp is NULL", __func__)); @@ -205,13 +204,6 @@ in6_selectsrc(uint32_t fibnum, struct sockaddr_in6 *dstsock, *ifpp = NULL; } - if (inp != NULL) { - INP_LOCK_ASSERT(inp); - mopts = inp->in6p_moptions; - } else { - mopts = NULL; - } - /* * If the source address is explicitly specified by the caller, * check if the requested source address is indeed a unicast address @@ -552,10 +544,13 @@ in6_selectsrc_socket(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, uint32_t fibnum; int error; + INP_LOCK_ASSERT(inp); + fibnum = inp->inp_inc.inc_fibnum; retifp = NULL; - error = in6_selectsrc(fibnum, dstsock, opts, inp, cred, &retifp, srcp); + error = in6_selectsrc(fibnum, dstsock, opts, inp->in6p_moptions, + inp, cred, &retifp, srcp); if (error != 0) return (error); @@ -583,7 +578,7 @@ in6_selectsrc_socket(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts, * Stores selected address to @srcp. * Returns 0 on success. * - * Used by non-socket based consumers (ND code mostly) + * Used by non-socket based consumers */ int in6_selectsrc_addr(uint32_t fibnum, const struct in6_addr *dst, @@ -602,13 +597,42 @@ in6_selectsrc_addr(uint32_t fibnum, const struct in6_addr *dst, dst_sa.sin6_scope_id = scopeid; sa6_embedscope(&dst_sa, 0); - error = in6_selectsrc(fibnum, &dst_sa, NULL, NULL, NULL, &retifp, srcp); + error = in6_selectsrc(fibnum, &dst_sa, NULL, NULL, + NULL, NULL, &retifp, srcp); if (hlim != NULL) *hlim = in6_selecthlim(NULL, retifp); return (error); } +/* + * Select source address based on @fibnum, @dst and @mopts. + * Stores selected address to @srcp. + * Returns 0 on success. + * + * Used by non-socket based consumers (ND code mostly) + */ +int +in6_selectsrc_nbr(uint32_t fibnum, const struct in6_addr *dst, + struct ip6_moptions *mopts, struct ifnet *ifp, struct in6_addr *srcp) +{ + struct sockaddr_in6 dst_sa; + struct ifnet *retifp; + int error; + + retifp = ifp; + bzero(&dst_sa, sizeof(dst_sa)); + dst_sa.sin6_family = AF_INET6; + dst_sa.sin6_len = sizeof(dst_sa); + dst_sa.sin6_addr = *dst; + dst_sa.sin6_scope_id = ntohs(in6_getscope(dst)); + sa6_embedscope(&dst_sa, 0); + + error = in6_selectsrc(fibnum, &dst_sa, NULL, mopts, + NULL, NULL, &retifp, srcp); + return (error); +} + static struct nhop_object * cache_route(uint32_t fibnum, const struct sockaddr_in6 *dst, struct route_in6 *ro, uint32_t flowid) diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h index e1a4e8678ebb..c28bfa5a9d08 100644 --- a/sys/netinet6/ip6_var.h +++ b/sys/netinet6/ip6_var.h @@ -440,6 +440,8 @@ int in6_selectsrc_socket(struct sockaddr_in6 *, struct ip6_pktopts *, struct inpcb *, struct ucred *, int, struct in6_addr *, int *); int in6_selectsrc_addr(uint32_t, const struct in6_addr *, uint32_t, struct ifnet *, struct in6_addr *, int *); +int in6_selectsrc_nbr(uint32_t, const struct in6_addr *, + struct ip6_moptions *, struct ifnet *, struct in6_addr *); int in6_selectroute(struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *, struct ifnet **, struct nhop_object **, u_int, uint32_t); diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h index 5fe027ac5e7c..e484c709e29a 100644 --- a/sys/netinet6/nd6.h +++ b/sys/netinet6/nd6.h @@ -171,6 +171,10 @@ struct in6_ndifreq { #define NDPRF_ONLINK 0x1 #define NDPRF_DETACHED 0x2 +/* ND6 NA output flags */ +#define ND6_NA_OPT_LLA 0x01 +#define ND6_NA_CARP_MASTER 0x02 + /* protocol constants */ #define MAX_RTR_SOLICITATION_DELAY 1 /* 1sec */ #define RTR_SOLICITATION_INTERVAL 4 /* 4sec */ diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index cc17b4e1a402..e2db192bca15 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -245,10 +245,9 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len) * In implementation, we add target link-layer address by default. * We do not add one in MUST NOT cases. */ - if (!IN6_IS_ADDR_MULTICAST(&daddr6)) - tlladdr = 0; - else - tlladdr = 1; + tlladdr = 0; + if (IN6_IS_ADDR_MULTICAST(&daddr6)) + tlladdr |= ND6_NA_OPT_LLA; /* * Target address (taddr6) must be either: @@ -257,9 +256,11 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len) * (3) "tentative" address on which DAD is being performed. */ /* (1) and (3) check. */ - if (ifp->if_carp) + if (ifp->if_carp) { ifa = (*carp_iamatch6_p)(ifp, &taddr6); - else + if (ifa != NULL) + tlladdr |= ND6_NA_CARP_MASTER; + } else ifa = (struct ifaddr *)in6ifa_ifpwithaddr(ifp, &taddr6); /* (2) check. */ @@ -322,33 +323,29 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len) goto freeit; } + /* + * If the Target Address is either an anycast address or a unicast + * address for which the node is providing proxy service, or the Target + * Link-Layer Address option is not included, the Override flag SHOULD + * be set to zero. Otherwise, the Override flag SHOULD be set to one. + */ + if (anycast == 0 && proxy == 0 && (tlladdr & ND6_NA_OPT_LLA) != 0) + rflag |= ND_NA_FLAG_OVERRIDE; /* * If the source address is unspecified address, entries must not * be created or updated. - * It looks that sender is performing DAD. Output NA toward - * all-node multicast address, to tell the sender that I'm using - * the address. + * It looks that sender is performing DAD. nd6_na_output() will + * send NA toward all-node multicast address, to tell the sender + * that I'm using the address. * S bit ("solicited") must be zero. */ - if (IN6_IS_ADDR_UNSPECIFIED(&saddr6)) { - struct in6_addr in6_all; - - in6_all = in6addr_linklocal_allnodes; - if (in6_setscope(&in6_all, ifp, NULL) != 0) - goto bad; - nd6_na_output_fib(ifp, &in6_all, &taddr6, - ((anycast || proxy || !tlladdr) ? 0 : ND_NA_FLAG_OVERRIDE) | - rflag, tlladdr, proxy ? (struct sockaddr *)&proxydl : NULL, - M_GETFIB(m)); - goto freeit; + if (!IN6_IS_ADDR_UNSPECIFIED(&saddr6)) { + nd6_cache_lladdr(ifp, &saddr6, lladdr, lladdrlen, + ND_NEIGHBOR_SOLICIT, 0); + rflag |= ND_NA_FLAG_SOLICITED; } - nd6_cache_lladdr(ifp, &saddr6, lladdr, lladdrlen, - ND_NEIGHBOR_SOLICIT, 0); - - nd6_na_output_fib(ifp, &saddr6, &taddr6, - ((anycast || proxy || !tlladdr) ? 0 : ND_NA_FLAG_OVERRIDE) | - rflag | ND_NA_FLAG_SOLICITED, tlladdr, + nd6_na_output_fib(ifp, &saddr6, &taddr6, rflag, tlladdr, proxy ? (struct sockaddr *)&proxydl : NULL, M_GETFIB(m)); freeit: if (ifa != NULL) @@ -440,13 +437,6 @@ nd6_ns_output_fib(struct ifnet *ifp, const struct in6_addr *saddr6, return; M_SETFIB(m, fibnum); - if (daddr6 == NULL || IN6_IS_ADDR_MULTICAST(daddr6)) { - m->m_flags |= M_MCAST; - im6o.im6o_multicast_ifp = ifp; - im6o.im6o_multicast_hlim = 255; - im6o.im6o_multicast_loop = 0; - } - icmp6len = sizeof(*nd_ns); m->m_pkthdr.len = m->m_len = sizeof(*ip6) + icmp6len; m->m_data += max_linkhdr; /* or M_ALIGN() equivalent? */ @@ -471,6 +461,12 @@ nd6_ns_output_fib(struct ifnet *ifp, const struct in6_addr *saddr6, if (in6_setscope(&ip6->ip6_dst, ifp, NULL) != 0) goto bad; } + if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { + m->m_flags |= M_MCAST; + im6o.im6o_multicast_ifp = ifp; + im6o.im6o_multicast_hlim = 255; + im6o.im6o_multicast_loop = 0; + } if (nonce == NULL) { char ip6buf[INET6_ADDRSTRLEN]; struct ifaddr *ifa = NULL; @@ -492,20 +488,16 @@ nd6_ns_output_fib(struct ifnet *ifp, const struct in6_addr *saddr6, ifa = (struct ifaddr *)in6ifa_ifpwithaddr(ifp, saddr6); if (ifa == NULL) { int error; - struct in6_addr dst6, src6; - uint32_t scopeid; - in6_splitscope(&ip6->ip6_dst, &dst6, &scopeid); - error = in6_selectsrc_addr(fibnum, &dst6, - scopeid, ifp, &src6, NULL); + error = in6_selectsrc_nbr(fibnum, &ip6->ip6_dst, &im6o, + ifp, &ip6->ip6_src); if (error) { nd6log((LOG_DEBUG, "%s: source can't be " "determined: dst=%s, error=%d\n", __func__, - ip6_sprintf(ip6buf, &dst6), + ip6_sprintf(ip6buf, &ip6->ip6_dst), error)); goto bad; } - ip6->ip6_src = src6; } else ip6->ip6_src = *saddr6; @@ -968,7 +960,9 @@ nd6_na_input(struct mbuf *m, int off, int icmp6len) * - proxy advertisement delay rule (RFC2461 7.2.8, last paragraph, SHOULD) * - anycast advertisement delay rule (RFC2461 7.2.7, SHOULD) * - * tlladdr - 1 if include target link-layer address + * tlladdr: + * - 0x01 if include target link-layer address + * - 0x02 if target address is CARP MASTER * sdl0 - sockaddr_dl (= proxy NA) or NULL */ static void @@ -981,8 +975,7 @@ nd6_na_output_fib(struct ifnet *ifp, const struct in6_addr *daddr6_0, struct ip6_hdr *ip6; struct nd_neighbor_advert *nd_na; struct ip6_moptions im6o; - struct in6_addr daddr6, dst6, src6; - uint32_t scopeid; + struct in6_addr daddr6; NET_EPOCH_ASSERT(); @@ -1006,13 +999,6 @@ nd6_na_output_fib(struct ifnet *ifp, const struct in6_addr *daddr6_0, return; M_SETFIB(m, fibnum); - if (IN6_IS_ADDR_MULTICAST(&daddr6)) { - m->m_flags |= M_MCAST; - im6o.im6o_multicast_ifp = ifp; - im6o.im6o_multicast_hlim = 255; - im6o.im6o_multicast_loop = 0; - } - icmp6len = sizeof(*nd_na); m->m_pkthdr.len = m->m_len = sizeof(struct ip6_hdr) + icmp6len; m->m_data += max_linkhdr; /* or M_ALIGN() equivalent? */ @@ -1024,26 +1010,24 @@ nd6_na_output_fib(struct ifnet *ifp, const struct in6_addr *daddr6_0, ip6->ip6_vfc |= IPV6_VERSION; ip6->ip6_nxt = IPPROTO_ICMPV6; ip6->ip6_hlim = 255; + if (IN6_IS_ADDR_UNSPECIFIED(&daddr6)) { /* reply to DAD */ - daddr6.s6_addr16[0] = IPV6_ADDR_INT16_MLL; - daddr6.s6_addr16[1] = 0; - daddr6.s6_addr32[1] = 0; - daddr6.s6_addr32[2] = 0; - daddr6.s6_addr32[3] = IPV6_ADDR_INT32_ONE; + daddr6 = in6addr_linklocal_allnodes; if (in6_setscope(&daddr6, ifp, NULL)) goto bad; flags &= ~ND_NA_FLAG_SOLICITED; } - ip6->ip6_dst = daddr6; + if (IN6_IS_ADDR_MULTICAST(&daddr6)) { + m->m_flags |= M_MCAST; + im6o.im6o_multicast_ifp = ifp; + im6o.im6o_multicast_hlim = 255; + im6o.im6o_multicast_loop = 0; + } - /* - * Select a source whose scope is the same as that of the dest. - */ - in6_splitscope(&daddr6, &dst6, &scopeid); - error = in6_selectsrc_addr(fibnum, &dst6, - scopeid, ifp, &src6, NULL); + ip6->ip6_dst = daddr6; + error = in6_selectsrc_nbr(fibnum, &daddr6, &im6o, ifp, &ip6->ip6_src); if (error) { char ip6buf[INET6_ADDRSTRLEN]; nd6log((LOG_DEBUG, "nd6_na_output: source can't be " @@ -1051,28 +1035,31 @@ nd6_na_output_fib(struct ifnet *ifp, const struct in6_addr *daddr6_0, ip6_sprintf(ip6buf, &daddr6), error)); goto bad; } - ip6->ip6_src = src6; nd_na = (struct nd_neighbor_advert *)(ip6 + 1); nd_na->nd_na_type = ND_NEIGHBOR_ADVERT; nd_na->nd_na_code = 0; nd_na->nd_na_target = *taddr6; in6_clearscope(&nd_na->nd_na_target); /* XXX */ + /* + * If we respond from CARP address, we need to prepare mac address + * for carp_output(). + */ + if (ifp->if_carp && (tlladdr & ND6_NA_CARP_MASTER)) + mac = (*carp_macmatch6_p)(ifp, m, taddr6); /* * "tlladdr" indicates NS's condition for adding tlladdr or not. * see nd6_ns_input() for details. * Basically, if NS packet is sent to unicast/anycast addr, * target lladdr option SHOULD NOT be included. */ - if (tlladdr) { + if (tlladdr & ND6_NA_OPT_LLA) { /* * sdl0 != NULL indicates proxy NA. If we do proxy, use * lladdr in sdl0. If we are not proxying (sending NA for * my address) use lladdr configured for the interface. */ if (sdl0 == NULL) { - if (ifp->if_carp) - mac = (*carp_macmatch6_p)(ifp, m, taddr6); if (mac == NULL) mac = nd6_ifptomac(ifp); } else if (sdl0->sa_family == AF_LINK) { @@ -1082,7 +1069,7 @@ nd6_na_output_fib(struct ifnet *ifp, const struct in6_addr *daddr6_0, mac = LLADDR(sdl); } } - if (tlladdr && mac) { + if ((tlladdr & ND6_NA_OPT_LLA) && mac != NULL) { int optlen = sizeof(struct nd_opt_hdr) + ifp->if_addrlen; struct nd_opt_hdr *nd_opt = (struct nd_opt_hdr *)(nd_na + 1); From nobody Fri Oct 3 10:11:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdPZN6htWz69NlD; Fri, 03 Oct 2025 10:11:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdPZN5ywZz3G53; Fri, 03 Oct 2025 10:11:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759486268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r0o/QOAF/bHfjBUjao8z4teEcv4FY7ZjDYKbD1HYSUk=; b=ar4UUiGdbDuOdi4jmiMM7een1zxqZMIY5UfTVBnqzCDHG6ZDmFxA+PpEwGsEL8Eu/QusI0 h7BjRPAPeGk9QsqxZ933++mJ2w3/g1+IZJlgG7IIWzwZv69JAKNjAUiBk6FAc/3nwJsJCR HAEfZz8CPiRGm1PVtBdA7SC+fXu+sTD1BsjmzRXO8iBMwmGaIXxhHJFkADmC0OIyYcPgmG CYWa+G9g1GYy3LauYAJzrZYNmYKVH2FYWOwXGBnpEM/fwqLHAqKtl4fyvEYvDbfX7fYyVF /L+oI6DCe5VCZg4pNw3udIPW8eH9QoCXgEKOKzFtencbnx6ilcw63Fsmca+b1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759486268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r0o/QOAF/bHfjBUjao8z4teEcv4FY7ZjDYKbD1HYSUk=; b=HfKu3QMvso6lvGwFmRRsB3tWBx25khF6QXKWpl0PBcS/Y+isLnP1mFjuLAELP3ubhpIQqH k7TjwQ3tigAmRvpxGVmMJMN11FsFyivB7YKCHYCPo08ucOHcz9dXBkyWr+Mo8movXFtc1k 8QzV0q7NvMMhIZCFrrUiDwyC2JAlc2TExNOPpAd1QsavWjMl7RB6EEibvqWWcXbzIotg7o 4E8xz/iIkSh75/E/V1qbiBfYAd92rwgDcDFL9aabrbNkLK4g+XrhTIOQMQwL1Vqqaxu8lU dwGeFQ3o6Hb4VWxN+O06c0v7sJcoR/H5R+MyMtxDxnh6cax+W5O3GlRIrNalEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759486268; a=rsa-sha256; cv=none; b=qcOleAlZKzQx5V8sKw6kv7GeWyJxCY+als8ziflMFkpcQybXmkgpU+Wocv+kHATndY6yuO mYPKfA46ls9hDBswugiD5N2qYOqr/7H7GOqiaNFw8el31fPmUt6v5cKRxOBe1DZvUWoFSi 8qENthhiiJCyiboMm1zmK9nk1EZvBTIK2Ergn0oS9a2f3eptFj0ZAkb2hC2v2I7iXfvYox UsM63I1riy3taOFVIxzk03py31jbyR1J98Ss8U7wXWLebAft7BPi+WpEEkp5X09WVSJWNb IFg0Io8Jp2agxFYLzK+NfljW5C9k6oaPNIDWMTZpuKo/EogQ71OqYRQlwJD4ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdPZN5MJXzqvL; Fri, 03 Oct 2025 10:11:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593AB8aG005323; Fri, 3 Oct 2025 10:11:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593AB8Ep005320; Fri, 3 Oct 2025 10:11:08 GMT (envelope-from git) Date: Fri, 3 Oct 2025 10:11:08 GMT Message-Id: <202510031011.593AB8Ep005320@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Guido Falsi Subject: git: 0c94dc9da7c2 - main - sys/netinet6: Use atomic(9) for dad_failures counter 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: madpilot X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0c94dc9da7c238603e43c55ca6da64c417fc2204 Auto-Submitted: auto-generated The branch main has been updated by madpilot: URL: https://cgit.FreeBSD.org/src/commit/?id=0c94dc9da7c238603e43c55ca6da64c417fc2204 commit 0c94dc9da7c238603e43c55ca6da64c417fc2204 Author: Guido Falsi AuthorDate: 2025-10-03 10:09:42 +0000 Commit: Guido Falsi CommitDate: 2025-10-03 10:09:42 +0000 sys/netinet6: Use atomic(9) for dad_failures counter Replace counter(9) usage with more lightweight atomic(9) in the code handling RFC 7217 SLAAC address generation. Also, use `u_int` types with this. Leaving `dad_failures` local to `in6_get_stableifid()` as a `uint64_t` to avoid changing the generated addresses from previous code; this also gives some headroom for future changes. While here, moved some `#include` lines to adhere to style(9). Reviewed by: glebius, jhibbits, jtl, zlei Approved by: glebius, jtl, zlei Differential Revision: https://reviews.freebsd.org/D52731 --- sys/netinet6/in6.c | 3 --- sys/netinet6/in6_ifattach.c | 6 ++++-- sys/netinet6/in6_proto.c | 4 ++-- sys/netinet6/in6_var.h | 2 +- sys/netinet6/ip6_var.h | 2 +- sys/netinet6/nd6_nbr.c | 8 +++++--- sys/netinet6/nd6_rtr.c | 4 +++- 7 files changed, 16 insertions(+), 13 deletions(-) diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 8ef755e2dc0a..4f756a75fac7 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -2604,8 +2604,6 @@ in6_domifattach(struct ifnet *ifp) COUNTER_ARRAY_ALLOC(ext->icmp6_ifstat, sizeof(struct icmp6_ifstat) / sizeof(uint64_t), M_WAITOK); - ext->dad_failures = counter_u64_alloc(M_WAITOK); - ext->nd_ifinfo = nd6_ifattach(ifp); ext->scope6_id = scope6_ifattach(ifp); ext->lltable = in6_lltattach(ifp); @@ -2641,7 +2639,6 @@ in6_domifdetach(struct ifnet *ifp, void *aux) COUNTER_ARRAY_FREE(ext->icmp6_ifstat, sizeof(struct icmp6_ifstat) / sizeof(uint64_t)); free(ext->icmp6_ifstat, M_IFADDR); - counter_u64_free(ext->dad_failures); free(ext, M_IFADDR); } diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c index 4fde346fb691..090ba610460b 100644 --- a/sys/netinet6/in6_ifattach.c +++ b/sys/netinet6/in6_ifattach.c @@ -44,7 +44,6 @@ #include #include #include -#include #include #include @@ -72,6 +71,9 @@ #include #include +#include +#include + #ifdef IP6_AUTO_LINKLOCAL VNET_DEFINE(int, ip6_auto_linklocal) = IP6_AUTO_LINKLOCAL; #else @@ -377,7 +379,7 @@ in6_get_stableifid(struct ifnet *ifp, struct in6_addr *in6, int prefixlen) } hostuuid_len = strlen(hostuuid); - dad_failures = counter_u64_fetch(DAD_FAILURES(ifp)); + dad_failures = atomic_load_int(&DAD_FAILURES(ifp)); /* * RFC 7217 section 7 diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c index 6669a2ba56ce..f567b42b42ca 100644 --- a/sys/netinet6/in6_proto.c +++ b/sys/netinet6/in6_proto.c @@ -167,7 +167,7 @@ VNET_DEFINE(int, ip6_rr_prune) = 5; /* router renumbering prefix * walk list every 5 sec. */ VNET_DEFINE(int, ip6_mcast_pmtu) = 0; /* enable pMTU discovery for multicast? */ VNET_DEFINE(int, ip6_v6only) = 1; -VNET_DEFINE(int, ip6_stableaddr_maxretries) = IP6_IDGEN_RETRIES; +VNET_DEFINE(u_int, ip6_stableaddr_maxretries) = IP6_IDGEN_RETRIES; #ifdef IPSTEALTH VNET_DEFINE(int, ip6stealth) = 0; @@ -317,7 +317,7 @@ SYSCTL_INT(_net_inet6_ip6, IPV6CTL_USETEMPADDR, use_tempaddr, SYSCTL_BOOL(_net_inet6_ip6, IPV6CTL_USESTABLEADDR, use_stableaddr, CTLFLAG_VNET | CTLFLAG_RWTUN, &VNET_NAME(ip6_use_stableaddr), 0, "Create RFC7217 semantically opaque address for autoconfigured addresses (default for new interfaces)"); -SYSCTL_INT(_net_inet6_ip6, IPV6CTL_STABLEADDR_MAXRETRIES, stableaddr_maxretries, +SYSCTL_UINT(_net_inet6_ip6, IPV6CTL_STABLEADDR_MAXRETRIES, stableaddr_maxretries, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip6_stableaddr_maxretries), IP6_IDGEN_RETRIES, "RFC7217 semantically opaque address DAD max retries"); SYSCTL_INT(_net_inet6_ip6, IPV6CTL_STABLEADDR_NETIFSRC, stableaddr_netifsource, diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h index e511ead24f08..1414cc71388d 100644 --- a/sys/netinet6/in6_var.h +++ b/sys/netinet6/in6_var.h @@ -106,7 +106,7 @@ struct in6_ifextra { struct scope6_id *scope6_id; struct lltable *lltable; struct mld_ifsoftc *mld_ifinfo; - counter_u64_t dad_failures; /* DAD failures when using RFC 7217 stable addresses */ + u_int dad_failures; /* DAD failures when using RFC 7217 stable addresses */ }; #define LLTABLE6(ifp) (((struct in6_ifextra *)(ifp)->if_afdata[AF_INET6])->lltable) diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h index c28bfa5a9d08..db1631736c4a 100644 --- a/sys/netinet6/ip6_var.h +++ b/sys/netinet6/ip6_var.h @@ -344,7 +344,7 @@ VNET_DECLARE(bool, ip6_use_stableaddr); /* Whether to use stable address generat #define V_ip6_use_stableaddr VNET(ip6_use_stableaddr) #define IP6_IDGEN_RETRIES 3 /* RFC 7217 section 7 default max retries */ -VNET_DECLARE(int, ip6_stableaddr_maxretries); +VNET_DECLARE(u_int, ip6_stableaddr_maxretries); #define V_ip6_stableaddr_maxretries VNET(ip6_stableaddr_maxretries) #define IP6_STABLEADDR_NETIFSRC_NAME 0 diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index e2db192bca15..29151b29a071 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -77,6 +77,8 @@ #include #include +#include + #define SDL(s) ((struct sockaddr_dl *)s) struct dadq; @@ -1460,7 +1462,7 @@ nd6_dad_timer(void *arg) if ((ND_IFINFO(ifp)->flags & ND6_IFF_IFDISABLED) == 0) { ia->ia6_flags &= ~IN6_IFF_TENTATIVE; if ((ND_IFINFO(ifp)->flags & ND6_IFF_STABLEADDR) && !(ia->ia6_flags & IN6_IFF_TEMPORARY)) - counter_u64_zero(DAD_FAILURES(ifp)); + atomic_store_int(&DAD_FAILURES(ifp), 0); } nd6log((LOG_DEBUG, @@ -1509,10 +1511,10 @@ nd6_dad_duplicated(struct ifaddr *ifa, struct dadq *dp) * More addresses will be generated as long as retries are not exhausted. */ if ((ND_IFINFO(ifp)->flags & ND6_IFF_STABLEADDR) && !(ia->ia6_flags & IN6_IFF_TEMPORARY)) { - uint64_t dad_failures = counter_u64_fetch(DAD_FAILURES(ifp)); + u_int dad_failures = atomic_load_int(&DAD_FAILURES(ifp)); if (dad_failures <= V_ip6_stableaddr_maxretries) { - counter_u64_add(DAD_FAILURES(ifp), 1); + atomic_add_int(&DAD_FAILURES(ifp), 1); /* if retries exhausted, output an informative error message */ if (dad_failures == V_ip6_stableaddr_maxretries) log(LOG_ERR, "%s: manual intervention required, consider disabling \"stableaddr\" on the interface" diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c index f9684b085767..10f0342f2bc4 100644 --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -74,6 +74,8 @@ #include #include +#include + static struct nd_defrouter *defrtrlist_update(struct nd_defrouter *); static int prelist_update(struct nd_prefixctl *, struct nd_defrouter *, struct mbuf *, int); @@ -1756,7 +1758,7 @@ prelist_update(struct nd_prefixctl *new, struct nd_defrouter *dr, * to fail and no further retries should happen. */ if (ND_IFINFO(ifp)->flags & ND6_IFF_STABLEADDR && - counter_u64_fetch(DAD_FAILURES(ifp)) <= V_ip6_stableaddr_maxretries && + atomic_load_int(&DAD_FAILURES(ifp)) <= V_ip6_stableaddr_maxretries && ifa6->ia6_flags & (IN6_IFF_DUPLICATED | IN6_IFF_TEMPORARY)) continue; From nobody Fri Oct 3 11:09: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 4cdQs84qrYz69Vmv; Fri, 03 Oct 2025 11:09:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdQs844Xhz3MXR; Fri, 03 Oct 2025 11:09:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759489740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j/U1XQ6MaszWJ/yfmHds/TMLldb2OUgrcIK3KZWRjuM=; b=iFYzVK588uf4NRkcQTRznIcSG3V04vm1K8KEgvxaH+iOwe3yGck0U6eVrZ2JGWM7EsWzg+ f5eoM0IovfdwU//GGD2KYRIFoaEIwtungK3Sbf45cgLPJ2q0d8bX8OYl1Cp3t0Ad/LAGxS BQTnuJqAGz04b9lOb6YOhIseQxlePRqUG9TGMZxq9hbw5rRRIyg6kGl3hSLe0dO6+Hv9Mn /xWll9oxPVHOX/zyFldWokXcf3wSp3twrvAJ6L4UcsGQqbNQVAt665NFr8kjQ0q7ECIaVk 95FiAYRm+TNcf+Xyx60JKoDr9xvIea5lcUoyBT+oE2R2iLtDEJb4QvfPWnG80g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759489740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j/U1XQ6MaszWJ/yfmHds/TMLldb2OUgrcIK3KZWRjuM=; b=fmx81cDu2kgXLERd3RmIhdqQ/DsY02CwCI3hjlcBYhLyCvc2A6MGDU452X8LZSHA2tY2w7 j0U0zDrA6WbGyFC+r8UUvqLFA1pfKMonCfodAs9pTrc2U40mUgCCi5j7TcoTWmK6e/85Zy 3Os0cr2QA0GSS+9nhrz1B5yib+9NAc3gu/EKlrjTVUocyjO/1g0ug+Tud/BbQ72Fqsm7tj 0SXdCHvxpvjtcuJyP5K54Eou+q2IdkkbV3Y6o+on3DfrWDUzdwOzUd09uDIqO2tpJ8SJU2 5BRT6VUkZNaY6O2T4SJjfJNr/D41MFmil34E9U55in3rCdmKTXn0I4ymyh6UVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759489740; a=rsa-sha256; cv=none; b=kg+PZDlv55BYGn4ZK6lVPwtkowLhQAAp73sMiEkDyKncYWE6SVGOZFY4opjsEgwi1C61+F kXuv9kEDyY3cK4rpp8zGu/CPYAYqcUjbUV27BtI8V6t7TJG9WSOt00MprrZ1ImUt+O0SfM QR9ICymgTSgvRpROppTR3/B0l385MgCArCyD6S/AwW0RG14W/8yr92Yj+SEIiJsRnnwmx/ e8iRCkbrWFG5Nz17lozWZOjTKEReqWGnZxrtpZujx7769uBorWGZscMZQBisDnSwOSAm+Y R8pVCvCnDKckn/LysJ1lKBGZMVKmPcmO7k4H0aSQC2rhPL8DUudeCaeBR/74hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdQs83dKDzsSF; Fri, 03 Oct 2025 11:09:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593B90Y6006854; Fri, 3 Oct 2025 11:09:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593B90qg006851; Fri, 3 Oct 2025 11:09:00 GMT (envelope-from git) Date: Fri, 3 Oct 2025 11:09:00 GMT Message-Id: <202510031109.593B90qg006851@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Cochard Subject: git: 01d5a6f30ce8 - main - tests/ipfw: Update regression tests to match new 32-bit size rule numbers 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: olivier X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 01d5a6f30ce8f5006bd9d5528a487ef4d79c48c3 Auto-Submitted: auto-generated The branch main has been updated by olivier: URL: https://cgit.FreeBSD.org/src/commit/?id=01d5a6f30ce8f5006bd9d5528a487ef4d79c48c3 commit 01d5a6f30ce8f5006bd9d5528a487ef4d79c48c3 Author: Olivier Cochard AuthorDate: 2025-10-03 10:56:27 +0000 Commit: Olivier Cochard CommitDate: 2025-10-03 11:06:49 +0000 tests/ipfw: Update regression tests to match new 32-bit size rule numbers Commit 4a77657cbc01 increased the size of several opcodes to ipfw_insn_u32. Approved by: ae Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D52876 --- sbin/ipfw/tests/test_add_rule.py | 25 +++++++++++++------------ tests/atf_python/sys/netpfil/ipfw/insns.py | 19 +++++++++++-------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/sbin/ipfw/tests/test_add_rule.py b/sbin/ipfw/tests/test_add_rule.py index 60c8cebaceaa..c2c4bf0b360c 100755 --- a/sbin/ipfw/tests/test_add_rule.py +++ b/sbin/ipfw/tests/test_add_rule.py @@ -36,6 +36,7 @@ from atf_python.sys.netpfil.ipfw.insns import InsnProb from atf_python.sys.netpfil.ipfw.insns import InsnProto from atf_python.sys.netpfil.ipfw.insns import InsnReject from atf_python.sys.netpfil.ipfw.insns import InsnTable +from atf_python.sys.netpfil.ipfw.insns import InsnU32 from atf_python.sys.netpfil.ipfw.insns import IpFwOpcode from atf_python.sys.netpfil.ipfw.ioctl import CTlv from atf_python.sys.netpfil.ipfw.ioctl import CTlvRule @@ -152,8 +153,8 @@ class TestAddRule(BaseTest): NTlv(IpFwTlvType.IPFW_TLV_TBL_NAME, idx=2, name="BBB"), ], "insns": [ - InsnTable(IpFwOpcode.O_IP_SRC_LOOKUP, arg1=1), - InsnTable(IpFwOpcode.O_IP_DST_LOOKUP, arg1=2), + InsnU32(IpFwOpcode.O_IP_SRC_LOOKUP, u32=1), + InsnU32(IpFwOpcode.O_IP_DST_LOOKUP, u32=2), InsnEmpty(IpFwOpcode.O_ACCEPT), ], }, @@ -182,7 +183,7 @@ class TestAddRule(BaseTest): ], "insns": [ InsnIp(IpFwOpcode.O_IP_DST, ip="1.2.3.4"), - Insn(IpFwOpcode.O_EXTERNAL_ACTION, arg1=1), + InsnU32(IpFwOpcode.O_EXTERNAL_ACTION, u32=1), Insn(IpFwOpcode.O_EXTERNAL_DATA, arg1=123), ], }, @@ -199,8 +200,8 @@ class TestAddRule(BaseTest): ], "insns": [ InsnIp(IpFwOpcode.O_IP_DST, ip="1.2.3.4"), - Insn(IpFwOpcode.O_EXTERNAL_ACTION, arg1=1), - Insn(IpFwOpcode.O_EXTERNAL_INSTANCE, arg1=2), + InsnU32(IpFwOpcode.O_EXTERNAL_ACTION, u32=1), + InsnU32(IpFwOpcode.O_EXTERNAL_INSTANCE, u32=2), ], }, }, @@ -227,7 +228,7 @@ class TestAddRule(BaseTest): ], "insns": [ InsnComment(comment="test comment"), - Insn(IpFwOpcode.O_CHECK_STATE, arg1=1), + InsnU32(IpFwOpcode.O_CHECK_STATE, u32=1), ], }, }, @@ -241,9 +242,9 @@ class TestAddRule(BaseTest): NTlv(IpFwTlvType.IPFW_TLV_STATE_NAME, idx=1, name="OUT"), ], "insns": [ - Insn(IpFwOpcode.O_PROBE_STATE, arg1=1), + InsnU32(IpFwOpcode.O_PROBE_STATE, u32=1), Insn(IpFwOpcode.O_PROTO, arg1=6), - Insn(IpFwOpcode.O_KEEP_STATE, arg1=1), + InsnU32(IpFwOpcode.O_KEEP_STATE, u32=1), InsnEmpty(IpFwOpcode.O_ACCEPT), ], }, @@ -259,7 +260,7 @@ class TestAddRule(BaseTest): ], "insns": [ Insn(IpFwOpcode.O_PROTO, arg1=6), - Insn(IpFwOpcode.O_KEEP_STATE, arg1=1), + InsnU32(IpFwOpcode.O_KEEP_STATE, u32=1), InsnEmpty(IpFwOpcode.O_ACCEPT), ], }, @@ -370,7 +371,7 @@ class TestAddRule(BaseTest): ), pytest.param(("pipe 42", Insn(IpFwOpcode.O_PIPE, arg1=42)), id="pipe_42"), pytest.param( - ("skipto 42", Insn(IpFwOpcode.O_SKIPTO, arg1=42)), id="skipto_42" + ("skipto 42", InsnU32(IpFwOpcode.O_SKIPTO, u32=42)), id="skipto_42" ), pytest.param( ("netgraph 42", Insn(IpFwOpcode.O_NETGRAPH, arg1=42)), id="netgraph_42" @@ -386,7 +387,7 @@ class TestAddRule(BaseTest): ), pytest.param(("tee 42", Insn(IpFwOpcode.O_TEE, arg1=42)), id="tee_42"), pytest.param( - ("call 420", Insn(IpFwOpcode.O_CALLRETURN, arg1=420)), id="call_420" + ("call 420", InsnU32(IpFwOpcode.O_CALLRETURN, u32=420)), id="call_420" ), # TOK_FORWARD pytest.param( @@ -400,7 +401,7 @@ class TestAddRule(BaseTest): ), pytest.param(("reass", InsnEmpty(IpFwOpcode.O_REASS)), id="reass"), pytest.param( - ("return", InsnEmpty(IpFwOpcode.O_CALLRETURN, is_not=True)), id="return" + ("return", InsnU32(IpFwOpcode.O_CALLRETURN, is_not=True)), id="return" ), ], ) diff --git a/tests/atf_python/sys/netpfil/ipfw/insns.py b/tests/atf_python/sys/netpfil/ipfw/insns.py index 12f145f49393..f8a56de901ae 100644 --- a/tests/atf_python/sys/netpfil/ipfw/insns.py +++ b/tests/atf_python/sys/netpfil/ipfw/insns.py @@ -510,7 +510,7 @@ class InsnIp6(Insn): insn_attrs = prepare_attrs_map( [ - AttrDescr(IpFwOpcode.O_CHECK_STATE, Insn), + AttrDescr(IpFwOpcode.O_CHECK_STATE, InsnU32), AttrDescr(IpFwOpcode.O_ACCEPT, InsnEmpty), AttrDescr(IpFwOpcode.O_COUNT, InsnEmpty), @@ -521,16 +521,19 @@ insn_attrs = prepare_attrs_map( AttrDescr(IpFwOpcode.O_COUNT, InsnEmpty), AttrDescr(IpFwOpcode.O_QUEUE, Insn), AttrDescr(IpFwOpcode.O_PIPE, Insn), - AttrDescr(IpFwOpcode.O_SKIPTO, Insn), + AttrDescr(IpFwOpcode.O_SKIPTO, InsnU32), AttrDescr(IpFwOpcode.O_NETGRAPH, Insn), AttrDescr(IpFwOpcode.O_NGTEE, Insn), AttrDescr(IpFwOpcode.O_DIVERT, Insn), AttrDescr(IpFwOpcode.O_TEE, Insn), - AttrDescr(IpFwOpcode.O_CALLRETURN, Insn), + AttrDescr(IpFwOpcode.O_CALLRETURN, InsnU32), AttrDescr(IpFwOpcode.O_SETFIB, Insn), AttrDescr(IpFwOpcode.O_SETDSCP, Insn), AttrDescr(IpFwOpcode.O_REASS, InsnEmpty), - AttrDescr(IpFwOpcode.O_SETMARK, Insn), + AttrDescr(IpFwOpcode.O_SETMARK, InsnU32), + + AttrDescr(IpFwOpcode.O_EXTERNAL_ACTION, InsnU32), + AttrDescr(IpFwOpcode.O_EXTERNAL_INSTANCE, InsnU32), @@ -545,11 +548,11 @@ insn_attrs = prepare_attrs_map( AttrDescr(IpFwOpcode.O_IP_DST, InsnIp), AttrDescr(IpFwOpcode.O_IP6_DST, InsnIp6), AttrDescr(IpFwOpcode.O_IP6_SRC, InsnIp6), - AttrDescr(IpFwOpcode.O_IP_SRC_LOOKUP, InsnTable), - AttrDescr(IpFwOpcode.O_IP_DST_LOOKUP, InsnTable), + AttrDescr(IpFwOpcode.O_IP_SRC_LOOKUP, InsnU32), + AttrDescr(IpFwOpcode.O_IP_DST_LOOKUP, InsnU32), AttrDescr(IpFwOpcode.O_IP_SRCPORT, InsnPorts), AttrDescr(IpFwOpcode.O_IP_DSTPORT, InsnPorts), - AttrDescr(IpFwOpcode.O_PROBE_STATE, Insn), - AttrDescr(IpFwOpcode.O_KEEP_STATE, Insn), + AttrDescr(IpFwOpcode.O_PROBE_STATE, InsnU32), + AttrDescr(IpFwOpcode.O_KEEP_STATE, InsnU32), ] ) From nobody Fri Oct 3 11: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 4cdR4F6q5Sz69X2C for ; Fri, 03 Oct 2025 11:18:37 +0000 (UTC) (envelope-from andcarvaja@yahoo.fr) Received: from sonic313-55.consmr.mail.ir2.yahoo.com (sonic313-55.consmr.mail.ir2.yahoo.com [77.238.179.239]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdR4D3sHnz3Nwj for ; Fri, 03 Oct 2025 11:18:36 +0000 (UTC) (envelope-from andcarvaja@yahoo.fr) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.fr header.s=s2048 header.b=B2Ru5Hy9; dmarc=pass (policy=reject) header.from=yahoo.fr; spf=pass (mx1.freebsd.org: domain of andcarvaja@yahoo.fr designates 77.238.179.239 as permitted sender) smtp.mailfrom=andcarvaja@yahoo.fr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.fr; s=s2048; t=1759490313; bh=GWvhQ6DpSW1s1quMpFEdIMJvEJ9EI7P5hSWUOIo6IRI=; h=Date:From:To:Subject:References:From:Subject:Reply-To; b=B2Ru5Hy9dlVEB+ScEKnGCPa2QNszVfHizKlvNORM22LS6YhuI6SIOHyfuuRvxlK2S+Grjkqm9jmu2uOVwNUkNWKNtQxUjGoLnvfsdzzP/vziYt79VI4hTP4GFSNwuX/DbRjWjqbO3CuL595EDZj9SS7SEljir4tSQxxA9epQ1q2uVacthg/Q6YupAjktT/KVidS92sE2MCMp9PZMctR9UqE8mwMwpp7hzJMeFkhgbDfVOWd+30SkUd4AvLQsORscEHjCHWMCCIrFCF3OSVmHKQO0tndQLOVk7K3dXVADjZQItloi+fuXsxj1hq8FDp7nLTRFskF5QwiPtqA8iktzLg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1759490313; bh=2bWIWCLDDImkinTAvmM3aEeus4QO5kARRzzVBuuBKff=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=CorwO+lNrZlCRadVkP9IAH8/VXhuTu6qafhmyphwg6zCokVDVVD6/g7lNqNpMDid5vkKqydFFaDVBP/zsba4h9/+acvnCtM7lRsnEnbvsWWkRRBnZ9YL/xXls+EJbW4ZbkboKgfxvMq0m5jMuze21euopGU3xqFoDq3ALmimR62+BJPZOMoQdPRQ5WpCWPKZqP5XLs2keGwl+kf9HjxsXJhAEqwyPUOQ7vjrl+6H558exLi0GlpmOI9ioEaQGRCdqZ/5JkL054RxtjjWsYLNMtpPHFj5diFM8iWUclU2dG7ETmHhLdy+L7seO8KuoOhdkdwVtJe10kWg+miCjKRxgw== X-YMail-OSG: UhZGaFsVM1leTRTPV.vMlc5FYZ2P85WnAav7b9hgiIKxa9oe4hKmHs2jNIlnJgd ezr6vLDJH7V4YmHrcl85aWKlhas9fiAo1RxQf2YXCSNWzBk9y7GqVA5ifgZWN.ShnoUNiivkKbzH j5hkfka2rZSiGNHEOULxwOppvU4MQDvmTWnARqcV5J5jzZXdJIsa0xr9bRCKZ8VCoawvGTQYAkJS 9JhO3YQtZXt.Ie.MdIUGoUWjj1P48ilNousEmKmtAwOfk106cBhfduMOsoNAS_gxuJY2bz9yxwG6 IJd9LkCvDMI5Y_foVfEm0Nitw3Uco5sfeuF_U.GNbN5HXZgx9cxsVMu_2lF2y4pzaFsKPO64cpwg i.st8RUhWne1GsSy4y.Gnh45NRNTLKhQQytUh0.QzMl9bxmJ.Z086sdyacNANWKuBNBKdVqCtfX5 olRhquwe7Frqmdyun_6Xp_Z38kF3xbPkDcCvn_wFggI0I7ONpjDQKKu9iE7fTHwXnQylYAG0Xd2j jmQNUGeD2wg71uL7HCIef2HV57ISSOyDP6OmUvuV7lZU8jHlJl857AZ7lyReHM.YxwxamGYxWYh7 Czf6h9rdTyRrqfC5uGH_698Qtb0TwUJAf9r6jOJm65TekLLKPcmwhXzmTMROT84lHB86LqUc4.Vu U1MT1z32chcnVFlTJLVSOzNvKYNjco7mypKmn.D5rCrzphTFLYfMft36JH7JPz_1AHapxP.GvJ8h E40UfoooZcDNlYcxh77wZJSzJyGzrUIN9PJyuCRk3hcIlNHGTuGCEO5advWOlukkilLh3Kb7aI1l Q0H.uIAXRDifGyU3CUkervxpwHisJeNH7NqvJis5_xcfSl9pT0io_Wi16r09CC43kn05MZrTqAOv QotohWq0tLfR.c3uhprATStMQui_CkEjsToRNzJPI0FWJDLNwr4.l_54TEK4j9mXLEv6SmoHjl0i 7QmHsLjYtGmwo4uwH41rZKDDwh9S1TWA832pQvct9SX5pmLvk8Po6xDDcvUNB3RmxX.YFNlDT.oH ysSeRYoX0d23KvAymxwC.t7hTnHCW1vf8uwOg3lnyJ_T3Ri8w5Qjzy_Bkd0EngnyJk3FdQZbTwwJ QI4yp8MlOXj7H_D9crBvfhDbV1ybGKUvOpRQBPKSl1Ts9Odf7kxiYLZkWstUwFw1h7JvtyUfrbRi 5pN6jhbZXgkfEsYt_XigQNs4R2DCcBFY3NJhh9fk66jPJNNFxAIEo50NtYPoEICpAM4AxM3D8q9i 7bBknOSF.YCtZD6QHUQbw8NS_jS7jj4VxnDJhE7BLWZt2ahrMutGmO4B9RrhcC334gAkRFIS82Rb UmJc6GeeVo3IB2EyOGZ2z9oBaDQ_GqkKdLUqNTSUldUH14L2tRgjDxVJV51wlK99K5TJ5eyRtSoV O06MDixOFFEx9LLymkjhf_eXyIKtdCeqh0z9O68VqTywdVLwuMqEpV7A9snE52rY8X913keF_FxV FuD91LkuKiM_AoQzhJtZuGsOrV2GxUFRC7T2XIT.PtkXgN1uBZst9jzBgzjy5hJD3dNnhFd4pg5r U6gITrxNQlBpWdHVeWkgst4rAERtK2WqWWKFv2TukaTUsoLjWhJpTbLsHIoEb.84H0JPPM8rNuI4 I7D5lDzGD8G9L3_KhQ.W4jrMPEHVbdD8QWBshXfAkQR8kTBre2CTzjqEOxfbG2JiZIFjre4CbZnh SzfnIXKgP0G28luK_8Ml6NUSC2_asAwsTHSdIH4KHxm42lgfK2IzZoTOBFz5lLoAeRRIRckslzx8 E5v_RS49mpXSKUU.EluJbil8J.BxKhJ5_y8D8GX7lu6zD2OThXjXQxTISpwvEZS.0NWUza.F1GwJ 3b_Qjg7tIFPpt4bMbXox_mrSQbNxSJpKTnziDWcUC.mwzpi65iqly_qpFMWwYvYuj0NoUEVFML8B mAuFlxnzwsYfsKYuiHDHvNi00GpDxT6t4rkBhcUb_FNWjmSQ6VsrgEHn.g1d00D16DqhhDVo.VBJ kp9olCcSi9HP9d563oGVC.lpl5iFxWwr6VEewozTa.IMib1MkjQd9RjQwsHa93tVkieTyB0PZOJE ix9.UqZ7TaUaKUuPBfFr_707FgwYhlwzPj9kpaOVEmhxcDZRCRultErsH05MyDKGq8jvXN1fCjQg RCOmVWF7YXRc35Z_PqGhpeis51h5CxCtr8AFuRsLr6EdwT3aoDHVmUIT0xOLKxggE4VLjshOqtlW 4USTbQamU3YUNVmhhcEeQBz.H7_tJ1OFA19fHeJ5sO_bHlsDcBg2801yLNQ6laocCHorFTVsSV5U VcdglfHgcExCd4_UG_pQ- X-Sonic-MF: X-Sonic-ID: e16f4989-ded3-433a-ba0f-bf7765e853c5 Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.ir2.yahoo.com with HTTP; Fri, 3 Oct 2025 11:18:33 +0000 Date: Fri, 3 Oct 2025 11:16:32 +0000 (UTC) From: ANCA To: "dev-commits-src-main@freebsd.org" Message-ID: <380394877.6127033.1759490192775@mail.yahoo.com> Subject: unsuscribe 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: multipart/alternative; boundary="----=_Part_6127032_1755995595.1759490192774" References: <380394877.6127033.1759490192775.ref@mail.yahoo.com> X-Mailer: WebService/1.1.24485 YMailNovation X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.77 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_SHORT(-0.77)[-0.769]; DMARC_POLICY_ALLOW(-0.50)[yahoo.fr,reject]; R_DKIM_ALLOW(-0.20)[yahoo.fr:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_FROM(0.00)[yahoo.fr]; TO_DN_EQ_ADDR_ALL(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.fr]; RCVD_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[77.238.179.239:from]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; DKIM_TRACE(0.00)[yahoo.fr:+] X-Rspamd-Queue-Id: 4cdR4D3sHnz3Nwj ------=_Part_6127032_1755995595.1759490192774 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit ------=_Part_6127032_1755995595.1759490192774 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

------=_Part_6127032_1755995595.1759490192774-- From nobody Fri Oct 3 14:23:30 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdW9Z4LFsz69vBG; Fri, 03 Oct 2025 14:23:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdW9Z3pYXz3mTR; Fri, 03 Oct 2025 14:23:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759501410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TCPJ0+1b6q0AeK5znYTDwmf3X5HhU/lqxtM+pFb1MfI=; b=PEao1BzqMC88KSq8tb0dFZELnauSHNc3bagUftoufEt4ca9S1O3j2R1Fuq3WSxY7aveON6 FAzkgcWPt+xmFn69Gw/z5KRQvo2EGTST4HMNWF1qJjWAGEDkEebbeseYy41vOiXraM6Gdk rRrmVpBxQOUPj5DZkBI+wm4W1UwWbGopS0mcLtRZyuQg5REE1t0lIIIjDeUqBawr5vOGt7 Ab5ki7VGa0jlLsQ24ZTYvFbAaVNI60KLu+62Lz50g5DcJEA4JdBb72u6p/MdO+XPDM7s3W 2CXvQCMKBtcIPFBUZESImZJBW5vBqXQx+dIdSnfiEyZxlNBO9qRxolz9P0PFXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759501410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TCPJ0+1b6q0AeK5znYTDwmf3X5HhU/lqxtM+pFb1MfI=; b=ZPwfanmOQG2ERnreSbKg1rmPTDoGAxU7+MVkUH02x4hprUiF78eEVNgJEowm9BIybomiWS G/5Xmhs9Rwkw4EmllHfoTcUQs4TwbKNm/i1QT0zYQPQa/k5AV0GqSqCb8MSQHZau9YepGK 8zZmxFl5MI4FunY1zOEi+sPEU9hXfufl1Jn8jqdU7DvrBTHS9lFMxYNrnQ53Qa0dnE25Wn MrWXk3jacVZZWhsICAn1SVp3gRExWEmFlb5wU2/6puUuGgBVWmiFVjTt/SUFQZlYMI+snS Pql74M75Q1E0KpFGtJiG+st6kCoHW80foIj7/WucfkEg2MiNtncEnQ6nPSW0Eg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759501410; a=rsa-sha256; cv=none; b=wOW+uz0SevDNzJqCO8TH5sfuY6MDO+KXE3pg5F3NMW0aYHAbHtxxmh/8ZDn7WMkPtcRDXm BTCiDwpy+jhlHHChoBuCpAL4RXTE1rODoYxjdPGt8TXuvHZ9npfZmuAaYEC1xy0YJhC6cV wnn14D0NYs1MM+p9eeQb6MjMtkOEAfpkhekgsUZPvWRtksyLXzp9L7yLH594yqPwUOZaGN HzAtGQdB1vvQt49ryWHvEW92mXE47LJUNN7mH4OMnzKOb22RiE9eyp/6/4htkEqYdXzHJg 0zHGbzmF9uuBeVNf8atxY7E+N1Cvg6aaepyNhQ/m4400hVIT+akyyzcC21YWLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdW9Z39V1zymC; Fri, 03 Oct 2025 14:23:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593ENU8A082058; Fri, 3 Oct 2025 14:23:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593ENUvJ082055; Fri, 3 Oct 2025 14:23:30 GMT (envelope-from git) Date: Fri, 3 Oct 2025 14:23:30 GMT Message-Id: <202510031423.593ENUvJ082055@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 65e2ce55b662 - main - vmimage.subr: fix typo in checking NO_ROOT var List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 65e2ce55b662447fb4e87246262c07bf5a25efe9 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=65e2ce55b662447fb4e87246262c07bf5a25efe9 commit 65e2ce55b662447fb4e87246262c07bf5a25efe9 Author: Siva Mahadevan AuthorDate: 2025-07-15 16:45:24 +0000 Commit: Ed Maste CommitDate: 2025-10-03 14:23:07 +0000 vmimage.subr: fix typo in checking NO_ROOT var Reviewed by: imp Fixes: 08b497dc6c4d ("vmimage.subr: Support NO_ROOT pkgbase") Signed-off-by: Siva Mahadevan Pull-request: https://github.com/freebsd/freebsd-src/pull/1867 Sponsored by: The FreeBSD Foundation --- release/tools/vmimage.subr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr index 27cca78be6e3..3b0519c21dbc 100644 --- a/release/tools/vmimage.subr +++ b/release/tools/vmimage.subr @@ -95,7 +95,7 @@ vm_install_base() { pkg_cmd="pkg --rootdir ${DESTDIR} --repo-conf-dir ${PKGBASE_REPO_DIR} -o ASSUME_ALWAYS_YES=yes -o IGNORE_OSVERSION=yes -o ABI=${PKG_ABI} -o INSTALL_AS_USER=yes " - if -n "${NO_ROOT}" ]; then + if [ -n "${NO_ROOT}" ]; then pkg_cmd="$pkg_cmd -o METALOG=METALOG" fi $pkg_cmd update From nobody Fri Oct 3 14:31:13 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdWLT4sfHz69vvc; Fri, 03 Oct 2025 14:31: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 4cdWLT4QNNz3ny6; Fri, 03 Oct 2025 14:31:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759501873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ptl/fWuQHYf5jv4IAp+lQlMVcfhYY1WOfCa0JYcAkiQ=; b=Q+VmPdgSI5H6CKqSAf05396FiRc7aghs+am+D5XXfJcrLhqr2Ppg3bpKimSclu1nQU6cDb QfXlSlauU+xIiZ/4fbH3Tfff4YML2x456cunklaPQc72Q/bGXreIBUdHCIWT4efnhTRTwR 8uuKikn6uTeiXHaF8XJrLhLrqW7cNqvKcoZO7ZOS1JT8aF6ugXs0W7hD6ULOy4ydGLVowF VghQGH1HoOCrJ5oB60xzyWm0+FUonvBpAC3+gNpfWaljgaWtqXtoexcQL8IEDIQNKZJOvU umFrBNzzt1HtU6ABeskCLL0/QaO5BhFKbpe3ZrVOR49PKxD9+3CAZnoCXwzxzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759501873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ptl/fWuQHYf5jv4IAp+lQlMVcfhYY1WOfCa0JYcAkiQ=; b=hk7eJi/PL6p3xwHUAngPQWvcYBM8i5gs5JDKa9xaDhjWu3UtpNjdvk4fqZf1XseMijISwj CFIqGN8hQhXpTm5dWAXDV3E3QgJr8OGrv8QSJzvlcDB6K/lvboOu5Z8C51vmBWQcgbmtff 8BnftaprvNxw99IH5n+UG/hLKdGwAhHgnNqoFAAQxNte7SR4VY4g3rVVqYytw+6tQyOg9k fWQlYRL4XOdrI5o/RrN1JRqcf/BwdomlumYlAh9AHCA598nLiZYri3QxKWXioErl2GoYcE b9MfcxBAQEwa5DEjagljhLUoUpw6DVdIsw2ucH3LfC4lnrjdIwwRn4nbF9qQZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759501873; a=rsa-sha256; cv=none; b=SULK9k0ZV/oiEZGPs84UIbf4zZzdytp7jNhXmikwyQZBWod1WjmxoRvCAQvjvTge+wPVh1 dvC7C4TcJ3bYWl/iFjNpvYZ3/5nESz/m/Ob0RL/GOaF7M0qrI99Pezso74+tarZ0wnPF/6 yDb7KSCsEn1mXTyp4RHsYl/sU3usCTciKnMh+4Jodi2Wi1ovKPI/CH++7d8b8W2+/Mo/CS M5DjdaKaaJPRdefBA3W6w4DZQhfTuasIJwPH1U5PcGci4EHbpRn4Bp81gNFGUMPhGf09Yc 16YysrqwjJ13CJpp+lcdJtQt4MF9EuvW/ploLTHOztXy1ZocsBH4pH2K4of1Ww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdWLT41WszydF; Fri, 03 Oct 2025 14:31:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593EVDJG093049; Fri, 3 Oct 2025 14:31:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593EVDb4093046; Fri, 3 Oct 2025 14:31:13 GMT (envelope-from git) Date: Fri, 3 Oct 2025 14:31:13 GMT Message-Id: <202510031431.593EVDb4093046@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: ac1408bd1d2d - main - release: Consolidate pkgbase-repo dependency List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ac1408bd1d2d3f2bb2d8c77e91420fe9e66926ca Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ac1408bd1d2d3f2bb2d8c77e91420fe9e66926ca commit ac1408bd1d2d3f2bb2d8c77e91420fe9e66926ca Author: Ed Maste AuthorDate: 2025-06-23 14:53:02 +0000 Commit: Ed Maste CommitDate: 2025-10-03 14:30:52 +0000 release: Consolidate pkgbase-repo dependency Use the same approach for pkgbase-repo-dir as for the packagesystem dependency. Reviewed by: Isaac Freund Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52884 --- release/Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/release/Makefile b/release/Makefile index 70e5795bae0f..76a99ffdf3f3 100644 --- a/release/Makefile +++ b/release/Makefile @@ -201,6 +201,11 @@ disc1: packagesystem bootonly: packagesystem dvd: packagesystem .endif +.if !defined(NOPKGBASE) || empty(NOPKGBASE) +disc1: pkgbase-repo-dir +bootonly: pkgbase-repo-dir +dvd: pkgbase-repo-dir +.endif pkgbase-repo: mkdir -p pkgbase-repo @@ -214,7 +219,7 @@ pkgbase-repo-dir: pkgbase-repo ${.OBJDIR}/pkgbase-repo/${PKG_ABI}/latest \ > pkgbase-repo-dir/FreeBSD-base.conf -disc1: ${PKGBASE_REPO_DIR} +disc1: # Install system mkdir -p ${.TARGET} ( cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \ @@ -279,7 +284,7 @@ disc1: ${PKGBASE_REPO_DIR} echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG touch ${.TARGET} -bootonly: ${PKGBASE_REPO_DIR} +bootonly: # Install system mkdir -p ${.TARGET} ( cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \ @@ -323,7 +328,7 @@ bootonly: ${PKGBASE_REPO_DIR} echo "./boot/loader.conf type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG echo "./etc/rc.local type=file uname=root gname=wheel mode=0644" >> ${.TARGET}/METALOG -dvd: ${PKGBASE_REPO_DIR} +dvd: # Install system mkdir -p ${.TARGET} ( cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \ From nobody Fri Oct 3 14:32:22 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdWMp3Ffmz69wGk; Fri, 03 Oct 2025 14:32:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdWMp2YL0z3pbc; Fri, 03 Oct 2025 14:32:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759501942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2GBc0rR1tq1ka8XS0lMilevXnL1ZkmKMSJIf7nPoBsI=; b=pIx9cF3WyzFaP4t5t4UcVOvOlstvC5lcCh8FCx0SooPBirHXjYTduSc4i6gvNiZPanKaL0 Ft19ACyXX15KXBni6FP1MedQ6VRYCsdNyGalgBTztUNP2a+mQemJjGAZZMKILrce6Ax1tm rhrW7w4+f7SE1k6K5Ne+mctcnNKpEo8o3V43PWr0r1aOD9y07hCasgv4BKXxt2d59HU85+ wZ80P0iqkHiiF7Ycvp3RuYeRFKhwqEPTcoHj0Xspr4OKjgCidk53MF2nL7ltbonM2pgtbA PkC/3MyytkrNy6q8xoh7kp+JDcROsOf8seh9noPeb20nD2YTQxD37VcwE2k8iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759501942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2GBc0rR1tq1ka8XS0lMilevXnL1ZkmKMSJIf7nPoBsI=; b=ZCN10Pb5fMPYpXk8DndSICbsk4TgmdUFU1BLBkMHBNWSpdpPBQs/mlmkpINzMDKnm9aBs8 j1bI9Ti4ExfwB57J2WRzjayTB2SJu5J5ArD+2rrAKDU0C10QDhBnecPvjlQJW4BrAPFukR mBV84xUUIhPW4Hccf+6YEXeoF5AYXtz/PRwN3t8PBnhwEtYQ+8W8SyCI1ubDGOW4UFoiIO E7lsJDrMRqhXT7Xo9v2F4UE5Gh9hamrd0JoB0xH+V8VWcBCgvgf/nQtSrdSd0wV/NJVkaW etBYf/PAXLWNYDDzkuduxirkjtqUJ2HNrFHbIO4wT6iZ2yX2HNedtb8J26eXAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759501942; a=rsa-sha256; cv=none; b=dFOsrRB1aK8rfmUcrkiQwkpcEVGjlX/Y6uPbAnuhQq+T67dCg2UqqpJfdeZXVcK4WXGQoB iNWsLJ0oUagAqR5vy5ZnNVgBtpdrd4B4IuVo4Ygf44aO3E31NOWgNt1V5Qi0HOfUxfb8Iv Sn7Lfh2qB7w2kUNtvfciA2qXx2TIgs7w9oUJ77P1NVUBgU9X3Mh7A2lVmGVyZpFcdz+JCR ijcHiLGEwTWsvMD5o1D4ObusNUAP5vcX6xEG3Q/ZHvIYRTassrWtO8dOmifgh0Ck9HGJ04 RmGr9EvTl1e3INHw7vGTDJwLpMS2/6Rk6pjPHQJqyfNe4CRl7B4hfdus6TqQsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdWMp2004zygh; Fri, 03 Oct 2025 14:32:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593EWMPH097926; Fri, 3 Oct 2025 14:32:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593EWMTN097923; Fri, 3 Oct 2025 14:32:22 GMT (envelope-from git) Date: Fri, 3 Oct 2025 14:32:22 GMT Message-Id: <202510031432.593EWMTN097923@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 0952943a680d - main - netstat: Fix -ia missing multicast addresses on some interfaces 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: 0952943a680dca12fe8f65f8813a9dca0783ce88 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0952943a680dca12fe8f65f8813a9dca0783ce88 commit 0952943a680dca12fe8f65f8813a9dca0783ce88 Author: Nick Reilly AuthorDate: 2025-09-12 19:27:59 +0000 Commit: Mark Johnston CommitDate: 2025-10-03 14:32:09 +0000 netstat: Fix -ia missing multicast addresses on some interfaces sdl_data isn't always NULL terminated Signed-off-by: nreilly@qnx.com PR: 288958 Reviewed by: markj MFC after: 1 week --- usr.bin/netstat/if.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c index 622141e4ff69..7ee03eb3689b 100644 --- a/usr.bin/netstat/if.c +++ b/usr.bin/netstat/if.c @@ -282,7 +282,8 @@ next_ifma(struct ifmaddrs *ifma, const char *name, const sa_family_t family) sdl = (struct sockaddr_dl *)ifma->ifma_name; if (ifma->ifma_addr->sa_family == family && - strcmp(sdl->sdl_data, name) == 0) + sdl->sdl_nlen == strlen(name) && + strncmp(sdl->sdl_data, name, sdl->sdl_nlen) == 0) break; } From nobody Fri Oct 3 14:32:23 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdWMq3yGpz69wBS; Fri, 03 Oct 2025 14:32:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdWMq3978z3pJx; Fri, 03 Oct 2025 14:32:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759501943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o8TA9Jglg7F2wtPmjy3xx3/pcDK+gVqJAqAaV+flyCQ=; b=VW2XMHP2PvjldH6SugC4OuK0TZ1eURffHIviNeKbzd//ftAQ0onzfnMW7Q06BwoYT/EcuL 3YIamBoF447qQpZZdmWOz4F/wdviykS2m82z9U6Dz0yBPSvs7wZachJXTA2P7GsxgRYthO jy3IoKR0yVvLHn7/T70XU5WlVuQ0L3xZ3FsZLMO6To7v3CTyoXZU69+IBKItYzabBs8K7e Xpk/3/FwsEHMKtT7e4LuadIQ8hKMGagQmsThxFwEoum5GbUnzCYz7K/mXCe1pnMfHddEiA B/JLd9T7wsNHM6urwVYjECAHCqFyT5hkhVb9dE9UCLD0s9ukYOllOTh7XUzSKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759501943; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o8TA9Jglg7F2wtPmjy3xx3/pcDK+gVqJAqAaV+flyCQ=; b=uo2Gjpr+MXTwae3FMKu88p6i4+xCeDacv3IVWK0McVnROYOfUiGYl7DvrtDjhwt3pbP+6F Gc9ubBtwWy+vidhNlsK7NZmbydFukgj/14OHpYGqIWR3t+z8ahh27SDacrhH6f0gOtpp+X BqIKWI29iaCWxHFDiN4vh8KmUUJT5Htsa0ADwF5F2cKSZWV2LWnasxSRgtkqV+PcvkZ3o7 9L+Bs77AoX+lYCBYLXyZILeW8n6eP6wzcfKCPvTw/N5W94m73Ax5hwOh2P4yvNNOo/Jfs+ +JJH+fzM6QlN+GGlADyJ5rfvKseUIEXv2eSrppzmAEen+PLXzu8KnHoSHKyLZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759501943; a=rsa-sha256; cv=none; b=JuY94tf/8bvRWxn+n9qMIEirIGqe5Bb8w4UD7kINcBzRq2wic4DFhnTV/ralQPsmWDdXE9 rMOR4/DWSUR5bA/sduqIfZxoWdnoWhgUsuh6hdl5BX1Jhz6COPhGgntN8Mrs9lXAgl4ug+ 8hUf0nyW84wssePXVdaJbmDO0oxqMlpUtrETvDjTNhVSCpEoUeZUZRLM0rku48TPLMT5bC 17XQaDL1cfSHfumqrbxcvlP1lAi0nMenlwRiRVQcKJ9LqVqBbuiv8OMuOG5G9vC6c3T1J2 6C/BpLABnKF3Mh5cNSiyB7158w5XZvcImxocHmvD2ab74Ti3HnO/KMIHpa0QgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdWMq2bJWzyQ4; Fri, 03 Oct 2025 14:32:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593EWNIg097959; Fri, 3 Oct 2025 14:32:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593EWN2s097956; Fri, 3 Oct 2025 14:32:23 GMT (envelope-from git) Date: Fri, 3 Oct 2025 14:32:23 GMT Message-Id: <202510031432.593EWN2s097956@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 07747afd516e - main - linker: Make it easier to find the VNET section layout 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: 07747afd516e710814fdc65afb0e5000d046f28f Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=07747afd516e710814fdc65afb0e5000d046f28f commit 07747afd516e710814fdc65afb0e5000d046f28f Author: Mark Johnston AuthorDate: 2025-10-03 14:25:38 +0000 Commit: Mark Johnston CommitDate: 2025-10-03 14:32:09 +0000 linker: Make it easier to find the VNET section layout When trying to find the address of a VNET variable from a debugger, it helps to have the original address of the VNET section. In particular, given the address of a vnet_entry_foo symbol, one wants to easily find the linker file that the symbol belongs to. In link_elf_obj.c, the section address for VNET and DPCPU sections is overwritten in link_elf_link_preload() and link_elf_load_file(). Add an "origaddr" field to store the original absolute address of the section base. In link_elf.c the elf_file_t already has the fields we want, but they were not getting filled out for the kernel itself. Fix that too, since that simplifies things for debuggers and improves consistency. Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D52730 --- sys/kern/link_elf.c | 6 ++++++ sys/kern/link_elf_obj.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index bbebadc4c395..ebd203858b66 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -518,9 +518,15 @@ link_elf_init(void* arg) (void)link_elf_link_common_finish(linker_kernel_file); linker_kernel_file->flags |= LINKER_FILE_LINKED; TAILQ_INIT(&set_pcpu_list); + ef->pcpu_start = DPCPU_START; + ef->pcpu_stop = DPCPU_STOP; + ef->pcpu_base = DPCPU_START; #ifdef VIMAGE TAILQ_INIT(&set_vnet_list); vnet_save_init((void *)VNET_START, VNET_STOP - VNET_START); + ef->vnet_start = VNET_START; + ef->vnet_stop = VNET_STOP; + ef->vnet_base = VNET_START; #endif } diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index 151aab96f9be..a3a53a39bfd6 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -70,6 +70,7 @@ typedef struct { void *addr; + void *origaddr; /* Used by debuggers. */ Elf_Off size; int flags; /* Section flags. */ int sec; /* Original section number. */ @@ -492,7 +493,8 @@ link_elf_link_preload(linker_class_t cls, const char *filename, case SHT_FINI_ARRAY: if (shdr[i].sh_addr == 0) break; - ef->progtab[pb].addr = (void *)shdr[i].sh_addr; + ef->progtab[pb].addr = ef->progtab[pb].origaddr = + (void *)shdr[i].sh_addr; if (shdr[i].sh_type == SHT_PROGBITS) ef->progtab[pb].name = "<>"; #ifdef __amd64__ @@ -1088,6 +1090,8 @@ link_elf_load_file(linker_class_t cls, const char *filename, ef->progtab[pb].name = "<>"; if (ef->progtab[pb].name != NULL && !strcmp(ef->progtab[pb].name, DPCPU_SETNAME)) { + ef->progtab[pb].origaddr = + (void *)(uintptr_t)mapbase; ef->progtab[pb].addr = dpcpu_alloc(shdr[i].sh_size); if (ef->progtab[pb].addr == NULL) { @@ -1101,6 +1105,8 @@ link_elf_load_file(linker_class_t cls, const char *filename, #ifdef VIMAGE else if (ef->progtab[pb].name != NULL && !strcmp(ef->progtab[pb].name, VNET_SETNAME)) { + ef->progtab[pb].origaddr = + (void *)(uintptr_t)mapbase; ef->progtab[pb].addr = vnet_data_alloc(shdr[i].sh_size); if (ef->progtab[pb].addr == NULL) { From nobody Fri Oct 3 14:32:24 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdWMr5MYvz69w00; Fri, 03 Oct 2025 14:32:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdWMr40TXz3pW9; Fri, 03 Oct 2025 14:32:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759501944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3GKRcqcIm/06wuQ4Jby7a5ynnE8/TqjYheHenY4De+c=; b=FAO2joSdKybxk4viNW4huShGGKv6GwGHDwT9+mgnpPLWRmdWWzgV1Nisz7JCB/xV5EU3KW rpghl8u1cGPxmRdsflQhn9lvsJhpeLkjzDGgzWlOLt80eMaZV6SfxCqwnoBO640FnyS28a 2DQ0PiwN1HkJEwNZA0LfxBoIt//GWbqUD4DdeqrHU0FXaj9PNmt4jSVzJkdgZHTYUsbszl S/81Y30VZb9Or2yrXNlgtuXu6KqyHR9vVHl8oNt9fbBut5WIKoyhVkVBonEjF0oUpomMiV emCAwUf6xqqG5aqX0QbXiILQcGpka4ctv64f/h2CmL/o7PrSl4fyUSNPKTevOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759501944; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3GKRcqcIm/06wuQ4Jby7a5ynnE8/TqjYheHenY4De+c=; b=GGghAqGvBgFp7jvB/zZSD4IlNQn2b15hNfNNDhHk2YE+4d21UsheA/PX7uGN41HD11S3/o ulG8Kidf1+pgtNceBI8ErldkRAMCkK6b4t+FrlIfFOrIlRM8Ah1e+iYsx5c+tylJxihanu AmaVGa1WVx2u4u7ZPGr24mm+LqT9jfwQzA0BNnohuxObvVAWVItbZC0Bfdb6Dyy359EGzY CjKw6Jx5UPCGqUp44yEB0UkpQqoVF2eydIWfj43xLef4a7h9eKxUrB2dmxNqD8KUmmnHd4 gqhnp0dZSkaUio3idbv75IZFVd5gmAq6wcMzTnK/HRrEN6pJOndJXSh1KHU+UQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759501944; a=rsa-sha256; cv=none; b=r5cJlpySsEbYmgSzk9Knlaza6rD10RLanPTsr5P1ghE7qK519EAwPMWZyAiIRZ+gRxO8Yu PwcKgLGbDU3xKgvM4dn8L0mq+T2MjPtkmvLxVtcnPiEf1yYO51/3o5zKvippEhI3cQl6dB rt26TZntbJfygzaKvVP4zAR8rQW+3XTyvVYwnCiQFJkdd053Hn2NT8xjwkGOgUGF0npS4h i42ZHCaZ90Gwxm4X0Kn9y27O20V4+D3QC00+xfTq7YvNf5BuaRScNb0UFmQGmsH0TwfA+3 Qzfrw9pL2DPiQyeWMtfI5nPclRWaz3QlaprvEpSA2W7avRdYHOGcpMmQ4zSgFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdWMr3P2czyn7; Fri, 03 Oct 2025 14:32:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593EWOoZ097992; Fri, 3 Oct 2025 14:32:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593EWOIA097989; Fri, 3 Oct 2025 14:32:24 GMT (envelope-from git) Date: Fri, 3 Oct 2025 14:32:24 GMT Message-Id: <202510031432.593EWOIA097989@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: ea675a43f09b - main - libexec/kgdb: Add new modules and install them together with debug info 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: ea675a43f09ba569adf1dd17b4f1ced970e48de4 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ea675a43f09ba569adf1dd17b4f1ced970e48de4 commit ea675a43f09ba569adf1dd17b4f1ced970e48de4 Author: Mark Johnston AuthorDate: 2025-10-03 14:25:53 +0000 Commit: Mark Johnston CommitDate: 2025-10-03 14:32:09 +0000 libexec/kgdb: Add new modules and install them together with debug info This change simplifies integration of gdb python scripts with our kernel debugging infrastructure. Rather than putting debugging scripts in /usr/libexec/kgdb, move them to /gdb, and add a kernel-gdb.py which automatically loads modules from that directory. kernel-gdb.py will be automatically executed by kgdb when loading kernel debug symbols (assuming a default configuration), so one no longer needs to do anything to use these modules. The change also adds a couple of new modules, vnet.py and pcpu.py, for conveniently accessing VNET symbols and PCPU/DPCPU fields, respectively. Note that these require a change to the kernel linker when accessing symbols from a loadable kernel module. sys/tools/gdb/README.txt describes the scheme in more detail and provides some rudiementary documentation for the commands and functions added by these modules. It should be updated when adding new features. sys/tools/gdb/selftest.py can be used to do some primitive testing of the modules. All it does is execute a number of gdb commands making use of commands and functions added by these modules. The developer is expected to verify that the commands complete without errors and that the output looks sane. Discussed with: kp, avg, jhb, glebius MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D50825 --- ObsoleteFiles.inc | 4 ++ etc/mtree/BSD.usr.dist | 2 - libexec/Makefile | 1 - libexec/kgdb/Makefile | 5 -- sys/conf/kern.post.mk | 15 +++++ sys/tools/gdb/README.txt | 21 ++++++ {libexec/kgdb => sys/tools/gdb}/acttrace.py | 41 ++++-------- sys/tools/gdb/freebsd.py | 75 +++++++++++++++++++++ sys/tools/gdb/pcpu.py | 77 +++++++++++++++++++++ sys/tools/gdb/selftest.py | 31 +++++++++ sys/tools/gdb/selftest.sh | 23 +++++++ sys/tools/gdb/vnet.py | 100 ++++++++++++++++++++++++++++ sys/tools/kernel-gdb.py | 15 +++++ usr.sbin/crashinfo/crashinfo.sh | 3 - 14 files changed, 374 insertions(+), 39 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 539ab7d54460..36e8c048661e 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,10 @@ # xargs -n1 | sort | uniq -d; # done +# 20251003: kgdb python scripts moved +OLD_FILES+=usr/libexec/kgdb/acttrace.py +OLD_DIRS+=usr/libexec/kgdb + # 20251001: test helper sendto-IP_MULTICAST_IF renamed OLD_FILES+=usr/tests/sys/netinet/sendto-IP_MULTICAST_IF diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index 1945c26ebc5f..d7d839b94b96 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -181,8 +181,6 @@ .. hyperv .. - kgdb - .. lpr ru .. diff --git a/libexec/Makefile b/libexec/Makefile index 7ce78321f08e..e87b48b153a8 100644 --- a/libexec/Makefile +++ b/libexec/Makefile @@ -10,7 +10,6 @@ SUBDIR= ${_atf} \ flua \ getty \ ${_hyperv} \ - kgdb \ ${_mail.local} \ ${_makewhatis.local} \ ${_mknetid} \ diff --git a/libexec/kgdb/Makefile b/libexec/kgdb/Makefile deleted file mode 100644 index f6b255ab4f60..000000000000 --- a/libexec/kgdb/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -FILESDIR?= /usr/libexec/kgdb - -FILES= acttrace.py - -.include diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index bb3c7af82a4d..7cdfd17778db 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -398,6 +398,14 @@ CFLAGS+= -fdebug-prefix-map=./${_link}=${PREFIX_SYSDIR}/${_link}/include .endif .endfor +# Install GDB plugins that are useful for kernel debugging. See the +# README in sys/tools/gdb for more information. +GDB_FILES= acttrace.py \ + freebsd.py \ + pcpu.py \ + selftest.py \ + vnet.py + ${_ILINKS}: @case ${.TARGET} in \ machine) \ @@ -447,6 +455,13 @@ kernel-install: .PHONY .if defined(DEBUG) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no" mkdir -p ${DESTDIR}${KERN_DEBUGDIR}${KODIR} ${INSTALL} -p -m ${KMODMODE} -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.debug ${DESTDIR}${KERN_DEBUGDIR}${KODIR}/ + ${INSTALL} -m ${KMODMODE} -o ${KMODOWN} -g ${KMODGRP} \ + $S/tools/kernel-gdb.py ${DESTDIR}${KERN_DEBUGDIR}${KODIR}/${KERNEL_KO}-gdb.py + mkdir -p ${DESTDIR}${KERN_DEBUGDIR}${KODIR}/gdb +.for file in ${GDB_FILES} + ${INSTALL} -m ${KMODMODE} -o ${KMODOWN} -g ${KMODGRP} \ + $S/tools/gdb/${file} ${DESTDIR}${KERN_DEBUGDIR}${KODIR}/gdb/${file} +.endfor .endif .if defined(KERNEL_EXTRA_INSTALL) ${INSTALL} -p -m ${KMODMODE} -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_EXTRA_INSTALL} ${DESTDIR}${KODIR}/ diff --git a/sys/tools/gdb/README.txt b/sys/tools/gdb/README.txt new file mode 100644 index 000000000000..8c31565ddc42 --- /dev/null +++ b/sys/tools/gdb/README.txt @@ -0,0 +1,21 @@ +This directory contains Python scripts that can be loaded by GDB to help debug +FreeBSD kernel crashes. + +Add new commands and functions in their own files. Functions with general +utility should be added to freebsd.py. sys/tools/kernel-gdb.py is installed +into the kernel debug directory (typically /usr/lib/debug/boot/kernel). It will +be automatically loaded by kgdb when opening a vmcore, so if you add new GDB +commands or functions, that script should be updated to import them, and you +should document them here. + +To provide some rudimentary testing, selftest.py tries to exercise all of the +commands and functions defined here. To use it, run selftest.sh to panic the +system. Then, create a kernel dump or attach to the panicked kernel, and invoke +the script with "python import selftest" in (k)gdb. + +Commands: +acttrace Display a backtrace for all on-CPU threads + +Functions: +$PCPU([, ]) Display the value of a PCPU/DPCPU field +$V([, ]) Display the value of a VNET variable diff --git a/libexec/kgdb/acttrace.py b/sys/tools/gdb/acttrace.py similarity index 62% rename from libexec/kgdb/acttrace.py rename to sys/tools/gdb/acttrace.py index 3229ff708de1..147effbbddf1 100644 --- a/libexec/kgdb/acttrace.py +++ b/sys/tools/gdb/acttrace.py @@ -1,38 +1,23 @@ -#- +# # Copyright (c) 2022 The FreeBSD Foundation # # This software was developed by Mark Johnston under sponsorship from the # FreeBSD Foundation. # +# SPDX-License-Identifier: BSD-2-Clause +# import gdb - - -def symval(name): - return gdb.lookup_global_symbol(name).value() - - -def tid_to_gdb_thread(tid): - for thread in gdb.inferiors()[0].threads(): - if thread.ptid[2] == tid: - return thread - else: - return None - - -def all_pcpus(): - mp_maxid = symval("mp_maxid") - cpuid_to_pcpu = symval("cpuid_to_pcpu") - - cpu = 0 - while cpu <= mp_maxid: - pcpu = cpuid_to_pcpu[cpu] - if pcpu: - yield pcpu - cpu = cpu + 1 - +from freebsd import * +from pcpu import * class acttrace(gdb.Command): + """ + Register an acttrace command with gdb. + + When run, acttrace prints the stack trace of all threads that were on-CPU + at the time of the panic. + """ def __init__(self): super(acttrace, self).__init__("acttrace", gdb.COMMAND_USER) @@ -40,13 +25,13 @@ class acttrace(gdb.Command): # Save the current thread so that we can switch back after. curthread = gdb.selected_thread() - for pcpu in all_pcpus(): + for pcpu in pcpu_foreach(): td = pcpu['pc_curthread'] tid = td['td_tid'] gdb_thread = tid_to_gdb_thread(tid) if gdb_thread is None: - print("failed to find GDB thread with TID {}".format(tid)) + raise gdb.error(f"failed to find GDB thread with TID {tid}") else: gdb_thread.switch() diff --git a/sys/tools/gdb/freebsd.py b/sys/tools/gdb/freebsd.py new file mode 100644 index 000000000000..81ea60373348 --- /dev/null +++ b/sys/tools/gdb/freebsd.py @@ -0,0 +1,75 @@ +# +# Copyright (c) 2025 Mark Johnston +# +# SPDX-License-Identifier: BSD-2-Clause +# + +import gdb + +def symval(name): + sym = gdb.lookup_global_symbol(name) + if sym is None: + sym = gdb.lookup_static_symbol(name) + if sym is None: + raise gdb.GdbError(f"Symbol '{name}' not found") + return sym.value() + + +def _queue_foreach(head, field, headf, nextf): + elm = head[headf] + while elm != 0: + yield elm + elm = elm[field][nextf] + + +def list_foreach(head, field): + """sys/queue.h-style iterator.""" + return _queue_foreach(head, field, "lh_first", "le_next") + + +def tailq_foreach(head, field): + """sys/queue.h-style iterator.""" + return _queue_foreach(head, field, "tqh_first", "tqe_next") + + +def linker_file_foreach(): + """Iterate over loaded linker files.""" + return tailq_foreach(symval("linker_files"), "link") + + +def pcpu_foreach(): + mp_maxid = symval("mp_maxid") + cpuid_to_pcpu = symval("cpuid_to_pcpu") + + cpu = 0 + while cpu <= mp_maxid: + pcpu = cpuid_to_pcpu[cpu] + if pcpu: + yield pcpu + cpu = cpu + 1 + + +def tid_to_gdb_thread(tid): + """Convert a FreeBSD kernel thread ID to a gdb inferior thread.""" + for thread in gdb.inferiors()[0].threads(): + if thread.ptid[2] == tid: + return thread + else: + return None + + +def tdfind(tid, pid=-1): + """Convert a FreeBSD kernel thread ID to a struct thread pointer.""" + td = tdfind.cached_threads.get(int(tid)) + if td: + return td + + for p in list_foreach(symval("allproc"), "p_list"): + if pid != -1 and pid != p['p_pid']: + continue + for td in tailq_foreach(p['p_threads'], "td_plist"): + ntid = td['td_tid'] + tdfind.cached_threads[int(ntid)] = td + if ntid == tid: + return td +tdfind.cached_threads = dict() diff --git a/sys/tools/gdb/pcpu.py b/sys/tools/gdb/pcpu.py new file mode 100644 index 000000000000..aadc4b2d42df --- /dev/null +++ b/sys/tools/gdb/pcpu.py @@ -0,0 +1,77 @@ +# +# Copyright (c) 2025 Mark Johnston +# +# SPDX-License-Identifier: BSD-2-Clause +# + +import gdb +from freebsd import * + +class pcpu(gdb.Function): + """ + Register a function to lookup PCPU and DPCPU variables by name. + + To look up the value of the PCPU field foo on CPU n, use + $PCPU("foo", n). This works for DPCPU fields too. If the CPU ID is + omitted, and the currently selected thread is on-CPU, that CPU is + used, otherwise an error is raised. + """ + def __init__(self): + super(pcpu, self).__init__("PCPU") + + def invoke(self, field, cpuid=-1): + if cpuid == -1: + cpuid = tdfind(gdb.selected_thread().ptid[2])['td_oncpu'] + if cpuid == -1: + raise gdb.error("Currently selected thread is off-CPU") + if cpuid < 0 or cpuid > symval("mp_maxid"): + raise gdb.error(f"Currently selected on invalid CPU {cpuid}") + pcpu = symval("cpuid_to_pcpu")[cpuid] + + # Are we dealing with a PCPU or DPCPU field? + field = field.string() + for f in gdb.lookup_type("struct pcpu").fields(): + if f.name == "pc_" + field: + return pcpu["pc_" + field] + + def uintptr_t(val): + return val.cast(gdb.lookup_type("uintptr_t")) + + # We're dealing with a DPCPU field. This is handled similarly + # to VNET symbols, see vnet.py for comments. + pcpu_base = pcpu['pc_dynamic'] + pcpu_entry = symval("pcpu_entry_" + field) + pcpu_entry_addr = uintptr_t(pcpu_entry.address) + + for lf in linker_file_foreach(): + block = gdb.block_for_pc(lf['ops']['cls']['methods'][0]['func']) + elf_file_t = gdb.lookup_type("elf_file_t", block).target() + ef = lf.cast(elf_file_t) + + file_type = lf['ops']['cls']['name'].string() + if file_type == "elf64": + start = uintptr_t(ef['pcpu_start']) + if start == 0: + continue + end = uintptr_t(ef['pcpu_stop']) + base = uintptr_t(ef['pcpu_base']) + elif file_type == "elf64_obj": + for i in range(ef['nprogtab']): + pe = ef['progtab'][i] + if pe['name'].string() == "set_pcpu": + start = uintptr_t(pe['origaddr']) + end = start + uintptr_t(pe['size']) + base = uintptr_t(pe['addr']) + break + else: + continue + else: + path = lf['pathname'].string() + raise gdb.error(f"{path} has unexpected linker file type {file_type}") + + if pcpu_entry_addr >= start and pcpu_entry_addr < end: + obj = gdb.Value(pcpu_base + pcpu_entry_addr - start + base) + return obj.cast(pcpu_entry.type.pointer()).dereference() + +# Register with gdb. +pcpu() diff --git a/sys/tools/gdb/selftest.py b/sys/tools/gdb/selftest.py new file mode 100644 index 000000000000..41e9211c4bb3 --- /dev/null +++ b/sys/tools/gdb/selftest.py @@ -0,0 +1,31 @@ +# +# Copyright (c) 2025 Mark Johnston +# +# SPDX-License-Identifier: BSD-2-Clause +# + +import gdb + +cmds = ["acttrace", + "p $V(\"tcbinfo\")", + "p $V(\"tcbinfo\", vnet0)", + "p $V(\"pf_status\")", + "p $V(\"pf_status\", \"gdbselftest\")", + "p $PCPU(\"curthread\")", + "p $PCPU(\"curthread\", 0)", + "p/x $PCPU(\"hardclocktime\", 1)", + "p $PCPU(\"pqbatch\")[0][0]", + "p $PCPU(\"ss\", 1)", + ] + +for cmd in cmds: + try: + print(f"Running command: '{cmd}'") + gdb.execute(cmd) + except gdb.error as e: + print(f"Command '{cmd}' failed: {e}") + break + +# We didn't hit any unexpected errors. This isn't as good as actually +# verifying the output, but it's better than nothing. +print("Everything seems OK") diff --git a/sys/tools/gdb/selftest.sh b/sys/tools/gdb/selftest.sh new file mode 100644 index 000000000000..252fae14af17 --- /dev/null +++ b/sys/tools/gdb/selftest.sh @@ -0,0 +1,23 @@ +# +# Copyright (c) 2025 Mark Johnston +# +# SPDX-License-Identifier: BSD-2-Clause +# + +set -e + +n=$(sysctl -n hw.ncpu) +if [ $n -lt 2 ]; then + echo "This test requires at least 2 CPUs" + exit 1 +fi + +# Set up some things expected by selftest.py. +kldload -n pf siftr +pfctl -e || true +jail -c name=gdbselftest vnet persist + +echo "I'm about to panic your system, ctrl-C now if that's not what you want." +sleep 10 +sysctl debug.debugger_on_panic=0 +sysctl debug.kdb.panic=1 diff --git a/sys/tools/gdb/vnet.py b/sys/tools/gdb/vnet.py new file mode 100644 index 000000000000..36b4d512a3eb --- /dev/null +++ b/sys/tools/gdb/vnet.py @@ -0,0 +1,100 @@ +# +# Copyright (c) 2025 Mark Johnston +# +# SPDX-License-Identifier: BSD-2-Clause +# + +import gdb +import traceback +from freebsd import * + +class vnet(gdb.Function): + """ + Register a function to look up VNET variables by name. + + To look at the value of a VNET variable V_foo, print $V("foo"). The + currently selected thread's VNET is used by default, but can be optionally + specified as a second parameter, e.g., $V("foo", ), where is a + pointer to a struct vnet (e.g., vnet0 or allprison.tqh_first->pr_vnet) or a + string naming a jail. + """ + def __init__(self): + super(vnet, self).__init__("V") + + def invoke(self, sym, vnet=None): + sym = sym.string() + if sym.startswith("V_"): + sym = sym[len("V_"):] + if gdb.lookup_symbol("sysctl___kern_features_vimage")[0] is None: + return symval(sym) + + # Look up the VNET's base address. + if vnet is None: + vnet = tdfind(gdb.selected_thread().ptid[2])['td_vnet'] + if not vnet: + # If curthread->td_vnet == NULL, vnet0 is the current vnet. + vnet = symval("vnet0") + elif vnet.type.is_string_like: + vnet = vnet.string() + for prison in tailq_foreach(symval("allprison"), "pr_list"): + if prison['pr_name'].string() == vnet: + vnet = prison['pr_vnet'] + break + else: + raise gdb.error(f"No prison named {vnet}") + + def uintptr_t(val): + return val.cast(gdb.lookup_type("uintptr_t")) + + # Now the tricky part: compute the address of the symbol relative + # to the selected VNET. In the compiled kernel this is done at + # load time by applying a magic transformation to relocations + # against symbols in the vnet linker set. Here we have to apply + # the transformation manually. + vnet_data_base = vnet['vnet_data_base'] + vnet_entry = symval("vnet_entry_" + sym) + vnet_entry_addr = uintptr_t(vnet_entry.address) + + # First, which kernel module does the symbol belong to? + for lf in linker_file_foreach(): + # Find the bounds of this linker file's VNET linker set. The + # struct containing the bounds depends on the type of the linker + # file, and unfortunately both are called elf_file_t. So we use a + # PC value from the compilation unit (either link_elf.c or + # link_elf_obj.c) to disambiguate. + block = gdb.block_for_pc(lf['ops']['cls']['methods'][0]['func']) + elf_file_t = gdb.lookup_type("elf_file_t", block).target() + ef = lf.cast(elf_file_t) + + file_type = lf['ops']['cls']['name'].string() + if file_type == "elf64": + start = uintptr_t(ef['vnet_start']) + if start == 0: + # This linker file doesn't have a VNET linker set. + continue + end = uintptr_t(ef['vnet_stop']) + base = uintptr_t(ef['vnet_base']) + elif file_type == "elf64_obj": + for i in range(ef['nprogtab']): + pe = ef['progtab'][i] + if pe['name'].string() == "set_vnet": + start = uintptr_t(pe['origaddr']) + end = start + uintptr_t(pe['size']) + base = uintptr_t(pe['addr']) + break + else: + # This linker file doesn't have a VNET linker set. + continue + else: + path = lf['pathname'].string() + raise gdb.error(f"{path} has unexpected linker file type {file_type}") + + if vnet_entry_addr >= start and vnet_entry_addr < end: + # The symbol belongs to this linker file, so compute the final + # address. + obj = gdb.Value(vnet_data_base + vnet_entry_addr - start + base) + return obj.cast(vnet_entry.type.pointer()).dereference() + + +# Register with gdb. +vnet() diff --git a/sys/tools/kernel-gdb.py b/sys/tools/kernel-gdb.py new file mode 100644 index 000000000000..8a41ef6efab1 --- /dev/null +++ b/sys/tools/kernel-gdb.py @@ -0,0 +1,15 @@ +# +# Copyright (c) 2025 Mark Johnston +# +# SPDX-License-Identifier: BSD-2-Clause +# + +import os +import sys + +sys.path.append(os.path.join(os.path.dirname(__file__), "gdb")) + +# Import FreeBSD kernel debugging commands and modules below. +import acttrace +import pcpu +import vnet diff --git a/usr.sbin/crashinfo/crashinfo.sh b/usr.sbin/crashinfo/crashinfo.sh index 3bb1e1456462..68115f09f9d4 100755 --- a/usr.sbin/crashinfo/crashinfo.sh +++ b/usr.sbin/crashinfo/crashinfo.sh @@ -217,10 +217,7 @@ echo file=`mktemp /tmp/crashinfo.XXXXXX` if [ $? -eq 0 ]; then - scriptdir=/usr/libexec/kgdb - echo "bt -full" >> $file - echo "source ${scriptdir}/acttrace.py" >> $file echo "acttrace" >> $file echo "quit" >> $file ${GDB%gdb}kgdb -q $KERNEL $VMCORE < $file From nobody Fri Oct 3 14:36:13 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdWSF27Scz69wRs; Fri, 03 Oct 2025 14:36: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 4cdWSF1g15z3r0j; Fri, 03 Oct 2025 14:36:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759502173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sv7b0FhvOnqGAf6ckZP7E26EpFmq5zsSZuCs67FSk9w=; b=e876s/jdcbMtmYzTU3TKCsIb5EX99Dgv18Q0BG7fD/lmFbdXznFw9ZKxmzaplTewiK4BST Tys1l10s9HEfBZ1giQyAOL3ijsiCkQR/TBtqOa7wXfhayoiI5TE9Slo0Je1o3UBvBc+DMG P0JvvE0luFFn70q3wr51YyOnceZzj8JUIahs2P4wcWzYcL1rYSH45wiWW6D1kZujzSybB6 eEJ10eqQsnlEebP050jmIGn39Lx4Flj3IovPdD7AqZcnRsi0wPkgmF4+MgICYMBGxah8Wz qX0TlK14Ufu9WRzCRfQKVn1Ah/NN0mj12z+9BexEJZK8GXwm0gSb/flhFGt8dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759502173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sv7b0FhvOnqGAf6ckZP7E26EpFmq5zsSZuCs67FSk9w=; b=Er6qow1yhGnzdS9xnTdSRxNLu111MYrFbYYx29Ge3Rcv3jYdgcike+GJaIyX+faXmSyeU+ c8Rx2wGqeu/bgfUIQthiDJuwgxJFr7yrYJ7S7Y1IQRGFySKmv3dmB++86QoC6mq44mJc/Y HxazRulmaWJfVvAPK/+g7Jn6bK1eut5tM9SIxPNZiKFb58vxverDmgFICdyhGa6xwTQq9j hdmh3R3pPzj44WZFpxugp5yct0b8lRbJCRt2REWXN/e9HA+TTbycB/pjBKE8YZ9Dmwue6c OzDdCbC1Okrv0kRjRnoeOY49qNdKukGPRgSYpg5PNovx3yD0m6OtrB7hy1kfag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759502173; a=rsa-sha256; cv=none; b=JDwM5Z+GnNvUxhqiGt5CtIMmubxO97e6HnKwcrULIuxCylx0FnxgHpQ5aKx+WMFzKEtZr4 m+XZYSVSDYHVvVtH+8vmlscIn85LmWjw3ydePqywzVc+BqxErQZ0plhrP1h6ebal47OeVx RD7xYz+OD/Ag9j2JtN/5EyY3zYVUQpL+AnMjtTEmOcRTLNWgqiKmHiMwsmtbfzWHC6N1vE Si1OArzpyQc48Eap0NPUg1Pke3FH6UbLb8H/jZo7c0SZ8xjsCQZfGhKu/p4ERu1lS54PQH wliWqqKKE1MTWxHRkR9+Qz+3qLelAtdfAuG1dGeTG5GbLh+YfIiRPIHReT54kw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdWSF1BY8zyn9; Fri, 03 Oct 2025 14:36:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593EaDYi002645; Fri, 3 Oct 2025 14:36:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593EaDLR002642; Fri, 3 Oct 2025 14:36:13 GMT (envelope-from git) Date: Fri, 3 Oct 2025 14:36:13 GMT Message-Id: <202510031436.593EaDLR002642@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: bc433a0b7b04 - main - sdhci.4: Improve HARDWARE for HW Relnotes + SPDX 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: bc433a0b7b046b0412777e0f3cc8f18a233af8ff Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=bc433a0b7b046b0412777e0f3cc8f18a233af8ff commit bc433a0b7b046b0412777e0f3cc8f18a233af8ff Author: Warner Losh AuthorDate: 2025-10-03 13:49:32 +0000 Commit: Alexander Ziaee CommitDate: 2025-10-03 14:35:27 +0000 sdhci.4: Improve HARDWARE for HW Relnotes + SPDX MFC after: 1 hr Discussed with: ivy, olce Co-authored-by: ziaee (typed up imps suggestion, tagged spdx) Differential Revision: https://reviews.freebsd.org/D52860 --- share/man/man4/sdhci.4 | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/share/man/man4/sdhci.4 b/share/man/man4/sdhci.4 index 4a4e02539acd..1608d9c2fe1a 100644 --- a/share/man/man4/sdhci.4 +++ b/share/man/man4/sdhci.4 @@ -1,4 +1,6 @@ .\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2008 Alexander Motin .\" All rights reserved. .\" @@ -22,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 25, 2020 +.Dd October 3, 2025 .Dt SDHCI 4 .Os .Sh NAME @@ -56,21 +58,28 @@ detaches it on card removing. .Sh HARDWARE The .Nm -driver supports different specification compatible chips. -The following chips have been verified to work: +driver supports the SD Host Controller Specification. +When attaching via the PCI bus, +the controller is automatically configured. +Many SoC chips provide a SDHCI controller directly mapped to I/O memory. +For those, the controller may be configured using +.Xr fdt 4 +or +.Xr acpi 4 +methods, supplied by your board's vendor. .Pp -.Bl -bullet -compact -.It -ENE CB712 -.It -ENE CB714 -.It -RICOH R5C822 -.It -RICOH R5CE823 -.It -TI PCIXX21/XX11/XX12 -.El +Unlike most other drivers that support a generic standard, +.Nm +requires a large number of quirks to cope with hardware bugs, +proprietary registers and poorly specified power management. +While many chipsets from +Intel, Xilinx, Rockchip, Frescale, Ricoh, and TI have these entries, +suboptimal performance may result when using some controllers. +Quirks and custom configuration are most often required +when the device is configured via +.Xr fdt 4 +or +.Xr acpi 4 . .Sh SEE ALSO .Xr mmc 4 , .Xr mmcsd 4 @@ -79,8 +88,3 @@ TI PCIXX21/XX11/XX12 .Re .Sh AUTHORS .An Alexander Motin Aq Mt mav@FreeBSD.org -.Sh BUGS -Many of existing SD controller chips have some nonstandard requirements, -proprietary registers and hardware bugs, requiring additional handling. -ENE chips are handled to work fine, while some revisions of RICOH and TI -controllers still do not see cards without some additional initialization. From nobody Fri Oct 3 14:36:14 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdWSG62wRz69vns; Fri, 03 Oct 2025 14:36:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdWSG2YlTz3r0x; Fri, 03 Oct 2025 14:36:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759502174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wGotCPEV6BwRa945LJtLknS88R0zVzXSVnzZMPgqmvY=; b=ybhwvpN2kQ3tjHT2rVR0QmMcr370zWEqkONSuTBQGPg0bfjWe9RbEmBigHLZCy8CcwXHzN 4w0fsxY73dYQQ3VzmdR3v/ksUcf2sQuMeDdT1WFetmTA2kwshCykyi4oXYvOVTLOM7bSvW tgpPACWNuJFVdKugI6iz4zDMg+EmneV2Gh4WkL0F8yIIyVoZanP87FlM2+EPf5sQQLBIIB sJDlRu+z3qYoj1jcPyyXTxdp3VUaHOdjbjsFg61EBqkienWiRMx1l7DFfGoIbgNfLEUcRb PgLyDf85ZL8PS51QBqHAeHBPEY1Y6NsVzmYHh5LKqdappOZcYfMFvOtRdrLoCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759502174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wGotCPEV6BwRa945LJtLknS88R0zVzXSVnzZMPgqmvY=; b=BynTXnO3efmGDF2pKV/XSzYicvIJl871ulfBDFx9cGk+5gXZxK4bOEdcO7yBoP/HzQlhtO BDo+r9G6LMZ/JfTtzKDxNSy4RqyQwaAbUBFLSHi9ZZLx8ZtJ+P6SkYoinaE7Akm7XEEBoB yvFqGn2g3BONon8lscQIlw5ykztD2Lrc+HIC5R4kIOYnh5J/ACh6mhJxbA1ptWAoYK6huA cbsgWsI922mmijgEx2rHLYfy+O4sXMsEPzjlBVpb0sAqKEgqxCru4cc4Kz3v571YM5/F8P LlDoHogd0nBcACQ78t3PuznLJgPI1Vx3hNWVSN2HWMdBWRTBxWnYnVmqSuplIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759502174; a=rsa-sha256; cv=none; b=dB0l5BUQlL3K89pUWWztYpInLuULuzAfjDf7sYKQcxMt6QlgKH3C/F1IRkBAv65adRyKm0 HPGrGx0T+p2sCZuzLH79uqAtOkjcFlTukN3KJNHfqxBzAsMJGe6PhBH8DvIRTz+8DR16wo 683RYkKow9bjBexKMlsokPI7AyudQdiodlvJPKytZNE+y060MYZIsFLuJzXxG30WMlSmYz 6pVD+viEOiOet9NZGKt7vga+fMJFXB2U2TkkVrlOMiC7UAcKCO0cM6zP/AnmXX/ZjqAg6W DaSe/gn1TaoDSG92eyDhdQeLrte+PrBgm6AmCPmewIEhHYBNdlbbpGFWZ/WoRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdWSG29NgzykF; Fri, 03 Oct 2025 14:36:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593EaE3N002680; Fri, 3 Oct 2025 14:36:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593EaEfN002677; Fri, 3 Oct 2025 14:36:14 GMT (envelope-from git) Date: Fri, 3 Oct 2025 14:36:14 GMT Message-Id: <202510031436.593EaEfN002677@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: f19aea89abd8 - main - nda.4: Add a HARDWARE section, tag SPDX 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: f19aea89abd8964bf96d134c2bd6e127464c79f6 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=f19aea89abd8964bf96d134c2bd6e127464c79f6 commit f19aea89abd8964bf96d134c2bd6e127464c79f6 Author: Warner Losh AuthorDate: 2025-10-03 14:30:15 +0000 Commit: Alexander Ziaee CommitDate: 2025-10-03 14:35:28 +0000 nda.4: Add a HARDWARE section, tag SPDX The description likely also needs some love. MFC after: 1 hour Co-authored-by: ziaee (typed up imps suggestion, tagged spdx) Differential Revision: https://reviews.freebsd.org/D52866 --- share/man/man4/nda.4 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/share/man/man4/nda.4 b/share/man/man4/nda.4 index c4fa157af851..e45b2905462e 100644 --- a/share/man/man4/nda.4 +++ b/share/man/man4/nda.4 @@ -1,4 +1,6 @@ .\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2017 Netflix, Inc. .\" .\" Redistribution and use in source and binary forms, with or without @@ -23,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 6, 2020 +.Dd October 2, 2025 .Dt NDA 4 .Os .Sh NAME @@ -39,6 +41,14 @@ driver provides support for direct access devices, implementing the .Tn NVMe command protocol, that are attached to the system through a host adapter supported by the CAM subsystem. +.Sh HARDWARE +The +.Nm +driver supports NVMe +.Pq Non-Volatile Memory Express +storage devices connected via PCIe or over NVMF +.Pq NVMe over Fabric +via the CAM subsystem. .Sh SYSCTL VARIABLES The following variables are available as both .Xr sysctl 8 From nobody Fri Oct 3 15:12: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 4cdXGb6RRJz6B0t5; Fri, 03 Oct 2025 15:12:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdXGb5wrnz3wF6; Fri, 03 Oct 2025 15:12:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759504375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cnQ5buDeQCDxGVtDM25RDTNLCUDr/XEJ6Rv2l8I5C1o=; b=YKallrnXoaiOqFVl0uJkqpu01Qu6aPyqj4+bW4gSvvDu1cxlcoCwgYb+vPV6wFEwnIwOWr n7IuDvbFxx+0DZ6cioq7uP93b9KhFOdpXJr8zD1n5THNocfGFN29GXtHpUwtnJxhlTGZBa raWtbYlA08BLRPA5vhPntqL3xxf7irUNRZW+Ccs/LUQS/4RhYkTAs3/f/a3oymJsxJ8DwX hOavLr8CId3BZsN7Qg/LsZKAkSITJfGlwdhVeHlE+qfnMtWjPB9kOOrs9eC58nDm8mdCCe nfEI8EulLSJ/4UFygx/RofnWNZNNFQhM2kZZMy1nAkwoCscUY5Jpxf2ZxcjLaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759504375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cnQ5buDeQCDxGVtDM25RDTNLCUDr/XEJ6Rv2l8I5C1o=; b=seZ2vFzwO/a+iJCVSioLEp53y8NA8JjF0nbK0zrErIBwLxCXK5acTgQPUreNJR3/JRTTKn 4jujld8YymebNryzm1t+aS8UjdtfZ+pWaLUFVSPz/JaQEMZ766zkgOv3DNDX29J6X0+TJh mKzuh1ebszUKpoe7jaqUXhgBwZCUO7UxRT3xRQZW5FsnPQRQ+NGEU9HtEijaxLo9QwruQs gFPrcVmeR0limV3udL7Vq3IjSusyNOj3XtcUSxd8F25xgKRJpl/Hi4zl4olq69UYpDbJYo z1lIbbxKy+fdVwWVdHV6m/GhKivsLqfiVboaus2DT20qcMfPABIV7p9oOaO0PQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759504375; a=rsa-sha256; cv=none; b=mC90L/CHgnY87lehbmznqyKhPj1lBJgIRcqC1UDJa6qNe2V/WLUGLzi0H7apph3Ai+t/y7 eFWHvBfjIBp2LreHn1siph0gFr6tskUHqEoWCom4/N+/rOw+E17ajOpDNPRrjdwgYbnRY2 4ODEyshHKW/cqQlGJpgaSNmJWdgOpijIxCq1uLL0keER686E8HHausyvYINIIvgT2sfSFi doYCs+O6agjFcdPv1RcMZBKl7KVc/LhbJRtjPUZdm368w03szN0QtRHGr9BxOVDi/AThN7 tlulOsy24h5QCEzwJcqITAcs2MyIsuTvIw6bYpBxC5b55iGTSvW/TumsOYuX+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdXGb5V5Wz10xD; Fri, 03 Oct 2025 15:12:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593FCtJO076935; Fri, 3 Oct 2025 15:12:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593FCtSk076932; Fri, 3 Oct 2025 15:12:55 GMT (envelope-from git) Date: Fri, 3 Oct 2025 15:12:55 GMT Message-Id: <202510031512.593FCtSk076932@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: ae5914c0e447 - main - Cirrus-CI: Switch back to tzst packages, but use level 1 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ae5914c0e4478fd35ef9db3f32665b60e04d5a6f Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ae5914c0e4478fd35ef9db3f32665b60e04d5a6f commit ae5914c0e4478fd35ef9db3f32665b60e04d5a6f Author: Ed Maste AuthorDate: 2025-10-02 14:39:43 +0000 Commit: Ed Maste CommitDate: 2025-10-03 14:49:47 +0000 Cirrus-CI: Switch back to tzst packages, but use level 1 We previously used `PKG_FORMAT: tar` to avoid spending a lot of time in zstd compression. Instead just set PKG_LEVEL to compression level 1, which still produces packages that are much smaller than uncompressed tarballs with only a small penalty in build time. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52858 --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index a282ddf789ed..e62b172efea9 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -10,7 +10,7 @@ compute_engine_instance: disk: 40 env: - PKG_FORMAT: tar + PKG_LEVEL: 1 task: matrix: From nobody Fri Oct 3 16:03:49 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdYPL1TjXz6B5rg; Fri, 03 Oct 2025 16:03:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdYPL0jm0z446x; Fri, 03 Oct 2025 16:03:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759507430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MDGHLbaJw4uLZDbxo2sIsQvSfgUB9zEb/Rtx7yHOOBY=; b=LW/FhYQindGGUW8TqU1fSJgl70v5NrvNH3Nn8STn3gC7ThunBUUP2XCqQH4IMN8gG/YwiM tl3/DzzCs2EsPmgD4p6AtL1XXr32TMMp5xasz90dOyutgfUnA2MKxvRabC4rnomg4EHu3/ PPOIxO7J1oybETSl951/djgH0JbRkX6HrdPAznTzNuBcTR5QhuJQdeOoBWK+d3Ix0oASmn jbridz02g/enVaBfyXyDx4Sdw2kyQOYQM2Jp4HXkoJa1LQscFbbhUQzUMgoU7bl3pDPdeH Bf6qD4N6DOSCxjRFb7JB14m4QdcDAGfq7KLg3b6zlfPrhv0wc1eJf4nMbzY5ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759507430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MDGHLbaJw4uLZDbxo2sIsQvSfgUB9zEb/Rtx7yHOOBY=; b=OoFZppKoIG/PhtPPmV95nsAnnxlpCUcaKlkTwhFHEd0ABIJynTaJWJ/kf5Tgu17NUoBsha yJvQbMJAm0kc0LLoencSkBhCNkV0bJgqPC9sxIXekUlJX+SqvX3Gkxju54LEyP7JjThbyC aTLzJKpElHfscvT6rs3sCwmbz5LYBUmDZ7V5F+WT+B/7o8rb7wNdo30r6fvz3He97Kh+pm BixQ6CSy2jyDQRJiY0hDACLfPY9ucslYEOceesPscOlBgn/MzcfyQJoI4v/URgFg0SmCHW PwnO0+BqN+3maX+U+YphjPCT51VYyr+nTgj8GY2s9qku/U/7ED5l25+8ccjGQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759507430; a=rsa-sha256; cv=none; b=GNb/XRM5qxnDQ3qKrjmMdPMyWdaPUOMPJNJCAAKrE26TcR4jDfm71489oENxrjvFkTGVlR YaWQ5du4W9XA09bpxKy+L4bCZy0QTQ1cjKVhrh9NbjHfCTWx1GdAu7uHwATO0B4xb061oc tUqCzMuFx18T6PaPMpiEsmgYQB+wtC+o5UCXXsOOVGa07m6y2RuLiVZy9rF6HK/LEDwsFg MYc6/SpyXhPQYfpFm+v3mE2xgET5g6OCpUAVX1UZ4HQSJFIDNzedj2+xOy8qn+zSQ8+vnA qyqm2X3akC8CIxCJbpTR/RiE59rVdOgo6TqkRGIOpk5NQ6HwCjllJKPx//N0og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdYPL0Fqqz11d5; Fri, 03 Oct 2025 16:03:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593G3nns070827; Fri, 3 Oct 2025 16:03:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593G3nRt070824; Fri, 3 Oct 2025 16:03:49 GMT (envelope-from git) Date: Fri, 3 Oct 2025 16:03:49 GMT Message-Id: <202510031603.593G3nRt070824@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Jonathan T. Looney" Subject: git: 5f1f7d8457d4 - main - x86: Keep cumulative MCA statistics in the kernel 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: jtl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5f1f7d8457d4fc28c6cff7e26a629a2d6ee3fc61 Auto-Submitted: auto-generated The branch main has been updated by jtl: URL: https://cgit.FreeBSD.org/src/commit/?id=5f1f7d8457d4fc28c6cff7e26a629a2d6ee3fc61 commit 5f1f7d8457d4fc28c6cff7e26a629a2d6ee3fc61 Author: Jonathan T. Looney AuthorDate: 2025-09-24 14:35:18 +0000 Commit: Jonathan T. Looney CommitDate: 2025-10-03 15:29:21 +0000 x86: Keep cumulative MCA statistics in the kernel Keeping cumulative MCA statistics in the kernel provides a way for users to get an accurate count of various kinds of errors reported by the CPU. After ca8929d2a3e9b9df31d2e487377f99d7c39aa01d, it is possible that the kernel will drop the record of some MCA interrupts. Moreover, this provides a cheaper interface to obtain statistics if that is the only reason a user is processing MCA logs. Reviewed by: markj Sponsored by: Netflix MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D52709 --- sys/x86/include/mca.h | 25 +++++++++++++++++++++++++ sys/x86/x86/mca.c | 43 ++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 65 insertions(+), 3 deletions(-) diff --git a/sys/x86/include/mca.h b/sys/x86/include/mca.h index 183480625f6d..553b5d765f17 100644 --- a/sys/x86/include/mca.h +++ b/sys/x86/include/mca.h @@ -44,6 +44,31 @@ struct mca_record { int mr_cpu; }; +enum mca_stat_types { + MCA_T_NONE = 0, + MCA_T_UNCLASSIFIED, + MCA_T_UCODE_ROM_PARITY, + MCA_T_EXTERNAL, + MCA_T_FRC, + MCA_T_INTERNAL_PARITY, + MCA_T_SMM_HANDLER, + MCA_T_INTERNAL_TIMER, + MCA_T_GENERIC_IO, + MCA_T_INTERNAL, + MCA_T_MEMORY, + MCA_T_TLB, + MCA_T_MEMCONTROLLER_GEN, + MCA_T_MEMCONTROLLER_RD, + MCA_T_MEMCONTROLLER_WR, + MCA_T_MEMCONTROLLER_AC, + MCA_T_MEMCONTROLLER_MS, + MCA_T_MEMCONTROLLER_OTHER, + MCA_T_CACHE, + MCA_T_BUS, + MCA_T_UNKNOWN, + MCA_T_COUNT /* Must stay last */ +}; + #ifdef _KERNEL void cmc_intr(void); diff --git a/sys/x86/x86/mca.c b/sys/x86/x86/mca.c index 4ba49469d3a2..1851df8d00a0 100644 --- a/sys/x86/x86/mca.c +++ b/sys/x86/x86/mca.c @@ -134,6 +134,12 @@ static struct task mca_resize_task; static struct timeout_task mca_scan_task; static struct mtx mca_lock; +/* Statistics on number of MCA events by type, updated atomically. */ +static uint64_t mca_stats[MCA_T_COUNT]; +SYSCTL_OPAQUE(_hw_mca, OID_AUTO, stats, CTLFLAG_RD | CTLFLAG_SKIP, + mca_stats, MCA_T_COUNT * sizeof(mca_stats[0]), + "S", "Array of MCA events by type"); + static unsigned int mca_ia32_ctl_reg(int bank) { @@ -356,21 +362,27 @@ mca_error_request(uint16_t mca_error) } static const char * -mca_error_mmtype(uint16_t mca_error) +mca_error_mmtype(uint16_t mca_error, enum mca_stat_types *event_type) { switch ((mca_error & 0x70) >> 4) { case 0x0: + *event_type = MCA_T_MEMCONTROLLER_GEN; return ("GEN"); case 0x1: + *event_type = MCA_T_MEMCONTROLLER_RD; return ("RD"); case 0x2: + *event_type = MCA_T_MEMCONTROLLER_WR; return ("WR"); case 0x3: + *event_type = MCA_T_MEMCONTROLLER_AC; return ("AC"); case 0x4: + *event_type = MCA_T_MEMCONTROLLER_MS; return ("MS"); } + *event_type = MCA_T_MEMCONTROLLER_OTHER; return ("???"); } @@ -426,6 +438,7 @@ static void mca_log(const struct mca_record *rec) { uint16_t mca_error; + enum mca_stat_types event_type; if (mca_mute(rec)) return; @@ -473,34 +486,44 @@ mca_log(const struct mca_record *rec) if (rec->mr_status & MC_STATUS_OVER) printf("OVER "); mca_error = rec->mr_status & MC_STATUS_MCA_ERROR; + event_type = MCA_T_COUNT; switch (mca_error) { /* Simple error codes. */ case 0x0000: printf("no error"); + event_type = MCA_T_NONE; break; case 0x0001: printf("unclassified error"); + event_type = MCA_T_UNCLASSIFIED; break; case 0x0002: printf("ucode ROM parity error"); + event_type = MCA_T_UCODE_ROM_PARITY; break; case 0x0003: printf("external error"); + event_type = MCA_T_EXTERNAL; break; case 0x0004: printf("FRC error"); + event_type = MCA_T_FRC; break; case 0x0005: printf("internal parity error"); + event_type = MCA_T_INTERNAL_PARITY; break; case 0x0006: printf("SMM handler code access violation"); + event_type = MCA_T_SMM_HANDLER; break; case 0x0400: printf("internal timer error"); + event_type = MCA_T_INTERNAL_TIMER; break; case 0x0e0b: printf("generic I/O error"); + event_type = MCA_T_GENERIC_IO; if (rec->mr_cpu_vendor_id == CPU_VENDOR_INTEL && (rec->mr_status & MC_STATUS_MISCV)) { printf(" (pci%d:%d:%d:%d)", @@ -513,6 +536,7 @@ mca_log(const struct mca_record *rec) default: if ((mca_error & 0xfc00) == 0x0400) { printf("internal error %x", mca_error & 0x03ff); + event_type = MCA_T_INTERNAL; break; } @@ -521,6 +545,7 @@ mca_log(const struct mca_record *rec) /* Memory hierarchy error. */ if ((mca_error & 0xeffc) == 0x000c) { printf("%s memory error", mca_error_level(mca_error)); + event_type = MCA_T_MEMORY; break; } @@ -528,12 +553,14 @@ mca_log(const struct mca_record *rec) if ((mca_error & 0xeff0) == 0x0010) { printf("%sTLB %s error", mca_error_ttype(mca_error), mca_error_level(mca_error)); + event_type = MCA_T_TLB; break; } /* Memory controller error. */ if ((mca_error & 0xef80) == 0x0080) { - printf("%s channel ", mca_error_mmtype(mca_error)); + printf("%s channel ", mca_error_mmtype(mca_error, + &event_type)); if ((mca_error & 0x000f) != 0x000f) printf("%d", mca_error & 0x000f); else @@ -548,12 +575,14 @@ mca_log(const struct mca_record *rec) mca_error_ttype(mca_error), mca_error_level(mca_error), mca_error_request(mca_error)); + event_type = MCA_T_CACHE; break; } /* Extended memory error. */ if ((mca_error & 0xef80) == 0x0280) { - printf("%s channel ", mca_error_mmtype(mca_error)); + printf("%s channel ", mca_error_mmtype(mca_error, + &event_type)); if ((mca_error & 0x000f) != 0x000f) printf("%d", mca_error & 0x000f); else @@ -565,6 +594,7 @@ mca_log(const struct mca_record *rec) /* Bus and/or Interconnect error. */ if ((mca_error & 0xe800) == 0x0800) { printf("BUS%s ", mca_error_level(mca_error)); + event_type = MCA_T_BUS; switch ((mca_error & 0x0600) >> 9) { case 0: printf("Source"); @@ -600,6 +630,7 @@ mca_log(const struct mca_record *rec) } printf("unknown error %x", mca_error); + event_type = MCA_T_UNKNOWN; break; } printf("\n"); @@ -615,6 +646,12 @@ mca_log(const struct mca_record *rec) } if (rec->mr_status & MC_STATUS_MISCV) printf("MCA: Misc 0x%llx\n", (long long)rec->mr_misc); + if (event_type < 0 || event_type >= MCA_T_COUNT) { + KASSERT(0, ("%s: invalid event type (%d)", __func__, + event_type)); + event_type = MCA_T_UNKNOWN; + } + atomic_add_64(&mca_stats[event_type], 1); } static bool From nobody Fri Oct 3 17:13: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 4cdZxD1299z6BDNX; Fri, 03 Oct 2025 17:13:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdZxD0L5fz3NY3; Fri, 03 Oct 2025 17:13:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759511584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CoCQ7r5F5I1FLzcPSlmwor4ayV5g7Bq4h9Zjw3A5LjA=; b=wWJGposDGgJOTf2PP7v/tmWoI3BialT0huakoE5VCoDP2GTiHuFtcsYhC+PyNoi6cP3QeJ Ily2hdZSy3RKMFbRScfRnDK1rEp9dK9YtyIQ5v9ahseJG21fjGnh6dUe6nUHMMJmBG55K6 wrRVcnn7F0qwgPiHI8At7XCE56R0+EhlhqFC6FYNHOwebH2APKWz0D4xxnDq0kT4IHEqTL LQIA3hUG8CJueNMuk3LtIOttKydBZKyb0xGCLbFFef6YOdiUWblDI5uefwpLOVxR70rq6d B0HqtD5b41m3ZoON4Q+huePp27QUEdxuuqxJARvKI3f6TizyOTaPgUy6kZmJXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759511584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CoCQ7r5F5I1FLzcPSlmwor4ayV5g7Bq4h9Zjw3A5LjA=; b=ED1sNH44FhpQfNREyv/cZOXUkW1VctP80Q6BmPUbfot7nE1IciX1kLjZV8E+fnma49vnU8 ni3Y8tOOKNcviK1o35h/t4RsbpozcNh1+VvvrfFAhXm3Par/5KSrOQ0hUQdZA4Ku5/K/HY 9WUeGrwfWbT1uf5f77VPF3ccvaLR7b3g+iJM7VR9bT8Osf9nVP0R4+ZKbDi3ZiI3vm6vai k81DuuVaZbyNprR0nuB91AfznieAC32mzbNV0ZgbXvmD+LVbPvXwlsUMOAu3omUtVAuKBq 0LEboK0k7cN6dvqUpdOg1cb/u1iWKb2p6Hz8QpPVpgvN1rRxIeEngknnU7h9+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759511584; a=rsa-sha256; cv=none; b=i/QgvLIb07lJbJjpzDNGsPfYRSUTwNk165yjmBC+Izmh8KzGxDbPLjCOkBa04cItlf1RBC 029EIoGe8wPR3qB2iRYFVehwLDlKvviTvSbEGHR03HNRAcAXnb+plXN+8Agkgzq/ovf1mb jKGugzrQ0Kflg0i1A8FjWQ2EqX8UPaeNNA2IKwHV0Br4+NVr8sfanyGPorEJ+I5T8ea0Ml oTP8xTUj4H6vrvgR5oJ08+zUYVBJpytNs5MPn1vg+Cmw+OYzVn1LlBr9uoCiH5eBdG0Uby PfbEvRKihfF58/MEUqWMfiTvaTgVoxJ76+MZHsuXFSg2w4mWNmu3V/lbCeBysg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdZxC6wC0z13sf; Fri, 03 Oct 2025 17:13:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593HD35r002784; Fri, 3 Oct 2025 17:13:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593HD3CL002781; Fri, 3 Oct 2025 17:13:03 GMT (envelope-from git) Date: Fri, 3 Oct 2025 17:13:03 GMT Message-Id: <202510031713.593HD3CL002781@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 5c331f449e9c - main - fcntlflags_test: Port to atf-c(3) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c331f449e9ca549d03ae1a3f50ac0e5306b488e Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=5c331f449e9ca549d03ae1a3f50ac0e5306b488e commit 5c331f449e9ca549d03ae1a3f50ac0e5306b488e Author: John Baldwin AuthorDate: 2025-10-03 16:43:18 +0000 Commit: John Baldwin CommitDate: 2025-10-03 16:43:18 +0000 fcntlflags_test: Port to atf-c(3) Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D52720 --- tests/sys/file/Makefile | 2 +- tests/sys/file/fcntlflags_test.c | 116 +++++++++++++++++++-------------------- 2 files changed, 58 insertions(+), 60 deletions(-) diff --git a/tests/sys/file/Makefile b/tests/sys/file/Makefile index f80d1b271b85..beb4452359b7 100644 --- a/tests/sys/file/Makefile +++ b/tests/sys/file/Makefile @@ -5,7 +5,7 @@ BINDIR= ${TESTSDIR} ATF_TESTS_C+= path_test TAP_TESTS_C+= closefrom_test TAP_TESTS_C+= dup_test -TAP_TESTS_C+= fcntlflags_test +ATF_TESTS_C+= fcntlflags_test TAP_TESTS_SH+= flock_test PLAIN_TESTS_C+= ftruncate_test PLAIN_TESTS_C+= newfileops_on_fork_test diff --git a/tests/sys/file/fcntlflags_test.c b/tests/sys/file/fcntlflags_test.c index c5026e38c48b..009bb87371a1 100644 --- a/tests/sys/file/fcntlflags_test.c +++ b/tests/sys/file/fcntlflags_test.c @@ -24,85 +24,83 @@ * SUCH DAMAGE. */ -#include - +#include #include #include #include +#include + /* * O_ACCMODE is currently defined incorrectly. This is what it should be. * Various code depends on the incorrect value. */ #define CORRECT_O_ACCMODE (O_ACCMODE | O_EXEC) -static int testnum; - static void -subtests(const char *path, int omode, const char *omodetext) +basic_tests(const char *path, int omode, const char *omodetext) { int fd, flags1, flags2, flags3; fd = open(path, omode); - if (fd == -1) - printf("not ok %d - open(\"%s\", %s) failed\n", - testnum++, path, omodetext); - else - printf("ok %d - open(\"%s\", %s) succeeded\n", - testnum++, path, omodetext); + ATF_REQUIRE_MSG(fd != -1, "open(\"%s\", %s) failed: %s", path, + omodetext, strerror(errno)); + flags1 = fcntl(fd, F_GETFL); - if (flags1 == -1) - printf("not ok %d - fcntl(F_GETFL) failed\n", testnum++); - else if ((flags1 & CORRECT_O_ACCMODE) == omode) - printf("ok %d - fcntl(F_GETFL) gave correct result\n", - testnum++); - else - printf("not ok %d - fcntl(F_GETFL) gave incorrect result " - "(%#x & %#x != %#x)\n", - testnum++, flags1, CORRECT_O_ACCMODE, omode); - if (fcntl(fd, F_SETFL, flags1) == -1) - printf("not ok %d - fcntl(F_SETFL) same flags failed\n", - testnum++); - else - printf("ok %d - fcntl(F_SETFL) same flags succeeded\n", - testnum++); + ATF_REQUIRE_MSG(flags1 != -1, "fcntl(F_GETFL) (1) failed: %s", + strerror(errno)); + ATF_REQUIRE_INTEQ(omode, flags1 & CORRECT_O_ACCMODE); + ATF_REQUIRE((flags1 & O_NONBLOCK) == 0); + + ATF_REQUIRE_MSG(fcntl(fd, F_SETFL, flags1) != -1, + "fcntl(F_SETFL) same flags failed: %s", strerror(errno)); + flags2 = fcntl(fd, F_GETFL); - if (flags2 == -1) - printf("not ok %d - fcntl(F_GETFL) failed\n", testnum++); - else if (flags2 == flags1) - printf("ok %d - fcntl(F_GETFL) gave same result\n", - testnum++); - else - printf("not ok %d - fcntl(F_SETFL) caused fcntl(F_GETFL) to " - "change from %#x to %#x\n", - testnum++, flags1, flags2); - if (fcntl(fd, F_SETFL, flags2 | O_NONBLOCK) == -1) - printf("not ok %d - fcntl(F_SETFL) O_NONBLOCK failed\n", - testnum++); - else - printf("ok %d - fcntl(F_SETFL) O_NONBLOCK succeeded\n", - testnum++); + ATF_REQUIRE_MSG(flags2 != -1, "fcntl(F_GETFL) (2) failed: %s", + strerror(errno)); + ATF_REQUIRE_INTEQ(flags1, flags2); + + ATF_REQUIRE_MSG(fcntl(fd, F_SETFL, flags2 | O_NONBLOCK) != -1, + "fcntl(F_SETFL) O_NONBLOCK failed: %s", strerror(errno)); + flags3 = fcntl(fd, F_GETFL); - if (flags3 == -1) - printf("not ok %d - fcntl(F_GETFL) failed\n", testnum++); - else if (flags3 == (flags2 | O_NONBLOCK)) - printf("ok %d - fcntl(F_GETFL) gave expected result\n", - testnum++); - else - printf("not ok %d - fcntl(F_SETFL) gave unexpected result " - "(%#x != %#x)\n", - testnum++, flags3, flags2 | O_NONBLOCK); + ATF_REQUIRE_MSG(flags3 != -1, "fcntl(F_GETFL) (3) failed: %s", + strerror(errno)); + ATF_REQUIRE_INTEQ(flags2 | O_NONBLOCK, flags3); + (void)close(fd); } -int -main(int argc __unused, char **argv __unused) +ATF_TC_WITHOUT_HEAD(read_only_null); +ATF_TC_BODY(read_only_null, tc) +{ + basic_tests("/dev/null", O_RDONLY, "O_RDONLY"); +} + +ATF_TC_WITHOUT_HEAD(write_only_null); +ATF_TC_BODY(write_only_null, tc) +{ + basic_tests("/dev/null", O_WRONLY, "O_WRONLY"); +} + +ATF_TC_WITHOUT_HEAD(read_write_null); +ATF_TC_BODY(read_write_null, tc) { - printf("1..24\n"); - testnum = 1; - subtests("/dev/null", O_RDONLY, "O_RDONLY"); - subtests("/dev/null", O_WRONLY, "O_WRONLY"); - subtests("/dev/null", O_RDWR, "O_RDWR"); - subtests("/bin/sh", O_EXEC, "O_EXEC"); - return (0); + basic_tests("/dev/null", O_RDWR, "O_RDWR"); +} + +ATF_TC_WITHOUT_HEAD(exec_only_sh); +ATF_TC_BODY(exec_only_sh, tc) +{ + basic_tests("/bin/sh", O_EXEC, "O_EXEC"); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, read_only_null); + ATF_TP_ADD_TC(tp, write_only_null); + ATF_TP_ADD_TC(tp, read_write_null); + ATF_TP_ADD_TC(tp, exec_only_sh); + + return (atf_no_error()); } From nobody Fri Oct 3 17:13:04 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdZxF4VkYz6BDLH; Fri, 03 Oct 2025 17:13:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdZxF2JXMz3P5g; Fri, 03 Oct 2025 17:13:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759511585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KcUJGJO2CIuefENcKeE5WMx+rQtIwovZjXKdMZry6ko=; b=dcCLDGNfx9WlkHbYgkppb88wYkRW64ncI6Jt1H+eFbS7BhQFPphb+TqtE1gUYrCeqKthoG lMLTwGZedXiRo9Zk3xQW4+03fnYp18xm5bna3nbMSWgJbw6/k1BQSnBWVjidjnPpjMmzpP caybTpjO/JSOfK95txkrjz1d5K6UhDdgtdMKL4tSs8G0o5SgvhGrTZ7eHcyLltcKQZODxp ZSqNptb5xE5puZ/9F/03HAflT8s4bvRdBBB1tqziP2FWFzc88Yu091dNc7SJ1h3Y0VkwwM +qED3TOvw04ed08+OznwnWuJVwo6/4pZZElYhP8F/hD9vse/AcRTXgWfNBTgkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759511585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KcUJGJO2CIuefENcKeE5WMx+rQtIwovZjXKdMZry6ko=; b=bC2NQayxeBFPXuFIlYKw4C3uexF5spwNzTdlEuga7aiFPLuonUnde88e6H/tNiIZ7BT49L AazTD1Y0Wy+3jQpdxiJEqucD3WlcavRQEa76j4JtMn7A1bx9r78j4ETBksbsTst6SyUPLj q/Mj7xI6GP06o9jmtjrLtX1gjBkh7vNf7A1RGV50yQlK+ogzoJ56B9C3kH89TmnAfEi7Kw 6AmX0stjd0lsPJ+msufXqswCmCvlpMGqAGof2rbJUtIzfyoa/hozwIObg2FZAq4sYaBJqI Mq3czN7GH0grLzvDWRxeVtlNP6eOFvzVOhHJqby5T0xWYSNm6cwQv1JMC9lJFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759511585; a=rsa-sha256; cv=none; b=RqsqCzpo1tOlk2OlSz6F1DH+MA2Nh6DS6exqErUjROs9Fn9kvybXnTily6iPk/OBEO8KJI /DOFai8bi5WpaNeSfNpTsdBLqH8QzCXBNwRuuRUd0XIBFQ/wPCUHPTR8owpu9CXuRDEv9e hJqNGekFkz/JeNZF4XXUIWF3ZCMo6Z9xLu9NZRmLKVnsame6ZZNMH60Pi9gDpn+ZrsMhrP 2EAo1PhdOVOMaq8D1VTRMScXqVwt5sAR5aiRqdmWsoHpCLb33kamao65qKiCIxmr6T6BP9 AP8GWRdebFw7ARA4ARFkMI7uzHphkVYSzPuhKPVQAgCHIF7UYA3GV59vCHYS1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdZxF0kQjz1416; Fri, 03 Oct 2025 17:13:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593HD5k9002823; Fri, 3 Oct 2025 17:13:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593HD4Z1002820; Fri, 3 Oct 2025 17:13:04 GMT (envelope-from git) Date: Fri, 3 Oct 2025 17:13:04 GMT Message-Id: <202510031713.593HD4Z1002820@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: dfd7d1610aeb - main - filedesc: Close race between fcntl(F_SETFL) and ioctl(FIONBIO/FIOASYNC) 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: dfd7d1610aeb654aafcaa8cf77b75fc5c7d60250 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=dfd7d1610aeb654aafcaa8cf77b75fc5c7d60250 commit dfd7d1610aeb654aafcaa8cf77b75fc5c7d60250 Author: John Baldwin AuthorDate: 2025-10-03 16:43:30 +0000 Commit: John Baldwin CommitDate: 2025-10-03 16:43:30 +0000 filedesc: Close race between fcntl(F_SETFL) and ioctl(FIONBIO/FIOASYNC) - Use the recently-added fsetfl_lock/unlock API to synchronize direct FIONBIO and FIOASYNC ioctls with fcntl(F_SETFL). - While here, skip calling the underlying ioctl if the flag's current state matches the requested state. - Also while here, only update the flag state if the underlying ioctl succeeds. This fixes a bug where the flags represented the new state even if the underlying ioctl failed. A test is added for this last case that a failing FIOASYNC on /dev/null doesn't result in setting O_ASYNC in the file flags. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D52721 --- sys/kern/sys_generic.c | 36 +++++++++++++++++++++--------------- tests/sys/file/fcntlflags_test.c | 27 +++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 15 deletions(-) diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 5606b36f772f..7d666da9f88b 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -729,7 +729,7 @@ kern_ioctl(struct thread *td, int fd, u_long com, caddr_t data) { struct file *fp; struct filedesc *fdp; - int error, tmp, locked; + int error, f_flag, tmp, locked; AUDIT_ARG_FD(fd); AUDIT_ARG_CMD(com); @@ -782,30 +782,36 @@ kern_ioctl(struct thread *td, int fd, u_long com, caddr_t data) goto out; } + f_flag = 0; switch (com) { case FIONCLEX: fdp->fd_ofiles[fd].fde_flags &= ~UF_EXCLOSE; - goto out; + break; case FIOCLEX: fdp->fd_ofiles[fd].fde_flags |= UF_EXCLOSE; - goto out; - case FIONBIO: - if ((tmp = *(int *)data)) - atomic_set_int(&fp->f_flag, FNONBLOCK); - else - atomic_clear_int(&fp->f_flag, FNONBLOCK); - data = (void *)&tmp; break; + case FIONBIO: case FIOASYNC: - if ((tmp = *(int *)data)) - atomic_set_int(&fp->f_flag, FASYNC); - else - atomic_clear_int(&fp->f_flag, FASYNC); - data = (void *)&tmp; + f_flag = com == FIONBIO ? FNONBLOCK : FASYNC; + tmp = *(int *)data; + fsetfl_lock(fp); + if (((fp->f_flag & f_flag) != 0) != (tmp != 0)) { + error = fo_ioctl(fp, com, (void *)&tmp, td->td_ucred, + td); + if (error == 0) { + if (tmp != 0) + atomic_set_int(&fp->f_flag, f_flag); + else + atomic_clear_int(&fp->f_flag, f_flag); + } + } + fsetfl_unlock(fp); + break; + default: + error = fo_ioctl(fp, com, data, td->td_ucred, td); break; } - error = fo_ioctl(fp, com, data, td->td_ucred, td); out: switch (locked) { case LA_XLOCKED: diff --git a/tests/sys/file/fcntlflags_test.c b/tests/sys/file/fcntlflags_test.c index 009bb87371a1..15a18c113c4a 100644 --- a/tests/sys/file/fcntlflags_test.c +++ b/tests/sys/file/fcntlflags_test.c @@ -24,6 +24,7 @@ * SUCH DAMAGE. */ +#include #include #include #include @@ -95,12 +96,38 @@ ATF_TC_BODY(exec_only_sh, tc) basic_tests("/bin/sh", O_EXEC, "O_EXEC"); } +ATF_TC_WITHOUT_HEAD(fioasync_dev_null); +ATF_TC_BODY(fioasync_dev_null, tc) +{ + int fd, flags1, flags2, val; + + fd = open("/dev/null", O_RDONLY); + ATF_REQUIRE_MSG(fd != -1, "open(\"/dev/null\") failed: %s", + strerror(errno)); + + flags1 = fcntl(fd, F_GETFL); + ATF_REQUIRE_MSG(flags1 != -1, "fcntl(F_GETFL) (1) failed: %s", + strerror(errno)); + ATF_REQUIRE((flags1 & O_ASYNC) == 0); + + val = 1; + ATF_REQUIRE_ERRNO(EINVAL, ioctl(fd, FIOASYNC, &val) == -1); + + flags2 = fcntl(fd, F_GETFL); + ATF_REQUIRE_MSG(flags2 != -1, "fcntl(F_GETFL) (2) failed: %s", + strerror(errno)); + ATF_REQUIRE_INTEQ(flags1, flags2); + + (void)close(fd); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, read_only_null); ATF_TP_ADD_TC(tp, write_only_null); ATF_TP_ADD_TC(tp, read_write_null); ATF_TP_ADD_TC(tp, exec_only_sh); + ATF_TP_ADD_TC(tp, fioasync_dev_null); return (atf_no_error()); } From nobody Fri Oct 3 17:20:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdb5K4BTgz6BFF1; Fri, 03 Oct 2025 17:20:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdb5K3TWgz3Q13; Fri, 03 Oct 2025 17:20:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759512005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=riUEXi3VJjIVQZuksEroIeAG9mIc5u1x6qEXsL7QT7o=; b=f9G+4JSCcti+Rlr0PrSbp/ZPoVVUt4HIpEaT1/fa5jT6L9WoaPxMGQSuX6Vv5rvPCSQ05n laLqi2SucH4+PSVeqlltRXt3toI0DqEayyy7HUVdMzgZDA2/juemNaZXPOE6FNECmSpr/3 p4J4zCh40nvP6WdPL/LckqzNa1jmGYu/2/UDemw5VCua//E1r2XBcjPbQ8QcQ0w7th9tbF JgTDOlJZ5QXetgwTj3e//ZHNc9n+cms1k0YTzZJTUMPmviYHA+RvyL2xeoeOMBnVRVxrGo 9MRuRdzLe9Dws+ku4XX57j5gosF8azgOIm9xgHYGMWFRSbk1oCmLaFiQXNweCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759512005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=riUEXi3VJjIVQZuksEroIeAG9mIc5u1x6qEXsL7QT7o=; b=FnlrT8Taki3q/Z528l/dUniRj2hy8Wr5LmzQCJz1h/EMWe9BhI58GPvS0IvTiQXk0sIkA8 GKpVFfYy4jhgL/MdDd7Y+13VPF/77BtVKQiyJieKIzrvpqsd8PJpUtZM7PUDH1z6EXrKCu LOy17yf1f+T7BMF+mbsSxGYDL2QF+D9cSwaEKtvAGzvcCS6eJ6o8OIU9jKyKClJ1JjletZ ACl9XstK9nFpYALVK8T0j8Y6QkCItAK2Gc5U9ykwOHVRTJdc5Dvphas1mcHv81BfuQP/to Jh2XZ9B4DRjvZ5+dD3UqQygaiy7c+SSSsNqOKGVEvG2MqmNkTE4SNlosYlkpMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759512005; a=rsa-sha256; cv=none; b=ZRMzZ9abR8g18zAICxjnN1H0+A2cYGrYdehfCGKrYhK481iN3/qftld0EZeWwAyPZ2muxy Ug+oYPBUUzIVRsNmLzloXrB+0Wj9ImVSPt97HaWdzsK1qZSL4dCjH+ZNCNNT2pkxQXNvxc lL1AlMZf3fCeW6zRKLiY5ggtj2S84tnTLIN1gPNHNqd2LiMmHRfGXWfS35EWyELQjik9T/ wOnFLPvkioSAV0CiicfiJlIguBOK61wA9W0XfilYT6tM/7dI+P5GXjv9Uwtqp8m4azVkZn aCItsPnHxfGSLv4kCB+kx9cGRPRv925/WuhYnJ//3EGjpsH0tMNkPd0EgvrRwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdb5K2rcrz145c; Fri, 03 Oct 2025 17:20:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593HK5bY007759; Fri, 3 Oct 2025 17:20:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593HK5bE007754; Fri, 3 Oct 2025 17:20:05 GMT (envelope-from git) Date: Fri, 3 Oct 2025 17:20:05 GMT Message-Id: <202510031720.593HK5bE007754@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: a8d774d9708c - main - man: Conditionally install ar.5 in toolchain package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a8d774d9708c100a52f231065d9d5f1b4c3aceb7 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a8d774d9708c100a52f231065d9d5f1b4c3aceb7 commit a8d774d9708c100a52f231065d9d5f1b4c3aceb7 Author: Ed Maste AuthorDate: 2025-10-03 16:02:20 +0000 Commit: Ed Maste CommitDate: 2025-10-03 17:19:36 +0000 man: Conditionally install ar.5 in toolchain package Previously if WITHOUT_TOOLCHAIN was set we'd create a FreeBSD-clang package that contained only ar.5. As ar.5 describes the ar format and doesn't come from Clang/LLVM move it to the FreeBSD-toolchain package and make it conditional on MK_TOOLCHAIN. Reviewed by: ivy Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52886 --- share/man/man5/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/share/man/man5/Makefile b/share/man/man5/Makefile index 0f6559b236c6..c13a8b7afde2 100644 --- a/share/man/man5/Makefile +++ b/share/man/man5/Makefile @@ -73,9 +73,11 @@ MANGROUPS+= BOOTLOADER BOOTLOADER= device.hints.5 BOOTLOADERPACKAGE=bootloader -MANGROUPS+= CLANG -CLANG= ar.5 -CLANGPACKAGE= clang +.if ${MK_TOOLCHAIN} != "no" +MANGROUPS+= TOOLCHAIN +TOOLCHAIN= ar.5 +TOOLCHAINPACKAGE=toolchain +.endif MANGROUPS+= LP LP= hosts.lpd.5 From nobody Fri Oct 3 17:48:29 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdbk61ghWz6BHc5; Fri, 03 Oct 2025 17:48:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdbk56kBYz3TVZ; Fri, 03 Oct 2025 17:48:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759513710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QRDkk9LTWWne52bskYn9C7AnPpyNSxWVge0o35kxZVo=; b=PeBRoFciHwdpQ6QsjCbt8V2yESLztjAHcnE+Hqws3THTmNTWnhBV7nSRsXXMrJTL4Ekkte fQYqLI+1ZX9yDgB2THg7Zzx36XuCRwBwkAumVhPYfe8lOd8xjhdR8a+LBJdMLZF8YPagYj Bx2l7tuHcQ3t++N2kOnaMETfuXYF+qb7EwCrTi877WhgtBIK1VTndTr/Juhq5Sn9k5bo+1 kAM6fIsU/5v2PzIG5i8gQViP/2AcTpMkjfT3iD4x8Nt6XmRsq2/ypRid6hFLIMk9FWwiwV C5vBAjbUgRO9bYMIu4pycXypOF7bYKOPrb8GKKGmMh6kgG4pyLbhXkHtPREzDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759513710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QRDkk9LTWWne52bskYn9C7AnPpyNSxWVge0o35kxZVo=; b=fZA8rOf2NgXN/DHAZQw0/NSJUSrkVj7oS2rwctgXmRZRfzkfszFcMfJXdiKNmic/G6s3Bn TDu/D9w8z2VOR60AmaWHIEdaqNvMpxH8EJgLN+gyFpBzOMiMOApSECJ+DpJSQgBiLh64bw zJAZwYM/gpxhKbkdYTUIyAddJFseS2QIFHTiD8mD4SeCzDoj7HrI1sq5tc0dIO7joXJt7k QhwbA4fqecK18CQCYzAPSQuastFdFUnuUpsm/I+rxmdn5uNFoBjhxOjv9AAxAHojbCyBrT MaiByICSehmXyi/viwt54k/D7jVo5aQibgwgM7FqsYCtC2bZ8yHNmKiQ2FkAIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759513710; a=rsa-sha256; cv=none; b=J/jI8AHH/XNlQOGtxnua632DOy1IhCXGGCMGI9XlguiDeXcpAMfBUl7t63UPKmaH/gKBuk awq9qCf/4tl165yuWgfFIAqtRJlaBk2Wp8U/Czdo3yk6ajFcYmRdSoXJQGfU5Nf5h7TnBc NeLWb5caEZAUL6yhup5d0XswiVx2YQBiE5db94KAiZSC5iO0Phy4tDHaU3OTGKx/a4K3mt QL3pW1aHldcCeN0okM2nEO0RBZxF8ciaCITQFhln+zA6W6sXizLXSfjVR30nTXzW6PS5kV OYlUc/5B7Lm3J/y8/AhbO0An52YzIwzZ1GWOhykO+RaViX+JupW9ZJTaHJgmLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdbk56KcQz14j5; Fri, 03 Oct 2025 17:48:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593HmT8c060776; Fri, 3 Oct 2025 17:48:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593HmTBK060773; Fri, 3 Oct 2025 17:48:29 GMT (envelope-from git) Date: Fri, 3 Oct 2025 17:48:29 GMT Message-Id: <202510031748.593HmTBK060773@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 7233893e9496 - main - lib{c,openbsd}: use ckd_mul() for overflow checking in re(c)allocarray List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7233893e949689d378d38c11651e68321deed12c Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=7233893e949689d378d38c11651e68321deed12c commit 7233893e949689d378d38c11651e68321deed12c Author: Robert Clausecker AuthorDate: 2025-10-02 13:26:46 +0000 Commit: Robert Clausecker CommitDate: 2025-10-03 17:45:54 +0000 lib{c,openbsd}: use ckd_mul() for overflow checking in re(c)allocarray Summary: This makes the code easier to understand and slightly faster, but requires C23. calloc() would benefit, too, but I didn't want to touch the imported jemalloc code base. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D52854 --- lib/libc/stdlib/reallocarray.c | 14 +++++--------- lib/libopenbsd/recallocarray.c | 15 +++------------ 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/lib/libc/stdlib/reallocarray.c b/lib/libc/stdlib/reallocarray.c index 0868804486cc..3632734c84de 100644 --- a/lib/libc/stdlib/reallocarray.c +++ b/lib/libc/stdlib/reallocarray.c @@ -17,23 +17,19 @@ #include #include +#include #include #include -/* - * This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX - * if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW - */ -#define MUL_NO_OVERFLOW ((size_t)1 << (sizeof(size_t) * 4)) - void * reallocarray(void *optr, size_t nmemb, size_t size) { + size_t nbytes; - if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && - nmemb > 0 && SIZE_MAX / nmemb < size) { + if (ckd_mul(&nbytes, nmemb, size)) { errno = ENOMEM; return (NULL); } - return (realloc(optr, size * nmemb)); + + return (realloc(optr, nbytes)); } diff --git a/lib/libopenbsd/recallocarray.c b/lib/libopenbsd/recallocarray.c index 11e1fda744c7..cbf1fb2470cf 100644 --- a/lib/libopenbsd/recallocarray.c +++ b/lib/libopenbsd/recallocarray.c @@ -16,17 +16,12 @@ */ #include +#include #include #include #include #include -/* - * This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX - * if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW - */ -#define MUL_NO_OVERFLOW ((size_t)1 << (sizeof(size_t) * 4)) - void *recallocarray(void *, size_t, size_t, size_t); void * @@ -38,19 +33,15 @@ recallocarray(void *ptr, size_t oldnmemb, size_t newnmemb, size_t size) if (ptr == NULL) return calloc(newnmemb, size); - if ((newnmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && - newnmemb > 0 && SIZE_MAX / newnmemb < size) { + if (ckd_mul(&newsize, newnmemb, size)) { errno = ENOMEM; return NULL; } - newsize = newnmemb * size; - if ((oldnmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && - oldnmemb > 0 && SIZE_MAX / oldnmemb < size) { + if (ckd_mul(&oldsize, oldnmemb, size)) { errno = EINVAL; return NULL; } - oldsize = oldnmemb * size; /* * Don't bother too much if we're shrinking just a bit, From nobody Fri Oct 3 17:48:30 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdbk72BWlz6BHc9; Fri, 03 Oct 2025 17:48:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdbk70jjbz3TXg; Fri, 03 Oct 2025 17:48:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759513711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s9UW6TSY8A86+Jg1n5AYd0MVKw/wsyb/kdE4T/RzuCk=; b=kYEEFD0P3ITmup69Gwadwt1PK74DaTYknH6g3RD0P4OEf3SvL7egP4XyL394E5JcYwl/KZ grHaroPC9pBxqSN4BNSUWc2r+AyAzOfiUeyKCl+Q+RDgEWK0Fhxmn7f96HYnHT3D4GJiqI OyxP/dIT5OJP+ow58wGOl9rp2fYgzQ7TmSDJsyrXdaVB9Lv/voGhFbrXYpIQZ1WvcXcDqj HKsNPdCEVdfI8naCqM0y7CakPYgpLyn9UvUfttjtB/3oTbzi4Tk308RaPs/lVvwYs5f3Rb vIKhBwQONynqrW1vLjtvJUUvQ2+2f5ccOy/18S8ys4paWu72JVjj4MhxXcmMew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759513711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s9UW6TSY8A86+Jg1n5AYd0MVKw/wsyb/kdE4T/RzuCk=; b=KKveacdLskkTYGdI/5y4sqEHtzbYa2252Ytl+TeGr7RM0+OSvrT3TY7jwh24zIGWXiyw4e WJX4+5sasU/ewTs2NlvQKnGSkq7dFEl5I2ysKSxlBgRrdTXNqLGD3aUlnnDj/Tg/VDz7mC aXONDElleggi7/9n528nQB9aaWk7Z6gkJuwDCJYz+P08Pz8VUkmIUA8Ighr43dBDjEwlYn goNzSpnKhUucf218Ly4Lzi2uurZLnSD/Q5WjRIAWtmLswiR8xuBGrg889316hPfefmbE46 wZGvxI2PZL4M5bHh50q5qFqW7UVuG0GajWPaihBq6PwQ+m3NBdgE0sa9DJtTmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759513711; a=rsa-sha256; cv=none; b=ErJ6fceY16CCY6rHTavfWprx7aDws2PDTbmC6/L7lCu4MpKg4GWyIFCSB9aJNNKCRWVyng NqAJxRLC9+xm58TTGpE+JEiCjoUbpS7kA5GWIEgkFW435x28RUPRmry9em6ntOfFtyGxnl 3R8qOxZ/53sO/OtSMML43kBYTqGmv1RJ30yHOzq2JDyHWLGi6USoXUehwTP846a5MiU2yT SGf9UC99OKzRp0gzJgWAbxhq7Gm1ZPEbzYm/Ck8Zw9MKERjlwuptYvLhu0jIiyRkaBEPE5 I9MjYeGo97Z1C07bx/WL7w32VtMKxAkMMG+P02UYsQsXV8SijTVANnZTH47QsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdbk708X0z14Bm; Fri, 03 Oct 2025 17:48:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593HmUDq060813; Fri, 3 Oct 2025 17:48:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593HmUVw060809; Fri, 3 Oct 2025 17:48:30 GMT (envelope-from git) Date: Fri, 3 Oct 2025 17:48:30 GMT Message-Id: <202510031748.593HmUVw060809@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 969c1191957a - main - lib/libc: add FBSD-1.9 to Versions.def List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 969c1191957a9ad689546ddb4e8c4df2217c5052 Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=969c1191957a9ad689546ddb4e8c4df2217c5052 commit 969c1191957a9ad689546ddb4e8c4df2217c5052 Author: Robert Clausecker AuthorDate: 2025-10-03 01:43:48 +0000 Commit: Robert Clausecker CommitDate: 2025-10-03 17:46:22 +0000 lib/libc: add FBSD-1.9 to Versions.def In preparation of adding recallocarray() to libc. See also: D52863 Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D52878 --- lib/libc/Versions.def | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/libc/Versions.def b/lib/libc/Versions.def index 184e107d225a..1c7b34bef35b 100644 --- a/lib/libc/Versions.def +++ b/lib/libc/Versions.def @@ -42,6 +42,10 @@ FBSD_1.7 { FBSD_1.8 { } FBSD_1.7; +# This version was first added to 16.0-current. +FBSD_1.9 { +} FBSD_1.8; + # This is our private namespace. Any global interfaces that are # strictly for use only by other FreeBSD applications and libraries # are listed here. We use a separate namespace so we can write @@ -49,4 +53,4 @@ FBSD_1.8 { # # Please do NOT increment the version of this namespace. FBSDprivate_1.0 { -} FBSD_1.8; +} FBSD_1.9; From nobody Fri Oct 3 17:48: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 4cdbk90pgzz6BHSj; Fri, 03 Oct 2025 17:48:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdbk81Z3Lz3TSQ; Fri, 03 Oct 2025 17:48:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759513712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ORzN5T1OZemTnUICq7Rj7X/Bo8HeofGyciVzji0mbFo=; b=AKqLGyw9hQjVtbAGPKJILy+LaZ7HL5M1xbecb1YPpQD0M5YicOxwkKxkpOMHKxzSXYziRL RWGkFO/V/Kb+jiLibyLACflKMmQtvqDOpbur9qY472mZbZ9JTkAro+2V0gWfoOEGWz1GcH s2aIpfwbvqrHIAoPcEyNkkRq1xKP3Tqlv42rAR9Qu9qqAhI7ZupDQblgEtfdtEss8dBUOB z1cRuJQekbp5Jm6MMMobamZM/M6YmYt+mvd2q7gplxItxbuVJrzbR5UdlrCt5qLtuWGpPF R57NMlN5speV1p87M2W6SC3f+zTdrOjecUOLdRoFw+0MF6WOAeN5CJCD0MLsgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759513712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ORzN5T1OZemTnUICq7Rj7X/Bo8HeofGyciVzji0mbFo=; b=e+ZSQCYqjJj9nZeyOo7nu4+BzCWw1RH/ysRLtABM1YKKiDTpFL0cqH8vE/guHTmqiID/+X NIQSPSSoKmmVFjdozS5A57cRtChTnPpzidcbvAuBrbpK1GhIDAcENC9LUq07bWuORZYRpf SNqer0b1KrFrfpDlQTHHVoeFSCtyRE6tkYl47HXS2qEIfFOCX6s8skPtkZYUHczdKxqkXe GMiLGvec05cGh/9N0nU5QkZeS8ahVVfYtQl5Q+qdc0sFi4p4i3Okp9RQzUhnrwRiUH2K2l FljiabircjWnKk9wJnFUlBVrri2EfPIKOhXJ30+Dc5Wqrl2X4skkxq7yxvGWdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759513712; a=rsa-sha256; cv=none; b=XPw1zYpJSGJnnYbGKs98n2fUiBMRRlmMbchnaF0U2UPdvGym6UWH7VxVHPGthJiCkg6pKD y/pEevxLCATCxlezd/S5aVLVdLdvFaoWDNkcJ3CW4Zje4UyFsrUQuSc+G9R6SShjNA3O8j U8pTsIDFf82PXVTtawdLiOsJf+OnyrNQ1ql2Z7hY7ATnydnnW5p8RILiHOPmuhWGDR5bwF A+DXDOttpx35x3v3wuhKS5Iecrs13bTdrX8e09FwZTPAGlc5auQaJxutv73+Z2vJ6MRmPr EaGo96QWPCXtBWKAGcX8gH5kJWbAgwnRcPq/UMgk9qpLD6hLOPOdeNbABtDtBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdbk817ZZz14Bn; Fri, 03 Oct 2025 17:48:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593HmWbr060847; Fri, 3 Oct 2025 17:48:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593HmWeI060844; Fri, 3 Oct 2025 17:48:32 GMT (envelope-from git) Date: Fri, 3 Oct 2025 17:48:32 GMT Message-Id: <202510031748.593HmWeI060844@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: 42664610795b - main - lib/libc: add recallocarray() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 42664610795bc0a728851ba6223fcf9b93801167 Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=42664610795bc0a728851ba6223fcf9b93801167 commit 42664610795bc0a728851ba6223fcf9b93801167 Author: Robert Clausecker AuthorDate: 2025-10-02 14:33:55 +0000 Commit: Robert Clausecker CommitDate: 2025-10-03 17:46:55 +0000 lib/libc: add recallocarray() This function from OpenBSD is a hybrid of reallocarray() and calloc(). It reallocates an array, clearing any newly allocated items. reallocarray() ultimately originates from OpenBSD. The source is taken from lib/libopenbsd, which now no longer has the function unless when bootstrapping (needed for mandoc). Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D52863 --- include/stdlib.h | 2 ++ lib/libc/stdlib/Makefile.inc | 3 +- lib/libc/stdlib/Symbol.map | 4 +++ lib/libc/stdlib/reallocarray.3 | 37 ++++++++++++++++++++++++- lib/{libopenbsd => libc/stdlib}/recallocarray.c | 0 lib/libopenbsd/Makefile | 8 ++++-- 6 files changed, 50 insertions(+), 4 deletions(-) diff --git a/include/stdlib.h b/include/stdlib.h index ba0cf4b5e88e..784cb63bfc5b 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -314,6 +314,8 @@ int radixsort(const unsigned char **, int, const unsigned char *, unsigned); void *reallocarray(void *, size_t, size_t) __result_use_check __alloc_size2(2, 3); +void *recallocarray(void *, size_t, size_t, size_t) __result_use_check + __alloc_size2(3, 4); void *reallocf(void *, size_t) __result_use_check __alloc_size(2); int rpmatch(const char *); char *secure_getenv(const char *); diff --git a/lib/libc/stdlib/Makefile.inc b/lib/libc/stdlib/Makefile.inc index ca199a669be1..e7b9955b9646 100644 --- a/lib/libc/stdlib/Makefile.inc +++ b/lib/libc/stdlib/Makefile.inc @@ -10,7 +10,7 @@ MISRCS+=C99_Exit.c a64l.c abort.c abs.c atexit.c atof.c atoi.c atol.c atoll.c \ insque.c l64a.c labs.c ldiv.c llabs.c lldiv.c lsearch.c \ merge.c mergesort_b.c ptsname.c qsort.c qsort_r.c qsort_r_compat.c \ qsort_s.c quick_exit.c radixsort.c rand.c \ - random.c reallocarray.c reallocf.c realpath.c remque.c \ + random.c reallocarray.c reallocf.c realpath.c recallocarray.c remque.c \ set_constraint_handler_s.c strfmon.c strtoimax.c \ strtol.c strtold.c strtoll.c strtoq.c strtoul.c strtonum.c strtoull.c \ strtoumax.c strtouq.c system.c tdelete.c tfind.c tsearch.c twalk.c @@ -76,6 +76,7 @@ MLINKS+=random.3 initstate.3 \ random.3 srandom.3 \ random.3 srandomdev.3 MLINKS+=radixsort.3 sradixsort.3 +MLINKS+=reallocarray.3 recallocarray.3 MLINKS+=set_constraint_handler_s.3 abort_handler_s.3 MLINKS+=set_constraint_handler_s.3 ignore_handler_s.3 MLINKS+=strfmon.3 strfmon_l.3 diff --git a/lib/libc/stdlib/Symbol.map b/lib/libc/stdlib/Symbol.map index 2b79ca2ece8b..53d71bcafb7d 100644 --- a/lib/libc/stdlib/Symbol.map +++ b/lib/libc/stdlib/Symbol.map @@ -131,6 +131,10 @@ FBSD_1.8 { getenv_r; }; +FBSD_1.9 { + recallocarray; +}; + FBSDprivate_1.0 { __system; _system; diff --git a/lib/libc/stdlib/reallocarray.3 b/lib/libc/stdlib/reallocarray.3 index 80035c67a497..9a2ab5c7a840 100644 --- a/lib/libc/stdlib/reallocarray.3 +++ b/lib/libc/stdlib/reallocarray.3 @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 1, 2015 +.Dd October 2, 2025 .Dt REALLOCARRAY 3 .Os .Sh NAME @@ -38,6 +38,8 @@ .In stdlib.h .Ft void * .Fn reallocarray "void *ptr" "size_t nmemb" "size_t size" +.Ft void * +.Fn recallocarray "void *ptr" "size_t oldnmeb" "size_t nmemb" size_t size" .Sh DESCRIPTION The .Fn reallocarray @@ -52,6 +54,33 @@ and checks for integer overflow in the calculation .Fa nmemb * .Fa size . +.Pp +The +.Fn recallocarray +function is similar to the +.Fn reallocarray +function +except it ensures newly allocated memory is cleared similar to +.Fn calloc . +If +.Fa ptr +is +.Dv NULL , +.Fa oldnmemb +is ignored and the call is equivalent to +.Fn calloc . +If +.Fa ptr +is not +.Dv NULL , +.Fa oldnmemb +must be a value such that +.Fa oldnmemb +* +.Fa size +is the size of the earlier allocation that returned +.Fa ptr , +otherwise the behaviour is undefined. .Sh RETURN VALUES The .Fn reallocarray @@ -142,3 +171,9 @@ function first appeared in .Ox 5.6 and .Fx 11.0 . +The +.Fn recallocarray +function first appeared in +.Ox 6.1 +and +.Fx 16.0 . diff --git a/lib/libopenbsd/recallocarray.c b/lib/libc/stdlib/recallocarray.c similarity index 100% rename from lib/libopenbsd/recallocarray.c rename to lib/libc/stdlib/recallocarray.c diff --git a/lib/libopenbsd/Makefile b/lib/libopenbsd/Makefile index 53bd0200934f..80ae0f90621a 100644 --- a/lib/libopenbsd/Makefile +++ b/lib/libopenbsd/Makefile @@ -1,8 +1,12 @@ LIB= openbsd SRCS= imsg-buffer.c \ imsg.c \ - ohash.c \ - recallocarray.c + ohash.c +.if defined(BOOTSTRAPPING) +.PATH: ${SRCTOP}/lib/libc/stdlib +SRCS+= recallocarray.c +.endif + .if !defined(BOOTSTRAPPING) # Skip getdtablecount.c when bootstrapping since it doesn't compile for Linux # and is not used by any of the bootstrap tools From nobody Fri Oct 3 17:48: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 4cdbk95xtrz6BHl3; Fri, 03 Oct 2025 17:48:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdbk92mszz3Tf8; Fri, 03 Oct 2025 17:48:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759513713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MNEwjup0k2DTe9qgtDY5VJ+8riExTaEBRf3mcrVSt+U=; b=aEoIguswLK2F38G6mz9UVmZ7TzStR7MNNXaj/k8sXYPQZq5JLtdkZwfeGPt+u7TywuaCmi HjKGi/vsqUcdCjJYh2jBJ6u1StfpNyKmwJUBZiJaUBwRrZOTX8pjwUK8eftd88MLwiWQMo tKKIIdcrursKf3BD/61GaengPU5YOtK+f47jVVfAs/z1J0x2K4W6TackYYTP5wJBwiF4lJ h5aQAGFaIG1q8N99ZrardEvsiQMA+HZbhKW+TDVxpA3jQJZR0UX9GBStTx6qa/mhnDqqjR S8xBHsNJoWI+nFkiQQJBrqGpc2c1lH6eN/swOgglQeHNUW1GJRDcdZIAOm9dNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759513713; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MNEwjup0k2DTe9qgtDY5VJ+8riExTaEBRf3mcrVSt+U=; b=AWPrvyDtg/6jOChwEBmcQqZgqCtU76Tio0UrTMY2ehztBoN2zU6D4wRBvaWZ1cZyUSPMcm kmqLVXUyOLpQhR9gNToO6sW35akVZBnRUtxuLL5LBJ2djcb3mEyTx0vOpjM2yktEqFQTEH SNeG8GfwRoxiehNZrocGT3IbfHqZREeEgIHaTpfAXXWNfvIzOI90X/CuDa0PFhWwndc0We dNWD/tWLBJ3oeialP85D4AxuodcVBP/q6PQVnh3R77/raGtmCzS89hnn5dN+B7Spt9EB7h mOvd1O7vkZp6RsCMAPLAyWONRDY8Brn/UNdzD0WzCbI25GeY5ErtV4LmHZvzjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759513713; a=rsa-sha256; cv=none; b=m2NO2UPsAteaHzAStRnyHi2ec07rNReqLzY/Xtp8oYTRlw8tSXW9afqi1vFms5zeOI1sVd QONLgdvOvE0VVK+cnBh5k8j0CtKxkKI5efTxlzi4ZubPLNqsh4I79K71Vrk5Nzc3X+sMpK qnvKDD4kNA1m47B4Q6PFTVbJR2p9agmoX6RuA1ZcBSy1Z80E4fU5pG2jJ8N89a4WJZFPDF mpYxE6YRrp6HBD+v1KggH3xwt9TExVeWQsaF6mZa/b94ZBggKL8l40Jo1yVjKcp1k3cgFT y5rznj7a/0pCwk0pbqcAie3PgVoolwwByNNwVEX3z0I5C7Y10DhYGJFVLZnOuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdbk92N5Nz14Zr; Fri, 03 Oct 2025 17:48:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593HmXYH060890; Fri, 3 Oct 2025 17:48:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593HmXKG060887; Fri, 3 Oct 2025 17:48:33 GMT (envelope-from git) Date: Fri, 3 Oct 2025 17:48:33 GMT Message-Id: <202510031748.593HmXKG060887@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: acd546f01e58 - main - */*: remove recallocarray() compat shims following import into libc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: acd546f01e58354af049455472980c6c4a52e18b Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=acd546f01e58354af049455472980c6c4a52e18b commit acd546f01e58354af049455472980c6c4a52e18b Author: Robert Clausecker AuthorDate: 2025-10-02 14:36:13 +0000 Commit: Robert Clausecker CommitDate: 2025-10-03 17:47:52 +0000 */*: remove recallocarray() compat shims following import into libc libopenbsd retains recallocarray() during bootstrapping for now as it is needed for mandoc. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D52864 --- lib/libdiff/Makefile | 2 +- lib/libfido2/Makefile | 1 - tests/oclo/Makefile | 1 - usr.bin/mandoc/Makefile | 3 +-- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/libdiff/Makefile b/lib/libdiff/Makefile index 8541ff424de2..25f849a69e05 100644 --- a/lib/libdiff/Makefile +++ b/lib/libdiff/Makefile @@ -8,7 +8,7 @@ INTERNALLIB= # API not published or supported. SRCS= diff_atomize_text.c diff_main.c diff_myers.c \ diff_patience.c diff_output.c diff_output_plain.c \ - diff_output_unidiff.c diff_output_edscript.c recallocarray.c + diff_output_unidiff.c diff_output_edscript.c WARNS= CFLAGS+= -I${SRCTOP}/contrib/libdiff/compat/include diff --git a/lib/libfido2/Makefile b/lib/libfido2/Makefile index 10c008967e3d..021a32dd514b 100644 --- a/lib/libfido2/Makefile +++ b/lib/libfido2/Makefile @@ -43,7 +43,6 @@ SRCS+= u2f.c SRCS+= util.c SRCS+= openbsd-compat/freezero.c -SRCS+= openbsd-compat/recallocarray.c CFLAGS+= -I ${DIST}/src -I${SRCTOP}/contrib/libcbor/src -I${.CURDIR}/../libcbor CFLAGS+= -D_FIDO_INTERNAL diff --git a/tests/oclo/Makefile b/tests/oclo/Makefile index 350c9f857c85..6f73aec0ff7c 100644 --- a/tests/oclo/Makefile +++ b/tests/oclo/Makefile @@ -5,7 +5,6 @@ TESTSDIR= ${TESTSBASE}/cddl/oclo PLAIN_TESTS_C= oclo oclo_errors ocloexec_verify SRCS.oclo= oclo.c -LIBADD.oclo+= openbsd LIBADD.ocloexec_verify+= util .include diff --git a/usr.bin/mandoc/Makefile b/usr.bin/mandoc/Makefile index 2c7c3ed85040..181d4e16c8ee 100644 --- a/usr.bin/mandoc/Makefile +++ b/usr.bin/mandoc/Makefile @@ -60,8 +60,7 @@ LIB_SRCS= ${LIBMAN_SRCS} \ mandoc_xr.c \ msec.c \ preconv.c \ - read.c \ - compat_recallocarray.c \ + read.c HTML_SRCS= eqn_html.c \ html.c \ From nobody Fri Oct 3 18:10:35 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdcCb1sgTz6BKg4; Fri, 03 Oct 2025 18:10: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 4cdcCb1csfz3YZl; Fri, 03 Oct 2025 18:10:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759515035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=keMmzvuhoqYciWNmMyuINfFLS9wUuu1iE0/ix/rratM=; b=cLGzOQK5jbUT5SCelAg69etKc2MWD9ZEP3AvSdrX/711DBh1Jxq2sia26/ChHawnldhYTz 5r+9Ke3WIWaQDzELgZvwOGUjq7vWwiulpbrTOP8oyDyx8Hpy245M6G/vVHhaGgf7wxkwer /Las112FdYfoYAVUoLURSlsEsdQYkXgqbps2rxbswZNKwCgQ8pSTllLQb1jJQRYkn1satU rhFJFil7ujPkEcgfmAAeoK69qlEl+z06x1UyJkgSf0chgBhQGIWpo5t8FKRsKbFlgCeNF6 KXkD2FjsQHnEvUnLvDXREgW3ntHO1CghmHsZ1C7QZ6pJJ9vq8lnPpJgoLcOCHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759515035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=keMmzvuhoqYciWNmMyuINfFLS9wUuu1iE0/ix/rratM=; b=LwqCWkmdQrXaokk6LkZjGeLyZ9HD0c7UukdhW9oviZZQaGSgz65C4IGKt8pf2kfAfUhXZc sfyY+/lzBGINQpF0EWMCkJx6B1iX001lS7+UuL68AiGy8LGs6y19s1B51Wf9lcbHND9dI7 LrLxjWO9/4IXHoMIV7y6aE5KjtUM5QIW0DI1BshyeaokCc5sWFmXYDUdIzRHni5xzLG5Xv 6TL3LwC+489n8YwvCJ+hWOL0bN/rhmbL8maZdeTk3OCrIxZv5MzlOuA9CfsdbMq4CWYNUL v5mPqhE/XRcUjH9hX/3DAwXYKuK2kyONQOMDgtGLgG0vdSNiIh872sQHwAjmMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759515035; a=rsa-sha256; cv=none; b=ERV8I0HEZ64zMI17yRo9nZ9gYO/IkuA0b6/LSylSHSRX/Dqa8XgfolKaRc9I+vQit347ms 8OyjwpXbfQj9Su2vLoKTIluMtYRDlsaplTFrKVbyy15ynFWLopuNtxpXK1xxjB5ngvHnUm zILthJkO+l283ABr5uMLQwXy2iNvUgTmnbdp/LniLU9I59OiQS+DijGYSNmWJACo++GJOu gznJIxPCoL/rldOPy1TzNzywOWRuka5sT5HM46U1UyEWjpC8ad9k+MiuVhE2xofAD0sBsT jbgfiaaXMnx7/9RTLPBmQx7gp1c0Wexqx0jZ12ZAD5TNBVdGBm3vX6Qba8I7cA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdcCb1Csfz15JC; Fri, 03 Oct 2025 18:10:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593IAZkX008544; Fri, 3 Oct 2025 18:10:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593IAZE9008541; Fri, 3 Oct 2025 18:10:35 GMT (envelope-from git) Date: Fri, 3 Oct 2025 18:10:35 GMT Message-Id: <202510031810.593IAZE9008541@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 1953a12ee2cd - main - flua: support our flua modules in the bootstrap flua 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1953a12ee2cde1afacb3e3f7612d89695c96e04f Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=1953a12ee2cde1afacb3e3f7612d89695c96e04f commit 1953a12ee2cde1afacb3e3f7612d89695c96e04f Author: Kyle Evans AuthorDate: 2025-10-03 18:09:03 +0000 Commit: Kyle Evans CommitDate: 2025-10-03 18:09:14 +0000 flua: support our flua modules in the bootstrap flua This version builds every module into the flua binary itself, since all of the bootstrap tools are built -DNO_SHARED. As a result, we also cannot dlsym(), so we can't really discover the names of our newly builtin modules. Instead, just build out a linker set with all of our luaopen_*() functions to register everything up-front. Building in all of the modules isn't strictly necessary, but it means that we have an example of how to add a bootstrap module everywhere you go and one doesn't need to consider whether bootstrap flua can use a module when writing scripts. On my build machine, the consequence on our binary size is an increase from around 1.6M -> 1.9M, which isn't really that bad. .lua modules can install into their usual path below $WORLDTMP/legacy and we'll pick them up automagically by way of the ctor that sets up LUA_PATH early on. Reviewed by: bapt, emaste Differential Revision: https://reviews.freebsd.org/D51890 --- contrib/libucl/lua/lua_ucl.c | 4 +++ contrib/lyaml/ext/yaml/yaml.c | 4 +++ libexec/flua/Makefile | 37 +++++++++++++++++++++---- libexec/flua/Makefile.inc | 7 ++++- libexec/flua/bootstrap.h | 30 ++++++++++++++++++++ libexec/flua/libfreebsd/kenv/Makefile | 2 +- libexec/flua/libfreebsd/kenv/Makefile.inc | 2 ++ libexec/flua/libfreebsd/kenv/kenv.c | 4 +++ libexec/flua/libfreebsd/sys/linker/Makefile | 3 +- libexec/flua/libfreebsd/sys/linker/Makefile.inc | 2 ++ libexec/flua/libfreebsd/sys/linker/linker.c | 4 +++ libexec/flua/libhash/Makefile | 5 +--- libexec/flua/libhash/Makefile.inc | 3 ++ libexec/flua/libhash/lhash.c | 4 +++ libexec/flua/libjail/Makefile | 5 +--- libexec/flua/libjail/Makefile.inc | 3 ++ libexec/flua/libjail/lua_jail.c | 4 +++ libexec/flua/liblyaml/Makefile | 20 +------------ libexec/flua/liblyaml/Makefile.inc | 20 +++++++++++++ libexec/flua/libucl/Makefile | 12 +------- libexec/flua/libucl/Makefile.inc | 12 ++++++++ libexec/flua/linit_flua.c | 29 ++++++++++++++++++- tools/build/Makefile | 1 + 23 files changed, 168 insertions(+), 49 deletions(-) diff --git a/contrib/libucl/lua/lua_ucl.c b/contrib/libucl/lua/lua_ucl.c index d6be69e42a71..1b3f9dfd111c 100644 --- a/contrib/libucl/lua/lua_ucl.c +++ b/contrib/libucl/lua/lua_ucl.c @@ -30,6 +30,8 @@ #include "lua_ucl.h" #include +#include "bootstrap.h" + /*** * @module ucl * This lua module allows to parse objects from strings and to store data into @@ -1571,3 +1573,5 @@ ucl_object_toclosure (const ucl_object_t *obj) return (struct ucl_lua_funcdata*)obj->value.ud; } + +FLUA_MODULE(ucl); diff --git a/contrib/lyaml/ext/yaml/yaml.c b/contrib/lyaml/ext/yaml/yaml.c index 54478610134f..6a5ddc605e0f 100644 --- a/contrib/lyaml/ext/yaml/yaml.c +++ b/contrib/lyaml/ext/yaml/yaml.c @@ -35,6 +35,8 @@ #include "lyaml.h" +#include "bootstrap.h" + #define MYNAME "yaml" #define MYVERSION MYNAME " library for " LUA_VERSION " / " VERSION @@ -64,3 +66,5 @@ luaopen_yaml (lua_State *L) return 1; } + +FLUA_MODULE(yaml); diff --git a/libexec/flua/Makefile b/libexec/flua/Makefile index 86d27c0653d4..231abe5dafa2 100644 --- a/libexec/flua/Makefile +++ b/libexec/flua/Makefile @@ -1,10 +1,35 @@ .include -SUBDIR+= libfreebsd -SUBDIR+= libhash -SUBDIR+= libjail -SUBDIR+= libucl -SUBDIR+= liblyaml +# New flua modules should be added here rather than to SUBDIR so that we can do +# the right thing for both bootstrap flua and target flua. The former does not +# do any shared libs, so we just build them all straight into flua itself rather +# than mucking about with the infrastructure to make them linkable -- thus, why +# these are all structured to have a Makefile that describes what we want +# *installed*, and a Makefile.inc that describes what we need to *build*. +FLUA_MODULES+= libhash +FLUA_MODULES+= libjail +FLUA_MODULES+= libucl +FLUA_MODULES+= liblyaml + +.ifdef BOOTSTRAPPING +FLUA_MODULES+= libfreebsd/sys/linker +FLUA_MODULES+= libfreebsd/kenv +CFLAGS+= -I${.CURDIR} -DBOOTSTRAPPING + +SHAREDIR= ${WORLDTMP}/legacy/usr/share/flua +FLUA_PATH= ${SHAREDIR}/?.lua;${SHAREDIR}/?/init.lua +CFLAGS+= -DBOOTSTRAP_FLUA_PATH=\"${FLUA_PATH:Q}\" + +.for mod in ${FLUA_MODULES} +.include "${mod}/Makefile.inc" +.endfor + +.else + +FLUA_MODULES+= libfreebsd +SUBDIR+= ${FLUA_MODULES} + +.endif LUASRC?= ${SRCTOP}/contrib/lua/src .PATH: ${LUASRC} @@ -14,7 +39,7 @@ WARNS?= 3 CWARNFLAGS.gcc+= -Wno-format-nonliteral -LIBADD= lua +LIBADD+= lua # Entry point SRCS+= lua.c diff --git a/libexec/flua/Makefile.inc b/libexec/flua/Makefile.inc index 34505d54d7df..37a49e258ecb 100644 --- a/libexec/flua/Makefile.inc +++ b/libexec/flua/Makefile.inc @@ -2,4 +2,9 @@ SHLIBDIR?= ${LIBDIR}/flua CFLAGS+= \ -I${SRCTOP}/contrib/lua/src \ - -I${SRCTOP}/lib/liblua + -I${SRCTOP}/lib/liblua \ + -I${SRCTOP}/libexec/flua + +.ifdef BOOTSTRAPPING +CFLAGS+= -DBOOTSTRAPPING +.endif diff --git a/libexec/flua/bootstrap.h b/libexec/flua/bootstrap.h new file mode 100644 index 000000000000..74356d8677b3 --- /dev/null +++ b/libexec/flua/bootstrap.h @@ -0,0 +1,30 @@ +/*- + * Copyright (c) 2025 Kyle Evans + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#ifndef FLUA_BOOTSTRAP_H +#define FLUA_BOOTSTRAP_H + +#ifdef BOOTSTRAPPING +#include + +#include + +SET_DECLARE(flua_module_set, const luaL_Reg); +#define FLUA_MODULE_DEF(ident, modname, openfn) \ + static const luaL_Reg ident = { modname, openfn }; \ + DATA_SET(flua_module_set, ident) + +#define FLUA_MODULE_NAMED(mod, name) \ + FLUA_MODULE_DEF(module_ ## mod, name, luaopen_ ## mod) +#define FLUA_MODULE(mod) \ + FLUA_MODULE_DEF(module_ ## mod, #mod, luaopen_ ## mod) +#else /* !BOOTSTRAPPING */ +#define FLUA_MODULE_DEF(ident, modname, openfn) +#define FLUA_MODULE_NAMED(mod, name) +#define FLUA_MODULE(modname) +#endif /* BOOTSTRAPPING */ + +#endif /* FLUA_BOOTSTRAP_H */ diff --git a/libexec/flua/libfreebsd/kenv/Makefile b/libexec/flua/libfreebsd/kenv/Makefile index 1726c892c515..a1b388bb3612 100644 --- a/libexec/flua/libfreebsd/kenv/Makefile +++ b/libexec/flua/libfreebsd/kenv/Makefile @@ -1,5 +1,5 @@ SHLIB_NAME= kenv.so -SRCS+= kenv.c MAN= freebsd.kenv.3lua +.include "Makefile.inc" .include diff --git a/libexec/flua/libfreebsd/kenv/Makefile.inc b/libexec/flua/libfreebsd/kenv/Makefile.inc new file mode 100644 index 000000000000..05819c5280d9 --- /dev/null +++ b/libexec/flua/libfreebsd/kenv/Makefile.inc @@ -0,0 +1,2 @@ +.PATH: ${.PARSEDIR} +SRCS+= kenv.c diff --git a/libexec/flua/libfreebsd/kenv/kenv.c b/libexec/flua/libfreebsd/kenv/kenv.c index 954baa00facb..56b24c72904a 100644 --- a/libexec/flua/libfreebsd/kenv/kenv.c +++ b/libexec/flua/libfreebsd/kenv/kenv.c @@ -14,6 +14,8 @@ #include #include +#include "bootstrap.h" + int luaopen_freebsd_kenv(lua_State *L); static int @@ -94,3 +96,5 @@ luaopen_freebsd_kenv(lua_State *L) return (1); } + +FLUA_MODULE_NAMED(freebsd_kenv, "freebsd.kenv"); diff --git a/libexec/flua/libfreebsd/sys/linker/Makefile b/libexec/flua/libfreebsd/sys/linker/Makefile index 1adf547b503c..f1f65ad5f6c1 100644 --- a/libexec/flua/libfreebsd/sys/linker/Makefile +++ b/libexec/flua/libfreebsd/sys/linker/Makefile @@ -1,7 +1,6 @@ SHLIB_NAME= linker.so -SRCS+= linker.c - MAN= freebsd.sys.linker.3lua +.include "Makefile.inc" .include diff --git a/libexec/flua/libfreebsd/sys/linker/Makefile.inc b/libexec/flua/libfreebsd/sys/linker/Makefile.inc new file mode 100644 index 000000000000..da65c0070170 --- /dev/null +++ b/libexec/flua/libfreebsd/sys/linker/Makefile.inc @@ -0,0 +1,2 @@ +.PATH: ${.PARSEDIR} +SRCS+= linker.c diff --git a/libexec/flua/libfreebsd/sys/linker/linker.c b/libexec/flua/libfreebsd/sys/linker/linker.c index 87eccfb651f0..c78fbb2b39d2 100644 --- a/libexec/flua/libfreebsd/sys/linker/linker.c +++ b/libexec/flua/libfreebsd/sys/linker/linker.c @@ -15,6 +15,8 @@ #include #include +#include "bootstrap.h" + int luaopen_freebsd_sys_linker(lua_State *L); static int @@ -80,3 +82,5 @@ luaopen_freebsd_sys_linker(lua_State *L) return (1); } + +FLUA_MODULE_NAMED(freebsd_sys_linker, "freebsd.sys.linker"); diff --git a/libexec/flua/libhash/Makefile b/libexec/flua/libhash/Makefile index b7c8d7ee9948..9cbd6f15acae 100644 --- a/libexec/flua/libhash/Makefile +++ b/libexec/flua/libhash/Makefile @@ -1,9 +1,6 @@ SHLIB_NAME= hash.so -SRCS+= lhash.c - -LIBADD+= md - MAN= hash.3lua +.include "Makefile.inc" .include diff --git a/libexec/flua/libhash/Makefile.inc b/libexec/flua/libhash/Makefile.inc new file mode 100644 index 000000000000..d112dfe7df33 --- /dev/null +++ b/libexec/flua/libhash/Makefile.inc @@ -0,0 +1,3 @@ +.PATH: ${.PARSEDIR} +SRCS+= lhash.c +LIBADD+= md diff --git a/libexec/flua/libhash/lhash.c b/libexec/flua/libhash/lhash.c index 4587961fe8a0..7127ddc1d530 100644 --- a/libexec/flua/libhash/lhash.c +++ b/libexec/flua/libhash/lhash.c @@ -11,6 +11,8 @@ #include #include +#include "bootstrap.h" + #define SHA256_META "SHA256 meta table" #define SHA256_DIGEST_LEN 32 @@ -175,3 +177,5 @@ luaopen_hash(lua_State *L) return 1; } + +FLUA_MODULE(hash); diff --git a/libexec/flua/libjail/Makefile b/libexec/flua/libjail/Makefile index 20cd9f5f1429..b9c8bdc39095 100644 --- a/libexec/flua/libjail/Makefile +++ b/libexec/flua/libjail/Makefile @@ -1,9 +1,6 @@ SHLIB_NAME= jail.so -SRCS+= lua_jail.c - -LIBADD+= jail - MAN= jail.3lua +.include "Makefile.inc" .include diff --git a/libexec/flua/libjail/Makefile.inc b/libexec/flua/libjail/Makefile.inc new file mode 100644 index 000000000000..a896bf38c65b --- /dev/null +++ b/libexec/flua/libjail/Makefile.inc @@ -0,0 +1,3 @@ +.PATH: ${.PARSEDIR} +SRCS+= lua_jail.c +LIBADD+= jail diff --git a/libexec/flua/libjail/lua_jail.c b/libexec/flua/libjail/lua_jail.c index 9632db795775..8c3ec6c1d500 100644 --- a/libexec/flua/libjail/lua_jail.c +++ b/libexec/flua/libjail/lua_jail.c @@ -38,6 +38,8 @@ #include #include +#include "bootstrap.h" + #define JAIL_METATABLE "jail iterator metatable" /* @@ -716,3 +718,5 @@ luaopen_jail(lua_State *L) return (1); } + +FLUA_MODULE(jail); diff --git a/libexec/flua/liblyaml/Makefile b/libexec/flua/liblyaml/Makefile index e7a89d09bb9e..8d1432acd325 100644 --- a/libexec/flua/liblyaml/Makefile +++ b/libexec/flua/liblyaml/Makefile @@ -1,22 +1,4 @@ SHLIB_NAME= yaml.so -WARNS= 1 -LYAMLSRC?= ${SRCTOP}/contrib/lyaml -.PATH: ${LYAMLSRC}/ext/yaml ${LYAMLSRC}/lib/lyaml -SRCS= emitter.c \ - parser.c \ - scanner.c \ - yaml.c -CFLAGS+= \ - -I${LYAMLSRC}/ext/yaml \ - -I${SRCTOP}/contrib/libyaml/include \ - -DVERSION=\"6.2.8\" -LIBADD+= yaml - -FILES= explicit.lua \ - functional.lua \ - implicit.lua \ - init.lua -FILESDIR= ${SHAREDIR}/flua/lyaml - +.include "Makefile.inc" .include diff --git a/libexec/flua/liblyaml/Makefile.inc b/libexec/flua/liblyaml/Makefile.inc new file mode 100644 index 000000000000..caa1f37b57eb --- /dev/null +++ b/libexec/flua/liblyaml/Makefile.inc @@ -0,0 +1,20 @@ +WARNS= 1 + +LYAMLSRC?= ${SRCTOP}/contrib/lyaml +.PATH: ${LYAMLSRC}/ext/yaml ${LYAMLSRC}/lib/lyaml +SRCS+= emitter.c \ + parser.c \ + scanner.c \ + yaml.c +CFLAGS+= \ + -I${LYAMLSRC}/ext/yaml \ + -I${SRCTOP}/contrib/libyaml/include \ + -DVERSION=\"6.2.8\" +LIBADD+= yaml + +FILESGROUPS+= YAML +YAML= explicit.lua \ + functional.lua \ + implicit.lua \ + init.lua +YAMLDIR= ${SHAREDIR}/flua/lyaml diff --git a/libexec/flua/libucl/Makefile b/libexec/flua/libucl/Makefile index a88c8bda6bfc..32d76d1ea1ad 100644 --- a/libexec/flua/libucl/Makefile +++ b/libexec/flua/libucl/Makefile @@ -1,14 +1,4 @@ SHLIB_NAME= ucl.so -WARNS= 2 - -UCLSRC?= ${SRCTOP}/contrib/libucl -.PATH: ${UCLSRC}/lua -SRCS+= lua_ucl.c -CFLAGS+= \ - -I${UCLSRC}/include \ - -I${UCLSRC}/src \ - -I${UCLSRC}/uthash -LIBADD+= ucl - +.include "Makefile.inc" .include diff --git a/libexec/flua/libucl/Makefile.inc b/libexec/flua/libucl/Makefile.inc new file mode 100644 index 000000000000..70fb0f265635 --- /dev/null +++ b/libexec/flua/libucl/Makefile.inc @@ -0,0 +1,12 @@ +.if ${WARNS:U6} > 2 +WARNS= 2 +.endif + +UCLSRC?= ${SRCTOP}/contrib/libucl +.PATH: ${UCLSRC}/lua +SRCS+= lua_ucl.c +CFLAGS+= \ + -I${UCLSRC}/include \ + -I${UCLSRC}/src \ + -I${UCLSRC}/uthash +LIBADD+= ucl diff --git a/libexec/flua/linit_flua.c b/libexec/flua/linit_flua.c index b466b7872158..027f1b305d09 100644 --- a/libexec/flua/linit_flua.c +++ b/libexec/flua/linit_flua.c @@ -26,8 +26,8 @@ #include "lprefix.h" - #include +#include #include "lua.h" @@ -37,6 +37,8 @@ #include "lposix.h" #include "lfbsd.h" +#include "bootstrap.h" + /* ** these libs are loaded by lua.c and are readily available to any Lua ** program @@ -62,6 +64,28 @@ static const luaL_Reg loadedlibs[] = { {NULL, NULL} }; +#ifdef BOOTSTRAPPING +static void __attribute__((constructor)) flua_init_env(void) { + /* + * This happens in the middle of luaopen_package(). We could move it into + * flua_setup_mods(), but it seems better to avoid its timing being so + * important that it would break some of our bootstrap modules if someone + * were to reorder things. + */ + if (getenv("LUA_PATH") == NULL) + setenv("LUA_PATH", BOOTSTRAP_FLUA_PATH, 1); +} + +static void flua_setup_mods (lua_State *L) { + const luaL_Reg **flib; + + SET_FOREACH(flib, flua_module_set) { + luaL_requiref(L, (*flib)->name, (*flib)->func, 1); + lua_pop(L, 1); /* remove lib */ + } +}; +#endif + LUALIB_API void luaL_openlibs (lua_State *L) { const luaL_Reg *lib; /* "require" functions from 'loadedlibs' and set results to global table */ @@ -69,4 +93,7 @@ LUALIB_API void luaL_openlibs (lua_State *L) { luaL_requiref(L, lib->name, lib->func, 1); lua_pop(L, 1); /* remove lib */ } +#ifdef BOOTSTRAPPING + flua_setup_mods(L); +#endif } diff --git a/tools/build/Makefile b/tools/build/Makefile index 3c4e07e3cfc2..09351900599a 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -497,6 +497,7 @@ INSTALLDIR_LIST= \ usr/include/casper \ usr/include/openssl \ usr/include/private/ucl \ + usr/include/private/yaml \ usr/include/private/zstd \ usr/lib \ usr/libdata/pkgconfig \ From nobody Fri Oct 3 18:10: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 4cdcCc4Nbqz6BKg5; Fri, 03 Oct 2025 18:10: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 4cdcCc2KRjz3Yd5; Fri, 03 Oct 2025 18:10:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759515036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pjNDRirQlHwsnRqVurXAxEyWhwxqO5AujD2lReYGvek=; b=o5siWXygbY7yOoTA+aJ7HKC3ClBZef+u6xXdvsPii30YEaahJvHcN7F81UxoxjxpGoxusH +2ipQlroCPnRwXnSziH9/vZvmMBj4vbpOqQTWILOzTnnBMXzU/TDSpuzL55zLfYzwOFose v1E4yGB7K6+aoTXR2Ex32zZGhSFWHiaNzynQofh3GIuK9t0TZyQ27ZgtK4HBzMeaZ+jNfK f4KltMoXZI27b+4NejQKQz+QkeBlDoc06/SvZ7UVXXh5G9cedshCPiDLp/GIjU6041fnx+ gGH8N7QgTpP0uQxcEfPxRwm+E+QR0hmj9OdGJn0bL5zK6/NJiV/jNYi+BVIJpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759515036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pjNDRirQlHwsnRqVurXAxEyWhwxqO5AujD2lReYGvek=; b=JzcU250IIjnBtH4LNQNj4CjcpKIR0ahkx+RH9PF0/5Ep85A9/Z3daG2SfE9Kpv4AsLpZJU CVkDWWKn/eXGnE/BoQcWBUj7fKcjSVRp69qXw1o0JvdZNu0sK2IODxAtAB8hdhXsivbBxS cQ6Zdt/CyjhxoE0ixwXuWXRBkYBWYH5g4wG3Ra/c3qM1htW9HZFfInUEbThfaOWtF2Sp/5 2pzXc1Cogcu3KP+mmnjoYiiltwzLyyHvlkaVUtD4IXnoz1FAZl4AiPEIf/MQ1SfWK8geg0 KAo6BpJvkPqFuZXQlyVTHLwrOumiW0wHBENlboN1scvgNN6KDd2DYNWsGFIJ9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759515036; a=rsa-sha256; cv=none; b=lyuOps0aykDLcI+j1BNgXRJP1MoDlyJ2trE5FNWt0Cnw2QYBHjkjq9haVO38p7CeuTVUnE GWnA07r/Ssczy2ViKx+oSj1kAthvLVjiRvtXosSOf17lFy6A71J44ppquEKG2Trx880gwg KLCkkvLtM9LJoQRZsJ5AciT2bMOnf7k2TlzGBgAINeEXXzNWTSGOLyEr7WACioU67XvNXU altP4bM4U62o9uXDmhq5m0WWmUd3+ZLROaSkmM5Es8u4WeI5WCfJdXWle8ZUnrZZY+ym6h mLT2CdMe+6rm9kaI9ODBzOBuM8Uq8gPMtmOgoJWmMmoRfs3LKDxLJefGvactsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdcCc1w81z15Td; Fri, 03 Oct 2025 18:10:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593IAaqK008581; Fri, 3 Oct 2025 18:10:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593IAaNd008578; Fri, 3 Oct 2025 18:10:36 GMT (envelope-from git) Date: Fri, 3 Oct 2025 18:10:36 GMT Message-Id: <202510031810.593IAaNd008578@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 80ada959004c - main - flua: kick out the remaining builtin modules 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 80ada959004c4386880e47b11618f8abfc2d80e1 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=80ada959004c4386880e47b11618f8abfc2d80e1 commit 80ada959004c4386880e47b11618f8abfc2d80e1 Author: Kyle Evans AuthorDate: 2025-10-03 18:09:04 +0000 Commit: Kyle Evans CommitDate: 2025-10-03 18:09:25 +0000 flua: kick out the remaining builtin modules Bootstrap flua has some magic now to handle modules by building them in and discovering them via linker sets. This is slightly cleaner than always building them in and baking them into loadedlibs for both bootstrap and system flua. Adjust the stand build now that these three libs have their own new homes. Reviewed by: bapt, emaste Differential Revision: https://reviews.freebsd.org/D51891 --- libexec/flua/Makefile | 4 +++- libexec/flua/lfbsd/Makefile | 5 +++++ libexec/flua/lfbsd/Makefile.inc | 2 ++ libexec/flua/{modules => lfbsd}/lfbsd.c | 4 ++++ libexec/flua/{modules => lfbsd}/lfbsd.h | 0 libexec/flua/lfs/Makefile | 5 +++++ libexec/flua/lfs/Makefile.inc | 2 ++ libexec/flua/{modules => lfs}/lfs.c | 7 ++++++- libexec/flua/{modules => lfs}/lfs.h | 0 libexec/flua/libhash/lhash.c | 2 ++ libexec/flua/linit_flua.c | 7 ------- libexec/flua/lposix/Makefile | 5 +++++ libexec/flua/lposix/Makefile.inc | 2 ++ libexec/flua/{modules => lposix}/lposix.c | 5 +++++ libexec/flua/{modules => lposix}/lposix.h | 0 stand/liblua/Makefile | 2 +- stand/loader.mk | 2 +- 17 files changed, 43 insertions(+), 11 deletions(-) diff --git a/libexec/flua/Makefile b/libexec/flua/Makefile index 231abe5dafa2..b43b31298205 100644 --- a/libexec/flua/Makefile +++ b/libexec/flua/Makefile @@ -6,10 +6,13 @@ # than mucking about with the infrastructure to make them linkable -- thus, why # these are all structured to have a Makefile that describes what we want # *installed*, and a Makefile.inc that describes what we need to *build*. +FLUA_MODULES+= lfbsd +FLUA_MODULES+= lfs FLUA_MODULES+= libhash FLUA_MODULES+= libjail FLUA_MODULES+= libucl FLUA_MODULES+= liblyaml +FLUA_MODULES+= lposix .ifdef BOOTSTRAPPING FLUA_MODULES+= libfreebsd/sys/linker @@ -47,7 +50,6 @@ SRCS+= lua.c # FreeBSD Extensions .PATH: ${.CURDIR}/modules SRCS+= linit_flua.c -SRCS+= lfs.c lposix.c lfbsd.c CFLAGS+= -I${SRCTOP}/lib/liblua -I${.CURDIR}/modules -I${LUASRC} CFLAGS+= -DLUA_PROGNAME="\"${PROG}\"" diff --git a/libexec/flua/lfbsd/Makefile b/libexec/flua/lfbsd/Makefile new file mode 100644 index 000000000000..e2a4aae14bcd --- /dev/null +++ b/libexec/flua/lfbsd/Makefile @@ -0,0 +1,5 @@ +SHLIB_NAME= fbsd.so +WARNS?= 3 + +.include "Makefile.inc" +.include diff --git a/libexec/flua/lfbsd/Makefile.inc b/libexec/flua/lfbsd/Makefile.inc new file mode 100644 index 000000000000..7a78ef82e0fc --- /dev/null +++ b/libexec/flua/lfbsd/Makefile.inc @@ -0,0 +1,2 @@ +.PATH: ${.PARSEDIR} +SRCS+= lfbsd.c diff --git a/libexec/flua/modules/lfbsd.c b/libexec/flua/lfbsd/lfbsd.c similarity index 99% rename from libexec/flua/modules/lfbsd.c rename to libexec/flua/lfbsd/lfbsd.c index ef660ba9fd77..541b6c9611df 100644 --- a/libexec/flua/modules/lfbsd.c +++ b/libexec/flua/lfbsd/lfbsd.c @@ -40,6 +40,8 @@ #include "lauxlib.h" #include "lfbsd.h" +#include "bootstrap.h" + #define FBSD_PROCESSHANDLE "fbsd_process_t*" struct fbsd_process { @@ -283,3 +285,5 @@ luaopen_fbsd(lua_State *L) return (1); } + +FLUA_MODULE(fbsd); diff --git a/libexec/flua/modules/lfbsd.h b/libexec/flua/lfbsd/lfbsd.h similarity index 100% rename from libexec/flua/modules/lfbsd.h rename to libexec/flua/lfbsd/lfbsd.h diff --git a/libexec/flua/lfs/Makefile b/libexec/flua/lfs/Makefile new file mode 100644 index 000000000000..3df83d6d2fc1 --- /dev/null +++ b/libexec/flua/lfs/Makefile @@ -0,0 +1,5 @@ +SHLIB_NAME= lfs.so +WARNS?= 3 + +.include "Makefile.inc" +.include diff --git a/libexec/flua/lfs/Makefile.inc b/libexec/flua/lfs/Makefile.inc new file mode 100644 index 000000000000..9d40c42dc0e6 --- /dev/null +++ b/libexec/flua/lfs/Makefile.inc @@ -0,0 +1,2 @@ +.PATH: ${.PARSEDIR} +SRCS+= lfs.c diff --git a/libexec/flua/modules/lfs.c b/libexec/flua/lfs/lfs.c similarity index 99% rename from libexec/flua/modules/lfs.c rename to libexec/flua/lfs/lfs.c index 8cb8d6fc9fed..517e16ae65c8 100644 --- a/libexec/flua/modules/lfs.c +++ b/libexec/flua/lfs/lfs.c @@ -66,9 +66,10 @@ #ifdef _STANDALONE #include "lstd.h" #include "lutils.h" -#include "bootstrap.h" #endif +#include "bootstrap.h" + #ifndef nitems #define nitems(x) (sizeof((x)) / sizeof((x)[0])) #endif @@ -446,3 +447,7 @@ luaopen_lfs(lua_State *L) #endif return 1; } + +#ifndef _STANDALONE +FLUA_MODULE(lfs); +#endif diff --git a/libexec/flua/modules/lfs.h b/libexec/flua/lfs/lfs.h similarity index 100% rename from libexec/flua/modules/lfs.h rename to libexec/flua/lfs/lfs.h diff --git a/libexec/flua/libhash/lhash.c b/libexec/flua/libhash/lhash.c index 7127ddc1d530..f455f006bf27 100644 --- a/libexec/flua/libhash/lhash.c +++ b/libexec/flua/libhash/lhash.c @@ -178,4 +178,6 @@ luaopen_hash(lua_State *L) return 1; } +#ifndef _STANDALONE FLUA_MODULE(hash); +#endif diff --git a/libexec/flua/linit_flua.c b/libexec/flua/linit_flua.c index 027f1b305d09..161f030923d3 100644 --- a/libexec/flua/linit_flua.c +++ b/libexec/flua/linit_flua.c @@ -33,9 +33,6 @@ #include "lualib.h" #include "lauxlib.h" -#include "lfs.h" -#include "lposix.h" -#include "lfbsd.h" #include "bootstrap.h" @@ -57,10 +54,6 @@ static const luaL_Reg loadedlibs[] = { #if defined(LUA_COMPAT_BITLIB) {LUA_BITLIBNAME, luaopen_bit32}, #endif - /* FreeBSD Extensions */ - {"lfs", luaopen_lfs}, - {"posix", luaopen_posix}, - {"fbsd", luaopen_fbsd}, {NULL, NULL} }; diff --git a/libexec/flua/lposix/Makefile b/libexec/flua/lposix/Makefile new file mode 100644 index 000000000000..92321d51be9a --- /dev/null +++ b/libexec/flua/lposix/Makefile @@ -0,0 +1,5 @@ +SHLIB_NAME= posix.so +WARNS?= 3 + +.include "Makefile.inc" +.include diff --git a/libexec/flua/lposix/Makefile.inc b/libexec/flua/lposix/Makefile.inc new file mode 100644 index 000000000000..499e6779e84d --- /dev/null +++ b/libexec/flua/lposix/Makefile.inc @@ -0,0 +1,2 @@ +.PATH: ${.PARSEDIR} +SRCS+= lposix.c diff --git a/libexec/flua/modules/lposix.c b/libexec/flua/lposix/lposix.c similarity index 99% rename from libexec/flua/modules/lposix.c rename to libexec/flua/lposix/lposix.c index 75cdd345aeaa..430bb6f28baf 100644 --- a/libexec/flua/modules/lposix.c +++ b/libexec/flua/lposix/lposix.c @@ -21,6 +21,8 @@ #include "lauxlib.h" #include "lposix.h" +#include "bootstrap.h" + static void enforce_max_args(lua_State *L, int max) { @@ -697,3 +699,6 @@ luaopen_posix(lua_State *L) return (1); } + +/* Only this one needed in our bootstrap set, it will load the others. */ +FLUA_MODULE(posix); diff --git a/libexec/flua/modules/lposix.h b/libexec/flua/lposix/lposix.h similarity index 100% rename from libexec/flua/modules/lposix.h rename to libexec/flua/lposix/lposix.h diff --git a/stand/liblua/Makefile b/stand/liblua/Makefile index ce7eb89fe494..b1c34ec0a466 100644 --- a/stand/liblua/Makefile +++ b/stand/liblua/Makefile @@ -24,7 +24,7 @@ SRCS+= lauxlib.c lbaselib.c lstrlib.c loadlib.c SRCS+= lerrno.c lpager.c lstd.c lutils.c SRCS+= gfx_utils.c -.PATH: ${FLUASRC}/modules +.PATH: ${FLUASRC}/lfs SRCS+= lfs.c .PATH: ${FLUALIB}/libhash SRCS+= lhash.c diff --git a/stand/loader.mk b/stand/loader.mk index 4073e523e552..e26ba1401912 100644 --- a/stand/loader.mk +++ b/stand/loader.mk @@ -89,7 +89,7 @@ SRCS+= interp_lua.c .include "${BOOTSRC}/lua.mk" LDR_INTERP= ${LIBLUA} LDR_INTERP32= ${LIBLUA32} -CFLAGS.interp_lua.c= -DLUA_PATH=\"${LUAPATH}\" -I${FLUASRC}/modules +CFLAGS.interp_lua.c= -DLUA_PATH=\"${LUAPATH}\" -I${FLUASRC}/lfs .elif ${LOADER_INTERP} == "4th" SRCS+= interp_forth.c .include "${BOOTSRC}/ficl.mk" From nobody Fri Oct 3 19:22:18 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cddpL5b5jz690Bh; Fri, 03 Oct 2025 19:22:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cddpL4rttz3hdQ; Fri, 03 Oct 2025 19:22:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759519338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TFkIV3f8v0Yo+IzK5YAF+9sesOp0GFWZuJvRyfblpUU=; b=g4mkGwETzqM9C2GekVvurZUp8CUrYRi5c9oRZB7kIlc8+aLcw47qyjuohTdy43VX2p8J44 UzpfcpOgrR91t5KSBhoJgMIfetLUqBmaAbedt8KpUjYG2sP/CbckonYy49J5CdnQCe1Bwp 2zHIoizvkaXWnV8z1CzxcY6+aUPbl1ogZBdpAWnkHRNBuu72z/v9MwQtOtFL08Tvi74EOI OnT2LtB1h/3iD8jhYaHnRLOiUQvF8R2Jg4Q6EwtWAJG1jtPyJBozRYIj7Jad/qfCS2cvCZ qioDYFz/swXHrwyRZ4MIDXjmyv8i8pyby6SiFU1zbLtvzWEpze1IabaV/niGqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759519338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TFkIV3f8v0Yo+IzK5YAF+9sesOp0GFWZuJvRyfblpUU=; b=pJfQyaVblkYa7tZYSIeuaeKnnGuUzLZ0k9+etdCXWjdSqA9E6dwHtfxx2wh3d7Eug6vdAZ 4uOPcHDtkmMBp91kxytNxzbFbIOs8QkwY2jJkWim63KbOq4wCCXerwfjUBhhDboPn2dRxb 3V6ebNYvweFDqPE1KG9tRvagp3aKfitGGXrFcfuRFAJZeWhMbEANgLUo05C8XLqwopj2q2 P0EF7YK6xSqsYVqDxDefBemblkx/fSK9NJrrS+sZAC5ZHwDmYEnOZbZUOUAKmpMzhSE5cr c0ao43ZPgpOog7fI6vabgqtdRu1HFTH2rBkAIr7YQEUNkBeoSH2o5rQhjGEhMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759519338; a=rsa-sha256; cv=none; b=KFc+qWhSlsLZ9H51FS64rxnSrS/Sc5bKbdA8bheC+gBVH9TE+CoZe10KvE6rA2/eo3AKvi 19onJLOSJqzdHpqHWxPUQ1SnixN/RGTGX1XttOPCn0HhPNE9Kr1cIsU+TKtpQ3A9Z/Qn2B 00bwdiG2OhDu6d684+tZ003PcHJdlwnZCHqQCodeQ/9bzhNpJivSYEJetNAbqp53Wx0Zr6 JBG52888gb7Zip38R0zHfmC+qXATLBYMFyyfQuoR9mc90qLGf0zWVoQnuEl8fXAAaIxSwE Vkg+dzwibdvKpmlrP91bloUFsOLWGaBrZOjOsNT4B/gB0ak30cU8fmXfRNvQdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cddpL485nz16dt; Fri, 03 Oct 2025 19:22:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593JMIEA047302; Fri, 3 Oct 2025 19:22:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593JMIgN047299; Fri, 3 Oct 2025 19:22:18 GMT (envelope-from git) Date: Fri, 3 Oct 2025 19:22:18 GMT Message-Id: <202510031922.593JMIgN047299@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 94aae0513896 - main - nullfs: remove the vhold/vdrop cycle around unlock 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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 94aae0513896de398a1feda6cd97f7efa2a5dc2e Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=94aae0513896de398a1feda6cd97f7efa2a5dc2e commit 94aae0513896de398a1feda6cd97f7efa2a5dc2e Author: Mateusz Guzik AuthorDate: 2025-10-01 11:09:50 +0000 Commit: Mateusz Guzik CommitDate: 2025-10-03 19:14:30 +0000 nullfs: remove the vhold/vdrop cycle around unlock Both lower vnode and null data are safe while the lock is held, at the same time neither is touched after unlock. While here remove stale comment about interlock handling. It is no longer legal to pass to unlock. Reviewed by: kib Tested by: pho (previous version) Differential Revision: https://reviews.freebsd.org/D38761 --- sys/fs/nullfs/null_vnops.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c index e9d598014a2f..64e5b004abca 100644 --- a/sys/fs/nullfs/null_vnops.c +++ b/sys/fs/nullfs/null_vnops.c @@ -840,11 +840,6 @@ null_lock(struct vop_lock1_args *ap) return (error); } -/* - * We need to process our own vnode unlock and then clear the - * interlock flag as it applies only to our vnode, not the - * vnodes below us on the stack. - */ static int null_unlock(struct vop_unlock_args *ap) { @@ -853,11 +848,20 @@ null_unlock(struct vop_unlock_args *ap) struct vnode *lvp; int error; + /* + * Contrary to null_lock, we don't need to hold the vnode around + * unlock. + * + * We hold the lock, which means we can't be racing against vgone. + * + * At the same time VOP_UNLOCK promises to not touch anything after + * it finishes unlock, just like we don't. + * + * vop_stdunlock for a doomed vnode matches doomed locking in null_lock. + */ nn = VTONULL(vp); if (nn != NULL && (lvp = NULLVPTOLOWERVP(vp)) != NULL) { - vholdnz(lvp); error = VOP_UNLOCK(lvp); - vdrop(lvp); } else { error = vop_stdunlock(ap); } From nobody Fri Oct 3 19:22:19 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cddpN0J5hz690Bj; Fri, 03 Oct 2025 19:22:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cddpM5N14z3hk7; Fri, 03 Oct 2025 19:22:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759519339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ucRNutcU0Kx62EcJVOfxdVeSTalPzl7gDdhGv7hhhZg=; b=hYoWPU73qX+Tf58osEffa8jZm2Ous3bxD6KzU86hA0kbRe8/jOKMsuJbDetjkfM9iQOiee B0tAnqxcrp6LvEdU4/kyFPuRUFrPAsiJsunfgmSmgG+AyDmtvrqYV5GGt+HJ06eFjbhixb sbFUHvIPc2BZl4FTmNn59ENJXYFbnMNRdceXpQQa4vHz6/rpXEw46QLLTR0HzoY4MoJpvS fw4LXrLfdsiyFSxE9LHGviBAL44ndDCC6UBHwBb28eGQgLHVaJTs2u2xEKWS2cBpvVlU19 9Foifn4ZTpT/HzgxxL41IO7i3hBv7sZVg7SE6fU33rdtM/HWhucFU3FycroFiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759519339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ucRNutcU0Kx62EcJVOfxdVeSTalPzl7gDdhGv7hhhZg=; b=yiHI63DtnRRBqhPWhsBhriGeJB9LTCgKxHEeojr6l+QDZ3EH+6pPTNaOoKkDsBHKWql8xj F6A3RAe42/GjrQVxtEk/pijq+7ekqqFDL0zaGWgYJEs1gDMMaR9H3A5/y3WrCoPpeX80S1 396NoQ8WmBeb/Fs8bTdtY96t7+dwbzpLUTs0d1NdUsldYCSowH45F+2vrjzvsIdJ3DoSrR EDavDmXqdsTqt9M/UTPrQ5JbG1QNgE5LACcp7LqLAtXjHQFoUSR3SuABPGMD1t4GFKoEHM nWMkb9unaB6fl/kdI8RHmfM6qq3tNN/4yAGh2NhEmKL/ZeqZmgKS/WKUyo9Fbw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759519339; a=rsa-sha256; cv=none; b=ZmMDPtfsBf5XbylWZYJxaSmEVLM/6QfA4REaRbp32h5QqOoZveU0a5aYDfzfrZK7SgO0sX +BVVYYztZhNOVAo2QkDCbQeFAfw+rKENO5eis51qb/dA8vmf+kw96QisUa9r1tnJdzeWYY 9NCHbWWptF7Z7r0GgVazj2rsKzUVEVUWr90qp8mA06USr9KhJTGK4hxVqZYvVkBY/whCZ4 Tn9mdT3+iErMe1PfH1w5ld+S047/ZEZwiGU16sFLTLcB243lueCI6J5kUcWOA4oblOLjwO eFqZd9mLaYskIQan5dDWpCaEIvV2PGipwFKC4LHJC3vvNk5dSLv2YdYUoUQizg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cddpM4lQZz17Xk; Fri, 03 Oct 2025 19:22:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593JMJkh047337; Fri, 3 Oct 2025 19:22:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593JMJwa047334; Fri, 3 Oct 2025 19:22:19 GMT (envelope-from git) Date: Fri, 3 Oct 2025 19:22:19 GMT Message-Id: <202510031922.593JMJwa047334@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 72347d73464c - main - nullfs: assert the vnode is not doomed in null_hashget_locked 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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 72347d73464ccdd361c4d286486b9b4ea8d7c945 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=72347d73464ccdd361c4d286486b9b4ea8d7c945 commit 72347d73464ccdd361c4d286486b9b4ea8d7c945 Author: Mateusz Guzik AuthorDate: 2025-10-01 10:28:48 +0000 Commit: Mateusz Guzik CommitDate: 2025-10-03 19:15:34 +0000 nullfs: assert the vnode is not doomed in null_hashget_locked While here some style touch ups and fixing a stale name in an assert. Reviewed by: kib Tested by: pho (previous version) Differential Revision: https://reviews.freebsd.org/D38761 --- sys/fs/nullfs/null_subr.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/sys/fs/nullfs/null_subr.c b/sys/fs/nullfs/null_subr.c index 053614b6910d..4db0bc475791 100644 --- a/sys/fs/nullfs/null_subr.c +++ b/sys/fs/nullfs/null_subr.c @@ -96,7 +96,7 @@ null_hashget_locked(struct mount *mp, struct vnode *lowervp) struct null_node *a; struct vnode *vp; - ASSERT_VOP_LOCKED(lowervp, "null_hashget"); + ASSERT_VOP_LOCKED(lowervp, __func__); rw_assert(&null_hash_lock, RA_LOCKED); /* @@ -107,17 +107,20 @@ null_hashget_locked(struct mount *mp, struct vnode *lowervp) */ hd = NULL_NHASH(lowervp); LIST_FOREACH(a, hd, null_hash) { - if (a->null_lowervp == lowervp && NULLTOV(a)->v_mount == mp) { - /* - * Since we have the lower node locked the nullfs - * node can not be in the process of recycling. If - * it had been recycled before we grabed the lower - * lock it would not have been found on the hash. - */ - vp = NULLTOV(a); - vref(vp); - return (vp); - } + if (a->null_lowervp != lowervp) + continue; + /* + * Since we have the lower node locked the nullfs + * node can not be in the process of recycling. If + * it had been recycled before we grabed the lower + * lock it would not have been found on the hash. + */ + vp = NULLTOV(a); + VNPASS(!VN_IS_DOOMED(vp), vp); + if (vp->v_mount != mp) + continue; + vref(vp); + return (vp); } return (NULL); } From nobody Fri Oct 3 19:22:20 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cddpP2CKlz6906Z; Fri, 03 Oct 2025 19:22:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cddpN6mB3z3hkD; Fri, 03 Oct 2025 19:22:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759519341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PjE2iVFpcTsclG0VloXyMV2llL9EJiyQj5tzTvoisYc=; b=f3/SkmcH3DQzEZbI005dntKGeQWBK334u/jgpnqJLRh2Js3HfxbNzUOA3W10dDDt9qMkcK mbSnB5y+j5YD4ocVXVcpUEPoITXZBOFMqcD7cwyph3wPCPqK5+2EhwCv/8+2DzoiVQ7FEa tVuti0hBM6ZemRYOGS4DHcAzifYVQgcN7VMyTrM8Y0ATSGDd0lbEtEv6NoFv1HmpmFLvx1 dkDuDeZ/+kpokwVMnHmJ5h6eyARkQ0sOvO5WnVT5ppV4GqgC5APr8kZczEL+0yczoJJKI4 BbOxiV3jbhdlhDnWDVW/IQqqWsjWZ8OTIrVrayuNeWyrxljSxmvfMjIRrmaOnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759519341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PjE2iVFpcTsclG0VloXyMV2llL9EJiyQj5tzTvoisYc=; b=d+xnlnDIfuRjMkIWjNtNP19RcIKNSlc1oJ0if/KBtrhGBsE2tuWpG1XvrurdluddDtSviE NeU4MbjhstFVuQ4sZ3qbkTdY+NA66imSzilDAcNVyLLhxuSXFygu8Cc5VWlbVeWUwY+djk UfV0ZNv7VoQMPbRLIyEzA2IGVCAw7FhrXj1UlpfeoUBsaqs37F/Y/tXqRUO8pRwlWtqUgQ pd9gmbU3hLQ7ZZNg5CCcxuhukMFcoNYc01Ts33gc62KQreaktLqHRYQ7EJoeb3ElT6+td1 6xthDeTKfEy9ylPpff0wS4sUd/Up4BhuLlHLywxOXFZrNpekHZ/7Ghq5N1Xl0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759519341; a=rsa-sha256; cv=none; b=q+lJg0UB3zuqO7tRawF2Wh4Gsh4rGACD5gdQW6/ls6Wp0ylI2QmI3AIuP11l7Qnjm6ut1K hR6XDlz39g8WKvcHdKC+blXqkX7UuaiFjgbDHzZ3w3axYkKXGEs2BrwUaze4VMfSpHjWw6 H52mY/2wqHjwNKY/K70GpEj8MdBUzXI2uOWriS/whp4P21nQOiFCochYCxte0G89Izi6hv cKPRRDmZFYOmuy9STBeOGqnefF+yi3mWcFsHG2jJmNG6sqXoK3IJZaYZ0vrXMcUm5jgnSP J7VaQJd5zxMOBreMvkJHmqDmJp58KLP+ACG4AURR//YW9SBxtEEjZqXJgR15QQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cddpN5zNbz16Pr; Fri, 03 Oct 2025 19:22:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593JMKX2047371; Fri, 3 Oct 2025 19:22:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593JMK1d047368; Fri, 3 Oct 2025 19:22:20 GMT (envelope-from git) Date: Fri, 3 Oct 2025 19:22:20 GMT Message-Id: <202510031922.593JMK1d047368@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 249ec85352b5 - main - nullfs: smr-protected hash lookup 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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 249ec85352b5b69d70f71e3a329d16334ca71f59 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=249ec85352b5b69d70f71e3a329d16334ca71f59 commit 249ec85352b5b69d70f71e3a329d16334ca71f59 Author: Mateusz Guzik AuthorDate: 2025-09-30 15:16:30 +0000 Commit: Mateusz Guzik CommitDate: 2025-10-03 19:16:04 +0000 nullfs: smr-protected hash lookup Vast majority of real-world contention on the hash comes from lookups, notably seen during highly parallel poudriere runs. Lockless lookup largely alleviates the problem. Reviewed by: kib Tested by: pho (previous version) Differential Revision: https://reviews.freebsd.org/D38761 --- sys/fs/nullfs/null.h | 9 ++++--- sys/fs/nullfs/null_subr.c | 63 +++++++++++++++++++++++++++++++++------------- sys/fs/nullfs/null_vnops.c | 2 +- 3 files changed, 51 insertions(+), 23 deletions(-) diff --git a/sys/fs/nullfs/null.h b/sys/fs/nullfs/null.h index 0a93878c859f..dd6cb4f71f07 100644 --- a/sys/fs/nullfs/null.h +++ b/sys/fs/nullfs/null.h @@ -37,6 +37,9 @@ #define NULLM_CACHE 0x0001 +#include +#include + struct null_mount { struct mount *nullm_vfs; struct vnode *nullm_lowerrootvp; /* Ref to lower root vnode */ @@ -50,7 +53,7 @@ struct null_mount { * A cache of vnode references */ struct null_node { - LIST_ENTRY(null_node) null_hash; /* Hash list */ + CK_LIST_ENTRY(null_node) null_hash; /* Hash list */ struct vnode *null_lowervp; /* VREFed once */ struct vnode *null_vnode; /* Back pointer */ u_int null_flags; @@ -79,9 +82,7 @@ struct vnode *null_checkvp(struct vnode *vp, char *fil, int lno); extern struct vop_vector null_vnodeops; -#ifdef MALLOC_DECLARE -MALLOC_DECLARE(M_NULLFSNODE); -#endif +extern uma_zone_t null_node_zone; #ifdef NULLFS_DEBUG #define NULLFSDEBUG(format, args...) printf(format ,## args) diff --git a/sys/fs/nullfs/null_subr.c b/sys/fs/nullfs/null_subr.c index 4db0bc475791..146d3bbdaedd 100644 --- a/sys/fs/nullfs/null_subr.c +++ b/sys/fs/nullfs/null_subr.c @@ -41,9 +41,14 @@ #include #include #include +#include #include +#include + +VFS_SMR_DECLARE; + /* * Null layer cache: * Each cache entry holds a reference to the lower vnode @@ -54,12 +59,12 @@ #define NULL_NHASH(vp) (&null_node_hashtbl[vfs_hash_index(vp) & null_hash_mask]) -static LIST_HEAD(null_node_hashhead, null_node) *null_node_hashtbl; +static CK_LIST_HEAD(null_node_hashhead, null_node) *null_node_hashtbl; static struct rwlock null_hash_lock; static u_long null_hash_mask; static MALLOC_DEFINE(M_NULLFSHASH, "nullfs_hash", "NULLFS hash table"); -MALLOC_DEFINE(M_NULLFSNODE, "nullfs_node", "NULLFS vnode private part"); +uma_zone_t __read_mostly null_node_zone; static void null_hashins(struct mount *, struct null_node *); @@ -73,6 +78,10 @@ nullfs_init(struct vfsconf *vfsp) null_node_hashtbl = hashinit(desiredvnodes, M_NULLFSHASH, &null_hash_mask); rw_init(&null_hash_lock, "nullhs"); + null_node_zone = uma_zcreate("nullfs node", sizeof(struct null_node), + NULL, NULL, NULL, NULL, 0, UMA_ZONE_ZINIT); + VFS_SMR_ZONE_SET(null_node_zone); + return (0); } @@ -80,6 +89,7 @@ int nullfs_uninit(struct vfsconf *vfsp) { + uma_zdestroy(null_node_zone); rw_destroy(&null_hash_lock); hashdestroy(null_node_hashtbl, M_NULLFSHASH, null_hash_mask); return (0); @@ -106,7 +116,7 @@ null_hashget_locked(struct mount *mp, struct vnode *lowervp) * reference count (but NOT the lower vnode's VREF counter). */ hd = NULL_NHASH(lowervp); - LIST_FOREACH(a, hd, null_hash) { + CK_LIST_FOREACH(a, hd, null_hash) { if (a->null_lowervp != lowervp) continue; /* @@ -129,17 +139,34 @@ struct vnode * null_hashget(struct mount *mp, struct vnode *lowervp) { struct null_node_hashhead *hd; + struct null_node *a; struct vnode *vp; + enum vgetstate vs; - hd = NULL_NHASH(lowervp); - if (LIST_EMPTY(hd)) - return (NULL); - - rw_rlock(&null_hash_lock); - vp = null_hashget_locked(mp, lowervp); - rw_runlock(&null_hash_lock); + ASSERT_VOP_LOCKED(lowervp, "null_hashget"); + rw_assert(&null_hash_lock, RA_UNLOCKED); - return (vp); + vfs_smr_enter(); + hd = NULL_NHASH(lowervp); + CK_LIST_FOREACH(a, hd, null_hash) { + if (a->null_lowervp != lowervp) + continue; + /* + * See null_hashget_locked as to why the nullfs vnode can't be + * doomed here. + */ + vp = NULLTOV(a); + VNPASS(!VN_IS_DOOMED(vp), vp); + if (vp->v_mount != mp) + continue; + vs = vget_prep_smr(vp); + vfs_smr_exit(); + VNPASS(vs != VGET_NONE, vp); + vget_finish_ref(vp, vs); + return (vp); + } + vfs_smr_exit(); + return (NULL); } static void @@ -154,7 +181,7 @@ null_hashins(struct mount *mp, struct null_node *xp) hd = NULL_NHASH(xp->null_lowervp); #ifdef INVARIANTS - LIST_FOREACH(oxp, hd, null_hash) { + CK_LIST_FOREACH(oxp, hd, null_hash) { if (oxp->null_lowervp == xp->null_lowervp && NULLTOV(oxp)->v_mount == mp) { VNASSERT(0, NULLTOV(oxp), @@ -162,7 +189,7 @@ null_hashins(struct mount *mp, struct null_node *xp) } } #endif - LIST_INSERT_HEAD(hd, xp, null_hash); + CK_LIST_INSERT_HEAD(hd, xp, null_hash); } static void @@ -177,7 +204,7 @@ null_destroy_proto(struct vnode *vp, void *xp) VI_UNLOCK(vp); vgone(vp); vput(vp); - free(xp, M_NULLFSNODE); + uma_zfree_smr(null_node_zone, xp); } /* @@ -211,12 +238,12 @@ null_nodeget(struct mount *mp, struct vnode *lowervp, struct vnode **vpp) * Note that duplicate can only appear in hash if the lowervp is * locked LK_SHARED. */ - xp = malloc(sizeof(struct null_node), M_NULLFSNODE, M_WAITOK); + xp = uma_zalloc_smr(null_node_zone, M_WAITOK); error = getnewvnode("nullfs", mp, &null_vnodeops, &vp); if (error) { vput(lowervp); - free(xp, M_NULLFSNODE); + uma_zfree_smr(null_node_zone, xp); return (error); } @@ -264,8 +291,8 @@ null_nodeget(struct mount *mp, struct vnode *lowervp, struct vnode **vpp) return (error); } - null_hashins(mp, xp); vn_set_state(vp, VSTATE_CONSTRUCTED); + null_hashins(mp, xp); rw_wunlock(&null_hash_lock); *vpp = vp; @@ -280,7 +307,7 @@ null_hashrem(struct null_node *xp) { rw_wlock(&null_hash_lock); - LIST_REMOVE(xp, null_hash); + CK_LIST_REMOVE(xp, null_hash); rw_wunlock(&null_hash_lock); } diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c index 64e5b004abca..dd176b34e4eb 100644 --- a/sys/fs/nullfs/null_vnops.c +++ b/sys/fs/nullfs/null_vnops.c @@ -965,7 +965,7 @@ null_reclaim(struct vop_reclaim_args *ap) vunref(lowervp); else vput(lowervp); - free(xp, M_NULLFSNODE); + uma_zfree_smr(null_node_zone, xp); return (0); } From nobody Fri Oct 3 19:22:21 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cddpQ1gm7z6906d; Fri, 03 Oct 2025 19:22:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cddpQ0FRDz3hb1; Fri, 03 Oct 2025 19:22:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759519342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rqTKjU67RxWrwcdxmdTYi9XA5hqdB5DceML+JJLOeRw=; b=u4rkOwF1Qo9E7YmBAPd0RxoqyX+xRQFoo3QEMQNXzuDY3vdBDsj0EudqtgQW1O5EfqF6QY I7SPpeWSDkwmN2jE3VqbvF4w6OhM++OUg5KeU/1rCKflz01DU39rkNK9Hdj9uAYFXepSBX 3Zv0A9wKhhsg8R6QpoOtTzvdgsv3EdRDC9wdj6ESKQfCjp1pmOD6rNFohdrK6x/rc+jvHF M+kqpACmbTq1bgPFF+ddgaqNmuRdmlUiMd9s0LOxnzrhEm5hvNbIVAEppkAOmdg5rz9Uky lRrmLrPzcql8gq2dqY2DW3nOHAkyo4aJjEGtT97qEpt8jfgBGCrvmdbFAQrVHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759519342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rqTKjU67RxWrwcdxmdTYi9XA5hqdB5DceML+JJLOeRw=; b=IVDMsIoOLx72wwudbwhSlgaHKVIHen9l6iuXiNAX9WHsZt4MWzFdNcygkWLZte/yqRh3JN FWo1nAlwCKyleRITeGlUQNJlm4xo+ttirourgfk9B2rCl5Pit7GFq0igr48VUIFTCPwcHu Xll4C/rPFbWQDUM4NXBQsHXugQDIk1fras4qKZyMjsuEUFSbTosglzKDTO9oLJSzwj7N4W 1E/atO5REGN+BagJHu6J3LceU6I+/tl2anatTqnq8g3BmZRjD06i2qWEIP4UXR8yikcQk7 +2M7vL0Ih/NXDeTjCFdLNZ5uLSH2twV7Uw3q0EUD9SZ3fLskfFvN+XaDsFKMAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759519342; a=rsa-sha256; cv=none; b=KxcsCrzgkkzU4q5qygKK+O+MNTx4sAotUf36caKuMEZkM8ZiqR79awFPfdaNBjIIefiGiY oxXTI/tfi01jw7HUDhT+oT+yMKMoTPX+2ppJo/Nb3XVUS7EYP0As1avlj0D8EvOHh4GlrC 8RyHvNgYOPCAc2uDhAhm+VUUzpS/QvFQpuM/386VI6YxKvbkuEkT9pwCuDyoHVUDvQKvuh Kvhcopir1OPOkaJ66LV8RtfrWqUI2XEy9XhT1n6ktUbVwPqagO9zUDouSobjJsej7R7OXT Z6fsERWxEU28RWbUGWWP8T8xlLfDDhIKdKKOaWKnSFzlDfdE14q+VhkgcfPepw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cddpP6hSQz16Ps; Fri, 03 Oct 2025 19:22:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593JML7v047404; Fri, 3 Oct 2025 19:22:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593JMLdx047401; Fri, 3 Oct 2025 19:22:21 GMT (envelope-from git) Date: Fri, 3 Oct 2025 19:22:21 GMT Message-Id: <202510031922.593JMLdx047401@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 641a58239520 - main - nullfs: avoid the interlock in null_lock with smr 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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 641a58239520de9fc5a9077e9a709481cfc75dc0 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=641a58239520de9fc5a9077e9a709481cfc75dc0 commit 641a58239520de9fc5a9077e9a709481cfc75dc0 Author: Mateusz Guzik AuthorDate: 2025-10-01 10:06:39 +0000 Commit: Mateusz Guzik CommitDate: 2025-10-03 19:16:21 +0000 nullfs: avoid the interlock in null_lock with smr This largely eliminates contention on the vnode interlock. Note this still does not scale, to be fixed(tm). Reviewed by: kib Tested by: pho (previous version) Differential Revision: https://reviews.freebsd.org/D38761 --- sys/fs/nullfs/null.h | 1 + sys/fs/nullfs/null_vnops.c | 152 ++++++++++++++++++++++++++++----------------- 2 files changed, 95 insertions(+), 58 deletions(-) diff --git a/sys/fs/nullfs/null.h b/sys/fs/nullfs/null.h index dd6cb4f71f07..aa7a689bec34 100644 --- a/sys/fs/nullfs/null.h +++ b/sys/fs/nullfs/null.h @@ -64,6 +64,7 @@ struct null_node { #define MOUNTTONULLMOUNT(mp) ((struct null_mount *)((mp)->mnt_data)) #define VTONULL(vp) ((struct null_node *)(vp)->v_data) +#define VTONULL_SMR(vp) ((struct null_node *)vn_load_v_data_smr(vp)) #define NULLTOV(xp) ((xp)->null_vnode) int nullfs_init(struct vfsconf *vfsp); diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c index dd176b34e4eb..375b6aa27531 100644 --- a/sys/fs/nullfs/null_vnops.c +++ b/sys/fs/nullfs/null_vnops.c @@ -174,6 +174,8 @@ #include #include #include +#include +#include #include #include #include @@ -185,6 +187,8 @@ #include #include +VFS_SMR_DECLARE; + static int null_bug_bypass = 0; /* for debugging: enables bypass printf'ing */ SYSCTL_INT(_debug, OID_AUTO, nullfs_bug_bypass, CTLFLAG_RW, &null_bug_bypass, 0, ""); @@ -768,75 +772,107 @@ null_rmdir(struct vop_rmdir_args *ap) } /* - * We need to process our own vnode lock and then clear the - * interlock flag as it applies only to our vnode, not the - * vnodes below us on the stack. + * We need to process our own vnode lock and then clear the interlock flag as + * it applies only to our vnode, not the vnodes below us on the stack. + * + * We have to hold the vnode here to solve a potential reclaim race. If we're + * forcibly vgone'd while we still have refs, a thread could be sleeping inside + * the lowervp's vop_lock routine. When we vgone we will drop our last ref to + * the lowervp, which would allow it to be reclaimed. The lowervp could then + * be recycled, in which case it is not legal to be sleeping in its VOP. We + * prevent it from being recycled by holding the vnode here. */ +static struct vnode * +null_lock_prep_with_smr(struct vop_lock1_args *ap) +{ + struct null_node *nn; + struct vnode *lvp; + + vfs_smr_enter(); + + lvp = NULL; + + nn = VTONULL_SMR(ap->a_vp); + if (__predict_true(nn != NULL)) { + lvp = nn->null_lowervp; + if (lvp != NULL && !vhold_smr(lvp)) + lvp = NULL; + } + + vfs_smr_exit(); + return (lvp); +} + +static struct vnode * +null_lock_prep_with_interlock(struct vop_lock1_args *ap) +{ + struct null_node *nn; + struct vnode *lvp; + + ASSERT_VI_LOCKED(ap->a_vp, __func__); + + ap->a_flags &= ~LK_INTERLOCK; + + lvp = NULL; + + nn = VTONULL(ap->a_vp); + if (__predict_true(nn != NULL)) { + lvp = nn->null_lowervp; + if (lvp != NULL) + vholdnz(lvp); + } + VI_UNLOCK(ap->a_vp); + return (lvp); +} + static int null_lock(struct vop_lock1_args *ap) { - struct vnode *vp = ap->a_vp; - int flags; - struct null_node *nn; struct vnode *lvp; - int error; + int error, flags; - if ((ap->a_flags & LK_INTERLOCK) == 0) - VI_LOCK(vp); - else - ap->a_flags &= ~LK_INTERLOCK; - flags = ap->a_flags; - nn = VTONULL(vp); + if (__predict_true((ap->a_flags & LK_INTERLOCK) == 0)) { + lvp = null_lock_prep_with_smr(ap); + if (__predict_false(lvp == NULL)) { + VI_LOCK(ap->a_vp); + lvp = null_lock_prep_with_interlock(ap); + } + } else { + lvp = null_lock_prep_with_interlock(ap); + } + + ASSERT_VI_UNLOCKED(ap->a_vp, __func__); + + if (__predict_false(lvp == NULL)) + return (vop_stdlock(ap)); + + VNPASS(lvp->v_holdcnt > 0, lvp); + error = VOP_LOCK(lvp, ap->a_flags); /* - * If we're still active we must ask the lower layer to - * lock as ffs has special lock considerations in its - * vop lock. + * We might have slept to get the lock and someone might have + * clean our vnode already, switching vnode lock from one in + * lowervp to v_lock in our own vnode structure. Handle this + * case by reacquiring correct lock in requested mode. */ - if (nn != NULL && (lvp = NULLVPTOLOWERVP(vp)) != NULL) { - /* - * We have to hold the vnode here to solve a potential - * reclaim race. If we're forcibly vgone'd while we - * still have refs, a thread could be sleeping inside - * the lowervp's vop_lock routine. When we vgone we will - * drop our last ref to the lowervp, which would allow it - * to be reclaimed. The lowervp could then be recycled, - * in which case it is not legal to be sleeping in its VOP. - * We prevent it from being recycled by holding the vnode - * here. - */ - vholdnz(lvp); - VI_UNLOCK(vp); - error = VOP_LOCK(lvp, flags); - - /* - * We might have slept to get the lock and someone might have - * clean our vnode already, switching vnode lock from one in - * lowervp to v_lock in our own vnode structure. Handle this - * case by reacquiring correct lock in requested mode. - */ - if (VTONULL(vp) == NULL && error == 0) { - ap->a_flags &= ~LK_TYPE_MASK; - switch (flags & LK_TYPE_MASK) { - case LK_SHARED: - ap->a_flags |= LK_SHARED; - break; - case LK_UPGRADE: - case LK_EXCLUSIVE: - ap->a_flags |= LK_EXCLUSIVE; - break; - default: - panic("Unsupported lock request %d\n", - ap->a_flags); - } - VOP_UNLOCK(lvp); - error = vop_stdlock(ap); + if (VTONULL(ap->a_vp) == NULL && error == 0) { + flags = ap->a_flags; + ap->a_flags &= ~LK_TYPE_MASK; + switch (flags & LK_TYPE_MASK) { + case LK_SHARED: + ap->a_flags |= LK_SHARED; + break; + case LK_UPGRADE: + case LK_EXCLUSIVE: + ap->a_flags |= LK_EXCLUSIVE; + break; + default: + panic("Unsupported lock request %d\n", + flags); } - vdrop(lvp); - } else { - VI_UNLOCK(vp); + VOP_UNLOCK(lvp); error = vop_stdlock(ap); } - + vdrop(lvp); return (error); } From nobody Fri Oct 3 20:08: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 4cdfrW6ddVz695r7 for ; Fri, 03 Oct 2025 20:09:15 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic313-20.consmr.mail.gq1.yahoo.com (sonic313-20.consmr.mail.gq1.yahoo.com [98.137.65.83]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdfrT1zwRz3rlW for ; Fri, 03 Oct 2025 20:09:13 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b="E/E/zaAo"; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.65.83 as permitted sender) smtp.mailfrom=marklmi@yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1759522150; bh=mYo4gjQ81KrzRSZyQSxXTSuUDn7uDjCPBF1lBfWQyfk=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=E/E/zaAo1UQsSoJQKIxYTfiv817EiZ0kxJDGoNW4mhW7ftgq6ZwppIeuecw+ju5TT+flDqHYCwpmRnx35xRyKXaxD4CGhjRl9Jt/meDJ344Ji23y9WfFWb4MVlYT1PAOcoKPGj2LJsvWXCcpOgLDFMZmpVy0vSiEEabipl5YUMQX3D7ubhOt1im09gCnEBWoK/Syp49tZhm7eE6uyB4ErtVwCw/cctwOb94tyUagjrbze74Pz3oy7XjFV2wnyPXrm/EThRiQps30xW2q7WpxzpIfQXrAZk3e7LvAyAGtLsHeR0611CmhdnhdevSmkjZIQ18q5VrgnZk0UOFbY/zomA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1759522150; bh=TYTKNrcoVQ0tI4YG/tRqUotdrsP1wMbrUEG1dfq8bp6=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=MxpDDhc7r45XBVAhQp91XyxJFXe3nZxcZjwMWS7Nsy1dWoCUND5xhYaRd+T7jTw6/KHzdl1DxThmcHfOd8VeJmpY24WoQ4BusluRQTf2oClBPb4yN8AMF9CeJMAk/2lK00f3GGlTntbO34MGZ73o+15YOOCxOz7Bc4tijGIpfnQ5Vdp1eT/eWcggTIdkzG+vp72cleDrbkYiAWjso/MiCnfHMy94OZVG19dFIG3FrxkbaQ5ZENCyIv5EMn9ODv+Xk8CTkBVVmPqx6KGhjCrKV+pLdiISfZnvmMJnH0mIUWiXakYhRMJ34+YObQQHbhGbVpeWQ61TJXaFQ3Tikevybw== X-YMail-OSG: RGqPs.gVM1kL68Uz4gdnw8oxdQ7bldC9gVgxF4n49D696yz.GRjMy2QnsdLKiSM kVbgBN1Aul1DplCMTJlXJ3x0lXNMDGGP5s_Dk7Bn0YDSRpdTs95.PDQqvttKQvFrojTW9aZgzwpC xITLlRParNbo5MieoSGAKjoWEBFXMyZikTWXywdjHSkhKOndzM4Zr43_BGHRvBj9jDruu.ML4w5Y wbUm8Mfz0ZYCiWUJIXj.BCCng4Oo9s0.ZeJSUFr7D3wG5Fh_4LpYyIk4CYKMBhrznTQYTnxB3O5a ReH.lklhdeFgFk87oEUprKwlg6QvRPabWletdbE00o0Xw4v3xUUZi5XMhLJU0i.k4y96K7dF2vFy 5cq.xBG7MkCqKy.t03FNoeShe1sVlhDhaEAT4fqhU4zUUB0fKpnQ_McGo10ej81bCQ4hwxJ6jowg An4EBtg7RJJaLtyA3S_WlDQe_mlzS8JDefxYkUHN8AxF7_opIgc6vSjvrUR1_uvR_dpWKKQlxmo0 90DnLwEhCjCAb10kZxaU1rP_PoSvdk7rHtL4H53fQxzl.HIcyDR0NUvIiZGcunwUBlcneaw.RuVZ neg8FP64bvXoTMZ3epjQMunN506V9eDnHWMUaj5eZmfFzyJhYOAuPObHVJWhQH7gZVtXeFXY5yqe t_8MJEMmpcm2d2z0IR331ZE.fPzvCMvVxDK5NnCi17_or69pkNGcTDwe1xpIpSrHjeT1ncJKDvrT GCfV0.Ypi_W9RiuNws34oLVyHDxortyYXN0UJ7YXFOlWsYjPY1x0BCIII2WIB5KNqA7tPYsOlgC7 Dk8n10ZTYwRmRy1cZtc8jZsa8FSsy185u5fFd_DADrTUR9KFstzwOtwggGAA_gt1cDlirQ8RUBsD KSTuDWFC_TMy96UUhJ88b89.24n3ESpd9K7yEbp0xF_3bNd9V8Re5WRtRk0i9jq1I5zcrFl_P46N ExLnoUIriua2ieEskBK27t6D7hF2_vyB76rHZrK8usXeemb9TGtfFZ98bOuFDJeYvxFordg40Ery zSadrMfYJY2aX2vVeqIb_sBZ2KwAgcdjQL5bqSyziJRRD2.bvjME6kMDpNPlrbnVMunCpzuEu_NV SQkw3OCjHWro47c.q0cbbCLsaYxl9iirVGmn6vTrlAOOxGH0dZGxoe3F7sSW7fsb0RumF3kMKgRd 8V_EenkLj_LyQGcLDfNGH35ENk02sxlsHPAulzfOSpaRFtiL.Fgsqfb.RVXPF3Q4uX0No73ORA1q ZCOR4LZra6WeLX09JtnkfVsKBG58vibs8.rV5hVfpwj8k8MFzrPgE8DFkhPhp4wX1ioBky35TDQb 6KqmY.eW4Gkp4GgmYx1G2BEokcSTOwf53PkVyxLt3dKLYwOZtg3Cmljv3w1ZPvL305pSyZ2vK7BC 0qwn0tTI.dpNXoWw.v1yNXfXdbWzSTyJYXGfweZYWVPwGuGrLtFk_DjQCYofE4kenJfXJbxW.oVQ bxf89NAiugV1zWqxprJj0vriUCxCkGJnrdHGf4IsfNuZTX1MVsZLt8QiKAdUPV1dIVSpkAjVk14w s7q9NBOgHXGptnwE_qXPZeLN.GpxrAuoDUCEnYhbW5W5uC51pIWOahArOPV7vW3EYLrdOwBkbRsr EI1fWJqfm4PwrAwPawny90kHTbtDwsCEXheSHeNpUc5v6_efxyn04NcaUxm8ne8xwjx_f08LAVt3 KoUVBVMeaUApLx.naFfRe3lGNvDsIoWUphcCW2Aq61Sm93LDhVD2Y_8JGy7AzAuzlV_24NH307Fl vEUdv0KqYzjyj0QC9uYLg0Pjro8OiDjcxq4tl9Qa73CJaQVcitQEibt0lcN51es0GnBXM1YMZNbh KuprimqWkAjfumu.3QAu6Tfl0Z4EC317Kmtys_uqpqD7uXPBbBmw0UXoYQFnt92uZhbJXx.Ajl.u otrRSs0oNFH4WN5z5BhAMrRxeWoYYC7kkxVS2W0_ID4SlCP4E0G8srCbvOccYnxNGrppCLFcMyiJ cLl0ku2DvBu8dyVTLYmQKBjuVDWjx40Nn2T1MmkAHSBxdLxiSwV_M3BZ7l31QS1Wvaw6H_gl_kjK O47TrewaR3D2YU3LVkQeYnCcc2iGpuUreXuP5ylx2lx1.59guBWK18r38Mmw2zLhAJtszRTbWK3r XsOeXRFqRaaXaOIRKEXGHxv8J2oKdcLB2Cl2M_MLL7eglkOXFjphDZD5x1q6LHZtr1beFZXLiuIs 8D.XdQlHBVvSML_9ZNthVY1cdBy8vlMYtXUgwcI0b5s29cuzfvPrEdGZqhXHA59VMHpzluAJ6aOs WRo4EFqF5XY5D6kizm5U7 X-Sonic-MF: X-Sonic-ID: 7568fe9b-c7b6-468a-bf3b-dc4a5d7bcdbc Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.gq1.yahoo.com with HTTP; Fri, 3 Oct 2025 20:09:10 +0000 Received: by hermes--production-gq1-66b66ffd5-kz2cn (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 129e048e1def8388c0368bc1cfed6267; Fri, 03 Oct 2025 20:09:05 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: RE: git: 641a58239520 - main - nullfs: avoid the interlock in null_lock with smr [bad differential revision reference] Message-Id: <4A0B67AF-F155-45F1-AB1F-9ACA175E27F8@yahoo.com> Date: Fri, 3 Oct 2025 13:08:54 -0700 To: "mjg@freebsd.org" , dev-commits-src-main X-Mailer: Apple Mail (2.3826.700.81) References: <4A0B67AF-F155-45F1-AB1F-9ACA175E27F8.ref@yahoo.com> X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.17 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; NEURAL_HAM_SHORT(-0.17)[-0.174]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; TO_DN_EQ_ADDR_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; APPLE_MAILER_COMMON(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.65.83:from]; RCVD_IN_DNSWL_NONE(0.00)[98.137.65.83:from] X-Rspamd-Queue-Id: 4cdfrT1zwRz3rlW Mateusz Guzik wrote on Date: Fri, 03 Oct 2025 19:22:21 UTC : > The branch main has been updated by mjg: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D641a58239520de9fc5a9077e9a709481= cfc75dc0 >=20 > commit 641a58239520de9fc5a9077e9a709481cfc75dc0 > Author: Mateusz Guzik > AuthorDate: 2025-10-01 10:06:39 +0000 > Commit: Mateusz Guzik > CommitDate: 2025-10-03 19:16:21 +0000 >=20 > nullfs: avoid the interlock in null_lock with smr >=20 > This largely eliminates contention on the vnode interlock. >=20 > Note this still does not scale, to be fixed(tm). >=20 > Reviewed by: kib > Tested by: pho (previous version) > Differential Revision: https://reviews.freebsd.org/D38761 FYI: That differential revision is for: "release: correct Azure disk image extension" =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Fri Oct 3 20:16:41 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdg161d5xz696Z1; Fri, 03 Oct 2025 20:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdg1615QLz3vPc; Fri, 03 Oct 2025 20:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759522602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1L+lvHfgpoBfjGoTsEmbiPmKwi4pW6fqiPUxWx46pPY=; b=rYto9ytLG6P5nuLEMrAI0kp/ynNSLneby80mJbuQGIlkvP4cGoLp2S0/cMv15UkqN4eX58 aH7fRgcU5CF2lGLpQQNNcNXrYSti8xlKCPQpcAwjGnfhTWrRCCuYkwPR4nnEFaU/WhAzNP ht+uS1FeA2t+b1KxiOFpBi16TEIAXsbh/iNKT7DmXCdNq1kcUf82TrO2una+0+7p5RP9ne tdGkgZaAfNoXDJpPmNSawJ9e6bnQ7WJpFV5wLckM9h/R+upS3jCvULcN3nZ2RDHdlLoQkQ ozlYhUB+N2jJYBVm2w9kKWbtQ/fn8yy/4YsjuwbxYjPrTg7+js4ZX6ULXIeyNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759522602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1L+lvHfgpoBfjGoTsEmbiPmKwi4pW6fqiPUxWx46pPY=; b=D0XqrdbUPTdJmwUBS3RrB6I/eHtQr6RsZK/9VFMKV1tPEcHvV2+94v1ySQdKDeVcSvsDNO Av8x1n+fPAdbJOkqgLZXoAmFCZBufYx6StPMsplB1+kwiCZlWN9gnDyZSyNJzEyRXxR9Lu vWD3sBv+9TeLOqD4rhvP5h/sd5ocY8F9XgJs0ZVrRMN2FxRFUe0vGfWc0bnpbHk2g+AuKr 6nk4hh34Y4/HxY7cS7NJD3jRFBX/xXq678dZ1XLYFmJXSMCkwhuY/DiLbyc9QKXM1bmnrO N3QKGZYc8UfFbpH52tsTlVT2qvx683SZqMzMR7Ekd681ZndMQB4D0bs2AhRz3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759522602; a=rsa-sha256; cv=none; b=qzAXfG4DQfC2DQ9qHzLJVOd5S0YX39HQxnosKs5k7R7FgE5u4XlSu96EwDI12NBR85VJtz RomTnchq/2HE+FGWXC6oj6aZNUqmiRooVVU086KBCy+PSHX6a49/Nz5gZikyElw9Yz3UYx hmqbUHjqx2DkTHysB9McIiE4c4pRCVudhfT9cTmYyypebCC1fWP5ojC71ncAmGeHWWOTGD Vqgr7Lnl/ciQfMaWOStTMGdx2q0px5i8YcfXqFNxwsr14ATFkATRKN+SbpoDuNaodlRyBl pv2EIbcNKyPo8hsVCWf1cKDQxektUMNJgJC/x9N6NkXme9WZKLfPzifTlzdF6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdg160d32z18dy; Fri, 03 Oct 2025 20:16:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593KGfRk043263; Fri, 3 Oct 2025 20:16:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593KGffe043260; Fri, 3 Oct 2025 20:16:41 GMT (envelope-from git) Date: Fri, 3 Oct 2025 20:16:41 GMT Message-Id: <202510032016.593KGffe043260@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 313204024723 - main - flua: don't build libjail into the bootstrap flua 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31320402472394af57eb3a36bee7f944117ca0ed Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=31320402472394af57eb3a36bee7f944117ca0ed commit 31320402472394af57eb3a36bee7f944117ca0ed Author: Kyle Evans AuthorDate: 2025-10-03 20:16:30 +0000 Commit: Kyle Evans CommitDate: 2025-10-03 20:16:30 +0000 flua: don't build libjail into the bootstrap flua Other systems don't have jail support, and we won't be using it anyways. --- libexec/flua/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libexec/flua/Makefile b/libexec/flua/Makefile index b43b31298205..0d1841f8c3bd 100644 --- a/libexec/flua/Makefile +++ b/libexec/flua/Makefile @@ -9,7 +9,11 @@ FLUA_MODULES+= lfbsd FLUA_MODULES+= lfs FLUA_MODULES+= libhash +.ifndef BOOTSTRAPPING +# Bootstrap flua can't usefully do anything with libjail anyways, because it +# can't assume it's being run on a system that even supports jails. FLUA_MODULES+= libjail +.endif FLUA_MODULES+= libucl FLUA_MODULES+= liblyaml FLUA_MODULES+= lposix From nobody Fri Oct 3 20:44:39 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdgdN0qRwz699RB; Fri, 03 Oct 2025 20:44:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdgdN0MRRz40wf; Fri, 03 Oct 2025 20:44:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759524280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uPMmhqlq/KiV5GqdGkkLiBeY+ed6RbXzJf8JrDXW7iM=; b=KoFaDRHiOdIiXK4jUE7ujZMcKyPQtN6Vze2aHIdsD5dzCsXKA3/BwYkOlizbVcDBytnQqt 2cPwFPwoSxQfjTTPs/MWnc8PHNw9l9WFLwLPMzHAB//faqLC2gRbnHUj2lL6ovN6qlMT3I yVBn4CIhGvyo7qs50bTYJNByCbMB3dE03bozfhECvsmsMQrIYsKWBEe2cs15V3C2+pN81X dTFaicjpU/sRSt6HqbmfkYACibLhpEuy3/99e7MK9cg4I54AY1QGH/a/9NYQaAizbGVoGC 63ZfsV51NuxLmEJcxzXtjOb/GyfJIDFQ4ow0WCSb6TnnU66Di4QKgQsQB92xOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759524280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uPMmhqlq/KiV5GqdGkkLiBeY+ed6RbXzJf8JrDXW7iM=; b=LO0MRegFI+10bIDRR3HUJiLsUOEtHqf1kvkXnJF1PkVOnueRXdkX+vlrCzUwKKXE0DG/gx 0i6iiGQrYt+EysXmzNkv7sFDUCBA57y9ZB/8NxdKC7ihNUVyquKKaIXLwEya8bAq9jqNVG 0jTe5CL0IrwJ7LcasoAYiY/+iBQHjj45r2njIDTviODyKOLKcKINGO4y4OgcwubkrfEBCe Bh4m1JJf9LoBGhjbLf6he9cfZFDZtplEa2j59qDFniPriC42LbHWBb3gquXs/y8n7+LJtq vZQ47v86PKXkR9M7rW3ek0WZBJhytaEpv/7aI+c/Fp4psrycCENNDr5+X8S5jw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759524280; a=rsa-sha256; cv=none; b=JUPezsD9/d7nLikrpPfC/K7mEb2qxd933HYNaGkawlPLYQmtRGw47aOq//yFG12r/sAuqu yZM6UJOAs5W7SzO6oUUHrm5ITKdNmDRxL9kK5PS525kZsmlfTGTffVi+GlOnqp7IDEIZ6X 50mPPjfm2IJV8jRcEpzdXO1C2lC3tL705SW9Ezn0mTJz24DhZHtVGBfsbMUIoqYxqrPMkK GfzIMc158IaWBFqpIY1t+h5so+gkybvCpiHVbgOHGzMc17bSQM665S/rdxnSIAVQ61LoA9 1aZGHrD4HW2Agps4csR/+9D575uwQvp9GVdPT3ecUPeOLgSBtESs2hsgFV6urw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdgdM73fnz19cm; Fri, 03 Oct 2025 20:44:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593Kidhm098334; Fri, 3 Oct 2025 20:44:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593KidGp098331; Fri, 3 Oct 2025 20:44:39 GMT (envelope-from git) Date: Fri, 3 Oct 2025 20:44:39 GMT Message-Id: <202510032044.593KidGp098331@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: aa9e4fe3c902 - main - getconf: Report value of _SC_PHYS_PAGES 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: aa9e4fe3c9021d623743e26aef879a0036f87c0f Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=aa9e4fe3c9021d623743e26aef879a0036f87c0f commit aa9e4fe3c9021d623743e26aef879a0036f87c0f Author: Jason W. Bacon AuthorDate: 2025-10-03 20:43:47 +0000 Commit: John Baldwin CommitDate: 2025-10-03 20:43:47 +0000 getconf: Report value of _SC_PHYS_PAGES PR: 289717 Reviewed by: jhb --- usr.bin/getconf/sysconf.gperf | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/getconf/sysconf.gperf b/usr.bin/getconf/sysconf.gperf index baf341c8962b..2bd75dd47851 100644 --- a/usr.bin/getconf/sysconf.gperf +++ b/usr.bin/getconf/sysconf.gperf @@ -47,6 +47,7 @@ OPEN_MAX, _SC_OPEN_MAX PAGESIZE, _SC_PAGESIZE PAGE_SIZE, _SC_PAGESIZE PASS_MAX, _SC_PASS_MAX +PHYS_PAGES, _SC_PHYS_PAGES PTHREAD_DESTRUCTOR_ITERATIONS, _SC_THREAD_DESTRUCTOR_ITERATIONS PTHREAD_KEYS_MAX, _SC_THREAD_KEYS_MAX PTHREAD_STACK_MIN, _SC_THREAD_STACK_MIN From nobody Fri Oct 3 21:09:16 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdhB24qxMz69DCS; Fri, 03 Oct 2025 21:09:30 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdhB20ty5z44BH; Fri, 03 Oct 2025 21:09:29 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 593L9GQt047899; Sat, 4 Oct 2025 00:09:19 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 593L9GQt047899 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 593L9GAZ047898; Sat, 4 Oct 2025 00:09:16 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 4 Oct 2025 00:09:16 +0300 From: Konstantin Belousov To: Kyle Evans Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1953a12ee2cd - main - flua: support our flua modules in the bootstrap flua Message-ID: References: <202510031810.593IAZE9008541@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202510031810.593IAZE9008541@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cdhB20ty5z44BH On Fri, Oct 03, 2025 at 06:10:35PM +0000, Kyle Evans wrote: > The branch main has been updated by kevans: > > URL: https://cgit.FreeBSD.org/src/commit/?id=1953a12ee2cde1afacb3e3f7612d89695c96e04f > > commit 1953a12ee2cde1afacb3e3f7612d89695c96e04f > Author: Kyle Evans > AuthorDate: 2025-10-03 18:09:03 +0000 > Commit: Kyle Evans > CommitDate: 2025-10-03 18:09:14 +0000 > > flua: support our flua modules in the bootstrap flua > > This version builds every module into the flua binary itself, since all > of the bootstrap tools are built -DNO_SHARED. As a result, we also > cannot dlsym(), so we can't really discover the names of our newly > builtin modules. Instead, just build out a linker set with all of our > luaopen_*() functions to register everything up-front. You can use --export-dynamic AKA -E to allow for dlsym() to find symbols from the executable. Of course, it is desirable to have version script to explicitly list the exported symbols. From nobody Fri Oct 3 21:28:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdhcW5bJsz69G2c; Fri, 03 Oct 2025 21:28:59 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdhcW52Lkz45xy; Fri, 03 Oct 2025 21:28:59 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759526939; h=from:from:reply-to:subject:subject: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=4SSEznSsH2j/AuvpJbejBQ36llBkwI4fzgx1hod73Ys=; b=lkMM9gXA4RplAui+VGgnJcjXBbFrqSEKMhs1FhE490w30oTqOmAS5a8iJ95M/5bjmXKcmA QK7l9FXvX2EaB0Yd0wcpxDqzxw98OBn3Oirr3IWwU3o3EOJMt/vNFo/XEKsaapqF9p4hV2 akpGEgIjSEucbP0pS38XnC7knTarJ6X7SjrhsfNg/jUNwrE/9GwGuznwtZfP0PG7MFN0Ok oGSY3NTAwWjquW3c7WsJHKCu/ZzM4RV3gUQgMrQ+Qb9tE0s9wUFAT8vxzmylp/HU4+h7dU hIuKihI74ffSnuSZHElnG4t7jEvDuCdN9DfNfpoItNGkck/yui0tcwBA4fzWXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759526939; h=from:from:reply-to:subject:subject: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=4SSEznSsH2j/AuvpJbejBQ36llBkwI4fzgx1hod73Ys=; b=k6nJ70mhSFGCKyvKFeYaAnVsoyWE63fMoZ82bTKU/UMezXpfmLuxuNVaonDDfLYHlcRMf0 2F/fETDxGy+3Qv/rG+38+nE5QU7qCtBE7UdkPdtbvrRMkafRH1t/4B9CT6TXUEqjEq+0Gx IPTjZhKiEFKTafuwIGV8jqWFGepDsuy7bNWTeATdzJvdAGgVbQCgmZ1yIc24BDSbUBmJC5 STdZY0uIjX5wSwSvS2odL1WElpi9zSQWtQvXdC6UCmIZWAP09bLrnkPwRaUZg58hTjCUcl HnrYAwtJSNOl/qPXYMPhsPuN4i9oH1fdidXiEqgPXb/Af7GVFMVdgZ4KMlYlhA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759526939; a=rsa-sha256; cv=none; b=TwSfbxMVx3dmt3OJfSUFNk3EeVuwP4tsHGsGiNRtg7zfPRLJGT7avTCZyOhAsn5IsSNWph HeZ53kKIBxstORGEDqNHYYhAAWHgj0h+xtMbvWmIIIPm0m/O3QiQUOvEeKyRaIwMlriOOa 9jPBng+frryW7GLwJh9jezNUEjCFOAVSrzLhE7SRbNghX2lO5/z3l+QUZ0KXkAtB1cGgGD GnkEcmSFJkTQrI+/TYk734BMDZ+CWieHq/ai1ykWlAz07KfaJC4+1At+UkVnNmpMc9X8MN GDfy8WdK/q90ntj2ZFK0EkXKJln4P0GSneqUMGd/dXHkS309Fdb3a+PPuDVc+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cdhcW1pp5z9RF; Fri, 03 Oct 2025 21:28:59 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: Date: Fri, 3 Oct 2025 16:28:58 -0500 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 1953a12ee2cd - main - flua: support our flua modules in the bootstrap flua To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202510031810.593IAZE9008541@gitrepo.freebsd.org> Content-Language: en-US From: Kyle Evans In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 10/3/25 16:09, Konstantin Belousov wrote: > On Fri, Oct 03, 2025 at 06:10:35PM +0000, Kyle Evans wrote: >> The branch main has been updated by kevans: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=1953a12ee2cde1afacb3e3f7612d89695c96e04f >> >> commit 1953a12ee2cde1afacb3e3f7612d89695c96e04f >> Author: Kyle Evans >> AuthorDate: 2025-10-03 18:09:03 +0000 >> Commit: Kyle Evans >> CommitDate: 2025-10-03 18:09:14 +0000 >> >> flua: support our flua modules in the bootstrap flua >> >> This version builds every module into the flua binary itself, since all >> of the bootstrap tools are built -DNO_SHARED. As a result, we also >> cannot dlsym(), so we can't really discover the names of our newly >> builtin modules. Instead, just build out a linker set with all of our >> luaopen_*() functions to register everything up-front. > > You can use --export-dynamic AKA -E to allow for dlsym() to find > symbols from the executable. Of course, it is desirable to have > version script to explicitly list the exported symbols. The stub in libc seems to be an error and -DNO_SHARED means that we're built statically, so we don't have rtld support. Thanks, Kyle Evans From nobody Fri Oct 3 21:30:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdhg13PyHz69GBb for ; Fri, 03 Oct 2025 21:31:09 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdhg11ZJZz46Rp for ; Fri, 03 Oct 2025 21:31:09 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-afcb7322da8so583709766b.0 for ; Fri, 03 Oct 2025 14:31:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759527065; x=1760131865; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=nnDbCyh0CO/izjj2Lb1KPPRt4aAeFnz4a0CsTC8G568=; b=UPQyKk6WWhKGFzQ+GbEDoOy/8KzizOM8W5S1mjJJXcFggYW2U7oVBGmASgG2dhrY92 sqhVge8HbJe9todYM16yZ/2rHriDi3OayAduRnxV88EtnJymfVa7osqKvfWYBUzeMaB+ 0Y01TGUTLhxJJaaTJmXN1k89R69YvkcPnGD0qTavzrMvTPNsKGq98IRhT5wL6oN5yt41 yUvPAKilf3IiwDKY6jmk53aQQOOCGkW0AMHrSkrtl4sZkHasO9dQxqDeNp3UJfmoOBds 6LEQ98bX3GX65YklUJzwPMQm92jEL00IaQp8X2Mptf9ojGrDhwSIW4NGFVDpTpkha6Uo Cs6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759527065; x=1760131865; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nnDbCyh0CO/izjj2Lb1KPPRt4aAeFnz4a0CsTC8G568=; b=RF90w1Hr66GJHsr3RLfmkbeVklAjY2e9hD+ozsQ0tjleba0/4U+R5oe204XeY+Gt/q YM8ucYNEQNZCcAf8xGg76gqbWgXO3jiUIS15HqdNdybyWOIro7Sa73Sk551jx/eyRtzH +dzywXt9NatgzgHAUTVgw+TS+AHWkFjETX+WZasnZArfcjYIuClexjrlSnSXNoC4x0We jCUgg1D0emDTOIVmpBAHfhoEZYoXd8KHTOkjEEoHcIzTjtLq+2jA8QfQyX7RL6wVDBiY lQS10o6x9Dmjv9NeiykWj230nd7xi8C75a5t5FINfF5zcXyp0kKYMSgOrIhEFNI1V/nL bhrA== X-Forwarded-Encrypted: i=1; AJvYcCWfwBk4ov7RoEIVWWJpOWv6NRaRpW6SD8L3HODPHZNROEIrsJ3zYmsgBJvQZrhCJUK5l84FDtW19+Z/ouupWfL6gDDqag==@freebsd.org X-Gm-Message-State: AOJu0Ywz3IfgchTQFL4u5Mkv8z5hIX1ZL0XtF68uWn+ez/lVU1KjRkBn WJyY55gDF1IGDDxDL+PREKXtvX2i7bBnCbkCimKRkiOFSlg0vXvDMKbCDRILR9Bq5kCHtvtQIgK OjQbDQWUV5FO0n9CS1VZLqKjPr2mqAaE= X-Gm-Gg: ASbGncsR3X8ilvjPNkoSwkAi7YI5HikXwPQrZgi+5Xxt+F9Xh/AIsjzs8OkYGAPQXPq jvSELAuUwBe9BIVRbp0TkU4nxp9eXpDfhN9Lm7FI2KnMIJOH6W5ypFPtqQRWvy/m8IuzMP0U07P G/K6aCTtmHEnn3sfpzUdDDOx3ksSLWsda2N4jPysU0F19PKv9+drT2pfjy2HTjLdUzbW8q9uh+J b5E2c7Y4yVVmjmtO8mjmZENSuqatO0IzjFVyfGyItcjLOOKQ8G1uIjuHRrnRdo= X-Google-Smtp-Source: AGHT+IGcN71z4wkBwBIrzyb6IUmonlYTuTQqmNqJwJfFpbRml1ynPM8aYAOAzGQr1RmvLBJsnFlyLXoN6r95W8NOB68= X-Received: by 2002:a17:907:9620:b0:b32:b055:949a with SMTP id a640c23a62f3a-b49c373eb12mr587938666b.33.1759527064732; Fri, 03 Oct 2025 14:31:04 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 References: <4A0B67AF-F155-45F1-AB1F-9ACA175E27F8.ref@yahoo.com> <4A0B67AF-F155-45F1-AB1F-9ACA175E27F8@yahoo.com> In-Reply-To: <4A0B67AF-F155-45F1-AB1F-9ACA175E27F8@yahoo.com> From: Mateusz Guzik Date: Fri, 3 Oct 2025 23:30:52 +0200 X-Gm-Features: AS18NWDNOGNCkjL4tcQJn5NhNLb_MpHyn-3jjgMPKlWJXqSCv4mUqVMF5wu8coc Message-ID: Subject: Re: git: 641a58239520 - main - nullfs: avoid the interlock in null_lock with smr [bad differential revision reference] To: Mark Millard Cc: "mjg@freebsd.org" , dev-commits-src-main Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cdhg11ZJZz46Rp On Fri, Oct 3, 2025 at 10:09=E2=80=AFPM Mark Millard wr= ote: > > Mateusz Guzik wrote on > Date: Fri, 03 Oct 2025 19:22:21 UTC : > > > The branch main has been updated by mjg: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D641a58239520de9fc5a9077e= 9a709481cfc75dc0 > > > > commit 641a58239520de9fc5a9077e9a709481cfc75dc0 > > Author: Mateusz Guzik > > AuthorDate: 2025-10-01 10:06:39 +0000 > > Commit: Mateusz Guzik > > CommitDate: 2025-10-03 19:16:21 +0000 > > > > nullfs: avoid the interlock in null_lock with smr > > > > This largely eliminates contention on the vnode interlock. > > > > Note this still does not scale, to be fixed(tm). > > > > Reviewed by: kib > > Tested by: pho (previous version) > > Differential Revision: https://reviews.freebsd.org/D38761 > > FYI: > > That differential revision is for: > > "release: correct Azure disk image extension" Huh. I'm gonna blame wayland for copy pasto. Thanks for spotting, but it's too late now. ;) From nobody Fri Oct 3 21:39: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 4cdhs54kqSz69H44 for ; Fri, 03 Oct 2025 21:39:53 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdhs52ss1z47KJ for ; Fri, 03 Oct 2025 21:39:53 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x72b.google.com with SMTP id af79cd13be357-856222505eeso316189285a.1 for ; Fri, 03 Oct 2025 14:39:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759527591; x=1760132391; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=XKrCMi07STkd0L6TZ9UX+Nf85A1RReWvtBQ/sVd+omM=; b=gxQ2/nAdN19w68BRjpTZH57tRVFWqNqEMiF2g+bm1nzVoZIGRMFKAqbYuUIpHseRWf jHWnptcmfXKvrUtqSDsa64fgVOfwSgMc/FNiwgzeiENJZv9sIP4hp9EL+MP7JTP5eRms J34t0u9zjCr/yqLNy8aa3nTy5vxnt8pifuDQoyXmeAmgLlqEzeh/Henrc2pTFikbNQTH wZTojwZX+hKMxxDO3pybN9AYllHeeND2Aj7XPUoFYyljhYIKwLQNQBpVAK+wpluoOrrA JtqWd04DoKGK0HYF7hOUioehMg/Zz+Tk3VpgxsTFU9GMHugrJs/tF7m+ImZAFpwZOc0A SWsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759527591; x=1760132391; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XKrCMi07STkd0L6TZ9UX+Nf85A1RReWvtBQ/sVd+omM=; b=nCUzfh67i38jnJSP8jcCKilsd1IFVAb73jdXZtlUsrz2/vdw3tL/qfCReJonCDqdO1 /p2bskLmXim2RK41ll4sZou09PDnfd8SyMO4Frgr40Uu8LHBdlnGBKxcuPXG5r1PrWBp XH7SntuteV8ufFlUIj4iqSemCCcm3x9d2i41JTvzk42W8wYDaM4zgoWzvTP1hJOprLzT KyTXhE4s9gr+p4KyXZ9PXcOjZbXaehN/5jeA11j2C/A5+tsnBKAWOdvzFjIpVLpcla5A 1I9BCnxx8uOFk08fqrGf2vrmhJ+6khK3p0ABkmpveW2e7wzckHIMxJi4MIlR0iQb3oPZ rbiQ== X-Forwarded-Encrypted: i=1; AJvYcCWA75Tkj0vnab88GJpqYk+zENY6QdLgUzMbyc9eV5BSFklrhfJx7/4h6hBr3eAKIqK0du0/q7pKBIhRTp3gaIk8w2BIvQ==@freebsd.org X-Gm-Message-State: AOJu0Yz6d+KrACMUeKsPA6/ZnjeVjxIiloA5OK79vepRXdADCR305xTQ QNyDBhG0RcLcZl/fFbPNXgpDpC/B6vCM1R/aALfMf/owhLK2sn5jzVhME6vzBu+q X-Gm-Gg: ASbGnct7DwMopXXButThNueRIwXuUveNoTnVvDPc/nyHHkgWtFf4hQLHDzm5MayiO94 W8OY8DiI7XBNqcKV0eOcRPYF+21smlj0zzQMMuIATOI1y6M9SlbgU3DjEwVXqWoHc7dHfu1mXOx AvgoWQDzueuMYQ011lC36WslAwfS2iIv3EETSFoGrG8j5c7dvTxCigmPM+ILUreRa7IZRFFU5nb IiwJW+ld/WD6ykU8Upqj5rw/OWsVtoFGipBM0688KPMHeH/NUX3yFo7JNjk12ErYRdT4DQku0hM oWeGEZpXlo0gTra4YegAD/XzHdaw17DuQvRE43UOaiE0PO421POkWsGLmIFGg2pcSiao3rOmd3/ cOWd9pwPcpYGXsef+HnZ3pwA6LkBHArbNQC9LiG/S8zguY4janrtb1VXRR/VP X-Google-Smtp-Source: AGHT+IEGOPORN+AtSNv8W+zntsmmw9qTucIgzmmfyiQdiQQsjXTyLoQPcmA2PqHnJSdAydCU3WcHig== X-Received: by 2002:a05:620a:28cd:b0:85d:3c32:c412 with SMTP id af79cd13be357-87a36779655mr582432385a.5.1759527590922; Fri, 03 Oct 2025 14:39:50 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id af79cd13be357-877725550fcsm540520285a.21.2025.10.03.14.39.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Oct 2025 14:39:50 -0700 (PDT) Date: Fri, 3 Oct 2025 17:39:47 -0400 From: Mark Johnston To: Kyle Evans Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1953a12ee2cd - main - flua: support our flua modules in the bootstrap flua Message-ID: References: <202510031810.593IAZE9008541@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202510031810.593IAZE9008541@gitrepo.freebsd.org> X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cdhs52ss1z47KJ On Fri, Oct 03, 2025 at 06:10:35PM +0000, Kyle Evans wrote: > The branch main has been updated by kevans: > > URL: https://cgit.FreeBSD.org/src/commit/?id=1953a12ee2cde1afacb3e3f7612d89695c96e04f > > commit 1953a12ee2cde1afacb3e3f7612d89695c96e04f > Author: Kyle Evans > AuthorDate: 2025-10-03 18:09:03 +0000 > Commit: Kyle Evans > CommitDate: 2025-10-03 18:09:14 +0000 > > flua: support our flua modules in the bootstrap flua > > This version builds every module into the flua binary itself, since all > of the bootstrap tools are built -DNO_SHARED. As a result, we also > cannot dlsym(), so we can't really discover the names of our newly > builtin modules. Instead, just build out a linker set with all of our > luaopen_*() functions to register everything up-front. > > Building in all of the modules isn't strictly necessary, but it means > that we have an example of how to add a bootstrap module everywhere you > go and one doesn't need to consider whether bootstrap flua can use a > module when writing scripts. On my build machine, the consequence on > our binary size is an increase from around 1.6M -> 1.9M, which isn't > really that bad. > > .lua modules can install into their usual path below $WORLDTMP/legacy > and we'll pick them up automagically by way of the ctor that sets up > LUA_PATH early on. > > Reviewed by: bapt, emaste > Differential Revision: https://reviews.freebsd.org/D51890 This breaks cross-building from other OSes since linker.h and kenv.h aren't available. I guess we can safely exclude those from the bootstrap build? It could be done conditionally on ${.MAKE.OS} perhaps, but it's probably better to be consistent. From nobody Fri Oct 3 21:44:38 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdhyb6v0pz69HFL; Fri, 03 Oct 2025 21:44:39 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdhyb5tRfz488N; Fri, 03 Oct 2025 21:44:39 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759527879; h=from:from:reply-to:subject:subject: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=/KGoWisETbzMMebYw9Jf+ga9IbfQ5QbUab5NhWSeOu8=; b=bAh1793dvX14O/3j6Kf3isQeiVONid9+T8DgcdeOQnG3XvOrvKHx0fK+Y202ELyv1TssHC L/1pNuH2GT22rsYSsHj7Q0JPIue2OMVllL+KEajiNGM5aC0fzW4CtUXjT49UyF5pC7urx2 857dbK09Oph6sjW2IdeO6yvf/PtTCbYE0YbetSfqPmNsjM53cCrv8OivIMxbFSuMEkuux4 /yvdsJk1r2q5f37hlI4Wo+9K0sp5VA/9QMgGX7NjzSy0zeKviqvQFdP1Eh4OQPdOmPEmaO 4Uj6uuAF4wPzpNh7FT6fOuR0QjIjKC6sfymPgoVUKBSNITO9vfRbmOw67g+V7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759527879; h=from:from:reply-to:subject:subject: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=/KGoWisETbzMMebYw9Jf+ga9IbfQ5QbUab5NhWSeOu8=; b=wUTih4aQsblQVH7U+/wqASZwkMX8mXxxzMrb09jeVTxQdX3kh627Yqsqg2zVCCWUWBg7D3 gqO7sZo8YfIBDjjhlGXe7IIgPht9Dp9/g/RXa/VatBAVyDgKcKgoGpmD5iPHIEFpF241xy IRn48r4wAJbJ7hSjCKdf+2/56XEOd/uWjpf9BfJP9sSvRiiaTYhSNuGoXzaJAZ1Y45X4/E Q+9i/C6nVS7X2hDGFh4XZKzkAMU6b8ozpTt2mUZ4SGDXEeiEM4JLpAHpU39Gz0hJ3QwVZ/ 7XhL66m8ZljlRJ3kCSNZiOuemq2vdh1LhOv88WUcajcuUlSaOBsKdihNgh7vNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759527879; a=rsa-sha256; cv=none; b=yMqKed1EAsvIGob9YkfIk00+6GW4leTX0uUf1xllKraVJlgmEU7PMnp5U8iZMIzv0TPEx+ I2BO/Vm2K4zG5toDRBIITbeE7997CsYISUx70Hps48w7ims+XE2t8XgWmULFhzE7WaL4Da HcvcPHA6vm1viG9QLEOaMeHUb6Us+azRe+kq2FoL3p0VHIltvdwKTean0skMzapwZ4Om82 Un3zd1XsqvHFOAElBLv6SiLbQVenJztyjjb1J/QspW+Y2xxKhPp++XZ921nsq4JruGiX8j E/cqp8j6E5hx8LoQIvjhUfv99MR+Td9GVAnn/M+9wM0BTH2wm/n9yzCZV+vSOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cdhyb2k4hz8T9; Fri, 03 Oct 2025 21:44:39 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: <27098bd2-04e8-4ef7-8b8e-f7b170eb8151@FreeBSD.org> Date: Fri, 3 Oct 2025 16:44:38 -0500 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 1953a12ee2cd - main - flua: support our flua modules in the bootstrap flua To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202510031810.593IAZE9008541@gitrepo.freebsd.org> Content-Language: en-US From: Kyle Evans In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 10/3/25 16:39, Mark Johnston wrote: > On Fri, Oct 03, 2025 at 06:10:35PM +0000, Kyle Evans wrote: >> The branch main has been updated by kevans: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=1953a12ee2cde1afacb3e3f7612d89695c96e04f >> >> commit 1953a12ee2cde1afacb3e3f7612d89695c96e04f >> Author: Kyle Evans >> AuthorDate: 2025-10-03 18:09:03 +0000 >> Commit: Kyle Evans >> CommitDate: 2025-10-03 18:09:14 +0000 >> >> flua: support our flua modules in the bootstrap flua >> >> This version builds every module into the flua binary itself, since all >> of the bootstrap tools are built -DNO_SHARED. As a result, we also >> cannot dlsym(), so we can't really discover the names of our newly >> builtin modules. Instead, just build out a linker set with all of our >> luaopen_*() functions to register everything up-front. >> >> Building in all of the modules isn't strictly necessary, but it means >> that we have an example of how to add a bootstrap module everywhere you >> go and one doesn't need to consider whether bootstrap flua can use a >> module when writing scripts. On my build machine, the consequence on >> our binary size is an increase from around 1.6M -> 1.9M, which isn't >> really that bad. >> >> .lua modules can install into their usual path below $WORLDTMP/legacy >> and we'll pick them up automagically by way of the ctor that sets up >> LUA_PATH early on. >> >> Reviewed by: bapt, emaste >> Differential Revision: https://reviews.freebsd.org/D51890 > > This breaks cross-building from other OSes since linker.h and kenv.h > aren't available. I guess we can safely exclude those from the > bootstrap build? It could be done conditionally on ${.MAKE.OS} perhaps, > but it's probably better to be consistent. Hi, Hmm, yes- I think excluding libfreebsd and libjail doesn't make it much more difficult to reason about what's available in the bootstrap flua. re: cross-builds, yikes- I forgot that we'll end up bootstrapping flua there. I bet it's also broken without libyaml and libucl here: https://reviews.freebsd.org/D52894? Thanks, Kyle Evans From nobody Fri Oct 3 21:51: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 4cdj6y6dlbz69JDx; Fri, 03 Oct 2025 21:51:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdj6y5y4pz49GM; Fri, 03 Oct 2025 21:51:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759528314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qg/Cdp1ogSNf9qUlAJpWmG5Yr9l0UUQXDWwstErapCo=; b=CKyGNIGUZacHszxbnPP7cL9RYL9hzgrWagAPcZJZP3UmWtqMXJw0kOFn6DxPGQRkJ68u6n brxoTOK+j0DjRaVufXRoMnI7fDCrbaB8yJj+hCjztnmtupFASWq4huvu170vf3PAfKTO0/ kXkrJPtTZGdKTWXSFQSgHHDa4Vf6/cmY+dls2U6fZijALOv/Lqf+ONcHJ4wJ6svohRHisx Y40l2MxxLYcXUSuyHGOMlAvnbGEVU1UJyX0ZGGLpH4tT0BU0zART3VqHSnCKwAP0852CK0 8QE8nIh4dLHT3n1LJBpCoTiONB8wR9VLk6K9jHw7tLt7yT2KrzJ/T4rKRXBijQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759528314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qg/Cdp1ogSNf9qUlAJpWmG5Yr9l0UUQXDWwstErapCo=; b=SKAOIz1v1vyFbyllX1k9np+kx6DQRxD0kX+ecC7jaTJipw1xdyfqQ+W+ffoRpKaVTF28q3 MN5k/BjV57BWCrx900W4HI5fIBn0/02+2g/+XsCcTIJ4Sbq0HJoLtkz21VRx0plSxJqw17 56ow3qKhGEiqzO5GMsahwk7CZYarlX3X2YRdxrATLmbOUU+7xG+R3jqRh0it6lcoGdXljr Z8Uc7OjmFva2wZO7hvyiRy/4MIejiqojQ3hjFld3E164zZYNmYU1BkdGwNw4rMQmL6RY6f 1eQ0VbrR5w84RHM/eeoxaJz134jYRSWaXEZ3ETTQ2O1gUmF3L7A/s3RGYmjtjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759528314; a=rsa-sha256; cv=none; b=Y2Q3gokNkdl5xTK6o5G1X9J3OpYVOHiftElNqCvaBD2kHELmQsMJYR0fIl7gn1Aur74ub/ pK3MHvpuQ1azcOcWOqY5L1T5GpD6Mag8GcNioWN1PHH63w3Pu6mpjrLwnqlrx58+S6s3D4 74jsRwy61xjPb7Nq0L7pfWTi/wuyOSvNukR5Jgfanw4OYjyUBi29FLiYVyQY9n6nLXLchK wLavPsssZ0zkUR3rBIs8h9t55nxvV+PMiW7mC4QSPIsCc7P6eakHhsKAv19Xbliaw6lCsM k9GGjkqjoSYfeaIKYPHVB2xwik2Xd+5YSe0uQhZml6DwNYczSKIr68RkGnEVDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdj6y5Qh3z1C85; Fri, 03 Oct 2025 21:51:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593LpsSS027944; Fri, 3 Oct 2025 21:51:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593LpsLY027941; Fri, 3 Oct 2025 21:51:54 GMT (envelope-from git) Date: Fri, 3 Oct 2025 21:51:54 GMT Message-Id: <202510032151.593LpsLY027941@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 8d0a90512ee3 - main - bsdinstall: Improve pkgbase handling for jails 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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8d0a90512ee35064697fbeffd0886eba4c82eb8d Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=8d0a90512ee35064697fbeffd0886eba4c82eb8d commit 8d0a90512ee35064697fbeffd0886eba4c82eb8d Author: Lexi Winter AuthorDate: 2025-10-03 21:36:30 +0000 Commit: Lexi Winter CommitDate: 2025-10-03 21:51:48 +0000 bsdinstall: Improve pkgbase handling for jails Add a new --jail option to the pkgbase script which installs jail-specific set variants if they exist: * "minimal" is replaced with "minimal-jail" * A kernel is not installed. * For sets shown in the component selection dialogue, only show the appropriate variant (jail or non-jail) for the target. Modify the jail script to pass --jail to the pkgbase script. Remove the redundant --no-kernel option, which was added in 15.0 and was only used to install jails. MFC after: 3000ms Reviewed by: ifreund_freebsdfoundation.org Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52829 --- usr.sbin/bsdinstall/bsdinstall.8 | 8 +-- usr.sbin/bsdinstall/scripts/jail | 2 +- usr.sbin/bsdinstall/scripts/pkgbase.in | 94 +++++++++++++++++++++++----------- 3 files changed, 70 insertions(+), 34 deletions(-) diff --git a/usr.sbin/bsdinstall/bsdinstall.8 b/usr.sbin/bsdinstall/bsdinstall.8 index 5ccbaef87835..527250d380d1 100644 --- a/usr.sbin/bsdinstall/bsdinstall.8 +++ b/usr.sbin/bsdinstall/bsdinstall.8 @@ -244,7 +244,7 @@ Extracts the distributions listed in .Ev DISTRIBUTIONS into .Ev BSDINSTALL_CHROOT . -.It Cm pkgbase Op Fl --no-kernel +.It Cm pkgbase Op Fl --jail Fetch and install base system packages to .Ev BSDINSTALL_CHROOT . Packages are fetched according to repository configuration in @@ -253,8 +253,10 @@ if set, or .Lk pkg.freebsd.org otherwise. If the -.Fl --no-kernel -option is passed, no kernel is installed. +.Fl --jail +option is passed, no kernel is installed, and the +.Dq jail +variant of each package set will be selected where applicable. .It Cm firmware executes .Xr fwget 8 diff --git a/usr.sbin/bsdinstall/scripts/jail b/usr.sbin/bsdinstall/scripts/jail index 0c3c7e125fdd..f2c7ef2b37de 100755 --- a/usr.sbin/bsdinstall/scripts/jail +++ b/usr.sbin/bsdinstall/scripts/jail @@ -183,7 +183,7 @@ if [ ! "$nonInteractive" == "YES" ]; then fi if [ "$PKGBASE" == yes ]; then - bsdinstall pkgbase --no-kernel || error "Installation of base system packages failed" + bsdinstall pkgbase --jail || error "Installation of base system packages failed" else distbase fi diff --git a/usr.sbin/bsdinstall/scripts/pkgbase.in b/usr.sbin/bsdinstall/scripts/pkgbase.in index 14ef67723d59..5299d34fcb71 100755 --- a/usr.sbin/bsdinstall/scripts/pkgbase.in +++ b/usr.sbin/bsdinstall/scripts/pkgbase.in @@ -80,7 +80,9 @@ local function select_components(components, options) ["kernel-dbg"] = "Debug symbols for the kernel", ["devel"] = "C/C++ compilers and related utilities", ["optional"] = "Optional software (excluding compilers)", + ["optional-jail"] = "Optional software (excluding compilers)", ["base"] = "The complete base system (includes devel and optional)", + ["base-jail"] = "The complete base system (includes devel and optional)", ["src"] = "System source tree", ["tests"] = "Test suite", ["lib32"] = "32-bit compatibility libraries", @@ -91,6 +93,7 @@ local function select_components(components, options) -- by default. local defaults = { ["base"] = "on", + ["base-jail"] = "on", ["kernel-dbg"] = "on", } -- Enable compat sets by default. @@ -101,40 +104,66 @@ local function select_components(components, options) -- Sorting the components is necessary to ensure that the ordering is -- consistent in the UI. local sorted_components = {} + + -- Determine which components we want to offer the user. + local show_component = function (component) + -- "pkg" is always installed if present. + if component == "pkg" then return false end + + -- Don't include individual "-dbg" components, because those + -- are handled via the "debug" component, except for kernel-dbg + -- which is always shown for non-jail installations. + if component == "kernel-dbg" then + return (not options.jail) + end + if component:match("%-dbg$") then return false end + + -- Some sets have "-jail" variants which are jail-specific + -- variants of the base set. + + if options.jail and components[component.."-jail"] then + -- If we're installing in a jail, and this component + -- has a jail variant, hide it. + return false + end + + if not options.jail and component:match("%-jail$") then + -- Otherwise if we're not installing in a jail, and + -- this is a jail variant, hide it. + return false + end + + -- "minimal(-jail)" is always installed if present. + if component == "minimal" or component == "minimal-jail" then + return false + end + + -- "kernel" (the generic kernel) and "kernels" (the set) are + -- never offered; we always install the kernel for a non-jail + -- installation. + if component == "kernel" or component == "kernels" then + return false + end + + -- If we didn't find a reason to hide this component, show it. + return true + end + for component, _ in pairs(components) do - -- Decide which sets we want to offer to the user: - -- - -- "minimal" is not offered since it's always included, as is - -- "pkg" if it's present. - -- - -- "-dbg" sets are never offered, because those are handled - -- via the "debug" component. - -- - -- "kernels" is never offered because we only want one kernel, - -- which is handled separately. - -- - -- Sets whose name ends in "-jail" are intended for jails, and - -- are only offered if no_kernel is set. - if component ~= "pkg" and - not component:match("^minimal") and - not (component:match("%-dbg$") and component ~= "kernel-dbg") and - not (component == "kernels") and - not (not options.no_kernel and component:match("%-jail$")) then + if show_component(component) then table.insert(sorted_components, component) end end + table.sort(sorted_components) local checklist_items = {} for _, component in ipairs(sorted_components) do - if component ~= "kernel" and not - (component == "kernel-dbg" and options.no_kernel) then - local description = descriptions[component] or "" - local default = defaults[component] or "off" - table.insert(checklist_items, component) - table.insert(checklist_items, description) - table.insert(checklist_items, default) - end + local description = descriptions[component] or "" + local default = defaults[component] or "off" + table.insert(checklist_items, component) + table.insert(checklist_items, description) + table.insert(checklist_items, default) end local bsddialog_args = { @@ -162,7 +191,12 @@ local function select_components(components, options) -- to work. The base set depends on minimal, but it's fine to install -- both, and this way the user can remove the base set without pkg -- autoremove then trying to remove minimal. - local selected = {"minimal"} + local selected = {} + if options.jail then + table.insert(selected, "minimal-jail") + else + table.insert(selected, "minimal") + end -- If pkg is available, always install it so the user can manage the -- installed system. This is optional, because a repository built @@ -171,7 +205,7 @@ local function select_components(components, options) table.insert(selected, "pkg") end - if not options.no_kernel then + if not options.jail then table.insert(selected, "kernel") end @@ -264,8 +298,8 @@ end local function parse_options() local options = {} for _, a in ipairs(arg) do - if a == "--no-kernel" then - options.no_kernel = true + if a == "--jail" then + options.jail = true else io.stderr:write("Error: unknown option " .. a .. "\n") os.exit(1) From nobody Fri Oct 3 22:45:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdkKW3wyqz69Pxw for ; Fri, 03 Oct 2025 22:46:07 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdkKW1y5zz3HSl for ; Fri, 03 Oct 2025 22:46:07 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qv1-xf34.google.com with SMTP id 6a1803df08f44-7957e2f6ba8so26861896d6.3 for ; Fri, 03 Oct 2025 15:46:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759531561; x=1760136361; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=wCzAAaN9dbPSmd+WKlRvV/Wyw2bVgAsR3Xp6nScUMiM=; b=Nagzqxxi86Ju7RopbIWcIKN9nYNE2xXPFZqNloeasmP0l33zTkl4tkXGt09W72pYEw sSWuojTCTZFpSAlSN3L8+xo86Sr5VSe/449Vm38FNCQfWnSQiuovonNkpfFVRQK7vGZz r0MxOb1WGwukAv4ozyQCpNY+csVX/+MJo+2aQ667pwK2Q7Qj3lLvGODalFN9KRGmHc+q IpeyUt1xSz0cZf1iwjzYwCVHlwNgsPz2QtkuEnEk7WS0KOthIclTxsba96BU0lqRIkIN dToQ+pJxKG+NQ8EoH5pPIdSXKyRyQznyMMMuTSuTS+I6LSMEXzN6+bfPf7eYLb0GqHNv WhVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759531561; x=1760136361; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wCzAAaN9dbPSmd+WKlRvV/Wyw2bVgAsR3Xp6nScUMiM=; b=YRnNSZi01PJ/UrVVm3wk85G21i13FzX6LXCKUGjRDiMDfJHeCoZEz1zJ/xQ+y/6QdO oWVdeJJJTY6uF+fHfBSz/NpKepLkFRo8xNarM7JBxKbiHoFVK1Wsql2SenDsSMkxXH5I vzDiciWocsQ4J97AvxGBq2gNHLhUufc4z0OwymEyIu6hNX0ZjvdGD1vcmAD11A+wwdRo Cun4vGONqt353EVBvlZXHA74FQ2W646MonF25Rp/jvjhj35rTgBslHfBfgiCW01ARTTy 2U5zVqnDK/Yf8uJr0cRuRtlHd1mqiOtKTXy4C2b7NWE/Mr4qFdD9QFslc6qxLgQZMB44 3Kkg== X-Forwarded-Encrypted: i=1; AJvYcCVZzahBxbfRzoa8MWTlqbGUlUjhdVYQMfcHjBnTS7AQMmHLb+WGpu9ZMIAF5Whw0350Z2YMeXHe8ueJdV5KZ48xGr+HpQ==@freebsd.org X-Gm-Message-State: AOJu0YyvtMrKPDQ1M1XvnMxbaSgR2ZLA61CEouRGFFfUuGWJ2rPqwr6V i5TXggCY+HwyyggOlmQiU69WojOIW1BjqimeCNKQo+zQThOwoDOYIG5a X-Gm-Gg: ASbGnct1l0cMED1v74qqOpED1dB9fcpjvyNCSlqfatoclsFeTAJqATWY/xfJzaG9Q5D hlUsFmYOmOYZf+9a4KJdtbSlUtQXu75v89WEiWj4Ye1WuN2Gl+geHC4F/rTRGg+XKNJOwCZi7Dg O0yuEHHDLYNQFIz1Evb/c8HXyHiMhluIK5WEznIsacbBtZKUXLItEAin2ZnVa9Q4/jELnm/mBTj mG1BRaPivKR4P9ML7sov/P6GX6BkpkaQRQQctLCBABpvk4qityrjYy5GBVZRBe/iJGxdwoywDNZ MzDo9GDULfZSU880r0aZ+eiXoDkLNkUL5CmiqVsa5vjgQGyqRnZR6L1WG4UuuF4Sg5hzKXsB/NJ erj97zzXesVHwfQZzM3vt7fXMOAk0lFaclkfUs8Oh14u9PP4yFBl+PrW+GK1v X-Google-Smtp-Source: AGHT+IGhVUI3ac2WluDE0nMWyisuaTZme5RTQvUEaUaZaFIq2r6Hwi7o761ew31WlQqXn/QJMj73TA== X-Received: by 2002:ad4:4ee4:0:b0:797:cef:c862 with SMTP id 6a1803df08f44-879dc7c334dmr57035166d6.29.1759531561256; Fri, 03 Oct 2025 15:46:01 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-878bd783965sm49638966d6.40.2025.10.03.15.46.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Oct 2025 15:46:00 -0700 (PDT) Date: Fri, 3 Oct 2025 18:45:58 -0400 From: Mark Johnston To: Kyle Evans Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1953a12ee2cd - main - flua: support our flua modules in the bootstrap flua Message-ID: References: <202510031810.593IAZE9008541@gitrepo.freebsd.org> <27098bd2-04e8-4ef7-8b8e-f7b170eb8151@FreeBSD.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <27098bd2-04e8-4ef7-8b8e-f7b170eb8151@FreeBSD.org> X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cdkKW1y5zz3HSl On Fri, Oct 03, 2025 at 04:44:38PM -0500, Kyle Evans wrote: > On 10/3/25 16:39, Mark Johnston wrote: > > On Fri, Oct 03, 2025 at 06:10:35PM +0000, Kyle Evans wrote: > > > The branch main has been updated by kevans: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=1953a12ee2cde1afacb3e3f7612d89695c96e04f > > > > > > commit 1953a12ee2cde1afacb3e3f7612d89695c96e04f > > > Author: Kyle Evans > > > AuthorDate: 2025-10-03 18:09:03 +0000 > > > Commit: Kyle Evans > > > CommitDate: 2025-10-03 18:09:14 +0000 > > > > > > flua: support our flua modules in the bootstrap flua > > > This version builds every module into the flua binary itself, since all > > > of the bootstrap tools are built -DNO_SHARED. As a result, we also > > > cannot dlsym(), so we can't really discover the names of our newly > > > builtin modules. Instead, just build out a linker set with all of our > > > luaopen_*() functions to register everything up-front. > > > Building in all of the modules isn't strictly necessary, but it means > > > that we have an example of how to add a bootstrap module everywhere you > > > go and one doesn't need to consider whether bootstrap flua can use a > > > module when writing scripts. On my build machine, the consequence on > > > our binary size is an increase from around 1.6M -> 1.9M, which isn't > > > really that bad. > > > .lua modules can install into their usual path below $WORLDTMP/legacy > > > and we'll pick them up automagically by way of the ctor that sets up > > > LUA_PATH early on. > > > Reviewed by: bapt, emaste > > > Differential Revision: https://reviews.freebsd.org/D51890 > > > > This breaks cross-building from other OSes since linker.h and kenv.h > > aren't available. I guess we can safely exclude those from the > > bootstrap build? It could be done conditionally on ${.MAKE.OS} perhaps, > > but it's probably better to be consistent. > > Hi, > > Hmm, yes- I think excluding libfreebsd and libjail doesn't make it much more > difficult to reason about what's available in the bootstrap flua. > > re: cross-builds, yikes- I forgot that we'll end up bootstrapping flua there. I > bet it's also broken without libyaml and libucl here: https://reviews.freebsd.org/D52894? I don't see any bootstrap build failures in an Ubuntu chroot after I disable building libfreebsd. Let me know if you'd like me to submit a patch for that. From nobody Fri Oct 3 22:57: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 4cdkZF45w8z69QvZ; Fri, 03 Oct 2025 22:57:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdkZF3Q9Sz3JS4; Fri, 03 Oct 2025 22:57:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759532229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xh2UqVfDdoExz8i6TI8fi3ttVdrvCUA0oVhPUup9xj8=; b=IcDbtCvKWFBgzo0z6gcTsC7CdapK648zv0o8DHK8WWdkcQHT0/kHvdW+uNtN93WecU/DCR OIK8eFkom14/9YI1LYEGlpAdXigc6p1MxDSrZSrGtsvIc8PH50idp+AqSS3vymWD9e5FN1 i6K+4IRONJ/LNLU2J+i6UaoQmeQAw2Ff44KhyNjOavCPmT2YmWNCcI3AV9aDudIaqO/RXx ajp4R899kCs8o6qGtd6wL1F+4Oxc5VXIVqLDgpQSk4E25mHxnwxc8gFVbHYQNnzOtu5fKd TItiyTj+YIIFIcTYeHBIvcjG45vCKc14CixosywUM7cvPhWzxC1Xh/i6UWt5pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759532229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xh2UqVfDdoExz8i6TI8fi3ttVdrvCUA0oVhPUup9xj8=; b=Ngj5BpiAIUFQN23tvYwl17gy6jERbWsPnEizApi31KXwafF+5Vhn3RJfF3TCA9i7cd4Sfz c7hObtFZeFdlmUttxTWFr68T3U5b7OJLFPwVXu59C4u9EEhi/L0CitdFCn2Io9NzE24cJq 9eJRKj2uyQiMr8bzO0RUZONm0ugOGVyFrEktYquZ7HrKMkTqFbY1doLMITjvyFnOsXs7Js RsUV3YgEx11tqBynJEf/fYbJsq7VEWoHKSfA+emqe45vePw8Im00ZCi+4lzdq4Eta4Hz2p hPxHJqWyORFpIS1Q+l3qBhBwhy102XcxZ6rTMNCFPTm6Nv8jkTuF4rOuyV2kug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759532229; a=rsa-sha256; cv=none; b=XJVZE5zXJVmbKznlKEdX0zYs5//N9ZOiVc1VGew9FUiK2nTQDaweHflC1ESL6Z/9Tngaad rTcmCwdNTu8WU3TTLOhXx8sdPbxcNPgoVdklCLpIbxyoS9KCrbYG6GB4MJULW+ZTYQDFAA rzuA639EbhHNgmvVv0To6czkfUaKr4Ij4Fab9R1S6W+ZoPB3+7EuHJu8FcgW52quK2gmoq exrPFjoIrE+yyvPC8AxYnCUwx5B19JxpFtL6eG5odXniB6nJJYQq6M/9RI8ohKYNyWgD23 O84+pWDACeyd15ITmypfxaMbsIeNuazUyv22blvOw0FCuXK0Huzl9G+rq8bo7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdkZF2wnMzFt; Fri, 03 Oct 2025 22:57:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 593Mv9kc042282; Fri, 3 Oct 2025 22:57:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 593Mv9OJ042279; Fri, 3 Oct 2025 22:57:09 GMT (envelope-from git) Date: Fri, 3 Oct 2025 22:57:09 GMT Message-Id: <202510032257.593Mv9OJ042279@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: daf4da4d0971 - main - acpidump: quiet GCC -Wmaybe-uninitialized 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: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: daf4da4d09718980d96fa41a8f420cc0e0bf1bd8 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=daf4da4d09718980d96fa41a8f420cc0e0bf1bd8 commit daf4da4d09718980d96fa41a8f420cc0e0bf1bd8 Author: Ryan Libby AuthorDate: 2025-10-03 22:48:28 +0000 Commit: Ryan Libby CommitDate: 2025-10-03 22:48:28 +0000 acpidump: quiet GCC -Wmaybe-uninitialized Reviewed by: kib --- usr.sbin/acpi/acpidump/acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/acpi/acpidump/acpi.c b/usr.sbin/acpi/acpidump/acpi.c index a8a3c953d72d..63613d5a4707 100644 --- a/usr.sbin/acpi/acpidump/acpi.c +++ b/usr.sbin/acpi/acpidump/acpi.c @@ -1764,7 +1764,7 @@ acpi_handle_ivrs_ivhd_devs(ACPI_IVRS_DE_HEADER *d, char *de) d8b = (ACPI_IVRS_DEVICE8B *)db; len = sizeof(*d8b); printf("\t\tDev Type=%#x Id=%#06x", - d8a->Header.Type, d8a->Header.Id); + d8b->Header.Type, d8b->Header.Id); acpi_handle_ivrs_ivhd_dte(d8b->Header.DataSetting); printf("\t\t"); acpi_handle_ivrs_ivhd_edte(d8b->ExtendedData); @@ -1774,7 +1774,7 @@ acpi_handle_ivrs_ivhd_devs(ACPI_IVRS_DE_HEADER *d, char *de) d4 = (ACPI_IVRS_DEVICE4 *)(db + sizeof(*d8b)); len = sizeof(*d8b) + sizeof(*d4); printf("\t\tDev Type=%#x Id=%#06x-%#06x", - d8a->Header.Type, d8a->Header.Id, d4->Header.Id); + d8b->Header.Type, d8b->Header.Id, d4->Header.Id); acpi_handle_ivrs_ivhd_dte(d8b->Header.DataSetting); acpi_handle_ivrs_ivhd_edte(d8b->ExtendedData); } else if (d->Type == ACPI_IVRS_TYPE_SPECIAL) { From nobody Sat Oct 4 00:36:27 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdmmq2nqlz69cXf; Sat, 04 Oct 2025 00:36:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdmmq25Rhz3T6J; Sat, 04 Oct 2025 00:36:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759538187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6p2peJCLBsz5h2vw8zgSfd7c1A/bch+OAwltaKdSU90=; b=Uq0t3RKKq5GiICHdRGft/9YFlgLxMFVjkofQX4RtNcXSYn6jPiGc7WeIcsgp+AmNpY9TK0 U1uUK0A94oE+sbep44YZpPG7ZQRmANcYwYCa6ko3WN1CFiZ8D8NqJFVO0P+pOiRJigQiGu aWAkn2cAC+USmYwe3mi7xoVpq3L9itM6tyACvHIGWw7GNE0jhkb0vzAvSZpxxEQ02k+M1j qWy8UDBbhZ+WHo6Sp92u2qPhjMwdG0Sch3fNOyeiVghlRGhmjc7wQRg7Cj6RecqVcc47vF aSpdEbMOHRt3w3KHd21TTcaF+mJrxcuOQR776gBS1Zt/idRPjXwkZkeM7tt7yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759538187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6p2peJCLBsz5h2vw8zgSfd7c1A/bch+OAwltaKdSU90=; b=KIisSt5jFoCCsBHey1S5WRV02nbtU0wY6tpULspJbvsuVz9K4yc6wR0pjpxIaOpGH2HrDF pcsFl6ND0opH2sfBosBQlTnVeWeVGnVCAdQn1lIkwXR0f1vePRrMCja9IOgd562xvqAsa5 3ZRqjQZJ12oV1Hxy4G+Lp7AZs66heq8Bo674oPwukIlIPiMDUuT5vtO2tsaPVd2v2rmmZi vqyGU7R4G+AvzGrKoPuPmT2+Q5g/RHdXnC2HCbAEnDnLdcHJT/dStkrhHKvQDqfinX6RKc yNDNNVytwdhZ57eyRlGssdR6gaRi/OUXg3AQ6HtmgwdIHKpKDvFEBs/HnvvSuw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759538187; a=rsa-sha256; cv=none; b=gbdzF5AM2RCO2K8gav7JGHfgPZHIFWQXieXdBPL+LWqYfqhb05IuiR5loBuflGI88TzXiP XGo93S7hNaDPA9vfywsVJygrjhFuKDMhT8pkCjbpEw7LhOHIFyLEiKIsV6HaBOLPT9TXIE wK3IGuvSyBRBNCz7E2OAXtUINSbFGFbeoL8jqXQ/5jg1jc8Q9m6nYANolFIFhNRRyz2lqB NvrzJTMkNtPIUFPnx4eiRdGIwt642EharIf9pzUjxhNKOzqKVYeC0FZ3oxgd/Os5fAJFKT Ewc9A9M1TCip9S+mFqq2Ws8FtYF0e5p1k33V+l7mD4mSXS1AltVS3J54Qw3OCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdmmq1b4tz2s5; Sat, 04 Oct 2025 00:36:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5940aR0b030097; Sat, 4 Oct 2025 00:36:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5940aRqR030094; Sat, 4 Oct 2025 00:36:27 GMT (envelope-from git) Date: Sat, 4 Oct 2025 00:36:27 GMT Message-Id: <202510040036.5940aRqR030094@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 4b8b4c7dbf0f - main - release: Check for empty NODISTSETS 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4b8b4c7dbf0fd4f946195dd7e8e4ddf10505beea Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=4b8b4c7dbf0fd4f946195dd7e8e4ddf10505beea commit 4b8b4c7dbf0fd4f946195dd7e8e4ddf10505beea Author: Colin Percival AuthorDate: 2025-10-03 23:55:44 +0000 Commit: Colin Percival CommitDate: 2025-10-03 23:55:44 +0000 release: Check for empty NODISTSETS Treat an empty NODISTSETS the same as if it is not defined; this avoids problems if a script calls 'make release NODISTSETS=${NODISTSETS}'. MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva --- release/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/release/Makefile b/release/Makefile index 76a99ffdf3f3..8616d3817dd9 100644 --- a/release/Makefile +++ b/release/Makefile @@ -196,7 +196,7 @@ packagesystem: ${DISTRIBUTIONS} sh ${.CURDIR}/scripts/make-manifest.sh $$(ls *.txz | grep -v container) > MANIFEST touch ${.TARGET} -.if !defined(NODISTSETS) +.if !defined(NODISTSETS) || empty(NODISTSETS) disc1: packagesystem bootonly: packagesystem dvd: packagesystem @@ -242,7 +242,7 @@ disc1: mtree -C -k type,mode,link,size | \ sed 's|^\.|./usr/freebsd-packages|g' >> ${.TARGET}/METALOG .endif -.if !defined(NODISTSETS) +.if !defined(NODISTSETS) || empty(NODISTSETS) # Copy MANIFEST to provide legacy dist checksums in both modes mkdir -p ${.TARGET}/usr/freebsd-dist echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG @@ -295,7 +295,7 @@ bootonly: MK_TOOLCHAIN=no \ MK_RESCUE=no MK_DICT=no \ MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no) -.if !defined(NODISTSETS) +.if !defined(NODISTSETS) || empty(NODISTSETS) # Copy manifest only (no distfiles) to get checksums mkdir -p ${.TARGET}/usr/freebsd-dist cp MANIFEST ${.TARGET}/usr/freebsd-dist @@ -347,7 +347,7 @@ dvd: mtree -C -k type,mode,link,size | \ sed 's|^\.|./usr/freebsd-packages|g' >> ${.TARGET}/METALOG .endif -.if !defined(NODISTSETS) +.if !defined(NODISTSETS) || empty(NODISTSETS) # Copy MANIFEST to provide legacy dist checksums in both modes mkdir -p ${.TARGET}/usr/freebsd-dist echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG From nobody Sat Oct 4 00:36:28 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 4cdmmr3kgTz69ccv; Sat, 04 Oct 2025 00:36:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdmmr2WHGz3TWc; Sat, 04 Oct 2025 00:36:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759538188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zqirfAnz4cnAuOY8I3zLCmnYZRVh5d+zWVSMSqtO5Ow=; b=tM/TA+wcMvyB1jMPxzA7lPjwuFgI7G/QEF88Sv9czgn9lggiSPLDFzUlN6mrKtXjLwA29D ePsD258PlyT/jc/nAGcmMg3EgYRvXDBX6XwstimSIKNSR5bL5qYt5Wl7XwRElhbJBoGY/F tvx9qRiofrVlhUWK6Fl3/4kFU075UBt6+YCDrW3x9eTM9XLqm62kGj1iN5eZx00/FmwouG ZpqD5oa8eQuhBD7stmwEsUNJw1uKH59vcQREH/5VAq8c65MnxfoQMQbBN+9NoZvhYbqgyi M2c1ae0iZ8DY26i6w28J5n1SrHSz2TwYN05W8AWtd5LaId3rTru+Qhzo2lZRzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759538188; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zqirfAnz4cnAuOY8I3zLCmnYZRVh5d+zWVSMSqtO5Ow=; b=Z4PIMRdL/SB/w6a7xDI+e9iSM5sDNiXHVSIojo5H5B3p4eBjduCE8YpUzwZvYBQxBNHX1E ncaYv+fCI6rGvdQR691ftqpDyGjs+1kDgoSoMrDrfHc543FiL21kfL79YFTrrQxNuOTAd8 vko94RjIs7M1mbBvi0P0T+z5TNBvtsohAw0UvSaoc/r2c8Fb/WIVFuM4SqTmBfkxqR4LNa rpPDa8LhQJyAi8RLUgv3QjF1zKPybcoYib3L7Ta8dGV0oRwCSGNE1Z+uoGRMwfoBKZfW+v FrfDb+RCFZEwmcAlO0FtP5zE9aXhQqWuPXT9oywlFvGsxuW7e1fZ7Mv3ESsrdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759538188; a=rsa-sha256; cv=none; b=Z/OoTFtVKI0f2x7qJIURi6j+Rhm49zID8+If7k3ytphhWI83M4aJdb8AcXQ3w7loKu6Q6H z9HQmmpPwGCT33E+aaYzHE2ZGlTEPVS8Y3GNXt+X5lb0fK5T3ZIrjuBwbrX1YRFO/ODCh9 Knyfu1JD5VhAA9MoSZIBd6dmp6DJpuPfwxq5pl8DkmYdrf5T9OHO2opTQD+oGvUuNWQ5/+ Guwf3dOJwEfnmWnZ66iQ+kw3ekVHzla6v4gnO5M5rdEPJF3qQr2jjzlpfBp4xb7uIvWx2D PcdS1Wkwb1QaTMj3/cZUlQo4e5h89RXcwygOSJPvezbEB9CwMm0Q6N5VnX/1/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdmmr261Jz2qJ; Sat, 04 Oct 2025 00:36:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5940aSLH030132; Sat, 4 Oct 2025 00:36:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5940aSYK030129; Sat, 4 Oct 2025 00:36:28 GMT (envelope-from git) Date: Sat, 4 Oct 2025 00:36:28 GMT Message-Id: <202510040036.5940aSYK030129@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: e64eb9ea0f4c - main - release: Respect NODISTSETS 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e64eb9ea0f4c88a9fa32ae3ae517cbe15a193a08 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=e64eb9ea0f4c88a9fa32ae3ae517cbe15a193a08 commit e64eb9ea0f4c88a9fa32ae3ae517cbe15a193a08 Author: Colin Percival AuthorDate: 2025-10-03 23:56:53 +0000 Commit: Colin Percival CommitDate: 2025-10-03 23:56:53 +0000 release: Respect NODISTSETS In addition to not putting distribution sets onto ISO images, if NODISTSETS is set then we should not build the distribution sets or put them onto the "FTP" site (aka download.freebsd.org). MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva --- release/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/release/Makefile b/release/Makefile index 8616d3817dd9..dcff6855db50 100644 --- a/release/Makefile +++ b/release/Makefile @@ -116,7 +116,10 @@ DISTRIBUTIONS+= ports.txz DISTRIBUTIONS+= src.txz .endif -RELEASE_TARGETS= ftp +RELEASE_TARGETS= +.if !defined(NODISTSETS) || empty(NODISTSETS) +RELEASE_TARGETS+= ftp +.endif IMAGES= .if exists(${.CURDIR}/${TARGET}/mkisoimages.sh) RELEASE_TARGETS+= cdrom @@ -449,7 +452,9 @@ release-install: .if defined(DESTDIR) && !empty(DESTDIR) mkdir -p ${DESTDIR} .endif +.if !defined(NODISTSETS) || empty(NODISTSETS) cp -a ftp ${DESTDIR}/ +.endif .if !empty(IMAGES) .for I in ${IMAGES} cp -p ${I} ${DESTDIR}/${OSRELEASE}-${I} From nobody Sat Oct 4 00:36:29 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdmms48PNz69cTn; Sat, 04 Oct 2025 00:36:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdmms2xffz3TLb; Sat, 04 Oct 2025 00:36:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759538189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vPZXbaLCLycdtnx1G0HcebxGk+i5RTQQjNGHJLiniV0=; b=RQRBa1+ZjpXIkSB4qFoJ5DipDQwgDGFJQVEljS+edjw4B1+W24vjX4y/IHW30PUdNtRENr u6OInvkdT5KK0j5UcIe1qTgILxZOkjgksuiWCOlPuvU7+nh9e3fgItekbwgTL72yHZwTEp WlkaHA/DcC/Gnfr8Q2In+yoWZbJcPZlkWJLP/EPbxOKEUZkINnZi/5UnMaAP4CnrkVpddT s5dwFnKzjehrzp//6ApSotFUwSaZ3LBBgWH8LMIBcWHj8hwVO8W/yYUq8ZsrOLqm39MNLX /aTloUoKQMEaoPCKOHb6a2WsvW3dQExl3bA3wFrBoFS3Zfl1HVvMcWm/KxPbfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759538189; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vPZXbaLCLycdtnx1G0HcebxGk+i5RTQQjNGHJLiniV0=; b=sJZ6oUf37h7iWKd9XgavoXny2qi5fQzE6X9uB46qaf0eIzTDd/iOQeC74KjDAyFNPDUMTE f1Ux1yFG29/bdfMaichfZsXXQ811BLhEmlPsrnmx5dE2Qbtqb9pfc7IjxAWyOTYp8yjBE9 5b8avXKEKng2NDnF+V4tAVGbmreH5yFQTIYBU+hGxiOt65gWe/H4gQhSHo5AYqLNC1N7Oz zv1K70eXtsQfOBiMlrOFe0xoEvi1h3qtkZtOmstBELGmmnVqhoa80QeAMs+YjRp/eX0XuJ nofRuSaYLEm526eKXM9qrb98mJtcdfFeYj3uhU+EXC9hgpQEW6jYnLPyLmpZCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759538189; a=rsa-sha256; cv=none; b=fcMMY14WzXmtQtQYfemIjpL+Gs2ObLlHRNqpKAi9O8/xqsAoxuFisVU0Lz8dnswkiFSZ8L SGv2XGChAJaoHILgJctvxu/M0dDrQUSXvJdvXnXWySxG4nPrHkmzzgSZr0Hw1fXx5kqeav RR60oRyutPro5I65lKJAVzSS+Ns8pRYhVFIT8gU9iGeVvpxaaLC0cXMXAX+vtA8CNC+P5K cxGX92Vee4+MOKAsWP3YwdMpGzAxxNmrjxPOyz7s8lYguLH7grRlJz+MKvIRpGRvtmgZBm lQxwy6xVwElErewO2LNli7AZHgKjAfy9DMqInZh3XIfGwMQkbDo4SlB5Pern5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdmms2NCZz3JH; Sat, 04 Oct 2025 00:36:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5940aTS0030170; Sat, 4 Oct 2025 00:36:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5940aTQp030167; Sat, 4 Oct 2025 00:36:29 GMT (envelope-from git) Date: Sat, 4 Oct 2025 00:36:29 GMT Message-Id: <202510040036.5940aTQp030167@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: d0ff67db2908 - main - release: Publish pkgbase-repo.tar 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d0ff67db2908a56b2f146963bb79f1a8e6283131 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=d0ff67db2908a56b2f146963bb79f1a8e6283131 commit d0ff67db2908a56b2f146963bb79f1a8e6283131 Author: Colin Percival AuthorDate: 2025-10-03 23:57:33 +0000 Commit: Colin Percival CommitDate: 2025-10-04 00:26:32 +0000 release: Publish pkgbase-repo.tar This is a tarball containing the pkgbase repository for the release. Note: This is an uncompressed tarball, because all of its constituent .pkg files are already compressed; there's no point adding another layer of compression. Reviewed by: ivy MFC after: 1 minute Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D52899 --- release/Makefile | 14 +++++++++++++- release/Makefile.mirrors | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) diff --git a/release/Makefile b/release/Makefile index dcff6855db50..12f5114f8b22 100644 --- a/release/Makefile +++ b/release/Makefile @@ -135,6 +135,9 @@ RELEASE_TARGETS+= mini-memstick.img IMAGES+= memstick.img IMAGES+= mini-memstick.img .endif +.if !defined(NOPKGBASE) || empty(NOPKGBASE) +RELEASE_TARGETS+= pkgbase-repo.tar +.endif CLEANFILES= packagesystem *.txz MANIFEST release ${IMAGES} .if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) @@ -145,7 +148,7 @@ CLEANFILES+= ${I}.xz .if defined(WITH_DVD) && !empty(WITH_DVD) CLEANFILES+= pkg-stage .endif -CLEANDIRS= dist pkgdb-dvd pkgdb-disc1 pkgbase-repo pkgbase-repo-dir ftp disc1 disc1-disc1 disc1-memstick bootonly bootonly-bootonly bootonly-memstick dvd +CLEANDIRS= dist pkgdb-dvd pkgdb-disc1 pkgbase-repo pkgbase-repo-dir ftp disc1 disc1-disc1 disc1-memstick bootonly bootonly-bootonly bootonly-memstick dvd pkgbase-repo.tar beforeclean: chflags -R noschg . .include @@ -216,6 +219,9 @@ pkgbase-repo: ( ${IMAKE} -C ${WORLDDIR} packages REPODIR=${.OBJDIR}/pkgbase-repo \ INCLUDE_PKG_IN_PKGBASE_REPO=YES BOOTSTRAP_PKG_FROM_PORTS=YES ) +pkgbase-repo.tar: pkgbase-repo + tar -cf pkgbase-repo.tar -C pkgbase-repo . + pkgbase-repo-dir: pkgbase-repo mkdir -p pkgbase-repo-dir printf "FreeBSD-base: { url: "file://%s", enabled: yes }" \ @@ -465,6 +471,12 @@ release-install: ( cd ${DESTDIR} && sha512 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA512 ) ( cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256 ) .endif +.if !defined (NOPKGBASE) || empty(NOPKGBASE) + mkdir -p ${DESTDIR}/pkgbase + cp -p pkgbase-repo.tar ${DESTDIR}/pkgbase/ + ( cd ${DESTDIR}/pkgbase && sha256 pkgbase-repo.tar > CHECKSUM.SHA256 ) + ( cd ${DESTDIR}/pkgbase && sha512 pkgbase-repo.tar > CHECKSUM.SHA512 ) +.endif .include "${.CURDIR}/Makefile.inc1" .include "${.CURDIR}/Makefile.vm" diff --git a/release/Makefile.mirrors b/release/Makefile.mirrors index 5e65bfbe8b3f..958ac7717616 100644 --- a/release/Makefile.mirrors +++ b/release/Makefile.mirrors @@ -63,6 +63,11 @@ STAGE_TARGETS+= oci-images-stage OCI_DIR= ${TLD}/OCI-IMAGES/${REVISION}-${BRANCH}/${TARGET_ARCH} .endif +.if !defined(NOPKGBASE) || empty(NOPKGBASE) +STAGE_TARGETS+= pkgbase-repo-stage +PKGBASE_DIR= ${TLD}/PKGBASE-REPOS/${REVISION}-${BRANCH}/${TARGET_ARCH} +.endif + CLEANFILES+= ${STAGE_TARGETS} CHECKSUM_FILES?= SHA512 SHA256 SNAP_SUFFIX!= echo ${_SNAP_SUFFIX:S,^-,,1} | tr -d ' ' @@ -366,5 +371,44 @@ oci-images-stage: . endfor .endif +pkgbase-repo-stage: + mkdir -p ${PKGBASE_DIR} +.if defined(SNAPSHOT) && !empty(SNAPSHOT) +. if exists(${PKGBASE_DIR}/Latest) + rm -rf ${PKGBASE_DIR}/Latest +. endif + mkdir -p ${PKGBASE_DIR}/Latest + mkdir -p ${PKGBASE_DIR}/${BUILDDATE} + cd ${RELEASEDIR}/pkgbase && \ + mv pkgbase-repo.tar pkgbase-repo-${SNAP_SUFFIX}.tar + cp -p ${RELEASEDIR}/pkgbase/pkgbase-repo-${SNAP_SUFFIX}.tar \ + ${PKGBASE_DIR}/${BUILDDATE}/pkgbase-repo-${SNAP_SUFFIX}.tar + cd ${PKGBASE_DIR}/Latest && \ + ln -s ../${BUILDDATE}/pkgbase-repo-${SNAP_SUFFIX}.tar \ + pkgbase-repo.tar + cd ${RELEASEDIR}/pkgbase && rm -f CHECKSUM.* +. for CHECKSUM in ${CHECKSUM_FILES} + cd ${RELEASEDIR}/pkgbase && \ + ${CHECKSUM:tl} pkgbase-repo-*.tar > CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} + cp -p ${RELEASEDIR}/pkgbase/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ + ${PKGBASE_DIR}/${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} + cd ${PKGBASE_DIR}/Latest && \ + ln -s ../${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \ + CHECKSUM.${CHECKSUM} +. endfor +.else # not snapshot +. if exists(${PKGBASE_DIR}/Latest) + rm -rf ${PKGBASE_DIR}/Latest +. endif + mkdir -p ${PKGBASE_DIR}/Latest + cp -p ${RELEASEDIR}/pkgbase/pkgbase-repo.tar \ + ${PKGBASE_DIR}/Latest/pkgbase-repo.tar +. endfor +. for CHECKSUM in ${CHECKSUM_FILES} + cp -p ${RELEASEDIR}/pkgbase/CHECKSUM.${CHECKSUM} \ + ${PKGBASE_DIR}/Latest/CHECKSUM.${CHECKSUM} +. endfor +.endif + ftp-stage: remove-old-bits ${STAGE_TARGETS} From nobody Sat Oct 4 00:53: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 4cdn8c6JbSz69ds4; Sat, 04 Oct 2025 00:53:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdn8c5gzmz3WnW; Sat, 04 Oct 2025 00:53:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759539216; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uI5nMX2Z30Rkl2rZq/D7M10X+5E01PVRa037Lggc+TY=; b=OtatRiD+9r2l8hNMQMMd73oyZ5XIqhVg3laLlGgNh3CU+/haujZ+0AtsXlzHt+O8Bxlgfh uaeGHvLus07ZxxkTgDjicFnfpyq9QannwrbEU6jnpzMM4RzBbDzk2UJCWO3YPR5DeSm6K8 nEXsQKwurb5xAutNPgH2wTZJBx4T0z5+19ZYbYpXFgnQbsWRzEN23ysITVbRaKw2lDJaxB MF9bQm88PIthTbKVUzxixtSpUi0+dz9yyW1KCNC6+lmteqgynRFLPxVBq9479NrS2VJwi0 ZhJYp9AIyBRqcHByLTXHQF+9ZKkFOgHCjNVQNldQ21C1ibxj+snfI25RTnYGkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759539216; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uI5nMX2Z30Rkl2rZq/D7M10X+5E01PVRa037Lggc+TY=; b=V77fSap42gUha5KtZl6nTHhVDWJquPrjPj5XoSBaHkvrTYm/Pdpg/ahvPgO9LpOdcPBqWL 5iAgWTlvAls7JZUI8fCUVrA1Qv9r8yiNiAHQcEqRFa14oFrVQxI/iJbT4xbaTFUES2nzlm eSquyGkf9Fy3HglZ1sJELt+h1Jg0wHNCycVebyctCnHa6qb2R+jniHZZigeS/fjyTTG1L1 nnraytxYAcWrrupyvnu9AqhkjvtPet6kXhtxaTYFe5NYGql5QIk5Z850wm2TCeBJ0Is5hW t69qhleC8oHuakMocu9RBD0d1PV6O5AriII3dH7ywj+IPNoSUyRsnHqhgG2hSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759539216; a=rsa-sha256; cv=none; b=k0V1pGF6Myf6ZF04skJOsvIs1Tm1KvTzfWNZ+GxLJpSNUx5Xc6xkDRaxC0a0qn+7mtj39f r2buYClJm7qpkd/1QcJgYu8FaHj8B/LDDodB0UitVdX5g6cLajayO+fi9QLKcF5p8PoMql cvysWuQFM3PYb/DLsKts2m3dCpC5WQEUST4tt4vCFmmAJBx1a+PP/EOPITEpMSjf+v7cgf 7nkHaTHp6tOQIu29cMRV3HtPCvtiVY0dGGtFn3/7cIC57TEskkOb7N8Ad4cfR1CdfzDfr8 qx6d6XNcJUDg9PaZNIa9U91AWW9o+GFZPI+6ituaD3pzUTFtTdKEcCS0uGY6pA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdn8c590Sz3ML; Sat, 04 Oct 2025 00:53:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5940rapJ066699; Sat, 4 Oct 2025 00:53:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5940raO4066697; Sat, 4 Oct 2025 00:53:36 GMT (envelope-from git) Date: Sat, 4 Oct 2025 00:53:36 GMT Message-Id: <202510040053.5940raO4066697@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 981cf36d64c4 - main - Revert "flua: don't build libjail into the bootstrap flua" 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 981cf36d64c48ebfa22d44ac83b6d448c2974f23 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=981cf36d64c48ebfa22d44ac83b6d448c2974f23 commit 981cf36d64c48ebfa22d44ac83b6d448c2974f23 Author: Kyle Evans AuthorDate: 2025-10-04 00:52:04 +0000 Commit: Kyle Evans CommitDate: 2025-10-04 00:53:27 +0000 Revert "flua: don't build libjail into the bootstrap flua" This reverts commit 31320402472394af57eb3a36bee7f944117ca0ed, because bootstrap flua is about to get backed out. --- libexec/flua/Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libexec/flua/Makefile b/libexec/flua/Makefile index 0d1841f8c3bd..b43b31298205 100644 --- a/libexec/flua/Makefile +++ b/libexec/flua/Makefile @@ -9,11 +9,7 @@ FLUA_MODULES+= lfbsd FLUA_MODULES+= lfs FLUA_MODULES+= libhash -.ifndef BOOTSTRAPPING -# Bootstrap flua can't usefully do anything with libjail anyways, because it -# can't assume it's being run on a system that even supports jails. FLUA_MODULES+= libjail -.endif FLUA_MODULES+= libucl FLUA_MODULES+= liblyaml FLUA_MODULES+= lposix From nobody Sat Oct 4 00:53:37 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdn8f0D0xz69ds5; Sat, 04 Oct 2025 00:53:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdn8d6nvKz3Wkt; Sat, 04 Oct 2025 00:53:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759539218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mQ+SdvgYe/9zovepxhl2CO23WnnczqKz+1txQcGQpXU=; b=q3mxS7R02yDA3OgO29gZRqU3EJesvVTXPDyd0mgunyyXEGbzhUohcmjo1Ox/LwnCNWpghO KJ8XQZNrhOne8Xv3ZBqFQ/BGK1eoWyvdTumHQJZAZt/9lhOnbtygy3NthOrbHkTnCHPdom kgH45WtH1y82JI1ZcQqp7jJOkCoixPQygvYFkzm6ZTheyzLISUB+Su/9GTijPtnX60aTPD 2dw1Oy1bp10ViMboQLDb1vbEegUK5BjPuOBu9mxkuda6+NgiZWcsGx1FRamld4hQJd+wR/ /S8Xzti8ZH1KFNX/27WGwtAEOsEuvPyP7mAv4QeN/zu6iW9ynD3TuUlMcDyAOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759539218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mQ+SdvgYe/9zovepxhl2CO23WnnczqKz+1txQcGQpXU=; b=NUwhbuefOdw2sZn3lXY0R8XyomrmQ8YWzeL/71oIGNVl8ubqtCDjDAqFRhklZyq0AyQoPK FLyjg+65OuacI+EhQwnWh419k+S1UHjameVbwxXBLDqfmyAzDo0dk52yv5bolaIwZcw3ZO OyhdCphDMYWJyhMMrq8YdXsDZxh+6HVWbfgV7uKa2WtCEfaIGwrBodCFNeQQRyiv6Jq+rP Vh34y/ZUUeX5gT2GolnWbRh9tO4LuWsNZHrJXhMKRjLE8bZG/WbQF4ZiKPSNopEond2yO8 Ru6oyomANoe1Xnz9I+sAmYl9B/ns/72lxmzy0TWBZRPruaCdNOvDhl5SpJpMdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759539218; a=rsa-sha256; cv=none; b=reVXo4slME9Zgamr0vhQwXDOi2s+5N9OGLXpgqYLiQmM8IToKeSKkBBcQKuMmJQomWtT7S T/P3Ia5UHcc65rflZl+2Ac8yz64A1Q/ll7NGKkEM+reoirca3ig/65up0gSLyIaeY7DliS xzhDVoMzSBX2he9Jnd77osdtzpK7YiuYJ/2lvZgr2VLpUym6rLxWtfLkjiB01oABXTPVCw 8eW1vGxaP0mIfDeHwFNew1p1ERnGiznHNdVBOdKa2GaCMCufoqkB89qzghrXuJX5hJ84qx MjZjHr70umhCOcuZmjF8ZpsWQ4T7+dft+Z288sHtp5jEYtaX1wzvw3kAYT2Pgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdn8d67Cmz3qP; Sat, 04 Oct 2025 00:53:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5940rbKb066733; Sat, 4 Oct 2025 00:53:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5940rbos066730; Sat, 4 Oct 2025 00:53:37 GMT (envelope-from git) Date: Sat, 4 Oct 2025 00:53:37 GMT Message-Id: <202510040053.5940rbos066730@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: d4c973fa1485 - main - Revert "flua: kick out the remaining builtin modules" 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d4c973fa148544a0b949ceb1efb6c68096f02baf Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=d4c973fa148544a0b949ceb1efb6c68096f02baf commit d4c973fa148544a0b949ceb1efb6c68096f02baf Author: Kyle Evans AuthorDate: 2025-10-04 00:52:28 +0000 Commit: Kyle Evans CommitDate: 2025-10-04 00:53:28 +0000 Revert "flua: kick out the remaining builtin modules" This reverts commit 80ada959004c4386880e47b11618f8abfc2d80e1, because bootstrap flua is about to get backed out. --- libexec/flua/Makefile | 4 +--- libexec/flua/lfbsd/Makefile | 5 ----- libexec/flua/lfbsd/Makefile.inc | 2 -- libexec/flua/lfs/Makefile | 5 ----- libexec/flua/lfs/Makefile.inc | 2 -- libexec/flua/libhash/lhash.c | 2 -- libexec/flua/linit_flua.c | 7 +++++++ libexec/flua/lposix/Makefile | 5 ----- libexec/flua/lposix/Makefile.inc | 2 -- libexec/flua/{lfbsd => modules}/lfbsd.c | 4 ---- libexec/flua/{lfbsd => modules}/lfbsd.h | 0 libexec/flua/{lfs => modules}/lfs.c | 7 +------ libexec/flua/{lfs => modules}/lfs.h | 0 libexec/flua/{lposix => modules}/lposix.c | 5 ----- libexec/flua/{lposix => modules}/lposix.h | 0 stand/liblua/Makefile | 2 +- stand/loader.mk | 2 +- 17 files changed, 11 insertions(+), 43 deletions(-) diff --git a/libexec/flua/Makefile b/libexec/flua/Makefile index b43b31298205..231abe5dafa2 100644 --- a/libexec/flua/Makefile +++ b/libexec/flua/Makefile @@ -6,13 +6,10 @@ # than mucking about with the infrastructure to make them linkable -- thus, why # these are all structured to have a Makefile that describes what we want # *installed*, and a Makefile.inc that describes what we need to *build*. -FLUA_MODULES+= lfbsd -FLUA_MODULES+= lfs FLUA_MODULES+= libhash FLUA_MODULES+= libjail FLUA_MODULES+= libucl FLUA_MODULES+= liblyaml -FLUA_MODULES+= lposix .ifdef BOOTSTRAPPING FLUA_MODULES+= libfreebsd/sys/linker @@ -50,6 +47,7 @@ SRCS+= lua.c # FreeBSD Extensions .PATH: ${.CURDIR}/modules SRCS+= linit_flua.c +SRCS+= lfs.c lposix.c lfbsd.c CFLAGS+= -I${SRCTOP}/lib/liblua -I${.CURDIR}/modules -I${LUASRC} CFLAGS+= -DLUA_PROGNAME="\"${PROG}\"" diff --git a/libexec/flua/lfbsd/Makefile b/libexec/flua/lfbsd/Makefile deleted file mode 100644 index e2a4aae14bcd..000000000000 --- a/libexec/flua/lfbsd/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -SHLIB_NAME= fbsd.so -WARNS?= 3 - -.include "Makefile.inc" -.include diff --git a/libexec/flua/lfbsd/Makefile.inc b/libexec/flua/lfbsd/Makefile.inc deleted file mode 100644 index 7a78ef82e0fc..000000000000 --- a/libexec/flua/lfbsd/Makefile.inc +++ /dev/null @@ -1,2 +0,0 @@ -.PATH: ${.PARSEDIR} -SRCS+= lfbsd.c diff --git a/libexec/flua/lfs/Makefile b/libexec/flua/lfs/Makefile deleted file mode 100644 index 3df83d6d2fc1..000000000000 --- a/libexec/flua/lfs/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -SHLIB_NAME= lfs.so -WARNS?= 3 - -.include "Makefile.inc" -.include diff --git a/libexec/flua/lfs/Makefile.inc b/libexec/flua/lfs/Makefile.inc deleted file mode 100644 index 9d40c42dc0e6..000000000000 --- a/libexec/flua/lfs/Makefile.inc +++ /dev/null @@ -1,2 +0,0 @@ -.PATH: ${.PARSEDIR} -SRCS+= lfs.c diff --git a/libexec/flua/libhash/lhash.c b/libexec/flua/libhash/lhash.c index f455f006bf27..7127ddc1d530 100644 --- a/libexec/flua/libhash/lhash.c +++ b/libexec/flua/libhash/lhash.c @@ -178,6 +178,4 @@ luaopen_hash(lua_State *L) return 1; } -#ifndef _STANDALONE FLUA_MODULE(hash); -#endif diff --git a/libexec/flua/linit_flua.c b/libexec/flua/linit_flua.c index 161f030923d3..027f1b305d09 100644 --- a/libexec/flua/linit_flua.c +++ b/libexec/flua/linit_flua.c @@ -33,6 +33,9 @@ #include "lualib.h" #include "lauxlib.h" +#include "lfs.h" +#include "lposix.h" +#include "lfbsd.h" #include "bootstrap.h" @@ -54,6 +57,10 @@ static const luaL_Reg loadedlibs[] = { #if defined(LUA_COMPAT_BITLIB) {LUA_BITLIBNAME, luaopen_bit32}, #endif + /* FreeBSD Extensions */ + {"lfs", luaopen_lfs}, + {"posix", luaopen_posix}, + {"fbsd", luaopen_fbsd}, {NULL, NULL} }; diff --git a/libexec/flua/lposix/Makefile b/libexec/flua/lposix/Makefile deleted file mode 100644 index 92321d51be9a..000000000000 --- a/libexec/flua/lposix/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -SHLIB_NAME= posix.so -WARNS?= 3 - -.include "Makefile.inc" -.include diff --git a/libexec/flua/lposix/Makefile.inc b/libexec/flua/lposix/Makefile.inc deleted file mode 100644 index 499e6779e84d..000000000000 --- a/libexec/flua/lposix/Makefile.inc +++ /dev/null @@ -1,2 +0,0 @@ -.PATH: ${.PARSEDIR} -SRCS+= lposix.c diff --git a/libexec/flua/lfbsd/lfbsd.c b/libexec/flua/modules/lfbsd.c similarity index 99% rename from libexec/flua/lfbsd/lfbsd.c rename to libexec/flua/modules/lfbsd.c index 541b6c9611df..ef660ba9fd77 100644 --- a/libexec/flua/lfbsd/lfbsd.c +++ b/libexec/flua/modules/lfbsd.c @@ -40,8 +40,6 @@ #include "lauxlib.h" #include "lfbsd.h" -#include "bootstrap.h" - #define FBSD_PROCESSHANDLE "fbsd_process_t*" struct fbsd_process { @@ -285,5 +283,3 @@ luaopen_fbsd(lua_State *L) return (1); } - -FLUA_MODULE(fbsd); diff --git a/libexec/flua/lfbsd/lfbsd.h b/libexec/flua/modules/lfbsd.h similarity index 100% rename from libexec/flua/lfbsd/lfbsd.h rename to libexec/flua/modules/lfbsd.h diff --git a/libexec/flua/lfs/lfs.c b/libexec/flua/modules/lfs.c similarity index 99% rename from libexec/flua/lfs/lfs.c rename to libexec/flua/modules/lfs.c index 517e16ae65c8..8cb8d6fc9fed 100644 --- a/libexec/flua/lfs/lfs.c +++ b/libexec/flua/modules/lfs.c @@ -66,9 +66,8 @@ #ifdef _STANDALONE #include "lstd.h" #include "lutils.h" -#endif - #include "bootstrap.h" +#endif #ifndef nitems #define nitems(x) (sizeof((x)) / sizeof((x)[0])) @@ -447,7 +446,3 @@ luaopen_lfs(lua_State *L) #endif return 1; } - -#ifndef _STANDALONE -FLUA_MODULE(lfs); -#endif diff --git a/libexec/flua/lfs/lfs.h b/libexec/flua/modules/lfs.h similarity index 100% rename from libexec/flua/lfs/lfs.h rename to libexec/flua/modules/lfs.h diff --git a/libexec/flua/lposix/lposix.c b/libexec/flua/modules/lposix.c similarity index 99% rename from libexec/flua/lposix/lposix.c rename to libexec/flua/modules/lposix.c index 430bb6f28baf..75cdd345aeaa 100644 --- a/libexec/flua/lposix/lposix.c +++ b/libexec/flua/modules/lposix.c @@ -21,8 +21,6 @@ #include "lauxlib.h" #include "lposix.h" -#include "bootstrap.h" - static void enforce_max_args(lua_State *L, int max) { @@ -699,6 +697,3 @@ luaopen_posix(lua_State *L) return (1); } - -/* Only this one needed in our bootstrap set, it will load the others. */ -FLUA_MODULE(posix); diff --git a/libexec/flua/lposix/lposix.h b/libexec/flua/modules/lposix.h similarity index 100% rename from libexec/flua/lposix/lposix.h rename to libexec/flua/modules/lposix.h diff --git a/stand/liblua/Makefile b/stand/liblua/Makefile index b1c34ec0a466..ce7eb89fe494 100644 --- a/stand/liblua/Makefile +++ b/stand/liblua/Makefile @@ -24,7 +24,7 @@ SRCS+= lauxlib.c lbaselib.c lstrlib.c loadlib.c SRCS+= lerrno.c lpager.c lstd.c lutils.c SRCS+= gfx_utils.c -.PATH: ${FLUASRC}/lfs +.PATH: ${FLUASRC}/modules SRCS+= lfs.c .PATH: ${FLUALIB}/libhash SRCS+= lhash.c diff --git a/stand/loader.mk b/stand/loader.mk index e26ba1401912..4073e523e552 100644 --- a/stand/loader.mk +++ b/stand/loader.mk @@ -89,7 +89,7 @@ SRCS+= interp_lua.c .include "${BOOTSRC}/lua.mk" LDR_INTERP= ${LIBLUA} LDR_INTERP32= ${LIBLUA32} -CFLAGS.interp_lua.c= -DLUA_PATH=\"${LUAPATH}\" -I${FLUASRC}/lfs +CFLAGS.interp_lua.c= -DLUA_PATH=\"${LUAPATH}\" -I${FLUASRC}/modules .elif ${LOADER_INTERP} == "4th" SRCS+= interp_forth.c .include "${BOOTSRC}/ficl.mk" From nobody Sat Oct 4 00:53:38 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdn8g3Td4z69dwm; Sat, 04 Oct 2025 00:53:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdn8g0VY4z3Wnw; Sat, 04 Oct 2025 00:53:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759539219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AL8BXiUv4QpGaI/uEyecEmh9FXlVQak5Mv8eAuPZT5A=; b=mdQumG+jOdEVMopw0lrJtOyi9NiljSXNJHtcaoZPZjLXnrh1g6RZV+BltML12WgS3nnFlC MeKxfrc8PhgvBl5ZMM1mVEdcJvP14VGgtBpof5F8Y70Ea5l/k7w9e3mp/NsyimDeJh96e7 24ojniAuyDlPCE+kWeYs2A3/d4qtdPZF70ThAMPTt4M0pF7LsEzbBw80FTORUTWrv6le8e vYnOKN1oel4fJnZWx04Vu6LwKIAPLoquIuMWT1W7MhaqLXhDSHB6gTfKePEp4SZddUalVf zOb/zE+c/Rw/EFtmU857anzWeoGIxcTe+sa91gRYVv1SPSteGAulpYJ3ogiWwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759539219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AL8BXiUv4QpGaI/uEyecEmh9FXlVQak5Mv8eAuPZT5A=; b=m6tT8ImtR5q7auX8A9DFVOuNNTNIBpECGaMrmwMxYMl3Bj1UJziv+ZNCeKBqLO5K6LEt0A +s3K/0rQ5TfvaYHC/ueT6HHgDSx2u5JkfUARV7Fuz45Xzjr65ZrJgbrKJhWWrfh1/Bg52C IbrmzWAgh76Ck1fSP1q7EEnSUTi5QFf0pJ84qzN2lrhkycJ9fWXvs0uMFWQzoGug2/8VS5 V1DyFPEiWNs5x0mFDx5jvsnj6wUjqU+hQ5m05B49jFhWSdnSGQ/GmciLbR6Cb32G8E1+NF lpJEgNbOwNiVhRtHMDrECMQa8dhyC0qfkRrRr5VJJ6NDt3jRBEtTr3NM7lhung== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759539219; a=rsa-sha256; cv=none; b=ogThvrL7fD2PdZjVHHDH54e8t6qiIA1Qs0zFdx+XJgtvgzKtGtYd9mSWyOYT9JnwilsmeA 0h+n3u+JI+qsaVIsCK0fpGHxW2pfzQHsVR/s3h8Hz+IoUHPjlWlDezzzEp0DaT0ARL9ghs W2OLG5M58llrWs1z1mJv8KooaASqtRxBdGfshVvDZ+cccsRShdUdeUrEOVc8oXQ1JDyWDo ZsUX/LYygxwea5D4RK19V0WTinCz626sVSIFGTh7pTOQkYw4+aa6WglwgKn+xHAjX07nlY FOlPpzzQ4eL9UC6bPYa7rWSLqiCME8V7YuOY2/H9h1iAs3xoKQlacP5TFuJHew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdn8f6xS9z44R; Sat, 04 Oct 2025 00:53:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5940rcRD066771; Sat, 4 Oct 2025 00:53:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5940rcXi066768; Sat, 4 Oct 2025 00:53:38 GMT (envelope-from git) Date: Sat, 4 Oct 2025 00:53:38 GMT Message-Id: <202510040053.5940rcXi066768@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: bbef1c72b487 - main - Revert "flua: support our flua modules in the bootstrap flua" 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bbef1c72b4873b657fdb0466b48b15d1d4f0a731 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=bbef1c72b4873b657fdb0466b48b15d1d4f0a731 commit bbef1c72b4873b657fdb0466b48b15d1d4f0a731 Author: Kyle Evans AuthorDate: 2025-10-04 00:52:36 +0000 Commit: Kyle Evans CommitDate: 2025-10-04 00:53:28 +0000 Revert "flua: support our flua modules in the bootstrap flua" This reverts commit 1953a12ee2cde1afacb3e3f7612d89695c96e04f, because it cannot work at all on macOS without more work, at a minimum. We use linker sets for module discovery, but we don't have a version of this that works for mach-o at the moment. --- contrib/libucl/lua/lua_ucl.c | 4 --- contrib/lyaml/ext/yaml/yaml.c | 4 --- libexec/flua/Makefile | 37 ++++--------------------- libexec/flua/Makefile.inc | 7 +---- libexec/flua/bootstrap.h | 30 -------------------- libexec/flua/libfreebsd/kenv/Makefile | 2 +- libexec/flua/libfreebsd/kenv/Makefile.inc | 2 -- libexec/flua/libfreebsd/kenv/kenv.c | 4 --- libexec/flua/libfreebsd/sys/linker/Makefile | 3 +- libexec/flua/libfreebsd/sys/linker/Makefile.inc | 2 -- libexec/flua/libfreebsd/sys/linker/linker.c | 4 --- libexec/flua/libhash/Makefile | 5 +++- libexec/flua/libhash/Makefile.inc | 3 -- libexec/flua/libhash/lhash.c | 4 --- libexec/flua/libjail/Makefile | 5 +++- libexec/flua/libjail/Makefile.inc | 3 -- libexec/flua/libjail/lua_jail.c | 4 --- libexec/flua/liblyaml/Makefile | 20 ++++++++++++- libexec/flua/liblyaml/Makefile.inc | 20 ------------- libexec/flua/libucl/Makefile | 12 +++++++- libexec/flua/libucl/Makefile.inc | 12 -------- libexec/flua/linit_flua.c | 29 +------------------ tools/build/Makefile | 1 - 23 files changed, 49 insertions(+), 168 deletions(-) diff --git a/contrib/libucl/lua/lua_ucl.c b/contrib/libucl/lua/lua_ucl.c index 1b3f9dfd111c..d6be69e42a71 100644 --- a/contrib/libucl/lua/lua_ucl.c +++ b/contrib/libucl/lua/lua_ucl.c @@ -30,8 +30,6 @@ #include "lua_ucl.h" #include -#include "bootstrap.h" - /*** * @module ucl * This lua module allows to parse objects from strings and to store data into @@ -1573,5 +1571,3 @@ ucl_object_toclosure (const ucl_object_t *obj) return (struct ucl_lua_funcdata*)obj->value.ud; } - -FLUA_MODULE(ucl); diff --git a/contrib/lyaml/ext/yaml/yaml.c b/contrib/lyaml/ext/yaml/yaml.c index 6a5ddc605e0f..54478610134f 100644 --- a/contrib/lyaml/ext/yaml/yaml.c +++ b/contrib/lyaml/ext/yaml/yaml.c @@ -35,8 +35,6 @@ #include "lyaml.h" -#include "bootstrap.h" - #define MYNAME "yaml" #define MYVERSION MYNAME " library for " LUA_VERSION " / " VERSION @@ -66,5 +64,3 @@ luaopen_yaml (lua_State *L) return 1; } - -FLUA_MODULE(yaml); diff --git a/libexec/flua/Makefile b/libexec/flua/Makefile index 231abe5dafa2..86d27c0653d4 100644 --- a/libexec/flua/Makefile +++ b/libexec/flua/Makefile @@ -1,35 +1,10 @@ .include -# New flua modules should be added here rather than to SUBDIR so that we can do -# the right thing for both bootstrap flua and target flua. The former does not -# do any shared libs, so we just build them all straight into flua itself rather -# than mucking about with the infrastructure to make them linkable -- thus, why -# these are all structured to have a Makefile that describes what we want -# *installed*, and a Makefile.inc that describes what we need to *build*. -FLUA_MODULES+= libhash -FLUA_MODULES+= libjail -FLUA_MODULES+= libucl -FLUA_MODULES+= liblyaml - -.ifdef BOOTSTRAPPING -FLUA_MODULES+= libfreebsd/sys/linker -FLUA_MODULES+= libfreebsd/kenv -CFLAGS+= -I${.CURDIR} -DBOOTSTRAPPING - -SHAREDIR= ${WORLDTMP}/legacy/usr/share/flua -FLUA_PATH= ${SHAREDIR}/?.lua;${SHAREDIR}/?/init.lua -CFLAGS+= -DBOOTSTRAP_FLUA_PATH=\"${FLUA_PATH:Q}\" - -.for mod in ${FLUA_MODULES} -.include "${mod}/Makefile.inc" -.endfor - -.else - -FLUA_MODULES+= libfreebsd -SUBDIR+= ${FLUA_MODULES} - -.endif +SUBDIR+= libfreebsd +SUBDIR+= libhash +SUBDIR+= libjail +SUBDIR+= libucl +SUBDIR+= liblyaml LUASRC?= ${SRCTOP}/contrib/lua/src .PATH: ${LUASRC} @@ -39,7 +14,7 @@ WARNS?= 3 CWARNFLAGS.gcc+= -Wno-format-nonliteral -LIBADD+= lua +LIBADD= lua # Entry point SRCS+= lua.c diff --git a/libexec/flua/Makefile.inc b/libexec/flua/Makefile.inc index 37a49e258ecb..34505d54d7df 100644 --- a/libexec/flua/Makefile.inc +++ b/libexec/flua/Makefile.inc @@ -2,9 +2,4 @@ SHLIBDIR?= ${LIBDIR}/flua CFLAGS+= \ -I${SRCTOP}/contrib/lua/src \ - -I${SRCTOP}/lib/liblua \ - -I${SRCTOP}/libexec/flua - -.ifdef BOOTSTRAPPING -CFLAGS+= -DBOOTSTRAPPING -.endif + -I${SRCTOP}/lib/liblua diff --git a/libexec/flua/bootstrap.h b/libexec/flua/bootstrap.h deleted file mode 100644 index 74356d8677b3..000000000000 --- a/libexec/flua/bootstrap.h +++ /dev/null @@ -1,30 +0,0 @@ -/*- - * Copyright (c) 2025 Kyle Evans - * - * SPDX-License-Identifier: BSD-2-Clause - */ - -#ifndef FLUA_BOOTSTRAP_H -#define FLUA_BOOTSTRAP_H - -#ifdef BOOTSTRAPPING -#include - -#include - -SET_DECLARE(flua_module_set, const luaL_Reg); -#define FLUA_MODULE_DEF(ident, modname, openfn) \ - static const luaL_Reg ident = { modname, openfn }; \ - DATA_SET(flua_module_set, ident) - -#define FLUA_MODULE_NAMED(mod, name) \ - FLUA_MODULE_DEF(module_ ## mod, name, luaopen_ ## mod) -#define FLUA_MODULE(mod) \ - FLUA_MODULE_DEF(module_ ## mod, #mod, luaopen_ ## mod) -#else /* !BOOTSTRAPPING */ -#define FLUA_MODULE_DEF(ident, modname, openfn) -#define FLUA_MODULE_NAMED(mod, name) -#define FLUA_MODULE(modname) -#endif /* BOOTSTRAPPING */ - -#endif /* FLUA_BOOTSTRAP_H */ diff --git a/libexec/flua/libfreebsd/kenv/Makefile b/libexec/flua/libfreebsd/kenv/Makefile index a1b388bb3612..1726c892c515 100644 --- a/libexec/flua/libfreebsd/kenv/Makefile +++ b/libexec/flua/libfreebsd/kenv/Makefile @@ -1,5 +1,5 @@ SHLIB_NAME= kenv.so +SRCS+= kenv.c MAN= freebsd.kenv.3lua -.include "Makefile.inc" .include diff --git a/libexec/flua/libfreebsd/kenv/Makefile.inc b/libexec/flua/libfreebsd/kenv/Makefile.inc deleted file mode 100644 index 05819c5280d9..000000000000 --- a/libexec/flua/libfreebsd/kenv/Makefile.inc +++ /dev/null @@ -1,2 +0,0 @@ -.PATH: ${.PARSEDIR} -SRCS+= kenv.c diff --git a/libexec/flua/libfreebsd/kenv/kenv.c b/libexec/flua/libfreebsd/kenv/kenv.c index 56b24c72904a..954baa00facb 100644 --- a/libexec/flua/libfreebsd/kenv/kenv.c +++ b/libexec/flua/libfreebsd/kenv/kenv.c @@ -14,8 +14,6 @@ #include #include -#include "bootstrap.h" - int luaopen_freebsd_kenv(lua_State *L); static int @@ -96,5 +94,3 @@ luaopen_freebsd_kenv(lua_State *L) return (1); } - -FLUA_MODULE_NAMED(freebsd_kenv, "freebsd.kenv"); diff --git a/libexec/flua/libfreebsd/sys/linker/Makefile b/libexec/flua/libfreebsd/sys/linker/Makefile index f1f65ad5f6c1..1adf547b503c 100644 --- a/libexec/flua/libfreebsd/sys/linker/Makefile +++ b/libexec/flua/libfreebsd/sys/linker/Makefile @@ -1,6 +1,7 @@ SHLIB_NAME= linker.so +SRCS+= linker.c + MAN= freebsd.sys.linker.3lua -.include "Makefile.inc" .include diff --git a/libexec/flua/libfreebsd/sys/linker/Makefile.inc b/libexec/flua/libfreebsd/sys/linker/Makefile.inc deleted file mode 100644 index da65c0070170..000000000000 --- a/libexec/flua/libfreebsd/sys/linker/Makefile.inc +++ /dev/null @@ -1,2 +0,0 @@ -.PATH: ${.PARSEDIR} -SRCS+= linker.c diff --git a/libexec/flua/libfreebsd/sys/linker/linker.c b/libexec/flua/libfreebsd/sys/linker/linker.c index c78fbb2b39d2..87eccfb651f0 100644 --- a/libexec/flua/libfreebsd/sys/linker/linker.c +++ b/libexec/flua/libfreebsd/sys/linker/linker.c @@ -15,8 +15,6 @@ #include #include -#include "bootstrap.h" - int luaopen_freebsd_sys_linker(lua_State *L); static int @@ -82,5 +80,3 @@ luaopen_freebsd_sys_linker(lua_State *L) return (1); } - -FLUA_MODULE_NAMED(freebsd_sys_linker, "freebsd.sys.linker"); diff --git a/libexec/flua/libhash/Makefile b/libexec/flua/libhash/Makefile index 9cbd6f15acae..b7c8d7ee9948 100644 --- a/libexec/flua/libhash/Makefile +++ b/libexec/flua/libhash/Makefile @@ -1,6 +1,9 @@ SHLIB_NAME= hash.so +SRCS+= lhash.c + +LIBADD+= md + MAN= hash.3lua -.include "Makefile.inc" .include diff --git a/libexec/flua/libhash/Makefile.inc b/libexec/flua/libhash/Makefile.inc deleted file mode 100644 index d112dfe7df33..000000000000 --- a/libexec/flua/libhash/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -.PATH: ${.PARSEDIR} -SRCS+= lhash.c -LIBADD+= md diff --git a/libexec/flua/libhash/lhash.c b/libexec/flua/libhash/lhash.c index 7127ddc1d530..4587961fe8a0 100644 --- a/libexec/flua/libhash/lhash.c +++ b/libexec/flua/libhash/lhash.c @@ -11,8 +11,6 @@ #include #include -#include "bootstrap.h" - #define SHA256_META "SHA256 meta table" #define SHA256_DIGEST_LEN 32 @@ -177,5 +175,3 @@ luaopen_hash(lua_State *L) return 1; } - -FLUA_MODULE(hash); diff --git a/libexec/flua/libjail/Makefile b/libexec/flua/libjail/Makefile index b9c8bdc39095..20cd9f5f1429 100644 --- a/libexec/flua/libjail/Makefile +++ b/libexec/flua/libjail/Makefile @@ -1,6 +1,9 @@ SHLIB_NAME= jail.so +SRCS+= lua_jail.c + +LIBADD+= jail + MAN= jail.3lua -.include "Makefile.inc" .include diff --git a/libexec/flua/libjail/Makefile.inc b/libexec/flua/libjail/Makefile.inc deleted file mode 100644 index a896bf38c65b..000000000000 --- a/libexec/flua/libjail/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -.PATH: ${.PARSEDIR} -SRCS+= lua_jail.c -LIBADD+= jail diff --git a/libexec/flua/libjail/lua_jail.c b/libexec/flua/libjail/lua_jail.c index 8c3ec6c1d500..9632db795775 100644 --- a/libexec/flua/libjail/lua_jail.c +++ b/libexec/flua/libjail/lua_jail.c @@ -38,8 +38,6 @@ #include #include -#include "bootstrap.h" - #define JAIL_METATABLE "jail iterator metatable" /* @@ -718,5 +716,3 @@ luaopen_jail(lua_State *L) return (1); } - -FLUA_MODULE(jail); diff --git a/libexec/flua/liblyaml/Makefile b/libexec/flua/liblyaml/Makefile index 8d1432acd325..e7a89d09bb9e 100644 --- a/libexec/flua/liblyaml/Makefile +++ b/libexec/flua/liblyaml/Makefile @@ -1,4 +1,22 @@ SHLIB_NAME= yaml.so -.include "Makefile.inc" +WARNS= 1 +LYAMLSRC?= ${SRCTOP}/contrib/lyaml +.PATH: ${LYAMLSRC}/ext/yaml ${LYAMLSRC}/lib/lyaml +SRCS= emitter.c \ + parser.c \ + scanner.c \ + yaml.c +CFLAGS+= \ + -I${LYAMLSRC}/ext/yaml \ + -I${SRCTOP}/contrib/libyaml/include \ + -DVERSION=\"6.2.8\" +LIBADD+= yaml + +FILES= explicit.lua \ + functional.lua \ + implicit.lua \ + init.lua +FILESDIR= ${SHAREDIR}/flua/lyaml + .include diff --git a/libexec/flua/liblyaml/Makefile.inc b/libexec/flua/liblyaml/Makefile.inc deleted file mode 100644 index caa1f37b57eb..000000000000 --- a/libexec/flua/liblyaml/Makefile.inc +++ /dev/null @@ -1,20 +0,0 @@ -WARNS= 1 - -LYAMLSRC?= ${SRCTOP}/contrib/lyaml -.PATH: ${LYAMLSRC}/ext/yaml ${LYAMLSRC}/lib/lyaml -SRCS+= emitter.c \ - parser.c \ - scanner.c \ - yaml.c -CFLAGS+= \ - -I${LYAMLSRC}/ext/yaml \ - -I${SRCTOP}/contrib/libyaml/include \ - -DVERSION=\"6.2.8\" -LIBADD+= yaml - -FILESGROUPS+= YAML -YAML= explicit.lua \ - functional.lua \ - implicit.lua \ - init.lua -YAMLDIR= ${SHAREDIR}/flua/lyaml diff --git a/libexec/flua/libucl/Makefile b/libexec/flua/libucl/Makefile index 32d76d1ea1ad..a88c8bda6bfc 100644 --- a/libexec/flua/libucl/Makefile +++ b/libexec/flua/libucl/Makefile @@ -1,4 +1,14 @@ SHLIB_NAME= ucl.so -.include "Makefile.inc" +WARNS= 2 + +UCLSRC?= ${SRCTOP}/contrib/libucl +.PATH: ${UCLSRC}/lua +SRCS+= lua_ucl.c +CFLAGS+= \ + -I${UCLSRC}/include \ + -I${UCLSRC}/src \ + -I${UCLSRC}/uthash +LIBADD+= ucl + .include diff --git a/libexec/flua/libucl/Makefile.inc b/libexec/flua/libucl/Makefile.inc deleted file mode 100644 index 70fb0f265635..000000000000 --- a/libexec/flua/libucl/Makefile.inc +++ /dev/null @@ -1,12 +0,0 @@ -.if ${WARNS:U6} > 2 -WARNS= 2 -.endif - -UCLSRC?= ${SRCTOP}/contrib/libucl -.PATH: ${UCLSRC}/lua -SRCS+= lua_ucl.c -CFLAGS+= \ - -I${UCLSRC}/include \ - -I${UCLSRC}/src \ - -I${UCLSRC}/uthash -LIBADD+= ucl diff --git a/libexec/flua/linit_flua.c b/libexec/flua/linit_flua.c index 027f1b305d09..b466b7872158 100644 --- a/libexec/flua/linit_flua.c +++ b/libexec/flua/linit_flua.c @@ -26,8 +26,8 @@ #include "lprefix.h" + #include -#include #include "lua.h" @@ -37,8 +37,6 @@ #include "lposix.h" #include "lfbsd.h" -#include "bootstrap.h" - /* ** these libs are loaded by lua.c and are readily available to any Lua ** program @@ -64,28 +62,6 @@ static const luaL_Reg loadedlibs[] = { {NULL, NULL} }; -#ifdef BOOTSTRAPPING -static void __attribute__((constructor)) flua_init_env(void) { - /* - * This happens in the middle of luaopen_package(). We could move it into - * flua_setup_mods(), but it seems better to avoid its timing being so - * important that it would break some of our bootstrap modules if someone - * were to reorder things. - */ - if (getenv("LUA_PATH") == NULL) - setenv("LUA_PATH", BOOTSTRAP_FLUA_PATH, 1); -} - -static void flua_setup_mods (lua_State *L) { - const luaL_Reg **flib; - - SET_FOREACH(flib, flua_module_set) { - luaL_requiref(L, (*flib)->name, (*flib)->func, 1); - lua_pop(L, 1); /* remove lib */ - } -}; -#endif - LUALIB_API void luaL_openlibs (lua_State *L) { const luaL_Reg *lib; /* "require" functions from 'loadedlibs' and set results to global table */ @@ -93,7 +69,4 @@ LUALIB_API void luaL_openlibs (lua_State *L) { luaL_requiref(L, lib->name, lib->func, 1); lua_pop(L, 1); /* remove lib */ } -#ifdef BOOTSTRAPPING - flua_setup_mods(L); -#endif } diff --git a/tools/build/Makefile b/tools/build/Makefile index 09351900599a..3c4e07e3cfc2 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -497,7 +497,6 @@ INSTALLDIR_LIST= \ usr/include/casper \ usr/include/openssl \ usr/include/private/ucl \ - usr/include/private/yaml \ usr/include/private/zstd \ usr/lib \ usr/libdata/pkgconfig \ From nobody Sat Oct 4 00:57:31 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdnF91sXdz69fJx; Sat, 04 Oct 2025 00:57:33 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdnF918kwz3Xwm; Sat, 04 Oct 2025 00:57:33 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759539453; h=from:from:reply-to:subject:subject: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=bY0SAo62aD2uaIalWI1HqqzaA5b4CvMmEeoF7jgHS6g=; b=tDwV7m5+OIheoc5aSQq/n2k9xUIZu371QehYw36IGi4+LzfNBeK+Eabvtq842b9tCvwQFO 6kSIn1URyb1EHMTJEcgUykpYiEEkExVkAGH4/hvuw8nYOVg9rSjvrXJ0VdKnG8Xy6IlrDM m418dlTX48p5zUGyPL5i2t7CAzfp88seUvEAMsXwnMWBYRWNUhCme/mj2t/+fGxunsRowa mLuz95IaMTnOHt/rd7nkAZd1GzkqdTDtO75yMHThJ2WTfXHlOSjL4WImS3Nui7puS48zpJ 7iXA0QHFPvEcUx9zn4/YrE8mE6xgoDEZPMYIKKvCdLhw933knOqcNE9QN9rSBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759539453; h=from:from:reply-to:subject:subject: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=bY0SAo62aD2uaIalWI1HqqzaA5b4CvMmEeoF7jgHS6g=; b=h+ujBT5aBbGq27sW4fWyvVGigyfpv+cY7wtQpUwFCFqg070pojj8HYtz7wnuzmCtRBRTso 48ige2uJYpuSVkhZnGqoevS3qFKgpRYrajj4K9VwlUuX4SNdLl7tGQ8HZ5MC13PTVxQGA+ wQ88DeBnLeoJ7hooL3gE/MM6vegmH7PbKPRtQhjhgzDwyTcEbTzVnvshBa+9Zqrei0VgXy smltvnaDgcJTdk2fhYPmak8lxCXYcvhMNq3CcGFKBcKQHUYf9v4zJzyZC4E1Rrq0ASc+13 RiTeGF/fjY/r2MXcAsZ5AOhsZdilbzeJA+VsBIaseOxUMWDiszQKPyo+ZwVvbA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759539453; a=rsa-sha256; cv=none; b=TR2E9IJxzMGl/6KEPR+AlWcHPWM+96PhHZL0OB0NYoYKzgAY1lsxk1UPnqUpF1xYwUX5O9 orzJCZJTq8ZY/tso2iEvV4qemXZh05TsF7MbnPPlGrDsvM7DLn8ORr0zH8XHIVdb6L98yo jDRy9QbGi0mD/uOewN7G9kvEhf/C2Qn7U890jCyjNeG3pMPJwEgAXj/pOFocvNvyVNUYfi FTLAzH3wigPhjB7mRmitYy0hU7c/Ect6df1tN8P4STMjXDq6r7exuUGnPioDJsMRVqH7Gc IFZuQAfHIVbRFpW4HIN4Bm/vCC4RE8/3A6YBFX9h+M7EMV7HRDsA05LJ7DSYtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cdnF8557rzFDb; Sat, 04 Oct 2025 00:57:32 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: Date: Fri, 3 Oct 2025 19:57:31 -0500 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 1953a12ee2cd - main - flua: support our flua modules in the bootstrap flua To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202510031810.593IAZE9008541@gitrepo.freebsd.org> <27098bd2-04e8-4ef7-8b8e-f7b170eb8151@FreeBSD.org> Content-Language: en-US From: Kyle Evans In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 10/3/25 17:45, Mark Johnston wrote: > On Fri, Oct 03, 2025 at 04:44:38PM -0500, Kyle Evans wrote: >> On 10/3/25 16:39, Mark Johnston wrote: >>> On Fri, Oct 03, 2025 at 06:10:35PM +0000, Kyle Evans wrote: >>>> The branch main has been updated by kevans: >>>> >>>> URL: https://cgit.FreeBSD.org/src/commit/?id=1953a12ee2cde1afacb3e3f7612d89695c96e04f >>>> >>>> commit 1953a12ee2cde1afacb3e3f7612d89695c96e04f >>>> Author: Kyle Evans >>>> AuthorDate: 2025-10-03 18:09:03 +0000 >>>> Commit: Kyle Evans >>>> CommitDate: 2025-10-03 18:09:14 +0000 >>>> >>>> flua: support our flua modules in the bootstrap flua >>>> This version builds every module into the flua binary itself, since all >>>> of the bootstrap tools are built -DNO_SHARED. As a result, we also >>>> cannot dlsym(), so we can't really discover the names of our newly >>>> builtin modules. Instead, just build out a linker set with all of our >>>> luaopen_*() functions to register everything up-front. >>>> Building in all of the modules isn't strictly necessary, but it means >>>> that we have an example of how to add a bootstrap module everywhere you >>>> go and one doesn't need to consider whether bootstrap flua can use a >>>> module when writing scripts. On my build machine, the consequence on >>>> our binary size is an increase from around 1.6M -> 1.9M, which isn't >>>> really that bad. >>>> .lua modules can install into their usual path below $WORLDTMP/legacy >>>> and we'll pick them up automagically by way of the ctor that sets up >>>> LUA_PATH early on. >>>> Reviewed by: bapt, emaste >>>> Differential Revision: https://reviews.freebsd.org/D51890 >>> >>> This breaks cross-building from other OSes since linker.h and kenv.h >>> aren't available. I guess we can safely exclude those from the >>> bootstrap build? It could be done conditionally on ${.MAKE.OS} perhaps, >>> but it's probably better to be consistent. >> >> Hi, >> >> Hmm, yes- I think excluding libfreebsd and libjail doesn't make it much more >> difficult to reason about what's available in the bootstrap flua. >> >> re: cross-builds, yikes- I forgot that we'll end up bootstrapping flua there. I >> bet it's also broken without libyaml and libucl here: https://reviews.freebsd.org/D52894? > > I don't see any bootstrap build failures in an Ubuntu chroot after I > disable building libfreebsd. Let me know if you'd like me to submit a > patch for that. I backed all of it out for the time being, because testing with the github jobs pointed out something funky[0] with the for mach-o, and I don't want to stand in the way of breaking cross-builds for this at the moment. [0] https://github.com/kevans91/freebsd/actions/runs/18237117404/job/51932901152 From nobody Sat Oct 4 02:17:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdq0z5b06z69pgT; Sat, 04 Oct 2025 02:17:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdq0z5Lpjz3kR3; Sat, 04 Oct 2025 02:17:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759544227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jqGtpesU6XUDyFhSFUn3VmcV5tvP8US2UsAkXFOU/qo=; b=BwwFdPugKFtAkRoH78NYFTozWjf6B+nQs+TDEFbtoNaX/pcpSBPoVN37ihMyKHlynQUp+2 IFQKpZJtaijjnez4A3XvOH0I7W/yoKP38DXJYQJ5OjsgckECOyevez5WlaX7UKJ+o6inKr oxw6y5kY62UIT0VBHLcnFU9oiP93uCHHeVZisoWQDxV46zsdb9+8jWHT4zXikCxYSyp3mh 2PFNIbKCecx1qUT+NPUrpcOlGAN+DL5Z7F5O365ZZ3RHcLlXSdbmM4urGuxdgrGzNyeYAv gT33bVLKa8ljlCV6iGCu+8TMkjUibb9WvHsrOPmnZQ8DhXNgKwzn/6yIKtIR0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759544227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jqGtpesU6XUDyFhSFUn3VmcV5tvP8US2UsAkXFOU/qo=; b=LoqMYcFSGEup4+5awMzfDpRrLUnHNsWLUGHkMudOwoWywNtIS12jozzmnkf0YaSgNRQmsG 2JYyXaxiZhY2urv16vxFKBy+5cGod4M+06yQDOY6djV0zIZc51g0W0VTg6hWwYRizbUL0Y jF+2e8xR7wlWwf3+cIFgZ/9ptvgS+WErSRChuToHkgBan9pFdPNmixYdxFFjcqjmviR5UR Vn1PAtVGdq04yFJTeWmV4kggzHBSLgPRx9dLGtKmb8GIw70gRKYd+MoC3fPFG3a6noM3Ge B3INDxKnG2h8xuXpd3/M753M1rIlGNaPWGklYI8qHUSVa83ldUWhnoMDTsKjNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759544227; a=rsa-sha256; cv=none; b=YqORBKsS99HF4YVK52S47MsP/RhqydtuY5X4WryvGRnvL60BJQB4rZHuHvyUZu/i4XlEmz 484e0qS/ltQT2rfJZAhc+P79OoPIMF6w7TuvQ7clLw2RQTbZdgZzQDV2tri1n0tcycSsXu yPJ3KSv8erWP7qicD26ryRgOf4jeggQD3gKJmEjeAxgumGcVxiq6GZQdPiosG5816EI4F5 Sy+b8FDnV3S+qgQl/giIS3hVlXPeMpvBBe/pEZ/EOLDxhVU1y/udnEgfqg8Lt71vhxPg4N cOcTPa2n+5J30uUevvqouhmcZ5omWVrXfJnCIhgSNA8uRI+XFdomIaGDMOPaQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdq0z459Vz68R; Sat, 04 Oct 2025 02:17:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5942H7ku020894; Sat, 4 Oct 2025 02:17:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5942H7Op020891; Sat, 4 Oct 2025 02:17:07 GMT (envelope-from git) Date: Sat, 4 Oct 2025 02:17:07 GMT Message-Id: <202510040217.5942H7Op020891@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 151bd3516b54 - main - flua: support our flua modules in the bootstrap flua 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 151bd3516b541823b16793460d73916e63d2b9c1 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=151bd3516b541823b16793460d73916e63d2b9c1 commit 151bd3516b541823b16793460d73916e63d2b9c1 Author: Kyle Evans AuthorDate: 2025-10-04 02:16:51 +0000 Commit: Kyle Evans CommitDate: 2025-10-04 02:16:51 +0000 flua: support our flua modules in the bootstrap flua This version builds every module into the flua binary itself, since all of the bootstrap tools are built -DNO_SHARED. As a result, we also cannot dlsym(), so we can't really discover the names of our newly builtin modules. Instead, just build out a linker set with all of our luaopen_*() functions to register everything up-front. Building in all of the modules isn't strictly necessary, but it means that we have an example of how to add a bootstrap module everywhere you go and one doesn't need to consider whether bootstrap flua can use a module when writing scripts. On my build machine, the consequence on our binary size is an increase from around 1.6M -> 1.9M, which isn't really that bad. .lua modules can install into their usual path below $WORLDTMP/legacy and we'll pick them up automagically by way of the ctor that sets up LUA_PATH early on. This re-lands bootstrap module support with a more sensible subset, and after having verified that it cross-builds fine on macOS and Linux -- we cannot do libfreebsd on !FreeBSD because it's more system header dependant. We also need to bootstrap libmd to bring in libhash, and libucl + libyaml. Reviewed by: bapt, emaste (both previous version) Differential Revision: https://reviews.freebsd.org/D51890 --- Makefile.inc1 | 4 +++ contrib/libucl/lua/lua_ucl.c | 4 +++ contrib/lyaml/ext/yaml/yaml.c | 4 +++ libexec/flua/Makefile | 42 +++++++++++++++++++++---- libexec/flua/Makefile.inc | 7 ++++- libexec/flua/bootstrap.h | 32 +++++++++++++++++++ libexec/flua/libfreebsd/kenv/Makefile | 2 +- libexec/flua/libfreebsd/kenv/Makefile.inc | 2 ++ libexec/flua/libfreebsd/kenv/kenv.c | 4 +++ libexec/flua/libfreebsd/sys/linker/Makefile | 3 +- libexec/flua/libfreebsd/sys/linker/Makefile.inc | 2 ++ libexec/flua/libfreebsd/sys/linker/linker.c | 4 +++ libexec/flua/libhash/Makefile | 5 +-- libexec/flua/libhash/Makefile.inc | 3 ++ libexec/flua/libhash/lhash.c | 4 +++ libexec/flua/libjail/Makefile | 5 +-- libexec/flua/libjail/Makefile.inc | 3 ++ libexec/flua/libjail/lua_jail.c | 4 +++ libexec/flua/liblyaml/Makefile | 20 +----------- libexec/flua/liblyaml/Makefile.inc | 20 ++++++++++++ libexec/flua/libucl/Makefile | 12 +------ libexec/flua/libucl/Makefile.inc | 12 +++++++ libexec/flua/linit_flua.c | 29 ++++++++++++++++- tools/build/Makefile | 1 + 24 files changed, 179 insertions(+), 49 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index dfd31456ad5a..a75e5c760cdc 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2548,6 +2548,10 @@ ${_bt}-usr.sbin/kldxref: ${_bt_libelf_depend} ${_bt_libkldelf_depend} .if ${BOOTSTRAPPING} < 1300059 ${_bt}-libexec/flua: ${_bt}-lib/liblua _flua= lib/liblua libexec/flua +.if ${BOOTSTRAPPING} == 0 +_flua+= lib/libmd lib/libucl lib/libyaml +${_bt}-libexec/flua: ${_bt}-lib/libmd ${_bt}-lib/libucl ${_bt}-lib/libyaml +.endif # BOOTSTRAPPING == 0 .endif # r245440 mtree -N support added diff --git a/contrib/libucl/lua/lua_ucl.c b/contrib/libucl/lua/lua_ucl.c index d6be69e42a71..1b3f9dfd111c 100644 --- a/contrib/libucl/lua/lua_ucl.c +++ b/contrib/libucl/lua/lua_ucl.c @@ -30,6 +30,8 @@ #include "lua_ucl.h" #include +#include "bootstrap.h" + /*** * @module ucl * This lua module allows to parse objects from strings and to store data into @@ -1571,3 +1573,5 @@ ucl_object_toclosure (const ucl_object_t *obj) return (struct ucl_lua_funcdata*)obj->value.ud; } + +FLUA_MODULE(ucl); diff --git a/contrib/lyaml/ext/yaml/yaml.c b/contrib/lyaml/ext/yaml/yaml.c index 54478610134f..6a5ddc605e0f 100644 --- a/contrib/lyaml/ext/yaml/yaml.c +++ b/contrib/lyaml/ext/yaml/yaml.c @@ -35,6 +35,8 @@ #include "lyaml.h" +#include "bootstrap.h" + #define MYNAME "yaml" #define MYVERSION MYNAME " library for " LUA_VERSION " / " VERSION @@ -64,3 +66,5 @@ luaopen_yaml (lua_State *L) return 1; } + +FLUA_MODULE(yaml); diff --git a/libexec/flua/Makefile b/libexec/flua/Makefile index 86d27c0653d4..29d57211b2ae 100644 --- a/libexec/flua/Makefile +++ b/libexec/flua/Makefile @@ -1,10 +1,40 @@ .include -SUBDIR+= libfreebsd -SUBDIR+= libhash -SUBDIR+= libjail -SUBDIR+= libucl -SUBDIR+= liblyaml +# New flua modules should be added here rather than to SUBDIR so that we can do +# the right thing for both bootstrap flua and target flua. The former does not +# do any shared libs, so we just build them all straight into flua itself rather +# than mucking about with the infrastructure to make them linkable -- thus, why +# these are all structured to have a Makefile that describes what we want +# *installed*, and a Makefile.inc that describes what we need to *build*. +FLUA_MODULES+= libhash +.ifndef BOOTSTRAPPING +# Bootstrap flua can't usefully do anything with libjail anyways, because it +# can't assume it's being run on a system that even supports jails. +FLUA_MODULES+= libjail +.endif +FLUA_MODULES+= libucl +FLUA_MODULES+= liblyaml + +.ifdef BOOTSTRAPPING +# libfreebsd is generally omitted from the bootstrap flua because its +# functionality largely assumes a FreeBSD kernel/system headers, so it doesn't +# really offer functionality that we can use in bootstrap. +CFLAGS+= -I${.CURDIR} -DBOOTSTRAPPING + +SHAREDIR= ${WORLDTMP}/legacy/usr/share/flua +FLUA_PATH= ${SHAREDIR}/?.lua;${SHAREDIR}/?/init.lua +CFLAGS+= -DBOOTSTRAP_FLUA_PATH=\"${FLUA_PATH:Q}\" + +.for mod in ${FLUA_MODULES} +.include "${mod}/Makefile.inc" +.endfor + +.else + +FLUA_MODULES+= libfreebsd +SUBDIR+= ${FLUA_MODULES} + +.endif LUASRC?= ${SRCTOP}/contrib/lua/src .PATH: ${LUASRC} @@ -14,7 +44,7 @@ WARNS?= 3 CWARNFLAGS.gcc+= -Wno-format-nonliteral -LIBADD= lua +LIBADD+= lua # Entry point SRCS+= lua.c diff --git a/libexec/flua/Makefile.inc b/libexec/flua/Makefile.inc index 34505d54d7df..37a49e258ecb 100644 --- a/libexec/flua/Makefile.inc +++ b/libexec/flua/Makefile.inc @@ -2,4 +2,9 @@ SHLIBDIR?= ${LIBDIR}/flua CFLAGS+= \ -I${SRCTOP}/contrib/lua/src \ - -I${SRCTOP}/lib/liblua + -I${SRCTOP}/lib/liblua \ + -I${SRCTOP}/libexec/flua + +.ifdef BOOTSTRAPPING +CFLAGS+= -DBOOTSTRAPPING +.endif diff --git a/libexec/flua/bootstrap.h b/libexec/flua/bootstrap.h new file mode 100644 index 000000000000..caf00518c1e0 --- /dev/null +++ b/libexec/flua/bootstrap.h @@ -0,0 +1,32 @@ +/*- + * Copyright (c) 2025 Kyle Evans + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#ifndef FLUA_BOOTSTRAP_H +#define FLUA_BOOTSTRAP_H + +#ifdef BOOTSTRAPPING +#include + +#include + +#define FLUA_MODULE_SETNAME flua_modules + +SET_DECLARE(FLUA_MODULE_SETNAME, const luaL_Reg); +#define FLUA_MODULE_DEF(ident, modname, openfn) \ + static const luaL_Reg ident = { modname, openfn }; \ + DATA_SET(FLUA_MODULE_SETNAME, ident) + +#define FLUA_MODULE_NAMED(mod, name) \ + FLUA_MODULE_DEF(module_ ## mod, name, luaopen_ ## mod) +#define FLUA_MODULE(mod) \ + FLUA_MODULE_DEF(module_ ## mod, #mod, luaopen_ ## mod) +#else /* !BOOTSTRAPPING */ +#define FLUA_MODULE_DEF(ident, modname, openfn) +#define FLUA_MODULE_NAMED(mod, name) +#define FLUA_MODULE(modname) +#endif /* BOOTSTRAPPING */ + +#endif /* FLUA_BOOTSTRAP_H */ diff --git a/libexec/flua/libfreebsd/kenv/Makefile b/libexec/flua/libfreebsd/kenv/Makefile index 1726c892c515..a1b388bb3612 100644 --- a/libexec/flua/libfreebsd/kenv/Makefile +++ b/libexec/flua/libfreebsd/kenv/Makefile @@ -1,5 +1,5 @@ SHLIB_NAME= kenv.so -SRCS+= kenv.c MAN= freebsd.kenv.3lua +.include "Makefile.inc" .include diff --git a/libexec/flua/libfreebsd/kenv/Makefile.inc b/libexec/flua/libfreebsd/kenv/Makefile.inc new file mode 100644 index 000000000000..05819c5280d9 --- /dev/null +++ b/libexec/flua/libfreebsd/kenv/Makefile.inc @@ -0,0 +1,2 @@ +.PATH: ${.PARSEDIR} +SRCS+= kenv.c diff --git a/libexec/flua/libfreebsd/kenv/kenv.c b/libexec/flua/libfreebsd/kenv/kenv.c index 954baa00facb..56b24c72904a 100644 --- a/libexec/flua/libfreebsd/kenv/kenv.c +++ b/libexec/flua/libfreebsd/kenv/kenv.c @@ -14,6 +14,8 @@ #include #include +#include "bootstrap.h" + int luaopen_freebsd_kenv(lua_State *L); static int @@ -94,3 +96,5 @@ luaopen_freebsd_kenv(lua_State *L) return (1); } + +FLUA_MODULE_NAMED(freebsd_kenv, "freebsd.kenv"); diff --git a/libexec/flua/libfreebsd/sys/linker/Makefile b/libexec/flua/libfreebsd/sys/linker/Makefile index 1adf547b503c..f1f65ad5f6c1 100644 --- a/libexec/flua/libfreebsd/sys/linker/Makefile +++ b/libexec/flua/libfreebsd/sys/linker/Makefile @@ -1,7 +1,6 @@ SHLIB_NAME= linker.so -SRCS+= linker.c - MAN= freebsd.sys.linker.3lua +.include "Makefile.inc" .include diff --git a/libexec/flua/libfreebsd/sys/linker/Makefile.inc b/libexec/flua/libfreebsd/sys/linker/Makefile.inc new file mode 100644 index 000000000000..da65c0070170 --- /dev/null +++ b/libexec/flua/libfreebsd/sys/linker/Makefile.inc @@ -0,0 +1,2 @@ +.PATH: ${.PARSEDIR} +SRCS+= linker.c diff --git a/libexec/flua/libfreebsd/sys/linker/linker.c b/libexec/flua/libfreebsd/sys/linker/linker.c index 87eccfb651f0..c78fbb2b39d2 100644 --- a/libexec/flua/libfreebsd/sys/linker/linker.c +++ b/libexec/flua/libfreebsd/sys/linker/linker.c @@ -15,6 +15,8 @@ #include #include +#include "bootstrap.h" + int luaopen_freebsd_sys_linker(lua_State *L); static int @@ -80,3 +82,5 @@ luaopen_freebsd_sys_linker(lua_State *L) return (1); } + +FLUA_MODULE_NAMED(freebsd_sys_linker, "freebsd.sys.linker"); diff --git a/libexec/flua/libhash/Makefile b/libexec/flua/libhash/Makefile index b7c8d7ee9948..9cbd6f15acae 100644 --- a/libexec/flua/libhash/Makefile +++ b/libexec/flua/libhash/Makefile @@ -1,9 +1,6 @@ SHLIB_NAME= hash.so -SRCS+= lhash.c - -LIBADD+= md - MAN= hash.3lua +.include "Makefile.inc" .include diff --git a/libexec/flua/libhash/Makefile.inc b/libexec/flua/libhash/Makefile.inc new file mode 100644 index 000000000000..d112dfe7df33 --- /dev/null +++ b/libexec/flua/libhash/Makefile.inc @@ -0,0 +1,3 @@ +.PATH: ${.PARSEDIR} +SRCS+= lhash.c +LIBADD+= md diff --git a/libexec/flua/libhash/lhash.c b/libexec/flua/libhash/lhash.c index 4587961fe8a0..7127ddc1d530 100644 --- a/libexec/flua/libhash/lhash.c +++ b/libexec/flua/libhash/lhash.c @@ -11,6 +11,8 @@ #include #include +#include "bootstrap.h" + #define SHA256_META "SHA256 meta table" #define SHA256_DIGEST_LEN 32 @@ -175,3 +177,5 @@ luaopen_hash(lua_State *L) return 1; } + +FLUA_MODULE(hash); diff --git a/libexec/flua/libjail/Makefile b/libexec/flua/libjail/Makefile index 20cd9f5f1429..b9c8bdc39095 100644 --- a/libexec/flua/libjail/Makefile +++ b/libexec/flua/libjail/Makefile @@ -1,9 +1,6 @@ SHLIB_NAME= jail.so -SRCS+= lua_jail.c - -LIBADD+= jail - MAN= jail.3lua +.include "Makefile.inc" .include diff --git a/libexec/flua/libjail/Makefile.inc b/libexec/flua/libjail/Makefile.inc new file mode 100644 index 000000000000..a896bf38c65b --- /dev/null +++ b/libexec/flua/libjail/Makefile.inc @@ -0,0 +1,3 @@ +.PATH: ${.PARSEDIR} +SRCS+= lua_jail.c +LIBADD+= jail diff --git a/libexec/flua/libjail/lua_jail.c b/libexec/flua/libjail/lua_jail.c index 9632db795775..8c3ec6c1d500 100644 --- a/libexec/flua/libjail/lua_jail.c +++ b/libexec/flua/libjail/lua_jail.c @@ -38,6 +38,8 @@ #include #include +#include "bootstrap.h" + #define JAIL_METATABLE "jail iterator metatable" /* @@ -716,3 +718,5 @@ luaopen_jail(lua_State *L) return (1); } + +FLUA_MODULE(jail); diff --git a/libexec/flua/liblyaml/Makefile b/libexec/flua/liblyaml/Makefile index e7a89d09bb9e..8d1432acd325 100644 --- a/libexec/flua/liblyaml/Makefile +++ b/libexec/flua/liblyaml/Makefile @@ -1,22 +1,4 @@ SHLIB_NAME= yaml.so -WARNS= 1 -LYAMLSRC?= ${SRCTOP}/contrib/lyaml -.PATH: ${LYAMLSRC}/ext/yaml ${LYAMLSRC}/lib/lyaml -SRCS= emitter.c \ - parser.c \ - scanner.c \ - yaml.c -CFLAGS+= \ - -I${LYAMLSRC}/ext/yaml \ - -I${SRCTOP}/contrib/libyaml/include \ - -DVERSION=\"6.2.8\" -LIBADD+= yaml - -FILES= explicit.lua \ - functional.lua \ - implicit.lua \ - init.lua -FILESDIR= ${SHAREDIR}/flua/lyaml - +.include "Makefile.inc" .include diff --git a/libexec/flua/liblyaml/Makefile.inc b/libexec/flua/liblyaml/Makefile.inc new file mode 100644 index 000000000000..caa1f37b57eb --- /dev/null +++ b/libexec/flua/liblyaml/Makefile.inc @@ -0,0 +1,20 @@ +WARNS= 1 + +LYAMLSRC?= ${SRCTOP}/contrib/lyaml +.PATH: ${LYAMLSRC}/ext/yaml ${LYAMLSRC}/lib/lyaml +SRCS+= emitter.c \ + parser.c \ + scanner.c \ + yaml.c +CFLAGS+= \ + -I${LYAMLSRC}/ext/yaml \ + -I${SRCTOP}/contrib/libyaml/include \ + -DVERSION=\"6.2.8\" +LIBADD+= yaml + +FILESGROUPS+= YAML +YAML= explicit.lua \ + functional.lua \ + implicit.lua \ + init.lua +YAMLDIR= ${SHAREDIR}/flua/lyaml diff --git a/libexec/flua/libucl/Makefile b/libexec/flua/libucl/Makefile index a88c8bda6bfc..32d76d1ea1ad 100644 --- a/libexec/flua/libucl/Makefile +++ b/libexec/flua/libucl/Makefile @@ -1,14 +1,4 @@ SHLIB_NAME= ucl.so -WARNS= 2 - -UCLSRC?= ${SRCTOP}/contrib/libucl -.PATH: ${UCLSRC}/lua -SRCS+= lua_ucl.c -CFLAGS+= \ - -I${UCLSRC}/include \ - -I${UCLSRC}/src \ - -I${UCLSRC}/uthash -LIBADD+= ucl - +.include "Makefile.inc" .include diff --git a/libexec/flua/libucl/Makefile.inc b/libexec/flua/libucl/Makefile.inc new file mode 100644 index 000000000000..70fb0f265635 --- /dev/null +++ b/libexec/flua/libucl/Makefile.inc @@ -0,0 +1,12 @@ +.if ${WARNS:U6} > 2 +WARNS= 2 +.endif + +UCLSRC?= ${SRCTOP}/contrib/libucl +.PATH: ${UCLSRC}/lua +SRCS+= lua_ucl.c +CFLAGS+= \ + -I${UCLSRC}/include \ + -I${UCLSRC}/src \ + -I${UCLSRC}/uthash +LIBADD+= ucl diff --git a/libexec/flua/linit_flua.c b/libexec/flua/linit_flua.c index b466b7872158..e5e38353ec9b 100644 --- a/libexec/flua/linit_flua.c +++ b/libexec/flua/linit_flua.c @@ -26,8 +26,8 @@ #include "lprefix.h" - #include +#include #include "lua.h" @@ -37,6 +37,8 @@ #include "lposix.h" #include "lfbsd.h" +#include "bootstrap.h" + /* ** these libs are loaded by lua.c and are readily available to any Lua ** program @@ -62,6 +64,28 @@ static const luaL_Reg loadedlibs[] = { {NULL, NULL} }; +#ifdef BOOTSTRAPPING +static void __attribute__((constructor)) flua_init_env(void) { + /* + * This happens in the middle of luaopen_package(). We could move it into + * flua_setup_mods(), but it seems better to avoid its timing being so + * important that it would break some of our bootstrap modules if someone + * were to reorder things. + */ + if (getenv("LUA_PATH") == NULL) + setenv("LUA_PATH", BOOTSTRAP_FLUA_PATH, 1); +} + +static void flua_setup_mods (lua_State *L) { + const luaL_Reg **flib; + + SET_FOREACH(flib, FLUA_MODULE_SETNAME) { + luaL_requiref(L, (*flib)->name, (*flib)->func, 1); + lua_pop(L, 1); /* remove lib */ + } +}; +#endif + LUALIB_API void luaL_openlibs (lua_State *L) { const luaL_Reg *lib; /* "require" functions from 'loadedlibs' and set results to global table */ @@ -69,4 +93,7 @@ LUALIB_API void luaL_openlibs (lua_State *L) { luaL_requiref(L, lib->name, lib->func, 1); lua_pop(L, 1); /* remove lib */ } +#ifdef BOOTSTRAPPING + flua_setup_mods(L); +#endif } diff --git a/tools/build/Makefile b/tools/build/Makefile index 3c4e07e3cfc2..09351900599a 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -497,6 +497,7 @@ INSTALLDIR_LIST= \ usr/include/casper \ usr/include/openssl \ usr/include/private/ucl \ + usr/include/private/yaml \ usr/include/private/zstd \ usr/lib \ usr/libdata/pkgconfig \ From nobody Sat Oct 4 02:17:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdq105dBZz69pTN; Sat, 04 Oct 2025 02:17:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdq1053kyz3k21; Sat, 04 Oct 2025 02:17:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759544228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qnViVQsfvSZjKhFnGWgCafT3uYwZrj05uKIJ1mGPBS0=; b=R1znVep/fuV6U9CHHN8NboRrIJvwGb0wTh18rAq/bKlHIRRAvV4gozF7hCosSsnzTE8OhR cP0UZnNDlLz4AaUIHqTrrXzS1jyV5fMCargm5jgRvkbLZsCvWpil+HF4o/Tq+hh5vsdH4U J+thXy2SAeQg9zssDS7TT5I25Dd/7YUisg+ir70d4YZ5+9qVQyArLUqN9EctvKSOlT1ow2 t8n4YvsICNVDcBfSi5jne49IJy2QjHac8ZWWegARP1SjUImKTRA7zYwKfAIdfASgNl9DUq kJOY/b5MGXBj9E3wlAvsQVTiurmWFCxu1Mfr6PllyiGA4fzqTBJ+lCYU5J7rMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759544228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qnViVQsfvSZjKhFnGWgCafT3uYwZrj05uKIJ1mGPBS0=; b=WqwCEHKuo0LXEg7UO1JScw1QAE5KJfLti4EfhlA/Mu8qomTVEH2Vf5qHq+XIrUhxpY5IGI rd5gGDGp68i4XAfUCtoDEudLU31ePC9SBlcARSvebT3fGO6huKzSoQBDWBE5n8WCY+eQO2 7M941Rjv4nBHuXjzfSlJRUVGPCYjoG9h+MXToOWqncWZFDi2VMqaC6Q0oPc7puz6Bu07Co 0GjK2zRAenryrbudPkW3qnzClmeig83P7f1LIFZaDcsJP5gfMTIT4OlFYxEvn3PTm49Gv9 VwOwpvhOvptjNZyAx7JCRrC28/Kaim1thBYytDfavAlZQYdCXitPJwzECx98pA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759544228; a=rsa-sha256; cv=none; b=e2fqxv5Ll04X8m3oot7SEERROtvFd5Wi3z/4T76d+LxhybEdZH98BmDZuRMMRMn0eem9v4 EJsNEzCrujSx/HKGA+HN6wCpbjQ7a8fUV6BAdNpDLiGJ0K4hD49IUNounz/Cy/S3dErMHE RBK1b0S90MceaN59Wqnpk1ZVQQWwjy54nyT9IaHrhjCq3YlMOdhWmStFEe3gDNGiaVyoKI GXGLjfbJa0ThIyaYz/UguZZv1gDOnu0tYDwW72I8htyUF4L0xQzh4Je5/bMtLq3T/vF9/P +mV3YjpOd5Pbot4UyeX1HXk7HoccV8mfKuvIC0t8/yOJluRk1J4n2GF7x8wJ/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdq104STWz65j; Sat, 04 Oct 2025 02:17:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5942H85b020926; Sat, 4 Oct 2025 02:17:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5942H8ew020923; Sat, 4 Oct 2025 02:17:08 GMT (envelope-from git) Date: Sat, 4 Oct 2025 02:17:08 GMT Message-Id: <202510040217.5942H8ew020923@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: b11a5709ec2b - main - flua: kick out the remaining builtin modules 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b11a5709ec2b61fefb03bfdd38e2f06d2c1107c1 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=b11a5709ec2b61fefb03bfdd38e2f06d2c1107c1 commit b11a5709ec2b61fefb03bfdd38e2f06d2c1107c1 Author: Kyle Evans AuthorDate: 2025-10-04 02:16:51 +0000 Commit: Kyle Evans CommitDate: 2025-10-04 02:16:51 +0000 flua: kick out the remaining builtin modules Bootstrap flua has some magic now to handle modules by building them in and discovering them via linker sets. This is slightly cleaner than always building them in and baking them into loadedlibs for both bootstrap and system flua. Adjust the stand build now that these three libs have their own new homes. Reviewed by: bapt, emaste Differential Revision: https://reviews.freebsd.org/D51891 --- libexec/flua/Makefile | 4 +++- libexec/flua/lfbsd/Makefile | 5 +++++ libexec/flua/lfbsd/Makefile.inc | 2 ++ libexec/flua/{modules => lfbsd}/lfbsd.c | 4 ++++ libexec/flua/{modules => lfbsd}/lfbsd.h | 0 libexec/flua/lfs/Makefile | 5 +++++ libexec/flua/lfs/Makefile.inc | 2 ++ libexec/flua/{modules => lfs}/lfs.c | 7 ++++++- libexec/flua/{modules => lfs}/lfs.h | 0 libexec/flua/libhash/lhash.c | 2 ++ libexec/flua/linit_flua.c | 7 ------- libexec/flua/lposix/Makefile | 5 +++++ libexec/flua/lposix/Makefile.inc | 2 ++ libexec/flua/{modules => lposix}/lposix.c | 5 +++++ libexec/flua/{modules => lposix}/lposix.h | 0 stand/liblua/Makefile | 2 +- stand/loader.mk | 2 +- 17 files changed, 43 insertions(+), 11 deletions(-) diff --git a/libexec/flua/Makefile b/libexec/flua/Makefile index 29d57211b2ae..cc750e30525f 100644 --- a/libexec/flua/Makefile +++ b/libexec/flua/Makefile @@ -6,6 +6,8 @@ # than mucking about with the infrastructure to make them linkable -- thus, why # these are all structured to have a Makefile that describes what we want # *installed*, and a Makefile.inc that describes what we need to *build*. +FLUA_MODULES+= lfbsd +FLUA_MODULES+= lfs FLUA_MODULES+= libhash .ifndef BOOTSTRAPPING # Bootstrap flua can't usefully do anything with libjail anyways, because it @@ -14,6 +16,7 @@ FLUA_MODULES+= libjail .endif FLUA_MODULES+= libucl FLUA_MODULES+= liblyaml +FLUA_MODULES+= lposix .ifdef BOOTSTRAPPING # libfreebsd is generally omitted from the bootstrap flua because its @@ -52,7 +55,6 @@ SRCS+= lua.c # FreeBSD Extensions .PATH: ${.CURDIR}/modules SRCS+= linit_flua.c -SRCS+= lfs.c lposix.c lfbsd.c CFLAGS+= -I${SRCTOP}/lib/liblua -I${.CURDIR}/modules -I${LUASRC} CFLAGS+= -DLUA_PROGNAME="\"${PROG}\"" diff --git a/libexec/flua/lfbsd/Makefile b/libexec/flua/lfbsd/Makefile new file mode 100644 index 000000000000..e2a4aae14bcd --- /dev/null +++ b/libexec/flua/lfbsd/Makefile @@ -0,0 +1,5 @@ +SHLIB_NAME= fbsd.so +WARNS?= 3 + +.include "Makefile.inc" +.include diff --git a/libexec/flua/lfbsd/Makefile.inc b/libexec/flua/lfbsd/Makefile.inc new file mode 100644 index 000000000000..7a78ef82e0fc --- /dev/null +++ b/libexec/flua/lfbsd/Makefile.inc @@ -0,0 +1,2 @@ +.PATH: ${.PARSEDIR} +SRCS+= lfbsd.c diff --git a/libexec/flua/modules/lfbsd.c b/libexec/flua/lfbsd/lfbsd.c similarity index 99% rename from libexec/flua/modules/lfbsd.c rename to libexec/flua/lfbsd/lfbsd.c index ef660ba9fd77..541b6c9611df 100644 --- a/libexec/flua/modules/lfbsd.c +++ b/libexec/flua/lfbsd/lfbsd.c @@ -40,6 +40,8 @@ #include "lauxlib.h" #include "lfbsd.h" +#include "bootstrap.h" + #define FBSD_PROCESSHANDLE "fbsd_process_t*" struct fbsd_process { @@ -283,3 +285,5 @@ luaopen_fbsd(lua_State *L) return (1); } + +FLUA_MODULE(fbsd); diff --git a/libexec/flua/modules/lfbsd.h b/libexec/flua/lfbsd/lfbsd.h similarity index 100% rename from libexec/flua/modules/lfbsd.h rename to libexec/flua/lfbsd/lfbsd.h diff --git a/libexec/flua/lfs/Makefile b/libexec/flua/lfs/Makefile new file mode 100644 index 000000000000..3df83d6d2fc1 --- /dev/null +++ b/libexec/flua/lfs/Makefile @@ -0,0 +1,5 @@ +SHLIB_NAME= lfs.so +WARNS?= 3 + +.include "Makefile.inc" +.include diff --git a/libexec/flua/lfs/Makefile.inc b/libexec/flua/lfs/Makefile.inc new file mode 100644 index 000000000000..9d40c42dc0e6 --- /dev/null +++ b/libexec/flua/lfs/Makefile.inc @@ -0,0 +1,2 @@ +.PATH: ${.PARSEDIR} +SRCS+= lfs.c diff --git a/libexec/flua/modules/lfs.c b/libexec/flua/lfs/lfs.c similarity index 99% rename from libexec/flua/modules/lfs.c rename to libexec/flua/lfs/lfs.c index 8cb8d6fc9fed..517e16ae65c8 100644 --- a/libexec/flua/modules/lfs.c +++ b/libexec/flua/lfs/lfs.c @@ -66,9 +66,10 @@ #ifdef _STANDALONE #include "lstd.h" #include "lutils.h" -#include "bootstrap.h" #endif +#include "bootstrap.h" + #ifndef nitems #define nitems(x) (sizeof((x)) / sizeof((x)[0])) #endif @@ -446,3 +447,7 @@ luaopen_lfs(lua_State *L) #endif return 1; } + +#ifndef _STANDALONE +FLUA_MODULE(lfs); +#endif diff --git a/libexec/flua/modules/lfs.h b/libexec/flua/lfs/lfs.h similarity index 100% rename from libexec/flua/modules/lfs.h rename to libexec/flua/lfs/lfs.h diff --git a/libexec/flua/libhash/lhash.c b/libexec/flua/libhash/lhash.c index 7127ddc1d530..f455f006bf27 100644 --- a/libexec/flua/libhash/lhash.c +++ b/libexec/flua/libhash/lhash.c @@ -178,4 +178,6 @@ luaopen_hash(lua_State *L) return 1; } +#ifndef _STANDALONE FLUA_MODULE(hash); +#endif diff --git a/libexec/flua/linit_flua.c b/libexec/flua/linit_flua.c index e5e38353ec9b..bb3748daefb4 100644 --- a/libexec/flua/linit_flua.c +++ b/libexec/flua/linit_flua.c @@ -33,9 +33,6 @@ #include "lualib.h" #include "lauxlib.h" -#include "lfs.h" -#include "lposix.h" -#include "lfbsd.h" #include "bootstrap.h" @@ -57,10 +54,6 @@ static const luaL_Reg loadedlibs[] = { #if defined(LUA_COMPAT_BITLIB) {LUA_BITLIBNAME, luaopen_bit32}, #endif - /* FreeBSD Extensions */ - {"lfs", luaopen_lfs}, - {"posix", luaopen_posix}, - {"fbsd", luaopen_fbsd}, {NULL, NULL} }; diff --git a/libexec/flua/lposix/Makefile b/libexec/flua/lposix/Makefile new file mode 100644 index 000000000000..92321d51be9a --- /dev/null +++ b/libexec/flua/lposix/Makefile @@ -0,0 +1,5 @@ +SHLIB_NAME= posix.so +WARNS?= 3 + +.include "Makefile.inc" +.include diff --git a/libexec/flua/lposix/Makefile.inc b/libexec/flua/lposix/Makefile.inc new file mode 100644 index 000000000000..499e6779e84d --- /dev/null +++ b/libexec/flua/lposix/Makefile.inc @@ -0,0 +1,2 @@ +.PATH: ${.PARSEDIR} +SRCS+= lposix.c diff --git a/libexec/flua/modules/lposix.c b/libexec/flua/lposix/lposix.c similarity index 99% rename from libexec/flua/modules/lposix.c rename to libexec/flua/lposix/lposix.c index 75cdd345aeaa..430bb6f28baf 100644 --- a/libexec/flua/modules/lposix.c +++ b/libexec/flua/lposix/lposix.c @@ -21,6 +21,8 @@ #include "lauxlib.h" #include "lposix.h" +#include "bootstrap.h" + static void enforce_max_args(lua_State *L, int max) { @@ -697,3 +699,6 @@ luaopen_posix(lua_State *L) return (1); } + +/* Only this one needed in our bootstrap set, it will load the others. */ +FLUA_MODULE(posix); diff --git a/libexec/flua/modules/lposix.h b/libexec/flua/lposix/lposix.h similarity index 100% rename from libexec/flua/modules/lposix.h rename to libexec/flua/lposix/lposix.h diff --git a/stand/liblua/Makefile b/stand/liblua/Makefile index ce7eb89fe494..b1c34ec0a466 100644 --- a/stand/liblua/Makefile +++ b/stand/liblua/Makefile @@ -24,7 +24,7 @@ SRCS+= lauxlib.c lbaselib.c lstrlib.c loadlib.c SRCS+= lerrno.c lpager.c lstd.c lutils.c SRCS+= gfx_utils.c -.PATH: ${FLUASRC}/modules +.PATH: ${FLUASRC}/lfs SRCS+= lfs.c .PATH: ${FLUALIB}/libhash SRCS+= lhash.c diff --git a/stand/loader.mk b/stand/loader.mk index 4073e523e552..e26ba1401912 100644 --- a/stand/loader.mk +++ b/stand/loader.mk @@ -89,7 +89,7 @@ SRCS+= interp_lua.c .include "${BOOTSRC}/lua.mk" LDR_INTERP= ${LIBLUA} LDR_INTERP32= ${LIBLUA32} -CFLAGS.interp_lua.c= -DLUA_PATH=\"${LUAPATH}\" -I${FLUASRC}/modules +CFLAGS.interp_lua.c= -DLUA_PATH=\"${LUAPATH}\" -I${FLUASRC}/lfs .elif ${LOADER_INTERP} == "4th" SRCS+= interp_forth.c .include "${BOOTSRC}/ficl.mk" From nobody Sat Oct 4 02:23: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 4cdq7z5Zlpz69qPH; Sat, 04 Oct 2025 02:23:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdq7z4sVHz3lp3; Sat, 04 Oct 2025 02:23:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759544591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Aexx652YRwNKKiKfAXrgI6U3wezGIMO6ja7R0o9fqQ=; b=gyBkOeULkw4PaybRg52Ch7dAa5U9gEBUR/KqjL3UIPiROHLSy/dAP6tH05cTsTqBKPtK7J goX7rtCtXaRUUSdNoan9FIa2ZElAqjp7TgeTflcAIy/mpjNhlnZbq6nuN7tFbM78mvY7Gl gdRbnzgZ8lXf98eWKZgCJcH4Rfqr4U5ysKt4scSX3KWtjtbF1pDVNMd1Akffdt5IMZhP0t DlHgXJLAWUX420JJ8gMkvztTmlvHTH77AqA06S4qnTlx3bqIvTrtsr53fcMOBkju1OeJ69 teD1/7K2+aHvAxXKa5gtH1bffGFx0LlXYB4XoCMoW8PJp7PB/XuTtcYXa8idgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759544591; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4Aexx652YRwNKKiKfAXrgI6U3wezGIMO6ja7R0o9fqQ=; b=lqNDeEJmbFZ4EPwwcaTsx/cF4gqtaKSzQJW7bWZ/Ubi30iJget7wVUXENCGAS2ORW7DSCz 531iFaxtnjdi5tNEqX+KB9MP6iBLK79GjH3pKlulklfVCpsFH8nCKXAUUrYyamBEC4OQ92 uDodFtZedUu5okl2tgSsUwe9E6hyAVJsh3bT4YFHxyRY0InUN6vojMS9RdHtG7lc6CL3hY UvSJUFzhKLHig+65FdOBN3n1oc7gGy0dpBHzz/tS2ynZeteM4M+95SYTtuy1UuXcBUOZgw 8/h0Dq9u8xTovsqVPtpauIu+oOEEgrNK9kDHjuZA5N3QpwXjTUlAub+cX2po4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759544591; a=rsa-sha256; cv=none; b=Sv+GN3+bNNpIGs42ewk+EOYYFujEXW3l8W1Wcj39FJOxAtUcNdhEskgXDDmRsdvgxMMw9g zDWioa8S6/ge0qDn18GgJWV36ePaNq0Z9zsrSKp+HhuYj5h03bLDEiaFfZQY/oUAVWh6p4 WiN4VcNkeKX7qNJdNvS3XbPNNSXq3r4U5Ayt8ilyWLem9t7TgCM1q2cgZTdB5J+VebaqiO 88BentoJed9ndmBS92mUXBlKaiouQWqwszddoH+Dkoht25ylpUCWqj9q9zeqEtHZE7Gzq9 SKvRv07/oY3pai8JywJhYXOlRMo6xmMxFoah2PLjWJI6eG0dDPXhMMK4BtTVBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdq7z48B2z66X; Sat, 04 Oct 2025 02:23:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5942NBwV037914; Sat, 4 Oct 2025 02:23:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5942NBCf037911; Sat, 4 Oct 2025 02:23:11 GMT (envelope-from git) Date: Sat, 4 Oct 2025 02:23:11 GMT Message-Id: <202510040223.5942NBCf037911@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 6cc493c79d9b - main - mtx: remove stale commentary about inlined spinlock ops 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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6cc493c79d9b9f8318c87d3d6bfd225924cc933b Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=6cc493c79d9b9f8318c87d3d6bfd225924cc933b commit 6cc493c79d9b9f8318c87d3d6bfd225924cc933b Author: Mateusz Guzik AuthorDate: 2025-10-04 02:20:37 +0000 Commit: Mateusz Guzik CommitDate: 2025-10-04 02:20:37 +0000 mtx: remove stale commentary about inlined spinlock ops While both locking and unlocking a spinlock used to be inline, this changed when spinlock_enter/spinlock_exit got introduced, defeating the point of inlining them. This either needs to have inlined spinlock enter/exit in place or have mtx lock/unlock as function calls with the irq flags inlined in there. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/sys/mutex.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/sys/mutex.h b/sys/sys/mutex.h index 08d4e2d28b33..b534a74626bc 100644 --- a/sys/sys/mutex.h +++ b/sys/sys/mutex.h @@ -246,10 +246,10 @@ void _thread_lock(struct thread *); }) /* - * Lock a spin mutex. For spinlocks, we handle recursion inline (it - * turns out that function calls can be significantly expensive on - * some architectures). Since spin locks are not _too_ common, - * inlining this code is not too big a deal. + * Lock a spin mutex. + * + * FIXME: spinlock_enter is a function call, defeating the point of inlining in + * this. */ #ifdef SMP #define __mtx_lock_spin(mp, tid, opts, file, line) __extension__ ({ \ @@ -317,10 +317,10 @@ void _thread_lock(struct thread *); }) /* - * Unlock a spin mutex. For spinlocks, we can handle everything - * inline, as it's pretty simple and a function call would be too - * expensive (at least on some architectures). Since spin locks are - * not _too_ common, inlining this code is not too big a deal. + * Unlock a spin mutex. + * + * FIXME: spinlock_exit is a function call, defeating the point of inlining in + * this. * * Since we always perform a spinlock_enter() when attempting to acquire a * spin lock, we need to always perform a matching spinlock_exit() when From nobody Sat Oct 4 03:02:28 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 4cdr1J38bcz69tkH; Sat, 04 Oct 2025 03:02:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdr1J2jtGz3plL; Sat, 04 Oct 2025 03:02:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759546948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4dKLdvxaOgJxgjINGK0PUbQI6NlV7naIGRc4rLoLZPo=; b=SdzcLI7YxqXNVaukJyI8zx9SOojrnlFJZ1LPYiZMgLkYTkp2T/8DDIwcqIp0DW8CODC25S vTM+E+C1RCSbMTegg8Hmeivl2rhwjJqxNr7z/6lb2Y/Bh6x9qGjp5Le+D2zWIxLdvon8Mf Z9pycNyrGCP+QhJUmlBc2iSd9UBAP4XNrwj+Cv/2Klw5O/OflqaOTiWAK4aibIbGT9ckjT yYlAJKsCOmtaIPnZNCZ8rgzz2vwgYsZ0pYxbDYXdLcTqv/i/eQp4ZHHQb0pgxxpc3mF3SA GjCaKUOFlrXKIVxDWqT2uJ78eHy1K6a0GDGw7xuiCEnIl8EXVu9QltDxZZhUIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759546948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4dKLdvxaOgJxgjINGK0PUbQI6NlV7naIGRc4rLoLZPo=; b=JGr4ljdj4HoxBtqKo8+0041MCkCIiKj8ftZDp3JOm6sde6cBtz94bV7Y0pzuOq83/yCEiq GdJsgr/hSx5FlAVlo7i8MIatDf7RQO0caNtj7OF0y3mbN/PjbpsF5lA5jPC5J3pWhhEDpO 7ugBQS3J/ijuPUZGM6AN3cmCN+hBywxQ5zj2dm/YNr+HZ4/iebnE9znzn8Z7xfKtnWfcZg qKNnUJATUJEA8wqEOvhhaHI1ZoxoTDQvZOOyb0M161vC6Y6qtIQM+4RoXHQHLW9ivWhjiH 85d9rvEAOU15aR7Yjy0hu+nuvY2ea3AgbUfVE3sMoMWxM6eo2IIXJWNxjjF5Cw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759546948; a=rsa-sha256; cv=none; b=tJmJDQB0bLU+u9j/zksQRBmp028hZsnUMu7Jvqeh/iAKRPT8Y8uKxMuCIp1hi/QbZDmBtS 78yqdAtOUti7BBAlJ8SxucPggAWX9NfUcm13V2zjSvc0AoK7QU18s+uEkdfphH9vZJnp+7 kVyVHI7frPgm1l5q3CEgnPgJGezIkrc3IHHacVq1GOaJNP5+g5OQiTZZ8ms0x/5IsDcu2O WORR4rHU9JH8X58BPB+gQ1AWvMjJEVKWY7+l7Bc2vRxUnudwTGYVeWNea14ZvoIb/YL8yp +G7NF/1+x2wbRbYeKVhPA8tUbybaqgx0/jA7D5Rat0G8XP7adtLUg4hcipKjyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdr1J2FPmz7Yw; Sat, 04 Oct 2025 03:02:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59432SaC014846; Sat, 4 Oct 2025 03:02:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59432ShH014843; Sat, 4 Oct 2025 03:02:28 GMT (envelope-from git) Date: Sat, 4 Oct 2025 03:02:28 GMT Message-Id: <202510040302.59432ShH014843@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: f53137556059 - main - iwx: add some missed beacon debugging 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: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f53137556059764f5c028880d09d3c234877d37f Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=f53137556059764f5c028880d09d3c234877d37f commit f53137556059764f5c028880d09d3c234877d37f Author: Adrian Chadd AuthorDate: 2025-09-14 19:36:18 +0000 Commit: Adrian Chadd CommitDate: 2025-10-04 02:54:30 +0000 iwx: add some missed beacon debugging I'm seeing random disconnects in iwx without any useful information as to why. I'll start by adding missed beacon debugging here; hopefully they're generally useful. Differential Revision: https://reviews.freebsd.org/D52524 Reviewed by: bz --- sys/dev/iwx/if_iwx.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/dev/iwx/if_iwx.c b/sys/dev/iwx/if_iwx.c index 8422fcb787c3..5be7f2755598 100644 --- a/sys/dev/iwx/if_iwx.c +++ b/sys/dev/iwx/if_iwx.c @@ -4890,11 +4890,19 @@ iwx_rx_bmiss(struct iwx_softc *sc, struct iwx_rx_packet *pkt, bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); + IWX_DPRINTF(sc, IWX_DEBUG_BEACON, + "%s: mac_id=%u, cmslrx=%u, cmb=%u, neb=%d, nrb=%u\n", + __func__, + le32toh(mbn->mac_id), + le32toh(mbn->consec_missed_beacons_since_last_rx), + le32toh(mbn->consec_missed_beacons), + le32toh(mbn->num_expected_beacons), + le32toh(mbn->num_recvd_beacons)); + missed = le32toh(mbn->consec_missed_beacons_since_last_rx); if (missed > vap->iv_bmissthreshold) { ieee80211_beacon_miss(ic); } - } static int @@ -8985,10 +8993,10 @@ iwx_rx_pkt(struct iwx_softc *sc, struct iwx_rx_data *data, struct mbuf *ml) break; case IWX_MISSED_BEACONS_NOTIFICATION: + IWX_DPRINTF(sc, IWX_DEBUG_BEACON, + "%s: IWX_MISSED_BEACONS_NOTIFICATION\n", + __func__); iwx_rx_bmiss(sc, pkt, data); - DPRINTF(("%s: IWX_MISSED_BEACONS_NOTIFICATION\n", - __func__)); - ieee80211_beacon_miss(ic); break; case IWX_MFUART_LOAD_NOTIFICATION: From nobody Sat Oct 4 03:02:29 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdr1K4Jc2z69vGb; Sat, 04 Oct 2025 03:02:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdr1K3dbWz3pfX; Sat, 04 Oct 2025 03:02:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759546949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ceGVa8OcMqBVFg1LSqMNPgQv4kVkpP07GRY5qPGW3Lk=; b=msr5BT62p657eaaUlkw1j1oRf37QoKFfizOKY777sZV533W69YbVUgnsip4Uc4UwED3nOY tgKAMHbBKTI6WDGzW80/su+iZX0JbdvrNdj9T53jz2L5koBVfTGFhZGQ39ArEW33yjfEmf j2Afo2sljigTo5HyN1bYNRRxxNsj6750LK+QELkYuu64sqwVanPtIOPFLobIfzSLE0FRJ6 8UY1O5XbV3LpWkhaJ2uaYrgL2qc4KJs32Qn+kc26CwA0X+1lNNYrHX4quiPTuqXeGILiB9 ZopAx/iN4C6zl2MPpN6udkU2gs6Ig6V3xtIEhxiMwVoPgPRnlfUQOSeBXqK5BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759546949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ceGVa8OcMqBVFg1LSqMNPgQv4kVkpP07GRY5qPGW3Lk=; b=L6x7t0C6nddW3u25WLNWBg19ViLdXW/G6jVMhpltgLovHNwYdww6nmKXUC6ov5LmSySbZc PjgY7/12LacBiNnWK2KkWRDhh75+hT74eRPS/pcr98Xsb926qVficrCEqa+XhTwbh4f2Sn tWHH8AfM4MQ7xLnJ0M0n1j7cLI8rdzqnFiRf5bf9eQd57vVr7/CdyexQUXH6qS5R6k6s+q Wkyy9gNrbUBzI1ZD017vtIX+h1cF0MeGtM2wEO396W6jtILQ6Gbvdkha0ySz3K//FK9uDi MOdVZNc/oBRqvnWyqn2OZE1KhShgN0h0Z7siSq9oXcK73Yw2DrbGgkVDsBZsqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759546949; a=rsa-sha256; cv=none; b=H7wwPW7YfUJHNGExs4ejY8iNNZJPCIcya4A1bO/RvBFOL307ZGynvobZ+MHHlYXCEbSi5V dDp+PwgYUzQMr70Z/C9R9zpKO+T2C0uaIhV5MVGG+n/sV1lUfpQilaIKNrMPbLi6dld2K+ 8AqQzsKTwlTESdMI2pi8L8gAnGz82Ga8ie7bmArFtbGxlSlBLCsBOw0GtSrceVB2pnTLw0 CjuV2xxlBTCZJCJrIFDvKm92n3EoLFxd4MBrHxjkhtbt5O3Rmdyn5P23xSVWCn6W373NKs 707ZM74cOFX3CncLXonntvFe1vxoIPmvoPTfF2cS0AKnAOxz/4eESBvvCPkJDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdr1K3FL3z7Yl; Sat, 04 Oct 2025 03:02:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59432TL5014879; Sat, 4 Oct 2025 03:02:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59432TrW014876; Sat, 4 Oct 2025 03:02:29 GMT (envelope-from git) Date: Sat, 4 Oct 2025 03:02:29 GMT Message-Id: <202510040302.59432TrW014876@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 262172de955f - main - iwx: add some lock assertions in the TX start path List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 262172de955ff09f5029039f0d823996a63ff3d1 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=262172de955ff09f5029039f0d823996a63ff3d1 commit 262172de955ff09f5029039f0d823996a63ff3d1 Author: Adrian Chadd AuthorDate: 2025-09-21 04:55:45 +0000 Commit: Adrian Chadd CommitDate: 2025-10-04 02:55:14 +0000 iwx: add some lock assertions in the TX start path The locking paths into these routines LOOK correct, but I figured it'd be good to at least enforce we're not doing concurrent entry into iwx_start() / iwx_tx() without the lock held. Differential Revision: https://reviews.freebsd.org/D52655 Reviewed by: thj --- sys/dev/iwx/if_iwx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/dev/iwx/if_iwx.c b/sys/dev/iwx/if_iwx.c index 5be7f2755598..557b5a7a1ca2 100644 --- a/sys/dev/iwx/if_iwx.c +++ b/sys/dev/iwx/if_iwx.c @@ -4805,6 +4805,8 @@ iwx_rx_tx_cmd(struct iwx_softc *sc, struct iwx_rx_packet *pkt, static void iwx_clear_oactive(struct iwx_softc *sc, struct iwx_tx_ring *ring) { + IWX_ASSERT_LOCKED(sc); + if (ring->queued < iwx_lomark) { sc->qfullmsk &= ~(1 << ring->qid); if (sc->qfullmsk == 0 /* && ifq_is_oactive(&ifp->if_snd) */) { @@ -5630,6 +5632,8 @@ iwx_tx(struct iwx_softc *sc, struct mbuf *m, struct ieee80211_node *ni) struct mbuf *m1; size_t txcmd_size; + IWX_ASSERT_LOCKED(sc); + wh = mtod(m, struct ieee80211_frame *); type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK; subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK; @@ -8534,6 +8538,8 @@ iwx_start(struct iwx_softc *sc) struct ieee80211_node *ni; struct mbuf *m; + IWX_ASSERT_LOCKED(sc); + while (sc->qfullmsk == 0 && (m = mbufq_dequeue(&sc->sc_snd)) != NULL) { ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; if (iwx_tx(sc, m, ni) != 0) { From nobody Sat Oct 4 03:02:30 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdr1L6YYGz69vB0; Sat, 04 Oct 2025 03:02:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdr1L4Kxdz3pjJ; Sat, 04 Oct 2025 03:02:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759546950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qb1A9qjHcwtkHKP2xqON4fa1cBQoAAAfoPcQl+F/wrE=; b=ryjtq5REnYKf6qFvMTL3UbLHY9howG+fv8jjVK1TJoiIXxmOjP30tjgM6vSlmsf4UDXEko FKi4Lvl7i0ntqEAtyVVPBKFy282B+ZbCP7mcY2KHklIbKX4DmpVp/sk10V0RhgGUnrex37 ooi4abRKyEJFmbTN/Dt19BOta7gbZOVp5KzH/+OJQrvFcgiL5czgVe24jpcwuGtHmPksjG LFP9m6x9eXqIwDeLRtIe4eymCvRi9Lh/leUiDDO+epgFq05bBPm0Km4O4wCRyK9tBWC2Nn ATp/nVGIHuosJtTWj4/aKh7ACSyNR537a/uGlFq0ZPelv6salgWD+D/KtA8MIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759546950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qb1A9qjHcwtkHKP2xqON4fa1cBQoAAAfoPcQl+F/wrE=; b=mhft2pgX/wqEbz33QdIdqhIwizZBPsy79UqPB72aSyE9q6Pu/eDel3e3BlVnggCxP0iATW 4kp7TS7sqjCd54iO3O2/pDEJp9XasH3uIdkhUE9XbbeGayduVesSRr0lkCeW91oaJvJOT6 wjZTnghKxA4egX4Qbr5uMUOxEn/gY6LRzP5Fz6fce/3H3CkdQvinh4Fg/ruXYH1K8M+vBw H4MQhx5paM3iZ+XSPG1lp13rD9vZcioGPqNeFMI8jE4rFdh/pdVgXqdHGIrfHgR36po57W FsxLevw1hdo08Mhb4D0+KceWSXRl4oiReTkNjl6iXmUB0wUmOsKCUr9ybTUS2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759546950; a=rsa-sha256; cv=none; b=c4LRPVYTt9komlOu4A28AhLa32f+KjEv0lkMH+kDIDHXikDTBdJE74U9QEKpPiNiado4Lx PX+DXLFzAQ+e2LqskE9ed1znFL7ayC6CH++FC75n05+EPJhnFsaRPTciBNbKGPw1hHJn0a tGkTx9ZQCUFacKIPN0b+7HHz0Ec4sJ459fBe/z1a+c5Jidmm5Qnas1c1Po10EQfO9JDSIN CkHK5xWV8pSquTWR4w2CYdk9IxfUKBKRsA3iShs0Rks9PqsM0OmsB7aUKpXTrk8J8M4FtW ESpG0G375IxINNfhO/jwdXdhcAAjFon2WCwnOpvkft1UW+JfybTDjIyyH58l5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdr1L3sv7z7FS; Sat, 04 Oct 2025 03:02:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59432UgJ014916; Sat, 4 Oct 2025 03:02:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59432UNG014913; Sat, 4 Oct 2025 03:02:30 GMT (envelope-from git) Date: Sat, 4 Oct 2025 03:02:30 GMT Message-Id: <202510040302.59432UNG014913@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 88f467bd1a11 - main - iwx: don't log VHT rate lookups in iwx_tx_fill_cmd() for data frames 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: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 88f467bd1a113b65cebcb6eca145dbd3bea72adc Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=88f467bd1a113b65cebcb6eca145dbd3bea72adc commit 88f467bd1a113b65cebcb6eca145dbd3bea72adc Author: Adrian Chadd AuthorDate: 2025-09-28 03:13:06 +0000 Commit: Adrian Chadd CommitDate: 2025-10-04 02:55:40 +0000 iwx: don't log VHT rate lookups in iwx_tx_fill_cmd() for data frames iwx is now logging a lot of stuff to the kernel when associated at VHT rates. It's my fault; the replacement tx rate APIs print out a warning when you're handing the legacy rate /HT rate APIs a VHT rate. However all of the supported chipsets in iwx will be pushing the rate control entirely into firmware. We don't need to do per-frame TX rate control like in previous chips. So for now, just put in an if (rate == VHT) into the path and a TODO comment. A few lines later the function will just skip the rate assignment stuff for data frames, thus saving us the logging. The other paths (control traffic, multicast traffic) uses legacy rates / HT rates by default and won't trigger a warning log. Yes, iwx_tx_fill_cmd() really does deserve a rate control logic rewrite, but I want to fix this particular issue first. Locally tested: * AX210, STA mode, HT and VHT associations Differential Revision: https://reviews.freebsd.org/D52766 Reviewed by: thj --- sys/dev/iwx/if_iwx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/iwx/if_iwx.c b/sys/dev/iwx/if_iwx.c index 557b5a7a1ca2..d2d435545e27 100644 --- a/sys/dev/iwx/if_iwx.c +++ b/sys/dev/iwx/if_iwx.c @@ -5501,6 +5501,9 @@ iwx_tx_fill_cmd(struct iwx_softc *sc, struct iwx_node *in, /* for non-data, use the lowest supported rate */ ridx = min_ridx; *flags |= IWX_TX_FLAGS_CMD_RATE; + } else if (ni->ni_flags & IEEE80211_NODE_VHT) { + /* TODO: VHT - the ridx / rate array doesn't have VHT rates yet */ + ridx = iwx_min_basic_rate(ic); } else if (ni->ni_flags & IEEE80211_NODE_HT) { ridx = iwx_mcs2ridx[ieee80211_node_get_txrate_dot11rate(ni) & ~IEEE80211_RATE_MCS]; From nobody Sat Oct 4 03:02:31 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdr1N1046z69vDT; Sat, 04 Oct 2025 03:02:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdr1M5dVPz3pXk; Sat, 04 Oct 2025 03:02:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759546951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oyzWdd7zY64hZZ7z18phGLGmWVgTze+iz//D0Alb1sk=; b=tiExhYs+ztMVYYMUSCWcqjzSkDjaxj73GLfpBRb5Lr9Wh74D/6Bv40m48v8iE45HgLoE3o GI/KH5WPIz7UrbAbwSYclA8YMo45tMf5GkI05m9pzdzZeZ6EKb4QVi/qKVYj0I33zMCpA/ KI/9U2VubJxiqMOV/J0Of6gJpNS6BLXXquj3DWR8uq9qT/I1f4NIydNH9gDdR7dVPYJnA5 EPr2Gg2C+Thmk480M6ZmzaMUbgxVKVr6yX6hDGMO/4mpoTiKhf+c86yOHtGv94OgaEwnjv FdCbi0R3U7RoWpdsLJcTFgDuqa3+jrBewuxMxvvPL7wwFGI/W7Eue4UdHfLlBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759546951; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oyzWdd7zY64hZZ7z18phGLGmWVgTze+iz//D0Alb1sk=; b=bMvVyUq8G4dMe5cx5UXkFkaECI5R3eXhk2t5jdgK1TMXKEn/p+OZDKzlgQ11yAfgE9kNzA ksK5FhQl0c9zWPlFt0DbVxHmS0TDyKcttIvG6S3iY9g7NUje8oZy6lpO97KoUKCiywHNjq +UvOMqAqrnk78l7lINzxz+V534+ENdXq1xhp04pGaUCZhN9TVa+L95egueUG3Pcd1EABfc bUmwTi5rdpkLnuplau1EC1niiRnVAUWHoR7Ii0uT4IZbspFiuv9WT3y8+Ojv4RF6cYbbuN PUXU4HXLRju21INMFQL2oePZyiUMuYKhEikjpmaJF23giHrUJvkNaL4sYhuY/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759546951; a=rsa-sha256; cv=none; b=a+YN0azkrEm+3UEbJUwXj5pCtGWKK8n1e3LvbJukQ4+rH3OxMgmsVBnaV93SPfW5mlLjH5 vTPx8FMyYw4u3v1Vpd4R3uFQz6d2uwcQdJJrgyOXFUNBr5FoM+fatoRWYJFQaxg/V+aZF2 P5aQv6DVlYmIACXwk+r3PGZJERqwiyfNJJnRLY8ZvFoWwm9fWwc/wM/cxe9utiZSuypK0f 8p5tdNGG+qd6ZKBCMt7xYO67eWN6xEZZyTI9g03DDyLhv2Tb1EFNFvObpLsx0LbldNVBVb MPYrGnkhhhAh4fEHYulR9mCyzls+5HMgooQ9+cvuJgVud/3PwWEccSPraampKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdr1M5CnFz6ft; Sat, 04 Oct 2025 03:02:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59432VGh014953; Sat, 4 Oct 2025 03:02:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59432Vfc014950; Sat, 4 Oct 2025 03:02:31 GMT (envelope-from git) Date: Sat, 4 Oct 2025 03:02:31 GMT Message-Id: <202510040302.59432Vfc014950@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 4a5a884c4a77 - main - iwx: rewrite iwx_rs_update() to be VHT aware, refactor it a bit 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: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4a5a884c4a77e800bb37e1c12db72c724a2220bc Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=4a5a884c4a77e800bb37e1c12db72c724a2220bc commit 4a5a884c4a77e800bb37e1c12db72c724a2220bc Author: Adrian Chadd AuthorDate: 2025-09-28 03:19:57 +0000 Commit: Adrian Chadd CommitDate: 2025-10-04 02:56:39 +0000 iwx: rewrite iwx_rs_update() to be VHT aware, refactor it a bit The current iwx_rs_update() code doesn't handle setting VHT rates at all. So: * write a routine - iwx_rs_update_node_txrate() - which will update the given node txrate info with the given notification * .. which is based on the print_ratenflags() logic and decoding * migrate iwx_rs_update() to use this routine, only on the STA BSS node. This only handles decoding the version 2 rate_n_flags format response - same as print_ratenflags() - so print if someone somehow sees a version 1 response. It's shown a few things that deserve some later follow-up work: * I really should have net80211 APIs that operate on the txrate struct itself, not on the ieee80211_node, but I'll use what I have. Changing it later is easy. * the current net80211 txrate API doesn't include channel width, LDPC/STBC and such. I didn't need it for the earlier tx rate representation migration, but it would be nice to add it. (The reason is that those choices are currently made in the drivers using rate control, rather than the rate control module, which is again what the older code did as well.) This means that the displayed rate isn't EXACTLY what the NIC has chosen - eg the NIC could quite happily decide to transmit a 20MHz or 40MHz frame to an 80MHz STA if that actually works out better. So just add TODOs for those. Locally tested: * AX210, STA mode Differential Revision: https://reviews.freebsd.org/D52767 Reviewed by: thj --- sys/dev/iwx/if_iwx.c | 162 +++++++++++++++++++++++++----------------------- sys/dev/iwx/if_iwxreg.h | 4 ++ 2 files changed, 90 insertions(+), 76 deletions(-) diff --git a/sys/dev/iwx/if_iwx.c b/sys/dev/iwx/if_iwx.c index d2d435545e27..04ed09f04604 100644 --- a/sys/dev/iwx/if_iwx.c +++ b/sys/dev/iwx/if_iwx.c @@ -7323,97 +7323,107 @@ iwx_rs_init(struct iwx_softc *sc, struct iwx_node *in) return iwx_rs_init_v3(sc, in); } -static void -iwx_rs_update(struct iwx_softc *sc, struct iwx_tlc_update_notif *notif) + +/** + * @brief Turn the given TX rate control notification into an ieee80211_node_txrate + * + * This populates the given txrate node with the TX rate control notification. + * + * @param sc driver softc + * @param notif firmware notification + * @param ni ieee80211_node update + * @returns true if updated, false if not + */ +static bool +iwx_rs_update_node_txrate(struct iwx_softc *sc, + const struct iwx_tlc_update_notif *notif, struct ieee80211_node *ni) { struct ieee80211com *ic = &sc->sc_ic; - struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); - struct ieee80211_node *ni = (void *)vap->iv_bss; + /* XXX TODO: create an inline function in if_iwxreg.h? */ + static int cck_idx_to_rate[] = { 2, 4, 11, 22, 2, 2, 2, 2 }; + static int ofdm_idx_to_rate[] = { 12, 18, 24, 36, 48, 72, 96, 108 }; - struct ieee80211_rateset *rs = &ni->ni_rates; uint32_t rate_n_flags; - uint8_t plcp, rval; - int i, cmd_ver, rate_n_flags_ver2 = 0; - - if (notif->sta_id != IWX_STATION_ID || - (le32toh(notif->flags) & IWX_TLC_NOTIF_FLAG_RATE) == 0) - return; + uint32_t type; + /* Extract the rate and command version */ rate_n_flags = le32toh(notif->rate); + if (sc->sc_rate_n_flags_version != 2) { + net80211_ic_printf(ic, + "%s: unsupported rate_n_flags version (%d)\n", + __func__, + sc->sc_rate_n_flags_version); + return (false); + } + if (sc->sc_debug & IWX_DEBUG_TXRATE) print_ratenflags(__func__, __LINE__, rate_n_flags, sc->sc_rate_n_flags_version); - cmd_ver = iwx_lookup_notif_ver(sc, IWX_DATA_PATH_GROUP, - IWX_TLC_MNG_UPDATE_NOTIF); - if (cmd_ver != IWX_FW_CMD_VER_UNKNOWN && cmd_ver >= 3) - rate_n_flags_ver2 = 1; - - if (rate_n_flags_ver2) { - uint32_t mod_type = (rate_n_flags & IWX_RATE_MCS_MOD_TYPE_MSK); - if (mod_type == IWX_RATE_MCS_HT_MSK) { - - ieee80211_node_set_txrate_dot11rate(ni, - IWX_RATE_HT_MCS_INDEX(rate_n_flags) | - IEEE80211_RATE_MCS); - IWX_DPRINTF(sc, IWX_DEBUG_TXRATE, - "%s:%d new MCS: %d rate_n_flags: %x\n", - __func__, __LINE__, - ieee80211_node_get_txrate_dot11rate(ni) & ~IEEE80211_RATE_MCS, - rate_n_flags); - return; - } - } else { - if (rate_n_flags & IWX_RATE_MCS_HT_MSK_V1) { - ieee80211_node_set_txrate_dot11rate(ni, - rate_n_flags & (IWX_RATE_HT_MCS_RATE_CODE_MSK_V1 | - IWX_RATE_HT_MCS_NSS_MSK_V1)); - - IWX_DPRINTF(sc, IWX_DEBUG_TXRATE, - "%s:%d new MCS idx: %d rate_n_flags: %x\n", - __func__, __LINE__, - ieee80211_node_get_txrate_dot11rate(ni), rate_n_flags); - return; - } + type = (rate_n_flags & IWX_RATE_MCS_MOD_TYPE_MSK); + switch (type) { + case IWX_RATE_MCS_CCK_MSK: + ieee80211_node_set_txrate_dot11rate(ni, + cck_idx_to_rate[rate_n_flags & IWX_RATE_LEGACY_RATE_MSK]); + return (true); + case IWX_RATE_MCS_LEGACY_OFDM_MSK: + ieee80211_node_set_txrate_dot11rate(ni, + ofdm_idx_to_rate[rate_n_flags & IWX_RATE_LEGACY_RATE_MSK]); + return (true); + case IWX_RATE_MCS_HT_MSK: + /* + * TODO: the current API doesn't include channel width + * and other flags, so we can't accurately store them yet! + * + * channel width: (flags & IWX_RATE_MCS_CHAN_WIDTH_MSK) + * >> IWX_RATE_MCS_CHAN_WIDTH_POS) + * LDPC: (flags & (1 << 16)) + */ + ieee80211_node_set_txrate_ht_mcsrate(ni, + IWX_RATE_HT_MCS_INDEX(rate_n_flags)); + return (true); + case IWX_RATE_MCS_VHT_MSK: + /* TODO: same comment on channel width, etc above */ + ieee80211_node_set_txrate_vht_rate(ni, + IWX_RATE_VHT_MCS_CODE(rate_n_flags), + IWX_RATE_VHT_MCS_NSS(rate_n_flags)); + return (true); + default: + net80211_ic_printf(ic, + "%s: unsupported chosen rate type in " + "IWX_RATE_MCS_MOD_TYPE (%d)\n", __func__, + type >> IWX_RATE_MCS_MOD_TYPE_POS); + return (false); } - if (rate_n_flags_ver2) { - const struct ieee80211_rateset *rs; - uint32_t ridx = (rate_n_flags & IWX_RATE_LEGACY_RATE_MSK); - if (rate_n_flags & IWX_RATE_MCS_LEGACY_OFDM_MSK) - rs = &ieee80211_std_rateset_11a; - else - rs = &ieee80211_std_rateset_11b; - if (ridx < rs->rs_nrates) - rval = (rs->rs_rates[ridx] & IEEE80211_RATE_VAL); - else - rval = 0; - } else { - plcp = (rate_n_flags & IWX_RATE_LEGACY_RATE_MSK_V1); + /* Default: if we get here, we didn't successfully update anything */ + return (false); +} - rval = 0; - for (i = IWX_RATE_1M_INDEX; i < nitems(iwx_rates); i++) { - if (iwx_rates[i].plcp == plcp) { - rval = iwx_rates[i].rate; - break; - } - } - } +/** + * @brief Process a firmware rate control update and update net80211. + * + * Since firmware is doing rate control, this just needs to update + * the txrate in the ieee80211_node entry. + */ +static void +iwx_rs_update(struct iwx_softc *sc, struct iwx_tlc_update_notif *notif) +{ + struct ieee80211com *ic = &sc->sc_ic; + struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); + /* XXX TODO: get a node ref! */ + struct ieee80211_node *ni = (void *)vap->iv_bss; - if (rval) { - uint8_t rv; - for (i = 0; i < rs->rs_nrates; i++) { - rv = rs->rs_rates[i] & IEEE80211_RATE_VAL; - if (rv == rval) { - ieee80211_node_set_txrate_dot11rate(ni, i); - break; - } - } - IWX_DPRINTF(sc, IWX_DEBUG_TXRATE, - "%s:%d new rate %d\n", __func__, __LINE__, - ieee80211_node_get_txrate_dot11rate(ni)); - } + /* + * For now the iwx driver only supports a single vdev with a single + * node; it doesn't yet support ibss/hostap/multiple vdevs. + */ + if (notif->sta_id != IWX_STATION_ID || + (le32toh(notif->flags) & IWX_TLC_NOTIF_FLAG_RATE) == 0) + return; + + iwx_rs_update_node_txrate(sc, notif, ni); } static int diff --git a/sys/dev/iwx/if_iwxreg.h b/sys/dev/iwx/if_iwxreg.h index 6755b93fa0ba..f3d1f078b48e 100644 --- a/sys/dev/iwx/if_iwxreg.h +++ b/sys/dev/iwx/if_iwxreg.h @@ -5176,6 +5176,10 @@ enum { #define IWX_RATE_HT_MCS_INDEX(r) ((((r) & IWX_RATE_MCS_NSS_MSK) >> 1) | \ ((r) & IWX_RATE_HT_MCS_CODE_MSK)) +#define IWX_RATE_VHT_MCS_CODE(r) ((r) & IWX_RATE_HT_MCS_CODE_MSK) +#define IWX_RATE_VHT_MCS_NSS(r) \ + ((((r) & IWX_RATE_MCS_NSS_MSK) == 0) >> IWX_RATE_MCS_NSS_POS) + /* Bits 7-5: reserved */ /* From nobody Sat Oct 4 04:01:13 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdsK544Hwz69X1R; Sat, 04 Oct 2025 04:01: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 4cdsK53Jj0z3xT6; Sat, 04 Oct 2025 04:01:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759550473; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DJSbn6/VeGHiswVSv3UwinasXgHVD9/uNXbnngPM45Q=; b=Ki4n9Gm2nzShsQ0+eDWYZjPtizFD8rcEzVBoQBvfEEaO1hIdpCaxsOeMcZ/qZGfldyuR37 tbd94pxesOj4+vIUpk1WGly8+sSmaQhMb7sUBbqvtY7cpPjIgXAD1k8AmH/pvNbMpP/0cR rXJjAPnUGj4PXXqWVmylskBVSqaezu9FRhMw4Yk/USWHyzyFysDFkXJ1nDuVzu9RQID2PD ZkLyFK4mbxfrLMC2IEh66im/L//h0RRDGezeww6YfMscG+Tmn7pbuVb49KvWiu+i2csI6z jgPFJ+eEXlicNGEXleM18rqbe+Js1JW1DpDZC8Q6Z3ySASq4to1Vi3pVbwAEzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759550473; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DJSbn6/VeGHiswVSv3UwinasXgHVD9/uNXbnngPM45Q=; b=pvvulkWIsDcdHFa6SlyVhxGCZnU8DqKVwHuWOdLiQxOweOma3uNXxOTGoDPDTLkilM+nNZ 5CB07/QDhBdsIfE0d6EX/IOh5JBJbNPexMk0lHD7uyaBns1vrxvok6JV9SeO9fFmxwvzPM eF67UjHKqt/mfuUJ+JncQU2kWPSwntma/W0Klp1EsL+nRPNzrt5AiO6NRQCODJBLxh13FQ blFnT2pCvPZuFrOMV5dFJUPYjid1oP3w2+GJrh9DmymiZXGXXAPajdStthcSfzlfcC8gqa fK6xEVi71B5w5Nr8d2RE53RSL/6BYlKfGlyb5E0/nSh7gNKJ4KXYEIQzqYA9Jw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759550473; a=rsa-sha256; cv=none; b=mMYzgHL53JcxnbWX6ODUYlCNF5M68O6DDUi1rhumkSMsYUtL82iQG4/BTxT4Sx9Q4Hw6Di HxW/297xS0H98SBuX+RfapQMof8kaKtjd5Tnhrs9YM/+4Tjq7jf/TkUEZK5c7pOPQwGV9S tv++NO0+z+v+QsL6fPN5ZT5vsGe0dglLEjq62QakZS2pn9VkVwBI+N2ROJAu/d1ADXWekQ 66InUc7tPa7T01n0zm9ogVPNyG8MWpedra5md6UYn7zPyGsRFG6yyb7KX7zncs5EJYMMwr MlKMolrEWSktULv2SwmP15gBBrdPZRygRWHu92ImCv+F3I8/i6gR++XtF3Hvlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdsK52vghz94w; Sat, 04 Oct 2025 04:01:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59441DBS024867; Sat, 4 Oct 2025 04:01:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59441DLU024864; Sat, 4 Oct 2025 04:01:13 GMT (envelope-from git) Date: Sat, 4 Oct 2025 04:01:13 GMT Message-Id: <202510040401.59441DLU024864@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: 046c625e9382 - main - crypto/openssl: update to 3.5.4 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 046c625e9382e17da953767b881aaa782fa73af8 Auto-Submitted: auto-generated The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=046c625e9382e17da953767b881aaa782fa73af8 commit 046c625e9382e17da953767b881aaa782fa73af8 Merge: 4a5a884c4a77 8e12a5c4eb35 Author: Enji Cooper AuthorDate: 2025-10-04 03:26:18 +0000 Commit: Enji Cooper CommitDate: 2025-10-04 03:26:18 +0000 crypto/openssl: update to 3.5.4 This change includes all necessary changes required to update to OpenSSL 3.5.4. More information about the 3.5.4 release can be found in the relevant release notes (see 8e12a5c4eb3507846b5 for more details). Merge commit '8e12a5c4eb3507846b507d0afe87d115af41df40' crypto/openssl/CHANGES.md | 69 ++++++ crypto/openssl/NEWS.md | 40 +++- crypto/openssl/VERSION.dat | 4 +- crypto/openssl/apps/storeutl.c | 16 +- crypto/openssl/crypto/bio/bss_file.c | 2 +- crypto/openssl/crypto/ec/ecp_sm2p256.c | 2 +- crypto/openssl/crypto/evp/bio_ok.c | 27 ++- crypto/openssl/crypto/evp/ctrl_params_translate.c | 2 +- crypto/openssl/crypto/evp/p_lib.c | 17 +- crypto/openssl/crypto/info.c | 14 +- crypto/openssl/crypto/ml_dsa/ml_dsa_key.c | 4 +- crypto/openssl/crypto/ml_kem/ml_kem.c | 2 +- crypto/openssl/crypto/modes/siv128.c | 3 + crypto/openssl/crypto/property/property_parse.c | 2 +- crypto/openssl/crypto/rsa/rsa_gen.c | 15 -- crypto/openssl/crypto/rsa/rsa_sign.c | 4 +- crypto/openssl/crypto/threads_pthread.c | 12 +- crypto/openssl/crypto/x509/t_x509.c | 3 +- crypto/openssl/crypto/x509/x509_lu.c | 1 - crypto/openssl/doc/man3/DEFINE_STACK_OF.pod | 19 +- crypto/openssl/doc/man3/OpenSSL_version.pod | 9 +- crypto/openssl/doc/man3/SSL_CIPHER_get_name.pod | 4 +- .../openssl/doc/man3/SSL_SESSION_get0_hostname.pod | 10 +- crypto/openssl/include/crypto/rsa.h | 4 - crypto/openssl/include/openssl/opensslv.h.in | 4 +- crypto/openssl/providers/fips-sources.checksums | 20 +- crypto/openssl/providers/fips.checksum | 2 +- crypto/openssl/providers/fips/self_test_data.inc | 42 ++++ crypto/openssl/providers/fips/self_test_kats.c | 100 ++++++++ .../providers/implementations/kdfs/krb5kdf.c | 7 +- .../providers/implementations/keymgmt/ecx_kmgmt.c | 8 - crypto/openssl/ssl/quic/quic_impl.c | 7 +- crypto/openssl/ssl/record/methods/tls_common.c | 11 +- crypto/openssl/ssl/ssl_rsa.c | 5 +- crypto/openssl/ssl/t1_trce.c | 4 + crypto/openssl/test/build.info | 3 +- crypto/openssl/test/fake_rsaprov.c | 4 +- crypto/openssl/test/fake_rsaprov.h | 11 +- crypto/openssl/test/ml_kem_evp_extra_test.c | 10 + crypto/openssl/test/property_test.c | 19 +- crypto/openssl/test/provider_pkey_test.c | 72 ++++++ crypto/openssl/test/quicapitest.c | 95 +------- crypto/openssl/test/radix/terp.c | 6 +- crypto/openssl/test/recipes/03-test_fipsinstall.t | 12 +- crypto/openssl/test/recipes/25-test_verify.t | 5 +- .../test/recipes/30-test_evp_data/evpkdf_krb5.txt | 10 +- .../30-test_evp_data/evppkey_rsa_sigalg.txt | 4 +- crypto/openssl/test/recipes/90-test_sslapi.t | 17 +- .../90-test_sslapi_data/ssltraceref-zlib.txt | 255 +++++++++++++++++++++ .../recipes/90-test_sslapi_data/ssltraceref.txt | 253 ++++++++++++++++++++ crypto/openssl/test/sslapitest.c | 87 +++++++ crypto/openssl/test/testutil.h | 2 + crypto/openssl/test/testutil/compare.c | 88 +++++++ crypto/openssl/test/threadstest.c | 11 +- crypto/openssl/test/wpackettest.c | 2 +- 55 files changed, 1241 insertions(+), 220 deletions(-) diff --cc crypto/openssl/test/recipes/90-test_sslapi_data/ssltraceref-zlib.txt index 000000000000,05aed8299b0e..05aed8299b0e mode 000000,100644..100644 --- a/crypto/openssl/test/recipes/90-test_sslapi_data/ssltraceref-zlib.txt +++ b/crypto/openssl/test/recipes/90-test_sslapi_data/ssltraceref-zlib.txt diff --cc crypto/openssl/test/recipes/90-test_sslapi_data/ssltraceref.txt index 000000000000,5d332da235fb..5d332da235fb mode 000000,100644..100644 --- a/crypto/openssl/test/recipes/90-test_sslapi_data/ssltraceref.txt +++ b/crypto/openssl/test/recipes/90-test_sslapi_data/ssltraceref.txt diff --cc crypto/openssl/test/testutil/compare.c index 000000000000,067fb878b58e..067fb878b58e mode 000000,100644..100644 --- a/crypto/openssl/test/testutil/compare.c +++ b/crypto/openssl/test/testutil/compare.c From nobody Sat Oct 4 04:03:01 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 4cdsMW4X3Cz69X0N for ; Sat, 04 Oct 2025 04:03:19 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdsMW2Fmcz400D for ; Sat, 04 Oct 2025 04:03:19 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-77c1814ca1dso2170121b3a.2 for ; Fri, 03 Oct 2025 21:03:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759550593; x=1760155393; darn=freebsd.org; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=/HDq42tOSGo1f8s83KRfd61arTuEwxBX8i4t3jnQjPs=; b=QqMBcd1dmog7B3J7xZ8I+Up0ZG1pRoxcyJc5YkL4OXzagKn4TlPnqS1MO1kAhsmLv9 jy9BMmXCi7aPECR2GR/PTC6bUY0C1oipd2XkbiweJadL4Bdwsk+Xo+PZ3VSLkrSm/xeh N7e3CAGG2iDHzewuwT9GdSDhXAtxqWhUEElD2NseTGq2apJzYuwLm0m853jw5AtRCEr5 GMAVqhwkxQrbYGMXnbJK2eTn7J00K42KZSYeKAn84nfqpjgIC0bodcv647Dy4QsHB2rQ vYgAkfuMgtxKVKlaaNGXSgQs6AfkYypDhIEaCiH2COQebBJN9Cx/9A4PhRQFk5NEVxze QzdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759550593; x=1760155393; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/HDq42tOSGo1f8s83KRfd61arTuEwxBX8i4t3jnQjPs=; b=j13Egplccg4AdLoeqpyuJKjXS7cUHOAdvKkQDMwgpZ7/6QXHgMknJJk126ghgUPXOO 1ZuS3hvQrGewLY1pKReMFQOlEEIoGcrGgHDKs9XscSW8esP7kBbMc2dQWvyp2nMSqE/7 TdIG2NxIJP2uaW2A7RiE9Fk61pwRYoRvCbxi/NmNln/SBYnAVYA9AvX0AFGsuYF56svr 6PGP3R/ajMpP2ksMmLoDfyKkBDYuKS7sZoZ95H0tXH7IGx1d0rqYvP0Vz5+Smq0ubOIX vNISWvYUEPC1LBN1KcFwlxuYyLoXXJcJQU8CVXJT6P0PUM4QgTNzfXa1V2mu53TZUTs0 vsCQ== X-Forwarded-Encrypted: i=1; AJvYcCUBnDYHHMJj5LpltsX3sFlbHPqMpt/CunJWz+7zREo1FrLlaXDWKJ7j6vLSXU8NIi5GJWG0OMS7VFb38YrwciN2VQ7qqA==@freebsd.org X-Gm-Message-State: AOJu0YyZd81YHLOpX2yHaiHlU4bKl2ETkMJnRf8DmZPLIC+2ILSqt3Bm ztD5xcbxQ+OYU2j62vIwcTlhsPHuyWWtyMXyF2ZA3kXy+i0B3xdYfBhZ X-Gm-Gg: ASbGncsFQb9NwiezIhKAyYA35XBr62AjUW9fuK5GHu4cmipu7pNWe4OnvYcKET1J4IE EPAPI9Cq+ZQRdlIVFflzkznBofSgKc2D27be4t/rDC2QEF25n4YiWwnqLZ6Ekw1sm26qmK86ovK K4JinXygRRJQmov2ohAFVwjs2CLeYSCDGWE99REwfgdoIiVwQ2XthFUDvL7PW7TwuePegYo5zk9 n6V27ESK2W9NArv6l6qYjBJa9FCFhsB+xtOfmETizxDbE1rS4hqbxXfaL4V3PU2zAlVLxokzPTd zVI1McD8zTtwf8MM4MY3nAUmjwoYuz1HtIEMZZ9Rnm4TV6NrGuxBW8uqBBNmWWCgQV8uzsRz+9+ EtUkrk7SutlkD79f5Ss3qeirVeiaqPM1e9/sjXpEdZmKLNKhd0neAqt2u4+Mwyq+P9xOZ7VXnwQ == X-Google-Smtp-Source: AGHT+IGUx8b0QL0CmH4dzmUbcQptvQAd3ELmxZ9mop1GhyjIeRJV3zX46t6HFe+EsllsrSJBrczxFg== X-Received: by 2002:a05:6a00:2404:b0:77f:4c3e:c19d with SMTP id d2e1a72fcca58-78c98d5d023mr5940745b3a.12.1759550592711; Fri, 03 Oct 2025 21:03:12 -0700 (PDT) Received: from smtpclient.apple ([45.143.82.76]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-78b01faef46sm6414188b3a.33.2025.10.03.21.03.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Oct 2025 21:03:12 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_8E97D490-F3BB-44F2-98AD-F0ECD796964F"; protocol="application/pgp-signature"; micalg=pgp-sha256 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: git: 046c625e9382 - main - crypto/openssl: update to 3.5.4 From: "Enji Cooper (yaneurabeya)" In-Reply-To: <202510040401.59441DLU024864@gitrepo.freebsd.org> Date: Fri, 3 Oct 2025 21:03:01 -0700 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Message-Id: <356F06F9-B4E3-4F3A-9478-27C82EEEF57B@gmail.com> References: <202510040401.59441DLU024864@gitrepo.freebsd.org> To: Enji Cooper X-Mailer: Apple Mail (2.3826.700.81) X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cdsMW2Fmcz400D --Apple-Mail=_8E97D490-F3BB-44F2-98AD-F0ECD796964F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I forgot to add this in the commit: MFC after: 1 week I added a reminder to my calendar to take care of this manually. Cheers, -Enji > On Oct 3, 2025, at 9:01=E2=80=AFPM, Enji Cooper = wrote: >=20 > The branch main has been updated by ngie: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D046c625e9382e17da953767b881aaa78= 2fa73af8 >=20 > commit 046c625e9382e17da953767b881aaa782fa73af8 > Merge: 4a5a884c4a77 8e12a5c4eb35 > Author: Enji Cooper > AuthorDate: 2025-10-04 03:26:18 +0000 > Commit: Enji Cooper > CommitDate: 2025-10-04 03:26:18 +0000 >=20 > crypto/openssl: update to 3.5.4 >=20 > This change includes all necessary changes required to update to = OpenSSL > 3.5.4. >=20 > More information about the 3.5.4 release can be found in the = relevant > release notes (see 8e12a5c4eb3507846b5 for more details). >=20 > Merge commit '8e12a5c4eb3507846b507d0afe87d115af41df40' >=20 > crypto/openssl/CHANGES.md | 69 ++++++ > crypto/openssl/NEWS.md | 40 +++- > crypto/openssl/VERSION.dat | 4 +- > crypto/openssl/apps/storeutl.c | 16 +- > crypto/openssl/crypto/bio/bss_file.c | 2 +- > crypto/openssl/crypto/ec/ecp_sm2p256.c | 2 +- > crypto/openssl/crypto/evp/bio_ok.c | 27 ++- > crypto/openssl/crypto/evp/ctrl_params_translate.c | 2 +- > crypto/openssl/crypto/evp/p_lib.c | 17 +- > crypto/openssl/crypto/info.c | 14 +- > crypto/openssl/crypto/ml_dsa/ml_dsa_key.c | 4 +- > crypto/openssl/crypto/ml_kem/ml_kem.c | 2 +- > crypto/openssl/crypto/modes/siv128.c | 3 + > crypto/openssl/crypto/property/property_parse.c | 2 +- > crypto/openssl/crypto/rsa/rsa_gen.c | 15 -- > crypto/openssl/crypto/rsa/rsa_sign.c | 4 +- > crypto/openssl/crypto/threads_pthread.c | 12 +- > crypto/openssl/crypto/x509/t_x509.c | 3 +- > crypto/openssl/crypto/x509/x509_lu.c | 1 - > crypto/openssl/doc/man3/DEFINE_STACK_OF.pod | 19 +- > crypto/openssl/doc/man3/OpenSSL_version.pod | 9 +- > crypto/openssl/doc/man3/SSL_CIPHER_get_name.pod | 4 +- > .../openssl/doc/man3/SSL_SESSION_get0_hostname.pod | 10 +- > crypto/openssl/include/crypto/rsa.h | 4 - > crypto/openssl/include/openssl/opensslv.h.in | 4 +- > crypto/openssl/providers/fips-sources.checksums | 20 +- > crypto/openssl/providers/fips.checksum | 2 +- > crypto/openssl/providers/fips/self_test_data.inc | 42 ++++ > crypto/openssl/providers/fips/self_test_kats.c | 100 ++++++++ > .../providers/implementations/kdfs/krb5kdf.c | 7 +- > .../providers/implementations/keymgmt/ecx_kmgmt.c | 8 - > crypto/openssl/ssl/quic/quic_impl.c | 7 +- > crypto/openssl/ssl/record/methods/tls_common.c | 11 +- > crypto/openssl/ssl/ssl_rsa.c | 5 +- > crypto/openssl/ssl/t1_trce.c | 4 + > crypto/openssl/test/build.info | 3 +- > crypto/openssl/test/fake_rsaprov.c | 4 +- > crypto/openssl/test/fake_rsaprov.h | 11 +- > crypto/openssl/test/ml_kem_evp_extra_test.c | 10 + > crypto/openssl/test/property_test.c | 19 +- > crypto/openssl/test/provider_pkey_test.c | 72 ++++++ > crypto/openssl/test/quicapitest.c | 95 +------- > crypto/openssl/test/radix/terp.c | 6 +- > crypto/openssl/test/recipes/03-test_fipsinstall.t | 12 +- > crypto/openssl/test/recipes/25-test_verify.t | 5 +- > .../test/recipes/30-test_evp_data/evpkdf_krb5.txt | 10 +- > .../30-test_evp_data/evppkey_rsa_sigalg.txt | 4 +- > crypto/openssl/test/recipes/90-test_sslapi.t | 17 +- > .../90-test_sslapi_data/ssltraceref-zlib.txt | 255 = +++++++++++++++++++++ > .../recipes/90-test_sslapi_data/ssltraceref.txt | 253 = ++++++++++++++++++++ > crypto/openssl/test/sslapitest.c | 87 +++++++ > crypto/openssl/test/testutil.h | 2 + > crypto/openssl/test/testutil/compare.c | 88 +++++++ > crypto/openssl/test/threadstest.c | 11 +- > crypto/openssl/test/wpackettest.c | 2 +- > 55 files changed, 1241 insertions(+), 220 deletions(-) >=20 > diff --cc = crypto/openssl/test/recipes/90-test_sslapi_data/ssltraceref-zlib.txt > index 000000000000,05aed8299b0e..05aed8299b0e > mode 000000,100644..100644 > --- = a/crypto/openssl/test/recipes/90-test_sslapi_data/ssltraceref-zlib.txt > +++ = b/crypto/openssl/test/recipes/90-test_sslapi_data/ssltraceref-zlib.txt > diff --cc = crypto/openssl/test/recipes/90-test_sslapi_data/ssltraceref.txt > index 000000000000,5d332da235fb..5d332da235fb > mode 000000,100644..100644 > --- a/crypto/openssl/test/recipes/90-test_sslapi_data/ssltraceref.txt > +++ b/crypto/openssl/test/recipes/90-test_sslapi_data/ssltraceref.txt > diff --cc crypto/openssl/test/testutil/compare.c > index 000000000000,067fb878b58e..067fb878b58e > mode 000000,100644..100644 > --- a/crypto/openssl/test/testutil/compare.c > +++ b/crypto/openssl/test/testutil/compare.c --Apple-Mail=_8E97D490-F3BB-44F2-98AD-F0ECD796964F Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEkHfexGRJ3gYRdA2gGpE5DjPsNJgFAmjgnHUACgkQGpE5DjPs NJhX8BAAmEJ6gS0qXz8JHfNvW/87svMZ13wdxltn0TZt9U56+F2rLXHEVYDEY+nP VD5Xx3M4SJh+eGEcqoehHRNQbQfQneysA0LMGvtn1b6nPS4oNktEgwDZBBdDqTgn MVMKzUaL72EcI+ukmjI2WrMqlqvGCduXZ29uJZPYeMN3UHUrOCWirJv9lCy6cQdd 5u8XiILd4zbjaXPn7IbHI9DCS5TTNf9HKpJbC33OLaRlN5GKuOh+D2Y981WaidOb hQEvLW6qLPFSOiWckttRa/l35GKyALJve90KvWVcx7sqfxSOweHvIg5CcSkLyN3H CEGwppsUFJUSSh68nd1q4IyDFnQxfgo5+fA+ychwAeq0jtmR/2imMkrwK8Zxp8vv FTWeML8u+HeqFX0HuclvLOa3YbwigN7qOiK2pEW0tnlPEs7L+h/ih4D1RtCfASox ERSJZYwSqQ76JtThFE1v0yWXgwskik8qSqced9XyY/q+19aXOGXrmo8E+m1jta2H Df+UtRs9k7pylK8lOJOaLGXO0vvYZYrxWCvShXpjW9oWhofUcKwrFN5zNaYvMaWF ++Sx00j++HZK2qxi9hYU3piDLrRmpBFMhhRSEAiGD2Xt6QTS1otWR7vKnmuIpAlz DVOXT/jaiDyOkmrqzLiSGrDaKVvnrtxIIm5/EmspZ83xz4JO9lQ= =UHv8 -----END PGP SIGNATURE----- --Apple-Mail=_8E97D490-F3BB-44F2-98AD-F0ECD796964F-- From nobody Sat Oct 4 07:45: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 4cdyHk6tWKz6B0BX; Sat, 04 Oct 2025 07:45:22 +0000 (UTC) (envelope-from flo@smeets.xyz) Received: from mail-out.smeets.xyz (mail-out.smeets.xyz [IPv6:2a01:4f8:222:1843::25:11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdyHj6Zjxz4MvL; Sat, 04 Oct 2025 07:45:21 +0000 (UTC) (envelope-from flo@smeets.xyz) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=reject) header.from=smeets.xyz; spf=pass (mx1.freebsd.org: domain of flo@smeets.xyz designates 2a01:4f8:222:1843::25:11 as permitted sender) smtp.mailfrom=flo@smeets.xyz Received: from mail.smeets.xyz (mail.smeets.xyz [IPv6:2a01:4f8:222:1843::25:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (Client did not present a certificate) by mail-out.smeets.xyz (Postfix) with ESMTPS id 05E3E9D1E7; Sat, 04 Oct 2025 09:45:14 +0200 (CEST) Received: from localhost (amavis.smeets.xyz [IPv6:2a01:4f8:222:1843::aa:4]) by mail.smeets.xyz (Postfix) with ESMTP id EE08B41C93; Sat, 04 Oct 2025 09:45:13 +0200 (CEST) X-Virus-Scanned: amavis at smeets.xyz Received: from mail.smeets.xyz ([IPv6:2a01:4f8:222:1843::25:3]) by localhost (amavis.smeets.xyz [IPv6:2a01:4f8:222:1843::aa:4]) (amavis, port 10025) with ESMTP id jF-WouoId32Z; Sat, 4 Oct 2025 09:45:13 +0200 (CEST) Received: from [IPV6:2a0d:3344:15ac:6900::19e7] (unknown [IPv6:2a0d:3344:15ac:6900::19e7]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (Client did not present a certificate) by mail.smeets.xyz (Postfix) with ESMTPSA id 1DB97418B6; Sat, 04 Oct 2025 09:45:13 +0200 (CEST) Message-ID: <98515e3d-24ba-402e-b2c1-09e30cafeade@smeets.xyz> Date: Sat, 4 Oct 2025 09:45:12 +0200 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 9dfc5e03da50 - main - pfctl: allow tables to be defined inside anchors Content-Language: en-US To: Kristof Provost , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202509171415.58HEFdN0010140@gitrepo.freebsd.org> From: Florian Smeets Autocrypt: addr=flo@smeets.xyz; keydata= xsFNBFpyBwsBEADLq0c46orEtbMn4SptX+VJxR1wB4YwaErZme1bqF4nZHIhlRNET22HsHdQ doagaB4uACq0Rj5kHcu614ZnnNkLPyCxWQATx+cbdiFO4/hfT8tAvKnBtiy3awKJ5uGCNO2E zJwXW6KwdDA8XPRySqN8m1yPl+dW0Cls+/vO/QL/6+YLMupmEpSvFxRzAZTQuKyX4+xl+dYI d24JiPd1yfCuDNOY3+OZ3QBMT00u/699N8lUWRtiTwaQMwAOww8r/26YM6/SgcgFuLH2E/CV plY0sDvfoISlAj8agxdomNXfPjCMQ6w5yGZmA+huFpPCVBTi3on/SWgbQO7dLVpN4BNPuScP osCb/dsOg0S74zCClsIU3gdUGh9rwJY00/Ebid6V0R3c1Czwbg8LQedzlGDuXYXmzp6W2ujg r1cqbUD6lUWikUv2IMdCbb8MxYhHLi3GYUs5Xpi+W7vM6T45KbuMr7O/1SjtcGOlNeDvGNgj cDk20fOgPPZ+M6i9vX5Q2oI9HoYaeTiYNwILkBLVP/L40kTo5EkiQOt4OW6BMbylqXPOaQMW uGVbmhCJQpbx8Vo80s2yiBBVWkLkWQIcIm3KZlLldJqKEFpQBWLBE1eFFqboYgAWzFn73CaV 5tihobijMmmOV3a8cI1fI4kREyl3g+8bW+O0u3m3tuzVOpDpjwARAQABzR9GbG9yaWFuIFNt ZWV0cyA8ZmxvQHNtZWV0cy54eXo+wsGXBBMBCgBBAhsDBQsJCAcDBRUKCQgLBRYDAgEAAh4B AheAAhkBFiEE7LNouHkIv7aRTXJp71uk3NWp88AFAmWarWAFCQ7rjOUACgkQ71uk3NWp88AY fQ/+MJWYN95HXWcWKw9mOffW6WJvq5POE2RpoBXj2AJvzjF4bPt/mclA0+wlyAs6ayvCSRwE dgB0vF31DRPgsz/76PC3f1ADYbLdrGusCcPYMhvkgkXY6/p793YzI2ELjicHgn2pB9iy0Y+B nemAY8qXGqTX4d/qPllFcEOVZCDHez0JEFNCZC780pEzOHP9mMzXT/Pl4RBUBHOLv9j96enM Ir8VXoMkfNJ5GqdF577Aa/C46pUoOeSc2KvS/5g3axSFLho/ni70M4tjGXMYDdbnNHOg/UjG iKKuZgzI9CXrvVAZfX663ERps/GXu1IiaJdadnQaLgPvjCjz0qM14hy/n67fCSqmYdKgwblU GvKC912vGsMN1ibS+7xoAsCiM4w+Ct2plOLO3rJ26xaZZlE137GpLh4RnnvrnDFUBEG47tZJ O8wbedt2KwRKTPle136WedzjVlcuKoH1T9Dem6E1P9TUfNHqOYtD7iUouWYkftSoRAhkY4IS bDRlz2dqRagbHR1T0DXhraQyswQucoVQPTsy9PoXAZLY73Jep71nl3zQCTRXn7aSj2RO2ob0 RvnBwueXdFpb1SfCeJwJhadmOuYF/i8RIskAzG0aapYT8VUe8tqjmsKM/MWTcngjWf/7u/7+ xmtdpGqI7oY3SGbyu0rw+xICXrD28N1H8kyazJ/OwU0EWnIHCwEQANHrOm5vydK/ij1zkDyL Zzbogk5zjMh6oAr3cH4oGbJHPLlyFZTCVBYUwD4kh6NV1sKuZOeX/aygyVg1RyLulnzsc6Yj XOIxlqhqQwGI8k8ssAIpMSf029781CNF2HC42CrJeHtXNONDNOjsMuoxzga9zLQCh4jLTlE/ TUJo6KVABWBVRtTVh2Z77pKtN7j2NPFBHvp7K0WHfV+TYnlsgjhUA0ACZnUdHS2YRzBhCzzQ eludxBz54S9xbUq1mfZfVx8AbAGXF2zxo68nvvAAJn48HiBS3dMhCGYJDdZdja6QdUFPiemi nOxwkUzCqmKxm+Aj7USue1SbZZqJxmMI1eF4Ork/BJJI74Z/FnJgYR4UkEiD3J/KUocQCIH3 daB1+/CXlh99Ib7AP+QGuKk3vnNHh7VBq3E+VAiM5LU0BmgW+cdRPHkiwM7sDa2VnV3VqvV7 QmoMKnHFzUB6Nn8uE+iakp5J81Pr68kDOq7kLW3UnGmg1PUqbsnCaTimJb3JAYWzOW/9CYcP lbAdIqi+wH7MOoeL+PA99A3kW/881rGmeOYFzzrsNVLtea+AJfXtp4LN5gOVIPIpovCNSVXX EKgl7a4vjUGzVBzrH7PzT+k4XUEQwNCACfGZxEExtny19bjvumZ0rv+AEAHvsWSKXHUVJzIN jqd9UioaEbKGAPlPABEBAAHCwXwEGAEKACYCGwwWIQTss2i4eQi/tpFNcmnvW6Tc1anzwAUC ZZqtYAUJDuuM5QAKCRDvW6Tc1anzwCBsEAC0eYv6YNJHMdgGAb22Ej1wOvszzq6+2sDPXGMT yCUMTOq779cc1yDcrKgiMPO6Kmg+um3veUu/6Trux8tjxhxoKrRZ8/kF8lc5lx2krPFDJooj mHlENCyMTOlIRJ0M7ZgJDKkD0pEwm0j9UgmrFmCU6n9WHhpoXW3kGLY0M3IAwezyROg1Gfnp bnXvYun2wmH3OukDoOEkuFJYJz22XNRZBQh2/RjtnlTl6l9G5ZONgZJJziSa97Z5UEsg35Ey tEeTJVciiP0BXBWgYwE+0cRh6MEiY51X+hqdbUQ3RU1tAMC5HGGCtR9lHgpBj0ZTtBxXnOfX NWHDQkswgSrEUH1DROcx7BNJdvjzYMztwvojeJgOgSM+RA6hg/e31jpt8X2HTYuNUrnE1nao naso3EaNXYE2TQ0t9EGdxWRfoElZ5DUoFMTKZ3/ysPS9Cmsb1TOrO2Hvuxmhbr/3zfLXIyWy 56trqqp0ffubfXT8avdNBMJwZjcPxPbsxRwtle3D4ytty0qDzF7gKMd484OtBGtW4C4QhseU 5yyJBXD1SuJjZKodiwqBtWUgN1JkfeptGukulB+NwmVC9YrhvYjXBDr0EM6Ot43kg5jGFdHO AhfzqetncKKiJUVUHDg+goxejamNsNq88xdnx1QDsDquZA8UdDdLgd8iDGyHTTlgokPZlw== In-Reply-To: <202509171415.58HEFdN0010140@gitrepo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------s0LXZRvw2F2ija5pDX9HJ9up" X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.69 / 15.00]; SIGNED_PGP(-2.00)[]; MIME_BASE64_TEXT_BOGUS(1.00)[]; NEURAL_SPAM_MEDIUM(1.00)[0.996]; NEURAL_HAM_LONG(-0.99)[-0.993]; NEURAL_HAM_SHORT(-0.99)[-0.989]; DMARC_POLICY_ALLOW(-0.50)[smeets.xyz,reject]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.20)[multipart/signed,multipart/mixed,text/plain]; MIME_BASE64_TEXT(0.10)[]; MIME_UNKNOWN(0.10)[application/pgp-keys]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:+,4:~,5:~]; RECEIVED_HELO_LOCALHOST(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; HAS_ATTACHMENT(0.00)[]; TO_DN_SOME(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-main@FreeBSD.org]; RCPT_COUNT_THREE(0.00)[4]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEFALL_USER(0.00)[flo]; FROM_HAS_DN(0.00)[] X-Rspamd-Queue-Id: 4cdyHj6Zjxz4MvL This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------s0LXZRvw2F2ija5pDX9HJ9up Content-Type: multipart/mixed; boundary="------------EosdUZdXXen4Bh6M03jMfChH"; protected-headers="v1" From: Florian Smeets To: Kristof Provost , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Message-ID: <98515e3d-24ba-402e-b2c1-09e30cafeade@smeets.xyz> Subject: Re: git: 9dfc5e03da50 - main - pfctl: allow tables to be defined inside anchors References: <202509171415.58HEFdN0010140@gitrepo.freebsd.org> In-Reply-To: <202509171415.58HEFdN0010140@gitrepo.freebsd.org> --------------EosdUZdXXen4Bh6M03jMfChH Content-Type: multipart/mixed; boundary="------------2Kk88JsTYN208XRdhZSjgmsw" --------------2Kk88JsTYN208XRdhZSjgmsw Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 T24gMTcuMDkuMjUgMTY6MTUsIEtyaXN0b2YgUHJvdm9zdCB3cm90ZToNCj4gVGhlIGJyYW5j aCBtYWluIGhhcyBiZWVuIHVwZGF0ZWQgYnkga3A6DQo+IA0KPiBVUkw6IGh0dHBzOi8vY2dp dC5GcmVlQlNELm9yZy9zcmMvY29tbWl0Lz9pZD05ZGZjNWUwM2RhNTBkMTJmMDJjMmI0ODEx MzlhY2Y5ZjA4OWQ1MDRmDQo+IA0KPiBjb21taXQgOWRmYzVlMDNkYTUwZDEyZjAyYzJiNDgx MTM5YWNmOWYwODlkNTA0Zg0KPiBBdXRob3I6ICAgICBLcmlzdG9mIFByb3Zvc3QgPGtwQEZy ZWVCU0Qub3JnPg0KPiBBdXRob3JEYXRlOiAyMDI1LTA4LTIyIDExOjM0OjM5ICswMDAwDQo+ IENvbW1pdDogICAgIEtyaXN0b2YgUHJvdm9zdCA8a3BARnJlZUJTRC5vcmc+DQo+IENvbW1p dERhdGU6IDIwMjUtMDktMTcgMTQ6MTU6MTMgKzAwMDANCj4gDQo+ICAgICAgcGZjdGw6IGFs bG93IHRhYmxlcyB0byBiZSBkZWZpbmVkIGluc2lkZSBhbmNob3JzDQo+ICAgICAgDQpIaSBL cmlzdG9mLA0KDQp0aGlzIGNoYW5nZSBwcmV2ZW50cyBwZi5jb25mIHRvIGxvYWQgb24gb25l IG9mIG15IHNlcnZlcnMuIEl0IHdvcmtzIGZpbmUgDQp3aXRoIDNkMTRjYzgyZDdhOCwgYnV0 IGRvZXMgbm90IHdpdGggYW55IHZlcnNpb25zIGFmdGVyLiBKdXN0IHJlcGxhY2luZyANCnBm Y3RsIHdpdGggYSB2ZXJzaW9uIGJlZm9yZSA5ZGZjNWUwM2RhNTAgbWFrZXMgaXQgd29yayBh Z2Fpbi4NCg0KVGVzdHMgb24gbGF0ZXN0IG1haW46DQoNCiMgcGZjdGwgLWYgL2V0Yy9wZi5j b25mDQpwZmN0bDogZmFpbGVkIHRvIGNyZWF0ZSB0YWJsZSBfX2F1dG9tYXRpY19kNjNmMzc0 NV8wIGluIDogRGV2aWNlIGJ1c3kNCg0KRGlzYWJsaW5nIHRoZSBvcHRpbWl6ZXIgd29ya3Mg YXJvdW5kIHRoZSBpc3N1ZS4NCg0KIyBwZmN0bCAtbyBub25lIC1mIC9ldGMvcGYuY29uZiAm JiBlY2hvICQ/DQowDQoNCkkgd2FzIGFibGUgdG8gZmluZCBhIHNpbXBsZSByZXBybyBjYXNl Lg0KDQpUYWtlIHRoaXMgcnVsZXNldDoNCg0KLS0tDQpleHRfaWY9ImlnYjAiDQoNCmhvc3Rf aXB2ND0iMTkyLjE2OC4wLjEiDQpob3N0X2lwdjY9IjMzMzM6NDQ0OjIyMjoxODQzOjoyIg0K bWFpbD0iMzMzMzo0NDQ6MjIyOjE4NDM6OjI1OjMiDQpkYj0iMzMzMzo0NDQ6MjIyOjE4NDM6 OjMzMDY6NSINCmRiND0iMzMzMzo0NDQ6MjIyOjE4NDM6OjMzMDY6NCINCndlYj0iMzMzMzo0 NDQ6MjIyOjE4NDM6OjgwOjYiDQphbWF2aXM9IjMzMzM6NDQ0OjIyMjoxODQzOjphYTo0Ig0K DQpyZHItYW5jaG9yICJyZHIvKiINCg0KYmxvY2sgaW4NCnBhc3Mgb3V0DQoNCiMgYW50aSBs b2Nrb3V0IGR1cmluZyB0ZXN0cw0KcGFzcyBpbiBvbiAkZXh0X2lmIHByb3RvIHRjcCB0byAo JGV4dF9pZikgcG9ydCBzc2gNCg0KcGFzcyBpbiBvbiAkZXh0X2lmIHByb3RvIHRjcCB0byB7 ICRob3N0X2lwdjQsICRob3N0X2lwdjYsICRtYWlsLCANCiRhbWF2aXMsICRkYiwgJGRiNCwg JHdlYiB9IHBvcnQgc3NoDQotLS0NCg0KSXQgY2FuIGJlIHN1Y2Nlc3NmdWxseSBsb2FkZWQg d2l0aG91dCBkaXNhYmxpbmcgdGhlIG9wdGltaXplciBpZiBlaXRoZXIgDQpyZW1vdmluZyB0 aGUgN3RoIGVsZW1lbnQgZnJvbSB0aGUgc2Vjb25kIHBhc3MgaW4gc3NoIHJ1bGUgKCR3ZWIg aW4gdGhpcyANCmNhc2UpIG9yIGRpc2FibGluZyB0aGUgJ3Jkci1hbmNob3IgInJkci8qIicg bGluZQ0KDQpGbG9yaWFuDQo= --------------2Kk88JsTYN208XRdhZSjgmsw Content-Type: application/pgp-keys; name="OpenPGP_0xEF5BA4DCD5A9F3C0.asc" Content-Disposition: attachment; filename="OpenPGP_0xEF5BA4DCD5A9F3C0.asc" Content-Description: OpenPGP public key Content-Transfer-Encoding: quoted-printable -----BEGIN PGP PUBLIC KEY BLOCK----- xsFNBFpyBwsBEADLq0c46orEtbMn4SptX+VJxR1wB4YwaErZme1bqF4nZHIhlRNE T22HsHdQdoagaB4uACq0Rj5kHcu614ZnnNkLPyCxWQATx+cbdiFO4/hfT8tAvKnB tiy3awKJ5uGCNO2EzJwXW6KwdDA8XPRySqN8m1yPl+dW0Cls+/vO/QL/6+YLMupm EpSvFxRzAZTQuKyX4+xl+dYId24JiPd1yfCuDNOY3+OZ3QBMT00u/699N8lUWRti TwaQMwAOww8r/26YM6/SgcgFuLH2E/CVplY0sDvfoISlAj8agxdomNXfPjCMQ6w5 yGZmA+huFpPCVBTi3on/SWgbQO7dLVpN4BNPuScPosCb/dsOg0S74zCClsIU3gdU Gh9rwJY00/Ebid6V0R3c1Czwbg8LQedzlGDuXYXmzp6W2ujgr1cqbUD6lUWikUv2 IMdCbb8MxYhHLi3GYUs5Xpi+W7vM6T45KbuMr7O/1SjtcGOlNeDvGNgjcDk20fOg PPZ+M6i9vX5Q2oI9HoYaeTiYNwILkBLVP/L40kTo5EkiQOt4OW6BMbylqXPOaQMW uGVbmhCJQpbx8Vo80s2yiBBVWkLkWQIcIm3KZlLldJqKEFpQBWLBE1eFFqboYgAW zFn73CaV5tihobijMmmOV3a8cI1fI4kREyl3g+8bW+O0u3m3tuzVOpDpjwARAQAB zR9GbG9yaWFuIFNtZWV0cyA8ZmxvQHNtZWV0cy54eXo+wsGXBBMBCgBBAhsDBQsJ CAcDBRUKCQgLBRYDAgEAAh4BAheAAhkBFiEE7LNouHkIv7aRTXJp71uk3NWp88AF AmWarWAFCQ7rjOUACgkQ71uk3NWp88AYfQ/+MJWYN95HXWcWKw9mOffW6WJvq5PO E2RpoBXj2AJvzjF4bPt/mclA0+wlyAs6ayvCSRwEdgB0vF31DRPgsz/76PC3f1AD YbLdrGusCcPYMhvkgkXY6/p793YzI2ELjicHgn2pB9iy0Y+BnemAY8qXGqTX4d/q PllFcEOVZCDHez0JEFNCZC780pEzOHP9mMzXT/Pl4RBUBHOLv9j96enMIr8VXoMk fNJ5GqdF577Aa/C46pUoOeSc2KvS/5g3axSFLho/ni70M4tjGXMYDdbnNHOg/UjG iKKuZgzI9CXrvVAZfX663ERps/GXu1IiaJdadnQaLgPvjCjz0qM14hy/n67fCSqm YdKgwblUGvKC912vGsMN1ibS+7xoAsCiM4w+Ct2plOLO3rJ26xaZZlE137GpLh4R nnvrnDFUBEG47tZJO8wbedt2KwRKTPle136WedzjVlcuKoH1T9Dem6E1P9TUfNHq OYtD7iUouWYkftSoRAhkY4ISbDRlz2dqRagbHR1T0DXhraQyswQucoVQPTsy9PoX AZLY73Jep71nl3zQCTRXn7aSj2RO2ob0RvnBwueXdFpb1SfCeJwJhadmOuYF/i8R IskAzG0aapYT8VUe8tqjmsKM/MWTcngjWf/7u/7+xmtdpGqI7oY3SGbyu0rw+xIC XrD28N1H8kyazJ/CwZcEEwEKAEECGwMFCQeGH4AFCwkIBwMFFQoJCAsFFgMCAQAC HgECF4AWIQTss2i4eQi/tpFNcmnvW6Tc1anzwAUCWnIHWAIZAQAKCRDvW6Tc1anz wMHxEAC7Bd/rmRO1XAMAkQWddCZHHyr9t9XlZYxVVkwz3Mw6YszTTo+UmWez28MT B9eRSxM4qkL0YRER0JXGypD9apis7Q7zIthExjQhDrDYHlxXO9/UPBjoWhzvM6kS C8C3mYJH0GgnV4d/3QqsdhTF/wBpaMn8ITgR03jAO8Rjbe1DWi/RF6I1miQp8opE XytFsGGnBFxHLNXh5qHda8orI7I8gYqq5cbQZaGC3Let822KifwCiYWhCUrSUKrn uiRCPQctLe8tPNd7G99awtz6ctdPx6jztyUxBpjPuHkSOozSvgU9GYYnXydDnACu 3m85/mhG/3RFIfdAktrFV2+3QEIOvazUnm1MbuBk/+srLP0Gs+1W8HCIcRbyOHDi UNtXfEhQRWSPhQSwz1eQesep3wmIU1lk48TblWS4B6h7IHeP2SZ9lzMX9/jVwenm /lHJNq+1r1BYDpDTsBE+7YkIEww36Un0b86TwmVSBIY7Adn7dHuOO8MwQWHgMmEX YHvsN0vGktUlLSHlxLxYzpr+ObVKToMCLhuCSx6293IT83/LFCYeiR0phbYsYOB3 tzB0zZfrrRq8VF7iiBnQ94tGKY9vIm5I3b6FkL9/LmMS/k+9n7qym7BgxgMKV59G m8EOqYILG18zUs0VGJeN1i9R0e9Dd9pwPM2k6Q8unRV7GMknYcLBlwQTAQoAQQIb AwULCQgHAwUVCgkICwUWAwIBAAIeAQIXgAIZARYhBOyzaLh5CL+2kU1yae9bpNzV qfPABQJh8FPUBQkLSJbfAAoJEO9bpNzVqfPA+nQP/2DYXGFQ0UqSwzTCxPa6idAx yRWiEWn6RMRsUIRx4kCqHl8I/O1QikT/vrG3sEuN4NIcOtzYf7/y9lmwMBeELxdz DgIaIohmjWaB6Tytl8GlnKmvJ4dkCtvBudT8y6KAMe/LWoCAWMj92aEZYbttmHt7 TZzdH9XJBCTEaCQDzu4QxsxRNN5HGhbzrvQDjiTbmmcXVbKZ4urPAeJ/cax1VzTi JcDKKtlE/Iq7TCW/mVrAW/zo/2VNPqJ4vFViTBDFsFYBDpcMHgMPDyvgtuBdrwI/ rWNw1EPWUAep1+D2XrEZ2ofeSCqwxSYzhoZnUpbNLhkUJJmP1NxErg/twJERl512 e5M+ga01aqJ3oJhsxuiH9wbpby6r/23cBN9iTnvFCGOnCzYYKEXzJcefD6PQ2Qpx uLsD6+c1abkTuErzgt0c9UPbVFda261mv0FrA5Q28MyF/dnl3lbNZ60KJDvVRORY N9u/ZLclSRnXEned4ecVwrztEilSJH7zbUzsaHYYRc4YHwYA2uHmKSX0pYEjBAzm m/70YIwI6lhW6o2Pn2tjgLxl7j4QjvGqHyrYJ0MQivcgEmsqbZ/tyijctNOf0OSr odQvPXLI0cYWUsOnQfoC3cmYILQ/Jr9dvmmhSHqdxSEziipgOB/wlHChg6M11b4S 9K/dKPgX846KZiB5+leywsGXBBMBCgBBAhsDBQkLM37BBQsJCAcDBRUKCQgLBRYD AgEAAh4BAheAFiEE7LNouHkIv7aRTXJp71uk3NWp88AFAmHwTcwCGQEACgkQ71uk 3NWp88BpTRAAybyHhteWLV4VDlzl7NPxbN8c9cDDv1r0HlaUVxfrSw+1rzycEdhq A8o75Wh5II4KAFTbX2igGckskcoOdqm68MU8+zAtVxVZaqX+EGNXSLWZgAzlf9rA HDm/O1ZBShZhn9EJyarYPaSRNBevVaR9bY6LEFmDacb6qnRVOH4Z/6O6fq/IxoXQ qyV1NDmmObxtCcxwx71v+7mJoBMTximtdrPmcpGesCQquiWKa6DyYjZIEZ9gQPtt LQ+iYmwWJp6q68VULqY9X0zG7byc3Xe7W/5oEoTA/gSWG0EbPOdfTS77TTNxhgBz FB6VY81PVAYzH419Q0b055XLTupo+JTQUb6bbluH6UJIBtIp1iJlGN42qvkMwqTo gIdat/3aA+EWEfG7iWlx8Z1hFU3r7GMJ5o8QLsloVNWAda+iHaidIJvU1fJa0U9v 2r1d/KwYHj2qlMaQMZHjldULp7LPP/pITeQEnma3mZ6IX7cp6mUd8MOiVTPE42fP s8qBHKfuEcg7L07NcdRzzgS0LGQfv6fbnvNnvsDGAt4zGQ/Hj72Z5/eL1sDnoJQU HNHMJlNJieGplbLm3LacNQZa9979BjwK+mUr1nPaaP4YR3czfVwTMrxPKT9kFBDZ L4YQ8LbsH5JJC3As3EJdptIkANSm+hU54sG8QPz6TDsm7754d1n12M3NIEZsb3Jp YW4gU21lZXRzIDxmbG9ARnJlZUJTRC5vcmc+wsGUBBMBCgA+AhsDBQsJCAcDBRUK CQgLBRYDAgEAAh4BAheAFiEE7LNouHkIv7aRTXJp71uk3NWp88AFAmWarWAFCQ7r jOUACgkQ71uk3NWp88BTdhAAuK3YBk7cwMeMobupP/jeFI6c3cGjFGBEXPrc35sV H60mVMTuTRIDyJ6mHL3tQpt/nnB9AHi/TuruSnVVyS4m+iuxTTKAIDYCeM09GcYb dXJF9okoGnbawYgIOIxV79z9K8LL/zvsD+0VVmNnavFNY2VPqLcifdgVp7jw7EIv wV9QUX7fu0abCPk9aLeUik4p65ktbQod5tcoKqnMhFyeMc4TuahAgusWxe+ZrL0l VhyU2sM0hp49a5WUU2AVgywX36LGfd/uVOCmsjKWNLYXV/GlwEhH8qMkWyNeXvcj Jmvc/EIGryakKLq6QP/nxQUK8H1VFdSQCqbyTR6gF7rVGVGhetmVKYirypPQr3u2 oUukVVHKUedkSyOHEjoOujH73XQvIX2sBkNLUaAOnIB3aoTsCCKNykWOl5gHjzRk aCdG0Sne/wxsY2Gd7s6DTuFPXIH0NSiIz2AvFqktK6OnZfpBZE41ou+/QrPsG4I4 dsxqiXhimMAF3/jeLmOcCxMGQGbqOyYQ+Err1XGyuSqzsTs5k4GdV0JHkcZk2ro2 yz51FcUfEZPKT73wAMtaXoy1DFkTyNjLE/OjDnA2CQ6gaulOBCnSUN58j2lCFkVb vsdloFttp98EB8hJdY42a63sZWNvSg3GFb84D+hBKJZgg/tzgk5Zn5qkBlC2o3Fg JZvCwZQEEwEKAD4WIQTss2i4eQi/tpFNcmnvW6Tc1anzwAUCWnIHVwIbAwUJB4Yf gAULCQgHAwUVCgkICwUWAwIBAAIeAQIXgAAKCRDvW6Tc1anzwLtjD/49zLwXSOq7 X62ks6VB3zyexw8v2DdRw/qKqivVUz9NCYERKDEKT5gt2NZrYIFITg3bXl0toS6q tKW7K9lfNaeUcm48+iHAM7b7TxhbUjYpYYz+Yw7mJWsS+diWBGHZI4ON86sxkLSb Urjcb2VgnLiXT2x6s0Dn5TAuyhrgBfmnAQySKnecVfp0ULToB2kVDPYTEUv/+t8F 2VcIDDMHcU1u6x7k1iKH8GS2DVkKToavUce+vMrSNUHwyXZm9TbHxzE6pgkx0Y/n PsBDC6fLr6HMwUBXiTOIh4h0svamqs2RrzWFjH5PhLHlnMNt9AHJ9i1faONXhcEI jK9Yf7MYiN8FogmmZljcQrbm4Ocu+aViXn+Q2hWBAIMsM6TQHRFx0zbqknwbZ80E OWQnx1pdNHzCihUMI1YLbRLet/wanotoVSaKpS87imczCDoPrAulr+GXGAYQ7g0Q rKjr/X6+vXPxL+GuqueU5VAIIY3J3AHJwhDr+gVWjw6jtqsgyqEcssd8ew39RwDl 8nO6/6igj07uchngPUVYRzrOd0MlpN66g3dD6Ih3pD8Z0qfEWdvVFGjKuKMc7aaR 5RA10S3o+p9bphW4VLtG6Ubq7m4mi7M162q3JAnULtEfe3eY8Gb74yseE4li+6B4 hLN02DWQMfMZjFmYgTmazus+b6tZqAn/vsLBlAQTAQoAPgIbAwULCQgHAwUVCgkI CwUWAwIBAAIeAQIXgBYhBOyzaLh5CL+2kU1yae9bpNzVqfPABQJh8FPVBQkLSJbf AAoJEO9bpNzVqfPAT7QQAIjDUhOPs13Va+KA3p4knO6bMa5Qm41UL1+iKU4lAdDu 6R3IZuccMhpdoQJ2DZWRSiqfmi6/xM6qwV0V1wx7TsIECoQ3YxwncPlvogZLOgA7 lmt8OV4TyfZStEdqz1mI4mqZ56jlYZ6nkjOU4l6Cz1Hf39lUXHZnSqEq9yW+zkyy yQgYTd0Lwwr2rDlLFGF1DQTDtIfA5bLOzNSFw079wizUbSZIqDMyGcFgap2otvCM 07QCSsBLDtWvr1Qxinl995oWkftKMwyb9Ozkws9aKHL5akndyUShz9P524ssyUYp OQQxeDAgdI1Sz48ifbWFvvJzn0MHkkfZeGqOYJ0uvl+SJ8ofEC4w+unTYojWfKp4 dPjZ2VQG+kzEN0P/GkIXsu55qQ7rU2ed8ySOXNWEO4XI8wA807jJB6DGTPaB0dR2 qMGZTK1qlUDr/2eefRTHk6LGnLwWrz86O1vQPfLJgobo2ycOVrqwrZDOkaO34rdY 3DwqOBlFzX09edihh3g5IVbx2rAWwJC2wSWcMfpexzvU6rxN7bmCac66CvyrzPuQ Az5YiYZx3mujeZZNU61pixlIcjPGp9hCVk3UV4fXbqmdmvM64e8JFNh59B6TaiMH Uvsph4H3F5a6tFMq9NOn8tn+QKZpDWGrpX3g43ZyEyx5B4l7rJPTPTMK/mv8ed+6 wsGUBBMBCgA+FiEE7LNouHkIv7aRTXJp71uk3NWp88AFAmHwTcwCGwMFCQszfsEF CwkIBwMFFQoJCAsFFgMCAQACHgECF4AACgkQ71uk3NWp88A6NA//UV2AdO6DubU4 Y/eTPnE4gPpy5INRnVB4U28Y5T+DSq3LUF1r391xEmM51u0iSk9c9Rs5mJlYUsAE GjzaXG5+OyjW7PCW8Jmr+oxgy2lPKzwtlRU6ttV5Qzwoose0urYMvj0S3wOrAQ1z Fo9rrThETGx++sEAzA5YXqQfwMLhxsKL7YHffk1QIWgz+pgLc+HRsKta7SWyIR3Q bdYnxbPw6ISAP6a6hC1oQwqSDoH3tNoK9wt/bmPpU7RtOLJIzd7VHA09pPK70ZKH kvs9OE8Trse4Dbs1eiH6gcNVt0zjvk4YhDwgBa+4/IQnpH3UiOlAVHeqLJZ6mlHU CDlegHUOlC/x8q7ZtDObuVBYLTt2Oe3D5JzFwPGK6Pv48vUKUoqN7NNKa+MkQDob fAHXsy1KcjxMxWc9HU0axKFNjkWXmKHJDDXCDZ4ktcmDStgu5uE+EmLKiIY4iTUF HfjQBt6fWoMLfdX1CjkIoWVeLO8XKB3LeH9ogl6r2ba5C9Ck+QwzgiN7a2a+Ur5D ccmSLQ6dt4Z/i8lr90FV2eMCnuJ1hpXIqFXgPd1ofXM5NbDEutIc6/mLGlH5kKYb qeYCkQoTarmWb9vHlkBc/1JLDIt1XbY9Ru6I0Znl4nH/2WG5fXqdVncXbElmcm6p BXuRbEB53HBo3k/lTwpM8U+AtEAP1TTOwU0EWnIHCwEQANHrOm5vydK/ij1zkDyL Zzbogk5zjMh6oAr3cH4oGbJHPLlyFZTCVBYUwD4kh6NV1sKuZOeX/aygyVg1RyLu lnzsc6YjXOIxlqhqQwGI8k8ssAIpMSf029781CNF2HC42CrJeHtXNONDNOjsMuox zga9zLQCh4jLTlE/TUJo6KVABWBVRtTVh2Z77pKtN7j2NPFBHvp7K0WHfV+TYnls gjhUA0ACZnUdHS2YRzBhCzzQeludxBz54S9xbUq1mfZfVx8AbAGXF2zxo68nvvAA Jn48HiBS3dMhCGYJDdZdja6QdUFPieminOxwkUzCqmKxm+Aj7USue1SbZZqJxmMI 1eF4Ork/BJJI74Z/FnJgYR4UkEiD3J/KUocQCIH3daB1+/CXlh99Ib7AP+QGuKk3 vnNHh7VBq3E+VAiM5LU0BmgW+cdRPHkiwM7sDa2VnV3VqvV7QmoMKnHFzUB6Nn8u E+iakp5J81Pr68kDOq7kLW3UnGmg1PUqbsnCaTimJb3JAYWzOW/9CYcPlbAdIqi+ wH7MOoeL+PA99A3kW/881rGmeOYFzzrsNVLtea+AJfXtp4LN5gOVIPIpovCNSVXX EKgl7a4vjUGzVBzrH7PzT+k4XUEQwNCACfGZxEExtny19bjvumZ0rv+AEAHvsWSK XHUVJzINjqd9UioaEbKGAPlPABEBAAHCwXwEGAEKACYCGwwWIQTss2i4eQi/tpFN cmnvW6Tc1anzwAUCZZqtYAUJDuuM5QAKCRDvW6Tc1anzwCBsEAC0eYv6YNJHMdgG Ab22Ej1wOvszzq6+2sDPXGMTyCUMTOq779cc1yDcrKgiMPO6Kmg+um3veUu/6Tru x8tjxhxoKrRZ8/kF8lc5lx2krPFDJoojmHlENCyMTOlIRJ0M7ZgJDKkD0pEwm0j9 UgmrFmCU6n9WHhpoXW3kGLY0M3IAwezyROg1GfnpbnXvYun2wmH3OukDoOEkuFJY Jz22XNRZBQh2/RjtnlTl6l9G5ZONgZJJziSa97Z5UEsg35EytEeTJVciiP0BXBWg YwE+0cRh6MEiY51X+hqdbUQ3RU1tAMC5HGGCtR9lHgpBj0ZTtBxXnOfXNWHDQksw gSrEUH1DROcx7BNJdvjzYMztwvojeJgOgSM+RA6hg/e31jpt8X2HTYuNUrnE1nao naso3EaNXYE2TQ0t9EGdxWRfoElZ5DUoFMTKZ3/ysPS9Cmsb1TOrO2Hvuxmhbr/3 zfLXIyWy56trqqp0ffubfXT8avdNBMJwZjcPxPbsxRwtle3D4ytty0qDzF7gKMd4 84OtBGtW4C4QhseU5yyJBXD1SuJjZKodiwqBtWUgN1JkfeptGukulB+NwmVC9Yrh vYjXBDr0EM6Ot43kg5jGFdHOAhfzqetncKKiJUVUHDg+goxejamNsNq88xdnx1QD sDquZA8UdDdLgd8iDGyHTTlgokPZl8LBfAQYAQoAJhYhBOyzaLh5CL+2kU1yae9b pNzVqfPABQJacgcLAhsMBQkHhh+AAAoJEO9bpNzVqfPAz/wP/0hsPMy+zPg74ZzP WhTHggzFtAPD32qAl7FHlyNbbTsaRGcpUnTOrHtdz5TcDK2eK7CocRd5Xioio/qH XikS4Kp1En59KbrmsHj5l14zZjlhi9QEHI4zvwxuzpJnLaTlfQQvkVeM1Ugw6/Yi ZuXJ5FaFYrqAJ9z+XuRXURhXH0tXe6axzsr5x5mV8TVTyFZuJ7yvu2XdX2CAXaDV zJz2u7SpbeyDwPi81NLW7B2p5xwpFzeiytXDhatbWcbFOZNMKpVgYeMXawA0X2jU kH3eGhfPyXJ2YN2En/rb9cdql5PUUHybuC6WKczfdV44IKM351SAtCTm0AaD6IdB aELhD+jibQ6p91xJh2EInuHYjgbA6gZrHOheoQvjsa7HP7MTiiwAU/kkvEJNuLbH mx24K/HHdZs73mRkkqnsPQEgqlspx+TJax7ndgEj3BKuQiKX4ieeq9IPNT2cy8jI pKO/i6LC9mLUdju0+KKv8/adplqJDVIAzQos/eDXbdZyeFEqj75lEeFrLn/vRIoZ 3ESYp/eeV3zE0Kz0QhY5OlFqpz37M5wPXNVNnCfCAGuc+rN89b353sXAA/Ux0lut E64LZt/M1nKhHi4cCcM7I1bAZKZKG/uGF16207x0luWd5Njy+HPGjfqlaaiMR2CC Fc3D0mLuTIicCZar2TBXlWi7dk0XwsF8BBgBCgAmAhsMFiEE7LNouHkIv7aRTXJp 71uk3NWp88AFAmHwU/4FCQtIluAACgkQ71uk3NWp88ByqQ//c50WjTdLufk8CcUg 922ngNjqnnmzuoI6bHH6E9c9SzkyYhv6TzM+0weStm6PtCcM0VdvZ34knjRkKgcd Ux2d2NKYebRQfK3xeGhHXY4bcMT/NEOEs8U6EmQBjAZJ3TV5RKTHsh6FaXBqEe6p CgLa6+zPYPaHH/JEzt4c7w8wElSMIgElcJeEARgL+LJUoW8SfOg24bVIL7/upEnt aputoTE64vHA/9JlQQBMJgH+pOJfacGFtqAHZdL40ubM9NLqgfJ7k9tjbogd1wY0 geQhW3ioctxGZHKRtbWjJrl7cIQIEE5ppJ67jL/Trz/I6EitZ60skQcM3DG2FuD0 uaceHP0UrHVSHMoUC0NPOHNWpPXAyJoslPaWYR57zSHafOKnxFlzq17VklH1MhI9 J6SvbwIyh+Fa32pMPlrUa5XhQv5rk0rtRX7JHgaYbbPYJNH6MdVWfqVjC7McLCpa YAqoQhc6TeXsvobGsI2zgPF9iiY5di6+32Lr5sbvxToEcT4YjtPFDJBQCJR1p/rF 4rxk28WcWoBqLMzq+jGZik99SHFNVqmNxCIwP2aHQ5Ac/3E/LHuIb4ecIa6EbhlB n3KeSplVCYZAr0sZ1cDGM+Lg6a/CPk2FlPi5yWyAWXB7PMLzbmkjC3fQi0v+DItm yQ0bwHZkXjsIiMc88XYq16uypGjCwYYEGAEKACYWIQTss2i4eQi/tpFNcmnvW6Tc 1anzwAUCYfBNzQIbDAUJCzN+wQAUCRDvW6Tc1anzwAkQ71uk3NWp88D35A/+Mhe/ G/j0j5g4gLDn3zHflOdzIU9UXpvj1sQobJ+FajLSwK3K/r8amHE62TbW+W7GEIAz M+O2ZS9Teuz1n3tdvW7ck5DkswOeqNHkn5eJoRoZxkEWHM8QB8NmzeCbQsGVu5MI anBht54JVlRvTvRj3q0peHNTweRGBlIzQi+Zp+/5E8EsaDTIzoRLEEvh4Iy6ER4u /ozULlVuYWOd8K5Ex+4rQGaIR8WHfs4nz3IkMlEMOD9IVntF0lXMCTfsc/NTYQOV 9C+o5bMvRvMUJsfJN+wTkygKmrTyHrEpZOJc0zblV5p26yBhrL82DuOrDGYk/hD5 5nH92AKupjDYnZpVqFcjgSp3JS85hI/4BXHiFaxgjxrRvaRHVwG6Z0p2GXHrfvhw ktW0R2DJ6z8QexPtV8uhlb8pX2oSHLFzLdZqSNBSs7iXB/DuALL/kLCmOkOLXI0l 9AkThxJxjvZSGjTgO52Fz+YbLsiIx5D0Wf1YK8A/v8/T1CrM6sgwSKcH+EZPQpoP M9vkz8Z6KCzAZ0wEDzWCIiPXzMljh7Xz5CyIhlLRgR2+ywEGez8bIuX0d+vnK4cC YkIaTG67YZuFRNqcCpzJaIS158ULaDDH08PY8wqU48LhBBWCCBLXvF+RslyLXwJu G/c+++Tw0tCWW1HB2dbL+uTj+ffSGmIH968yZyM=3D =3DUt5Y -----END PGP PUBLIC KEY BLOCK----- --------------2Kk88JsTYN208XRdhZSjgmsw-- --------------EosdUZdXXen4Bh6M03jMfChH-- --------------s0LXZRvw2F2ija5pDX9HJ9up Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEE7LNouHkIv7aRTXJp71uk3NWp88AFAmjg0IgFAwAAAAAACgkQ71uk3NWp88Da Cg//dK21IGCY8pkJw9GAX/shFspA3Eyp5qxsXWKaqCvLkyg2ng/vQmCM1gXlwk0pfQ+lbhphmBXn QzkwPUfp1MBnV/mQO1tH3BFifEHzIUNTcfXzBnXXboIqBKlGL13RdZ5fF8m96JvRLy1jqlORyryA Mn9vPqMCLetlzceuafjO5sFceKE8XaTN0esESoHUmzH42cIT3TqDu5SugPWoY+hhY7y0ndFOgGfk nAK6PI6m0joASHkT/nal+P5PQgvpgJ6ytMP0fcne260rnGlQLo2BwfpUleMq3ZG4XQBYjEq+3IgG Ssol3EVhh37c0fdZtpDbdVID6o4TVSy8tdIctpjqI2LAHbgF6V3rdBvjTejkcPZ0qtHP8qLVimbu gTp+IA+7Qs/YNc1cTiM8r5WOSpKuXGX4gQZtxbhubhrzCG5SWnkf0evG0IZ6YAwIpYVsBOufjJhv SUAYoMRiZV32pDMXo4HVNwS/AuEsU+Ns/u6Dde1nwG8uB5HIOCUV+Vvrbrhu2d4mdTHG2RCaRWau sH8HEtNnWiNXkhZp9kCMV6zRB+Yju+4S6/IT4R//EnwmmAYFr7nxyV8pOSxKoz2g88yH79vzx5e3 OQSvr5ySkdqDEJw993FvaqMNYO+9rfcz2tUbHo8OwLTEp2Z65vE9Wc3W/SZpM7OlFqWmO9qsECUo ypE= =moxh -----END PGP SIGNATURE----- --------------s0LXZRvw2F2ija5pDX9HJ9up-- From nobody Sat Oct 4 08:21: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 4cdz5W08c0z6B3kG; Sat, 04 Oct 2025 08:21: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 4cdz5V6xVjz3Fdc; Sat, 04 Oct 2025 08:21:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759566094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M2PF3ra1TVrMI8l/5/AfzXaJPwU1ysYUliKlPosDJyA=; b=ihYFBbv+gaQkV6upk1k+525zm3O8sF1FWZ8BXlIWlIaqidEZ92wtBRg5wlG1VXuyrIqwLT hydVmmdjo3vgfMBJCsAv96ZnZ52VTuRKSgOaLWZ0F6/yh0hxvQDLPtg1+wXKpGzy+BQCiQ D9POd32GzlVKPsnhKSr4X6InMLwFWfdb2qh5SkLech2hB1N+sWoGRHneqFhVHQ9bLlDJbx GXLp0Lcvji+6muJQ37RWQuMlhX/jjGlinDkXb/HP5KnTKZz7tYNWQnKkb0jhIl3mfHfipj Fk+ebfV9Jk175epTVQQRbrMX4McnDjgrYCGKhhkeNPhW4/T7UhvswCrJpafvUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759566094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M2PF3ra1TVrMI8l/5/AfzXaJPwU1ysYUliKlPosDJyA=; b=YZ1vjlkb/8Xk3KdmUR3GDc63RASFNrFTfdeX37TPw2Ho+ktSY3hlZYWq0AEDp16Gif6OTv /RAT+HVCrY0V7vM+qgeaIXMf37S71w20ODhaSIyBKv4WOQeoAJDisIyvz/bHoO8KOvrBCC FFNLWpdxetd85TWmVJiCV21TSi+apASJXnjZ25Q6PAgOZlSUep6vCRkTdj+Nk4SkGpjgpU FKno52TNwb87u1BT/Lvx/oBZ8hAJo1FtDHqEN911OBetqeGhNJAYr+kLNp7ZgVA2rFS2ay cziaumkAKgmnnn/yELc8iH6hVzUPTdlRDfscpJs2+ierCw/j6HlQiH4i6aX81w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759566094; a=rsa-sha256; cv=none; b=jl0Vfkqx+hXoVbh3mJLXL1ijoI/sp2jWtmSmC/+0p/4vuftxsLis2CWMdSe+Zu6I2zFERm B2f93tqZcvpNjNAHOtwyl+vGHroqh6q37n9x43miffgGVpJFPUtxsOS4bCw6GbWZ4WdALB 6bQMbcqum/UBxZrmemA/EL4zEKvdjCZKrdmTJ8xuNrwpUETbDeTP8eE+Cs8H4bLMudq0od r3rTm4KaWsOPGidKGQNQFIs0qG9Oe7ULzJXOcCdk+BYwUjiHCv3Ltgcu8xJDfMCoxqAGSl Z3+oH5DmbHRZS+7+2sA9RFqLMG3RPKmG3iUoaFrofkAayA7az6WCX9GfxuTGmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdz5V6WvBzZTv; Sat, 04 Oct 2025 08:21:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5948LYs7015141; Sat, 4 Oct 2025 08:21:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5948LYuc015138; Sat, 4 Oct 2025 08:21:34 GMT (envelope-from git) Date: Sat, 4 Oct 2025 08:21:34 GMT Message-Id: <202510040821.5948LYuc015138@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 257a750c60f1 - main - stress2: Add syzkaller reproducers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 257a750c60f14f83dff7bf5d2189089b1e74870b Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=257a750c60f14f83dff7bf5d2189089b1e74870b commit 257a750c60f14f83dff7bf5d2189089b1e74870b Author: Peter Holm AuthorDate: 2025-10-04 08:20:37 +0000 Commit: Peter Holm CommitDate: 2025-10-04 08:20:37 +0000 stress2: Add syzkaller reproducers --- tools/test/stress2/misc/all.exclude | 6 +- tools/test/stress2/misc/syzkaller84.sh | 402 ++++++++++++++++++++++++ tools/test/stress2/misc/syzkaller85.sh | 499 +++++++++++++++++++++++++++++ tools/test/stress2/misc/syzkaller86.sh | 555 +++++++++++++++++++++++++++++++++ 4 files changed, 1461 insertions(+), 1 deletion(-) diff --git a/tools/test/stress2/misc/all.exclude b/tools/test/stress2/misc/all.exclude index f9b32db95799..0658bfdc0c1b 100644 --- a/tools/test/stress2/misc/all.exclude +++ b/tools/test/stress2/misc/all.exclude @@ -25,6 +25,7 @@ gnop13.sh https://people.freebsd.org/~pho/stress/log/log0386.txt 20221113 gnop7.sh Waiting for patch commit 20190820 gnop8.sh Waiting for patch commit 20201214 gnop9.sh Waiting for patch commit 20201214 +graid1_3.sh Hang seen 20250915 graid1_8.sh Known issue 20170909 graid1_9.sh panic: Bad effnlink 20180212 lockf5.sh Spinning threads seen 20160718 @@ -74,10 +75,13 @@ syzkaller67.sh panic: ASan: Invalid access, 8-byte read at ... 20230621 syzkaller80.sh panic 20250711 syzkaller81.sh panic 20250711 syzkaller82.sh panic: m_apply, length > size of mbuf chain 20250724 +syzkaller84.sh panic: Assertion !(sb->sb_state & SBS_CANTRCVMORE) 20250810 +syzkaller85.sh panic: Assertion uio->uio_resid < 0 failed 20250928 +syzkaller86.sh Fatal trap 12: page fault while in kernel mode 20251001 +write2.sh panic: sndbuf_acquire: count 255 > free 0 20251003 quota3.sh https://people.freebsd.org/~pho/stress/log/log0604.txt 20250728 quota6.sh https://people.freebsd.org/~pho/stress/log/log0456.txt 20240707 truss3.sh WiP 20200915 -zfs18.sh https://people.freebsd.org/~pho/stress/log/log0560.txt 20241118 zfs9.sh panic: sacked_bytes < 0 20250711 # Test not to run for other reasons: diff --git a/tools/test/stress2/misc/syzkaller84.sh b/tools/test/stress2/misc/syzkaller84.sh new file mode 100755 index 000000000000..a7976be2eeb6 --- /dev/null +++ b/tools/test/stress2/misc/syzkaller84.sh @@ -0,0 +1,402 @@ +#!/bin/sh + +# panic: Assertion !(sb->sb_state & SBS_CANTRCVMORE) failed at ../../../kern/uipc_usrreq.c:1549 +# cpuid = 6 +# time = 1754809105 +# KDB: stack backtrace: +# db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0176ef6a80 +# vpanic() at vpanic+0x136/frame 0xfffffe0176ef6bb0 +# panic() at panic+0x43/frame 0xfffffe0176ef6c10 +# uipc_soreceive_stream_or_seqpacket() at uipc_soreceive_stream_or_seqpacket+0x968/frame 0xfffffe0176ef6cd0 +# soreceive() at soreceive+0x45/frame 0xfffffe0176ef6cf0 +# kern_recvit() at kern_recvit+0x181/frame 0xfffffe0176ef6da0 +# sys_recvmsg() at sys_recvmsg+0x67/frame 0xfffffe0176ef6e00 +# amd64_syscall() at amd64_syscall+0x169/frame 0xfffffe0176ef6f30 +# fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe0176ef6f30 +# --- syscall (0, FreeBSD ELF64, syscall), rip = 0x821d3da8a, rsp = 0x824440f68, rbp = 0x824440f90 --- +# KDB: enter: panic +# [ thread pid 17448 tid 292963 ] +# Stopped at kdb_enter+0x33: movq $0,0x12304a2(%rip) +# db> x/s version +# version: FreeBSD 15.0-PRERELEASE #0 main-n279510-db7c0e32a05d-dirty: Sat Aug 9 17:21:54 CEST 2025 +# pho@mercat1.netperf.freebsd.org:/usr/src/sys/amd64/compile/PHO +# db> + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +. ../default.cfg +set -u +prog=$(basename "$0" .sh) +cat > /tmp/$prog.c < + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static unsigned long long procid; + +static void kill_and_wait(int pid, int* status) +{ + kill(pid, SIGKILL); + while (waitpid(-1, status, 0) != pid) { + } +} + +static void sleep_ms(uint64_t ms) +{ + usleep(ms * 1000); +} + +static uint64_t current_time_ms(void) +{ + struct timespec ts; + if (clock_gettime(CLOCK_MONOTONIC, &ts)) + exit(1); + return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; +} + +static void thread_start(void* (*fn)(void*), void* arg) +{ + pthread_t th; + pthread_attr_t attr; + pthread_attr_init(&attr); + pthread_attr_setstacksize(&attr, 128 << 10); + int i = 0; + for (; i < 100; i++) { + if (pthread_create(&th, &attr, fn, arg) == 0) { + pthread_attr_destroy(&attr); + return; + } + if (errno == EAGAIN) { + usleep(50); + continue; + } + break; + } + exit(1); +} + +typedef struct { + pthread_mutex_t mu; + pthread_cond_t cv; + int state; +} event_t; + +static void event_init(event_t* ev) +{ + if (pthread_mutex_init(&ev->mu, 0)) + exit(1); + if (pthread_cond_init(&ev->cv, 0)) + exit(1); + ev->state = 0; +} + +static void event_reset(event_t* ev) +{ + ev->state = 0; +} + +static void event_set(event_t* ev) +{ + pthread_mutex_lock(&ev->mu); + if (ev->state) + exit(1); + ev->state = 1; + pthread_mutex_unlock(&ev->mu); + pthread_cond_broadcast(&ev->cv); +} + +static void event_wait(event_t* ev) +{ + pthread_mutex_lock(&ev->mu); + while (!ev->state) + pthread_cond_wait(&ev->cv, &ev->mu); + pthread_mutex_unlock(&ev->mu); +} + +static int event_isset(event_t* ev) +{ + pthread_mutex_lock(&ev->mu); + int res = ev->state; + pthread_mutex_unlock(&ev->mu); + return res; +} + +static int event_timedwait(event_t* ev, uint64_t timeout) +{ + uint64_t start = current_time_ms(); + uint64_t now = start; + pthread_mutex_lock(&ev->mu); + for (;;) { + if (ev->state) + break; + uint64_t remain = timeout - (now - start); + struct timespec ts; + ts.tv_sec = remain / 1000; + ts.tv_nsec = (remain % 1000) * 1000 * 1000; + pthread_cond_timedwait(&ev->cv, &ev->mu, &ts); + now = current_time_ms(); + if (now - start > timeout) + break; + } + int res = ev->state; + pthread_mutex_unlock(&ev->mu); + return res; +} + +static void sandbox_common() +{ + struct rlimit rlim; + rlim.rlim_cur = rlim.rlim_max = 128 << 20; + setrlimit(RLIMIT_AS, &rlim); + rlim.rlim_cur = rlim.rlim_max = 8 << 20; + setrlimit(RLIMIT_MEMLOCK, &rlim); + rlim.rlim_cur = rlim.rlim_max = 1 << 20; + setrlimit(RLIMIT_FSIZE, &rlim); + rlim.rlim_cur = rlim.rlim_max = 1 << 20; + setrlimit(RLIMIT_STACK, &rlim); + rlim.rlim_cur = rlim.rlim_max = 0; + setrlimit(RLIMIT_CORE, &rlim); + rlim.rlim_cur = rlim.rlim_max = 256; + setrlimit(RLIMIT_NOFILE, &rlim); +} + +static void loop(); + +static int do_sandbox_none(void) +{ + sandbox_common(); + loop(); + return 0; +} + +struct thread_t { + int created, call; + event_t ready, done; +}; + +static struct thread_t threads[16]; +static void execute_call(int call); +static int running; + +static void* thr(void* arg) +{ + struct thread_t* th = (struct thread_t*)arg; + for (;;) { + event_wait(&th->ready); + event_reset(&th->ready); + execute_call(th->call); + __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); + event_set(&th->done); + } + return 0; +} + +static void execute_one(void) +{ + if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { + } + int i, call, thread; + for (call = 0; call < 4; call++) { + for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); + thread++) { + struct thread_t* th = &threads[thread]; + if (!th->created) { + th->created = 1; + event_init(&th->ready); + event_init(&th->done); + event_set(&th->done); + thread_start(thr, th); + } + if (!event_isset(&th->done)) + continue; + event_reset(&th->done); + th->call = call; + __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); + event_set(&th->ready); + event_timedwait(&th->done, 50); + break; + } + } + for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) + sleep_ms(1); +} + +static void execute_one(void); + +#define WAIT_FLAGS 0 + +static void loop(void) +{ +// int iter = 0; + for (;; /*iter++*/) { + int pid = fork(); + if (pid < 0) + exit(1); + if (pid == 0) { + execute_one(); + exit(0); + } + int status = 0; + uint64_t start = current_time_ms(); + for (;;) { + sleep_ms(10); + if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid) + break; + if (current_time_ms() - start < 5000) + continue; + kill_and_wait(pid, &status); + break; + } + } +} + +uint64_t r[2] = {0xffffffffffffffff, 0xffffffffffffffff}; + +void execute_call(int call) +{ + intptr_t res = 0; + switch (call) { + case 0: + // socketpair\$unix arguments: [ + // domain: const = 0x1 (8 bytes) + // type: unix_socket_type = 0x5 (8 bytes) + // proto: const = 0x0 (1 bytes) + // fds: ptr[out, unix_pair] { + // unix_pair { + // fd0: sock_unix (resource) + // fd1: sock_unix (resource) + // } + // } + // ] + res = syscall(SYS_socketpair, /*domain=*/1ul, /*type=SOCK_SEQPACKET*/ 5ul, + /*proto=*/0, /*fds=*/0x200000000440ul); + if (res != -1) { + r[0] = *(uint32_t*)0x200000000440; + r[1] = *(uint32_t*)0x200000000444; + } + break; + case 1: + // sendmsg arguments: [ + // fd: sock (resource) + // msg: ptr[in, send_msghdr] { + // send_msghdr { + // msg_name: nil + // msg_namelen: len = 0x0 (4 bytes) + // pad = 0x0 (4 bytes) + // msg_iov: nil + // msg_iovlen: len = 0x0 (8 bytes) + // msg_control: ptr[inout, array[ANYUNION]] { + // array[ANYUNION] { + // union ANYUNION { + // ANYBLOB: buffer: {04 01 00 00 ff ff 00 00 01} (length 0x9) + // } + // } + // } + // msg_controllen: bytesize = 0x104 (8 bytes) + // msg_flags: const = 0x0 (4 bytes) + // pad = 0x0 (4 bytes) + // } + // } + // f: send_flags = 0x0 (8 bytes) + // ] + *(uint64_t*)0x200000000000 = 0; + *(uint32_t*)0x200000000008 = 0; + *(uint64_t*)0x200000000010 = 0; + *(uint64_t*)0x200000000018 = 0; + *(uint64_t*)0x200000000020 = 0x2000000007c0; + memcpy((void*)0x2000000007c0, "\x04\x01\x00\x00\xff\xff\x00\x00\x01", 9); + *(uint64_t*)0x200000000028 = 0x104; + *(uint32_t*)0x200000000030 = 0; + syscall(SYS_sendmsg, /*fd=*/r[1], /*msg=*/0x200000000000ul, /*f=*/0ul); + for (int i = 0; i < 32; i++) { + syscall(SYS_sendmsg, /*fd=*/r[1], /*msg=*/0x200000000000ul, /*f=*/0ul); + } + break; + case 2: + // close arguments: [ + // fd: fd (resource) + // ] + syscall(SYS_close, /*fd=*/r[1]); + break; + case 3: + // recvmsg arguments: [ + // fd: sock (resource) + // msg: ptr[inout, recv_msghdr] { + // recv_msghdr { + // msg_name: nil + // msg_namelen: len = 0x0 (4 bytes) + // pad = 0x0 (4 bytes) + // msg_iov: nil + // msg_iovlen: len = 0x0 (8 bytes) + // msg_control: ptr[out, buffer] { + // buffer: (DirOut) + // } + // msg_controllen: len = 0x19 (8 bytes) + // msg_flags: const = 0x0 (4 bytes) + // pad = 0x0 (4 bytes) + // } + // } + // f: recv_flags = 0x80 (8 bytes) + // ] + *(uint64_t*)0x2000000005c0 = 0; + *(uint32_t*)0x2000000005c8 = 0; + *(uint64_t*)0x2000000005d0 = 0; + *(uint64_t*)0x2000000005d8 = 0; + *(uint64_t*)0x2000000005e0 = 0x200000000580; + *(uint64_t*)0x2000000005e8 = 0x19; + *(uint32_t*)0x2000000005f0 = 0; + syscall(SYS_recvmsg, /*fd=*/r[0], /*msg=*/0x2000000005c0ul, + /*f=MSG_DONTWAIT*/ 0x80ul); + break; + } +} +int main(void) +{ + syscall(SYS_mmap, /*addr=*/0x200000000000ul, /*len=*/0x1000000ul, + /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/ 7ul, + /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x1012ul, + /*fd=*/(intptr_t)-1, /*offset=*/0ul); + const char* reason; + (void)reason; + for (procid = 0; procid < 4; procid++) { + if (fork() == 0) { + do_sandbox_none(); + } + } + sleep(1000000); + return 0; +} +EOF +mycc -o /tmp/$prog -Wall -Wextra -O0 /tmp/$prog.c -pthread || exit 1 + +work=/tmp/$prog.dir +rm -rf $work +mkdir $work +cd /tmp/$prog.dir +kldstat | grep -q sctp || { kldload sctp.ko && loaded=1; } +timeout 3m /tmp/$prog > /dev/null 2>&1 + +rm -rf /tmp/$prog /tmp/$prog.c /tmp/$prog.core $work +[ $loaded ] && kldunload sctp.ko +exit 0 diff --git a/tools/test/stress2/misc/syzkaller85.sh b/tools/test/stress2/misc/syzkaller85.sh new file mode 100755 index 000000000000..1772c0dc58b8 --- /dev/null +++ b/tools/test/stress2/misc/syzkaller85.sh @@ -0,0 +1,499 @@ +#!/bin/sh + +# panic: Assertion uio->uio_resid < 0 failed at ../../../netlink/netlink_domain.c:808 +# cpuid = 8 +# time = 1759044376 +# KDB: stack backtrace: +# db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0184d17a70 +# vpanic() at vpanic+0x136/frame 0xfffffe0184d17ba0 +# panic() at panic+0x43/frame 0xfffffe0184d17c00 +# nl_soreceive() at nl_soreceive+0x433/frame 0xfffffe0184d17ca0 +# soreceive() at soreceive+0x45/frame 0xfffffe0184d17cc0 +# kern_recvit() at kern_recvit+0x181/frame 0xfffffe0184d17d70 +# sys_recvfrom() at sys_recvfrom+0xa2/frame 0xfffffe0184d17e00 +# amd64_syscall() at amd64_syscall+0x169/frame 0xfffffe0184d17f30 +# fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe0184d17f30 +# --- syscall (0, FreeBSD ELF64, syscall), rip = 0x822882cca, rsp = 0x823572e88, rbp = 0x823572f90 --- +# KDB: enter: panic +# [ thread pid 11012 tid 138112 ] +# Stopped at $0,0x121a722(%rip) +# db> x/s version +# version: FreeBSD 16.0-CURRENT #0 main-n280667-52eb7e394a7e-dirty: Sun Sep 28 08:56:14 CEST 2025 +# pho@mercat1.netperf.freebsd.org:/usr/src/sys/amd64/compile/PHO +# db> + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 + +. ../default.cfg +set -u +prog=$(basename "$0" .sh) +cat > /tmp/$prog.c < + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static unsigned long long procid; + +static __thread int clone_ongoing; +static __thread int skip_segv; +static __thread jmp_buf segv_env; + +static void segv_handler(int sig, siginfo_t* info, void* ctx __unused) +{ + if (__atomic_load_n(&clone_ongoing, __ATOMIC_RELAXED) != 0) { + exit(sig); + } + uintptr_t addr = (uintptr_t)info->si_addr; + const uintptr_t prog_start = 1 << 20; + const uintptr_t prog_end = 100 << 20; + int skip = __atomic_load_n(&skip_segv, __ATOMIC_RELAXED) != 0; + int valid = addr < prog_start || addr > prog_end; + if (sig == SIGBUS) + valid = 1; + if (skip && valid) { + _longjmp(segv_env, 1); + } + exit(sig); +} + +static void install_segv_handler(void) +{ + struct sigaction sa; + memset(&sa, 0, sizeof(sa)); + sa.sa_sigaction = segv_handler; + sa.sa_flags = SA_NODEFER | SA_SIGINFO; + sigaction(SIGSEGV, &sa, NULL); + sigaction(SIGBUS, &sa, NULL); +} + +#define NONFAILING(...) \ + ({ \ + int ok = 1; \ + __atomic_fetch_add(&skip_segv, 1, __ATOMIC_SEQ_CST); \ + if (_setjmp(segv_env) == 0) { \ + __VA_ARGS__; \ + } else \ + ok = 0; \ + __atomic_fetch_sub(&skip_segv, 1, __ATOMIC_SEQ_CST); \ + ok; \ + }) + +static void kill_and_wait(int pid, int* status) +{ + kill(pid, SIGKILL); + while (waitpid(-1, status, 0) != pid) { + } +} + +static void sleep_ms(uint64_t ms) +{ + usleep(ms * 1000); +} + +static uint64_t current_time_ms(void) +{ + struct timespec ts; + if (clock_gettime(CLOCK_MONOTONIC, &ts)) + exit(1); + return (uint64_t)ts.tv_sec * 1000 + (uint64_t)ts.tv_nsec / 1000000; +} + +static void use_temporary_dir(void) +{ + char tmpdir_template[] = "./syzkaller.XXXXXX"; + char* tmpdir = mkdtemp(tmpdir_template); + if (!tmpdir) + exit(1); + if (chmod(tmpdir, 0777)) + exit(1); + if (chdir(tmpdir)) + exit(1); +} + +static void reset_flags(const char* filename) +{ + struct stat st; + if (lstat(filename, &st)) + exit(1); + st.st_flags &= ~(SF_NOUNLINK | UF_NOUNLINK | SF_IMMUTABLE | UF_IMMUTABLE | + SF_APPEND | UF_APPEND); + if (lchflags(filename, st.st_flags)) + exit(1); +} +static void __attribute__((noinline)) remove_dir(const char* dir) +{ + DIR* dp = opendir(dir); + if (dp == NULL) { + if (errno == EACCES) { + if (rmdir(dir)) + exit(1); + return; + } + exit(1); + } + struct dirent* ep = 0; + while ((ep = readdir(dp))) { + if (strcmp(ep->d_name, ".") == 0 || strcmp(ep->d_name, "..") == 0) + continue; + char filename[FILENAME_MAX]; + snprintf(filename, sizeof(filename), "%s/%s", dir, ep->d_name); + struct stat st; + if (lstat(filename, &st)) + exit(1); + if (S_ISDIR(st.st_mode)) { + remove_dir(filename); + continue; + } + if (unlink(filename)) { + if (errno == EPERM) { + reset_flags(filename); + reset_flags(dir); + if (unlink(filename) == 0) + continue; + } + exit(1); + } + } + closedir(dp); + while (rmdir(dir)) { + if (errno == EPERM) { + reset_flags(dir); + if (rmdir(dir) == 0) + break; + } + exit(1); + } +} + +static void thread_start(void* (*fn)(void*), void* arg) +{ + pthread_t th; + pthread_attr_t attr; + pthread_attr_init(&attr); + pthread_attr_setstacksize(&attr, 128 << 10); + int i = 0; + for (; i < 100; i++) { + if (pthread_create(&th, &attr, fn, arg) == 0) { + pthread_attr_destroy(&attr); + return; + } + if (errno == EAGAIN) { + usleep(50); + continue; + } + break; + } + exit(1); +} + +typedef struct { + pthread_mutex_t mu; + pthread_cond_t cv; + int state; +} event_t; + +static void event_init(event_t* ev) +{ + if (pthread_mutex_init(&ev->mu, 0)) + exit(1); + if (pthread_cond_init(&ev->cv, 0)) + exit(1); + ev->state = 0; +} + +static void event_reset(event_t* ev) +{ + ev->state = 0; +} + +static void event_set(event_t* ev) +{ + pthread_mutex_lock(&ev->mu); + if (ev->state) + exit(1); + ev->state = 1; + pthread_mutex_unlock(&ev->mu); + pthread_cond_broadcast(&ev->cv); +} + +static void event_wait(event_t* ev) +{ + pthread_mutex_lock(&ev->mu); + while (!ev->state) + pthread_cond_wait(&ev->cv, &ev->mu); + pthread_mutex_unlock(&ev->mu); +} + +static int event_isset(event_t* ev) +{ + pthread_mutex_lock(&ev->mu); + int res = ev->state; + pthread_mutex_unlock(&ev->mu); + return res; +} + +static int event_timedwait(event_t* ev, uint64_t timeout) +{ + uint64_t start = current_time_ms(); + uint64_t now = start; + pthread_mutex_lock(&ev->mu); + for (;;) { + if (ev->state) + break; + uint64_t remain = timeout - (now - start); + struct timespec ts; + ts.tv_sec = remain / 1000; + ts.tv_nsec = (remain % 1000) * 1000 * 1000; + pthread_cond_timedwait(&ev->cv, &ev->mu, &ts); + now = current_time_ms(); + if (now - start > timeout) + break; + } + int res = ev->state; + pthread_mutex_unlock(&ev->mu); + return res; +} + +static void sandbox_common() +{ + struct rlimit rlim; + rlim.rlim_cur = rlim.rlim_max = 128 << 20; + setrlimit(RLIMIT_AS, &rlim); + rlim.rlim_cur = rlim.rlim_max = 8 << 20; + setrlimit(RLIMIT_MEMLOCK, &rlim); + rlim.rlim_cur = rlim.rlim_max = 1 << 20; + setrlimit(RLIMIT_FSIZE, &rlim); + rlim.rlim_cur = rlim.rlim_max = 1 << 20; + setrlimit(RLIMIT_STACK, &rlim); + rlim.rlim_cur = rlim.rlim_max = 0; + setrlimit(RLIMIT_CORE, &rlim); + rlim.rlim_cur = rlim.rlim_max = 256; + setrlimit(RLIMIT_NOFILE, &rlim); +} + +static void loop(); + +static int do_sandbox_none(void) +{ + sandbox_common(); + loop(); + return 0; +} + +struct thread_t { + int created, call; + event_t ready, done; +}; + +static struct thread_t threads[16]; +static void execute_call(int call); +static int running; + +static void* thr(void* arg) +{ + struct thread_t* th = (struct thread_t*)arg; + for (;;) { + event_wait(&th->ready); + event_reset(&th->ready); + execute_call(th->call); + __atomic_fetch_sub(&running, 1, __ATOMIC_RELAXED); + event_set(&th->done); + } + return 0; +} + +static void execute_one(void) +{ + if (write(1, "executing program\n", sizeof("executing program\n") - 1)) { + } + int i, call, thread; + for (call = 0; call < 3; call++) { + for (thread = 0; thread < (int)(sizeof(threads) / sizeof(threads[0])); + thread++) { + struct thread_t* th = &threads[thread]; + if (!th->created) { + th->created = 1; + event_init(&th->ready); + event_init(&th->done); + event_set(&th->done); + thread_start(thr, th); + } + if (!event_isset(&th->done)) + continue; + event_reset(&th->done); + th->call = call; + __atomic_fetch_add(&running, 1, __ATOMIC_RELAXED); + event_set(&th->ready); + event_timedwait(&th->done, 50); + break; + } + } + for (i = 0; i < 100 && __atomic_load_n(&running, __ATOMIC_RELAXED); i++) + sleep_ms(1); +} + +static void execute_one(void); + +#define WAIT_FLAGS 0 + +static void loop(void) +{ + int iter = 0; + for (;; iter++) { + char cwdbuf[32]; + sprintf(cwdbuf, "./%d", iter); + if (mkdir(cwdbuf, 0777)) + exit(1); + int pid = fork(); + if (pid < 0) + exit(1); + if (pid == 0) { + if (chdir(cwdbuf)) + exit(1); + execute_one(); + exit(0); + } + int status = 0; + uint64_t start = current_time_ms(); + for (;;) { + sleep_ms(10); + if (waitpid(-1, &status, WNOHANG | WAIT_FLAGS) == pid) + break; + if (current_time_ms() - start < 5000) + continue; + kill_and_wait(pid, &status); + break; + } + remove_dir(cwdbuf); + } +} + +uint64_t r[1] = {0xffffffffffffffff}; + +void execute_call(int call) +{ + intptr_t res = 0; + switch (call) { + case 0: + // socket arguments: [ + // domain: socket_domain = 0x26 (8 bytes) + // type: socket_type = 0x2 (8 bytes) + // proto: int8 = 0x0 (1 bytes) + // ] + // returns sock + res = syscall(SYS_socket, /*domain=AF_INET|0x24*/ 0x26ul, + /*type=SOCK_DGRAM*/ 2ul, /*proto=*/0); + if (res != -1) + r[0] = res; + break; + case 1: + // bind arguments: [ + // fd: sock (resource) + // addr: ptr[in, sockaddr_storage] { + // union sockaddr_storage { + // in6: sockaddr_in6 { + // len: len = 0x22 (1 bytes) + // family: const = 0x1c (1 bytes) + // port: proc = 0x3 (2 bytes) + // flow: int32 = 0x0 (4 bytes) + // addr: union ipv6_addr { + // mcast1: ipv6_addr_multicast1 { + // a0: const = 0xff (1 bytes) + // a1: const = 0x1 (1 bytes) + // a2: buffer: {00 00 00 00 00 00 00 00 00 00 00 00 00} (length + // 0xd) a3: const = 0x1 (1 bytes) + // } + // } + // scope: int32 = 0x0 (4 bytes) + // } + // } + // } + // addrlen: len = 0xc (8 bytes) + // ] + NONFAILING(*(uint8_t*)0x200000000040 = 0x22); + NONFAILING(*(uint8_t*)0x200000000041 = 0x1c); + NONFAILING(*(uint16_t*)0x200000000042 = htobe16(0x4e23 + procid * 4)); + NONFAILING(*(uint32_t*)0x200000000044 = 0); + NONFAILING(*(uint8_t*)0x200000000048 = -1); + NONFAILING(*(uint8_t*)0x200000000049 = 1); + NONFAILING(memset((void*)0x20000000004a, 0, 13)); + NONFAILING(*(uint8_t*)0x200000000057 = 1); + NONFAILING(*(uint32_t*)0x200000000058 = 0); + syscall(SYS_bind, /*fd=*/r[0], /*addr=*/0x200000000040ul, + /*addrlen=*/0xcul); + break; + case 2: + // recvfrom\$inet arguments: [ + // fd: sock_in (resource) + // buf: nil + // len: len = 0x51 (8 bytes) + // f: recv_flags = 0x401313ab1a02f21f (8 bytes) + // addr: nil + // addrlen: len = 0x0 (8 bytes) + // ] + syscall(SYS_recvfrom, /*fd=*/r[0], /*buf=*/0ul, /*len=*/0x51ul, + /*f=MSG_PEEK|MSG_OOB|0x401313ab1a02f21c*/ 0x401313ab1a02f21ful, + /*addr=*/0ul, /*addrlen=*/0ul); + break; + } +} +int main(void) +{ + syscall(SYS_mmap, /*addr=*/0x200000000000ul, /*len=*/0x1000000ul, + /*prot=PROT_WRITE|PROT_READ|PROT_EXEC*/ 7ul, + /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x1012ul, + /*fd=*/(intptr_t)-1, /*offset=*/0ul); + const char* reason; + (void)reason; + install_segv_handler(); + for (procid = 0; procid < 4; procid++) { + if (fork() == 0) { + use_temporary_dir(); + do_sandbox_none(); + } + } + sleep(1000000); + return 0; +} +EOF +mycc -o /tmp/$prog -Wall -Wextra -O0 /tmp/$prog.c -pthread || exit 1 + +(cd ../testcases/swap; ./swap -t 5m -i 20 -l 100 > /dev/null 2>&1) & +sleep 5 + +work=/tmp/$prog.dir +rm -rf $work +mkdir $work +cd /tmp/$prog.dir + +timeout 5m /tmp/$prog > /dev/null 2>&1 + +while pkill swap; do :; done +wait + +rm -rf /tmp/$prog /tmp/$prog.c /tmp/$prog.core /tmp/syzkaller.?????? $work +exit 0 diff --git a/tools/test/stress2/misc/syzkaller86.sh b/tools/test/stress2/misc/syzkaller86.sh new file mode 100755 index 000000000000..12922a2d05fa --- /dev/null +++ b/tools/test/stress2/misc/syzkaller86.sh @@ -0,0 +1,555 @@ +#!/bin/sh + +# Fatal trap 12: page fault while in kernel mode +# cpuid = 1; apic id = 01 +# fault virtual address = 0x18 +# fault code = supervisor read data, page not present +# instruction pointer = 0x20:0xffffffff80b69835 +# stack pointer = 0x28:0xfffffe00ff8e7d90 +# frame pointer = 0x28:0xfffffe00ff8e7d90 +# code segment = base 0x0, limit 0xfffff, type 0x1b +# = DPL 0, pres 1, long 1, def32 0, gran 1 +# processor eflags = interrupt enabled, resume, IOPL = 0 +# current process = 0 (thread taskq) +# rdi: 0000000000000018 rsi: 0000000000000004 rdx: ffffffff812b3f65 +# rcx: 00000000000008ba r8: fffff800044b8780 r9: fffff80003397000 +# rax: 0000000000000001 rbx: fffff8004221fa00 rbp: fffffe00ff8e7d90 +# r10: 0000000000000001 r11: fffffe00dc47b000 r12: fffffe0177ed0000 +# r13: fffff800044b8780 r14: fffff8004221f800 r15: fffff8004221f800 +# trap number = 12 +# panic: page fault +# cpuid = 1 +# time = 1759322830 +# KDB: stack backtrace: *** 532 LINES SKIPPED *** From nobody Sat Oct 4 08:21:35 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdz5X443Vz6B3sX; Sat, 04 Oct 2025 08: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 4cdz5X0jG2z3Fm8; Sat, 04 Oct 2025 08: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=1759566096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lyiOvUPhynjp0bdDiUmctxlc3synLpH3nrKzK15aCbE=; b=BAToHSgTe1trvqwaN4At3kWYOXxBuLzfK0tEa3mFJ+MAr3n7gaRb88l9q+RCd2myhN7nE3 m4fhcx1UlPylJq8il1FpdMIMDOpU8jjCLCTvO0dYPBY9IsOQVtoRgYITnuOz+K+O3AK0C6 RUkogrSXf8u71MUQWd2xzLCeHkSHXoi+7574akPirI6g/5Qv4nEseYjtsDRAYzmbSRiKIM 0B4tPkUMRMRxPALSBEyqphxDzltVb2ofNzSxur07OLGnGgJ6KSkUWeTjTlBdIiV4zdWZgv k4rTylzwR6FTjnzuIZ+LVEycTGOToikWj6/xWlW5x4LLqfVIKDu4BddKdZUGWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759566096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lyiOvUPhynjp0bdDiUmctxlc3synLpH3nrKzK15aCbE=; b=V+w+atyHBbBmRFyq0VrvMc8koULLU1ou5Squwb/MWHkLEXsZX8Ekctaiv6W1V8XfEe6ivB jUjmky0CyuVSjamCb+ydKZgWgCQ/q0DR3e6p6uxcbQidhWyS7ksdsKN2FrNRCkI5VDnlEk VnoFxqdpAj7NhqX5Do82+Ydo3Mnc/YaBiPRzp1noCfGQHOog+sBxGlgRVocJa3tdGeIkAy zPxw5uJxqMaZeVviChGO8Fl1sONIf2oVjKfOq1r1gIrTThyhNsHFC4c7IjFaiwzwTPPD8w C8jKX+zzsp4vUU0VOOmqJOr0BP2donWhqw545Z0oZ22BIenaQNFH1+QTTp+e6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759566096; a=rsa-sha256; cv=none; b=IRG8gcQwfJFlQUB+8aDDUAIOABpxg7mbmm1cNUmkmQkJx///Inhde4OfoEFA4baThIf3rH 5bliWmSUv44uGwFR2CIqwhW1yjiAWnQXV3ZhiMETZE+YxILCNVEqtZ617YSOtJChat85Nn VWckQqNY+E0M6RUnosaWV9rN91wUJ7XSUHpcaqbNsoFp8/ox4WXDI37xwsregzKQpJXxW9 m8M+U7K7UPEach1Iho5nTyYKmIZeZlGz0XhvxxXrAmXRpiI1L0dQdChji/oJhWN4hzXKzd iYoW89DewZ40x3lmwjMRvCI4TPiwwV3Hhf/9uGlZMv3xR0hdYWf1+400ImopcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdz5X03mhzZc6; Sat, 04 Oct 2025 08:21:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5948LZn7015181; Sat, 4 Oct 2025 08:21:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5948LZEC015178; Sat, 4 Oct 2025 08:21:35 GMT (envelope-from git) Date: Sat, 4 Oct 2025 08:21:35 GMT Message-Id: <202510040821.5948LZEC015178@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: c16f53782c8b - main - stress2: Do not try to open a fifo List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c16f53782c8b8fc8f1452f797b96743386079f1f Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=c16f53782c8b8fc8f1452f797b96743386079f1f commit c16f53782c8b8fc8f1452f797b96743386079f1f Author: Peter Holm AuthorDate: 2025-10-04 08:21:02 +0000 Commit: Peter Holm CommitDate: 2025-10-04 08:21:02 +0000 stress2: Do not try to open a fifo --- tools/test/stress2/misc/fuzz.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/test/stress2/misc/fuzz.sh b/tools/test/stress2/misc/fuzz.sh index 189cdbfebd01..add3d0d19a21 100755 --- a/tools/test/stress2/misc/fuzz.sh +++ b/tools/test/stress2/misc/fuzz.sh @@ -49,6 +49,7 @@ . ../default.cfg D=$diskimage +backup=/tmp/fuzz.sh.diskimage.`date +%Y%m%dT%H%M%S`.gz tst() { rm -f $D @@ -62,6 +63,7 @@ tst() { for i in `jot 50`; do ./fuzz -n 50 $D + gzip < $D > $backup if fsck -f -y /dev/md$mdstart 2>&1 | egrep "^[A-Z]" > /dev/null; then if fsck -f -y /dev/md$mdstart 2>&1 | egrep "^[A-Z]" > /dev/null; then if fsck -f -y /dev/md$mdstart 2>&1 | egrep "^[A-Z]" > /dev/null; then @@ -73,7 +75,7 @@ tst() { sync;sync;sync if mount /dev/md$mdstart $mntpoint; then ls -l $mntpoint > /dev/null - find $mntpoint -exec dd if={} of=/dev/null bs=1m count=3 \; > /dev/null 2>&1 + find $mntpoint -type f -exec dd if={} of=/dev/null bs=1m count=3 \; > /dev/null 2>&1 umount $mntpoint else echo "Giving up at loop $i" @@ -96,7 +98,7 @@ for j in `jot 10`; do date '+%T' tst done -rm -f fuzz +rm -f fuzz $backup exit From nobody Sat Oct 4 08:54:40 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cdzqh6Fsyz6B714; Sat, 04 Oct 2025 08:54:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cdzqh5Q5cz3Jb9; Sat, 04 Oct 2025 08:54:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759568080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CMCR1Gy8VC2OL/kx+WO4wE3z81dEU4D12GfNSz63IMc=; b=o7Z/hdd+3I4ypB83UW4XPvF2EQ1p0Sqfo5cwtiJ6bthWlTfiX+zI5rtuU52z1eIPDTQnQR NNznISIk6ZYfCv8CfXO2QG1C7tMOJvvjP5ROGnlr7Y52FgUWoQ8IrVu95DDD7J03lAwA+6 1fqjFKkLAk1fS7D7caT4Q7q/ukFt1L1yMiepaI8Z0lM6HoVdCy6hwM8GpFgkGIowWz922j YGMrXEk36NjSFh+tXTFQupDi8ieWi2YMYMd+RyaPYr4OwtbRU4CSV1nDpCtHL1L89mKB6a f7QhbA+QWegscNuaChY/4npUFd7+QwzUKP0b3sqYeUQS2rgjKdq/Yv57YcFxYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759568080; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CMCR1Gy8VC2OL/kx+WO4wE3z81dEU4D12GfNSz63IMc=; b=cueF1yiGQVkKfaEvIaMZoEJQEhJ73EPHT01m3M5W9npIpjs+/Lk1QBDGJis+Av8J1CCLy3 7x0AXBnPiiSUV5Egg90wYb/4ozWvaRyCmRelXJeP6jhytZDZZgGh/8lNO+rqqd3jT/G9cW qgSobMnA52N0ZbnH2/wHdTD0FPcM9UhSfaYllVW+q5pe9jozbA3Qh5I2LNChfM9/0e90Ax fP0cRHVjrkfc6JNDkYaFWM9gIyXp3DTD+Bn/E2+tqgKGkTT1ymd3aXn+A/IS7Y3DfFa7Ki vZBEnVXOLKySbZDVylhI/WBD5ljbRQlEyeK84Mn+5rhhYHaoRMm0NITVlT97Zg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759568080; a=rsa-sha256; cv=none; b=xapPkunj3T02FrPe0km0YnjxhnRfRYwuldMAozthyyg+5UXmxZkrEE0JCm2mZfy9MXONyj Onb4pKsK6P4mqVrrLNmYabB8uQGb7wUIYh+uYFfSW3OSuywFdgeDW/2mS6/BMbHJ2rNPVV cT3TZETAoUIZJ/L+g2YGH25R0E34dUOKW6of72vgUle2DJyd7jSl/g6VMvax7DzKwlGU50 9Cw/c6AnomEVIiHWv4HDlR9RRQUfXid/BH7dwkIjJw3nNpb5FWU4dBqdd8cPsC9a9oXE4K AYC1ztp5Kb4GvdEqStD9SA91K3CUhe6RMkwaRZ29Y4KvFL77bJA8N7jKqqH3Cw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cdzqh51H3zbdb; Sat, 04 Oct 2025 08:54:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5948seh2074037; Sat, 4 Oct 2025 08:54:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5948seuR074034; Sat, 4 Oct 2025 08:54:40 GMT (envelope-from git) Date: Sat, 4 Oct 2025 08:54:40 GMT Message-Id: <202510040854.5948seuR074034@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Clausecker Subject: git: d518f64cef6d - main - libc/resolv: get rid of MD5 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d518f64cef6db1d301377e78742b94ca96a881e3 Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=d518f64cef6db1d301377e78742b94ca96a881e3 commit d518f64cef6db1d301377e78742b94ca96a881e3 Author: Robert Clausecker AuthorDate: 2025-09-29 13:53:14 +0000 Commit: Robert Clausecker CommitDate: 2025-10-04 08:50:02 +0000 libc/resolv: get rid of MD5 MD5 is used by libc/resolv to generate a random sequence id from a current time stamp. Replace this convoluted mechanism with a call to arc4random(). This permits us to entirely drop MD5 from libc, simplifying the MD5 rework proposed in D45670. Approved by: markj Reviewed by: kevans, markj See also: D45670 Event: EuroBSDcon 2025 Differential Revision: https://reviews.freebsd.org/D52784 --- include/resolv.h | 4 +-- lib/libc/Makefile | 1 - lib/libc/include/port_before.h | 1 - lib/libc/md/Makefile.inc | 3 --- lib/libc/resolv/Symbol.map | 1 - lib/libc/resolv/res_init.c | 61 +++++------------------------------------- 6 files changed, 7 insertions(+), 64 deletions(-) diff --git a/include/resolv.h b/include/resolv.h index f32f52bab431..6ef79601b5f8 100644 --- a/include/resolv.h +++ b/include/resolv.h @@ -188,7 +188,7 @@ struct __res_state { struct __res_state_ext *ext; /*%< extension for IPv6 */ } _ext; } _u; - u_char *_rnd; /*%< PRIVATE: random state */ + u_char *_rnd; /*%< PRIVATE: random state (unused) */ }; typedef struct __res_state *res_state; @@ -380,7 +380,6 @@ extern const struct res_sym __p_rcode_syms[]; #define res_nisourserver __res_nisourserver #define res_ownok __res_ownok #define res_queriesmatch __res_queriesmatch -#define res_rndinit __res_rndinit #define res_randomid __res_randomid #define res_nrandomid __res_nrandomid #define sym_ntop __sym_ntop @@ -445,7 +444,6 @@ int dn_count_labels(const char *); int dn_comp(const char *, u_char *, int, u_char **, u_char **); int dn_expand(const u_char *, const u_char *, const u_char *, char *, int); -void res_rndinit(res_state); u_int res_randomid(void); u_int res_nrandomid(res_state); int res_nameinquery(const char *, int, int, const u_char *, diff --git a/lib/libc/Makefile b/lib/libc/Makefile index d0c254e33396..8705568f6d34 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -109,7 +109,6 @@ NOASM= .include "${LIBC_SRCTOP}/inet/Makefile.inc" .include "${LIBC_SRCTOP}/isc/Makefile.inc" .include "${LIBC_SRCTOP}/locale/Makefile.inc" -.include "${LIBC_SRCTOP}/md/Makefile.inc" .include "${LIBC_SRCTOP}/nameser/Makefile.inc" .include "${LIBC_SRCTOP}/net/Makefile.inc" .include "${LIBC_SRCTOP}/nls/Makefile.inc" diff --git a/lib/libc/include/port_before.h b/lib/libc/include/port_before.h index cfc43c53f157..aa2cd394104a 100644 --- a/lib/libc/include/port_before.h +++ b/lib/libc/include/port_before.h @@ -5,7 +5,6 @@ #define _LIBC 1 #define DO_PTHREADS 1 #define USE_POLL 1 -#define HAVE_MD5 1 #define ISC_SOCKLEN_T socklen_t #define ISC_FORMAT_PRINTF(fmt, args) \ diff --git a/lib/libc/md/Makefile.inc b/lib/libc/md/Makefile.inc deleted file mode 100644 index 82c5f0670485..000000000000 --- a/lib/libc/md/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -.PATH: ${SRCTOP}/sys/kern - -SRCS+= md5c.c diff --git a/lib/libc/resolv/Symbol.map b/lib/libc/resolv/Symbol.map index 6b9c43298fb5..26daecbe2eff 100644 --- a/lib/libc/resolv/Symbol.map +++ b/lib/libc/resolv/Symbol.map @@ -103,6 +103,5 @@ FBSD_1.0 { }; FBSD_1.4 { - __res_rndinit; __res_nrandomid; }; diff --git a/lib/libc/resolv/res_init.c b/lib/libc/resolv/res_init.c index 71ab2dcb7038..5a2fce013c8c 100644 --- a/lib/libc/resolv/res_init.c +++ b/lib/libc/resolv/res_init.c @@ -86,19 +86,6 @@ #include #include -#ifndef HAVE_MD5 -# include "../dst/md5.h" -#else -# ifdef SOLARIS2 -# include -# elif _LIBC -# include -# endif -#endif -#ifndef _MD5_H_ -# define _MD5_H_ 1 /*%< make sure we do not include rsaref md5.h file */ -#endif - #include "un-namespace.h" #include "port_after.h" @@ -184,8 +171,6 @@ __res_vinit(res_state statp, int preinit) { statp->options = RES_DEFAULT; } - statp->_rnd = malloc(16); - res_rndinit(statp); statp->id = res_nrandomid(statp); memset(u, 0, sizeof(u)); @@ -733,48 +718,18 @@ net_mask(struct in_addr in) /*!< XXX - should really use system's version of th } #endif -static u_char srnd[16]; - void -res_rndinit(res_state statp) +freebsd15_res_rndinit(res_state statp) { - struct timeval now; - u_int32_t u32; - u_int16_t u16; - u_char *rnd = statp->_rnd == NULL ? srnd : statp->_rnd; - - gettimeofday(&now, NULL); - u32 = now.tv_sec; - memcpy(rnd, &u32, 4); - u32 = now.tv_usec; - memcpy(rnd + 4, &u32, 4); - u32 += now.tv_sec; - memcpy(rnd + 8, &u32, 4); - u16 = getpid(); - memcpy(rnd + 12, &u16, 2); + (void)statp; } +__sym_compat(__res_rndinit, freebsd15_res_rndinit, FBSD_1.4); u_int res_nrandomid(res_state statp) { - struct timeval now; - u_int16_t u16; - MD5_CTX ctx; - u_char *rnd = statp->_rnd == NULL ? srnd : statp->_rnd; - - gettimeofday(&now, NULL); - u16 = (u_int16_t) (now.tv_sec ^ now.tv_usec); - memcpy(rnd + 14, &u16, 2); -#ifndef HAVE_MD5 - MD5_Init(&ctx); - MD5_Update(&ctx, rnd, 16); - MD5_Final(rnd, &ctx); -#else - MD5Init(&ctx); - MD5Update(&ctx, rnd, 16); - MD5Final(rnd, &ctx); -#endif - memcpy(&u16, rnd + 14, 2); - return ((u_int) u16); + (void) statp; + + return ((u_int)(arc4random() & 0xffff)); } /*% @@ -808,10 +763,6 @@ res_ndestroy(res_state statp) { free(statp->_u._ext.ext); statp->_u._ext.ext = NULL; } - if (statp->_rnd != NULL) { - free(statp->_rnd); - statp->_rnd = NULL; - } statp->options &= ~RES_INIT; } From nobody Sat Oct 4 09:04:30 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cf0476RY2z6B7r7; Sat, 04 Oct 2025 09:05:27 +0000 (UTC) (envelope-from herbert@gojira.at) Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [IPv6:2001:67c:2050:0:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4cf0473Z5Dz3KXc; Sat, 04 Oct 2025 09:05:26 +0000 (UTC) (envelope-from herbert@gojira.at) Authentication-Results: mx1.freebsd.org; none Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4cf03r6Gbyz9tfh; Sat, 4 Oct 2025 11:05:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gojira.at; s=MBO0001; t=1759568712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0TRj5GTeudJDO7fCoMDpkkuWE/EaHFrX9/tPH55mfaI=; b=dJBfyPSkQRob0b71VjdowWRlPiRaG8DkuGDtjmlub5RlVtPkkz2SBWRcv5LZ4fPfRkl2qK X4p07k1EX3sE7EX5X1BqhxKWlGYkImNhUsctYx45rgin5wlVuK4Z4lXNCubM+CGF/rs18j GmUWvx65L+DQxeBJx94L64DV3sNJix94oIaO+dydpK0JuKkFWdlhASHA1+lkLH23yFSv9+ A8jRK71zULsBmP+C6e0j6NefIXLsdiePw7eF+d+fHCLEfDs2xgmgvwtyU9bExO/ZYGfzXN Vqg1VkCqxnJPqpTUBPNDFRpb5Wkan62QCL7PQ0Gk4CMrGxqYTtleIi+DD2rnUg== Date: Sat, 04 Oct 2025 11:04:30 +0200 Message-ID: <87sefzca1t.wl-herbert@gojira.at> From: "Herbert J. Skuhra" To: Enji Cooper Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 046c625e9382 - main - crypto/openssl: update to 3.5.4 In-Reply-To: <202510040401.59441DLU024864@gitrepo.freebsd.org> References: <202510040401.59441DLU024864@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:199118, ipnet:2001:67c:2050::/48, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cf0473Z5Dz3KXc On Sat, 04 Oct 2025 06:01:13 +0200, Enji Cooper wrote: > > The branch main has been updated by ngie: > > URL: https://cgit.FreeBSD.org/src/commit/?id=046c625e9382e17da953767b881aaa782fa73af8 > > commit 046c625e9382e17da953767b881aaa782fa73af8 > Merge: 4a5a884c4a77 8e12a5c4eb35 > Author: Enji Cooper > AuthorDate: 2025-10-04 03:26:18 +0000 > Commit: Enji Cooper > CommitDate: 2025-10-04 03:26:18 +0000 > > crypto/openssl: update to 3.5.4 > > This change includes all necessary changes required to update to OpenSSL > 3.5.4. > > More information about the 3.5.4 release can be found in the relevant > release notes (see 8e12a5c4eb3507846b5 for more details). > > Merge commit '8e12a5c4eb3507846b507d0afe87d115af41df40' > > crypto/openssl/CHANGES.md | 69 ++++++ > crypto/openssl/NEWS.md | 40 +++- > crypto/openssl/VERSION.dat | 4 +- > crypto/openssl/apps/storeutl.c | 16 +- > crypto/openssl/crypto/bio/bss_file.c | 2 +- > crypto/openssl/crypto/ec/ecp_sm2p256.c | 2 +- > crypto/openssl/crypto/evp/bio_ok.c | 27 ++- > crypto/openssl/crypto/evp/ctrl_params_translate.c | 2 +- > crypto/openssl/crypto/evp/p_lib.c | 17 +- > crypto/openssl/crypto/info.c | 14 +- > crypto/openssl/crypto/ml_dsa/ml_dsa_key.c | 4 +- > crypto/openssl/crypto/ml_kem/ml_kem.c | 2 +- > crypto/openssl/crypto/modes/siv128.c | 3 + > crypto/openssl/crypto/property/property_parse.c | 2 +- > crypto/openssl/crypto/rsa/rsa_gen.c | 15 -- > crypto/openssl/crypto/rsa/rsa_sign.c | 4 +- > crypto/openssl/crypto/threads_pthread.c | 12 +- > crypto/openssl/crypto/x509/t_x509.c | 3 +- > crypto/openssl/crypto/x509/x509_lu.c | 1 - > crypto/openssl/doc/man3/DEFINE_STACK_OF.pod | 19 +- > crypto/openssl/doc/man3/OpenSSL_version.pod | 9 +- > crypto/openssl/doc/man3/SSL_CIPHER_get_name.pod | 4 +- > .../openssl/doc/man3/SSL_SESSION_get0_hostname.pod | 10 +- > crypto/openssl/include/crypto/rsa.h | 4 - > crypto/openssl/include/openssl/opensslv.h.in | 4 +- > crypto/openssl/providers/fips-sources.checksums | 20 +- > crypto/openssl/providers/fips.checksum | 2 +- > crypto/openssl/providers/fips/self_test_data.inc | 42 ++++ > crypto/openssl/providers/fips/self_test_kats.c | 100 ++++++++ > .../providers/implementations/kdfs/krb5kdf.c | 7 +- > .../providers/implementations/keymgmt/ecx_kmgmt.c | 8 - > crypto/openssl/ssl/quic/quic_impl.c | 7 +- > crypto/openssl/ssl/record/methods/tls_common.c | 11 +- > crypto/openssl/ssl/ssl_rsa.c | 5 +- > crypto/openssl/ssl/t1_trce.c | 4 + > crypto/openssl/test/build.info | 3 +- > crypto/openssl/test/fake_rsaprov.c | 4 +- > crypto/openssl/test/fake_rsaprov.h | 11 +- > crypto/openssl/test/ml_kem_evp_extra_test.c | 10 + > crypto/openssl/test/property_test.c | 19 +- > crypto/openssl/test/provider_pkey_test.c | 72 ++++++ > crypto/openssl/test/quicapitest.c | 95 +------- > crypto/openssl/test/radix/terp.c | 6 +- > crypto/openssl/test/recipes/03-test_fipsinstall.t | 12 +- > crypto/openssl/test/recipes/25-test_verify.t | 5 +- > .../test/recipes/30-test_evp_data/evpkdf_krb5.txt | 10 +- > .../30-test_evp_data/evppkey_rsa_sigalg.txt | 4 +- > crypto/openssl/test/recipes/90-test_sslapi.t | 17 +- > .../90-test_sslapi_data/ssltraceref-zlib.txt | 255 +++++++++++++++++++++ > .../recipes/90-test_sslapi_data/ssltraceref.txt | 253 ++++++++++++++++++++ > crypto/openssl/test/sslapitest.c | 87 +++++++ > crypto/openssl/test/testutil.h | 2 + > crypto/openssl/test/testutil/compare.c | 88 +++++++ > crypto/openssl/test/threadstest.c | 11 +- > crypto/openssl/test/wpackettest.c | 2 +- > 55 files changed, 1241 insertions(+), 220 deletions(-) > > diff --cc crypto/openssl/test/recipes/90-test_sslapi_data/ssltraceref-zlib.txt > index 000000000000,05aed8299b0e..05aed8299b0e > mode 000000,100644..100644 > --- a/crypto/openssl/test/recipes/90-test_sslapi_data/ssltraceref-zlib.txt > +++ b/crypto/openssl/test/recipes/90-test_sslapi_data/ssltraceref-zlib.txt > diff --cc crypto/openssl/test/recipes/90-test_sslapi_data/ssltraceref.txt > index 000000000000,5d332da235fb..5d332da235fb > mode 000000,100644..100644 > --- a/crypto/openssl/test/recipes/90-test_sslapi_data/ssltraceref.txt > +++ b/crypto/openssl/test/recipes/90-test_sslapi_data/ssltraceref.txt > diff --cc crypto/openssl/test/testutil/compare.c > index 000000000000,067fb878b58e..067fb878b58e > mode 000000,100644..100644 > --- a/crypto/openssl/test/testutil/compare.c > +++ b/crypto/openssl/test/testutil/compare.c I think you forgot to update (at least) crypto/openssl/include/openssl/opensslv.h. -- Herbert From nobody Sat Oct 4 12:42:43 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cf4v13Zmjz6BX0w for ; Sat, 04 Oct 2025 12:42:53 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cf4v119Brz3lM1 for ; Sat, 04 Oct 2025 12:42:53 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qt1-x835.google.com with SMTP id d75a77b69052e-4dfbab4fb0dso41661701cf.3 for ; Sat, 04 Oct 2025 05:42:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759581767; x=1760186567; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=ES8JBDfBfeU6dxudtUPShvPnmvvHlFfYPWIFVSCN+fI=; b=XukWyZlnQEvCWGce5y1sKrLo2K/x7+Hg1gvb2PFrvqPnsC36kZOR483wgGcauoU/7d ZeCidX/DL10Uofvec+MNjbVReSwL8hThwWGE4oTRBFm/McTnIYBhG8K8u52DjA8oFMxA 1OyHw/DvwDEXQcG2ZhWIupg1ViP/kqyKCXXiQpx1VFIGHTVnEBtyunWkj/44TU6Y5Vxv 9SDRJbRGkdmhNR2JprZK5hMa3BQr0hibFPjZvCxQDNxvAY6EqVj3Oir0AgSURWFd6MsQ O2JHw539rqKW+KSPk53QVXuSZsX9OBiuXxN3NBYLzZFMyoNo9KODgYVr/RvfwOvTcTVr khng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759581767; x=1760186567; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ES8JBDfBfeU6dxudtUPShvPnmvvHlFfYPWIFVSCN+fI=; b=M6I87wwV7dMEszfEpWpPqiDpVLvEe4t0kkcTw5hj3JiA5iwgNZ4jFDYCuWkPP6LUAm VTt7Ct3V2QC3GEvYO5Z6Eh0um2YPnCWTy1Jq/NSsIDEiOjdQuKjIPZRBCcrdG77PKRby tf7JMtIPNx726pQw+/FWSVGUoW5EVJZiFues4jpm5DTjjqQPzkdeyTRsJAKu3FlhPcku fkpqTQtM/by6HZzmB+nDL8OgnVWM63n7QmnroY9/YJcyVBwGUcZ+GwHThyG9SUeor1l4 zK1EXa80wwpar6naBXNi0GDeGDoCPqF/0jYn1aI+EmA7i1sFW9dzO06+xJ2wrUno3xfs 3xDw== X-Forwarded-Encrypted: i=1; AJvYcCX2l5hIgeHhSDXij1mzPzD8SNXLgTJnC+zD9IJ5COjaRSqKwlDLiXufzjsuPKpY2c0vI/gXKB2oLWcCJbPsdNM8DF3YZQ==@freebsd.org X-Gm-Message-State: AOJu0YxSx7AYGWjBc1US9qy6MjqvhIpvgf7ZQJjmIr/9KMM8lgHWpYOk rGXV03McIXzvtOXLuArmd6MS1sRfjvVXAQOWmMo0j80oEcbT1PIr1djnTRZccyfj X-Gm-Gg: ASbGncuL3eDfQhAQvrtfWLM4roeCSK1jcSr3v96okK5GRqJTS4wDCiTdfYIlsX3H/yU C0iuqD2T9nPLF9Eiw8IB7LMYadj0y7Hoh3qsp8P/GiaeV/MFJWU6wiPFZQvOKv597TeGznftsJn 66cBvsDlFd7vk5NwEbRaWUdnhe+mhh58+mucURO6Gs8ss9xKUEridB3gqV+XIyTxRkXUp4gXU1/ pTKEZzydX/8192G3ioL4SZcpm8MzaXFAsG1uQYB/Bu7EKqCwhT6aQ+0U+6HwS/N25yN4QOBLmUn Ml2qxfqt0U+e5/P48MjSSBEGSRAL9WKkHyEF+stSl1I1iYkRXwVF/BCRX/TWS23p5Wh36eHOSps 5mbz9F5D63TNYZU6xjvppjMYebNF2xX8qoiSsQicesKQUZ25CkqieF6bEj9kqwD0Gq7WNBF8= X-Google-Smtp-Source: AGHT+IGnbtQiNr3BdH8q7u56w67V1Msl7zyHYLFkJAQ0kmswA9LhLPuK+tjgwTgJr8ZjfozD8B+gVA== X-Received: by 2002:a05:622a:4e:b0:4d9:5a18:3f64 with SMTP id d75a77b69052e-4e576b1681fmr73854081cf.80.1759581767311; Sat, 04 Oct 2025 05:42:47 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4e55cfd463bsm63826611cf.33.2025.10.04.05.42.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Oct 2025 05:42:46 -0700 (PDT) Date: Sat, 4 Oct 2025 08:42:43 -0400 From: Mark Johnston To: Kyle Evans Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 1953a12ee2cd - main - flua: support our flua modules in the bootstrap flua Message-ID: References: <202510031810.593IAZE9008541@gitrepo.freebsd.org> <27098bd2-04e8-4ef7-8b8e-f7b170eb8151@FreeBSD.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4cf4v119Brz3lM1 On Fri, Oct 03, 2025 at 07:57:31PM -0500, Kyle Evans wrote: > On 10/3/25 17:45, Mark Johnston wrote: > > On Fri, Oct 03, 2025 at 04:44:38PM -0500, Kyle Evans wrote: > > > On 10/3/25 16:39, Mark Johnston wrote: > > > > On Fri, Oct 03, 2025 at 06:10:35PM +0000, Kyle Evans wrote: > > > > > The branch main has been updated by kevans: > > > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=1953a12ee2cde1afacb3e3f7612d89695c96e04f > > > > > > > > > > commit 1953a12ee2cde1afacb3e3f7612d89695c96e04f > > > > > Author: Kyle Evans > > > > > AuthorDate: 2025-10-03 18:09:03 +0000 > > > > > Commit: Kyle Evans > > > > > CommitDate: 2025-10-03 18:09:14 +0000 > > > > > > > > > > flua: support our flua modules in the bootstrap flua > > > > > This version builds every module into the flua binary itself, since all > > > > > of the bootstrap tools are built -DNO_SHARED. As a result, we also > > > > > cannot dlsym(), so we can't really discover the names of our newly > > > > > builtin modules. Instead, just build out a linker set with all of our > > > > > luaopen_*() functions to register everything up-front. > > > > > Building in all of the modules isn't strictly necessary, but it means > > > > > that we have an example of how to add a bootstrap module everywhere you > > > > > go and one doesn't need to consider whether bootstrap flua can use a > > > > > module when writing scripts. On my build machine, the consequence on > > > > > our binary size is an increase from around 1.6M -> 1.9M, which isn't > > > > > really that bad. > > > > > .lua modules can install into their usual path below $WORLDTMP/legacy > > > > > and we'll pick them up automagically by way of the ctor that sets up > > > > > LUA_PATH early on. > > > > > Reviewed by: bapt, emaste > > > > > Differential Revision: https://reviews.freebsd.org/D51890 > > > > > > > > This breaks cross-building from other OSes since linker.h and kenv.h > > > > aren't available. I guess we can safely exclude those from the > > > > bootstrap build? It could be done conditionally on ${.MAKE.OS} perhaps, > > > > but it's probably better to be consistent. > > > > > > Hi, > > > > > > Hmm, yes- I think excluding libfreebsd and libjail doesn't make it much more > > > difficult to reason about what's available in the bootstrap flua. > > > > > > re: cross-builds, yikes- I forgot that we'll end up bootstrapping flua there. I > > > bet it's also broken without libyaml and libucl here: https://reviews.freebsd.org/D52894? > > > > I don't see any bootstrap build failures in an Ubuntu chroot after I > > disable building libfreebsd. Let me know if you'd like me to submit a > > patch for that. > > I backed all of it out for the time being, because testing with the github jobs pointed out > something funky[0] with the for mach-o, and I don't want to stand in the > way of breaking cross-builds for this at the moment. Thanks! On the latest main I do see some test failures from nuageinit, which I presume are fallout from the changes. For instance: Standard output: Executing command [ /usr/libexec/flua /usr/tests/libexec/nuageinit/addfile.lua ] Standard error: Fail: incorrect exit status: 1, expected: 0 stdout: stderr: /usr/libexec/flua: /usr/share/flua/nuage.lua:7: module 'posix.unistd' not found: no field package.preload['posix.unistd'] no file '/usr/share/flua/posix/unistd.lua' no file '/usr/share/flua/posix/unistd/init.lua' no file '/usr/lib/flua/posix/unistd.lua' no file '/usr/lib/flua/posix/unistd/init.lua' no file './posix/unistd.lua' no file './posix/unistd/init.lua' no file '/usr/lib/flua/posix/unistd.so' no file '/usr/lib/flua/loadall.so' no file './posix/unistd.so' no module 'posix.unistd' in file '/usr/lib/flua/posix.so' stack traceback: [C]: in function 'require' /usr/share/flua/nuage.lua:7: in main chunk [C]: in function 'require' /usr/tests/libexec/nuageinit/addfile.lua:3: in main chunk [C]: in ? From nobody Sat Oct 4 12:43:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cf4w64WzSz6BXF2; Sat, 04 Oct 2025 12:43:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cf4w63d3Pz3lYX; Sat, 04 Oct 2025 12:43:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759581830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dqp7pQPPWx4TqLNZlOicndZmXZ6V7SDrVj4TXPwuVGA=; b=w4MAJAV9txMQb1KISDinB5bHhBBNE2Ioz3TuSeZ7Hn9KaKY7DBNQgJP1EHYx8hFOao2sWb M6yscLRpTIfnrFnMiFa8/EVvsuZbl9ABpQOHPFshwlxjXfSqnv/8TPRz/kCcPXKtMqjj0o SwWKdw/Xrwjs4kw2CG6vjgrm4u8S0WNxHYtp5m+/oWYkqxQ20KWBjHC7kphGKKGsoMiy5s jD04SFc7+kAvs0w1MR6nn8XbjPGhnC/zoxv/8aC2IRsayAtnU3HCyUaKXi36Qd8rMFmso8 08Py72YiCj11+QXkgrcGfFDr/2pVV/yV97CeWXAo8WNr2FsQBnXwV5rAlpgZtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759581830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dqp7pQPPWx4TqLNZlOicndZmXZ6V7SDrVj4TXPwuVGA=; b=ZqHIWFokPOmEjpKD3qYahrSmV91LZiJ3Zx3wJbTfaSVteqxQ/Qy58IPNA9RY/2ZFqasHIM EMNxlV4X3y9phO2lEqFeE1SHijLRxZyiiLqkqufXhHAKsBHVkt7uY4OGBXH5vIJ0DH2liK 0Thgq3+URNpZ7tUQbWGrSvSuCzMwxhwE9vPUj38i2eNkU/povXu2E6HpN5tY2688niiFup 9UA8k8AOoUWRnLUaZjAk4O3crJHRcOkFPMxOCKbRsfWVotyGOfk8JniMdR/jg5vUZVg/qg wil9CGgnqpgzd9jfj14joybGCehf/EDpOygzxUCzztduv37KHkc6xhngCDV7zw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759581830; a=rsa-sha256; cv=none; b=nq3lFvq0OR7cYTmGdmru8IduT5LM+6tB2X6MT6mch/DFv7WbBVM1OFpCzIDWS79t2/fAow eljw9+RZXkNTwsc+t1o4FrMuJfD39bJ6Q55U559A+XYUIimBhN4JypA33F9CqP0LIuthTe ddMcv3HJ68EdgtP6nEMFw+0BOCaPNOFLTYcU6zcg7xAj7qVc6bkgFgVIGro3gzPxe9ROQZ qXblXaQjknSl/HEA1hb4B8hf7IjSzSJKy9CllgTssQNfs6uNQK0c9flgUpYObPNw2Ac7DL BhpSETWy+/Ku39Bj4SV21hO2tadDoT20R6OyOjLC9VAC4ggg/KouX7ylyAYqXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cf4w63433zjMs; Sat, 04 Oct 2025 12:43:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 594ChoLg005779; Sat, 4 Oct 2025 12:43:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 594ChoT7005776; Sat, 4 Oct 2025 12:43:50 GMT (envelope-from git) Date: Sat, 4 Oct 2025 12:43:50 GMT Message-Id: <202510041243.594ChoT7005776@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 02dfca245808 - main - release: Complete NO_ROOTification of Vagrant builds 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: 02dfca2458081587d8224c5ebf8bde99fa360f94 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=02dfca2458081587d8224c5ebf8bde99fa360f94 commit 02dfca2458081587d8224c5ebf8bde99fa360f94 Author: Mark Johnston AuthorDate: 2025-09-19 21:01:52 +0000 Commit: Mark Johnston CommitDate: 2025-10-04 12:43:14 +0000 release: Complete NO_ROOTification of Vagrant builds - Don't clean pkg files, they won't be recorded in the manifest anyway. - Use pw's new metalog mode to create the vagrant user. Note that we do not need to manually create the home directory, pw will do it, so just remove that. - Write metalog entries for the vagrant user's ssh key dir and authorized keys file Note, this depends on an updated pw being installed on the host. Reviewed by: emaste MFC after: 1 day Sponsored by: Klara, Inc. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52631 --- release/tools/vagrant.conf | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/release/tools/vagrant.conf b/release/tools/vagrant.conf index 7ab0e1238693..5b0f38b740a6 100644 --- a/release/tools/vagrant.conf +++ b/release/tools/vagrant.conf @@ -14,14 +14,16 @@ export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} shells/bash \ export VM_RC_LIST="firstboot_freebsd_update firstboot_pkgs growfs" vagrant_common () { - # The firstboot_pkgs rc.d script will download the repository - # catalogue and install or update pkg when the instance first - # launches, so these files would just be replaced anyway; removing - # them from the image allows it to boot faster. - env ASSUME_ALWAYS_YES=yes pkg -c ${DESTDIR} clean -y -a - env ASSUME_ALWAYS_YES=yes pkg -c ${DESTDIR} delete -f -y pkg - rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports - rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports-kmods + if [ -z "${NO_ROOT}" ]; then + # The firstboot_pkgs rc.d script will download the repository + # catalogue and install or update pkg when the instance first + # launches, so these files would just be replaced anyway; + # removing them from the image allows it to boot faster. + pkg -c ${DESTDIR} clean -y -a + pkg -c ${DESTDIR} delete -f -y pkg + rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports + rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports-kmods + fi # Vagrant instances use DHCP to get their network configuration. echo 'ifconfig_DEFAULT="SYNCDHCP"' >> ${DESTDIR}/etc/rc.conf @@ -40,8 +42,7 @@ vagrant_common () { # Create the vagrant user with a password of vagrant /usr/sbin/pw -R ${DESTDIR} \ groupadd vagrant -g 1001 - chroot ${DESTDIR} mkdir -p /home/vagrant - /usr/sbin/pw -R ${DESTDIR} \ + /usr/sbin/pw -R ${DESTDIR} -M ${DESTDIR}/METALOG \ useradd vagrant \ -m -M 0755 -w yes -n vagrant -u 1001 -g 1001 -G 0 \ -c 'Vagrant User' -d '/home/vagrant' -s '/bin/csh' @@ -58,11 +59,11 @@ vagrant_common () { echo "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key" > ${DESTDIR}/home/vagrant/.ssh/authorized_keys echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN1YdxBpNlzxDqfJyw/QKow1F+wvG9hXGoqiysfJOn5Y vagrant insecure public key" >> ${DESTDIR}/home/vagrant/.ssh/authorized_keys chmod 600 ${DESTDIR}/home/vagrant/.ssh/authorized_keys - metalog_add_data ./home/vagrant/.ssh/authorized_keys 0600 chmod 700 ${DESTDIR}/home/vagrant/.ssh chown -R 1001 ${DESTDIR}/home/vagrant/.ssh - echo "./home/vagrant/.ssh type=dir uid=1001 gid=1001 mode=0700" >> METALOG + echo "./home/vagrant/.ssh type=dir uid=1001 gid=1001 mode=0700" >> ${DESTDIR}/METALOG + echo "./home/vagrant/.ssh/authorized_keys type=file uid=1001 gid=1001 mode=0600" >> ${DESTDIR}/METALOG # Reboot quickly, Don't wait at the panic screen echo 'debug.trace_on_panic=1' >> ${DESTDIR}/etc/sysctl.conf From nobody Sat Oct 4 13:29: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 4cf5wX037Vz6Bc5Z; Sat, 04 Oct 2025 13:29:16 +0000 (UTC) (envelope-from kp@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 4cf5wW6V9sz3qsD; Sat, 04 Oct 2025 13:29:15 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759584555; h=from:from:reply-to:subject:subject: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=xCEmmjwON4pHnIxT54tZ8OljFN4u0nUgEkrDL+Bqpdw=; b=Y5cPvUFHCxbxS1DdaoFYVYUhL358NUPcsD33UJ5H+1++Xg80kYYhMbeuT/oT0Vlpl2x01S Oo6E6eHKVQAX6RuE/84YFDkHmhgVu7gb8tATiFp0PrQdNqlNK6AH6GMnJixo8HI5VfPrIY 4UBaBb32SkclbshK/eAOb9ZRX5iaSqtR1TBx7Rcya4GU5ff5oiVq9B623i6fyM870SA+Tb nsX3/8OSrXcraAsxzLJDH4/fMGIph616pmRNyCCFpH7qGMcJzyA031ixDDUrbh7GYw4+Cw +xTA5O3VfWAW5ziECpknxPGWtcRI9Zd3OecSdADDp0X55xNffCjm/SSCqRU4yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759584555; h=from:from:reply-to:subject:subject: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=xCEmmjwON4pHnIxT54tZ8OljFN4u0nUgEkrDL+Bqpdw=; b=h5/5dw1PxH8O7ThuJMmDkXWz6CAIrU+uFb/rsi0d9Os0m7kW2QMz9AXSB50teSeRLPATTI L9DaT1SVKD8NKiArG4ynS55gX89qyCTcpSwV7HAZkXuiJpVPFPWzC4kqqUa/bHYf//Xwto zlVUmNEMurrGlIWShldr920fMBgGiSDfWvJFtKma2F4A1s6OsUo3hRwJwWlCL5IlL8Geuv +dRRP9qqYr4J12G/M2rO3hEALYGi7H1tnR5da1MRdZvFFLoqMSgDt3ZqwDcY5RXc1FBwLp +B6jsi0n2otT20czS0cGzeB1oHT5se3qvP9JeorwDS9mFNrOAaTQEho2HfchDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759584555; a=rsa-sha256; cv=none; b=CoWjqVqFnd7IZq2vcY5KNE9hh9xYuw/CRCjF5+S+BsWvpsBFOgaUxCo2tMMtGFOoXg5wOq gM4zXd8v/EB7G0Dp5qUDm/V0S1BzNYMENvq04uLmi2o9KUnzKQ7UwaHYI7iB41lc46zDHP 4PNod7CFXOCt1ReRw2mKvxv3KgMA8v5AcRlfwDUD5Xuc4vQhKmnnuKfb7eQAqxRjl9QikL d7dC+eJc0gpoLB90Qlkn4NZA4+fWbhfjHy7jxs7AEss19n7tBfLVmWVHzJmUZTvwEfV0lj 89u7ZXp0GEf+Zyq2/Kb4zCE1xyAlvRdvdR2FYt81pbxXh/GFP0XBWJ1K49CMVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R11" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cf5wW5BcBzmS6; Sat, 04 Oct 2025 13:29:15 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 350D515B7A; Sat, 04 Oct 2025 15:29:13 +0200 (CEST) From: Kristof Provost To: Florian Smeets Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 9dfc5e03da50 - main - pfctl: allow tables to be defined inside anchors Date: Sat, 04 Oct 2025 15:29:11 +0200 X-Mailer: MailMate (2.0r6272) Message-ID: <46127FD9-D4F4-4E65-A775-A301070C9FB3@FreeBSD.org> In-Reply-To: <98515e3d-24ba-402e-b2c1-09e30cafeade@smeets.xyz> References: <202509171415.58HEFdN0010140@gitrepo.freebsd.org> <98515e3d-24ba-402e-b2c1-09e30cafeade@smeets.xyz> 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 On 4 Oct 2025, at 9:45, Florian Smeets wrote: > On 17.09.25 16:15, Kristof Provost wrote: >> The branch main has been updated by kp: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=3D9dfc5e03da50d12f02c2b48= 1139acf9f089d504f >> >> commit 9dfc5e03da50d12f02c2b481139acf9f089d504f >> Author: Kristof Provost >> AuthorDate: 2025-08-22 11:34:39 +0000 >> Commit: Kristof Provost >> CommitDate: 2025-09-17 14:15:13 +0000 >> >> pfctl: allow tables to be defined inside anchors >> > Hi Kristof, > > this change prevents pf.conf to load on one of my servers. It works fin= e with 3d14cc82d7a8, but does not with any versions after. Just replacing= pfctl with a version before 9dfc5e03da50 makes it work again. > > Tests on latest main: > > # pfctl -f /etc/pf.conf > pfctl: failed to create table __automatic_d63f3745_0 in : Device busy > > Disabling the optimizer works around the issue. > > # pfctl -o none -f /etc/pf.conf && echo $? > 0 > > I was able to find a simple repro case. > > Take this ruleset: > > --- > ext_if=3D"igb0" > > host_ipv4=3D"192.168.0.1" > host_ipv6=3D"3333:444:222:1843::2" > mail=3D"3333:444:222:1843::25:3" > db=3D"3333:444:222:1843::3306:5" > db4=3D"3333:444:222:1843::3306:4" > web=3D"3333:444:222:1843::80:6" > amavis=3D"3333:444:222:1843::aa:4" > > rdr-anchor "rdr/*" > > block in > pass out > > # anti lockout during tests > pass in on $ext_if proto tcp to ($ext_if) port ssh > > pass in on $ext_if proto tcp to { $host_ipv4, $host_ipv6, $mail, $amavi= s, $db, $db4, $web } port ssh > --- > > It can be successfully loaded without disabling the optimizer if either= removing the 7th element from the second pass in ssh rule ($web in this = case) or disabling the 'rdr-anchor "rdr/*"' line > Thanks for the report, and especially the test case. I=E2=80=99ll add thi= s to my todo list for next week. =E2=80=94 Kristof From nobody Sat Oct 4 14:02:42 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cf6g66nQ5z68xZ6; Sat, 04 Oct 2025 14:02:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cf6g663Dzz3wqw; Sat, 04 Oct 2025 14:02:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759586562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PEr4arZEny4hIVkpDqYwZyqih18YItf3N0EexBn4LRI=; b=bL+YL0L2IK6kQBceOXubMJKvfRZ1dBYRhmphQ6n6wMYIBQep6ki+PTk2JgjkABF2LIpovc /WvtgbzxfLQYF+nqRtdSleOxFwb4mQ1xSfwxCpK5INBb922EPLBYlhYtqX3iGfP+YQb2Vf XzOIhfTAoolU5KJKYMBsSP3BNfdZd8hIG5yw61PLTnleC3bjlMm3fuEyGQy3D83F4edo9j 1i8+4i9CGq/HFD6zE8xVF3XWneBIWFRQF8xT9MoxcqZy/FKte9CkcU5AbzEpv5f0lBO+eB EJR0y6Fe2U8qzhfKTCYRDBuWYgxETjDDfNTC6XZfe9bfGAGtf5ImbxZq4sjJkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759586562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PEr4arZEny4hIVkpDqYwZyqih18YItf3N0EexBn4LRI=; b=alpU0kouIHNsD1O7xzHI0B21Ady7Lc4q3djoMK3x0H5jIWEEWTapqpggbRg3B2uM+yrmSZ gdbW76+TCaCso5FuQAR9Rw7YepoAb9aUcF74qc/78Hz7+Jl/6/56Do02MzwFt3OowLC0k9 9fQq67yjUq+GQWEC4bQGCUEjLu2YcrAVN4Jc/WDFoYnCCCyQ5JpAUqQ6CZyGrc9cIa94W1 CzXKuADJ9AHLGuEzgvOkgj7JL0JOTrLAsT8Kbcz7iTeJEfRT4NJn/s0FliyfHUAv+NGXc5 PFDH2A2V7+rvUl37zmfwu9r4A3Wg4mPV2vrFrRm5DKRQIlnX5sPpRCWQQF650g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759586562; a=rsa-sha256; cv=none; b=nnPWkBuuYWvl21WdxFQdleBPI5KfBp1WUl7nC+HeIvS4L/s1yUAZYXlaopxmOX/iYZCAnT hqB5NMi+PY6WQqqsjDkpy5qUolUv9VxLmEW9OmD6DPJtV/epmnBRW7M/jQrgDhMih6Rxtu D5xgTojpUjsE2lEo+SxRAyNnDSfegkzTaVoWKldWYwGRSt4Bk74iXmrZBNPeG7YEiC3RIy 8H63eQiPXgJj23RJpK6YfdDVQEQHLokTI9xC0Zh6WSQvW8OsxiyiE+F5KFYy9YwOEurVi6 n1y58jJ7YR8uDF0uW/RMSTPVNajlif/ilCrpQfn+EDREfqxXOqDiAyo+Xl6dUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cf6g65PLgzlHV; Sat, 04 Oct 2025 14:02:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 594E2gdq056610; Sat, 4 Oct 2025 14:02:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 594E2gRs056607; Sat, 4 Oct 2025 14:02:42 GMT (envelope-from git) Date: Sat, 4 Oct 2025 14:02:42 GMT Message-Id: <202510041402.594E2gRs056607@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 9c7db0931d48 - main - flua: move lposix back into flua for now 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c7db0931d486ce800aa71d9f41abfad9f7f691f Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=9c7db0931d486ce800aa71d9f41abfad9f7f691f commit 9c7db0931d486ce800aa71d9f41abfad9f7f691f Author: Kyle Evans AuthorDate: 2025-10-04 13:57:59 +0000 Commit: Kyle Evans CommitDate: 2025-10-04 13:57:59 +0000 flua: move lposix back into flua for now The real luaposix is structured differently, and our builtin version tends to model that in its own special way. Build it back in until we get the shlib model just right to unbreak nuageinit, among other things. This is a partial revert of the below-referenced commit; the other two modules are simple, though, and were accurately split out. Reported by: markj Fixes: b11a5709ec2b6 ("flua: kick out the remaining builtin modules") --- libexec/flua/Makefile | 2 +- libexec/flua/linit_flua.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libexec/flua/Makefile b/libexec/flua/Makefile index cc750e30525f..23de404710d0 100644 --- a/libexec/flua/Makefile +++ b/libexec/flua/Makefile @@ -16,7 +16,6 @@ FLUA_MODULES+= libjail .endif FLUA_MODULES+= libucl FLUA_MODULES+= liblyaml -FLUA_MODULES+= lposix .ifdef BOOTSTRAPPING # libfreebsd is generally omitted from the bootstrap flua because its @@ -55,6 +54,7 @@ SRCS+= lua.c # FreeBSD Extensions .PATH: ${.CURDIR}/modules SRCS+= linit_flua.c +SRCS+= lposix.c CFLAGS+= -I${SRCTOP}/lib/liblua -I${.CURDIR}/modules -I${LUASRC} CFLAGS+= -DLUA_PROGNAME="\"${PROG}\"" diff --git a/libexec/flua/linit_flua.c b/libexec/flua/linit_flua.c index bb3748daefb4..65356c938671 100644 --- a/libexec/flua/linit_flua.c +++ b/libexec/flua/linit_flua.c @@ -33,6 +33,7 @@ #include "lualib.h" #include "lauxlib.h" +#include "lposix.h" #include "bootstrap.h" @@ -54,6 +55,8 @@ static const luaL_Reg loadedlibs[] = { #if defined(LUA_COMPAT_BITLIB) {LUA_BITLIBNAME, luaopen_bit32}, #endif + /* FreeBSD Extensions */ + {"posix", luaopen_posix}, {NULL, NULL} }; From nobody Sat Oct 4 14:02:43 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cf6g80l2Pz68xQS; Sat, 04 Oct 2025 14:02:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cf6g80FnYz3x1t; Sat, 04 Oct 2025 14:02:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759586564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IMhHFCB1UquNjIH6oEnEi5N7648Vi4ubXe/Ty8EAQ2U=; b=ouwgimasIaKCuTUQSazMgkdocH+RLiOBplNtiOwzkrdhRZ+xVut0g4SNP1Qq0EM0gNzFyn nA04TD4ezslyTvesP7bWPsVYrlgzapBcfBLR8cW6UMzuPl6/h8LKO/MngyGsZwsYdLnPP5 JVzvzFQPQDcSsPf0bmzI7oP6F3SaEA86fP3VvEizgdLPYTrT2zQZXHURtqrMm4mIYywPZn 6JF6VX7UoWW7eLkFc6HIRlrKVUHUXNB68i6AZlXam77+E/aq+izun1cBrPQmjicIB1SxM+ CTqXF3sXAusPj60fwlTwHctAU7V3B9bmcxHVnKjj8tGRpP2zbf93FFWEddf0ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759586564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IMhHFCB1UquNjIH6oEnEi5N7648Vi4ubXe/Ty8EAQ2U=; b=MlmLI1RJh5c8MRPKM6ZqyKCYotFpVAHC0PF4fFJCJ5HwKFe6OdH/XWpu7TSUaDpZ7ANh5W Ib2tRpSBM2sSmwLGdpTHRqNZGK/eJe5oCzTdbelm3CuU0mq0OI09J61KS2FSPHDcpcpBL5 mmL0DeKYuYVBwkhHdMYPkc1h03odiMBYDWXKZjqKdoNcXIFkT2MMn6q/Uq1xejA9zJKhgb xrp/ZvMptJVUxlOUeU1AJeSJ6ffYJe36Kn8whLXzWuamP/fQntF2lYVTvR/XQw4rvhY2mb PO071ZKVD5c04s9ROWRd0alKPGdVXVujrihTqKmnFtkxhM/+2Xd2Y4vNI+4vIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759586564; a=rsa-sha256; cv=none; b=Dv8wfaTWd7N0VbIMNHIGQBu4iSl4gWShD4ZUrjVREFqDmnl2/HAHWYrdQ8GEJ0Fk89/Pkg XGkPPYVSYS6g3hz565uFtusVTcL6zrZdOEozbiDeMIjdb9GIMhRjS5CUChGSYNdGj5g3Qw 9f50w4rBdAtCV5Z4WyqChzPr/JMFHVqoXc8Wt0aTdq4VcfQMC/0Nl8H+wcQkN+g6osXxY9 unf8YHbFZCaQBUd8AJzveU2p8M5i2EUg4etQ6+IYGTAsZcZ0nXrTwgXia9nV2AxsqsSojp 6YAXs3lq3P54tBITwlXEIs+pEtcNv6IEvHC+OLl5Ewm+5ilcWK4trBX2xICKCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cf6g76g5wzlWJ; Sat, 04 Oct 2025 14:02:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 594E2hFX056643; Sat, 4 Oct 2025 14:02:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 594E2hFg056640; Sat, 4 Oct 2025 14:02:43 GMT (envelope-from git) Date: Sat, 4 Oct 2025 14:02:43 GMT Message-Id: <202510041402.594E2hFg056640@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: bb4167463ac4 - main - nuageinit: require lfs where it's needed 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bb4167463ac44b47ded4e0223a0abd8381ca6cd8 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=bb4167463ac44b47ded4e0223a0abd8381ca6cd8 commit bb4167463ac44b47ded4e0223a0abd8381ca6cd8 Author: Kyle Evans AuthorDate: 2025-10-04 13:58:00 +0000 Commit: Kyle Evans CommitDate: 2025-10-04 13:58:00 +0000 nuageinit: require lfs where it's needed nuageinit largely already did this, but one spot was missed -- add the necessary require() in to get the module loaded. Fixes: b11a5709ec2b6 ("flua: kick out the remaining builtin modules") --- libexec/nuageinit/nuageinit | 1 + 1 file changed, 1 insertion(+) diff --git a/libexec/nuageinit/nuageinit b/libexec/nuageinit/nuageinit index 29340a3d91ea..f29fa8ba1bac 100755 --- a/libexec/nuageinit/nuageinit +++ b/libexec/nuageinit/nuageinit @@ -6,6 +6,7 @@ -- Copyright(c) 2025 Jesús Daniel Colmenares Oviedo local nuage = require("nuage") +local lfs = require("lfs") local ucl = require("ucl") local yaml = require("lyaml") From nobody Sat Oct 4 14:06:45 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cf6lp4xxnz68xZt; Sat, 04 Oct 2025 14:06:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cf6lp4Jhsz410h; Sat, 04 Oct 2025 14:06:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759586806; h=from:from:reply-to:subject:subject: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=eJ18CO4xXInRpuUmPUJb4DoSwfBAA9Lfn3r16NNdfoU=; b=dwrFNbAJrNBABZn3Mbz8HvL3Ip33kxqCrW4CWjHoiv3xbqAPCZXNdvVq1FWrgYhdQeYLYg 3D3OoxYFPVuDXyANfZpo76q5CnXJuVOAGIJEOhWFhTPoRQpqdzZ7sJorlvZG5z47oFWIot vOwhEbzJ91izfczu/ENzJRfs6z11Fs8gvumhpbhqhGF2cKY9zR9Kuw6t5mCRlunpFO7fyv PXRYydlZ2wIENKxPxelUs3fSDZYPdHX+oQYrR9Kq5uqIqo4EnPtKQTTrd5/Kp5ecWXbFg9 LIz2uUR6DXdCdebS9QyJ4QoNdbc9XIVo/Wn8eJ/kt6FBttQQ2hAYc4qb5dyf+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759586806; h=from:from:reply-to:subject:subject: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=eJ18CO4xXInRpuUmPUJb4DoSwfBAA9Lfn3r16NNdfoU=; b=o85tAS4Hcv/B2pbqCIXZefqsDxf04CnFtCLkH6lt5KvFUmWE9mKiystJpf2CAlsikAx4K2 0Acovr53sBXa1Yw1fGB5V7T1tx5Sq2gxjGGqV8v5+YxUF+P6iw0MdP9ptTlWMItTCuoiSP 5GcjU20FlgOdUXSoXn72/rgl1ZEqg5wwdYbgZT7lh6vvYtrOAobkpWJhx5q7bh9u/pfcZH rvWGez/qrihcTbF+Kv/dAnqYxe2cpp9UhdA1TXzbtV9tLdxtxNrSJVoleraw7J+MzFw1Fk 0Y2P75os5/ohX9ZkXzCowTiEcunpDMFBnxzUunl4RPokofwGSuqcs4g3OUTEdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759586806; a=rsa-sha256; cv=none; b=I+0htxjozEeM/r4yYLWRWP6y1g2UpvOuG3o+0lNUhJPDRIhYVqkqL0bRWAOvGBfgV9n12W OdMu6O3drIL4U1zLHu2kGemPsVZpIraS1mKyIlvuZ7u1GfapWsSsfq220v2Jd+sFzZEQZv l3Z1uKPZ+0O6+2ae9rOAAZ36JYXXQ9ejR3/1WIYJYK0+z9x+sMuhZERcQ6h0j4UMV296k6 MkU2htLuf7aqHLIcyEzY8hYxdYILAo6ehAn+lGF1PXWGC5/eL4630YbJvAdVHgaA81xfv7 u6tBJgCbTmHvDx2Nv4FKXFQB5T+gGqs5PmJwg76VxkFSdrqRGh4fsRhoC2gz4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cf6lp17wBzngX; Sat, 04 Oct 2025 14:06:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: <6d10bcbc-38c9-4424-bc4e-55490c9d646b@FreeBSD.org> Date: Sat, 4 Oct 2025 09:06:45 -0500 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 1953a12ee2cd - main - flua: support our flua modules in the bootstrap flua To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202510031810.593IAZE9008541@gitrepo.freebsd.org> <27098bd2-04e8-4ef7-8b8e-f7b170eb8151@FreeBSD.org> Content-Language: en-US From: Kyle Evans In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 10/4/25 07:42, Mark Johnston wrote: > On Fri, Oct 03, 2025 at 07:57:31PM -0500, Kyle Evans wrote: >> On 10/3/25 17:45, Mark Johnston wrote: >>> On Fri, Oct 03, 2025 at 04:44:38PM -0500, Kyle Evans wrote: >>>> On 10/3/25 16:39, Mark Johnston wrote: >>>>> On Fri, Oct 03, 2025 at 06:10:35PM +0000, Kyle Evans wrote: >>>>>> The branch main has been updated by kevans: >>>>>> >>>>>> URL: https://cgit.FreeBSD.org/src/commit/?id=1953a12ee2cde1afacb3e3f7612d89695c96e04f >>>>>> >>>>>> commit 1953a12ee2cde1afacb3e3f7612d89695c96e04f >>>>>> Author: Kyle Evans >>>>>> AuthorDate: 2025-10-03 18:09:03 +0000 >>>>>> Commit: Kyle Evans >>>>>> CommitDate: 2025-10-03 18:09:14 +0000 >>>>>> >>>>>> flua: support our flua modules in the bootstrap flua >>>>>> This version builds every module into the flua binary itself, since all >>>>>> of the bootstrap tools are built -DNO_SHARED. As a result, we also >>>>>> cannot dlsym(), so we can't really discover the names of our newly >>>>>> builtin modules. Instead, just build out a linker set with all of our >>>>>> luaopen_*() functions to register everything up-front. >>>>>> Building in all of the modules isn't strictly necessary, but it means >>>>>> that we have an example of how to add a bootstrap module everywhere you >>>>>> go and one doesn't need to consider whether bootstrap flua can use a >>>>>> module when writing scripts. On my build machine, the consequence on >>>>>> our binary size is an increase from around 1.6M -> 1.9M, which isn't >>>>>> really that bad. >>>>>> .lua modules can install into their usual path below $WORLDTMP/legacy >>>>>> and we'll pick them up automagically by way of the ctor that sets up >>>>>> LUA_PATH early on. >>>>>> Reviewed by: bapt, emaste >>>>>> Differential Revision: https://reviews.freebsd.org/D51890 >>>>> >>>>> This breaks cross-building from other OSes since linker.h and kenv.h >>>>> aren't available. I guess we can safely exclude those from the >>>>> bootstrap build? It could be done conditionally on ${.MAKE.OS} perhaps, >>>>> but it's probably better to be consistent. >>>> >>>> Hi, >>>> >>>> Hmm, yes- I think excluding libfreebsd and libjail doesn't make it much more >>>> difficult to reason about what's available in the bootstrap flua. >>>> >>>> re: cross-builds, yikes- I forgot that we'll end up bootstrapping flua there. I >>>> bet it's also broken without libyaml and libucl here: https://reviews.freebsd.org/D52894? >>> >>> I don't see any bootstrap build failures in an Ubuntu chroot after I >>> disable building libfreebsd. Let me know if you'd like me to submit a >>> patch for that. >> >> I backed all of it out for the time being, because testing with the github jobs pointed out >> something funky[0] with the for mach-o, and I don't want to stand in the >> way of breaking cross-builds for this at the moment. > > Thanks! On the latest main I do see some test failures from nuageinit, > which I presume are fallout from the changes. For instance: > Hi, I moved lposix back into flua for now; I forgot / failed to notice that the require model for lposix was a lot more complicated. The other two builtins are more trivial, so I left those out and just fixed the one place I found (in nuageinit) where we accidentally referenced them without an appropriate require(). Some of the nuageinit network tests fail locally, but seems unrelated as they're dumping out some of my host configuration: ===> nuageinit:config2_network_static_v4 Result: failed: atf-check failed; see the output of the test for details Start time: 2025-10-04T14:05:37.210330Z End time: 2025-10-04T14:05:37.528481Z Duration: 0.318s [...] Standard output: Executing command [ /usr/libexec/nuageinit /tmp/kyua.Vhgb9a/25/work/media/nuageinit nocloud ] Executing command [ cat /tmp/kyua.Vhgb9a/25/work/etc/rc.conf.d/network ] Standard error: Fail: stdout does not match golden output --- network 2025-10-04 14:05:39.331660000 +0000 +++ /tmp/kyua.Vhgb9a/25/work/check.MPF2Ag/stdout 2025-10-04 14:05:39.355412000 +0000 @@ -1,4 +1,4 @@ -ifconfig_ue0="inet 192.0.2.2/24" -ifconfig_ue0_ipv6="inet6 2001:db8::2/64" -ipv6_network_interfaces="ue0" -ipv6_default_interface="ue0" +ifconfig_bridge0="inet 192.0.2.2/24" +ifconfig_bridge0_ipv6="inet6 2001:db8::2/64" +ipv6_network_interfaces="bridge0" +ipv6_default_interface="bridge0" Files left in work directory after failure: etc, home, media, network, routing, var ===> Failed tests nuageinit:config2_network -> failed: atf-check failed; see the output of the test for details [0.317s] nuageinit:config2_network_static_v4 -> failed: atf-check failed; see the output of the test for details [0.318s] nuageinit:nocloud_network -> failed: atf-check failed; see the output of the test for details [0.336s] From nobody Sat Oct 4 15:04:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cf82p3mGFz69667; Sat, 04 Oct 2025 15:04:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cf82p2vYsz473k; Sat, 04 Oct 2025 15:04:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759590290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ALk7MZ2Ij2UNBY3bxAWO7kIKW3kHnYdfWBj4Lo73BIo=; b=KqDu7Ix/oL7kpTa7yeMjuyAZnPIflFJBPYfa8t3TiLsWspRtZgoUnjJMCnlZxUwSyyB+JT rxX8G8v+v9SykbnnhNdmnPeEIf8bjTBfC15gjlcnLbrV3H1LS0iN1EeDdRq4M2Mcws48SU L03f4G0lzp959xns0U86fnPv6E0pvkkm1zzGduYP/5Z2AIF9Mj0+nYErjCcCP2lPV3Q4CE 6in75ReIt1FExi0i3Nlf1N34ClREvVRbKLCxHv+lkWrX1AjiPuD68vBAHYqL30HTzAjSOp vuPr6JzM7BfjoCjxg0gVW7dUXxmpCfgpERa2T5yXoqPq1Nu4HoezHwOfvAoJMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759590290; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ALk7MZ2Ij2UNBY3bxAWO7kIKW3kHnYdfWBj4Lo73BIo=; b=QB1YAuuoUo/pYEj+IAK1BW/6vMA6qvCbpaoaYwwfEj91toOPN2U8x2NdORjGuWyurmxYsA PHVQ2cGL3PMtDdDiyHqPrsWqLXscmyqtRyiqZT4cgL0DAORkDGa9nIJ6tuaHMD2x1IkLr9 090rnx5Y07VtLf0HoIqfngg9GOF53cIGnL+QWZBy+y8RvGIJKuG5JCMemJypVbHJ8hjipf /y3Apl1ssDRpenE3nIOUPVPdLai4Omp/hwtbHSUYlSDfN1CN7vag/z2J4yIhFDhzCHwVBk CUXAXH+Fd1mSrLxpCIi5RYCec67Ndyh/xkWjeYHs3LojE1gkWNYGJI9PH+br/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759590290; a=rsa-sha256; cv=none; b=c0HmZlXgBXJowCAcNooxBfZ5iEEpzIozlcSKexudEBXEx7BT0KLl7f3bjQaY+B8lOt31ur ztuWkG//bQ5VYq7ruyvYJdrSDKAkBPEAT/H0zTlWAJokICSAY3tUZNChCqkqHoKLpMPSCN 1K3yRBPyM5birJGbm0JQJsoYKqIH4bjU3Z9gCCmUJa8RYNZfkY15bIwdIHVEF7Mgb/U8Te 4DDlqugIMudu+AoM4LLLyre5IC4GV01DGRYBm+0BLLllsSU4CBfBRkpXIJCslQiGgfl3dZ 9MEqe6jVrT12UXIe+D36bp5Bu7vPLysp8/SwXdCCC3+g4SQ13dUezQD8XA6byw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cf82p2Rrzzn3N; Sat, 04 Oct 2025 15:04:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 594F4oRp070286; Sat, 4 Oct 2025 15:04:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 594F4o0l070283; Sat, 4 Oct 2025 15:04:50 GMT (envelope-from git) Date: Sat, 4 Oct 2025 15:04:50 GMT Message-Id: <202510041504.594F4o0l070283@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: d505ef08ffbe - main - flua: unbreak the build 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d505ef08ffbe3b7383fbc6ed30121de9256ac18e Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=d505ef08ffbe3b7383fbc6ed30121de9256ac18e commit d505ef08ffbe3b7383fbc6ed30121de9256ac18e Author: Kyle Evans AuthorDate: 2025-10-04 15:01:40 +0000 Commit: Kyle Evans CommitDate: 2025-10-04 15:04:35 +0000 flua: unbreak the build Local tree pollution let this escape. *sigh*. Pointy hat: kevans Pointy hat: kevans Pointy hat: kevans Fixes: 9c7db0931d486ce ("flua: move lposix back into flua for now") --- libexec/flua/lposix/Makefile | 5 ----- libexec/flua/lposix/Makefile.inc | 2 -- libexec/flua/{lposix => modules}/lposix.c | 5 ----- libexec/flua/{lposix => modules}/lposix.h | 0 4 files changed, 12 deletions(-) diff --git a/libexec/flua/lposix/Makefile b/libexec/flua/lposix/Makefile deleted file mode 100644 index 92321d51be9a..000000000000 --- a/libexec/flua/lposix/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -SHLIB_NAME= posix.so -WARNS?= 3 - -.include "Makefile.inc" -.include diff --git a/libexec/flua/lposix/Makefile.inc b/libexec/flua/lposix/Makefile.inc deleted file mode 100644 index 499e6779e84d..000000000000 --- a/libexec/flua/lposix/Makefile.inc +++ /dev/null @@ -1,2 +0,0 @@ -.PATH: ${.PARSEDIR} -SRCS+= lposix.c diff --git a/libexec/flua/lposix/lposix.c b/libexec/flua/modules/lposix.c similarity index 99% rename from libexec/flua/lposix/lposix.c rename to libexec/flua/modules/lposix.c index 430bb6f28baf..75cdd345aeaa 100644 --- a/libexec/flua/lposix/lposix.c +++ b/libexec/flua/modules/lposix.c @@ -21,8 +21,6 @@ #include "lauxlib.h" #include "lposix.h" -#include "bootstrap.h" - static void enforce_max_args(lua_State *L, int max) { @@ -699,6 +697,3 @@ luaopen_posix(lua_State *L) return (1); } - -/* Only this one needed in our bootstrap set, it will load the others. */ -FLUA_MODULE(posix); diff --git a/libexec/flua/lposix/lposix.h b/libexec/flua/modules/lposix.h similarity index 100% rename from libexec/flua/lposix/lposix.h rename to libexec/flua/modules/lposix.h From nobody Sat Oct 4 16:09:56 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cf9Tw3sKqz69F9C; Sat, 04 Oct 2025 16:09:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cf9Tw3C6Xz3Fnr; Sat, 04 Oct 2025 16:09:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759594196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zm698U4cSsu+OTacjejJXFVj0s+KK+J275CI6KMyyNE=; b=ulUZatV8H8N8M92/Rm1P8Y7cuGFsTH+qIUPYw61b5EZ6yWBCtJOaAsWP2cADEjv5oAdbtJ Ic5apoEyhZv3zvAivCTUiUlzzGa2WBCur3iJtEOUtcoLEyrVMk173udH6FXoDMNfweL5hT SZNCessQ77BV0Sq3fBZUD91dpxfcBABCzut1cbzN/ZW9QkrTHlUdKYKC7kd/JLrNUA3Qnn 5ICwYZkS9AS5IdMFtSx18cuJ6KszfH12vtDxtUV0Ap+5BCg3TNmwHoN6yEqccpuh4VlRIZ bEWOv9KniY2DeReTsU9tJ6qa3rhGV9y7TUpmiT8U+tpnzyjufUyidEfLUwINJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759594196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zm698U4cSsu+OTacjejJXFVj0s+KK+J275CI6KMyyNE=; b=wMLkIBeM1dkQJeAixwecGjS4/+F6YGX34+s4nSAYn+l8XWcIrwz+TLu7ftDTedzqA1AQj9 Snfud9aea/Jf0DmvUcQt8u4yNGle4SxPP1kyYhKkBQNtAa1X/7pg8whQljwG4Zzm44N2WF sPXv6yGLPbo+t+UFPNdCU+evBrGXyofxVd8UrUk5PKynoZNnc2bz0bqbiLkb0acUIscDH4 VWTjGESM4Gj3A7QN1rbrkyWKI0w9pDmGeZj2qQ1Pa51uKiboYd4pcTIYxQ/6UKYI8CHC1D NNofjiUiS55HzVaO/JXwJ5371b8gO86vgYHspmJgImq8g70TPxHYI97BydDfSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759594196; a=rsa-sha256; cv=none; b=IVpLJ4hWa5GI0ULZndMG69JUwK0XbC4V4nsHS8HeTahN3I+fUTzH8kn+RtHBRJm/sXA/fn qXM+XqGn4LX3BzRy6eznaKmLcgDssQwW5bVts6l/jL6vpJjqaOJwCStmb0Ta7yB3WEDAWS gKcjbDwau1ciW8V1tuPCoQNhuL+cbwJfRq5a8D+qwYcf/kfpAXJq6V94LlSiyJmOkJ89/p 5UO6QTqKuC3BiRsdClp1xRAnc31oZqfwceoq8m6V1/HKRavUvIYJKw7a3IioWQm0J6wvLI 9HNWwpwTp8nNubuMquOQAV5vi46+/KjotXKebqQkC9jMdbvZKwKy6KB+sxcEuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cf9Tw2ksfzp8P; Sat, 04 Oct 2025 16:09:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 594G9ueD085179; Sat, 4 Oct 2025 16:09:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 594G9uIr085176; Sat, 4 Oct 2025 16:09:56 GMT (envelope-from git) Date: Sat, 4 Oct 2025 16:09:56 GMT Message-Id: <202510041609.594G9uIr085176@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: cca9295dd6ad - main - Cirrus-CI: Bump to FreeBSD 14.3 image List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cca9295dd6adc4245fbeeefbe05c13c52d089bd7 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=cca9295dd6adc4245fbeeefbe05c13c52d089bd7 commit cca9295dd6adc4245fbeeefbe05c13c52d089bd7 Author: Ed Maste AuthorDate: 2025-10-04 13:10:09 +0000 Commit: Ed Maste CommitDate: 2025-10-04 16:09:45 +0000 Cirrus-CI: Bump to FreeBSD 14.3 image Sponsored by: The FreeBSD Foundation --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index e62b172efea9..b5c96820c192 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -4,7 +4,7 @@ compute_engine_instance: # gcloud compute images list --project freebsd-org-cloud-dev --no-standard-images platform: freebsd image_project: freebsd-org-cloud-dev - image: freebsd-14-2-release-amd64-ufs + image: freebsd-14-3-release-amd64-ufs cpu: 8 memory: 8G disk: 40 From nobody Sat Oct 4 16:13: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 4cf9Z90xrfz69FHk; Sat, 04 Oct 2025 16:13:37 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cf9Z90M3Rz3G5d; Sat, 04 Oct 2025 16:13:37 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759594417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+S3D8S9uH/5GciGqLYUZpNqhiIIhyzhToUG11SpEYJs=; b=kpnpw6eEKb3LyGTdhwXHhs71iMXcCvO9g3vvwMup20l0K6tATndmfAVskH07Xr7KYUVrNJ gDl+F0Z1ywc7cgYvNggF2I55NgrjlD1GZvKGi205LnUTKFOxdB9Ixrubvk5mS1EaiItZHW 0CpCiWJoZxaPi+GgRes+HRTe6BtZZ67UbUo10hQIsTvfiDH5h56FnIqB+Vu3g8XqyryIvO 4bgbGY4vwynkQ1KKrgzpJgT6J4kyli28mPi4SmZO2CIHraa4/KfVPb66VIZmbuLb3ZQvq8 dcQuhBt4zpbpJTDZ9l44mEOhOobCIAxGFnnX63tYmkRxjd01eFT7Wqqg92ICZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759594417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+S3D8S9uH/5GciGqLYUZpNqhiIIhyzhToUG11SpEYJs=; b=AbdW/VfPCJY7ngsWq1eykb6YH2VbqOQtzSnEVOcRXy1vI5JX3hV/Vr8i+jSkoII508nVxE A9n83Dl5JqR7sRec47RucySmYqx4c3VEpk2VuzJvhBQDV63NxM3YGUV/Pv6eiZHi2hcYX2 4taEKI9MMkJFoM1KVVmUF3/wp7oggwWQargfc3JpRYdc5GQqSyzWzShPy7QN9bI0gykYa9 vnMJUkWOI8lr04djDKq2N1Eh7g6icNBlUM2S59ZtY0pJXCCm20dZla1frz2XeWit9uaF9b nQSykk8B2+dxyfDj+/Ez4xJ1m441IYhRDhJWI+exMqcgq0OMAMU0YuW2mpJmvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759594417; a=rsa-sha256; cv=none; b=XKC8A31q5fBTkTwgHiPO/PqeAlgSXSOwiUVYxECPDHQP+45Jn00TU+j+g3VoemIq2aPeKF I7FMGEkGLYWXv2hNFG54dJ0GuFt/xrYz16oTaevz6C2nWhW+c7SWkXquXeuzkGox6WorJd Yr5KWkTqEgjQF5+DNofWef5vwGoZfeBudv9Xg9UFt/NbfjqX+VMFnRmcmvhvgJzj7vz741 YSdQ/RGZRYifjeaL0Aq5cruLI102Hcv51ejR6TJ1YOpbktSRGzY9787VkIWNedIXy4Z4Tn bZ+7whzMN6WU0L6JgRQ0VB7mxmx/Zh+GxFnKgJKCUK7oRuIfMFT4aB5wSHj8mg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E6" (verified OK)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cf9Z84wQBzr7P; Sat, 04 Oct 2025 16:13:36 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id 0B26AA64808; Sat, 04 Oct 2025 16:13:25 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id D01622D029D8; Sat, 4 Oct 2025 16:13:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id irW94uYWbu8o; Sat, 4 Oct 2025 16:13:33 +0000 (UTC) Received: from nv.t4-02.sbone.de (nv.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id EDB872D029E7; Sat, 4 Oct 2025 16:13:32 +0000 (UTC) Date: Sat, 4 Oct 2025 16:13:32 +0000 (UTC) From: "Bjoern A. Zeeb" To: Zhenlei Huang cc: Mateusz Guzik , Gleb Smirnoff , src-committers@freebsd.org, "" , "dev-commits-src-main@FreeBSD.org" , Kristof Provost Subject: Re: svn commit: r256519 - in head/sys: net netatalk netinet netinet6 netipx In-Reply-To: <13C41285-E7E1-4B49-B9A7-1B157B445CDD@FreeBSD.org> Message-ID: References: <201310151031.r9FAVgRP008282@svn.freebsd.org> <35D99D40-5534-402A-8479-64C71604206B@FreeBSD.org> <13C41285-E7E1-4B49-B9A7-1B157B445CDD@FreeBSD.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-511174828-1759594413=:11296" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-511174828-1759594413=:11296 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Tue, 30 Sep 2025, Zhenlei Huang wrote: >> On Sep 30, 2025, at 10:59 AM, Mateusz Guzik wrote: >> >> On Tue, Sep 30, 2025 at 4:38 AM Zhenlei Huang > wrote: >>> >>> >>> >>>> On Sep 29, 2025, at 10:29 PM, Mateusz Guzik wrote: >>>> >>>> On Tue, Oct 15, 2013 at 12:31 PM Gleb Smirnoff wrote: >>>>> >>>>> Author: glebius >>>>> Date: Tue Oct 15 10:31:42 2013 >>>>> New Revision: 256519 >>>>> URL: http://svnweb.freebsd.org/changeset/base/256519 >>>>> >>>>> Log: >>>>> Remove ifa_init() and provide ifa_alloc() that will allocate and setup >>>>> struct ifaddr internally. >>>>> >>>>> Sponsored by: Netflix >>>>> Sponsored by: Nginx, Inc. >>>>> >>>>> Modified: >>>>> head/sys/net/if.c >>>>> head/sys/net/if_var.h >>>>> head/sys/netatalk/at_control.c >>>>> head/sys/netinet/in.c >>>>> head/sys/netinet6/in6.c >>>>> head/sys/netipx/ipx.c >>>>> >>>>> Modified: head/sys/net/if.c >>>>> ============================================================================== >>>>> --- head/sys/net/if.c Tue Oct 15 10:19:24 2013 (r256518) >>>>> +++ head/sys/net/if.c Tue Oct 15 10:31:42 2013 (r256519) >>>>> @@ -633,8 +633,7 @@ if_attach_internal(struct ifnet *ifp, in >>>>> socksize = sizeof(*sdl); >>>>> socksize = roundup2(socksize, sizeof(long)); >>>>> ifasize = sizeof(*ifa) + 2 * socksize; >>>>> - ifa = malloc(ifasize, M_IFADDR, M_WAITOK | M_ZERO); >>>>> - ifa_init(ifa); >>>>> + ifa = ifa_alloc(ifasize, M_WAITOK); >>>>> sdl = (struct sockaddr_dl *)(ifa + 1); >>>>> sdl->sdl_len = socksize; >>>>> sdl->sdl_family = AF_LINK; >>>>> @@ -1417,13 +1416,23 @@ if_maddr_runlock(struct ifnet *ifp) >>>>> /* >>>>> * Initialization, destruction and refcounting functions for ifaddrs. >>>>> */ >>>>> -void >>>>> -ifa_init(struct ifaddr *ifa) >>>>> +struct ifaddr * >>>>> +ifa_alloc(size_t size, int flags) >>>>> { >>>>> + struct ifaddr *ifa; >>>>> + >>>>> + KASSERT(size >= sizeof(struct ifaddr), >>>>> + ("%s: invalid size %zu", __func__, size)); >>>>> + >>>> >>>> We have crashes stemming from this: >>>> >>>> panic: ifa_alloc: invalid size 16 >>>> >>>> panic() at panic+0x43/frame 0xfffffe009e777760 >>>> ifa_alloc() at ifa_alloc+0xd6/frame 0xfffffe009e777780 >>>> in6_ifadd() at in6_ifadd+0xd8/frame 0xfffffe009e7778a0 >>>> nd6_ra_input() at nd6_ra_input+0x1023/frame 0xfffffe009e777a80 >>>> icmp6_input() at icmp6_input+0x5b6/frame 0xfffffe009e777c00 >>>> ip6_input() at ip6_input+0xc94/frame 0xfffffe009e777ce0 >>>> sppp_input() at sppp_input+0x502/frame 0xfffffe009e777d70 >>>> pppoe_data_input() at pppoe_data_input+0x1e7/frame 0xfffffe009e777de0 >>>> swi_net() at swi_net+0x19b/frame 0xfffffe009e777e60 >>>> ithread_loop() at ithread_loop+0x266/frame 0xfffffe009e777ef0 >>>> fork_exit() at fork_exit+0x82/frame 0xfffffe009e777f30 >>>> fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe009e777f30 >>>> >>>> in6_ifadd has: >>>> struct in6_addr taddr; >>>> ifa = ifa_alloc(sizeof(taddr), M_WAITOK); >>>> >>>> should the assert be simply removed? >>> >>> Hi Mateusz, >>> >>> I believe you just found a bug. >>> >>> Try the following patch please, >>> >>> --- a/sys/netinet6/nd6_rtr.c >>> +++ b/sys/netinet6/nd6_rtr.c >>> @@ -1243,8 +1243,7 @@ in6_ifadd(struct nd_prefixctl *pr, int mcast) >>> >>> /* No suitable LL address, get the ifid directly */ >>> if (ifid_addr == NULL) { >>> - struct in6_addr taddr; >>> - ifa = ifa_alloc(sizeof(taddr), M_WAITOK); >>> + ifa = ifa_alloc(sizeof(struct in6_ifaddr), M_WAITOK); >>> if (ifa) { >>> ib = (struct in6_ifaddr *)ifa; >>> ifid_addr = &ib->ia_addr.sin6_addr; >>> >> >> Thanks for the patch. I don't have means to readily test it. >> >> This panic was getting in the way of looking at another panic so I did >> not pay much attention. >> >> But now that you point this out, I don't think the patch is sufficient. >> >> in6_get_ifid starts with NET_EPOCH_ASSERT. >> >> At the same time malloc(..., M_WAITOK) is illegal to call from an epoch section. > > So M_NOWAIT should be used, instead of M_WAITOK . > >> >> I don't know if in6_ifadd is called within net epoch, either way the >> above two are clearly contradictory. >> >> Is there are a reason to malloc this in the first place? > > I have not look into the code throughly. That was introduced via commit https://cgit.freebsd.org/src/commit/?id=9e792f7ef7298080c058fbc2d36a4e60e596dae9 . > > See https://reviews.freebsd.org/D51778 for more context. Wait, so first the bug came in on a controversial chnage to which multiple FreeBSD people said they were not sure what it is good for and then we get panic reports from the same source about their own code? I think it is time to backout the original at this point. At least then the commit history can be fixed? /bz -- Bjoern A. Zeeb r15:7 --0-511174828-1759594413=:11296-- From nobody Sat Oct 4 16:23:22 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cf9nW6YJDz69Ghv; Sat, 04 Oct 2025 16:23:27 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cf9nW5yT7z3HM1; Sat, 04 Oct 2025 16:23:27 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759595007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=iHW+ZVEMvjpoULtIxB19UulnWkA9qdHWPJZ1FRxbZcw=; b=SqZarPqxd44tyK4ScHkznr2gyuFZLvyyj5xBeWQfqVvAT/qhw4WdruqLvReJeL3+qypOqL zbIRp+Ta4LPOTt3fy/DMVsw/tGWW/PC1SMX00INq5PY3kIiRaboxFpD7LlGBhrIrh0oL9Z LkY0ZKprX+pcgtI55StkyskGDx5ZtZALEBIOgG6UiBo/Ll0Ezs19nX1lennG9Q/OOmdVsH dXoJ0hHGf4q0qhtmik9h1kAAdsUsrKdFFmOgpUROXBwCSiZgfQClcoyzv16ToXfhpjhTPE G6TX74hybNqs+cZtmCsp4nKkrxJTjHhiEcStMslI4Cyx9rWjD3fXctpxotga/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759595007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=iHW+ZVEMvjpoULtIxB19UulnWkA9qdHWPJZ1FRxbZcw=; b=AXsnq1didSrWjqm2zNLBcZeabZ3swfEu/QXc3aoLgownzSfVs5hshfsdzQlN4yA39C4usb YFQkYNYPE8aOmEInn+Pu94Xli/pdmIvUePSfGtonDXS9LZsiilDCrd4OM06kSYzUNI/Ycq TADYatMm+dZ63CfEe/IQYk8J+pbn6k1UrgxjzP8iFfEjjNQ54jUnTKpvhmzxxu/z4OrMn8 FJ5NDSCjsJTXJqUfM+2ufI8hWL2tfphxOjdEasfpe8rnyv55CEiTsxhKGxUWoXKbBNUi4b kj+u8hYqKOmRnqkzZ1Vj13M01kLBBm405sg22Ru1rmtZr2PCs1N/EYiugwqExw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759595007; a=rsa-sha256; cv=none; b=jPvYI0PqX1AJirl3IDjlm/MW1mpm0yyg9loLg4KCTomFpXb12Int4ux4b9KzZrA9mA2zDR NvHkciDR/D1yPlFPBq1J5xL+Wnb2eWc1tEV5/ebUdp5+OZSLt+28pnx7p2oYSZ0P45Kuox m5eLht+yIsdBuDQdKH8B4S5MxGWjEhiPaF42CkGFuauoj/zpTy0doyGwykODJ2YDUQnyXh ceIQM65XEb/UqboatexpNsyod2ta2LUmB4K5Lu1V+24Y3p3loOdmiGc+0TwDm+a1ZPDWa9 DakiVolE7GLvU3P6/Masa0tKLeW631JaUtIylgd3HDQvfVK6z2+c4HMLG93RSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E6" (verified OK)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cf9nW3y8HzrGK; Sat, 04 Oct 2025 16:23:27 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id EEDC9A64806; Sat, 04 Oct 2025 16:23:15 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id BD4042D029E6; Sat, 4 Oct 2025 16:23:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id WbXep2EmOW4y; Sat, 4 Oct 2025 16:23:24 +0000 (UTC) Received: from nv.t4-02.sbone.de (nv.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id D37CA2D029D8; Sat, 4 Oct 2025 16:23:23 +0000 (UTC) Date: Sat, 4 Oct 2025 16:23:22 +0000 (UTC) From: "Bjoern A. Zeeb" To: =?UTF-8?Q?Dag-Erling_Sm=C3=B8rgrav?= cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 5ead817c3b7a - main - rc: Teach netwait to wait for DAD In-Reply-To: <202510020932.5929WpJi067756@gitrepo.freebsd.org> Message-ID: <2r6r204q-qs32-70pq-rqn1-5s4p54r1385@mnoonqbm.arg> References: <202510020932.5929WpJi067756@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-768921551-1759595003=:11296" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-768921551-1759595003=:11296 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Thu, 2 Oct 2025, Dag-Erling Smørgrav wrote: > The branch main has been updated by des: > > URL: https://cgit.FreeBSD.org/src/commit/?id=5ead817c3b7af6d6b5fea222ab144db2c3167b22 > > commit 5ead817c3b7af6d6b5fea222ab144db2c3167b22 > Author: Dag-Erling Smørgrav > AuthorDate: 2025-10-02 09:28:05 +0000 > Commit: Dag-Erling Smørgrav > CommitDate: 2025-10-02 09:31:16 +0000 > > rc: Teach netwait to wait for DAD > > In some configurations, especially in jails, it is possible for the > system to boot so fast that we end up launching daemons while duplicate > address detection is still ongoing. If that happens, said daemons may > fail to bind to IPv6 addresses, as they are still tentative. Teach the > netwait service to wait (up to 10 seconds, by default) for the tentative > flag to vanish. Why 10s? You should never have to wait longer than net.inet6.ip6.dad_count + 1 seconds. Also the extra variable netwait_dad_timeout really isn't necessary in that case if you use the sysctl. /bz > MFC after: 1 week > Reviewed by: olce > Differential Revision: https://reviews.freebsd.org/D51889 > --- > libexec/rc/rc.conf | 2 ++ > libexec/rc/rc.d/netwait | 84 ++++++++++++++++++++++++++++++++++-------------- > share/man/man5/rc.conf.5 | 24 +++++++++----- > 3 files changed, 78 insertions(+), 32 deletions(-) > > diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf > index c354aec44430..2589e2614c35 100644 > --- a/libexec/rc/rc.conf > +++ b/libexec/rc/rc.conf > @@ -500,6 +500,8 @@ netwait_enable="NO" # Enable rc.d/netwait (or NO) > netwait_timeout="60" # Total number of seconds to perform pings. > #netwait_if="" # Wait for active link on each intf in this list. > netwait_if_timeout="30" # Total number of seconds to monitor link state. > +netwait_dad="NO" # Wait for DAD to complete > +netwait_dad_timeout="10" # Total number of seconds to wait for DAD. > > ### Miscellaneous network options: ### > icmp_bmcastecho="NO" # respond to broadcast ping packets > diff --git a/libexec/rc/rc.d/netwait b/libexec/rc/rc.d/netwait > index 3f374806d97c..b609440a2e4e 100755 > --- a/libexec/rc/rc.d/netwait > +++ b/libexec/rc/rc.d/netwait > @@ -2,12 +2,14 @@ > # > # PROVIDE: netwait > # REQUIRE: devd ipfw pf routing > -# KEYWORD: nojail > # > -# The netwait script helps handle two situations: > +# The netwait script helps handle three situations: > # - Systems with USB or other late-attaching network hardware which > # is initialized by devd events. The script waits for all the > # interfaces named in the netwait_if list to appear. > +# - Systems with IPv6 addresses, especially jails, where we need to > +# wait for DAD to complete before starting daemons, as they will > +# otherwise fail to bind to IN6ADDR_ANY. > # - Systems with statically-configured IP addresses in rc.conf(5). > # The IP addresses in the netwait_ip list are pinged. The script > # waits for any single IP in the list to respond to the ping. If your > @@ -29,28 +31,36 @@ netwait_start() > { > local ip rc count output link wait_if got_if any_error > > - if [ -z "${netwait_if}" ] && [ -z "${netwait_ip}" ]; then > - err 1 "No interface or IP addresses listed, nothing to wait for" > + if [ -z "${netwait_if}" ] && [ -z "${netwait_ip}" ] && > + ! checkyesno netwait_dad ; then > + err 1 "Nothing to wait for" > fi > > - if [ ${netwait_timeout} -lt 1 ]; then > + if ! [ "${netwait_if_timeout}" -ge 1 ]; then > + err 1 "netwait_if_timeout must be >= 1" > + fi > + if ! [ "${netwait_dad_timeout}" -ge 1 ]; then > + err 1 "netwait_dad_timeout must be >= 1" > + fi > + if ! [ "${netwait_timeout}" -ge 1 ]; then > err 1 "netwait_timeout must be >= 1" > fi > > + any_error=false > + > if [ -n "${netwait_if}" ]; then > - any_error=0 > for wait_if in ${netwait_if}; do > echo -n "Waiting for ${wait_if}" > link="" > - got_if=0 > + got_if=false > count=1 > - # Handle SIGINT (Ctrl-C); force abort of while() loop > + # Handle SIGINT (Ctrl-C); force abort of while loop > trap break SIGINT > while [ ${count} -le ${netwait_if_timeout} ]; do > if output=`/sbin/ifconfig ${wait_if} 2>/dev/null`; then > - if [ ${got_if} -eq 0 ]; then > + if ! ${got_if}; then > echo -n ", interface present" > - got_if=1 > + got_if=true > fi > link=`expr "${output}" : '.*[[:blank:]]status: \(no carrier\)'` > if [ -z "${link}" ]; then > @@ -63,22 +73,45 @@ netwait_start() > done > # Restore default SIGINT handler > trap - SIGINT > - if [ ${got_if} -eq 0 ]; then > + if ! ${got_if}; then > echo ", wait failed: interface never appeared." > - any_error=1 > + any_error=true > elif [ -n "${link}" ]; then > echo ", wait failed: interface still has no link." > - any_error=1 > + any_error=true > fi > done > - if [ ${any_error} -eq 1 ]; then > - warn "Continuing with startup, but be aware you may not have " > - warn "a fully functional networking layer at this point." > - fi > fi > > + if checkyesno netwait_dad; then > + got_dad=false > + # Handle SIGINT (Ctrl-C); force abort of while loop > + trap break SIGINT > + > + echo -n "Waiting for DAD to complete" > + count=1 > + while [ ${count} -le ${netwait_dad_timeout} ]; do > + if ! ifconfig | grep -q 'inet6.*tentative'; then > + echo ', done.' > + got_dad=true > + break > + fi > + sleep 1 > + count=$((count+1)) > + done > + > + # Restore default SIGINT handler > + trap - SIGINT > + > + if ! ${got_dad}; then > + echo ', timed out.' > + any_error=true > + fi > + fi > + > if [ -n "${netwait_ip}" ]; then > - # Handle SIGINT (Ctrl-C); force abort of for() loop > + got_ip=false > + # Handle SIGINT (Ctrl-C); force abort of for loop > trap break SIGINT > > for ip in ${netwait_ip}; do > @@ -90,11 +123,9 @@ netwait_start() > rc=$? > > if [ $rc -eq 0 ]; then > - # Restore default SIGINT handler > - trap - SIGINT > - > echo ', got response.' > - return > + got_ip=false > + break 2 > fi > count=$((count+1)) > done > @@ -104,10 +135,15 @@ netwait_start() > # Restore default SIGINT handler > trap - SIGINT > > - warn "Exhausted IP list. Continuing with startup, but be aware you may" > - warn "not have a fully functional networking layer at this point." > + if ! ${got_ip}; then > + any_error=true > + fi > fi > > + if ${any_error}; then > + warn "Continuing with startup, but be aware you may not have " > + warn "a fully functional networking layer at this point." > + fi > } > > load_rc_config $name > diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 > index b8c72fc07083..c0048f27c740 100644 > --- a/share/man/man5/rc.conf.5 > +++ b/share/man/man5/rc.conf.5 > @@ -22,7 +22,7 @@ > .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > .\" SUCH DAMAGE. > .\" > -.Dd September 25, 2025 > +.Dd October 2, 2025 > .Dt RC.CONF 5 > .Os > .Sh NAME > @@ -4563,20 +4563,16 @@ If set to > .Dq Li YES , > delays the start of network-reliant services until > .Va netwait_if > -is up and ICMP packets to a destination defined in > +is up, duplicate address discovery (DAD) has completed, and ICMP > +packets to a destination defined in > .Va netwait_ip > are flowing. > -Link state is examined first, followed by > +Link state is examined first, followed by DAD, then > .Dq Li pinging > an IP address to verify network usability. > If no destination can be reached or timeouts are exceeded, > network services are started anyway with no guarantee that > the network is usable. > -Use of this variable requires both > -.Va netwait_ip > -and > -.Va netwait_if > -to be set. > .It Va netwait_ip > .Pq Vt str > Empty by default. > @@ -4612,6 +4608,18 @@ interface if desired. > Defines the total number of seconds to wait for link to become usable, > polled at a 1-second interval. > The default is 30. > +.It Va netwait_dad > +.Pq Vt str > +Set to > +.Dq Li NO > +by default. > +Set to > +.Dq Li YES > +to enable waiting for DAD to complete. > +.It Va netwait_dad_timeout > +.Pq Vt int > +Indicates the total number of seconds to wait for DAD to complete. > +The default is 10. > .It Va rctl_enable > .Pq Vt bool > If set to > -- Bjoern A. Zeeb r15:7 --0-768921551-1759595003=:11296-- From nobody Sat Oct 4 17:29: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 4cfCFd59T5z69Q3L; Sat, 04 Oct 2025 17:29:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cfCFd4hXZz3ZZg; Sat, 04 Oct 2025 17:29:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759598965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WXEiW1iX+6b0rHpFuRGFMf0iD/3T0nHJcPu8vbreH88=; b=dcgqa3CQiy7CEuLucGbFTYb2RjXfoGhLpouaWkMHyx4tIvs+2sDoUTa+zRq8JwMej1MMDt cWYjdq9JPJN+BQiMsLoj14fiylx/6Za+jEnPlsfc3Y0zjD+T9MFLtwNNTESpHUgeLeH0iB J3a2D/6RxB2i20jy1faHbhSmjyYk83BOJideY0jHQUYbZEuEfBALuY8zznRM52zJrS+vX5 3tnj/TwWBNB8wJMcp2+M9nv/taxFlc4owE1+mAjrJsvLwa/y2r6CZj1WfrvaeBU85h1AkM QHoTspIT/YUbk197jfR2rvTvn8tdhUJZSSXQ4yJXPGLIGYahWF0OgcZCj1mCpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759598965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WXEiW1iX+6b0rHpFuRGFMf0iD/3T0nHJcPu8vbreH88=; b=ovNTLZ0nx8qX6SHESuAziYOy8QkOHIEhJlzdAiErCs2MDvPcTwCBSPuHdfMzX0ZKWzmK8F KeFgFwVC4H5GlSjlfk51sNA3tODHK0HVHpe4Xvdw3y3q+C5GYVhrzgDwS1runUzzq9CMq3 bws1WmVOU8eyycXYnUFoQkNBL3ZwUnERBCQwtKxqZXoQLQGCcKCGeDXWy2MVUbQHfhyft+ zvJrENyi9qR6ZYAT10yMvH8oS9xfZSqxdNO4bK/h2t6pN3Ob0/hHK/T2G6MxXqkECbUenf mqojjfYUps8ggwmlwYroosJnG3ucaF6y+Mii0egxO+TSX2IxpPybo/K5E2ykPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759598965; a=rsa-sha256; cv=none; b=lMI/afd43clINLBfULxVhmF+jnYzfDPhXy0aUg+7xXZvU0csaalT9MVT3kq2etooAPTCE3 293zXte6y624M9paGrFfmM66mlXxag24UcZrPNJgrzhJsxHWpj396DDRjOYVhwpVAz/rGT RIXlSEjvI7zzp0q9cjm9cLh++oUv9qzIY9uq4pbrKsYq6tEa6hUunGv6dlWpnGDvLF4AYu 50P7BQ0vVLQPDYyp5OiOt3JoIE739dl9QItnvPErlrzesXd3cpN4XLlrKCoHpwkDfPWLGA 6mTXhzXd/EjTBekVRkyBeHFVIbJFrkAFrX2vsvFuFN3YkJ7OOLPUoJVHJJf1tQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cfCFd40dvzrbr; Sat, 04 Oct 2025 17:29:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 594HTPtt035881; Sat, 4 Oct 2025 17:29:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 594HTPIA035878; Sat, 4 Oct 2025 17:29:25 GMT (envelope-from git) Date: Sat, 4 Oct 2025 17:29:25 GMT Message-Id: <202510041729.594HTPIA035878@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 026707768f67 - main - release: Don't publish pkgbase.repo for embedded 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: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 026707768f673518c2fe9bcd9020d53a0d02fc7e Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=026707768f673518c2fe9bcd9020d53a0d02fc7e commit 026707768f673518c2fe9bcd9020d53a0d02fc7e Author: Colin Percival AuthorDate: 2025-10-04 16:52:42 +0000 Commit: Colin Percival CommitDate: 2025-10-04 17:29:21 +0000 release: Don't publish pkgbase.repo for embedded The embedded "SD card" images build very differently from regular releases, and don't use pkgbase yet. MFC after: 3 days Sponsored by: https://www.patreon.com/cperciva --- release/Makefile.mirrors | 2 ++ 1 file changed, 2 insertions(+) diff --git a/release/Makefile.mirrors b/release/Makefile.mirrors index 958ac7717616..6778b86873e6 100644 --- a/release/Makefile.mirrors +++ b/release/Makefile.mirrors @@ -63,10 +63,12 @@ STAGE_TARGETS+= oci-images-stage OCI_DIR= ${TLD}/OCI-IMAGES/${REVISION}-${BRANCH}/${TARGET_ARCH} .endif +.if !defined(EMBEDDED) || empty(EMBEDDED) .if !defined(NOPKGBASE) || empty(NOPKGBASE) STAGE_TARGETS+= pkgbase-repo-stage PKGBASE_DIR= ${TLD}/PKGBASE-REPOS/${REVISION}-${BRANCH}/${TARGET_ARCH} .endif +.endif CLEANFILES+= ${STAGE_TARGETS} CHECKSUM_FILES?= SHA512 SHA256 From nobody Sat Oct 4 17:52:49 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cfCmd3mhDz69S2w; Sat, 04 Oct 2025 17:52: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 4cfCmd2qKDz3dRj; Sat, 04 Oct 2025 17:52:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759600369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F7qD+61jPx7+32YvNVi9V0kp3gna4ZCqTCgRmACNv3U=; b=PPPfNJAkM1MCwOB4SmcwrTQWajkHs31RSytqp7IBPM4qxe88tB/QBEtV9SQ1t6oX5M7aCj 5mqLo18zz8svTJDIdQyo/sAfK2S0qtf1POounLN8eWSB+ddVol1gvcPmeJkE51L9nGWnzW t7QJ2WaK04QH+a78T7GLM0XX5BJSmJB0ViJXpWP+PxTYEqkVndx0dEny5xuAOblgojrq8C 1ghqogXVbgtn95buM6zihAn2iawp5trBh+ZGTsbr/znuWkR6CA+bIychFLHj3wqsUyYmHE K0RmI5Q1khqVkC6crX37nIhWJmkJ3yLrWO0liIccRYq7T2f2ic9N//mqlovLIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759600369; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F7qD+61jPx7+32YvNVi9V0kp3gna4ZCqTCgRmACNv3U=; b=pDnAMz9IPaOgL2S0+NP6RdtoVl2y65N9U7bPMrcBX2bxkXxIrrRYsBNwEAPJuOJ/8pAfKz hU+TCUD9TBKdWNWYC2KOaOMt/wqdnAsJufQaXPzM8crks/yORjKQBbSSt3i9Xjg7RrGzco kpJSEm2oOXMjvcN/iTBXelXLpr+6UIe9t+TUkaL20Tef7KYpauCTFcVBLyx0HhQlU3aB8T pLHYnMHLjnc4ACqmn4ayBayMYfAp6BXwCUDL+saSL3R2DoZF986u895AeKP9hn5YONZI6N sCVLH2gEu0CQt8MAcDAbZHypUMTp1D0s09CZSExyIiDdL9MSoqVyzXej0TNo3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759600369; a=rsa-sha256; cv=none; b=iUqt7YCn3JpQgIhPV+EJIpoVJbjhEHa/URd1xrSvYYbgjK/1smEViMy8xbLIZPeAUoUM+l Wa0KJhPfN1K2CQbmR42F9EcXsm5EG6oL1LUUjH4TkNEw3cOh7xSeSmM/H6jTSJr5r2DtJ1 UosMhxH49b8+PbZezyJhN2px+JTJd0khTbyXhnnEvARlrWL1MylVheJYRKmeLQLDpMnTyM 656OnfFD+lnpQruY5wwyK1GIOSEYrmfxkGq38z48ZhFA8B6O3YO+FT5Dy0uF8hyA7EYPyx zyx56+h4l0+oTd1JrNTfAKM7hraIN3bJqjTz+jtygk7Yy0MNN9zKXDnogPVkcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cfCmd2P5bzshd; Sat, 04 Oct 2025 17:52:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 594HqngH090036; Sat, 4 Oct 2025 17:52:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 594HqnZa090033; Sat, 4 Oct 2025 17:52:49 GMT (envelope-from git) Date: Sat, 4 Oct 2025 17:52:49 GMT Message-Id: <202510041752.594HqnZa090033@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: b09dd586518a - main - Makefile.inc1: Fix package-pkg with CROSS_TOOLCHAIN 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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b09dd586518aaa0ac24b70ca522f4054165c8031 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=b09dd586518aaa0ac24b70ca522f4054165c8031 commit b09dd586518aaa0ac24b70ca522f4054165c8031 Author: Lexi Winter AuthorDate: 2025-10-04 16:50:56 +0000 Commit: Lexi Winter CommitDate: 2025-10-04 17:52:39 +0000 Makefile.inc1: Fix package-pkg with CROSS_TOOLCHAIN CROSS_TOOLCHAIN is used to build src with a different toolchain than the bundled one. Ports also has a CROSS_TOOLCHAIN option, but it has a different meaning. When building ports-mgmt/pkg from ports for the package-pkg target, unset CROSS_TOOLCHAIN to prevent ports from being confused. This fixes 'make CROSS_TOOLCHAIN=llvm19 package-pkg' for the native target, but cross-building (e.g., targetting powerpc from amd64) is still broken due to an issue in pkg itself. MFC after: 3 seconds Reviewed by: emaste Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52902 --- release/scripts/make-pkg-package.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/release/scripts/make-pkg-package.sh b/release/scripts/make-pkg-package.sh index a1e006bd6964..3a1b163bd591 100755 --- a/release/scripts/make-pkg-package.sh +++ b/release/scripts/make-pkg-package.sh @@ -8,6 +8,13 @@ PKG_ABI=$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI) unset PKG_VERSION unset MAKEFLAGS unset PKGBASE +# Ports interprets CROSS_TOOLCHAIN differently from src, and having this set +# breaks the package-pkg build. For now, forcibly unset this and hope ports +# can find a working compiler. +if [ -n "$CROSS_TOOLCHAIN" ]; then + printf >&2 '%s: WARNING: CROSS_TOOLCHAIN will be ignored for the pkg build.\n' "$0" + unset CROSS_TOOLCHAIN +fi export WRKDIRPREFIX=/tmp/ports.${TARGET} export DISTDIR=/tmp/distfiles export WRKDIR=$(make -C ${PORTSDIR}/ports-mgmt/pkg I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE=YES -V WRKDIR) From nobody Sat Oct 4 18:30: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 4cfDcD672Fz69XXY; Sat, 04 Oct 2025 18:30: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 4cfDcD5cBnz3hjR; Sat, 04 Oct 2025 18:30:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759602636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GIvqY99Sjde+PPEY0xgAjiI6m4C9ZS4y/QDCMzlEMUw=; b=FWEGm6HQBVmsTSia9aAT8tD6iw+xaSGuZ0DPOKUoL6UGlUE/RFnetXA0TWqBDqZ9rmx0vF d7UDkbe2pv5C20OYXBnZcl2FeYghH+hFCqPSX1h84URHM/R/hHjQx14nYaVwp5Zo/NtePe nSEDLSJaG+eQO9bKnRs1xoQYP71NR8p59AsEOvcypm77/zVuIGDtUeKvJZxC5mZSKAwex3 V9hsjusDwq8f2B0H5si9/iBkGSz8taFflOuwaLSUuBJc8H8X4KIO/X/cDezXJVT1JN3gNr L3D4mvFB6KGKuYzSgUT1dRgAYwjSYBDueLJMumMuoHOxG2Ywurp1t3s+xtTpWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759602636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GIvqY99Sjde+PPEY0xgAjiI6m4C9ZS4y/QDCMzlEMUw=; b=Hi0r3goE6FbsZZOAJGiJgIGIKlJM89NfOlAFMXtW2Kmj6wXAf5LixtJrq5dllybfJiD51Z /sAAIvMscrlHy+7Yso57WYR1w/gs5b/e/a97WwHvTU61GtrG9AWRmdx25vaIp8ntRKmNgT NS1bfyWlLFqosZT0Uzu4HKulvEe3Z3zKudE/7SuD1rHcp/7bUsZP5tREYC+2EpfDHTLGgF pWgrqhp+ELX7ky852sjYSgrcQQnqvWbtj3ni/HKIuK6fYo2RIhT5foJSvKq1p4bRxtJDuF lliJ3ui/4C/KhDb8BW4YK8uAuFOHEE2ytDRKjSvoChJvukKvmenv7vL1Hcgapw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759602636; a=rsa-sha256; cv=none; b=iAieUM5kPQ+NrBYE1zGRQoPXfgUZ4dpRZqSV1+iUtTiugNQfhjnuieeQqFjGMQnfxSlbBv sdbsOsvKJBIuQp/otYC/T9uWcFe+C8bsI0jcZa+5WG5skS9QwDeJVLCOrfvpEUt69ALx1f Yn3BKkpLIKjhkCXT96bwZAFvTLW2TAoHBsu/QR/HSTBGZJCLdXSlvzULxtmdJ9b7lZDVqI uTFlX//eUXJRxCf7asnpDxK8c6kx5izANlyoU+vk+sfEmCEmwCKgzfCMwrCinrMaisQxiC yeAVf9O4cqNe1GfB5/o9VKWTORx+R7mDP298p1yOPTwQF1WimVIPH8AbdbbWHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cfDcD5Bg0ztFr; Sat, 04 Oct 2025 18:30:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 594IUaxE057399; Sat, 4 Oct 2025 18:30:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 594IUaXY057396; Sat, 4 Oct 2025 18:30:36 GMT (envelope-from git) Date: Sat, 4 Oct 2025 18:30:36 GMT Message-Id: <202510041830.594IUaXY057396@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 4c0e53aced22 - main - pci: add quirk to disable Function-Level Reset (FLR) 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: 4c0e53aced2251eb5ac7eca44e13a6b947be8582 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=4c0e53aced2251eb5ac7eca44e13a6b947be8582 commit 4c0e53aced2251eb5ac7eca44e13a6b947be8582 Author: Bjoern A. Zeeb AuthorDate: 2025-09-25 12:49:07 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-10-04 18:28:39 +0000 pci: add quirk to disable Function-Level Reset (FLR) MediaTek mt76 WiFi cards are advertising FLR support but after issuing a FLR the chipset is gone. Add a quirk so we can disable FLR. The current reset code will automatically fall back to a power reset. This makes the card show up under bhyve where before it would just not be discovered at all. That should make wifibox work for it and will help development for a LinuxKPI based mt76 driver as found in framework laptops as no dedicated machine and constant reboots are needed anymore. We will likely need to add more PCI vendor/device IDs once we can test the other device IDs. Event: EuroBSDCon Devsummit 2025 After a lot of help from: jhb Really implemented by: jhb (I just typed and tested) GH issue: github.com/pgj/freebsd-wifibox/issues/73 MFC after: 3 days Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D52728 --- sys/dev/pci/pci.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 9e43a4c1909f..cde98cb62cef 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -240,6 +240,7 @@ struct pci_quirk { #define PCI_QUIRK_DISABLE_MSIX 5 /* MSI-X doesn't work */ #define PCI_QUIRK_MSI_INTX_BUG 6 /* PCIM_CMD_INTxDIS disables MSI */ #define PCI_QUIRK_REALLOC_BAR 7 /* Can't allocate memory at the default address */ +#define PCI_QUIRK_DISABLE_FLR 8 /* Function-Level Reset (FLR) not working. */ int arg1; int arg2; }; @@ -319,6 +320,13 @@ static const struct pci_quirk pci_quirks[] = { * expected place. */ { 0x98741002, PCI_QUIRK_REALLOC_BAR, 0, 0 }, + + /* + * With some MediaTek mt76 WiFi FLR does not work despite advertised. + */ + { 0x061614c3, PCI_QUIRK_DISABLE_FLR, 0, 0 }, /* mt76 7922 */ + + /* end of table */ { 0 } }; @@ -6740,6 +6748,8 @@ pcie_flr(device_t dev, u_int max_delay, bool force) if (!(pci_read_config(dev, cap + PCIER_DEVICE_CAP, 4) & PCIEM_CAP_FLR)) return (false); + if (pci_has_quirk(pci_get_devid(dev), PCI_QUIRK_DISABLE_FLR)) + return (false); /* * Disable busmastering to prevent generation of new From nobody Sat Oct 4 18:33:30 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cfDgc6NL6z69XV7; Sat, 04 Oct 2025 18:33:32 +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 4cfDgc5Skxz3j0S; Sat, 04 Oct 2025 18:33:32 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759602812; h=from:from:reply-to:subject:subject: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=zufEv+oM+w8uxXOXUlVsQHeW06iDbtvTh4ux8OF/6Gs=; b=nSJmLi0COND6xROlvdQp28M4UN6ThTt2Ncz+u6cfQ6AfLGXazIhexLOLNaxziDSzMO3uDs KpuV9cpSvRR2LmLbvauFCdfmKilYUrt4IJ50wjufae+QNK5yZJb0pWUWvkNHybYJBz98ge IuohI5poMbk9gTbiwP4URW4bei9DOg5N9wfw5oVr6sI5BVZ7TsKxkCe1/aC7MG1rhKEPAL 1rF6IwrSST/icemSlRDkJEyzxMYX1+RAEUJ4MRaLKJIuQR0oySfrmkn+WNMcWRJTX3CceT wocgXoOW1Ve3z+OMQbploC5abeGK6aCH3jdkvQEhRoTA6ymk4EutWI9He4vtAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759602812; h=from:from:reply-to:subject:subject: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=zufEv+oM+w8uxXOXUlVsQHeW06iDbtvTh4ux8OF/6Gs=; b=jCtz9nmNqpnAJ3fW3v1yJk4ySegwrLPHM9uCtIeCaWfVVeFQyzKwB2/3z4w4NmkxBOHp1v WQXXSIZrU4I8pHf96j1DseBY7Vnb6OEgUgThVsLGd3qDDwwOZw6yCOoLdEE4GxPoCYSEHl IXf6QRsZeT6MC8KuklzLGzRNDgyhgQcGohIovYWDz4YmBL/NLRElUbvWiwBb4JMy1JuPn8 MHZqXAamxcPmE8OaLf2Es+6hgfzdjtfz8J6/pKgSx05Vf7WgVsTGu2jBQ/+DrCvRiF+JU8 de2xbgsxPJHJ3OeYm2OGVlglnTDC5Sc2+OVI5WBctaJXHGJYkUQF5TO32BamtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759602812; a=rsa-sha256; cv=none; b=NVl+sDhdoTkudt+xPJmcUKw0ME5rvv1RV6L69M1j618Whp4mdpQ9OJBJD8EWpsREiW2QVY iIPLFN91Og9oswvFAaTeDJdbBreS7DfOJV6oC0Py/3ECXUYBcw66ABtP9pjwtXUF+MiP0h mBd/VPslZWaCZBvE4eR20wHkAxvMC+0iPGlJ7xA3xgTD+qkaIPUVe/4ZUldV1SGLpbcudK kga2HkXvJ0khcN1GJ4y/BgVRZUsF2z0E0io8nxkpKINX5uqyv4GrFbftnh4geY52fY2ewk bgi9eTw8CCFDBvo/XrH5mwYwTodFIXMa0hGWPl7aeXJO/WpiGl7epDuJp0jFyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from ltc.des.dev (88-177-82-251.subs.proxad.net [88.177.82.251]) (using TLSv1.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 4cfDgc4FJkztJt; Sat, 04 Oct 2025 18:33:32 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 8CAAF883BF; Sat, 04 Oct 2025 20:33:30 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Bjoern A. Zeeb" Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 5ead817c3b7a - main - rc: Teach netwait to wait for DAD In-Reply-To: <2r6r204q-qs32-70pq-rqn1-5s4p54r1385@mnoonqbm.arg> (Bjoern A. Zeeb's message of "Sat, 4 Oct 2025 16:23:22 +0000 (UTC)") References: <202510020932.5929WpJi067756@gitrepo.freebsd.org> <2r6r204q-qs32-70pq-rqn1-5s4p54r1385@mnoonqbm.arg> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Sat, 04 Oct 2025 20:33:30 +0200 Message-ID: <86ecri8qkl.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 "Bjoern A. Zeeb" writes: > Dag-Erling Sm=C3=B8rgrav writes: > > rc: Teach netwait to wait for DAD > > > > In some configurations, especially in jails, it is possible for the > > system to boot so fast that we end up launching daemons while duplic= ate > > address detection is still ongoing. If that happens, said daemons m= ay > > fail to bind to IPv6 addresses, as they are still tentative. Teach = the > > netwait service to wait (up to 10 seconds, by default) for the tenta= tive > > flag to vanish. > Why 10s? > > You should never have to wait longer than net.inet6.ip6.dad_count + 1 sec= onds. > > Also the extra variable netwait_dad_timeout really isn't necessary in tha= t case > if you use the sysctl. Thanky you, please see https://reviews.freebsd.org/D52905 DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Sat Oct 4 18:42: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 4cfDtP6scjz69YgH; Sat, 04 Oct 2025 18:42: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 4cfDtP69ZJz3kmv; Sat, 04 Oct 2025 18:42:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759603373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fYLYQkZZEgx5I4y66f7z2mfEcXIAGeDAc5Fs0lgGJaA=; b=hRJVd+BkPVhNjIWgnGIxeH9t6QduT/3VNG+myoepzXqBLUH9LwJzkJ4wmsgTxELT9vj9kj 9zuFPW6TdHiCGzeXmydYRCkThXibtJG3Yjjd/Q6LQApVhCzgjwI+2P7lBhpccNYlpIGgpc kXbc7r4wCAtSImYvaXrHbafyQJiHB1TIBKU1Dh8KDI9Enow5hH//3SbIPhOOsunjJyLkGF pjPYxVuiphPYKKncDacxCnVConDZCCkKj1/2PvwSPwpp1u95pjW0+YEmxlBAgsrUbNM712 Bw5c1exWi/MaNLnMKtSxRU3WmVmKg+OtSFHc6oOE1fD+fi6k3BGo2b3lQKmkuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759603373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fYLYQkZZEgx5I4y66f7z2mfEcXIAGeDAc5Fs0lgGJaA=; b=FpAFf3GT39TlHhy0rssRwiWXu+4R+KuaK76Y9qV1RukfJDelqhBN76LU2ZbMjcGfQ4BGcY +PtMfogGs8t/pI5InNijRTHk/wzT8HGJwjT6MI1oc2hOMwbZPHGyl/PY6oy69Km28DK+XA 8a37dyMvhHktDONuF9NbgxENwYGzo2ERifr8XpuXLHSo8twTM3n1KpPWAqkoQZpV/s4e3w oPyWpqBpOXT1dtpJmJaTxUy4JBrTJIMiZWEb+Y4+oP87dkn9DD5sERoJVmzWGp31VLsgLf czDLfUwjFr8rhe1WGxxLFpgLBipqAFm9rciCa9eSbED5mc6Z4fbdjcf4co9W6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759603373; a=rsa-sha256; cv=none; b=S778zc02ufdML61TM7FHvPDyoWCnMCzvBtGfj6WI5JqSkblAbxo+h3f9UlNLaycHWne7vM MoiEmxMtkRhVXCIddO6869z/LrkajpFnoJ14k/HIRyUq8/K7LjObDItFRiQ4K3nbofLJtT pMy/cDlfkNoy5dyrlnz+n+q7sV/aLUI7no/7dfLFwXAHVQ65qASADPHWE0O9WPGQwhW6BK YXwP6umEslVZ9rNiW+Qnet6dxnK1mioppbyC4N006oT40aS/Hv4yiPyAw15KMQQXyKXVS3 GFJm73hJ5zAu2S5FZaAS7zdV/QPQUWm6IYO5RoriIXY15z+nT5ZvCAwVc6rY0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cfDtP5b6xztQT; Sat, 04 Oct 2025 18:42:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 594Igrrj084097; Sat, 4 Oct 2025 18:42:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 594IgrMu084094; Sat, 4 Oct 2025 18:42:53 GMT (envelope-from git) Date: Sat, 4 Oct 2025 18:42:53 GMT Message-Id: <202510041842.594IgrMu084094@gitrepo.freebsd.org> 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=B8rgrav?= Subject: git: 64f8416afd4c - main - fts: Document thread (un)safety 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: 64f8416afd4cd042b34e3e975f84fb3493397828 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=64f8416afd4cd042b34e3e975f84fb3493397828 commit 64f8416afd4cd042b34e3e975f84fb3493397828 Author: Dag-Erling Smørgrav AuthorDate: 2025-10-04 18:35:38 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-04 18:42:19 +0000 fts: Document thread (un)safety MFC after: 3 days Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D52828 --- lib/libc/gen/fts.3 | 51 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 7 deletions(-) diff --git a/lib/libc/gen/fts.3 b/lib/libc/gen/fts.3 index ee558b892c8c..b937607b48e0 100644 --- a/lib/libc/gen/fts.3 +++ b/lib/libc/gen/fts.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 30, 2025 +.Dd October 1, 2025 .Dt FTS 3 .Os .Sh NAME @@ -376,7 +376,44 @@ The .Fa fts_name field is always .Dv NUL Ns -terminated . -.Sh FTS_OPEN +.Ss Thread Safety +The +.Nm +functions can safely be used in multi-threaded programs provided no +two threads access the same +.Vt FTS +or +.Vt FTSENT +structure simultaneously. +However, unless the +.Dv FTS_NOCHDIR +flag was passed to +.Fn fts_open +or +.Fn fts_open_b , +calls to +.Fn fts_read +and +.Fn fts_children +may change the current working directory, which will affect all +threads. +Conversely, changing the current working directory either during or +between calls to +.Fn fts_read +or +.Fn fts_children +(even in a single-thread program) may cause +.Nm +to malfunction unless the +.Dv FTS_NOCHDIR +flag was passed to +.Fn fts_open +or +.Fn fts_open_b +and all paths in +.Va path_argv +were absolute. +.Ss Fn fts_open The .Fn fts_open function takes a pointer to an array of character pointers naming one @@ -545,7 +582,7 @@ the directory traversal order is in the order listed in .Fa path_argv for the root paths, and in the order listed in the directory for everything else. -.Sh FTS_OPEN_B +.Ss Fn fts_open_b The .Fn fts_open_b function is identical to @@ -554,7 +591,7 @@ except that it takes a block pointer instead of a function pointer. The block is copied before .Fn fts_open_b returns, so the original can safely go out of scope or be released. -.Sh FTS_READ +.Ss Fn fts_read The .Fn fts_read function returns a pointer to an @@ -605,7 +642,7 @@ after the structure has been returned by the function .Fn fts_read in post-order. -.Sh FTS_CHILDREN +.Ss Fn fts_children The .Fn fts_children function returns a pointer to an @@ -679,7 +716,7 @@ and .Fa fts_namelen fields. .El -.Sh FTS_SET +.Ss Fn fts_set The function .Fn fts_set allows the user application to determine further processing for the @@ -749,7 +786,7 @@ The file may be one of those most recently returned by either or .Fn fts_read . .El -.Sh FTS_CLOSE +.Ss Fn fts_close The .Fn fts_close function closes a file hierarchy stream From nobody Sat Oct 4 20:24:21 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cfH7T4P6Kz69mm0; Sat, 04 Oct 2025 20:24:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cfH7T3nXSz41nb; Sat, 04 Oct 2025 20:24:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759609461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IGJeK16hAeAgXhgpuOqBeYhPj5OAsc9w7SblBG/WPBc=; b=EVRlja5hg9hyAsWTQ+ZIK6aDcOU+kMEkYj03uUUXAiJXsKqBFsdsxl5ZpvQNdn4gdl/fP6 k0Mj2m5Xc/NQZdRNFaqdH2ZZQW+En9pUDrOaSe+SiNPieZ/xvDcydne1EHy0j8axe9/FaT hsY4plGWMu9RzxlAfJiqoeIh7tvs4uUWKInL97IStwtrcKjVtTv/Sp7TR7WiMavAca8Vz6 O1vzEH7IgS+PW+k1dY5HTBL1Yr7t1NJIioi9rqkQRc+uwJH+8yA4MlSeMjDsAEGNSSyRAI eVsjJVYNtI5DQrNlPzEYVdsRTk2O0urKez3YrlM0r5kHx3UtASp49OXHKEZS3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759609461; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IGJeK16hAeAgXhgpuOqBeYhPj5OAsc9w7SblBG/WPBc=; b=jDoW9lJO98+dqCqXnQ4BlHvMJ6srZU+iBGstK9iijSxHNhTIrjeCmcBLyI7elst5qQ5ddT Q+DGar+EIjbx3oBjJs/6dhZwQi0jZ4Idh5y+1pyTvBUCgUZeIHdMqZzTQHUlW8hoT6/E/L YPaM1u9c3JNba3g8HrF6LNLeUoPeXonq0QcQOJlo/7rXQ0FcOJXEZQAcT6mBu5cSFP4X5Y n6hBTp87ssXnJA0Z48fP0adp8iV+yJG1IUxLALAHMAksXmZKhkCmYTh714hAgvjtlbiWLe dZcrV6wp1QsfGOtmGBGISKxOKiUd0i91UpHHCaL1md79I5KSYhTmHgAUTsh2bg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759609461; a=rsa-sha256; cv=none; b=HP248ZGmR5Y4B+AGO0Re35Vp9Nl+JiuHwNT4DSf5ElMx0oiiJ7kR+CbLTRmz/lvQI9cN7P 7ndV3WUIvG5BFAHhcEhMXBolaVEId9wO2HMxlvySUPXRZqhGLa7AvdGs/h2iyDDV+IrsHX rpBoAjGlCRRc+t5IMs4mYfAn11sJzNKQScmx4fWp0qj+8xN0bRj5rpq3dT8yyVtproNgXV Q37SkMRbAxNRB6Hzn6YwWBXLvRZA5PGkdBZPRRIADS2NEuxJScwT3+yR5exQYQLAOtAKc3 Ur9QyJeuoBxxYpfmR+gZuIL8oPNGNFmdoZ60pTiwX5/UusDu9OPi6SYVYhfjeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cfH7T34nbzxK4; Sat, 04 Oct 2025 20:24:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 594KOLFc073505; Sat, 4 Oct 2025 20:24:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 594KOLVU073502; Sat, 4 Oct 2025 20:24:21 GMT (envelope-from git) Date: Sat, 4 Oct 2025 20:24:21 GMT Message-Id: <202510042024.594KOLVU073502@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric van Gyzen Subject: git: 01b0690c495e - main - if_vmx: fix panic during kldload 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: vangyzen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 01b0690c495e1043a72cae9ee945f9f2c2adc216 Auto-Submitted: auto-generated The branch main has been updated by vangyzen: URL: https://cgit.FreeBSD.org/src/commit/?id=01b0690c495e1043a72cae9ee945f9f2c2adc216 commit 01b0690c495e1043a72cae9ee945f9f2c2adc216 Author: Eric van Gyzen AuthorDate: 2025-10-04 12:23:41 +0000 Commit: Eric van Gyzen CommitDate: 2025-10-04 15:20:00 +0000 if_vmx: fix panic during kldload Just like vmxnet3_intr_disable_all, iflib may invoke this routine before vmxnet3_attach_post() has run, which is before the top-level shared data area is initialized and the device made aware of it. MFC after: 1 week Sponsored by: Dell Inc. --- sys/dev/vmware/vmxnet3/if_vmx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/dev/vmware/vmxnet3/if_vmx.c b/sys/dev/vmware/vmxnet3/if_vmx.c index 62b5f313a137..1a314ca6660e 100644 --- a/sys/dev/vmware/vmxnet3/if_vmx.c +++ b/sys/dev/vmware/vmxnet3/if_vmx.c @@ -2056,7 +2056,12 @@ vmxnet3_update_admin_status(if_ctx_t ctx) struct vmxnet3_softc *sc; sc = iflib_get_softc(ctx); - if (sc->vmx_ds->event != 0) + /* + * iflib may invoke this routine before vmxnet3_attach_post() has + * run, which is before the top level shared data area is + * initialized and the device made aware of it. + */ + if (sc->vmx_ds != NULL && sc->vmx_ds->event != 0) vmxnet3_evintr(sc); vmxnet3_refresh_host_stats(sc); From nobody Sat Oct 4 20:24:22 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cfH7V4fpCz69mZj; Sat, 04 Oct 2025 20:24:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cfH7V4BMPz41XB; Sat, 04 Oct 2025 20:24:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759609462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d+3AFXvHwnltrnhcwK2rTd2PvY+UzoIf6yy512737fo=; b=btVvnwlOFmbxY9DsbbxJpfjUe/Z3BNsr/fO+JjwULvXixpsJ4srKpRo0tLn3gPxcav85DX 7fh+VVaZeO5/XzShQErssBLLTR3MZGbloAUAQai3rqRVEG4G+hcVNN41UKOv5QsFgrdCnB 5df6PyZpguqXZydxt6LgG9keK+iUpCSMxxZ7lWrNLAo6bzcKR7580oudQ9/0p92I5p1k0d 9TzJg8ZGh5y9hZpF/YME5XcJ1sFBsZGMtIPIfkiLjGUw6tBdhUse/dllbNCDhXbvi3IXrd NgYX/L9txhqnU7I0MEFIheQsv1EvdRFxfdrePFwLjAuc0BSYCSJ3THu2tlkVMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759609462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d+3AFXvHwnltrnhcwK2rTd2PvY+UzoIf6yy512737fo=; b=pNzC73+fa5Wj3SdBDR7YJL0gp9Z10Qo4b+Hq5HTGRsTZJVT3ppPPnwDvgmity+rDr4/3fz Vf1aRFkUB57auVEvWMfe1r9vtyRMUkVPx2lFNAzlyrIz1kPUG9nBaDUAPP1KYmfxUYsdJW lnftsjeaXtOpOI65xRGop1VH1mLBIIeqmyatzhYhf5OadFoDYUUS5Uup6G2qFxDtx4R6ad ynG+fF/GPnVhGbJuqmSap19Yl6Js6CfX8F0knsAIqZ98llYVhZalGt0nbYy+EQBLoaqg4v RQG8Ldf0dczkejlU9oymEaeWke1Dz3lp+P8OSyzZE6muhRpU7K51vPTVBkOmww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759609462; a=rsa-sha256; cv=none; b=r1E81QXToJSfua6dp7/fPxN09obdzvOWa5oP+2HLHFbOR3QrMXmDdtwwHjn917Tpq8ufiL 9wxsiS42dxkMWjIov3tTAL3CYopUygplek38NZiSMA8VKifD8CEI6GLozBlJ3/tw0t5idp HWRWvBxyIx3ZmPOQSi01g8WQKTmjTIqUceR3pG56kachPmw9LA+Daw7zdOLvAnzHrSL4ER dujgs1JYsGGzm+mMwZqByzAiJZ/47QH3u8EYFgJmtn+1b/kVPpWGv6NFGp3VGvqFG8zgeK t2Cjm7mHiZGXnyL3X8NJE12EUQY+vN/89/rYTio0ghxZQ575O4ySiNkJrTiDxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cfH7V3gJZzxK5; Sat, 04 Oct 2025 20:24:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 594KOMKH073541; Sat, 4 Oct 2025 20:24:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 594KOMHA073538; Sat, 4 Oct 2025 20:24:22 GMT (envelope-from git) Date: Sat, 4 Oct 2025 20:24:22 GMT Message-Id: <202510042024.594KOMHA073538@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric van Gyzen Subject: git: 9dd865a59edd - main - apei_detach: fix swi_remove parameter 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: vangyzen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9dd865a59edda38e6a379c5081e9483a87abc1eb Auto-Submitted: auto-generated The branch main has been updated by vangyzen: URL: https://cgit.FreeBSD.org/src/commit/?id=9dd865a59edda38e6a379c5081e9483a87abc1eb commit 9dd865a59edda38e6a379c5081e9483a87abc1eb Author: Eric van Gyzen AuthorDate: 2025-10-04 15:18:05 +0000 Commit: Eric van Gyzen CommitDate: 2025-10-04 15:20:01 +0000 apei_detach: fix swi_remove parameter swi_remove expects a void *, but we were passing void **. MFC after: 1 week Sponsored by: Dell Inc. --- sys/dev/acpica/acpi_apei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/acpica/acpi_apei.c b/sys/dev/acpica/acpi_apei.c index 9cfd46c97430..624c81ad1b4f 100644 --- a/sys/dev/acpica/acpi_apei.c +++ b/sys/dev/acpica/acpi_apei.c @@ -754,7 +754,7 @@ apei_detach(device_t dev) apei_nmi = NULL; apei_nmi_nges = NULL; if (sc->nges.swi_ih != NULL) { - swi_remove(&sc->nges.swi_ih); + swi_remove(sc->nges.swi_ih); sc->nges.swi_ih = NULL; } if (acpi_get_handle(dev) != NULL) { From nobody Sat Oct 4 20:46:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cfHcl2dJqz69qPf; Sat, 04 Oct 2025 20:46:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cfHcl1ncMz46L3; Sat, 04 Oct 2025 20:46:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759610775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UZwww8LWO4zmSnYPgLZUfsVyFvLXjNX5/LED5O+2WL8=; b=dVF7XhSqD7JnyQtnzHzxYcsMzOKl3TvgaGLS1bHUX2JgWIJhYkKERjEXx9AICIwdeeomRT SIsB4pWEXa2ywjAtCmP6DzUBCoFhy4veGqt9dKW7UJcMycy6MqFGf5mkFeGaL+tulTh4HH 51tIFSvRdcPB9p8h0qeUo5h/VVexkuDJ5uRdJSvjBIBo0aRe07xP6P+OYFCcnHUUAfnvzU CgHM77ErzyFjDTKcdIV04DiQFcSazzmHosly3xho56ZYBSma3bOZZ+WH7guvfAYvIVtO6T qGbMULAb+AXYvBIzymtJD8hHbBFlOdYYHHM9a6xlCeDqa561nW1QblvlfaflCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759610775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UZwww8LWO4zmSnYPgLZUfsVyFvLXjNX5/LED5O+2WL8=; b=sW3Z923/LR6oBh5qZiu536W2GxKFTwjy1JZEA4wBe7eq+y5PHVLTck2SziefiIC/Cv8YtH 4X4AbujzJjyqz0gu/pklKj8bQx2D1NJXOggxGTTjtowCHdkM5eE3zy3vfTJjUtk4ewqsMi Pbdb34SJ/LMvZeJQpJulEgvEBkTyw0XZ+nEvL6JL9yRdqnpuUYD8eI0tKlw67HfS2FCvbG dQVGpTawpMCic0pBlxk2C9MGsc0PZZeSqLNhc2JSH+3bEX7fsnvdMI17KB+v7NqROFMn8w XtueaZhr4f4Hd6fo9XifhCURySCW8ICztapr9zMDvW89WFwjVs0kmHSqcb/79g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759610775; a=rsa-sha256; cv=none; b=TL8oVs7wt4rg/uUjqH3bahDrDD4uNh+ZKisk1dNlvg7PkYsdXQISDWmCleyx/fSnDOVcHy YJMCiLTYFRSmGYVie4PJjHqEiSV8PlMAPiKshZ0rF101rS7nq+Me2dTMygaxNKedZ4AZFu lufUbc/0FYv4jXS6KFXo0T8+RZScJDMYvslCAoeIzE3airCOMNyvGsPO0ORMUdaEhIouFr rWGjaMIoyZsWo8jMJtys4fRE9+fr2JWmDLznTee+U9Wl2DBNWU5wRetyj4cbCCCITGzBEu GQh51a6/M8itNre1TLcv4ZCyqYF0lATf65XYvreOS9yrWU72qJe6hXhXqI15kw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cfHcl1NcVzxtq; Sat, 04 Oct 2025 20:46:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 594KkFTa011584; Sat, 4 Oct 2025 20:46:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 594KkFrV011581; Sat, 4 Oct 2025 20:46:15 GMT (envelope-from git) Date: Sat, 4 Oct 2025 20:46:15 GMT Message-Id: <202510042046.594KkFrV011581@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brad Davis Subject: git: 85531add2844 - main - ice.4: Avoid first person language 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: brd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 85531add28443e4202632fedcb3ae6038d4acb0c Auto-Submitted: auto-generated The branch main has been updated by brd: URL: https://cgit.FreeBSD.org/src/commit/?id=85531add28443e4202632fedcb3ae6038d4acb0c commit 85531add28443e4202632fedcb3ae6038d4acb0c Author: Brad Davis AuthorDate: 2025-10-03 22:01:45 +0000 Commit: Brad Davis CommitDate: 2025-10-04 20:45:57 +0000 ice.4: Avoid first person language Approved by: ziaee MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D52896 --- share/man/man4/ice.4 | 92 +++++++++++++++++++++++++--------------------------- 1 file changed, 45 insertions(+), 47 deletions(-) diff --git a/share/man/man4/ice.4 b/share/man/man4/ice.4 index 3f7a9017756d..01e3f0daa65a 100644 --- a/share/man/man4/ice.4 +++ b/share/man/man4/ice.4 @@ -32,7 +32,7 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.Dd March 28, 2025 +.Dd October 3, 2025 .Dt ICE 4 .Os .Sh NAME @@ -86,7 +86,7 @@ Intel\(rg Ethernet Connection E830\-XXV .El .Pp For questions related to hardware requirements, refer to the documentation -supplied with your adapter. +supplied with the adapter. .Pp Support for Jumbo Frames is provided via the interface MTU setting. Selecting an MTU larger than 1500 bytes with the @@ -134,17 +134,16 @@ See the .Dq Intel\(rg Ethernet Adapters and Devices User Guide for more details on DDP and Safe Mode. .Pp -If you encounter issues with the DDP package file, you may need to download -an updated driver or +If issues are encountered with the DDP package file, an updated driver or .Sy ice_ddp -module. +module may need to be downloaded. See the log messages for more information. .Pp -You cannot update the DDP package if any PF drivers are already loaded. +The DDP package cannot be updated if any PF drivers are already loaded. To overwrite a package, unload all PFs and then reload the driver with the new package. .Pp -You can only use one DDP package per driver, even if you have more than one +Only one DDP package can be used per driver, even if more than one device installed that uses the driver. .Pp Only the first loaded PF per device can download a package for that device. @@ -164,9 +163,9 @@ each jumbo packet. This should help to avoid buffer starvation issues when allocating receive packets. .Pp -Packet loss may have a greater impact on throughput when you use jumbo -frames. -If you observe a drop in performance after enabling jumbo frames, enabling +Packet loss may have a greater impact on throughput when jumbo frames are in +use. +If a drop in performance is observed after enabling jumbo frames, enabling flow control may mitigate the issue. .Ss Remote Direct Memory Access Remote Direct Memory Access, or RDMA, allows a network device to transfer data @@ -184,14 +183,14 @@ operating in multiport mode with more than 4 ports. For detailed installation and configuration information for RDMA, see .Xr irdma 4 . .Ss RDMA Monitoring -For debugging/testing purposes, you can use sysctl to set up a mirroring +For debugging/testing purposes, a sysctl can be used to set up a mirroring interface on a port. The interface can receive mirrored RDMA traffic for packet analysis tools like .Xr tcpdump 1 . This mirroring may impact performance. .Pp -To use RDMA monitoring, you may need to reserve more MSI\-X interrupts. +To use RDMA monitoring, more MSI\-X interrupts may need to be reserved. Before the .Nm driver loads, configure the following tunable provided by @@ -200,7 +199,7 @@ driver loads, configure the following tunable provided by dev.ice..iflib.use_extra_msix_vectors=4 .Ed .Pp -You may need to adjust the number of extra MSI\-X interrupt vectors. +The number of extra MSI\-X interrupt vectors may need to be adjusted. .Pp To create/delete the interface: .Bd -literal -offset indent @@ -276,7 +275,7 @@ To enable/disable priority flow control in software\-based DCBX mode: sysctl dev.ice..pfc=1 (or 0 to disable) .Ed .Pp -Enhanced Transmission Selection (ETS) allows you to assign bandwidth to certain +Enhanced Transmission Selection (ETS) allows bandwidth to be assigned to certain TCs, to help ensure traffic reliability. To view the assigned ETS configuration, use the following: .Bd -literal -offset indent @@ -310,7 +309,7 @@ Use the following sysctl to enable or disable L3 QoS: sysctl dev.ice..pfc_mode=1 (or 0 to disable) .Ed .Pp -If you disable L3 QoS mode, it returns to L2 QoS mode. +If the L3 QoS mode is disabled, it returns to L2 QoS mode. .Pp To map a DSCP value to a traffic class, separate the values by commas. For example, to map DSCPs 0\-3 and DSCP 8 to DCB TCs 0\-3 and 4, respectively: @@ -329,7 +328,7 @@ sysctl dev.ice..dscp2tc_map .Pp L3 QoS mode is not available when FW\-LLDP is enabled. .Pp -You also cannot enable FW\-LLDP if L3 QoS mode is active. +FW\-LLDP cannot be enabled if L3 QoS mode is active. .Pp Disable FW\-LLDP before switching to L3 QoS mode. .Pp @@ -355,11 +354,11 @@ To check the current LLDP setting: sysctl dev.ice..fw_lldp_agent .Ed .Pp -You must enable the UEFI HII LLDP Agent attribute for this setting +The UEFI HII LLDP Agent attribute must be enabled for this setting to take effect. If the .Dq LLDP AGENT -attribute is set to disabled, you cannot enable the FW\-LLDP Agent from the +attribute is set to disabled, the FW\-LLDP Agent cannot be enabled from the driver. .Ss Link\-Level Flow Control (LFC) Ethernet Flow Control (IEEE 802.3x) can be configured with sysctl to enable @@ -416,11 +415,11 @@ provide a stable link without FEC. .Pp For devices to benefit from this feature, link partners must have FEC enabled. .Pp -If you enable the sysctl -.Em allow_no_fec_modules_in_auto -Auto FEC negotiation will include +If the +.Va allow_no_fec_modules_in_auto +sysctl is enabled Auto FEC negotiation will include .Dq No FEC -in case your link partner does not have FEC enabled or is not FEC capable: +in case the link partner does not have FEC enabled or is not FEC capable: .Bd -literal -offset indent sysctl dev.ice..allow_no_fec_modules_in_auto=1 .Ed @@ -443,16 +442,16 @@ To see the valid FEC modes for the link: sysctl \-d dev.ice..requested_fec .Ed .Ss Speed and Duplex Configuration -You cannot set duplex or autonegotiation settings. +The speed and duplex settings cannot be hard set. .Pp -To have your device change the speeds it will use in auto-negotiation or +To have the device change the speeds it will use in auto-negotiation or force link with: .Bd -literal -offset indent sysctl dev.ice..advertise_speed= .Ed .Pp Supported speeds will vary by device. -Depending on the speeds your device supports, valid bits used in a speed mask +Depending on the speeds the device supports, valid bits used in a speed mask could include: .Bd -literal -offset indent 0x0 \- Auto @@ -493,13 +492,13 @@ At a high level, to capture a firmware log: .It Set the configuration for the firmware log. .It -Perform the necessary steps to generate the issue you are trying to debug. +Perform the necessary steps to reproduce the issue. .It Capture the firmware log. .It Stop capturing the firmware log. .It -Reset your firmware log settings as needed. +Reset the firmware log settings as needed. .It Work with Customer Support to debug the issue. .El @@ -583,8 +582,8 @@ PF Registration (Bit 30) Module Version (Bit 31) .El .Pp -You can change the verbosity level of the firmware logs. -You can set only one log level per module, and each level includes the +The verbosity level of the firmware logs can be modified. +It is possible to set only one log level per module, and each level includes the verbosity levels lower than it. For instance, setting the level to .Dq normal @@ -640,8 +639,8 @@ dmesg > log_output NOTE: Logging a large number of modules or too high of a verbosity level will add extraneous messages to dmesg and could hinder debug efforts. .Ss Debug Dump -Intel\(rg Ethernet 800 Series devices support debug dump, which allows you to -obtain runtime register values from the firmware for +Intel\(rg Ethernet 800 Series devices support debug dump, which allows +gathering of runtime register values from the firmware for .Dq clusters of events and then write the results to a single dump file, for debugging complicated issues in the field. @@ -654,7 +653,7 @@ stateless snapshot of the whole device. .Pp NOTE: Like with firmware logs, the contents of the debug dump are not human\-readable. -You must work with Customer Support to decode the file. +Work with Customer Support to decode the file. .Pp Debug dump is per device, not per PF. .Pp @@ -717,20 +716,19 @@ sysctl dev.ice.0.debug.dump.clusters=0 .Pp NOTE: Using 0 will skip Manageability Transactions data. .Pp -If you don't specify a cluster, the driver will dump all clusters to a +If a single cluster is not specified, the driver will dump all clusters to a single file. Issue the debug dump command, using the following: .Bd -literal -offset indent sysctl \-b dev.ice..debug.dump.dump=1 > dump.bin .Ed .Pp -NOTE: The driver will not receive the command if you do not write -.Dq 1 -to the sysctl. +NOTE: The driver will not receive the command if the sysctl is not set to +.Dq 1 . .Pp Replace .Dq dump.bin -above with the file name you want to use. +above with the preferred file name. .Pp To clear the .Va clusters @@ -744,7 +742,7 @@ The ice driver supports the ability to obtain the values of the PHY registers from Intel(R) Ethernet 810 Series devices in order to debug link and connection issues during runtime. .Pp -The driver allows you to obtain information about: +The driver provides information about: .Bl -bullet .It Rx and Tx Equalization parameters @@ -758,12 +756,12 @@ sysctl dev.ice..debug.phy_statistics .Ed .Pp NOTE: The contents of the registers are not human\-readable. -Like with firmware logs and debug dump, you must work with Customer Support +Like with firmware logs and debug dump, work with Customer Support to decode the file. .Ss Transmit Balancing -Some Intel(R) Ethernet 800 Series devices allow you to enable a transmit +Some Intel(R) Ethernet 800 Series devices allow for enabling a transmit balancing feature to improve transmit performance under certain conditions. -When the feature is enabled, you should experience more consistent transmit +When enabled, the feature should provide more consistent transmit performance across queues and/or PFs and VFs. .Pp By default, transmit balancing is disabled in the NVM. @@ -784,7 +782,7 @@ configures the device accordingly. .Pp NOTE: The user selection for transmit balancing in EPCT or HII is persistent across reboots. -You must reboot the system for the selected setting to take effect. +The system must be rebooted for the selected setting to take effect. .Pp This setting is device wide. .Pp @@ -801,7 +799,7 @@ sysctl dev.ice..temp may have a low number of network memory buffers (mbufs) by default. If the number of mbufs available is too low, it may cause the driver to fail to initialize and/or cause the system to become unresponsive. -You can check to see if the system is mbuf\-starved by running +Check to see if the system is mbuf\-starved by running .Ic netstat Fl m . Increase the number of mbufs by editing the lines below in .Pa /etc/sysctl.conf : @@ -813,7 +811,7 @@ kern.ipc.nmbjumbo16 kern.ipc.nmbufs .Ed .Pp -The amount of memory that you allocate is system specific, and may require some +The amount of memory that should be allocated is system specific, and may require some trial and error. Also, increasing the following in .Pa /etc/sysctl.conf @@ -908,8 +906,8 @@ link partner's switch ports. Some PCIe x8 slots are actually configured as x4 slots. These slots have insufficient bandwidth for full line rate with dual port and quad port devices. -In addition, if you put a PCIe v4.0 or v3.0\-capable adapter into a PCIe v2.x -slot, you cannot get full bandwidth. +In addition, if a PCIe v4.0 or v3.0\-capable adapter is placed into a PCIe v2.x +slot, full bandwidth will not be possible. .Pp The driver detects this situation and writes the following message in the system log: @@ -920,7 +918,7 @@ Please move the device to a different PCI\-e link with more lanes and/or higher transfer rate. .Ed .Pp -If this error occurs, moving your adapter to a true PCIe x8 or x16 slot will +If this error occurs, moving the adapter to a true PCIe x8 or x16 slot will resolve the issue. For best performance, install devices in the following PCI slots: .Bl -bullet From nobody Sat Oct 4 23:24: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 4cfM7p0nmnz6B8PY; Sat, 04 Oct 2025 23:24:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cfM7p09LVz3NLq; Sat, 04 Oct 2025 23:24:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759620294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uBHfEXmMInZXjp8uhIOCeFvGzk2EkP2plZ2+ETYndio=; b=DSlKiZS3llHIpCHM1fWNqx4R+b/xwMd0O0vgRrvG2QY2aVaJ35ZPsADzm9a775e5AQeEnk W67XsykozcsVoXyPIGg7AuGItFXbfS7H+0bs3HfGICprQfoZvK3ZQDdP5K4N+odKmqESaY 8zORZ8TvRqZ+DgIbqpEhwMFJSd39OYBv9yNczjEb7BCH8T1TpVe0ZfFnrh382SKOPIL5Ld 0RYJIPQaC5O08YUlGEhnGEgIBFIVtlVdTrBM4Rw01sXDP6kxJkLVjpiEadFYapkObh2Nrh 4j9ypwGcUr+5kJWlMv8J93UsWujCYB9k/AgqF+oe6bj+FsyVJpph6JdLCElP/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759620294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uBHfEXmMInZXjp8uhIOCeFvGzk2EkP2plZ2+ETYndio=; b=A4yS8osxArz9VZ8gcNUV6qUu0t7L78QwEEXdItljqwtBIPCizsYQKSsh/uLNA6bG+Q/tG3 wMP2fRa0J8KcF0DbIFWxpbdYPpmNX89O2XXlz8XWvNGwo4D4XIiEvDROvE9LBkq24+xG4D 4OH2f9DDtdOjZdcb3ai826o754QoXHcd7jedShuqE58kvIZmRm6jN7rln55r2jZ8JVyb+F 2Of7t/nF1ZyE/hSIjAcbCProoGuMRM038RQeksnO5ZaRCcAQ4aRcGn4XyHNH7UJ1KqGPXV JIUnpBN7lSF2scRl+egpeXCVXVfgZXjp6NAzcMzFbB3y5VQmXzLFwa862t+u+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759620294; a=rsa-sha256; cv=none; b=EssBtWYKhoXlcC66r3ANNQGrP2BVxao5n4Z8is/XOYQNXed9yUgubiLwWULGRMk2QbA8wH Fp6H0fNRuhEzIrp+kl6SnRcW92ZoxawBoD2zQv//ikGq6F8xM+RPwqssmn3LZZA0tcfZld tyLIsfy14wxhY41ZkuHO5qYDBfWWZOUJi/jdhmS4hvEG4Kwd7nGVqZLR8dlg4oYS6Ce//c npJjzG6ZTF7nnx2MuOprF+SK4dAsIAp8dyhh7wwFYER4SxY+m6KruP9OZpywKW/mJ3VCXw 2W+i9IkRsiIeuNpVoAnnW5YJ94u5QbSylu5u+h9chVPQ8MIxNxnXWssGhTqGcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cfM7n6qZ9z13GY; Sat, 04 Oct 2025 23:24:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 594NOrlw012105; Sat, 4 Oct 2025 23:24:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 594NOr7N012102; Sat, 4 Oct 2025 23:24:53 GMT (envelope-from git) Date: Sat, 4 Oct 2025 23:24:53 GMT Message-Id: <202510042324.594NOr7N012102@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 81d9e08a4df4 - main - bsdinstall.8: Minor maintenance 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: 81d9e08a4df42079d5e163b5991d5d6f3a28d4f0 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=81d9e08a4df42079d5e163b5991d5d6f3a28d4f0 commit 81d9e08a4df42079d5e163b5991d5d6f3a28d4f0 Author: Alexander Ziaee AuthorDate: 2025-10-03 22:26:05 +0000 Commit: Alexander Ziaee CommitDate: 2025-10-04 23:24:15 +0000 bsdinstall.8: Minor maintenance Replace CD-ROMs with "discs, USBs, or network boot environments" to both modernize aesthetic and also nudge youths to think at scale. Since I'm disrupting the flow of these lines anyway, expand the VM acronym because I think this is one of the first manuals people will be looking at. Reset list alignment to seven characters. It was at 19 characters, and that was not enough to align them all, wasting many extra lines by crunching all the words over. Seven actually bought us some lines from six due to avg item size. Tag SPDX. MFC after: 3 days Discussed with: ivy, zi --- usr.sbin/bsdinstall/bsdinstall.8 | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/usr.sbin/bsdinstall/bsdinstall.8 b/usr.sbin/bsdinstall/bsdinstall.8 index 527250d380d1..6175d26b4fd3 100644 --- a/usr.sbin/bsdinstall/bsdinstall.8 +++ b/usr.sbin/bsdinstall/bsdinstall.8 @@ -1,4 +1,6 @@ -.\"- +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2011-2013 Nathan Whitehorn All rights reserved. .\" Copyright (c) 2018 Roberto Fernandez Cueto .\" Copyright (c) 2024 The FreeBSD Foundation @@ -27,7 +29,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 4, 2024 +.Dd October 3, 2025 .Dt BSDINSTALL 8 .Os .Sh NAME @@ -40,9 +42,10 @@ .Op Ar ... .Sh DESCRIPTION .Nm -is used for installation of new systems, both for system setup from -installation media, e.g., CD-ROMs, and for use on live systems to prepare -VM images and jails. +is used for installation of new systems, +both for system setup from installation media, +such as discs, USBs, or network boot environments, +and for use on live systems to prepare jails and virtual machine images. .Pp Much like .Xr make 1 , Nm @@ -56,7 +59,7 @@ these subtargets can be invoked separately by an installation script. .Sh OPTIONS .Nm supports the following options, global to all targets: -.Bl -tag -width indent+ +.Bl -tag -width "-D file" .It Fl D Ar file Provide a path for the installation log file .Pq overrides Ev BSDINSTALL_LOG . @@ -73,7 +76,7 @@ For interactive use, most users will be interested only in the and .Cm script targets. -.Bl -tag -width "jail destination" +.Bl -tag -width "-D file" .It Cm auto Run the standard interactive installation, including disk partitioning. .It Cm jail Ar destination @@ -295,7 +298,7 @@ Many are used internally during installation and have reasonable default values for most installation scenarios. Others are set by various interactive user prompts, and can be usefully overridden when making scripted or customized installers. -.Bl -tag -width "BSDINSTALL_DISTSITE" +.Bl -tag -width "-D file" .It Ev TMPDIR The directory to use for temporary files. Default: From nobody Sat Oct 4 23: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 4cfM7q2CWKz6B8XX; Sat, 04 Oct 2025 23:24:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cfM7q1N4dz3NbM; Sat, 04 Oct 2025 23:24:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759620295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z3O3WIr5xYph9Ry/HiYAUqinNUK3e32lkmKMyfcODzs=; b=O340K2dezJgrqkYksENrRFJptamkFWwHuElPK38SrzgraFcT3QNQfOCcxYtSh1SEcVNEov bxRdthEiZ7AhtLGPyr5L4FY/smp8Y8vBBM44xVlZBnT9KjN5dk+nmA4bd/ZR3/o9GV2Mmd eGvEEQP2eWkUZnnhSfX2mmYTpJr9+z4Q5jjTbRZtxYKG5Kv6KWTziMlrUoBjoIldW7rgTx uMmUegh6McJw48AJOCnx0uzC26CNPlzF2nsU9zN1ifC0D1jbWsPfSinQ/GD46RprErxM2H mQRyljiDSauHm/6jDB1sE2TUDWNIufhtWIAIO+vx6c4AeDupXzz1RQ+/D1+2BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759620295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z3O3WIr5xYph9Ry/HiYAUqinNUK3e32lkmKMyfcODzs=; b=B7hCFE0/9Pn54+Z1vR9RUZSljhERx/TmC+yq/e9Mzp7gaB4rvW9f3GEnJRu6e/xVV/tmRa yXUhd0aYy1PZMKwdr0OkuQRHoLj96KBxi704NIAzq5ABZ+kCugKQ3CV7ZCu93WDGL/CTth 3c72WyhTesrAPkqtOudM6QZ9xrqkSzwjB+Wcr4/rhSWSTOYH+9MD2j12QHCjqPRMAqgFmU TNxYEkc3q1EliwCyNOrl70HS6puAcamiJ68U3WEFISlCjVz4taOcsJDBREKls8GeSR89dl Dv9vZ60S2XV03OgQWWgYCtqHsZFctc+hC5qFyihHGhG38Zk4YmMTGmG3ozPUsw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759620295; a=rsa-sha256; cv=none; b=qfZm+qMZBeVrKsankF58hkIUCDptguZmM/R69ZukbwlTekKl/fzvIwocVHeNte+Tt7Fgpl dNCcVNe9cyjL5o+7WX9ol3iORj12Kpput91EvcR91smTvdsuxXSP42m63EXfJDfe6vFZcT OoWpriJ2wL1KJn/qiiLwGruZOtIlaA4d9TRCoNYNsY+tHWA8p66yGEEJrwKEBmOYKvgr5o KQqTjRc2OidfBpVU+nePCxqUfLk9QLGf9wGmXfaun8dcN/Nfc5RB0VEKlZLs/27wEum7LQ 61fKgPTLchAaTyEBLfOa5+Fetrf7rsSV+IR7c1GbNcyJz2aqJ6FZNQN2UMKqiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cfM7q0z1gz13GZ; Sat, 04 Oct 2025 23:24:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 594NOtbg012146; Sat, 4 Oct 2025 23:24:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 594NOtWh012140; Sat, 4 Oct 2025 23:24:55 GMT (envelope-from git) Date: Sat, 4 Oct 2025 23:24:55 GMT Message-Id: <202510042324.594NOtWh012140@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 6720975ba0c5 - main - ice.4: Zap registered mark from document descr 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: 6720975ba0c5b821ea0e889457737a3e2692125a Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=6720975ba0c5b821ea0e889457737a3e2692125a commit 6720975ba0c5b821ea0e889457737a3e2692125a Author: Alexander Ziaee AuthorDate: 2025-10-04 23:11:50 +0000 Commit: Alexander Ziaee CommitDate: 2025-10-04 23:24:22 +0000 ice.4: Zap registered mark from document descr Document descriptions for device drivers always contain registered trademarks of the manufacturers, but this is not a place for the registered mark symbol. While here, remove another useless symbol, the hyphen in the first line comment. MFC after: 3 days --- share/man/man4/ice.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/ice.4 b/share/man/man4/ice.4 index 01e3f0daa65a..13ad304a2d5a 100644 --- a/share/man/man4/ice.4 +++ b/share/man/man4/ice.4 @@ -1,4 +1,4 @@ -.\"- +.\" .\" SPDX-License-Identifier: BSD-3-Clause .\" .\" Copyright (c) 2019-2020, Intel Corporation @@ -37,7 +37,7 @@ .Os .Sh NAME .Nm ice -.Nd "Intel\(rg Ethernet 800 Series Driver" +.Nd Intel Ethernet 800 Series Driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: From nobody Sun Oct 5 05:03:22 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cfVfP4cT7z6BZKt; Sun, 05 Oct 2025 05:03:25 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cfVfP3j54z43jD; Sun, 05 Oct 2025 05:03:25 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759640605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=IZ4cHBMOIXAeKLfhVKXhj0VJSEnNQJSRtK+9fiG6JDc=; b=wzJBW0bQPkSn2MAG1dMCB7ta5W3B5B4QS5AJA/Ik/VfsBmAOJeyT/tyvqDty7/q65cyaNo FhgqMfxDnCDYMMxQFi62OEcb66VcuVjMwqnQyA+4mwcn3w2biqKVdXSE1QYisuBX3f5Xsy sEsXHPC42zwVoOEg0YoOIPNtFzcMw2OPDp/aEVjptTCUBaXwbgoKUr5x8ulVRKIak5ZV5u w2K0/nytzD7t5oMX5yUavzYoJisCHrpg2M/D7kPbOS+5rV7EvBayT1oeQh8L92baU+NcZj aitWiq9hG//c1AW8Us97sxtK/YOteF+ewZorT7P3+5PJXf67zxqdoH0Bv8csXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759640605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=IZ4cHBMOIXAeKLfhVKXhj0VJSEnNQJSRtK+9fiG6JDc=; b=aqLp/htOxmmlMZS8rAeAJXnwg4IyvCm1uPs+cl3Eaqdxq9LcXTlMax572U6o7Lvh4WTjX4 R8CriBObf957cjQgnhBunHOPsmvF6KvIix8LEcsNLX6HoSdtbupd2KNB2XiKdv48i7D9Jf a5knLNWIXZqKFwg7Q9R2jVI9F7RTRLKzTk1v9X9m6E7NKJaUHeBZkCUky2xX3q7kiZyRg/ 1fhnJQn/70f6LfyQRmfLXlQL3Jrp8eb9QWLQKnSKpd6WVuvgX8TJ43OUfH9ZGmWXM7sD8v dcscyBodGeBClji/kJmLtUw8MgU0LDaaqwi9VtzWV7BWZGINb5/wdrf+PgpkZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759640605; a=rsa-sha256; cv=none; b=wXPGu4Tdbzk5PalV/S8ga5lYIiRG0hM5tfl6actxsX1Sdl+/NX9VZZqizmpixMIIsNXjIv uaEBdUywHABucYe8x+9UhujLHHmhfg8z/5gjnymarOxgBAfvmkcCbShWXt6Ike42IS9/CE uuTn8hY0+4Em1so70uf4Vj034exUKoaoJlFqtfHXN9xKAtrB2AEmTOodZHm4n98qLVU+DR 5HIrmxkO+0c2ndpkLjknnKXEaqXwkA5fYBxtJG5X9UxdOm6Csl90f+VNdDQ9dGSUVzmsVe SkCa2eLCCaYnJMUMR6ceMEcbRlWi/cKZ+ZkaAJCvxEDHoTln0p9Qz78V7+MwaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cfVfN5wX4z17BB; Sun, 05 Oct 2025 05:03:24 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Sat, 4 Oct 2025 22:03:22 -0700 From: Gleb Smirnoff To: "Andrey V. Elsukov" , kp@freebsd.org Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 716acd9367df - main - carp6: revise the generation of ND6 NA Message-ID: References: <202510030802.59382PmL063849@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202510030802.59382PmL063849@gitrepo.freebsd.org> On Fri, Oct 03, 2025 at 08:02:25AM +0000, Andrey V. Elsukov wrote: A> static void A> carp_send_na(struct carp_softc *sc) A> { A> - static struct in6_addr mcast = IN6ADDR_LINKLOCAL_ALLNODES_INIT; A> struct ifaddr *ifa; A> - struct in6_addr *in6; A> + int flags; A> A> + /* A> + * Sending Unsolicited Neighbor Advertisements A> + * A> + * If the node is a router, we MUST set the Router flag to one. A> + * We set Override flag to one and send link-layer address option, A> + * thus neighboring nodes will install the new link-layer address. A> + */ A> + flags = ND_NA_FLAG_OVERRIDE; A> + if (V_ip6_forwarding) A> + flags |= ND_NA_FLAG_ROUTER; A> CARP_FOREACH_IFA(sc, ifa) { A> if (ifa->ifa_addr->sa_family != AF_INET6) A> continue; A> - A> - in6 = IFA_IN6(ifa); A> - nd6_na_output(sc->sc_carpdev, &mcast, in6, A> - ND_NA_FLAG_OVERRIDE, 1, NULL); A> - DELAY(1000); /* XXX */ A> + /* A> + * We use unspecified address as destination here to avoid A> + * scope initialization for each call. A> + * nd6_na_output() will use all nodes multicast address if A> + * destinaion address is unspecified. A> + */ A> + nd6_na_output(sc->sc_carpdev, &in6addr_any, IFA_IN6(ifa), A> + flags, ND6_NA_OPT_LLA | ND6_NA_CARP_MASTER, NULL); A> + DELAY(1000); /* RetransTimer */ A> } A> } Not really related to the change, but since the change preserved the DELAY(), asking as a reply to the change. This function is executed in callout(9) context, so we are stopping the callout thread, that otherwise could be servicing other tasks, for 1000 microseconds per address that is being redundant under same VHID. This DELAY() comes all the way from original import from OpenBSD. Is there any specification in IPv6 that prevents us from quickly sending a bunch of different NAs? I see that nd6_na_output_fib() has comments above: * Based on RFC 2461 * * the following items are not implemented yet: * - proxy advertisement delay rule (RFC2461 7.2.8, last paragraph, SHOULD) * - anycast advertisement delay rule (RFC2461 7.2.7, SHOULD) Is this related to that or not? -- Gleb Smirnoff From nobody Sun Oct 5 05:13: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 4cfVsx623gz6BbMY; Sun, 05 Oct 2025 05:13:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cfVsx5VZfz44Qd; Sun, 05 Oct 2025 05:13:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759641205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3dww+1omS7ywcTtTI3hH+MeDDyWNTR5HRR/C7ncymII=; b=GHZ8jEtK6tG7V5p+rva8etoK0V9SDuMrlHw/z/fQFaa+8ZOYGndb6A8YK0B8sfw+okiz+7 7iFcDFbBjF3hmWAzPc1TgTPz06bqjLmeVimswHJVUkHcstSz2PtcU+4s549Ph6ni5lGZe4 kzGZwXQSFhjcoqLez6tRK+yUlyGs1XKk+gfJZfxmlPsAQKjwuK4s66ZX7O5cVcBAcCwwpe tZfyExOtP3eSBNTp1sLlnqtNTWg7C76K4+PZLZ3dUNWnC/iCHqxHAcaO2awGfZeHURTFV9 yEWslrKAU4Xc5yawHBfGnrYX79ZqWtQOkLn6/6sg0Cgqo/1PiMkHHNqOnnp84w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759641205; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3dww+1omS7ywcTtTI3hH+MeDDyWNTR5HRR/C7ncymII=; b=syEAebUxKujWSOpB5+BuBQk1IVJj/qp+ooNRwIS4U7xQa7KBACLHpS9/i05BKJEkj4mkp6 bp/Doj7Cb0AHZ8lCw7UKg04JEGXATSzT0MYC7D6HP+q44vF2Iobsvc0wzsonMLAofgmhLY 5IIaHZvmHAIsEuONJyh9rcIg9yrh/6LTKboyoVkVKXi8YNFjY0/JmXUkC+6zOVYiINjKnj tSfduDpGCokh9eGsZG7yD9CWWa3oG7zJPevKg8mvLWrpb/0SUvce/b3VjRJcKhJ3APqVQq WOTmi8GhRGdL4yBF03zID+A0rX1PLiRq3bsgh5CXp+mWG1ABXg0UTaVBMf3Iig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759641205; a=rsa-sha256; cv=none; b=IlrCdW4mFcFRTop7fXX34zLusyapTyYVxSbf0bASqH73axUAQxsOsWr9sc+tm8k9HiNt+L ze+oK6VNjOWNjCFf8RJhul/P2GG009KS1CuNS2l0ZN/B3jb+4RkSPA/b4FrE1wP3gdtUux eXekJdbawn0+V+NwpDlSS9tU/79IK9X8h8v8fO87zj75leEKloAUsJqlPDzgdyxQs3m9K/ /pDWB6+wCQhAfAmTlBwkM5kzCIA4ctVhmOxwPoCg4RRE7gXSTxBykxES1yqXfHdmVKF5g+ oCTtAm9MFiLXj7gmGaPeYkXhKPox386LztOtGOfhN/G6Y5nBdQRKHW34+a6PDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cfVsx53w9z1Cpj; Sun, 05 Oct 2025 05:13:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5955DPcB073334; Sun, 5 Oct 2025 05:13:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5955DPs1073331; Sun, 5 Oct 2025 05:13:25 GMT (envelope-from git) Date: Sun, 5 Oct 2025 05:13:25 GMT Message-Id: <202510050513.5955DPs1073331@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 0242d4c3aea4 - main - libc: Move NLS catalogues to the locales packages 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: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0242d4c3aea4b56ba76da440d1948d9e3d19ae87 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=0242d4c3aea4b56ba76da440d1948d9e3d19ae87 commit 0242d4c3aea4b56ba76da440d1948d9e3d19ae87 Author: Lexi Winter AuthorDate: 2025-10-05 05:03:21 +0000 Commit: Lexi Winter CommitDate: 2025-10-05 05:12:54 +0000 libc: Move NLS catalogues to the locales packages We don't want to put these in clibs (where libc is) since they are not critical to system operation. Move them to locales, since anyone who is interested in translated versions of strerror() is going to have that installed anyway. While here, add some more documentation to bsd.nls.mk, particularly the NLSPACKAGE option. MFC after: 3 seconds Reviewed by: manu, kib Sponsored by: https://www.patreon.com/bsdivy Differential Revision: https://reviews.freebsd.org/D52898 --- lib/libc/nls/Makefile.inc | 5 +++++ share/mk/bsd.nls.mk | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/libc/nls/Makefile.inc b/lib/libc/nls/Makefile.inc index f26e04c187a5..c211026aba72 100644 --- a/lib/libc/nls/Makefile.inc +++ b/lib/libc/nls/Makefile.inc @@ -12,6 +12,11 @@ MAN+= catclose.3 catgets.3 catopen.3 # for translators. NLSNAME= libc +# We don't want libc's NLS catalogues to be installed in the clibs package. +# Put them in locales instead, since anyone interested in NLS will have +# that installed. +NLSPACKAGE= locales + NLS+= be_BY.UTF-8 NLS+= ca_ES.ISO8859-1 NLS+= de_DE.ISO8859-1 diff --git a/share/mk/bsd.nls.mk b/share/mk/bsd.nls.mk index bd13fe56679d..5a28e1cdd026 100644 --- a/share/mk/bsd.nls.mk +++ b/share/mk/bsd.nls.mk @@ -1,6 +1,8 @@ # -# This include file handles building and installing Native -# Language Support (NLS) catalogs +# Handle building and installing Native Language Support (NLS) catalogs. +# This is implemented using a files group called "NLS", +# so any per-group options that bsd.files.mk supports can be used here +# with the prefix "NLS". # # +++ variables +++ # @@ -17,6 +19,9 @@ # NLSMODE National Language Support files mode. [${NOBINMODE}] # # NLSOWN National Language Support files owner. [${SHAREOWN}] +# +# NLSPACKAGE Package to install the NLS files in. +# [${PACKAGE}, or "utilities" if not set] .if !target(____) .error bsd.nls.mk cannot be included directly. From nobody Sun Oct 5 07: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 4cfYxX6d6zz6BqgR; Sun, 05 Oct 2025 07:31:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cfYxX6N1Vz4M9L; Sun, 05 Oct 2025 07:31:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759649504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k6qN1QVq5cS5iRJvECVDg2gVRz/d3xATH3oP2hoz9hY=; b=gAamcTRaIyjatbHdYoycw/oQcZ1wjCME42bE1pgmvRHoPP/P4Lz5JIq1ZwGBB4VYQTwZFb ga6MPkBk2UsRHciIVoxZhAjU/XmIADaf8s2x0fHJw42t489TX3yCOFoNC/qHGT4/+FIoh3 1NKdYpSTuJKqVn5JL8+mqzITtf7up700C4Au4sBXXNIVrA7xEgJgp0XzaphajG33ck8kiW B0wMwBzxQ7vKLLE32LkFR7IMz/b+yP+era9dpF6PUyeL5cZLkbk/SE7vax+Ph7vbbrELF1 jxo5T81x4qsWv3gcJ7zG1Y7z1cTycc6E8pLphGjFeK5yUUecgJBohN/Nk0wYAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759649504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k6qN1QVq5cS5iRJvECVDg2gVRz/d3xATH3oP2hoz9hY=; b=FJ5RBNfTCAS1q+PUCLM43Dl6L0Uu/UhD8aQ2ykhtZXwsu6hqmcEa1dJ+P0xoPDHaUOBmFx 9uIxoH+CScWj+Ndo/Txlheb4edw4sqZTlgC4cLA9HK36IWX5ANIRQm7nesFP+00zmVUrp8 SglD/fotOtLH/7AUVhsBPKPE6Els06bw9mI5/+qv1cTODRWSXcBWWOrx+OO+Hs4Lx474TZ UUz2KnXqFsV8qBymnWUo2u/TxTq8OEoEJI+BMui30CuM+ySSxySUP5VFCpzyNdAQ8tNxqs C54+lnezDn8TkO5mDpJLS4kkBH8sWfiy7xn/DK1yv1eXQwyLIbphsClk4U8Ylw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759649504; a=rsa-sha256; cv=none; b=nztLJvIg9Bvc5idZ1cgVh9jOjA2BLSTM5qamSgGGMPKZzm48WeyptsWCdHLDdqC3GuIeS/ rKE1qX3uE5k+SEjZAHybMiLRMJP+aUkgpDNmhHkD51deycTdlQlhJZ3Tsk+uga/b3oHO+w k8VJa9f36h8JptW0/QQZ45NK49CXBJPZS5HUDK+YImZJfBGNX/6lWyAx9DHxH11WnF2LNz 9f+u8JjswINXQ8Yw3+cYRatxkk5VNGRRCCWYpK967m4ULx7XvZbGVFaNNuIKpSxLIbCOaT t9F4YReM4GS90dMzRCygJx5uU38fTzXyHW75di7p/QglCQLBBsN4EDXXfNYKLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cfYxX5ynBz1HpR; Sun, 05 Oct 2025 07:31:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5957Vilr032265; Sun, 5 Oct 2025 07:31:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5957VitG032259; Sun, 5 Oct 2025 07:31:44 GMT (envelope-from git) Date: Sun, 5 Oct 2025 07:31:44 GMT Message-Id: <202510050731.5957VitG032259@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 36c970ed985f - main - zfs: merge openzfs/zfs@5605a6d79 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: 36c970ed985ff3dd5443db4bf2aa58799028512c Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=36c970ed985ff3dd5443db4bf2aa58799028512c commit 36c970ed985ff3dd5443db4bf2aa58799028512c Merge: 0242d4c3aea4 5605a6d79b35 Author: Martin Matuska AuthorDate: 2025-10-05 06:51:00 +0000 Commit: Martin Matuska CommitDate: 2025-10-05 07:04:02 +0000 zfs: merge openzfs/zfs@5605a6d79 Notable upstream pull request merges: #16025 26b0f561b dnode_next_offset: backtrack if lower level does not match #17758 c722bf881 Add interface to interface spa_get_worst_case_min_alloc() function #17765 8d4c3ee9e zvol: Fix blk-mq sync #17787 8869caae5 zinject: Introduce ready delay fault injection #17780 b2196fbed Fix 'zpool add' safety check corner cases #17783 5c38029f4 zdb: add ZFS_KEYFORMAT_RAW support for -K option #17786 f0a95e897 zpool iostat: refresh pool list every interval #17807 -multiple zpool iostat: fix regressions in "all pools" mode after #17786 #17793 -multiple ddt prune: Add SCL_ZIO deadlock workaround #17799 ac2d8c80b Make mount/share errors non-fatal for zfs create/clone Obtained from: OpenZFS OpenZFS commit: 5605a6d79b3582296208ac391f93a5faf729fa92 .../.github/ISSUE_TEMPLATE/feature_request.md | 2 +- .../openzfs/.github/PULL_REQUEST_TEMPLATE.md | 5 - .../.github/workflows/scripts/qemu-2-start.sh | 2 +- .../.github/workflows/scripts/qemu-3-deps-vm.sh | 11 +- .../.github/workflows/scripts/qemu-5-setup.sh | 25 ++- .../.github/workflows/scripts/qemu-6-tests.sh | 2 +- sys/contrib/openzfs/META | 2 +- sys/contrib/openzfs/cmd/zdb/zdb.c | 20 ++ sys/contrib/openzfs/cmd/zfs/zfs_main.c | 38 +++- sys/contrib/openzfs/cmd/zinject/zinject.c | 81 ++++++- sys/contrib/openzfs/cmd/zpool/zpool_iter.c | 118 ++++++++--- sys/contrib/openzfs/cmd/zpool/zpool_main.c | 55 ++--- sys/contrib/openzfs/cmd/zpool/zpool_util.h | 3 +- sys/contrib/openzfs/cmd/zpool/zpool_vdev.c | 26 ++- sys/contrib/openzfs/contrib/intel_qat/readme.md | 2 +- .../pyzfs/libzfs_core/test/test_libzfs_core.py | 2 +- sys/contrib/openzfs/etc/init.d/README.md | 2 +- sys/contrib/openzfs/include/libzfs.h | 2 + .../include/os/linux/kernel/linux/blkdev_compat.h | 18 -- sys/contrib/openzfs/include/sys/fs/zfs.h | 2 + sys/contrib/openzfs/include/sys/range_tree.h | 5 +- sys/contrib/openzfs/include/sys/spa.h | 3 +- sys/contrib/openzfs/include/sys/spa_impl.h | 1 + sys/contrib/openzfs/include/sys/zfs_ioctl.h | 1 + sys/contrib/openzfs/include/sys/zio.h | 1 + sys/contrib/openzfs/lib/libuutil/libuutil.abi | 105 +-------- sys/contrib/openzfs/lib/libzfs/libzfs.abi | 172 ++++----------- sys/contrib/openzfs/lib/libzfs/libzfs_config.c | 17 ++ .../openzfs/lib/libzfs_core/libzfs_core.abi | 105 +-------- sys/contrib/openzfs/man/man8/zinject.8 | 14 ++ sys/contrib/openzfs/man/man8/zpool-upgrade.8 | 4 +- sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c | 23 +- sys/contrib/openzfs/module/zcommon/zfs_prop.c | 2 +- sys/contrib/openzfs/module/zfs/dnode.c | 65 +++++- sys/contrib/openzfs/module/zfs/mmp.c | 2 +- sys/contrib/openzfs/module/zfs/range_tree.c | 2 +- sys/contrib/openzfs/module/zfs/spa_config.c | 2 + sys/contrib/openzfs/module/zfs/spa_misc.c | 23 +- sys/contrib/openzfs/module/zfs/vdev.c | 15 +- sys/contrib/openzfs/module/zfs/vdev_label.c | 2 + sys/contrib/openzfs/module/zfs/zio.c | 35 ++- sys/contrib/openzfs/module/zfs/zio_inject.c | 38 ++++ sys/contrib/openzfs/scripts/zfs-tests.sh | 9 +- sys/contrib/openzfs/tests/runfiles/common.run | 20 +- sys/contrib/openzfs/tests/runfiles/sanity.run | 2 +- .../tests/test-runner/bin/test-runner.py.in | 61 ++++++ .../openzfs/tests/zfs-tests/tests/Makefile.am | 11 +- .../functional/cli_root/zdb/zdb_encrypted_raw.ksh | 75 +++++++ .../functional/cli_root/zpool_add/zpool_add.kshlib | 42 ++++ ...l_add_010_pos.ksh => zpool_add_warn_create.ksh} | 101 ++------- .../cli_root/zpool_add/zpool_add_warn_degraded.ksh | 204 ++++++++++++++++++ .../cli_root/zpool_add/zpool_add_warn_removal.ksh | 126 +++++++++++ .../functional/cli_root/zpool_iostat/cleanup.ksh | 30 +++ .../functional/cli_root/zpool_iostat/setup.ksh | 32 +++ .../cli_root/zpool_iostat/zpool_iostat.kshlib | 235 +++++++++++++++++++++ .../zpool_iostat/zpool_iostat_interval_all.ksh | 90 ++++++++ .../zpool_iostat/zpool_iostat_interval_some.ksh | 80 +++++++ .../functional/delegate/delegate_common.kshlib | 6 +- .../zfs-tests/tests/functional/upgrade/setup.ksh | 2 +- .../functional/upgrade/upgrade_readonly_pool.ksh | 14 +- .../tests/functional/xattr/xattr_014_pos.ksh | 53 +++++ .../functional/zvol/zvol_misc/zvol_misc_fua.ksh | 40 +++- sys/modules/zfs/zfs_config.h | 6 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 64 files changed, 1675 insertions(+), 621 deletions(-) diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_encrypted_raw.ksh index 000000000000,85d267d5402f..85d267d5402f mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_encrypted_raw.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_encrypted_raw.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_warn_degraded.ksh index 000000000000,313eb3666f27..313eb3666f27 mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_warn_degraded.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_warn_degraded.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_warn_removal.ksh index 000000000000,782858e301ac..782858e301ac mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_warn_removal.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_warn_removal.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_iostat/cleanup.ksh index 000000000000,099b5426031d..099b5426031d mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_iostat/cleanup.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_iostat/cleanup.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_iostat/setup.ksh index 000000000000,3529a0ccc015..3529a0ccc015 mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_iostat/setup.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_iostat/setup.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_iostat/zpool_iostat.kshlib index 000000000000,ea4b0bd2756d..ea4b0bd2756d mode 000000,100644..100644 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_iostat/zpool_iostat.kshlib +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_iostat/zpool_iostat.kshlib diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_iostat/zpool_iostat_interval_all.ksh index 000000000000,8e040058ec3e..8e040058ec3e mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_iostat/zpool_iostat_interval_all.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_iostat/zpool_iostat_interval_all.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_iostat/zpool_iostat_interval_some.ksh index 000000000000,ab1f258aa1cd..ab1f258aa1cd mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_iostat/zpool_iostat_interval_some.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_iostat/zpool_iostat_interval_some.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/xattr/xattr_014_pos.ksh index 000000000000,d4c9a0a41816..d4c9a0a41816 mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/xattr/xattr_014_pos.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/xattr/xattr_014_pos.ksh diff --cc sys/modules/zfs/zfs_config.h index c595030ed4a0,000000000000..db1b6f33a8ef mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,882 -1,0 +1,882 @@@ +/* + */ + +/* zfs_config.h. Generated from zfs_config.h.in by configure. */ +/* zfs_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* __assign_str() has one arg */ +/* #undef HAVE_1ARG_ASSIGN_STR */ + +/* lookup_bdev() wants 1 arg */ +/* #undef HAVE_1ARG_LOOKUP_BDEV */ + +/* kernel has access_ok with 'type' parameter */ +/* #undef HAVE_ACCESS_OK_TYPE */ + +/* add_disk() returns int */ +/* #undef HAVE_ADD_DISK_RET */ + +/* Define if host toolchain supports AES */ +#define HAVE_AES 1 + +/* Define if you have [rt] */ +#define HAVE_AIO_H 1 + +#ifdef __amd64__ +#ifndef RESCUE +/* Define if host toolchain supports AVX */ +#define HAVE_AVX 1 +#endif + +/* Define if host toolchain supports AVX2 */ +#define HAVE_AVX2 1 + +/* Define if host toolchain supports AVX512BW */ +#define HAVE_AVX512BW 1 + +/* Define if host toolchain supports AVX512CD */ +#define HAVE_AVX512CD 1 + +/* Define if host toolchain supports AVX512DQ */ +#define HAVE_AVX512DQ 1 + +/* Define if host toolchain supports AVX512ER */ +#define HAVE_AVX512ER 1 + +/* Define if host toolchain supports AVX512F */ +#define HAVE_AVX512F 1 + +/* Define if host toolchain supports AVX512IFMA */ +#define HAVE_AVX512IFMA 1 + +/* Define if host toolchain supports AVX512PF */ +#define HAVE_AVX512PF 1 + +/* Define if host toolchain supports AVX512VBMI */ +#define HAVE_AVX512VBMI 1 + +/* Define if host toolchain supports AVX512VL */ +#define HAVE_AVX512VL 1 +#endif + +/* backtrace() is available */ +/* #undef HAVE_BACKTRACE */ + +/* bdevname() is available */ +/* #undef HAVE_BDEVNAME */ + +/* bdev_check_media_change() exists */ +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */ + +/* bdev_file_open_by_path() exists */ +/* #undef HAVE_BDEV_FILE_OPEN_BY_PATH */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_63 */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_OLD */ + +/* bdev_kobj() exists */ +/* #undef HAVE_BDEV_KOBJ */ + +/* bdev_max_discard_sectors() is available */ +/* #undef HAVE_BDEV_MAX_DISCARD_SECTORS */ + +/* bdev_max_secure_erase_sectors() is available */ +/* #undef HAVE_BDEV_MAX_SECURE_ERASE_SECTORS */ + +/* bdev_nr_bytes() is available */ +/* #undef HAVE_BDEV_NR_BYTES */ + +/* bdev_open_by_path() exists */ +/* #undef HAVE_BDEV_OPEN_BY_PATH */ + +/* bdev_release() exists */ +/* #undef HAVE_BDEV_RELEASE */ + +/* block_device_operations->submit_bio() returns void */ +/* #undef HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID */ + +/* bdev_whole() is available */ +/* #undef HAVE_BDEV_WHOLE */ + +/* bio_alloc() takes 4 arguments */ +/* #undef HAVE_BIO_ALLOC_4ARG */ + +/* bio->bi_bdev->bd_disk exists */ +/* #undef HAVE_BIO_BDEV_DISK */ + +/* bio_*_io_acct() available */ +/* #undef HAVE_BIO_IO_ACCT */ + +/* bio_max_segs() is implemented */ +/* #undef HAVE_BIO_MAX_SEGS */ + +/* bio_set_dev() GPL-only */ +/* #undef HAVE_BIO_SET_DEV_GPL_ONLY */ + +/* bio_set_dev() is a macro */ +/* #undef HAVE_BIO_SET_DEV_MACRO */ + +/* bio_set_op_attrs is available */ +/* #undef HAVE_BIO_SET_OP_ATTRS */ + +/* blkdev_get_by_path() exists and takes 4 args */ +/* #undef HAVE_BLKDEV_GET_BY_PATH_4ARG */ + +/* blkdev_get_by_path() handles ERESTARTSYS */ +/* #undef HAVE_BLKDEV_GET_ERESTARTSYS */ + +/* __blkdev_issue_discard(flags) is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_FLAGS */ + +/* __blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_NOFLAGS */ + +/* blkdev_issue_discard(flags) is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_FLAGS */ + +/* blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_NOFLAGS */ + +/* blkdev_issue_secure_erase() is available */ +/* #undef HAVE_BLKDEV_ISSUE_SECURE_ERASE */ + +/* blkdev_put() exists */ +/* #undef HAVE_BLKDEV_PUT */ + +/* blkdev_put() accepts void* as arg 2 */ +/* #undef HAVE_BLKDEV_PUT_HOLDER */ + +/* struct queue_limits has a features field */ +/* #undef HAVE_BLKDEV_QUEUE_LIMITS_FEATURES */ + +/* blkdev_reread_part() exists */ +/* #undef HAVE_BLKDEV_REREAD_PART */ + +/* blkg_tryget() is available */ +/* #undef HAVE_BLKG_TRYGET */ + +/* blkg_tryget() GPL-only */ +/* #undef HAVE_BLKG_TRYGET_GPL_ONLY */ + +/* blk_alloc_disk() exists */ +/* #undef HAVE_BLK_ALLOC_DISK */ + +/* blk_alloc_disk() exists and takes 2 args */ +/* #undef HAVE_BLK_ALLOC_DISK_2ARG */ + +/* blk_alloc_queue() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN */ + +/* blk_alloc_queue_rh() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH */ + +/* blk_cleanup_disk() exists */ +/* #undef HAVE_BLK_CLEANUP_DISK */ + +/* blk_mode_t is defined */ +/* #undef HAVE_BLK_MODE_T */ + +/* block multiqueue hardware context is cached in struct request */ +/* #undef HAVE_BLK_MQ_RQ_HCTX */ + +/* blk queue backing_dev_info is dynamic */ +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */ + +/* blk_queue_discard() is available */ +/* #undef HAVE_BLK_QUEUE_DISCARD */ + +/* backing_dev_info is available through queue gendisk */ +/* #undef HAVE_BLK_QUEUE_DISK_BDI */ + +/* blk_queue_secure_erase() is available */ +/* #undef HAVE_BLK_QUEUE_SECURE_ERASE */ + +/* blk_queue_update_readahead() exists */ +/* #undef HAVE_BLK_QUEUE_UPDATE_READAHEAD */ + +/* BLK_STS_RESV_CONFLICT is defined */ +/* #undef HAVE_BLK_STS_RESV_CONFLICT */ + +/* Define if release() in block_device_operations takes 1 arg */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG */ + +/* Define if revalidate_disk() in block_device_operations */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK */ + +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* check_disk_change() exists */ +/* #undef HAVE_CHECK_DISK_CHANGE */ + +/* copy_splice_read exists */ +/* #undef HAVE_COPY_SPLICE_READ */ + +/* cpu_has_feature() is GPL-only */ +/* #undef HAVE_CPU_HAS_FEATURE_GPL_ONLY */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* DECLARE_EVENT_CLASS() is available */ +/* #undef HAVE_DECLARE_EVENT_CLASS */ + +/* 3-arg dequeue_signal() takes a type argument */ +/* #undef HAVE_DEQUEUE_SIGNAL_3ARG_TYPE */ + +/* dequeue_signal() takes 4 arguments */ +/* #undef HAVE_DEQUEUE_SIGNAL_4ARG */ + +/* lookup_bdev() wants dev_t arg */ +/* #undef HAVE_DEVT_LOOKUP_BDEV */ + +/* disk_check_media_change() exists */ +/* #undef HAVE_DISK_CHECK_MEDIA_CHANGE */ + +/* disk_*_io_acct() available */ +/* #undef HAVE_DISK_IO_ACCT */ + +/* disk_update_readahead() exists */ +/* #undef HAVE_DISK_UPDATE_READAHEAD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* dops->d_revalidate() takes 4 args */ +/* #undef HAVE_D_REVALIDATE_4ARGS */ + +/* Define if d_set_d_op() is available */ +/* #undef HAVE_D_SET_D_OP */ + +/* Define to 1 if you have the 'execvpe' function. */ +#define HAVE_EXECVPE 1 + +/* fault_in_iov_iter_readable() is available */ +/* #undef HAVE_FAULT_IN_IOV_ITER_READABLE */ + +/* file->f_version exists */ +/* #undef HAVE_FILE_F_VERSION */ + +/* flush_dcache_page() is GPL-only */ +/* #undef HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY */ + +/* Define if compiler supports -Wformat-overflow */ +/* #undef HAVE_FORMAT_OVERFLOW */ + +/* fsync_bdev() is declared in include/blkdev.h */ +/* #undef HAVE_FSYNC_BDEV */ + +/* yes */ +/* #undef HAVE_GENERIC_FADVISE */ + +/* generic_fillattr requires struct mnt_idmap* */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP */ + +/* generic_fillattr requires struct mnt_idmap* and u32 request_mask */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP_REQMASK */ + +/* generic_fillattr requires struct user_namespace* */ +/* #undef HAVE_GENERIC_FILLATTR_USERNS */ + +/* generic_*_io_acct() 4 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_4ARG */ + +/* GENHD_FL_EXT_DEVT flag is available */ +/* #undef HAVE_GENHD_FL_EXT_DEVT */ + +/* GENHD_FL_NO_PART flag is available */ +/* #undef HAVE_GENHD_FL_NO_PART */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* Define to 1 if you have the 'gettid' function. */ +/* #undef HAVE_GETTID */ + +/* iops->get_acl() exists */ +/* #undef HAVE_GET_ACL */ + +/* iops->get_acl() takes rcu */ +/* #undef HAVE_GET_ACL_RCU */ + +/* has iops->get_inode_acl() */ +/* #undef HAVE_GET_INODE_ACL */ + +/* iattr->ia_vfsuid and iattr->ia_vfsgid exist */ +/* #undef HAVE_IATTR_VFSID */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* iops->getattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_GETATTR */ + +/* iops->setattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_SETATTR */ + +/* APIs for idmapped mount are present */ +/* #undef HAVE_IDMAP_MNT_API */ + +/* mnt_idmap does not have user_namespace */ +/* #undef HAVE_IDMAP_NO_USERNS */ + +/* Define if compiler supports -Wimplicit-fallthrough */ +/* #undef HAVE_IMPLICIT_FALLTHROUGH */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_INFINITE_RECURSION */ + +/* inode_get_atime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_ATIME */ + +/* inode_get_ctime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_CTIME */ + +/* inode_get_mtime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_MTIME */ + +/* inode_owner_or_capable() exists */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE */ + +/* inode_owner_or_capable() takes mnt_idmap */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_IDMAP */ + +/* inode_owner_or_capable() takes user_ns */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_USERNS */ + +/* inode_set_atime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_ATIME_TO_TS */ + +/* inode_set_ctime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_CTIME_TO_TS */ + +/* inode_set_mtime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_MTIME_TO_TS */ + +/* timestamp_truncate() exists */ +/* #undef HAVE_INODE_TIMESTAMP_TRUNCATE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* iops->create() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_CREATE_IDMAP */ + +/* iops->create() takes struct user_namespace* */ +/* #undef HAVE_IOPS_CREATE_USERNS */ + +/* iops->mkdir() returns struct dentry* */ +/* #undef HAVE_IOPS_MKDIR_DENTRY */ + +/* iops->mkdir() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKDIR_IDMAP */ + +/* iops->mkdir() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKDIR_USERNS */ + +/* iops->mknod() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKNOD_IDMAP */ + +/* iops->mknod() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKNOD_USERNS */ + +/* iops->permission() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_PERMISSION_IDMAP */ + +/* iops->permission() takes struct user_namespace* */ +/* #undef HAVE_IOPS_PERMISSION_USERNS */ + +/* iops->rename() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_RENAME_IDMAP */ + +/* iops->rename() takes struct user_namespace* */ +/* #undef HAVE_IOPS_RENAME_USERNS */ + +/* iops->symlink() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_SYMLINK_IDMAP */ + +/* iops->symlink() takes struct user_namespace* */ +/* #undef HAVE_IOPS_SYMLINK_USERNS */ + +/* iov_iter_get_pages2() is available */ +/* #undef HAVE_IOV_ITER_GET_PAGES2 */ + +/* iov_iter_type() is available */ +/* #undef HAVE_IOV_ITER_TYPE */ + +/* Define to 1 if you have the 'issetugid' function. */ +#define HAVE_ISSETUGID 1 + +/* iter_iov() is available */ +/* #undef HAVE_ITER_IOV */ + +/* iter_is_ubuf() is available */ +/* #undef HAVE_ITER_IS_UBUF */ + +/* kernel has kernel_fpu_* functions */ +/* #undef HAVE_KERNEL_FPU */ + +/* kernel has asm/fpu/api.h */ +/* #undef HAVE_KERNEL_FPU_API_HEADER */ + +/* kernel fpu internal */ +/* #undef HAVE_KERNEL_FPU_INTERNAL */ + +/* kernel has asm/fpu/internal.h */ +/* #undef HAVE_KERNEL_FPU_INTERNAL_HEADER */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_KERNEL_INFINITE_RECURSION */ + +/* kernel defines intptr_t */ +/* #undef HAVE_KERNEL_INTPTR_T */ + +/* kernel has kernel_neon_* functions */ +/* #undef HAVE_KERNEL_NEON */ + +/* kernel does stack verification */ +/* #undef HAVE_KERNEL_OBJTOOL */ + +/* kernel has linux/objtool.h */ +/* #undef HAVE_KERNEL_OBJTOOL_HEADER */ + +/* strlcpy() exists */ +/* #undef HAVE_KERNEL_STRLCPY */ + +/* kernel has kmap_local_page */ +/* #undef HAVE_KMAP_LOCAL_PAGE */ + +/* Define if you have [aio] */ +/* #undef HAVE_LIBAIO */ + +/* Define if you have [blkid] */ +/* #undef HAVE_LIBBLKID */ + +/* Define if you have [crypto] */ +#define HAVE_LIBCRYPTO 1 + +/* Define if you have [tirpc] */ +/* #undef HAVE_LIBTIRPC */ + +/* Define if you have [udev] */ +/* #undef HAVE_LIBUDEV */ + +/* Define if you have [unwind] */ +/* #undef HAVE_LIBUNWIND */ + +/* libunwind has unw_get_elf_filename */ +/* #undef HAVE_LIBUNWIND_ELF */ + +/* Define if you have [uuid] */ +/* #undef HAVE_LIBUUID */ + +/* building against unsupported kernel version */ +/* #undef HAVE_LINUX_EXPERIMENTAL */ + +/* makedev() is declared in sys/mkdev.h */ +/* #undef HAVE_MAKEDEV_IN_MKDEV */ + +/* makedev() is declared in sys/sysmacros.h */ +/* #undef HAVE_MAKEDEV_IN_SYSMACROS */ + +/* Noting that make_request_fn() returns blk_qc_t */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_QC */ + +/* Define to 1 if you have the 'mlockall' function. */ +#define HAVE_MLOCKALL 1 + +/* PG_error flag is available */ +/* #undef HAVE_MM_PAGE_FLAG_ERROR */ + +/* page_mapping() is available */ +/* #undef HAVE_MM_PAGE_MAPPING */ + +/* page_size() is available */ +/* #undef HAVE_MM_PAGE_SIZE */ + +/* Define if host toolchain supports MOVBE */ +#define HAVE_MOVBE 1 + +/* folio_wait_bit() exists */ +/* #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT */ + +/* readahead_page() exists */ +/* #undef HAVE_PAGEMAP_READAHEAD_PAGE */ + +/* part_to_dev() exists */ +/* #undef HAVE_PART_TO_DEV */ + +/* iops->getattr() takes a path */ +/* #undef HAVE_PATH_IOPS_GETATTR */ + +/* Define if host toolchain supports PCLMULQDQ */ +#define HAVE_PCLMULQDQ 1 + +/* pin_user_pages_unlocked() is available */ +/* #undef HAVE_PIN_USER_PAGES_UNLOCKED */ + +/* proc_handler ctl_table arg is const */ +/* #undef HAVE_PROC_HANDLER_CTL_TABLE_CONST */ + +/* proc_ops structure exists */ +/* #undef HAVE_PROC_OPS_STRUCT */ + +/* If available, contains the Python version number currently in use. */ +/* #undef HAVE_PYTHON */ + +/* qat is enabled and existed */ +/* #undef HAVE_QAT */ + +/* struct reclaim_state has reclaimed */ +/* #undef HAVE_RECLAIM_STATE_RECLAIMED */ + +/* register_shrinker is vararg */ +/* #undef HAVE_REGISTER_SHRINKER_VARARG */ + +/* register_sysctl_sz exists */ +/* #undef HAVE_REGISTER_SYSCTL_SZ */ + +/* register_sysctl_table exists */ +/* #undef HAVE_REGISTER_SYSCTL_TABLE */ + +/* iops->rename() wants flags */ +/* #undef HAVE_RENAME_WANTS_FLAGS */ + +/* revalidate_disk() is available */ +/* #undef HAVE_REVALIDATE_DISK */ + +/* revalidate_disk_size() is available */ +/* #undef HAVE_REVALIDATE_DISK_SIZE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SECURITY_PAM_MODULES_H 1 + +/* setattr_prepare() accepts mnt_idmap */ +/* #undef HAVE_SETATTR_PREPARE_IDMAP */ + +/* setattr_prepare() is available, doesn't accept user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_NO_USERNS */ + +/* setattr_prepare() accepts user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_USERNS */ + +/* iops->set_acl() takes 4 args, arg1 is struct mnt_idmap * */ +/* #undef HAVE_SET_ACL_IDMAP_DENTRY */ + +/* iops->set_acl() takes 4 args */ +/* #undef HAVE_SET_ACL_USERNS */ + +/* iops->set_acl() takes 4 args, arg2 is struct dentry * */ +/* #undef HAVE_SET_ACL_USERNS_DENTRY_ARG2 */ + +/* Define if set_default_d_op() is available */ +/* #undef HAVE_SET_DEFAULT_D_OP */ + +/* shrinker_register exists */ +/* #undef HAVE_SHRINKER_REGISTER */ + +/* kernel_siginfo_t exists */ +/* #undef HAVE_SIGINFO */ + +/* sops->free_inode() exists */ +/* #undef HAVE_SOPS_FREE_INODE */ + +#if defined(__amd64__) || defined(__i386__) +/* Define if host toolchain supports SSE */ +#define HAVE_SSE 1 + +/* Define if host toolchain supports SSE2 */ +#define HAVE_SSE2 1 + +/* Define if host toolchain supports SSE3 */ +#define HAVE_SSE3 1 + +/* Define if host toolchain supports SSE4.1 */ +#define HAVE_SSE4_1 1 + +/* Define if host toolchain supports SSE4.2 */ +#define HAVE_SSE4_2 1 + +/* Define if host toolchain supports SSSE3 */ +#define HAVE_SSSE3 1 +#endif + +/* STACK_FRAME_NON_STANDARD is defined */ +/* #undef HAVE_STACK_FRAME_NON_STANDARD */ + +/* STACK_FRAME_NON_STANDARD asm macro is defined */ +/* #undef HAVE_STACK_FRAME_NON_STANDARD_ASM */ + +/* standalone exists */ +/* #undef HAVE_STANDALONE_LINUX_STDARG */ + +/* statx() is available */ +/* #undef HAVE_STATX */ + +/* STATX_MNT_ID is available */ +/* #undef HAVE_STATX_MNT_ID */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the 'strlcat' function. */ +#define HAVE_STRLCAT 1 + +/* Define to 1 if you have the 'strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* submit_bio is member of struct block_device_operations */ +/* #undef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */ + +/* have super_block s_shrink */ +/* #undef HAVE_SUPER_BLOCK_S_SHRINK */ + +/* have super_block s_shrink pointer */ +/* #undef HAVE_SUPER_BLOCK_S_SHRINK_PTR */ + +/* have super_block s_wb_err */ +/* #undef HAVE_SUPER_BLOCK_S_WB_ERR */ + +/* sync_blockdev() is declared in include/blkdev.h */ +/* #undef HAVE_SYNC_BLOCKDEV */ + +/* struct kobj_type has default_groups */ +/* #undef HAVE_SYSFS_DEFAULT_GROUPS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* timer_delete_sync is available */ +/* #undef HAVE_TIMER_DELETE_SYNC */ + +/* i_op->tmpfile() uses old dentry signature */ +/* #undef HAVE_TMPFILE_DENTRY */ + +/* i_op->tmpfile() has mnt_idmap */ +/* #undef HAVE_TMPFILE_IDMAP */ + +/* i_op->tmpfile() has userns */ +/* #undef HAVE_TMPFILE_USERNS */ + +/* totalhigh_pages() exists */ +/* #undef HAVE_TOTALHIGH_PAGES */ + +/* kernel has totalram_pages() */ +/* #undef HAVE_TOTALRAM_PAGES_FUNC */ + +/* Define to 1 if you have the 'udev_device_get_is_initialized' function. */ +/* #undef HAVE_UDEV_DEVICE_GET_IS_INITIALIZED */ + +/* kernel has __kernel_fpu_* functions */ +/* #undef HAVE_UNDERSCORE_KERNEL_FPU */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* iops->getattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_GETATTR */ + +/* iops->setattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_SETATTR */ + +#ifdef __amd64__ +/* Define if host toolchain supports VAES */ +#define HAVE_VAES 1 +#endif + +/* fops->clone_file_range() is available */ +/* #undef HAVE_VFS_CLONE_FILE_RANGE */ + +/* fops->dedupe_file_range() is available */ +/* #undef HAVE_VFS_DEDUPE_FILE_RANGE */ + +/* filemap_dirty_folio exists */ +/* #undef HAVE_VFS_FILEMAP_DIRTY_FOLIO */ + +/* generic_copy_file_range() is available */ +/* #undef HAVE_VFS_GENERIC_COPY_FILE_RANGE */ + +/* migratepage exists */ +/* #undef HAVE_VFS_MIGRATEPAGE */ + +/* migrate_folio exists */ +/* #undef HAVE_VFS_MIGRATE_FOLIO */ + +/* address_space_operations->readpages exists */ +/* #undef HAVE_VFS_READPAGES */ + +/* read_folio exists */ +/* #undef HAVE_VFS_READ_FOLIO */ + +/* fops->remap_file_range() is available */ +/* #undef HAVE_VFS_REMAP_FILE_RANGE */ + +/* __set_page_dirty_nobuffers exists */ +/* #undef HAVE_VFS_SET_PAGE_DIRTY_NOBUFFERS */ + +/* splice_copy_file_range() is available */ +/* #undef HAVE_VFS_SPLICE_COPY_FILE_RANGE */ + +/* address_space_operations->writepage exists */ +/* #undef HAVE_VFS_WRITEPAGE */ + +/* __vmalloc page flags exists */ +/* #undef HAVE_VMALLOC_PAGE_KERNEL */ + +#ifdef __amd64__ +/* Define if host toolchain supports VPCLMULQDQ */ +#define HAVE_VPCLMULQDQ 1 +#endif + +/* int (*writepage_t)() takes struct folio* */ +/* #undef HAVE_WRITEPAGE_T_FOLIO */ + +/* xattr_handler->get() wants dentry and inode and flags */ +/* #undef HAVE_XATTR_GET_DENTRY_INODE_FLAGS */ + +/* xattr_handler->set() wants both dentry and inode */ +/* #undef HAVE_XATTR_SET_DENTRY_INODE */ + +/* xattr_handler->set() takes mnt_idmap */ +/* #undef HAVE_XATTR_SET_IDMAP */ + +/* xattr_handler->set() takes user_namespace */ +/* #undef HAVE_XATTR_SET_USERNS */ + +/* Define if host toolchain supports XSAVE */ +#define HAVE_XSAVE 1 + +/* Define if host toolchain supports XSAVEOPT */ +#define HAVE_XSAVEOPT 1 + +/* Define if host toolchain supports XSAVES */ +#define HAVE_XSAVES 1 + +/* ZERO_PAGE() is GPL-only */ +/* #undef HAVE_ZERO_PAGE_GPL_ONLY */ + +/* Define if you have [z] */ +#define HAVE_ZLIB 1 + +/* libunwind is llvm libunwind */ +/* #undef IS_LIBUNWIND_LLVM */ + +/* kernel exports FPU functions */ +/* #undef KERNEL_EXPORTS_X86_FPU */ + +/* TBD: fetch(3) support */ +#if 0 +/* whether the chosen libfetch is to be loaded at run-time */ +#define LIBFETCH_DYNAMIC 1 + +/* libfetch is fetch(3) */ +#define LIBFETCH_IS_FETCH 1 + +/* libfetch is libcurl */ +#define LIBFETCH_IS_LIBCURL 0 + +/* soname of chosen libfetch */ +#define LIBFETCH_SONAME "libfetch.so.6" +#endif + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* make_request_fn() return type */ +/* #undef MAKE_REQUEST_FN_RET */ + +/* using complete_and_exit() instead */ +/* #undef SPL_KTHREAD_COMPLETE_AND_EXIT */ + +/* Defined for legacy compatibility. */ +#define SPL_META_ALIAS ZFS_META_ALIAS + +/* Defined for legacy compatibility. */ +#define SPL_META_RELEASE ZFS_META_RELEASE + +/* Defined for legacy compatibility. */ +#define SPL_META_VERSION ZFS_META_VERSION + +/* pde_data() is PDE_DATA() */ +/* #undef SPL_PDE_DATA */ + +/* Define to 1 if all of the C89 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#define SYSTEM_FREEBSD 1 + +/* True if ZFS is to be compiled for a Linux system */ +/* #undef SYSTEM_LINUX */ + +/* Version number of package */ +/* #undef ZFS_DEBUG */ *** 53 LINES SKIPPED *** From nobody Sun Oct 5 09:53:16 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cfd5667Jzz69Py5; Sun, 05 Oct 2025 09:53:30 +0000 (UTC) (envelope-from kp@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 4cfd565QNjz3Qrl; Sun, 05 Oct 2025 09:53:30 +0000 (UTC) (envelope-from kp@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759658010; h=from:from:reply-to:subject:subject: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=Mj5Oehtj65OeZgACfM1wTxgl9j3FuJZZR5RYPqMD1Fo=; b=lYyVM/qsGykprNAkuX2Mx9nui2Mv+GIbBu8qm7+TeQ0wODxcyyPcElWCi8LADWsFXhlYkN galP8Iz0WC883/7+TDs8E4ErahrG3ylmovOPtAXXM1pE3ZvCmF8NLmB2it814G/DVXz0m3 hpuKnHDwSRZvCzbiDdGQ9oW0DflMCl4UUULu8B1D+GtaHoaf8GWal/ycE7O3+QlwrHPkGo as61UXw4vOyyHzKLyw6Nw2+Osx4QEjbRyZfAZyaOxEf1/d3E2qIKiBf/VU5yVFX0aMKBkV SwCO+JyCweHVv/b0fMvZeIALDTIcapaeYT9pkVL8iB3uMtC9rQML8z2B+qSwhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759658010; h=from:from:reply-to:subject:subject: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=Mj5Oehtj65OeZgACfM1wTxgl9j3FuJZZR5RYPqMD1Fo=; b=HO6S0lqOtZagbvCATsJ/s7P9+ORFqMwE9FkTQ8YcpLlDtHwF3PrdXXCTSmfkHfZUJGqidj QHo5KpXg+u8rVr3YZsygUQMWMTQlNVkkyCKNSpeJitVKCKRgsLewHI1E99w70lSuYXSNBU SggDwKo4QsBB0Mqzpp0Bgcfvd813mxiWzH5vbFBsg2GffZ9Mtw5otCF3u0Mjxl2nREDDxO MM4bfHH4+csZ5bJBv+Zk8/yHEwVq/v7HqOzasqVJNzcHYjTk3Z/onHrcO8hc15j8jtQyll /zH4CtDQzCHXDj9wKZ5RDKgTvUDCvzKcco5btR8XCdVXyjITCAhAaTiQFFoIMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759658010; a=rsa-sha256; cv=none; b=uz3RXd/e529iO4LcJe8TDsW1pCvxt1olcveAjyjS/B8wMRXJ9CLPR+qYC3n+YtVWvm4iN+ yVeytde41yuHkN9kRiyOu6dxf8nqoZvZ6DdbF+hMccXeLGxlZg9VdaQ0j34belf3QHkTlx jK/JUouZEnTQcLXYsxEBjEwj20q2A15invQ26l6k3UBuzgr3B02QFvkvMaP71qI00AQsHE w0dsiSASHZdf/aXVSwXR7Q7BCFfyjLFBrt0vkD3rqpeC0i3z5F1eFihgFzwqz2Jb5uct5J PG1tSEZquOXqD5BKvjwolThjjy1B5qPr1qDM1EyWJvp9MbpN8W/XvQrC3rpJxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R11" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cfd563WXJzWg; Sun, 05 Oct 2025 09:53:30 +0000 (UTC) (envelope-from kp@freebsd.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 9022518B21; Sun, 05 Oct 2025 11:53:27 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Kristof Provost 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 (1.0) Subject: Re: svn commit: r256519 - in head/sys: net netatalk netinet netinet6 netipx Date: Sun, 5 Oct 2025 11:53:16 +0200 Message-Id: References: Cc: Zhenlei Huang , Mateusz Guzik , Gleb Smirnoff , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org In-Reply-To: To: "Bjoern A. Zeeb" X-Mailer: iPhone Mail (23A355) > On 4 Oct 2025, at 18:13, Bjoern A. Zeeb wrote: >=20 > =EF=BB=BFOn Tue, 30 Sep 2025, Zhenlei Huang wrote: >=20 >>>> On Sep 30, 2025, at 10:59 AM, Mateusz Guzik wrote: >>>=20 >>> On Tue, Sep 30, 2025 at 4:38=E2=80=AFAM Zhenlei Huang > wrote: >>>>=20 >>>>=20 >>>>=20 >>>>> On Sep 29, 2025, at 10:29 PM, Mateusz Guzik wrote:= >>>>>=20 >>>>> On Tue, Oct 15, 2013 at 12:31=E2=80=AFPM Gleb Smirnoff wrote: >>>>>>=20 >>>>>> Author: glebius >>>>>> Date: Tue Oct 15 10:31:42 2013 >>>>>> New Revision: 256519 >>>>>> URL: http://svnweb.freebsd.org/changeset/base/256519 >>>>>>=20 >>>>>> Log: >>>>>> Remove ifa_init() and provide ifa_alloc() that will allocate and set= up >>>>>> struct ifaddr internally. >>>>>>=20 >>>>>> Sponsored by: Netflix >>>>>> Sponsored by: Nginx, Inc. >>>>>>=20 >>>>>> Modified: >>>>>> head/sys/net/if.c >>>>>> head/sys/net/if_var.h >>>>>> head/sys/netatalk/at_control.c >>>>>> head/sys/netinet/in.c >>>>>> head/sys/netinet6/in6.c >>>>>> head/sys/netipx/ipx.c >>>>>>=20 >>>>>> Modified: head/sys/net/if.c >>>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>>>>> --- head/sys/net/if.c Tue Oct 15 10:19:24 2013 (r256518) >>>>>> +++ head/sys/net/if.c Tue Oct 15 10:31:42 2013 (r256519) >>>>>> @@ -633,8 +633,7 @@ if_attach_internal(struct ifnet *ifp, in >>>>>> socksize =3D sizeof(*sdl); >>>>>> socksize =3D roundup2(socksize, sizeof(long)); >>>>>> ifasize =3D sizeof(*ifa) + 2 * socksize; >>>>>> - ifa =3D malloc(ifasize, M_IFADDR, M_WAITOK | M_ZERO);= >>>>>> - ifa_init(ifa); >>>>>> + ifa =3D ifa_alloc(ifasize, M_WAITOK); >>>>>> sdl =3D (struct sockaddr_dl *)(ifa + 1); >>>>>> sdl->sdl_len =3D socksize; >>>>>> sdl->sdl_family =3D AF_LINK; >>>>>> @@ -1417,13 +1416,23 @@ if_maddr_runlock(struct ifnet *ifp) >>>>>> /* >>>>>> * Initialization, destruction and refcounting functions for ifaddrs. >>>>>> */ >>>>>> -void >>>>>> -ifa_init(struct ifaddr *ifa) >>>>>> +struct ifaddr * >>>>>> +ifa_alloc(size_t size, int flags) >>>>>> { >>>>>> + struct ifaddr *ifa; >>>>>> + >>>>>> + KASSERT(size >=3D sizeof(struct ifaddr), >>>>>> + ("%s: invalid size %zu", __func__, size)); >>>>>> + >>>>>=20 >>>>> We have crashes stemming from this: >>>>>=20 >>>>> panic: ifa_alloc: invalid size 16 >>>>>=20 >>>>> panic() at panic+0x43/frame 0xfffffe009e777760 >>>>> ifa_alloc() at ifa_alloc+0xd6/frame 0xfffffe009e777780 >>>>> in6_ifadd() at in6_ifadd+0xd8/frame 0xfffffe009e7778a0 >>>>> nd6_ra_input() at nd6_ra_input+0x1023/frame 0xfffffe009e777a80 >>>>> icmp6_input() at icmp6_input+0x5b6/frame 0xfffffe009e777c00 >>>>> ip6_input() at ip6_input+0xc94/frame 0xfffffe009e777ce0 >>>>> sppp_input() at sppp_input+0x502/frame 0xfffffe009e777d70 >>>>> pppoe_data_input() at pppoe_data_input+0x1e7/frame 0xfffffe009e777de0 >>>>> swi_net() at swi_net+0x19b/frame 0xfffffe009e777e60 >>>>> ithread_loop() at ithread_loop+0x266/frame 0xfffffe009e777ef0 >>>>> fork_exit() at fork_exit+0x82/frame 0xfffffe009e777f30 >>>>> fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe009e777f30 >>>>>=20 >>>>> in6_ifadd has: >>>>> struct in6_addr taddr; >>>>> ifa =3D ifa_alloc(sizeof(taddr), M_WAITOK); >>>>>=20 >>>>> should the assert be simply removed? >>>>=20 >>>> Hi Mateusz, >>>>=20 >>>> I believe you just found a bug. >>>>=20 >>>> Try the following patch please, >>>>=20 >>>> --- a/sys/netinet6/nd6_rtr.c >>>> +++ b/sys/netinet6/nd6_rtr.c >>>> @@ -1243,8 +1243,7 @@ in6_ifadd(struct nd_prefixctl *pr, int mcast) >>>>=20 >>>> /* No suitable LL address, get the ifid directly */ >>>> if (ifid_addr =3D=3D NULL) { >>>> - struct in6_addr taddr; >>>> - ifa =3D ifa_alloc(sizeof(taddr), M_WAITOK); >>>> + ifa =3D ifa_alloc(sizeof(struct in6_ifaddr), M_= WAITOK); >>>> if (ifa) { >>>> ib =3D (struct in6_ifaddr *)ifa; >>>> ifid_addr =3D &ib->ia_addr.sin6_addr; >>>>=20 >>>=20 >>> Thanks for the patch. I don't have means to readily test it. >>>=20 >>> This panic was getting in the way of looking at another panic so I did >>> not pay much attention. >>>=20 >>> But now that you point this out, I don't think the patch is sufficient. >>>=20 >>> in6_get_ifid starts with NET_EPOCH_ASSERT. >>>=20 >>> At the same time malloc(..., M_WAITOK) is illegal to call from an epoch s= ection. >>=20 >> So M_NOWAIT should be used, instead of M_WAITOK . >>=20 >>>=20 >>> I don't know if in6_ifadd is called within net epoch, either way the >>> above two are clearly contradictory. >>>=20 >>> Is there are a reason to malloc this in the first place? >>=20 >> I have not look into the code throughly. That was introduced via commit h= ttps://cgit.freebsd.org/src/commit/?id=3D9e792f7ef7298080c058fbc2d36a4e60e59= 6dae9 . >>=20 >> See https://reviews.freebsd.org/D51778 for more context. >=20 > Wait, so first the bug came in on a controversial chnage to which multiple= > FreeBSD people said they were not sure what it is good for and then we > get panic reports from the same source about their own code? >=20 > I think it is time to backout the original at this point.=20 This panic is already fixed, and I added a test case to exercise (and illust= rate) the relevant code path.=20 At this point I see no reason to revert, especially as the revert is non-tri= vial. As discussed with secteam as well.=20 =E2=80=94=20 Kristof= From nobody Sun Oct 5 14:26: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 4cfl8251fSz6B2JX; Sun, 05 Oct 2025 14:26: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 4cfl824VP6z43vw; Sun, 05 Oct 2025 14:26:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759674386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E7zAkqSojL9pc60fzTERQJ8Z3cPUy7cKeKrIyWFSw3M=; b=oRgxpBPFJHJA2OA4s8rnxN94S1MAsbgnG3It6qVvQirJDsUCFMillMBf829BkaGXKnE2ly 0WGO8yFz1cIXIkZ2VyoNpAZX5WTFYBiMbd7AB+PVyKHxg1eq8nGmlitpXTfkSwSEeZfXXl 7ChaXslJ9+KhCNpU4Jw4/JL9ZWBpA5Qb0qhXh9xvzQhtNWfvG+04uaMX1n8bkj/fHpHxfb 48JUtpun7q9aksNeklXTocFyOCkkYe8jmZsQAdkrrkyFgXJZf+vyqK9RjwhlcMYeoIBKoX bzAOVtxkDyBvRPKXmSzICg6uEoF+qR0B7d9mgYGvTqVvhKj1fcc0FTDa0hljbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759674386; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E7zAkqSojL9pc60fzTERQJ8Z3cPUy7cKeKrIyWFSw3M=; b=ZsiZ/rL+PETWaukexQFxcNV4mlgxKRJvHP3B8GkuxB2iV0LW6n7QymQtN2wZoHrYpZAQq2 4KZqUQpiEAKg7yWOaoxv0vSI8sPy+65eW8o9CFZiNA2SbQDYZU7u4k8B580hegrmptaP7m 37zFxEIcNQKJQl2j72hTXZbG4LwmCik4RNYnR0LFW79WXTt69Z7ge8DDRmdrqKvag/Ql3A LOCO8F9bn6OAy2EQ3kWofQrKgc3T5IvkCRNtzVOPOn9n02T2rbGPU8fg7ErED1aU9WAylA unig5R/4bNS3WiHvjcHYopfvp8UqgljMF7tbX+OrI4cUyqLj+1/nIQopSk67QQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759674386; a=rsa-sha256; cv=none; b=l2vzZjM7Gb+AblitvUrcadc1f1trGV6uw2h7ppEH1Gts2I1MuhAZq/YB0+zcYnq5ZUnJLG q81ZLiy++TxX3X5DdUx3ythAS5UdU2NesVi3eDmODQsMs8yUZsB5Z4upBCU3Nj/BRIWDFp VioPF6POWTFp0GcRKWS3qyh1tjsUOn7chdcBzHyXX5N1/N6nrGVLjX4fV7J9DlDGYifMqs u4NjT8ACH+FMMFw2kNLd/gIaItdCBRYfdlek9OIjON0tAX2sZHOnIiqSgY5roDZ3y4NW7t CpyuxAiSQDelH0cVQaNX/VvuPf/iHLd1qmZF0M3sFPGoOjtj3MLhJrDYeZBoOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cfl823cMgz1mS; Sun, 05 Oct 2025 14:26:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 595EQQaf008287; Sun, 5 Oct 2025 14:26:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 595EQQH2008284; Sun, 5 Oct 2025 14:26:26 GMT (envelope-from git) Date: Sun, 5 Oct 2025 14:26:26 GMT Message-Id: <202510051426.595EQQH2008284@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 28b858f5059c - main - Makefile.inc1: Remove svn support List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 28b858f5059c8b25fa08be494699997000fce58c Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=28b858f5059c8b25fa08be494699997000fce58c commit 28b858f5059c8b25fa08be494699997000fce58c Author: Warner Losh AuthorDate: 2025-10-05 14:25:06 +0000 Commit: Warner Losh CommitDate: 2025-10-05 14:25:06 +0000 Makefile.inc1: Remove svn support We don't need this, and we don't use this. It's left over from the svn days. We stopped supporting svn as a project entirely when 12.x went EOL. And VCS_REVSION isn't in any current ucl file or anywhere else in the tree. Sponsored by: Netflix Reviewed by : kevans, brd Differential Revision: https://reviews.freebsd.org/D52912 --- Makefile.inc1 | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index a75e5c760cdc..e508ffa88d4b 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -522,27 +522,6 @@ BUILDENV_SHELL?=${SHELL} BUILDENV_SHELL?=/bin/sh .endif -.if !defined(_MKSHOWCONFIG) -.if !defined(VCS_REVISION) || empty(VCS_REVISION) -.if !defined(SVNVERSION_CMD) || empty(SVNVERSION_CMD) -. for _D in ${PATH:S,:, ,g} -. if exists(${_D}/svnversion) -SVNVERSION_CMD?=${_D}/svnversion -. endif -. if exists(${_D}/svnliteversion) -SVNVERSION_CMD?=${_D}/svnliteversion -. endif -. endfor -.endif -.if defined(SVNVERSION_CMD) && !empty(SVNVERSION_CMD) -_VCS_REVISION?= $$(eval ${SVNVERSION_CMD} ${SRCDIR}) -. if !empty(_VCS_REVISION) -VCS_REVISION= $$(echo r${_VCS_REVISION}) -.export VCS_REVISION -. endif -.endif -.endif - .if !defined(GIT_CMD) || empty(GIT_CMD) . for _P in /usr/bin /usr/local/bin . if exists(${_P}/git) @@ -2225,9 +2204,6 @@ create-world-package-${pkgname}: .PHONY /^name/ { printf("===> Creating %s-", $$2); next } \ /^version/ { print $$2; next } \ ' ${WSTAGEDIR}/${pkgname}.ucl - @if [ "${pkgname}" == "runtime" ]; then \ - sed -i '' -e "s/%VCS_REVISION%/${VCS_REVISION}/" ${WSTAGEDIR}/${pkgname}.ucl ; \ - fi ${PKG_CMD} -o ABI=${PKG_ABI} -o ALLOW_BASE_SHLIBS=yes \ -o OSVERSION="${SRCRELDATE}" \ create -f ${PKG_FORMAT} ${PKG_CLEVEL} \ From nobody Sun Oct 5 15:14:50 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cfmCv18KDz6B7MH; Sun, 05 Oct 2025 15:14:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cfmCv0c6yz47l1; Sun, 05 Oct 2025 15:14:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759677291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PouKPGs4kUo4gN3msLcZeYW8+dRTqTll3RLmZV+XzBE=; b=BJDPV22VG9c3K3g6v5LXSLGS0lH1GOGdpMsCUzJ+RP0c2C2ufPn42JDJlONDdMHF8cO5zM GalIq55dshLCWJjkfXz+Rtyy/dIvJnYLIzdUKnXExk+obf/LZwGZDWNc+yTdu0SDzpcleI /7WZb7uDamErhqoF71dPq6kGVszFrv/v8ASU5GgON2qbIHryTx7NX5uD6MyGcS5FHMA+T7 IpUb9fR/iMR0dhBtCOSsEYcD8/wuWcS9v3FYKUmhgcV9N26YZ7kCGIaOgorMFPsW7NPIae sTiuyKf8PbisVWWtGPSHRccAl+RgJLEihpDZhRMSyCFe6iMGAwEaBYLPDPhrVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759677291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PouKPGs4kUo4gN3msLcZeYW8+dRTqTll3RLmZV+XzBE=; b=aQzGIINwLs1li9hp4F5NCMH6Yy3YTfYPylNGUOmAd1fFEHFKUt/CGX6Sy+bCFtVqF2cNUG IyS64xlAMAHYuEczkbW1bMIAh55MPkTLs+gPKO2+lFG6XUShcthXdFEpceM61pVqt9MqAl h6Wb53sPJuHmIEpM5sEjzDtMn0Uiz2o+ilWroigTa55winwb8SMXHVi5qo8N/ey5wwYVM/ buam9MbCWuXXzQjfGWfsaEv/sYyejM2RtnzjIaPmim82znUDPor/h1YMEdWvgmv8zsq/mp HFb0kZOEGnf30xQ/oz9+hWu4Zqcxok+aOXrhj+2/xvCPiabcAjfyY2bZntUuEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759677291; a=rsa-sha256; cv=none; b=voU3TkF2n6fTNUKxZNQalCZl8fd8vvl3f71LDQNtD7PYZpOiQkwW2YkvxvbiJxV7i0md/o mxjZr7cczFFwmSi4hqQTiBHgtGQ1W2LiNHSs4/M/HZ9Z1EhwdiBYw0h347r6MUkX5cJUsz V1hrBXcui4dljD7v4FI1ZYUu9ne16oMchNVeW7bYFjbox19JRl5Zg9OmuK0qHeEo9e2Ayo dGRH0F3CkgudoSaOGAkraDQJXDA43EGyWLivSSqgytrgNZCEpp9BAm4MkY7sD8q+Oq4Rk6 huYmuss/J/m9vBkmwRWtuZoYKnFeA28lLhFbQIx03sWyQHRrya7cRNYKMUqzbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cfmCt71jyz3HY; Sun, 05 Oct 2025 15:14:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 595FEoDX002787; Sun, 5 Oct 2025 15:14:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 595FEoC3002784; Sun, 5 Oct 2025 15:14:50 GMT (envelope-from git) Date: Sun, 5 Oct 2025 15:14:50 GMT Message-Id: <202510051514.595FEoC3002784@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 106951f09fe3 - main - Makefile.inc1: Add back missing if List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 106951f09fe39dc693fd7130ab4bc751e1438631 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=106951f09fe39dc693fd7130ab4bc751e1438631 commit 106951f09fe39dc693fd7130ab4bc751e1438631 Author: Warner Losh AuthorDate: 2025-10-05 15:11:29 +0000 Commit: Warner Losh CommitDate: 2025-10-05 15:11:29 +0000 Makefile.inc1: Add back missing if The .if defined(_MKSHOWCONFIG) covered an unusually large area, so it should have not been removed in the last commit. I must have tested in the wrong tree before pushing... FixeS: 28b858f5059c Sponsored by: Netflix --- Makefile.inc1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile.inc1 b/Makefile.inc1 index e508ffa88d4b..6ace6a6b5eaf 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -522,6 +522,8 @@ BUILDENV_SHELL?=${SHELL} BUILDENV_SHELL?=/bin/sh .endif +.if !defined(_MKSHOWCONFIG) + .if !defined(GIT_CMD) || empty(GIT_CMD) . for _P in /usr/bin /usr/local/bin . if exists(${_P}/git) @@ -582,6 +584,7 @@ EXTRA_REVISION= p${_BRANCH:C/.*-p([0-9]+$)/\1/} .if !defined(PKG_VERSION) PKG_VERSION:= ${_PKG_REVISION}${EXTRA_REVISION:C/[[:space:]]//g} .endif + .endif # !defined(_MKSHOWCONFIG) .if make(*package*) From nobody Sun Oct 5 15:54:06 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cfn5C0VYkz6BCb2; Sun, 05 Oct 2025 15:54:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cfn5B62jTz3Frw; Sun, 05 Oct 2025 15:54:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759679646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bZWTZtXjsuzjWXaizQuJuKO0bCLqDi05Njh9lbyk5+Q=; b=V0aNHV6gMD9ChtGfyLvAbqxlneX52tH+fK/S0J0jg5fgEPnszHpu6iG8nUvGB8tb7u8Emt bjrq3BrFjf+HBVUWfrtaa26T+5mVfE9WsDmyzrxO1DPFPilIImD2wwoXaLvHxHyFk7Ahvg RMvJMJAQRZoiungh1qO2qKl43NX4mvk5J6Bsjo5pbPCxdlwUYrA5GC/4YTobefdgsGXb80 vqZsqCihT9/3oLksUEZGUp+06XXZ4qU+AopzUjkypDB2aPzXeUI6PpnSyfIovn9ku3st+z hgl8QXd+NHpTBdq9aFKYYFm1Kv47FsjGV/NBXGNPgVmLsWlFXyucYwyrt0FZPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759679646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bZWTZtXjsuzjWXaizQuJuKO0bCLqDi05Njh9lbyk5+Q=; b=hLubWn6bsdqXvPiPL62TPW9GxHkWDJ/kVpGSa1up+6VXC9lmWRf4xbjnD9RIbrNpW6kvG5 BnvazfufRlw1zyHVVBYyBdGgNmqUsZz6AYguUrSvH8kLt0MhtPUzJu4wa1w+9kfU9mCPyg iiOZ4TolDLexoQfrsk2AWt4f2AC5NPrK/GvhYnASS2LLo4TXuYATnGel3RsEQ0efl2jTiY poJ5oV7Bebf5roETUsoB7N5iV/dmzjCAODybPUsiUOxtWyIsvfGloy1REKHVhdQkzxu3YM yAQ3LRdCM00Zf/R/88OU2Z8VEmXk2N33cvSXyfMZqjHzhUHP1QREJZZmayvX9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759679646; a=rsa-sha256; cv=none; b=EBY1TxEzp3f7KA2HjJlpP73u2r71CqQVD6cmE4cnz3cLuapPCLCmmB0S7krHU2VDVN6NGX yQ3P43QYIq3TmQ+C96Z2vI0ZA8M3LykZznV1nPDQZsQh6IRmxYVWd8nvAnEP4PQTQqHCXe AmtMAC2ecg/2hMEulkkWYa0Dk2z+re0Pk5+0lfEpflmbTKB4EnsAzRL0cp8dvbxrVPrJaE 3K/8xy3zQ9SQlnZcpK5BUYa3iem5laytTQHjAk2qV82lpj9yqlPY/sC5PzQw4O2CgUgi+B Zd00iOxoeI6VVNE9pZ89O7w6OAPMjkD5s08bUfBla3wuXfukQdiXdQuYM8azrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cfn5B5H2Bz3Yq; Sun, 05 Oct 2025 15:54:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 595Fs6Px076731; Sun, 5 Oct 2025 15:54:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 595Fs6S5076728; Sun, 5 Oct 2025 15:54:06 GMT (envelope-from git) Date: Sun, 5 Oct 2025 15:54:06 GMT Message-Id: <202510051554.595Fs6S5076728@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: d0a35ec01c31 - main - pipe: consistently use PIPE_LOCK_ASSERT 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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d0a35ec01c31b498bd9996b50641a8629757b65f Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=d0a35ec01c31b498bd9996b50641a8629757b65f commit d0a35ec01c31b498bd9996b50641a8629757b65f Author: Mateusz Guzik AuthorDate: 2025-10-05 15:37:41 +0000 Commit: Mateusz Guzik CommitDate: 2025-10-05 15:37:41 +0000 pipe: consistently use PIPE_LOCK_ASSERT --- sys/kern/sys_pipe.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 30527fdd4fd0..57ebe8dc85f0 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -567,7 +567,7 @@ pipespace_new(struct pipe *cpipe, int size) static int curfail = 0; static struct timeval lastfail; - KASSERT(!mtx_owned(PIPE_MTX(cpipe)), ("pipespace: pipe mutex locked")); + PIPE_LOCK_ASSERT(cpipe, MA_NOTOWNED); KASSERT(!(cpipe->pipe_state & PIPE_DIRECTW), ("pipespace: resize of direct writes not allowed")); retry: @@ -1679,8 +1679,7 @@ static void pipe_free_kmem(struct pipe *cpipe) { - KASSERT(!mtx_owned(PIPE_MTX(cpipe)), - ("pipe_free_kmem: pipe mutex locked")); + PIPE_LOCK_ASSERT(cpipe, MA_NOTOWNED); if (cpipe->pipe_buffer.buffer != NULL) { atomic_subtract_long(&amountpipekva, cpipe->pipe_buffer.size); From nobody Sun Oct 5 15:54:07 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cfn5D3ccCz6BCYD; Sun, 05 Oct 2025 15:54:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cfn5C6gphz3Frx; Sun, 05 Oct 2025 15:54:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759679647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ha9scYjqnl6AtPv7P+oGnt4VnNOFYQ/m0gk3Jx3FSS0=; b=SJgLEctokXezdQmlQE1UqDQmouvYYV6MmxEcmexnmCIKXFbs+iVxWPOR8E2OHifcJ4KuPg vnmJHx0sauhJUDNsYMDliCjVqS8NLxw6x2yY/eJp70ItHc4fnnpqDxUlG1RfilWGLxsx2V 1dpyrz5zrW9wWjlequN4weDmfPLBRF0AfWFZeKNa+qB2bkI61bhYzhpB3igr/6+88MrSXK iaMJVTIzx1BTTOigFF/KiWW3+ta5q7bFjqiZRb0pG2g1duScKX2KZNpChS0nIdHfQ57aE0 wfXl+mJAAYy5Y9+RVhTrHKnv0/WrTs5HaSTbtRBi/mnv5HRbOCFeuOeBvGCUzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759679647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ha9scYjqnl6AtPv7P+oGnt4VnNOFYQ/m0gk3Jx3FSS0=; b=wS7Djkrv9duxB3/hp3rLX/a1u7LTWQB3Ge9moanT6CWqbDp8eUxhVWHzdCtbci2q/Im+Dm eFKpq/nBdwDIAPouQANi5DgYNG9jkaKMjHasfvHryaqgNVwXdB6GlYZsqDkUR5Y3iU5ra+ +55MeCKCEjBYiAtOAKA9fgHcAqQQ6bqLbAia7W9rvR0XvYpT6KyeXitjdliSkA+cPhM2Y/ CTiYdqzskSBUPlzBbc5KHLDoYxERHUpeb89+fGJEDMJup6b1OdNinAkUarapXWaGkXrb8Q nh8dhj/qDj0a49XOox3jslPsBMUInMOHpJghM9c8JNgdGwEYLWLD1NYb5ys+zg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759679648; a=rsa-sha256; cv=none; b=aRwSSokZmU6Fo3TsxWgPDA12HIImgmmQtLma6KD/+nziDUQ6zYUmQaBOK+0I33/ktmbTDZ 8k1z8rAtmxDWWOUf5wGE8ulVNlWlWl0+Rk+DgYRzZWz0g5N2WKo73UXC9ACypLzFQa6dsF TWCe8fmICTSnnvALBBU92Kg5FGC/jHYMUCXKBB4VKBFw5dKTG+TkMqtyCRwQoOqOty9eWN 9G8QjBuIqlRL5aD5FobSNUDZ1/frkYRfNmF/6dL4I0RYRuJIpUI4JpAV3P3CFQ7j/27GOx Y5FXm0Pn5Ij2PPYt74K64Q9XOJOFy6xUbhdcVw7xzEotcgFnGavk2vh4Knf2/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cfn5C6CbJz3pk; Sun, 05 Oct 2025 15:54:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 595Fs7vS076764; Sun, 5 Oct 2025 15:54:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 595Fs7va076761; Sun, 5 Oct 2025 15:54:07 GMT (envelope-from git) Date: Sun, 5 Oct 2025 15:54:07 GMT Message-Id: <202510051554.595Fs7va076761@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: ccb600906f15 - main - mtx: retire _mtx_release_lock_quick 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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ccb600906f152df310794f146eac54372e6b2665 Auto-Submitted: auto-generated The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=ccb600906f152df310794f146eac54372e6b2665 commit ccb600906f152df310794f146eac54372e6b2665 Author: Mateusz Guzik AuthorDate: 2025-10-05 15:38:06 +0000 Commit: Mateusz Guzik CommitDate: 2025-10-05 15:39:04 +0000 mtx: retire _mtx_release_lock_quick The macro is misleading and of questionable value to begin with. For starters, it is used for both spinlocks and regular mutexes (the latter only the in the slow path), which have fundamentally different requirements on unlock -- spinlocks are guaranteed to not have blocked waiters and can blindly do a store. The commentary above the it is also head-scratching: > Release mtx_lock quickly, assuming we own it. You can't *just* release a sleepable mutex "quickly". The only legal use right now is when the turnstile lock is held. Note that unlock of a sleepable mutex without using RMW atomics is very much possible and may show up soon (tm). Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/kern/kern_mutex.c | 6 +++--- sys/sys/mutex.h | 6 +----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index 8b5908f5219a..b7316ea5f387 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -869,7 +869,7 @@ _thread_lock(struct thread *td) WITNESS_LOCK(&m->lock_object, LOP_EXCLUSIVE, file, line); return; } - _mtx_release_lock_quick(m); + atomic_store_rel_ptr(&m->mtx_lock, MTX_UNOWNED); slowpath_unlocked: spinlock_exit(); slowpath_noirq: @@ -959,7 +959,7 @@ retry: } if (m == td->td_lock) break; - _mtx_release_lock_quick(m); + atomic_store_rel_ptr(&m->mtx_lock, MTX_UNOWNED); } LOCK_LOG_LOCK("LOCK", &m->lock_object, opts, m->mtx_recurse, file, line); @@ -1071,7 +1071,7 @@ __mtx_unlock_sleep(volatile uintptr_t *c, uintptr_t v) * can be removed from the hash list if it is empty. */ turnstile_chain_lock(&m->lock_object); - _mtx_release_lock_quick(m); + atomic_store_rel_ptr(&m->mtx_lock, MTX_UNOWNED); ts = turnstile_lookup(&m->lock_object); MPASS(ts != NULL); if (LOCK_LOG_TEST(&m->lock_object, opts)) diff --git a/sys/sys/mutex.h b/sys/sys/mutex.h index b534a74626bc..83300d4eb593 100644 --- a/sys/sys/mutex.h +++ b/sys/sys/mutex.h @@ -221,10 +221,6 @@ void _thread_lock(struct thread *); #define _mtx_release_lock(mp, tid) \ atomic_cmpset_rel_ptr(&(mp)->mtx_lock, (tid), MTX_UNOWNED) -/* Release mtx_lock quickly, assuming we own it. */ -#define _mtx_release_lock_quick(mp) \ - atomic_store_rel_ptr(&(mp)->mtx_lock, MTX_UNOWNED) - #define _mtx_release_lock_fetch(mp, vp) \ atomic_fcmpset_rel_ptr(&(mp)->mtx_lock, (vp), MTX_UNOWNED) @@ -332,7 +328,7 @@ void _thread_lock(struct thread *); (mp)->mtx_recurse--; \ else { \ LOCKSTAT_PROFILE_RELEASE_SPIN_LOCK(spin__release, mp); \ - _mtx_release_lock_quick((mp)); \ + atomic_store_rel_ptr(&(mp)->mtx_lock, MTX_UNOWNED); \ } \ spinlock_exit(); \ }) From nobody Sun Oct 5 16:22:15 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cfnjh0yHyz6BGtn; Sun, 05 Oct 2025 16:22:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cfnjg637wz3KTW; Sun, 05 Oct 2025 16:22:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759681335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=khmBYS/IbriMxq4V40Wky9lFKk+9H5QOvINRg74H25k=; b=SGHd+RtwF2IlJ17N6hqayBa8pQ6FKzfMJGbGceNho5zmePu3XRA2TWHUHkm2B2A+lAQ3mg vPOanXIAcJsr3BbZMDKLPexJxYRf/BbV/sBBOhQUUq3LDYOSQv0NFCnD7TijiL39n2JY6h YxiEBTNgo9YpvDhdSbfrB33dVOl38nlUDZ9gi8/t7e0uPnZ2S9c9C69dIWqlYBdST1saHG 9uOkMjE9NcQigHv03XSbBF7xpi+MuAod99zUtniq1U3SeGBSx/IIJKS7MiyWQpnbxIXuSL BnTP86DZuwSG0NU3qmOqbsm5GHewYXiCK28dlCgbuPEFDjhKwmNBaW+gHqf4oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759681335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=khmBYS/IbriMxq4V40Wky9lFKk+9H5QOvINRg74H25k=; b=DfC93hI0fh3LOl/IyM5UIciCiCIwtz/ken7l6893OKv7+03ddTZ6/QzIkGwIZ8uibnzeof FGwcQsX6AQwZ0R9FFnqnTXLYL7XXNt4r7gyp5/cvAFqiLKc7sF4X/cjgGE99DGRzfccgbZ gHU86SYuoVsLUnoVfra/QKRYwop+Nl18TT8N6pJzLbH7TWaFycXBE+TlVvZ/lRG8PqhMpF P9U3cRS1Zx3ZmfKUu0x3SDC7h2QBpxWYg7sbVl7l8dxSZ1oIpFLiyIS9FiHt4HSlXvLr3W 0Uf7O7iJZnqVJniYULxhO2ccJDYjdPemyU+6dsetQ0QJOv46ohjWsVDPn6RyHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759681335; a=rsa-sha256; cv=none; b=iS9yRvOWVGDHv2bOgGfr9gxANGnKf4LWvcrGmqfrt45EFZ2b/cbWREBtp1WqiNgMvVFzTM I5JN2Y6zGnGjr6qne929NiY/M8b7NEhNUp3xzoLJpK/zoxB0DDlh9cM2vqAlVjcwA0j3Gp MFEmiG5whJpsTu527TTTSWHfaYPU+YbiXt4Y+dlmkKcBxTUYbYbOvZLdFWRCVuL+6jrVfL DfMbd52NP2lNUDhMmVSD1pZ5HRg7+k7He1xQP3plChVVZ3lbOiJxrTiqzluR48UU0NGkz+ cmxThxYo7XHbwhn+aGnoVxi0E19BvnIbV1wIHHjXcutaLVimnRAxOy1plPcGDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cfnjg5RyVz4L6; Sun, 05 Oct 2025 16:22:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 595GMFfF032662; Sun, 5 Oct 2025 16:22:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 595GMFbu032657; Sun, 5 Oct 2025 16:22:15 GMT (envelope-from git) Date: Sun, 5 Oct 2025 16:22:15 GMT Message-Id: <202510051622.595GMFbu032657@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 5000d023a446 - main - heimdal-kadmin: Add support for the -f dump 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: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5000d023a446b81f6d45ed59aa379607ec814f01 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=5000d023a446b81f6d45ed59aa379607ec814f01 commit 5000d023a446b81f6d45ed59aa379607ec814f01 Author: Rick Macklem AuthorDate: 2025-10-05 16:18:35 +0000 Commit: Rick Macklem CommitDate: 2025-10-05 16:18:35 +0000 heimdal-kadmin: Add support for the -f dump option The "-f" dump option allows a dump of the Heimdal KDC in a format that the MIT kdb5_util command can load into a MIT KDC's database. This makes transitioning from the Heimdal KDC to the current MIT one feasible without having to re-create the KDC database from scratch. glebius@ did the initial work, cherry picking these commits from the Heimdal sources on github and then doing extensive merge conflict resolution and other fixes so that it would build. Heimdal commit fca5399 authored by Nico Williams: Initial commit for second approach for multiple kvno. NOT TESTED! Heimdal commit 57f1545 authored by Nico Williams: Add support for writing to KDB and dumping HDB to MIT KDB dump format Before this change Heimdal could read KDBs. Now it can write to them too. Heimdal can now also dump HDBs (including KDBs) in MIT format, which can then be imported with kdb5_util load. This is intended to help in migrations from MIT to Heimdal by allowing migrations from Heimdal to MIT so that it is possible to rollback from Heimdal to MIT should there be any issues. The idea is to allow a) running Heimdal kdc/kadmind with a KDB, or b) running Heimdal with an HDB converted from a KDB and then rollback by dumping the HDB and loading a KDB. Note that not all TL data types are supported, only two: last password change and modify-by. This is the minimum necessary. PKINIT users may need to add support for KRB5_TL_USER_CERTIFICATE, and for databases with K/M history we may need to add KRB5_TL_MKVNO support. This resulted in a Heimdal kadmin that would dump the KDC database in MIT format. However, there were issues when this dump was loaded into the current MIT KDC in FreeBSD current/15.0. The changes I did to make the dump more useful are listed below: When "-f MIT" is used for "kadmin -l dump" it writes the dump out in MIT format. This dump format is understood by the MIT kdb5_util command. The patch modifies the above so that the MIT KDC's master key keytab file can be provided as the argument to "-f" so that the principals are re-encrypted in it. This allows any principal with at least one strong encryption type key to work without needing a change_password. The strong encryption types supported by the Heimdal KDC are: aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 The issues my changes address are: - If there are weak encryption keys in a principal's entry, MIT's kadmin.local will report that the principcal's entry is incomplete or corrupted. - The keys are encrypted in Heimdal's master key. The "-d" option can be used on the "kadmin -l dump" to de-encrypt them, but the passwords will not work on the current MIT KDC. To try and deal with the above issues, this patch modied the above to: - Does not dump the weak keys. - Re-encrypts the strong keys in MIT's master key if the argument to "-f" is actually a filename which holds the MIT KDC's master key keytab and not "MIT". - For principals that only have weak keys, it generates a fake strong key. This key will not work on the MIT KDC, but the principal entry will work once a change_password is done to it. - It always generates a "modified_by" entry, faking one if not already present in the Heimdal KDC database. This was necessary, since the MIT kadmin will report that the principal entry is "incomplete or corrupted" without one. It also fixed a problem where "get principal" no longer worked after the initial patch was applied. A man page update will be done as a separate commit. I believe this commit is acceptable since the Heimdal sources are now essentially deprecated in favor of the MIT sources and that this new "-f" patch simplifies the transition to the MIT KDC. Discussed with: glebius, cy MFC after: 3 days --- crypto/heimdal/kadmin/dump.c | 29 +- crypto/heimdal/kadmin/kadmin-commands.in | 6 + crypto/heimdal/kdc/hpropd.c | 68 +++-- crypto/heimdal/kdc/mit_dump.c | 383 ++++++------------------ crypto/heimdal/lib/hdb/Makefile.am | 1 + crypto/heimdal/lib/hdb/common.c | 68 +++-- crypto/heimdal/lib/hdb/ext.c | 31 ++ crypto/heimdal/lib/hdb/hdb-mitdb.c | 477 +++++++++++++++++++++++++++--- crypto/heimdal/lib/hdb/hdb-protos.h | 25 ++ crypto/heimdal/lib/hdb/hdb.asn1 | 14 +- crypto/heimdal/lib/hdb/hdb.c | 7 +- crypto/heimdal/lib/hdb/hdb.h | 15 +- crypto/heimdal/lib/hdb/hdb_locl.h | 7 + crypto/heimdal/lib/hdb/keys.c | 69 ++++- crypto/heimdal/lib/hdb/mkey.c | 211 +++++++++++-- crypto/heimdal/lib/hdb/print.c | 407 ++++++++++++++++++++++--- crypto/heimdal/lib/hdb/version-script.map | 6 + crypto/heimdal/lib/kadm5/chpass_s.c | 7 + crypto/heimdal/lib/kadm5/randkey_s.c | 4 + kerberos5/lib/libhdb/Makefile | 5 +- share/mk/src.libnames.mk | 2 +- 21 files changed, 1374 insertions(+), 468 deletions(-) diff --git a/crypto/heimdal/kadmin/dump.c b/crypto/heimdal/kadmin/dump.c index 91a5ada86607..2c302eced210 100644 --- a/crypto/heimdal/kadmin/dump.c +++ b/crypto/heimdal/kadmin/dump.c @@ -42,32 +42,51 @@ dump(struct dump_options *opt, int argc, char **argv) { krb5_error_code ret; FILE *f; + struct hdb_print_entry_arg parg; HDB *db = NULL; - if(!local_flag) { + if (!local_flag) { krb5_warnx(context, "dump is only available in local (-l) mode"); return 0; } db = _kadm5_s_get_db(kadm_handle); - if(argc == 0) + if (argc == 0) f = stdout; else f = fopen(argv[0], "w"); - if(f == NULL) { + if (f == NULL) { krb5_warn(context, errno, "open: %s", argv[0]); goto out; } ret = db->hdb_open(context, db, O_RDONLY, 0600); - if(ret) { + if (ret) { krb5_warn(context, ret, "hdb_open"); goto out; } + if (!opt->format_string || strcmp(opt->format_string, "Heimdal") == 0) { + parg.fmt = HDB_DUMP_HEIMDAL; + } else if (opt->format_string && strcmp(opt->format_string, "MIT") == 0) { + parg.fmt = HDB_DUMP_MIT; + fprintf(f, "kdb5_util load_dump version 5\n"); /* 5||6, either way */ + } else if (opt->format_string) { + /* Open the format string as a MIT mkey file. */ + ret = hdb_read_master_key(context, opt->format_string, &db->hdb_mit_key); + if (ret) + krb5_errx(context, 1, "Cannot open MIT mkey file"); + db->hdb_mit_key_set = 1; + parg.fmt = HDB_DUMP_MIT; + opt->decrypt_flag = 1; + fprintf(f, "kdb5_util load_dump version 5\n"); /* 5||6, either way */ + } else { + krb5_errx(context, 1, "Supported dump formats: Heimdal and MIT"); + } + parg.out = f; hdb_foreach(context, db, opt->decrypt_flag ? HDB_F_DECRYPT : 0, - hdb_print_entry, f); + hdb_print_entry, &parg); db->hdb_close(context, db); out: diff --git a/crypto/heimdal/kadmin/kadmin-commands.in b/crypto/heimdal/kadmin/kadmin-commands.in index 4396ff800441..dc36db4e0a00 100644 --- a/crypto/heimdal/kadmin/kadmin-commands.in +++ b/crypto/heimdal/kadmin/kadmin-commands.in @@ -76,6 +76,12 @@ command = { type = "flag" help = "decrypt keys" } + option = { + long = "format" + short = "f" + type = "string" + help = "dump format, mit or heimdal (default: heimdal)" + } argument = "[dump-file]" min_args = "0" max_args = "1" diff --git a/crypto/heimdal/kdc/hpropd.c b/crypto/heimdal/kdc/hpropd.c index 1cfc688b2a6c..c76be0446705 100644 --- a/crypto/heimdal/kdc/hpropd.c +++ b/crypto/heimdal/kdc/hpropd.c @@ -85,23 +85,23 @@ main(int argc, char **argv) setprogname(argv[0]); ret = krb5_init_context(&context); - if(ret) + if (ret) exit(1); ret = krb5_openlog(context, "hpropd", &fac); - if(ret) + if (ret) errx(1, "krb5_openlog"); krb5_set_warn_dest(context, fac); - if(getarg(args, num_args, argc, argv, &optidx)) + if (getarg(args, num_args, argc, argv, &optidx)) usage(1); - if(local_realm != NULL) + if (local_realm != NULL) krb5_set_default_realm(context, local_realm); - if(help_flag) + if (help_flag) usage(0); - if(version_flag) { + if (version_flag) { print_version(NULL); exit(0); } @@ -117,7 +117,7 @@ main(int argc, char **argv) if (database == NULL) database = hdb_default_db(context); - if(from_stdin) { + if (from_stdin) { sock = STDIN_FILENO; } else { struct sockaddr_storage ss; @@ -145,7 +145,7 @@ main(int argc, char **argv) HPROP_PORT), &sock); } sin_len = sizeof(ss); - if(getpeername(sock, sa, &sin_len) < 0) + if (getpeername(sock, sa, &sin_len) < 0) krb5_err(context, 1, errno, "getpeername"); if (inet_ntop(sa->sa_family, @@ -158,7 +158,7 @@ main(int argc, char **argv) krb5_log(context, fac, 0, "Connection from %s", addr_name); ret = krb5_kt_register(context, &hdb_kt_ops); - if(ret) + if (ret) krb5_err(context, 1, ret, "krb5_kt_register"); if (ktname != NULL) { @@ -173,7 +173,7 @@ main(int argc, char **argv) ret = krb5_recvauth(context, &ac, &sock, HPROP_VERSION, NULL, 0, keytab, &ticket); - if(ret) + if (ret) krb5_err(context, 1, ret, "krb5_recvauth"); ret = krb5_unparse_name(context, ticket->server, &server); @@ -186,15 +186,15 @@ main(int argc, char **argv) krb5_free_ticket (context, ticket); ret = krb5_auth_con_getauthenticator(context, ac, &authent); - if(ret) + if (ret) krb5_err(context, 1, ret, "krb5_auth_con_getauthenticator"); ret = krb5_make_principal(context, &c1, NULL, "kadmin", "hprop", NULL); - if(ret) + if (ret) krb5_err(context, 1, ret, "krb5_make_principal"); _krb5_principalname2krb5_principal(context, &c2, authent->cname, authent->crealm); - if(!krb5_principal_compare(context, c1, c2)) { + if (!krb5_principal_compare(context, c1, c2)) { char *s; ret = krb5_unparse_name(context, c2, &s); if (ret) @@ -205,48 +205,48 @@ main(int argc, char **argv) krb5_free_principal(context, c2); ret = krb5_kt_close(context, keytab); - if(ret) + if (ret) krb5_err(context, 1, ret, "krb5_kt_close"); } - if(!print_dump) { + if (!print_dump) { asprintf(&tmp_db, "%s~", database); ret = hdb_create(context, &db, tmp_db); - if(ret) + if (ret) krb5_err(context, 1, ret, "hdb_create(%s)", tmp_db); ret = db->hdb_open(context, db, O_RDWR | O_CREAT | O_TRUNC, 0600); - if(ret) + if (ret) krb5_err(context, 1, ret, "hdb_open(%s)", tmp_db); } nprincs = 0; - while(1){ + while (1){ krb5_data data; hdb_entry_ex entry; - if(from_stdin) { + if (from_stdin) { ret = krb5_read_message(context, &sock, &data); - if(ret != 0 && ret != HEIM_ERR_EOF) + if (ret != 0 && ret != HEIM_ERR_EOF) krb5_err(context, 1, ret, "krb5_read_message"); } else { ret = krb5_read_priv_message(context, ac, &sock, &data); - if(ret) + if (ret) krb5_err(context, 1, ret, "krb5_read_priv_message"); } - if(ret == HEIM_ERR_EOF || data.length == 0) { - if(!from_stdin) { + if (ret == HEIM_ERR_EOF || data.length == 0) { + if (!from_stdin) { data.data = NULL; data.length = 0; krb5_write_priv_message(context, ac, &sock, &data); } - if(!print_dump) { + if (!print_dump) { ret = db->hdb_close(context, db); - if(ret) + if (ret) krb5_err(context, 1, ret, "db_close"); ret = db->hdb_rename(context, db, database); - if(ret) + if (ret) krb5_err(context, 1, ret, "db_rename"); } break; @@ -254,20 +254,24 @@ main(int argc, char **argv) memset(&entry, 0, sizeof(entry)); ret = hdb_value2entry(context, &data, &entry.entry); krb5_data_free(&data); - if(ret) + if (ret) krb5_err(context, 1, ret, "hdb_value2entry"); - if(print_dump) - hdb_print_entry(context, db, &entry, stdout); - else { + if (print_dump) { + struct hdb_print_entry_arg parg; + + parg.out = stdout; + parg.fmt = HDB_DUMP_HEIMDAL; + hdb_print_entry(context, db, &entry, &parg); + } else { ret = db->hdb_store(context, db, 0, &entry); - if(ret == HDB_ERR_EXISTS) { + if (ret == HDB_ERR_EXISTS) { char *s; ret = krb5_unparse_name(context, entry.entry.principal, &s); if (ret) s = strdup(unparseable_name); krb5_warnx(context, "Entry exists: %s", s); free(s); - } else if(ret) + } else if (ret) krb5_err(context, 1, ret, "db_store"); else nprincs++; diff --git a/crypto/heimdal/kdc/mit_dump.c b/crypto/heimdal/kdc/mit_dump.c index f28e932b15b4..4397d1ad897d 100644 --- a/crypto/heimdal/kdc/mit_dump.c +++ b/crypto/heimdal/kdc/mit_dump.c @@ -33,6 +33,17 @@ #include "hprop.h" +extern krb5_error_code _hdb_mdb_value2entry(krb5_context context, + krb5_data *data, + krb5_kvno target_kvno, + hdb_entry *entry); + +extern int _hdb_mit_dump2mitdb_entry(krb5_context context, + char *line, + krb5_storage *sp); + + + /* can have any number of princ stanzas. format is as follows (only \n indicates newlines) @@ -74,19 +85,6 @@ unless no extra data */ -static int -hex_to_octet_string(const char *ptr, krb5_data *data) -{ - size_t i; - unsigned int v; - for(i = 0; i < data->length; i++) { - if(sscanf(ptr + 2 * i, "%02x", &v) != 1) - return -1; - ((unsigned char*)data->data)[i] = v; - } - return 2 * i; -} - static char * nexttoken(char **p) { @@ -97,321 +95,116 @@ nexttoken(char **p) return q; } -static size_t -getdata(char **p, unsigned char *buf, size_t len) -{ - size_t i; - int v; - char *q = nexttoken(p); - i = 0; - while(*q && i < len) { - if(sscanf(q, "%02x", &v) != 1) - break; - buf[i++] = v; - q += 2; - } - return i; -} - -static int -getint(char **p) -{ - int val; - char *q = nexttoken(p); - sscanf(q, "%d", &val); - return val; -} - #include -static void -attr_to_flags(unsigned attr, HDBFlags *flags) -{ - flags->postdate = !(attr & KRB5_KDB_DISALLOW_POSTDATED); - flags->forwardable = !(attr & KRB5_KDB_DISALLOW_FORWARDABLE); - flags->initial = !!(attr & KRB5_KDB_DISALLOW_TGT_BASED); - flags->renewable = !(attr & KRB5_KDB_DISALLOW_RENEWABLE); - flags->proxiable = !(attr & KRB5_KDB_DISALLOW_PROXIABLE); - /* DUP_SKEY */ - flags->invalid = !!(attr & KRB5_KDB_DISALLOW_ALL_TIX); - flags->require_preauth = !!(attr & KRB5_KDB_REQUIRES_PRE_AUTH); - flags->require_hwauth = !!(attr & KRB5_KDB_REQUIRES_HW_AUTH); - flags->server = !(attr & KRB5_KDB_DISALLOW_SVR); - flags->change_pw = !!(attr & KRB5_KDB_PWCHANGE_SERVICE); - flags->client = 1; /* XXX */ -} - -#define KRB5_KDB_SALTTYPE_NORMAL 0 -#define KRB5_KDB_SALTTYPE_V4 1 -#define KRB5_KDB_SALTTYPE_NOREALM 2 -#define KRB5_KDB_SALTTYPE_ONLYREALM 3 -#define KRB5_KDB_SALTTYPE_SPECIAL 4 -#define KRB5_KDB_SALTTYPE_AFS3 5 - -static krb5_error_code -fix_salt(krb5_context context, hdb_entry *ent, int key_num) +static int +my_fgetln(FILE *f, char **buf, size_t *sz, size_t *len) { - krb5_error_code ret; - Salt *salt = ent->keys.val[key_num].salt; - /* fix salt type */ - switch((int)salt->type) { - case KRB5_KDB_SALTTYPE_NORMAL: - salt->type = KRB5_PADATA_PW_SALT; - break; - case KRB5_KDB_SALTTYPE_V4: - krb5_data_free(&salt->salt); - salt->type = KRB5_PADATA_PW_SALT; - break; - case KRB5_KDB_SALTTYPE_NOREALM: - { - size_t len; - size_t i; - char *p; - - len = 0; - for (i = 0; i < ent->principal->name.name_string.len; ++i) - len += strlen(ent->principal->name.name_string.val[i]); - ret = krb5_data_alloc (&salt->salt, len); - if (ret) - return ret; - p = salt->salt.data; - for (i = 0; i < ent->principal->name.name_string.len; ++i) { - memcpy (p, - ent->principal->name.name_string.val[i], - strlen(ent->principal->name.name_string.val[i])); - p += strlen(ent->principal->name.name_string.val[i]); - } - - salt->type = KRB5_PADATA_PW_SALT; - break; + char *p, *n; + + if (!*buf) { + *buf = malloc(*sz ? *sz : 2048); + if (!*buf) + return ENOMEM; + if (!*sz) + *sz = 2048; } - case KRB5_KDB_SALTTYPE_ONLYREALM: - krb5_data_free(&salt->salt); - ret = krb5_data_copy(&salt->salt, - ent->principal->realm, - strlen(ent->principal->realm)); - if(ret) - return ret; - salt->type = KRB5_PADATA_PW_SALT; - break; - case KRB5_KDB_SALTTYPE_SPECIAL: - salt->type = KRB5_PADATA_PW_SALT; - break; - case KRB5_KDB_SALTTYPE_AFS3: - krb5_data_free(&salt->salt); - ret = krb5_data_copy(&salt->salt, - ent->principal->realm, - strlen(ent->principal->realm)); - if(ret) - return ret; - salt->type = KRB5_PADATA_AFS3_SALT; - break; - default: - abort(); + *len = 0; + while ((p = fgets(&(*buf)[*len], *sz, f))) { + if (strcspn(*buf, "\r\n") || feof(f)) { + *len = strlen(*buf); + return 0; + } + *len += strlen(&(*buf)[*len]); /* *len should be == *sz */ + n = realloc(buf, *sz + (*sz >> 1)); + if (!n) { + free(*buf); + *buf = NULL; + *sz = 0; + *len = 0; + return ENOMEM; + } + *buf = n; + *sz += *sz >> 1; } - return 0; + return 0; /* *len == 0 || no EOL -> EOF */ } int mit_prop_dump(void *arg, const char *file) { krb5_error_code ret; - char line [2048]; - FILE *f; + size_t line_bufsz = 0; + size_t line_len = 0; + char *line = NULL; int lineno = 0; + FILE *f; struct hdb_entry_ex ent; - struct prop_data *pd = arg; + krb5_storage *sp = NULL; + krb5_data kdb_ent; + memset(&ent, 0, sizeof (ent)); f = fopen(file, "r"); - if(f == NULL) + if (f == NULL) return errno; - while(fgets(line, sizeof(line), f)) { - char *p = line, *q; - - int i; - - int num_tl_data; - int num_key_data; - int high_kvno; - int attributes; + ret = ENOMEM; + sp = krb5_storage_emem(); + if (!sp) + goto out; + while ((ret = my_fgetln(f, &line, &line_bufsz, &line_len)) == 0) { + char *p = line; + char *q; + lineno++; - int tmp; - - lineno++; - - memset(&ent, 0, sizeof(ent)); - - q = nexttoken(&p); - if(strcmp(q, "kdb5_util") == 0) { + if(strncmp(line, "kdb5_util", strlen("kdb5_util")) == 0) { int major; + q = nexttoken(&p); + if (strcmp(q, "kdb5_util")) + errx(1, "line %d: unknown version", lineno); q = nexttoken(&p); /* load_dump */ - if(strcmp(q, "load_dump")) + if (strcmp(q, "load_dump")) errx(1, "line %d: unknown version", lineno); q = nexttoken(&p); /* load_dump */ - if(strcmp(q, "version")) + if (strcmp(q, "version")) errx(1, "line %d: unknown version", lineno); q = nexttoken(&p); /* x.0 */ - if(sscanf(q, "%d", &major) != 1) + if (sscanf(q, "%d", &major) != 1) errx(1, "line %d: unknown version", lineno); - if(major != 4 && major != 5 && major != 6) + if (major != 4 && major != 5 && major != 6) errx(1, "unknown dump file format, got %d, expected 4-6", major); continue; - } else if(strcmp(q, "policy") == 0) { + } else if(strncmp(p, "policy", strlen("policy")) == 0) { + warnx("line: %d: ignoring policy (not supported)", lineno); continue; - } else if(strcmp(q, "princ") != 0) { + } else if(strncmp(p, "princ", strlen("princ")) != 0) { warnx("line %d: not a principal", lineno); continue; } - tmp = getint(&p); - if(tmp != 38) { - warnx("line %d: bad base length %d != 38", lineno, tmp); - continue; - } - nexttoken(&p); /* length of principal */ - num_tl_data = getint(&p); /* number of tl-data */ - num_key_data = getint(&p); /* number of key-data */ - getint(&p); /* length of extra data */ - q = nexttoken(&p); /* principal name */ - krb5_parse_name(pd->context, q, &ent.entry.principal); - attributes = getint(&p); /* attributes */ - attr_to_flags(attributes, &ent.entry.flags); - tmp = getint(&p); /* max life */ - if(tmp != 0) { - ALLOC(ent.entry.max_life); - *ent.entry.max_life = tmp; - } - tmp = getint(&p); /* max renewable life */ - if(tmp != 0) { - ALLOC(ent.entry.max_renew); - *ent.entry.max_renew = tmp; - } - tmp = getint(&p); /* expiration */ - if(tmp != 0 && tmp != 2145830400) { - ALLOC(ent.entry.valid_end); - *ent.entry.valid_end = tmp; - } - tmp = getint(&p); /* pw expiration */ - if(tmp != 0) { - ALLOC(ent.entry.pw_end); - *ent.entry.pw_end = tmp; - } - nexttoken(&p); /* last auth */ - nexttoken(&p); /* last failed auth */ - nexttoken(&p); /* fail auth count */ - for(i = 0; i < num_tl_data; i++) { - unsigned long val; - int tl_type, tl_length; - unsigned char *buf; - krb5_principal princ; - - tl_type = getint(&p); /* data type */ - tl_length = getint(&p); /* data length */ - -#define mit_KRB5_TL_LAST_PWD_CHANGE 1 -#define mit_KRB5_TL_MOD_PRINC 2 - switch(tl_type) { - case mit_KRB5_TL_LAST_PWD_CHANGE: - buf = malloc(tl_length); - if (buf == NULL) - errx(ENOMEM, "malloc"); - getdata(&p, buf, tl_length); /* data itself */ - val = buf[0] | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24); - free(buf); - ALLOC(ent.entry.extensions); - ALLOC_SEQ(ent.entry.extensions, 1); - ent.entry.extensions->val[0].mandatory = 0; - ent.entry.extensions->val[0].data.element - = choice_HDB_extension_data_last_pw_change; - ent.entry.extensions->val[0].data.u.last_pw_change = val; - break; - case mit_KRB5_TL_MOD_PRINC: - buf = malloc(tl_length); - if (buf == NULL) - errx(ENOMEM, "malloc"); - getdata(&p, buf, tl_length); /* data itself */ - val = buf[0] | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24); - ret = krb5_parse_name(pd->context, (char *)buf + 4, &princ); - if (ret) - krb5_err(pd->context, 1, ret, - "parse_name: %s", (char *)buf + 4); - free(buf); - ALLOC(ent.entry.modified_by); - ent.entry.modified_by->time = val; - ent.entry.modified_by->principal = princ; - break; - default: - nexttoken(&p); - break; - } - } - ALLOC_SEQ(&ent.entry.keys, num_key_data); - high_kvno = -1; - for(i = 0; i < num_key_data; i++) { - int key_versions; - int kvno; - key_versions = getint(&p); /* key data version */ - kvno = getint(&p); - - /* - * An MIT dump file may contain multiple sets of keys with - * different kvnos. Since the Heimdal database can only represent - * one kvno per principal, we only want the highest set. Assume - * that set will be given first, and discard all keys with lower - * kvnos. - */ - if (kvno > high_kvno && high_kvno != -1) - errx(1, "line %d: high kvno keys given after low kvno keys", - lineno); - else if (kvno < high_kvno) { - nexttoken(&p); /* key type */ - nexttoken(&p); /* key length */ - nexttoken(&p); /* key */ - if (key_versions > 1) { - nexttoken(&p); /* salt type */ - nexttoken(&p); /* salt length */ - nexttoken(&p); /* salt */ - } - ent.entry.keys.len--; - continue; - } - ent.entry.kvno = kvno; - high_kvno = kvno; - ALLOC(ent.entry.keys.val[i].mkvno); - *ent.entry.keys.val[i].mkvno = 1; - - /* key version 0 -- actual key */ - ent.entry.keys.val[i].key.keytype = getint(&p); /* key type */ - tmp = getint(&p); /* key length */ - /* the first two bytes of the key is the key length -- - skip it */ - krb5_data_alloc(&ent.entry.keys.val[i].key.keyvalue, tmp - 2); - q = nexttoken(&p); /* key itself */ - hex_to_octet_string(q + 4, &ent.entry.keys.val[i].key.keyvalue); - - if(key_versions > 1) { - /* key version 1 -- optional salt */ - ALLOC(ent.entry.keys.val[i].salt); - ent.entry.keys.val[i].salt->type = getint(&p); /* salt type */ - tmp = getint(&p); /* salt length */ - if(tmp > 0) { - krb5_data_alloc(&ent.entry.keys.val[i].salt->salt, tmp - 2); - q = nexttoken(&p); /* salt itself */ - hex_to_octet_string(q + 4, - &ent.entry.keys.val[i].salt->salt); - } else { - ent.entry.keys.val[i].salt->salt.length = 0; - ent.entry.keys.val[i].salt->salt.data = NULL; - getint(&p); /* -1, if no data. */ - } - fix_salt(pd->context, &ent.entry, i); - } - } - nexttoken(&p); /* extra data */ - v5_prop(pd->context, NULL, &ent, arg); + krb5_storage_truncate(sp, 0); + ret = _hdb_mit_dump2mitdb_entry(pd->context, line, sp); + if (ret) break; + ret = krb5_storage_to_data(sp, &kdb_ent); + if (ret) break; + ret = _hdb_mdb_value2entry(pd->context, &kdb_ent, 0, &ent.entry); + krb5_data_free(&kdb_ent); + if (ret) break; + ret = v5_prop(pd->context, NULL, &ent, arg); + hdb_free_entry(pd->context, &ent); + if (ret) break; } + +out: fclose(f); - return 0; + free(line); + if (sp) + krb5_storage_free(sp); + if (ret && ret == ENOMEM) + errx(1, "out of memory"); + if (ret) + errx(1, "line %d: problem parsing dump line", lineno); + return ret; } + diff --git a/crypto/heimdal/lib/hdb/Makefile.am b/crypto/heimdal/lib/hdb/Makefile.am index b629f56258d2..fd009bd26867 100644 --- a/crypto/heimdal/lib/hdb/Makefile.am +++ b/crypto/heimdal/lib/hdb/Makefile.am @@ -29,6 +29,7 @@ gen_files_hdb = \ asn1_HDB_Ext_Lan_Manager_OWF.x \ asn1_HDB_Ext_Password.x \ asn1_HDB_Ext_Aliases.x \ + asn1_HDB_Ext_KeySet.x \ asn1_HDB_extension.x \ asn1_HDB_extensions.x \ asn1_hdb_entry.x \ diff --git a/crypto/heimdal/lib/hdb/common.c b/crypto/heimdal/lib/hdb/common.c index 2715adf63dca..80482e7a4c1c 100644 --- a/crypto/heimdal/lib/hdb/common.c +++ b/crypto/heimdal/lib/hdb/common.c @@ -105,7 +105,6 @@ _hdb_fetch_kvno(krb5_context context, HDB *db, krb5_const_principal principal, krb5_principal enterprise_principal = NULL; krb5_data key, value; krb5_error_code ret; - int code; if (principal->name.name_type == KRB5_NT_ENTERPRISE_PRINCIPAL) { if (principal->name.name_string.len != 1) { @@ -125,43 +124,74 @@ _hdb_fetch_kvno(krb5_context context, HDB *db, krb5_const_principal principal, hdb_principal2key(context, principal, &key); if (enterprise_principal) krb5_free_principal(context, enterprise_principal); - code = db->hdb__get(context, db, key, &value); + ret = db->hdb__get(context, db, key, &value); krb5_data_free(&key); - if(code) - return code; - code = hdb_value2entry(context, &value, &entry->entry); - if (code == ASN1_BAD_ID && (flags & HDB_F_CANON) == 0) { + if(ret) + return ret; + ret = hdb_value2entry(context, &value, &entry->entry); + if (ret == ASN1_BAD_ID && (flags & HDB_F_CANON) == 0) { krb5_data_free(&value); return HDB_ERR_NOENTRY; - } else if (code == ASN1_BAD_ID) { + } else if (ret == ASN1_BAD_ID) { hdb_entry_alias alias; - code = hdb_value2entry_alias(context, &value, &alias); - if (code) { + ret = hdb_value2entry_alias(context, &value, &alias); + if (ret) { krb5_data_free(&value); - return code; + return ret; } hdb_principal2key(context, alias.principal, &key); krb5_data_free(&value); free_hdb_entry_alias(&alias); - code = db->hdb__get(context, db, key, &value); + ret = db->hdb__get(context, db, key, &value); krb5_data_free(&key); - if (code) - return code; - code = hdb_value2entry(context, &value, &entry->entry); - if (code) { + if (ret) + return ret; + ret = hdb_value2entry(context, &value, &entry->entry); + if (ret) { krb5_data_free(&value); - return code; + return ret; } } krb5_data_free(&value); if (db->hdb_master_key_set && (flags & HDB_F_DECRYPT)) { - code = hdb_unseal_keys (context, db, &entry->entry); - if (code) +#ifdef notnow + if ((flags & HDB_F_KVNO_SPECIFIED) == 0 && + (flags & HDB_F_CURRENT_KVNO) == 0) { + + /* + * Decrypt all the old keys too, since we don't know which + * the caller will need. + */ + ret = hdb_unseal_keys_kvno(context, db, 0, &entry->entry); + if (ret) { + hdb_free_entry(context, entry); + return ret; + } + } else if ((flags & HDB_F_KVNO_SPECIFIED) != 0 && + kvno != entry->entry.kvno && + kvno < entry->entry.kvno && + kvno > 0) { + + /* Decrypt the keys we were asked for, if not the current ones */ + ret = hdb_unseal_keys_kvno(context, db, kvno, &entry->entry); + if (ret) { + hdb_free_entry(context, entry); + return ret; + } + } +#endif + + /* Always decrypt the current keys too */ + ret = hdb_unseal_keys(context, db, &entry->entry); + if (ret) { hdb_free_entry(context, entry); + return ret; + } } - return code; + + return ret; } static krb5_error_code diff --git a/crypto/heimdal/lib/hdb/ext.c b/crypto/heimdal/lib/hdb/ext.c index d2a4373b9b38..5f7a19a55e04 100644 --- a/crypto/heimdal/lib/hdb/ext.c +++ b/crypto/heimdal/lib/hdb/ext.c @@ -432,3 +432,34 @@ hdb_entry_get_aliases(const hdb_entry *entry, const HDB_Ext_Aliases **a) return 0; } + +krb5_error_code +hdb_set_last_modified_by(krb5_context context, hdb_entry *entry, + krb5_principal modby, time_t modtime) +{ + krb5_error_code ret; + Event *old_ev; + Event *ev; + + old_ev = entry->modified_by; + + ev = calloc(1, sizeof (*ev)); + if (!ev) + return ENOMEM; + if (modby) + ret = krb5_copy_principal(context, modby, &ev->principal); + else + ret = krb5_parse_name(context, "root/admin", &ev->principal); + if (ret) { + free(ev); + return ret; + } + ev->time = modtime; + if (!ev->time) + time(&ev->time); + + entry->modified_by = ev; + if (old_ev) + free_Event(old_ev); + return 0; +} diff --git a/crypto/heimdal/lib/hdb/hdb-mitdb.c b/crypto/heimdal/lib/hdb/hdb-mitdb.c index 02c575050fe2..1dfe7835cb4d 100644 --- a/crypto/heimdal/lib/hdb/hdb-mitdb.c +++ b/crypto/heimdal/lib/hdb/hdb-mitdb.c @@ -91,18 +91,28 @@ salt: *** 1797 LINES SKIPPED *** From nobody Sun Oct 5 17:28:04 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cfq9h6HlSz69yff; Sun, 05 Oct 2025 17:28:08 +0000 (UTC) (envelope-from avg@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 4cfq9h5pF5z3VFC; Sun, 05 Oct 2025 17:28:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759685288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=HTk4i+oGUYGc8bqqry+LXItG6TTV+A+7zTV7xZjokkc=; b=auc0AIguOregUi5Fz1ncoS89qcgWP3kQpiCGwlvVyMBvrlieZIeFc8DYRTj3ob9fPQFVHw 4DUsEbQbGGXpL6kH7VgapL7sFI+kMVTCbf2DCHUegvDWNp5brnGp2HmZFbPcHOX2jq03B/ FcWmFoFrrwppt3IKwyYfG7eZseYo/IqWor/aZBpuKXDMEQywjm/F4ShoNoQmWjD798vE2V iUPIkIfAAr8JP54PXGYwMtdR/PROqKPq5Pj2tgzEGpKvuPnZxzxVX0oxgh0ItMokhZk7L0 +3xkNJVlHMWOaoSHn+MV0mA2APajI7tPSqCZkf43pqBTsfUobzGfPh01eDFPeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759685288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=HTk4i+oGUYGc8bqqry+LXItG6TTV+A+7zTV7xZjokkc=; b=XsTcx8G71MSdmzKvXX1UeEaUZwF79eFeOmUTrKeEBnpDGvBDcr2PaoH6tO4s4YrvvuhghI O3nNeOk946MW7JzJJbqR+KrQP0z7e2ytOLYHv9Xfs0rJbCok91KKx4YbEHu5M4x+2Wzj5i 90HYCe5laJuqTnNyGzfr4B/W+ADRzkFy6P82IQuFZKDq/QIWPILuiSMLnycer8lHyYLbT9 IgmIlXpkDAlX4sW+Zq0y5/kQRD8FnFpyczHUv2tXXCAm84CBO5dnG/miTAB6bc7upRoXtM V67uxBZ1VTWW8q7iLyI2O9iBS7D2WEllPzDepelXbnWA2bNOux9nhpQZT7CYiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759685288; a=rsa-sha256; cv=none; b=ElD5YBgvm7SKf/Y9h+SftpDUrQNNnQKouCHQSKdjRPviAk0ydyrQmQF+1qNT8MZ7RTSBcj gEGBxF1o7mxQusEjjDd9jjFyOelYFlaJN1hPrs4jX6cEx2GORBisegzI1mBDoow1dkzonQ 4j3kggMlyOIxk41+4kpzOVbe5Vbk/xBjMbyFW1K4OCRas7KrXJegOj/kgoWUy4BfYpczO8 sMGrHOXJ0X8SDfbUaVMww0LQE6RrgkVg/6tz3Jh2Pljc3uE/cW5AMnIRk0GEagZespelHg jHfOv7jenMrjK45B+j2ndNzlhgaLJwnjwdIGV2d9rmBlB3WfkVvp1pduPlT7rw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [192.168.0.88] (unknown [93.188.39.137]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: avg/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cfq9h0cZxz83J; Sun, 05 Oct 2025 17:28:07 +0000 (UTC) (envelope-from avg@FreeBSD.org) Message-ID: <03504952-1691-447c-a502-1758c6792efe@FreeBSD.org> Date: Sun, 5 Oct 2025 20:28:04 +0300 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 84e1eb50dd95 - main - net80211/regdomain: try to sort out TW To: "Bjoern A. Zeeb" , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202504121651.53CGpnEM060389@gitrepo.freebsd.org> Content-Language: en-US From: Andriy Gapon Autocrypt: addr=avg@FreeBSD.org; keydata= xsDNBGcKrHEBDADRvwQOK0b/yo4ys5cs6bOQMhEh4xtfbaZ/CU00cpPgUip3sOZCdrtMWlRC g25z97prxE9pKueZi+HXDhIPpa9xl14ghqF4oYScuJ1i18HyiOH2y5Q3Vv/TtFiSzicd3EAu QgS3jVidpgDSPDdj2Yz3UxYpZ+PuFl6nOnvCvqOFcjUlzKCyPaiN2b86l1Nscmhnc+zQ/faB erUOEFEDQbWMA5YfXi8HrbeR16hfRfGt7E0aMDlIj9FIPIq71UWMN9CimPgs4+rbNr1MAlLa z4GxSDhVYZEY5rqtCzr+PLXboRQWnaUwXl0/biw9enf17NHdYv1SNAFTX2eC4dZ3qBVI74dS PgNprm+PMfz+6Hhs/dAv+Nan5nVhg3EFIjYTiy0MnjMSq8uI0v0ykpAGAcJJ5xl6d23aLxgN 6f0z6pJRCO0hGPgU7UzvFD0MxJxmbzqdT1R51KDan1oD41b+tjl2LMBuCDCoB0U44Pu0zLdp xMfFTxCXtwIYKIUxwd28jwMAEQEAAc0eQW5kcml5IEdhcG9uIDxhdmdARnJlZUJTRC5vcmc+ wsENBBMBCAA3FiEEmXvSmjiQFHPVOpLnzDOt5NLj67sFAmcKrHEFCQeEzgACGwMECwkIBwUV CAkKCwUWAgMBAAAKCRDMM63k0uPru5tSDACFK15LLbq89RSQ6QMnjiIm1t/wYJyumb519MHu Dhzxx1lbr8oghf0RHtF6kYRLQPaW2VdToi74pRobd3CN4bhZKDLSL6WfTn17RfavDjL6Njwp KBo30CkOeYKWq1mDmo0xEoQj8cc7ybEZnus+YScZOpj8Ti4EFwhRt6SHer7YDb161IHKL8m4 MsCxpFSGEjbKj8Iul3Ri/fTOO8w14ivcuEEQIvJt4/+4YV5Az8G23wKzL/3aJ7SOT3oYGmR9 atBTmVO3DlODjM+rZLegd8SfLSPTcBTHspWE5duemIzZbEX3BP77r3Qx4Fo5Tkit3bG1XVar yPQato+sFGFEGifdE9USBQoAoOaaeZevwAWjDU0TIuCT0CUe0sKtQuNP4LRq0n9EEHOXBu9a CfdMhFUSkAZnuE7miSVwgPvoVNJ1stA37EXLN/sVsWik7wslTQ5vF81VpdGFiwoQPOe2XEKh ogcwGSnXbwv1gD4x+Gz/7Y+kFyr1NY+4/nSaeXVcS2fOwM0EZwqscgEMAMQTe6ypAmQe/TFO HqKD2hfFKdksTptKi6uEh8xIwct8G/0FBldDWXo9eu8CGr/ZrDg0/bAwJxbaLRQCMH19Gq2Y hLvZ1QK5GQJVzZKcqfxbF2LiDUTs6WkdOBIhGpdDy7p1xFrvqCGCtNFYHuGYm067EozibBSF BWAPstKu2FQuVHZNMOfs7p3OIz3Yfqu9woXDeg3/8G2qVQJINe+8EwXKlhgh4CyDbq7nAZoA kIu1SE9z9u3WI5mcNy/0dFmVUsFxBqRC3ewbvzie8tKyZ9yFOlaZPT0Y4nRBXQTI3mLZ8zQ8 mtrWK5OOmrJ02kdeO9RBXe+OMaUUWMf92ZIoBFb4HP6N+B+4N1y1OwULousfl7JRoYxA4MRL ls7E2sSoJvrEBTJB3Pc34xu8rsJ1A5V3NgN6djX8yEZYpTRkcmrBeWy/ofDqZPVqneAx0LRm eldDS9msXDW4KXODyPZ+9unvmHAcoH0xaBYaSH44CDZDQDg4LNcmbOvuu1TEXBJhjQARAQAB wsD8BBgBCAAmFiEEmXvSmjiQFHPVOpLnzDOt5NLj67sFAmcKrHMFCQeEzgACGwwACgkQzDOt 5NLj67sUCAv5AXqgWnYN9EblapMbZjkiqL8pZQ0GNqh+Pg9FwbyULxjtRTO6rD4D0IxizByb ef+neeUNyYlagt5nfKMysEr0SU/gHKCi8vyTF/63ukMrGUNGmJJxrndl5ZYKC6j6eX7twrZF L1Uvlmn6FnQ22red5kHO93fDjG4zaDIZvHfwj7kzjZ4tpC7Byinf88s14mdZeScc0PnU2hj4 UGYju/wg2FF4YxaZYhcmdTiRYY0Wx85XSMZv19pnn78sadEuRvfRd4JTmw++j1xGXeqQGWzz /CTG5/Ex9GAkQ02hZbmi236byDXoet4G8TEyOph9QFVkV9bNd0jQZaFZPGEj4PSPUYGAF7s5 xJaNGgctC3aZ7WjEv1FBoo44XCU4xcjJ1wZQUrHxRhx6TW0Jtcl0U9qfKFW30TSPo6RyiXuj X4ltWKAtjoXB8nUmEJckaz7IRu2b4pXDeazZuz5JBygUs10yJjDxh2vFQZo0KaBAPx9MZlPn gpPTjT15L8xGftEjQXF6 In-Reply-To: <202504121651.53CGpnEM060389@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/04/2025 19:51, Bjoern A. Zeeb wrote: > The branch main has been updated by bz: > > URL: https://cgit.FreeBSD.org/src/commit/?id=84e1eb50dd9529b234e568ccb6f6c37f897688dc > > commit 84e1eb50dd9529b234e568ccb6f6c37f897688dc > Author: Bjoern A. Zeeb > AuthorDate: 2025-04-11 13:12:41 +0000 > Commit: Bjoern A. Zeeb > CommitDate: 2025-04-12 16:49:39 +0000 > > net80211/regdomain: try to sort out TW > > Try to help people in TW to get onto 11ac as well by adding the missing > entries to regdomain.xml. Use at your own risk. > > regdomain.xml is unmaintanable in the modern world with too many tiny > difference between countries. We'll need a different way to generate > this or a different representation long term. > > Sponsored by: The FreeBSD Foundation > Reported by: lwhsu > Tested by: lwhsu > MFC after: 3 days > Reviewed by: lwhsu, adrian > Differential Revision: https://reviews.freebsd.org/D49776 > --- > lib/lib80211/regdomain.xml | 254 ++++++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 253 insertions(+), 1 deletion(-) > > diff --git a/lib/lib80211/regdomain.xml b/lib/lib80211/regdomain.xml > index 557af0349cb0..9116e54c31cf 100644 > --- a/lib/lib80211/regdomain.xml > +++ b/lib/lib80211/regdomain.xml > @@ -1187,6 +1187,202 @@ > > > > + > + TAIWAN It seems that all other domains have sku element. Looks like taiwan gets an implicit sku of zero. Is that intended? FWIW, those sku numbers look quite magic. I have no idea where they come from. -- Andriy Gapon From nobody Sun Oct 5 18:42:35 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cfrqc4lRhz6B8j3; Sun, 05 Oct 2025 18:42: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 4cfrqc10Fpz3dnW; Sun, 05 Oct 2025 18:42:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759689756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8p1gah86hChfz7JOFJ0tq1vDNJI7ex9lRr8qLWrW8L4=; b=AMDQnHLbLlUI0yTaVpm6axCld0kKjSJ1bE4REE2QDFq5NYJAh/ZuswKmIUsY/dzHwfQ5ek I2HClLJgqdHdjVN+ZlS/on+wGAaKdg3xM/iyJtqi/HhtRLD4ScCh16pHETVl6Zrp77L+j1 vM47MspOUdBrLvb3isSfP+kTMq44pIQByuXKiQdY6lf2vAkirIwWfxbIpnOL+x+L78YZX5 wFmO73nD/yRgoW7a5yq9VODCaiCEvMDwVjD2f21NkVv6Fs1npBwbUZqMQkmwG4tU7wuMZF q+TBP7ua7nDG15WEZldIKDWaXvGIaP5QovRzUJ7QKU/O4ntMala890sK3aCbYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759689756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8p1gah86hChfz7JOFJ0tq1vDNJI7ex9lRr8qLWrW8L4=; b=w3Y8U+inY9tCdrzFl2Ljq8Dvs915P0B19d8HX1IIsQadInRioK6+2j46TTdGLNGuacHZRV E4FVZTbcS4IKbi0NRLpRIGwL+r4U6b8f1yLOc2NNC/u8VvuiL3NTpdHg+3fKJJTbim3KEX 6V0fD/Lbba8BM4WjQgrjdHaMYBZIXNX7Cy2X9h8oKmJ4XQlcwHR63vVaj90e2i3lT+t8uT twGiwI6kxga5hNDkerRbGJjV7DkhgLOYRgYQGKEzJCWBwreiyuYvHQNKgK4yqhdgcJq5Pf SUKkK8EB2VNLWtLW2QXXgdTQa+Qy6C0J1wlGmNQHXpVlNQBvdt6WXNAtiqWhiQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759689756; a=rsa-sha256; cv=none; b=YxxIm7nvEFgqfpIRa9eMQSvxnO9sBj+OkwUZVel/o3pLED2ZSlf007Jb2sQ35e7wk39L33 ZRt3o9ZFfiYSr7Ql1lGsQ/qVC8csQfJUwq23mTTJo8FV9rZEVX3Xjjzh4+NtdIXxO9vstY t5ZXNpzBSKfNBONRoWw4YsMnUkUsJhPz2XCcqwQvsAIu2SlSZTKMn8jHPiPPGluQ2zaBVV vmaiwblTDeyFRP+V7NEsIBzLmge9xrRk5MbRAd7JJuRlSXdb6bgi3G96OWaEqbun6HFzZT e20O4v9bz9seI9Gd30Q2XK5qgzfMlroyDwlKW7rsbbSWDFR1KY20WsLzoV75tQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cfrqb6tzgz8gJ; Sun, 05 Oct 2025 18:42:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 595IgZWc096592; Sun, 5 Oct 2025 18:42:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 595IgZiu096589; Sun, 5 Oct 2025 18:42:35 GMT (envelope-from git) Date: Sun, 5 Oct 2025 18:42:35 GMT Message-Id: <202510051842.595IgZiu096589@gitrepo.freebsd.org> 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=B8rgrav?= Subject: git: ec6ad605ecea - main - rc: Improve netwait DAD logic 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: ec6ad605ecea5c4a76d2e744df0265cc3f3a01b9 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=ec6ad605ecea5c4a76d2e744df0265cc3f3a01b9 commit ec6ad605ecea5c4a76d2e744df0265cc3f3a01b9 Author: Dag-Erling Smørgrav AuthorDate: 2025-10-05 18:40:39 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-10-05 18:42:33 +0000 rc: Improve netwait DAD logic Disable if IPv6 is not supported, and instead of 10 seconds, default to one more than the value of net.inet6.ip6.dad_count. Fixes: 5ead817c3b7a ("rc: Teach netwait to wait for DAD") Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D52905 --- libexec/rc/rc.conf | 3 ++- libexec/rc/rc.d/netwait | 10 ++++++---- share/man/man5/rc.conf.5 | 9 ++++++--- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 2589e2614c35..c776a815003c 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -501,7 +501,8 @@ netwait_timeout="60" # Total number of seconds to perform pings. #netwait_if="" # Wait for active link on each intf in this list. netwait_if_timeout="30" # Total number of seconds to monitor link state. netwait_dad="NO" # Wait for DAD to complete -netwait_dad_timeout="10" # Total number of seconds to wait for DAD. +netwait_dad_timeout="" # Total number of seconds to wait for DAD, zero + # or unset to autodetect ### Miscellaneous network options: ### icmp_bmcastecho="NO" # respond to broadcast ping packets diff --git a/libexec/rc/rc.d/netwait b/libexec/rc/rc.d/netwait index b609440a2e4e..05874552cf1c 100755 --- a/libexec/rc/rc.d/netwait +++ b/libexec/rc/rc.d/netwait @@ -36,13 +36,15 @@ netwait_start() err 1 "Nothing to wait for" fi - if ! [ "${netwait_if_timeout}" -ge 1 ]; then + if ! [ "${netwait_if_timeout:=0}" -ge 1 ]; then err 1 "netwait_if_timeout must be >= 1" fi - if ! [ "${netwait_dad_timeout}" -ge 1 ]; then - err 1 "netwait_dad_timeout must be >= 1" + if ! check_kern_features inet6; then + netwait_dad="NO" + elif ! [ "${netwait_dad_timeout:=0}" -ge 1 ]; then + netwait_dad_timeout=$(($(sysctl -n net.inet6.ip6.dad_count)+1)) fi - if ! [ "${netwait_timeout}" -ge 1 ]; then + if ! [ "${netwait_timeout:=0}" -ge 1 ]; then err 1 "netwait_timeout must be >= 1" fi diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index c0048f27c740..edbfa937f8df 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 2, 2025 +.Dd October 5, 2025 .Dt RC.CONF 5 .Os .Sh NAME @@ -4618,8 +4618,11 @@ Set to to enable waiting for DAD to complete. .It Va netwait_dad_timeout .Pq Vt int -Indicates the total number of seconds to wait for DAD to complete. -The default is 10. +Unset by default. +Indicates the maximum number of seconds to wait for DAD to complete. +If zero or unset, the timeout will be one more than the value of the +.Va net.inet6.ip6.dad_count +sysctl variable. .It Va rctl_enable .Pq Vt bool If set to From nobody Sun Oct 5 19:32:54 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cfsxk33cnz6BVf4; Sun, 05 Oct 2025 19:32:58 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cfsxk2GDJz3lwc; Sun, 05 Oct 2025 19:32:58 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759692778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=isXAMm6IWuAPXy5OjqLU3MsFRaB/0l+K+ez3nu2TJhA=; b=Nij6Imn+ZUwMSIM2L0W8LMUXlriZ+mfzI3wq8bzCNhPm/0W2ytvlSwaPiguFRr3UT1A+1z BJFjLEcC+4ugCPsYbw4dK4tB9ghEm1m51Ro+BRWjl8gfAII+hPpm5kZTrYhlNcYJbAB8py oI1W3igX53Jg7M6S2wRsxjyDJM48NacT7ZEGFJiBSfX74E/dHVDmacJGukGPSR8FqnmWbm 6OxnXtYsdEflQhbazvIYX32cN2WRtbBze2m3PAZATXC+0BZ+PEMRNZ4o8fnkUhKguf/fe0 vWejGGhl4JFu9mcPsOLWlQ/kOGk0VDv/IoXpsYIy/tfzfg0Mpa8lvYfdRsFKig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759692778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=isXAMm6IWuAPXy5OjqLU3MsFRaB/0l+K+ez3nu2TJhA=; b=yqdBafGdgGrm6lLyDKKZsbWH4SbY/BAd/mi0QJ0lv20cKV79W1wughbGKx8EFx1DjCMMOT mO/gmk8FblX/SI94XVwlIzeXIr9iN3jDx9oBs4mgZCbpSMtzoYNsunvHV2DnveY2gj26tQ XTtFwxZCHiC6sH8d1uNISwgT5AaX+xn4pBUt+iOriRjuD/KxRKRjW0oR5UMI+yObc0HU4k YWSw3BBiVxU+Uy53xt1JFT/PGehvmhiXfRYqWaKNa/kWRGJZjBtJWP9PMGMAcj9Ztz0+Ik WopCZ8lzRpAnaIZv9v8nnJjUYFFzcnEXx8TKOhWCMl6fN/ToJFILRSxXkI3U7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759692778; a=rsa-sha256; cv=none; b=Xn75hijOWIqTFVQdv49AyEzMoPDHtSZ/YwWl9fexFr7IgRgTSoxhXodHCZgEEg1t+JzbTo EfMHxiEogQ1ec93rDw4ZbTDCMQmcVt7hgNJzywAVL4Yz1i+tWidh4rtFUJ3QJC27MSyPOJ CgpkbTfY3qrE3IDHA8ZQRtiz6LDco0m05a8ThcdTWdsdCzuHNuUpWwgH2p/WVh90OzepYE +g6lxHGS/n7pWMMBTuTI6DADR/Ww1EC0NiEtRdbJZbHS9neqDUAf9OffDNe2K6tEleX6Hw Cm4fiUoBIhMbvGSp+cRrFLp8Z0CwCe79pdgl2s3q9VSQ4oF1iaEfJscAYFfrSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E6" (verified OK)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4cfsxk0kTqz9Z8; Sun, 05 Oct 2025 19:32:58 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id 5D99AA64805; Sun, 05 Oct 2025 19:32:46 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 358F82D029E6; Sun, 5 Oct 2025 19:32:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id oHS2sO8Lk_66; Sun, 5 Oct 2025 19:32:55 +0000 (UTC) Received: from nv.t4-02.sbone.de (nv.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 125C22D029D8; Sun, 5 Oct 2025 19:32:55 +0000 (UTC) Date: Sun, 5 Oct 2025 19:32:54 +0000 (UTC) From: "Bjoern A. Zeeb" To: Andriy Gapon cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 84e1eb50dd95 - main - net80211/regdomain: try to sort out TW In-Reply-To: <03504952-1691-447c-a502-1758c6792efe@FreeBSD.org> Message-ID: References: <202504121651.53CGpnEM060389@gitrepo.freebsd.org> <03504952-1691-447c-a502-1758c6792efe@FreeBSD.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed On Sun, 5 Oct 2025, Andriy Gapon wrote: > On 12/04/2025 19:51, Bjoern A. Zeeb wrote: >> The branch main has been updated by bz: >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=84e1eb50dd9529b234e568ccb6f6c37f897688dc >> >> commit 84e1eb50dd9529b234e568ccb6f6c37f897688dc >> Author: Bjoern A. Zeeb >> AuthorDate: 2025-04-11 13:12:41 +0000 >> Commit: Bjoern A. Zeeb >> CommitDate: 2025-04-12 16:49:39 +0000 >> >> net80211/regdomain: try to sort out TW >> Try to help people in TW to get onto 11ac as well by adding the >> missing >> entries to regdomain.xml. Use at your own risk. >> regdomain.xml is unmaintanable in the modern world with too many >> tiny >> difference between countries. We'll need a different way to generate >> this or a different representation long term. >> Sponsored by: The FreeBSD Foundation >> Reported by: lwhsu >> Tested by: lwhsu >> MFC after: 3 days >> Reviewed by: lwhsu, adrian >> Differential Revision: https://reviews.freebsd.org/D49776 >> --- >> lib/lib80211/regdomain.xml | 254 >> ++++++++++++++++++++++++++++++++++++++++++++- >> 1 file changed, 253 insertions(+), 1 deletion(-) >> >> diff --git a/lib/lib80211/regdomain.xml b/lib/lib80211/regdomain.xml >> index 557af0349cb0..9116e54c31cf 100644 >> --- a/lib/lib80211/regdomain.xml >> +++ b/lib/lib80211/regdomain.xml >> @@ -1187,6 +1187,202 @@ >> >> >> + >> + TAIWAN > > It seems that all other domains have sku element. > Looks like taiwan gets an implicit sku of zero. > Is that intended? > > FWIW, those sku numbers look quite magic. > I have no idea where they come from. My limited understanding is that the SKUs were straight out of Atheros land and in general would only be usable for one product a time. There is very little help of them in regdomain.xml as the only place the information makes sense is somewhere in the driver which needs to know which SKU at which time was mapped to which regulatory setting. We may have to provide lots more of regulartory settings, especially for JAPAN (50+ in theory now), in order to allow a proper mapping but we are far away from this currently. If you look through sys/contrib/dev/athk/reg* you can get a gimplse of what is involved. I am sure Adrian can fill you in better than I there and you may find a posting or two about this topic on the wireless list archives. There's also other bits like the mapping of country to regdomain which is tricky to fill and yet stay minimalistic. At this point I would rather have a complete plain set of all countries in the current state updated and semi-proper than the full combination of all current and historic versions (not saying we shouldn't [re-]add them later) but we need to start somewhere and likely the first step is simplification. /bz -- Bjoern A. Zeeb r15:7 From nobody Sun Oct 5 20:16: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 4cftwS5vn0z6BZjB; Sun, 05 Oct 2025 20:16:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cftwR3q6Yz3rhH; Sun, 05 Oct 2025 20:16:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759695416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z7xYTUQRwaoN3Ckk2O4zI+bKA90cheWcLuVdKp40W98=; b=nUJHmhsrQD/987SjJrvcxcozAFSHwAfQbPymIxN8aiz4oTUGnEmCnt9LII12bgS3onNRea uSWcEVVP4HPVB7s4KqBe1mvhYzay7S1aCJHr7CApzSx2zzyQRB7u58vUuA8Co0V1RZrgz+ ehMcDf0nhoMEsGL6fPQvIqmr7PR2iP+HIgTWUviTww2KZfr6BXqyYNGBz+p1oTIn3quF00 +TBXefdJmD0458gRjZZK4CurKsmwyM13PfyzBJ4Kkq/HhpcD/go5FBjFNdffWQ1TNv+MR4 R44qySkCkA70bfKPj9H3IZ24i/0UEbZ3JwJE5eipjL9ZiY/0h/bc8doRPcwLZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759695415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z7xYTUQRwaoN3Ckk2O4zI+bKA90cheWcLuVdKp40W98=; b=dOTs1XsSgpDQzegzWhyNyWI4FEEJrY+Nyz9hMfkgGnnxd0eNE5AN/Iq80eqljwvNPKZORD LqmWSiTtYt9gX3Dg5p3OmPcnfmfjM9jryxlwTiFSxcWJrJEsbD4LeTXaSjPt51KfUWyJ9a QjZld25xYWWdNWFPVlYaPD4PpLNXZAqDQRBJPp/8eJEN1n56QXlaEVqPs87H9iCANT1IZ1 2CDLcyqNixzp7af2oc1Xi86g15Lafp4il/INOsihhqxnAqE9uDNDRYHshlWH01Fb/1gZd9 SV2jU26hnNBOE2jI5e8pTMUzZ4/6T0RY43JvFGgbk/xHOv5A4EEr8hwrGedbKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759695415; a=rsa-sha256; cv=none; b=FDXkxV+DELb5n/gOk9/GTabw9YStyrXl/Kse9aiXzTeRcpnVyOT/LnQWq9I4XUMhz9OHtM HrRG9W/gCAM2pY0Nequ46jlWFk/0wZTRfRs9jjPFkf0QoPPA7MnTjMDpMwaJMPvC35KuD0 2j6/o1gAwaMjpkNEgid0Giz+KU+u+bpi7I2eqOwNqVUPCKZIhxStA07RnNwdr/F37Oh+11 PIcrOdBQxKKr4wdppXfvCmjQ9nxVOBxgcbrRwVzZbRjYrnjMtB2Q2qMIY6kipNrx98CjDF BDAAXWxkA6XtALNQ/JifDINoc+B6nHnc5GZiYpAD2L+ttb6YWV/ea6eC3muuMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cftwR3QSzzBmv; Sun, 05 Oct 2025 20:16:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 595KGt9Y068574; Sun, 5 Oct 2025 20:16:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 595KGtRJ068571; Sun, 5 Oct 2025 20:16:55 GMT (envelope-from git) Date: Sun, 5 Oct 2025 20:16:55 GMT Message-Id: <202510052016.595KGtRJ068571@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 9e6cea12abda - main - release: packages: Fix typos List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9e6cea12abdadb9f81dc13c2d3eb4ff8f0a19e99 Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=9e6cea12abdadb9f81dc13c2d3eb4ff8f0a19e99 commit 9e6cea12abdadb9f81dc13c2d3eb4ff8f0a19e99 Author: Jose Luis Duran AuthorDate: 2025-10-05 20:16:15 +0000 Commit: Jose Luis Duran CommitDate: 2025-10-05 20:16:15 +0000 release: packages: Fix typos Reviewed by: cperciva Approved by: emaste (mentor) MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D52917 --- release/packages/generate-set-ucl.lua | 2 +- release/packages/generate-ucl.lua | 2 +- release/packages/ucl/ctf-all.ucl | 2 +- release/packages/ucl/fetch-all.ucl | 4 ++-- release/packages/ucl/openssl-all.ucl | 2 +- release/packages/ucl/ufs-all.ucl | 2 +- release/packages/ucl/xz-all.ucl | 2 +- release/packages/ucl/zfs-all.ucl | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/release/packages/generate-set-ucl.lua b/release/packages/generate-set-ucl.lua index b1b70053b02a..3c8474bf8e68 100755 --- a/release/packages/generate-set-ucl.lua +++ b/release/packages/generate-set-ucl.lua @@ -1,7 +1,7 @@ #!/usr/libexec/flua --[[ usage: -generare-set-ucl.lua