From nobody Mon Jan 5 01:25:29 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dkxST3wybz6N9Dv for ; Mon, 05 Jan 2026 01:25:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dkxST1WQBz3wrD for ; Mon, 05 Jan 2026 01:25:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UNhyLY3S5X2bLjCn1xZNco3dgvYsGz986KC9UrPtvuw=; b=VybF1mnG8o68ltL4n9+/MPng7w/Kp6rD4YDVKGHBcSrh5pNY6bnJj0fDAo3oXpia3EufkA Pe1wAb2B2MHTUkht5GYDK5RDcROks/TUHdTGg6cWQ9O51ncYkr+zjEPWi/8Ck50U/+s4aV YwtKJndH1KIt99leKkUJkUAQHmnr9n0EzBhnDOzx/79DM5hjEObEz3vHJyySSD5iLyiafC Hf7hZCy9n3i/jEZySOfzbLiMxZAZ47ZVNy3pAO2abgpeGuF/aBSlHs2W0LvHZ/76qTczm2 34MIZfyyGKwXaar0w9DlI3HKJZ5vfpMjhUPHT83M6W0D2MRAx6z5xQc+1ulhqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UNhyLY3S5X2bLjCn1xZNco3dgvYsGz986KC9UrPtvuw=; b=N3xMJKapB9iApj6ESzQCRGu8NBm9RIyJBlE9TsH6JL5spIfMo31iTCSiEqYUJJjR6aDtp8 5J5k+bSlrvmU4RA/nlEk8P4ojwN2Pu084R11b7rpog9E9ROLKWrZpAbspoObZglfWSxq4i cTmHNfRzy/Ka+30iwO2dnf35Wu7o821uiUtmRLzkK0GTzpQQP3pyxTEfr1AREjPYEwBVax cTmZEDkyZKC7VIZKrtu8YH3XKgKDUQHEOQuwaoHC3EElOMlwmhRKUfZoD/wVNLR2B2JWK/ TOtb6Ynq40F/ZL0ctROjJhq1Qo3GomXLrKWXfiiqF/TygRMjcYcA4eM2aZK8JQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767576329; a=rsa-sha256; cv=none; b=LpHHIbCM7IqrcUUI73yDqVJaD8vWrgLBoZHMzySAQn8mA6sDFhHKkNqSjcDAcwhEyLc8TL 9KR3RiCc6BIXA0cooidcU+ZUIIkfsL83gpS6mstOdAyIWRKLjXyXsORlsaDnxWgCwm6ocd JiHNE83ZluAv7W4TeRxGTrSiuswSrjP8j574cRPCUyAgOZiSsccl+XCmoeeH0aTn7qKdmp kFHuIA08B58w2eCc5Aec5dH/IaUu8x33UhZqDeI6HWaEURkgi58e1eTTdsrVi0ci52zqhb tQP13jQupgxT8V3JWd2wUavTd1R2nI1dbRf7CeVTqqt8zoOUQ17hp0xxgZtdlA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dkxST165rz10Sd for ; Mon, 05 Jan 2026 01:25:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37d65 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 01:25:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 4c273b71a473 - stable/15 - exterror: add support for the format specifiers in the extended error msg List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4c273b71a473ca571c331e5d9d8cedeed024649c Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 01:25:29 +0000 Message-Id: <695b1309.37d65.64aaa7d@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4c273b71a473ca571c331e5d9d8cedeed024649c commit 4c273b71a473ca571c331e5d9d8cedeed024649c Author: Konstantin Belousov AuthorDate: 2025-12-27 13:54:42 +0000 Commit: Konstantin Belousov CommitDate: 2026-01-05 00:44:19 +0000 exterror: add support for the format specifiers in the extended error msg (cherry picked from commit 8bff95f3ce0396ff40b4f7d943ea856ac3f846c3) --- lib/libc/gen/uexterr_format.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libc/gen/uexterr_format.c b/lib/libc/gen/uexterr_format.c index e8ddfbd578e3..68cd2abfe312 100644 --- a/lib/libc/gen/uexterr_format.c +++ b/lib/libc/gen/uexterr_format.c @@ -29,7 +29,8 @@ __uexterr_format(const struct uexterror *ue, char *buf, size_t bufsz) ue->error, ue->cat, ue->src_line, (uintmax_t)ue->p1, (uintmax_t)ue->p2); } else { - strlcpy(buf, ue->msg, bufsz); + snprintf(buf, bufsz, ue->msg, (uintmax_t)ue->p1, + (uintmax_t)ue->p2); } return (0); } From nobody Mon Jan 5 01:25:30 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSV442Qz6N9Qg for ; Mon, 05 Jan 2026 01:25:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dkxSV24SRz3wg3 for ; Mon, 05 Jan 2026 01:25:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mV+C6uO30MGqCsT0g5/jGzLIMB4S/xyWZkhgzhutvFE=; b=taAEx7l6npG6HAuaVa+PTlK1fSWKWgmRgVNjWEFhlhV7fk/U/5ef529z9wLUbtW6AhKqTB 9fFkExl+b0xZXlPN0RFzHJF1qqIe7ZrKaAOATHUXncAm2KlJ0vp8G68QDe+H3SlBoz1UAq GFuwjOtgmAID7bLWsJofJmm7TZrGEKLgbN6sj8nxdSCjOrp5zqvUC6LD/3Y3Dl61iq/rmn oGJrBT7X/7qQpn+8WrCup2mnhemJ3xhBrcwsbUBL0y+HJlFwBlQXB+rMfA1vrsYgg2KLti w1rHFPqjQ7SJdH+I3RQ0CotVfKlddiSAc2/ZSAuEw77EAjYZUKskfuYt9sf11g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mV+C6uO30MGqCsT0g5/jGzLIMB4S/xyWZkhgzhutvFE=; b=KWqdTLX1T1AwV662vOS1w+ZIuKZY//ySti0f3n4B1n+HSZyn4gNp0KHAzvQrWFeDYn71hN ScjVnWJD2HKcYMgtF073QzrnXotdFVP/PSXi9wVYHw93USLfS5pKDaBwj/02uuJ9usgjju yNwaM82HahYczAPN/49yX6n3/Ip+H5HJvUy+NFmbb+NfZCYULwKr1JoLE0p3hwmDPZyrnH f5Q4G2+GUMHFl5jhW8GV+Ak08+ApAej4EWHMAA+FiE/xFQJl5lKncsK2PMR93JwpTNl2AL eJPixa2TEN77kdb1jG0BupjcnZXbq5dahcMgU5ofe74l+a4ZfTjHp8Na2zxPKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767576330; a=rsa-sha256; cv=none; b=g10V309QhOk03AWAe+UpSL4J5IjSeIX4I/nGE+nE+MfwvIEkuNFG0OuthJ+Yxqn8KQrsw+ UtZHy+WDwGZQgR9Os47ahL16lxkMDZhaICCW8oaVODc2cXE4B+GzGLTuggYfAlxK6Whn1F aBZoinNb0WhsaBir+urTL2JGm/Y8djoXczxVqJzCrGn2nmKs2zcSbEcM8+NMRSUipq4Hn7 xAkyQ95nq7MogUTNfBbA7PDDivLxuX6YmGGnyNGZfsRbp22hg3Y/DabWLB1MDZ4h2PDhyO pFMJhyzyoApoSsYgmGoxJdTp/pRu4ES/Wvb7+rTXi/2Lj2eF/hWV9Z0ed/Fl2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSV1WFfzylN for ; Mon, 05 Jan 2026 01:25:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39828 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 01:25:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: ca345aa37b80 - stable/15 - exterror: Add EXTERROR_VERBOSE env variable to control verbosity List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ca345aa37b80f3ef8338651c2328e1777b86b43f Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 01:25:30 +0000 Message-Id: <695b130a.39828.4c09e56d@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ca345aa37b80f3ef8338651c2328e1777b86b43f commit ca345aa37b80f3ef8338651c2328e1777b86b43f Author: Konstantin Belousov AuthorDate: 2025-12-28 00:23:27 +0000 Commit: Konstantin Belousov CommitDate: 2026-01-05 00:44:20 +0000 exterror: Add EXTERROR_VERBOSE env variable to control verbosity (cherry picked from commit 42210fe8dcd4684a45e0e4db1b8194e291dc8fda) --- lib/libc/gen/uexterr_format.c | 53 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 48 insertions(+), 5 deletions(-) diff --git a/lib/libc/gen/uexterr_format.c b/lib/libc/gen/uexterr_format.c index 68cd2abfe312..3321fd80616d 100644 --- a/lib/libc/gen/uexterr_format.c +++ b/lib/libc/gen/uexterr_format.c @@ -11,26 +11,69 @@ #include #include #include +#include #include +#include #include +#include + +static const char exterror_verbose_name[] = "EXTERROR_VERBOSE"; +enum exterr_verbose_state { + EXTERR_VERBOSE_UNKNOWN = 100, + EXTERR_VERBOSE_DEFAULT, + EXTERR_VERBOSE_ALLOW, +}; +static enum exterr_verbose_state exterror_verbose = EXTERR_VERBOSE_UNKNOWN; + +static void +exterr_verbose_init(void) +{ + /* + * No need to care about thread-safety, the result is + * idempotent. + */ + if (exterror_verbose != EXTERR_VERBOSE_UNKNOWN) + return; + if (issetugid()) { + exterror_verbose = EXTERR_VERBOSE_DEFAULT; + } else if (getenv(exterror_verbose_name) != NULL) { + exterror_verbose = EXTERR_VERBOSE_ALLOW; + } else { + exterror_verbose = EXTERR_VERBOSE_DEFAULT; + } +} int __uexterr_format(const struct uexterror *ue, char *buf, size_t bufsz) { + bool has_msg; + if (bufsz > UEXTERROR_MAXLEN) bufsz = UEXTERROR_MAXLEN; if (ue->error == 0) { strlcpy(buf, "", bufsz); return (0); } - if (ue->msg[0] == '\0') { - snprintf(buf, bufsz, + exterr_verbose_init(); + has_msg = ue->msg[0] != '\0'; + + if (has_msg) { + snprintf(buf, bufsz, ue->msg, (uintmax_t)ue->p1, + (uintmax_t)ue->p2); + } else { + strlcpy(buf, "", bufsz); + } + + if (exterror_verbose == EXTERR_VERBOSE_ALLOW || !has_msg) { + char lbuf[128]; + + snprintf(lbuf, sizeof(lbuf), "errno %d category %u (src line %u) p1 %#jx p2 %#jx", ue->error, ue->cat, ue->src_line, (uintmax_t)ue->p1, (uintmax_t)ue->p2); - } else { - snprintf(buf, bufsz, ue->msg, (uintmax_t)ue->p1, - (uintmax_t)ue->p2); + if (has_msg) + strlcat(buf, " ", bufsz); + strlcat(buf, lbuf, bufsz); } return (0); } From nobody Mon Jan 5 01:25:31 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSX2Nn3z6N9W4 for ; Mon, 05 Jan 2026 01:25:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dkxSW3q9lz3wgG for ; Mon, 05 Jan 2026 01:25:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kvI7Vcl6NFH5ZGyIRRzm0VVGkZKBKdcpr7MGKgct/4o=; b=D/vyCQOVlZJHNiymZ7N45IOA1pRlcgFVEkad4T2XdLiVUY+burXPrm0ydZ7ivuUfdxlq+X yZF3qhZ3ezitvo2cFz2aTUtVa49xPH8uw/mI/+/5QF4P6ozC6pcvpzdh74SDNZJAZFxk81 T6j81HLbjNjwKJaZWvn8Q67nUwgjUkYIBb7RJYEtT6vH//1duimm5e0cRGmI5UCJyLJOuK L5qB1VdfTO4Uq9qbJnLoMKNV5scBiWdIRVA+EC5N1doSdkGVdH2yH6LxnLeyo8j1PRMpYS YN+1q1zg1l0ZRfciWPnX3e9HvRDZfUjR03MqzcB9+Q8lErfyrWOylw4YhTd0DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kvI7Vcl6NFH5ZGyIRRzm0VVGkZKBKdcpr7MGKgct/4o=; b=weSQOpoZRqTf/iTtaakc6Ro5BnutfXk7xbcCxIG9MMpkjiZv5v2SNzezI59YVjI6U363Zy kRaBQtULD0pB4iPmg5oDXbAjW1oYP+PuZc6R5ssbOApR4/IPWMz/YYbOXS4h1kfEd5Biax x4BtzTyYx2BMS6UgMw1W2YLWeiJG9kY6EFg5E3wdaAYuk4sDLSlBv65ZRE3rnY4JXVnSrN xQo8OQeiNU8E5Lq/kslyzCjgNXVlHyk0huiWyQHI1rTudoa0l45cH8lHMPSc21zsOv9Zkm FT4YQuYdH/OgNa4M7BNxCuMTzUihFGaUtHsIgu8k53Y1GNcmLiK8yfUTEP/Eiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767576331; a=rsa-sha256; cv=none; b=Haoj2T9/7HjwXQyrSBO3S/bsePYTY2XfmF6+VSxtCMEzNttrDWCfnzwg3K9A2uOUYfR7yG /FIUjYNGPoPas19OHSyPkG0rZ6kSiDEMXbDuqUqcd9tDjYMX1k8Jlu51J1SJiuVgx2ewYi Ck1jBdAePeeGVmohIqDwXCbz7hSc4QAi+5DBAChCZvNXFDWpBcZe0HnakkDarM3AYehajk VbePkw2qc20izB8Z+W4vpCjBKdEAGszEazFAuNm7z+sNP7RHNqiAnK5MNSm/DVI17BOlo8 YQgjwfI8UKxKOK6jKowlEQ/BHsJoB+SyI4U2cDgCN49/nGhzA1BASEQCk9tOVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSW2b7dz10QB for ; Mon, 05 Jan 2026 01:25:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39c07 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 01:25:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 6c797f50339c - stable/15 - vm/vm_mmap.c: inline erronous argument values for extended errors List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6c797f50339c10c6cc1af7509cdd3d988894800e Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 01:25:31 +0000 Message-Id: <695b130b.39c07.312bb7aa@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6c797f50339c10c6cc1af7509cdd3d988894800e commit 6c797f50339c10c6cc1af7509cdd3d988894800e Author: Konstantin Belousov AuthorDate: 2025-12-27 13:56:22 +0000 Commit: Konstantin Belousov CommitDate: 2026-01-05 00:44:20 +0000 vm/vm_mmap.c: inline erronous argument values for extended errors (cherry picked from commit 2904edaf2f09934142f9f6a6d2886879395145cc) --- sys/vm/vm_mmap.c | 43 +++++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index 501ace32bd11..234586893b59 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -197,12 +197,14 @@ kern_mmap(struct thread *td, const struct mmap_req *mrp) check_fp_fn = mrp->mr_check_fp_fn; if ((prot & ~(_PROT_ALL | PROT_MAX(_PROT_ALL))) != 0) { - return (EXTERROR(EINVAL, "unknown PROT bits")); + return (EXTERROR(EINVAL, "unknown PROT bits %#jx", prot)); } max_prot = PROT_MAX_EXTRACT(prot); prot = PROT_EXTRACT(prot); if (max_prot != 0 && (max_prot & prot) != prot) { - return (EXTERROR(ENOTSUP, "prot is not subset of max_prot")); + return (EXTERROR(ENOTSUP, + "prot %#jx is not subset of max_prot %#jx", + prot, max_prot)); } p = td->td_proc; @@ -236,7 +238,7 @@ kern_mmap(struct thread *td, const struct mmap_req *mrp) if ((len == 0 && p->p_osrel >= P_OSREL_MAP_ANON) || ((flags & MAP_ANON) != 0 && (fd != -1 || pos != 0))) { return (EXTERROR(EINVAL, - "offset not zero/fd not -1 for MAP_ANON", + "offset %#jd not zero/fd %#jd not -1 for MAP_ANON", fd, pos)); } } else { @@ -247,8 +249,8 @@ kern_mmap(struct thread *td, const struct mmap_req *mrp) if (flags & MAP_STACK) { if ((fd != -1) || ((prot & (PROT_READ | PROT_WRITE)) != (PROT_READ | PROT_WRITE))) { - return (EXTERROR(EINVAL, "MAP_STACK with prot < rw", - prot)); + return (EXTERROR(EINVAL, + "MAP_STACK with prot %#jx < rw", prot)); } flags |= MAP_ANON; pos = 0; @@ -257,18 +259,21 @@ kern_mmap(struct thread *td, const struct mmap_req *mrp) MAP_STACK | MAP_NOSYNC | MAP_ANON | MAP_EXCL | MAP_NOCORE | MAP_PREFAULT_READ | MAP_GUARD | MAP_32BIT | MAP_ALIGNMENT_MASK)) != 0) { - return (EXTERROR(EINVAL, "reserved flag set")); + return (EXTERROR(EINVAL, "reserved flag set (flags %#jx)", + flags)); } if ((flags & (MAP_EXCL | MAP_FIXED)) == MAP_EXCL) { - return (EXTERROR(EINVAL, "EXCL without FIXED")); + return (EXTERROR(EINVAL, "EXCL without FIXED (flags %#jx)", + flags)); } if ((flags & (MAP_SHARED | MAP_PRIVATE)) == (MAP_SHARED | MAP_PRIVATE)) { - return (EXTERROR(EINVAL, "both SHARED and PRIVATE set")); + return (EXTERROR(EINVAL, + "both SHARED and PRIVATE set (flags %#jx)", flags)); } if (prot != PROT_NONE && (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC)) != 0) { - return (EXTERROR(EINVAL, "invalid prot", prot)); + return (EXTERROR(EINVAL, "invalid prot %#jx", prot)); } if ((flags & MAP_GUARD) != 0 && (prot != PROT_NONE || fd != -1 || pos != 0 || (flags & ~(MAP_FIXED | MAP_GUARD | MAP_EXCL | @@ -295,7 +300,7 @@ kern_mmap(struct thread *td, const struct mmap_req *mrp) if (align != 0 && align != MAP_ALIGNED_SUPER && (align >> MAP_ALIGNMENT_SHIFT >= sizeof(void *) * NBBY || align >> MAP_ALIGNMENT_SHIFT < PAGE_SHIFT)) { - return (EXTERROR(EINVAL, "bad alignment", align)); + return (EXTERROR(EINVAL, "bad alignment %#jx", align)); } /* @@ -310,8 +315,8 @@ kern_mmap(struct thread *td, const struct mmap_req *mrp) */ addr -= pageoff; if ((addr & PAGE_MASK) != 0) { - return (EXTERROR(EINVAL, "fixed mapping not aligned", - addr)); + return (EXTERROR(EINVAL, + "fixed mapping at %#jx not aligned", addr)); } /* Address range must be all in user VM space. */ @@ -321,7 +326,8 @@ kern_mmap(struct thread *td, const struct mmap_req *mrp) } if (flags & MAP_32BIT && addr + size > MAP_32BIT_MAX_ADDR) { return (EXTERROR(EINVAL, - "fixed 32bit mapping does not fit into 4G")); + "fixed 32bit mapping of [%#jx %#jx] does not fit into 4G", + addr, addr + size)); } } else if (flags & MAP_32BIT) { /* @@ -1495,7 +1501,7 @@ vm_mmap(vm_map_t map, vm_offset_t *addr, vm_size_t size, vm_prot_t prot, handle, &foff, &object, &writecounted); break; default: - error = EXTERROR(EINVAL, "unsupported backing obj type", + error = EXTERROR(EINVAL, "unsupported backing obj type %jd", handle_type); break; } @@ -1578,7 +1584,7 @@ vm_mmap_object(vm_map_t map, vm_offset_t *addr, vm_size_t size, vm_prot_t prot, * exec). */ if ((foff & PAGE_MASK) != 0) { - return (EXTERROR(EINVAL, "offset not page-aligned", foff)); + return (EXTERROR(EINVAL, "offset %#jx not page-aligned", foff)); } if ((flags & MAP_FIXED) == 0) { @@ -1587,7 +1593,8 @@ vm_mmap_object(vm_map_t map, vm_offset_t *addr, vm_size_t size, vm_prot_t prot, } else { if (*addr != trunc_page(*addr)) { return (EXTERROR(EINVAL, - "non-fixed mapping address not aligned", *addr)); + "non-fixed mapping address %#jx not aligned", + *addr)); } fitit = false; } @@ -1599,7 +1606,7 @@ vm_mmap_object(vm_map_t map, vm_offset_t *addr, vm_size_t size, vm_prot_t prot, } if (foff != 0) { return (EXTERROR(EINVAL, - "anon mapping with non-zero offset")); + "anon mapping with non-zero offset %#jx", foff)); } docow = 0; } else if (flags & MAP_PREFAULT_READ) @@ -1702,6 +1709,6 @@ vm_mmap_to_errno(int rv) } if ((curthread->td_pflags2 & (TDP2_UEXTERR | TDP2_EXTERR)) == TDP2_UEXTERR) - EXTERROR(error, "mach error", rv); + EXTERROR(error, "mach error %jd", rv); return (error); } From nobody Mon Jan 5 01:25:32 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSY2kRZz6N98x for ; Mon, 05 Jan 2026 01:25:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dkxSX3Xpqz3wRP for ; Mon, 05 Jan 2026 01:25:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZOzoxI5tueSh3SelRD1sDbWqlLssPnXFFSPmOnBduGY=; b=S706mX5bB1waTbBK54i7NEuSsUpcSJIbe3+Al/7LCRyGjAn8o3maPg1qZJ7P2BzfaXepct jKunOnREsVBTxb097Npi03G9t7TYxE4JExw/+CgZwmmCmNZNU0XDj/u23BwLhMGYcey0rG vJ9X1LCvXh4o8Fy1f3B/AW8VGE3qtUSPcQ6WzmyQjNlEsB4NhRZi2pFiGRdo2ZLqBtQ1+x 9svz34TNBwC/GGAFDLA5kXRTrHShu5DdUycS8UseJ1ioQjjn6C3RVpeXbYMA0u7zBFa/Ni 6JDaTNefWrTuuVJ7K3FJNivS3GjY/souguB3G6tGVP/u64b9JRIjgjonEbvVgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZOzoxI5tueSh3SelRD1sDbWqlLssPnXFFSPmOnBduGY=; b=Mq5EJPrTTxfXNM7W7s0WDY1pGiavNYgCl6AhfXs+ZmO6HiKJIoPhRbciofdrRCZDMat3Pq goqiI4gil4CAI1tEtGOcShX+D8JUe1b+38l9FXUP1XVAiJpGsJDlDv2QM6464pAozLwaOc TQt4GICermD8SElvPDrKRNp6f8jIBpHotGnEri4Fs32xxIP3Q9ITwxQIbJWdPduHnw/aaP 4opjy1/V3dHdeQnUqNgSixKe3w8JWVe45uC7usJd5tTi/GZJdf7JAP8RCTeBFqhevnaqf3 4AHyfCEsZPT1u6xsuYlPXxJW3urU8nsSTneRoeVcuaXLa+m6cpDWfkYne5Z6jA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767576332; a=rsa-sha256; cv=none; b=AB9W9CY0IVsa/dGPKrZi9eIVv4RtepLdhy21NydRrefIgmYsCkd3EiwPol2orQajT9/3oh RHHJtRfNVMAenZoiuqg2LirZCkbWI4LoPuI/ann/DyrGuOlQ4ZcW5bWoWo+n4gbxETbCc9 5VNczJslvhWNjZ99coIKz4KnoCa4PzAtRAq9oT5ooGXIrUmqAyJvAKUcvd9P51S2eF4veY sqi2Nrue2hni6oMFo1bxWXuGQ7kjPPPsd/z8cPuHngeBzyOnSYT35ryrEyZ8JLEp24NQzi 2P36PGwz0r3MgPBBagh1ReEt/9bi3f1BwTlplzB2K6DeCkybX8QK3qff1JE8gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSX35Vjz10YN for ; Mon, 05 Jan 2026 01:25:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a25f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 01:25:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: a3b3ac646d9c - stable/15 - exterror.9: describe formatting of optional arguments List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a3b3ac646d9cd58a6c86f334aac343e75ba8187b Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 01:25:32 +0000 Message-Id: <695b130c.3a25f.6a8afb53@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a3b3ac646d9cd58a6c86f334aac343e75ba8187b commit a3b3ac646d9cd58a6c86f334aac343e75ba8187b Author: Konstantin Belousov AuthorDate: 2025-12-27 16:21:37 +0000 Commit: Konstantin Belousov CommitDate: 2026-01-05 00:44:20 +0000 exterror.9: describe formatting of optional arguments (cherry picked from commit 14bd57d0a78dcd98449597fd3e19749799e36935) --- share/man/man9/exterror.9 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/share/man/man9/exterror.9 b/share/man/man9/exterror.9 index fd4b732b8213..a7c7a11d1315 100644 --- a/share/man/man9/exterror.9 +++ b/share/man/man9/exterror.9 @@ -90,6 +90,16 @@ The .Fn EXTERROR macro can take two optional 64-bit integer arguments, whose meaning is specific to the subsystem. +The format string may include up to two printf-like format +specifiers to insert the optional argument values in the +user output, which is done in userspace. +.Pp +The format specifier must be for an integer type, and include the +.Dq j +format modifier to accept only the types +.Vt intmax_t +or +.Vt uintmax_t . .El .Pp The strings passed as the second argument are only retained From nobody Mon Jan 5 01:25:33 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSZ0vc8z6N9F2 for ; Mon, 05 Jan 2026 01: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dkxSY4P1Xz3wRf for ; Mon, 05 Jan 2026 01:25:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wLiusCdjFSRA0v8N8+cP3FvWw9wZJiqKBIYNxJxRZGM=; b=eamiweLiQope2+pXApeEA7/Kxj0s+njFdXTX9GjEMzumYYIHEkJckQqMDxQd/pfj9RhIpH I5ygcu/DxIMu5PEsSPDWLbc7YoBCtG21F823JO/T33PQRmnAT2eYG8MlKf2WQkH+vWMgyN pbXwfPvcv7+P2Qd9Y/LPFieHzGHkXx1dQNcvxcyXx5/kSEntp2VK3Y33Y6+5pDMuUm1Ft5 SZP0wZYD31Eh1cvtZ/ynBQljZ9pgrSMwf+shc76HcPWnpZUuZYHvFdOfpiJlWm0Scqs/8n YnGwA6DI9s605FNeftXQZvCNHSOs97w5aWGmWLoIqMSWaCNYVlgsxl15CGKlNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wLiusCdjFSRA0v8N8+cP3FvWw9wZJiqKBIYNxJxRZGM=; b=IhvfCqAuVTV70jAFsmIrpNQmgQxpaJp/ymALOz95PLCfAnpUYzpWgJdFLg4CFCpNGKXMtP a5bKEKHPTsToJNmP6pP4kKtGG70e5MYyFlenaGW/PUS64+pf5NtqKAo9hqzuZ54sIUENKe Qp6zdLU50Wi+E34EYFbhGQT5GcCjHY4yVWIV3OmF8mjHedGLae7H/0UU0TPbbQIARyFEn3 XGnfiGSa6SBY5VOSq9HkX3+eUz0UhQ51qWeBQevlQf8bWbIS1c0HrEHfZhHPyH92O0k+4X F5g+NI7/A1TdixyIIcGvI6wulC+KWS9WlMiBiOhqSAg19gvrCUJD4B4vLrp0ZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767576333; a=rsa-sha256; cv=none; b=R0YmnbVTNJgfLHWOkiFB9OynU5jLgYjdxsmv01n+y7qo4oslfE8uXLmLLsuSamYaVzXZXd atL8b1iyqtfU79Uvsul322firC/FxxIV3jcWTTddGnyEPX5nhzVoDJl1wJTWeZzyAhZX3q bjiZQumcngV+1C+kbuyqSz4H7BZuAaNPTegclSdVMKswHUjvvtLLyZ3Hnc0DMPgyeUl++n PdrTrZW4ODGwpjMlP87PJH+DU5hMiMSokTQ5EZ6CmZGv5OSEdtQYv+6X9XFSeAgspl1+vb h/o+3b0R0YS66GbLwKtTZ3Np0u4M/NCOkYV5yvdAgbHgC5GwmaagJAwadFnTAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSY3tpNz1054 for ; Mon, 05 Jan 2026 01:25:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39930 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 01:25:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 39a04a3f703e - stable/15 - exterr_test: loosen the error string pattern List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 39a04a3f703e750b2eadf171fafc1690dbdee543 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 01:25:33 +0000 Message-Id: <695b130d.39930.66bfe2cc@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=39a04a3f703e750b2eadf171fafc1690dbdee543 commit 39a04a3f703e750b2eadf171fafc1690dbdee543 Author: Konstantin Belousov AuthorDate: 2025-12-28 03:35:03 +0000 Commit: Konstantin Belousov CommitDate: 2026-01-05 00:44:20 +0000 exterr_test: loosen the error string pattern (cherry picked from commit 543c86636f73119fa1dab860f07396df5a1884d4) --- tests/sys/kern/exterr_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/kern/exterr_test.c b/tests/sys/kern/exterr_test.c index 17c84c1f8ed4..b4746a485f58 100644 --- a/tests/sys/kern/exterr_test.c +++ b/tests/sys/kern/exterr_test.c @@ -51,7 +51,7 @@ ATF_TC_BODY(gettext_extended, tc) ATF_CHECK_EQ(0, r); printf("Extended error: %s\n", exterr); /* Note: error string may need to be updated due to kernel changes */ - ATF_CHECK(strstr(exterr, "prot is not subset of max_prot") != 0); + ATF_CHECK(strstr(exterr, " is not subset of ") != 0); } ATF_TC(gettext_noextended); From nobody Mon Jan 5 01:25:28 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSY3DC2z6N9F1 for ; Mon, 05 Jan 2026 01:25:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dkxSS225bz3wg0 for ; Mon, 05 Jan 2026 01:25:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d5uiMmnH6dbkkplA6uuiERfxZTdLmea7u7nbpDeEK9k=; b=rLNF5D0wWIt7VRCX7rJROFj5rB4TufqQLJfxmv3QoVwmlbiHgZlndJR1R6t78Io7AeyEjg xa7IqjrYg5edbmqJAvTH60Oh9Bva1vNjsNn7lqMNbc3kLxXfsRSvBrRjzzNLzjaKLEZA06 xOxtZtmFrUmkFKBfdTXtA0T1BbbnKs7J3323f2WXoeZSl3QOeP/cBovjCqtUWSf6+tPiQn cyYWqBdRekw46jbjJOKk+fygbfddIh89m6WVPkUR3a44X1oekczfZsbOFCLQCQHPn7TXSz K7AbI/P7/NcPehQazROWF6oooPAeKmxMPLKmG+XBYq4b9Icm0z7AE+bmckfo9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576328; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=d5uiMmnH6dbkkplA6uuiERfxZTdLmea7u7nbpDeEK9k=; b=NuOecKZqAh2NDp1KaweUc5qWDmzPuq1gEMilpGfYOV6lcMpUeMKJU2OkMPPx0V58BxCell PYkct1kAS7+0e7B2ql3Mej6tZvs1TkhT1Qg46HcD/QYkfIdkCyPdpg0DXcFxGz/A+JBrsD Ld0bdw5emejEwnp3M3zO+IK1gt+D6lfTmxO8tjmaovUtfyxS3b3yj+18KAYRdfFwLeDfgP s573Wu363IBO8QxLVWJ+dxIo+hp8r42o1154+YkgQxPHgTLxGP16L4+mnsgyfn8z1l6Hpr CO5s5zieQv+C8ufF97PLoXWhmk9zODtUrlGSbNlbBZxUALKdRunTEHhBlPOXag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767576328; a=rsa-sha256; cv=none; b=NPiyDLEEGX+aArkJ6wkE+q+OYXZJbZ8hIbiUwhvZ+RzH3cAbjOPT0YxKCM1FS4bPIUsQtk UElp1QqwaKC6juBv55VmIBRqoM2YDrK3pawDDydKfIbi9dyoa3UFxCToGvSVdU1qwDtcN8 vvdBiqkKd0x4BJV/WVpSizTqlf2KGMx3kNVUMSuzJrAikAkabB47i1k/NPnKYkBzX/J5vV weGOTolaKRScKyMmc5Eee2tCbimDag4Lke55q5208A8VzWR8WIYX7xhBA63eYwt6EFVJO5 Icopq/CMHq5QH9Te0mrVZlDf8hVQ8Ebd1uyeCzHp9w0+schHETJfpCdKA8evSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSS0rKyz10Mw for ; Mon, 05 Jan 2026 01:25:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38bb2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 01:25:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 1f5dfc8da580 - stable/15 - libc/gen/err.c: remove 'extended error' herald from extended error output List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 1f5dfc8da5807e8f8973ad21e63f460441773744 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 01:25:28 +0000 Message-Id: <695b1308.38bb2.60400dbd@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1f5dfc8da5807e8f8973ad21e63f460441773744 commit 1f5dfc8da5807e8f8973ad21e63f460441773744 Author: Konstantin Belousov AuthorDate: 2025-12-27 13:53:58 +0000 Commit: Konstantin Belousov CommitDate: 2026-01-05 00:44:19 +0000 libc/gen/err.c: remove 'extended error' herald from extended error output (cherry picked from commit 37ddbbe5535cb6c27b8a026b2f28d64319b9f802) --- lib/libc/gen/err.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/gen/err.c b/lib/libc/gen/err.c index 16cbe27693e7..793bf7522e42 100644 --- a/lib/libc/gen/err.c +++ b/lib/libc/gen/err.c @@ -120,7 +120,7 @@ vexterr(bool doexterr, int code, const char *fmt, va_list ap) } fprintf(err_file, "%s", strerror(code)); if (doexterr && extstatus == 0 && exterr[0] != '\0') - fprintf(err_file, " (extended error %s)", exterr); + fprintf(err_file, " (%s)", exterr); fprintf(err_file, "\n"); } From nobody Mon Jan 5 01:25:34 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSb0yY4z6N9F6 for ; Mon, 05 Jan 2026 01:25:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dkxSZ54jVz3wk1 for ; Mon, 05 Jan 2026 01: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=1767576334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/SwlFVeLbqeIZ4BbApwFMFM0K+41ZhkZtOtUbHBp+R0=; b=elVyQVxC4vkGI0m+9HSPzrbgAttE7RIJgD9lLseA7DRuqxcrfcCuC+8fGMkGSD3VJqqxcg OIcCwmFvpwmgLIyN2zBlpFomP0AE+KWkUXUQeA5Lkn4v3DtDc3HT5scX18KrfueLZL+gbG 5nMfiL0qn0zuE723bPrlxuT5YIV8Ujs40W/0j8sjrddYWX9pgDtwbqEhjCSLs6UHWWma0r g+mCPlRs0XfsUt8o/Ag6TziTNd9QjvDLXnKrlNl49BgJ6p8WdzVEW4xguq2xXl6esF5Tro rAQUabbHyCZ8vZc5arkORdLeat7pjDROOatUc4ygMk6jU0+AErYqqynz50KnCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/SwlFVeLbqeIZ4BbApwFMFM0K+41ZhkZtOtUbHBp+R0=; b=JlVvlif518qaJS4bITzRYULtdsxSdP7OTBMbQuz3jLHnj8WxMfOhxDr3WlFY7dkT/Ca44y mgnRvgsbI/BqGIhpWZCSBfNgdTMQcroVzuOFZpM8KzOinOeBOdeUwMx2nLTkIjhd+Pn7dW OMY3pPp1hxXl0QaUrr/+hw9ah6IpI5jnNZDn4Irlgw5AQfCWRI1R5XZ5gP0h37NbUofGXt upkby7M/Z+R8DweiZa06QErML/eIrztGeK6lX90Tbc2811hzBelfhLt7b7/BS4UuD3jTJ6 AzYCeZSWjPMg8DyZq0P7Nv7Hva0LGNqyB01R6juWNUyZXsLFCmGSUrp+Rnl0rQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767576334; a=rsa-sha256; cv=none; b=NsjvFfWmchEuWZO16UvUD4J6faErZLHe9T3TSOuPMMOodOHgfC7VlFtGComjVRql6d/kL3 +omNl9A+R6DWInF6wjFgKprmjRHIuKG2OjR97xD45oV+pOhWP7pfXF63ge+M93H0Pj231r kEF8aIjwu5ByiPWl6qwyodm0Wuet7sKPWPJyZ163AYderio1RKtD378ijQh7H5BiIf7CQP nZwZb8brRJaiCPvj6UFKuWqc2QtblKrM/N7gHlDFICrMqq6BUkrC3ScOTCVDbOybbMwS+6 77t3oyTzw5snMBvM8C07g6Ef6AfuEkGBknC7UQd4e+LABjLEXIgal5xZZHkXKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSZ4TYTz10W5 for ; Mon, 05 Jan 2026 01:25:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36c63 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 01:25:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 12918e98320c - stable/15 - fs/fuse: use dedicated category per source file List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 12918e98320c0d1e98b7edc5a36b9087fa1242b9 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 01:25:34 +0000 Message-Id: <695b130e.36c63.e1b875c@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=12918e98320c0d1e98b7edc5a36b9087fa1242b9 commit 12918e98320c0d1e98b7edc5a36b9087fa1242b9 Author: Konstantin Belousov AuthorDate: 2025-12-28 14:22:36 +0000 Commit: Konstantin Belousov CommitDate: 2026-01-05 00:44:20 +0000 fs/fuse: use dedicated category per source file (cherry picked from commit 54b52f655e0fdaef21c3cde85e8bf030efa7b86e) --- sys/fs/fuse/fuse_device.c | 2 +- sys/fs/fuse/fuse_vfsops.c | 2 +- sys/fs/fuse/fuse_vnops.c | 2 +- sys/sys/exterr_cat.h | 4 +++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/fs/fuse/fuse_device.c b/sys/fs/fuse/fuse_device.c index cee477865c42..41387de3ce71 100644 --- a/sys/fs/fuse/fuse_device.c +++ b/sys/fs/fuse/fuse_device.c @@ -82,7 +82,7 @@ #include #include #include -#define EXTERR_CATEGORY EXTERR_CAT_FUSE +#define EXTERR_CATEGORY EXTERR_CAT_FUSE_DEVICE #include #include "fuse.h" diff --git a/sys/fs/fuse/fuse_vfsops.c b/sys/fs/fuse/fuse_vfsops.c index 1b858a988289..e7a34f716370 100644 --- a/sys/fs/fuse/fuse_vfsops.c +++ b/sys/fs/fuse/fuse_vfsops.c @@ -81,7 +81,7 @@ #include #include #include -#define EXTERR_CATEGORY EXTERR_CAT_FUSE +#define EXTERR_CATEGORY EXTERR_CAT_FUSE_VFS #include #include "fuse.h" diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index 19e98e40f6ef..9c0fa0a5b6f9 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -89,7 +89,7 @@ #include #include #include -#define EXTERR_CATEGORY EXTERR_CAT_FUSE +#define EXTERR_CATEGORY EXTERR_CAT_FUSE_VNOPS #include #include diff --git a/sys/sys/exterr_cat.h b/sys/sys/exterr_cat.h index 318e774542ca..7492fc31662a 100644 --- a/sys/sys/exterr_cat.h +++ b/sys/sys/exterr_cat.h @@ -15,7 +15,7 @@ #define EXTERR_CAT_FILEDESC 2 #define EXTERR_KTRACE 3 /* To allow inclusion of this file into kern_ktrace.c */ -#define EXTERR_CAT_FUSE 4 +#define EXTERR_CAT_FUSE_VNOPS 4 #define EXTERR_CAT_INOTIFY 5 #define EXTERR_CAT_GENIO 6 #define EXTERR_CAT_BRIDGE 7 @@ -24,6 +24,8 @@ #define EXTERR_CAT_VFSBIO 10 #define EXTERR_CAT_GEOMVFS 11 #define EXTERR_CAT_GEOM 12 +#define EXTERR_CAT_FUSE_VFS 13 +#define EXTERR_CAT_FUSE_DEVICE 14 #endif From nobody Mon Jan 5 01:25:35 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSc4bCkz6N9YQ for ; Mon, 05 Jan 2026 01: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dkxSb5wYNz3wsj for ; Mon, 05 Jan 2026 01:25:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kVg6IlzbznZeNGLRfU+VMh3pzuooNMeDKB+7cFGIA1w=; b=rcoakHs7AsU9EujftS5qGjbnCb27xMJA/s1a9b5Z7arzTMNhL73DHXIGvWi4QGO8QuW6wk +MgrRbu6fAspwilVHlTfLSJtsw9d7ouvK+vxsJNeMwNWS2EJSC0Sc5rEdkxs9s++sZUb3e 4/NbuItkF2NcCPf7XCdZIC5WMZ30DEs4qX8f8bMoNLqQYGnAIuDSYvxyrS4cWobI/cOqMT bI3n5s3N1RLqbZcoGnNFt0C7eET1XBC6U+4epldwkyUiUxQHDXECb02PaYWK3j/VNV1DOI 224RLxnLLSD7WKMslbH66asS7MVCxdFnXwKw/8Z1uciC1oAFq2AcxCRtN7kdRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kVg6IlzbznZeNGLRfU+VMh3pzuooNMeDKB+7cFGIA1w=; b=vENycJiDFIl33S54UNQzbCoaGhSo4kB6JrnZiI5cX/dmwF04hkOafyTR3/l8FomY32mzF5 B6XyT4x/NJGKCM4V6nochPiQkpSUsRCkme2XVXxGunWbzXjTcNU1h6ves0cbiDBThpLc8z WFADOClHtgUukDpew+qerLw/s37xhYBz9qVmTr9oKL6A6hpUhOvkbVNwRp/yHdkTShrbCw dkVPNlalPTT9HmWYHGCG39bA38yv03uNd2Thd/lgCEzQOeOksXuf03cTYteIkI/LdzhmLv WXVbqJHO3eMkjj7UnpJIBMyJ5W85Hrvg8fxsm0+qwleXy3YqhKVnFceMX0W7OA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767576335; a=rsa-sha256; cv=none; b=K/Z10n2PGT2bjcN7e1XqSizI2VN0uXqVIyafgUsXJajb5rzC3JRSlJiVMe2fr9jN/Ofk4m rgAqS/zQY8AEvVUFL7OA70++ktQ4xvGdoq5Vs31AcotLmgrfE2Eji8NoQJqjNvuKbUGihg WRGOV/0OLxZQt8fmOd9lDI0lx1ROgyHGqe9aOt4AF2UoH8Ku+FpNw1oScdhdck65HQ2oZZ uNfGxK76Jqe1EbSPgj8VGsQQcKjLLwe7P74UXSgVMfPebvqpSeK7KNp2kkTJHL7KwYzopz PzxHz/LY93VzNF0CJpR2Oxx1M6oLFicWZH2GtiTQKYRu0GAp4qnEK2pQvrU56A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSb5GYjz10YQ for ; Mon, 05 Jan 2026 01:25:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39e59 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 01:25:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 39abebb332b1 - stable/15 - Add a script to auto-generate mapping from exterr category to source file List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 39abebb332b116b3eb492f251b8786ca27ae7a7a Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 01:25:35 +0000 Message-Id: <695b130f.39e59.4fb1e6f2@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=39abebb332b116b3eb492f251b8786ca27ae7a7a commit 39abebb332b116b3eb492f251b8786ca27ae7a7a Author: Konstantin Belousov AuthorDate: 2025-12-28 14:04:28 +0000 Commit: Konstantin Belousov CommitDate: 2026-01-05 00:44:20 +0000 Add a script to auto-generate mapping from exterr category to source file (cherry picked from commit 3ef25acf3600fb822bdf1487036184b4978d737f) --- tools/build/make_libc_exterr_cat_filenames.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tools/build/make_libc_exterr_cat_filenames.sh b/tools/build/make_libc_exterr_cat_filenames.sh new file mode 100755 index 000000000000..fbde85891200 --- /dev/null +++ b/tools/build/make_libc_exterr_cat_filenames.sh @@ -0,0 +1,22 @@ +#!/bin/sh +set -e + +check="lib/libc/gen/uexterr_format.c" +target="lib/libc/gen/exterr_cat_filenames.h" + +if [ \! -f "${check}" ] ; then + echo "Script must be run from the top of the full source tree" + exit 1 +fi + +echo "/*" >"${target}" +printf " * Automatically %sgenerated, use\\n" \@ >>"${target}" +echo " * tools/build/make_libc_exterr_cat_filenames.sh" >>"${target}" +echo " */" >>"${target}" + +(find sys -type f -name '*.c' | \ + xargs grep -E '^#define[[:space:]]+EXTERR_CATEGORY[[:space:]]+EXTERR_CAT_' | \ + sed -E 's/[[:space:]]+/:/g' | \ + awk -F ':' '{filename = $1; sub(/^sys\//, "", filename); + printf("\t[%s] = \"%s\",\n", $4, filename)}') \ + >>"${target}" From nobody Mon Jan 5 01:25:36 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSd1xbQz6N9TX for ; Mon, 05 Jan 2026 01:25:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dkxSc6bNMz3x0n for ; Mon, 05 Jan 2026 01: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=1767576336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qYW2rjEKzV/LLR2svKTcjLFMJySx95AWkJIo3lvyCaU=; b=NO+KzqWwialeiYsI7a719K3HfnsyRv9hyp7cvChoV3ISdZkvo1AlrkfEYDzFbRXtq8NK1u a8HbNl9fXSd3aXg8a7KTUB+scnMnOvlg5HMntyrblwSdkdtNYmLvS15AHOTYklI6QzExax 71qZVos1l4MuimzO4x4uum/i8I2dzdPTTg/4La6Pvf+GFWiiearmO6VB7O48nLGj41J9rg 1nOCqJ7nTEIBsZq7AkTYLYfkRBjniaqikcSm+Kh6XOgzBQCOS33GvVELY9A6RekzuJvlzc NWWR1yHGs+f/+VZ7xBezBDLhb+yUphAersrRHYBTa7PGlhk2I7p6CPXlbjkbNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576336; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qYW2rjEKzV/LLR2svKTcjLFMJySx95AWkJIo3lvyCaU=; b=L1qENBm9yAZFzN+SJ8O0ykYaa2NayEfeKuCCyUXQBvV5LTtH+2Ww1dBPf0+jE8tkyhsi8z aV4muAPxyFNAIuXK7cxIWPWUuCgDsruCbYcxG3LlIGjHaw5qEQAo7c7mZR7ClKCn7C8WOx XFqBzQjGHApQCdF0wMcRA2C6+t/wt4nnSnl5t7StazsA1kfLxe8tgQP5dHAIVr+UnNF2hE vtolxKLzYpJTP0WGtk9/cEZOGv16+eJFRnVuRE5LQZzNJ2ox+lKJy0D9WzRVREntR4lbzq R7SDAU9YFRvu5q4q0ev/BIn1stC6+vR9jbLynUsUhhIzeJ6Q92eAXjSm6iVWig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767576336; a=rsa-sha256; cv=none; b=IHOuqOYA1v9ekYn43SrMesR45+1lHebs1moi6l9Jq069qjLszjIKsBkU7Ft7OuGt4q5kn9 uMhCpLfZGnldU91iKDE6pBgT22wKvWDbavFU7cQeFdTNMzRMfFdIXeoCnNIdmGx9v3XbMJ Yh0wN9PgBNASTK0pkgBrupsIGB+fNpfLUkpFNneyHfKbD/Zyj+BLI2KBrb5RYSQZ2yIzKR pePnWtt1dd1MMiMddy4Gw0asc7faLrnsibHC2gPmfzgPHcbRPC3WGD3B1euOyrvS6hVBNJ cuFKzwDPfNu17yQ/QQJyUCiRH7ibN3chBwAchgFRKQ8hk/NMi57EYIS5udtL0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSc62lQz10YR for ; Mon, 05 Jan 2026 01:25:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a107 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 01:25:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 567e77d177c0 - stable/15 - Add automatically generated file libc/gen/exterr_cat_filenames.h List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 567e77d177c0e3b021ccc4ab2b8a2e26fb0e51a3 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 01:25:36 +0000 Message-Id: <695b1310.3a107.5bfad413@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=567e77d177c0e3b021ccc4ab2b8a2e26fb0e51a3 commit 567e77d177c0e3b021ccc4ab2b8a2e26fb0e51a3 Author: Konstantin Belousov AuthorDate: 2025-12-28 14:23:43 +0000 Commit: Konstantin Belousov CommitDate: 2026-01-05 00:44:20 +0000 Add automatically generated file libc/gen/exterr_cat_filenames.h (cherry picked from commit 5685c07b5a8e4ccc19140eeaa5987a38dca7c668) --- lib/libc/gen/exterr_cat_filenames.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/libc/gen/exterr_cat_filenames.h b/lib/libc/gen/exterr_cat_filenames.h new file mode 100644 index 000000000000..883dd98289cd --- /dev/null +++ b/lib/libc/gen/exterr_cat_filenames.h @@ -0,0 +1,17 @@ +/* + * Automatically @generated, use + * tools/build/make_libc_exterr_cat_filenames.sh + */ + [EXTERR_CAT_FUSE_DEVICE] = "fs/fuse/fuse_device.c", + [EXTERR_CAT_FUSE_VFS] = "fs/fuse/fuse_vfsops.c", + [EXTERR_CAT_FUSE_VNOPS] = "fs/fuse/fuse_vnops.c", + [EXTERR_CAT_GEOM] = "geom/geom_subr.c", + [EXTERR_CAT_GEOMVFS] = "geom/geom_vfs.c", + [EXTERR_CAT_FILEDESC] = "kern/kern_descrip.c", + [EXTERR_CAT_INOTIFY] = "kern/vfs_inotify.c", + [EXTERR_CAT_GENIO] = "kern/sys_generic.c", + [EXTERR_CAT_VFSBIO] = "kern/vfs_bio.c", + [EXTERR_CAT_VFSSYSCALL] = "kern/vfs_syscalls.c", + [EXTERR_CAT_BRIDGE] = "net/if_bridge.c", + [EXTERR_CAT_SWAP] = "vm/swap_pager.c", + [EXTERR_CAT_MMAP] = "vm/vm_mmap.c", From nobody Mon Jan 5 01:25:37 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSf3LW5z6N9Tc for ; Mon, 05 Jan 2026 01:25:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dkxSd6jnpz3wt5 for ; Mon, 05 Jan 2026 01:25:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QXUwNH9cmUSGI7YlnECWXucK31dgaykDUy6uvdIDmOQ=; b=WSw5Z00lxyHOULIG5IG4sc7tsh7/nqNvMVQuAhIFevzT+HovkBGxdbVpFoZFqNPC91/uta GHFxJ6ZkHoAD6npNaV2h/m9YtgpJ7uZ7uiLr60DnpIkoKynHtSHcbz1Z5u65o85xDu2t25 XAuyd8ZVmlwaeACajALOXMCwiFfvBIS9HZAIRaPKixaSjKObnfNFlffan6bhre0zTUQECf 6cvCL4OdODWYAgbUYNIa8fIl2RSp2J/kuOfRkNKQ1mhTrzVqgO7EHtjCHUp6YF2eQlzWsQ mVMGFV0eFKNRe0Kx2p5Wp8f8nK/xBgkW7FmLadL1A1GFU3xhaEmqHJSfXFTVwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576338; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QXUwNH9cmUSGI7YlnECWXucK31dgaykDUy6uvdIDmOQ=; b=uVVkbDZB/74DiCn6BEPzWByOJ6GA7+xzqJQHnr/YvMuN3XByoAPSy6mM0/ymNhgy2J/BUW TQ5j07lVmRUxzVv57iKzxJlFILSXsfu1jAnh3v6+cLyNzixjh3jgGUiL1BmZzps0dheem9 eUf0NiZf9SYYidEI2RH4FAqrlppjFP6/N/iNd2fJWwfxyNYKT+6VjVkwNxg6T/ftv+opcB SSDboTH04XjYB0i6jG05Ex3AinYsldtXALtmVSASIXzBFnm0JYxYVKWrzdorB/o9nLIxPl hbpHAPjv9q424FBwQJWkk0EH+70Q7Pt2QXqHL2QfjFXpHNayGLR1S5UXs4zzkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767576338; a=rsa-sha256; cv=none; b=M1JvZs5E8lxzGWZSrkB4enLl4Ya/EHZdOXK0Z/2nbWXckII11bWABaxMVnmtJL6eZUTKGW JuiVG+sLJEnLtxebJ1OGOV/5Q2uHJ6+606BJxtSf8A66oyaWprdK14Dnb9IIdGiOz1AwWb YjBEbCRn+zx6XpRIcwkdOfhi3yzPyWmh9Zuc0TAITXaYWrx/JxKCAXNCU/b/UYnokkQerV 9Yn0QkxWKpM0GMf6N+mHK4GBFyRoNVIozgROLKMImrTuWQ4TSeaVyUFJBywS+ku/7rNMLw +bsZwr40+A7CKeSLttf6TZNRJog+uvoNqUhcaAr3YngaiS+SVIW0jSQNML23Aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSd6K6Qz1055 for ; Mon, 05 Jan 2026 01:25:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36c67 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 01:25:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: e5b9182cdbc4 - stable/15 - exterr: in verbose mode, print the source file name List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: e5b9182cdbc4b5684c0e40608e8901e1989d916b Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 01:25:37 +0000 Message-Id: <695b1311.36c67.2b060911@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e5b9182cdbc4b5684c0e40608e8901e1989d916b commit e5b9182cdbc4b5684c0e40608e8901e1989d916b Author: Konstantin Belousov AuthorDate: 2025-12-28 14:13:49 +0000 Commit: Konstantin Belousov CommitDate: 2026-01-05 00:44:20 +0000 exterr: in verbose mode, print the source file name (cherry picked from commit 874cdf6af695c42d561647f7165c99c2d3df0faa) --- lib/libc/gen/uexterr_format.c | 21 +++++++++++++++++---- sys/sys/exterr_cat.h | 11 +++++++++++ 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/lib/libc/gen/uexterr_format.c b/lib/libc/gen/uexterr_format.c index 3321fd80616d..8d3b458ca9f2 100644 --- a/lib/libc/gen/uexterr_format.c +++ b/lib/libc/gen/uexterr_format.c @@ -8,7 +8,7 @@ * under sponsorship from the FreeBSD Foundation. */ -#include +#include #include #include #include @@ -17,6 +17,19 @@ #include #include +static const char * const cat_to_filenames[] = { +#include "exterr_cat_filenames.h" +}; + +static const char * +cat_to_filename(int category) +{ + if (category < 0 || category >= nitems(cat_to_filenames) || + cat_to_filenames[category] == NULL) + return ("unknown"); + return (cat_to_filenames[category]); +} + static const char exterror_verbose_name[] = "EXTERROR_VERBOSE"; enum exterr_verbose_state { EXTERR_VERBOSE_UNKNOWN = 100, @@ -68,9 +81,9 @@ __uexterr_format(const struct uexterror *ue, char *buf, size_t bufsz) char lbuf[128]; snprintf(lbuf, sizeof(lbuf), - "errno %d category %u (src line %u) p1 %#jx p2 %#jx", - ue->error, ue->cat, ue->src_line, - (uintmax_t)ue->p1, (uintmax_t)ue->p2); + "errno %d category %u (src sys/%s:%u) p1 %#jx p2 %#jx", + ue->error, ue->cat, cat_to_filename(ue->cat), + ue->src_line, (uintmax_t)ue->p1, (uintmax_t)ue->p2); if (has_msg) strlcat(buf, " ", bufsz); strlcat(buf, lbuf, bufsz); diff --git a/sys/sys/exterr_cat.h b/sys/sys/exterr_cat.h index 7492fc31662a..24f07539fe35 100644 --- a/sys/sys/exterr_cat.h +++ b/sys/sys/exterr_cat.h @@ -8,6 +8,17 @@ * under sponsorship from the FreeBSD Foundation. */ +/* + * The category identifiers for the extended errors. + * The ids participate in ABI between kernel and libc, so they must + * never be reused or changed. Only new ids can be added. + * + * After adding a new category id, run + * tools/build/make_libc_exterr_cat_filenames.sh + * from the top of the source tree, and commit updated file + * lib/libc/gen/exterr_cat_filenames.h + */ + #ifndef _SYS_EXTERR_CAT_H_ #define _SYS_EXTERR_CAT_H_ From nobody Mon Jan 5 01:25:38 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSg4C9nz6N9Tn for ; Mon, 05 Jan 2026 01:25:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dkxSg0QyDz3wtG for ; Mon, 05 Jan 2026 01:25:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w7zdWWMBuOCNWsOxCTlkqn0SNa7qYrEI4cLg9dI3o/c=; b=Hj2LZCEZhsoHPc3niA+iAfe+cSWACsJX82FI59HByFIjpYP7sDORE5BLazdmV8VriC8QDH lf/xxPRUXCZ7n+B+0GKxxc0GpyuQDxiFHHZ6Z1Y7D7i/pQvu9rrTB53YK8f3LUp8KlxURm X/9sLP75zoGAHOtjd4ZR5qlQw2J7mHlaHNLApAXewkVBv9QArxEFodblsuaJED8NOqHNfe levVBYtj/KEOTtslAkp4xxRa2t9F6dXfYCphwAPdEz0x52+wBRlPOYrEaNBS1WoRHxo3jf 5ZZcbbV5aRtVvjmw+LrfzfAbvCoVWTjQwxUtSUepUDSKxbRkRq/aezNv+57LTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w7zdWWMBuOCNWsOxCTlkqn0SNa7qYrEI4cLg9dI3o/c=; b=e5GSngh9dVV6B9hpJwvVvoxUPLKKhFKTngvGqdlWbAPX/tECDuPLZyZWQntOsD31uhCpy+ ZaZhHNiYIvo/AArPIEA7KNWq0tAMJO03EvcohZZ6tF8tTEFl6WWy6NMxcV9OE6rU7Dq8jE QmXUmfnesXkG1uYaZhrhcwAMi2G3OzVaIFGtXHspR0vHS9zlKG3+wFAGDml+gEezy2KsQG dxD93Nl+KJVZBvTAb8awvcFOjEUOkHR7BvTNSc4Aytaa1JLT0xIcVAbCViY3T8Y9PdF3dE yAdVFyB6lc6Qa25hZ+xzzfJgq9ebYcvU8PGXFuJKjBBiB7kwW8DEFGISxfa+iA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767576339; a=rsa-sha256; cv=none; b=G8zXw0JC+4iF6TO1LbZRfqUI6cqb1p/Dg4j2/yoRk6KuOVULbvxQ/Nj1NR3rjKe++s5GP1 x0dVwChWcD8n4EoP8FAchWjeV5sC80gsm8x0WZBBxfjKZh2j+YP1bcHYctFcyOAjZ4v8U4 hwl9bqA8F1biWDym1Wd4IjjFC0Sh/aodaVOaSew2QepS7hYNwhGM5IsbxV6CZr+Ug7IP4h QarA/4JZ++2Dxj9PVbDy87bPKhC0fn1igDgpF9Wu32mBuyCHlq5hHnyJwZAVG3fpK6WEeO 5W2drf+PrtVw5GCDpr2Jz99eu4R5n0Rr5oWoHs2kCqFbXrV6s8NWlup2XqP+HA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSg00TJz10YS for ; Mon, 05 Jan 2026 01:25:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a905 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 01:25:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 2b83f57072d3 - stable/15 - man pages: provide some description for extended errors List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2b83f57072d396c74089f14f51694a2ce4038ea1 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 01:25:38 +0000 Message-Id: <695b1312.3a905.36cb909d@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2b83f57072d396c74089f14f51694a2ce4038ea1 commit 2b83f57072d396c74089f14f51694a2ce4038ea1 Author: Konstantin Belousov AuthorDate: 2025-12-28 20:41:38 +0000 Commit: Konstantin Belousov CommitDate: 2026-01-05 00:44:20 +0000 man pages: provide some description for extended errors (cherry picked from commit 3088263177da2813dd09364171feadd0e31d1fc3) --- lib/libc/gen/err.3 | 16 ++++++++++++++++ share/man/man7/environ.7 | 16 +++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/lib/libc/gen/err.3 b/lib/libc/gen/err.3 index 088ead71239b..70a214152a19 100644 --- a/lib/libc/gen/err.3 +++ b/lib/libc/gen/err.3 @@ -114,6 +114,22 @@ preceded by another colon and space unless the argument is .Dv NULL . .Pp +If the kernel returned an extended error string in addition to the +.Va errno +code, the +.Fn err +function prints the string with interpolated values for parameters, +as provided to the corresponding invocation of +.Xr EXTERROR 9 . +If the extended error string was not provided, but extended error +information was, or even if string was provided and the +.Ev EXTERROR_VERBOSE +environment variable is present, an additional report is printed. +The report includes at least the category of the error, the name of +the source file (if known by the used version of libc), +the source line number, and parameters. +The format of the printed string is not contractual and might be changed. +.Pp In the case of the .Fn errc , .Fn verrc , diff --git a/share/man/man7/environ.7 b/share/man/man7/environ.7 index 51fb6544fc5a..ada2cc45a650 100644 --- a/share/man/man7/environ.7 +++ b/share/man/man7/environ.7 @@ -114,6 +114,18 @@ A startup list of commands read by .Xr ex 1 and .Xr vi 1 . +.It Ev EXTERROR_VERBOSE +Request the +.Xr err 3 +and +.Xr uexterr_gettext +functions to unconditionally report additional information, +mostly useful for the (kernel) developer to diagnose the issue. +See +.Xr err 3 +and +.Xr exterror 9 +for more details. .It Ev HOME A user's login directory, set by .Xr login 1 @@ -298,6 +310,7 @@ built-in command in .Xr cd 1 , .Xr csh 1 , .Xr env 1 , +.Xr err 3 , .Xr ex 1 , .Xr login 1 , .Xr printenv 1 , @@ -311,7 +324,8 @@ built-in command in .Xr system 3 , .Xr termcap 3 , .Xr termcap 5 , -.Xr simd 7 +.Xr simd 7 , +.Xr exterror 9 .Sh HISTORY The .Nm From nobody Mon Jan 5 01:25:40 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSh6L2jz6N9Tp for ; Mon, 05 Jan 2026 01:25:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dkxSh1J1Hz3wkp for ; Mon, 05 Jan 2026 01:25:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576340; h=from:from:reply-to:subject:subject: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+pB2+QlFFevkMLlvH1RAsLDx3cBoe20GOvNQ4jM6a4=; b=hLCZI4zboI4WiNs0rHS6Arol5HCrd8Wk74kV72BqGVcohtxYY6IjRwnZGteJHG3a9KSUR3 XJK0XBpDcl6WXnUWlvSrdqrs3lvwwDm/ZRyJ5SqoLdTNDgwTbaX/4edH7R++DLEr/qxKMj IF3uTCjlx1ydJleVBYxz8x3FKI4yhu6UA9UeJIfXjjPIjfEE3CVwVFd1l17nOWmZt8QLN4 5CPmsgDEesakS1/Wjpjbq28/nqlLRTyoz0hGiJ/XmLcmVUOQVTY9ubE7VA/0pY5AzyJe+z AHyhNHT71m4ucgsEdasH8kHUiHiB0pScoGNY28rKEaGO0be/EteU62waXLUesg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576340; h=from:from:reply-to:subject:subject: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+pB2+QlFFevkMLlvH1RAsLDx3cBoe20GOvNQ4jM6a4=; b=nF173Bwe0S1GSVy6GJdAzvrPovnGH2rcAIxWJ+Sf4KXgNtDFYns/B2mzAJKv5S4+oe81v1 AYI5sAlfznn4Xu5ByRg8lMvStU93IAJ2zabwTj78T0p94drFcfGPcob3gkrHIbuvlHaoIb eDVz5YN8Mq+I2I/P+P2+vS59RhQegOb9B/YBfDQ5pdbHm6duzTm20ISA8r9pJFdZQ4AyBa NEA1r6BSb2EbJJD7/mgMGXwCa+1ODqoytAppIsci7+HPWQz+1NYfQ2eDrEsD7i3Z55kZg9 m0RPoJS+GCUELrBaGW8DgMEVITSWOnSx+9L8cJ2EiTsLQhw66Ob01MCSiKoAaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767576340; a=rsa-sha256; cv=none; b=NDyNL0ZMXAA/lASbVcBGqAaDmKx1LHIQPdG6cZsscR90K7wtP9Zwek0fEA+xT5/AOGK66j 2prcMJ4pjS3ispfNs5YFq+/fBPcFMjOjx6axE2lTbLjTf3C/bOlB7sUyAt3CLdU5x0ROFn lX8AzCxjzLKSribStu7v396wrXV75Ud1Kf4w/NnzxbDWTRdjYM2/W90tufaLtYvGa8JTJ+ VvvrP1HlG0AO/65wX3386DTityOu44VPpI8JgRoVRwY52aJFNJJ4mmUp3JSqH1DWTrxHzm V6kSN4w/z77g6SfuPHpslP3X1ge6G6L8F/NjtrT2gz5OyicpM0cikAGuAgcOsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSh0XzhzylQ for ; Mon, 05 Jan 2026 01:25:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36c6b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 01:25:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: a26a553c54de - stable/15 - libc/stdlib/Makefile: one line for each source file name List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a26a553c54de3e98464c054e068f7e5cf5085464 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 01:25:40 +0000 Message-Id: <695b1314.36c6b.b3f82ff@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a26a553c54de3e98464c054e068f7e5cf5085464 commit a26a553c54de3e98464c054e068f7e5cf5085464 Author: Konstantin Belousov AuthorDate: 2025-12-25 23:36:48 +0000 Commit: Konstantin Belousov CommitDate: 2026-01-05 00:44:20 +0000 libc/stdlib/Makefile: one line for each source file name (cherry picked from commit 04a664d87607d25d87baf56903090707cc91e2e0) --- lib/libc/stdlib/Makefile.inc | 82 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 69 insertions(+), 13 deletions(-) diff --git a/lib/libc/stdlib/Makefile.inc b/lib/libc/stdlib/Makefile.inc index b878a7625e9f..37a927b0597b 100644 --- a/lib/libc/stdlib/Makefile.inc +++ b/lib/libc/stdlib/Makefile.inc @@ -1,19 +1,75 @@ # machine-independent stdlib sources .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/stdlib ${LIBC_SRCTOP}/stdlib -MISRCS+=C99_Exit.c a64l.c abort.c abs.c atexit.c atof.c atoi.c atol.c atoll.c \ - bsearch.c bsearch_b.c \ - cxa_thread_atexit.c cxa_thread_atexit_impl.c \ - div.c exit.c getenv.c getopt.c getopt_long.c \ - getsubopt.c hcreate.c hcreate_r.c hdestroy_r.c heapsort.c heapsort_b.c \ - hsearch_r.c imaxabs.c imaxdiv.c \ - insque.c l64a.c labs.c ldiv.c llabs.c lldiv.c lsearch.c memalignment.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 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 +MISRCS+= \ + C99_Exit.c \ + a64l.c \ + abort.c \ + abs.c \ + atexit.c \ + atof.c \ + atoi.c \ + atol.c \ + atoll.c \ + bsearch.c \ + bsearch_b.c \ + cxa_thread_atexit.c \ + cxa_thread_atexit_impl.c \ + div.c \ + exit.c \ + getenv.c \ + getopt.c \ + getopt_long.c \ + getsubopt.c \ + hcreate.c \ + hcreate_r.c \ + hdestroy_r.c \ + heapsort.c \ + heapsort_b.c \ + hsearch_r.c \ + imaxabs.c \ + imaxdiv.c \ + insque.c \ + l64a.c \ + labs.c \ + ldiv.c \ + llabs.c \ + lldiv.c \ + lsearch.c \ + memalignment.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 \ + 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 CFLAGS.qsort.c+= -Wsign-compare From nobody Mon Jan 5 01:25:42 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSk4sQyz6N9Bd for ; Mon, 05 Jan 2026 01:25:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dkxSk2Mksz3wyv for ; Mon, 05 Jan 2026 01:25:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576342; h=from:from:reply-to:subject:subject: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+nXjqJ5PnmxtqjjyQE+mN/YE6fxqoHipWyhgWiCM8=; b=uWbdpRV9xw55S3qIgOwZXvWYjM0n3Cb5p/KVXWtccJ4U3jmCFU9YzcARHsEGkBlZfPJBfk A1j37mj0qinqe6nbdyB7F8xnIfaonDMVODxu26iuRl9qa8vYHoQ6NfBTeS6N7fUnjLlAaT ahVhAtKXWAm4BuvJX57OnsEClMTcO/uxjNSz1RZmxNFZLOb7iEnBgf1CAXp+JPEThsEG9q NzWMVk5h+cm8mIjAd77mQJSwAx845DNCI6+jqTTSg5shKn7Rnb9ga6ODVPhVOvO8eDFInm cHzmIZRogTxuM0YoFgyc+lgLrgUEJQuq01sI1r4FFbWc2GsCBx04KGDYqbRZqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576342; h=from:from:reply-to:subject:subject: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+nXjqJ5PnmxtqjjyQE+mN/YE6fxqoHipWyhgWiCM8=; b=Nmx34QCin+jMLkLXVGB+g0+rVXZk64o5OXGGcHeQY31DsyHywoI519p8Aoi8BpsFJ7LBIG 4E89eOhlE/9Hpn3yzrKsohQhEKmVM5poQJVtfK4FqukL4+Hv/lusyoWx3v0juocP4FrRkY H/AnEtjY/26+Y/uOuUim6RZxETkZ1bpmw8xDL5ErSP+UlSEPfJdYpWF1v7Y28DRqDVzyag NDGisLDb7rr2CRglfj7PLuuWkTSbnORZzHY8lL0bvYSih9HLc8L1OEygp3oPSVzPos5rti Mq/QcQzIkfvBnWF7+7iNAHtv3HIa1HwLhdJ5UMNJXqLArGQlKUz637Y7DtPeug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767576342; a=rsa-sha256; cv=none; b=GcaO2ZfG0yaB86L5NYCgs1APq5MH9SBqG+eyhnS+veI8n8vy01EPqbcE/fYMOCljuzkwiL aRFie/MvSmsCZ+WtdS+WIZol4U9o8VzZbJzAyg2kP0wQ8+i2nzey/t8J4nyHpukGbOho+e itgk7UrKlLggOqzYbf1EJe/uYSZefiO3q5euYnIGHhgNFfT2KxwFtdk71rv7TnATBGW5pE RlPePeA/QP5ixFc/Ytq7N7uV0FRMPMCMpjgraKTOO1wWBTl1jXUR1B8T3EFvMAMdibRWcO eK4kCsro6nUHAclH/mz6nCInj9gqfPcMakq13bu5hoQXK9+UrPvNMBpqSt6B+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]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSk1VjNz10QH for ; Mon, 05 Jan 2026 01:25:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a31c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 01:25:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 8cbc9c011aef - stable/15 - tdestroy(3) man page List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 8cbc9c011aef512d91c23c29f21c585d0823e883 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 01:25:42 +0000 Message-Id: <695b1316.3a31c.6a1eb216@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8cbc9c011aef512d91c23c29f21c585d0823e883 commit 8cbc9c011aef512d91c23c29f21c585d0823e883 Author: Konstantin Belousov AuthorDate: 2025-12-26 18:27:32 +0000 Commit: Konstantin Belousov CommitDate: 2026-01-05 00:44:21 +0000 tdestroy(3) man page (cherry picked from commit b0d4b059cf8425cbe094f93362a61c56a26d45f3) --- lib/libc/stdlib/Makefile.inc | 3 ++- lib/libc/stdlib/tsearch.3 | 25 +++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/lib/libc/stdlib/Makefile.inc b/lib/libc/stdlib/Makefile.inc index e46a8d7340b2..c311ba3d2bcc 100644 --- a/lib/libc/stdlib/Makefile.inc +++ b/lib/libc/stdlib/Makefile.inc @@ -147,4 +147,5 @@ MLINKS+=strtoul.3 strtoull.3 \ strtoul.3 strtoumax.3 MLINKS+=tsearch.3 tdelete.3 \ tsearch.3 tfind.3 \ - tsearch.3 twalk.3 + tsearch.3 twalk.3 \ + tsearch.3 tdestroy.3 diff --git a/lib/libc/stdlib/tsearch.3 b/lib/libc/stdlib/tsearch.3 index edee01cafc52..f412c37a4ef0 100644 --- a/lib/libc/stdlib/tsearch.3 +++ b/lib/libc/stdlib/tsearch.3 @@ -36,6 +36,7 @@ .In search.h .Ft void * .Fn tdelete "const void * restrict key" "posix_tnode ** restrict rootp" "int (*compar) (const void *, const void *)" +.Fn tdestroy "posix_tnode *root" "(void (*node_free)(void *)" .Ft posix_tnode * .Fn tfind "const void *key" "posix_tnode * const *rootp" "int (*compar) (const void *, const void *)" .Ft posix_tnode * @@ -45,6 +46,7 @@ .Sh DESCRIPTION The .Fn tdelete , +.Fn tdestroy , .Fn tfind , .Fn tsearch , and @@ -95,6 +97,13 @@ If the node to be deleted is the root of the binary search tree, will be adjusted. .Pp The +.Fn tdestroy +function destroys the whole search tree, freeing all allocated nodes. +If tree keys need special handling on free, the +.Fa node_free +function can be provided, which is called on each key. +.Pp +The .Fn twalk function walks the binary search tree rooted in @@ -128,7 +137,9 @@ is NULL or the datum cannot be found. .Pp The .Fn twalk -function returns no value. +and +.Fn tdestroy +functions return no value. .Sh EXAMPLES This example uses .Fn tsearch @@ -184,6 +195,7 @@ main(void) tdelete(four, &root, comp); twalk(root, printwalk); + tdestroy(root, NULL); return 0; } .Ed @@ -192,8 +204,17 @@ main(void) .Xr hsearch 3 , .Xr lsearch 3 .Sh STANDARDS -These functions conform to +These +.Fn tdelete , +.Fn tfind , +.Fn tsearch , +and +.Fn twalk +functions conform to .St -p1003.1-2008 . +The +.Fn tdestroy +function is the glibc extension. .Pp The .Fa posix_tnode From nobody Mon Jan 5 01:25:41 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSj2c2fz6N9R4 for ; Mon, 05 Jan 2026 01:25:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dkxSj1KDTz3wtV for ; Mon, 05 Jan 2026 01:25:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0awVm5Dsv8kF1HxKuZM7BJ8hrAjqKsMPeWLzJRWYM8c=; b=JY4DUwWA+AIhEFaGgCUNje4LDIFtvPqmgBRgetAcNUBUdA7vSSPFNkoYOA3bxPx1zg0F6G XRIr/3U8fKG4XcUV/OwT9vlXmsr5wIzjmPaXCFpRDHpfINUasp9wjUyV5/W+0CDf1rLPTZ 6UXMyYN4D5VNMKt/Hs0Hs8HN58UM50zssyrQl/kTfgMwY2ezCp0Zf5zTmliDTptNGd9I9a qddjHzMai0VSa3WsDATnHabOtdGyoRghbqcMFaRVKqjtajOzEh/2TRbJ3MT8O0zjqSI4vp iOhucXO7J8czYHLepNfcGPkGFwp+0nAf7zn2D/Q2b0M0xPcqQbr+JFbJLOLy8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0awVm5Dsv8kF1HxKuZM7BJ8hrAjqKsMPeWLzJRWYM8c=; b=Kda689ycyLY+0XiBlzRxu6zz3YjvnGx7ck6FWjTYFJh+cnINxh2SHGse37I/LmcCvjo6/0 tkIls+ufLJ8VcOr7Vkpg+2+UTjX+gjzukKOmk14nMn9MYscJySfTlzP+bvlMRACr0f4Dhg Ifrpdw6CdkEekbeSPCWInEsKiukAwxd8yUk+mv/BomqK3CF+7+gvUACw9b4GDvzMu4JDoC 7FTuQlflYTFFUH7wmKmx4o988oEOhAezQ72VxcGj9wVrGK3nqPUk/HGPK8cZy9xAbkNleS tIMF2qvxEqupJkXOQ29RaVPSjq5wEEfq6+mrbEFkoNSPKE8auXSN3JAb9SrIpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767576341; a=rsa-sha256; cv=none; b=BK8wjakVADyp4XnyZKLsnMkS1c+GBxtmZlMoxhK3WPLuDDZx0ak0qCq9Uo4fKLx6cGsFYq U0g7KFn+XITZkm9mFq0roiQPXXKSjQ7Zw+5elBCnfJZNTSNM7bGnKcV6bsz/O6fa9U3QKG DnCVA0mJq/at45gQvUnhAqfZ9844khJZzh0884fKT6HD6eTJ64aN/n7Oq51UcGq3zXyTcb qewT9NBCqkXRTc6ryebFBKZIaJzO9Y9h/t0rI7GCCrw2POQD4rFdaAkstjPrOialzLYcVp hmCRczo297GJv2xBXN/mC3rK9S5iPCdVIS2gPgpTKYxCHEZHKeRqa6pEy4fl9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSj0w2rz10Sl for ; Mon, 05 Jan 2026 01:25:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39934 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 01:25:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 6197518ee905 - stable/15 - libc: add glibc-compatible tdestroy(3) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6197518ee90541a5e04d03dffda760b888d3a3e7 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 01:25:41 +0000 Message-Id: <695b1315.39934.e20b48e@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6197518ee90541a5e04d03dffda760b888d3a3e7 commit 6197518ee90541a5e04d03dffda760b888d3a3e7 Author: Konstantin Belousov AuthorDate: 2025-12-25 23:38:25 +0000 Commit: Konstantin Belousov CommitDate: 2026-01-05 00:44:21 +0000 libc: add glibc-compatible tdestroy(3) (cherry picked from commit b8c99e7d912f0dad84cec80f8c4331646b87a3ec) --- include/search.h | 1 + lib/libc/stdlib/Makefile.inc | 1 + lib/libc/stdlib/Symbol.map | 1 + lib/libc/stdlib/tdestroy.c | 68 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 71 insertions(+) diff --git a/include/search.h b/include/search.h index 0615da2b42ba..5ac25a0d491f 100644 --- a/include/search.h +++ b/include/search.h @@ -77,6 +77,7 @@ void twalk(const posix_tnode *, void (*)(const posix_tnode *, VISIT, int)); int hcreate_r(size_t, struct hsearch_data *); void hdestroy_r(struct hsearch_data *); int hsearch_r(ENTRY, ACTION, ENTRY **, struct hsearch_data *); +void tdestroy(void *, void (*)(void *)); #endif __END_DECLS diff --git a/lib/libc/stdlib/Makefile.inc b/lib/libc/stdlib/Makefile.inc index 37a927b0597b..e46a8d7340b2 100644 --- a/lib/libc/stdlib/Makefile.inc +++ b/lib/libc/stdlib/Makefile.inc @@ -67,6 +67,7 @@ MISRCS+= \ strtouq.c \ system.c \ tdelete.c \ + tdestroy.c \ tfind.c \ tsearch.c \ twalk.c diff --git a/lib/libc/stdlib/Symbol.map b/lib/libc/stdlib/Symbol.map index 8b7e97c3cbdc..03a6d0b543ac 100644 --- a/lib/libc/stdlib/Symbol.map +++ b/lib/libc/stdlib/Symbol.map @@ -134,6 +134,7 @@ FBSD_1.8 { FBSD_1.9 { memalignment; recallocarray; + tdestroy; }; FBSDprivate_1.0 { diff --git a/lib/libc/stdlib/tdestroy.c b/lib/libc/stdlib/tdestroy.c new file mode 100644 index 000000000000..c324e151da11 --- /dev/null +++ b/lib/libc/stdlib/tdestroy.c @@ -0,0 +1,68 @@ +/* + * Copyright 2025 The FreeBSD Foundation + * + * SPDX-License-Identifier: BSD-2-Clause + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + */ + +#define _SEARCH_PRIVATE +#include +#include + +static void +nul_node_free(void *node __unused) +{ +} + +/* Find the leftmost node. */ +static posix_tnode * +tdestroy_find_leftmost(posix_tnode *tn) +{ + while (tn->llink != NULL) + tn = tn->llink; + return (tn); +} + +/* + * This algorithm for non-recursive non-allocating destruction of the tree + * is described in + * https://codegolf.stackexchange.com/questions/478/free-a-binary-tree/489#489P + * and in https://devblogs.microsoft.com/oldnewthing/20251107-00/?p=111774. + */ +void +tdestroy(void *rootp, void (*node_free)(void *)) +{ + posix_tnode *tn, *tn_leftmost, *xtn; + + tn = rootp; + if (tn == NULL) + return; + if (node_free == NULL) + node_free = nul_node_free; + tn_leftmost = tn; + + while (tn != NULL) { + /* + * Make the right subtree the left subtree of the + * leftmost node, and recalculate the leftmost. + */ + tn_leftmost = tdestroy_find_leftmost(tn_leftmost); + if (tn->rlink != NULL) { + tn_leftmost->llink = tn->rlink; + tn_leftmost = tn_leftmost->llink; + } + + /* + * At this point, all children of tn have been + * arranged to be reachable via tn->left. We can + * safely delete the current node and advance to its + * left child as the new root. + */ + xtn = tn->llink; + node_free(tn->key); + free(tn); + tn = xtn; + } +} From nobody Mon Jan 5 01:25:43 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSl5gGCz6N9Yr for ; Mon, 05 Jan 2026 01:25:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dkxSl32DCz3x4M for ; Mon, 05 Jan 2026 01:25:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bjBSNKnYIhvtlZ3gI+eHgYGAXDjfS8px0ZepsZEUpsU=; b=B45TmGrmT/0DWkKE6ko8lTY6bo6iRnUOEZ2Ylf5lUvHGXL1yqG5j4wOI7mUYtla8kzAkRG PKSJa64+Alk7/TSh5mkJ0fej2sfEfMn1olu/juHkDABzc63Dh81VhHxm8TGineCgSxx26t WI6YwmhkZ4/lLrEeWw8FxGof3+RGSX06DNynhtyvCTiq9QcWgvzPOsYDgMOTNPiKF6c+Ja VxUaqy8N+a66dgFv9cB2MKtq2q84hO68u2jzei/GB3rq727I3rFNYtbRBFX6SgKLpmyzU7 4VPQQBfTewd3beB0inRvrQaj8feTjSe9E3yMrLKaDNLhVZXttTILT4L+LtSxOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767576343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bjBSNKnYIhvtlZ3gI+eHgYGAXDjfS8px0ZepsZEUpsU=; b=dFZdISmTqG8NxxCMvuUSdfU5O++1hvyGGK5wMQJhKoB+xDW56VNjKKtOMuniqDJyu6WATf FtEA5zuNLorYOeMI6lI61Dp77APwXjQNyHc72tsuNxa8Bp5pbb0EQ+JiyZzeTkMkOGsQQy ItwKhdEz4++M4kY3lqn+7C1NPrDwKO5XlpZAcFXKTh5qRoczxsvvYYF+RZiH80RI7q7CGl +iCA+8m92cwuUgltSdQYgtD53Fzqe4sn8BCDhnb05TB3Ppi2lXSJk7QfciUKrwOjb0t/O0 RyAH51BeOaQvF+QNu2sNCeXiKc4fFHnIw8zETLOoXQbgmyRAl7dP4oQSpUgCbw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767576343; a=rsa-sha256; cv=none; b=Q96z5e/ri53sHE3VhDiEAsNW5yib27l8InnXaIEfYBf7GMHOt7soWkdmPyt10sSeMUgA2b D8UUrHiJWzggU+ZDbkvYAeVHOsvJwaoLx50OPzJeMkFRNKp7oFOsnxDlJaFfW60XzyEs4l 7ICSxJSf5+szJsn65AqIjbh6aDi+hDpoFAp5muqA0bkDSHzY7GuFRbpjAkjuGA2sACvIs+ TN9vy7Z3ShOqTNVr2aAE+Nv5OUfOCkOTNKYy++tgluiNAFDoxcb0PUS+ZIFswhZdvusA1P Gl6hPsyH1b7/VwyExAH5tvfYmeZrYlVh+XqtXFVCXweWSgKTJ1AJzqEoZCc5PQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dkxSl2M0yz1057 for ; Mon, 05 Jan 2026 01:25:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39c0b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 01:25:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 6a6f96437527 - stable/15 - tdestroy(3): add tests List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6a6f96437527fcf2ad34b3ad9afffa182273ead5 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 01:25:43 +0000 Message-Id: <695b1317.39c0b.1288cee5@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6a6f96437527fcf2ad34b3ad9afffa182273ead5 commit 6a6f96437527fcf2ad34b3ad9afffa182273ead5 Author: Konstantin Belousov AuthorDate: 2025-12-26 22:00:09 +0000 Commit: Konstantin Belousov CommitDate: 2026-01-05 00:44:21 +0000 tdestroy(3): add tests (cherry picked from commit 3204c097fd08436805f059c0d7f676d29ee9bb62) --- lib/libc/tests/stdlib/tsearch_test.c | 65 ++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/lib/libc/tests/stdlib/tsearch_test.c b/lib/libc/tests/stdlib/tsearch_test.c index ee9deec588cb..f42729e5e75c 100644 --- a/lib/libc/tests/stdlib/tsearch_test.c +++ b/lib/libc/tests/stdlib/tsearch_test.c @@ -147,10 +147,75 @@ ATF_TC_BODY(tsearch_test, tc) ATF_CHECK_EQ(NULL, root); } +static int nodes; + +struct my_data { + int key; +}; + +static struct my_data * +new_my_data(int key) +{ + struct my_data *res; + + res = malloc(sizeof(struct my_data)); + res->key = key; + nodes++; + return (res); +} + +void +free_my_data(void *mdp) +{ + free(mdp); + nodes--; +} + +static int +compare_my_data(const void *mdp1, const void *mdp2) +{ + const struct my_data *md1, *md2; + + md1 = mdp1; + md2 = mdp2; + + return (md1->key - md2->key); +} + +static posix_tnode *root = NULL; + +static void +insert(int x) +{ + struct my_data *md; + + md = new_my_data(x); + tsearch(md, &root, compare_my_data); +} + +ATF_TC_WITHOUT_HEAD(tdestroy_test); +ATF_TC_BODY(tdestroy_test, tc) +{ + root = NULL; + insert(1); + insert(100); + insert(1000); + insert(5); + insert(6); + insert(12); + insert(2000); + insert(3); + + ATF_CHECK_EQ(8, nodes); + tdestroy(root, free_my_data); + ATF_CHECK_EQ(0, nodes); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, tsearch_test); + ATF_TP_ADD_TC(tp, tdestroy_test); return (atf_no_error()); } From nobody Mon Jan 5 01:31:08 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dkxbH4dc2z6N9jY; Mon, 05 Jan 2026 01:31:23 +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 4dkxbH12nWz43g8; Mon, 05 Jan 2026 01:31:23 +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 6051V8Y2083427; Mon, 5 Jan 2026 03:31:11 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 6051V8Y2083427 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 6051V8qk083426; Mon, 5 Jan 2026 03:31:08 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 5 Jan 2026 03:31:08 +0200 From: Konstantin Belousov To: Robert Clausecker Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Subject: Re: git: 9c68745a5064 - stable/15 - libc/amd64: fix stpncpy.S again Message-ID: References: <695a69f1.39da1.5b9f90d9@gitrepo.freebsd.org> List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <695a69f1.39da1.5b9f90d9@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dkxbH12nWz43g8 On Sun, Jan 04, 2026 at 01:24:01PM +0000, Robert Clausecker wrote: > The branch stable/15 has been updated by fuz: > > URL: https://cgit.FreeBSD.org/src/commit/?id=9c68745a50640ccff37565e3cbfe53dddc18d7d3 > > commit 9c68745a50640ccff37565e3cbfe53dddc18d7d3 > Author: Robert Clausecker > AuthorDate: 2025-12-18 23:37:33 +0000 > Commit: Robert Clausecker > CommitDate: 2026-01-04 13:22:51 +0000 > > libc/amd64: fix stpncpy.S again > > The previous fix introduced a regression on machines without the BMI1 > instruction set extension. The TZCNT instruction used in this function > behaves different on old machines when the source operand is zero, but > the code was originally designed to never trigger this case. The bug > fix caused this case to be possible, leading to a regression on > sufficiently old hardware. > > Fix the code by messing with things such that the source operand is > never zero. > > PR: 291720 > Fixes: 66eb78377bf109af1d9e25626bf254b4369436ec > Tested by: cy > Approved by: markj (mentor) > Differential Revision: https://reviews.freebsd.org/D54303 > > (cherry picked from commit 2f83319214d9adb8ab7a77e35d1014658b3f9cae) Why do you perform insta-MFC? Even for bug fixes, the strict policy is to have at least 3 days probation for the change in HEAD. From nobody Mon Jan 5 06:15:33 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dl3vB0kCbz6NS62 for ; Mon, 05 Jan 2026 06:15:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dl3vB06NWz3gVj for ; Mon, 05 Jan 2026 06:15:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767593734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x942sZo9pj1O3l6Tx0Xmv1NIVi94vKhddqsm0Af48O4=; b=bZR8edwmr600TZqQJTFMWqKXcrJyz/R1zuOyxxAhT44yiK/9RYv8ByWQe2An5Ymv2uvJ48 kTp52+yrzRLSHp5GdbC+OG2B9KXTarjMwrMMeFVb/fNhPJigcsecrw4TChuazOS0U8Bivg UYKIqLzX03VIjpHX6I5syCBk2uLL+wPz6kAHH9aKA0QtOf1O3mJvv50XYEPcQn6qjYfmxw +uHwX3kb1j6lH5/Jqha37FN5lJaABB3I4v1x5Rhw5sKCPNZWGz45dm+Vo3G4Zh6y8ZOirI L0aightlq8dRa6YwV2jRwsWdz7lQlwneNsFNOpAHTSxWaVk04+B4vUI4CbQxCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767593734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x942sZo9pj1O3l6Tx0Xmv1NIVi94vKhddqsm0Af48O4=; b=hVv5rOzTEYBg705s4xq0kyingOgA8R3QAC765xKx4JgDTlI3ROywoueqc1XVELvlAh6Z4z xuHmA+ZnlqmUh205QP4K722qQDMqkwB2sdr0UviUQRCh8XizCP7e0orqmfzsKBnKOra1F9 r4oKPKk3nDB0pb04Hu5xqYJO0FWctYbRsAVk2cKL46xT5tpbDwIeWTztAtYO7JS75LXiU7 5EnG8keMyPhWvmyn/5KUk8rEv4Mb+Dizl/5YZvuz2d1wLT9beEgC5nd/JQFfCspS8QDJRy uuYd6AeUCpA13i/vD5qdQC8qP0XkfxzpoIjjyZ8ZwEEJWRE6qy6fpsWnWYv1CQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767593734; a=rsa-sha256; cv=none; b=R1It4p2eaDflozyb/H+FaQlk5pDg0IjXdlp44/W0RMqBYoeHGUbaIDnXOW5lY3U1LBVF5R OY1knoyLEX0GnwzqzfNIm6O4N5GnS0lZpSIzDq1kWCP/zISpb4n7veHIsW0EjkvOCmycu8 KiZQJHLSJu1z6IEuIaQIBY4sWOwYv0+TJahlsmgzatsRZ5Kc8X27CRtcOgkiSxJ/ePinkR dcClHXxMaa3uePOt7Te+8QjhGsEaWt0acn878rz4oM0gHS02Ebj2kfAKVkeQOXrUQTV938 1DzKpR82iHkjZyUluewLAn2Fi1ESKQFRaa7WsGYjc7uM3sCsT6zulH9Jdk64fA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dl3v96VW5z17fx for ; Mon, 05 Jan 2026 06:15:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36435 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 06:15:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: 77d496104111 - stable/15 - periodic/801.trim-zfs: Fix daily-trim-zfs-flags List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 77d4961041111ba05ad1c8ff64d7cb848e836624 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 06:15:33 +0000 Message-Id: <695b5705.36435.1904d1ea@gitrepo.freebsd.org> The branch stable/15 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=77d4961041111ba05ad1c8ff64d7cb848e836624 commit 77d4961041111ba05ad1c8ff64d7cb848e836624 Author: Alexander Ziaee AuthorDate: 2026-01-01 17:53:31 +0000 Commit: Alexander Ziaee CommitDate: 2026-01-05 06:15:14 +0000 periodic/801.trim-zfs: Fix daily-trim-zfs-flags This variable was named incorrectly, resulting in any specified flags being silently ignored. PR: 292074 MFC after: 3 days Reported by: CrazyMihey@Ya.Ru Fixes: 493908c4b45c (Add a daily zfs trim script) (cherry picked from commit 68d6abd9714384a41028dc0d5086b4930366bbea) --- usr.sbin/periodic/etc/daily/801.trim-zfs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/periodic/etc/daily/801.trim-zfs b/usr.sbin/periodic/etc/daily/801.trim-zfs index 17d2ce217c10..9eed9788d016 100755 --- a/usr.sbin/periodic/etc/daily/801.trim-zfs +++ b/usr.sbin/periodic/etc/daily/801.trim-zfs @@ -44,7 +44,7 @@ case "$daily_trim_zfs_enable" in if ! zpool status "${pool}" | grep -q '(trimming)'; then echo " starting trim of pool '${pool}'" - zpool trim ${daily_zfs_trim_flags} "${pool}" + zpool trim ${daily_trim_zfs_flags} "${pool}" else echo " trim of pool '${pool}' already in progress, skipping" fi From nobody Mon Jan 5 11:50:19 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlCKf0bcsz6MNJL; Mon, 05 Jan 2026 11:50:30 +0000 (UTC) (envelope-from fuz@fuz.su) Received: from fuz.su (fuz.su [IPv6:2001:41d0:8:e508::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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "fuz.su", Issuer "fuz.su" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlCKd421tz3HVH; Mon, 05 Jan 2026 11:50:29 +0000 (UTC) (envelope-from fuz@fuz.su) Authentication-Results: mx1.freebsd.org; none Received: from fuz.su (localhost [127.0.0.1]) by fuz.su (8.18.1/8.18.1) with ESMTPS id 605BoKh9018449 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 5 Jan 2026 12:50:20 +0100 (CET) (envelope-from fuz@fuz.su) Received: (from fuz@localhost) by fuz.su (8.18.1/8.18.1/Submit) id 605BoJGd018448; Mon, 5 Jan 2026 12:50:19 +0100 (CET) (envelope-from fuz) Date: Mon, 5 Jan 2026 12:50:19 +0100 From: Robert Clausecker To: Konstantin Belousov Cc: Robert Clausecker , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Subject: Re: git: 9c68745a5064 - stable/15 - libc/amd64: fix stpncpy.S again Message-ID: References: <695a69f1.39da1.5b9f90d9@gitrepo.freebsd.org> List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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:16276, ipnet:2001:41d0::/32, country:FR] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dlCKd421tz3HVH Hi Konstantin, Am Mon, Jan 05, 2026 at 03:31:08AM +0200 schrieb Konstantin Belousov: > On Sun, Jan 04, 2026 at 01:24:01PM +0000, Robert Clausecker wrote: > > The branch stable/15 has been updated by fuz: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=9c68745a50640ccff37565e3cbfe53dddc18d7d3 > > > > commit 9c68745a50640ccff37565e3cbfe53dddc18d7d3 > > Author: Robert Clausecker > > AuthorDate: 2025-12-18 23:37:33 +0000 > > Commit: Robert Clausecker > > CommitDate: 2026-01-04 13:22:51 +0000 > > > > libc/amd64: fix stpncpy.S again > > > > The previous fix introduced a regression on machines without the BMI1 > > instruction set extension. The TZCNT instruction used in this function > > behaves different on old machines when the source operand is zero, but > > the code was originally designed to never trigger this case. The bug > > fix caused this case to be possible, leading to a regression on > > sufficiently old hardware. > > > > Fix the code by messing with things such that the source operand is > > never zero. > > > > PR: 291720 > > Fixes: 66eb78377bf109af1d9e25626bf254b4369436ec > > Tested by: cy > > Approved by: markj (mentor) > > Differential Revision: https://reviews.freebsd.org/D54303 > > > > (cherry picked from commit 2f83319214d9adb8ab7a77e35d1014658b3f9cae) > > Why do you perform insta-MFC? Even for bug fixes, the strict policy is to > have at least 3 days probation for the change in HEAD. Thank you for the reminder. Cy noted that he had tested the change for several weeks and it was fine. I will stick to the policy more strictly in the future. Yours, Robert Clausecker -- () ascii ribbon campaign - for an encoding-agnostic world /\ - against html email - against proprietary attachments From nobody Mon Jan 5 14:44:59 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlHBz5pr3z6MbNm for ; Mon, 05 Jan 2026 14:44:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlHBz5BRSz3fn4 for ; Mon, 05 Jan 2026 14:44:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767624299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+9XdWutARWWuj1UuJWE50IVS1HcGxQL81wdfmAlyncQ=; b=xO6zQsCefHkoR0Kxrw5FG0nskW3VYATuMao6GAVw6z3dqv0WejCESu/aO4+l4+isrclbNj q5xkbKCpE23XENoK6rujMGlwQduLGzZb91DrXfi0dW9r/wmfOPLG6gb4iPazqD5jBfiLCy uuHWxnh16+tDN76P4CRu1gR0iN3N/EYZxNuGryggmRoP4V4Gj1Qnr4N/UYaymcXXup98el 6xPrFtmivmEbSqZwPN3iR1bfaFqzLAS6OGGtqhJDELPzewe9+gLrZoyjwFruAGyEgqwa5o eHkCiBISG9l05BZFnZkPafrPUH83ic6NgLBClNWY605BVNja8DibYKYbeoVNKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767624299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+9XdWutARWWuj1UuJWE50IVS1HcGxQL81wdfmAlyncQ=; b=M6iWEDJRNRcjeqsjmgyKkJCDU+s/mUrLe/YUQfyuR1D7XUv/doE37pf8S2LbX/StjNcYBw 1yT7VOXUU7e9XKaJVaJ+A/+W1bWjjXrnvP6aWkvGMRnixPgjY9GC+DiZUBOV/3jKGy7UtE DHzEstvXdU50jz1laMRP6/055Wtbh4p81hEpI8L/25VhVOTSxaR/gtfVUYIrZvHRW7MmW3 3Om64TfPkFhaRPl6qnYp6UDkGo7d6KMcLtHUTZnvZVjmn6p7EP25DSl7Br7Knbdp14TIUe F1Nyst671yfm7D3/2tSkUQlzPfDsZfEaFuZVXLDtqevhFD4xKHxaYUpMQi+uCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767624299; a=rsa-sha256; cv=none; b=kIG2fL3oPNbJqhOUbU5fw/R/JO2AQEgWK8GBlme9663yHZyJtfFN/zoWzOI/L4CNwSTTrD 5fLo8MS5W5x3OQ7B+3W0m+Bd/uru49+kvNh+WyH2Qgror+6Vj/QUuGo+6jTYfOMBnxw8Cn dzU5sRdA7vZ+Ddt5j7HVajMcXJ7K7D60ve+9VK6b+nshuiJwkx4464ouzJr2KVo1cxAlW4 ABCMnx3v13ETFd4DSMbL6i49zzc3TSQWwpF395So9zTjs/8Ln8a77d1fyGHXwdO/aadreI EERLdNjhSh9qHSLFTVbJNlAzZK/poPlfUMHfTjjLtUApR6/Ghzi5JV23MgspzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlHBz43Qlz8Dx for ; Mon, 05 Jan 2026 14:44:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 47643 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 14:44:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Johan=?utf-8?Q? S=C3=B6llv?=ander Subject: git: 24808463c1f3 - stable/15 - gpart: add libxo support for "show" subcommand + man page updates List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: js X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 24808463c1f3514a53e20b7c99c2df50b48c4a47 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 14:44:59 +0000 Message-Id: <695bce6b.47643.1a59956a@gitrepo.freebsd.org> The branch stable/15 has been updated by js: URL: https://cgit.FreeBSD.org/src/commit/?id=24808463c1f3514a53e20b7c99c2df50b48c4a47 commit 24808463c1f3514a53e20b7c99c2df50b48c4a47 Author: Johan Söllvander AuthorDate: 2025-12-18 15:06:09 +0000 Commit: Johan Söllvander CommitDate: 2026-01-05 14:40:49 +0000 gpart: add libxo support for "show" subcommand + man page updates Added libxo support to `gpart show`, also updated the man pages for geom and gpart to show where you can expect libxo formatted output. PR: 290629 Sponsored by: ConnectWise Reviewed by: asomers, mckusick, phil Approved by: asomers (mentor) Differential Revision: https://reviews.freebsd.org/D53950 (cherry picked from commit 4f809ffec69cd6ede3e7be9a5bc876b2e5931028) geom_part: Fix format string issues This fixes a segfault on i386 and armv7 and numerous style violations. PR: 292008 Fixes: 4f809ffec69c ("gpart: add libxo support for "show" subcommand + man page updates") Reviewed by: js Differential Revision: https://reviews.freebsd.org/D54393 (cherry picked from commit faff7013187b03f4240af6f52f608e7ebafe19f3) --- lib/geom/part/Makefile | 2 +- lib/geom/part/geom_part.c | 107 +++++++++++++++++++++++++++++++--------------- lib/geom/part/gpart.8 | 11 ++++- sbin/geom/core/geom.8 | 12 +++++- 4 files changed, 95 insertions(+), 37 deletions(-) diff --git a/lib/geom/part/Makefile b/lib/geom/part/Makefile index 58390e299d6f..4a273eca3a6d 100644 --- a/lib/geom/part/Makefile +++ b/lib/geom/part/Makefile @@ -2,6 +2,6 @@ PACKAGE=geom GEOM_CLASS= part -LIBADD= util +LIBADD= util xo .include diff --git a/lib/geom/part/geom_part.c b/lib/geom/part/geom_part.c index cbbc81d3cc60..852eec2d790a 100644 --- a/lib/geom/part/geom_part.c +++ b/lib/geom/part/geom_part.c @@ -47,6 +47,8 @@ #include #include +#include + #include "core/geom.h" #include "misc/subr.h" @@ -77,7 +79,6 @@ static int geom_is_withered(struct ggeom *); static const char *find_geomcfg(struct ggeom *, const char *); static const char *find_provcfg(struct gprovider *, const char *); static struct gprovider *find_provider(struct ggeom *, off_t); -static const char *fmtsize(int64_t); static int gpart_autofill(struct gctl_req *); static int gpart_autofill_resize(struct gctl_req *); static void gpart_bootcode(struct gctl_req *, unsigned int); @@ -283,16 +284,6 @@ find_provider(struct ggeom *gp, off_t minsector) return (bestpp); } -static const char * -fmtsize(int64_t rawsz) -{ - static char buf[5]; - - humanize_number(buf, sizeof(buf), rawsz, "", HN_AUTOSCALE, - HN_B | HN_NOSPACE | HN_DECIMAL); - return (buf); -} - static const char * fmtattrib(struct gprovider *pp) { @@ -622,6 +613,7 @@ static void gpart_show_geom(struct ggeom *gp, const char *element, int show_providers) { struct gprovider *pp; + struct gconfig *gc; const char *s, *scheme; off_t first, last, sector, end; off_t length, secsz; @@ -659,12 +651,15 @@ gpart_show_geom(struct ggeom *gp, const char *element, int show_providers) wname = wmax; pp = LIST_FIRST(&gp->lg_consumer)->lg_provider; secsz = pp->lg_sectorsize; - printf("=>%*jd %*jd %*s %s (%s)%s\n", + xo_open_instance("part"); + xo_emit("=>{t:start/%*jd} {t:sectors/%*jd} " + "{t:name/%*s} {:scheme} ({h:size/%jd})" + "{t:state}\n", wblocks, (intmax_t)first, wblocks, (intmax_t)(last - first + 1), - wname, gp->lg_name, - scheme, fmtsize(pp->lg_mediasize), + wname, gp->lg_name, scheme, (intmax_t)pp->lg_mediasize, s ? " [CORRUPT]": ""); + xo_open_list("partitions"); while ((pp = find_provider(gp, first)) != NULL) { s = find_provcfg(pp, "start"); sector = (off_t)strtoimax(s, NULL, 0); @@ -676,33 +671,75 @@ gpart_show_geom(struct ggeom *gp, const char *element, int show_providers) s = find_provcfg(pp, "index"); idx = atoi(s); if (first < sector) { - printf(" %*jd %*jd %*s - free - (%s)\n", - wblocks, (intmax_t)first, wblocks, - (intmax_t)(sector - first), wname, "", - fmtsize((sector - first) * secsz)); + xo_open_instance(s); + xo_emit(" {t:start/%*jd} " + "{t:sectors/%*jd} " + "{P:/%*s} " + "{ne:free}- free - ({h:size/%jd})\n", + wblocks, (intmax_t)first, + wblocks, (intmax_t)(sector - first), + wname, "", + "true", (intmax_t)(sector - first) * secsz); + xo_close_instance(s); } + xo_open_instance(s); + xo_emit(" {t:start/%*jd} {t:sectors/%*jd}", + wblocks, (intmax_t)sector, wblocks, (intmax_t)length); if (show_providers) { - printf(" %*jd %*jd %*s %s %s (%s)\n", - wblocks, (intmax_t)sector, wblocks, - (intmax_t)length, wname, pp->lg_name, - find_provcfg(pp, element), fmtattrib(pp), - fmtsize(pp->lg_mediasize)); - } else - printf(" %*jd %*jd %*d %s %s (%s)\n", - wblocks, (intmax_t)sector, wblocks, - (intmax_t)length, wname, idx, - find_provcfg(pp, element), fmtattrib(pp), - fmtsize(pp->lg_mediasize)); + xo_emit(" {t:name/%*s}{e:index/%d}", + wname, pp->lg_name, idx); + } else { + xo_emit(" {t:index/%*d}{e:name}", + wname, idx, pp->lg_name); + } + + if (strcmp(element, "label") == 0) { + xo_emit(" {:label}{e:type}{e:rawtype}", + find_provcfg(pp, element), + find_provcfg(pp, "type"), + find_provcfg(pp, "rawtype")); + } else if (strcmp(element, "type") == 0) { + xo_emit(" {:type}{e:label}{e:rawtype}", + find_provcfg(pp, element), + find_provcfg(pp, "label"), + find_provcfg(pp, "rawtype")); + } else { + xo_emit(" {:rawtype}{e:type}{e:label}", + find_provcfg(pp, element), + find_provcfg(pp, "type"), + find_provcfg(pp, "label")); + } + + idx = 0; + LIST_FOREACH(gc, &pp->lg_config, lg_config) { + if (strcmp(gc->lg_name, "attrib") != 0) + continue; + idx++; + if (idx == 1) + xo_emit(" ["); + else + xo_emit(","); + xo_emit("{l:attribute}", gc->lg_val); + } + if (idx) + xo_emit("]"); + xo_emit(" ({h:size/%jd})\n", (intmax_t)pp->lg_mediasize); + xo_close_instance(s); first = end + 1; } + if (first <= last) { + xo_open_instance("unallocated"); length = last - first + 1; - printf(" %*jd %*jd %*s - free - (%s)\n", + xo_emit(" {t:start/%*jd} {t:sectors/%*jd} " + "{P:/%*s} {ne:free}- free - ({h:size/%jd})\n", wblocks, (intmax_t)first, wblocks, (intmax_t)length, - wname, "", - fmtsize(length * secsz)); + wname, "", "true", (intmax_t)length * secsz); + xo_close_instance("unallocated"); } - printf("\n"); + xo_close_list("partitions"); + xo_close_instance("part"); + xo_emit("\n"); } static int @@ -752,6 +789,7 @@ gpart_show(struct gctl_req *req, unsigned int fl __unused) errx(EXIT_FAILURE, "Class %s not found.", name); } show_providers = gctl_get_int(req, "show_providers"); + xo_open_list(name); if (nargs > 0) { for (i = 0; i < nargs; i++) { name = gctl_get_ascii(req, "arg%d", i); @@ -766,6 +804,7 @@ gpart_show(struct gctl_req *req, unsigned int fl __unused) gpart_show_geom(gp, element, show_providers); } } + xo_close_list(name); geom_deletetree(&mesh); } @@ -1084,7 +1123,7 @@ gpart_bootfile_read(const char *bootfile, ssize_t *size) if (sb.st_size == 0) errx(EXIT_FAILURE, "%s: empty file", bootfile); if (*size > 0 && sb.st_size > *size) - errx(EXIT_FAILURE, "%s: file too big (%zu limit)", bootfile, + errx(EXIT_FAILURE, "%s: file too big (%zd limit)", bootfile, *size); *size = sb.st_size; diff --git a/lib/geom/part/gpart.8 b/lib/geom/part/gpart.8 index 2e11417f8494..97dd60182435 100644 --- a/lib/geom/part/gpart.8 +++ b/lib/geom/part/gpart.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 24, 2025 +.Dd December 4, 2025 .Dt GPART 8 .Os .Sh NAME @@ -112,6 +112,7 @@ .Ar geom .\" ==== SHOW ==== .Nm +.Op Fl -libxo .Cm show .Op Fl l | r .Op Fl p @@ -537,6 +538,13 @@ See .It Cm unload See .Xr geom 8 . +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_options 7 +for details on command line arguments. .El .Sh PARTITIONING SCHEMES Several partitioning schemes are supported by the @@ -1519,6 +1527,7 @@ for details .El .Sh SEE ALSO .Xr geom 4 , +.Xr xo_options 7 , .Xr boot0cfg 8 , .Xr geom 8 , .Xr glabel 8 , diff --git a/sbin/geom/core/geom.8 b/sbin/geom/core/geom.8 index b864b3b238f5..29c6385da3f7 100644 --- a/sbin/geom/core/geom.8 +++ b/sbin/geom/core/geom.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 9, 2023 +.Dd December 4, 2025 .Dt GEOM 8 .Os .Sh NAME @@ -36,11 +36,13 @@ .Ar class .Cm help .Nm +.Op Fl -libxo .Ar class .Cm list .Op Fl a .Op Ar name ... .Nm +.Op Fl -libxo .Ar class .Cm status .Op Fl ags @@ -118,6 +120,13 @@ Print detailed information about the geom which provides .Ar provider-name . .It Fl t Display geoms hierarchy as a tree. +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_options 7 +for details on command line arguments. .El .Pp Class-specific commands are implemented as shared libraries which @@ -205,6 +214,7 @@ geom md unload .Sh SEE ALSO .Xr libgeom 3 , .Xr geom 4 , +.Xr xo_options 7 , .Xr gcache 8 , .Xr gconcat 8 , .Xr geli 8 , From nobody Mon Jan 5 14:48:27 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlHH00krCz6Mbcl for ; Mon, 05 Jan 2026 14:48:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlHGz5Tcjz3gGl for ; Mon, 05 Jan 2026 14:48:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767624507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ryVz/Cn1zVqrNVQwJfHFeuBxLiYEAnUQLNkxEuvt8LY=; b=Ikkktcph3TM3vDLHef/S+2gvpNFrcLf3g+aqopuaWeAavkU39Z49Oor7GjXF8LXZswiba7 2LFjN/3fwaH+k02lEee/MBDpFyqMmYo+bNa/hk/BDTavy05TqWDXC/xdqfRbLaYVfuzl9q vXADVb3SSj1Jh2+FqfjiBAAhCVkt71izuhz4IWWUBqcu9aYINDbtHi/PnwERsztXqStIX4 I5K5HwHGnD9hedjnw5ybMSx6JJvWG74pt3Bp/z05ipCAqdB9ThPPvZcNXu6gYiB10JURxR /153fPBakyt/flZfR7he83Cjnur6Av8e9r7HHgxXxBI4Q5g9jZqIXSdllDb1Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767624507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ryVz/Cn1zVqrNVQwJfHFeuBxLiYEAnUQLNkxEuvt8LY=; b=OezGB0TFPJudcqHSW9YkJSU1w95tJD11Fm3reS4FBlFrf1ZcWDsXbrKY+a7gZMZAlOuU1z zPgaDd80LUpmvQHqqUKSGPoB/Zyxmxdi3DOpgMG1dEqljEy9f+djr7BeY7dgmXu3L5u/fQ Za6tqjj9GmuZOjQLdN6cwo4RESIKyBMJhSkJMwShd2fh2YJw+C/4bIkUiT0g2jwyEUhSDb swjqqXS/Xtc/GFXCQ2lTTX7BR1ZBCcqnG9a9E4QdqvqnTt7oTLflk7MYMq8qamgCthVRBj 6g4nY6GZc4jxuu+RghCN8Wve0DyXhnk0fGAOawNT7fUQ5RCpEnX6KBgg5nbfDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767624507; a=rsa-sha256; cv=none; b=vJxuKrO3lP3bs4l+DVTMz+Vh+ixfL+eRndzvWISlFv2wya/LiNBxKVKF53G4bJSKSI9stS UA2Sn6KWd90wmj5wDLrp+8xvuGiV7IENNWkpNjuiD5wxFkATGAQwgF6ZHl/jYgSbfgViiA L/IQ9Z2bREPrJg6ZNVWvWL8ch5wjHWhmO1NEstMK5MaK6vaGKoWo0tI44JYiZFR8ImzR0M NFwyefi2vn4dAVYMX+aIUde6braTUryRA/NpSTuIgC7gm0d+9IQTEd9QTL3xvbtpX3u7xe plgnp1EGkXQXaIsKTnMtZooHRbx2tKE75Q9vVNaM6Ynp2uaIVFTwj/zINw04hw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlHGz496Bz95m for ; Mon, 05 Jan 2026 14:48:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 868e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 14:48:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Johan=?utf-8?Q? S=C3=B6llv?=ander Subject: git: 76df3f6f3680 - stable/14 - gpart: add libxo support for "show" subcommand + man page updates List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: js X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 76df3f6f3680556c777e2e13565c9e217c12d5b1 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 14:48:27 +0000 Message-Id: <695bcf3b.868e.22021162@gitrepo.freebsd.org> The branch stable/14 has been updated by js: URL: https://cgit.FreeBSD.org/src/commit/?id=76df3f6f3680556c777e2e13565c9e217c12d5b1 commit 76df3f6f3680556c777e2e13565c9e217c12d5b1 Author: Johan Söllvander AuthorDate: 2025-12-18 15:06:09 +0000 Commit: Johan Söllvander CommitDate: 2026-01-05 14:47:18 +0000 gpart: add libxo support for "show" subcommand + man page updates Added libxo support to `gpart show`, also updated the man pages for geom and gpart to show where you can expect libxo formatted output. PR: 290629 Sponsored by: ConnectWise Reviewed by: asomers, mckusick, phil Approved by: asomers (mentor) Differential Revision: https://reviews.freebsd.org/D53950 (cherry picked from commit 4f809ffec69cd6ede3e7be9a5bc876b2e5931028) geom_part: Fix format string issues This fixes a segfault on i386 and armv7 and numerous style violations. PR: 292008 Fixes: 4f809ffec69c ("gpart: add libxo support for "show" subcommand + man page updates") Reviewed by: js Differential Revision: https://reviews.freebsd.org/D54393 (cherry picked from commit faff7013187b03f4240af6f52f608e7ebafe19f3) --- lib/geom/part/Makefile | 2 +- lib/geom/part/geom_part.c | 107 +++++++++++++++++++++++++++++++--------------- lib/geom/part/gpart.8 | 11 ++++- sbin/geom/core/geom.8 | 12 +++++- 4 files changed, 95 insertions(+), 37 deletions(-) diff --git a/lib/geom/part/Makefile b/lib/geom/part/Makefile index 00840df1da23..cb507bd1ba1b 100644 --- a/lib/geom/part/Makefile +++ b/lib/geom/part/Makefile @@ -4,6 +4,6 @@ PACKAGE=geom GEOM_CLASS= part -LIBADD= util +LIBADD= util xo .include diff --git a/lib/geom/part/geom_part.c b/lib/geom/part/geom_part.c index cbbc81d3cc60..852eec2d790a 100644 --- a/lib/geom/part/geom_part.c +++ b/lib/geom/part/geom_part.c @@ -47,6 +47,8 @@ #include #include +#include + #include "core/geom.h" #include "misc/subr.h" @@ -77,7 +79,6 @@ static int geom_is_withered(struct ggeom *); static const char *find_geomcfg(struct ggeom *, const char *); static const char *find_provcfg(struct gprovider *, const char *); static struct gprovider *find_provider(struct ggeom *, off_t); -static const char *fmtsize(int64_t); static int gpart_autofill(struct gctl_req *); static int gpart_autofill_resize(struct gctl_req *); static void gpart_bootcode(struct gctl_req *, unsigned int); @@ -283,16 +284,6 @@ find_provider(struct ggeom *gp, off_t minsector) return (bestpp); } -static const char * -fmtsize(int64_t rawsz) -{ - static char buf[5]; - - humanize_number(buf, sizeof(buf), rawsz, "", HN_AUTOSCALE, - HN_B | HN_NOSPACE | HN_DECIMAL); - return (buf); -} - static const char * fmtattrib(struct gprovider *pp) { @@ -622,6 +613,7 @@ static void gpart_show_geom(struct ggeom *gp, const char *element, int show_providers) { struct gprovider *pp; + struct gconfig *gc; const char *s, *scheme; off_t first, last, sector, end; off_t length, secsz; @@ -659,12 +651,15 @@ gpart_show_geom(struct ggeom *gp, const char *element, int show_providers) wname = wmax; pp = LIST_FIRST(&gp->lg_consumer)->lg_provider; secsz = pp->lg_sectorsize; - printf("=>%*jd %*jd %*s %s (%s)%s\n", + xo_open_instance("part"); + xo_emit("=>{t:start/%*jd} {t:sectors/%*jd} " + "{t:name/%*s} {:scheme} ({h:size/%jd})" + "{t:state}\n", wblocks, (intmax_t)first, wblocks, (intmax_t)(last - first + 1), - wname, gp->lg_name, - scheme, fmtsize(pp->lg_mediasize), + wname, gp->lg_name, scheme, (intmax_t)pp->lg_mediasize, s ? " [CORRUPT]": ""); + xo_open_list("partitions"); while ((pp = find_provider(gp, first)) != NULL) { s = find_provcfg(pp, "start"); sector = (off_t)strtoimax(s, NULL, 0); @@ -676,33 +671,75 @@ gpart_show_geom(struct ggeom *gp, const char *element, int show_providers) s = find_provcfg(pp, "index"); idx = atoi(s); if (first < sector) { - printf(" %*jd %*jd %*s - free - (%s)\n", - wblocks, (intmax_t)first, wblocks, - (intmax_t)(sector - first), wname, "", - fmtsize((sector - first) * secsz)); + xo_open_instance(s); + xo_emit(" {t:start/%*jd} " + "{t:sectors/%*jd} " + "{P:/%*s} " + "{ne:free}- free - ({h:size/%jd})\n", + wblocks, (intmax_t)first, + wblocks, (intmax_t)(sector - first), + wname, "", + "true", (intmax_t)(sector - first) * secsz); + xo_close_instance(s); } + xo_open_instance(s); + xo_emit(" {t:start/%*jd} {t:sectors/%*jd}", + wblocks, (intmax_t)sector, wblocks, (intmax_t)length); if (show_providers) { - printf(" %*jd %*jd %*s %s %s (%s)\n", - wblocks, (intmax_t)sector, wblocks, - (intmax_t)length, wname, pp->lg_name, - find_provcfg(pp, element), fmtattrib(pp), - fmtsize(pp->lg_mediasize)); - } else - printf(" %*jd %*jd %*d %s %s (%s)\n", - wblocks, (intmax_t)sector, wblocks, - (intmax_t)length, wname, idx, - find_provcfg(pp, element), fmtattrib(pp), - fmtsize(pp->lg_mediasize)); + xo_emit(" {t:name/%*s}{e:index/%d}", + wname, pp->lg_name, idx); + } else { + xo_emit(" {t:index/%*d}{e:name}", + wname, idx, pp->lg_name); + } + + if (strcmp(element, "label") == 0) { + xo_emit(" {:label}{e:type}{e:rawtype}", + find_provcfg(pp, element), + find_provcfg(pp, "type"), + find_provcfg(pp, "rawtype")); + } else if (strcmp(element, "type") == 0) { + xo_emit(" {:type}{e:label}{e:rawtype}", + find_provcfg(pp, element), + find_provcfg(pp, "label"), + find_provcfg(pp, "rawtype")); + } else { + xo_emit(" {:rawtype}{e:type}{e:label}", + find_provcfg(pp, element), + find_provcfg(pp, "type"), + find_provcfg(pp, "label")); + } + + idx = 0; + LIST_FOREACH(gc, &pp->lg_config, lg_config) { + if (strcmp(gc->lg_name, "attrib") != 0) + continue; + idx++; + if (idx == 1) + xo_emit(" ["); + else + xo_emit(","); + xo_emit("{l:attribute}", gc->lg_val); + } + if (idx) + xo_emit("]"); + xo_emit(" ({h:size/%jd})\n", (intmax_t)pp->lg_mediasize); + xo_close_instance(s); first = end + 1; } + if (first <= last) { + xo_open_instance("unallocated"); length = last - first + 1; - printf(" %*jd %*jd %*s - free - (%s)\n", + xo_emit(" {t:start/%*jd} {t:sectors/%*jd} " + "{P:/%*s} {ne:free}- free - ({h:size/%jd})\n", wblocks, (intmax_t)first, wblocks, (intmax_t)length, - wname, "", - fmtsize(length * secsz)); + wname, "", "true", (intmax_t)length * secsz); + xo_close_instance("unallocated"); } - printf("\n"); + xo_close_list("partitions"); + xo_close_instance("part"); + xo_emit("\n"); } static int @@ -752,6 +789,7 @@ gpart_show(struct gctl_req *req, unsigned int fl __unused) errx(EXIT_FAILURE, "Class %s not found.", name); } show_providers = gctl_get_int(req, "show_providers"); + xo_open_list(name); if (nargs > 0) { for (i = 0; i < nargs; i++) { name = gctl_get_ascii(req, "arg%d", i); @@ -766,6 +804,7 @@ gpart_show(struct gctl_req *req, unsigned int fl __unused) gpart_show_geom(gp, element, show_providers); } } + xo_close_list(name); geom_deletetree(&mesh); } @@ -1084,7 +1123,7 @@ gpart_bootfile_read(const char *bootfile, ssize_t *size) if (sb.st_size == 0) errx(EXIT_FAILURE, "%s: empty file", bootfile); if (*size > 0 && sb.st_size > *size) - errx(EXIT_FAILURE, "%s: file too big (%zu limit)", bootfile, + errx(EXIT_FAILURE, "%s: file too big (%zd limit)", bootfile, *size); *size = sb.st_size; diff --git a/lib/geom/part/gpart.8 b/lib/geom/part/gpart.8 index 176499c0d1e3..8184af912583 100644 --- a/lib/geom/part/gpart.8 +++ b/lib/geom/part/gpart.8 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 24, 2025 +.Dd December 4, 2025 .Dt GPART 8 .Os .Sh NAME @@ -112,6 +112,7 @@ .Ar geom .\" ==== SHOW ==== .Nm +.Op Fl -libxo .Cm show .Op Fl l | r .Op Fl p @@ -537,6 +538,13 @@ See .It Cm unload See .Xr geom 8 . +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_options 7 +for details on command line arguments. .El .Sh PARTITIONING SCHEMES Several partitioning schemes are supported by the @@ -1528,6 +1536,7 @@ for details .El .Sh SEE ALSO .Xr geom 4 , +.Xr xo_options 7 , .Xr boot0cfg 8 , .Xr geom 8 , .Xr glabel 8 , diff --git a/sbin/geom/core/geom.8 b/sbin/geom/core/geom.8 index 7f0f0b2911b3..15d87b922f61 100644 --- a/sbin/geom/core/geom.8 +++ b/sbin/geom/core/geom.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 9, 2023 +.Dd December 4, 2025 .Dt GEOM 8 .Os .Sh NAME @@ -36,11 +36,13 @@ .Ar class .Cm help .Nm +.Op Fl -libxo .Ar class .Cm list .Op Fl a .Op Ar name ... .Nm +.Op Fl -libxo .Ar class .Cm status .Op Fl ags @@ -118,6 +120,13 @@ Print detailed information about the geom which provides .Ar provider-name . .It Fl t Display geoms hierarchy as a tree. +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_options 7 +for details on command line arguments. .El .Pp Class-specific commands are implemented as shared libraries which @@ -207,6 +216,7 @@ geom md unload .Sh SEE ALSO .Xr libgeom 3 , .Xr geom 4 , +.Xr xo_options 7 , .Xr gcache 8 , .Xr gconcat 8 , .Xr geli 8 , From nobody Mon Jan 5 16:23:45 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlKNx5c9Lz6MjPp for ; Mon, 05 Jan 2026 16:23:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlKNx4f7zz3txZ for ; Mon, 05 Jan 2026 16:23:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767630225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=roQwsXNtgY2kFDpuH03V/Ah00usyM+tVWNe3RIcZCB0=; b=Ez5b1Pt57bKpI7EfZmzFwT93gSFlALtPvmI/iNeaLZhxmqvWB4GUBg1gCrfq+NEs3emR6a JWjIIAFWS9FBiqJSRksZ1KTzvmqwEvvQUyLoCzvrMTH5oyZHVpc9kYzf5dtmuVIPg/3+Ce ICQf3mUygq5EB7K3h3/oirCl+WbL7v3pFuDHiJffnU+5wMb+6CT+GZ/nWZjEwVKVgGEKCU eSMzP31H0jcXQo2PG1IHdqgdrMmsPYi5fF5JiH/ePXkyv67VHLLBEAKYWcmMF38w+IMut9 gUTBkzvs6n8/j/100hNGGPc/xvvGLUabgQdTIDGM0lVnf1h0tO7fvcYzR/XDgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767630225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=roQwsXNtgY2kFDpuH03V/Ah00usyM+tVWNe3RIcZCB0=; b=FQIP5I7nj9z76WFpEzzB/dgsa4s0delco8NCHMBo+82DpVNC56f/U/x/jLhPr23uATB1K8 xsH/JFMx+XcgE0GTAFLEByAP0dRLVCPg6IpmAV+8E8Yv3alK+r+yPrVICE/N1HkuqWzjrI 1iuODPNn9h1OlFnHdZ9RGJaXxhNO2O/pp6lO//fOgw7ledS0Imec68q1dZg1O6lD1f/EFy /Q4qohOLtY8SrIcq5OvkwSz8XKY5SkldMeHlK18LBQsI5vfIaBs1cgGf3/zTC5TuNiIQ9o 6DfqkB8r193ODmp+h64tOv3xBGcmEB5bnCMXXecRNNi0dev3gO37piisdVWiAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767630225; a=rsa-sha256; cv=none; b=pDVbkU4yENMWbtMOepkNASDEOYE9IEBeyjjbw0SLmsN+UWJsSTzYooyALy1Wa29BIpbLQV dB+/9mq3spNrWh6mC/EhcaOC6TLE6M3Hmkrl+wyUxemAp3N3NqI1UmUpSAkhSCWtxwpAie 4/af7DCJMZeX0D21pjk5zY+Lp5GZ4yD0bFyQ/61IW0MVt6IFR8kk3spxzQveOzv3WHLEUQ sXb+a67SJ/emNZkIj7ypfcLyisAnltReUtsq3ifObwmJHYI/5SIUini4kDH0C7nsGC+co1 j4BKzG/YXDTPfASUq+oFB+aJa9fTz2W3wqaHlGrDV09JH00KqgfxR0000x2JJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlKNx473qzC2m for ; Mon, 05 Jan 2026 16:23:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21bd6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 16:23:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 4c318cb3320d - stable/15 - linux: Add required symbol to EXPORT_SYMS list List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4c318cb3320d9aedd17a2e3c07ff5c69225a29eb Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 16:23:45 +0000 Message-Id: <695be591.21bd6.5746c776@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4c318cb3320d9aedd17a2e3c07ff5c69225a29eb commit 4c318cb3320d9aedd17a2e3c07ff5c69225a29eb Author: Ed Maste AuthorDate: 2025-11-28 21:25:26 +0000 Commit: Ed Maste CommitDate: 2026-01-05 16:15:53 +0000 linux: Add required symbol to EXPORT_SYMS list PR: 291270 (cherry picked from commit 3e2093de47251de5e6e61c08d2955251137afd01) --- sys/modules/linux/Makefile | 1 + sys/modules/linux_common/Makefile | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile index eb4e17ec706b..8904e8005416 100644 --- a/sys/modules/linux/Makefile +++ b/sys/modules/linux/Makefile @@ -76,6 +76,7 @@ SRCS+= imgact_linux.c \ .if ${MACHINE_CPUARCH} == "i386" EXPORT_SYMS= +EXPORT_SYMS+= linux_device_register_handler EXPORT_SYMS+= linux_get_osname EXPORT_SYMS+= linux_get_osrelease EXPORT_SYMS+= linux_ioctl_register_handler diff --git a/sys/modules/linux_common/Makefile b/sys/modules/linux_common/Makefile index f9f4c791e9d1..0ef99386dfa9 100644 --- a/sys/modules/linux_common/Makefile +++ b/sys/modules/linux_common/Makefile @@ -13,6 +13,7 @@ SRCS+= linux_x86.c linux_vdso_selector_x86.c .endif EXPORT_SYMS= +EXPORT_SYMS+= linux_device_register_handler EXPORT_SYMS+= linux_get_osname EXPORT_SYMS+= linux_get_osrelease EXPORT_SYMS+= linux_use_real_ifname From nobody Mon Jan 5 16:23:46 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlKNy6vZ0z6MjPs for ; Mon, 05 Jan 2026 16:23:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlKNy58QSz3v2l for ; Mon, 05 Jan 2026 16:23:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767630226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4ZvqKM3XYwlhTv3uXTOyNS2pRa3yJQBl4mHlX4njFA0=; b=foftckMpU6uTZp/IwgPTCewRzmV30beANgbld+zK8kSEhJiIe+7zJmaRVWwsLiCZPZVk/c 0sjoNuWm8JwpKCWjJ++4PyHu5iYYfAYjxrUiSXkFY/92QuVJHcFKqMqdQYlPeZoBXDTAoy 1JoVNRm26e4AtaSE0bhcHZVS+KaT4DeJnlxAmqRKWnVKilXxtoDZj/KAkukbRhI7kTB/qo ImWdg7S1bHTR06cKfYDl5gWO9Oq5ED43c2MZOrEW0NgMujHMWxCyDFFKuHIx9SJh4Izn4X uIVyoJ59D3CXeIrLlxmB2GN1bsSBawAgp6W8bwi4LKB8TTY/wMr66bfpvYmBsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767630226; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4ZvqKM3XYwlhTv3uXTOyNS2pRa3yJQBl4mHlX4njFA0=; b=oz5F6ydhe2XnxKLXHII0RvNTK92GcLL+XzVI29QuAhxMCCxKxW7rZJS4ZX4Wn8LzW8Lccy o3EUzZfEoaU5svAWNOpOMmRZ9FnUuWIEnmsx8abSo3FpV9pnG0us2S+CpkbiaKcj+gn5ku AWQ8gsci2y8T6ugN8TjRFQYIbZOP/ZntqfV8HnS8sJRXgRy+dzTIOL/C02LhyLTEUt2/mJ +KqvII8EiMXDRIeK59Hy7odiDigR7QuUz2GHFTaROIGUDHzX7Ydsb1W8Y6qFMoDsAq6z0t lvz2OAjYqHF5+tV7rUEK3fVMOH0BRwN9y6yHsogUjn3avOmaX2y1axjL/y9pHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767630226; a=rsa-sha256; cv=none; b=kDLw34Jc81nw0Eoiwezymnh0VBjpJ3TxG7fDZnqwa3uYCmzwYu83SjM1nhnugLhcnugE33 QNAO8R+3BlwuRNy90pooznKBVUiADfgiz7NxvJQXpdXRmzoS4f61it5RekO+dDnj5KbrFB y7Ub+WlxihC7sCSszBLe42HDjY1Ypj0TUIl7XA0tKRSx6KtU9f+4eh70VAB2hNT3YaEqkn yuYHcEtE5gnaqGLtpBXO21oFKfto3keDnVgwDPzCmXy67r4a4FoijjknLb4vN94+rzqhKa uy9UMnFC7llZIXynDf3sv/Wv7XkQkyUPWsox1O+y3B5aLUxI113GNH1xP6MJww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlKNy4Wp9zCl8 for ; Mon, 05 Jan 2026 16:23:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2026a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 16:23:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: cc99ec748d2e - stable/15 - tests/ci: Use :H:H rather than ../.. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: cc99ec748d2e1aa6c1870443c3d2e0dfffa3428a Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 16:23:46 +0000 Message-Id: <695be592.2026a.4ca45d8a@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=cc99ec748d2e1aa6c1870443c3d2e0dfffa3428a commit cc99ec748d2e1aa6c1870443c3d2e0dfffa3428a Author: Ed Maste AuthorDate: 2025-12-23 15:42:13 +0000 Commit: Ed Maste CommitDate: 2026-01-05 16:23:31 +0000 tests/ci: Use :H:H rather than ../.. In general we want to strip subdir components, rather than appending `..`s. Reviewed by: lwhsu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54352 (cherry picked from commit 02376be32d6bcccc0c722c08779bd71e70516599) --- tests/ci/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ci/Makefile b/tests/ci/Makefile index a750b1265169..9923a3bd4f82 100644 --- a/tests/ci/Makefile +++ b/tests/ci/Makefile @@ -18,7 +18,7 @@ # USE_QEMU: Use QEMU for testing rather than bhyve # -WORLDDIR?= ${.CURDIR}/../.. +WORLDDIR?= ${.CURDIR:H:H} RELEASEDIR= ${WORLDDIR}/release MAKECONF?= /dev/null SRCCONF?= /dev/null From nobody Mon Jan 5 16:23:47 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlKP04GTTz6MjgR for ; Mon, 05 Jan 2026 16:23:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlKP00Ppfz3tX7 for ; Mon, 05 Jan 2026 16:23:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767630228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8nUHL/+cYciy/SqE/90kUhRWrfNXP7/w+J/9gxq4BkY=; b=Q11dOPqHfE4CdhhQhh59rgzpPK81ficEk8fUMXlAchhX5NQ7Rv5azGr7+cjR1rMGRsS6Mw tl/6PZprwgfhpApxp2fDQzNfkLh4WpoRZH+JqeezzU8fcwLFtgfXElhVTfP8e8WFOqevHH XL5db7+C/UHgj2Q8M1hHhV0n56suDIdv3AMJvG5LK5Z2IDHSZVciwZk563PLsBnWbfP6vw uYTwxF4/QssDsY99J/aOOGuOmUY/eXJxgZTgwmhshqcIYh4Scl+ZSMvCNFpFdThGmG5bxg FERR4bZMK5gdqNvwcFqAgnQCd/02om1jdHu/3QoQLKkqsUc2Tc4/H94awmNdGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767630228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8nUHL/+cYciy/SqE/90kUhRWrfNXP7/w+J/9gxq4BkY=; b=FwsP2JGIFQx/akiYR6bWN6EBZKa4YkCc/YTjtf0wKEoX94Nhpt2KjgnTXyTthL9LzdFP0v bCjgrpBjYfb0ydr709/Y2mtGq0m28FsceuI/MsRu/W2iFT5xJtaY7U0G/zZtWg5oquf5w3 fpdeKxqwNvJGMAwFgAKUTlc46dUMKtF2GrHZ7FdDsrWQcl2Pe7heg/lD11JPaBhu6RRw9E O2X/bTergF+6P7QXCO55Jp3AJ/OihYyjYqs2ESRSi4A3lsonvrfr33XPytaNw6AgP9kpRs /SP+9CS0zwTjEh4bp3K3+pRcJAx/a2ehJjZr3OSzwuYUshEorPLqPGqowhcXpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767630228; a=rsa-sha256; cv=none; b=P5naGpF+2ag6GgWtbQMR+1He+qb+A9UIx3DHurvXbjjK3Fddk9W/cFyiEXjE07ABtDePZO xVZl1VNYrCNzek+BqDrBNhZeyBEYhj201Rbmwg253O55cF2pEqrEGMXpZY4tgkzrdOBdqa LbhQyFOzfcMA147XX9UpzJHoHtToeUQYtHcZT4AtLgz4hkthBkZM+W9GyXQhxjG9gXWGtc K0AWo1izT5e+DFwZHzzVmR04DBKGf/dzM8cIvtsl2SEJZ0EEblLP/EcWXImN0f5sOMz9qy c1tiiea553DDy37DtFxpcdWpjhG//9wpKJckHGIcc1R1eZCef8/arDTGqEq5Gg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlKNz6s4MzCTS for ; Mon, 05 Jan 2026 16:23:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21bda by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 16:23:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: ad4cfaafb833 - stable/15 - vt: Remove .fnt.uu from Makefile SUFFIXES List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ad4cfaafb83343dc77a77cfe8768fe4e02a1a304 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 16:23:47 +0000 Message-Id: <695be593.21bda.3a77fdf0@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ad4cfaafb83343dc77a77cfe8768fe4e02a1a304 commit ad4cfaafb83343dc77a77cfe8768fe4e02a1a304 Author: Ed Maste AuthorDate: 2025-12-28 15:52:13 +0000 Commit: Ed Maste CommitDate: 2026-01-05 16:23:31 +0000 vt: Remove .fnt.uu from Makefile SUFFIXES The uudecode make rule was removed years ago. Fixes: 68510f3bac15 ("Remove uudecode make rule for vt fonts") (cherry picked from commit c910c7a3d224764adf53581cc097cefb6f963502) --- share/vt/fonts/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/vt/fonts/Makefile b/share/vt/fonts/Makefile index 01f56a235e5e..706207e70070 100644 --- a/share/vt/fonts/Makefile +++ b/share/vt/fonts/Makefile @@ -21,7 +21,7 @@ FILES= ${FONTS} INDEX.fonts CLEANFILES+= ${FONTS} -.SUFFIXES: .bdf .fnt .fnt.uu .hex +.SUFFIXES: .bdf .fnt .hex .bdf.fnt .hex.fnt: vtfontcvt -o ${.TARGET} ${.IMPSRC} From nobody Mon Jan 5 16:26:10 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlKRk56wHz6MjYf for ; Mon, 05 Jan 2026 16:26:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlKRk2VTRz3wKH for ; Mon, 05 Jan 2026 16:26:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767630370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PO1UBmPW23Sc82g4b1zzX++RNcYX/lXMxUivLt+rVWo=; b=eBVvnnkKoPfU/2ItW+bz85Wf0T+LYc2BiVM3dr6ppsj0VZxxqGD6IenN8qdh0rD3sfPUVr JGFbfxheLUHGg4HXK5eH6MTMqFGGViPm8iTZZGdQxB8TVhkocaNTc2dBWPJdn0+Z9yfNSE 7dz/u+biKZuoLwJ3kRNuoPH7a4TP9H6IgoFngOpopdHdUqjTbXvtlYb/HFvJKyWscMQAIC K/+AiSPQMy1Ndn4bsyBM2c9LhLgio9HSC56KOHsrnflydMqP9UU1JH5G4ScKBnE+WMth76 76V1+wKaH9/gNic+8uSyAzSkpPac0c/7jxXrqPJkQdo2XM/Zm0+rmtXMPwdBIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767630370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PO1UBmPW23Sc82g4b1zzX++RNcYX/lXMxUivLt+rVWo=; b=Oshz8xycqV3+M17UuUsvVLprtcNWe5ewnmVMw4WfJiYF/LJeACLTz4LiazLcte24UmxuTL Ac064Xzce7p1OfzFJeY9q3inJTw9wE5tuFgkGc5+eNsgt1lb+iCD8Rc+jUaW+5E0csfj2r Mr9QZCd3MBet390hStIROsg2r12fMLI6VGS2SLCjZ9wPfm90gZ0KWS68kGSgEo7AgaAGjC b0gstm9baIJJbSBsfiwkjYXCdDfPNBYuADFTb88IZ0MV4sAXzL/qXIokU8kxEP4JKYn4vI 9pAc8KT7xptSkLb59EYQjS+kWD62Ml7exPcZW1pdfWGD/uNz0uExqZs9n55cRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767630370; a=rsa-sha256; cv=none; b=DDN2a8nB+vgtfg+zmqLQz9XV8o5sKReJqUC57oo6QF+QMI+1LJmPSSvTgcRpzFKWQmK15f khe4dA/31le9ggG104G2fYRngCmNBBDI+n2Kz1l/ZuXVul/U805pDdLdu+8HJbE6ym56Qi kSuxIauhTf8niRUO2CtY62Ck/DENYRrrGh2iidChZADKuW6JrLv3yIoyvutJsOVJZ7uZb5 +WSuRwI3jtqNkk297vR290Tsd7agpWAaPajwQZJ9T5P9RaHLk2NAA2geJdF0COx5epvvw/ mLfpE1/z875ha/UziuqwV0N1CtD2tF0+4aSXxrhn5Lpxd5b4OTeV3SiqDzEOJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlKRk264yzCW9 for ; Mon, 05 Jan 2026 16:26:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21956 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 16:26:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: be9dcb2d1525 - stable/14 - Cirrus-CI: Build packages in parallel List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: be9dcb2d15252f4a3e91ecf3049e703841adf2d7 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 16:26:10 +0000 Message-Id: <695be622.21956.16ad7c08@gitrepo.freebsd.org> The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=be9dcb2d15252f4a3e91ecf3049e703841adf2d7 commit be9dcb2d15252f4a3e91ecf3049e703841adf2d7 Author: Ed Maste AuthorDate: 2025-10-02 14:39:11 +0000 Commit: Ed Maste CommitDate: 2026-01-05 16:25:27 +0000 Cirrus-CI: Build packages in parallel Reviewed by: ivy Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52857 (cherry picked from commit e2796f0359afad522113c25d720fa30677a044ab) (cherry picked from commit 2ef79b0524b516792f1ebb1c623999ef2ec06408) --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 80a4ae57b696..695f0b570b7e 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 Mon Jan 5 16:26:11 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlKRl68ttz6MjSb for ; Mon, 05 Jan 2026 16:26:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlKRl2xZtz3w8k for ; Mon, 05 Jan 2026 16:26:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767630371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zqT/Ojzrwjzv36JeaIXcv8c8y0+RpSvfqkNdmXKXQzA=; b=GVVQpOixh7sOjkJIuWvSAEyWYqPuHPHqaI5oEHbL+74nNlSJZnQkIGPeydM3P7HDTD35cV xg312QLKIh3Uwckt2vW02YllYNTaBuM1E7N9EFCcc9txG/3FQHFXyzAFQsuNbvRBGmF4Kw NS4UQ97KfpCKl5wxr3BISpTFjmr6zi2QxIh4VRCB3qFGxcNQmchvJxPiEPHTZ8WzPalqi/ qgBdTjwy4WJEanBnfm4cZvpysclDmgxn667z3Vjw2/FMwiBhh0dK+GTY/vmfhy0niVaBTI j+DVKGRl1P8OYkLogC//ZvIioadXxBQXRmUXUEaUpJoHcTVCQ0xwqaEaTvOtFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767630371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zqT/Ojzrwjzv36JeaIXcv8c8y0+RpSvfqkNdmXKXQzA=; b=HCZ6q55weKqsJDGQUh8GiuvIHA3/FPb4npUiVeohPCPqQ7Yjkz5R8SKCqBNMSNn/AiUP6R eDDwrMzdLJBawP5m/nWdEf4d3MmlZS5OxWUYd61xxdNjXgE4uFI+7kZxl+qXiiG0EIHupB FTjdvCFJjQpsV/OhKjQG9MrmdH+cKktA/tNVDCylwObYz+q2SKxDSU5IVih7U9YwzcDkZx HAGnQuiwtqh5JxqjLmgg7Pa2GO4K/teiPTcBX9vibeACQsXP+NnxD99XU1Co9OlJD3HLpc 4ruzY8wBH0jc94o9H9Kzip9SCGbeDyjR39A/LbXA9rSzJSCOUhDPXnXZSmSdCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767630371; a=rsa-sha256; cv=none; b=IVvAqqCTkA20rWFmDcWWHuKX6D9HhWe+HLZ3JICpfX8hJByy/x0eZnECAV7lPA4mhZs98U 88T6atEKhEL/mt17n2HUaW4yPpSKnNhBDtLlnBrtbabz94ejRqhzhbiezvNUDSWHP0aBez gVJcioZeXnD9ULcv1eQnG3qJD2LkY+67LddIQgiOzInoEOnnCkmgXPX9K+TeDvvUa4CPeP XOy7D5Q3qRuwT6o7u/r69wcHIyJKoaLOD2jNvhgl73pCZY8GElCesg1nyQFH4nRzAUiYlx vSuNnPH2FoY5iM9pOzOBysFudLyRcMITrexsUmyq4rKuBsch/ZMKZ99MBLEy3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlKRl2X82zCWB for ; Mon, 05 Jan 2026 16:26:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2026e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 16:26:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 012736a2a882 - stable/14 - Cirrus-CI: Switch back to tzst packages, but use level 1 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 012736a2a882eb20797083361df519cf10438f42 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 16:26:11 +0000 Message-Id: <695be623.2026e.3e478725@gitrepo.freebsd.org> The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=012736a2a882eb20797083361df519cf10438f42 commit 012736a2a882eb20797083361df519cf10438f42 Author: Ed Maste AuthorDate: 2025-10-02 14:39:43 +0000 Commit: Ed Maste CommitDate: 2026-01-05 16:25:27 +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 (cherry picked from commit ae5914c0e4478fd35ef9db3f32665b60e04d5a6f) (cherry picked from commit ba89a061d0bae42c4367bc5408b8c51fd63a2715) --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 695f0b570b7e..10b3a8c8480e 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 Mon Jan 5 16:26:12 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlKRm5qN9z6MjZj for ; Mon, 05 Jan 2026 16:26:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlKRm3pmYz3wQ1 for ; Mon, 05 Jan 2026 16:26:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767630372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dUwE7CGQ1Ou18tC3shcppUe+jkZOBSxhppM7d44Rgk8=; b=aXeyljzf7PVHglEl+g85z86WwC4MPV96D5NsMqrMgJyeevrVECcKriJW5Q0q3L2DuXP2G+ Fv7a2bLoWTlqej9q3TgrL0LPg7iJEp1ijtkKI5iLMaDwddWkm7UJ+CZvNYIdak/dlv9g3Z nVQJ4iIMsryYz6/q6TiGybUa51b2t1NVzCWRbAECW0pcsIO2O23XdGHqHjZzI8QBIsOQGT ZdgknAni+tBWwllGKIN7C5hPwFtgOCsoBH211HIKGC6XZMLvos5uOJwHopO8fB9PDcBMfq rnA73Blc97kmca+WCPMeqbdxzfeoTQ7of8qyG6qzUS0EQuSDQ3QTeBu9ViZ+xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767630372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dUwE7CGQ1Ou18tC3shcppUe+jkZOBSxhppM7d44Rgk8=; b=LmfzvuraZFFawuf6i5F6K/m2+tgMrXuAE0aqLbq0o5dPiqmzx3MJWEXnBSbHtiVwj6OLol WPfEGS8Id4dsO+3UTvODDfuE7QRHElRtez2eMv7GEP1DOyCMMRaNVCXoPgDpsOJ83KAAi1 ftya7rit8HhdmtVXqH/BoeOH40aGVY5GbpzT27vpUmpL2O8/xr+tBiU2GYK5MrSFe1LYJj RgRKYkzdIWIHIlRLm/MXYMFTKKEk1eZCsXA1yizfjfJkebybVoBJqG5CvuBMo1q75bNtEv vVgqFapwDWRUO62ViimYqiF+qiKQdY5uu8btU1TUjwTpSKBiwwsGEsjEs+T/mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767630372; a=rsa-sha256; cv=none; b=xotl58yJPDbQTq3Fe0UA2h6cJvNaa2fwOQ1XeMsw8TyDgZzu9bv/gvlEYM4axkhaylLi1q Gg3O7yfg47GnUPD5I8IoOPpvrGJv2iUiGqOTQVWLCd3VxsXFA7iowAP2wCg6llZ18WrvVB SO+PZSAGafSaPqcNBntblOblCuTSKeG33CGHmejFk3pJLbY6UW9wysNsVM4WT+5d3kksL/ NueC/5FY/etbLl4lXuIcV1D1o31MG46vXMY4QFqnxbT4KbzGWwC8uAAu2a4nJ7GEJpf+ov ZQCOuLLbes51glmaCl0GxVVKvERhEbUdQEnHK8S4s6j86XN4AphP1whgOlpIYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlKRm3LbwzCDm for ; Mon, 05 Jan 2026 16:26:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 228f1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 16:26:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 94f54c693065 - stable/14 - mgb.4, muge.4: Use standard HARDWARE introduction List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 94f54c6930657578512cecf8713b0c65f2dc4138 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 16:26:12 +0000 Message-Id: <695be624.228f1.3cac92ac@gitrepo.freebsd.org> The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=94f54c6930657578512cecf8713b0c65f2dc4138 commit 94f54c6930657578512cecf8713b0c65f2dc4138 Author: Ed Maste AuthorDate: 2025-11-20 16:41:38 +0000 Commit: Ed Maste CommitDate: 2026-01-05 16:25:27 +0000 mgb.4, muge.4: Use standard HARDWARE introduction Release notes are generated using this text. I used "interfaces" not "adapters" in these pages as the listed devices are the controller ICs, not end-user projects. Reviewed by: ziaee Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53846 (cherry picked from commit a4aa7df767e0df49ca3294d2b578be25812364d8) (cherry picked from commit 11c5b906fcac36e1b8749e9ef2f65ed8ad9812f9) --- share/man/man4/mgb.4 | 2 +- share/man/man4/muge.4 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/mgb.4 b/share/man/man4/mgb.4 index cf0f7aaa688d..0d26951d1b1e 100644 --- a/share/man/man4/mgb.4 +++ b/share/man/man4/mgb.4 @@ -49,7 +49,7 @@ For more information on configuring this device, see .Sh HARDWARE The .Nm -driver supports: +driver supports Microchip PCIe Gigabit Ethernet interfaces, including: .Pp .Bl -bullet -compact .It diff --git a/share/man/man4/muge.4 b/share/man/man4/muge.4 index 598106bf1855..2a1b0f600955 100644 --- a/share/man/man4/muge.4 +++ b/share/man/man4/muge.4 @@ -44,7 +44,7 @@ For more information on configuring this device, see .Sh HARDWARE The .Nm -driver supports: +driver supports Microchip USB Gigabit Ethernet interfaces, including: .Pp .Bl -bullet -compact .It From nobody Mon Jan 5 16:26:13 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlKRp04XQz6MjZr for ; Mon, 05 Jan 2026 16:26:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlKRn4Hxzz3wCP for ; Mon, 05 Jan 2026 16:26:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767630373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D5oyCZpBKvGQ4SNWMf5W0xESYrgsDy0/CmU3WzS4uNk=; b=h1J104O9spNyQEakYF3BPot8p0+lx4AUiQZFUSNG2nl4GxR+H+YB1MavkkmXWexHetKD+I t51J7WpEuPmvW/nmzaVozwMCT7wtasbNN5IO4wWaTpKQRq7/h5yfJ+5MTpV/U6bp+hzO9S 7hvXKj3B7Wdr+fVEm7oaqReBLXXYB/+6xeufe7cfKOsesweosieyg/xok/HsqawGVKzC0J 6AAU+2NnYE9L+vb9QXsNNgH4uQv43bfW3X3f/YhQVGj2mVzNr9dlZpmY1RZ4hKnIKKBbQv bUIwgAU+RGsfSKAjknNXIaIB/UMjlhhiQYBNuf4Sl8+KKDgk5qtp1wWzLOAOIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767630373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D5oyCZpBKvGQ4SNWMf5W0xESYrgsDy0/CmU3WzS4uNk=; b=kKonLIQoGekbMZEyAeJR+bSHaFdNz/m3kwCBbO5qWJ4yBVHGA1SO8D1hNxr75692YXg4Rv K7ZgHUVzuuKV0iUI7sOVvq24CFrSTGj7Bww+9lvpdbB23yF0rG3suenwN7KBsj7Ea0EPb/ bk9/hOzKh7DyvDX4IEPxzaUT0H4NgzZOm9ycCvB71yZpPUCBhZesgdQm8sWwwZD3J8QKcH xfpMzbhajwDuOrorU5MFNSzISMvwbfUAYwCTijAJzr3FNudTGk6EzCMxsoh5y41tFu/hZZ J1FY8DMW0UfggB/0JHylDDpJ42xld7zAYkH8FJ/yW9KDtXyOCnlO57lvk3l5UQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767630373; a=rsa-sha256; cv=none; b=UQgBKtWjw2rbAZtGQQ6UyMMVZxZQu/9Ucq/BfjBn3nyvap1MwNw5inrhuOeyfLASs1LnBQ nLRhlcnuQwEeRs95RQEk1/7qAizriAFSfj8N42pWUns0P4UUS918mcxgkwUFR4PtJvobjL KGtLo6rVXlPLTzYNwziyY3Z89hKaBaWnaGUx+zSzqQTeInabS+IgA1OsM+fGaIG9dg95Ec D2uerkdAOPm6U8vWnhwBgvl6SqX2mcEkpIm++rM8KdMDV64whiHQebi9JP+E7a5wf2UirA xQwQCydYFewIcXBq4aslEU73RL7qzPLP5jtQPzane4h4SnBsLhAZDKIETXEreA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlKRn3ryBzCHL for ; Mon, 05 Jan 2026 16:26:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22399 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 16:26:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 408cd2fff861 - stable/14 - linux: Add required symbol to EXPORT_SYMS list List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 408cd2fff86176513c69e880d7515af11f980cb7 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 16:26:13 +0000 Message-Id: <695be625.22399.6bc9da34@gitrepo.freebsd.org> The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=408cd2fff86176513c69e880d7515af11f980cb7 commit 408cd2fff86176513c69e880d7515af11f980cb7 Author: Ed Maste AuthorDate: 2025-11-28 21:25:26 +0000 Commit: Ed Maste CommitDate: 2026-01-05 16:25:27 +0000 linux: Add required symbol to EXPORT_SYMS list PR: 291270 (cherry picked from commit 3e2093de47251de5e6e61c08d2955251137afd01) (cherry picked from commit 4c318cb3320d9aedd17a2e3c07ff5c69225a29eb) --- sys/modules/linux/Makefile | 1 + sys/modules/linux_common/Makefile | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile index ff960ba28efb..ba2c7bf4f970 100644 --- a/sys/modules/linux/Makefile +++ b/sys/modules/linux/Makefile @@ -77,6 +77,7 @@ SRCS+= imgact_linux.c \ .if ${MACHINE_CPUARCH} == "i386" EXPORT_SYMS= +EXPORT_SYMS+= linux_device_register_handler EXPORT_SYMS+= linux_get_osname EXPORT_SYMS+= linux_get_osrelease EXPORT_SYMS+= linux_ioctl_register_handler diff --git a/sys/modules/linux_common/Makefile b/sys/modules/linux_common/Makefile index 374bc32215a2..c59a0859336e 100644 --- a/sys/modules/linux_common/Makefile +++ b/sys/modules/linux_common/Makefile @@ -14,6 +14,7 @@ SRCS+= linux_x86.c linux_vdso_selector_x86.c .endif EXPORT_SYMS= +EXPORT_SYMS+= linux_device_register_handler EXPORT_SYMS+= linux_get_osname EXPORT_SYMS+= linux_get_osrelease EXPORT_SYMS+= linux_use_real_ifname From nobody Mon Jan 5 16:26:14 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlKRq3tJJz6MjQG for ; Mon, 05 Jan 2026 16:26:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlKRp5974z3wVn for ; Mon, 05 Jan 2026 16:26:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767630374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M09JfXLIQcCsouArLIAKwi8UZ743bLuAsILT+DsEEps=; b=MdEdh1ya6v1cLLZa4IQ14C6GCpJTAzXdHy30ZdL4aE0llJqGrSV3du51bzR8HTyZpFUxIg P1Qk4+Wz1gyYf+gOIP8N1HeY5gq4S1MlfTkmctsQD2gz6In3MGhjMwWavAnY0zYeda0l58 KjKbncVb4ZZV5lvsw09PjeA7Afw2lPgdzc3EMxJCRYuAByoqRRlldIamJg5A8FibZ74JN1 9jPTajhZC5Hyl4QwBFSA81XO1pN/kVi3w35rn7hsd96ss00wbu/ihosDgRvNYNRSTqp25u 4FbbtSSDwssBqystTZZG1171bnUfExpBqM++xpDY2Cp71Qh8w9Oc2/oV7Lye+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767630374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M09JfXLIQcCsouArLIAKwi8UZ743bLuAsILT+DsEEps=; b=p3dmiu+F33wEpwwEg9Oh58N3Chro4pk+ilu9trWh02tBTqeeMDHSOKAGEaK8fr+H19aUcV JBgksWY19JX0H0174aii+tyXwxESroDbRDAzcViP9uQKKNMUql/dh0OYgODWWYUIvpe2Fx YMMXZE9GPxgsA5PU9bEeyhf2x3dQDjL3cpnK9nQRQoTOVPJmAIF9SmiBb9yBxk/S3MxkQ3 UOc13YhwIrvKAsOlrSW1Lr82PqtEwH10Y0oxcg4mqNSah5fQQPfe0ouYE9uL9pFy/VWwe4 7V55jJTCmJcRDiIWhuWnaBTQGE5qOZS+0Qprt5nepw1X6SoaTPttd7SqVw1CWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767630374; a=rsa-sha256; cv=none; b=taLRKnt/+BnzOvybKq3AJMKA8/J9dHSQUZAC+1gv0GWh2hI9KlGdqkkl6EzZcDdIV/Vdrf calNs6DWdJutPmrwBHdtLww+Y5f62LxSscBMLsgCLfe0gahQSDDwD4Net8MxzgEaKV1exZ INipibEzcyingGg/jnLziyfHyxjtvFneLuX+ZZDBSLoleu/eAPB1TzXq0Bs7CIO20MLL1m A96zgme7172TaSgQWl6/AR14rPKeVjXKmD4ox7OV6IqgcwqJ54rt4YdUenFVfb+cITEw+d qvxwyfcBAi+rfPRaZUgL8ecBtWPJ/9rMN6dpw8QNa/0PjiLvNn8BRqJ4T/0c9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlKRp4d8dzChw for ; Mon, 05 Jan 2026 16:26:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2252c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 16:26:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: f1081a8c5741 - stable/14 - vt: Remove .fnt.uu from Makefile SUFFIXES List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f1081a8c5741cb68860dba6cb10eb3448e4c1d21 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 16:26:14 +0000 Message-Id: <695be626.2252c.51304c19@gitrepo.freebsd.org> The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f1081a8c5741cb68860dba6cb10eb3448e4c1d21 commit f1081a8c5741cb68860dba6cb10eb3448e4c1d21 Author: Ed Maste AuthorDate: 2025-12-28 15:52:13 +0000 Commit: Ed Maste CommitDate: 2026-01-05 16:25:27 +0000 vt: Remove .fnt.uu from Makefile SUFFIXES The uudecode make rule was removed years ago. Fixes: 68510f3bac15 ("Remove uudecode make rule for vt fonts") (cherry picked from commit c910c7a3d224764adf53581cc097cefb6f963502) (cherry picked from commit ad4cfaafb83343dc77a77cfe8768fe4e02a1a304) --- share/vt/fonts/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/vt/fonts/Makefile b/share/vt/fonts/Makefile index a5a1ef981a97..ad8070d45d31 100644 --- a/share/vt/fonts/Makefile +++ b/share/vt/fonts/Makefile @@ -22,7 +22,7 @@ FILES= ${FONTS} INDEX.fonts CLEANFILES+= ${FONTS} -.SUFFIXES: .bdf .fnt .fnt.uu .hex +.SUFFIXES: .bdf .fnt .hex .bdf.fnt .hex.fnt: vtfontcvt -o ${.TARGET} ${.IMPSRC} From nobody Mon Jan 5 20:00:28 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQC11TSdz6MyFH for ; Mon, 05 Jan 2026 20:00:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQC05QNFz3ClM for ; Mon, 05 Jan 2026 20:00:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f45kKfPwiUNaMpk1kjBE1HIiNKC2R7YfBI26bwaQjB0=; b=LVKP/usT/3s0mDemnYcN70+d5Nr7XpynYzrjR2lRQ+3Tip/gOlYBySZxdwiYANJR4HXTnw G5utrpUpM6+p9WMOiwvGgbAU/QCabU4MG22HhAVMpemAKmPmm89Flgx7LyCPgRafJKGrOo asjjspGCXiihWPVaVp9pDskKK587QrWCrWgVl1x4qaN54JGoDldJxLXyIqf1r8s9vQO9kI 3msU5xFb6ya+qj0CgTo83Vxw5tZAj1ehAvK5yC0D9kWnZiOvAG6krEgNiViYn5tQOJc5qI vCwq1/1twwrh6ldd6AXBdB6oS9yVsK7oV+KIC1cmwJ33IOL0V7hu0NvC9uUuag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643228; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f45kKfPwiUNaMpk1kjBE1HIiNKC2R7YfBI26bwaQjB0=; b=CxPiIs1LzFJBpijlzsm7K5H0ZVZy0I+fmvaSIahGFVA09behP/AWTbV2bZRF+RaFYKfbIu qsnO4++u5aJpCyEIUc3iJMXLvGC6WC45NkACp41cFmWunEHXKFzzXrTsabv2KRUeJSluON yGa8uIhWSbSWG+Lznvwbeizxh787cUOZEs8miNrlYiYwu0PLInDjxDROGBE59x57ZkcrlF f9aNLHhnt3MR+0NUbiPu8c0R84L9HAmA/RN/dzCpum0Txg8jpiR79yfCHAA5RF1/ynedJQ Rmf/PGzCCrpToPPo2OUaoYQUUDPp3sW0Ysg4DJQar+5Bx69EOf4Zqn1G82V4tg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643228; a=rsa-sha256; cv=none; b=N63pP/vI+NemC1/vr376iNL99lZhftONIrm+0zATyJUg6BmPJB2IRl2SeFfUsRUf4V8obr VHS2A3TEMbcWy+GcOxLlqcnCYI4a2bgoJ+N+IO1+QgkBN/S5ZpUN66tXHcgSk6uZN+H3Mi QqrLLlMr9jFt+qnp9LgmByskxsBnUnKklWodvtRrFqAPmyP9y4maw/Zal7WBqABlPkTcKi 2kQrTNtZsV+8lHtvV12JQBINwrhBIkh7ydM1s+nzKXy1bXE8xNpBs0ZQ3DMKFC+jO0cM3H NAmjTjsA90SkR0hO9bwZ3Ukc0tWYwdwvfj795GfrCAT4PEtCIZJXiz/oqgYe8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQC03ycFzb9Z for ; Mon, 05 Jan 2026 20:00:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d75d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:00:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: ae952b75c026 - stable/15 - ipfs: Fix typo in error message List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ae952b75c02627aefccf675dc0852346ca37a967 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:00:28 +0000 Message-Id: <695c185c.3d75d.629b78e1@gitrepo.freebsd.org> The branch stable/15 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=ae952b75c02627aefccf675dc0852346ca37a967 commit ae952b75c02627aefccf675dc0852346ca37a967 Author: Cy Schubert AuthorDate: 2025-10-28 03:43:14 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 19:59:59 +0000 ipfs: Fix typo in error message MFC after: 3 days (cherry picked from commit 5ae7b106cfd4801ef5e0f69b02ad9b3ae3ccfbec) --- sbin/ipf/ipfs/ipfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ipf/ipfs/ipfs.c b/sbin/ipf/ipfs/ipfs.c index 6225c6e1154d..94c9f70410f2 100644 --- a/sbin/ipf/ipfs/ipfs.c +++ b/sbin/ipf/ipfs/ipfs.c @@ -576,7 +576,7 @@ int readnat(int fd, char *file) in = (nat_save_t *)malloc(ipn.ipn_dsize); if (in == NULL) { - fprintf(stderr, "nat:cannot malloc nat save atruct\n"); + fprintf(stderr, "nat:cannot malloc nat save struct\n"); goto freenathead; } From nobody Mon Jan 5 20:00:29 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQC20MQJz6MyJ3 for ; Mon, 05 Jan 2026 20:00:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQC158bqz3Chl for ; Mon, 05 Jan 2026 20:00:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NfD9moH3pqdF/RjRrKhFM/zllyJ0g9F9DefSgmzVDjU=; b=hQtaVAw7pYVGQSwZKYLob22yWYX0Bpc/o3Syu8MqPG6e6q//nbTxZiAuAXXxvFkmZ6i8Jg rx4bg2R2vK+8wyRPBhxVp3Eg/Pzlbt2QaWRUIiHvTiQtkh/7FHd+7bwSVk4DrlYa/pQ3gA 6VLYeWjTBtpV+GYCN6Qtbd/qbR7ZtqNlvUrlsM3AzkaVCk5CMDDdgce83hj0xFYSepRhwS X0AawLrrdnstcUVpF5lNvbQkRk2yhKkz+Ooh5Ns941JOvKoN5l00VwCpfT6kO9+6GtTEsl 9TxcigGgWEBQY4kmJuR9/4Y9I+PTvw/3J5Y+FVYPS1qL0KX15gFszG7SK+vMSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NfD9moH3pqdF/RjRrKhFM/zllyJ0g9F9DefSgmzVDjU=; b=ODm1hDxYxDNxVovMq5Jc4kVVEJV+u9OsZw1QVyWtPWeKF29vKsuDOKBnzgSeVNW7x3gjmc VmmSxHJ7oV2kf/pDpBBN1kC3s1R+pu/ESQg1YYvCcIE/N2mMssxZqkxxAWbWnIYIpuRE9V YPBYB+QKrwdQ4MnmGrb9405HErFHiAb1fcAJ3RNQszGfp13xmBnmG2AWcXcbDsXbeCUt2o bZWYdjFVawHfpla9jNekfbToWaKI8vUXY0jDe3jZ2TDi8opUP+VtHc2Brehb7g18n8/1za clKYiAC4N+pmpqEaObKRFsus8HWQm5ojQL/eYcCffKPW6hW+t0uRKyH0HAyl3w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643229; a=rsa-sha256; cv=none; b=FcpMMgCtjIOaWFEAXaB/9f+G1z46Bu208aPfc3cxhiCXy09fE+EXvxW/7Oy+AZAtqHUUHt ccCFIvYfYZpz/OhOSFkDfCRYp0nO9ozxkJymGdBE40neTdqGgO2Zsy6+N8wVsEZHrdi/Xu g0OPSsV/ui96rRO6fbJb8Xiv57HPlV64WduGkRR1hUNxWdWu9crh8Orf+yJcO0gKAAR/QO A4nUyAp4E6l2UK/ypFOIpee9tPuN4RJufGac9H9PJwZT0qj+ht2yy/IsDTOhkG7YflrCd/ WfPThAq14u68ObdYofZkRP1J0fxows7EmQg3JQvO/kFM84c0GSguSX0yllghCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQC14k4Fzb53 for ; Mon, 05 Jan 2026 20:00:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 810f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:00:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: da3bf842791e - stable/15 - ipfilter: Add ipf_check_names_string() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: da3bf842791ebac75f2c336c58ca8d1dce14eb09 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:00:29 +0000 Message-Id: <695c185d.810f.2bfb73ed@gitrepo.freebsd.org> The branch stable/15 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=da3bf842791ebac75f2c336c58ca8d1dce14eb09 commit da3bf842791ebac75f2c336c58ca8d1dce14eb09 Author: Cy Schubert AuthorDate: 2025-11-18 19:23:06 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 20:00:00 +0000 ipfilter: Add ipf_check_names_string() ipf_check_names_string will verify userland inputs in names strings (fr.fr_names, in.in_names) for correctness. Original concept of ipf_check_names_string() instead of macros by markj. Reviewed by: markj MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53843 (cherry picked from commit 525c535d5aa87f686dcfee620619827f7c6090db) --- sys/netpfil/ipfilter/netinet/fil.c | 31 +++++++++++++++++++++++++++++++ sys/netpfil/ipfilter/netinet/ip_fil.h | 1 + 2 files changed, 32 insertions(+) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 2fcea433295f..d487cdde20d8 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -9951,3 +9951,34 @@ ipf_inet6_mask_del(int bits, i6addr_t *mask, ipf_v6_masktab_t *mtab) ASSERT(mtab->imt6_max >= 0); } #endif + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_check_names_string */ +/* Returns: int - 0 == success */ +/* - 1 == negative offset */ +/* - 2 == offset exceds namelen */ +/* - 3 == string exceeds the names string */ +/* Parameters: names - pointer to names string */ +/* namelen - total length of names string */ +/* offset - offset into names string */ +/* */ +/* Validate the names string (fr_names for ipfilter, in_names for ipnat). */ +/* ------------------------------------------------------------------------ */ +int +ipf_check_names_string(char *names, int namelen, int offset) +{ + const char *name; + size_t len; + + if (offset == -1) + return (0); + if (offset < 0) + return (1); + if (offset > namelen) + return (2); + name = &names[offset]; + len = strnlen(name, namelen - offset); + if (len == namelen - offset) + return (3); + return (0); +} diff --git a/sys/netpfil/ipfilter/netinet/ip_fil.h b/sys/netpfil/ipfilter/netinet/ip_fil.h index aa3d1de422db..ad6128d9a8e2 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil.h +++ b/sys/netpfil/ipfilter/netinet/ip_fil.h @@ -1859,5 +1859,6 @@ extern int ipf_ht_node_del(host_track_t *, int, i6addr_t *); extern void ipf_rb_ht_flush(host_track_t *); extern void ipf_rb_ht_freenode(host_node_t *, void *); extern void ipf_rb_ht_init(host_track_t *); +extern int ipf_check_names_string(char *, int, int); #endif /* __IP_FIL_H__ */ From nobody Mon Jan 5 20:00:30 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQC30Jj4z6Myc9 for ; Mon, 05 Jan 2026 20:00:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQC2601lz3ClN for ; Mon, 05 Jan 2026 20:00:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=svX0phhZRXMVyW91sOZZslBKlp2+/twJQUu6J4pp8wE=; b=qxRu7XUEVjWRHUtc2DHHrencVld8ljzj0FOQu76Ho1TcEWLq1loe348ARnK+2loISed/ad RzRw5sFwl6UfzNg3A8A9UbfKq0GDD8E4/zn/Fowlf+UNYwvgJL8STOOwxmJerm3WzEvQ4L ZnQLGNQBBNvF4jmAKhP5RktSFcC1BnfURGCvlWBXJSNSHF6HSZJJyzmpUE4AQEYc9lmv42 vzp9M8dVhmWB/bDQe7+sKBf6wPbQawhxO5Tnr5QlQTPo5BsAqyzwwDfgXPALeJxPgi5771 Vlx0armvJQ2Dx43Ujoo8FlA0pkB9d9Ryo21J6M59pZ3uUUjFt9EtBfYAADfDKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643230; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=svX0phhZRXMVyW91sOZZslBKlp2+/twJQUu6J4pp8wE=; b=p6i5ajmb8HC5Q08m+bTzR9Jg6qMxg21fXYHj4/3/00NfIRjm1jy8BnseAaTF+GTDmu/vgq d7d6K8Fmxbo1T+Gx4jqWkOBTiG4d34jSWg0DSqWPrdNgf347gsxUUvAkp9FTxGLFZzswbI WoReLuRy0ueUBJtvSXhlRmBqqaXC0xtXYz2F/BGO8Ll/1tUYQF6zx7AOjVAfeQvClLON9z PHbKhXnz0/4akiwdYEoZY4/AsRjHphnZik0tBk1ZlpxXfKJam+FLxERXe3wXjJxStJ4au7 H8KJa/RICEQMNDbc+xy9Ie5pIYGOiG5lvrtzY2X/OGxLV3uezUo8pHCW3mtBbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643230; a=rsa-sha256; cv=none; b=Dd/bBixt+zGr6ujE78GT+J+DRVEKYS8qHYUG+VUXtRDMDOy7mTWS7d6ETBu1P8zSMniqT4 BGs3lLH6BHuMCvqEnL11snd675HbcBDBt+4bSC9VGb28qAOoXrKiAuoqKl/pBcIi0NjRj0 llyeVTC53jK+3iCyIvV++bby36irkvyBP5ZkFvVtoW0B2grkDH2tZH2K20R1MvuBR11Unv 0Ps70nLMg7zOpR6tYWgG8eORfEyU2Y5CrivdKj1/S4qG2Wqb8v8kAawjAFsMNGRGwl9nPk ngce5nOopSf2bQEY5hNa/INHU+f668LKpmtvAoOOS/8QAoog/xbycNj4Y+CiEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQC25XDCzb9c for ; Mon, 05 Jan 2026 20:00:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fc21 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:00:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 00fd12b41f19 - stable/15 - ipfilter: Verify frentry on entry into kernel List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 00fd12b41f19290af168e60481cef4ea91a7a83a Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:00:30 +0000 Message-Id: <695c185e.3fc21.39ca5e13@gitrepo.freebsd.org> The branch stable/15 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=00fd12b41f19290af168e60481cef4ea91a7a83a commit 00fd12b41f19290af168e60481cef4ea91a7a83a Author: Cy Schubert AuthorDate: 2025-10-29 17:23:23 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 20:00:00 +0000 ipfilter: Verify frentry on entry into kernel The frentry struct is built by ipf(8), specifically ipf_y.y when parsing the ipfilter configuration file (typically ipf.conf). frentry contains a variable length string field at the end of the struct. This data field, called fr_names, may contain various text strings such as NIC names, destination list (dstlist) names, and filter rule comments. The length field specifies the length of fr_names within the frentry structure and fr_size specifies the size of the frentry structure itself. The upper bound limit to the length of strings field is controlled by the fr_max_namelen sysctl/kenv or the max_namelen ipfilter tuneable. The initial concepts were discussed with emaste and jrm. Reported by: Ilja Van Sprundel Reviewed by: markj MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53843 (cherry picked from commit eda1756d0454f9383940dc825cf571ff67e0c013) --- sbin/ipf/libipf/interror.c | 5 +++ sys/netpfil/ipfilter/netinet/fil.c | 61 +++++++++++++++++++++++++++++++-- sys/netpfil/ipfilter/netinet/ip_fil.h | 1 + sys/netpfil/ipfilter/netinet/mlfk_ipl.c | 1 + 4 files changed, 66 insertions(+), 2 deletions(-) diff --git a/sbin/ipf/libipf/interror.c b/sbin/ipf/libipf/interror.c index 29923163212f..b529c4b95262 100644 --- a/sbin/ipf/libipf/interror.c +++ b/sbin/ipf/libipf/interror.c @@ -177,6 +177,11 @@ static ipf_error_entry_t ipf_errors[] = { { 149, "object size validation failed for kernel copyout" }, { 150, "error copying data out for kernel copyout" }, { 151, "version mismatch for kernel copyout" }, + { 152, "fr_names offset is wrapped negative" }, + { 153, "fr_names larger than fr_namelen" }, + { 154, "frentry larger than fr_size" }, + { 155, "frentry and fr_namelen mismatch fr_size" }, + { 156, "fr_namelen too large" }, /* -------------------------------------------------------------------------- */ { 10001, "could not find token for auth iterator" }, { 10002, "write permissions require to add/remove auth rule" }, diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index d487cdde20d8..0de5378322df 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -363,6 +363,10 @@ static ipftuneable_t ipf_main_tuneables[] = { "ip_timeout", 1, 0x7fffffff, stsizeof(ipf_main_softc_t, ipf_iptimeout), 0, NULL, ipf_settimeout }, + { { (void *)offsetof(ipf_main_softc_t, ipf_max_namelen) }, + "max_namelen", 0, 0x7fffffff, + stsizeof(ipf_main_softc_t, ipf_max_namelen), + 0, NULL, NULL }, #if defined(INSTANCES) && defined(_KERNEL) { { (void *)offsetof(ipf_main_softc_t, ipf_get_loopback) }, "intercept_loopback", 0, 1, @@ -4399,7 +4403,8 @@ int frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, int set, int makecopy) { - int error = 0, in, family, need_free = 0; + int error = 0, in, family, need_free = 0, interr, i; + int interr_tbl[3] = { 152, 156, 153}; enum { OP_ADD, /* add rule */ OP_REM, /* remove rule */ OP_ZERO /* zero statistics and counters */ } @@ -4408,7 +4413,9 @@ frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, void *ptr, *uptr; u_int *p, *pp; frgroup_t *fg; - char *group; + char *group, *name; + size_t v_fr_size, v_element_size; + int v_rem_namelen, v_fr_toend; ptr = NULL; fg = NULL; @@ -4423,6 +4430,17 @@ frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, IPFERROR(6); return (EINVAL); } + if (fp->fr_size < sizeof(frd)) { + return (EINVAL); + } + if (sizeof(frd) + fp->fr_namelen != fp->fr_size ) { + IPFERROR(155); + return (EINVAL); + } + if (fp->fr_namelen < 0 || fp->fr_namelen > softc->ipf_max_namelen) { + IPFERROR(156); + return (EINVAL); + } KMALLOCS(f, frentry_t *, fp->fr_size); if (f == NULL) { IPFERROR(131); @@ -4449,6 +4467,44 @@ frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, fp->fr_ptr = NULL; fp->fr_ref = 0; fp->fr_flags |= FR_COPIED; + + for (i = 0; i <= 3; i++) { + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_ifnames[i])) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } + } + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_comment)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_group)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_grhead)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_tif.fd_name)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_rif.fd_name)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_dif.fd_name)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } } else { fp = (frentry_t *)data; if ((fp->fr_type & FR_T_BUILTIN) == 0) { @@ -9040,6 +9096,7 @@ ipf_main_soft_create(void *arg) #endif softc->ipf_minttl = 4; softc->ipf_icmpminfragmtu = 68; + softc->ipf_max_namelen = 128; softc->ipf_flags = IPF_LOGGING; #ifdef LARGE_NAT diff --git a/sys/netpfil/ipfilter/netinet/ip_fil.h b/sys/netpfil/ipfilter/netinet/ip_fil.h index ad6128d9a8e2..7b070f0d6867 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil.h +++ b/sys/netpfil/ipfilter/netinet/ip_fil.h @@ -1529,6 +1529,7 @@ typedef struct ipf_main_softc_s { int ipf_pass; int ipf_minttl; int ipf_icmpminfragmtu; + int ipf_max_namelen; int ipf_interror; /* Should be in a struct that is per */ /* thread or process. Does not belong */ /* here but there's a lot more work */ diff --git a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c index 1c3051fb6615..d558b2d24b2c 100644 --- a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c +++ b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c @@ -135,6 +135,7 @@ SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_running, CTLFLAG_RD, SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_chksrc, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_chksrc), 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_minttl), 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, large_nat, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &VNET_NAME(ipfmain.ipf_large_nat), 0, "large_nat"); +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_max_namelen, CTLFLAG_RWTUN, &VNET_NAME(ipfmain.ipf_max_namelen), 0, "max_namelen"); #define CDEV_MAJOR 79 #include From nobody Mon Jan 5 20:00:31 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQC42ZGCz6MyQy for ; Mon, 05 Jan 2026 20:00:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQC36ldyz3CRY for ; Mon, 05 Jan 2026 20:00:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=abov/BaqP0F+hgIt9fLpn3tLrh1WzINl5FIuWSqh3uQ=; b=p866S5OIK/7HZQBMwRxLQZFI/GOEVnXjvuEKeImotixHp1BiSs2yCjCOmxClfmyPi8g+p7 /HS5rVhXVPeiAMzBXoD5KHAQrEuSYq/87Ny/yEVALfa7/rspdtHaTaxMtYAxJb4W6csHW9 aFX/s9EjaG4V2+S9zfy9h76oCfrLi+cyuYHuz5RnWjLPQSZM3rSSGCJgFYQTrbHRa/8dyW ydrIKCbjvyiMEFcRVWZNFnirz8cw+aIyo9E4DJfu8RcbJakvrBZpnbS9+ZunFmF/FNRB6y 1wEM6COhlIXbyEXkbVlL7aWms7P0cTFEmdDEwcKK5wagxn/KSFxT0EtZg92uYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=abov/BaqP0F+hgIt9fLpn3tLrh1WzINl5FIuWSqh3uQ=; b=QVdPyuxikGZchuHiisnXCYQwlxZsp/6StgBFhpHclCeVqCdcO6Tybz9W7YOobENLwHbmyb t3EFlfp3vEd+QdficP7RG2/m+mngAnIX6Yos/3tX7kPI9ew8gMElVvvX0KPyoxQBIBGb9N FBU2yzSYpr22DVjbLlb4tItaV9iyopK2f5Ak5NKRvbyXfXuhhi6DKw8yqiBG/8oNdznJjj WDYt6/PQu1OijD45NchCU6k4hU2VcU3YU0aco5b2YmFLy8k3JDZfmhLwCVjhz4qxRv8qd7 TcozSlaXbE3N6H5faOZesddsn3M/Sv1Czjov2ju4O8F3H5rABB3FVbw7Ta0L6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643232; a=rsa-sha256; cv=none; b=l1TpO+eXYtpmrV7rwmDAqnzPtbVWeGYkNtP6tQsE/wM1RtYGIOj9S/9cF15WJcrhHTwEe3 CdSrxb5HK4u/ukvqUrSNtwLZ1cggVlklO96CAQa09+tRme0JahL+REvrU2YblAMl1FkWkH GF4sBhSPxmNt+VWOdN6Ywur6LCgNtKv8zkrOg9HxMp8iV04SWsQcifYL2E5OO4Um6gr9YZ m/YsmbjBnEmUkn9G6KXYfQnpgvz6BKK3cw2HwJWVhZ6kjKeItU+wQd6M8mpVxncb5BKmS0 9fhkIXWESHF5c45wSpPItj/TdmIzCEXsPkS2DEqFPhnIpzXHQu7meWrXJh2CMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQC36J9PzbDV for ; Mon, 05 Jan 2026 20:00:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3eeb1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:00:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 43bd2534b7d5 - stable/15 - ipfilter: Verify ipnat on entry into kernel List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 43bd2534b7d552e63129004f32fc1f112855431f Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:00:31 +0000 Message-Id: <695c185f.3eeb1.1b45cad9@gitrepo.freebsd.org> The branch stable/15 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=43bd2534b7d552e63129004f32fc1f112855431f commit 43bd2534b7d552e63129004f32fc1f112855431f Author: Cy Schubert AuthorDate: 2025-11-03 04:59:15 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 20:00:00 +0000 ipfilter: Verify ipnat on entry into kernel The ipnat struct is built by ipnat(8), specifically ipnat_y.y when parsing the ipnat configuration file (typically ipnat.conf). ipnat contains a variable length string field at the end of the struct. This data field, called in_names, may contain various text strings such as NIC names. There is no upper bound limit to the length of strings as long as the in_namelen length field specifies the length of in_names within the ipnat structure and in_size specifies the size of the ipnat structure itself. Reported by: Ilja Van Sprundel Reviewed by: markj MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53843 (cherry picked from commit 821774dfbdaa12ef072ff7eaea8f9966a7e63935) --- sbin/ipf/libipf/interror.c | 6 +++++ sys/netpfil/ipfilter/netinet/ip_nat.c | 42 ++++++++++++++++++++++++++++++++++- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/sbin/ipf/libipf/interror.c b/sbin/ipf/libipf/interror.c index b529c4b95262..7634753967e6 100644 --- a/sbin/ipf/libipf/interror.c +++ b/sbin/ipf/libipf/interror.c @@ -363,6 +363,12 @@ log" }, { 60074, "unknown next address type (ipv6)" }, { 60075, "one object at a time must be copied" }, { 60076, "NAT ioctl denied in jail without VNET" }, + { 60077, "in_names offset is wrapped negative" }, + { 60078, "in_names larger than in_namelen" }, + { 60079, "ipnat larger than in_size" }, + { 60080, "ipnat and in_namelen mismatch in_size" }, + { 60081, "ip_names runs off the end of ipnat" }, + { 60082, "in_namelen too large" }, /* -------------------------------------------------------------------------- */ { 70001, "incorrect object size to get pool stats" }, { 70002, "could not malloc memory for new pool node" }, diff --git a/sys/netpfil/ipfilter/netinet/ip_nat.c b/sys/netpfil/ipfilter/netinet/ip_nat.c index 53c180cdfbca..44ab7e9283de 100644 --- a/sys/netpfil/ipfilter/netinet/ip_nat.c +++ b/sys/netpfil/ipfilter/netinet/ip_nat.c @@ -974,9 +974,13 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, int mode, int uid, void *ctx) { ipf_nat_softc_t *softn = softc->ipf_nat_soft; - int error = 0, ret, arg, getlock; + int error = 0, ret, arg, getlock, interr, i; + int interr_tbl[3] = { 60077, 60081, 60078 }; ipnat_t *nat, *nt, *n; ipnat_t natd; + char *name; + size_t v_in_size, v_element_size; + int v_rem_namelen, v_in_toend; SPL_INT(s); #if !SOLARIS && defined(_KERNEL) @@ -1027,6 +1031,16 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, error = EINVAL; goto done; } + if (sizeof(natd) + natd.in_namelen != natd.in_size) { + IPFERROR(60080); + error = EINVAL; + goto done; + } + if (natd.in_namelen < 0 || natd.in_namelen > softc->ipf_max_namelen) { + IPFERROR(60082); + error = EINVAL; + goto done; + } KMALLOCS(nt, ipnat_t *, natd.in_size); if (nt == NULL) { IPFERROR(60070); @@ -1041,6 +1055,32 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, nat = nt; } + /* + * Validate the incoming ipnat_t. + */ + if ((interr = ipf_check_names_string(nat->in_names, nat->in_namelen, nat->in_ifnames[0])) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto done; + } + if (nat->in_ifnames[0] != nat->in_ifnames[1]) { + if ((interr = ipf_check_names_string(nat->in_names, nat->in_namelen, nat->in_ifnames[1])) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto done; + } + } + if ((interr = ipf_check_names_string(nat->in_names, nat->in_namelen, nat->in_plabel)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto done; + } + if ((interr = ipf_check_names_string(nat->in_names, nat->in_namelen, nat->in_pconfig)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto done; + } + /* * For add/delete, look to see if the NAT entry is * already present From nobody Mon Jan 5 20:00:32 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQC56Fbqz6MycH for ; Mon, 05 Jan 2026 20:00:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQC50V0yz3CZP for ; Mon, 05 Jan 2026 20:00:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gqdcd46olJaLaYqqjc7+J/UytRiPSUX2rojo0Prcrgs=; b=IlQrKshVG0/iLJ7MT9lydrUpKFCfVOOqxt7iCiAlQcIirFonoDzH2LGaSyAYrelApdvB5w Ozl7hjjouh6Zq6nXechTxutdGAIn+vdhkIUBHdmK4z4W2elSlgh1zUjCP7qIg7nOSiQNXq 3/Ky4hgtdVPIdALq6tXH3xhk6R/2dKGJfYyCoTiCFJqQBPqBdoeHIgUwpal59VH7JLgUEs NJGvVOxQwU93YVM6EKfvb2Q/Kj7B+kC4k+/IEEMexmMkGJBYR/APwAX6XfGmg6MIzvp60f iC58OrxKzCmtE2htJ+PfyAHK+ucGYfBU6qRsirF4dO9uZkrgALkcFuDzA1GsWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gqdcd46olJaLaYqqjc7+J/UytRiPSUX2rojo0Prcrgs=; b=iUAulSL0NMYbXpyQ1/S4+WDFOYm+V+TJz22oAZUbnUQdU1rqeHnSWf1DOnMnLkggd/lbdX jXvuMtRk1utemBkC+zcmvAQrT70sPWe9FZs/k/fkE19OX0i3U9KJGboA0STDDS2+O3Ih7D OkSRAO5gLoPvPezbfRXzSrc7qvVq0UF38xlRFmXqa4Kn8GXX4FgzV8YKxIgbZWOjJR526J 1Np8AIImD3oRpmo+QD3JqJTiV3wizNzIf40rtOR/DbqCUO86XSdd6GBwq0fUHeIGSH/JSO 1WquhIHOerA9REnoq32p8ZQi2Ubzrqltl8HPkdorgWZu1wC1gBxtId3cpCym8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643233; a=rsa-sha256; cv=none; b=vQ9sgHKa+UKC2dH6NmalCMZeYn2BtBC9HZXs+gcvLopqBlq3Qi0qPNFy6LnA5lvD9VE6SN l4HPR+ne+lSuLHVoCpwPCArMoKA6BBPncjENzPuqpN74o+fD28dslKd2GiQUTRXye9gMms tCDBa2VmZkK3n2JZbis3AeEZ1A15RwtV6Izmqv3C2RBNuf9ivohGHPwROrAvMfWVfmqFMr YUgGet7D7guzFLQc5jbaaU7NM+oOjkzmQRv9/lLGDOjYGjBNfKfgFH5hOzuTj5V0fVkmNu WW/LPzb3v8alYlEDJetzbHiKTjIUWkk1WwC20uCLqS5mtrLxA04qJoJ7R6Vexw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQC474rdzbDX for ; Mon, 05 Jan 2026 20:00:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fe97 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:00:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 16d480d9af9d - stable/15 - ipfilter: Remove unused variable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 16d480d9af9d0c8dce2cb9db716691670261816f Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:00:32 +0000 Message-Id: <695c1860.3fe97.412b2ac8@gitrepo.freebsd.org> The branch stable/15 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=16d480d9af9d0c8dce2cb9db716691670261816f commit 16d480d9af9d0c8dce2cb9db716691670261816f Author: Cy Schubert AuthorDate: 2025-11-26 23:24:17 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 20:00:00 +0000 ipfilter: Remove unused variable Reported by: jlduran Fixes: eda1756d0454, 821774dfbdaa MFC after: 1 week X-MFC with: eda1756d0454, 821774dfbdaa (cherry picked from commit 20c48f090b270d0124d5f0b31c6f3a639efbbc80) --- sys/netpfil/ipfilter/netinet/fil.c | 2 +- sys/netpfil/ipfilter/netinet/ip_nat.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 0de5378322df..166b7bfd9abe 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -4403,7 +4403,7 @@ int frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, int set, int makecopy) { - int error = 0, in, family, need_free = 0, interr, i; + int error = 0, in, family, need_free = 0, interr; int interr_tbl[3] = { 152, 156, 153}; enum { OP_ADD, /* add rule */ OP_REM, /* remove rule */ diff --git a/sys/netpfil/ipfilter/netinet/ip_nat.c b/sys/netpfil/ipfilter/netinet/ip_nat.c index 44ab7e9283de..d83454185609 100644 --- a/sys/netpfil/ipfilter/netinet/ip_nat.c +++ b/sys/netpfil/ipfilter/netinet/ip_nat.c @@ -974,7 +974,7 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, int mode, int uid, void *ctx) { ipf_nat_softc_t *softn = softc->ipf_nat_soft; - int error = 0, ret, arg, getlock, interr, i; + int error = 0, ret, arg, getlock, interr; int interr_tbl[3] = { 60077, 60081, 60078 }; ipnat_t *nat, *nt, *n; ipnat_t natd; From nobody Mon Jan 5 20:00:34 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQC64XYKz6MyYw for ; Mon, 05 Jan 2026 20:00:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQC618w4z3CXS for ; Mon, 05 Jan 2026 20:00:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nLaVkqhs45SxT7+8QJO+aMRAnWizcULd6I6+5MOdpSs=; b=i/N7JkNuatAYWgzLeNZQ6K3yiSRHNqTt4u8Uh56+nFFq6KiiwbsB+m1SZnFFRPOq+pP8PO 8Fgd/meml8w4cH9R8CrgNKfJIfXuUjYKRRRpubm7ImTZkqOgXTOMIbkmHtvis53n724g8+ L+Rc3MJzdO0iv+r8wtDMxeUJbaKP6mMVjfhhX17pK3qIlt8ZYnLBCdxl2xApD45jlyiqu6 SJo0V1rSKzDM/kVwchEDwB6tVz5X1MoyQ3DbE4MiIBAoKXsV8Nv3sv4V1rxsr4E0IkbyqC AOosqLVmIUmlzWXXHK6HB/Rcq9I1aSkJMrND2IFQK/5MtGVGjYnou6mg8skIUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643234; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nLaVkqhs45SxT7+8QJO+aMRAnWizcULd6I6+5MOdpSs=; b=xUXBGZzCcdnQXOXVOg/mcmo5FlKtp2Gtt+5eB7JrSCAhNH67sQOo4xKQM12smVlSiodLTi KSt7J2NkKtAsWVYO1QHvAOcG/nE9Od/zzJOLV5NN2tsS1/S7C3VS9+RUPn5w8U8I7NQSEK tACVVOFffl9w06dnz8D/v+AhPSH2OTilbeeaj17T6ZZSd9zsdi7Z0mUMsCgR46Mo9p6Frz IfPC2OosdRWJNQ3lVoqfcUS65jX4wBVjGqqc0sdQFxesrrXSmNnqQxhFhaQY1sv/bcWlUE TvdycXavB2VBKKGcul+zK+wYL0xYGp7PCeGDuwqPAIL42+k1tsT35OHQioAY/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643234; a=rsa-sha256; cv=none; b=iLT6DDpfUUzYKV28piimSHw2WRPLam9d16zZEeTekHRTxYm7A3QSjV7nhaU50bIIsOTOK4 u1B/Ag1KY5uzidH1tzC0dt6rznuwcIHY2OOrMcUgKLo9PvC/1AIEYZy/mqKbRbxWa4c4cf SBwLVhgsLTYojdA0wnDvEnNC04hKdt+EVck6u98n/AXz43JNPPeDNJqFfkIQjMuX3WmC6v Df3ViNrANpWkEyxgzimoHKYUAmWDL20FtHRVFmEPt55upBRtoxVqrWb/snMVblgHN7TqF/ qpgcA1NqYjq/rC53tldzs4yDjAcCfSbJ7e4xzxlH3ken+W8I8NeRd0e55GcUlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQC60jyczbDY for ; Mon, 05 Jan 2026 20:00:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fbd0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:00:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: df0336adda0d - stable/15 - ipfilter: Restore used variable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: df0336adda0d1256485de69d21e846d08a594337 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:00:34 +0000 Message-Id: <695c1862.3fbd0.3810f8b9@gitrepo.freebsd.org> The branch stable/15 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=df0336adda0d1256485de69d21e846d08a594337 commit df0336adda0d1256485de69d21e846d08a594337 Author: Cy Schubert AuthorDate: 2025-11-26 23:39:24 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 20:00:00 +0000 ipfilter: Restore used variable One of the "unused" i variables is actually used. Fixes: 20c48f090b27 (cherry picked from commit 78c6cfdc3dc0b84aa2daf0f32c7c9cdf3b34fee5) --- sys/netpfil/ipfilter/netinet/fil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 166b7bfd9abe..0de5378322df 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -4403,7 +4403,7 @@ int frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, int set, int makecopy) { - int error = 0, in, family, need_free = 0, interr; + int error = 0, in, family, need_free = 0, interr, i; int interr_tbl[3] = { 152, 156, 153}; enum { OP_ADD, /* add rule */ OP_REM, /* remove rule */ From nobody Mon Jan 5 20:00:35 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQC73HKqz6MycN for ; Mon, 05 Jan 2026 20:00:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQC72b36z3CXb for ; Mon, 05 Jan 2026 20:00:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XpwUycS9s0Z/OeXL6PR5gUVVLX7hQG1qVnhtwtNd6hc=; b=SjcbMHTs0Egs/eB1oJPYLMS0McJnbfclF4BD+p1Ph+IkjTuMtwENi1XcVaM03pQlERw6RS YOepv6+FphHU3Tf/ljQZ0hch36whZBU5vHzbaAeC8Qel9tUunY5wOPh4QiR/coYYraoAAp gJVhcxSs6cdXXNxkfWpmnVffyzTbWePVwJPyvPXS70yvJ91KcVbrL1X8tV9cEdLkDEJIMm nU+Jl3j0cFFVSmBUG6m0OwKMJVOKCTcZPir0CFiuPrrnzKy4nR9UdEejK8J8ZW60dFWRrG vuJxzQF6DGSoHDjKdwoxnf7SnQJCQjEF4IE3KpjgR68Fpgd956C+GMMdwTOQSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XpwUycS9s0Z/OeXL6PR5gUVVLX7hQG1qVnhtwtNd6hc=; b=lN+Wvt5hszF9FUwF5cBtS5dI0aX4u12+EaJrrGnpPjAE2RjEjpGByinO8MVV52KgA52dxR jOX9EyNecSsa9udFN+ynxW+pE5kBczcwa58JNgPNitKecgQM0ZbMkS1Z/Wy/JHjVFIk3yS BmEUhMzGXHUNyFpikYmsANHkLgWLLncCi0XSM4NKkAUVVyj7Unaf58k1+SNxVDXYx5s4Q3 a34l8hgXGUXooqzkTVNwHVCIL4jXXNiaLGnBy/iahPSqL8Hwc3NG3qqZqbN6QxpHxeBWZK jCt1+x8h6vXuR1Ne3DSETDKmSReR+TxQ2NUdVI5Bpl1U2X19xgs1kJrrvT5z1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643235; a=rsa-sha256; cv=none; b=k4V3Ccyv19mEat0l6Z8mkDYdEM+OhuhI3X7Kcf8H9lF1Vlt0mz2kNfXhP80Si5GwMNBmJk DWn1lSg2Y1pVr+Y9HRZ32ju8jM0L5Z9XlB+Hcm0GJlPA0M6OuRK0P94+PVaWUavehowpct cOWfgRLozK1h1O6a4T7ZPI8SV9cHvEuKhylxJZZfAWjAJl8p9dqJGFsk8Xw7UbiifvrYh2 RKwUKJ5zB8urxAz3pnZTF9ZNvoeHIg6qsXhGzdcOBXVZR7jNgHaJFkdHC9qh3yx6jcHzs9 w/epow5fR1GQvdadVlZB03H+Hh5prlADjF6BX82wYZkE/HuNy5MWo0hrR/SlMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQC71WlkzZvc for ; Mon, 05 Jan 2026 20:00:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 865c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:00:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 65bc0a1ade72 - stable/15 - ipfilter: Restrict ipfilter within a jail List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 65bc0a1ade72af8941f2d0c8ae00fdb11c1d6e9b Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:00:35 +0000 Message-Id: <695c1863.865c.363fd3ac@gitrepo.freebsd.org> The branch stable/15 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=65bc0a1ade72af8941f2d0c8ae00fdb11c1d6e9b commit 65bc0a1ade72af8941f2d0c8ae00fdb11c1d6e9b Author: Cy Schubert AuthorDate: 2025-10-29 18:29:39 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 20:00:00 +0000 ipfilter: Restrict ipfilter within a jail Add a sysctl/tunable (net.inet.ipf.jail_allowed) to control whether a jail can manage its own ipfilter rules, pools, and settings. A jail's control over its own ipfilter rules and settings may not be desireable. The default is jail access to ipfilter is denied. The host system can stil manage a jail's rules by attaching the rules, using the on keyword, limiting the rule to the jail's interface. Or the sysctl/tunable can be enabled to allow a jail control over its own ipfilter rules and settings. Implementation note: Rather than store the jail_allowed variable, referenced by sysctl(9), in a global area, storing the variable in the ipfilter softc is consistent with ipfilter's use of its softc. Discussed with: emaste, jrm MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53623 (cherry picked from commit d9788eabffa4b67fc534685fc3d9b8e3334af196) --- sbin/ipf/libipf/interror.c | 1 + sys/netpfil/ipfilter/netinet/fil.c | 1 + sys/netpfil/ipfilter/netinet/ip_fil.h | 1 + sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 15 +++++++++++++++ sys/netpfil/ipfilter/netinet/mlfk_ipl.c | 1 + 5 files changed, 19 insertions(+) diff --git a/sbin/ipf/libipf/interror.c b/sbin/ipf/libipf/interror.c index 7634753967e6..a7e6f4a5e431 100644 --- a/sbin/ipf/libipf/interror.c +++ b/sbin/ipf/libipf/interror.c @@ -536,6 +536,7 @@ log" }, { 130016, "finding pfil head failed" }, { 130017, "ipfilter is already initialised and running" }, { 130018, "ioctl denied in jail without VNET" }, + { 130019, "ioctl denied in jail" }, }; diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 0de5378322df..54b8aea7f1c8 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -9098,6 +9098,7 @@ ipf_main_soft_create(void *arg) softc->ipf_icmpminfragmtu = 68; softc->ipf_max_namelen = 128; softc->ipf_flags = IPF_LOGGING; + softc->ipf_jail_allowed = 0; #ifdef LARGE_NAT softc->ipf_large_nat = 1; diff --git a/sys/netpfil/ipfilter/netinet/ip_fil.h b/sys/netpfil/ipfilter/netinet/ip_fil.h index 7b070f0d6867..24d4f9695322 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil.h +++ b/sys/netpfil/ipfilter/netinet/ip_fil.h @@ -1550,6 +1550,7 @@ typedef struct ipf_main_softc_s { u_int ipf_icmpacktimeout; u_int ipf_iptimeout; u_int ipf_large_nat; + u_int ipf_jail_allowed; u_long ipf_ticks; u_long ipf_userifqs; u_long ipf_rb_no_mem; diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c index 6eb6cf2a7a47..43b590cc0204 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c @@ -88,6 +88,7 @@ VNET_DEFINE(ipf_main_softc_t, ipfmain) = { .ipf_running = -2, }; #define V_ipfmain VNET(ipfmain) +#define V0_ipfmain VNET_VNET(vnet0,ipfmain) #include #include @@ -254,6 +255,20 @@ ipfioctl(struct cdev *dev, ioctlcmd_t cmd, caddr_t data, return (EPERM); } + /* + * Remember, the host system (with its vnet0) controls + * whether a jail is allowed to use ipfilter or not. + * The default is ipfilter cannot be used by a jail + * unless the sysctl allows it. + */ + if (V0_ipfmain.ipf_jail_allowed == 0) { + if (jailed(p->p_cred)) { + V_ipfmain.ipf_interror = 130019; + CURVNET_RESTORE(); + return (EOPNOTSUPP); + } + } + if (jailed_without_vnet(p->p_cred)) { V_ipfmain.ipf_interror = 130018; CURVNET_RESTORE(); diff --git a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c index d558b2d24b2c..139fe1f766d3 100644 --- a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c +++ b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c @@ -136,6 +136,7 @@ SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_chksrc, CTLFLAG_RW, &VNET_NAME(ipfmain.ip SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_minttl), 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, large_nat, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &VNET_NAME(ipfmain.ipf_large_nat), 0, "large_nat"); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_max_namelen, CTLFLAG_RWTUN, &VNET_NAME(ipfmain.ipf_max_namelen), 0, "max_namelen"); +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, jail_allowed, CTLFLAG_RWTUN, &VNET_NAME(ipfmain.ipf_jail_allowed), 0, "jail_allowed"); #define CDEV_MAJOR 79 #include From nobody Mon Jan 5 20:00:37 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQC95ZyGz6MyWf for ; Mon, 05 Jan 2026 20:00:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQC93k9mz3ChF for ; Mon, 05 Jan 2026 20:00:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9+0o1Eznd0qm37W9HarwzhYCw5LLvvDd9Y7ispX/4cE=; b=jSkhu5tyWNP+UptVdxAbJI2Vd1UYzL9xdYGSAArnADfDFiveSiJ8/oukLqT3rydUYRwACl T+Rzu3eMPS7C3omZ6Um9CYh2ZsIP/wJ9+ZX48/RzDQCoqxAcxiz7lQNAb2/R0lOyX2vrwS 4vQ+TnnIAW9qurIoH3qjH7iHhGTmP0aYZn5SdzqFw77Dty9oLj+sMuTXdtJSszh99/9zOh WBn0y5tsVxG/FBWpHYn6LwYB5gxNYvKLsG0vmm6sZV70pBDIk75gasyvasZDK+Z/KW8z3n BYbPa989Rx1pVj2RpkUlKRyzMJmo+V1lhOCUFGMQEOQqIZmGE1BCrNsNtuR3TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643237; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9+0o1Eznd0qm37W9HarwzhYCw5LLvvDd9Y7ispX/4cE=; b=mGK8NMwTeoJxx9IeIKTONTrEd7NT2U4i9uXfH9zP2weU6ylCZ9Xbo8lfvRYVrWYV5xbR6A 7VIsvVxrOBz2fyBvLbCh3bJ2BXSWeGfWdAxyQICd9UBqVrYF27LSZD+H9pOibdAhH6e5yS f5RFdOScoqhLQTHj47TfJbcUx86RwShf63Z3FdUWm+AH6rxmDpe29chQOtsiShUzf1ITvK l3QxOin8T4wTj0fHJfBq58idrIrnC8C385G8FcW71M+61/AX/w6G8ha3WyN59i0fGzoHSZ 2eo3zWSejLCnOA1KRKAIIcoV18xndC+4PEt2N/JSwzKRF03Xw9UrpV0j2QjnAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643237; a=rsa-sha256; cv=none; b=CXEY0l7J7rWUhDP/TcG6Evpn2EYOniYHKuhD97JuyhrErVTEI2TDpJe9ENydB4xJ7xyx5/ 56LAqsx8l+fhGwZJYUCL1KQRbENwcPn6vNVTX019cI8ECCxMsgWViAli+A8oykw+20VtXg gjh33NjvnIn09+xk8dn12G7VGfvNZ8QLH2SYtd5aUphGlD3CbcqVt+clJ8xQ/ghWQ6ratt gFIpRyHMoVjlC2zFThtJ2q7zMWoZzbNd2iQAEXK58+FNJi43VYwRAFFA9L/+NyueQCumYS BOwxQwiRQpIRTF0tlqHuU7ZLIbeVYgsMeB49qP0ibJU6C8ygHLr5QWcYuaEFWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQC938zQzbd5 for ; Mon, 05 Jan 2026 20:00:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f050 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:00:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 5123a38e57cd - stable/15 - ipfilter: Add missing kenv fetch List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5123a38e57cd1b3cb3814e24211ed69fc86e0360 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:00:37 +0000 Message-Id: <695c1865.3f050.7f7881e@gitrepo.freebsd.org> The branch stable/15 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=5123a38e57cd1b3cb3814e24211ed69fc86e0360 commit 5123a38e57cd1b3cb3814e24211ed69fc86e0360 Author: Cy Schubert AuthorDate: 2025-12-15 16:21:56 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 20:00:01 +0000 ipfilter: Add missing kenv fetch When a module the environment must be explicitly fetched. Fixes: d9788eabffa4 PR: 291548 Noted by: markj Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D54242 MFC after: 3 days (cherry picked from commit a6ea80bc917510b5e056cc5a29b62dfd7b39d068) --- sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c index 43b590cc0204..207d1895dc3e 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c @@ -1439,4 +1439,6 @@ ipf_fbsd_kenv_get(ipf_main_softc_t *softc) { TUNABLE_INT_FETCH("net.inet.ipf.large_nat", &softc->ipf_large_nat); + TUNABLE_INT_FETCH("net.inet.ipf.jail_allowed", + &softc->ipf_jail_allowed); } From nobody Mon Jan 5 20:00:36 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQC85bGHz6MyJH for ; Mon, 05 Jan 2026 20:00:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQC83kcPz3CjZ for ; Mon, 05 Jan 2026 20:00:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b3iEL86j5Zv7Fquh3v4kK3b2JJJMSsrAhqskY3feS+M=; b=LiuVazCGjFJe+mbxhU1Qd79Zs4mrYVggwijFVgMx0KuGz04/OkXbQDGJx8g8xRbPyms2BG eslZ1NigjA0iif5fScxTifisDf1Ha2xYUTIxo35tDbOWqe3oDpR5ZXrhMmOaUbgtneGvBR K6NdRhQu6MHJYwSKcgE6FcYQBtJMxlEmDxQ7JLaEYiPWXTI25CzdKISosdZpfQgnG2iJP/ MDKC1YNRVA3C9meSgTdv+dU1YRmY555Z5YEyBk2EKMJiIo6g3MCB+CWjlXtrvVaJY2jSa5 kIYmeDI7YRPDp0+v8W59J4u9vD/IJzwG6YGLVdyIbXf8QWFg6Eff/LrkmznjcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b3iEL86j5Zv7Fquh3v4kK3b2JJJMSsrAhqskY3feS+M=; b=uQzeIUuNLwkbZjdkqZrRnNiUicLWtGRBONznHfJw7HEfktgT3GbdwPBQhd4GPy0sIOOiOx hXyYqKCQs6Tg/oNmrkAI0or5S+Wwx8gE3VYQdFsK8ymhjQpvxFlBK03+TYur5sUxELU2lQ Ya34Vs+q8ZFBnO6J1Z+TY6Wx97VsmZ9fAskAdcLvSZyYjvrDHq5qr8Ij1Bw+b9OXLlPDuD fcFPSKV++YNu4X6oxZJct4dJRHvr7nwF3uzk8LS7H9NOi98fxO/hpfml8gM9I9JC5LqUrX ZNbJbwWdYTMTSMOwPZ5mrGw06LdyJTFFSOhjf35KdCkN3nT4FPCrJ5kPkwN9KQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643236; a=rsa-sha256; cv=none; b=CoRqj/iNiwgMciLvFoR/Y2P4mc4rsP6tyVLCjDzaueWu9iAytC8tGxePHLdlT02/5GhsVU VDGqY1QAKLKZD1LEKjBl38gR4OsCe/njLTWBP2BTMTTXmnZuWHTcB/U7kPBMAK7F8a54DX qMTnJlnL4yzyjFNA40zEL8WFFWjYJIY7hTsTpOuG8J6vB39fvvvswtbI6YC5HG4hD4RYMv bVBuMiPbVJt7GXuFN8uG1jA5lym5p1TaVSOyx4rO7c5mqmJfPwk+JgX8+fMQC/Tm6lZ5kI 79cfryHuaB//BP7Mhv9RF/WUZ8G/F6oXMlXu8c7IB/IwnM9dP4JTYnYkRKDUnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQC82PjKzbZt for ; Mon, 05 Jan 2026 20:00:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fcf7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:00:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 91de9b501aa7 - stable/15 - ipfilter: Disable ipfs(8) by default List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 91de9b501aa7d8f108b596bc52583dbafac1d262 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:00:36 +0000 Message-Id: <695c1864.3fcf7.57d0cbbe@gitrepo.freebsd.org> The branch stable/15 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=91de9b501aa7d8f108b596bc52583dbafac1d262 commit 91de9b501aa7d8f108b596bc52583dbafac1d262 Author: Cy Schubert AuthorDate: 2025-11-16 07:39:19 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 20:00:01 +0000 ipfilter: Disable ipfs(8) by default At the moment ipfs(8) is a tool that can be easily abused. Though the concept is sound the implementation needs some work. ipfs(8) should be considered experimental at the moment. This commit also makes ipfs support in the kernel optional. Reviewed by: emaste, glebius MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53787 (cherry picked from commit 0ff0c19e7f70bc4d3f98196a8ad43de635cf13e5) --- sbin/ipf/Makefile | 7 ++++++- share/mk/src.opts.mk | 1 + sys/conf/NOTES | 1 + sys/conf/options | 1 + sys/modules/ipfilter/Makefile | 7 +++++++ sys/netpfil/ipfilter/netinet/ip_nat.c | 5 ++++- sys/netpfil/ipfilter/netinet/ip_state.c | 4 ++++ tools/build/mk/OptionalObsoleteFiles.inc | 4 ++++ 8 files changed, 28 insertions(+), 2 deletions(-) diff --git a/sbin/ipf/Makefile b/sbin/ipf/Makefile index 1b0a18d3d9c3..b64b09584b48 100644 --- a/sbin/ipf/Makefile +++ b/sbin/ipf/Makefile @@ -1,5 +1,10 @@ +.include + SUBDIR= libipf .WAIT -SUBDIR+= ipf ipfs ipfstat ipmon ipnat ippool +SUBDIR+= ipf ipfstat ipmon ipnat ippool +.if ${MK_IPFILTER_IPFS} != "no" +SUBDIR+= ipfs +.endif # XXX Temporarily disconnected. # SUBDIR+= ipftest ipresend ipsend SUBDIR_PARALLEL= diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 1167d7f7b812..92634425f770 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -208,6 +208,7 @@ __DEFAULT_NO_OPTIONS = \ DTRACE_TESTS \ EXPERIMENTAL \ HESIOD \ + IPFILTER_IPFS \ LOADER_VERBOSE \ LOADER_VERIEXEC_PASS_MANIFEST \ LLVM_ASSERTIONS \ diff --git a/sys/conf/NOTES b/sys/conf/NOTES index cdfdd09fc1a0..46787d2e690a 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -1045,6 +1045,7 @@ options IPFILTER #ipfilter support options IPFILTER_LOG #ipfilter logging options IPFILTER_LOOKUP #ipfilter pools options IPFILTER_DEFAULT_BLOCK #block all packets by default +options IPFILTER_IPFS #enable experimental ipfs(8) support options IPSTEALTH #support for stealth forwarding options PF_DEFAULT_TO_DROP #drop everything by default options TCP_BLACKBOX diff --git a/sys/conf/options b/sys/conf/options index b48ad1cf42cf..9e9cb6aeb6b3 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -448,6 +448,7 @@ IPFILTER opt_ipfilter.h IPFILTER_DEFAULT_BLOCK opt_ipfilter.h IPFILTER_LOG opt_ipfilter.h IPFILTER_LOOKUP opt_ipfilter.h +IPFILTER_IPFS opt_ipfilter.h IPFIREWALL opt_ipfw.h IPFIREWALL_DEFAULT_TO_ACCEPT opt_ipfw.h IPFIREWALL_NAT opt_ipfw.h diff --git a/sys/modules/ipfilter/Makefile b/sys/modules/ipfilter/Makefile index 6c5fc140f36c..969df7dfad84 100644 --- a/sys/modules/ipfilter/Makefile +++ b/sys/modules/ipfilter/Makefile @@ -1,3 +1,5 @@ +.include + .PATH: ${SRCTOP}/sys/netpfil/ipfilter/netinet KMOD= ipl @@ -9,6 +11,11 @@ SRCS+= opt_bpf.h opt_inet6.h opt_kern_tls.h CFLAGS+= -I${SRCTOP}/sys/netpfil/ipfilter CFLAGS+= -DIPFILTER=1 -DIPFILTER_LKM -DIPFILTER_LOG -DIPFILTER_LOOKUP + +.if ${MK_IPFILTER_IPFS} != "no" +CFLAGS+= -DIPFILTER_IPFS +.endif + # # If you don't want log functionality remove -DIPFILTER_LOG # diff --git a/sys/netpfil/ipfilter/netinet/ip_nat.c b/sys/netpfil/ipfilter/netinet/ip_nat.c index d83454185609..ec5a431dc47f 100644 --- a/sys/netpfil/ipfilter/netinet/ip_nat.c +++ b/sys/netpfil/ipfilter/netinet/ip_nat.c @@ -1340,6 +1340,7 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, error = ipf_proxy_ioctl(softc, data, cmd, mode, ctx); break; +#ifdef IPFILTER_IPFS case SIOCSTLCK : if (!(mode & FWRITE)) { IPFERROR(60015); @@ -1375,6 +1376,7 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, error = EACCES; } break; +#endif /* IPFILTER_IPFS */ case SIOCGENITER : { @@ -1682,7 +1684,7 @@ ipf_nat_siocdelnat(ipf_main_softc_t *softc, ipf_nat_softc_t *softn, ipnat_t *n, } } - +#ifdef IPFILTER_IPFS /* ------------------------------------------------------------------------ */ /* Function: ipf_nat_getsz */ /* Returns: int - 0 == success, != 0 is the error value. */ @@ -2250,6 +2252,7 @@ junkput: } return (error); } +#endif /* IPFILTER_IPFS */ /* ------------------------------------------------------------------------ */ diff --git a/sys/netpfil/ipfilter/netinet/ip_state.c b/sys/netpfil/ipfilter/netinet/ip_state.c index 36fdf23cd062..8a21e7593995 100644 --- a/sys/netpfil/ipfilter/netinet/ip_state.c +++ b/sys/netpfil/ipfilter/netinet/ip_state.c @@ -709,6 +709,7 @@ ipf_state_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, IPFOBJ_STATESTAT); break; +#ifdef IPFILTER_IPFS /* * Lock/Unlock the state table. (Locking prevents any changes, which * means no packets match). @@ -745,6 +746,7 @@ ipf_state_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, } error = ipf_state_getent(softc, softs, data); break; +#endif /* IPFILTER_IPFS */ case SIOCGENITER : { @@ -801,6 +803,7 @@ ipf_state_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, } +#ifdef IPFILTER_IPFS /* ------------------------------------------------------------------------ */ /* Function: ipf_state_getent */ /* Returns: int - 0 == success, != 0 == failure */ @@ -1005,6 +1008,7 @@ ipf_state_putent(ipf_main_softc_t *softc, ipf_state_softc_t *softs, return (error); } +#endif /* IPFILTER_IPFS */ /* ------------------------------------------------------------------------ */ diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index d7131d01ef37..a7ae52650999 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -2630,6 +2630,10 @@ OLD_FILES+=usr/share/man/man8/ipnat.8.gz OLD_FILES+=usr/share/man/man8/ippool.8.gz .endif +.if ${MK_IPFILTER_IPFS} == no +OLD_FILES+=sbin/ipfs +.endif + .if ${MK_IPFW} == no OLD_FILES+=etc/rc.d/ipfw OLD_FILES+=etc/rc.d/natd From nobody Mon Jan 5 20:00:38 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQCB6jBfz6MyP6 for ; Mon, 05 Jan 2026 20:00:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQCB4QNmz3Cmh for ; Mon, 05 Jan 2026 20:00:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S5E9NpYcZTI+t9Ee/9hygOLWAHS6aK8ycVS4svGC+gc=; b=yfegaZQg7rvBwmr55pcI2pb6rVgowI9+4XZGyOl3uwrHm0NgoGnU1kc5qqZtD422LXx2no n/9fgmlU2tOweOwdulp17pcJ3GH2vUgA/Bpm8FZuaG9SIQXkX+XGcizK4j6Z+xid6BtoRA T90Uk9ztfukoqz1L3Jk5Ul58yx1LvUz6UzT9mX1VG00fzj9UbSMaFHCKcNgYKxvs9s7WGc mvdFXSPnGjeJ32selLDMrDrOuXJpFx1vHv8DlyjUzxpo/oCaeTh7TgYm0mgHwc8I3Em/W7 2JhVKLKmJsYgEAOlwrZ/2LD9ub1xCh4iAuYEj4SD9a2axeEf9Q9O+sFgn0jNfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S5E9NpYcZTI+t9Ee/9hygOLWAHS6aK8ycVS4svGC+gc=; b=InM0p6J6G/vYDSKCf23vD8BD1dRYhl8N3N72gmZdlY42lPp3/BV3gnhSFhJCrk15fTy8cO nHkAs9jaPB1+Y36BIrWkthvXx32tn8qApjwC+BnSxOqNYvjDq+p0XjzMtDgW/X87Rvd6dk 7fj6PQW3E0oVG73wG7czZhsDAIuvx+grAGSNqEMXfXP56RAnasy7K21/USBi/gdG9rHXkw gvbCWsPQNwzKJj4e1eB/jKrKcWg+S02iEgUqLVPsOVIcNaoL/k9SuUNh5OtSitPlytiYx5 GqB3Eg36hmP5S7HUIRGiZx2qj9sl6ybinlTqLyzxgDEZjtlv/P6z2uPjjzTvng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643238; a=rsa-sha256; cv=none; b=KcnAHNnUqDSC9P1qq6MrGK/2NtkS+tiFebkg35t5TM1gVVA6o2axrxszZqEbz6LGLAJrPI wPBvUTwIuEM2bf1UXR2fnWDf0m05D2JVd9l47U1OcKiLsNAf+kkkgSg1m7EijyS/+t3E7b 872zrE0/W26vS3CzKNpSsggh7wBlkr/GVRbapcG5EGCk8nt6gmeUHRd49OTDzTsJI3hIWU d+vB58fyS59JTCzmpNBWwS86UUExTOY3sQt+B4YHHkkboKi+9qShzjT9os5Xf172Rri8aN LNuw8fhnERq5t5hF0jHkLQAowNS0Ox0KRBMbIjhw25NPLfepMsUV3qDaUcnubg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQCB3xrLzbRq for ; Mon, 05 Jan 2026 20:00:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ff1b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:00:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Warner Losh From: Cy Schubert Subject: git: 0ecfadec215f - stable/15 - ipfilter: fix broken build List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 0ecfadec215f5c79a5497d6af9059e18735e546f Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:00:38 +0000 Message-Id: <695c1866.3ff1b.21ef36e2@gitrepo.freebsd.org> The branch stable/15 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=0ecfadec215f5c79a5497d6af9059e18735e546f commit 0ecfadec215f5c79a5497d6af9059e18735e546f Author: Warner Losh AuthorDate: 2025-11-27 00:04:29 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 20:00:01 +0000 ipfilter: fix broken build Every commit earns me a dozen emails that LINT is broken. This should stop that. Fixes: eda1756d0454f ipfilter: Verify frentry on entry into kernel Sponsored by: Netflix (cherry picked from commit ddec4209b10d65ef19e1d1b884e1b876eab58c7d) --- sys/netpfil/ipfilter/netinet/fil.c | 4 +--- sys/netpfil/ipfilter/netinet/ip_nat.c | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 54b8aea7f1c8..242affeff000 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -4413,9 +4413,7 @@ frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, void *ptr, *uptr; u_int *p, *pp; frgroup_t *fg; - char *group, *name; - size_t v_fr_size, v_element_size; - int v_rem_namelen, v_fr_toend; + char *group; ptr = NULL; fg = NULL; diff --git a/sys/netpfil/ipfilter/netinet/ip_nat.c b/sys/netpfil/ipfilter/netinet/ip_nat.c index ec5a431dc47f..bf091e3b0e12 100644 --- a/sys/netpfil/ipfilter/netinet/ip_nat.c +++ b/sys/netpfil/ipfilter/netinet/ip_nat.c @@ -978,9 +978,6 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, int interr_tbl[3] = { 60077, 60081, 60078 }; ipnat_t *nat, *nt, *n; ipnat_t natd; - char *name; - size_t v_in_size, v_element_size; - int v_rem_namelen, v_in_toend; SPL_INT(s); #if !SOLARIS && defined(_KERNEL) From nobody Mon Jan 5 20:00:39 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQCD0n9Zz6MyWj for ; Mon, 05 Jan 2026 20:00:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQCC57zMz3D30 for ; Mon, 05 Jan 2026 20:00:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8+zgkoaeXvxa4MpPETf2ImGaDFuDFG8d6o9tlVUpp08=; b=ifLPJ0MQzbuzMGNUKytnbbv4qw2YZR2P2no1k1cDCeamAxMDYCsDBoN4MJNovFwB2wPkT4 nu1yMxWUMrdnSKFBJtZRd9E3lOfiPU1PzUxacY19XV63B4IubNLR2H0ktYR68F7rHjBPI+ VWaMT3uSXoSWmgVazxwy5QcvQTo4YTdGpVpt3B5u3qbwgUqXIMUJ6F+wDlQKYpAzJqmLq6 ksTn3AunOaS6mAFckgy/mSjnTEAK88aLejzhvn2OmBS93kcZkI/gjajuNWquJBT/vzkuQV hx93cG8pESgWicuI5/AkcZ820VMJmY/vt9HAgjbXrflDE9RjewyNBOHY7LTX8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8+zgkoaeXvxa4MpPETf2ImGaDFuDFG8d6o9tlVUpp08=; b=RduUZ6bpknpJK/83wm2BLhZHHsIRFjO2hwa1fV4du5Xh1lux8bLAHepKRbMv1eLOFtRXsr DgrObErko32VTbMt8/A/BmkbXvr1mOJZz2W01uVqYLoxDeCYtNXqnMB0+PzNxorDPyTr45 K3dXnqh2NSNPLulkOg4b5HXshLegOPZTFh20rhpl4OvJ4SMrzBEREJnvDfDo1gb6cQezC2 lNVOWGbUZGxQqyKT+pqRcalD3bJq7E/hYj/WVdcaSq2cwNisDlJkKbl3BGlgVFUlnK8BVo hXygKuBaHOqm/QtuGQK9/P4VhioctIWLpIlzIcegLwxNCsUcmgkfPen47tv6cw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643239; a=rsa-sha256; cv=none; b=DMHfJ+C05sWvPBhRx9RRPFyaYUvXGCKnNCvQS68/V1jsm3mnGPMNJj3OlbT6tmmIH68Gmt Ud/ExSVY+uU74ONNjKGYwF8BsE276WdIXau160mhoyw0gAbM+660VHLykhgQ6nYzgE1AAZ 1sbOpkWcYJA0lFfHQyI/rFMWREOXLF8GQBPgXw8QR8dxe6kE1jQ9mERCtWaHlSWbzS6ipp ssuvc4cQIjWhX/7GD22p362TsDhM4qcd1e81Rvw9bWrUIDaknxY35cUv4Np7JyyYmNhNNm iBxacRsu3/R7PBbRT210SWnYlnSq2d+hXGQ5Cggnmp1WI4k4oQvbsNA66+T6og== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQCC4j0YzbgJ for ; Mon, 05 Jan 2026 20:00:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 800a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:00:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: d18973dca914 - stable/15 - krb5: Remove extraneous exports file List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: d18973dca9145d61d52792769060a92e65bbfb85 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:00:39 +0000 Message-Id: <695c1867.800a.7c6132ee@gitrepo.freebsd.org> The branch stable/15 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=d18973dca9145d61d52792769060a92e65bbfb85 commit d18973dca9145d61d52792769060a92e65bbfb85 Author: Cy Schubert AuthorDate: 2025-12-18 18:15:12 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 20:00:01 +0000 krb5: Remove extraneous exports file We use version.map in the FreeBSD MIT KRB5 build. The exports file is a lefteover from when the version map file was created. (cherry picked from commit f74173b5da3df22ec49c3bf6e8d10bcffdd1f4d3) --- krb5/util/verto/libverto.exports | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/krb5/util/verto/libverto.exports b/krb5/util/verto/libverto.exports deleted file mode 100644 index 3745d5014653..000000000000 --- a/krb5/util/verto/libverto.exports +++ /dev/null @@ -1,33 +0,0 @@ -verto_add_child -verto_add_idle -verto_add_io -verto_add_signal -verto_add_timeout -verto_break -verto_cleanup -verto_convert_module -verto_default -verto_del -verto_fire -verto_free -verto_get_ctx -verto_get_fd -verto_get_fd_state -verto_get_flags -verto_get_interval -verto_get_private -verto_get_proc -verto_get_proc_status -verto_get_signal -verto_get_supported_types -verto_get_type -verto_new -verto_reinitialize -verto_run -verto_run_once -verto_set_allocator -verto_set_default -verto_set_fd_state -verto_set_flags -verto_set_private -verto_set_proc_status From nobody Mon Jan 5 20:00:40 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQCF1Tqcz6MyZC for ; Mon, 05 Jan 2026 20:00:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQCD5sgRz3D36 for ; Mon, 05 Jan 2026 20:00:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7xXscE6Zkd+lTc76c1dDkBOl5Y4v6w2coc9rFeshUXE=; b=R9R5C/HNzk1qLyH0wV9toLK4A8aHs443Gs6JpX4oADpHipOTnfmVUZUoVfuv9lS+iTszQO denF3Bw+p+NJu+qsLbr/FawF5II3FoiA7tsZX0IHuNDIK6rYm6HDm4pg9zxp7pNo3ShsTC 08sg6XolnZbzIbXkAhiKM5G9+bLjy4uGrEBkuVTWj+YA9tXd+VMWsSnI0xPcfGdwVh64W4 moZvyfSHCV0JnbkVl4ventdme+Og1ForMZrXl1OxAy/IoC73RD+1IMUzZmDc2ae30nhIyg N7vz7tC1qY0cwvVBQKOziCY/l/y/8daTQhiMiyJuZHWBM/pe/eV13CLUIbXvJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7xXscE6Zkd+lTc76c1dDkBOl5Y4v6w2coc9rFeshUXE=; b=n9dxmtsGsTbYioTHjPUj3WrIjjQDhaKomK5U07jgAODiVqWPJ6P6m8Tg1jWD4jfW9FKSlD kCLyQjzBgouJ7SeHXU9KeQoo0YLJjQwxO23YSq9OzsN1sPQxmSKPESpF8G5zxa22fqzOtc GgLb6qzBYxjyRrEQcQonTVCosYNmEXRXgPDaVJ4oPWfbsAAZNatUmBbv1qZeMRFzhylRux O6QJHYvuTblRw5ic5DVmT9NdUuofCurOYHI/1o6rfZoIv/QWAd4xW+Ua3lrTBng6JaPnHJ HU1GdYep1QN4ihcSk91LCRWeqS+ydqzJdGb2CdJt0iza9JfWbAcB7u4kjFSf3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643240; a=rsa-sha256; cv=none; b=TAp+LRuZfnU//gAS2GpNFRG/NcUQLvUt22pisdPcx1bIpQCoySQ0LhN+eXaQhEzP1lo65u Jb1c6GRVYj/vUcrd/RJ1av9O71wEe3amS2EIn8sjhRX3eOetizItZcBIpeuN1TMwzVoVLt 74Sc7gCBHrBuuoiM9nJH+0oF/s+iEG3gBowznvdqKVbkXktZDfNWJ4wHRKU7bt8hvcCip0 Rk9b0t/dKL+lCBMcTRrYlGIlG1YCm7AtBiutCBxULbDvVB4VgXuQVFcfVjEji8QGKMPzYM cj/m0H5Xe8KsaKYlso2p+ZGWiYli2kx6uxp6jduqbG6zR34/8qOc88tVGgZylQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQCD5RXNzbb0 for ; Mon, 05 Jan 2026 20:00:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fe9b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:00:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: a71b64468796 - stable/15 - ntp: Fix buildworld with MK_OPENSSL=no List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: a71b6446879644b9742d6fcb75cb113d09144fd7 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:00:40 +0000 Message-Id: <695c1868.3fe9b.7866b9d2@gitrepo.freebsd.org> The branch stable/15 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=a71b6446879644b9742d6fcb75cb113d09144fd7 commit a71b6446879644b9742d6fcb75cb113d09144fd7 Author: Cy Schubert AuthorDate: 2025-12-19 04:59:38 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 20:00:02 +0000 ntp: Fix buildworld with MK_OPENSSL=no Reported by: wosch Tested by: wosch (cherry picked from commit 2804461adfc670c78c1dcb9cab6b2191c8d486ec) --- usr.sbin/ntp/Makefile.inc | 2 +- usr.sbin/ntp/config.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.sbin/ntp/Makefile.inc b/usr.sbin/ntp/Makefile.inc index 5801d91aac46..85340a5a9eea 100644 --- a/usr.sbin/ntp/Makefile.inc +++ b/usr.sbin/ntp/Makefile.inc @@ -9,7 +9,7 @@ NTPDEFS= -DSYS_FREEBSD CFLAGS+= ${NTPDEFS} ${DEFS_LOCAL} ${CLOCKDEFS} .if ${MK_OPENSSL} != "no" -CFLAGS+= -DOPENSSL -DAUTOKEY +CFLAGS+= -DOPENSSL -DAUTOKEY -DUSE_OPENSSL_CRYPTO_RAND .endif WARNS?= 0 diff --git a/usr.sbin/ntp/config.h b/usr.sbin/ntp/config.h index 3d6a1364dd10..6b0ef0b6ae6a 100644 --- a/usr.sbin/ntp/config.h +++ b/usr.sbin/ntp/config.h @@ -1664,7 +1664,8 @@ typedef unsigned int uintptr_t; #define USE_FSETOWNCTTY 1 /* Use OpenSSL's crypto random functions */ -#define USE_OPENSSL_CRYPTO_RAND 1 +/* We define this in Makefile.inc instead */ +/* #undef USE_OPENSSL_CRYPTO_RAND */ /* OK to use snprintb()? */ /* #undef USE_SNPRINTB */ From nobody Mon Jan 5 20:01:21 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQD23K6nz6MyPP for ; Mon, 05 Jan 2026 20:01:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQD175GGz3FK2 for ; Mon, 05 Jan 2026 20:01:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hpyngycobkXk+GchDLT4sGJEPV56WYAjEAI+Mc7gxFk=; b=PXuf2O5VlQUNwXo/8sNHc08sgpkd1ozPBzNp08ovkSYRQDc7TlQWxK4wUQJqMBt1yxylz1 ovRf0qhXfYogLpdiYLpm45f1tlrc3sXjBnK+Boh5EGQKjholiVbzqj58VZM3GIT2TY6Waw 6WFZas4KHvj43ITBLl8m0ZWXtTAEyXw5p7Oi2xRww03jQ0uxWIflPgry8YdAEcLTIXQjvX ENxCAJL1+Hn5xp4PjhQMo5/2shYRd/naYnRbtOiN1hF/LPV3bqtRKJd2+OEApBlBBC0neA 3uFAZ8mWBg+PZRxbZb6oxwaMObaDVsDurw4Lw0EM7Gao3JNqVhwmwaEqxRvt0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643282; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hpyngycobkXk+GchDLT4sGJEPV56WYAjEAI+Mc7gxFk=; b=Jzs9gH80Seq8QV99muyaL1rBrC5zNaf1xdCTSgvRTlqv+qDnjFtOfk7x/dbOOXJmXZu3nk PZKaneMwjQ9Rol2qacMPvpgcRWX74JtrFMwnL++/x6qzka/xehHaoS8fFkrvTG6zxAk4JU OPmzqjzsCU8Ey/YUiUG2NZi4ltYL6coLj2YUKcyt0whYtB58wds8lkQB5vLPcDCGfCG7jK 5gp/Xsz1To6oi9AoN/X9zoRhUpMqsiLyAbUpmySxP7LMkAFJ0oh0O3LTb/p67L5HYFzSAN zfvAMAN29F6Qo2pmu6wtqEulQkni0RXAsYGQBSw7WJkg8U2GvoOJfcoGBdKLSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643282; a=rsa-sha256; cv=none; b=Ysz0Nqy4n1SxSJN3M/jKZES/a7H0nHRxh5j5NK4f8i5Ib6TunqoqBFQrPKz0Yixy5iaT/q KOwbVm9dqO4QgS+jX5ycJanOTAMSIR1f0e1++8P2gSiRI3MDcuCe8FJLvUinUCmKd7Q11g 8+dlo/Hko12KEtPY8FlebI3C9z8AJ4qy8j68pPGZrj3g2c2YQO49HDdTuORRgF38oBP8CC /I6VskVxoF8+nCcA3CQFyaZTC4gLV0EWz4fC9jT+9cGU0wH/dmnk7odl7CDaaNa7y7lfwJ OUYFgZY/BW0dFQuKbcmRdogo5xhlj+atrf1R08wsiD4de5DCkQLQg/u2FZCNwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQD16fJfzbgf for ; Mon, 05 Jan 2026 20:01:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fda4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:01:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 9ac25e9b5b31 - stable/14 - ipfilter: Add ipf_check_names_string() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9ac25e9b5b31fb03f090e157166b05d2d501a8f0 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:01:21 +0000 Message-Id: <695c1891.3fda4.2c4df9f5@gitrepo.freebsd.org> The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=9ac25e9b5b31fb03f090e157166b05d2d501a8f0 commit 9ac25e9b5b31fb03f090e157166b05d2d501a8f0 Author: Cy Schubert AuthorDate: 2025-11-18 19:23:06 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 20:00:53 +0000 ipfilter: Add ipf_check_names_string() ipf_check_names_string will verify userland inputs in names strings (fr.fr_names, in.in_names) for correctness. Original concept of ipf_check_names_string() instead of macros by markj. Reviewed by: markj MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53843 (cherry picked from commit 525c535d5aa87f686dcfee620619827f7c6090db) --- sys/netpfil/ipfilter/netinet/fil.c | 31 +++++++++++++++++++++++++++++++ sys/netpfil/ipfilter/netinet/ip_fil.h | 1 + 2 files changed, 32 insertions(+) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index ce96558fe99a..e152fa23c83c 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -9955,3 +9955,34 @@ ipf_inet6_mask_del(int bits, i6addr_t *mask, ipf_v6_masktab_t *mtab) ASSERT(mtab->imt6_max >= 0); } #endif + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_check_names_string */ +/* Returns: int - 0 == success */ +/* - 1 == negative offset */ +/* - 2 == offset exceds namelen */ +/* - 3 == string exceeds the names string */ +/* Parameters: names - pointer to names string */ +/* namelen - total length of names string */ +/* offset - offset into names string */ +/* */ +/* Validate the names string (fr_names for ipfilter, in_names for ipnat). */ +/* ------------------------------------------------------------------------ */ +int +ipf_check_names_string(char *names, int namelen, int offset) +{ + const char *name; + size_t len; + + if (offset == -1) + return (0); + if (offset < 0) + return (1); + if (offset > namelen) + return (2); + name = &names[offset]; + len = strnlen(name, namelen - offset); + if (len == namelen - offset) + return (3); + return (0); +} diff --git a/sys/netpfil/ipfilter/netinet/ip_fil.h b/sys/netpfil/ipfilter/netinet/ip_fil.h index 7343fd079564..92935689e0c4 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil.h +++ b/sys/netpfil/ipfilter/netinet/ip_fil.h @@ -1861,5 +1861,6 @@ extern int ipf_ht_node_del(host_track_t *, int, i6addr_t *); extern void ipf_rb_ht_flush(host_track_t *); extern void ipf_rb_ht_freenode(host_node_t *, void *); extern void ipf_rb_ht_init(host_track_t *); +extern int ipf_check_names_string(char *, int, int); #endif /* __IP_FIL_H__ */ From nobody Mon Jan 5 20:01:20 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQD13SH1z6MyJh for ; Mon, 05 Jan 2026 20:01:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQD06fVSz3FJy for ; Mon, 05 Jan 2026 20:01:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rxbl7mGFt4WDzGwZMtrXKkTyxsAZLh1VaP/XGOpqTpg=; b=gGSbqYd0lHMLT9OYi803GvOeNL2qt8Y0PDZmYWjkZJ7UBuQTcKFXMRhGH2FRgqdbHEmfMk nj51lNhXFAaVa2lonZz+qPmYjZcXEzGcyQM84HsEDYATQRWy7Ns99tR7v0q6xipNeXHTyC DNTw39DxsSkWl6bGF0B2HTClplTnPYeg7c3atJc27eoSV2xu8TA8WJqhPi2g4Xut1Q0NoK 2+u3JCMglLrjFqM8khdnep+4qvTwbn1B2+R19QTfbY76DgQ8/OPOMw8KRoMrrb4mfNnXfx qTxSBCObikA+Iw8pgmsRxcC8TgN7sJeW/JUrp/FmbCNgyzQMjooI8PojaGVzdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rxbl7mGFt4WDzGwZMtrXKkTyxsAZLh1VaP/XGOpqTpg=; b=ST0EIxnpPh4m9JPvqlMvnynUKt98h6tqC4A1DM4A+MrdDMiGfZv0klzEaCGN4jEZ/BgKAS teSkr70S2xJdyYkGD7vt/eSFLG7tA4iOkkiYVccuHrVMfTOLLlrEU4gXu5EyuoioEnl176 kszFOQPOLw87ExXDl8K1FEkgnynUu05ZU/q3yNUsqYReU0iOzSZGiKz4RV5GLtSNoIfqeZ cbjIsYE1JIetDSvX8AbBtnxzojJprikqAXEGlZrGha9/cUogGfxpWly8f4g2sRnkMSvpBk DjYfoWMxhLUve/67b6EBPOQx/lsQoex9LmWb08hKshGUk71cYPWQvFSVYXrvnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643280; a=rsa-sha256; cv=none; b=fcxkNy+vevhEM7X6wSVgX48g/WIzpsK1XDZXUQFT7uA9WRA/NVwWEXEaGcmTsXt550+uG8 uq5ShZQFhCGte0QTGSKyHA2ao7f4P04qtiB3Bs6mpEbBusbz79Uhw/IO3hOruVYe7kOkzl zozfxBDXCGw9FtZXYl9Lg7vby8DLt72ONfM6BVma08SNbaCaLXvsTgG1RSYeXWYIwAg/hR 12OHwcPO8h1LBcPqbT23AAOq1ky9muJVYMd66/QimHCFviSOYifo+UlZxU1fp8rXV68+sG yaVReaagHpzHFa3iKNyMHfV/XXBa4Uc/cmaOmRLpVq3s+YkObs3WSwhDZEpg0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQD06DDqzbS0 for ; Mon, 05 Jan 2026 20:01:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fcfb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:01:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: b2f4c3b36c2c - stable/14 - ipfs: Fix typo in error message List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b2f4c3b36c2c60ba77ad1536cbe1c115bfcf3af1 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:01:20 +0000 Message-Id: <695c1890.3fcfb.2befcc07@gitrepo.freebsd.org> The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=b2f4c3b36c2c60ba77ad1536cbe1c115bfcf3af1 commit b2f4c3b36c2c60ba77ad1536cbe1c115bfcf3af1 Author: Cy Schubert AuthorDate: 2025-10-28 03:43:14 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 20:00:52 +0000 ipfs: Fix typo in error message MFC after: 3 days (cherry picked from commit 5ae7b106cfd4801ef5e0f69b02ad9b3ae3ccfbec) --- sbin/ipf/ipfs/ipfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ipf/ipfs/ipfs.c b/sbin/ipf/ipfs/ipfs.c index bb342cbb9319..438b53f124b9 100644 --- a/sbin/ipf/ipfs/ipfs.c +++ b/sbin/ipf/ipfs/ipfs.c @@ -579,7 +579,7 @@ int readnat(int fd, char *file) in = (nat_save_t *)malloc(ipn.ipn_dsize); if (in == NULL) { - fprintf(stderr, "nat:cannot malloc nat save atruct\n"); + fprintf(stderr, "nat:cannot malloc nat save struct\n"); goto freenathead; } From nobody Mon Jan 5 20:01:23 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQD33PVVz6MyWx for ; Mon, 05 Jan 2026 20:01:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQD30vVgz3Fdd for ; Mon, 05 Jan 2026 20:01:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tksqTQ+KLT/J9PrDwMLIWnhhG0HrypK9OdNvj6msAxM=; b=FZz27XJRao2SpNIxqjcGiG4hmYOOybXgBU7nXQzvM2Zb/IPj9uGEdxPsMRxuDiBW+oo3Un JHGZcBSEWwlm97TlUdx4AtkFDXW6AgbDV6CZUeYIHsmh/d0NOTN3DXoupsQOhiNjG4mmWe 1Nj/KSJa629hqAlgnrrzGTDtTXj8dxeLmOjAQgRZkPO1plVtsPCQNZodlywfeLDbIjccbd XAgfwthTg47E+V99iz5/agwdjHL7EzulkoCXC8eljtJ5SkiugJOBofvk9l546NX2VAIUgQ iyNv5f4nOSEH1cSdj1nN1MBgwEXok1QkSO6+5MnoorvKEQt8e1zzpPhiSimHug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tksqTQ+KLT/J9PrDwMLIWnhhG0HrypK9OdNvj6msAxM=; b=RRIjIvjXvLZP7EEmkIn4/OrOc2q/V8Qj5gFfXMo9XhsGGw3ltsnQxfoihNIB9WWf5OWgva sVEy9qi9+z/zjTHlkjKLPplqYkUSk09CnHWCcyacq2PkBhW0VLrHTScqSnlWyriRT17x8w +NOiQkKWkEGs425SDfhnMSCvETFIqT1nka0CWtUIUbrAisSTKADNIU+4+69YX+hWGBQ/hK nnogF2I8CnE1qS+xnzJ2HRjF9UGc3tuQYwjyCnzXdIIZxm54jLGBzrOOHofDRDI6eNvQSv ystKExseaJmHNd08sAumS3ZmzoJQLSZSC7YNuYq9uM7siPrnzs7FOIOs5TyPLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643283; a=rsa-sha256; cv=none; b=p/iChjLJ6E87IsCCFqjKjGBVWyR94pX0A1TZhvLnMHgmBNCq+bZ7eu8WcO5vy69CyIZvIL vIZVFs/Jp1LN2vgQcby0Z0dcQVTJ4PA1t7F6scQtsZLq509ISZw0IYXznRWlhZ0FhL35WN EOBaudQTaHOHV12Eh4TIik5tSWaw6UmiXa8zXYnWh9Ynx35UK5g8bWhRnJHLAiGLu9ZQuf l9KGWNgLJMnVieUEPq4w+XFVEdPqXX+lVeAJ1zrvG2pBidQMksdLyokEJQ9Y+3nBrhxPTk 4tMeYYXTNX8mO16g2Euhx89pUkMD9c3a1wYtFRsrmuv+hbODQO6TPLGuiCpEoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQD30M39zbbH for ; Mon, 05 Jan 2026 20:01:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fff9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:01:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 53978114bcf8 - stable/14 - ipfilter: Verify frentry on entry into kernel List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 53978114bcf89f5f1fc8a2722c42e3347c24bb6b Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:01:23 +0000 Message-Id: <695c1893.3fff9.585ac8af@gitrepo.freebsd.org> The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=53978114bcf89f5f1fc8a2722c42e3347c24bb6b commit 53978114bcf89f5f1fc8a2722c42e3347c24bb6b Author: Cy Schubert AuthorDate: 2025-10-29 17:23:23 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 20:00:53 +0000 ipfilter: Verify frentry on entry into kernel The frentry struct is built by ipf(8), specifically ipf_y.y when parsing the ipfilter configuration file (typically ipf.conf). frentry contains a variable length string field at the end of the struct. This data field, called fr_names, may contain various text strings such as NIC names, destination list (dstlist) names, and filter rule comments. The length field specifies the length of fr_names within the frentry structure and fr_size specifies the size of the frentry structure itself. The upper bound limit to the length of strings field is controlled by the fr_max_namelen sysctl/kenv or the max_namelen ipfilter tuneable. The initial concepts were discussed with emaste and jrm. Reported by: Ilja Van Sprundel Reviewed by: markj MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53843 (cherry picked from commit eda1756d0454f9383940dc825cf571ff67e0c013) --- sbin/ipf/libipf/interror.c | 5 +++ sys/netpfil/ipfilter/netinet/fil.c | 61 +++++++++++++++++++++++++++++++-- sys/netpfil/ipfilter/netinet/ip_fil.h | 1 + sys/netpfil/ipfilter/netinet/mlfk_ipl.c | 1 + 4 files changed, 66 insertions(+), 2 deletions(-) diff --git a/sbin/ipf/libipf/interror.c b/sbin/ipf/libipf/interror.c index 73521a67a1b8..e094dac7fc08 100644 --- a/sbin/ipf/libipf/interror.c +++ b/sbin/ipf/libipf/interror.c @@ -177,6 +177,11 @@ static ipf_error_entry_t ipf_errors[] = { { 149, "object size validation failed for kernel copyout" }, { 150, "error copying data out for kernel copyout" }, { 151, "version mismatch for kernel copyout" }, + { 152, "fr_names offset is wrapped negative" }, + { 153, "fr_names larger than fr_namelen" }, + { 154, "frentry larger than fr_size" }, + { 155, "frentry and fr_namelen mismatch fr_size" }, + { 156, "fr_namelen too large" }, /* -------------------------------------------------------------------------- */ { 10001, "could not find token for auth iterator" }, { 10002, "write permissions require to add/remove auth rule" }, diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index e152fa23c83c..545ef657217d 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -367,6 +367,10 @@ static ipftuneable_t ipf_main_tuneables[] = { "ip_timeout", 1, 0x7fffffff, stsizeof(ipf_main_softc_t, ipf_iptimeout), 0, NULL, ipf_settimeout }, + { { (void *)offsetof(ipf_main_softc_t, ipf_max_namelen) }, + "max_namelen", 0, 0x7fffffff, + stsizeof(ipf_main_softc_t, ipf_max_namelen), + 0, NULL, NULL }, #if defined(INSTANCES) && defined(_KERNEL) { { (void *)offsetof(ipf_main_softc_t, ipf_get_loopback) }, "intercept_loopback", 0, 1, @@ -4403,7 +4407,8 @@ int frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, int set, int makecopy) { - int error = 0, in, family, need_free = 0; + int error = 0, in, family, need_free = 0, interr, i; + int interr_tbl[3] = { 152, 156, 153}; enum { OP_ADD, /* add rule */ OP_REM, /* remove rule */ OP_ZERO /* zero statistics and counters */ } @@ -4412,7 +4417,9 @@ frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, void *ptr, *uptr; u_int *p, *pp; frgroup_t *fg; - char *group; + char *group, *name; + size_t v_fr_size, v_element_size; + int v_rem_namelen, v_fr_toend; ptr = NULL; fg = NULL; @@ -4427,6 +4434,17 @@ frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, IPFERROR(6); return (EINVAL); } + if (fp->fr_size < sizeof(frd)) { + return (EINVAL); + } + if (sizeof(frd) + fp->fr_namelen != fp->fr_size ) { + IPFERROR(155); + return (EINVAL); + } + if (fp->fr_namelen < 0 || fp->fr_namelen > softc->ipf_max_namelen) { + IPFERROR(156); + return (EINVAL); + } KMALLOCS(f, frentry_t *, fp->fr_size); if (f == NULL) { IPFERROR(131); @@ -4453,6 +4471,44 @@ frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, fp->fr_ptr = NULL; fp->fr_ref = 0; fp->fr_flags |= FR_COPIED; + + for (i = 0; i <= 3; i++) { + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_ifnames[i])) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } + } + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_comment)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_group)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_grhead)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_tif.fd_name)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_rif.fd_name)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_dif.fd_name)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } } else { fp = (frentry_t *)data; if ((fp->fr_type & FR_T_BUILTIN) == 0) { @@ -9044,6 +9100,7 @@ ipf_main_soft_create(void *arg) #endif softc->ipf_minttl = 4; softc->ipf_icmpminfragmtu = 68; + softc->ipf_max_namelen = 128; softc->ipf_flags = IPF_LOGGING; #ifdef LARGE_NAT diff --git a/sys/netpfil/ipfilter/netinet/ip_fil.h b/sys/netpfil/ipfilter/netinet/ip_fil.h index 92935689e0c4..821d63664859 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil.h +++ b/sys/netpfil/ipfilter/netinet/ip_fil.h @@ -1531,6 +1531,7 @@ typedef struct ipf_main_softc_s { int ipf_pass; int ipf_minttl; int ipf_icmpminfragmtu; + int ipf_max_namelen; int ipf_interror; /* Should be in a struct that is per */ /* thread or process. Does not belong */ /* here but there's a lot more work */ diff --git a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c index 1c3051fb6615..d558b2d24b2c 100644 --- a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c +++ b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c @@ -135,6 +135,7 @@ SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_running, CTLFLAG_RD, SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_chksrc, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_chksrc), 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_minttl), 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, large_nat, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &VNET_NAME(ipfmain.ipf_large_nat), 0, "large_nat"); +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_max_namelen, CTLFLAG_RWTUN, &VNET_NAME(ipfmain.ipf_max_namelen), 0, "max_namelen"); #define CDEV_MAJOR 79 #include From nobody Mon Jan 5 20:01:24 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQD45JC8z6MyPW for ; Mon, 05 Jan 2026 20:01:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQD41bV3z3FpS for ; Mon, 05 Jan 2026 20:01:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3AF2EOk/b2NVNCS6C9ziJRbXLsWZkMKxcx9JGuLhywQ=; b=q1+HLJ2BkhxcIg+BNSouNpUHm0J/eD3s/DGZcl6tvA9kXs7CHVG1NO2ZQtSk58cXerCQbL p/QIfNcTdvLpek6c4Uv5FZJqdUaXBNEQFRRRlRUiow4JdK2ycPdziyXkridiC+44i58Kri Jfo7Mh6L7UbIGJ9vOrMfuFNbNjh4Dhp9JhkXI2LtnV3npL0UJokKlpIUmsGn+DgDyI9cJy gv0Bzty2EG20j+IHY55X7fdBrM18etWRN3fPtzL+86vctnqlXRhtyp8UEwND57F07EJCDf VBgqNpA93WyC9q+dKV2uEku689RJx9pRBJEkYRh4Ffy0zifjPQ4Lkrmy3MKcHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3AF2EOk/b2NVNCS6C9ziJRbXLsWZkMKxcx9JGuLhywQ=; b=NkWdIYeBhs4cC+MfK+vKtA0gWN48WJWpsRsao/kTCvBpTCmUoOy41aEJRrkEX6MCGcVzYc stNsr0obtfygEtkkv7yx49s+VfhT7PxiI9DUn6gT5RBk8xRJaj7JLQQo5yJi5R1cy7TX+B ccbtGdF0g0iXy3o6k0QAOMWUc2/iRi4GzbDA2pRL4QKnjIFhCOAXx18yYGT+9NJ1GYCdEG keYshEZBg+9bTgQ3RSsHrGTXquUmbCKpFNQHaKOO5GUp9kMc4uTweEluB/NwrVv5cyDTBF XDF8IPB30iB3piNoqVSJDvzBFVKeo4zscQhF8et/dGDEkkXSdkDTs1eMu4JJcg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643284; a=rsa-sha256; cv=none; b=EThYsBog5XGexBpxKnusazCQHlBBMxC32Ns5YBCk0hKSDPlAOxfaCGZoXzVP9GNbzb8IV6 P998fJM124b2Yp7A37ZOWhvJVZ+lrT1ZBV/X+p8gpPqC1PtXSjc1LFsfrTiwIILzyRSnSG lf/EScxZf1FHLxKtgJACi5xJpoj5ffynUYAOIA42lcfEsbhMUkDXQkqR9SeW8kYLpd92QD POvG5KWJsADYc0RRfVM+0KC23bgY/0ZcojxDyCl7ubqcqU9oSeI/SehTQpSkhCX/kWTYi6 9eEzIyqs0XiqEFg7djK7K/ZQ4tOLozEjEuR5h9VJAAUkpEtzeTFD8tx+hCCHcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQD4189czbmX for ; Mon, 05 Jan 2026 20:01:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8660 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:01:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: b94fbf89ef71 - stable/14 - ipfilter: Verify ipnat on entry into kernel List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b94fbf89ef715a1caaba27311e165a43b0a49f67 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:01:24 +0000 Message-Id: <695c1894.8660.697eb3bc@gitrepo.freebsd.org> The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=b94fbf89ef715a1caaba27311e165a43b0a49f67 commit b94fbf89ef715a1caaba27311e165a43b0a49f67 Author: Cy Schubert AuthorDate: 2025-11-03 04:59:15 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 20:00:55 +0000 ipfilter: Verify ipnat on entry into kernel The ipnat struct is built by ipnat(8), specifically ipnat_y.y when parsing the ipnat configuration file (typically ipnat.conf). ipnat contains a variable length string field at the end of the struct. This data field, called in_names, may contain various text strings such as NIC names. There is no upper bound limit to the length of strings as long as the in_namelen length field specifies the length of in_names within the ipnat structure and in_size specifies the size of the ipnat structure itself. Reported by: Ilja Van Sprundel Reviewed by: markj MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53843 (cherry picked from commit 821774dfbdaa12ef072ff7eaea8f9966a7e63935) --- sbin/ipf/libipf/interror.c | 6 +++++ sys/netpfil/ipfilter/netinet/ip_nat.c | 42 ++++++++++++++++++++++++++++++++++- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/sbin/ipf/libipf/interror.c b/sbin/ipf/libipf/interror.c index e094dac7fc08..dcc12f244691 100644 --- a/sbin/ipf/libipf/interror.c +++ b/sbin/ipf/libipf/interror.c @@ -363,6 +363,12 @@ log" }, { 60074, "unknown next address type (ipv6)" }, { 60075, "one object at a time must be copied" }, { 60076, "NAT ioctl denied in jail without VNET" }, + { 60077, "in_names offset is wrapped negative" }, + { 60078, "in_names larger than in_namelen" }, + { 60079, "ipnat larger than in_size" }, + { 60080, "ipnat and in_namelen mismatch in_size" }, + { 60081, "ip_names runs off the end of ipnat" }, + { 60082, "in_namelen too large" }, /* -------------------------------------------------------------------------- */ { 70001, "incorrect object size to get pool stats" }, { 70002, "could not malloc memory for new pool node" }, diff --git a/sys/netpfil/ipfilter/netinet/ip_nat.c b/sys/netpfil/ipfilter/netinet/ip_nat.c index 3f8f3c2a342c..1281e557df86 100644 --- a/sys/netpfil/ipfilter/netinet/ip_nat.c +++ b/sys/netpfil/ipfilter/netinet/ip_nat.c @@ -978,9 +978,13 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, int mode, int uid, void *ctx) { ipf_nat_softc_t *softn = softc->ipf_nat_soft; - int error = 0, ret, arg, getlock; + int error = 0, ret, arg, getlock, interr, i; + int interr_tbl[3] = { 60077, 60081, 60078 }; ipnat_t *nat, *nt, *n; ipnat_t natd; + char *name; + size_t v_in_size, v_element_size; + int v_rem_namelen, v_in_toend; SPL_INT(s); #if !SOLARIS && defined(_KERNEL) @@ -1031,6 +1035,16 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, error = EINVAL; goto done; } + if (sizeof(natd) + natd.in_namelen != natd.in_size) { + IPFERROR(60080); + error = EINVAL; + goto done; + } + if (natd.in_namelen < 0 || natd.in_namelen > softc->ipf_max_namelen) { + IPFERROR(60082); + error = EINVAL; + goto done; + } KMALLOCS(nt, ipnat_t *, natd.in_size); if (nt == NULL) { IPFERROR(60070); @@ -1045,6 +1059,32 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, nat = nt; } + /* + * Validate the incoming ipnat_t. + */ + if ((interr = ipf_check_names_string(nat->in_names, nat->in_namelen, nat->in_ifnames[0])) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto done; + } + if (nat->in_ifnames[0] != nat->in_ifnames[1]) { + if ((interr = ipf_check_names_string(nat->in_names, nat->in_namelen, nat->in_ifnames[1])) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto done; + } + } + if ((interr = ipf_check_names_string(nat->in_names, nat->in_namelen, nat->in_plabel)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto done; + } + if ((interr = ipf_check_names_string(nat->in_names, nat->in_namelen, nat->in_pconfig)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto done; + } + /* * For add/delete, look to see if the NAT entry is * already present From nobody Mon Jan 5 20:01:25 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQD6375Vz6MyTb for ; Mon, 05 Jan 2026 20:01:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQD52CFQz3FfC for ; Mon, 05 Jan 2026 20:01:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GS2RaBKSPeucTk4EISTZ7R5rWGLU6H02NxqbjgbNj6E=; b=Tvy4spK4HE1tzKRGk+JKKPoQwCreNGyUwSVNYBrGupai8kyNcBcjCpcLSz8mhZMpMiTbXm 6aY8dojYUbHM0Va4KREABggD+2r9s0Zo1iek0mkBCuGrF2bvb8DwcbWmlEIfCJpj2QG8Hy fZsdBmg56Q0dRmE2RmUIxFyZdB7ZY66we8zk/0OYYnlt6WPhkxVF0njzpaaf0JMVPUAreJ zEDP2WfIBsT5w5/jaeLk4AiHyQILd1uZir7hlndddvCr1m4ylY2TrhY9SX+YnG5PKEpvFd TVQcH8ddrtBFewG6gWkgUg8q7/CH8OPWhKhgBPVLzpqfAv1vR/1tp0K/kfCouQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GS2RaBKSPeucTk4EISTZ7R5rWGLU6H02NxqbjgbNj6E=; b=RGLFkUSt8jdy4wDa648vlCSFNzeTxfVXZU2CIf3+i86ebiY1UtorioeIiFENztEHCEeihP zqiAul8seZBA9HWIG4rHKy15U3KuFstsJRDIJ1/8+tOWoRX5lfA/NMwNC2yZXCdmDndCkf 4WJcEY+vCKr+cVo9EfShJbD2EjG1I20azSWvK2Puw94ND59Tjo44t2ZsttIn1/GYHbu+5Y gqloB9SsIO9saAhVQxRE3x2RHmpzCehzXYSPY9In6UOvBBZJQsT5vkbgmg93/XgkMZmuzU UzlNm4Ilov6VobpXoORCu5ARWBgQkVD+oqnP4GU+B9f5+61kh9/DcodH323Xlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643285; a=rsa-sha256; cv=none; b=RiFIcpAqk9YAIOi6XrRvQ17DKMg2bINIRUILSUcD0IQlXbtiM9mT7rdk9FFb4oOsVguH+m qswyr48IMWtM0vbWCT9czp9GfVpk/wJ9lG6bjYuMSeMFdpM5uiXU1Z9yS1dQqSma74z5gs URC3brpmDbwaLv0olb3Fzq9OFo15pBZA1f3uOREQ/VYL6rhOg5EwyRr1QyUNyODNad5SYJ 1nq6BW3cvZxPHZzxg4AQJ1TFBel+gCr+nHZgEstx8SZSlBlxBTQKFTMABsBpQ7hjr8LL+D K71bcFYJ641OUVGgJMJEtGIZ8Nur8uHuii1W/ePCta2R0bBIOlMgN2oiSoHlGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQD51gqqzbmY for ; Mon, 05 Jan 2026 20:01:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fda8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:01:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: dfab913f72a9 - stable/14 - ipfilter: Remove unused variable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: dfab913f72a9257f146c64f5cacc3474690cfc2e Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:01:25 +0000 Message-Id: <695c1895.3fda8.377c81@gitrepo.freebsd.org> The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=dfab913f72a9257f146c64f5cacc3474690cfc2e commit dfab913f72a9257f146c64f5cacc3474690cfc2e Author: Cy Schubert AuthorDate: 2025-11-26 23:24:17 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 20:00:57 +0000 ipfilter: Remove unused variable Reported by: jlduran Fixes: eda1756d0454, 821774dfbdaa MFC after: 1 week X-MFC with: eda1756d0454, 821774dfbdaa (cherry picked from commit 20c48f090b270d0124d5f0b31c6f3a639efbbc80) --- sys/netpfil/ipfilter/netinet/fil.c | 2 +- sys/netpfil/ipfilter/netinet/ip_nat.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 545ef657217d..5161e6472a60 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -4407,7 +4407,7 @@ int frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, int set, int makecopy) { - int error = 0, in, family, need_free = 0, interr, i; + int error = 0, in, family, need_free = 0, interr; int interr_tbl[3] = { 152, 156, 153}; enum { OP_ADD, /* add rule */ OP_REM, /* remove rule */ diff --git a/sys/netpfil/ipfilter/netinet/ip_nat.c b/sys/netpfil/ipfilter/netinet/ip_nat.c index 1281e557df86..a11eda2a6b85 100644 --- a/sys/netpfil/ipfilter/netinet/ip_nat.c +++ b/sys/netpfil/ipfilter/netinet/ip_nat.c @@ -978,7 +978,7 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, int mode, int uid, void *ctx) { ipf_nat_softc_t *softn = softc->ipf_nat_soft; - int error = 0, ret, arg, getlock, interr, i; + int error = 0, ret, arg, getlock, interr; int interr_tbl[3] = { 60077, 60081, 60078 }; ipnat_t *nat, *nt, *n; ipnat_t natd; From nobody Mon Jan 5 20:01:28 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQD915Zsz6MyJq for ; Mon, 05 Jan 2026 20: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQD84hB9z3Fmt for ; Mon, 05 Jan 2026 20:01:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cFgabo4NJfl5+Z+YurZk0Jhuuaqn/6jFHBnmyTBwnOU=; b=o5qtEh1v9aDs9Lgh77d9yC1LnBk6sjEMkhg0jti2EiGDO/n2L5Z/dPPhT9Uc7PCeJGG08z 1R4/igDT2MXdi9Gja/F9p6k82n7so8bUbZmjunK3JvudZPpCgHh6p42hMMrMzMfYjDfQpU xY/r0r18+J4WRyuuzA0GEu8IuqcXSLpBYyof8r6fvnLrHYMZmfLMhdHybP2zRLTMMsO0Mr f177JqyS8iyq/ZQG1QH7c97rX5JUMyaBdyXJCfRAJ0/wayJDEQlNhw4len6Lx3zr0cJkHG Tzqxv7XSDoRuuun8wi1TD8JRsL+U3XLh+JSe85GHi5FnY31lyaDTSFcbKtacYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cFgabo4NJfl5+Z+YurZk0Jhuuaqn/6jFHBnmyTBwnOU=; b=e7FZB/3HEjjnIa/5Hy+dKADWNwJNnbNg+SyhFNydO4Tr22Ueu8aZjWZ2gJtxOTjIMG5Pr2 PMJ+dOStcflNVIWac9TKrg75Y0BlBsvyCLSXnPec9wo+0mOp32f9tE2vC/Kx2VtofhHrKq QttEBzuI8L8uYbYyR3V1siiJCYn1BbTZNQqhx/eQYeRvDzGmjMbLZV+pmKISSMp9KZPkY7 rBuFt0/0YnG87x2BnNe+2GRHfDjcQKVn0iQgUcc83bcq2dsjVeGiDzNpYlVVcY5OCS5eQw PdhF+EG5u/D134shBOoDnvT4s88jf2MkqxwsoPTgsvSrglUg46tJoHjGpm5ypQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643288; a=rsa-sha256; cv=none; b=w8cd0+o4A4W+d+sT3zQ6hizjQXUx1BfukunzUJ+wh03TYEmc1lqKOka3pv3gkHRP5Y+aDs l7ikg3BUVwP044w0Q0voVsGx1ACBBMVISMm0fLjyiWqUgJhDkzWXSUOO3ZCEPkWMFzOObx sBavbXPeRIpKLbIO1Ek0mJxzBYSm1xFAZl+QGoflmZGbPse6BfJ7ogCozENFvBIk0mpKGZ uoiNLco48xKVk59ag3/8tTRE45VdR+8DX0SbFFoNUzhojVR8ODydcper3bC+w5B+2SS5NL KyO10BwkxsFo1nS5KidTNWvlWsblfihRnPmXSaTs34LLn+T1b+nPgbpIRsW4iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQD847P6zbdJ for ; Mon, 05 Jan 2026 20:01:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 858c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:01:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: a85c3ef7d801 - stable/14 - ipfilter: Disable ipfs(8) by default List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a85c3ef7d80161da04241d275da804644cdc5347 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:01:28 +0000 Message-Id: <695c1898.858c.7c8845cd@gitrepo.freebsd.org> The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=a85c3ef7d80161da04241d275da804644cdc5347 commit a85c3ef7d80161da04241d275da804644cdc5347 Author: Cy Schubert AuthorDate: 2025-11-16 07:39:19 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 20:01:01 +0000 ipfilter: Disable ipfs(8) by default At the moment ipfs(8) is a tool that can be easily abused. Though the concept is sound the implementation needs some work. ipfs(8) should be considered experimental at the moment. This commit also makes ipfs support in the kernel optional. Reviewed by: emaste, glebius MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53787 (cherry picked from commit 0ff0c19e7f70bc4d3f98196a8ad43de635cf13e5) --- sbin/ipf/Makefile | 6 +++++- share/mk/src.opts.mk | 1 + sys/conf/NOTES | 1 + sys/conf/options | 1 + sys/modules/ipfilter/Makefile | 6 ++++++ sys/netpfil/ipfilter/netinet/ip_nat.c | 5 ++++- sys/netpfil/ipfilter/netinet/ip_state.c | 4 ++++ tools/build/mk/OptionalObsoleteFiles.inc | 4 ++++ 8 files changed, 26 insertions(+), 2 deletions(-) diff --git a/sbin/ipf/Makefile b/sbin/ipf/Makefile index 32cead444f77..b64b09584b48 100644 --- a/sbin/ipf/Makefile +++ b/sbin/ipf/Makefile @@ -1,6 +1,10 @@ +.include SUBDIR= libipf .WAIT -SUBDIR+= ipf ipfs ipfstat ipmon ipnat ippool +SUBDIR+= ipf ipfstat ipmon ipnat ippool +.if ${MK_IPFILTER_IPFS} != "no" +SUBDIR+= ipfs +.endif # XXX Temporarily disconnected. # SUBDIR+= ipftest ipresend ipsend SUBDIR_PARALLEL= diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 6395efc7469f..ee3784cecb4b 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -208,6 +208,7 @@ __DEFAULT_NO_OPTIONS = \ DTRACE_TESTS \ EXPERIMENTAL \ HESIOD \ + IPFILTER_IPFS \ LOADER_VERBOSE \ LOADER_VERIEXEC_PASS_MANIFEST \ LLVM_ASSERTIONS \ diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 7ce26cb76820..410b5e79fee1 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -1042,6 +1042,7 @@ options IPFILTER #ipfilter support options IPFILTER_LOG #ipfilter logging options IPFILTER_LOOKUP #ipfilter pools options IPFILTER_DEFAULT_BLOCK #block all packets by default +options IPFILTER_IPFS #enable experimental ipfs(8) support options IPSTEALTH #support for stealth forwarding options PF_DEFAULT_TO_DROP #drop everything by default options TCPPCAP diff --git a/sys/conf/options b/sys/conf/options index 2becb1aaa7a3..6337eb14f6a4 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -450,6 +450,7 @@ IPFILTER opt_ipfilter.h IPFILTER_DEFAULT_BLOCK opt_ipfilter.h IPFILTER_LOG opt_ipfilter.h IPFILTER_LOOKUP opt_ipfilter.h +IPFILTER_IPFS opt_ipfilter.h IPFIREWALL opt_ipfw.h IPFIREWALL_DEFAULT_TO_ACCEPT opt_ipfw.h IPFIREWALL_NAT opt_ipfw.h diff --git a/sys/modules/ipfilter/Makefile b/sys/modules/ipfilter/Makefile index d2f32538b68b..969df7dfad84 100644 --- a/sys/modules/ipfilter/Makefile +++ b/sys/modules/ipfilter/Makefile @@ -1,3 +1,4 @@ +.include .PATH: ${SRCTOP}/sys/netpfil/ipfilter/netinet @@ -10,6 +11,11 @@ SRCS+= opt_bpf.h opt_inet6.h opt_kern_tls.h CFLAGS+= -I${SRCTOP}/sys/netpfil/ipfilter CFLAGS+= -DIPFILTER=1 -DIPFILTER_LKM -DIPFILTER_LOG -DIPFILTER_LOOKUP + +.if ${MK_IPFILTER_IPFS} != "no" +CFLAGS+= -DIPFILTER_IPFS +.endif + # # If you don't want log functionality remove -DIPFILTER_LOG # diff --git a/sys/netpfil/ipfilter/netinet/ip_nat.c b/sys/netpfil/ipfilter/netinet/ip_nat.c index a11eda2a6b85..4c7ede89d30e 100644 --- a/sys/netpfil/ipfilter/netinet/ip_nat.c +++ b/sys/netpfil/ipfilter/netinet/ip_nat.c @@ -1344,6 +1344,7 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, error = ipf_proxy_ioctl(softc, data, cmd, mode, ctx); break; +#ifdef IPFILTER_IPFS case SIOCSTLCK : if (!(mode & FWRITE)) { IPFERROR(60015); @@ -1379,6 +1380,7 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, error = EACCES; } break; +#endif /* IPFILTER_IPFS */ case SIOCGENITER : { @@ -1686,7 +1688,7 @@ ipf_nat_siocdelnat(ipf_main_softc_t *softc, ipf_nat_softc_t *softn, ipnat_t *n, } } - +#ifdef IPFILTER_IPFS /* ------------------------------------------------------------------------ */ /* Function: ipf_nat_getsz */ /* Returns: int - 0 == success, != 0 is the error value. */ @@ -2254,6 +2256,7 @@ junkput: } return (error); } +#endif /* IPFILTER_IPFS */ /* ------------------------------------------------------------------------ */ diff --git a/sys/netpfil/ipfilter/netinet/ip_state.c b/sys/netpfil/ipfilter/netinet/ip_state.c index 88570273c588..bfb9b9eb19f3 100644 --- a/sys/netpfil/ipfilter/netinet/ip_state.c +++ b/sys/netpfil/ipfilter/netinet/ip_state.c @@ -713,6 +713,7 @@ ipf_state_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, IPFOBJ_STATESTAT); break; +#ifdef IPFILTER_IPFS /* * Lock/Unlock the state table. (Locking prevents any changes, which * means no packets match). @@ -749,6 +750,7 @@ ipf_state_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, } error = ipf_state_getent(softc, softs, data); break; +#endif /* IPFILTER_IPFS */ case SIOCGENITER : { @@ -805,6 +807,7 @@ ipf_state_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, } +#ifdef IPFILTER_IPFS /* ------------------------------------------------------------------------ */ /* Function: ipf_state_getent */ /* Returns: int - 0 == success, != 0 == failure */ @@ -1009,6 +1012,7 @@ ipf_state_putent(ipf_main_softc_t *softc, ipf_state_softc_t *softs, return (error); } +#endif /* IPFILTER_IPFS */ /* ------------------------------------------------------------------------ */ diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 8b2688f7e626..72e86b99799f 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -2684,6 +2684,10 @@ OLD_FILES+=usr/share/man/man8/ipnat.8.gz OLD_FILES+=usr/share/man/man8/ippool.8.gz .endif +.if ${MK_IPFILTER_IPFS} == no +OLD_FILES+=sbin/ipfs +.endif + .if ${MK_IPFW} == no OLD_FILES+=etc/rc.d/ipfw OLD_FILES+=etc/periodic/security/500.ipfwdenied From nobody Mon Jan 5 20:01:26 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQD66mVFz6MyRX for ; Mon, 05 Jan 2026 20:01:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQD62x4sz3FMW for ; Mon, 05 Jan 2026 20:01:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oS4Ov3QH6u0lwE6v+rSKTeFSBPS1vavkYHzbQEyXt14=; b=Tx5gw69hFVb0E5NwFFsvn1tSTLKjYK/PSN8f57evVcIl9uScPTbgzP6k4tWRC0LFQtkvjv BLb4Y37erfitH4ICpWZQZKrRa2V+SpOcL4rrkiJDBh2XbJfQbpw6TUEx/50bPvlqx1eShy KsYyaQ0EYiUVnRCdtSUbTLx1UUUp2EGKNJVlVNnz7SJBVuIqjt76EYZwKD0S0gSG1QSuRE xLrOwT6j9zwdmRbdj4O+kNSkWlxqFt81VePFn5N83NC/r9AddjOaWw7HzCzk3dWgaqMmqG 3OQdYbXlFWKQG89hjikcgYQLMSRht92ohJijfmWDKkVQ6F1nfLMwxjQWkBO4kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oS4Ov3QH6u0lwE6v+rSKTeFSBPS1vavkYHzbQEyXt14=; b=BlM+3hU/JNsHl/EsOuIydfqAZE3PyqHkxDuverRuhyi+6FpKTzoWvq3QXU4sjAbKaWYOec 11kyhRahbey5H7iT/CQGtGRZxGR9wtAhW2aw4scwc9mN93NRgrE7AWBYj+YMlKtWuS6sZv gyvmPZjHkmsH+SgsdVPtgZRQrX5MlkZxwt4xnXCestrpqtzUf4E5CfnZqkRettMq7ChUT0 2+4TcqqkcAWukCRSKB3AHh3+OEomon80RXA1+f81aFjYLyX7a+lW7pVt4TOgZk7/1rrMVP dN7OsqD67TS74kvVqnmeX3VO+U1Id2EbzwnhqQtgBLhgJiY59R3IuQ9xcatT1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643286; a=rsa-sha256; cv=none; b=aqPB4Jz1+dj/t1tGho80PXg68VVfnq0rzj+e2DjwvFTghWMRUqMurTM/3gL28iELB3S8N6 4rwPkQA2/DFTzuqeNtj2X69MZx2jv4ia0J7MgEd57zgokQSw8bM8/ymVzARNxTu58lHvWd E3oBIEY9NoCvDrUz6SqekhntgoMU2pevBNNlmDK+WXrWapF2IQ6cU4QqVRVzooDBNiO2ZH BTAmkIhJPNxYIse7LNgTN2Cp7q/Yx8FbaVcFCP53kQkHmBz6g5pp/C9hgBb5DyOvMs3mQu SbtNrUNPMUGjYo9pQwfGU7Hfk5T81S/KDPuZjH4iHUCYprJNl5pmAp8dpENFSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQD62QblzZvr for ; Mon, 05 Jan 2026 20:01:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fffd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:01:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: af32b767e103 - stable/14 - ipfilter: Restore used variable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: af32b767e10310d06706724fc6ea9ae3a711be47 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:01:26 +0000 Message-Id: <695c1896.3fffd.4b7eefb9@gitrepo.freebsd.org> The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=af32b767e10310d06706724fc6ea9ae3a711be47 commit af32b767e10310d06706724fc6ea9ae3a711be47 Author: Cy Schubert AuthorDate: 2025-11-26 23:39:24 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 20:00:58 +0000 ipfilter: Restore used variable One of the "unused" i variables is actually used. Fixes: 20c48f090b27 (cherry picked from commit 78c6cfdc3dc0b84aa2daf0f32c7c9cdf3b34fee5) --- sys/netpfil/ipfilter/netinet/fil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 5161e6472a60..545ef657217d 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -4407,7 +4407,7 @@ int frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, int set, int makecopy) { - int error = 0, in, family, need_free = 0, interr; + int error = 0, in, family, need_free = 0, interr, i; int interr_tbl[3] = { 152, 156, 153}; enum { OP_ADD, /* add rule */ OP_REM, /* remove rule */ From nobody Mon Jan 5 20:01:27 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQD84RR7z6MyRY for ; Mon, 05 Jan 2026 20:01:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQD73dgSz3FvH for ; Mon, 05 Jan 2026 20:01:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hxza/+k1L+2/kJlHw0sL37TfSzrnn7D0iI2FrUevIdE=; b=txdcLgsaeeQHB2eI3phK4BOVuXJ/+l0APoSoHEj0uDmPPjfxbsn2PxIpvIKp5Vypw6NUUf UhrnvhCxXXvYj177mrLMS2j3k2MkhurKlgr0dXFKSpG9ClvGKiXTmrYafTqZNsbHTiLk1r Tpo56wQ85au7xmwn2FobpFDBGr6hfqrwrncWUwCtESBNP+blBe7nVNVAbPBUEnwcopJZ/F I6SUZMO9axAAsXRI3IQ6mMURrv4mkOeGvSujsVK0wWXCzk9YG9eOvwGiJRi2uySym4dks2 jIIy9Ahagn8ElqqC/mmauNN8BoaJKXVOqrSF5dVACdHIaWmor47R7lBAqE5ihg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hxza/+k1L+2/kJlHw0sL37TfSzrnn7D0iI2FrUevIdE=; b=udjFWiE+3vjUxR3hwnRT5nIC5xXR+ONL7M8hJQiTf6D8sJ7pOpIV59br6e+DX0hGe0cwTB 1J1V+itoAGKuNH80K+e9MO5J10xgXw5YLaiAdZdNjK6SQZ5YbOB3c15EkHGVYj/MW0pwuI JivAahwwsOFCfAkCqGNgn/Rvr4kCV7MGjNPHTy38L2yapvFcRokf+T2LlMpORkRb0jM4C0 jqGAs70r8y6nglD1jlo/jsMwsWSoka2mYubUtsNB4VcpwRHA3PxNKjDEhyToudTle4RXop Q4HtrdRfw9PTDCiNsGEKUxKCKRWiuECgF8y+SLXeKtj9aXoY+7Q8HNTITinXDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643287; a=rsa-sha256; cv=none; b=NONTRyhchA571ZFyBXwI+2w7EUhcYOd6tKGmwPigRMCrLnJfBbekK5rcRWpJ/SLS1fFKLb YjTVDLJ5XlRC9nQPyJEJ+SFgQ1i9Bc7GOvbgBuMh7bOPPU8IuoQxzSl1yjfcZjYsIgDH5b 6yhClFtXrWkMMRNnY69yVDrRcSQDPXzFzCHWNmMf8AJ46tiTC19eB6XAwl/6lkheCIUtsv /MRsePiCYuDiOfey8GQUrnrLi+CCd5ZUOXUG5HdcuzHZocEtT/5e/rnj+zym3l1tJ0YfD5 p5VspPKEyIZSWaQzHL1MxHWRcLXfh7EPZVc+WXib7YubjcEWNdP7MPNvLXH0Qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQD73FC1zbbN for ; Mon, 05 Jan 2026 20:01:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 874c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:01:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 616571ca7727 - stable/14 - ipfilter: Restrict ipfilter within a jail List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 616571ca7727be103247d4443fcfc89f7f5ba915 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:01:27 +0000 Message-Id: <695c1897.874c.5a914185@gitrepo.freebsd.org> The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=616571ca7727be103247d4443fcfc89f7f5ba915 commit 616571ca7727be103247d4443fcfc89f7f5ba915 Author: Cy Schubert AuthorDate: 2025-10-29 18:29:39 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 20:00:59 +0000 ipfilter: Restrict ipfilter within a jail Add a sysctl/tunable (net.inet.ipf.jail_allowed) to control whether a jail can manage its own ipfilter rules, pools, and settings. A jail's control over its own ipfilter rules and settings may not be desireable. The default is jail access to ipfilter is denied. The host system can stil manage a jail's rules by attaching the rules, using the on keyword, limiting the rule to the jail's interface. Or the sysctl/tunable can be enabled to allow a jail control over its own ipfilter rules and settings. Implementation note: Rather than store the jail_allowed variable, referenced by sysctl(9), in a global area, storing the variable in the ipfilter softc is consistent with ipfilter's use of its softc. Discussed with: emaste, jrm MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53623 (cherry picked from commit d9788eabffa4b67fc534685fc3d9b8e3334af196) --- sbin/ipf/libipf/interror.c | 1 + sys/netpfil/ipfilter/netinet/fil.c | 1 + sys/netpfil/ipfilter/netinet/ip_fil.h | 1 + sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 15 +++++++++++++++ sys/netpfil/ipfilter/netinet/mlfk_ipl.c | 1 + 5 files changed, 19 insertions(+) diff --git a/sbin/ipf/libipf/interror.c b/sbin/ipf/libipf/interror.c index dcc12f244691..43d063d44688 100644 --- a/sbin/ipf/libipf/interror.c +++ b/sbin/ipf/libipf/interror.c @@ -536,6 +536,7 @@ log" }, { 130016, "finding pfil head failed" }, { 130017, "ipfilter is already initialised and running" }, { 130018, "ioctl denied in jail without VNET" }, + { 130019, "ioctl denied in jail" }, }; diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 545ef657217d..786efca38232 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -9102,6 +9102,7 @@ ipf_main_soft_create(void *arg) softc->ipf_icmpminfragmtu = 68; softc->ipf_max_namelen = 128; softc->ipf_flags = IPF_LOGGING; + softc->ipf_jail_allowed = 0; #ifdef LARGE_NAT softc->ipf_large_nat = 1; diff --git a/sys/netpfil/ipfilter/netinet/ip_fil.h b/sys/netpfil/ipfilter/netinet/ip_fil.h index 821d63664859..4bbb19c889bd 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil.h +++ b/sys/netpfil/ipfilter/netinet/ip_fil.h @@ -1552,6 +1552,7 @@ typedef struct ipf_main_softc_s { u_int ipf_icmpacktimeout; u_int ipf_iptimeout; u_int ipf_large_nat; + u_int ipf_jail_allowed; u_long ipf_ticks; u_long ipf_userifqs; u_long ipf_rb_no_mem; diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c index 2a6ff68649b9..ed20a826ad52 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c @@ -92,6 +92,7 @@ VNET_DEFINE(ipf_main_softc_t, ipfmain) = { .ipf_running = -2, }; #define V_ipfmain VNET(ipfmain) +#define V0_ipfmain VNET_VNET(vnet0,ipfmain) #include #include @@ -278,6 +279,20 @@ ipfioctl(struct cdev *dev, ioctlcmd_t cmd, caddr_t data, return (EPERM); } + /* + * Remember, the host system (with its vnet0) controls + * whether a jail is allowed to use ipfilter or not. + * The default is ipfilter cannot be used by a jail + * unless the sysctl allows it. + */ + if (V0_ipfmain.ipf_jail_allowed == 0) { + if (jailed(p->p_cred)) { + V_ipfmain.ipf_interror = 130019; + CURVNET_RESTORE(); + return (EOPNOTSUPP); + } + } + if (jailed_without_vnet(p->p_cred)) { V_ipfmain.ipf_interror = 130018; CURVNET_RESTORE(); diff --git a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c index d558b2d24b2c..139fe1f766d3 100644 --- a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c +++ b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c @@ -136,6 +136,7 @@ SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_chksrc, CTLFLAG_RW, &VNET_NAME(ipfmain.ip SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_minttl), 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, large_nat, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &VNET_NAME(ipfmain.ipf_large_nat), 0, "large_nat"); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_max_namelen, CTLFLAG_RWTUN, &VNET_NAME(ipfmain.ipf_max_namelen), 0, "max_namelen"); +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, jail_allowed, CTLFLAG_RWTUN, &VNET_NAME(ipfmain.ipf_jail_allowed), 0, "jail_allowed"); #define CDEV_MAJOR 79 #include From nobody Mon Jan 5 20:01:29 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQDB3kppz6MyJt for ; Mon, 05 Jan 2026 20:01:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQD95PtXz3Fq9 for ; Mon, 05 Jan 2026 20: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=1767643289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vrbQxLbrT9110QxZqiu5l9yXeEuJxCA0W9j7I4UEcto=; b=td/68pXB9vN9B+UxYTYpBP2ADAN6YDM59i2Aon2hFgs2kjNv1nDF9eEFyOxUd9TOTPT1Zf F1s8CzckIQcYK6FqJ3DSGRCX5l4cKGFlIZoVkOheqJr0mh9M9WZKvTLswX9oM+n/H4Wtdg s0HFX0/Td98tTXJIdFJCkoWzYNfrD7XvrycO3j0dCvzPFAEhorbwvwxBtrpq5QrX+LmiiU 9RJEKWdnF1nsf5aKBJZ0YON2AtDHI9TJrrYp1bC2po/OlKB60qOQOpX5WTdx/1lY0VJGL/ W/wVrHlw+yfXRP+eoT4hnkscZKuObZtg9U6NUajMU3w+C1iDPC3kBLsx3DGDQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vrbQxLbrT9110QxZqiu5l9yXeEuJxCA0W9j7I4UEcto=; b=KU1cet34E2Hzrz0ZU3Bw8mcqZpTXCaDn7nXnaDBJODvF3WicamkR5HQbIhwjwP7M/8Fsyc SE46aZnjBSkOkxYnRQ4B18YKmAY7qLV/boF0ZteRicrwkO1IEL9uAOhk131hn5Yt1VNuVz O6fkQ7kH2lVAExeEXwjb/vPJDxwFmGnhA135X9u+9oVENnzZuc2KTpukFsPCeSH5dWfvv2 t4j1SROGgvCZjDK6S4SZASXnC5z5qj8mR3a+O0sev0pz0f+ZX0uWx8KAdcdyrVpjHtFUZJ liZqRrfqbjLvixwf7z90Junaa3jvEUV2tDzfZRz9n9+QXHIyddN1C7ByJB8Ong== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643289; a=rsa-sha256; cv=none; b=hWY6iUkuooiUYbqoqvjS3R03YgNX+hNMM8snYIWdA6Lfs2uRgDBqRVsUHSv9RpsOs/d/6y lZCV/AqpdJGUaOBCe9IvDQ63urkb9kdlkAjUO0qpM/zn189H7K7Kbt93wmks7tbMbHQmim uygURLWYDxDsx/cc2lqKU6mY6H8t89si2b7iEwICghO7Ld6oUIkaXYo6qQeRvOnN32BxVG DaWd6NcbGi6RVtdleWkjZ9gzq2m4WqGWLIwnqOoNIN7JNp0iJjfvBH6JNmBBlFluEYeCYJ AJn/w3RPJHBLSGISwb+oaepJF7BBS6F7LEzlNhrMW1EpLknT2UQA89CZbTnaFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQD94sBWzbk1 for ; Mon, 05 Jan 2026 20:01:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3eeb5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:01:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: a23b64b46cb1 - stable/14 - ipfilter: Add missing kenv fetch List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a23b64b46cb1e9885073ef6086769584b69f56bf Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:01:29 +0000 Message-Id: <695c1899.3eeb5.4bd0ccd9@gitrepo.freebsd.org> The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=a23b64b46cb1e9885073ef6086769584b69f56bf commit a23b64b46cb1e9885073ef6086769584b69f56bf Author: Cy Schubert AuthorDate: 2025-12-15 16:21:56 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 20:01:01 +0000 ipfilter: Add missing kenv fetch When a module the environment must be explicitly fetched. Fixes: d9788eabffa4 PR: 291548 Noted by: markj Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D54242 MFC after: 3 days (cherry picked from commit a6ea80bc917510b5e056cc5a29b62dfd7b39d068) --- sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c index ed20a826ad52..f67da50a990f 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c @@ -1472,4 +1472,6 @@ ipf_fbsd_kenv_get(ipf_main_softc_t *softc) { TUNABLE_INT_FETCH("net.inet.ipf.large_nat", &softc->ipf_large_nat); + TUNABLE_INT_FETCH("net.inet.ipf.jail_allowed", + &softc->ipf_jail_allowed); } From nobody Mon Jan 5 20:01:30 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQDC48rtz6MyPv for ; Mon, 05 Jan 2026 20:01:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQDB68nkz3Fkg for ; Mon, 05 Jan 2026 20:01:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UHUxXeJde7Bu+9zEpHTgXb+VdtqXDwzI5lXDc2/D2jU=; b=IzyHROnW4+cBInMnVLr8IDfP3Mjf9R5w9mP3ulg7HYdJrOC+S5hC0cQT6/Ii0lnGeGNUXy UO30jGRdKkKrqGcwNJ96+aH26ldQ7tcEJ1SUO9T6YB+47w6szQYcwYmNZE9dTgoL3mFNOi rBSLX2BoIJHrU5s+4UyMjYEjh5sLO7jse49NTpR0viBjF0kjzhNk2MBNl5/8AIkjpTJfHi J8bXYzLmukGNECWjxLSZ5y3pAMor/zv8ZD5xs/RmEXUIqQtW2yBjxC/UfT9nJzLY0rgWot u0G/Wagx8wElfD3xAyPWfutktvjRqs2FTb7Aca2tyhiPHwfNPSjq+PzBVX8MFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UHUxXeJde7Bu+9zEpHTgXb+VdtqXDwzI5lXDc2/D2jU=; b=vZmW5eaOuoSr4Z6rmzChecln+Ct5OVIqbNx5A9uhkylfbAWWCocpJBJdqXGUZgpwtlC8M4 ywRqcEi6sgmkSNkzryb0YfOicPc/WHxwUMYelkIl6uIle9YJeDlG2jXLr5mHHlWWjqocHQ j2/Eypddd0QrOoBDCYmThgcP9O5eWfh2jqnQpjtmvL49h1EyoXMtPg4AWudPTdDSavTcUO 6+8SVibx51iz93+GBk3uc21sj1eQ2OS7AdeMd1dsB5wVtv7zvt1aaOlx27G9qkIlbmkjej /niQN0vpSoZcGURMFsiuVd0jlcP22ytfgEMzQKcqVfTauBlwaj0VqiT+VJc/cA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643291; a=rsa-sha256; cv=none; b=RsJuATl3jybZFU0Maunxoj/gKHoXeBtsMF2oXsHbh6UzBX2Z8xHztFjqQ4pGtdPF6AYbYD 0LpYg1NKm5JU6euI8YOZ6fxnKnummFgHLkz61rSVFgfIrh5GojTPfXti6YNtdUdnaLLGUo 1hhA9erkuJF8zBWtwWoH5uNPctAnW3q0jbJ0DkWfnNw/pWNHU7BEwIQsyaROXLpmBXJLig C7gqPspEOlw+LY9s/9ahq/OZLPrIs2c75fMUH4WDoFIdmghc3t9gzCuVaUnge7oR+Xg+Xy vbelVgZq4wYyX7pDibEbBMI6hfj6jypLZU7kaQpQsfST5VNjRsM4RlUUkDtnhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQDB5dZNzb9n for ; Mon, 05 Jan 2026 20:01:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fdac by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:01:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Warner Losh From: Cy Schubert Subject: git: 639afa4b4419 - stable/14 - ipfilter: fix broken build List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 639afa4b441909f6d8fab53080730f17c6c126cc Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:01:30 +0000 Message-Id: <695c189a.3fdac.dc15eed@gitrepo.freebsd.org> The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=639afa4b441909f6d8fab53080730f17c6c126cc commit 639afa4b441909f6d8fab53080730f17c6c126cc Author: Warner Losh AuthorDate: 2025-11-27 00:04:29 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 20:01:01 +0000 ipfilter: fix broken build Every commit earns me a dozen emails that LINT is broken. This should stop that. Fixes: eda1756d0454f ipfilter: Verify frentry on entry into kernel Sponsored by: Netflix (cherry picked from commit ddec4209b10d65ef19e1d1b884e1b876eab58c7d) --- sys/netpfil/ipfilter/netinet/fil.c | 4 +--- sys/netpfil/ipfilter/netinet/ip_nat.c | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 786efca38232..b2d84ce1fefc 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -4417,9 +4417,7 @@ frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, void *ptr, *uptr; u_int *p, *pp; frgroup_t *fg; - char *group, *name; - size_t v_fr_size, v_element_size; - int v_rem_namelen, v_fr_toend; + char *group; ptr = NULL; fg = NULL; diff --git a/sys/netpfil/ipfilter/netinet/ip_nat.c b/sys/netpfil/ipfilter/netinet/ip_nat.c index 4c7ede89d30e..2ca0fee2606d 100644 --- a/sys/netpfil/ipfilter/netinet/ip_nat.c +++ b/sys/netpfil/ipfilter/netinet/ip_nat.c @@ -982,9 +982,6 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, int interr_tbl[3] = { 60077, 60081, 60078 }; ipnat_t *nat, *nt, *n; ipnat_t natd; - char *name; - size_t v_in_size, v_element_size; - int v_rem_namelen, v_in_toend; SPL_INT(s); #if !SOLARIS && defined(_KERNEL) From nobody Mon Jan 5 20:01:31 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQDD5lVyz6MyFv for ; Mon, 05 Jan 2026 20:01:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQDD18wNz3Fnh for ; Mon, 05 Jan 2026 20:01:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643292; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UB6herDoheGqrvn2sxudjiJ+nj1NL632ADBSlMgVOng=; b=rQE02ATP1IsId++NUzVeDaFI95HOZ8nRkRXyp2wB28x6TXkM7Ru6CHQQDUCrynIWg28J1H snEYSuc5JMbaxDtr5gu8UdvcIDY+Pg8CHskm8kWFyCzAJ9AT5L/ZsTDFtrMLHvDCyTA/+p 5INpeJInp5EEk//P/t0TLHLthD/k4H/HjGzpJyNwretM77C+28WDRj1hih/BIPeTAxW8d9 WOLfxJTWOWqURQB4WdPUwbsZC376UuTfI7xPLVdPe45apr60xYJpx0sNXJmgT22tKs0O1b oB9LyHtGyGDCyZ5Mqsh9xHfzeUu6qDFmxMXbLuUAzF77Ifu2SXx9KGfAWlqQvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643292; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UB6herDoheGqrvn2sxudjiJ+nj1NL632ADBSlMgVOng=; b=dAI2HqsNQtg5dksvepsZwFiv+wmCnPU+7khw5cBtS78kLLL5+wQQHMj15mwBosH0n9kTfi 1T7wklCgHYKp7wCFn/6lseDPFsoqpaF/Ld6ozQO8nB+dl3laPp9hR6IHGRLCZP0ynH9HUg ucwVT9TZPJG4K6rYNtKan5I/wUipjY304CP7bPb9jktGFzUGPqO1/KpMBheSF9Oz0NHj8V WA8Yr85RzkNimFMlG3WRNZls4ebV02NVapQ5AcTFWlvKUI5sjPiDHBV1tLXxqw+SgY1UGH LvAgTAC3PZuberc2XtKHCXSafvnedjSg0ha70YKLO16UiunKBh5vqYrP0HKX/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643292; a=rsa-sha256; cv=none; b=L7hstGbT0kWNIs+tvgciT8kM1kh24zSFlDejGmRRrklya0owazHhRaav/RuHBVsTxWBIHr LvV2ck+pW+qObBoqoZN3STkp5h5LOjsENjGEjfOfpsd0XQAW/55sTlys+d/mTCIJ+TqlYd qtNfCnZa2dhQKWHX8lYwIoWZMaYiHYZ8qnD7SZTRgKnrvjTrw2ARZ+AXk3coAPqA2YkPaV aa66fTOAVMmQo3g/LB1g6vSVJ1cJRzxc4KgUYF8dINJbWAjD14WsNabRymjYibOz/JrGfH c1CQcB3QbzMr0AtgGj0at3vA5P++6/eKaf5zXiDwEWxB2bzNxVF05P/PeIKtYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQDC6NVBzbS9 for ; Mon, 05 Jan 2026 20:01:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8590 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:01:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 36e77eafb4d3 - stable/14 - ntp: Fix buildworld with MK_OPENSSL=no List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 36e77eafb4d3eba643759d79f6355f682545917d Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:01:31 +0000 Message-Id: <695c189b.8590.5f3df59a@gitrepo.freebsd.org> The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=36e77eafb4d3eba643759d79f6355f682545917d commit 36e77eafb4d3eba643759d79f6355f682545917d Author: Cy Schubert AuthorDate: 2025-12-19 04:59:38 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 20:01:02 +0000 ntp: Fix buildworld with MK_OPENSSL=no Reported by: wosch Tested by: wosch (cherry picked from commit 2804461adfc670c78c1dcb9cab6b2191c8d486ec) --- usr.sbin/ntp/Makefile.inc | 2 +- usr.sbin/ntp/config.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.sbin/ntp/Makefile.inc b/usr.sbin/ntp/Makefile.inc index a4174bb99393..39d543c77d86 100644 --- a/usr.sbin/ntp/Makefile.inc +++ b/usr.sbin/ntp/Makefile.inc @@ -10,7 +10,7 @@ NTPDEFS= -DSYS_FREEBSD CFLAGS+= ${NTPDEFS} ${DEFS_LOCAL} ${CLOCKDEFS} .if ${MK_OPENSSL} != "no" -CFLAGS+= -DOPENSSL -DAUTOKEY +CFLAGS+= -DOPENSSL -DAUTOKEY -DUSE_OPENSSL_CRYPTO_RAND .endif WARNS?= 0 diff --git a/usr.sbin/ntp/config.h b/usr.sbin/ntp/config.h index 3d6a1364dd10..6b0ef0b6ae6a 100644 --- a/usr.sbin/ntp/config.h +++ b/usr.sbin/ntp/config.h @@ -1664,7 +1664,8 @@ typedef unsigned int uintptr_t; #define USE_FSETOWNCTTY 1 /* Use OpenSSL's crypto random functions */ -#define USE_OPENSSL_CRYPTO_RAND 1 +/* We define this in Makefile.inc instead */ +/* #undef USE_OPENSSL_CRYPTO_RAND */ /* OK to use snprintb()? */ /* #undef USE_SNPRINTB */ From nobody Mon Jan 5 20:02:51 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQFl3Zy6z6MyjZ for ; Mon, 05 Jan 2026 20:02:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQFl2H3xz3Jvx for ; Mon, 05 Jan 2026 20:02:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4BtWwoH0Fomy4+9HKi7kyKbGoMeeFcuQfQ4hUQwfFDA=; b=onBVQYApfud8gHb8BSrDIloqOBHm99mo7bE1DSV68bEL2CgwzOS9j0Ib/tytmRYg9wVIVF KO8anOo1Ir17mPunl5lKOxlS1iom2s3+1qiVZBekVWJ1mmJH6Z2VRYAbSO3HptdEBSJ33e xw6tmpHxGMujNDfpxa26D/3TrZBnCnHLv5EJ9OauBbX5i6Lbyw9GfQgEPoxKJrNE1/KsFh 9SHF2VhSOrs+s+HEMMGAfTYb+aB0g1eISFGczz77PwsQhBOWdoofjfqo5WBGVcgievjATh 5D9Y36VJMB5EIDNDDL76ml2PsZURKuS91G/VfVkLcvCq9QgC437Cw6sHC3jzOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4BtWwoH0Fomy4+9HKi7kyKbGoMeeFcuQfQ4hUQwfFDA=; b=qOUmm7PNnACSlerLvOOlxn5w2opS6cuebZbg1xUDfmxFztK0hQVq4N0RruO7k1agtiVEmQ ziK+A+aGL355bM2IWUr2UUophV7fGaU/joX61naBVsl6z1mV6nVll2cGyh8ecyImqQxrgR KVGkNM7JDxAcZskef/Eo79i5WZ2N3x8PpsEeOghjtjPpPhb7QC0LvCloTFDPQuL0Ts1Pqe tMn0DDkzeZ+/Q196gXqHl9vzID6ef2r5y12I7SvQ4RqhrTE1Ai55PfvOeRlgRsUwE/SYQZ y+A9eNmoVMvW6bdDFaaifI8gEswoOf0n1ssz7wYcXCRKYGKeNkC7GFeG2kWEwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643371; a=rsa-sha256; cv=none; b=tkRA9RefePWKS9QEw3uhOwIdNKaMwRhilCF8OuGkOYlTRy9v/c9PVhQJDFMcpPnEd6Krjd 0uDV2VTgdkMLyvX/rECA+CDJMmMiUyMPQBgKhmNsnrE59i3FjJWEqpcLS0fuN0Qe+7S8vj aqH5ys73obUvh4K93X1WDUhYTF4ovOppu3U1DBchuh2MEouvL0jRNzQuJ6E7X87RfYYBtO iW3U6bJ2JCemSyUmQV6uMI/hoCjv8gVQ3JNuCh4ILFz9DW65cJKP+3blT6oxGTJXyxJcKy 8NpohV4OOcUSATbf7tHgIYKWYoaXEkpj0a7Xa61dmRKpUrfFlBo+V+vKYirAVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQFl1m5TzbkS for ; Mon, 05 Jan 2026 20:02:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 86f5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:02:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 1b7195a16957 - stable/13 - ipfs: Fix typo in error message List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1b7195a1695745a9b3cf2977dc000d14967cf934 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:02:51 +0000 Message-Id: <695c18eb.86f5.1b4381f7@gitrepo.freebsd.org> The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=1b7195a1695745a9b3cf2977dc000d14967cf934 commit 1b7195a1695745a9b3cf2977dc000d14967cf934 Author: Cy Schubert AuthorDate: 2025-10-28 03:43:14 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 03:40:09 +0000 ipfs: Fix typo in error message MFC after: 3 days (cherry picked from commit 5ae7b106cfd4801ef5e0f69b02ad9b3ae3ccfbec) --- sbin/ipf/ipfs/ipfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ipf/ipfs/ipfs.c b/sbin/ipf/ipfs/ipfs.c index bb342cbb9319..438b53f124b9 100644 --- a/sbin/ipf/ipfs/ipfs.c +++ b/sbin/ipf/ipfs/ipfs.c @@ -579,7 +579,7 @@ int readnat(int fd, char *file) in = (nat_save_t *)malloc(ipn.ipn_dsize); if (in == NULL) { - fprintf(stderr, "nat:cannot malloc nat save atruct\n"); + fprintf(stderr, "nat:cannot malloc nat save struct\n"); goto freenathead; } From nobody Mon Jan 5 20:02:53 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQFn56gdz6Myvq for ; Mon, 05 Jan 2026 20:02:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQFn3hvwz3Jsv for ; Mon, 05 Jan 2026 20:02:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5faG4PeIe9AtcRlclQ7L1fnt97jkluJ7MJhbVbkfyy8=; b=P8CAgPlAhK6vCydkZU9OsOH5RcZMH3bf8Pztv/aGaz/ZKalLzrOafNiPfxB8L7ttMasiC5 AB7pfad/MKwntmhIfJgivKnTuohe1uU7qSc15VThjjvTuo+eXSNYgMvyRIEyJS2hZLPM79 q7DmiqDgi/l5vooKrkNF9MXLajKk1tgFJ5EjVu9HDPm2dcCDepSOBytE3sDdruZJh6qj7G fFLaKxjDxzdW4oA/wliQYNeFliNPyavkQk83r4iCN0bV3O8GOfNeWP+rH+3o0SptX2IVe7 a4cXYQRMO/SryL+RvD9O9X2XPeRJQUZOhvkAS/3yq10HXZXEUutdy0B1thM05g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5faG4PeIe9AtcRlclQ7L1fnt97jkluJ7MJhbVbkfyy8=; b=HBo6yLCkS6dMKQE4acpPVU3Wp96jSl25HXnScnXGd8874TbztHDxgT2E/ccZ5JcLCLUENL yTYG+WSU13JNC9t8CMxMSnOzVmzlIHU756hI84jc/v+pwSLaa4/v13TAf3uMOutKAW2/cv laxDHodF8RJwio9o/0CnHimNJiYLJqe7aDYAMihYuvJY55FjCcfY8+ZdSkc1q8MZ6Lp71x BUoifvJepYP9IB+0Q5vKui11YRkjUl58wptfQQlQTKb2bry/h6knz180fgxVC2693wwnyA p8i9DetdbXCHWlUfy3VAlmVhYk2t6S+GFF9axWa72WsVJnEYrqeG5f4lqEfNCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643373; a=rsa-sha256; cv=none; b=T8TuwdmUZWmRIe3tDth0ViChw7D4WEYxBJuE7XgBV9KpkiXhaxTikA56wjfAn18Ghs6yNu j7Bx/9xxYIM+S8ovFCEKs6Zdfnfy7mXYqKUhwHj87dG6SsUvgear1L5+JPRjhRmNK5UFWw yfgP8Q7zB/oaKqtz937sGMe/hps4lTPyyyqTwiiMCsAktXwdNuNy+M1MSBoTcYW30TQNHF /6Jo9nTWLehbKf1anLh16ocs3srkkzkkrNjy+FlK05bA02HYGpmgQ6vWmW+aoEcaR1hW6y s6Rii0aKhizy3yfLBIRCuzhXGDZCAleFPv5MuIDbA4FrRGGYTa6yrQyeTpfZVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQFn3GNszbwZ for ; Mon, 05 Jan 2026 20:02:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3efed by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:02:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 70eba39e8665 - stable/13 - ipfilter: Verify frentry on entry into kernel List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 70eba39e866572c987cc9d78492aa0ce7d4d35e6 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:02:53 +0000 Message-Id: <695c18ed.3efed.5dac2af1@gitrepo.freebsd.org> The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=70eba39e866572c987cc9d78492aa0ce7d4d35e6 commit 70eba39e866572c987cc9d78492aa0ce7d4d35e6 Author: Cy Schubert AuthorDate: 2025-10-29 17:23:23 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 03:40:10 +0000 ipfilter: Verify frentry on entry into kernel The frentry struct is built by ipf(8), specifically ipf_y.y when parsing the ipfilter configuration file (typically ipf.conf). frentry contains a variable length string field at the end of the struct. This data field, called fr_names, may contain various text strings such as NIC names, destination list (dstlist) names, and filter rule comments. The length field specifies the length of fr_names within the frentry structure and fr_size specifies the size of the frentry structure itself. The upper bound limit to the length of strings field is controlled by the fr_max_namelen sysctl/kenv or the max_namelen ipfilter tuneable. The initial concepts were discussed with emaste and jrm. Reported by: Ilja Van Sprundel Reviewed by: markj MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53843 (cherry picked from commit eda1756d0454f9383940dc825cf571ff67e0c013) --- sbin/ipf/libipf/interror.c | 5 +++ sys/netpfil/ipfilter/netinet/fil.c | 61 +++++++++++++++++++++++++++++++-- sys/netpfil/ipfilter/netinet/ip_fil.h | 1 + sys/netpfil/ipfilter/netinet/mlfk_ipl.c | 1 + 4 files changed, 66 insertions(+), 2 deletions(-) diff --git a/sbin/ipf/libipf/interror.c b/sbin/ipf/libipf/interror.c index ecb813aec853..1fe58fd56197 100644 --- a/sbin/ipf/libipf/interror.c +++ b/sbin/ipf/libipf/interror.c @@ -177,6 +177,11 @@ static ipf_error_entry_t ipf_errors[] = { { 149, "object size validation failed for kernel copyout" }, { 150, "error copying data out for kernel copyout" }, { 151, "version mismatch for kernel copyout" }, + { 152, "fr_names offset is wrapped negative" }, + { 153, "fr_names larger than fr_namelen" }, + { 154, "frentry larger than fr_size" }, + { 155, "frentry and fr_namelen mismatch fr_size" }, + { 156, "fr_namelen too large" }, /* -------------------------------------------------------------------------- */ { 10001, "could not find token for auth iterator" }, { 10002, "write permissions require to add/remove auth rule" }, diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index e152fa23c83c..545ef657217d 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -367,6 +367,10 @@ static ipftuneable_t ipf_main_tuneables[] = { "ip_timeout", 1, 0x7fffffff, stsizeof(ipf_main_softc_t, ipf_iptimeout), 0, NULL, ipf_settimeout }, + { { (void *)offsetof(ipf_main_softc_t, ipf_max_namelen) }, + "max_namelen", 0, 0x7fffffff, + stsizeof(ipf_main_softc_t, ipf_max_namelen), + 0, NULL, NULL }, #if defined(INSTANCES) && defined(_KERNEL) { { (void *)offsetof(ipf_main_softc_t, ipf_get_loopback) }, "intercept_loopback", 0, 1, @@ -4403,7 +4407,8 @@ int frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, int set, int makecopy) { - int error = 0, in, family, need_free = 0; + int error = 0, in, family, need_free = 0, interr, i; + int interr_tbl[3] = { 152, 156, 153}; enum { OP_ADD, /* add rule */ OP_REM, /* remove rule */ OP_ZERO /* zero statistics and counters */ } @@ -4412,7 +4417,9 @@ frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, void *ptr, *uptr; u_int *p, *pp; frgroup_t *fg; - char *group; + char *group, *name; + size_t v_fr_size, v_element_size; + int v_rem_namelen, v_fr_toend; ptr = NULL; fg = NULL; @@ -4427,6 +4434,17 @@ frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, IPFERROR(6); return (EINVAL); } + if (fp->fr_size < sizeof(frd)) { + return (EINVAL); + } + if (sizeof(frd) + fp->fr_namelen != fp->fr_size ) { + IPFERROR(155); + return (EINVAL); + } + if (fp->fr_namelen < 0 || fp->fr_namelen > softc->ipf_max_namelen) { + IPFERROR(156); + return (EINVAL); + } KMALLOCS(f, frentry_t *, fp->fr_size); if (f == NULL) { IPFERROR(131); @@ -4453,6 +4471,44 @@ frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, fp->fr_ptr = NULL; fp->fr_ref = 0; fp->fr_flags |= FR_COPIED; + + for (i = 0; i <= 3; i++) { + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_ifnames[i])) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } + } + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_comment)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_group)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_grhead)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_tif.fd_name)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_rif.fd_name)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } + if ((interr = ipf_check_names_string(fp->fr_names, fp->fr_namelen, fp->fr_dif.fd_name)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto donenolock; + } } else { fp = (frentry_t *)data; if ((fp->fr_type & FR_T_BUILTIN) == 0) { @@ -9044,6 +9100,7 @@ ipf_main_soft_create(void *arg) #endif softc->ipf_minttl = 4; softc->ipf_icmpminfragmtu = 68; + softc->ipf_max_namelen = 128; softc->ipf_flags = IPF_LOGGING; #ifdef LARGE_NAT diff --git a/sys/netpfil/ipfilter/netinet/ip_fil.h b/sys/netpfil/ipfilter/netinet/ip_fil.h index 92935689e0c4..821d63664859 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil.h +++ b/sys/netpfil/ipfilter/netinet/ip_fil.h @@ -1531,6 +1531,7 @@ typedef struct ipf_main_softc_s { int ipf_pass; int ipf_minttl; int ipf_icmpminfragmtu; + int ipf_max_namelen; int ipf_interror; /* Should be in a struct that is per */ /* thread or process. Does not belong */ /* here but there's a lot more work */ diff --git a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c index 762870bfc820..0edaf666ecd8 100644 --- a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c +++ b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c @@ -135,6 +135,7 @@ SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_running, CTLFLAG_RD, SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_chksrc, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_chksrc), 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_minttl), 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, large_nat, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &VNET_NAME(ipfmain.ipf_large_nat), 0, "large_nat"); +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_max_namelen, CTLFLAG_RWTUN, &VNET_NAME(ipfmain.ipf_max_namelen), 0, "max_namelen"); #define CDEV_MAJOR 79 #include From nobody Mon Jan 5 20:02:52 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQFm6xgtz6MyXq for ; Mon, 05 Jan 2026 20:02:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQFm3BXGz3JfY for ; Mon, 05 Jan 2026 20:02:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Smauy569BZ+JFoUorgov+Sw/6yd994BpGF9sig+IWu8=; b=l4bK1X4JuXgZaNFF7VIX/+dRo8QqO1nbzQIkrq8OE2roW0S0e593mXAYVtBzHB/5cB+F62 WYMMUV2ymRcQVBmdMOen+biPwzUYRaqA5dD6OSkvlE3kXWlT6Qz0sPbJBZVfwkx9TGS33V N7d6vvz/DUo6huVqcQ6gyE8ycNoR41TO0a5Awrl1jZDUe/miK6boao3HKcQUuG2XiX//NQ Zqc9QNt5Y6l3NImR8L3qXDT0h5QrUCpTEP2poiWiKz6p4ap42R6/XI8EEhBn10OL/n4MOP JSTZj1ZbPtRNHsXRj+gz2/tvMTi0V2cO/vmQThwzY0XWf8mtA/j7JaElY7PA4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Smauy569BZ+JFoUorgov+Sw/6yd994BpGF9sig+IWu8=; b=prFLNGgK4jdos+r73UIHQWUTIF501XhtyGRLYCbYVqeQ2slEu1hTrf4NynYl7S54yNmMaE 3v2u5Xj6IIvHhZ2ZOYH3hlpmRH9/xxFLs1rF9t5EoeMvJ/1z+riB/l9vqJNaTvHVOjPqKl lhnl237IH2WjB7m7IjuxklWLX2GWsa9m6tjfkHfXfcTUpvgKzwdBhQt/sJSsrqWhZclfW9 jfaP8vf7RyyJCQS0SqjyEwryl+MKDOX8KTgvwFELEfjjSx33O2fy/5MoTTFixJgBs4BOX9 hawZQxsiVJ9/Xvz6hA/qPEwTm9Ci1qccWp4qzr+hRwWbd9d7jHfuc5mQ+OkFag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643372; a=rsa-sha256; cv=none; b=Fj3S7qjs0sxGrO2e1wkRTrM/nH88567k4mcQnsrtISkrAktClttz16jQu+sUA1W/nqzdJT m1duMJLxhr7fe0GPxZHlJXikmSicBFUH1rH4m6ldHJDGce+IRHchs62J3j1YgiI2uyLSEz H6tr1kiyjOR+xaBYGiUxvdsb1fUI6FJPRt6eAuLek0LF2u2t67lEDUKTazZ1TZ8s+ByN0a rVYZgxD3Nlj0j8u/CjKMM2q94nbnTDAPGTKRSFQ+C+qmeLDlEFwKzVVdZRfVvGZI3O1P9l gPWCbW1Slo+hqM9mGbe7lCijlQQ8s29VZwfVWmIij7L0BiqgYzG3dmlq3SeUcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQFm2W88zbj3 for ; Mon, 05 Jan 2026 20:02:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f2e5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:02:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 01bf278bd92e - stable/13 - ipfilter: Add ipf_check_names_string() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 01bf278bd92e9b809bc15cd5d68201f426d5b208 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:02:52 +0000 Message-Id: <695c18ec.3f2e5.4bb38c4a@gitrepo.freebsd.org> The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=01bf278bd92e9b809bc15cd5d68201f426d5b208 commit 01bf278bd92e9b809bc15cd5d68201f426d5b208 Author: Cy Schubert AuthorDate: 2025-11-18 19:23:06 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 03:40:10 +0000 ipfilter: Add ipf_check_names_string() ipf_check_names_string will verify userland inputs in names strings (fr.fr_names, in.in_names) for correctness. Original concept of ipf_check_names_string() instead of macros by markj. Reviewed by: markj MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53843 (cherry picked from commit 525c535d5aa87f686dcfee620619827f7c6090db) --- sys/netpfil/ipfilter/netinet/fil.c | 31 +++++++++++++++++++++++++++++++ sys/netpfil/ipfilter/netinet/ip_fil.h | 1 + 2 files changed, 32 insertions(+) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index ce96558fe99a..e152fa23c83c 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -9955,3 +9955,34 @@ ipf_inet6_mask_del(int bits, i6addr_t *mask, ipf_v6_masktab_t *mtab) ASSERT(mtab->imt6_max >= 0); } #endif + +/* ------------------------------------------------------------------------ */ +/* Function: ipf_check_names_string */ +/* Returns: int - 0 == success */ +/* - 1 == negative offset */ +/* - 2 == offset exceds namelen */ +/* - 3 == string exceeds the names string */ +/* Parameters: names - pointer to names string */ +/* namelen - total length of names string */ +/* offset - offset into names string */ +/* */ +/* Validate the names string (fr_names for ipfilter, in_names for ipnat). */ +/* ------------------------------------------------------------------------ */ +int +ipf_check_names_string(char *names, int namelen, int offset) +{ + const char *name; + size_t len; + + if (offset == -1) + return (0); + if (offset < 0) + return (1); + if (offset > namelen) + return (2); + name = &names[offset]; + len = strnlen(name, namelen - offset); + if (len == namelen - offset) + return (3); + return (0); +} diff --git a/sys/netpfil/ipfilter/netinet/ip_fil.h b/sys/netpfil/ipfilter/netinet/ip_fil.h index 7343fd079564..92935689e0c4 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil.h +++ b/sys/netpfil/ipfilter/netinet/ip_fil.h @@ -1861,5 +1861,6 @@ extern int ipf_ht_node_del(host_track_t *, int, i6addr_t *); extern void ipf_rb_ht_flush(host_track_t *); extern void ipf_rb_ht_freenode(host_node_t *, void *); extern void ipf_rb_ht_init(host_track_t *); +extern int ipf_check_names_string(char *, int, int); #endif /* __IP_FIL_H__ */ From nobody Mon Jan 5 20:02:54 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQFq1pPzz6MyXr for ; Mon, 05 Jan 2026 20:02:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQFp4TBtz3JwZ for ; Mon, 05 Jan 2026 20:02:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0ocj1DyUh3+86oXcribbrpJ+fl8+jdA6Sg3u3V7Lovs=; b=wjJ6hXt67gaBR1uRxqPvQSCNNm3eEZENgiMZ+PlE0/b2YZgbpOeiOhNvJGPe6Kkeg7EkQl G3ysTyFlVB99YDUmzcyBUGVzK5UuncisnvSoU4dk6vC58vJldgoDjbpjpY6bS3eyRSiIKE z6bQy1ek88tesqfqBS/JGTdEvTMjb0spAqUr/GFJdUxmsqMvXLoRpRL8IE0clXi66lnPVk md+HZfDwiJMqR1PHxbpYDRTrBaxSEKt4o3aIgNJoG9KjgzKNceyyL2M21drH5V178iiiUd b2l8mZ+phL6bxqX9UMdapEbDee1+CqTTf4ET3nBXKDnNlK3M1boPBNrVT/gw3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0ocj1DyUh3+86oXcribbrpJ+fl8+jdA6Sg3u3V7Lovs=; b=ngr5mOwBBnqyz6reboTXELjWyFcdoitzaf2sdlG4phaGhfF/TiCo5kdSKEiByofqjaGv5i QfQp7XU09mZxYdwvADE580lSdSOYfwM3wBRVV7QY4A1oBaDUsvZHgRr4Y1SAIVlCE/oMKL ALtu4oStBPIC7sf7oM3zBqAluU0C8LqftGanFi7jBwrnLqEDBTf5777eeNDKUGw0SlgEv5 Vgrdy6nkQe6szCChN1zliJQFXaEd2mjmH0mtwLPGh2BONdq2odlMTSNZvSztDufNx1WehC VPZRJwWrA7xoZZqgvyTOi+BQ4Tk4VKy2xRFHR+N5mNqLnK2/v+fYNEsVRGOcOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643374; a=rsa-sha256; cv=none; b=Ec+6sTbntdcd3sjnBW/nzf31Wl+nZSsq5h+RLxoEbp0tF+s42Ck3TyIx759dgnX9DSszVT X83LVMRy3y9GcHBl2QR2DHwoPvVMVj1nU2hhxBjO/U9EFa04XR7vtSp3SURhFospIpWDkm doU9VjiaeY/JSuNESolQ6yQETEGD2ZNHh+s+Y0LVD8e3+QfWpmuS4c+rcpVmLI8mfDwis3 La1ffgnDoXw4HTJXRrGh+9cvCApED9LLgrcdyi/oxnhgb91BMYLqm17LUSPyiqZ+2EXpTh epSAywqkv5f6/AMQIV13gar9itkDbvMx3qOwgUjTRbDZTw5gDOxK6xYp7xUriQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQFp445Pzbj5 for ; Mon, 05 Jan 2026 20:02:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fea2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:02:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 75fbf1d27b6d - stable/13 - ipfilter: Verify ipnat on entry into kernel List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 75fbf1d27b6d00fb12e22b41d22b43c4279fd77d Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:02:54 +0000 Message-Id: <695c18ee.3fea2.30274ce6@gitrepo.freebsd.org> The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=75fbf1d27b6d00fb12e22b41d22b43c4279fd77d commit 75fbf1d27b6d00fb12e22b41d22b43c4279fd77d Author: Cy Schubert AuthorDate: 2025-11-03 04:59:15 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 03:40:10 +0000 ipfilter: Verify ipnat on entry into kernel The ipnat struct is built by ipnat(8), specifically ipnat_y.y when parsing the ipnat configuration file (typically ipnat.conf). ipnat contains a variable length string field at the end of the struct. This data field, called in_names, may contain various text strings such as NIC names. There is no upper bound limit to the length of strings as long as the in_namelen length field specifies the length of in_names within the ipnat structure and in_size specifies the size of the ipnat structure itself. Reported by: Ilja Van Sprundel Reviewed by: markj MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53843 (cherry picked from commit 821774dfbdaa12ef072ff7eaea8f9966a7e63935) --- sbin/ipf/libipf/interror.c | 6 +++++ sys/netpfil/ipfilter/netinet/ip_nat.c | 42 ++++++++++++++++++++++++++++++++++- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/sbin/ipf/libipf/interror.c b/sbin/ipf/libipf/interror.c index 1fe58fd56197..5619b24200d7 100644 --- a/sbin/ipf/libipf/interror.c +++ b/sbin/ipf/libipf/interror.c @@ -363,6 +363,12 @@ log" }, { 60074, "unknown next address type (ipv6)" }, { 60075, "one object at a time must be copied" }, { 60076, "NAT ioctl denied in jail without VNET" }, + { 60077, "in_names offset is wrapped negative" }, + { 60078, "in_names larger than in_namelen" }, + { 60079, "ipnat larger than in_size" }, + { 60080, "ipnat and in_namelen mismatch in_size" }, + { 60081, "ip_names runs off the end of ipnat" }, + { 60082, "in_namelen too large" }, /* -------------------------------------------------------------------------- */ { 70001, "incorrect object size to get pool stats" }, { 70002, "could not malloc memory for new pool node" }, diff --git a/sys/netpfil/ipfilter/netinet/ip_nat.c b/sys/netpfil/ipfilter/netinet/ip_nat.c index 8b343acf1211..1bad910d1db1 100644 --- a/sys/netpfil/ipfilter/netinet/ip_nat.c +++ b/sys/netpfil/ipfilter/netinet/ip_nat.c @@ -978,9 +978,13 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, int mode, int uid, void *ctx) { ipf_nat_softc_t *softn = softc->ipf_nat_soft; - int error = 0, ret, arg, getlock; + int error = 0, ret, arg, getlock, interr, i; + int interr_tbl[3] = { 60077, 60081, 60078 }; ipnat_t *nat, *nt, *n; ipnat_t natd; + char *name; + size_t v_in_size, v_element_size; + int v_rem_namelen, v_in_toend; SPL_INT(s); #if !SOLARIS && defined(_KERNEL) @@ -1031,6 +1035,16 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, error = EINVAL; goto done; } + if (sizeof(natd) + natd.in_namelen != natd.in_size) { + IPFERROR(60080); + error = EINVAL; + goto done; + } + if (natd.in_namelen < 0 || natd.in_namelen > softc->ipf_max_namelen) { + IPFERROR(60082); + error = EINVAL; + goto done; + } KMALLOCS(nt, ipnat_t *, natd.in_size); if (nt == NULL) { IPFERROR(60070); @@ -1045,6 +1059,32 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, nat = nt; } + /* + * Validate the incoming ipnat_t. + */ + if ((interr = ipf_check_names_string(nat->in_names, nat->in_namelen, nat->in_ifnames[0])) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto done; + } + if (nat->in_ifnames[0] != nat->in_ifnames[1]) { + if ((interr = ipf_check_names_string(nat->in_names, nat->in_namelen, nat->in_ifnames[1])) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto done; + } + } + if ((interr = ipf_check_names_string(nat->in_names, nat->in_namelen, nat->in_plabel)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto done; + } + if ((interr = ipf_check_names_string(nat->in_names, nat->in_namelen, nat->in_pconfig)) != 0) { + IPFERROR(interr_tbl[interr-1]); + error = EINVAL; + goto done; + } + /* * For add/delete, look to see if the NAT entry is * already present From nobody Mon Jan 5 20:02:55 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQFr1bJFz6Myvx for ; Mon, 05 Jan 2026 20:02:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQFq5FV7z3K91 for ; Mon, 05 Jan 2026 20:02:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pW61n3B1wccQn3blxxLhE1KsuRabGPt7CwnafbTXUlA=; b=RYg7L1P8ZqiyEcdlCk9hFqeei1BwiRKa0NV8cs8J+L8gSsmhPK86cGHUGL/Bo7yEcKjvlo FZ9SSoWaDBl/P1oRvSq6s2IZEhHXL9jZ4v6ltz3Qnfvlz+OBJF+40Fn1Cjvnk+GgP8ZUJ/ Qvy5RegvruU2NXxqs5zaBMPl991qqYsM/Yu7X9Y4yofatXhkJ56/1g+dJFqXU2EtdcfdaI SsuEgAtgW04LwoO/x8mJbAjYVwClSBOWIJc5bxk2uO8Izcvgo/NAgQS5yI5OLC923tOeYT HcpOrPODCAgrpak6CvzplguS048h3u7jC1rBcH4nrimG7QCSbaPc8kCrlDnocQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pW61n3B1wccQn3blxxLhE1KsuRabGPt7CwnafbTXUlA=; b=jBw7CknxhWuStlqr7nmS70Ixc106jZXvkTVV/IwKq+kHF5rb6eGG7gv6u92akRzfOsQRHY dhNnWYN+M3JNnuZ1X280oIpHHcOQRJ4pMDP+fiLoFnQqb1swVOGziEdEHTFBFFR0D/jOOk q0S26ezAr4OZmZqEdjwIg/SuC4zyO3Sz0kq4JTOlsK7Sucb5zAEOnwtUx1CskFi4wAjcbZ k5mA3B1RYOrgbfauObzIKmkV8MR8y+dmAMSPdcpA+T5ZpZugoojuteKpRKHzVd+6ePxAsq WY33fk2llOoTU9w36alVtqC0ENk/S50bwywbbTOVMlw9+s1wR9B3Gtt1aMtZmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643375; a=rsa-sha256; cv=none; b=kDMASCTzVzhvr72Za1tx+QwLC/F2PlKUZovZiozV0XlkXGzWkaU7eke7niSb2ovd8I9+Rw a0e9ozEk3BNWfbFiV7a/3j0M9Ui5G+2WqgN59csISknMoxjVGdyv3ERQ4tN1CCCTy/DLHJ kFMyB+UwJ8gGPUmlYGr4JSqEARnC7xXjrUi+y4cKYMQaI+5uOcfGG74GdSqscuXijdnu57 KJxFaavyP2e1Gm2sNc8ITxc41M/AcQ2YM1x21QJBVwRWBA4HLouMywHC18hdkkSOf2wJcQ lKD7Yati0R+9wK9GISnhjWq3kXmGgFArdAFFnnE0BhAJBnGAxiwLwi3VNaDnXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQFq4hlLzbj6 for ; Mon, 05 Jan 2026 20:02:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fe21 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:02:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 27b1e9d16f30 - stable/13 - ipfilter: Remove unused variable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 27b1e9d16f30b441259f90e449d87f0fc9594854 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:02:55 +0000 Message-Id: <695c18ef.3fe21.650744b3@gitrepo.freebsd.org> The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=27b1e9d16f30b441259f90e449d87f0fc9594854 commit 27b1e9d16f30b441259f90e449d87f0fc9594854 Author: Cy Schubert AuthorDate: 2025-11-26 23:24:17 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 03:40:10 +0000 ipfilter: Remove unused variable Reported by: jlduran Fixes: eda1756d0454, 821774dfbdaa MFC after: 1 week X-MFC with: eda1756d0454, 821774dfbdaa (cherry picked from commit 20c48f090b270d0124d5f0b31c6f3a639efbbc80) --- sys/netpfil/ipfilter/netinet/fil.c | 2 +- sys/netpfil/ipfilter/netinet/ip_nat.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 545ef657217d..5161e6472a60 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -4407,7 +4407,7 @@ int frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, int set, int makecopy) { - int error = 0, in, family, need_free = 0, interr, i; + int error = 0, in, family, need_free = 0, interr; int interr_tbl[3] = { 152, 156, 153}; enum { OP_ADD, /* add rule */ OP_REM, /* remove rule */ diff --git a/sys/netpfil/ipfilter/netinet/ip_nat.c b/sys/netpfil/ipfilter/netinet/ip_nat.c index 1bad910d1db1..4a2f9ec05479 100644 --- a/sys/netpfil/ipfilter/netinet/ip_nat.c +++ b/sys/netpfil/ipfilter/netinet/ip_nat.c @@ -978,7 +978,7 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, int mode, int uid, void *ctx) { ipf_nat_softc_t *softn = softc->ipf_nat_soft; - int error = 0, ret, arg, getlock, interr, i; + int error = 0, ret, arg, getlock, interr; int interr_tbl[3] = { 60077, 60081, 60078 }; ipnat_t *nat, *nt, *n; ipnat_t natd; From nobody Mon Jan 5 20:02:56 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQFs0tLbz6MybY for ; Mon, 05 Jan 2026 20:02:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQFr68Q0z3K28 for ; Mon, 05 Jan 2026 20:02:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=faPAdAK3Ma6dBdiub0VPxW5n2KZRKaqpdhwzTp+xLvQ=; b=If8VLHBOHpH5+V1RPCI8/62SPrzwbB0SszhxgvP49l8UsxNmXOJoWdmJa/YqhvaPUWDd1P zR/FPG2V6STzqz9ec4feSBXaKbqp3Rg/IPklPqW/kvJfm/SaqAX3f9Eexm72W1+whnopj7 gr1yQ6dZs5faTgSN3ApO2SqiskHIxKCkMc9AG2WXD7FIjtt9UoPv258TNaogwVzcjpy+mn kPjchxuHx8tpagmEpw3TwpkAxuTlKjsq0ma9Ay9p3NUK0ibV2qlzl+RKwFlsPqbnzD6ss1 nD8QVJqtb8xPXGt0pjO62gWJhwxRfwnJzhrt13UxMKT7euwzIYEui7XzM7slYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=faPAdAK3Ma6dBdiub0VPxW5n2KZRKaqpdhwzTp+xLvQ=; b=WBlDdmFf8JLdX2hgSJ/VXDxFcObpojlsm5IRdITz/gtlNzS3nma6cX7AI/HSb6hJhNYDvd sQvLveXHxk3xnkb6Zb0TO1C/YljcemCRmMPOr4dT/Xwjn5EzgEB/q71XenGtc5cvYSUTEW YKn4bZB47QlAF+OhAilKR96LTPd9pRneMx4Ua3ya42ktDlyVNcVi5M76xzvDOhT9yh4wqI 50RobfRyKz0mEZ2/JUTxK8JQP+hGuZNkbZycypUR+gWXKXQ/Lm4/CMIwBXl8xHZGosQpFl XpRM/IHMz/G+N7RKuartK/Hf4eLoFztc1VmNF1iFwrpaazOXIDUwACW6JNM4tQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643376; a=rsa-sha256; cv=none; b=KdUGlRTh9SQ5ZA/+ut+QFpSOYe9gozcC3mPMQEt5/4shmj4Ykkz4dEVbCq1TxeRKdGL+2m XsdZ5leVUzabtwlRw0eR3c8V+N07AHBddf1tRMGMmp5/lmNuA08Gb2mdHL/jzdIT0jcBOX uQw3HukPUHKKHVj1bfxECRnYZ2YWeqany6+PiIsMm8M4S3RyhkwqCb+TxE8EPzFqCOsGgQ ARgyQAzFQScVwdYfOHB1mmTL++hH+Jzcgvyq7RIhO5666iie9RrMhsnY0avwgurE7GF2vY BdIZiGgpq0MaZZ4eDWVhociPwcLiMheNZx9FGEzgrTFeaP4dmtT3VZMOPFLPig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQFr5Shmzbj7 for ; Mon, 05 Jan 2026 20:02:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 874d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:02:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: ceda9eb20f3e - stable/13 - ipfilter: Restore used variable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ceda9eb20f3efe0cfa4a444a972b2a47fdde044c Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:02:56 +0000 Message-Id: <695c18f0.874d.38f35acf@gitrepo.freebsd.org> The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=ceda9eb20f3efe0cfa4a444a972b2a47fdde044c commit ceda9eb20f3efe0cfa4a444a972b2a47fdde044c Author: Cy Schubert AuthorDate: 2025-11-26 23:39:24 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 03:40:11 +0000 ipfilter: Restore used variable One of the "unused" i variables is actually used. Fixes: 20c48f090b27 (cherry picked from commit 78c6cfdc3dc0b84aa2daf0f32c7c9cdf3b34fee5) --- sys/netpfil/ipfilter/netinet/fil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 5161e6472a60..545ef657217d 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -4407,7 +4407,7 @@ int frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, int set, int makecopy) { - int error = 0, in, family, need_free = 0, interr; + int error = 0, in, family, need_free = 0, interr, i; int interr_tbl[3] = { 152, 156, 153}; enum { OP_ADD, /* add rule */ OP_REM, /* remove rule */ From nobody Mon Jan 5 20:02:57 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQFt1bKLz6MybZ for ; Mon, 05 Jan 2026 20:02:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQFs6tbbz3K4v for ; Mon, 05 Jan 2026 20:02:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/xWOkilxiOpSHs6UC8PwHAuPcvzSxs3YIv0XsqCUpPE=; b=B9Xuf+kbWjCV3O/jYEpdCCY0i1OeiZ71YSEzponjGr+XfKXYu6K5sFRASLvHx4Da/eGMHy vJV+EJaK3x89pddHo1VXdX+ffyunamsyT2S3u5iNhjtmpePrGJ1PJKTQDNyaMjoXiD6pj6 x1tva9WM4bEDOs6cnnK7AItkT6RC6RlRUhgBTSAOvLAlNHGk2nICjWcAlH3dTxnVnhFKGO 3rYLI8aGaYLFe+N3+x/sUHhyrg1DsTxzw0NksSzO0GNuOmNOYOex4phAicxCE5rvH4KJkF 3QGzEisYJspfqaG7ml8TyaBiysQDTKBWALIx1f3W9DPKSl3dQfBYjHrDCUojSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/xWOkilxiOpSHs6UC8PwHAuPcvzSxs3YIv0XsqCUpPE=; b=JAM2bOaVemZkFbJ1Sc5WV6jOscSgNEommfdFJ2n7Fb2s/lupAPiIFUFXXnmRMxK6Yd8rnw aZzO/uRpd6WIzZboUSKNrG52emRO3PsPVW0yXp5Qclf8BqTdXvM1UhRmaYL7rNFLtqzZDa QQvV9Ax0eco29fDlvKFdr2CrtQDtL+/6jCLE7UZ5g7Qj/vTk99MsRk29A7PyNr3BEo5XG7 VQv/ddjGP02KWGsN2TrIcpW+I3u9MM9r5qTDNSZyX5LP3Oy0hNm+EGpjZXXtc1MSqRU0aL ziG/40efhiwXI/yF7VwtqpZBXu/L4vJNAXKX/gKTOKDVhHO/qVIWDEZTp8NmMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643378; a=rsa-sha256; cv=none; b=hJAmutgnsBqrEIm4q03QjeeHNI4uygrBKKOVXtzy/IZvW3q9QyZcgLw8fe9iOs1NQZAhWN lx0vH15GIK9CcqBPWCYaVJG9gw66fdiQXDJOIIr1UunaBpMudjE0K4MYRir2SDPsK9xhz4 uTSZGZqOJpAovwYfMw63rMer37SBupSZsGexD2+JCRWFIWKFHMeZTUUUFdrIuSQ/qAo/4E 7eTrDkv7zwM9M6oMzuC2oSCRlxoQLPjDD0EeCaIUEzCawAHm+oD9Dy0TJRhMuw1SDf4xfa qAfFke0TLrl8FJbURlmIGJvT2+uAza1fzEsBL/ApLU9VfdHUg2yeYcsuceXBWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQFs6HJzzbbw for ; Mon, 05 Jan 2026 20:02:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8309 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:02:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: e3b9f73e126e - stable/13 - ipfilter: Restrict ipfilter within a jail List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e3b9f73e126e5b75142c1efbd825da3f0944b49f Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:02:57 +0000 Message-Id: <695c18f1.8309.220dd91a@gitrepo.freebsd.org> The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=e3b9f73e126e5b75142c1efbd825da3f0944b49f commit e3b9f73e126e5b75142c1efbd825da3f0944b49f Author: Cy Schubert AuthorDate: 2025-10-29 18:29:39 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 03:40:11 +0000 ipfilter: Restrict ipfilter within a jail Add a sysctl/tunable (net.inet.ipf.jail_allowed) to control whether a jail can manage its own ipfilter rules, pools, and settings. A jail's control over its own ipfilter rules and settings may not be desireable. The default is jail access to ipfilter is denied. The host system can stil manage a jail's rules by attaching the rules, using the on keyword, limiting the rule to the jail's interface. Or the sysctl/tunable can be enabled to allow a jail control over its own ipfilter rules and settings. Implementation note: Rather than store the jail_allowed variable, referenced by sysctl(9), in a global area, storing the variable in the ipfilter softc is consistent with ipfilter's use of its softc. Discussed with: emaste, jrm MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53623 (cherry picked from commit d9788eabffa4b67fc534685fc3d9b8e3334af196) --- sbin/ipf/libipf/interror.c | 1 + sys/netpfil/ipfilter/netinet/fil.c | 1 + sys/netpfil/ipfilter/netinet/ip_fil.h | 1 + sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 15 +++++++++++++++ sys/netpfil/ipfilter/netinet/mlfk_ipl.c | 1 + 5 files changed, 19 insertions(+) diff --git a/sbin/ipf/libipf/interror.c b/sbin/ipf/libipf/interror.c index 5619b24200d7..89f1e7f9ec3c 100644 --- a/sbin/ipf/libipf/interror.c +++ b/sbin/ipf/libipf/interror.c @@ -536,6 +536,7 @@ log" }, { 130016, "finding pfil head failed" }, { 130017, "ipfilter is already initialised and running" }, { 130018, "ioctl denied in jail without VNET" }, + { 130019, "ioctl denied in jail" }, }; diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 545ef657217d..786efca38232 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -9102,6 +9102,7 @@ ipf_main_soft_create(void *arg) softc->ipf_icmpminfragmtu = 68; softc->ipf_max_namelen = 128; softc->ipf_flags = IPF_LOGGING; + softc->ipf_jail_allowed = 0; #ifdef LARGE_NAT softc->ipf_large_nat = 1; diff --git a/sys/netpfil/ipfilter/netinet/ip_fil.h b/sys/netpfil/ipfilter/netinet/ip_fil.h index 821d63664859..4bbb19c889bd 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil.h +++ b/sys/netpfil/ipfilter/netinet/ip_fil.h @@ -1552,6 +1552,7 @@ typedef struct ipf_main_softc_s { u_int ipf_icmpacktimeout; u_int ipf_iptimeout; u_int ipf_large_nat; + u_int ipf_jail_allowed; u_long ipf_ticks; u_long ipf_userifqs; u_long ipf_rb_no_mem; diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c index 89e5be506be2..a5f634247a1a 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c @@ -92,6 +92,7 @@ VNET_DEFINE(ipf_main_softc_t, ipfmain) = { .ipf_running = -2, }; #define V_ipfmain VNET(ipfmain) +#define V0_ipfmain VNET_VNET(vnet0,ipfmain) #include #include @@ -278,6 +279,20 @@ ipfioctl(struct cdev *dev, ioctlcmd_t cmd, caddr_t data, return (EPERM); } + /* + * Remember, the host system (with its vnet0) controls + * whether a jail is allowed to use ipfilter or not. + * The default is ipfilter cannot be used by a jail + * unless the sysctl allows it. + */ + if (V0_ipfmain.ipf_jail_allowed == 0) { + if (jailed(p->p_cred)) { + V_ipfmain.ipf_interror = 130019; + CURVNET_RESTORE(); + return (EOPNOTSUPP); + } + } + if (jailed_without_vnet(p->p_cred)) { V_ipfmain.ipf_interror = 130018; CURVNET_RESTORE(); diff --git a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c index 0edaf666ecd8..b11dea53029b 100644 --- a/sys/netpfil/ipfilter/netinet/mlfk_ipl.c +++ b/sys/netpfil/ipfilter/netinet/mlfk_ipl.c @@ -136,6 +136,7 @@ SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_chksrc, CTLFLAG_RW, &VNET_NAME(ipfmain.ip SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &VNET_NAME(ipfmain.ipf_minttl), 0, ""); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, large_nat, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &VNET_NAME(ipfmain.ipf_large_nat), 0, "large_nat"); SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_max_namelen, CTLFLAG_RWTUN, &VNET_NAME(ipfmain.ipf_max_namelen), 0, "max_namelen"); +SYSCTL_IPF(_net_inet_ipf, OID_AUTO, jail_allowed, CTLFLAG_RWTUN, &VNET_NAME(ipfmain.ipf_jail_allowed), 0, "jail_allowed"); #define CDEV_MAJOR 79 #include From nobody Mon Jan 5 20:02:58 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQFv4ZBnz6MyVS for ; Mon, 05 Jan 2026 20:02:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQFv0VYWz3K2Z for ; Mon, 05 Jan 2026 20:02:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lw9pmShxau3pdNDCCXyN7K8zILccoNczYtrV6od4/qA=; b=hjV6KCsmkf5tUO7RQbCejRAlf07TL4yC0rC5zZ32royWWeu0zOI2JuPh/ugsuoKEapCvQC 06b1RfnKp9cZQHI+XzphgBa/ALR8IK+B+dEs9OsUvS/vnQp9wGKFhUSDf3MAnM1WTyqfvH wMxM8LHLBfjKgRIKbkcNowsiPZzGTNyTBkIBhEino0ycsmas22xkc3vELjibQ8oi6X80sv mVvLwJL9yQe8mttDUg5weci3Ji7tc2yD57/NZST+FcdRF19dwe9QpU88JDitszmFGWUgct 1LeeTx5duXBYFv4gytpuhkUIDRPQAY/qKbeh0mZuMVU9GjX/59oigV1zikN/Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lw9pmShxau3pdNDCCXyN7K8zILccoNczYtrV6od4/qA=; b=ayPMq6ADJJbgWAZsCkCaAk4G0fcQi8xgMofoh0Z/cc7xOMTqcVH+hFnKOQcm5xTuNQRoOK Vtu3RcGZgf2qOgIa8OGNCI0Hn6+gZoJfynjvuuBL8vD7PVpKUKWwMcU4Pg5FxrCJ/R3eEn dqn2dsq8UHxtMtHAwwD7OGWLfKZ2ezPyVZYAKlVmbzOn9P1f1XBsv0tHVSArD6wjL3Jj7t bo739ii9lYS4OraRSVzdx42v4rkW9jCvGMb1gjuRwKmsbgZEJQWSgZWEtKTNGABp13rQiY tQ0wns2qRLCOO9RJc7F9RYRCbk29SjRD0k/Nj6B65olB/zVDcXA3A/VkjGVJtw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643379; a=rsa-sha256; cv=none; b=LrwcZ29K17F1YFGBG4bWsXL9kFiP4U1eE1f6Olx9Cm7iKr1piaZJUpsKxT7xgT6ZZJ5KbR 2TNlI+TPDBRtU2chnIAV6hREHBwSa4ry5oWI4bSzi0jujbiLmaP99pDuQUNGisEkDV+9/g dQEJvI/gwg3eylL5Wj1hleY5/Cb8mrFKUVTDzzh65qhdwmond/D81UR/gdeZTSlIoZ2fMZ SoosD+Qez9qiElHPHUKe3KXuj6wRtw76ME8v3k+c6wo0nuvnfvPMoYWa0TMx0fZzbDFwbq FXQA/aPDr1OSL6oaxnGue5dAzDSA2DLwKtxBU0liDVILpOnEd2JvFDkdmslZzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQFv0393zbwg for ; Mon, 05 Jan 2026 20:02:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8594 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:02:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 55ea321fe65e - stable/13 - ipfilter: Disable ipfs(8) by default List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 55ea321fe65ee438e237543c95ce7e6c0329e907 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:02:58 +0000 Message-Id: <695c18f2.8594.18a2e648@gitrepo.freebsd.org> The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=55ea321fe65ee438e237543c95ce7e6c0329e907 commit 55ea321fe65ee438e237543c95ce7e6c0329e907 Author: Cy Schubert AuthorDate: 2025-11-16 07:39:19 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 03:40:11 +0000 ipfilter: Disable ipfs(8) by default At the moment ipfs(8) is a tool that can be easily abused. Though the concept is sound the implementation needs some work. ipfs(8) should be considered experimental at the moment. This commit also makes ipfs support in the kernel optional. Reviewed by: emaste, glebius MFC after: 1 week Differential revision: https://reviews.freebsd.org/D53787 (cherry picked from commit 0ff0c19e7f70bc4d3f98196a8ad43de635cf13e5) --- sbin/ipf/Makefile | 6 +++++- share/mk/src.opts.mk | 1 + sys/conf/NOTES | 1 + sys/conf/options | 1 + sys/modules/ipfilter/Makefile | 6 ++++++ sys/netpfil/ipfilter/netinet/ip_nat.c | 5 ++++- sys/netpfil/ipfilter/netinet/ip_state.c | 4 ++++ tools/build/mk/OptionalObsoleteFiles.inc | 4 ++++ 8 files changed, 26 insertions(+), 2 deletions(-) diff --git a/sbin/ipf/Makefile b/sbin/ipf/Makefile index 32cead444f77..b64b09584b48 100644 --- a/sbin/ipf/Makefile +++ b/sbin/ipf/Makefile @@ -1,6 +1,10 @@ +.include SUBDIR= libipf .WAIT -SUBDIR+= ipf ipfs ipfstat ipmon ipnat ippool +SUBDIR+= ipf ipfstat ipmon ipnat ippool +.if ${MK_IPFILTER_IPFS} != "no" +SUBDIR+= ipfs +.endif # XXX Temporarily disconnected. # SUBDIR+= ipftest ipresend ipsend SUBDIR_PARALLEL= diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index dbc0cf31671f..6a4b03b1a8bc 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -205,6 +205,7 @@ __DEFAULT_NO_OPTIONS = \ DTRACE_TESTS \ EXPERIMENTAL \ HESIOD \ + IPFILTER_IPFS \ LIBSOFT \ LLVM_ASSERTIONS \ LLVM_BINUTILS \ diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 46800301657a..f112e2124130 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -1019,6 +1019,7 @@ options IPFILTER #ipfilter support options IPFILTER_LOG #ipfilter logging options IPFILTER_LOOKUP #ipfilter pools options IPFILTER_DEFAULT_BLOCK #block all packets by default +options IPFILTER_IPFS #enable experimental ipfs(8) support options IPSTEALTH #support for stealth forwarding options PF_DEFAULT_TO_DROP #drop everything by default options TCPDEBUG diff --git a/sys/conf/options b/sys/conf/options index a62380b1efe2..9d1942f266fc 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -430,6 +430,7 @@ IPFILTER opt_ipfilter.h IPFILTER_DEFAULT_BLOCK opt_ipfilter.h IPFILTER_LOG opt_ipfilter.h IPFILTER_LOOKUP opt_ipfilter.h +IPFILTER_IPFS opt_ipfilter.h IPFIREWALL opt_ipfw.h IPFIREWALL_DEFAULT_TO_ACCEPT opt_ipfw.h IPFIREWALL_NAT opt_ipfw.h diff --git a/sys/modules/ipfilter/Makefile b/sys/modules/ipfilter/Makefile index 8303cbba9c1a..ea3b44d0501c 100644 --- a/sys/modules/ipfilter/Makefile +++ b/sys/modules/ipfilter/Makefile @@ -1,3 +1,4 @@ +.include .PATH: ${SRCTOP}/sys/netpfil/ipfilter/netinet @@ -10,6 +11,11 @@ SRCS+= opt_bpf.h opt_inet6.h CFLAGS+= -I${SRCTOP}/sys/netpfil/ipfilter CFLAGS+= -DIPFILTER=1 -DIPFILTER_LKM -DIPFILTER_LOG -DIPFILTER_LOOKUP + +.if ${MK_IPFILTER_IPFS} != "no" +CFLAGS+= -DIPFILTER_IPFS +.endif + # # If you don't want log functionality remove -DIPFILTER_LOG # diff --git a/sys/netpfil/ipfilter/netinet/ip_nat.c b/sys/netpfil/ipfilter/netinet/ip_nat.c index 4a2f9ec05479..443e9d49355a 100644 --- a/sys/netpfil/ipfilter/netinet/ip_nat.c +++ b/sys/netpfil/ipfilter/netinet/ip_nat.c @@ -1344,6 +1344,7 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, error = ipf_proxy_ioctl(softc, data, cmd, mode, ctx); break; +#ifdef IPFILTER_IPFS case SIOCSTLCK : if (!(mode & FWRITE)) { IPFERROR(60015); @@ -1379,6 +1380,7 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, error = EACCES; } break; +#endif /* IPFILTER_IPFS */ case SIOCGENITER : { @@ -1686,7 +1688,7 @@ ipf_nat_siocdelnat(ipf_main_softc_t *softc, ipf_nat_softc_t *softn, ipnat_t *n, } } - +#ifdef IPFILTER_IPFS /* ------------------------------------------------------------------------ */ /* Function: ipf_nat_getsz */ /* Returns: int - 0 == success, != 0 is the error value. */ @@ -2254,6 +2256,7 @@ junkput: } return (error); } +#endif /* IPFILTER_IPFS */ /* ------------------------------------------------------------------------ */ diff --git a/sys/netpfil/ipfilter/netinet/ip_state.c b/sys/netpfil/ipfilter/netinet/ip_state.c index e2ab064e5058..4514e77e9bb2 100644 --- a/sys/netpfil/ipfilter/netinet/ip_state.c +++ b/sys/netpfil/ipfilter/netinet/ip_state.c @@ -713,6 +713,7 @@ ipf_state_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, IPFOBJ_STATESTAT); break; +#ifdef IPFILTER_IPFS /* * Lock/Unlock the state table. (Locking prevents any changes, which * means no packets match). @@ -749,6 +750,7 @@ ipf_state_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, } error = ipf_state_getent(softc, softs, data); break; +#endif /* IPFILTER_IPFS */ case SIOCGENITER : { @@ -805,6 +807,7 @@ ipf_state_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, } +#ifdef IPFILTER_IPFS /* ------------------------------------------------------------------------ */ /* Function: ipf_state_getent */ /* Returns: int - 0 == success, != 0 == failure */ @@ -1009,6 +1012,7 @@ ipf_state_putent(ipf_main_softc_t *softc, ipf_state_softc_t *softs, return (error); } +#endif /* IPFILTER_IPFS */ /* ------------------------------------------------------------------------ */ diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 5e5d83456ce3..9bf054570106 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -2752,6 +2752,10 @@ OLD_FILES+=usr/share/man/man8/ipnat.8.gz OLD_FILES+=usr/share/man/man8/ippool.8.gz .endif +.if ${MK_IPFILTER_IPFS} == no +OLD_FILES+=sbin/ipfs +.endif + .if ${MK_IPFW} == no OLD_FILES+=etc/rc.d/ipfw OLD_FILES+=etc/periodic/security/500.ipfwdenied From nobody Mon Jan 5 20:03:00 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQFw4Kdrz6Myjq for ; Mon, 05 Jan 2026 20:03:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQFw1H6tz3JxW for ; Mon, 05 Jan 2026 20:03:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kkUxpWkq7MXXmh/L0ouJNPMeqRvMgJlZkDqdYQhA6bk=; b=SmKP9Wq2z8bM2clA0iDje8Q0H0/7PlCMy3Q4so4CY09KQlpIE+8nPS3672m+H1Gv1V8aCp rXfsSsU0dN+ek46iV/mLyzXV/EisRE7WSVyntZTD03iBomDkqrz9aKsmku0U36XbKWluKJ xa8bNqSwycrVcEEf4xQY1zvrEvALuImiRt5IKXSWIt2Z09/XPzJuwMlsyZ5o033bouwVcD Bw0f0ZDhHkdWpBxU8HX0dVnx1RFlNW4jGmG6i17Yn10hQGsVZJmilXW+ynTYnBWEN3LCCi kx7UADmGFWT60SKdbj2tcCRtYAKxYKtnuZra8RXifwRDdtR1BAadpOpGQ3q9jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kkUxpWkq7MXXmh/L0ouJNPMeqRvMgJlZkDqdYQhA6bk=; b=lK54Yz4LZpCRcTrMTu/Ev0l9156QtkNeugbt/e2CrvkIMI601ud8bQoDjzkuX0fP8XOCpa pVP6NiEBVzl0MVvNm8bQH2LoineIpVEMeZJCbYQzgJbQx+OoJ2utYQEYFq4ARqTel3+Z0w TkKQeVCeDUXJYIzEW1CluccIPrBqPTM6srl/nfac8B7ITeyM7HTKvLBMV43VhG1+8DIPi4 nAa6I67s6+CHXB+lIUtU3b4uuFWq3pGctp03pgM4W45Si9kE8MpfpAH1G1s1Q0JAEZpKm2 NbuFw+l/kjfdhY0o8+KSID1ds5UZOoCnJQF/qRJe9UXv4FE6oOOeR9kqrjXN6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643380; a=rsa-sha256; cv=none; b=Dp+EWW1XAkf5QJDae+OV5TNsgbb8igo7X2lHqYuseLDWO0Xw9AcHDb4tpNvHHExybT9oQJ rVZYfX3BxOSHh8xNXLKrphb0dEWkCKVxipSZJUABUXhVfcHJFnwxqrKHWeJU9Oqq7B1XAm uQYHiPXZv+v4TZlSwrcs897FBj75bfCZpRu4pLQ9oebROKe+MWqh1VqAuSohanWOkF8mZ+ /Mj/ET8sZp3qyenPagYg7Wgu8drh+Y3J4/kMkb1hkD5/A36ZaPdbgpTP5gpyy5ZiDxqXjJ xZUA5+IEqq4aSibW5Jq7s0LCnMNseiO6ulteZLVU6t40ilaXHlfrslmQYxxPKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQFw0l9TzbkW for ; Mon, 05 Jan 2026 20:03:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f2e9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:03:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 35d427d6d0a5 - stable/13 - ipfilter: Add missing kenv fetch List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 35d427d6d0a58644daf8e81f1b23553403c6c0bf Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:03:00 +0000 Message-Id: <695c18f4.3f2e9.5bab524@gitrepo.freebsd.org> The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=35d427d6d0a58644daf8e81f1b23553403c6c0bf commit 35d427d6d0a58644daf8e81f1b23553403c6c0bf Author: Cy Schubert AuthorDate: 2025-12-15 16:21:56 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 03:40:11 +0000 ipfilter: Add missing kenv fetch When a module the environment must be explicitly fetched. Fixes: d9788eabffa4 PR: 291548 Noted by: markj Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D54242 MFC after: 3 days (cherry picked from commit a6ea80bc917510b5e056cc5a29b62dfd7b39d068) --- sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c index a5f634247a1a..f2cbaa0bd0b0 100644 --- a/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/netpfil/ipfilter/netinet/ip_fil_freebsd.c @@ -1474,4 +1474,6 @@ ipf_fbsd_kenv_get(ipf_main_softc_t *softc) { TUNABLE_INT_FETCH("net.inet.ipf.large_nat", &softc->ipf_large_nat); + TUNABLE_INT_FETCH("net.inet.ipf.jail_allowed", + &softc->ipf_jail_allowed); } From nobody Mon Jan 5 20:03:01 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQFx5XWVz6Myw7 for ; Mon, 05 Jan 2026 20:03:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQFx2x33z3K34 for ; Mon, 05 Jan 2026 20:03:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jmJa59NLFBxSdIdk+lYT+Rn7V9l/ZdeYm6yilLPMMXU=; b=va1V6bQD3KUVntxKXvz0HKmCH0yT2zXMKYHgKHCZVIbVm/nZRXGp+ORf/L+wMaNcPnIMfl /8ly7cIbkaGriptyLEXlvjtIRpzLOfbUbo5oYqNQ+uVdcuAivZy4ExJ9y1d528vwlH614O 4k2oohFuwh2gPP1yVR0xkLrBNOd2zqGxebKnA2FnSev4ezfpmx13DZrQvFPSm7WcGsJ7lF la+o5C/0Fq/Q32oAxHPv41cLOhw1K749S6uVSbOd60YdrApHjD0fm8OQF6CnByw3UJKdUQ 5qDrxRqSi/6iep8YcHtqzfUC+ntZZYVekQkLGR0Imo4lnYD9/DGe2uJI/2qj2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jmJa59NLFBxSdIdk+lYT+Rn7V9l/ZdeYm6yilLPMMXU=; b=bv4Dw0c74UpuRU45YvJfn0SMS2WR2EvTN3lMg8OzJB0Zh2937xIrsRwdPm3rl4IPXHme8/ eXqkXw52bcLfo8Zm0jahF26MzVEC0MGUp0npMqa1nOqyHKSVUqqSVbHZU35dh4Yme4xX1c vhbllJppVoOK07m8oJ/m90p0mi3aqwIU8wVs45tXBRXGUdzQ3ZAZx6uf+kTm7i+ps2nY/c Qmg2xldRJmSHCPwshvPBNKI76GYukEui4olQDbrpsH9zLdti/l5oCwR/+ZmiYCPBTtWq9u CjfruOLcOVvu//N4AmFE0SRY6AUhUSSHWYz/6iQP6oMAr+72DDery2gSnRijpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643381; a=rsa-sha256; cv=none; b=YGJZzIALrZq8iofkLPYoxuDkrBn7oB6RrOZjQOXRjdiuFYcQKzu6lwqDp/fTqIHmYBdxWr g/Cpu0d9V8YYG9ly/Di8BnSrF8xCB4geEkORDsl+KQSpBt6S5Su/eLkXhT2UDWmSePr4LX /ZLtGvqTh6VcQyZ1IuSvnbVgjsZgryMjpFPLKHdJVTu8sgZrIgatIyFZZT9De6fwdXntlR tfZ78l4EXbn5X72ZaCk+7bQTGDVlATHtniTPegeDQ2FblgKSuoZzUtag0tC+k5WEDOG3L5 0nE1f8zHONaTt9cNof9qA0JUXUGBL5NyDI5S9xZrsqGmN0UfsqsIiOk+/PhYkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQFx1BH6zbj8 for ; Mon, 05 Jan 2026 20:03:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3eff1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:03:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Warner Losh From: Cy Schubert Subject: git: c4cc8ef864d1 - stable/13 - ipfilter: fix broken build List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c4cc8ef864d198c1011f4ed5521d2debb1443ac9 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:03:01 +0000 Message-Id: <695c18f5.3eff1.83c52aa@gitrepo.freebsd.org> The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=c4cc8ef864d198c1011f4ed5521d2debb1443ac9 commit c4cc8ef864d198c1011f4ed5521d2debb1443ac9 Author: Warner Losh AuthorDate: 2025-11-27 00:04:29 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 03:40:12 +0000 ipfilter: fix broken build Every commit earns me a dozen emails that LINT is broken. This should stop that. Fixes: eda1756d0454f ipfilter: Verify frentry on entry into kernel Sponsored by: Netflix (cherry picked from commit ddec4209b10d65ef19e1d1b884e1b876eab58c7d) --- sys/netpfil/ipfilter/netinet/fil.c | 4 +--- sys/netpfil/ipfilter/netinet/ip_nat.c | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 786efca38232..b2d84ce1fefc 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -4417,9 +4417,7 @@ frrequest(ipf_main_softc_t *softc, int unit, ioctlcmd_t req, caddr_t data, void *ptr, *uptr; u_int *p, *pp; frgroup_t *fg; - char *group, *name; - size_t v_fr_size, v_element_size; - int v_rem_namelen, v_fr_toend; + char *group; ptr = NULL; fg = NULL; diff --git a/sys/netpfil/ipfilter/netinet/ip_nat.c b/sys/netpfil/ipfilter/netinet/ip_nat.c index 443e9d49355a..d934f3e236b5 100644 --- a/sys/netpfil/ipfilter/netinet/ip_nat.c +++ b/sys/netpfil/ipfilter/netinet/ip_nat.c @@ -982,9 +982,6 @@ ipf_nat_ioctl(ipf_main_softc_t *softc, caddr_t data, ioctlcmd_t cmd, int interr_tbl[3] = { 60077, 60081, 60078 }; ipnat_t *nat, *nt, *n; ipnat_t natd; - char *name; - size_t v_in_size, v_element_size; - int v_rem_namelen, v_in_toend; SPL_INT(s); #if !SOLARIS && defined(_KERNEL) From nobody Mon Jan 5 20:03:02 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlQFz0Qqpz6MyVf for ; Mon, 05 Jan 2026 20:03:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlQFy2S9Xz3KCQ for ; Mon, 05 Jan 2026 20:03:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H0YsOavuww9NdUiG3Fe8Jzi3fs1B03XvggDEpZk5HdE=; b=mJClgqd77ZA7rA0jmJbkq6/XZCU+O0rV2xLEVOPHnQ8+bJHaUjAntommnQgYjWeeLHE/nm WqtpSpBNT5F0OLkI9aiWagmfajf0BD2R8GyYWBZzM4eO0aNAm5qFvWKImNOY/UgTeKhcMm DUcNXCJ9GLCsGViBNureZy0y1tDdGUgp3s0DFh2gzBZDEPldVNtTpjioj7BWLPAb+ZmAAR 6HQS0KU/w06tJOxs90OVLrNgphvtJzOB9SBt63iMnriCLze8OdIByWEWJwNOSd1WHi91TG 5OKcdBh5H1L9jq1s/qUrSq3+jrA01iPuXtXpdaQl/rUz4Mk5CnCTZ55MAVTbJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767643382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H0YsOavuww9NdUiG3Fe8Jzi3fs1B03XvggDEpZk5HdE=; b=qCnMxMMc6+XhF9lYKuts8aLuDhSvkjvGigyoYyiheXP1DqPB0+wrTiAu6AWeRYqCtSJAEt 6bfeN/aUC6wgO3AKsBhH6dqYfTgS/fw7ePn7O+OpWPmLy/5eKsIoCl9i9UBP37aSnr/vdJ RkY5ShgFNPZ7lBCTa5g/o2EQXREk8DdAopNnreY8GMrgdByC/ON/BXIfzDkWN93vRwwvTZ 6ehlRt/S+f/38MwJbPhqQnoVhwfFOgk9ZKxdLd9FbmuvMRXYdodkyz5ogYvfKMo3NlMJzy c74vWlNjqx3b7kqaNf6D+qROdLqbWk5yl96qe4RM3kdPImaVa8+WSaVtri+aCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767643382; a=rsa-sha256; cv=none; b=ZGh/0A+5RwFvTqcvKSBWbjFunVC+fVd7Q6sxNbl42xbjN9CIkUTkww8blOxFs0J1VzY4aF cPhJ5xCRYX+derlRmF0qU9jD8LXiyW+pZGWRcfN9BIZXCpkHhWM5gDc7U/GakaYv8vYm4K yihssSUSuAAktjyp6rJrIZ5+IfuJYEVY4wA8XGEngLLGP5kiMA4epz2C/I/EqOA80zVWrM xC58v1sX+PSXQ6a4jY8IkObuuvOYaVBL9bvI6RdKhi+V1nGsCUnR7vDloCGcyN+GrTC9Y5 utrZh9D+wQCfJ2DSSVv8Wfh68nnLbGGpm/hqrA5EY+m4xB1+P0MxFyZmNr56qQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlQFy1x6Wzbc1 for ; Mon, 05 Jan 2026 20:03:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fcff by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 05 Jan 2026 20:03:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 57f1d519e02d - stable/13 - ntp: Fix buildworld with MK_OPENSSL=no List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 57f1d519e02d60c6d50f81aa6098a04a92152ab3 Auto-Submitted: auto-generated Date: Mon, 05 Jan 2026 20:03:02 +0000 Message-Id: <695c18f6.3fcff.5e061cc5@gitrepo.freebsd.org> The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=57f1d519e02d60c6d50f81aa6098a04a92152ab3 commit 57f1d519e02d60c6d50f81aa6098a04a92152ab3 Author: Cy Schubert AuthorDate: 2025-12-19 04:59:38 +0000 Commit: Cy Schubert CommitDate: 2026-01-05 03:40:12 +0000 ntp: Fix buildworld with MK_OPENSSL=no Reported by: wosch Tested by: wosch (cherry picked from commit 2804461adfc670c78c1dcb9cab6b2191c8d486ec) --- usr.sbin/ntp/Makefile.inc | 2 +- usr.sbin/ntp/config.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/usr.sbin/ntp/Makefile.inc b/usr.sbin/ntp/Makefile.inc index a4174bb99393..39d543c77d86 100644 --- a/usr.sbin/ntp/Makefile.inc +++ b/usr.sbin/ntp/Makefile.inc @@ -10,7 +10,7 @@ NTPDEFS= -DSYS_FREEBSD CFLAGS+= ${NTPDEFS} ${DEFS_LOCAL} ${CLOCKDEFS} .if ${MK_OPENSSL} != "no" -CFLAGS+= -DOPENSSL -DAUTOKEY +CFLAGS+= -DOPENSSL -DAUTOKEY -DUSE_OPENSSL_CRYPTO_RAND .endif WARNS?= 0 diff --git a/usr.sbin/ntp/config.h b/usr.sbin/ntp/config.h index c8e918a9128b..739b99c98bcd 100644 --- a/usr.sbin/ntp/config.h +++ b/usr.sbin/ntp/config.h @@ -1668,7 +1668,8 @@ typedef unsigned int uintptr_t; #define USE_FSETOWNCTTY 1 /* Use OpenSSL's crypto random functions */ -#define USE_OPENSSL_CRYPTO_RAND 1 +/* We define this in Makefile.inc instead */ +/* #undef USE_OPENSSL_CRYPTO_RAND */ /* OK to use snprintb()? */ /* #undef USE_SNPRINTB */ From nobody Tue Jan 6 12:31:20 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlrBJ4bvdz6NZhR for ; Tue, 06 Jan 2026 12:31:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlrBJ2Wy4z3L7C for ; Tue, 06 Jan 2026 12:31:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767702680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZpxNbx2alXTm7sGT2dYS39+lA90fCCTsVVNVyNTMIL0=; b=Ra4o1UYsbFleQauH4sZe4C59tvaKTSbEol/u8DuKgFf6C83hD+GJUFTAIcSu3kSuHKTeQn 2HRaqmz+V/1pV08ozBA1xtv3o+H4fDa5Z0KeHGyfdRtE9biA4BDJMO2b9n0bBcQfqtQ9wq osMHN/MB6LBen3IltjSQUzTeF/ft9lwyVfEvthezvd5h/1c2yc6qrJR6WAf649xL0AfUIj OmyjomUWZfmehzRuWTlZlDcI4BC4RZ7UevTuGywghNmG7e/F59HhB2j2R3s/Pb3MY7j5HU x9Y+FdScGFT1SKI38DrTEVzoOPn2Fhv03OFwB0x0hppPH/FlJ2+OgHKJjGy89g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767702680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZpxNbx2alXTm7sGT2dYS39+lA90fCCTsVVNVyNTMIL0=; b=Q5CEgt9vhWsiBz6Mt8/BJjcdHpGyc3UGlc9opIjxYCt+4HOG61Ux1qiBImA6ZgLQ2cCAc2 mU0zYFRJ/bJKcbWg3iTkbzVlOnrOChGIBU0KlJ97OkuMm5D24MpVZQ/fmpK1oHhqBpKG7R GUGokVq58I7A1s/xmFWM95ukWQgqce5KrWN7ZmmmcRX0wE5kiecx5BO9c1JeY7l234ZzuB zThVLCD7bVglhsCBknhnYViOojDLuhfg5SGrA2k6uUUQ0+xzoLSmHEPklgrJN3qW+Xgmi0 O6CiEStHdzOZ/r8SLkhUeTvQkzLDvTXe6SYNnrosKVicYmnrZZ3wLXFqJNMX9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767702680; a=rsa-sha256; cv=none; b=b6PoBvzCEm16ezbYQYdrTXrxKG6aGt9p/KVmAsCbbG7Ty0diPVGJtUOV4JI8Lcu6tNaXHL oLBPfpxA0gmUgK50urxmTda4D1gRUR9LAeFqdjnyjLS9wmatt4rKQ0qDBXnSsDBK6eDbLp ynBqaTNG9aQLzf8arGHsZJ7dFhRt/pX0islRVqhzVJqHiqOW+gI+jm0uE5hoKhMk+bRhb+ M2mfL3cFBs9a3Jw5/1OnFKGmPetaujkjX7+GyFNnmXR3hGGJPDx/VAFVu8wDR0gWebqitg R8l8WVA61vQZ6BQGMOmDo5ZDjWKzE9ZpN5J4v8FqyaLWwopLNNzHwg4rSbM8nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlrBJ1jpZz16PY for ; Tue, 06 Jan 2026 12:31:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 390b8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 12:31:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: cdbf91c7a5a5 - stable/15 - bsd.sys.mk: suppress another gcc warning for libc++ List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: cdbf91c7a5a55ea139593aaf36142e865c26dfc4 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 12:31:20 +0000 Message-Id: <695d0098.390b8.18644f26@gitrepo.freebsd.org> The branch stable/15 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=cdbf91c7a5a55ea139593aaf36142e865c26dfc4 commit cdbf91c7a5a55ea139593aaf36142e865c26dfc4 Author: Dimitry Andric AuthorDate: 2026-01-02 20:29:05 +0000 Commit: Dimitry Andric CommitDate: 2026-01-06 12:30:30 +0000 bsd.sys.mk: suppress another gcc warning for libc++ Similar to base 63d1c3c43690, suppress -Wc++20-extensions for gcc. Otherwise libc++ headers will lead to many -Werror warnings, due to our use of -Wsystem-headers, which is not officially supported upstream. MFC after: 3 days (cherry picked from commit 62a7fdc13ab45b48977424ef77bbc0f11f601e39) --- share/mk/bsd.sys.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 50eb04b9fd15..8ca3fd21c616 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -241,7 +241,8 @@ CWARNFLAGS+= -Wno-error=overflow .if ${COMPILER_VERSION} >= 120100 # These warnings are raised by headers in libc++ so are disabled # globally for all C++ -CXXWARNFLAGS+= -Wno-literal-suffix \ +CXXWARNFLAGS+= -Wno-literal-suffix \ + -Wno-c++20-extensions \ -Wno-error=unknown-pragmas .endif From nobody Tue Jan 6 12:31:40 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlrBj06FSz6NZbt for ; Tue, 06 Jan 2026 12:31:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlrBh6jsjz3LbJ for ; Tue, 06 Jan 2026 12:31:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767702700; h=from:from:reply-to:subject:subject: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+kC15wu1pAp4iv/eIK+9XEyRJ/fzBELYtg2fV0W8EA=; b=IW8RxpJXMBUhRIUCPI1rOid6Caql6BGJilNmqMkewO2PJiVMNFTb6Q/lJNdQ5qqTHKnedr 1mLot3EeUYfxBWj1tLZAf39gt5Fq0kgwjIjWEUt9dHPSJqvnyJJ5XPgYJoqSOzlUJyYvzC iFajxmw1C+SXlMZUakH5H3n88E13fBZ+3EutwO8pNllypQYAX8UH0Lx1pa3rw/FDr+/DKm HZMSr6JsrFBYqoJZObCjz66Ad0nJx1Ufg1uAC+z4jXpPHh542o2iVzKQMphkUd8FYscz/r vh/9oEciXnI7tbwO7+sDNgryQMtlP0/B2QrOKk0Iod7o2xzIjiMW2G21E5P49Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767702700; h=from:from:reply-to:subject:subject: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+kC15wu1pAp4iv/eIK+9XEyRJ/fzBELYtg2fV0W8EA=; b=p8lgfDb42SPKc+TsNfffP7ak6YYOqDflDTFDfP/fSFwmp59Gf7q/zE85V0jt7inP9T6WOd t5iAuj+2BfacGLlnuOUWH/NxsRNBk1zMD49ZLmakZbH4n7sY38uRBZV/MkJAINH2WOxrFR IGbWcwMOhsxBw/yNgEHH9bFebE2D2/DHt4unXwuyWTowWfA/jU0IrNqkzqme/MxRuPjRyj Y17tFZdTp2G+PQjv2Rz/iqAUg+2VKwFGNfrW1XBUID4IyfZ4s5cSzcjQtRWm8vbc4VmKGz Mujos4reJRwHAfSLwiItdoTmqMydo4gQD0wYE8npGNlaWLlvnqDBAHBan1iSBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767702700; a=rsa-sha256; cv=none; b=V2flzDvFLSen9B3wcIQxyamE1ZvjWGnb2HikdxOs3/CS92bENQtPxkBMlsCHrsud5CBOYn O/nVaV8uexZuxzBloznjzxGeAIpWd2ITEF5wTxkBpVTogWOohgikRMbsO2pCt8nwi2B64U n8nnF0TQJTe03dcYII6Q7gQZsY8qryYprov8LC5v/+XDP17L5AKSp0KJmt1LD2Q7nnJoWC CktzjBp+hkB0nTw7tim/iWj3ce3ADHuTXNLpPo1lGbblLGI9agVxNau/WygvfH3SJex0/J mwGw6HVvL9h/GHgIWRCHXCegRUeChKnkExS/cnSKHY/SrqSvEgjhEfOzV823Jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlrBh6KkSz16Pw for ; Tue, 06 Jan 2026 12:31:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39e43 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 12:31:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: db094e82c2f7 - stable/14 - bsd.sys.mk: suppress another gcc warning for libc++ List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: db094e82c2f754251eaa1375a79175a20066e3c3 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 12:31:40 +0000 Message-Id: <695d00ac.39e43.5c70acd2@gitrepo.freebsd.org> The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=db094e82c2f754251eaa1375a79175a20066e3c3 commit db094e82c2f754251eaa1375a79175a20066e3c3 Author: Dimitry Andric AuthorDate: 2026-01-02 20:29:05 +0000 Commit: Dimitry Andric CommitDate: 2026-01-06 12:30:49 +0000 bsd.sys.mk: suppress another gcc warning for libc++ Similar to base 63d1c3c43690, suppress -Wc++20-extensions for gcc. Otherwise libc++ headers will lead to many -Werror warnings, due to our use of -Wsystem-headers, which is not officially supported upstream. MFC after: 3 days (cherry picked from commit 62a7fdc13ab45b48977424ef77bbc0f11f601e39) --- share/mk/bsd.sys.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 1b34b70504c5..157f9a7c3158 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -240,7 +240,8 @@ CWARNFLAGS+= -Wno-error=overflow .if ${COMPILER_VERSION} >= 120100 # These warnings are raised by headers in libc++ so are disabled # globally for all C++ -CXXWARNFLAGS+= -Wno-literal-suffix \ +CXXWARNFLAGS+= -Wno-literal-suffix \ + -Wno-c++20-extensions \ -Wno-error=unknown-pragmas .endif From nobody Tue Jan 6 12:31:52 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlrBw5Z1vz6NZGV for ; Tue, 06 Jan 2026 12:31:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlrBw4s0cz3Llg for ; Tue, 06 Jan 2026 12:31:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767702712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+iQGA67We2OwBHulpPxQlS7WV3t+O8ww00/cwoVVCm0=; b=P4pLsAw8wctoR51u5eK2LbYqRi6bAnFqyye/zAPYbJKliJML0l+NPlXfArXbesGbsPru49 spK4rUvvE3ygTonYjInp+ax3k9Y9Nou/QxqH2kxIMNjd5lQsjo/YkSp0BkFGX9JDmbMovA HNPUU9jOkvmSdVI3knio/LhQ7wLMKvk0hHFmY+KXemPia1ulM6NaBJwCbbwbG/DSGyGxSr Nhy5pjOTl3Gm0Z1Uq6dtLzlILoZH2wmvcknbRiMFBBS8YaOSBk5mnFqS/ZnfLhhwKst/aY +9ATZrBUJMh1vamBTVaJp71Qll3z1dMN6LCYcRIvBBZ4dNkBT6AkTacEweD+fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767702712; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+iQGA67We2OwBHulpPxQlS7WV3t+O8ww00/cwoVVCm0=; b=rb2tGWSN9KXcGOT81wJCCYzBEQ7/D/Sm4S8CSIdo995HY6Ovgvn5VEnKxjMzbgAC0mA56U A9OXLaEDboPjZCcHgSNraAXBI3Mi0RvaQdlzFBqv3xWwsYnKRjkpxwgry0T4v1ByxLztpV 1lBsYP9MWS/Ztd/W1VJtCTMLryaP5CR1Ox6vGFfDeWPALzHrqaMJ8dmVBmqA0HrHLo8dLJ 7brE73jvxHRmLd09Jdg6uq6EP/2JUyscLfUvG/101OWp6ywubXjbDUoRFXqrdAUC0MVZna CDnIq4xG/ZyghR6DKjWGPxLVnxnCvSj4qXdNruGqAM+YJThI1Ln3WdkxbQgI/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767702712; a=rsa-sha256; cv=none; b=ttHeqEeF4OhtdXPJdzAAUxPE1inzfB4Snav3WgloWOfrdA8zJn2gPDtnShmeDA7/6LPWuz tsAuJzzLJ3kSudCbpVrrm0Hjr++276JFq4nkXSnbZ0FLUpW5YEWd6C2i7wHhwCQoYx/2ut rvMej2tKAIGPLlLO102bDQPxSRNd4HVq8hevIF0OAEKuAodw2EA20N2XglBP51TEvkJ3VK m5L+jqu3/D2G1nM1SIN2bzHgVU/KedfxqIT9AHTlwEzLcV1tHIatfHxAxUlWW0+mOfv42i 93JPcZHK0RHjEOEe8Be/x74RWxUGexjUaq023kO7Xgrqc2GHTREnKXS7oxKBlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlrBw4NpYz16HJ for ; Tue, 06 Jan 2026 12:31:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39896 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 12:31:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 496fce83a59d - stable/13 - bsd.sys.mk: suppress another gcc warning for libc++ List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 496fce83a59d40a261dce57890d25148ea4e81d3 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 12:31:52 +0000 Message-Id: <695d00b8.39896.1d9e08c9@gitrepo.freebsd.org> The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=496fce83a59d40a261dce57890d25148ea4e81d3 commit 496fce83a59d40a261dce57890d25148ea4e81d3 Author: Dimitry Andric AuthorDate: 2026-01-02 20:29:05 +0000 Commit: Dimitry Andric CommitDate: 2026-01-06 12:30:57 +0000 bsd.sys.mk: suppress another gcc warning for libc++ Similar to base 63d1c3c43690, suppress -Wc++20-extensions for gcc. Otherwise libc++ headers will lead to many -Werror warnings, due to our use of -Wsystem-headers, which is not officially supported upstream. MFC after: 3 days (cherry picked from commit 62a7fdc13ab45b48977424ef77bbc0f11f601e39) --- share/mk/bsd.sys.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index e3401bb35e77..aa72d66eca94 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -244,7 +244,8 @@ CWARNFLAGS+= -Wno-error=overflow .if ${COMPILER_VERSION} >= 120100 # These warnings are raised by headers in libc++ so are disabled # globally for all C++ -CXXWARNFLAGS+= -Wno-literal-suffix \ +CXXWARNFLAGS+= -Wno-literal-suffix \ + -Wno-c++20-extensions \ -Wno-error=unknown-pragmas .endif From nobody Tue Jan 6 13:34:23 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlsb33WMGz6Ndjx for ; Tue, 06 Jan 2026 13:34:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlsb319HLz3Sr6 for ; Tue, 06 Jan 2026 13:34:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706463; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ej978+sgn1mHMNf86AXeEZhr8fihVuN3ODvzZ7P2Q8c=; b=XTzCigWbKBaHtgwtrNBgVs1xMsrAgBF/L3nhUbLlXSAvBhm/G1HHuVapce6sxvInnd8Hbx hs0X0ftIhTgijZ87N23QffshEph8FPlKH4pObn5xbFUtyej83woamHdvZr5npWTV4ztXy9 N6U3QThFpq6SL44DK+Gn2CkRfL3C6O85EEhY83zylea00uZ2Mvf1uuljffIk18zywUPtsX tGAZr2T26ZOC0eeF3eTDXcmsl7CvdqLLx1IlOAyKHPsNcbETebS5SJHWR3zyeqs5M/EPd0 wT5STnX+kI83qTZ/OuRsGIkTEDAmMGKcQJ3nAZtezUrzHCTACvUTFhGd4u5QEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706463; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ej978+sgn1mHMNf86AXeEZhr8fihVuN3ODvzZ7P2Q8c=; b=sgmD4IIFPTKIUcN4/Icu+EvwP8nylkXb4ZeFj6Zz9kwnTWWGfXrMHDgF/CXfuH4xFDUvaq CvP6Qxa7QboM6gTEFwhUBha4WJ02VKLTjr74oO3qt3wHhgHp11o4yxX1AtvOIZQyWmn1Lg C3cGOjTsAgRWL2GDUMzIj9p7t5wdn0fNZEVBZ19ApEiW++BAe1t+nWhy2AuFS4EbnKgkpW fZFNsaaVcmgh5aqQDzWPMrSkTr52+K9JPdtbPAGYH5b8x/MDKofzd/qpVczKM79CjTl+nP Ex25us4FbUrtK/E9fTy7ULHCH11zWbFmiZPxByj+tuhzOPloVGFPQJ4gaQmoQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767706463; a=rsa-sha256; cv=none; b=MqFCJch7c0vDwe36ImXOaVMDii0zmqaUBzVoN1I8KMZyfdEDu+HCs9IVUNCeVG8lCOk0XR RTZLo6CUOEaeHOgHjl59AP6hwUVkHNsmt2iAYpTJ1IKJxsTA/jhoiU763MxLgwLuZFIs+O J++i8f0b2PwpoDyXr9HO1cEsT3XpBoMG6F6b8wvifrNhv3aFBo49+EViGMQSdMzN343634 XBYaOeRtyMAQEVDeSNLtYO4DxBKlNQ7cvKxydZS5kMp9QJtpSSwgEQz6GUd1fQ8EuOhGm0 Oc38eCII5MUugXFLfXlfcs8RHQ4SoBa7+EbgfSTvNJ8GoFWGjP3F7Wyrr761Dg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlsb303tXz181n for ; Tue, 06 Jan 2026 13:34:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e660 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 13:34:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 66f43dae8c64 - stable/15 - uma_core: Rely on domainset iterator to wait on M_WAITOK List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 66f43dae8c641ceea11eabe4c9c4ffb56dd2ac98 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 13:34:23 +0000 Message-Id: <695d0f5f.3e660.10fdbe1f@gitrepo.freebsd.org> The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=66f43dae8c641ceea11eabe4c9c4ffb56dd2ac98 commit 66f43dae8c641ceea11eabe4c9c4ffb56dd2ac98 Author: Olivier Certner AuthorDate: 2025-09-08 17:37:35 +0000 Commit: Olivier Certner CommitDate: 2026-01-06 13:33:23 +0000 uma_core: Rely on domainset iterator to wait on M_WAITOK Commit 8b987a77691d ("Use per-domain keg locks.") removed the need to lock the keg entirely, replacing it with per-domain keg locks. In particular, it removed the need to hold a lock over waiting for a domain to grow free memory. Simplify the code of keg_fetch_slab() and uma_prealloc() by removing the M_WAITOK -> M_NOWAIT downgrade and the local call to vm_wait_doms() (which used to necessitate temporary dropping the keg lock) which the iterator machinery already handles on M_WAITOK (and compatibly with vm_domainset_iter_ignore() at that, although that does not matter now). Reviewed by: bnovkov, markj Tested by: bnovkov MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52441 (cherry picked from commit 781802df7a2bfe224ef17596d56cf83c49517655) --- sys/vm/uma_core.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index 679b2e20e88b..b80b5cc781f7 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -4009,21 +4009,15 @@ restart: /* * Use the keg's policy if upper layers haven't already specified a * domain (as happens with first-touch zones). - * - * To avoid races we run the iterator with the keg lock held, but that - * means that we cannot allow the vm_domainset layer to sleep. Thus, - * clear M_WAITOK and handle low memory conditions locally. */ rr = rdomain == UMA_ANYDOMAIN; + aflags = flags; if (rr) { - aflags = (flags & ~M_WAITOK) | M_NOWAIT; if (vm_domainset_iter_policy_ref_init(&di, &keg->uk_dr, &domain, &aflags) != 0) return (NULL); - } else { - aflags = flags; + } else domain = rdomain; - } for (;;) { slab = keg_fetch_free_slab(keg, domain, rr, flags); @@ -4053,13 +4047,8 @@ restart: if ((flags & M_WAITOK) == 0) break; vm_wait_domain(domain); - } else if (vm_domainset_iter_policy(&di, &domain) != 0) { - if ((flags & M_WAITOK) != 0) { - vm_wait_doms(&keg->uk_dr.dr_policy->ds_mask, 0); - goto restart; - } + } else if (vm_domainset_iter_policy(&di, &domain) != 0) break; - } } /* @@ -5245,7 +5234,7 @@ uma_prealloc(uma_zone_t zone, int items) KEG_GET(zone, keg); slabs = howmany(items, keg->uk_ipers); while (slabs-- > 0) { - aflags = M_NOWAIT; + aflags = M_WAITOK; if (vm_domainset_iter_policy_ref_init(&di, &keg->uk_dr, &domain, &aflags) != 0) panic("%s: Domainset is empty", __func__); @@ -5266,7 +5255,8 @@ uma_prealloc(uma_zone_t zone, int items) break; } if (vm_domainset_iter_policy(&di, &domain) != 0) - vm_wait_doms(&keg->uk_dr.dr_policy->ds_mask, 0); + panic("%s: Cannot allocate from any domain", + __func__); } } } From nobody Tue Jan 6 13:34:24 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlsb444pHz6Ndb2 for ; Tue, 06 Jan 2026 13:34:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlsb4224mz3Sr8 for ; Tue, 06 Jan 2026 13:34:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sEECbDIFqb6hRKQY8ewHTFXqAKIew2LM+Attor6W4Nk=; b=h0srzq3p0S3o7fl/h4WeJEDtvk6Saq1qYE2vfJFMp/zAr7hrAyDxbOeDkgd1YivdygdvZX MEjje2EPgTPxKoKvEJ7ZYtEfAKe9G8PIwMR2JluQ9RwI9jqsQryElh2M2bYRzyurxJd50Z WzZQbypenag/LGPIOluFBMvMMdmNXIgJlP82Q0kDNlHnjK4+sFk7ik9E4MbroGrf3/qEgR 3ZJnWyaVExuNnLr2mqRUoeR1JcT3HifptjPh88vqtnI0a6ln2GaMgCZ4lbiIBuWJ7mP2Wp EikajhnWf9f2S5iJj2EYOLC1DzTjQ4myIBOAfOWuaYoNv/Zmfh8RhG3RI1Kfyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706464; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sEECbDIFqb6hRKQY8ewHTFXqAKIew2LM+Attor6W4Nk=; b=JatzsTPuOA4O6WLM7PE07mDzWE4Xk5uLn8rdfdjB9x1lBt5vnop8MVcfloJN5aVZin+RJA wtxMhhBF5/lldSh6olyyq4A17+TLI79nG0zn2TRg6sBPZB+MQe5Sr7p/JD0rSKQRLlkvhW b++GaHkEZrNyS/s78/oRkdVngRl5m8VqtNx2XP4OhDU3rV0Is0tbg7yQw1CRKyNvzM8cV6 2qPrjegGTUCuHXxiP3MElxz689M1iSolpCgOlPx+EeRiAtlJamrV1CCkKmjCrR3/5ASB1+ AJEw4zdzbUaPqHjGUTZRV6Du8tJGDyX/5V/+28D2dUt1glDsEfo+SrxZv95sSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767706464; a=rsa-sha256; cv=none; b=hyEUicHaPG2i/lj8yQEIzNrn16r2hC+2z9BrHCjrAw9/Qm6OyAQ8WnZ/Xtplg3lIa/6bc9 k/FMI/Ti17ZlDwnOj1lji3Tf15+NNBoK7abAbIAxkY31qmbdqIdT7qjb+v5Md1/egHks3a Hkr2HmjCcYyBpHvD4MkgHIRCbqP6n4ui2m07++zEALJEpnMFXuN3R1yCpHdtGFj45dYjpI jCJRcdp5zVkyMgWoz2aJfdJos4v5MJE1m4QxczT3n7Lgk1VQWFb6rYyBnFB2Ay0bacHJIZ tcSwa6ZYQbAm10n2kne/si+iflLppJrdsnPqPTkGTI4yfRMhqNvRAdgCyqo4IA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlsb40sZYz17fj for ; Tue, 06 Jan 2026 13:34:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fdc1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 13:34:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 7db725b25ed9 - stable/15 - proc_set_cred(): Allow 'newcred' to have multiple references List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 7db725b25ed933b5e126386652e801c8fed34a84 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 13:34:24 +0000 Message-Id: <695d0f60.3fdc1.48844a3c@gitrepo.freebsd.org> The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=7db725b25ed933b5e126386652e801c8fed34a84 commit 7db725b25ed933b5e126386652e801c8fed34a84 Author: Olivier Certner AuthorDate: 2025-11-06 22:25:57 +0000 Commit: Olivier Certner CommitDate: 2026-01-06 13:33:24 +0000 proc_set_cred(): Allow 'newcred' to have multiple references This is an extension needed by next commit, where some additional reference is kept on the credentials to be set on a process in order to keep these credentials alive even after the process lock is released (an intervening reset of process credentials could release the reference that the process holds). Only 'cr_users' is incremented, as the reference (counted in 'cr_ref') comes from the caller, who passes it to the process. Reviewed by: kib, markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53636 (cherry picked from commit 5d46d11772c3280fd1c8ae09f20ce6c57f631c30) --- sys/kern/kern_prot.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 0b7dc2169335..30cc617ceaf1 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -2792,10 +2792,6 @@ _proc_set_cred(struct proc *p, struct ucred *newcred, bool enforce_proc_lim) MPASS(oldcred != NULL); PROC_LOCK_ASSERT(p, MA_OWNED); - KASSERT(newcred->cr_users == 0, ("%s: users %d not 0 on cred %p", - __func__, newcred->cr_users, newcred)); - KASSERT(newcred->cr_ref == 1, ("%s: ref %ld not 1 on cred %p", - __func__, newcred->cr_ref, newcred)); if (newcred->cr_ruidinfo != oldcred->cr_ruidinfo) { /* @@ -2821,8 +2817,10 @@ _proc_set_cred(struct proc *p, struct ucred *newcred, bool enforce_proc_lim) __func__, oldcred->cr_users, oldcred)); oldcred->cr_users--; mtx_unlock(&oldcred->cr_mtx); + mtx_lock(&newcred->cr_mtx); + newcred->cr_users++; + mtx_unlock(&newcred->cr_mtx); p->p_ucred = newcred; - newcred->cr_users = 1; PROC_UPDATE_COW(p); if (newcred->cr_ruidinfo != oldcred->cr_ruidinfo) (void)chgproccnt(oldcred->cr_ruidinfo, -1, 0); From nobody Tue Jan 6 13:34:25 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlsb54dNvz6Ndd8 for ; Tue, 06 Jan 2026 13:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlsb528Zgz3T05 for ; Tue, 06 Jan 2026 13:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jljMzMxvFp0EznhOijdMZUVjJucQ8WciFAO9FgMsYZ0=; b=KHfclVqRX2QD8KVuIiNoqwyeF8S32mVmMjrw2auKB+bhWXYybjM1D1m7G/igPdAxMiSskO M2GP+tX0DEC0P+0eBvGYVv3/Wj2HzWChSU4unbJPwSfgV/Ui+C7BwuQ3SLwc7u9g45052a bbXxnj8SqGpVCE8nQW8ymcHP5tjDc/DbQ+QbnR9DJlcPShSKAnleLdhTrk6TxzsZbzE8aE nOStXWVRRV57YELRk7v7X4Magj5n4Z41lHLXm6P1JxtpYWfqOySZsYy3kS93mQ8IcdxVG7 ALP4fHk6mjRwKTvbC8Dzt88L3iZEjiCIXLQg7jNZh9K3B92yEYqAIR7brEBEQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jljMzMxvFp0EznhOijdMZUVjJucQ8WciFAO9FgMsYZ0=; b=XRhyujWIUdYb7oMRRyTyN5hryDzbdfviweRiI/wlxZBQWlGtZETgAogiZjqye2Kv7S0AAg H0rtKiGrQNKXC/UxYb23FkrGT731oJD3kL0FIN6uimDBaFDUg8BcPknzMxo96hqWfUeIen fn56/ZF5kWailaJB2NoNnqgXINtC0fvkUcLPC1UTs+H1DbGdyzFNBjqk/5jbquP+Hc4oNH ZvUJki83YBJ6jMcUaiXD547jvSldy49YTPVa0C1+n+uD5RNza2g5yLuUFso2y+qwmcEpIQ 6lgsJUGAAt+Pns60pKmLDWPyRXYIc0uZ15DbJaz0+iznTfpA6M8zUl8KPe6X0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767706465; a=rsa-sha256; cv=none; b=OwWQAeZgAWPGmCljxGlBIBx9+Y/iYuWc374OhjBrgL1srbOLMkLdNCQKwC0gjCebuHnPj4 zw76wgkELlAa83aAGajoONGtrPPbxNAxRGV3M7SXll+dIt8rynsdQZESqhEuyf92P+s3E5 l934pCTKoCkzYlT3/KviK9Pt0LyEhI8gpRxm5pljuSyd6uu8GADa84gttN01IQ+RSh6Hmj dpbpqBl0EMHKonlwhB4ETOhxd4ucjMkR22++rwSwrZcQJlwzvLF6NDrxrhuZ1MQIoouAn6 9Yc0WSxDUrVqXar8RzBktH2nct87nF+hN0NrvWR8n5V09lq81NaX15cnhZbI5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlsb51YsDz17HW for ; Tue, 06 Jan 2026 13:34:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3def8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 13:34:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 4dbf2c9fb0ee - stable/15 - setpgid(): Fix space before TAB in herald comment List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4dbf2c9fb0eef76ad5a9b84fa376f2520a938253 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 13:34:25 +0000 Message-Id: <695d0f61.3def8.1a82604c@gitrepo.freebsd.org> The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=4dbf2c9fb0eef76ad5a9b84fa376f2520a938253 commit 4dbf2c9fb0eef76ad5a9b84fa376f2520a938253 Author: Olivier Certner AuthorDate: 2025-11-09 22:35:42 +0000 Commit: Olivier Certner CommitDate: 2026-01-06 13:33:24 +0000 setpgid(): Fix space before TAB in herald comment No functional change. With this tiny change, all the file becomes whitespace-clean. MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit d05ab93913f340c5590eafa4cc09cc84aa86282e) --- sys/kern/kern_prot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 30cc617ceaf1..b45755d655c2 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -422,7 +422,7 @@ again: * pid must be in same session (EPERM) * pid can't have done an exec (EACCES) * if pgid != pid - * there must exist some pid in same session having pgid (EPERM) + * there must exist some pid in same session having pgid (EPERM) * pid must not be session leader (EPERM) */ #ifndef _SYS_SYSPROTO_H_ From nobody Tue Jan 6 13:34:26 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlsb65Y4Tz6NdWG for ; Tue, 06 Jan 2026 13:34:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlsb63MWXz3SxC for ; Tue, 06 Jan 2026 13:34:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706466; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k0S6vSlOFIqZjwfn5JXkKDc64wapM4seAo8MPLglE/M=; b=daSYvVbIJUu8zHRUftRADIUIIhvzxv/wrI1zupsYmYdeycqBwiOthIM5uy59P7NDzHd+HA Qc+XjkS1UNAx8WXJ5tnsSQ4XkianQ4KOYRNtvHsfK+3XpLPm6mxkNkGwerSH6kjy3XfYEC zjt8ue1vB2qJwBz+lRe1vAGZ1b/yXzfkIJKUvw5dE5UioZ8W+wYrDYw2oUXhtABFRIhuBS hWOqTgW1pr3OGWaiJ2oUw5hNpIzIhs9wJJ38DzeXnaepvgz6otqHXuYWsuxOCxBjhw2IWb ZLEjrOhSrwSB9PIzS/SrZ0Y2DzCiwdGn9OE8k2DcfXpdE7E+IAMgIBXJhMrPJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706466; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k0S6vSlOFIqZjwfn5JXkKDc64wapM4seAo8MPLglE/M=; b=rssfZTyZ8hN34ZEpVD00Ks+MlMF02j49bwcr6PR4/CSttWKF3/wEJmnCTHQco061HQLnhp onyjSAv0aDZtfdFBUYUYR0nvl9S19kl0e6ZvWWAY8uwSIHDu0UluDYCFnmn1SJ2yR11FPG GEnIE6nxbodkAU2t1HIR23ehxrn+o+nI8NVkShjcItowDOsvWQBzFN6RA3vz2YZxoTsDxg B+aMMARTZlaaB8+NWoVKVNaAGCFg1t2LouT9TpWSI+U7u1i8cSkGWYriob+kBySygLRR/m GpDDsOd+SeugcPX1k3Et8Pl8clgs0KgKD0OY+Vlp7hHiyINeeZ4Lz8fHuNoViw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767706466; a=rsa-sha256; cv=none; b=EUEvbHxZeB08JAxuvaKqw0noAk6KmWrn/69xPugHKS06UGfCHT8eHvuIsjhI5AIJLCzbe4 L0pSH10/gHiGCWg1b86bA1NDMCmZdGiM1zygqAAvD5guu4Wqzxk6DErxeejubgLnX0T1Nc hEzLMjuMCrEShhUjMERqdqF9NA5R8IJxvn2xtL+3ZYmDGmsS06J2ijxpAqBD+1FqohE4Ub oxSErtD65pJ+KBtxRHDhWEmkf7tgSjbiOZdm82GYg7Ueqf1vRN+TJBWwtBennWhqMkeX1P EkrwUZhUWu5ZEis0fFMaamNRsanLqYuFcoQCd0jFOUn8DwNRUo/jurryLdBkoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlsb62HvLz181p for ; Tue, 06 Jan 2026 13:34:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d85e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 13:34:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 8bc4e73d2d6d - stable/15 - kern: RACCT: Keep process credentials alive via references List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 8bc4e73d2d6ddb181a28a2c98212d674528367c4 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 13:34:26 +0000 Message-Id: <695d0f62.3d85e.1e18d7a6@gitrepo.freebsd.org> The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=8bc4e73d2d6ddb181a28a2c98212d674528367c4 commit 8bc4e73d2d6ddb181a28a2c98212d674528367c4 Author: Olivier Certner AuthorDate: 2025-11-03 18:21:08 +0000 Commit: Olivier Certner CommitDate: 2026-01-06 13:33:24 +0000 kern: RACCT: Keep process credentials alive via references In system calls changing process credentials, on RACCT, calls to racct_proc_ucred_changed() must be issued on the new credentials. Currently, this is done after the new credentials have been installed on the process via proc_set_cred() or proc_set_cred_enforce_proc_lim(), which modifies 'p_ucred'. Only the process lock guarantees that the new credentials pointed to by 'p_ucred' cannot themselves be concurrently modified, which would cause their 'struct ucred' to potentially lose its last reference from the process before the call to racct_proc_ucred_changed(), which needs one. For better code understandability and to avoid errors in future modifications, stop relying on proc_set_cred*() storing the passed 'struct ucred' in the process 'p_ucred' and on the process lock to avoid the reference taken by proc_set_cred*() to vanish. Instead, ensure that a reference is held when racct_proc_ucred_changed() is called. As racct_proc_ucred_changed() is actually passed explicit pointers to the old and new credentials, there is in fact no need to call it after proc_set_cred(). Instead, call it before proc_set_cred() and its taking over the reference. Since setcred() uses proc_set_cred_enforce_proc_lim(), which can fail, instead of proc_set_cred(), we instead take an additional reference with crhold(). Indeed, racct_proc_ucred_changed() should update resource accounting only if proc_set_cred_enforce_proc_lim() succeeds (an alternative would be to call it in advance and then in case of failure of the latter to call it again in order to backpedal the updated accounting, but we don't see a compelling reason to do that instead of taking an additional reference). While here, add to the documentation of proc_set_cred_enforce_proc_lim() that it does not take over the credentials reference in case of failure. While here, in racct_proc_ucred_changed()'s herald comment, add the precise condition in which this function must be called. No functional change intended. Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53563 (cherry picked from commit c3d2b68c6933d0610bc3e09e9b94f963b4dc85aa) --- sys/kern/kern_jail.c | 9 ++++++-- sys/kern/kern_loginclass.c | 7 +++++- sys/kern/kern_prot.c | 54 +++++++++++++++++++++++++++++++++------------- sys/kern/kern_racct.c | 6 ++++-- 4 files changed, 56 insertions(+), 20 deletions(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 43b485b161a4..07b98fef8dfb 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -3046,14 +3046,19 @@ do_jail_attach(struct thread *td, struct prison *pr, int drflags) PROC_LOCK(p); oldcred = crcopysafe(p, newcred); newcred->cr_prison = pr; - proc_set_cred(p, newcred); - setsugid(p); #ifdef RACCT racct_proc_ucred_changed(p, oldcred, newcred); #endif #ifdef RCTL crhold(newcred); #endif + /* + * Takes over 'newcred''s reference, so 'newcred' must not be used + * besides this point except on RCTL where we took an additional + * reference above. + */ + proc_set_cred(p, newcred); + setsugid(p); PROC_UNLOCK(p); #ifdef RCTL rctl_proc_ucred_changed(p, newcred); diff --git a/sys/kern/kern_loginclass.c b/sys/kern/kern_loginclass.c index 0c111c4f78d8..07d388f18f8d 100644 --- a/sys/kern/kern_loginclass.c +++ b/sys/kern/kern_loginclass.c @@ -222,13 +222,18 @@ sys_setloginclass(struct thread *td, struct setloginclass_args *uap) PROC_LOCK(p); oldcred = crcopysafe(p, newcred); newcred->cr_loginclass = newlc; - proc_set_cred(p, newcred); #ifdef RACCT racct_proc_ucred_changed(p, oldcred, newcred); #endif #ifdef RCTL crhold(newcred); #endif + /* + * Takes over 'newcred''s reference, so 'newcred' must not be used + * besides this point except on RCTL where we took an additional + * reference above. + */ + proc_set_cred(p, newcred); PROC_UNLOCK(p); #ifdef RCTL rctl_proc_ucred_changed(p, newcred); diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index b45755d655c2..81099aa7d28d 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -832,22 +832,31 @@ kern_setcred(struct thread *const td, const u_int flags, if (error != 0) goto unlock_finish; +#ifdef RACCT /* - * Set the new credentials, noting that they have changed. + * Hold a reference to 'new_cred', as we need to call some functions on + * it after proc_set_cred_enforce_proc_lim(). */ + crhold(new_cred); +#endif + + /* Set the new credentials. */ cred_set = proc_set_cred_enforce_proc_lim(p, new_cred); if (cred_set) { setsugid(p); - to_free_cred = old_cred; #ifdef RACCT + /* Adjust RACCT counters. */ racct_proc_ucred_changed(p, old_cred, new_cred); #endif -#ifdef RCTL - crhold(new_cred); -#endif + to_free_cred = old_cred; MPASS(error == 0); - } else + } else { +#ifdef RACCT + /* Matches the crhold() just before the containing 'if'. */ + crfree(new_cred); +#endif error = EAGAIN; + } unlock_finish: PROC_UNLOCK(p); @@ -857,10 +866,12 @@ unlock_finish: * finishing operations. */ -#ifdef RCTL +#ifdef RACCT if (cred_set) { +#ifdef RCTL rctl_proc_ucred_changed(p, new_cred); - /* Paired with the crhold() just above. */ +#endif + /* Paired with the crhold() above. */ crfree(new_cred); } #endif @@ -991,16 +1002,19 @@ sys_setuid(struct thread *td, struct setuid_args *uap) change_euid(newcred, uip); setsugid(p); } - /* - * This also transfers the proc count to the new user. - */ - proc_set_cred(p, newcred); + #ifdef RACCT racct_proc_ucred_changed(p, oldcred, newcred); #endif #ifdef RCTL crhold(newcred); #endif + /* + * Takes over 'newcred''s reference, so 'newcred' must not be used + * besides this point except on RCTL where we took an additional + * reference above. + */ + proc_set_cred(p, newcred); PROC_UNLOCK(p); #ifdef RCTL rctl_proc_ucred_changed(p, newcred); @@ -1404,13 +1418,18 @@ sys_setreuid(struct thread *td, struct setreuid_args *uap) change_svuid(newcred, newcred->cr_uid); setsugid(p); } - proc_set_cred(p, newcred); #ifdef RACCT racct_proc_ucred_changed(p, oldcred, newcred); #endif #ifdef RCTL crhold(newcred); #endif + /* + * Takes over 'newcred''s reference, so 'newcred' must not be used + * besides this point except on RCTL where we took an additional + * reference above. + */ + proc_set_cred(p, newcred); PROC_UNLOCK(p); #ifdef RCTL rctl_proc_ucred_changed(p, newcred); @@ -1552,13 +1571,18 @@ sys_setresuid(struct thread *td, struct setresuid_args *uap) change_svuid(newcred, suid); setsugid(p); } - proc_set_cred(p, newcred); #ifdef RACCT racct_proc_ucred_changed(p, oldcred, newcred); #endif #ifdef RCTL crhold(newcred); #endif + /* + * Takes over 'newcred''s reference, so 'newcred' must not be used + * besides this point except on RCTL where we took an additional + * reference above. + */ + proc_set_cred(p, newcred); PROC_UNLOCK(p); #ifdef RCTL rctl_proc_ucred_changed(p, newcred); @@ -2783,7 +2807,7 @@ cru2xt(struct thread *td, struct xucred *xcr) * 'enforce_proc_lim' being true and if no new process can be accounted to the * new real UID because of the current limit (see the inner comment for more * details) and the caller does not have privilege (PRIV_PROC_LIMIT) to override - * that. + * that. In this case, the reference to 'newcred' is not taken over. */ static bool _proc_set_cred(struct proc *p, struct ucred *newcred, bool enforce_proc_lim) diff --git a/sys/kern/kern_racct.c b/sys/kern/kern_racct.c index 61e92678b54d..b155c882f569 100644 --- a/sys/kern/kern_racct.c +++ b/sys/kern/kern_racct.c @@ -949,8 +949,10 @@ racct_proc_exit(struct proc *p) } /* - * Called after credentials change, to move resource utilisation - * between raccts. + * Called to signal credentials change, to move resource utilisation + * between raccts. Must be called with the proc lock held, in the same span as + * the credentials change itself (i.e., without the proc lock being unlocked + * between the two), but the order does not matter. */ void racct_proc_ucred_changed(struct proc *p, struct ucred *oldcred, From nobody Tue Jan 6 13:34:21 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlsb728Sdz6NdmC for ; Tue, 06 Jan 2026 13:34:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlsb66t4Yz3SmZ for ; Tue, 06 Jan 2026 13:34:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LYU1hfHgmjn+8ZYF/uueO09y9C1zaoyMfQZLjXW+p9c=; b=vn9Q2SAvkid8z5WScH1yMoIPdYBu8geJbI/6KicrNc7PjYVuDtjII9K+XlSedL/bqpU+CB TuCKLNvTI0z3bpJm+RI0US0UUhe0lnqJjBWo+QsJSRTQ1TFHR25GqeMZ8NqOl+RLRl6TGK WT7bdVR9C4gtZ2R7/WOeb1mpOxfJshzrFl5gOHSWEby3xaqEYJIYMphC8iir7WtxSsECKy uokM9pp3yC7UsIkW7ONi/qlgURq+mH/qQzU1dM3bzOGmshzke1HKMsJVBuCBcOrVDlS+R/ Nf9TQyGRDYT7MwToxLDEV/EKAOWLsAy+ctWNOOMe7O4M3yGLFySKXTx0KHsNvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LYU1hfHgmjn+8ZYF/uueO09y9C1zaoyMfQZLjXW+p9c=; b=WLezsFxUf6S4tqNkET6/zdnWrH4lqU2Tg2CjSP9UHblZQADW2dBozvX0B4c8fjjznm0KJi 0YzvYaqz95+m1wIYbPHIJdAJhEqMxU7Fo0SpzpCvpUF7/Np8Jfwf7Kt7kEbzArr3XflkqM 9JkehiO6BMuxiZLM+cu2ZnaY7u0K8cDJKOK1LUQKgEpjB8ticHreQYkw5se5F0gCR0tqfA wRR6luSEyLHE0Pmf7scvtbdXYzV3mBVLvNyluruOmhyKtoNsbtaUdVe7l3U9131yfpQKtK nGqX5atdAMsvUEVxxB0PgsKNsJMslbT1QIBOlvk3UshicUasbVU6JRd9XnQ4pg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767706467; a=rsa-sha256; cv=none; b=Jj6XkF1WW9I7M1wstRRDZJuub+fa0g1ijBnrttQZds8z1pIJpoYwpcfkHF419I6qkOLSqP CqntMnjf8JUg2Be8u9Yx1LRnRhbzNmJ6QJU2c285Z3MlbaPkY9dtpDWOrK1Qk2cosNexZd yVpFU6iC5+h0g2LRdGNVJFknKen/MQHuPjXXzIINDSQweRzllhlsMU3gzyAr7bto4hh74D K3gROLr3srzes2MYCxZljtf9nWGxnvOgncPzlH/4HAUt/ck4HO4pjIgZ2KDI1t0Rzg2ooO wpAyDub4pt5tTSV7szlG7tIMapm2oHXW2KzePYsXwPOL1l+z/w8muhIVIQLpTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlsb16LzWz17XD for ; Tue, 06 Jan 2026 13:34:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fc55 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 13:34:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 12fbcfd4a6b9 - stable/15 - libsa: smbios: Detect less-than-64-bit platforms via __SIZEOF_SIZE_T__ List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 12fbcfd4a6b9bf9a01391432f80a2595fc1d4707 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 13:34:21 +0000 Message-Id: <695d0f5d.3fc55.18f61acc@gitrepo.freebsd.org> The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=12fbcfd4a6b9bf9a01391432f80a2595fc1d4707 commit 12fbcfd4a6b9bf9a01391432f80a2595fc1d4707 Author: Olivier Certner AuthorDate: 2025-03-11 16:56:20 +0000 Commit: Olivier Certner CommitDate: 2026-01-06 13:33:19 +0000 libsa: smbios: Detect less-than-64-bit platforms via __SIZEOF_SIZE_T__ What we really want here is to know if pointers can refer to 64-bit addresses, regardless of whether they also hold other information (such as capabilities in CHERI). __SIZEOF_SIZE_T__ is probably the closest indication to that piece of information, so let's use it. __ILP32__ wasn't wrong in practice though, as we don't support 32-bit CHERI hardware (and likely never will). Consistently with this change, test whether we can actually address the 64-bit SMBIOS's structure table by converting the end address to 'size_t' and checking whether its value is preserved. Suggested by: jhb (for the __ILP32__ => __SIZEOF_SIZE_T__ part) Reviewed by: jhb, imp MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49318 (cherry picked from commit d3bfcd66409befc2d545e5449963b41c25c369a9) --- stand/libsa/smbios.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/stand/libsa/smbios.c b/stand/libsa/smbios.c index 32cd198a9537..73b49a111f89 100644 --- a/stand/libsa/smbios.c +++ b/stand/libsa/smbios.c @@ -186,14 +186,17 @@ smbios_sigsearch(const caddr_t addr, const uint32_t len) */ SMBIOS_GET8(cp, 0x0a) != 0 && smbios_checksum(cp, SMBIOS_GET8(cp, 0x06)) == 0) { -#ifdef __ILP32__ +#if __SIZEOF_SIZE_T__ < 8 uint64_t end_addr; end_addr = SMBIOS_GET64(cp, 0x10) + /* Start address. */ SMBIOS_GET32(cp, 0x0c); /* Maximum size. */ - /* Is the table (or part of it) located above 4G? */ - if (end_addr >= (uint64_t)1 << 32) - /* Can't access it with 32-bit addressing. */ + /* + * Is the table (or part of it) located above what we + * can address? + */ + if ((size_t)end_addr != end_addr) + /* Yes, give it up. */ continue; #endif smbios.is_64bit_ep = 1; From nobody Tue Jan 6 13:34:27 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlsb75TLcz6NdyN for ; Tue, 06 Jan 2026 13:34:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlsb73kDGz3SxT for ; Tue, 06 Jan 2026 13:34:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WUEvZrFuya6x1xngPffPIt+mZTKYm/8hmVhOK3ykS6s=; b=gFWbUYJIInJtUntjh7mBDAF+aJ7xOhn0KywKyxuDW9DoeHP48My6n8XKbiu+SZqf06git0 1mkOXB8/o7B5TwUyvFtY42yhKrOZk98wbMxE+oATRMhqwuvC35apGfs7izq+y+mT1PdjJL bmSmqGJ0hR+OoVpK8pNsJcC9SjP5aEe5IduwwtxyeUXvDjCqJ1nW4fkvIDG5sE66etZTOX O9Csk30NcHkMaZfXDIGEeIJvKJfKNkXKWcLs8JF1fgCVy9Kcxt8wUiL5T3ci/AnAm4Chrz v50mGtfOuYCUYpCOYplqOWqsvfRuzwqnr1VLsizTpK4LLQNYYBDTPWSDWr7U/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WUEvZrFuya6x1xngPffPIt+mZTKYm/8hmVhOK3ykS6s=; b=SLlkERrKNUR1UzAeO2BkPPh7bZnY9hb9WaPM5+OimLbAmuB5W35ZXpFB+sjx7648QEa7Hi CPRqEbfIbgeOQx5AZse/8hNDoXmiXYpkp9L3F21Sz+o6o+gTL2xEWP3ftXSeM8l+VS73yx FsOGe7ON8CJpHoWDzZO6QfAb9bPgkmROuoHk3lgooHTE6gAR1dklBNm2SvZZmjz+6TWu0x 7TDjyQ+X2BaZesdFvlsiTDaNkXtYcWcUZmVNxYnwHK8PfBp6fQaWBz/nGeAJRms6KlAjS/ ILTW/LhumoqY6VNIISfDNM2EParnG5nfEeviy5yOs36n+I94XFaihnWZ4hM2lw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767706467; a=rsa-sha256; cv=none; b=UyZhQkxtDBJN6tGYJuRrdVPzGpHk7GWHk1l9tO5QO/AKCFiD213d3nR9TKHOdpkLHr4VMb E7GOA59dVmBVMSPBfrxenWuKIPpKbe8V6D18w7dwJRzY4E5lBnYowHccMkaf1Or+t4ohH8 FLtGxwxSMO96rM5+k7kmIi+ehMBS4JR070YbGvuYiPa0t/yjfvcPrHiiHpVyiynJAhdKkj 544tA6jTq0EN6UZ2lJjYWSNkKCpPCQNZRl1cNI4UyWQX6sAlB4X1iKQuWxG2OtU2yXYsnB xJYnstugu7pJDBQ1psnOzFNfL4gZuvd4bZ7whgpSo7IeMydQhsQ9FEXdwG6b6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlsb735nJz17r2 for ; Tue, 06 Jan 2026 13:34:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f493 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 13:34:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: c286220e732f - stable/15 - mdo(1): Avoid calling getgroups() in some unnecessary cases List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/15 X-Git-Reftype: branch X-Git-Commit: c286220e732f9e55d3782874121f1efb6a81f45e Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 13:34:27 +0000 Message-Id: <695d0f63.3f493.30230cb7@gitrepo.freebsd.org> The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=c286220e732f9e55d3782874121f1efb6a81f45e commit c286220e732f9e55d3782874121f1efb6a81f45e Author: Olivier Certner AuthorDate: 2025-11-14 11:59:09 +0000 Commit: Olivier Certner CommitDate: 2026-01-06 13:33:24 +0000 mdo(1): Avoid calling getgroups() in some unnecessary cases If the basis for supplementary groups are the current ones, we do not need to fetch them when they are to be replaced entirely (which we already have been doing), as in the '!start_from_current_groups' case, but specifically also when they are not going to be touched at all. This change in passing makes the modified code block's comment saying that SETCREDF_SUPP_GROUPS need not be set here correct. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53771 (cherry picked from commit b92b1b47583036bd02e656564ff22c92b8949077) --- usr.bin/mdo/mdo.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/usr.bin/mdo/mdo.c b/usr.bin/mdo/mdo.c index 3eb5d4e5c23f..879423bc0128 100644 --- a/usr.bin/mdo/mdo.c +++ b/usr.bin/mdo/mdo.c @@ -753,8 +753,14 @@ main(int argc, char **argv) */ setcred_flags |= SETCREDF_SUPP_GROUPS; } - } else if (supp_groups_str == NULL && (supp_mod_str == NULL || - supp_mod_str[0] != '@')) { + } else if (supp_groups_str == NULL && supp_mod_str != NULL && + supp_mod_str[0] != '@') { + /* + * We do not need to determine the current groups if, as for the + * '!start_from_current_groups' case, we are going to replace + * them entirely, but here also if we do not amend them at all + * (because they are by definition already in place). + */ const int ngroups = getgroups(0, NULL); if (ngroups > 0) { From nobody Tue Jan 6 13:34:28 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlsb86j2sz6NdWL for ; Tue, 06 Jan 2026 13:34:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlsb84QXcz3Smr for ; Tue, 06 Jan 2026 13:34:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cI67qpqX4NnIaPZTEDsF/FeN4bFVl+GOcgGg6V2zy2k=; b=xupRkv0izZz/UnNIFsq10n9C4IJ/PCZvy3rfP7vDvCDF72PVRRkpikeYChqXPuH4me58Ho ExlmgafOFWZ3eYtrVRTzeeV6iBCOaOKgv6ohCcPxTfjVczu62VqEapfSuPGRYxyQ5jFupD t+pe+v3s8+wrNkyabG6nkjbR1L4iMig9VFhG2jRWaTnLtCLXEni14TCImfTadWc6oi5wSo uj8wWRwjyeTWvVLMB6oTf/pr8VlETQ8QG5ClTuorQWqeGZM8M9/64c1YQIxkGbL7Ibv9Oa 1l84zZHyrpk1QweRXTbMpwXJi0uGabwZmtdTq3nA/nxj5I3KmYRy63QMCBJwOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cI67qpqX4NnIaPZTEDsF/FeN4bFVl+GOcgGg6V2zy2k=; b=K0XSVnulLf23iOsncL/sf0xtG3Vzu/C2aY+uL4WP4aT7JuLpzylwgGXtRMsPbJDVBZtBAA fYyA42+BnVRWarNoOPpmE2Ad5QNO3j2AabU5UYABS9kPUPqmbuKfrdgkO26KvUozjcxdtd KxkKOSgDBj8OdAehZmeN9pbPpcpnSzJkcm8TzzvbAmm3HZWleAagG58nTjbgMdEJ3Ma8/e IoA0vn3QijzgVP6BLmOdAYYCQ+JRnRmtdW0hptH5idALBZ5wY42SgQm1BAWdRbSg+sRjtE H6T7fE3mP0FoICRuI89zTtSAXaDklohRt5q95erWDMAOZC85eHM25HMIYpHI9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767706468; a=rsa-sha256; cv=none; b=s78lUrMJj0OedWfVLGtF11kA0pdwHIAfYemqQJ8929A1KHdYokV2NntOn4Ys7/+UcbJ0Bd xwvnsoEL/D4e3rzT9sabEfMaVtMefAPcp4BYMy2M69yFGIR84w/T2OvkW9SvLb0+Pjxlbj XZoPNZYEONGspBReTi+Db1jJXOUNr49QvojeowFSHBNFxUvl0KdWLwLCVpkkSkUX+AdIOV W3QQm9Im93YlpEe9JtQuStUkRhgAWFhQGv7yNMr9GI/qcCD1h1SxpFk5COq6aKczTBCgE2 Mz9l2gYWflORgbTtTD+84YZ8YsaazyYRdXiP9AcpJqorj0FFzOoS4Th1gUaQIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlsb83z3Pz17XG for ; Tue, 06 Jan 2026 13:34:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fdc5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 13:34:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: John Baldwin From: Olivier Certner Subject: git: 33c0bd25e528 - stable/15 - MAC: Use the current thread's user ABI to determine the layout of struct mac List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 33c0bd25e5283404bbf7be0536ff52fa16f11b6a Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 13:34:28 +0000 Message-Id: <695d0f64.3fdc5.6b0fdf66@gitrepo.freebsd.org> The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=33c0bd25e5283404bbf7be0536ff52fa16f11b6a commit 33c0bd25e5283404bbf7be0536ff52fa16f11b6a Author: John Baldwin AuthorDate: 2025-11-24 15:47:20 +0000 Commit: Olivier Certner CommitDate: 2026-01-06 13:33:25 +0000 MAC: Use the current thread's user ABI to determine the layout of struct mac This removes mac_label_copyin32() as mac_label_copyin() can now handle both native and 32-bit struct mac objects. Reviewed by: olce, brooks Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D53755 (cherry picked from commit 134d00bd2c910cc7cc21c11fba093ff82bbb9344) --- sys/kern/kern_prot.c | 7 +------ sys/security/mac/mac_syscalls.c | 25 +++++-------------------- sys/security/mac/mac_syscalls.h | 9 +-------- 3 files changed, 7 insertions(+), 34 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 81099aa7d28d..5d57cdb7928d 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -635,12 +635,7 @@ user_setcred(struct thread *td, const u_int flags, #ifdef MAC if ((flags & SETCREDF_MAC_LABEL) != 0) { -#ifdef COMPAT_FREEBSD32 - if (is_32bit) - error = mac_label_copyin32(umac, &mac, NULL); - else -#endif - error = mac_label_copyin(umac, &mac, NULL); + error = mac_label_copyin(umac, &mac, NULL); if (error != 0) goto free_groups; wcred.sc_label = &mac; diff --git a/sys/security/mac/mac_syscalls.c b/sys/security/mac/mac_syscalls.c index 26181781a394..13c7998041f9 100644 --- a/sys/security/mac/mac_syscalls.c +++ b/sys/security/mac/mac_syscalls.c @@ -57,6 +57,7 @@ #include #include #include +#include #include #include #include @@ -94,15 +95,15 @@ struct mac32 { * after use by calling free_copied_label() (which see). On success, 'u_string' * if not NULL is filled with the userspace address for 'u_mac->m_string'. */ -static int -mac_label_copyin_impl(const void *const u_mac, struct mac *const mac, - char **const u_string, bool is_32bit) +int +mac_label_copyin(const void *const u_mac, struct mac *const mac, + char **const u_string) { char *buffer; int error; #ifdef COMPAT_FREEBSD32 - if (is_32bit) { + if (SV_CURPROC_FLAG(SV_ILP32)) { struct mac32 mac32; error = copyin(u_mac, &mac32, sizeof(mac32)); @@ -138,28 +139,12 @@ mac_label_copyin_impl(const void *const u_mac, struct mac *const mac, return (0); } -int -mac_label_copyin(const struct mac *const u_mac, struct mac *const mac, - char **const u_string) -{ - return (mac_label_copyin_impl(u_mac, mac, u_string, false)); -} - void free_copied_label(const struct mac *const mac) { free(mac->m_string, M_MACTEMP); } -#ifdef COMPAT_FREEBSD32 -int -mac_label_copyin32(const struct mac32 *const u_mac, - struct mac *const mac, char **const u_string) -{ - return (mac_label_copyin_impl(u_mac, mac, u_string, true)); -} -#endif - int sys___mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap) { diff --git a/sys/security/mac/mac_syscalls.h b/sys/security/mac/mac_syscalls.h index 4efeaf300d31..f95ff3ef1264 100644 --- a/sys/security/mac/mac_syscalls.h +++ b/sys/security/mac/mac_syscalls.h @@ -19,17 +19,10 @@ #error "no user-serviceable parts inside" #endif -int mac_label_copyin(const struct mac *const u_mac, struct mac *const mac, +int mac_label_copyin(const void *const u_mac, struct mac *const mac, char **const u_string); void free_copied_label(const struct mac *const mac); -#ifdef COMPAT_FREEBSD32 -struct mac32; - -int mac_label_copyin32(const struct mac32 *const u_mac, - struct mac *const mac, char **const u_string); -#endif /* COMPAT_FREEBSD32 */ - int mac_set_proc_prepare(struct thread *const td, const struct mac *const mac, void **const mac_set_proc_data); int mac_set_proc_core(struct thread *const td, struct ucred *const newcred, From nobody Tue Jan 6 13:34:29 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlsbB0Jm9z6Ndwq for ; Tue, 06 Jan 2026 13:34:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlsb955kNz3T3C for ; Tue, 06 Jan 2026 13:34:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706469; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nVohu9ftsTmPuF1FhVlLDzzZBDG9DzS1FKqsldpiHm0=; b=TjG2On1k3lOJJXMiT0IaxGfSxYCu0phd+7sjZHaRNgFZ+qW/GhqOWm0ZZuXqrNp1971zvQ FiE371djFm6WxKuLJrIWIog0VVvh8v1vOo3iU+g9iXMbkwSpqx5urdvF3A/u/glnqkIYr9 EzjT8knuDHc7z9UudL52ob7NWluPzUgS9W51qJNs24GLan1AYuVWVAIToi8GHlY5Lb2NLR +wvDNjMJf1OxcSZiEhIIANgqO3p0megY1THxSfdRiatES8Yql3cj2ESHZbgXBY8gsQk2NK 2lI5iymmEEMKyW8YCFx+Ap6szlv7Hzsjd+prabvdyR6jgXt7j56OurZ8CE3Ymg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706469; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nVohu9ftsTmPuF1FhVlLDzzZBDG9DzS1FKqsldpiHm0=; b=vf/S/AlhD1EwKQItjIYBr37WlylVGtEx5gC6By/NZ2OnB4mar73Uodscd1iudpafjBoxTY TaBYxm/zenFQ0LNEdTS+81L6QtilGY4EBbWYPeT047dU1vWe3ivS42o/8/CzAH3XTk9ElF k89tu5LAb/XhjSb8XnX7qBPLdFv5iBR8OvcsSDCq0oWWyu9s0jK6i1gSEGmngsAdQVVRVm aoF16kIflSO6tZrRjowUX125WNl34qXiSfBYcwEStW/zX78j0gjgVCri5Fm304t+g9OEpG 8xYtYqbjpGFIx11L42aJ2jdjBCwaMArOK9ZFpOt/jbVSJWiNQjsTB2Vbi3PmuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767706469; a=rsa-sha256; cv=none; b=asEQiy62wLGtQXjPdudaOujCxxjQtnnlRvOQQM3kFrnj6Bbfxf7PVBeFZJgzKGT0QF8OYA +nbi+qdSBeUMh/wsa3WeJsDjCYcNyCu4mnOlSgn0dFdaMQvGcNAjaIBy2prrGGQthCUPDE +7QPSSc4O8HjLB9U6xA06GX4f8mbMHoogMcFsKgv2su7LbZ8GDg51rArItmrEgbohLEp4c HID/eGBHab4CEyrj0LZPDcvCs5LwokvnakeBPPqyc5rHt1OPcMYHO8cnnlZ4OGT+BGjSva 7DC8d1wtgVpb0UM2e7g0BzUMEG9HWxguyWFyQIS1Hk75aSaW6xxSG5aiELoQdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlsb94XY3z17fl for ; Tue, 06 Jan 2026 13:34:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f497 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 13:34:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: John Baldwin From: Olivier Certner Subject: git: 9a5b64536743 - stable/15 - setcred: Move initial copyin of struct setcred out to per-ABI syscall List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 9a5b64536743c9021affda5f912d1d2363d296b3 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 13:34:29 +0000 Message-Id: <695d0f65.3f497.174c3b0c@gitrepo.freebsd.org> The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=9a5b64536743c9021affda5f912d1d2363d296b3 commit 9a5b64536743c9021affda5f912d1d2363d296b3 Author: John Baldwin AuthorDate: 2025-11-24 15:48:48 +0000 Commit: Olivier Certner CommitDate: 2026-01-06 13:33:25 +0000 setcred: Move initial copyin of struct setcred out to per-ABI syscall This is the more typical approach used in the tree for system calls with per-ABI structure layouts. Reviewed by: olce, brooks Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D53756 (cherry picked from commit 6292eecfd95c78abc1ab14f20ceaa507ab9c636a) --- sys/compat/freebsd32/freebsd32_misc.c | 18 ++++++++++-- sys/kern/kern_prot.c | 52 ++++++++++++----------------------- sys/sys/ucred.h | 4 +-- 3 files changed, 35 insertions(+), 39 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index e62c76924d22..33b4872ba10f 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -4240,6 +4240,20 @@ ofreebsd32_sethostid(struct thread *td, struct ofreebsd32_sethostid_args *uap) int freebsd32_setcred(struct thread *td, struct freebsd32_setcred_args *uap) { - /* Last argument is 'is_32bit'. */ - return (user_setcred(td, uap->flags, uap->wcred, uap->size, true)); + struct setcred wcred; + struct setcred32 wcred32; + int error; + + if (uap->size != sizeof(wcred32)) + return (EINVAL); + error = copyin(uap->wcred, &wcred32, sizeof(wcred32)); + if (error != 0) + return (error); + /* These fields have exactly the same sizes and positions. */ + memcpy(&wcred, &wcred32, __rangeof(struct setcred32, + setcred32_copy_start, setcred32_copy_end)); + /* Remaining fields are pointers and need PTRIN*(). */ + PTRIN_CP(wcred32, wcred, sc_supp_groups); + PTRIN_CP(wcred32, wcred, sc_label); + return (user_setcred(td, uap->flags, &wcred)); } diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 5d57cdb7928d..8021beed90e8 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -570,10 +570,8 @@ kern_setcred_copyin_supp_groups(struct setcred *const wcred, } int -user_setcred(struct thread *td, const u_int flags, - const void *const uwcred, const size_t size, bool is_32bit) +user_setcred(struct thread *td, const u_int flags, struct setcred *const wcred) { - struct setcred wcred; #ifdef MAC struct mac mac; /* Pointer to 'struct mac' or 'struct mac32'. */ @@ -593,42 +591,18 @@ user_setcred(struct thread *td, const u_int flags, if ((flags & ~SETCREDF_MASK) != 0) return (EINVAL); -#ifdef COMPAT_FREEBSD32 - if (is_32bit) { - struct setcred32 wcred32; - - if (size != sizeof(wcred32)) - return (EINVAL); - error = copyin(uwcred, &wcred32, sizeof(wcred32)); - if (error != 0) - return (error); - /* These fields have exactly the same sizes and positions. */ - memcpy(&wcred, &wcred32, __rangeof(struct setcred32, - setcred32_copy_start, setcred32_copy_end)); - /* Remaining fields are pointers and need PTRIN*(). */ - PTRIN_CP(wcred32, wcred, sc_supp_groups); - PTRIN_CP(wcred32, wcred, sc_label); - } else -#endif /* COMPAT_FREEBSD32 */ - { - if (size != sizeof(wcred)) - return (EINVAL); - error = copyin(uwcred, &wcred, sizeof(wcred)); - if (error != 0) - return (error); - } #ifdef MAC - umac = wcred.sc_label; + umac = wcred->sc_label; #endif /* Also done on !MAC as a defensive measure. */ - wcred.sc_label = NULL; + wcred->sc_label = NULL; /* * Copy supplementary groups as needed. There is no specific * alternative for 32-bit compatibility as 'gid_t' has the same size * everywhere. */ - error = kern_setcred_copyin_supp_groups(&wcred, flags, smallgroups, + error = kern_setcred_copyin_supp_groups(wcred, flags, smallgroups, &groups); if (error != 0) goto free_groups; @@ -638,15 +612,15 @@ user_setcred(struct thread *td, const u_int flags, error = mac_label_copyin(umac, &mac, NULL); if (error != 0) goto free_groups; - wcred.sc_label = &mac; + wcred->sc_label = &mac; } #endif - error = kern_setcred(td, flags, &wcred, groups); + error = kern_setcred(td, flags, wcred, groups); #ifdef MAC - if (wcred.sc_label != NULL) - free_copied_label(wcred.sc_label); + if (wcred->sc_label != NULL) + free_copied_label(wcred->sc_label); #endif free_groups: @@ -667,7 +641,15 @@ struct setcred_args { int sys_setcred(struct thread *td, struct setcred_args *uap) { - return (user_setcred(td, uap->flags, uap->wcred, uap->size, false)); + struct setcred wcred; + int error; + + if (uap->size != sizeof(wcred)) + return (EINVAL); + error = copyin(uap->wcred, &wcred, sizeof(wcred)); + if (error != 0) + return (error); + return (user_setcred(td, uap->flags, &wcred)); } /* diff --git a/sys/sys/ucred.h b/sys/sys/ucred.h index 254f58841993..12d34d990bff 100644 --- a/sys/sys/ucred.h +++ b/sys/sys/ucred.h @@ -198,8 +198,8 @@ struct setcred32 { struct thread; /* Common native and 32-bit compatibility entry point. */ -int user_setcred(struct thread *td, const u_int flags, - const void *const uwcred, const size_t size, bool is_32bit); +int user_setcred(struct thread *td, const u_int flags, + struct setcred *const wcred); struct proc; From nobody Tue Jan 6 13:34:31 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlsbD1wq0z6NdyR for ; Tue, 06 Jan 2026 13:34:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlsbC6n2Cz3SyD for ; Tue, 06 Jan 2026 13:34:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OJ3nW57XTfO7P8FNEAd3gu3ZS8DhjJDVKYYaSj4b4Ds=; b=DRgBbxxBEQ0R0iSojqm4O1K/9Agz3FlayxcMJL57yf3gNfu6DFKzRUrXGIqZYJJcytux0U fBz/kYp0BHPYdak0ps2cE1rWvQvE9XM9SVMEVT69VNWUHsTIDSxtTJbIrEfyBhUo/MMguy gzMlizmZyxhWNobyGguqtDecUa4WKgH2cRi0JL9O/dq2eAaZ4WzWnmEy1sNM9emtcuicYh w+jeybPQBT0/k3zfiAsXvhOIG00/C7MQRhhFtieNDOrgLOOKDv3gOkiSph5n6w4C0xCFaC AbRxkuW+8RHLwBp7GLrL50LTz2GL5JQLdSFGr+Xul4Y9wGM0IdG30azxSFebxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706472; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OJ3nW57XTfO7P8FNEAd3gu3ZS8DhjJDVKYYaSj4b4Ds=; b=e22hKrKvq+sLWO2MHezOueAtVB4MuZ4d0AIg40OWiZ3dXLXcXLv3vyU0QuqRafFEhMkLzR Vyj0GlFA2RVsA0M4vZUJTbdKsHZhEOt6rmwkgvCpAhU93mWYbM4VlGr9p5cSAK/6ezWIxq aSY0+qX8TmazHg3G4Q2ADDjcj0QlJr+atZEdKpA2GF1RUhda9Wi+OGDP+PZmJH4K+5hDwf cajH9TDhmFAKL3GTBl38c6Vjjw+6RcoO370uxDTPPP7TToHh8YAROjHdze9VSUAMP6GXf9 Y2c81ShX6I7Fir3sfVC0OaAJLxcW1Hv6VfT0kXOakRZSfpzp1d5cCu7YFCS/nw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767706472; a=rsa-sha256; cv=none; b=LPFQkQHjoZQylp9Ov6bTVKQQx1BRYpOnyUG4lNCfb6qNt9uGhWd3IO5pozWwOpYom12kY2 zFwsBB6x+VUjejpZJtKHwHqOSUAX+MrblFER7gFXIAxHQtDPLDlqAp5S0xr53oG2eWfueU WHQylsLWEIkGqCgeZ4IQWoYp9UOkE8KM5FFqbqnJOcDCc0zl5RvwmiZArlUmlQW3K5Q+vg M3ay/AJQxo/LJXr9LGPJNgu5NhfbvojcHjRyQzvttc5YdSrEtuHjHhzrbT028TSH421csZ KoQ/jJ/c2md6JXmwqQKfVbslH0gpdCkM8AhvW3l3/oEppRPD8IIEHyiNtRPbjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlsbC6GXpz17nj for ; Tue, 06 Jan 2026 13:34:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e4da by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 13:34:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: cd588aa5fe08 - stable/15 - setcred(2): Fix a panic on too many groups from latest commit List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/15 X-Git-Reftype: branch X-Git-Commit: cd588aa5fe088f2d63479eea31d24367896d96b8 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 13:34:31 +0000 Message-Id: <695d0f67.3e4da.183b230@gitrepo.freebsd.org> The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=cd588aa5fe088f2d63479eea31d24367896d96b8 commit cd588aa5fe088f2d63479eea31d24367896d96b8 Author: Olivier Certner AuthorDate: 2025-11-27 09:04:50 +0000 Commit: Olivier Certner CommitDate: 2026-01-06 13:33:26 +0000 setcred(2): Fix a panic on too many groups from latest commit kern_setcred_copyin_supp_groups() is documented to always set 'sc_supp_groups', but did not do it if there are more supplementary groups than 'ngroups_max'. Also, that case was omitted from the herald comment. Add it there, also including it as a case where 'sc_supp_groups_nb' is reset to 0 as a security measure. Initially, kern_setcred_copyin_supp_groups() had the usual property that nothing had to be freed on it returning an error, but was then converted to relying on the caller to free() even on error, and this part was missed during the conversion. The benefits of this unusual convention are that we can zero or NULLify groups-related attributes in advance, preventing inadvertent use of stale data (defensive security measure), and we can avoid some small code duplication (no need to have two same calls to free()). This makes sense as kern_setcred_copyin_supp_groups() is meant to be a private sub-routine of user_setcred() only. While here, rename kern_setcred_copyin_supp_groups() => user_setcred_copyin_supp_groups(). Reported by: pho Fixes: 4cd93df95e69 ("setcred(): Remove an optimization for when cr_groups[0] was the egid") Sponsored by: The FreeBSD Foundation (cherry picked from commit 000d5b52c19ff3858a6f0cbb405d47713c4267a4) --- sys/kern/kern_prot.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 34d68927be71..b1e4b731145e 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -529,44 +529,54 @@ gidp_cmp(const void *p1, const void *p2) * 'smallgroups' must be an (uninitialized) array of length CRED_SMALLGROUPS_NB. * Always sets 'sc_supp_groups', either to a valid kernel-space groups array * (which may or may not be 'smallgroups'), or NULL if SETCREDF_SUPP_GROUPS was - * not specified, or a buffer containing garbage on copyin() failure. In the - * last two cases, 'sc_supp_groups_nb' is additionally set to 0 as a security - * measure. 'sc_supp_groups' must be freed (M_TEMP) if not equal to - * 'smallgroups' even on failure. + * not specified or there are too many groups, or a buffer containing garbage on + * copyin() failure. In the last two cases, 'sc_supp_groups_nb' is additionally + * set to 0 as a security measure. 'sc_supp_groups' must be freed (M_TEMP) if + * not equal to 'smallgroups' even on failure. */ static int -kern_setcred_copyin_supp_groups(struct setcred *const wcred, +user_setcred_copyin_supp_groups(struct setcred *const wcred, const u_int flags, gid_t *const smallgroups) { gid_t *groups; int error; if ((flags & SETCREDF_SUPP_GROUPS) == 0) { - wcred->sc_supp_groups_nb = 0; - wcred->sc_supp_groups = NULL; - return (0); + error = 0; + goto reset_groups_exit; } /* * Check the number of groups' limit right now in order to limit the * amount of bytes to copy. */ - if (wcred->sc_supp_groups_nb > ngroups_max) - return (EINVAL); + if (wcred->sc_supp_groups_nb > ngroups_max) { + error = EINVAL; + goto reset_groups_exit; + } groups = wcred->sc_supp_groups_nb <= CRED_SMALLGROUPS_NB ? smallgroups : malloc(wcred->sc_supp_groups_nb * sizeof(gid_t), M_TEMP, M_WAITOK); - error = copyin(wcred->sc_supp_groups, groups, wcred->sc_supp_groups_nb * sizeof(gid_t)); wcred->sc_supp_groups = groups; + if (error != 0) { wcred->sc_supp_groups_nb = 0; + /* + * 'sc_supp_groups' must be freed by caller if not + * 'smallgroups'. + */ return (error); } return (0); + +reset_groups_exit: + wcred->sc_supp_groups_nb = 0; + wcred->sc_supp_groups = NULL; + return (error); } int @@ -601,7 +611,7 @@ user_setcred(struct thread *td, const u_int flags, struct setcred *const wcred) * alternative for 32-bit compatibility as 'gid_t' has the same size * everywhere. */ - error = kern_setcred_copyin_supp_groups(wcred, flags, smallgroups); + error = user_setcred_copyin_supp_groups(wcred, flags, smallgroups); if (error != 0) goto free_groups; From nobody Tue Jan 6 13:34:30 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlsbC2kDrz6Ndww for ; Tue, 06 Jan 2026 13:34:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlsbB68mMz3T11 for ; Tue, 06 Jan 2026 13:34:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HxycPTC5NrzB3WaRCPUkKz16nuKwsoW44DhvMiyscKk=; b=XK4N2oYurzxGXhBgiS2dATXG/vGrAQJelPUKEQWqujGoT2KmJa79+UYKdzb4rLG6I4HGut 4yhurpggujKNi9Kym7kVj95KE1MVZhDaGE3X2npj3P8AHJW9qmNOn2Pdx+VIDg2SOjh7wm BgEMXKTsmhY8Sf6g/PmTuuRye2w2OVJV6UkIKm9mkbhVUCw/KklIRGwiHTOY9nbjIlFCeO 06xm5mKrz1eKh8+P01EENRahvavI7zVDWqhpbtboHisddLb99s5GHguuxtcbdmgNxqu8NB g9KLEgCUZ39UIQbExi+JNFLSyGC+nQw7g2b++FUE+urJfZbBiauNC+Mjzn6dqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HxycPTC5NrzB3WaRCPUkKz16nuKwsoW44DhvMiyscKk=; b=SPqTrPcOdfxDM5oIu5Jz6iZsBVwWW7JrCz4/VY062vqNrHkHaH28tOyxtSnIudJVtb36uK v+ONuiOJj54Onuc68G29JgbDbYzkVZbEvYWf0RWggs3RUXA1mzfuedM6TA/jAXU5xoG+7T uzb87NWeSE+c8sYwykzFuE4cTiozK1u/UvfUF7trf1dtGbZtLGQP9YMfA1BOD3RWxgwkl0 YRPRUl3Pb54VMP0fUKvd7rMgKCGQ65Ld8bx8kcpbAgwYSZhBvfoeR1oNLaS5OHmmJ8ulEU nh4fS7a1Oxv0tBKkgj9urn60rpyf3Fd1GH5ap/pA/vHqB9vEBR+6NgXCsE9bgQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767706470; a=rsa-sha256; cv=none; b=ml9W6H9ZsZLIb5dT54O0uPdFnA8LNHRhur1OoEfz1nrNw3pBNVtV2roBh8jq+6udj+iORn 7AElbvTgH1Vo9Zv2OS7lzD3Zcj7J3lD7QG4Bm6bO9qawGCFGlEgZ03aiNIXW253zWvwhcA CDPHEvHuMnNAC4XiOSVaPGwDZR9bUU5YlZPHg0/L4MU1wtEfoNKVdy33ta2YIpnSoD7maa czpNDij+C7CkEnAmCr0B4NW5A2yvtplxzuqCvZRZ93Wrqgx8CjFU8YQloLUWCj6+SZ1JdZ O0mf5FP3r6W7jvDEK2i57eyUiqfgs4Auw5VO0pLQJ2319pOMXyWHSJb5jPq3lA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlsbB5PnDz17r4 for ; Tue, 06 Jan 2026 13:34:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e463 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 13:34:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: b6cba9028457 - stable/15 - setcred(): Remove an optimization for when cr_groups[0] was the egid List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/15 X-Git-Reftype: branch X-Git-Commit: b6cba9028457f938e2db403134415d843a1d79a4 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 13:34:30 +0000 Message-Id: <695d0f66.3e463.69fdbd28@gitrepo.freebsd.org> The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=b6cba9028457f938e2db403134415d843a1d79a4 commit b6cba9028457f938e2db403134415d843a1d79a4 Author: Olivier Certner AuthorDate: 2025-11-14 18:22:53 +0000 Commit: Olivier Certner CommitDate: 2026-01-06 13:33:25 +0000 setcred(): Remove an optimization for when cr_groups[0] was the egid Because setcred() has (always) treated the effective GID separately from the supplementary groups, when cr_groups[0] was storing the effective GID, it internally needed to build an array containing both the effective GID and the specified supplementary groups to eventually call crsetgroups_internal(). As kern_setcred() was only used to actually implement user_setcred()/sys_setcred(), which need to allocate a buffer to copy in the userland groups array into, some optimization was put in place where these would allocate an array with one more element than 'wc_supp_groups', copyin() the latter into the subarray starting at index 1 and pass the pointer to the whole array to kern_setcred() in 'preallocated_groups'. This would allow kern_setcred() not to have to allocate memory again to make room for the additional effective GID. Since commit be1f7435ef21 ("kern: start tracking cr_gid outside of cr_groups[]"), crsetgroups_internal() only takes supplementary groups, so this machinery has become obsolete. It was not removed as part of that commit, but just minimally amended to simplify the changes and lower the risks. Finally remove it. Reviewed by: kevans MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D53772 (cherry picked from commit 4cd93df95e697942adf0ff038fc8f357cbb07cf9) --- sys/kern/kern_prot.c | 112 ++++++++++++++++++++------------------------------ sys/sys/syscallsubr.h | 2 +- 2 files changed, 46 insertions(+), 68 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 8021beed90e8..34d68927be71 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -526,44 +526,44 @@ gidp_cmp(const void *p1, const void *p2) } /* - * Final storage for supplementary groups will be returned via 'groups'. - * '*groups' must be NULL on input, and if not equal to 'smallgroups' - * on output, must be freed (M_TEMP) *even if* an error is returned. + * 'smallgroups' must be an (uninitialized) array of length CRED_SMALLGROUPS_NB. + * Always sets 'sc_supp_groups', either to a valid kernel-space groups array + * (which may or may not be 'smallgroups'), or NULL if SETCREDF_SUPP_GROUPS was + * not specified, or a buffer containing garbage on copyin() failure. In the + * last two cases, 'sc_supp_groups_nb' is additionally set to 0 as a security + * measure. 'sc_supp_groups' must be freed (M_TEMP) if not equal to + * 'smallgroups' even on failure. */ static int kern_setcred_copyin_supp_groups(struct setcred *const wcred, - const u_int flags, gid_t *const smallgroups, gid_t **const groups) + const u_int flags, gid_t *const smallgroups) { - MPASS(*groups == NULL); + gid_t *groups; + int error; - if (flags & SETCREDF_SUPP_GROUPS) { - int error; + if ((flags & SETCREDF_SUPP_GROUPS) == 0) { + wcred->sc_supp_groups_nb = 0; + wcred->sc_supp_groups = NULL; + return (0); + } - /* - * Check for the limit for number of groups right now in order - * to limit the amount of bytes to copy. - */ - if (wcred->sc_supp_groups_nb > ngroups_max) - return (EINVAL); + /* + * Check the number of groups' limit right now in order to limit the + * amount of bytes to copy. + */ + if (wcred->sc_supp_groups_nb > ngroups_max) + return (EINVAL); - /* - * Since we are going to be copying the supplementary groups - * from userland, make room also for the effective GID right - * now, to avoid having to allocate and copy again the - * supplementary groups. - */ - *groups = wcred->sc_supp_groups_nb <= CRED_SMALLGROUPS_NB ? - smallgroups : malloc(wcred->sc_supp_groups_nb * - sizeof(*groups), M_TEMP, M_WAITOK); + groups = wcred->sc_supp_groups_nb <= CRED_SMALLGROUPS_NB ? + smallgroups : malloc(wcred->sc_supp_groups_nb * sizeof(gid_t), + M_TEMP, M_WAITOK); - error = copyin(wcred->sc_supp_groups, *groups, - wcred->sc_supp_groups_nb * sizeof(*groups)); - if (error != 0) - return (error); - wcred->sc_supp_groups = *groups; - } else { + error = copyin(wcred->sc_supp_groups, groups, + wcred->sc_supp_groups_nb * sizeof(gid_t)); + wcred->sc_supp_groups = groups; + if (error != 0) { wcred->sc_supp_groups_nb = 0; - wcred->sc_supp_groups = NULL; + return (error); } return (0); @@ -578,7 +578,6 @@ user_setcred(struct thread *td, const u_int flags, struct setcred *const wcred) void *umac; #endif gid_t smallgroups[CRED_SMALLGROUPS_NB]; - gid_t *groups = NULL; int error; /* @@ -602,8 +601,7 @@ user_setcred(struct thread *td, const u_int flags, struct setcred *const wcred) * alternative for 32-bit compatibility as 'gid_t' has the same size * everywhere. */ - error = kern_setcred_copyin_supp_groups(wcred, flags, smallgroups, - &groups); + error = kern_setcred_copyin_supp_groups(wcred, flags, smallgroups); if (error != 0) goto free_groups; @@ -616,7 +614,7 @@ user_setcred(struct thread *td, const u_int flags, struct setcred *const wcred) } #endif - error = kern_setcred(td, flags, wcred, groups); + error = kern_setcred(td, flags, wcred); #ifdef MAC if (wcred->sc_label != NULL) @@ -624,8 +622,8 @@ user_setcred(struct thread *td, const u_int flags, struct setcred *const wcred) #endif free_groups: - if (groups != smallgroups) - free(groups, M_TEMP); + if (wcred->sc_supp_groups != smallgroups) + free(wcred->sc_supp_groups, M_TEMP); return (error); } @@ -654,24 +652,18 @@ sys_setcred(struct thread *td, struct setcred_args *uap) /* * CAUTION: This function normalizes groups in 'wcred'. - * - * If 'preallocated_groups' is non-NULL, it must be an already allocated array - * of size 'wcred->sc_supp_groups_nb' containing the supplementary groups, and - * 'wcred->sc_supp_groups' then must point to it. */ int kern_setcred(struct thread *const td, const u_int flags, - struct setcred *const wcred, gid_t *preallocated_groups) + struct setcred *const wcred) { struct proc *const p = td->td_proc; - struct ucred *new_cred, *old_cred, *to_free_cred; + struct ucred *new_cred, *old_cred, *to_free_cred = NULL; struct uidinfo *uip = NULL, *ruip = NULL; #ifdef MAC void *mac_set_proc_data = NULL; bool proc_label_set = false; #endif - gid_t *groups = NULL; - gid_t smallgroups[CRED_SMALLGROUPS_NB]; int error; bool cred_set = false; @@ -683,32 +675,18 @@ kern_setcred(struct thread *const td, const u_int flags, * Part 1: We allocate and perform preparatory operations with no locks. */ - if (flags & SETCREDF_SUPP_GROUPS) { - if (wcred->sc_supp_groups_nb > ngroups_max) + if ((flags & SETCREDF_SUPP_GROUPS) != 0 && + wcred->sc_supp_groups_nb > ngroups_max) return (EINVAL); - if (preallocated_groups != NULL) { - groups = preallocated_groups; - MPASS(preallocated_groups == wcred->sc_supp_groups); - } else { - if (wcred->sc_supp_groups_nb <= CRED_SMALLGROUPS_NB) - groups = smallgroups; - else - groups = malloc(wcred->sc_supp_groups_nb * - sizeof(*groups), M_TEMP, M_WAITOK); - memcpy(groups, wcred->sc_supp_groups, - wcred->sc_supp_groups_nb * sizeof(*groups)); - } - } if (flags & SETCREDF_MAC_LABEL) { #ifdef MAC error = mac_set_proc_prepare(td, wcred->sc_label, &mac_set_proc_data); if (error != 0) - goto free_groups; + return (error); #else - error = ENOTSUP; - goto free_groups; + return (ENOTSUP); #endif } @@ -734,8 +712,10 @@ kern_setcred(struct thread *const td, const u_int flags, * Output the raw supplementary groups array for better * traceability. */ - AUDIT_ARG_GROUPSET(groups, wcred->sc_supp_groups_nb); - groups_normalize(&wcred->sc_supp_groups_nb, groups); + AUDIT_ARG_GROUPSET(wcred->sc_supp_groups, + wcred->sc_supp_groups_nb); + groups_normalize(&wcred->sc_supp_groups_nb, + wcred->sc_supp_groups); } /* @@ -776,7 +756,7 @@ kern_setcred(struct thread *const td, const u_int flags, */ if (flags & SETCREDF_SUPP_GROUPS) crsetgroups_internal(new_cred, wcred->sc_supp_groups_nb, - groups); + wcred->sc_supp_groups); if (flags & SETCREDF_GID) change_egid(new_cred, wcred->sc_gid); if (flags & SETCREDF_RGID) @@ -863,9 +843,7 @@ unlock_finish: uifree(uip); if (ruip != NULL) uifree(ruip); -free_groups: - if (groups != preallocated_groups && groups != smallgroups) - free(groups, M_TEMP); /* Deals with 'groups' being NULL. */ + return (error); } diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index d32690634059..5acce75e3302 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -325,7 +325,7 @@ int kern_select(struct thread *td, int nd, fd_set *fd_in, fd_set *fd_ou, int kern_sendit(struct thread *td, int s, struct msghdr *mp, int flags, struct mbuf *control, enum uio_seg segflg); int kern_setcred(struct thread *const td, const u_int flags, - struct setcred *const wcred, gid_t *preallocated_groups); + struct setcred *const wcred); int kern_setgroups(struct thread *td, int *ngrpp, gid_t *groups); int kern_setitimer(struct thread *, u_int, struct itimerval *, struct itimerval *); From nobody Tue Jan 6 13:34:32 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlsbF1mglz6NdkH for ; Tue, 06 Jan 2026 13:34:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlsbF0Y2lz3TBF for ; Tue, 06 Jan 2026 13:34:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706473; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M2rEcU1pCkrvyWfl6G10OdiVJvb5zHlf8v/C7FLUvZU=; b=IPxXHke4c2jInwnPv4pOSqiW2V3jDYGzZxjvvZ+qFax0plj3xqIgjndoZNxuPXpNJcpoxd eUAD9cQVtPFzDzUDD0XXB1eUcnxeWdgRHPaFlS6Aih2jfyaC7JoqRPMcxZjFZOL560PKPd /Omd8bvdjwTs2RVel8ql8qDzZtnS2qrpafE2G7ocCY5F4zcOrm811chE8PUPLxb21EU2wS o87mcL+UdN/vuTuU33WftjKu4eEjYw8OWvlplPG17zHPPQQE3OZ8aGMHPGHo4kUtMkfy3B LnyNQUx21LMC9Xq8/QexWI3bFLJiPGkRMM7tiIB1+nESwyj1XOJo/pC8IXzOXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706473; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M2rEcU1pCkrvyWfl6G10OdiVJvb5zHlf8v/C7FLUvZU=; b=x6V/Q2WtKsH+DOnoHEVMm2u1U+XciaXIKbjhwMd06Wg9DEhSdcW4+YK4qYkz1dPft718vF oK49pSSq3jwshy/Z1XT+/qWW8k3bMYlOEbVIQ5uwCU0YgoI8jF/U7WMQcroxArSHoUnw/+ ovGtTYFYV5oHV7tXzhV7NOGXLCPsNugYNPyzv5XpQ3TQFB4Ea54HgtVuQNycULVjFb6Jfp zIi08R1/uSGhPXRFMj/tUHqG4keb/C4ZoUwMZ6pdH1uvdb0iXJZWI60V25SBjIRSq7fQE5 D6hND421Ky2N/20M9o3kk/0ywAn+gm1XHmadSqQw2cQech2xOOhntVMOxsM3vg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767706473; a=rsa-sha256; cv=none; b=LTGJzmO+JYkAy2E+1Ir17xDuHyaaxE+KCu5x4b2svuj6aipusXv/PZJWgcecDbvJwXEXXo RN+uQYqtbn4VhH+qQL+k+ygQwineIBuNoz84OhNPEQ8DRkFo0bb210ET+dfP7lAv1HoDSF RZfGfYS9NA+SqDRWK8fcxv2Odhu/M5e5JLzQmDHqGdj7xjE+3Z6gRlNkTBe2YL08w9/aRm ZmqAxYujkQJTDRDOJzr+kZyLxEj/WixbSSVJyj9x6gAgkYUkcc8N076CcG9iudqinp0lnb 51yNEAy5j2i2jBLmT1T//qjKJx58WjqD0HtBc2qEh5OQtPwLQI3W3XuiQjfW8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlsbD71x8z17r7 for ; Tue, 06 Jan 2026 13:34:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f8a0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 13:34:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 0d95a17b664b - stable/15 - exports.5: Typo: "auomatically" => "automatically" List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 0d95a17b664be05b2d8d94fd36dfb87f5a7f5437 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 13:34:32 +0000 Message-Id: <695d0f68.3f8a0.17ded044@gitrepo.freebsd.org> The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=0d95a17b664be05b2d8d94fd36dfb87f5a7f5437 commit 0d95a17b664be05b2d8d94fd36dfb87f5a7f5437 Author: Olivier Certner AuthorDate: 2025-11-27 20:27:14 +0000 Commit: Olivier Certner CommitDate: 2026-01-06 13:33:26 +0000 exports.5: Typo: "auomatically" => "automatically" Fixes: 9d975e47d5a3 ("exports.5: Clarify that exported dirs should be local mount points") MFC after: 3 days Sponsored by: The FreeBSD Foundation (cherry picked from commit 7521dc5dce35159add70003340e1555456721a2d) --- usr.sbin/mountd/exports.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/mountd/exports.5 b/usr.sbin/mountd/exports.5 index 786411fbf6d8..0362ad552670 100644 --- a/usr.sbin/mountd/exports.5 +++ b/usr.sbin/mountd/exports.5 @@ -83,7 +83,7 @@ As such, to avoid confusion with respect to what is exported, it may be prudent to limit exported directories to server local file system mount points. When exporting ZFS datasets with the .Sy sharenfs -property, this is auomatically the case. +property, this is automatically the case. If the .Fl alldirs flag is specified and From nobody Tue Jan 6 13:34:34 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlsbG3Lflz6NdYs for ; Tue, 06 Jan 2026 13:34:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlsbG16RTz3Sw0 for ; Tue, 06 Jan 2026 13:34:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wUuBlFclsnQtUU6pfzlRfGLey1W512AJccn//8Xl18U=; b=jPI0Hqrz6xmfBvzDI0QsOyYGeC12kxQK8KVjCh9o9ZRfOJPVAuahqLHKHJ2rO9yRuW6pSG r55ZtBlBLe0xqkGRpUawsFo/p1mJwCTUGT0bMiQW8J/OxFKK2/hzNt0+yzyieByEnbxCe8 /brzDN4VqHHfD6Q7Xe5JARylnYOv57Vkn+iEcTAf8kiHvTpnwsfHX1jABGB1vkP+xsxhwl jGUZYL1H8D+UkuCuS7KdJIQpuWWvi7iPAcu0lnWPhU3ZqFlO8NYWck65D9eIWXxRlAfc8E WqwriZbHFqppck/D/1Uc4F92yIQesNk51+HQJGW6dKfwiA/cxxlpqhBicTPedA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706474; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wUuBlFclsnQtUU6pfzlRfGLey1W512AJccn//8Xl18U=; b=vO/EhBktZw69QqsbbtQI2uUs1A6Txpuqx6Rsvny8JYfz/uFJ+/novorDtHdGfvTcr3/fLm d2uy2Ay00w2J71CEfHISON0tSDl/WhtagmojEIH4LRehuQEXjI2qLODRdvGeiygOhaADBN 9JWKihayWMUestN1mqjWo8b6qV9AThEgPDGfKujqjxUq3hGONs85k38XiAOr1d4e2wBEkO qwVV0mlcKoI3pAllsnKTNv3QFWuQAIz9a2DoD2HhYa7OZKkO9bOdiwk8PD3TRKVDIWxvHv ehlNZCPiENh4eESoOTQP+ykF8h67GZFIK02za3u1wfydqSr2GbbqVltmOL/bCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767706474; a=rsa-sha256; cv=none; b=YivjySRg8CKFjigevyISj2506CEUB/VUHsNQl+djW/rgX9MWNxtpATgxE24xmXGaU0ShCC NX+aF5iLSVWnFxInIyqxqWwb2jwmGCZmIbUIEIM+fjaTbG73cgqjnMvmftUL4eaO8LLJKc 4yFSQiYiggXOXtPwwdYtivKV/8AoWeAi61Z1IBeDbm25yVrcA6HIehdsRG0X++kp5myT/Z C9zL35fygKpw7mxt3G6nBFwZIm/Wln/vLQFrnoQMsW41yX8a7jjPhR9jspJAk3Co/9O23C SsCaCPu2fxeHN5pvlmG9wEooWP8Mtau+FwTVHS/ET4L7yvIqN5GaUeJEbZBB8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlsbG0XCQz17LW for ; Tue, 06 Jan 2026 13:34:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f60c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 13:34:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 42a3d3d49ca4 - stable/15 - jail: Don't define malloc type M_PRISON_RACCT on !RACCT List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 42a3d3d49ca42cd9cf7cffbd095f18ddb90202f3 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 13:34:34 +0000 Message-Id: <695d0f6a.3f60c.767769a9@gitrepo.freebsd.org> The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=42a3d3d49ca42cd9cf7cffbd095f18ddb90202f3 commit 42a3d3d49ca42cd9cf7cffbd095f18ddb90202f3 Author: Olivier Certner AuthorDate: 2025-12-02 14:39:33 +0000 Commit: Olivier Certner CommitDate: 2026-01-06 13:33:26 +0000 jail: Don't define malloc type M_PRISON_RACCT on !RACCT Reviewed by: emaste, jamie MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54271 (cherry picked from commit a8be81456cfeecc66ba3b41eb9a2d3dfea7ebc8c) --- sys/kern/kern_jail.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 07b98fef8dfb..f803be76a70e 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -83,7 +83,9 @@ #define PRISON0_HOSTUUID_MODULE "hostuuid" MALLOC_DEFINE(M_PRISON, "prison", "Prison structures"); +#ifdef RACCT static MALLOC_DEFINE(M_PRISON_RACCT, "prison_racct", "Prison racct structures"); +#endif /* Keep struct prison prison0 and some code in kern_jail_set() readable. */ #ifdef INET From nobody Tue Jan 6 13:34:35 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlsbH4Ztbz6Nf41 for ; Tue, 06 Jan 2026 13:34:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlsbH1tj3z3TBZ for ; Tue, 06 Jan 2026 13:34:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gzyoub6l7E+T9ffzvMwhMzMGYu4FaVqX5TqSbhAo1jY=; b=I6JInegc+mcHKrxI6rjTCEFlZgAR9F6u9aonJ1jXqDXyyNcW/lJ0DZ+m33gUeiuDwnJLQk RA1Zz/8GwwvLnPHhl9RA8rq5bXxoQi97+t4f/2l1ETEFeUfAJlp5lRCVFfade98dtNAd8T K2yN5XB6nwt/k25ZPn3MubsTodBoyVAkipOzuQe/Gket+yKGDoH2JCCCLqLJNU1T6BbYxA kjUemFWBDw++F0JRTV0byJ39xZDZQHpBv66kimFCp3FToGHT3rNHHjxRBfgQJ+w/gsqHro PI4RmZ02ZLCV35YoyY/+GSaXiDUAFH0Ua4fi7ttl+8H3lv9gL4ZDh6l/qDkSLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767706475; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gzyoub6l7E+T9ffzvMwhMzMGYu4FaVqX5TqSbhAo1jY=; b=YYiPLSgt8tbAewWzSYtMSgw8HEh+v9ggfQyG53IpV4n6uIZd7Vw7Y+E8dzefIE+Wuj4yMO Z+tpKC6pd8+T07bBOomVHviaAKQczVHaLMlYa+J6gWIBaRefy74hxSG4Ou4BwUxn7DImve JDLGNCPQOWZah4S3wfhgOvcgSFgFWzuUyvnr/3UPMZPYG84qhaQrE8ounhIrkYzkOpXj1t jbJs/4q8Z9PzZ9ovQQOGeDgUkaRY6na70KkoB7Bg6PHBptRTKopdQc2DsWSmhHEd4mtoVH OK+djvkeOmB56m1ODOZw0tKZ6sQBdRvycWCu5maIagYysLEU15w/GREoHwAQRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767706475; a=rsa-sha256; cv=none; b=mVmSgrBN+U7OUfUff1Va+MeEOviQQdKsE6EzCzuwPm6+vNGtilBalubTDTP0Fbx6jupI/Q rIF1bISiS0XLG1Lx56/YKHjoOthQwalsPCHvTJ/YPCel4stn5JbraF+Hf6ubS4UX21lwpJ 05aTaLCxSsHhypnW+oGHKUOlCtmFWSFvxjlrkOK+KwuukatEcq65pZr5ST2m5BTOdJ7TM7 oqW8tswPfy4b2ceXLEw10iebYfzD70u8uJ/vpDD7hLwiNlzo8tFAvRG7BFpnY30FzUz1hA V6Zz4I6U/B6mz0dJpZxR5KiUoefIdMCpTxpD0gP2GOk84O4fD3GGNeqLl5L7vQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlsbH1Lppz17lQ for ; Tue, 06 Jan 2026 13:34:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e4db by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 13:34:35 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: f1129096748d - stable/15 - kern: racct: Remove code unused since %cpu resource computation revamp List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/15 X-Git-Reftype: branch X-Git-Commit: f1129096748dba3afb97534fa0af4f7795f9cfc2 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 13:34:35 +0000 Message-Id: <695d0f6b.3e4db.7f90581f@gitrepo.freebsd.org> The branch stable/15 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=f1129096748dba3afb97534fa0af4f7795f9cfc2 commit f1129096748dba3afb97534fa0af4f7795f9cfc2 Author: Olivier Certner AuthorDate: 2025-12-18 14:05:11 +0000 Commit: Olivier Certner CommitDate: 2026-01-06 13:33:27 +0000 kern: racct: Remove code unused since %cpu resource computation revamp Reviewed by: emaste, markj Fixes: c72188d85a79 ("racct: Improve handling of the pcpu resource") MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54284 (cherry picked from commit 55ce12672b948c002431851af54843bfc7f50d6f) --- sys/kern/kern_racct.c | 133 -------------------------------------------------- 1 file changed, 133 deletions(-) diff --git a/sys/kern/kern_racct.c b/sys/kern/kern_racct.c index b155c882f569..6f5a1b3d201e 100644 --- a/sys/kern/kern_racct.c +++ b/sys/kern/kern_racct.c @@ -78,14 +78,6 @@ SYSCTL_BOOL(_kern_racct, OID_AUTO, enable, CTLFLAG_RDTUN, &racct_enable, SYSCTL_UINT(_kern_racct, OID_AUTO, pcpu_threshold, CTLFLAG_RW, &pcpu_threshold, 0, "Processes with higher %cpu usage than this value can be throttled."); -/* - * How many seconds it takes to use the scheduler %cpu calculations. When a - * process starts, we compute its %cpu usage by dividing its runtime by the - * process wall clock time. After RACCT_PCPU_SECS pass, we use the value - * provided by the scheduler. - */ -#define RACCT_PCPU_SECS 3 - struct mtx racct_lock; MTX_SYSINIT(racct_lock, &racct_lock, "racct lock", MTX_DEF); @@ -190,131 +182,6 @@ int racct_types[] = { static const fixpt_t RACCT_DECAY_FACTOR = 0.3 * FSCALE; -#ifdef SCHED_4BSD -/* - * Contains intermediate values for %cpu calculations to avoid using floating - * point in the kernel. - * ccpu_exp[k] = FSCALE * (ccpu/FSCALE)^k = FSCALE * exp(-k/20) - * It is needed only for the 4BSD scheduler, because in ULE, the ccpu equals to - * zero so the calculations are more straightforward. - */ -fixpt_t ccpu_exp[] = { - [0] = FSCALE * 1, - [1] = FSCALE * 0.95122942450071400909, - [2] = FSCALE * 0.90483741803595957316, - [3] = FSCALE * 0.86070797642505780722, - [4] = FSCALE * 0.81873075307798185866, - [5] = FSCALE * 0.77880078307140486824, - [6] = FSCALE * 0.74081822068171786606, - [7] = FSCALE * 0.70468808971871343435, - [8] = FSCALE * 0.67032004603563930074, - [9] = FSCALE * 0.63762815162177329314, - [10] = FSCALE * 0.60653065971263342360, - [11] = FSCALE * 0.57694981038048669531, - [12] = FSCALE * 0.54881163609402643262, - [13] = FSCALE * 0.52204577676101604789, - [14] = FSCALE * 0.49658530379140951470, - [15] = FSCALE * 0.47236655274101470713, - [16] = FSCALE * 0.44932896411722159143, - [17] = FSCALE * 0.42741493194872666992, - [18] = FSCALE * 0.40656965974059911188, - [19] = FSCALE * 0.38674102345450120691, - [20] = FSCALE * 0.36787944117144232159, - [21] = FSCALE * 0.34993774911115535467, - [22] = FSCALE * 0.33287108369807955328, - [23] = FSCALE * 0.31663676937905321821, - [24] = FSCALE * 0.30119421191220209664, - [25] = FSCALE * 0.28650479686019010032, - [26] = FSCALE * 0.27253179303401260312, - [27] = FSCALE * 0.25924026064589150757, - [28] = FSCALE * 0.24659696394160647693, - [29] = FSCALE * 0.23457028809379765313, - [30] = FSCALE * 0.22313016014842982893, - [31] = FSCALE * 0.21224797382674305771, - [32] = FSCALE * 0.20189651799465540848, - [33] = FSCALE * 0.19204990862075411423, - [34] = FSCALE * 0.18268352405273465022, - [35] = FSCALE * 0.17377394345044512668, - [36] = FSCALE * 0.16529888822158653829, - [37] = FSCALE * 0.15723716631362761621, - [38] = FSCALE * 0.14956861922263505264, - [39] = FSCALE * 0.14227407158651357185, - [40] = FSCALE * 0.13533528323661269189, - [41] = FSCALE * 0.12873490358780421886, - [42] = FSCALE * 0.12245642825298191021, - [43] = FSCALE * 0.11648415777349695786, - [44] = FSCALE * 0.11080315836233388333, - [45] = FSCALE * 0.10539922456186433678, - [46] = FSCALE * 0.10025884372280373372, - [47] = FSCALE * 0.09536916221554961888, - [48] = FSCALE * 0.09071795328941250337, - [49] = FSCALE * 0.08629358649937051097, - [50] = FSCALE * 0.08208499862389879516, - [51] = FSCALE * 0.07808166600115315231, - [52] = FSCALE * 0.07427357821433388042, - [53] = FSCALE * 0.07065121306042958674, - [54] = FSCALE * 0.06720551273974976512, - [55] = FSCALE * 0.06392786120670757270, - [56] = FSCALE * 0.06081006262521796499, - [57] = FSCALE * 0.05784432087483846296, - [58] = FSCALE * 0.05502322005640722902, - [59] = FSCALE * 0.05233970594843239308, - [60] = FSCALE * 0.04978706836786394297, - [61] = FSCALE * 0.04735892439114092119, - [62] = FSCALE * 0.04504920239355780606, - [63] = FSCALE * 0.04285212686704017991, - [64] = FSCALE * 0.04076220397836621516, - [65] = FSCALE * 0.03877420783172200988, - [66] = FSCALE * 0.03688316740124000544, - [67] = FSCALE * 0.03508435410084502588, - [68] = FSCALE * 0.03337326996032607948, - [69] = FSCALE * 0.03174563637806794323, - [70] = FSCALE * 0.03019738342231850073, - [71] = FSCALE * 0.02872463965423942912, - [72] = FSCALE * 0.02732372244729256080, - [73] = FSCALE * 0.02599112877875534358, - [74] = FSCALE * 0.02472352647033939120, - [75] = FSCALE * 0.02351774585600910823, - [76] = FSCALE * 0.02237077185616559577, - [77] = FSCALE * 0.02127973643837716938, - [78] = FSCALE * 0.02024191144580438847, - [79] = FSCALE * 0.01925470177538692429, - [80] = FSCALE * 0.01831563888873418029, - [81] = FSCALE * 0.01742237463949351138, - [82] = FSCALE * 0.01657267540176124754, - [83] = FSCALE * 0.01576441648485449082, - [84] = FSCALE * 0.01499557682047770621, - [85] = FSCALE * 0.01426423390899925527, - [86] = FSCALE * 0.01356855901220093175, - [87] = FSCALE * 0.01290681258047986886, - [88] = FSCALE * 0.01227733990306844117, - [89] = FSCALE * 0.01167856697039544521, - [90] = FSCALE * 0.01110899653824230649, - [91] = FSCALE * 0.01056720438385265337, - [92] = FSCALE * 0.01005183574463358164, - [93] = FSCALE * 0.00956160193054350793, - [94] = FSCALE * 0.00909527710169581709, - [95] = FSCALE * 0.00865169520312063417, - [96] = FSCALE * 0.00822974704902002884, - [97] = FSCALE * 0.00782837754922577143, - [98] = FSCALE * 0.00744658307092434051, - [99] = FSCALE * 0.00708340892905212004, - [100] = FSCALE * 0.00673794699908546709, - [101] = FSCALE * 0.00640933344625638184, - [102] = FSCALE * 0.00609674656551563610, - [103] = FSCALE * 0.00579940472684214321, - [104] = FSCALE * 0.00551656442076077241, - [105] = FSCALE * 0.00524751839918138427, - [106] = FSCALE * 0.00499159390691021621, - [107] = FSCALE * 0.00474815099941147558, - [108] = FSCALE * 0.00451658094261266798, - [109] = FSCALE * 0.00429630469075234057, - [110] = FSCALE * 0.00408677143846406699, -}; -#endif - -#define CCPU_EXP_MAX 110 - static void racct_add_racct(struct racct *dest, const struct racct *src) { From nobody Tue Jan 6 14:18:44 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dltZD2ljyz6Nggb for ; Tue, 06 Jan 2026 14:18:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dltZD20Gpz3cN6 for ; Tue, 06 Jan 2026 14:18:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767709124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AACbNVmMMgZHTq1ankuDmjS7jeLDmryDxtm2msCCm+4=; b=NOArYK0+ZgvnJgJ/Fha2f8bPy0VOcUxo2/4qYOnJZJoMtR/dZtBiGLzMxHmNuSl3z5Zb4F gdFHce7IOP2X4nSX16KK2r92PDHdrgSEBXSdzn0toSFfJ4yxG3PkGbBx3v4Tu/4Uq+Ah5N Sd+vnvsLiTwgJVJkhXJk053VItt5bm6EBDF0ojOoGqnB/8mdmOeJ0o4FlPn8XAmJIr/5hH rfmsi04BkucnsM5IU8xjJ+HCNFFD5okeJYHJ4NDQA5IqRvL549+keDbvqNF6JbLS4r9TpK ad2Mzi7kjo7gpSKus7eMOcUWOdI4q3iY9Xf5auUkEsGKAc0vrdPcYa0ozlczFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767709124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AACbNVmMMgZHTq1ankuDmjS7jeLDmryDxtm2msCCm+4=; b=sbXqoBJWpKKlJYY+FkWSY8TGWsx1WhRLH2mrvK9SkwenMVh4a9OwEKGkuZery0zXTppRh7 K4V58vbgST0bJsNIwQiWEx7mW0hSBheSkJozkGlv5TgmTOdi6TvbI2X7JU0wDaR+birgVb lZowfoXIEWMyLFSvXWPaIFhCeRL2Hj4tCt0p7uRER9o0t1y6BdOIKQLl1R1Mv7LpbZuj/V X2m+nH/8hD7n+b9j5snW1BikRasH20Jr3Pnr4qUAWZZFbQ+8KvBx95jyDGp7TK+x1K/a/v CjS/SizqrN9wWTlhDRPmNoBKeihh/RWolPTL5MPXWywUgm7Aoan4mWGLm1vuBw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767709124; a=rsa-sha256; cv=none; b=V1drjRRW3qUxr6PQZsdeNigGOTJZIO9Yq2HwJLStZPbYGEasmMrSJUHktw/2Juxgc5ZPc1 tTCLD4r0qC9fkVvvrlTWdPrHNO8EfQ2IduQJ35Rc1cktqE/wS3hJq9s6PAQWVHJsZ9vbuE hr1Dmy6Oz+79I2lFg1alVWSofGPTVrrdb+vMsmMRXJKJFV2MAD8FVtTTjmvTjea9l6cF4u 6GlAC0wNk2yCOOTNl8ykbxYykOmG3AWDUy5ID4iOLJA1QcQlZkPd9JMqfjtF84klLhDAGp rk+1Eq1n7zdu+U2D6WoAfe8I0Onb+deac+SU2bm8ydxlTdvU2b4JM0ApQBMd+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dltZD1Jm1z192L for ; Tue, 06 Jan 2026 14:18:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id a6a1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 14:18:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 4e4272024e33 - stable/14 - jail: Don't define malloc type M_PRISON_RACCT on !RACCT List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 4e4272024e33d06f0b38a7d93c1c65b779220d13 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 14:18:44 +0000 Message-Id: <695d19c4.a6a1.10c343cc@gitrepo.freebsd.org> The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=4e4272024e33d06f0b38a7d93c1c65b779220d13 commit 4e4272024e33d06f0b38a7d93c1c65b779220d13 Author: Olivier Certner AuthorDate: 2025-12-02 14:39:33 +0000 Commit: Olivier Certner CommitDate: 2026-01-06 14:18:11 +0000 jail: Don't define malloc type M_PRISON_RACCT on !RACCT Reviewed by: emaste, jamie MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54271 (cherry picked from commit a8be81456cfeecc66ba3b41eb9a2d3dfea7ebc8c) --- sys/kern/kern_jail.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 54b06ba803c5..03a5eaabdf34 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -80,7 +80,9 @@ #define PRISON0_HOSTUUID_MODULE "hostuuid" MALLOC_DEFINE(M_PRISON, "prison", "Prison structures"); +#ifdef RACCT static MALLOC_DEFINE(M_PRISON_RACCT, "prison_racct", "Prison racct structures"); +#endif /* Keep struct prison prison0 and some code in kern_jail_set() readable. */ #ifdef INET From nobody Tue Jan 6 14:30:31 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dltqq3nKhz6NhkK for ; Tue, 06 Jan 2026 14:30:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dltqq1cHMz3dZs for ; Tue, 06 Jan 2026 14:30:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767709831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FOIH4lUF4zOV7UXyrxZEZx789W70DIt2O20wE0ZUQ8w=; b=mPwS1a0cQ8oiaefU1F3CFkPeUigcjJc1nuO182UFBlZ38sh4JIbGaMZ+/RiD9PcCbpJZjt yTnAA+C5flPxR0MH4j7d5a2Ds2mzZk6CJ25JGuhrtURgU+s9ePNy9cQo9sRG/XqSHuxn0H iEOsUWrzSy7PhlvJOWP0UJV/QLxCs/49KTNs3zzW5hJ2R02iKYcPwlGBxtq09KshsoIh23 vKiycdNtU2YTmAGOz+UPHXgUmeikPAaZpafSWSCPzeo3csgU0qT0Czi4Mps9Wiji4DdKZu Y7cnVTi/scL0TLTt1ZC+mE8j0lQejfbxUs8Sc7RCazRkJxiIImjyp3Ormd28sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767709831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FOIH4lUF4zOV7UXyrxZEZx789W70DIt2O20wE0ZUQ8w=; b=emSqWvgLWSC/Q+jy8y71s/hqarAUitokzXU9XlN/29kAxU0GiHxAYeJUpZtCo33dDI4ORL kHzfuqun8fKEqT4yTTtwQHhgLLMqE3ep3ldTAKLCkv78utE2hF1Z+jKrSeyxbhg+pikyNE PbbCQL5VPqQSxybHlAviqRRtdVT1pUzB4tUnuMGzHhmtkNu9P7fKJnDo8JMvMg+r2sEDVf MQNJtIvW8PgddPIAG4L26ghdhD78Rqh5yOmNwr+mWroFmK9OuwWUoQZz/TiUrjw1OJhTyD LWqGAjixFHiJFpIexnkzUT20i+7v8NxrZNAaEH4EII118q3YWnJK3NdyJ+rgMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767709831; a=rsa-sha256; cv=none; b=pmOj0nqsdPL32zFAt4M+CYGxaXPS/Tuc5R8rOiFGvi4RmN83KSWHRqqgLqroxWVvd5m8pS SiF+ko2f7HJ+BBq71MG8fY0NV/fy55Okh2dX+7Wm7h6fWcFKndm+0MZ7aC6/wdYS0ku0rp 0fMXuxaZIJ9ktoD3ZwYOzLOg/lp6eggl8n5qPZ8LSsn5BWHH8PR9wPcKq89oQw8RuEkXo/ A7c4cFSfv2bnBubJsQBNVtx9Yz1yCrNMhO4uRnrlOnMKz7xMWYPBCZVJB/vDq8T8x0WnZ0 U9fles5rC4eYMytT/jQvtWor9CfJyQgACigpfLsfwIhHZBTzslD4CIMKivPM+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]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dltqq18d9z19Fh for ; Tue, 06 Jan 2026 14:30:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d5f7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 14:30:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 765442a8b5f1 - stable/15 - Makefile.inc1: Indicate that no-clean builds are on by default List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 765442a8b5f1fda45c5a7bc10de8e56d87fc8845 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 14:30:31 +0000 Message-Id: <695d1c87.d5f7.5429b1d7@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=765442a8b5f1fda45c5a7bc10de8e56d87fc8845 commit 765442a8b5f1fda45c5a7bc10de8e56d87fc8845 Author: Ed Maste AuthorDate: 2026-01-02 20:16:00 +0000 Commit: Ed Maste CommitDate: 2026-01-06 14:30:11 +0000 Makefile.inc1: Indicate that no-clean builds are on by default PR: 292130 (cherry picked from commit a6afa194f382e4f81277fdc7e81e229d3c8caf5f) --- Makefile.inc1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 2c4a73c5c743..d600ea24c200 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -2,7 +2,7 @@ # # Make command line options: # -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir -# -DNO_CLEAN do not clean at all +# -DNO_CLEAN do not clean at all (enabled by default) # -DDB_FROM_SRC use the user/group databases in src/etc instead of # the system database when installing. # -DNO_SHARE do not go into share subdir From nobody Tue Jan 6 15:57:03 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlwlh3JZ3z6NnJl for ; Tue, 06 Jan 2026 15:57:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlwlg6dkqz3s4R for ; Tue, 06 Jan 2026 15:57:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767715024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v2PdpYF/zZY8rqlWYq1k4ziD9uhyDjmo+zZ2yEAV7EI=; b=kQqdwqLVJtmYYBdqoQiIRFKQT930wISn3bE62o0N+NlMhepC1xk4h2MMtxtqTsEKwc8pfn KTz/EkMZIVB0PWk22ZYpysdE0Bp+hwNCnA+J2G2sBywFOUU5twYeuEuFOXdaCVeXlXkP/z 9H2ar7UIkT5Q8NT3SrrDpNF+4tyjMh+ZDY7Tp2MuLHOW2omKOdbitMTkZMG07kUWLPEra+ 64mfzGZuXEOhcSB5S9mdCZuSujTrGHMUPfGz9ku2tYpPx45dre6uM01YVqNSob4X8IqLGN zAPFHIWRrhPbDMOJuPRVnvr+hdqgLWpIvKlxYGAWIeba+X0hW0oB+8J43yt6Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767715024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v2PdpYF/zZY8rqlWYq1k4ziD9uhyDjmo+zZ2yEAV7EI=; b=c/pwOjVWW0BzHTHoCphWNbIPp3uY3MmLo7rqjLL16R2IUXUXQXGtPejOxGodGrhFLq5CX7 7s69VbnqtjbppY8xwiRc2J0HbhBjQwMssedZm/LipSIT8TohBhjeCbFS3Uypu3rVWxpvEL b68iSf388PF59ugpOv3P2w5SrtesL+ybKzUls0XVwPtBVI10VeSh/8GdqO19X/SWuCYRYx aiYksAi4EHgI3veBAyWq9Xba8SFu9BgXTzP+FQoz28znoLFYzqVvbKrwH1Gouh/uZ99UJM LVfZIguwA8HJQhrKxrJeDq6FUXCy/6fcj2OsSY1yRGGmkTquMU2auNYDPcFpHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767715024; a=rsa-sha256; cv=none; b=BJYk5uqBmyWmWyyqZT2crgx1b80+NGPa4GkQkyfNiM3zUoOs7b5f5PJ8UoCeljsm3OQnUS NBFnGu8ux0aspTXaAkwFuZ0NGs6pj8YMfzi5n0OkXwGt4TLde6XNbeLH8anzguyW19Dr8a lydV6o6hakMjoYr3nsFjc+7ZRg0II0ZZQBjf8FuHqaF8NpNt4qFgZr+fmPw1RD3nP8IwjD J+Qnhdx6+OOMPmmOEw5LjWACcXm2qIl2wN57EUY5ojmjEslmiNU6ji0grwoXKvBn9Pgqno l2Ya3SnNyuP9NIzZPaPXbSD3NsxP72VCbmjTIxct6DHERnYCXrA/WuCTkgahjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlwlg6BDmz1CZX for ; Tue, 06 Jan 2026 15:57:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25d22 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 15:57:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 97fbbf1b1399 - stable/15 - ifconfig: Fix the -L flag when using netlink List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 97fbbf1b1399609a565c2aac93b55a92cb5917eb Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 15:57:03 +0000 Message-Id: <695d30cf.25d22.66f18d4a@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=97fbbf1b1399609a565c2aac93b55a92cb5917eb commit 97fbbf1b1399609a565c2aac93b55a92cb5917eb Author: Mark Johnston AuthorDate: 2025-12-19 14:11:20 +0000 Commit: Mark Johnston CommitDate: 2026-01-06 15:56:48 +0000 ifconfig: Fix the -L flag when using netlink By default, when ifconfig shows a v6 address derived from a router-advertised prefix, it shows the initial preferred and valid lifetimes. When -L is specified, it is supposed to show the remaining lifetimes, but this was broken in the conversion to netlink. Fix that, and add a regression test which validates ifconfig output before and after a short-lived address expires. Reported by: Franco Fichtner Reviewed by: melifaro, allanjude, Seyed Pouria Mousavizadeh Tehrani Fixes: 4c91a5dfe483 ("ifconfig: make interface and address listing use Netlink as transport") MFC after: 2 weeks Sponsored by: OPNsense Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D54294 (cherry picked from commit df6861d755c8f72380ae7fb8df535b27eba8c0be) --- sbin/ifconfig/af_inet6.c | 6 +++-- tests/sys/netinet6/ndp.sh | 62 +++++++++++++++++++++++++++++++++++++++++++++++ tests/sys/netinet6/ra.py | 11 ++++++++- 3 files changed, 76 insertions(+), 3 deletions(-) diff --git a/sbin/ifconfig/af_inet6.c b/sbin/ifconfig/af_inet6.c index e0f34f0c4d82..a5c406db8a0c 100644 --- a/sbin/ifconfig/af_inet6.c +++ b/sbin/ifconfig/af_inet6.c @@ -375,8 +375,10 @@ show_lifetime(struct ifa_cacheinfo *ci) vl = (ci->ifa_valid == ND6_INFINITE_LIFETIME) ? 0 : ci->ifa_valid; clock_gettime(CLOCK_MONOTONIC_FAST, &now); - print_lifetime("pltime", pl + now.tv_sec, &now); - print_lifetime("vltime", vl + now.tv_sec, &now); + print_lifetime("pltime", + pl + (ip6lifetime ? ci->tstamp / 1000 : now.tv_sec), &now); + print_lifetime("vltime", + vl + (ip6lifetime ? ci->tstamp / 1000 : now.tv_sec), &now); } static void diff --git a/tests/sys/netinet6/ndp.sh b/tests/sys/netinet6/ndp.sh index bac9764ee3c9..1c9a0d0b6473 100755 --- a/tests/sys/netinet6/ndp.sh +++ b/tests/sys/netinet6/ndp.sh @@ -188,9 +188,71 @@ ndp_slaac_default_route_cleanup() { vnet_cleanup } +atf_test_case "ndp_prefix_lifetime" "cleanup" +ndp_prefix_lifetime_head() { + atf_set descr 'Test ndp slaac address lifetime handling' + atf_set require.user root + atf_set require.progs python3 scapy +} + +ndp_prefix_lifetime_body() { + local epair0 jname prefix + + vnet_init + + jname="v6t-ndp_prefix_lifetime" + + epair0=$(vnet_mkepair) + + vnet_mkjail ${jname} ${epair0}a + + ndp_if_up ${epair0}a ${jname} + ndp_if_up ${epair0}b + atf_check jexec ${jname} ifconfig ${epair0}a inet6 accept_rtadv no_dad + + prefix="2001:db8:ffff:1000:" + + # Send an RA advertising a prefix. + atf_check -e ignore python3 $(atf_get_srcdir)/ra.py \ + --sendif ${epair0}b \ + --dst $(ndp_if_lladdr ${epair0}a ${jname}) \ + --src $(ndp_if_lladdr ${epair0}b) \ + --prefix "2001:db8:ffff:1000::" --prefixlen 64 \ + --validlifetime 10 --preferredlifetime 5 + + # Wait for a default router to appear. + while [ -z "$(jexec ${jname} ndp -r)" ]; do + sleep 0.1 + done + atf_check \ + -o match:"^default[[:space:]]+fe80:" \ + jexec ${jname} netstat -rn -6 + + atf_check \ + -o match:"inet6 ${prefix}.* prefixlen 64 autoconf pltime 5 vltime 10" \ + jexec ${jname} ifconfig ${epair0}a + + # Wait for the address to become deprecated. + sleep 6 + atf_check \ + -o match:"inet6 ${prefix}.* prefixlen 64 deprecated autoconf pltime 0 vltime [1-9]+" \ + jexec ${jname} ifconfig -L ${epair0}a + + # Wait for the address to expire. + sleep 6 + atf_check \ + -o not-match:"inet6 ${prefix}.*" \ + jexec ${jname} ifconfig ${epair0}a +} + +ndp_prefix_lifetime_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_lifetime" } diff --git a/tests/sys/netinet6/ra.py b/tests/sys/netinet6/ra.py index a5016b3f6e9b..1b08c3e53c05 100644 --- a/tests/sys/netinet6/ra.py +++ b/tests/sys/netinet6/ra.py @@ -25,12 +25,21 @@ def main(): help='The prefix to be advertised') parser.add_argument('--prefixlen', nargs=1, required=True, type=int, help='The prefix length to be advertised') + parser.add_argument('--validlifetime', nargs=1, required=False, + type=int, default=4294967295, + help='The valid lifetime of the prefix') + parser.add_argument('--preferredlifetime', nargs=1, required=False, + type=int, default=4294967295, + help='The preferred lifetime of the prefix') args = parser.parse_args() pkt = sp.Ether() / \ sp.IPv6(src=args.src, dst=args.dst) / \ sp.ICMPv6ND_RA(chlim=64) / \ - sp.ICMPv6NDOptPrefixInfo(prefix=args.prefix, prefixlen=args.prefixlen) + sp.ICMPv6NDOptPrefixInfo(prefix=args.prefix, + prefixlen=args.prefixlen, + validlifetime=args.validlifetime, + preferredlifetime=args.preferredlifetime) sp.sendp(pkt, iface=args.sendif[0], verbose=False) sys.exit(0) From nobody Tue Jan 6 15:57:04 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlwlh6K0Bz6NnGN for ; Tue, 06 Jan 2026 15:57:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlwlh3n78z3s2W for ; Tue, 06 Jan 2026 15:57:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767715024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JOyuhRM16rqg9Y5RSYuUo2axwgn7uhn1OKNDhpLYkeY=; b=uS9rg79zN3ATGM5uaJOD47atRZ7ARqAwqvw8ezmghQXM2xnLIQ6xHnyrHXWTZK2QnxN0a3 hVvIRZi5lNzA/bEUIQHLOb9iGDSjFbesW7K1MMRWizzyvdAIb3DyzqJmaWw7ZJ/Y3v07NZ sGym/+XCJPOLCeeGfs7WzmO8o2uPOabGImfdbXfkUcxv+v0zguSdeq/ViY9p8euu/LXNdI sugl3Sgz/CM5EHYFJ24lhzjxlKd2R9b188HXLyBZcLtLfcLMCekhFG9/1jXMIXLd/vQjtC tSa8eyHYmvSCkddOov+kSS0PFprWtwQ91kMke9SYxMBDC5lYRMuLrJM6YBgqKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767715024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JOyuhRM16rqg9Y5RSYuUo2axwgn7uhn1OKNDhpLYkeY=; b=WQWm1MuCMIAosWtz9py2MsQ0Fv0SkHOmVUosMNp52bBDAtzEiRpG0ffVbJItglRegVayha gDOpYJv3ZOKcAq3HHsWnGbdf6P29Ng62cgoIxs7Jf9E8H+RVNEGsEgE8NoX0hFocYwEOFW FZBzctu2ScGVUjfvNFf+Bv0wS0eMLNAcdvgcvEbQzJ6MT91rH+SK5S0Why9t+Bssn0CUs+ tdyr5ciw6OLUqpc37rR63+tNJ0+xEMzKkjRYFfklbh98gpxUmJ+A0mEvxgqQqqWK412Fa2 RSCx+AMapevKYVOyJl2shxtmzpDBDmCL+ZWgicnd0IsH1aZWtm3OCLQ/Cjmggg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767715024; a=rsa-sha256; cv=none; b=OBn34jeSKyguoDFXyOGNS9REqgUKOzcGah/xvPPzMjTzHiMh0Beso2e+dypn4nsrtPB+P8 pHPVIWBmt326xH9mI+imwdFAqm9LdBDiyGBGayTeSMC1T5W1QCsUd2CSdz1Yj5zUQEKGy5 FiVVbMAWWTHPPyl1j3UykHR5s0ROwSjrZNIaiWeyjrYVUowfAnNgUtn0XbZpzk0GRv3dp+ n0mDc0r/kndzxB4UZ9s6nygrTcR2oQWxnPdCqySqy9ph8c9pORdJeVARmkY3DfSQhtEDlt DaRBDIakFA/evAqdl6hl97kKiKxzJMEfZJb+zSDLHPWzYiiS9WH/Zr2DQ39Cnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlwlh3LXgz1CLp for ; Tue, 06 Jan 2026 15:57:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25b9b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 15:57:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: c25259a40e3f - stable/15 - pf: Avoid taking the pf rules write lock in a couple of ioctls List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c25259a40e3f1e0e9fc85f44975ebcdeb6d0cdeb Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 15:57:04 +0000 Message-Id: <695d30d0.25b9b.12981706@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c25259a40e3f1e0e9fc85f44975ebcdeb6d0cdeb commit c25259a40e3f1e0e9fc85f44975ebcdeb6d0cdeb Author: Mark Johnston AuthorDate: 2025-12-19 14:07:26 +0000 Commit: Mark Johnston CommitDate: 2026-01-06 15:56:49 +0000 pf: Avoid taking the pf rules write lock in a couple of ioctls The DIOCGETRULES ioctl handlers has taken the write lock ever since fine-grained locking was merged to pf, but I believe it's unneeded. Use the read lock instead. DIOCGETRULENV takes the write lock as well but I believe this is only required when clearing rule counters. Acquire the read lock if that is not the case. Reviewed by: kp, allanjude MFC after: 2 weeks Sponsored by: OPNsense Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D54292 (cherry picked from commit ae96ff302f8ae50903a96d3a1857f9acf243f3c4) --- sys/netpfil/pf/pf_ioctl.c | 91 ++++++++++++++++++++++------------------------- sys/netpfil/pf/pf_nv.c | 2 +- sys/netpfil/pf/pf_nv.h | 2 +- 3 files changed, 45 insertions(+), 50 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index e2b63965d1e1..a6e234fcac53 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -2085,19 +2085,20 @@ pf_rule_to_krule(const struct pf_rule *rule, struct pf_krule *krule) int pf_ioctl_getrules(struct pfioc_rule *pr) { + PF_RULES_RLOCK_TRACKER; struct pf_kruleset *ruleset; struct pf_krule *tail; int rs_num; - PF_RULES_WLOCK(); + PF_RULES_RLOCK(); ruleset = pf_find_kruleset(pr->anchor); if (ruleset == NULL) { - PF_RULES_WUNLOCK(); + PF_RULES_RUNLOCK(); return (EINVAL); } rs_num = pf_get_ruleset_number(pr->rule.action); if (rs_num >= PF_RULESET_MAX) { - PF_RULES_WUNLOCK(); + PF_RULES_RUNLOCK(); return (EINVAL); } tail = TAILQ_LAST(ruleset->rules[rs_num].active.ptr, @@ -2107,7 +2108,7 @@ pf_ioctl_getrules(struct pfioc_rule *pr) else pr->nr = 0; pr->ticket = ruleset->rules[rs_num].active.ticket; - PF_RULES_WUNLOCK(); + PF_RULES_RUNLOCK(); return (0); } @@ -3694,6 +3695,7 @@ DIOCADDRULENV_error: } case DIOCGETRULENV: { + PF_RULES_RLOCK_TRACKER; struct pfioc_nv *nv = (struct pfioc_nv *)addr; nvlist_t *nvrule = NULL; nvlist_t *nvl = NULL; @@ -3704,6 +3706,13 @@ DIOCADDRULENV_error: bool clear_counter = false; #define ERROUT(x) ERROUT_IOCTL(DIOCGETRULENV_error, x) +#define ERROUT_LOCKED(x) do { \ + if (clear_counter) \ + PF_RULES_WUNLOCK(); \ + else \ + PF_RULES_RUNLOCK(); \ + ERROUT(x); \ +} while (0) if (nv->len > pf_ioctl_maxcount) ERROUT(ENOMEM); @@ -3735,78 +3744,64 @@ DIOCADDRULENV_error: nr = nvlist_get_number(nvl, "nr"); - PF_RULES_WLOCK(); + if (clear_counter) + PF_RULES_WLOCK(); + else + PF_RULES_RLOCK(); ruleset = pf_find_kruleset(nvlist_get_string(nvl, "anchor")); - if (ruleset == NULL) { - PF_RULES_WUNLOCK(); - ERROUT(ENOENT); - } + if (ruleset == NULL) + ERROUT_LOCKED(ENOENT); rs_num = pf_get_ruleset_number(nvlist_get_number(nvl, "ruleset")); - if (rs_num >= PF_RULESET_MAX) { - PF_RULES_WUNLOCK(); - ERROUT(EINVAL); - } + if (rs_num >= PF_RULESET_MAX) + ERROUT_LOCKED(EINVAL); if (nvlist_get_number(nvl, "ticket") != - ruleset->rules[rs_num].active.ticket) { - PF_RULES_WUNLOCK(); - ERROUT(EBUSY); - } + ruleset->rules[rs_num].active.ticket) + ERROUT_LOCKED(EBUSY); - if ((error = nvlist_error(nvl))) { - PF_RULES_WUNLOCK(); - ERROUT(error); - } + if ((error = nvlist_error(nvl))) + ERROUT_LOCKED(error); rule = TAILQ_FIRST(ruleset->rules[rs_num].active.ptr); while ((rule != NULL) && (rule->nr != nr)) rule = TAILQ_NEXT(rule, entries); - if (rule == NULL) { - PF_RULES_WUNLOCK(); - ERROUT(EBUSY); - } + if (rule == NULL) + ERROUT_LOCKED(EBUSY); nvrule = pf_krule_to_nvrule(rule); nvlist_destroy(nvl); nvl = nvlist_create(0); - if (nvl == NULL) { - PF_RULES_WUNLOCK(); - ERROUT(ENOMEM); - } + if (nvl == NULL) + ERROUT_LOCKED(ENOMEM); nvlist_add_number(nvl, "nr", nr); nvlist_add_nvlist(nvl, "rule", nvrule); nvlist_destroy(nvrule); nvrule = NULL; - if (pf_kanchor_nvcopyout(ruleset, rule, nvl)) { - PF_RULES_WUNLOCK(); - ERROUT(EBUSY); - } + if (pf_kanchor_nvcopyout(ruleset, rule, nvl)) + ERROUT_LOCKED(EBUSY); free(nvlpacked, M_NVLIST); nvlpacked = nvlist_pack(nvl, &nv->len); - if (nvlpacked == NULL) { - PF_RULES_WUNLOCK(); - ERROUT(ENOMEM); - } + if (nvlpacked == NULL) + ERROUT_LOCKED(ENOMEM); - if (nv->size == 0) { - PF_RULES_WUNLOCK(); - ERROUT(0); - } - else if (nv->size < nv->len) { - PF_RULES_WUNLOCK(); - ERROUT(ENOSPC); - } + if (nv->size == 0) + ERROUT_LOCKED(0); + else if (nv->size < nv->len) + ERROUT_LOCKED(ENOSPC); - if (clear_counter) + if (clear_counter) { pf_krule_clear_counters(rule); - - PF_RULES_WUNLOCK(); + PF_RULES_WUNLOCK(); + } else { + PF_RULES_RUNLOCK(); + } error = copyout(nvlpacked, nv->data, nv->len); +#undef ERROUT_LOCKED #undef ERROUT DIOCGETRULENV_error: free(nvlpacked, M_NVLIST); diff --git a/sys/netpfil/pf/pf_nv.c b/sys/netpfil/pf/pf_nv.c index 2f484e2dabc6..3e741dd39974 100644 --- a/sys/netpfil/pf/pf_nv.c +++ b/sys/netpfil/pf/pf_nv.c @@ -684,7 +684,7 @@ error: } nvlist_t * -pf_krule_to_nvrule(struct pf_krule *rule) +pf_krule_to_nvrule(const struct pf_krule *rule) { nvlist_t *nvl, *tmp; u_int64_t src_nodes_total = 0; diff --git a/sys/netpfil/pf/pf_nv.h b/sys/netpfil/pf/pf_nv.h index cf9fbf8bcf5b..9e43ff1e642a 100644 --- a/sys/netpfil/pf/pf_nv.h +++ b/sys/netpfil/pf/pf_nv.h @@ -78,7 +78,7 @@ int pf_nvstring(const nvlist_t *, const char *, char *, size_t); int pf_check_rule_addr(const struct pf_rule_addr *); -nvlist_t *pf_krule_to_nvrule(struct pf_krule *); +nvlist_t *pf_krule_to_nvrule(const struct pf_krule *); int pf_nvrule_to_krule(const nvlist_t *, struct pf_krule *); int pf_nvstate_kill_to_kstate_kill(const nvlist_t *, struct pf_kstate_kill *); From nobody Tue Jan 6 15:57:05 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dlwlj6xrdz6NnDW for ; Tue, 06 Jan 2026 15:57:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dlwlj4gr4z3s99 for ; Tue, 06 Jan 2026 15:57:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767715025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TkPBYCnFjnvh/XO+h802togxxoze9OUTdbx7cBm/BgQ=; b=YXi8tNIKm2UixULRc8QgnpcxfFkyI1YxpJopdmN42EREsYCFTJPaQ7LaCja6VztVXPnDRU 6DH4ns/CVi1hH9VFQBGc7YQAZyX2prK61ch+COIDuTe2uQIF9V8JgUtpJwy7CNZ9AwYBML /76qij1IEN38ly/JmCuf2P5xns4hbUbUFPIJd+7lDoWYgR10b39QPZNUWU4UDj+ggigkPe wU9UkE3CIin4gRtI5C6LGsifPrsFYFP7NQ1yYLRlXBRm3ahlrMpLPw+UlmfyEQgMMp370+ b/AIXPvYctkzPPkfZ2Ua3d8llkKXm17kX0gUWbND/Ot+gr+uAEbvoXYsGi4GDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767715025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TkPBYCnFjnvh/XO+h802togxxoze9OUTdbx7cBm/BgQ=; b=wwKRfYRKk74dG+h3DLC1hm6kb4ZacMrLI1nc37GDZiIbog0mYXMEJ4PyQV1aCXcaBT6Rej EKXMhDI+VtuAEiyn/qlkf85z2cqzzIkTjplpJWcDam5fMEnAhnKnFut3sGfR4HHMqP1Y1l oonl5jPQ0c1S8xkx3cSPwsv0TgnKQYrdDWq4gJpCjt7Kn2hymSydLYfFL59f9InFV7RFaT 9eMXn1DPyTTZO6586XNOumopYjKOAwZbo3d1eUkMr1xQ+bpOkw9YhmoPsS2GUdvdETjWlQ XQ8o6Q1OPYkQAVko6T3ZNIZQRmEJwpLi6h981oyA/6SYCHAv6wAGDXc6c1ooQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767715025; a=rsa-sha256; cv=none; b=xO1I2732ZGwKrYjgVI/YvGVc6m//gf2/G+gLzPixIfDa3cDlm8x2QuloQQoNy0Eh/ZCM38 EvcJ3ossVxmnZZgssUQ/aijDYqMocyK5hdBBVgeWIoAG0IU/Vl3OA1T7NqMqNkJ7nSkqv8 xbyTV8+XrJcJ5OnqeXeU5TAV8LscEDylcMRBT3b2Ez+taJFfRGhPi7w0HU3mXipR33MKKi 6Qm0ME4THyBUOpwicMp1mQ0W9/+Mgkftkeb9qDETk/O+DxqW4izV7xFs203pAau69YYpLe aDm4HIkuILmjsbiYSMrXbpegH0dUNs/tB4eXH02i/U2VvxZ+jfI8iLxKRvo3FA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dlwlj4FJFz1CZZ for ; Tue, 06 Jan 2026 15:57:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24a6d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 15:57:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 3025957f6556 - stable/15 - pf: Fix state handling when ICMP packets are diverted List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3025957f65567149bcba058555ffcc421d462581 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 15:57:05 +0000 Message-Id: <695d30d1.24a6d.2ce9f364@gitrepo.freebsd.org> The branch stable/15 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3025957f65567149bcba058555ffcc421d462581 commit 3025957f65567149bcba058555ffcc421d462581 Author: Mark Johnston AuthorDate: 2025-12-20 18:18:50 +0000 Commit: Mark Johnston CommitDate: 2026-01-06 15:56:49 +0000 pf: Fix state handling when ICMP packets are diverted Commit 66f2f1c83247 ("pf: handle divert packets") missed a case that I happened to hit while testing something. Add a regression test for the ICMP case, based on the existing test. Fix a buglet in the existing test (missing whitespace after "["). Reviewed by: kp Sponsored by: OPNsense Sponsored by: Klara, Inc. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D54321 (cherry picked from commit 15178d8ed2904d5c4fa31a1531e60dcb1e0f9209) --- sys/netpfil/pf/pf.c | 10 ++++++---- tests/sys/netpfil/pf/divert-to.sh | 40 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 44 insertions(+), 6 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 1fdfd6e0f38b..567615acdf0c 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -11123,10 +11123,12 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 } action = pf_test_state_icmp(&s, &pd, &reason); if (action == PF_PASS || action == PF_AFRT) { - if (V_pfsync_update_state_ptr != NULL) - V_pfsync_update_state_ptr(s); - r = s->rule; - a = s->anchor; + if (s != NULL) { + if (V_pfsync_update_state_ptr != NULL) + V_pfsync_update_state_ptr(s); + r = s->rule; + a = s->anchor; + } } else if (s == NULL) action = pf_test_rule(&r, &s, &pd, &a, &ruleset, &reason, inp, &match_rules); diff --git a/tests/sys/netpfil/pf/divert-to.sh b/tests/sys/netpfil/pf/divert-to.sh index 153136199311..3028c9e75afd 100644 --- a/tests/sys/netpfil/pf/divert-to.sh +++ b/tests/sys/netpfil/pf/divert-to.sh @@ -402,8 +402,7 @@ pr260867_body() "pass in on ${epair}b proto tcp from any to port 7 divert-to 0.0.0.0 port 1001" reply=$(echo "foo" | nc -N 192.0.2.2 7) - if ["${reply}" != "foo" ]; - then + if [ "${reply}" != "foo" ]; then atf_fail "Did not receive echo reply" fi } @@ -413,6 +412,42 @@ pr260867_cleanup() pft_cleanup } +atf_test_case "pr260867_icmp" "cleanup" +pr260867_icmp_head() +{ + atf_set descr 'Variant of the PR260867 test' + atf_set require.user root +} + +pr260867_icmp_body() +{ + pft_init + divert_init + + epair=$(vnet_mkepair) + + atf_check ifconfig ${epair}a 192.0.2.1/24 up + + vnet_mkjail alcatraz ${epair}b + jexec alcatraz ifconfig ${epair}b 192.0.2.2/24 up + + # Sanity check + atf_check -s exit:0 -o ignore ping -c3 192.0.2.2 + + jexec alcatraz $(atf_get_srcdir)/../common/divapp 1001 divert-back & + + jexec alcatraz pfctl -e + pft_set_rules alcatraz \ + "pass in on ${epair}b proto icmp from any to any divert-to 0.0.0.0 port 1001" + + atf_check -o ignore ping -c 3 192.0.2.2 +} + +pr260867_icmp_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "in_div" @@ -426,4 +461,5 @@ atf_init_test_cases() atf_add_test_case "in_dn_in_div_in_out_div_out_dn_out" atf_add_test_case "pr260867" + atf_add_test_case "pr260867_icmp" } From nobody Tue Jan 6 19:12:36 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dm15K0mHbz6MYYM for ; Tue, 06 Jan 2026 19:12:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dm15J6yK9z3BsQ for ; Tue, 06 Jan 2026 19:12:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767726757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=33fVexFZXltcC979xzYSkSTOIWjMX/17sm4dWzITwkw=; b=h7GorncBfY/qSHyYKPdKlVwYXJnbuMYuAjxewBb/K1cvCdptEaS9agxCV/x8gqiw4gTjUN ZIs9pTTwhUD/X0agXdZOjTjN5BUSd/51lxrxuEwUEesXeqTVDlTcon4iSrD60w2smBMm4d sEF7OafEcq+cnmSmz2Vuh+FJeEVxNFnx7x/SU1oGNbZpWARuDR4kbW07pMLfedBbHjt3vZ u9XiDTM6tu333lz+VmzauY3Gv1KCpETI9c96f0zin3clM9jS3CHS5rLATSmvRlsoevTQWt kFaliuoKFrIlOJJBDwQ7auPM+QFqvAXN6ZeDwkWUdSYW3BXd4XuEMd7iLz43Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767726757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=33fVexFZXltcC979xzYSkSTOIWjMX/17sm4dWzITwkw=; b=euFEe8sjnkOe/Fg6KKHyS8kPiDOf7MxTGOpAzCnzZzxH4DGwuwTBwpxh75zrG15ignXHf5 M+8LMRjaHbaGv7Lwi/+Hei0wNvU6UC8nlRCC01RzaU5PkILzbavcKr7pTCa3L7JeLD80T2 S7bDz4tQh0GxWS0Iy9ix8J4ziuW5uYRZE/VJaZKBPntmE8x1zN6o1vXOyM8+NlXl3Tbwo1 VghGglvtERqBo+wsfKAd8SzqVMGZIzF4eJej8ZUCkmAh9yljStj6vZaaeajqdNYqG0xR9V QpmwNNPK3yvI5+knp1lvJ71n17LO8VLM3TtApxdei1dsJBoDerHOkokMmrsYIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767726757; a=rsa-sha256; cv=none; b=S2LhO48bwk+ecXNuyBkqa4P4srxl6Z98BNnvzRpLmSYNQ/DYXEMSPWd3p4L08UXXUyf1Ug rJewDHjhHkosqcBHE7JiJjNvfBAyX+JG/1A4aQwQqnR4CrQG9rcvuuieQmD65eD2GvxyqV HZ8WxRFab995eeN73stPsiOiWhytYM76cvwOVQeUvRwPaY2TfLd/hAIVnqUs35SOJsXM6X cYM17qo0nTAB9CJb2pbjyTRc/05zRCWY87KesXLnOo6LrjAT7YF3F/cpuWfrGvYPKLiynh iCZKMSfMwzvuchoGVlT5Z+Wn4wNpryBEgSs95DtyguIHNrR95aJD7Bxt1gTXvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dm15J6QMyz4dc for ; Tue, 06 Jan 2026 19:12:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 40c97 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 19:12:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Osipov Subject: git: e16e4cd25c1d - stable/15 - mfi(4): Add subvendor and subdevice for Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: e16e4cd25c1d83abcf8ec90c50d6dc146c8d74dc Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 19:12:36 +0000 Message-Id: <695d5ea4.40c97.928425f@gitrepo.freebsd.org> The branch stable/15 has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=e16e4cd25c1d83abcf8ec90c50d6dc146c8d74dc commit e16e4cd25c1d83abcf8ec90c50d6dc146c8d74dc Author: Michael Osipov AuthorDate: 2025-12-21 15:53:27 +0000 Commit: Michael Osipov CommitDate: 2026-01-06 19:12:23 +0000 mfi(4): Add subvendor and subdevice for Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116) This is an OEM card from Fujitsu using an LSI SAS2208 ROC controller shipped with many Fujitsu PRIMERGY servers like RX300 S7. This chip is also recognized by mrsas(4) under the generic name for the controller chip. Controller description: https://www.fujitsu.com/global/products/computing/servers/primergy/blades/connection/cb-pmod-110426.html Reviewed by: ziaee MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D54520 (cherry picked from commit 8b210276cde207ca3dc1f7f46d5a6d32e0a1c51d) --- share/man/man4/mfi.4 | 2 ++ sys/dev/mfi/mfi_pci.c | 1 + 2 files changed, 3 insertions(+) diff --git a/share/man/man4/mfi.4 b/share/man/man4/mfi.4 index 4a55467d81f2..6b660c4cd744 100644 --- a/share/man/man4/mfi.4 +++ b/share/man/man4/mfi.4 @@ -109,6 +109,8 @@ Dell PERC5 .It Dell PERC6 .It +Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116) +.It IBM ServeRAID M1015 SAS/SATA .It IBM ServeRAID M1115 SAS/SATA diff --git a/sys/dev/mfi/mfi_pci.c b/sys/dev/mfi/mfi_pci.c index 65e8e30bf994..b150138452db 100644 --- a/sys/dev/mfi/mfi_pci.c +++ b/sys/dev/mfi/mfi_pci.c @@ -131,6 +131,7 @@ struct mfi_ident { {0x1000, 0x005b, 0x1028, 0x1f35, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710 Adapter"}, {0x1000, 0x005b, 0x1028, 0x1f37, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710 Mini (blades)"}, {0x1000, 0x005b, 0x1028, 0x1f38, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710 Mini (monolithics)"}, + {0x1000, 0x005b, 0x1734, 0x11d3, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116)"}, {0x1000, 0x005b, 0x8086, 0x9265, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Intel (R) RAID Controller RS25DB080"}, {0x1000, 0x005b, 0x8086, 0x9285, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Intel (R) RAID Controller RS25NB008"}, {0x1000, 0x005b, 0xffff, 0xffff, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "ThunderBolt"}, From nobody Tue Jan 6 19:13:15 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dm1685dwwz6MYDG for ; Tue, 06 Jan 2026 19:13:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dm1634vpjz3Brb for ; Tue, 06 Jan 2026 19:13:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767726795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uT/QBUg/v5R0KeY3edAnN+w5n3Y4RwtKU8p10YqPXxA=; b=dDHsvEnIw277s30a/f0gK2RkTSLI/fsUKZxtTsO3AAQDHBEJqY05EAVrsoyB6kG1qRxCDu gpG8quFbVorNfpMtMUqPUkHaAjeZggbTMTUq/HnKWZJQM0loAh7idpoZ0Z/lALwrwj2Jmu 3LZ+BPeHqSlF9+Xaa0bsiU3BAWPNvKXmkzXYAX/WDdDvSEiyC3f1Ldfo4gYPd16Fzbt4H4 xJNVMY6TWsKkzOmo0kwJCvRRfQOx+WOcUvgxcYHm55+73TKXtG5lzX28Mcxd+2vM+kKBw3 NUDXzwY4DNq8s3IVAkwCV1W3QW/CU1NhQVs9DGnjQ9uFceUaDChM055NfW3bXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767726795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uT/QBUg/v5R0KeY3edAnN+w5n3Y4RwtKU8p10YqPXxA=; b=aMiQA1gUiN3pBvjmQc13UDJh9xxMscrDttP7jLE6FRaawIUbP/apfe2gHZjc0KTLZhPeTG EiO5lgNa4WrOl2skU2/vLfU276T97tB4kJfbwSg8fsLQvohYW7bdojextnebumGx+oIbWb r+JOfztAlHoBcv4Xt6kogwbFIYB/M29pJbzD6eG9cqMrG9rrVJ4zBGEi3gEeWOBsD+eTxp 0uUYmooS9oZZq70Qx1JU1nfAP0MXv4QVUJ2NBq7OCJU6OiAC67k/HzkQA1hWQflxmDfJtA w4cOGF7GMtm3jNuahfEP1QGJUTT+G44ncA7a/ZuBBqS+an9M7klWCLCGLAFPIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767726795; a=rsa-sha256; cv=none; b=gb4r3tcNhWYVx+Hf2yZUvXN2crjhw105ZOv4lK3BLfuQGwnF8af+cDAcDqhoha95AnkNNE Zj9V8zob/Bk+xw66F7F+OQA+bCRkDMOhCILhjRqQc9qC9VgDT5E1YCaBoaDP2Qq2t18TZC PDxYoDnT/X9iqa3lwrvIMtdQ66sJG6T0Vw8y9lDTSvNLfsDmZGTil3Ah5OxJvukzwiaAWt OwMYwzp7b2tZMt4a3cQEGHg36P59xCKqa8KIfkV15BOrH98JHqz+ANHTOTuOTnLtqghKk3 J7+Pz7Lkv8y/9zFDxqVsUm/BM8UXzl48VH4kRE7zkq1TZOUetx0wtmICO+L0NA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dm1634JHRz4jH for ; Tue, 06 Jan 2026 19:13:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ff62 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 19:13:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Osipov Subject: git: 3690911c355a - stable/14 - mfi(4): Add subvendor and subdevice for Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 3690911c355a85177d534ae19c679d8e5d259f4f Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 19:13:15 +0000 Message-Id: <695d5ecb.3ff62.4368eecc@gitrepo.freebsd.org> The branch stable/14 has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=3690911c355a85177d534ae19c679d8e5d259f4f commit 3690911c355a85177d534ae19c679d8e5d259f4f Author: Michael Osipov AuthorDate: 2025-12-21 15:53:27 +0000 Commit: Michael Osipov CommitDate: 2026-01-06 19:12:55 +0000 mfi(4): Add subvendor and subdevice for Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116) This is an OEM card from Fujitsu using an LSI SAS2208 ROC controller shipped with many Fujitsu PRIMERGY servers like RX300 S7. This chip is also recognized by mrsas(4) under the generic name for the controller chip. Controller description: https://www.fujitsu.com/global/products/computing/servers/primergy/blades/connection/cb-pmod-110426.html Reviewed by: ziaee MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D54520 (cherry picked from commit 8b210276cde207ca3dc1f7f46d5a6d32e0a1c51d) --- share/man/man4/mfi.4 | 2 ++ sys/dev/mfi/mfi_pci.c | 1 + 2 files changed, 3 insertions(+) diff --git a/share/man/man4/mfi.4 b/share/man/man4/mfi.4 index 4a55467d81f2..6b660c4cd744 100644 --- a/share/man/man4/mfi.4 +++ b/share/man/man4/mfi.4 @@ -109,6 +109,8 @@ Dell PERC5 .It Dell PERC6 .It +Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116) +.It IBM ServeRAID M1015 SAS/SATA .It IBM ServeRAID M1115 SAS/SATA diff --git a/sys/dev/mfi/mfi_pci.c b/sys/dev/mfi/mfi_pci.c index 82082e6b72cf..ad014774c38b 100644 --- a/sys/dev/mfi/mfi_pci.c +++ b/sys/dev/mfi/mfi_pci.c @@ -131,6 +131,7 @@ struct mfi_ident { {0x1000, 0x005b, 0x1028, 0x1f35, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710 Adapter"}, {0x1000, 0x005b, 0x1028, 0x1f37, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710 Mini (blades)"}, {0x1000, 0x005b, 0x1028, 0x1f38, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710 Mini (monolithics)"}, + {0x1000, 0x005b, 0x1734, 0x11d3, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116)"}, {0x1000, 0x005b, 0x8086, 0x9265, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Intel (R) RAID Controller RS25DB080"}, {0x1000, 0x005b, 0x8086, 0x9285, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Intel (R) RAID Controller RS25NB008"}, {0x1000, 0x005b, 0xffff, 0xffff, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "ThunderBolt"}, From nobody Tue Jan 6 19:13:59 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dm16v1zJ6z6MYYf for ; Tue, 06 Jan 2026 19:13:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dm16v0jn1z3CVV for ; Tue, 06 Jan 2026 19:13:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767726839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/9mAcYiUzjZOyTOv8N49dpbjDVC8PTHC0W/khWRYaS4=; b=NoDO2x/1oxXh78f/hQgJ9q08eV89I6ZaGVoDv7O1x9K8WT2QrAlZyJK+RNG1FurmaqiBJC XbKizTFx3bxF2qDMP9fB7acCMyNjJsIQ+VSYr2XoYyY6j+tyFyT44K1AvHq3TpMpIJf2/8 yHJWmFG0K/Vvw/q3gGHLiSLkpUoxiyF/z6layJcXDxuerSbR9Em80PiteX2BpQCZJaqXHc nhy58TyuAaKLcA/vUl4VuWS2lecItC6CKDyKrEr9m9rgsP6ZLynUac1fwCQexO+ZNNuX41 E08RYfvPJQ8bZAeXDCSZazshgBpcHsUtSf+0druwuMp44hdtUrpsT0W/pPCwmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767726839; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/9mAcYiUzjZOyTOv8N49dpbjDVC8PTHC0W/khWRYaS4=; b=J/DEDFJWZVD0cx61dnSUybTVnQ9WDG6ye3PiM1uAU3l4EGTxFSx9HJRx48UwYC5J91E8nK qG4eznUmRiQE0rPgeLfYlHCL6I5eaBTj5l89qm3X0CxSb2oi5cu1JogyZG9hlDk6Rt4NvM pOxiV7odPzPb6j5dXycMf+ACQMtiv3GrX1fl6n3C8WUx/nRXxNBrWyjW5ZobtwHZMg0aIh lkfvuDGJiKsvzW3Q+8L0b0yGj0PjhNYkSrA25YMFgtHvO0jR/Zn861zgW9n6aVO+OdAAbL ApueiYmSBZ6hZwPltLXkyvwhywOZrpb62nmCff8p2NpOmU0ypLGvV4vLQ7cMIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767726839; a=rsa-sha256; cv=none; b=Pjk9vuZ6CHJL2sbMmykicgEzMJATN+5IaDw1CEsZjhmJyTQQjTCqIsaFpQcJhS434r395N dhZx1yfnZIDvwEhLfMsExLVs9AcbYfcYo4/RRaonYdjvBt8v9cWhnO77UA1iiA32KEwWRY +vyJRbP40C3uEd2XLBGpueZFIa/A2jV9H0gTkXXFZwaRXls6bapzBF5B2MGhZFq2o+vuVg CqoULSJcd02LBD2DHqTIclmcmj/rBfm7Sjhwb0ptY+H5NT+vDnua2lEvkGJT9DVz5iRTOL X3mE+9IufZ7kobO/T7zZD9cUJK9U+gS/7N+an6fMiC7+ZvCmCfUJFSp4yv3tIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dm16v08M5z4C5 for ; Tue, 06 Jan 2026 19:13:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 40142 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 19:13:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Osipov Subject: git: 56eef386f512 - stable/13 - mfi(4): Add subvendor and subdevice for Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 56eef386f51284901bd4a6d45bc2b9cd8f957c28 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 19:13:59 +0000 Message-Id: <695d5ef7.40142.74512522@gitrepo.freebsd.org> The branch stable/13 has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=56eef386f51284901bd4a6d45bc2b9cd8f957c28 commit 56eef386f51284901bd4a6d45bc2b9cd8f957c28 Author: Michael Osipov AuthorDate: 2025-12-21 15:53:27 +0000 Commit: Michael Osipov CommitDate: 2026-01-06 19:13:39 +0000 mfi(4): Add subvendor and subdevice for Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116) This is an OEM card from Fujitsu using an LSI SAS2208 ROC controller shipped with many Fujitsu PRIMERGY servers like RX300 S7. This chip is also recognized by mrsas(4) under the generic name for the controller chip. Controller description: https://www.fujitsu.com/global/products/computing/servers/primergy/blades/connection/cb-pmod-110426.html Reviewed by: ziaee MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D54520 (cherry picked from commit 8b210276cde207ca3dc1f7f46d5a6d32e0a1c51d) --- share/man/man4/mfi.4 | 2 ++ sys/dev/mfi/mfi_pci.c | 1 + 2 files changed, 3 insertions(+) diff --git a/share/man/man4/mfi.4 b/share/man/man4/mfi.4 index 9795c5b78be0..fe6679403bfb 100644 --- a/share/man/man4/mfi.4 +++ b/share/man/man4/mfi.4 @@ -109,6 +109,8 @@ Dell PERC5 .It Dell PERC6 .It +Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116) +.It IBM ServeRAID M1015 SAS/SATA .It IBM ServeRAID M1115 SAS/SATA diff --git a/sys/dev/mfi/mfi_pci.c b/sys/dev/mfi/mfi_pci.c index 942503100610..63cdb8c67148 100644 --- a/sys/dev/mfi/mfi_pci.c +++ b/sys/dev/mfi/mfi_pci.c @@ -132,6 +132,7 @@ struct mfi_ident { {0x1000, 0x005b, 0x1028, 0x1f35, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710 Adapter"}, {0x1000, 0x005b, 0x1028, 0x1f37, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710 Mini (blades)"}, {0x1000, 0x005b, 0x1028, 0x1f38, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Dell PERC H710 Mini (monolithics)"}, + {0x1000, 0x005b, 0x1734, 0x11d3, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116)"}, {0x1000, 0x005b, 0x8086, 0x9265, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Intel (R) RAID Controller RS25DB080"}, {0x1000, 0x005b, 0x8086, 0x9285, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "Intel (R) RAID Controller RS25NB008"}, {0x1000, 0x005b, 0xffff, 0xffff, MFI_FLAGS_SKINNY| MFI_FLAGS_TBOLT| MFI_FLAGS_MRSAS, "ThunderBolt"}, From nobody Tue Jan 6 19:25:23 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dm1N42QSzz6MZh4 for ; Tue, 06 Jan 2026 19:25:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dm1N371wrz3D1s for ; Tue, 06 Jan 2026 19:25:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767727524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6kQnc41S4vD8chOiOkg73F7uZc4Zdo6Re3SrKtrweGo=; b=JZzmOYl5G3SfM7nHY+y6Ni4CrpOOFPGw+3GtaJW+kXTkmiLpgfIN8Z3FKRBcFZ4/sLcD/U MT99L4x+V6nFuWN95HNYLadbBvOscQrv+JssXCtuwffaEO91vM3pnzEK80eXW+lJjg0XXo H3ZDxR20+lou8k981BfUQZ5c1AfT/jaRzXTx4SgJaPdEihmDAiffDQNYCUkeyAjtD4Y/w9 RDCNc+gsKamQ9nfDQAr9waMD33y5PzMXAdJAFc7gCUkqAq6oHU3b/acdW9BP5xYZ4cU7er WJsVta82yRa6dHg69nMpsntccVlg4MgxyVpSdZesyNvodS3Vlj8P0s7MFNNO3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767727524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6kQnc41S4vD8chOiOkg73F7uZc4Zdo6Re3SrKtrweGo=; b=jqnLCIBqzkuXet2hhwjKsPQ+1qaMjUlKDREsTg4Y675h7Em9Ibc47lTcEVjCKfUsFfLR/r x13M9+GvFtUvGWKsQ8QbwUzQXdm5IixVtrUT9bxyi5RN0G2CGN5xqG4IFI7qA58zABj7EZ qRibKLWuqRigYcVexo9NbRBzfNGURZYt+c/aZ8bkV/kvZ2y/YDckA1cLyvedLMDr6ibwAn 73Hb3sty+2EAJtTewyJcL9Nbjm+bGKl+iMXCXdiCyfeF8PrjZERPasnLqDw1lksYCtD4r8 /EmhWi3m/ivr8CLXm9TshXur/QeiFl1AGa6GisBZD/LgVYenrCyo8hsZa5f9sw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767727524; a=rsa-sha256; cv=none; b=Ivip3Pym8zpL2tsRi1rGYi0uDqli7sdsmRFgvxSBaTQkV7oPn5YZbaFLS+KNVvM6a2rVNu lcY5t8K4ZARJdT63bNIiBFks33jbjLO0QjZqB3v8Vgab56aQgg+REAcz1UD7x9VWfRLe4s pPznIiOnRW80zA8uwEo3v6W2VGCCDiABo5KAj3r7dqNKV+d4NSs2H0vVxpfI/rAmdckUng ehEggOJZlefnoo3VkPksxAb8nFPzFci7Y4lCHmviqBHJAMWLJG268L32wO4QDQXqKTIUXT oYiLMmTUFzt+h4tPmThSKwjs7MuDc62txnoo+mtqqI8icJLmxBMCZFIkOX37GA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dm1N36PS9z4mC for ; Tue, 06 Jan 2026 19:25:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 40cd9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 19:25:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Cyril Zhang From: Olivier Certner Subject: git: 2c3fb4cd5096 - stable/14 - racct: Improve handling of the pcpu resource List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 2c3fb4cd509623f9510c62cde81d3e76b441435c Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 19:25:23 +0000 Message-Id: <695d61a3.40cd9.4ad77fc@gitrepo.freebsd.org> The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=2c3fb4cd509623f9510c62cde81d3e76b441435c commit 2c3fb4cd509623f9510c62cde81d3e76b441435c Author: Cyril Zhang AuthorDate: 2025-08-05 23:20:56 +0000 Commit: Olivier Certner CommitDate: 2026-01-06 19:24:14 +0000 racct: Improve handling of the pcpu resource The previous scheme would inflate the CPU consumption of short-lived processes. For containers (e.g., processes, jails), the total pcpu usage was computed as a sum of the pcpu usage of all constituent threads, which makes little sense for a decaying average. Instead, aggregate wallclock time of all on-CPU threads and compute the pcpu resource as a decaying average as the sum. This gives much more reasonable and accurate values in various simple tests. PR: 235556 Reviewed by: markj MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30878 (cherry picked from commit c72188d85a793c7610208beafb83af544de6e3b7) Changes for this MFC to stable/14: - Removal of process swap out (thread stacks swapped out) was done only in 'main' and stable/15 and prior to the original commit, causing a conflict with a test on P_INMEM. In this MFC, the %CPU is not forced to 0 anymore when P_INMEM is not set (contrary to what ps(1) explicitly does, which we find dubious). The %CPU decay will take care of that in a more accurate manner (for processes that have just been swapped out). - Commit 9530c6f082ada9e6 ("racct: Simplify skipping idle process in the throttling daemon") was MFCed before this one although it occurred after it. Consequently, adding the 'idle' variable in racctd() was removed from this MFC, as the other original commit removes it. --- sys/kern/kern_racct.c | 306 ++++++++++++++++++++++++-------------------------- sys/sys/proc.h | 2 +- sys/sys/racct.h | 6 +- 3 files changed, 150 insertions(+), 164 deletions(-) diff --git a/sys/kern/kern_racct.c b/sys/kern/kern_racct.c index acc365d7b921..2bea87d12ffd 100644 --- a/sys/kern/kern_racct.c +++ b/sys/kern/kern_racct.c @@ -96,6 +96,13 @@ static void racct_sub_cred_locked(struct ucred *cred, int resource, uint64_t amount); static void racct_add_cred_locked(struct ucred *cred, int resource, uint64_t amount); +static int racct_set_locked(struct proc *p, int resource, uint64_t amount, + int force); +static void racct_updatepcpu_locked(struct proc *p); +static void racct_updatepcpu_racct_locked(struct racct *racct); +static void racct_updatepcpu_containers(void); +static void racct_settime_locked(struct proc *p, bool exit); +static void racct_zeropcpu_locked(struct proc *p); SDT_PROVIDER_DEFINE(racct); SDT_PROBE_DEFINE3(racct, , rusage, add, @@ -308,74 +315,6 @@ fixpt_t ccpu_exp[] = { #define CCPU_EXP_MAX 110 -/* - * This function is analogical to the getpcpu() function in the ps(1) command. - * They should both calculate in the same way so that the racct %cpu - * calculations are consistent with the values shown by the ps(1) tool. - * The calculations are more complex in the 4BSD scheduler because of the value - * of the ccpu variable. In ULE it is defined to be zero which saves us some - * work. - */ -static uint64_t -racct_getpcpu(struct proc *p, u_int pcpu) -{ - u_int swtime; -#ifdef SCHED_4BSD - fixpt_t pctcpu, pctcpu_next; -#endif - fixpt_t p_pctcpu; - struct thread *td; - - ASSERT_RACCT_ENABLED(); - KASSERT((p->p_flag & P_IDLEPROC) == 0, - ("racct_getpcpu: idle process %p", p)); - - /* - * If the process is swapped out, we count its %cpu usage as zero. - * This behaviour is consistent with the userland ps(1) tool. - */ - if ((p->p_flag & P_INMEM) == 0) - return (0); - swtime = (ticks - p->p_swtick) / hz; - - /* - * For short-lived processes, the sched_pctcpu() returns small - * values even for cpu intensive processes. Therefore we use - * our own estimate in this case. - */ - if (swtime < RACCT_PCPU_SECS) - return (pcpu); - - p_pctcpu = 0; - FOREACH_THREAD_IN_PROC(p, td) { - thread_lock(td); -#ifdef SCHED_4BSD - pctcpu = sched_pctcpu(td); - /* Count also the yet unfinished second. */ - pctcpu_next = (pctcpu * ccpu_exp[1]) >> FSHIFT; - pctcpu_next += sched_pctcpu_delta(td); - p_pctcpu += max(pctcpu, pctcpu_next); -#else - /* - * In ULE the %cpu statistics are updated on every - * sched_pctcpu() call. So special calculations to - * account for the latest (unfinished) second are - * not needed. - */ - p_pctcpu += sched_pctcpu(td); -#endif - thread_unlock(td); - } - -#ifdef SCHED_4BSD - if (swtime <= CCPU_EXP_MAX) - return ((100 * (uint64_t)p_pctcpu * 1000000) / - (FSCALE - ccpu_exp[swtime])); -#endif - - return ((100 * (uint64_t)p_pctcpu * 1000000) / FSCALE); -} - static void racct_add_racct(struct racct *dest, const struct racct *src) { @@ -505,19 +444,6 @@ racct_adjust_resource(struct racct *racct, int resource, ("%s: resource %d usage < 0", __func__, resource)); racct->r_resources[resource] = 0; } - - /* - * There are some cases where the racct %cpu resource would grow - * beyond 100% per core. For example in racct_proc_exit() we add - * the process %cpu usage to the ucred racct containers. If too - * many processes terminated in a short time span, the ucred %cpu - * resource could grow too much. Also, the 4BSD scheduler sometimes - * returns for a thread more than 100% cpu usage. So we set a sane - * boundary here to 100% * the maximum number of CPUs. - */ - if ((resource == RACCT_PCTCPU) && - (racct->r_resources[RACCT_PCTCPU] > 100 * 1000000 * (int64_t)MAXCPU)) - racct->r_resources[RACCT_PCTCPU] = 100 * 1000000 * (int64_t)MAXCPU; } static int @@ -641,10 +567,44 @@ racct_add_buf(struct proc *p, const struct buf *bp, int is_write) RACCT_UNLOCK(); } +static void +racct_settime_locked(struct proc *p, bool exit) +{ + struct thread *td; + struct timeval wallclock; + uint64_t runtime; + + ASSERT_RACCT_ENABLED(); + RACCT_LOCK_ASSERT(); + PROC_LOCK_ASSERT(p, MA_OWNED); + + if (exit) { + /* + * proc_reap() has already calculated rux + * and added crux to rux. + */ + runtime = cputick2usec(p->p_rux.rux_runtime - + p->p_crux.rux_runtime); + } else { + PROC_STATLOCK(p); + FOREACH_THREAD_IN_PROC(p, td) + ruxagg(p, td); + PROC_STATUNLOCK(p); + runtime = cputick2usec(p->p_rux.rux_runtime); + } + microuptime(&wallclock); + timevalsub(&wallclock, &p->p_stats->p_start); + + racct_set_locked(p, RACCT_CPU, runtime, 0); + racct_set_locked(p, RACCT_WALLCLOCK, + (uint64_t)wallclock.tv_sec * 1000000 + + wallclock.tv_usec, 0); +} + static int racct_set_locked(struct proc *p, int resource, uint64_t amount, int force) { - int64_t old_amount, decayed_amount, diff_proc, diff_cred; + int64_t old_amount, diff_proc, diff_cred; #ifdef RCTL int error; #endif @@ -661,17 +621,7 @@ racct_set_locked(struct proc *p, int resource, uint64_t amount, int force) * The diffs may be negative. */ diff_proc = amount - old_amount; - if (resource == RACCT_PCTCPU) { - /* - * Resources in per-credential racct containers may decay. - * If this is the case, we need to calculate the difference - * between the new amount and the proportional value of the - * old amount that has decayed in the ucred racct containers. - */ - decayed_amount = old_amount * RACCT_DECAY_FACTOR / FSCALE; - diff_cred = amount - decayed_amount; - } else - diff_cred = diff_proc; + diff_cred = diff_proc; #ifdef notyet KASSERT(diff_proc >= 0 || RACCT_CAN_DROP(resource), ("%s: usage of non-droppable resource %d dropping", __func__, @@ -914,8 +864,6 @@ racct_proc_fork(struct proc *parent, struct proc *child) goto out; #endif - /* Init process cpu time. */ - child->p_prev_runtime = 0; child->p_throttled = 0; /* @@ -970,37 +918,16 @@ racct_proc_fork_done(struct proc *child) void racct_proc_exit(struct proc *p) { - struct timeval wallclock; - uint64_t pct_estimate, pct, runtime; int i; if (!racct_enable) return; PROC_LOCK(p); - /* - * We don't need to calculate rux, proc_reap() has already done this. - */ - runtime = cputick2usec(p->p_rux.rux_runtime); -#ifdef notyet - KASSERT(runtime >= p->p_prev_runtime, ("runtime < p_prev_runtime")); -#else - if (runtime < p->p_prev_runtime) - runtime = p->p_prev_runtime; -#endif - microuptime(&wallclock); - timevalsub(&wallclock, &p->p_stats->p_start); - if (wallclock.tv_sec > 0 || wallclock.tv_usec > 0) { - pct_estimate = (1000000 * runtime * 100) / - ((uint64_t)wallclock.tv_sec * 1000000 + - wallclock.tv_usec); - } else - pct_estimate = 0; - pct = racct_getpcpu(p, pct_estimate); - RACCT_LOCK(); - racct_set_locked(p, RACCT_CPU, runtime, 0); - racct_add_cred_locked(p->p_ucred, RACCT_PCTCPU, pct); + + racct_settime_locked(p, true); + racct_zeropcpu_locked(p); KASSERT(p->p_racct->r_resources[RACCT_RSS] == 0, ("process reaped with %ju allocated for RSS\n", @@ -1076,6 +1003,10 @@ racct_move(struct racct *dest, struct racct *src) RACCT_LOCK(); racct_add_racct(dest, src); racct_sub_racct(src, src); + dest->r_runtime = src->r_runtime; + dest->r_time = src->r_time; + src->r_runtime = 0; + timevalsub(&src->r_time, &src->r_time); RACCT_UNLOCK(); } @@ -1178,8 +1109,6 @@ racct_proc_wakeup(struct proc *p) static void racct_decay_callback(struct racct *racct, void *dummy1, void *dummy2) { - int64_t r_old, r_new; - ASSERT_RACCT_ENABLED(); RACCT_LOCK_ASSERT(); @@ -1189,15 +1118,6 @@ racct_decay_callback(struct racct *racct, void *dummy1, void *dummy2) rctl_throttle_decay(racct, RACCT_READIOPS); rctl_throttle_decay(racct, RACCT_WRITEIOPS); #endif - - r_old = racct->r_resources[RACCT_PCTCPU]; - - /* If there is nothing to decay, just exit. */ - if (r_old <= 0) - return; - - r_new = r_old * RACCT_DECAY_FACTOR / FSCALE; - racct->r_resources[RACCT_PCTCPU] = r_new; } static void @@ -1235,13 +1155,100 @@ racct_proc_to_skip(const struct proc *p) return (p->p_state != PRS_NORMAL || (p->p_flag & P_IDLEPROC) != 0); } +static void +racct_updatepcpu_racct_locked(struct racct *racct) +{ + struct timeval diff; + uint64_t elapsed; + uint64_t runtime; + uint64_t newpcpu; + uint64_t oldpcpu; + + ASSERT_RACCT_ENABLED(); + RACCT_LOCK_ASSERT(); + + /* Difference between now and previously-recorded time. */ + microuptime(&diff); + timevalsub(&diff, &racct->r_time); + elapsed = (uint64_t)diff.tv_sec * 1000000 + diff.tv_usec; + + /* Difference between current and previously-recorded runtime. */ + runtime = racct->r_resources[RACCT_CPU] - racct->r_runtime; + + newpcpu = runtime * 100 * 1000000 / elapsed; + oldpcpu = racct->r_resources[RACCT_PCTCPU]; + /* + * This calculation is equivalent to + * (1 - 0.3) * newpcpu + 0.3 * oldpcpu + * where RACCT_DECAY_FACTOR = 0.3 * FSCALE. + */ + racct->r_resources[RACCT_PCTCPU] = ((FSCALE - RACCT_DECAY_FACTOR) * + newpcpu + RACCT_DECAY_FACTOR * oldpcpu) / FSCALE; + if (racct->r_resources[RACCT_PCTCPU] > + 100 * 1000000 * (uint64_t)mp_ncpus) + racct->r_resources[RACCT_PCTCPU] = 100 * 1000000 * + (uint64_t)mp_ncpus; + + /* Record current times. */ + racct->r_runtime = racct->r_resources[RACCT_CPU]; + timevaladd(&racct->r_time, &diff); +} + +static void +racct_zeropcpu_locked(struct proc *p) +{ + ASSERT_RACCT_ENABLED(); + PROC_LOCK_ASSERT(p, MA_OWNED); + + p->p_racct->r_resources[RACCT_PCTCPU] = 0; +} + +static void +racct_updatepcpu_locked(struct proc *p) +{ + ASSERT_RACCT_ENABLED(); + PROC_LOCK_ASSERT(p, MA_OWNED); + + racct_updatepcpu_racct_locked(p->p_racct); +} + +static void +racct_updatepcpu_pre(void) +{ + + RACCT_LOCK(); +} + +static void +racct_updatepcpu_post(void) +{ + + RACCT_UNLOCK(); +} + +static void +racct_updatepcpu_racct_callback(struct racct *racct, void *dummy1, void *dummy2) +{ + racct_updatepcpu_racct_locked(racct); +} + +static void +racct_updatepcpu_containers(void) +{ + ASSERT_RACCT_ENABLED(); + + ui_racct_foreach(racct_updatepcpu_racct_callback, racct_updatepcpu_pre, + racct_updatepcpu_post, NULL, NULL); + loginclass_racct_foreach(racct_updatepcpu_racct_callback, racct_updatepcpu_pre, + racct_updatepcpu_post, NULL, NULL); + prison_racct_foreach(racct_updatepcpu_racct_callback, racct_updatepcpu_pre, + racct_updatepcpu_post, NULL, NULL); +} + static void racctd(void) { - struct thread *td; struct proc *p; - struct timeval wallclock; - uint64_t pct, pct_estimate, runtime; ASSERT_RACCT_ENABLED(); @@ -1253,34 +1260,10 @@ racctd(void) FOREACH_PROC_IN_SYSTEM(p) { PROC_LOCK(p); if (racct_proc_to_skip(p)) { - if (p->p_state == PRS_ZOMBIE) - racct_set(p, RACCT_PCTCPU, 0); PROC_UNLOCK(p); continue; } - microuptime(&wallclock); - timevalsub(&wallclock, &p->p_stats->p_start); - PROC_STATLOCK(p); - FOREACH_THREAD_IN_PROC(p, td) - ruxagg(p, td); - runtime = cputick2usec(p->p_rux.rux_runtime); - PROC_STATUNLOCK(p); -#ifdef notyet - KASSERT(runtime >= p->p_prev_runtime, - ("runtime < p_prev_runtime")); -#else - if (runtime < p->p_prev_runtime) - runtime = p->p_prev_runtime; -#endif - p->p_prev_runtime = runtime; - if (wallclock.tv_sec > 0 || wallclock.tv_usec > 0) { - pct_estimate = (1000000 * runtime * 100) / - ((uint64_t)wallclock.tv_sec * 1000000 + - wallclock.tv_usec); - } else - pct_estimate = 0; - pct = racct_getpcpu(p, pct_estimate); RACCT_LOCK(); #ifdef RCTL rctl_throttle_decay(p->p_racct, RACCT_READBPS); @@ -1288,11 +1271,8 @@ racctd(void) rctl_throttle_decay(p->p_racct, RACCT_READIOPS); rctl_throttle_decay(p->p_racct, RACCT_WRITEIOPS); #endif - racct_set_locked(p, RACCT_PCTCPU, pct, 1); - racct_set_locked(p, RACCT_CPU, runtime, 0); - racct_set_locked(p, RACCT_WALLCLOCK, - (uint64_t)wallclock.tv_sec * 1000000 + - wallclock.tv_usec, 0); + racct_settime_locked(p, false); + racct_updatepcpu_locked(p); RACCT_UNLOCK(); PROC_UNLOCK(p); } @@ -1320,6 +1300,8 @@ racctd(void) PROC_UNLOCK(p); } sx_sunlock(&allproc_lock); + + racct_updatepcpu_containers(); pause("-", hz); } } diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 53da0baa02e2..95a279742300 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -763,7 +763,7 @@ struct proc { LIST_HEAD(, mqueue_notifier) p_mqnotifier; /* (c) mqueue notifiers.*/ struct kdtrace_proc *p_dtrace; /* (*) DTrace-specific data. */ struct cv p_pwait; /* (*) wait cv for exit/exec. */ - uint64_t p_prev_runtime; /* (c) Resource usage accounting. */ + uint64_t p_spare; /* Unused spare. */ struct racct *p_racct; /* (b) Resource accounting. */ int p_throttled; /* (c) Flag for racct pcpu throttling */ /* diff --git a/sys/sys/racct.h b/sys/sys/racct.h index 22b61bba537d..a7c51413feba 100644 --- a/sys/sys/racct.h +++ b/sys/sys/racct.h @@ -142,13 +142,17 @@ extern bool racct_enable; /* * The 'racct' structure defines resource consumption for a particular - * subject, such as process or jail. + * subject, such as process or jail. It also contains the total + * cpu time and real time of the subject, recorded at the most recent + * time that RACCT_PCPU was updated. * * This structure must be filled with zeroes initially. */ struct racct { int64_t r_resources[RACCT_MAX + 1]; LIST_HEAD(, rctl_rule_link) r_rule_links; + uint64_t r_runtime; + struct timeval r_time; }; SYSCTL_DECL(_kern_racct); From nobody Tue Jan 6 19:25:24 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dm1N51H0qz6MYpy for ; Tue, 06 Jan 2026 19: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dm1N50DVgz3DFq for ; Tue, 06 Jan 2026 19: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=1767727525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lSpddJ4OXqkYDy1TUj9UHjSlLKnbUTyhRq3A66tkvUI=; b=v9VYwXLeZ4+PJUuAhhfyOeCO7fza/7u3FBR/YNWmnGIfaYsImXFAKgKkQIjumcgdOp9+D7 QXgdurcDsBQ0xBUw6gwsbay9RWXw7HL+RNFvsd7tavig9CJlGfW7C3WOrejXkFAQan1EO6 6++Xu8yoGPZcxBZTZC754FLtUjSUZT6ifcvymxiRRXSfeyaimhOKuHqL4NBUfKEoDc35zS Kgq1SmUDweUNBQ5EA2VMcL9Gl/8SAeEXQjvTY+r8I044LxgiqzfGBpBP3x0CwaCkjHKw50 5wGwBnckG2iz9pzo2hAZOdwHgGn5Jwm/BkVCnkNedQ0hdXdoJznEcmPr90cBLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767727525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lSpddJ4OXqkYDy1TUj9UHjSlLKnbUTyhRq3A66tkvUI=; b=yZf+wnKi3X2vpQIHlFP/f/QOMAgPiVRUBoMFxSzyGymml2Vu7LApGiqNJU8NtggxUJmlTd WSy2nn1KTa/hOQlJGZR4lSmqXI3uJNh6Yb8OF0j2H1xMhTJwYeZwt2kIJxaPghjXvVEV+C c8G6JQJeyrN3Y4x7NsgDJcVqnaLw4Cer1eYaVHbAjLQe2CIQtO7p4qDXZbFWiT0frKcU6H p2Dp1YcSzmA60uhPaZ3jjDZJYOfx1Udz6Xt3Vrs7hkOg0W40XELEsZUXNKQYwxidVcwb5s 8wGRoWVHlYvTC+uThT8xCcoJ3KWgqOcvgyAhx5la1+et9qIiqPBdVOB8Sd1u0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767727525; a=rsa-sha256; cv=none; b=ltiKQ7tcE2GOCAB4CwSYbOxq7EpmPEpNjUY0K9Rv4DYhvuxdIUIO4AjuPllNUDcNZ9EaMy uEqXfHzv3YNYc69YeNg7xgW6TebCmI5QeiMBAPREiogfyRRuKdH0eB4JJFwqio7gZSoCzX jXph7aymhsJZJkWxTSsZRJJJiQAOY28VVY29+PIZX2xhOuPFhVWmJb2h5YZPs5bIPR1G04 fUhxJsGOQzVEx9ZuqM1vQxRy1s+pdJAnQkAXhX0/FE7FQhi+rdRSiaK+2grnwarl6PL1Ho wtQUZ9RzZfPMT1TQ9zXF6bRVTliHjriQZJZ0vYKCep9DkOzEpW7gFepgNLj0sQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dm1N46t6vz4GF for ; Tue, 06 Jan 2026 19:25:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 42a80 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 06 Jan 2026 19:25:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 0957cb17e8a7 - stable/14 - kern: racct: Remove code unused since %cpu resource computation revamp List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 0957cb17e8a79b94c1e80bf53d57d333c86071c5 Auto-Submitted: auto-generated Date: Tue, 06 Jan 2026 19:25:24 +0000 Message-Id: <695d61a4.42a80.7a19069@gitrepo.freebsd.org> The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=0957cb17e8a79b94c1e80bf53d57d333c86071c5 commit 0957cb17e8a79b94c1e80bf53d57d333c86071c5 Author: Olivier Certner AuthorDate: 2025-12-18 14:05:11 +0000 Commit: Olivier Certner CommitDate: 2026-01-06 19:24:19 +0000 kern: racct: Remove code unused since %cpu resource computation revamp Reviewed by: emaste, markj Fixes: c72188d85a79 ("racct: Improve handling of the pcpu resource") MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D54284 (cherry picked from commit 55ce12672b948c002431851af54843bfc7f50d6f) --- sys/kern/kern_racct.c | 133 -------------------------------------------------- 1 file changed, 133 deletions(-) diff --git a/sys/kern/kern_racct.c b/sys/kern/kern_racct.c index 2bea87d12ffd..3b4c479b95d5 100644 --- a/sys/kern/kern_racct.c +++ b/sys/kern/kern_racct.c @@ -78,14 +78,6 @@ SYSCTL_BOOL(_kern_racct, OID_AUTO, enable, CTLFLAG_RDTUN, &racct_enable, SYSCTL_UINT(_kern_racct, OID_AUTO, pcpu_threshold, CTLFLAG_RW, &pcpu_threshold, 0, "Processes with higher %cpu usage than this value can be throttled."); -/* - * How many seconds it takes to use the scheduler %cpu calculations. When a - * process starts, we compute its %cpu usage by dividing its runtime by the - * process wall clock time. After RACCT_PCPU_SECS pass, we use the value - * provided by the scheduler. - */ -#define RACCT_PCPU_SECS 3 - struct mtx racct_lock; MTX_SYSINIT(racct_lock, &racct_lock, "racct lock", MTX_DEF); @@ -190,131 +182,6 @@ int racct_types[] = { static const fixpt_t RACCT_DECAY_FACTOR = 0.3 * FSCALE; -#ifdef SCHED_4BSD -/* - * Contains intermediate values for %cpu calculations to avoid using floating - * point in the kernel. - * ccpu_exp[k] = FSCALE * (ccpu/FSCALE)^k = FSCALE * exp(-k/20) - * It is needed only for the 4BSD scheduler, because in ULE, the ccpu equals to - * zero so the calculations are more straightforward. - */ -fixpt_t ccpu_exp[] = { - [0] = FSCALE * 1, - [1] = FSCALE * 0.95122942450071400909, - [2] = FSCALE * 0.90483741803595957316, - [3] = FSCALE * 0.86070797642505780722, - [4] = FSCALE * 0.81873075307798185866, - [5] = FSCALE * 0.77880078307140486824, - [6] = FSCALE * 0.74081822068171786606, - [7] = FSCALE * 0.70468808971871343435, - [8] = FSCALE * 0.67032004603563930074, - [9] = FSCALE * 0.63762815162177329314, - [10] = FSCALE * 0.60653065971263342360, - [11] = FSCALE * 0.57694981038048669531, - [12] = FSCALE * 0.54881163609402643262, - [13] = FSCALE * 0.52204577676101604789, - [14] = FSCALE * 0.49658530379140951470, - [15] = FSCALE * 0.47236655274101470713, - [16] = FSCALE * 0.44932896411722159143, - [17] = FSCALE * 0.42741493194872666992, - [18] = FSCALE * 0.40656965974059911188, - [19] = FSCALE * 0.38674102345450120691, - [20] = FSCALE * 0.36787944117144232159, - [21] = FSCALE * 0.34993774911115535467, - [22] = FSCALE * 0.33287108369807955328, - [23] = FSCALE * 0.31663676937905321821, - [24] = FSCALE * 0.30119421191220209664, - [25] = FSCALE * 0.28650479686019010032, - [26] = FSCALE * 0.27253179303401260312, - [27] = FSCALE * 0.25924026064589150757, - [28] = FSCALE * 0.24659696394160647693, - [29] = FSCALE * 0.23457028809379765313, - [30] = FSCALE * 0.22313016014842982893, - [31] = FSCALE * 0.21224797382674305771, - [32] = FSCALE * 0.20189651799465540848, - [33] = FSCALE * 0.19204990862075411423, - [34] = FSCALE * 0.18268352405273465022, - [35] = FSCALE * 0.17377394345044512668, - [36] = FSCALE * 0.16529888822158653829, - [37] = FSCALE * 0.15723716631362761621, - [38] = FSCALE * 0.14956861922263505264, - [39] = FSCALE * 0.14227407158651357185, - [40] = FSCALE * 0.13533528323661269189, - [41] = FSCALE * 0.12873490358780421886, - [42] = FSCALE * 0.12245642825298191021, - [43] = FSCALE * 0.11648415777349695786, - [44] = FSCALE * 0.11080315836233388333, - [45] = FSCALE * 0.10539922456186433678, - [46] = FSCALE * 0.10025884372280373372, - [47] = FSCALE * 0.09536916221554961888, - [48] = FSCALE * 0.09071795328941250337, - [49] = FSCALE * 0.08629358649937051097, - [50] = FSCALE * 0.08208499862389879516, - [51] = FSCALE * 0.07808166600115315231, - [52] = FSCALE * 0.07427357821433388042, - [53] = FSCALE * 0.07065121306042958674, - [54] = FSCALE * 0.06720551273974976512, - [55] = FSCALE * 0.06392786120670757270, - [56] = FSCALE * 0.06081006262521796499, - [57] = FSCALE * 0.05784432087483846296, - [58] = FSCALE * 0.05502322005640722902, - [59] = FSCALE * 0.05233970594843239308, - [60] = FSCALE * 0.04978706836786394297, - [61] = FSCALE * 0.04735892439114092119, - [62] = FSCALE * 0.04504920239355780606, - [63] = FSCALE * 0.04285212686704017991, - [64] = FSCALE * 0.04076220397836621516, - [65] = FSCALE * 0.03877420783172200988, - [66] = FSCALE * 0.03688316740124000544, - [67] = FSCALE * 0.03508435410084502588, - [68] = FSCALE * 0.03337326996032607948, - [69] = FSCALE * 0.03174563637806794323, - [70] = FSCALE * 0.03019738342231850073, - [71] = FSCALE * 0.02872463965423942912, - [72] = FSCALE * 0.02732372244729256080, - [73] = FSCALE * 0.02599112877875534358, - [74] = FSCALE * 0.02472352647033939120, - [75] = FSCALE * 0.02351774585600910823, - [76] = FSCALE * 0.02237077185616559577, - [77] = FSCALE * 0.02127973643837716938, - [78] = FSCALE * 0.02024191144580438847, - [79] = FSCALE * 0.01925470177538692429, - [80] = FSCALE * 0.01831563888873418029, - [81] = FSCALE * 0.01742237463949351138, - [82] = FSCALE * 0.01657267540176124754, - [83] = FSCALE * 0.01576441648485449082, - [84] = FSCALE * 0.01499557682047770621, - [85] = FSCALE * 0.01426423390899925527, - [86] = FSCALE * 0.01356855901220093175, - [87] = FSCALE * 0.01290681258047986886, - [88] = FSCALE * 0.01227733990306844117, - [89] = FSCALE * 0.01167856697039544521, - [90] = FSCALE * 0.01110899653824230649, - [91] = FSCALE * 0.01056720438385265337, - [92] = FSCALE * 0.01005183574463358164, - [93] = FSCALE * 0.00956160193054350793, - [94] = FSCALE * 0.00909527710169581709, - [95] = FSCALE * 0.00865169520312063417, - [96] = FSCALE * 0.00822974704902002884, - [97] = FSCALE * 0.00782837754922577143, - [98] = FSCALE * 0.00744658307092434051, - [99] = FSCALE * 0.00708340892905212004, - [100] = FSCALE * 0.00673794699908546709, - [101] = FSCALE * 0.00640933344625638184, - [102] = FSCALE * 0.00609674656551563610, - [103] = FSCALE * 0.00579940472684214321, - [104] = FSCALE * 0.00551656442076077241, - [105] = FSCALE * 0.00524751839918138427, - [106] = FSCALE * 0.00499159390691021621, - [107] = FSCALE * 0.00474815099941147558, - [108] = FSCALE * 0.00451658094261266798, - [109] = FSCALE * 0.00429630469075234057, - [110] = FSCALE * 0.00408677143846406699, -}; -#endif - -#define CCPU_EXP_MAX 110 - static void racct_add_racct(struct racct *dest, const struct racct *src) { From nobody Wed Jan 7 00:31:13 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dm8921lRCz6Mxm4 for ; Wed, 07 Jan 2026 00:31:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dm8921GBYz45p3 for ; Wed, 07 Jan 2026 00:31:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767745878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m4S+pf95fdiB0Pf6HYN0i5JT1O0xLu980hDHJt0F9gk=; b=ql/jbUl5IyV+1YL6vkB1ykdvEALYK58Pc4JhWILfFTFAkPizEOZkrF8G1bcOIT9dpBfGoo Uqr8HLSm16R3eFOjOogvIcQQ03cRRHOiD0Vw0pLh9kIQ2wry9P07u1Av0f4SJ6ug3Up2/+ wCIrK5gfKHyOVi4JxRGM8hUwaZystWvF7AXregmQ4qEgwFW3fVMKYWpt945dICg5OV19iY c9sLmoKSmjwJky2doP7VK7/oiDqN4v03PsALKNZbwK9TZDxLgri0truUXPxm/boF8WMm3a bPCevwcXK1vsF0U7350CGDqa0l3SeBu9KBvsBhUl8UYKzg7oTa78gYuktwxxBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767745878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m4S+pf95fdiB0Pf6HYN0i5JT1O0xLu980hDHJt0F9gk=; b=rgAEymdl+ANikgL9+pjPUGv1sYoh9xVXcbxRl/0AnozRzTVeueNMLJOwfJaLXVrDHrii8x dcTeCxrcJUPWjfDlytgj3UWb1+zhsRjDfUHM+IMVLUiUSEEjwFdExWVoAlXaaqw+wGGjf1 +MLlGmx/Ke4ePZ5wofNSCVcAAlhZClCagNwn0a1T5ImWgDw8q9grsYmQw+3Pgs4rbldMCg 2Tg7WLbFEZUYHYVvGylwp4GNNMJaULeUlDIxsy4QmaitCnp0lHrEBFWycid5zq0dwd/L2d zjN39NaWJ3m/T2zoXcFrnUIsTQk+Tfw7knB49oEsx00hBvik1EUdeZjvQ/am8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767745878; a=rsa-sha256; cv=none; b=OmairElFy38i+DalYIIEjbG46eOjzjbisWZx9hNA9m+s1D9WrqAj2gqVspFLkE+tf5P26P nN00MxfeKgGzooiRE6dwShDa9DUYFlL5DLkgfnjs6WkVYlpvSx5Ei4aG2DWnem0xThn1uU BU0zE499Ca7nfk5hfO1OTPLiZ/JOsvKasXsMXjoK2b2r5VXXiNxklPAs6iY77ztgS8wFpb Fso+9AQgmJcMapbuzn8OS+btwtk+sW/76gACjZYTO2WVQnqFITVvOBNetMW+8xM1bFN6CM 5d0byDCFn49CMelImHECg/6rAE/Y2pzzwgBzyoHqCdZ/g6ixhZE0uGeoJXFNlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dm8920rnpzTkM for ; Wed, 07 Jan 2026 00:31:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3765e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 00:31:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 28cb50f5a8bc - stable/15 - vm/vm_object.h: clarify the OBJ_ONEMAPPING semantic List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 28cb50f5a8bccd8f28b1fcca81784fa201de735f Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 00:31:13 +0000 Message-Id: <695da951.3765e.eeb3d8@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=28cb50f5a8bccd8f28b1fcca81784fa201de735f commit 28cb50f5a8bccd8f28b1fcca81784fa201de735f Author: Konstantin Belousov AuthorDate: 2025-12-31 22:26:38 +0000 Commit: Konstantin Belousov CommitDate: 2026-01-07 00:30:32 +0000 vm/vm_object.h: clarify the OBJ_ONEMAPPING semantic (cherry picked from commit 9c923575606bbd29dcf0ec3384150d2d67136cbb) --- sys/vm/vm_object.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index 20e9fc1fcdcd..be712fafb3dc 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -197,8 +197,9 @@ struct vm_object { #define OBJ_SPLIT 0x00000400 /* object is being split */ #define OBJ_COLLAPSING 0x00000800 /* Parent of collapse. */ #define OBJ_COLORED 0x00001000 /* pg_color is defined */ -#define OBJ_ONEMAPPING 0x00002000 /* One USE (a single, non-forked) - mapping flag */ +#define OBJ_ONEMAPPING 0x00002000 /* Each page is allowed to have at most + one managed mapping, all in the same + vm_map */ #define OBJ_PAGERPRIV1 0x00004000 /* Pager private */ #define OBJ_PAGERPRIV2 0x00008000 /* Pager private */ #define OBJ_SYSVSHM 0x00010000 /* SysV SHM */ From nobody Wed Jan 7 08:05:23 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmLF01YZZz6MQ9P for ; Wed, 07 Jan 2026 08:05:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmLF00MHTz3s3G for ; Wed, 07 Jan 2026 08:05:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767773124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ktwPxjfnq9RoB/DqEnyh8IHcDwHCaKZPjWaPOl9MgPA=; b=cpUkBJvIlVx2YmorZzCW+HmpdTaRhAj9UCSQNLAgb8KTrDQvvxz0b9klnmtrhCoP2LmBb/ WSyW184zeML/BcS5FlgIwZiCnj6se2NyT3e2gudIPwMyqW+3Uy1wuSwy0MBzh/adt9Z4TQ W3ZKpk2uh7nJVkWK1zL9kTMEUKljipITMoWM83ayrh9IcLLzKfWguQ7s0kjJlInhmsck3C sh+WtaxF5hJEK1pkVvfteNAiujFbWfQKxGBak+HZIe9uN518bexkB9jGJqxmW5XyGO7upC 5RXMMqoYRnbHkl1hiY9Z4ugVKL4Z6oS6gYkomT4sR74LaX4Q0haaRhe8x5Okkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767773124; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ktwPxjfnq9RoB/DqEnyh8IHcDwHCaKZPjWaPOl9MgPA=; b=b8o0lhDEL/GRVqMn5ugrxW4LNL4bnryGHy3J3lhjeMAECH5htn0tUDk2YWvvd0Wlzl3Obg expr86BmYgpRpsq2XZ7RoNSNUh1ieQwGEmi0hTgXBWXh0uQnTgy+QGIvo3Ejy0FlnnNti6 Z8GA74r4N1IOe2A82NNUghqMQyuSZjt5qOSEEo2ZpIzfxOllu4wktvywkRIyLtFiWEBU9p hkbYjNgbMD5MO4jbrYzYUY9phvCpfxJIF/1lK33T6A047U2WoN6gmkHbHTjtuefR9alkIe hN18hbZ8AK6ohXw9yqXFyjxY7/j0l5vvjFqICMCzZnJ11tL1hlmWG52MOMs3GA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767773124; a=rsa-sha256; cv=none; b=pVp3JMULu8+2+56kcWgZVeIzIznSwGQVsvZxtaT7MVpOl/dc+UNOKBuxfRMyUInCK+ncZ/ upe0J3q947je88cF8NgoGp3CElK7huEPU0TNjt+iaeInnRFbWzy6uQtLX+po38nNXtBtNh hWwFNDirFYXPEuru7+aX8Sd2dTdnH55PLgyR/dwKQA5IPKiEkpYCfzmRla5OvNBzaj2Bjt EGW9/Xp7eaIRlYysKtdH4Sxa2MLN3DEXNerTlE8GcCR+3aOGP8Gcok04SVNbA5DOrHA893 WgJHaaRg4U72HhVBA9LcUAHWZjyflfoG0MYAVKuex3nccLflWi0miBDlLZV1VQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmLDz72Q9zknn for ; Wed, 07 Jan 2026 08:05:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4513b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 08:05:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Osipov Subject: git: 7b718d24968f - stable/15 - mrsas.4: Fix devid hex style List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7b718d24968fd625e0d88e43929d8e712d01642e Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 08:05:23 +0000 Message-Id: <695e13c3.4513b.18472922@gitrepo.freebsd.org> The branch stable/15 has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=7b718d24968fd625e0d88e43929d8e712d01642e commit 7b718d24968fd625e0d88e43929d8e712d01642e Author: Michael Osipov AuthorDate: 2026-01-07 08:04:14 +0000 Commit: Michael Osipov CommitDate: 2026-01-07 08:05:11 +0000 mrsas.4: Fix devid hex style (cherry picked from commit c2b407244f3a939d8b09f9a22d872ebdce5f6b19) --- share/man/man4/mrsas.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/mrsas.4 b/share/man/man4/mrsas.4 index 5f7a0e6e45ea..8d906b464921 100644 --- a/share/man/man4/mrsas.4 +++ b/share/man/man4/mrsas.4 @@ -333,7 +333,7 @@ was extended to support up to MR-Fusion .Nm is the new driver reworked by LSI which supports Thunderbolt and onward products. -The SAS+SATA RAID controller with device id 0x005b is referred to as +The SAS+SATA RAID controller with device id 0x005B is referred to as the Thunderbolt controller throughout this man page. .Ed .Bd -ragged From nobody Wed Jan 7 12:12:21 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmRkB4WCXz6MhtD; Wed, 07 Jan 2026 12:12:34 +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 4dmRkB0llyz3Jtd; Wed, 07 Jan 2026 12:12:33 +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 607CCLLO022983; Wed, 7 Jan 2026 14:12:24 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 607CCLLO022983 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 607CCLDQ022982; Wed, 7 Jan 2026 14:12:21 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 7 Jan 2026 14:12:21 +0200 From: Konstantin Belousov To: Michael Osipov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Subject: Re: git: 7b718d24968f - stable/15 - mrsas.4: Fix devid hex style Message-ID: References: <695e13c3.4513b.18472922@gitrepo.freebsd.org> List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <695e13c3.4513b.18472922@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dmRkB0llyz3Jtd On Wed, Jan 07, 2026 at 08:05:23AM +0000, Michael Osipov wrote: > The branch stable/15 has been updated by michaelo: Merged commits must sit in main at least 3 days, according to the committer's guide. Even the trivial changes are under the policies. > > URL: https://cgit.FreeBSD.org/src/commit/?id=7b718d24968fd625e0d88e43929d8e712d01642e > > commit 7b718d24968fd625e0d88e43929d8e712d01642e > Author: Michael Osipov > AuthorDate: 2026-01-07 08:04:14 +0000 > Commit: Michael Osipov > CommitDate: 2026-01-07 08:05:11 +0000 > > mrsas.4: Fix devid hex style > > (cherry picked from commit c2b407244f3a939d8b09f9a22d872ebdce5f6b19) > --- > share/man/man4/mrsas.4 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/share/man/man4/mrsas.4 b/share/man/man4/mrsas.4 > index 5f7a0e6e45ea..8d906b464921 100644 > --- a/share/man/man4/mrsas.4 > +++ b/share/man/man4/mrsas.4 > @@ -333,7 +333,7 @@ was extended to support up to MR-Fusion > .Nm > is the new driver reworked by LSI which supports Thunderbolt and onward > products. > -The SAS+SATA RAID controller with device id 0x005b is referred to as > +The SAS+SATA RAID controller with device id 0x005B is referred to as > the Thunderbolt controller throughout this man page. > .Ed > .Bd -ragged From nobody Wed Jan 7 13:50:53 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmTvf09vNz6Mt6Y for ; Wed, 07 Jan 2026 13:50:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmTvd5VZjz3WQ0 for ; Wed, 07 Jan 2026 13:50:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767793853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Un1vq73NmsrXlR2woAmJIqcdRhmeWXZsWiGYlqLQshQ=; b=rtP/evaFrVJU5OXphwbmXMSroCoP0YjiWpboKZH3BT2mHHJ0Sqexqe3v2FFrCiiZCLoL2X ykAe6pPzuisllKZN1BKYxx2przRmFGnGr2ZUOgp8zfAaWOY8KNK3Ya8tA0s6JRjqz0OG1D N2yqQT/md4ycwTGJvDjC3EcsvRBnZEKwEwWeg+LraR+Q9HtTyFRR/1rGdkep5lIgx/wPSV kTW1Z9TlNENkKzXlBPnTlJHXKFEAH/it0ylsVna6grM/wNvIrjt7oDyytnDxm6kHNpuxS9 6EmWyGopq7yMhAGvbeEeDCA7PbiigZGEjtfEHUVWhYCxNvTGPybCXwDhDZx4Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767793853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Un1vq73NmsrXlR2woAmJIqcdRhmeWXZsWiGYlqLQshQ=; b=Z52YTOHddg1XLgf2SjL7up59CajgBf7rjLAWF0765xS2WDIVE3mtHnr8fvoVb+TWfABXSe XmZM5wpslURdRxhdp4cobGnN8+7LP/KkyQtvdzuaeyenBGVr2zO6sXCYxp0vYSDP4QiZEJ U00pdIe+j5nOTxHUsiF8O9efYwbDTEO957rKDn/mPk3d8741dUZMqI+UVYLwYGbLLRd9RS kCYbwQHYHrHuxiGrsKDGp7F+ynbq+nnGul9AMKlKiERWC07vZMZflijMwTlxo80nvvyzcX 1LNzZebLi24b5UuWnbYx/6TM/khoruH5pyhZw5rDiMR52WH7m6+HRK/ROPlarA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767793853; a=rsa-sha256; cv=none; b=ZN8M2qIlvwzXLPmqVS08858KJTtNiP4DrW5cgXqKKANXW58MVEGRvkvANh91DHTYSYtJEO rrwIFT5Dt98edIRtWXUyaO6y1c2YHeC90Wr11NrqnXfrYG+/bSuwmcoyR3Mi0SOsjpWqD8 5rA3UT3Fa9cVsgdf8+43OhdfyM+e1mPi1G6ZhBCr4LhOPLOfrKKiWleQ6DWKG7Tgmeyl3R JE2V1osmlDCb6AMKuuTmfIEy4XzCPukrXxOq+RwxSxDrpTyGbXbJoUrvId5xd/l/WLHNdS B0ukr9pgedeocEol6QHWzR8gH9D+u2H8gdCZeReR+vGb1P6IjlqrblR1t5XdGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmTvd4r0NztkF for ; Wed, 07 Jan 2026 13:50:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f4c6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 13:50:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 284f29f84ac8 - stable/14 - netmap: Let memory allocator parameters be settable via loader.conf List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 284f29f84ac8a5a3f9f02ef145332af678ccc23f Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 13:50:53 +0000 Message-Id: <695e64bd.3f4c6.77c08d52@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=284f29f84ac8a5a3f9f02ef145332af678ccc23f commit 284f29f84ac8a5a3f9f02ef145332af678ccc23f Author: Mark Johnston AuthorDate: 2025-12-14 15:47:48 +0000 Commit: Mark Johnston CommitDate: 2026-01-07 13:50:37 +0000 netmap: Let memory allocator parameters be settable via loader.conf This is useful when dev.netmap.port_numa_affinity is set to 1. When interfaces attach, they get a memory allocator that is copied from nm_mem. Parameters in nm_mem can be set using sysctls, but this happens after their values are copied. To work around this, we can make it possible to set these memory parameters as tunables. Reviewed by: vmaffione MFC after: 1 week Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D54178 (cherry picked from commit c694122f3cfb7d52b882fa79086d49f45a2c7fd2) --- sys/dev/netmap/netmap_mem2.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/sys/dev/netmap/netmap_mem2.c b/sys/dev/netmap/netmap_mem2.c index 50a5d2bc50f2..adcb1acbbd5c 100644 --- a/sys/dev/netmap/netmap_mem2.c +++ b/sys/dev/netmap/netmap_mem2.c @@ -628,22 +628,26 @@ static const struct netmap_mem_d nm_blueprint = { #define STRINGIFY(x) #x -#define DECLARE_SYSCTLS(id, name) \ - SYSBEGIN(mem2_ ## name); \ - SYSCTL_INT(_dev_netmap, OID_AUTO, name##_size, \ - CTLFLAG_RW, &nm_mem.params[id].size, 0, "Requested size of netmap " STRINGIFY(name) "s"); \ - SYSCTL_INT(_dev_netmap, OID_AUTO, name##_curr_size, \ - CTLFLAG_RD, &nm_mem.pools[id]._objsize, 0, "Current size of netmap " STRINGIFY(name) "s"); \ - SYSCTL_INT(_dev_netmap, OID_AUTO, name##_num, \ - CTLFLAG_RW, &nm_mem.params[id].num, 0, "Requested number of netmap " STRINGIFY(name) "s"); \ - SYSCTL_INT(_dev_netmap, OID_AUTO, name##_curr_num, \ - CTLFLAG_RD, &nm_mem.pools[id].objtotal, 0, "Current number of netmap " STRINGIFY(name) "s"); \ - SYSCTL_INT(_dev_netmap, OID_AUTO, priv_##name##_size, \ - CTLFLAG_RW, &netmap_min_priv_params[id].size, 0, \ +#define DECLARE_SYSCTLS(id, name) \ + SYSBEGIN(mem2_ ## name); \ + SYSCTL_INT(_dev_netmap, OID_AUTO, name##_size, \ + CTLFLAG_RWTUN, &nm_mem.params[id].size, 0, \ + "Requested size of netmap " STRINGIFY(name) "s"); \ + SYSCTL_INT(_dev_netmap, OID_AUTO, name##_curr_size, \ + CTLFLAG_RD, &nm_mem.pools[id]._objsize, 0, \ + "Current size of netmap " STRINGIFY(name) "s"); \ + SYSCTL_INT(_dev_netmap, OID_AUTO, name##_num, \ + CTLFLAG_RWTUN, &nm_mem.params[id].num, 0, \ + "Requested number of netmap " STRINGIFY(name) "s"); \ + SYSCTL_INT(_dev_netmap, OID_AUTO, name##_curr_num, \ + CTLFLAG_RD, &nm_mem.pools[id].objtotal, 0, \ + "Current number of netmap " STRINGIFY(name) "s"); \ + SYSCTL_INT(_dev_netmap, OID_AUTO, priv_##name##_size, \ + CTLFLAG_RWTUN, &netmap_min_priv_params[id].size, 0, \ "Default size of private netmap " STRINGIFY(name) "s"); \ - SYSCTL_INT(_dev_netmap, OID_AUTO, priv_##name##_num, \ - CTLFLAG_RW, &netmap_min_priv_params[id].num, 0, \ - "Default number of private netmap " STRINGIFY(name) "s"); \ + SYSCTL_INT(_dev_netmap, OID_AUTO, priv_##name##_num, \ + CTLFLAG_RWTUN, &netmap_min_priv_params[id].num, 0, \ + "Default number of private netmap " STRINGIFY(name) "s"); \ SYSEND SYSCTL_DECL(_dev_netmap); From nobody Wed Jan 7 13:50:56 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmTvj3LNhz6MtF2 for ; Wed, 07 Jan 2026 13:50:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmTvh6jh3z3WHK for ; Wed, 07 Jan 2026 13:50:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767793857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lbJpErCgbC9ejgfPtjjIyVWR1/mLfO4UrpIH5EGED94=; b=osUtnD9rvEcso18qr6MAp+K9l5r3bl6ibfQXjLnk3plgxw8OzOSOWsQ3gcEEGGy37jWXu8 E5dKFGA8MPoec5j5W0CXqsP8ygJxgN0g/qTnxo/x0moej0bbDM9IYzaIleW0dtjU2z9E7K MuOY4bM+Q9vTZW8D8cjphDuii5ZKvkaJVzRct92mYUsHa/Lrc4XZpD/aQFB2WlHPRJYusH 9hQAyb23tNW0jpp9t5HqZyZqFG52/cSYFqMnmHiWwA1H4f5lNwxVPm92WONb+mzzLxZo7g o1f2JWa2WIeOGoddiYU5n2hxyloXqgiZSeGOazKGpNRj8l5NSu5jhV7tJvQEsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767793857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lbJpErCgbC9ejgfPtjjIyVWR1/mLfO4UrpIH5EGED94=; b=qdV6M1X0E7DaXx+g7xKHy5UazZiyl6w5YWc+ZkbgKZi9CFTrXSXmWSSOOxh5x95TfGgP7d OFCkJ8T3w9fAePCiUCFWJRqtXBucY7JJcUuYYWjP1/1fv+WyHMIXx9Q6PX6R8gioQU2vlv H9zXgAtBgjACLxF5/hdYVnTowWNa+iHj7Vy3/e5SaFlGqwTN8ARfmOsoWYExd5IKmipm2u qXgaJMIjivICKkJT4PeXqMhC7ACiUAnl2+MO5avzpBtrHu6QxMQ8fky3XPhBEX027jz2o0 uXLH41QYtgQOnm6f3zZYEQ2aIyKHEfloeLxOVq56TTLfr9WQAKrJzGtIAC1f5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767793857; a=rsa-sha256; cv=none; b=lDKYWjycDRlcvTkbjduwyHOZYK+RPd+eMxx167y2lMuGB01PG8EukbsSRuoUxoFqwab4YM 6M1sB3AfexT7Ft1v5Bm09eggGcA09jjWOz61TVICBCiIMmFA7/B79rIAkLI7rAZj1tSiAF +aDNr5UKw6PDKnXnFDz4eQtl2D6mafD3qooAoI18QetDNPwSZsFiwIZ+bBGT6Qaam33XfO q0WqGVF5DVjEdAuiQvfYjYtdBWWRFCCkke6lX5f2xt2rlf6MoIeme7+6KaSCpTO+WjNuMO d5i1fPDQdP5pJ/I9H5tHWLW13Qshc7Yxi/UNmdJmjMJMn5R6moKanoQL3wHoAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmTvh6JyrzvP9 for ; Wed, 07 Jan 2026 13:50:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f4ca by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 13:50:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 5738812be35a - stable/14 - armv8rng: Fix an inverted test in random_rndr_read_one() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5738812be35a26cc1fa1f96d363d2c67bfb85fe0 Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 13:50:56 +0000 Message-Id: <695e64c0.3f4ca.3ed42fc7@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5738812be35a26cc1fa1f96d363d2c67bfb85fe0 commit 5738812be35a26cc1fa1f96d363d2c67bfb85fe0 Author: Mark Johnston AuthorDate: 2025-12-18 14:17:20 +0000 Commit: Mark Johnston CommitDate: 2026-01-07 13:50:38 +0000 armv8rng: Fix an inverted test in random_rndr_read_one() If we get a random number, the NZCV is set to 0b0000. Then "cset %w1, ne" will test whether Z == 0 and set %w1 to 1 if so. More specifically, "cset %w1, ne" maps to "csinc %w1, wzr, wzr, eq", which stores 0 in %w1 when NZCV == 0b0100 and 1 otherwise. Thus, on a successful read we expect ret != 0, so the loop condition needs to be fixed. In practice this means that we would end up trying to fetch entropy up to ten times in a row. If all attempts are successful, the last will be returned, otherwise no entropy will be returned. Reported by: Kevin Day Reviewed by: andrew Fixes: 9eecef052155 ("Add an Armv8 rndr random number provider") MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54259 (cherry picked from commit 93811883500b99f9f1fb4ffd6e764226d37dcfd0) --- sys/dev/random/armv8rng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/random/armv8rng.c b/sys/dev/random/armv8rng.c index 524d80317681..9573c09aa77a 100644 --- a/sys/dev/random/armv8rng.c +++ b/sys/dev/random/armv8rng.c @@ -64,7 +64,7 @@ random_rndr_read_one(u_long *buf) /* 1 on success, 0 on failure */ "cset %w1, ne\n" : "=&r" (val), "=&r"(ret) :: "cc"); - } while (ret != 0 && --loop > 0); + } while (ret == 0 && --loop > 0); if (ret != 0) *buf = val; From nobody Wed Jan 7 13:50:55 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmTvh4Chfz6MswM for ; Wed, 07 Jan 2026 13:50:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmTvg6WtCz3Wb0 for ; Wed, 07 Jan 2026 13:50:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767793855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nZhAojCZQQUYWmXkfldOuGiLVjRwCDyVF3oVtJMfNSM=; b=NXaI8Ygwp99+nkGMebrVeffuPd4SNd9YE/7UpS4UC3gv7zcLsJh9fSXlqCglOTu+K9st4s HGioKr7+kw0SOMdogFsNYX50Nz+H3TtD2ZQeoqkd0nmGkaRxt+pWV8SZeZBp3mma1SB8ye FCnyz+fQg8hakT4BmBHSwXi+R70uy/VoeFCddx2QBwmkBlxLTNXegdFg3+WTrf0Fj3TdOW DYNicahRSmoj0vBAMrSHaFlHcceDpqQ+2tEpTq2+hhZSRmEmtGTt1jpjYebwT6ZTvQyu60 PZBqo7V+FCekUX7QsLZtUNHhbfgFVQAZ6E8E0Bve8NgJyJ0hy5QBMrMqAImZfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767793855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nZhAojCZQQUYWmXkfldOuGiLVjRwCDyVF3oVtJMfNSM=; b=l6OcMqICwTMnFh3UqLzXzRCDhUMLibTNLq1FKDhgihw986onYA1ViSBr2rC08HljuQvAlI EufMaFYaIpAjRBTqZTbMbT2gwbFsQPrGmpLF50Jje3Fh1AtbVdiqZnSXilDwjgMZ3+zKqI xtcJeP0fg27tkvm3iLJexVrq/7VxDuMwDLCQ1nuPFtJZg/uAnYWGxAc7HaSTbLKG29Lw5s mTz0k+hvPbuzLbLEeYZxuwYVTdNLYYjHSNOBFXjPhFObnJWwz15QJQSSBqtAQMt5WvC9wW aqROJqtKNd2gt/3P+zcu3VR8pwp61Cw0ZdmGfOpKbmQE90aAwQRFR4srY8moxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767793855; a=rsa-sha256; cv=none; b=TX3IWrzcZvc4E9lqrVYa2P9rfQQ4EBZZq4u6RBVPAK6eB/OGR9c3S7g9hc3kKOvRUcceug xeZN9UTo07KF+kzkck9mWSGmbqLb2IGUSdQncw6T0ydG7ElVZc7sD7FZDJzBMDy7McrFsk UvJIHJb/lPRRI5iwgEmnm9E9g8sStJev27gGM3SJFxdywUq1zWg7QSn/UywZZj9qDWPhg0 HufxPF4EKzD+gnFBgAxMkzbnHBcXzB20G6ZFh1tKCZScoBzbKzM/2gJzCXdiGZIFwMsN2W Qz/rV4cyRXrlpV6qOnx8BhEGzsQ29+rFjluZ/HxtLlgXkqUZqC7WrD9/c7nJjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmTvg5tpgzvnF for ; Wed, 07 Jan 2026 13:50:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f1e5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 13:50:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: b87f70f695f1 - stable/14 - pfsync: Avoid zeroing the state export union List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b87f70f695f1ed21e0e7867f0c60778c3737d1a7 Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 13:50:55 +0000 Message-Id: <695e64bf.3f1e5.7e90dc26@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b87f70f695f1ed21e0e7867f0c60778c3737d1a7 commit b87f70f695f1ed21e0e7867f0c60778c3737d1a7 Author: Mark Johnston AuthorDate: 2025-12-14 15:48:27 +0000 Commit: Mark Johnston CommitDate: 2026-01-07 13:50:37 +0000 pfsync: Avoid zeroing the state export union pfsync_state_export() takes a pointer to a union that is in reality a pointer to one of the three state formats (1301, 1400, 1500), and zeros the union. The three formats do not have the same size, so zeroing is wrong when the format isn't that which has the largest size. Refactor a bit so that the zeroing happens at the layer where we know which format we're dealing with. Reported by: CHERI Reviewed by: kp MFC after: 1 week Sponsored by: CHERI Research Centre (EPSRC grant UKRI3001) Differential Revision: https://reviews.freebsd.org/D54163 (cherry picked from commit 796abca7e281f0d4b7f72f48da4f941e1c8b139c) --- sys/net/pfvar.h | 6 ++++-- sys/netpfil/pf/if_pfsync.c | 10 ++++++---- sys/netpfil/pf/pf_ioctl.c | 26 +++++++++++++++++++------- 3 files changed, 29 insertions(+), 13 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index de18ead7281e..c8ea58770c7d 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1198,8 +1198,10 @@ VNET_DECLARE(pfsync_defer_t *, pfsync_defer_ptr); #define V_pfsync_defer_ptr VNET(pfsync_defer_ptr) extern pfsync_detach_ifnet_t *pfsync_detach_ifnet_ptr; -void pfsync_state_export(union pfsync_state_union *, - struct pf_kstate *, int); +void pfsync_state_export_1301(struct pfsync_state_1301 *, + struct pf_kstate *); +void pfsync_state_export_1400(struct pfsync_state_1400 *, + struct pf_kstate *); void pf_state_export(struct pf_state_export *, struct pf_kstate *); diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index cf46a8da94df..6b828989c54d 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -1700,17 +1700,19 @@ pfsyncioctl(struct ifnet *ifp, u_long cmd, caddr_t data) static void pfsync_out_state_1301(struct pf_kstate *st, void *buf) { - union pfsync_state_union *sp = buf; + struct pfsync_state_1301 *sp; - pfsync_state_export(sp, st, PFSYNC_MSG_VERSION_1301); + sp = buf; + pfsync_state_export_1301(sp, st); } static void pfsync_out_state_1400(struct pf_kstate *st, void *buf) { - union pfsync_state_union *sp = buf; + struct pfsync_state_1400 *sp; - pfsync_state_export(sp, st, PFSYNC_MSG_VERSION_1400); + sp = buf; + pfsync_state_export_1400(sp, st); } static void diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index cf53ea638095..c7eefdf6e34c 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -3729,8 +3729,7 @@ DIOCCHANGERULE_error: break; } - pfsync_state_export((union pfsync_state_union*)&ps->state, - s, PFSYNC_MSG_VERSION_1301); + pfsync_state_export_1301(&ps->state, s); PF_STATE_UNLOCK(s); break; } @@ -3795,8 +3794,7 @@ DIOCGETSTATES_retry: if (s->timeout == PFTM_UNLINKED) continue; - pfsync_state_export((union pfsync_state_union*)p, - s, PFSYNC_MSG_VERSION_1301); + pfsync_state_export_1301(p, s); p++; nr++; } @@ -5656,11 +5654,9 @@ fail: return (error); } -void +static void pfsync_state_export(union pfsync_state_union *sp, struct pf_kstate *st, int msg_version) { - bzero(sp, sizeof(union pfsync_state_union)); - /* copy from state key */ sp->pfs_1301.key[PF_SK_WIRE].addr[0] = st->key[PF_SK_WIRE]->addr[0]; sp->pfs_1301.key[PF_SK_WIRE].addr[1] = st->key[PF_SK_WIRE]->addr[1]; @@ -5743,6 +5739,22 @@ pfsync_state_export(union pfsync_state_union *sp, struct pf_kstate *st, int msg_ pf_state_counter_hton(st->bytes[1], sp->pfs_1301.bytes[1]); } +void +pfsync_state_export_1301(struct pfsync_state_1301 *sp, struct pf_kstate *st) +{ + bzero(sp, sizeof(*sp)); + pfsync_state_export((union pfsync_state_union *)sp, st, + PFSYNC_MSG_VERSION_1301); +} + +void +pfsync_state_export_1400(struct pfsync_state_1400 *sp, struct pf_kstate *st) +{ + bzero(sp, sizeof(*sp)); + pfsync_state_export((union pfsync_state_union *)sp, st, + PFSYNC_MSG_VERSION_1400); +} + void pf_state_export(struct pf_state_export *sp, struct pf_kstate *st) { From nobody Wed Jan 7 13:50:57 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmTvk4yVgz6MswN for ; Wed, 07 Jan 2026 13:50:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmTvk0NZNz3WQ6 for ; Wed, 07 Jan 2026 13:50:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767793858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RWIqHGB3aubacnnytAJr2Pl80ju2/jEk4zxVBN4uwoc=; b=GiHmBdnQhsmhanIi7d3lbemrN4e3IQPF0Ac+p2QOZxwZ7YL5q1195qVWP4oZ0wl644nPCz YvhmrrHC5D/8dBFWuVWxkgx0axNSTuv05VDPnnX0Ytjw94RFR8yL8DGsF3JEikMah6vrX2 gpzoMoUc3rjfhnAxDn7q0/9DZuiGw6Up0G1TM4gdXscHDHH1WzJzgaogRXBEx5gLwR9tnx aWBHeMQLmrFhnyhKTZ6W6Gqx07w702UUz0/2QroF2xG9snloBZ+wnevzI4TPPFR/g0fIij LxgLkWLocF0VDLFNH+AAM9z+PfEsXqPEz+d9wzV/uB1BgSVfrA3yJhApnGyy4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767793858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RWIqHGB3aubacnnytAJr2Pl80ju2/jEk4zxVBN4uwoc=; b=H3py9jInxdLHhobCxCyQ/UYk8awulzn/aoTImapAXJwwGos9AaHqqmTbenXrG0APhUEAob yQ/tMojpVl6cmM74ETG4jsUFCKEj5tnmEEsmu9kiL72ArXDpcjPpTf+49RjLU70tcipqbF /jVkVqxaVShgTTAajv/ExdtYzVg4EItovHe0isDDqidi1jlPUBhrKNa4TiuHLWaEa7F3qg 3uB64Fku/aigZpZw2+CesoaX1YUqncM+CCPBVIsHQIQkD+IYliRtR6FfOHzmUaY6rezyH6 03o8+sm5nk3CMqUgiR2RiNy2wNNL+f4DUtN+RDszb3UM8kYQk/K7doGTd7iCiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767793858; a=rsa-sha256; cv=none; b=G5EtqE5idSM2RDUeFJbRCBRWvtp65dxbS2tV4d+MsDsY7k/k+/mb/oAaDROUj5wA0X5HOF NCzHU27aA79ENES8YHhrAIbGLwkF1JtpAqdQHouOCBajF9rYXDfbX936zToqwPgIys5nOG BZLDRCNH4iTQiIJtETVV9SSTWq/9BTfxltfMi5oIh+Zge+c+/lg2Crdsh0rl7t2dvSRB2F yWOEsLK2lwvhTOU7rUU+pYi9W27OMJhinaj16qWsCA6tvSMwjDN8ivqE6QyUPqYBg3xLya x0DgosEUMgJqKl/GmZ3EoOXr1SOhU2Sr3fNkWYjonYGPMUAKwoUaIArqOwJVLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmTvj6thCzvW1 for ; Wed, 07 Jan 2026 13:50:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d9f9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 13:50:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: ee1daae7b914 - stable/14 - tests: Fix style in ra.py List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ee1daae7b9141b771d1d25837642ec93c8791c6c Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 13:50:57 +0000 Message-Id: <695e64c1.3d9f9.32ba30b9@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ee1daae7b9141b771d1d25837642ec93c8791c6c commit ee1daae7b9141b771d1d25837642ec93c8791c6c Author: Mark Johnston AuthorDate: 2025-12-19 14:11:01 +0000 Commit: Mark Johnston CommitDate: 2026-01-07 13:50:38 +0000 tests: Fix style in ra.py No functional change intended. MFC after: 2 weeks (cherry picked from commit 7080c1b09d72e64f17185e90d7b660175f8fbaba) --- tests/sys/netinet6/ra.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/tests/sys/netinet6/ra.py b/tests/sys/netinet6/ra.py index 44814418da48..a5016b3f6e9b 100644 --- a/tests/sys/netinet6/ra.py +++ b/tests/sys/netinet6/ra.py @@ -1,4 +1,4 @@ -#- +# # SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2024 Klara, Inc. @@ -8,31 +8,33 @@ import argparse import scapy.all as sp import sys + # # Emit a router advertisement with the specified prefix. # def main(): parser = argparse.ArgumentParser("ra.py", - description="Emits Router Advertisement packets") + description="Emits Router Advertisement packets") parser.add_argument('--sendif', nargs=1, required=True, - help='The interface through which the packet will be sent') + help='The interface through which the packet will be sent') parser.add_argument('--src', nargs=1, required=True, - help='The source IP address') + help='The source IP address') parser.add_argument('--dst', nargs=1, required=True, - help='The destination IP address') + help='The destination IP address') parser.add_argument('--prefix', nargs=1, required=True, - help='The prefix to be advertised') + help='The prefix to be advertised') parser.add_argument('--prefixlen', nargs=1, required=True, type=int, - help='The prefix length to be advertised') + help='The prefix length to be advertised') args = parser.parse_args() pkt = sp.Ether() / \ - sp.IPv6(src=args.src, dst=args.dst) / \ - sp.ICMPv6ND_RA(chlim=64) / \ - sp.ICMPv6NDOptPrefixInfo(prefix=args.prefix, prefixlen=args.prefixlen) + sp.IPv6(src=args.src, dst=args.dst) / \ + sp.ICMPv6ND_RA(chlim=64) / \ + sp.ICMPv6NDOptPrefixInfo(prefix=args.prefix, prefixlen=args.prefixlen) sp.sendp(pkt, iface=args.sendif[0], verbose=False) sys.exit(0) + if __name__ == '__main__': main() From nobody Wed Jan 7 13:50:59 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmTvl4L2zz6Mt1y for ; Wed, 07 Jan 2026 13:50:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmTvl0qSvz3WbB for ; Wed, 07 Jan 2026 13:50:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767793859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g6e0WaGlNbC6lax4GC0kuJ2QOa+0KGU6JHoK9UHsC70=; b=jzUUnuhHiHOPC7CCmwmy39lwz2C/slgMuaAnwOeCWCmrHfz9WV5WpXpS4KSGhCfQwAUlMF DKCMKB2RiNpXauns5QmZv+AnbkenkGcOiNFC8K8VmTiKqAeHQknHxFqbytDfr1feofVwsO wnoQW7r0OlSKUxuhd9fcYnUvwPyjjVISyOrGkJYEiiIo+3VybF3GvkO0Ps1hfn+jENehcS Wu3FvT4XM0Dobr0KKj7ACuxU3o49IOV3O7cOXVU0MK9x/9Tsbmnjx4byb1MZxmDwgcmIow oDFgiHkRkwXchU9HC37V2Pyq6ldh2jxhibT9n0uRo5K94hNw/C6UoPx1yfSW/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767793859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g6e0WaGlNbC6lax4GC0kuJ2QOa+0KGU6JHoK9UHsC70=; b=rjEpBrD0Z0iZX/roXlke2A2f5nCJI2v+rrcqR8r8BgScyYVBb49zEHrbMjWaQzwkg+fhK/ 4RTdRC2snaT4uIDiXDnz5qlaszDS9yAq/gp5vDR5ygCOw29NlH8dXkYikBYguwzjGpK99d I9glJGBs4zvhT+O1Fq+X7avU9p5/XdhCU+U9ydpysPS1B3E783cjrWRQU2YrpzrilrtEKo VT1+WbAd2e8aVqIKW08v1Qp+5nJqDjftEGOtr58lo7o7vewJ/LvIiA5RKFPj+XUf0dRbw8 WS5YcdRJhwAEddm8LM+MxbnBkoNMZ6nAa8Bi7MkrMqLXlVPuWNQ8yzq4FLS0bw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767793859; a=rsa-sha256; cv=none; b=KoqUGDVQG8yeyrDWS166xslKqwU/b2DZ/FOqDDsfcQ1X36ecclBMQlane34CYGXXGcbLXe ODG75SHKT/cMA/jHQnefY0IPDnxo0Tk9P7+JiMCK+mmMThcZG/GoAsdCRDu6etOHiSW1qA c/5xpWo0Qr+wZ4MZlJNCPyofNcGTK4NjJWjWgVBOzQmLEFVpBW6fD9XVH8+TaxLYyM2Sxy +yQFIWfLfCNE/5bhmvqZMe47v4CRBuit1BnVwo3XGhJ1RKvHop79+WSx75I3EdlumHGj3Y CiX/VOXRpMfBrStfRImKaLsIBUUg2a8AthQiFWPaCfLHCcrU4mCooyk0EPCCJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmTvl0Hq0zvx9 for ; Wed, 07 Jan 2026 13:50:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ee1e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 13:50:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 65cf47bad664 - stable/14 - ifconfig: Fix the -L flag when using netlink List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 65cf47bad664f9395f17e698759be50fd8599e27 Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 13:50:59 +0000 Message-Id: <695e64c3.3ee1e.5dfb8dd3@gitrepo.freebsd.org> The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=65cf47bad664f9395f17e698759be50fd8599e27 commit 65cf47bad664f9395f17e698759be50fd8599e27 Author: Mark Johnston AuthorDate: 2025-12-19 14:11:20 +0000 Commit: Mark Johnston CommitDate: 2026-01-07 13:50:38 +0000 ifconfig: Fix the -L flag when using netlink By default, when ifconfig shows a v6 address derived from a router-advertised prefix, it shows the initial preferred and valid lifetimes. When -L is specified, it is supposed to show the remaining lifetimes, but this was broken in the conversion to netlink. Fix that, and add a regression test which validates ifconfig output before and after a short-lived address expires. Reported by: Franco Fichtner Reviewed by: melifaro, allanjude, Seyed Pouria Mousavizadeh Tehrani Fixes: 4c91a5dfe483 ("ifconfig: make interface and address listing use Netlink as transport") MFC after: 2 weeks Sponsored by: OPNsense Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D54294 (cherry picked from commit df6861d755c8f72380ae7fb8df535b27eba8c0be) --- sbin/ifconfig/af_inet6.c | 6 +++-- tests/sys/netinet6/ndp.sh | 62 +++++++++++++++++++++++++++++++++++++++++++++++ tests/sys/netinet6/ra.py | 11 ++++++++- 3 files changed, 76 insertions(+), 3 deletions(-) diff --git a/sbin/ifconfig/af_inet6.c b/sbin/ifconfig/af_inet6.c index 7aed391c7bf5..511b25580f07 100644 --- a/sbin/ifconfig/af_inet6.c +++ b/sbin/ifconfig/af_inet6.c @@ -375,8 +375,10 @@ show_lifetime(struct ifa_cacheinfo *ci) vl = (ci->ifa_valid == ND6_INFINITE_LIFETIME) ? 0 : ci->ifa_valid; clock_gettime(CLOCK_MONOTONIC_FAST, &now); - print_lifetime("pltime", pl + now.tv_sec, &now); - print_lifetime("vltime", vl + now.tv_sec, &now); + print_lifetime("pltime", + pl + (ip6lifetime ? ci->tstamp / 1000 : now.tv_sec), &now); + print_lifetime("vltime", + vl + (ip6lifetime ? ci->tstamp / 1000 : now.tv_sec), &now); } static void diff --git a/tests/sys/netinet6/ndp.sh b/tests/sys/netinet6/ndp.sh index 378759eb9ba4..10c101c09a19 100755 --- a/tests/sys/netinet6/ndp.sh +++ b/tests/sys/netinet6/ndp.sh @@ -188,9 +188,71 @@ ndp_slaac_default_route_cleanup() { vnet_cleanup } +atf_test_case "ndp_prefix_lifetime" "cleanup" +ndp_prefix_lifetime_head() { + atf_set descr 'Test ndp slaac address lifetime handling' + atf_set require.user root + atf_set require.progs python3 scapy +} + +ndp_prefix_lifetime_body() { + local epair0 jname prefix + + vnet_init + + jname="v6t-ndp_prefix_lifetime" + + epair0=$(vnet_mkepair) + + vnet_mkjail ${jname} ${epair0}a + + ndp_if_up ${epair0}a ${jname} + ndp_if_up ${epair0}b + atf_check jexec ${jname} ifconfig ${epair0}a inet6 accept_rtadv no_dad + + prefix="2001:db8:ffff:1000:" + + # Send an RA advertising a prefix. + atf_check -e ignore python3 $(atf_get_srcdir)/ra.py \ + --sendif ${epair0}b \ + --dst $(ndp_if_lladdr ${epair0}a ${jname}) \ + --src $(ndp_if_lladdr ${epair0}b) \ + --prefix "2001:db8:ffff:1000::" --prefixlen 64 \ + --validlifetime 10 --preferredlifetime 5 + + # Wait for a default router to appear. + while [ -z "$(jexec ${jname} ndp -r)" ]; do + sleep 0.1 + done + atf_check \ + -o match:"^default[[:space:]]+fe80:" \ + jexec ${jname} netstat -rn -6 + + atf_check \ + -o match:"inet6 ${prefix}.* prefixlen 64 autoconf pltime 5 vltime 10" \ + jexec ${jname} ifconfig ${epair0}a + + # Wait for the address to become deprecated. + sleep 6 + atf_check \ + -o match:"inet6 ${prefix}.* prefixlen 64 deprecated autoconf pltime 0 vltime [1-9]+" \ + jexec ${jname} ifconfig -L ${epair0}a + + # Wait for the address to expire. + sleep 6 + atf_check \ + -o not-match:"inet6 ${prefix}.*" \ + jexec ${jname} ifconfig ${epair0}a +} + +ndp_prefix_lifetime_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_lifetime" } diff --git a/tests/sys/netinet6/ra.py b/tests/sys/netinet6/ra.py index a5016b3f6e9b..1b08c3e53c05 100644 --- a/tests/sys/netinet6/ra.py +++ b/tests/sys/netinet6/ra.py @@ -25,12 +25,21 @@ def main(): help='The prefix to be advertised') parser.add_argument('--prefixlen', nargs=1, required=True, type=int, help='The prefix length to be advertised') + parser.add_argument('--validlifetime', nargs=1, required=False, + type=int, default=4294967295, + help='The valid lifetime of the prefix') + parser.add_argument('--preferredlifetime', nargs=1, required=False, + type=int, default=4294967295, + help='The preferred lifetime of the prefix') args = parser.parse_args() pkt = sp.Ether() / \ sp.IPv6(src=args.src, dst=args.dst) / \ sp.ICMPv6ND_RA(chlim=64) / \ - sp.ICMPv6NDOptPrefixInfo(prefix=args.prefix, prefixlen=args.prefixlen) + sp.ICMPv6NDOptPrefixInfo(prefix=args.prefix, + prefixlen=args.prefixlen, + validlifetime=args.validlifetime, + preferredlifetime=args.preferredlifetime) sp.sendp(pkt, iface=args.sendif[0], verbose=False) sys.exit(0) From nobody Wed Jan 7 13:52:38 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmTxf4d0Xz6MtCV for ; Wed, 07 Jan 2026 13:52:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmTxf0k74z3YYt for ; Wed, 07 Jan 2026 13:52:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767793958; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6fo38o5sW3UESLh+IcQPdg4gnp1nmNSoijZxk01P6oc=; b=pRH+QRwf88M/KzKPfarsoguHQ86KZsi/68viJ0p7qZz7fBtuV4Bpj2VWGxPF+DxkHLLuUq oLkz9ZeVh0xtgqkSkwHp5qgzqMbnmVzxnC0Ix7hsF1gcDW7S0FMQxMkjHaqxQSqgmj1iEE Rz6CI0bQjiAvH821wo+w8PHOZ9tXChtYJoH12N6EYuX0JqSru/gEpov4y+D5ZSru7c5t8e h1rmMhoEeTriG+X6HSGes9+swD+22SH8AXms0WyQBv0jW+ExH8vige6uTgJlUJBj58tZV3 Lc4hcB4xspYqvndUEs0xptGibHdNzlG59VdjGgKcdtuTysViu6xRbNll5VMrwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767793958; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6fo38o5sW3UESLh+IcQPdg4gnp1nmNSoijZxk01P6oc=; b=prhPIEealrzdcswvrMwDZrnwLPvmVA8MTHumCELGy+b2yUYHjtAoUQyearHQnfuZr42tOf PZdUat3RkeCFGzlKhEo9i+wgNgXANf0QrBsJqKYaJsaQ3PiEmfwj9Z6trhg/4QewVfGNzM ub7nph/pd/UiQXRH0rI+DVNEPRVAeIx46pXdkXYZM4OFtUQloBopjnKyIzTOVR6xRau+1Y Y/Q15eju3ieb7YUSyAUzjGjB+H9EKO7VW7a1i95S+jMlf8nXYxhSSxNOrU3lDmfcQ1FqQd EdQntvIQW44Pg5JxWM4+kSmviZfrHV+ou2uVbgoYy3z4GzEFel7/A6m+4IW2tA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767793958; a=rsa-sha256; cv=none; b=IxkX5zxeKekVbFtY+aHFByFSULAFZnRKpS4GNomjOll86XvA5EGy9Du0RyTWz+e6S7KXby dHSdTEujv9IS9DCCZ7oSItYDHBIPWxJovskds3qxuHE6BLIykaPQ13MtP3SSfdOdE3IkW8 W3Lvh71HX22kUfMe2YTouvm/olYQoJPVW3TOg4+DlKwo4PJawhEyoBEvrGKmbzRmXhcWeL yJRCnnfiZloteIzT9zAUSyxRfCSAif3rqHLd5v9DRcpaCm5yZBgLKKU9PKlUOlPuhU5wdy 1ClixRDp9aSTNl8l9e+50YpQH3efez/wSmkErZRCDc/jMgrBD6zKgm2I2bDTuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmTxf0G71zwCc for ; Wed, 07 Jan 2026 13:52:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f5a5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 13:52:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: ac8b22b3732a - stable/14 - mrsas.4: Cleaning List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ac8b22b3732afbc05edec105a438f13b507bbac3 Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 13:52:38 +0000 Message-Id: <695e6526.3f5a5.4b7919d5@gitrepo.freebsd.org> The branch stable/14 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=ac8b22b3732afbc05edec105a438f13b507bbac3 commit ac8b22b3732afbc05edec105a438f13b507bbac3 Author: Alexander Ziaee AuthorDate: 2025-09-28 03:41:33 +0000 Commit: Alexander Ziaee CommitDate: 2026-01-07 13:51:51 +0000 mrsas.4: Cleaning + Rewrite SYNOPSIS for consistency + Rewrite HARDWARE for HW Relnotes, and add some stragglers + Correct mdoc grammar, making sysctls aproposable and linking xrefs + Clean up TODO, cannonicalize to CAVEATS, a standard section + Editorial pass, tag SPDX MFC after: 3 days Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D52125 (cherry picked from commit 52eb7e394a7e28e9b08e2096c4a085a384cc1dd0) --- share/man/man4/mrsas.4 | 199 ++++++++++++++++++++++--------------------------- 1 file changed, 91 insertions(+), 108 deletions(-) diff --git a/share/man/man4/mrsas.4 b/share/man/man4/mrsas.4 index 36e9a7b5c7e7..5f7a0e6e45ea 100644 --- a/share/man/man4/mrsas.4 +++ b/share/man/man4/mrsas.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 2014 LSI Corp .\" All rights reserved. .\" Author: Kashyap Desai @@ -32,43 +35,42 @@ .\" are those of the authors and should not be interpreted as representing .\" official policies, either expressed or implied, of the FreeBSD Project. .\" -.Dd February 4, 2021 +.Dd August 22, 2025 .Dt MRSAS 4 .Os .Sh NAME .Nm mrsas -.Nd "LSI MegaRAID 6Gb/s and 12Gb/s SAS+SATA RAID controller driver" +.Nd Broadcom/LSI MegaRAID 6/12Gb/s SAS+SATA RAID controller driver .Sh SYNOPSIS -To compile this driver into the kernel, -place the following lines in your -kernel configuration file: -.Bd -ragged -offset indent .Cd "device pci" .Cd "device mrsas" -.Ed .Pp -Alternatively, to load the driver as a -module at boot time, place the following line in +In .Xr loader.conf 5 : -.Bd -literal -offset indent -mrsas_load="YES" -.Ed +.Cd mrsas_load="YES" +.Pp +In +.Xr sysctl.conf 5 : +.Cd dev.mrsas.X.disable_ocr +.Cd dev.mrsas.X.fw_outstanding +.Cd dev.mrsas.X.mrsas_fw_fault_check_delay +.Cd dev.mrsas.X.mrsas_io_timeout +.Cd hw.mrsas.X.debug_level .Sh DESCRIPTION The .Nm -driver will detect LSI's next generation (6Gb/s and 12Gb/s) PCI Express -SAS/SATA RAID controllers. -See the -.Nm HARDWARE -section for the supported devices list. -A disk (virtual disk/physical disk) attached to the +driver will detect Broadcom/LSI's 6Gb/s and 12Gb/s +PCI Express SAS/SATA/NVMe RAID controllers. +A disk +.Pq virtual disk/physical disk +attached to the .Nm driver will be visible to the user through .Xr camcontrol 8 as .Pa /dev/da? device nodes. -A simple management interface is also provided on a per-controller basis via the +A simple management interface is also provided per-controller via the .Pa /dev/mrsas? device node. .Pp @@ -77,8 +79,7 @@ The name is derived from the phrase "MegaRAID SAS HBA", which is substantially different than the old "MegaRAID" Driver .Xr mfi 4 -which does not connect targets -to the +which does not connect targets to the .Xr cam 4 layer and thus requires a new driver which attaches targets to the .Xr cam 4 @@ -91,8 +92,8 @@ but both the .Xr mfi 4 and .Nm -drivers can detect and manage the LSI MegaRAID SAS 2208/2308/3008/3108 series of -controllers. +drivers can detect and manage the +Broadcom/LSI MegaRAID SAS 2208/2308/3008/3108 series of controllers. .Pp The .Xr device.hints 5 @@ -103,7 +104,7 @@ By default, the .Xr mfi 4 driver will detect these controllers. See the -.Nm PRIORITY +.Sx PRIORITY section to know more about driver priority for MR-Fusion devices. .Pp .Nm @@ -124,46 +125,32 @@ rather then JBOD virtual mode. .Sh HARDWARE The .Nm -driver supports the following hardware: -.Pp -[ Thunderbolt 6Gb/s MR controller ] -.Bl -bullet -compact -.It -LSI MegaRAID SAS 9265 -.It -LSI MegaRAID SAS 9266 -.It -LSI MegaRAID SAS 9267 -.It -LSI MegaRAID SAS 9270 -.It -LSI MegaRAID SAS 9271 -.It -LSI MegaRAID SAS 9272 -.It -LSI MegaRAID SAS 9285 -.It -LSI MegaRAID SAS 9286 -.It -DELL PERC H810 -.It -DELL PERC H710/P -.El +driver supports the following LSI/Broadcom SATA/SAS RAID controllers: .Pp -[ Invader/Fury 12Gb/s MR controller ] -.Bl -bullet -compact -.It -LSI MegaRAID SAS 9380 -.It -LSI MegaRAID SAS 9361 -.It -LSI MegaRAID SAS 9341 -.It -DELL PERC H830 -.It -DELL PERC H730/P -.It -DELL PERC H330 +.Bl -column -compact "LSI MegaRAID SAS 9380" "Invader/Fury" "12Gb/s" +.It Controller Ta Chip Ta Speed +.It Broadcom SAS3916 Ta Aero Ta 12Gb/s +.It Broadcom SAS3908 Ta Aero Ta 12Gb/s +.It LSI MegaRAID SAS 9380 Ta Invader/Fury Ta 12Gb/s +.It LSI MegaRAID SAS 9361 Ta Invader/Fury Ta 12Gb/s +.It LSI MegaRAID SAS 9341 Ta Invader/Fury Ta 12Gb/s +.It LSI MegaRAID SAS 9286 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9285 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9272 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9271 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9270 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9267 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9266 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9265 Ta Thunderbolt Ta 6Gb/s +.It LSI SAS 3108 Ta Ta 12Gb/s +.It LSI SAS 3008 Ta Ta 12Gb/s +.It LSI SAS 2308 Ta Ta 6Gb/s +.It LSI SAS 2208 Ta Ta 6Gb/s +.It DELL PERC H830 Ta Invader/Fury Ta 12Gb/s +.It DELL PERC H810 Ta Thunderbolt Ta 6Gb/s +.It DELL PERC H730/P Ta Invader/Fury Ta 12Gb/s +.It DELL PERC H710/P Ta Thunderbolt Ta 6Gb/s +.It DELL PERC H330 Ta Invader/Fury Ta 12Gb/s .El .Sh CONFIGURATION To disable Online Controller Reset(OCR) for a specific @@ -171,9 +158,8 @@ To disable Online Controller Reset(OCR) for a specific driver instance, set the following tunable value in .Xr loader.conf 5 : -.Bd -literal -offset indent -dev.mrsas.X.disable_ocr=1 -.Ed +.Pp +.Dl Va dev.mrsas.X.disable_ocr=1 .Pp where X is the adapter number. .Pp @@ -181,9 +167,8 @@ To change the I/O timeout value for a specific .Nm driver instance, set the following tunable value in .Xr loader.conf 5 : -.Bd -literal -offset indent -dev.mrsas.X.mrsas_io_timeout=NNNNNN -.Ed +.Pp +.Dl Va dev.mrsas.X.mrsas_io_timeout=NNNNNN .Pp where NNNNNN is the timeout value in milli-seconds. .Pp @@ -191,9 +176,8 @@ To change the firmware fault check timer value for a specific .Nm driver instance, set the following tunable value in .Xr loader.conf 5 : -.Bd -literal -offset indent -dev.mrsas.X.mrsas_fw_fault_check_delay=NN -.Ed +.Pp +.Dl Va dev.mrsas.X.mrsas_fw_fault_check_delay=NN .Pp where NN is the fault check delay value in seconds. .Pp @@ -248,7 +232,8 @@ or subsystem for selection of MR-Fusion cards. With the above design in place, the .Xr mfi 4 -driver will attach to a MR-Fusion card given that it has a higher priority than +driver will attach to a MR-Fusion card +given that it has a higher priority than .Nm . .Pp Using @@ -267,45 +252,48 @@ At boot time, the .Xr mfi 4 driver will get priority to detect MR-Fusion controllers by default. Before -changing this default driver selection policy, LSI advises users to understand -how the driver selection policy works. +changing this default driver selection policy, +LSI advises users to understand how the driver selection policy works. LSI's policy is to provide priority to the .Xr mfi 4 -driver to detect MR-Fusion cards, but allow for the ability to choose the +driver to detect MR-Fusion cards, +but allow for the ability to choose the .Nm driver to detect MR-Fusion cards. .Pp -LSI recommends setting hw.mfi.mrsas_enable="0" for customers who are using the -older +LSI recommends setting +.Va hw.mfi.mrsas_enable="0" +for customers who are using the older .Xr mfi 4 driver and do not want to switch to .Nm . -For those customers who are using a MR-Fusion controller for the first time, LSI -recommends using the +For those using a MR-Fusion controller for the first time, +LSI recommends using the .Nm -driver and setting hw.mfi.mrsas_enable="1". +driver and setting +.Va hw.mfi.mrsas_enable="1". .Pp -Changing the default behavior is well tested under most conditions, but -unexpected behavior may pop up if more complex and unrealistic operations are -executed by switching between the +Changing the default behavior is well tested under most conditions, +but unexpected behavior may pop up +if more complex and unrealistic operations are executed +by switching between the .Xr mfi 4 and .Nm drivers for MR-Fusion. Switching drivers is designed to happen only one time. -Although multiple -switching is possible, it is not recommended. +Although multiple switching is possible, it is not recommended. The user should decide from -.Nm Start of Day +.Sy boot which driver they want to use for the MR-Fusion card. .Pp The user may see different device names when switching from .Xr mfi 4 to .Nm . -This behavior is -.Nm Functions As Designed +This behavior +.Sy works as intended and the user needs to change the .Xr fstab 5 entry manually if they are doing any experiments with @@ -314,7 +302,7 @@ and .Nm interoperability. .Sh FILES -.Bl -tag -width ".Pa /dev/mrsas?" -compact +.Bl -tag -width "/dev/mrsas?" -compact .It Pa /dev/da? array/logical disk interface .It Pa /dev/mrsas? @@ -337,7 +325,8 @@ driver first appeared in is the old .Fx driver which started with support for Gen-1 Controllers and -was extended to support up to MR-Fusion (Device ID = 0x005B, 0x005D, 0x005F). +was extended to support up to MR-Fusion +.Pq Device ID = 0x005B, 0x005D, 0x005F . .Ed .Bd -ragged .Cd "mrsas Driver:" @@ -348,12 +337,12 @@ The SAS+SATA RAID controller with device id 0x005b is referred to as the Thunderbolt controller throughout this man page. .Ed .Bd -ragged -.Nm cam aware HBA drivers: +.Sy cam aware HBA drivers: .Fx has a .Xr cam 4 -layer which attaches storage devices and provides a common access mechanism to -storage controllers and attached devices. +layer which attaches storage devices and provides a +common access mechanism to storage controllers and attached devices. The .Nm driver is @@ -368,13 +357,13 @@ driver does not understand the .Xr cam 4 layer and it directly associates storage disks to the block layer. .Pp -.Nm Thunderbolt Controller: +.Sy Thunderbolt Controller: This is the 6Gb/s MegaRAID HBA card which has device id 0x005B. .Pp -.Nm Invader Controller: +.Sy Invader Controller: This is 12Gb/s MegaRAID HBA card which has device id 0x005D. .Pp -.Nm Fury Controller: +.Sy Fury Controller: This is the 12Gb/s MegaRAID HBA card which has device id 0x005F. .Ed .Sh AUTHORS @@ -382,12 +371,7 @@ The .Nm driver and this manual page were written by .An Kashyap Desai Aq Mt Kashyap.Desai@lsi.com . -.Sh TODO -The driver does not support alias for device name (it is required when the user -switches between two drivers and does not want to edit -.Pa /etc/fstab -manually). -.Pp +.Sh CAVEATS The .Nm driver exposes devices as @@ -398,8 +382,7 @@ exposes devices as .Pa /dev/mfid? . .Pp .Nm -does not support the Linux Emulator interface. -.Pp -.Nm -will not work with -.Xr mfiutil 8 . +does not support the Linux Emulator Interface, +.Xr mfiutil 8 , +or device name aliases for switching drivers without editing +.Xr fstab 5 . From nobody Wed Jan 7 14:01:13 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dmV7f41txz6Mtqg for ; Wed, 07 Jan 2026 14:01:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dmV7f3Cgmz3ZLM for ; Wed, 07 Jan 2026 14:01:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767794478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WE68AP3wUFgYislyTwWdqdYGw7EI8NKzh2I8Kne+NuM=; b=AlbNhWosan+RUk8s3CmKrGQkFuRmo2lS1aMwwsoSnoUYSrlrYwnhWuoVMvUMIYGEjvBeUE mvK4MXZg9wwNJrbDjwy1fZejxcRzlODHqX2GwXnhX67a/3w7XjHiK/6E81bVIKiDH52YXu AP9EYiOQIjM07EukLlVRIGZozC9IORY1faAxOI1BgCzicyM/ktzVauqfNNGc6nteRVAeyz RWyMAtSVjFbP5/FwaBmj4JNHNkq7jQHk39xD69y7wIieuWI+1yspfHK2JTvyAWedp+eQpA JUjO8Br1UgvC705up4ges7U24+OAfLJklGG6OgXbUDvB7/WU2cGUqqdRPSQJrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767794478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WE68AP3wUFgYislyTwWdqdYGw7EI8NKzh2I8Kne+NuM=; b=E+A71fuFEq07YF9cdPLNgvGSWNX/VtOOwDuaAzquCzzunEOp5lVfUNO6H+QsYp0+LTwJW3 DvTRclQHi/T5ADaB0pL26ZuS6N21tma8wv3GJTR2XE/uxzR+rg3GhaMV4Ex6wVabq9HQ3v wmZKVeQ1YNB5nfgX9wi728cYjtfZdYrSh2QWJzMAaYnGyA50jq95lye4+CzqVNvhMtDtPI cKbaYdGekZ3UJpNoeUb+a+gwa7YtxB/CzQcf65FN1AKuSQDf5+zGE5oNAhiIMjHteR0Dj4 1X8PomXkdke1nQD++9rVDPGtResXZ4MTuPsn2zopBjAwEveOhSURulr/Gv21vg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767794478; a=rsa-sha256; cv=none; b=tp8wqK780GH0rnLdHb/SlqWKJLM1rWeZ/cOrk1kNdG5X9D6L3ykJNbdTIr0DJH+954DQtN LF7QPA46mK6t1bLoS9YwQMg3M7H1PgkMpAUIsOVhLNgtjbzdE1hxTXyfD1DPCj4S9pji9f nZ/mFHQtdZO0sBk3zX1l1QiYkzt7Sc3gOtaB1RcviK46fn9DiwUVKaaedd0mRjHlwwo4A4 qQsWJcCypd1jf3QBlAfszFG4axY82p9tFjPwYCoJUOv1adsn81nk5t9P3HBLL7HHZr3i2m egNMT/uXlyk7oy9Ui1KwGR+m8ntYMgWG8d4B4mfd2LX20cHcbSU0C/snaPLIfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dmV7f2nLrzw9n for ; Wed, 07 Jan 2026 14:01:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3fbe2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Jan 2026 14:01:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Ziaee Subject: git: 98b9f1dcbc0c - stable/13 - mrsas.4: Cleaning List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 98b9f1dcbc0c35af4d8a8cbe93bb99a6b53c64b1 Auto-Submitted: auto-generated Date: Wed, 07 Jan 2026 14:01:13 +0000 Message-Id: <695e6729.3fbe2.649815d3@gitrepo.freebsd.org> The branch stable/13 has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=98b9f1dcbc0c35af4d8a8cbe93bb99a6b53c64b1 commit 98b9f1dcbc0c35af4d8a8cbe93bb99a6b53c64b1 Author: Alexander Ziaee AuthorDate: 2025-09-28 03:41:33 +0000 Commit: Alexander Ziaee CommitDate: 2026-01-07 13:57:40 +0000 mrsas.4: Cleaning + Rewrite SYNOPSIS for consistency + Rewrite HARDWARE for HW Relnotes, and add some stragglers + Correct mdoc grammar, making sysctls aproposable and linking xrefs + Clean up TODO, cannonicalize to CAVEATS, a standard section + Editorial pass, tag SPDX MFC after: 3 days Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D52125 (cherry picked from commit 52eb7e394a7e28e9b08e2096c4a085a384cc1dd0) --- share/man/man4/mrsas.4 | 199 ++++++++++++++++++++++--------------------------- 1 file changed, 91 insertions(+), 108 deletions(-) diff --git a/share/man/man4/mrsas.4 b/share/man/man4/mrsas.4 index 36e9a7b5c7e7..5f7a0e6e45ea 100644 --- a/share/man/man4/mrsas.4 +++ b/share/man/man4/mrsas.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-3-Clause +.\" .\" Copyright (c) 2014 LSI Corp .\" All rights reserved. .\" Author: Kashyap Desai @@ -32,43 +35,42 @@ .\" are those of the authors and should not be interpreted as representing .\" official policies, either expressed or implied, of the FreeBSD Project. .\" -.Dd February 4, 2021 +.Dd August 22, 2025 .Dt MRSAS 4 .Os .Sh NAME .Nm mrsas -.Nd "LSI MegaRAID 6Gb/s and 12Gb/s SAS+SATA RAID controller driver" +.Nd Broadcom/LSI MegaRAID 6/12Gb/s SAS+SATA RAID controller driver .Sh SYNOPSIS -To compile this driver into the kernel, -place the following lines in your -kernel configuration file: -.Bd -ragged -offset indent .Cd "device pci" .Cd "device mrsas" -.Ed .Pp -Alternatively, to load the driver as a -module at boot time, place the following line in +In .Xr loader.conf 5 : -.Bd -literal -offset indent -mrsas_load="YES" -.Ed +.Cd mrsas_load="YES" +.Pp +In +.Xr sysctl.conf 5 : +.Cd dev.mrsas.X.disable_ocr +.Cd dev.mrsas.X.fw_outstanding +.Cd dev.mrsas.X.mrsas_fw_fault_check_delay +.Cd dev.mrsas.X.mrsas_io_timeout +.Cd hw.mrsas.X.debug_level .Sh DESCRIPTION The .Nm -driver will detect LSI's next generation (6Gb/s and 12Gb/s) PCI Express -SAS/SATA RAID controllers. -See the -.Nm HARDWARE -section for the supported devices list. -A disk (virtual disk/physical disk) attached to the +driver will detect Broadcom/LSI's 6Gb/s and 12Gb/s +PCI Express SAS/SATA/NVMe RAID controllers. +A disk +.Pq virtual disk/physical disk +attached to the .Nm driver will be visible to the user through .Xr camcontrol 8 as .Pa /dev/da? device nodes. -A simple management interface is also provided on a per-controller basis via the +A simple management interface is also provided per-controller via the .Pa /dev/mrsas? device node. .Pp @@ -77,8 +79,7 @@ The name is derived from the phrase "MegaRAID SAS HBA", which is substantially different than the old "MegaRAID" Driver .Xr mfi 4 -which does not connect targets -to the +which does not connect targets to the .Xr cam 4 layer and thus requires a new driver which attaches targets to the .Xr cam 4 @@ -91,8 +92,8 @@ but both the .Xr mfi 4 and .Nm -drivers can detect and manage the LSI MegaRAID SAS 2208/2308/3008/3108 series of -controllers. +drivers can detect and manage the +Broadcom/LSI MegaRAID SAS 2208/2308/3008/3108 series of controllers. .Pp The .Xr device.hints 5 @@ -103,7 +104,7 @@ By default, the .Xr mfi 4 driver will detect these controllers. See the -.Nm PRIORITY +.Sx PRIORITY section to know more about driver priority for MR-Fusion devices. .Pp .Nm @@ -124,46 +125,32 @@ rather then JBOD virtual mode. .Sh HARDWARE The .Nm -driver supports the following hardware: -.Pp -[ Thunderbolt 6Gb/s MR controller ] -.Bl -bullet -compact -.It -LSI MegaRAID SAS 9265 -.It -LSI MegaRAID SAS 9266 -.It -LSI MegaRAID SAS 9267 -.It -LSI MegaRAID SAS 9270 -.It -LSI MegaRAID SAS 9271 -.It -LSI MegaRAID SAS 9272 -.It -LSI MegaRAID SAS 9285 -.It -LSI MegaRAID SAS 9286 -.It -DELL PERC H810 -.It -DELL PERC H710/P -.El +driver supports the following LSI/Broadcom SATA/SAS RAID controllers: .Pp -[ Invader/Fury 12Gb/s MR controller ] -.Bl -bullet -compact -.It -LSI MegaRAID SAS 9380 -.It -LSI MegaRAID SAS 9361 -.It -LSI MegaRAID SAS 9341 -.It -DELL PERC H830 -.It -DELL PERC H730/P -.It -DELL PERC H330 +.Bl -column -compact "LSI MegaRAID SAS 9380" "Invader/Fury" "12Gb/s" +.It Controller Ta Chip Ta Speed +.It Broadcom SAS3916 Ta Aero Ta 12Gb/s +.It Broadcom SAS3908 Ta Aero Ta 12Gb/s +.It LSI MegaRAID SAS 9380 Ta Invader/Fury Ta 12Gb/s +.It LSI MegaRAID SAS 9361 Ta Invader/Fury Ta 12Gb/s +.It LSI MegaRAID SAS 9341 Ta Invader/Fury Ta 12Gb/s +.It LSI MegaRAID SAS 9286 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9285 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9272 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9271 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9270 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9267 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9266 Ta Thunderbolt Ta 6Gb/s +.It LSI MegaRAID SAS 9265 Ta Thunderbolt Ta 6Gb/s +.It LSI SAS 3108 Ta Ta 12Gb/s +.It LSI SAS 3008 Ta Ta 12Gb/s +.It LSI SAS 2308 Ta Ta 6Gb/s +.It LSI SAS 2208 Ta Ta 6Gb/s +.It DELL PERC H830 Ta Invader/Fury Ta 12Gb/s +.It DELL PERC H810 Ta Thunderbolt Ta 6Gb/s +.It DELL PERC H730/P Ta Invader/Fury Ta 12Gb/s +.It DELL PERC H710/P Ta Thunderbolt Ta 6Gb/s +.It DELL PERC H330 Ta Invader/Fury Ta 12Gb/s .El .Sh CONFIGURATION To disable Online Controller Reset(OCR) for a specific @@ -171,9 +158,8 @@ To disable Online Controller Reset(OCR) for a specific driver instance, set the following tunable value in .Xr loader.conf 5 : -.Bd -literal -offset indent -dev.mrsas.X.disable_ocr=1 -.Ed +.Pp +.Dl Va dev.mrsas.X.disable_ocr=1 .Pp where X is the adapter number. .Pp @@ -181,9 +167,8 @@ To change the I/O timeout value for a specific .Nm driver instance, set the following tunable value in .Xr loader.conf 5 : -.Bd -literal -offset indent -dev.mrsas.X.mrsas_io_timeout=NNNNNN -.Ed +.Pp +.Dl Va dev.mrsas.X.mrsas_io_timeout=NNNNNN .Pp where NNNNNN is the timeout value in milli-seconds. .Pp @@ -191,9 +176,8 @@ To change the firmware fault check timer value for a specific .Nm driver instance, set the following tunable value in .Xr loader.conf 5 : -.Bd -literal -offset indent -dev.mrsas.X.mrsas_fw_fault_check_delay=NN -.Ed +.Pp +.Dl Va dev.mrsas.X.mrsas_fw_fault_check_delay=NN .Pp where NN is the fault check delay value in seconds. .Pp @@ -248,7 +232,8 @@ or subsystem for selection of MR-Fusion cards. With the above design in place, the .Xr mfi 4 -driver will attach to a MR-Fusion card given that it has a higher priority than +driver will attach to a MR-Fusion card +given that it has a higher priority than .Nm . .Pp Using @@ -267,45 +252,48 @@ At boot time, the .Xr mfi 4 driver will get priority to detect MR-Fusion controllers by default. Before -changing this default driver selection policy, LSI advises users to understand -how the driver selection policy works. +changing this default driver selection policy, +LSI advises users to understand how the driver selection policy works. LSI's policy is to provide priority to the .Xr mfi 4 -driver to detect MR-Fusion cards, but allow for the ability to choose the +driver to detect MR-Fusion cards, +but allow for the ability to choose the .Nm driver to detect MR-Fusion cards. .Pp -LSI recommends setting hw.mfi.mrsas_enable="0" for customers who are using the -older +LSI recommends setting +.Va hw.mfi.mrsas_enable="0" +for customers who are using the older .Xr mfi 4 driver and do not want to switch to .Nm . -For those customers who are using a MR-Fusion controller for the first time, LSI -recommends using the +For those using a MR-Fusion controller for the first time, +LSI recommends using the .Nm -driver and setting hw.mfi.mrsas_enable="1". +driver and setting +.Va hw.mfi.mrsas_enable="1". .Pp -Changing the default behavior is well tested under most conditions, but -unexpected behavior may pop up if more complex and unrealistic operations are -executed by switching between the +Changing the default behavior is well tested under most conditions, +but unexpected behavior may pop up +if more complex and unrealistic operations are executed +by switching between the .Xr mfi 4 and .Nm drivers for MR-Fusion. Switching drivers is designed to happen only one time. -Although multiple -switching is possible, it is not recommended. +Although multiple switching is possible, it is not recommended. The user should decide from -.Nm Start of Day +.Sy boot which driver they want to use for the MR-Fusion card. .Pp The user may see different device names when switching from .Xr mfi 4 to .Nm . -This behavior is -.Nm Functions As Designed +This behavior +.Sy works as intended and the user needs to change the .Xr fstab 5 entry manually if they are doing any experiments with @@ -314,7 +302,7 @@ and .Nm interoperability. .Sh FILES -.Bl -tag -width ".Pa /dev/mrsas?" -compact +.Bl -tag -width "/dev/mrsas?" -compact .It Pa /dev/da? array/logical disk interface .It Pa /dev/mrsas? @@ -337,7 +325,8 @@ driver first appeared in is the old .Fx driver which started with support for Gen-1 Controllers and -was extended to support up to MR-Fusion (Device ID = 0x005B, 0x005D, 0x005F). +was extended to support up to MR-Fusion +.Pq Device ID = 0x005B, 0x005D, 0x005F . .Ed .Bd -ragged .Cd "mrsas Driver:" @@ -348,12 +337,12 @@ The SAS+SATA RAID controller with device id 0x005b is referred to as the Thunderbolt controller throughout this man page. .Ed .Bd -ragged -.Nm cam aware HBA drivers: +.Sy cam aware HBA drivers: .Fx has a .Xr cam 4 -layer which attaches storage devices and provides a common access mechanism to -storage controllers and attached devices. +layer which attaches storage devices and provides a +common access mechanism to storage controllers and attached devices. The .Nm driver is @@ -368,13 +357,13 @@ driver does not understand the .Xr cam 4 layer and it directly associates storage disks to the block layer. .Pp -.Nm Thunderbolt Controller: +.Sy Thunderbolt Controller: This is the 6Gb/s MegaRAID HBA card which has device id 0x005B. .Pp -.Nm Invader Controller: +.Sy Invader Controller: This is 12Gb/s MegaRAID HBA card which has device id 0x005D. .Pp -.Nm Fury Controller: +.Sy Fury Controller: This is the 12Gb/s MegaRAID HBA card which has device id 0x005F. .Ed .Sh AUTHORS @@ -382,12 +371,7 @@ The .Nm driver and this manual page were written by .An Kashyap Desai Aq Mt Kashyap.Desai@lsi.com . -.Sh TODO -The driver does not support alias for device name (it is required when the user -switches between two drivers and does not want to edit -.Pa /etc/fstab -manually). -.Pp +.Sh CAVEATS The .Nm driver exposes devices as @@ -398,8 +382,7 @@ exposes devices as .Pa /dev/mfid? . .Pp .Nm -does not support the Linux Emulator interface. -.Pp -.Nm -will not work with -.Xr mfiutil 8 . +does not support the Linux Emulator Interface, +.Xr mfiutil 8 , +or device name aliases for switching drivers without editing +.Xr fstab 5 . From nobody Thu Jan 8 17:14:46 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnBNW54TZz6GWfB for ; Thu, 08 Jan 2026 17: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnBNW479rz3kpG for ; Thu, 08 Jan 2026 17: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=1767892491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xo3D8Ek2IV/Q6gOfi9bvS3xDfZnJNUVPut9KEsdvQdo=; b=TLS/thUecALl+9vgW/f0OIfFN1tI5aZznhbannJk8AUCVt24GBlYY3uwHzVZRh07SaS2kY KJp9wReZWlpAwggQy2tHe3kU8n4a2Az1p7cI1im0FkA9AMUqOrBq7jdJ05jB2iHieLCto2 axzloxkuyRZp/ZgeP060Bf+0ollYAQZVgR2mpOr6hHZKGbaBhevw0X+TdFJvwS16SeiNCz KccUMhtCv0GpYZvsavPjgXSDG3Li52uYMdWx7YP6h14DRrBKYacYVT1vFWVTx8a6qF2pxh Bej6A2bPe8oDnIh5/EwnAF9wJQdIuF9S8cLnTOJ8RK+/xLSaqeppgmlrs1t1+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767892491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xo3D8Ek2IV/Q6gOfi9bvS3xDfZnJNUVPut9KEsdvQdo=; b=Wi5AK4As62X9LM+YuMNlV4B4AXSMxrJhIWlCuqK2lVg1WMQKQ3FhXyqBhLTAMM70f3Gd8w sjbN9szdgRvDrYYBhC6Bcgy7ugwxXOH4dzZpA1UqU2UKR0UsFnEJB38XNryr8QOycaYm8U P7QY0Lh17TdhXL8gwCvVCaSqJymn4WB//m0vmh1biUBv4Z61/Dc9/FYzHOgLiI8NaMRW+g jOuW+aH1TuvTXiKoIFy57SPyBP9B9c6BcLg2kpUb6VJ28rfTi0zI/Tm+A1qFyXs9JaiOt+ M3Daehqtq3Cp43onfUof/FCuojcgW0+8F0vpRxZ9lRTvlFNu4Jy05gWge7cftA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767892491; a=rsa-sha256; cv=none; b=KT1p99dq6E8PhvfWfXEIJfWs4E//AuIVxQa4urok3VbxxVQFR3fWgQ6YTBQYYAhSIfoDOC uu0rHtADDOeZzq7TClFMUKq/VBojdEXUA1o0WffUD3m44NraimZD6vIj8dfWnm2FdNxcAf ArbUNo3JWcxhgzPHL5/BGitUGlBrk561AdgztqsvwETHWL+R0OOWVTZiCqxTmOUI5CBFfm aCV4cKS4wOGBNpHLT1WXxsovjY47DKquitGAJXqnlMl7ag5buZOgYLylUAMAOKaM6w+cKA dJq2DZVuzjRwE0fwIiwcKQhUL5KVu/1mvdcHQy2yqhSDvcSi7EqPOjjyinfX9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnBNW3cSMznCV for ; Thu, 08 Jan 2026 17:14:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30d85 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 17:14:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Marian Cingel From: Ed Maste Subject: git: 4fc0ae5d6b45 - stable/14 - share/mk: Remove trailing '/' from debug info directories List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4fc0ae5d6b459156317acc070acbbdc53cda1d6e Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 17:14:46 +0000 Message-Id: <695fe606.30d85.5f2ffea9@gitrepo.freebsd.org> The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4fc0ae5d6b459156317acc070acbbdc53cda1d6e commit 4fc0ae5d6b459156317acc070acbbdc53cda1d6e Author: Marian Cingel AuthorDate: 2026-01-04 22:15:01 +0000 Commit: Ed Maste CommitDate: 2026-01-08 17:14:05 +0000 share/mk: Remove trailing '/' from debug info directories Signed-off-by: Marian Cingel Reviewed by: emaste Pull request: https://github.com/freebsd/freebsd-src/pull/1947 (cherry picked from commit 7359df79d3affeccf17f12f16c23ba3d4c5e0346) (cherry picked from commit 3e8f7f7c6c015f044f9e65ea8a1f307d449d41b3) --- share/mk/bsd.debug.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/mk/bsd.debug.mk b/share/mk/bsd.debug.mk index cf2fb4356aef..b4478ca2e7f2 100644 --- a/share/mk/bsd.debug.mk +++ b/share/mk/bsd.debug.mk @@ -61,7 +61,7 @@ CTFFLAGS+= -g _debuginstall: .if ${MK_DEBUG_FILES} != "no" && defined(DEBUGFILE) .if defined(DEBUGMKDIR) - ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dbg} -d ${DESTDIR}${DEBUGFILEDIR}/ + ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dbg} -d ${DESTDIR}${DEBUGFILEDIR} .endif ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dbg} -o ${DEBUGOWN} -g ${DEBUGGRP} -m ${DEBUGMODE} \ ${DEBUGFILE} ${DESTDIR}${DEBUGFILEDIR}/${DEBUGFILE} From nobody Thu Jan 8 17:15:25 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnBP93L2Wz6GWyj for ; Thu, 08 Jan 2026 17:15:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnBP928s8z3kpY for ; Thu, 08 Jan 2026 17:15:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767892525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cAwyTQXCqG7yrFIDuMzrw65IAL2U1n112vG7enhRsa8=; b=shhz0ncBKsoVXLxKoUZ5ZN1SJWAkDG9/AtARaKS2RYUOQBT9PfWCU0DmN7OJDLR/45MTbu mgRlt7UcBb3pVbfqWC1ylOiqpBByDJQPt0CPMnxH8H/9vymVcDX46A4kxlWJiNwG0HS2OB dzaDEh+JSjxU3pwxV57nqRu8P6ci2G1dn3tD7KjWQmOQYc1+/v7xOfMPd7tGPoydVxPSxI 4xmDhtXMN1D0TXxmhMcwkE/wy/g+6AwOLhMFOmUeygDbVkMgS0ArmvjxH2bN/dD9qnLdd1 GBkUFYDsGrqj1mgix5vuVx7u0VbLOJGAfemISEweouuptXi/QNqjZjgK9n4+Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767892525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cAwyTQXCqG7yrFIDuMzrw65IAL2U1n112vG7enhRsa8=; b=Vqqv4avxVnEPEVZajvxeCMa4lZi9fyr6cbCllJpE8uUJDT03hb5DO8TNnSMcrcTnbvGcDY CtTv4vAQ7hE216BuHh3Kx8KH26Od3dyjOQmQRyA9uiAetez73RJQAQRtqBYhGJkWG8a35g 9uyUrwMvd3vNTTv3Ovu9YFypEb4DuYU42AM0gSF9Rq2GpHcyc0Omq2G/9uOghpkKg/AzFS ZwEBPHPSRG9hLPi2kKocAmTA0gB/QGEjIJNNyq86mC8okZkgNcuoueQhdJA/ZUekwzZV+t 9wUkrLdQktEhHuWbyt4LKUU58+tRccpqwRQWoHnrF3XCdf5WLEwm3T7bL9j4Eg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767892525; a=rsa-sha256; cv=none; b=J2n1fCxDlo7btuMIFmJDMefC44cumedCjHeFamxwzKtKFL1fQ7YUntCYDDYKPFvd4NZ0XW q3xATP/5lIuMUxHUEQShCDw9wmIxk6705gmvnibDeFdK3CW5PI4JleeglVXkU6taIEaj51 c1O7kBMvoS5TYi2CsQFo7PhYLkRawDLHeHhSt+zjgIuN7QZ29vaV9fkfi4PEamxwqgYoDi s1GYEQwFh8Bu3ousgiiPFVKIbYoBQ5rEuXZ1LxQzQcv66yZUngoP+InA5+gSxUCazjdi0g 3gmReTMneDKXyM+B+OvDkABSZRqh6f4OOdB0ohzVbdYO05UHl3ghN9/2Oa+8VA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnBP91brLzp90 for ; Thu, 08 Jan 2026 17:15:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3168a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 17:15:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Alex Richardson From: Ed Maste Subject: git: e9e97eda0b1b - stable/14 - libc++: avoid use of deprecated builtin List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e9e97eda0b1b8ab23db532e90b43301b51ab1f4f Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 17:15:25 +0000 Message-Id: <695fe62d.3168a.de93c3e@gitrepo.freebsd.org> The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e9e97eda0b1b8ab23db532e90b43301b51ab1f4f commit e9e97eda0b1b8ab23db532e90b43301b51ab1f4f Author: Alex Richardson AuthorDate: 2025-09-15 22:10:07 +0000 Commit: Ed Maste CommitDate: 2026-01-08 17:14:05 +0000 libc++: avoid use of deprecated builtin This pulls in LLVM commit accfbd4cb327411ad66c0109ba1841482b871967 to avoid the use of __libcpp_is_trivially_relocatable. This fixes building FreeBSD libc++ with clang HEAD as of today. Original commit message: [libc++] Replace __is_trivially_relocatable by is_trivially_copyable (#124970) The __is_trivially_relocatable builtin has semantics that do not correspond to any current or future notion of trivial relocation. Furthermore, it currently leads to incorrect optimizations for some types on supported compilers: - Clang on Windows where types with non-trivial destructors get incorrectly optimized - AppleClang where types with non-trivial move constructors get incorrectly optimized Until there is an agreed upon and bugfree implementation of what it means to be trivially relocatable, it is safer to simply use trivially copyable instead. This doesn't leave a lot of types behind and is definitely correct. Reviewed by: dim MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52529 (cherry picked from commit d61c75f634cf52fdef9590601d881f85275eee9a) (cherry picked from commit 29e3479f2d3068a2f3e2dbb578d3fabf6389e5a6) --- .../libcxx/include/__type_traits/is_trivially_relocatable.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__type_traits/is_trivially_relocatable.h b/contrib/llvm-project/libcxx/include/__type_traits/is_trivially_relocatable.h index c0871731cc00..9b0e240de55f 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/is_trivially_relocatable.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/is_trivially_relocatable.h @@ -11,7 +11,6 @@ #include <__config> #include <__type_traits/enable_if.h> -#include <__type_traits/integral_constant.h> #include <__type_traits/is_same.h> #include <__type_traits/is_trivially_copyable.h> @@ -23,8 +22,11 @@ _LIBCPP_BEGIN_NAMESPACE_STD // A type is trivially relocatable if a move construct + destroy of the original object is equivalent to // `memcpy(dst, src, sizeof(T))`. - -#if __has_builtin(__is_trivially_relocatable) +// +// Note that we don't use the __is_trivially_relocatable Clang builtin right now because it does not +// implement the semantics of any current or future trivial relocation proposal and it can lead to +// incorrect optimizations on some platforms (Windows) and supported compilers (AppleClang). +#if __has_builtin(__is_trivially_relocatable) && 0 template struct __libcpp_is_trivially_relocatable : integral_constant {}; #else From nobody Thu Jan 8 17:15:26 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnBPB3wKWz6GWfC for ; Thu, 08 Jan 2026 17:15:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnBPB2rHlz3kpb for ; Thu, 08 Jan 2026 17:15:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767892526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v4BgHDRKrS8DIdO7348jtkR63R4J3nmrQjfriqRk0aA=; b=vvnZGmS9LCLdaP9EZWjJsvN2wbf5BlFDai2NfG70MBRRkghFLEnF08qcXqdCn7CgyLNQM2 NDf3QIZgdZrjSqBwPPA6nCsKbElnfJ87VIKZJBlJ9wHQUo5CvCHEazsjf8vJVJ7kEjGwcp nGsDs474d+T9MVDhOSSxapJwa+DVYvA9S+mjJrtV2tsGaJ5FACbCdt/00/DlGluA9THK1U 3UrBYiE20YubTDiEvy4tF4a2ZrYrGx+wugv0LNOcpLo6+f4wLgEjvsBADe6eMrivQbhJvJ u8dS/S/dwALMXuONn6MWRrHJ0DLLUOPBwsOpouBb5JyDNO8lLnzniadjO1xYmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767892526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v4BgHDRKrS8DIdO7348jtkR63R4J3nmrQjfriqRk0aA=; b=crYeEA9RKWUeZDXlU73D4jeBuGPL15cJBxRRJm+A+0HlvIQiqrCagLDJQQbmY43X45Od00 E43ihPjW8uRJXj2QMw6qMi3tQB3fl5Y1qvmrIVyTMzZ8hfGb7Ww/ttlJ4OzD0K9Hbz+26B Oi81eth3lT2Uqt+ustWGOudqTFDmi6v/upT0EDpMGLlldoTBbkbVQeraOg/AUOKGMy+0AV 5xDE/uzBG7OHLiZ0H2Foe8p0tnWBPbFiJDgYqX/rPAsw2x7P1ORr6ySNikE4tKScJzBFA5 UNeg5QlIdKBbLaiKBJzAs3CJBzx1fYd/0s3MunacWD+EFYmAe5t4KjPewbN1Zg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767892526; a=rsa-sha256; cv=none; b=lBf2twbqiChd+5SG3jrj+Uyv+zW8QlltR8RgzlDJLX+nqGq2HL9+NFkrGUpMZJhq0cdP16 E5L/uOxKlgNSkk2K2Gxp4hiEQg7rkRrOBqVVE2FwRHAyUPo+VphDfaQrn+AZch3YrYnVC8 afZbcUqX64wbPE3xxbSC+fhxmcZ/mrWRJyEMmiSN6RM0QuXDF/5Nrw9n7ijWfYttSXL6XW QnHIMeTVDnIHY97q1o0WQ9AcYVFJ3Db7u/CItxrDUGEypAxf4adxslbBiAAOYJdgyGsq/L n1VuJUPCgLFS9MsTSQc7yt8TgX5tuGWZ3RSGzB4P0nCf52e6FHPeOBe5hi2cXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnBPB2PpsznbY for ; Thu, 08 Jan 2026 17:15:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30a2a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 17:15:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Alex Richardson From: Ed Maste Subject: git: 21f206bb330f - stable/14 - libc++: avoid use of deprecated __reference_binds_to_temporary List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 21f206bb330f769afb82d7b6e8f3762478ee74b3 Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 17:15:26 +0000 Message-Id: <695fe62e.30a2a.2b6c0533@gitrepo.freebsd.org> The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=21f206bb330f769afb82d7b6e8f3762478ee74b3 commit 21f206bb330f769afb82d7b6e8f3762478ee74b3 Author: Alex Richardson AuthorDate: 2025-09-15 22:11:39 +0000 Commit: Ed Maste CommitDate: 2026-01-08 17:14:05 +0000 libc++: avoid use of deprecated __reference_binds_to_temporary This was removed in upstream libc++ in commit 437ad06f762ab07d89badecdd20627db200b98d3, but as this does not apply cleanly to the current repository, I am applying the equivalent change in a minimally invasive way. This is needed to build with latest clang HEAD as of today. Reviewed by: dim MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52530 (cherry picked from commit dee76cf2f3dace6290ccab07c2db17355994e70f) (cherry picked from commit e487653fe43434768b533b1d7f360ec448c05b4c) --- contrib/llvm-project/libcxx/include/tuple | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/libcxx/include/tuple b/contrib/llvm-project/libcxx/include/tuple index 081b90c7bbec..1d39974d5a6b 100644 --- a/contrib/llvm-project/libcxx/include/tuple +++ b/contrib/llvm-project/libcxx/include/tuple @@ -302,7 +302,9 @@ class __tuple_leaf { template static _LIBCPP_HIDE_FROM_ABI constexpr bool __can_bind_reference() { -# if __has_keyword(__reference_binds_to_temporary) +# if __has_keyword(__reference_constructs_from_temporary) + return !__reference_constructs_from_temporary(_Hp, _Tp); +# elif __has_keyword(__reference_binds_to_temporary) return !__reference_binds_to_temporary(_Hp, _Tp); # else return true; From nobody Thu Jan 8 17:15:27 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnBPC6fW4z6GX2f for ; Thu, 08 Jan 2026 17:15:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnBPC57b9z3kbp for ; Thu, 08 Jan 2026 17:15:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767892527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FGL1kjx/p/Xc/kkLLyKapmXJRsNNqiNNHY64CJEqY8E=; b=AG9f965uyBsu9f30o/BsoNdaiuj91iEROMA9zxg6OIhrP2vxkvRepUwAx9azs9+KQhK61t SOurC8FWH0wcEUuDq1DErUiFjkMo9UDzZ7gbaBwZp3SE3PZLw+NHfQczdCNr7b5kfoG0dp vEqy+f8n7erEX6kcjUDA4B+aLqXWzGguqTphxsm9kvWPQau5IRNBNO7re9PEyjJKDtsHev 5q1AZRNK1JYCjOAwSs9XOfIw2uGyyDcB+teonrDHLLMJ9M/GubTeylA8P34E85BU9gtj4e wneiQeq3D0r+YFwI1WpoEpCMpelgZ2N3z7LM5wQS1LEdVpWrkgz1uwmaPxJi+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767892527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FGL1kjx/p/Xc/kkLLyKapmXJRsNNqiNNHY64CJEqY8E=; b=Gr9+brOexK/+xXMhRX3z5881zlSLm8OmPzBWlcHEPHgspaESTZ7pASEbsMM3CRbqhXl1c6 HcNSVmQLEpemnpVcg9OF+pbRT8Xi/pEYx+YAVd08QAeGHAZ40iNpxRU40Zq1gaoaWaRhsK 3iPsLcRF0jg6CjQTA3uPlw52iaTV+Rucz14WrN2t5FxoQRf3iygIwynjHnjxJd6C/qcW1+ 7GgP6rnbdziCTML7ZqQVVXFEUs+qPR4oynETxr8m8I/qrTH5LjlFuNGBYUh9z7BHbVLVMQ EC7lwdDR1KG+j5Mk6F+wq1PVgqHnKJPwW4UHx7Z9K/MyP1nlKCxslSoJgKS9vA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767892527; a=rsa-sha256; cv=none; b=sOw3mLSawFmdolTfPt6nyIJ2ypCvkzCpYl3q7Mhb108kAz3Z4YBI/1D0gfLU0pSicTxoc5 ki2lo5jTlEmeRbLl0KQLU8EQI11qaZhEzkxmepGFEnqQs9rsuCejryzAmNzSSeKrd7EgHt ePrjiM/bQdgQbbmI6u8rmfsY1dnH5Mqs5gESYT/v3Wzcvl6Qo+SF0UZ+5Bisjbmwn5u5fh KylnTvNHuSdpbcCDmw4/1sU3zIpm7fQ1A1EtbQE6qW1UgklO/y83rYLcUx7JV31d9oQp4T 9rtX2v1YSr88xQhH8k8YPsTeeiZ8a30xx1X6rgzOqpX/VO/MKFNMQyCuffRC0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnBPC3CGnznbZ for ; Thu, 08 Jan 2026 17:15:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30f36 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 17:15:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Alex Richardson From: Ed Maste Subject: git: 018c097a4fa7 - stable/14 - libc++: Fix deprecation warnings with latest clang List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 018c097a4fa7b97132746e07e4e0c21eac180c02 Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 17:15:27 +0000 Message-Id: <695fe62f.30f36.50acb924@gitrepo.freebsd.org> The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=018c097a4fa7b97132746e07e4e0c21eac180c02 commit 018c097a4fa7b97132746e07e4e0c21eac180c02 Author: Alex Richardson AuthorDate: 2025-09-15 22:13:46 +0000 Commit: Ed Maste CommitDate: 2026-01-08 17:14:06 +0000 libc++: Fix deprecation warnings with latest clang Latest clang has become more strict in diagnosing deprecated decls, so pull in LLVM commit 9feac2cbd0d80927ce9a8b4c3e810d2b81802d55. Original commit message: [libc++] Improve deprecated diagnostic guards. Recent Clang-21 builds improved the deprecated diagnotics. This uncovered missing guards in libc++ internally. Reviewed by: dim MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52531 (cherry picked from commit 086ce467adec42d58414fdb4d54c2b6819cf0c07) (cherry picked from commit 703c98dc6eeb2b36ec94e138269a221704e55f4c) --- contrib/llvm-project/libcxx/include/__functional/binary_function.h | 5 ++--- contrib/llvm-project/libcxx/include/__functional/unary_function.h | 5 ++--- contrib/llvm-project/libcxx/include/__functional/weak_result_type.h | 2 ++ contrib/llvm-project/libcxx/include/__memory/allocator_traits.h | 2 ++ 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/contrib/llvm-project/libcxx/include/__functional/binary_function.h b/contrib/llvm-project/libcxx/include/__functional/binary_function.h index ddee3b170311..18879f65112b 100644 --- a/contrib/llvm-project/libcxx/include/__functional/binary_function.h +++ b/contrib/llvm-project/libcxx/include/__functional/binary_function.h @@ -39,11 +39,10 @@ struct __binary_function_keep_layout_base { }; #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION) -_LIBCPP_DIAGNOSTIC_PUSH -_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations") +_LIBCPP_SUPPRESS_DEPRECATED_PUSH template using __binary_function = binary_function<_Arg1, _Arg2, _Result>; -_LIBCPP_DIAGNOSTIC_POP +_LIBCPP_SUPPRESS_DEPRECATED_POP #else template using __binary_function = __binary_function_keep_layout_base<_Arg1, _Arg2, _Result>; diff --git a/contrib/llvm-project/libcxx/include/__functional/unary_function.h b/contrib/llvm-project/libcxx/include/__functional/unary_function.h index 69b1bc94220a..d46df2e86fbd 100644 --- a/contrib/llvm-project/libcxx/include/__functional/unary_function.h +++ b/contrib/llvm-project/libcxx/include/__functional/unary_function.h @@ -36,11 +36,10 @@ struct __unary_function_keep_layout_base { }; #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION) -_LIBCPP_DIAGNOSTIC_PUSH -_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations") +_LIBCPP_SUPPRESS_DEPRECATED_PUSH template using __unary_function = unary_function<_Arg, _Result>; -_LIBCPP_DIAGNOSTIC_POP +_LIBCPP_SUPPRESS_DEPRECATED_POP #else template using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>; diff --git a/contrib/llvm-project/libcxx/include/__functional/weak_result_type.h b/contrib/llvm-project/libcxx/include/__functional/weak_result_type.h index ad7a8395186c..488fec9dac21 100644 --- a/contrib/llvm-project/libcxx/include/__functional/weak_result_type.h +++ b/contrib/llvm-project/libcxx/include/__functional/weak_result_type.h @@ -77,6 +77,7 @@ struct __maybe_derive_from_unary_function // bool is true template struct __maybe_derive_from_unary_function<_Tp, false> {}; +_LIBCPP_SUPPRESS_DEPRECATED_PUSH template ::value> struct __maybe_derive_from_binary_function // bool is true : public __derives_from_binary_function<_Tp>::type {}; @@ -99,6 +100,7 @@ struct __weak_result_type_imp<_Tp, false> template struct __weak_result_type : public __weak_result_type_imp<_Tp> {}; +_LIBCPP_SUPPRESS_DEPRECATED_POP // 0 argument case diff --git a/contrib/llvm-project/libcxx/include/__memory/allocator_traits.h b/contrib/llvm-project/libcxx/include/__memory/allocator_traits.h index c5fcc89327b8..f3e327edda12 100644 --- a/contrib/llvm-project/libcxx/include/__memory/allocator_traits.h +++ b/contrib/llvm-project/libcxx/include/__memory/allocator_traits.h @@ -40,6 +40,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD template \ struct NAME<_Tp, __void_t > : true_type {} +_LIBCPP_SUPPRESS_DEPRECATED_PUSH // __pointer template { using type _LIBCPP_NODEBUG = typename pointer_traits<_Ptr>::template rebind; #endif }; +_LIBCPP_SUPPRESS_DEPRECATED_POP // __void_pointer _LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_void_pointer, void_pointer); From nobody Thu Jan 8 17:15:28 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnBPD67d9z6GX56 for ; Thu, 08 Jan 2026 17:15:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnBPD4Z9qz3ksX for ; Thu, 08 Jan 2026 17:15:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767892528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GGRPq+u4yem+due+PcekLVkkPOHcNhYk1Cj3jFQoh70=; b=oQaMhTGtcIfEz3oBGX8hC0C7czSaMhWI6sX9bo6kpntzz0AXLJjUdVpA5phC6BN4UGGbOI UHEszg2j9wL5mivwwxy6Moln45rWH3S1BhjkJUzPWjCfQSFTFE4yFO2n268mAalDy6WPPl rSzGf0x3gWKukfLJu0pti3+rbbPczHgoDM9M5FEzmCnojK7g/3eWt7rCU4cBQIMqpnDCr3 d1MXNgqk3XNdFJci/9dOFJ3E+3tiFK3Lv5SkZppQlzKmfugdVJIn3jmp3RK1KQjWdRpM5h /bTXFbPeVJ7LIiIQ0C70iECg2zt6cDRzngj/ME8kYapuW/JFZrRuOglXgcmW/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767892528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GGRPq+u4yem+due+PcekLVkkPOHcNhYk1Cj3jFQoh70=; b=iQr3j0Fdhfw8hRy5nXOztYWlyOJjx0mg6oE6GCtG/UQG+8vU7KLpMhY13zOzwH3XwHJwSO tuzuWAUI39TOzFfo9YPKaNruehKqqHehipKnXm+KLRgfY9PxBpWdhiqrnpcvsBalHc/Bnk Uo+BMy9t5QuNOLry8aWQyuKJEy7RSesG9uDcqkdr+IlXpZjJ/hF3+nzSE9gCC9XDYBxCZ9 ymW+Q+1w0E21OooDRdzPpB1+FR2rCdvOGKLctD/VFvymyXRBWFfgT7Cw/6zRTMmOM3Uyl9 /E3IxvFK2zQyy9MlbbGJYz+9+6+ns8oRp4UIbo9E6wjaWpKPGyO3tI7erfDIfQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767892528; a=rsa-sha256; cv=none; b=FYMpCxbXwfelhCpl7oG/Y4b4MDHpAf8cAaZZgnekS0eoCEJWSbaZa4gN2eKBeQ15d3SOGg erYA5q9PmMqah7HRCTVFFD7BbU49rOQylvA9Ril/mQ9+/93fOJx0ZhHDhD8dx5W9gCYqIV NzshiW4/qA/Csit2dY1nuvt6INP/lDfmTRgn/EQ3uQnSbtlVKVjU5mxda1SIxWUhLoFM8E /C0k6c83oRN+dyi09eR1cgUiPiPDxPhERMaB8pzrp5L5Jw6u8Q9WzdHULNoys1NOePyYor B0ZilTTDcP0C9cAxrB/gVhFBhlrW8Eo1IfbPEUMulp9X8sVsveFgoZgO0V9d5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnBPD42FRznqN for ; Thu, 08 Jan 2026 17:15:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31700 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 17:15:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Alex Richardson From: Ed Maste Subject: git: 1410d22cac55 - stable/14 - libc++: silence -Wnontrivial-memaccess warning with newer clang List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1410d22cac55c325dc437fb4575465001e65fe97 Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 17:15:28 +0000 Message-Id: <695fe630.31700.4fc829c3@gitrepo.freebsd.org> The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1410d22cac55c325dc437fb4575465001e65fe97 commit 1410d22cac55c325dc437fb4575465001e65fe97 Author: Alex Richardson AuthorDate: 2025-09-15 22:14:18 +0000 Commit: Ed Maste CommitDate: 2026-01-08 17:14:06 +0000 libc++: silence -Wnontrivial-memaccess warning with newer clang Apply part of LLVM commit 71315698c91d0cda054b903da0594ca6f072c350 to silence the -Wnontrivial-memaccess warning that is triggered any time this function is instantiated by user code. This fixes another buildworld failure with Clang HEAD. Original commit message: [clang] Warn about memset/memcpy to NonTriviallyCopyable types (#111434) This implements a warning that's similar to what GCC does in that context: both memcpy and memset require their first and second operand to be trivially copyable, let's warn if that's not the case. Reviewed by: emaste, dim MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D52534 (cherry picked from commit 34a006eaa39ceb6b0a96fa386c9b9b8a44681979) (cherry picked from commit ca149d75e9bd6455abc3c74e7db160464cfabbdb) --- .../llvm-project/libcxx/include/__memory/uninitialized_algorithms.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/libcxx/include/__memory/uninitialized_algorithms.h b/contrib/llvm-project/libcxx/include/__memory/uninitialized_algorithms.h index 7475ef5cf85d..79cab80dcf73 100644 --- a/contrib/llvm-project/libcxx/include/__memory/uninitialized_algorithms.h +++ b/contrib/llvm-project/libcxx/include/__memory/uninitialized_algorithms.h @@ -642,7 +642,8 @@ __uninitialized_allocator_relocate(_Alloc& __alloc, _Tp* __first, _Tp* __last, _ __guard.__complete(); std::__allocator_destroy(__alloc, __first, __last); } else { - __builtin_memcpy(const_cast<__remove_const_t<_Tp>*>(__result), __first, sizeof(_Tp) * (__last - __first)); + // Casting to void* to suppress clang complaining that this is technically UB. + __builtin_memcpy(static_cast(const_cast<__remove_const_t<_Tp>*>(__result)), __first, sizeof(_Tp) * (__last - __first)); } } From nobody Thu Jan 8 20:02:29 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnG5x5p55z6MQjX for ; Thu, 08 Jan 2026 20: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnG5x4ZfDz42fT for ; Thu, 08 Jan 2026 20: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=1767902549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sj8bYD+/23a7cVJ5/ZSbDfgd26shKTygFSChi9SL8qI=; b=rJ/FizJLman7COB/6AYDN4ysL/XCG8Gp76Ys2knlRZWjwVR91wMfvWw52tB6RteRBPenf8 mvVj7PNbgaZufe/IUzAPHTJINVE782BFTf22bTdFwntxAm0X0Ni0l6hTJoIthOkmxDlLwC 0PVLSepBGE+REq07YVpW2W+69K092gfN+bQyKkCtpQ0dDauFRAbBIlXkrDFb6heKpTjFdp uBz/yDgX6dCINxjfqaBN5AFZUmIgnQcrfAWxWBf+qbmFT0Ke6u+s3Y6yVz2zWRUaAcY4pp zu1v14Mv9sJZycGFyWY266PBGSi7eDg+b2Y2907Pk8qBhr9oTPrlcbE6aEvwoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767902549; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Sj8bYD+/23a7cVJ5/ZSbDfgd26shKTygFSChi9SL8qI=; b=l/gvhuGN6xdT+dxU9CZQDtuPDgCQyCnZZC5s8mNYkzZaffODd0OkgnA+7F0H3clWU4GwO0 I2DjNRZGeCwb+OSz2PjVu+uQHVM3lcY4V04F6NN/uy9wrHlD3qxtyDCgh86hquJHnGxetA jNlxXAsW5HyWX3iN8IyBCm+rw6Px3Mk1uhfcTA7xnHfaTkKoX+q43ZYsuEUx1QDgpv5HJv Tuzp/8B1T6QB7yuems8s4dDSbS2La4ubQmjmuflRynh+O6xR0VpFAqEnwnJcVbzogAAkTs xcUuHkqJdASiNVG0mx6CtHOg2KXREYaJ2t8tFzWKwTYc3bIJxv4lwDeFsJM9jQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767902549; a=rsa-sha256; cv=none; b=Gi8PvUH7CZQUSiLzS5gkoOnZMqmDqjP8jdWZ0ag2qfH0E0yS6glkMv7v7acFwIKM+pFEe+ aIRRvMSFuKu7hsxJZhF0ENr6Z1eEkwyWpytzY0A60KZKfUSSMGXBgnhVOvk4nf9B+caMWC v3/zSCADW1xlXg6opH3PZY3YChQ38BGIdSdV6jdfJmtjQw0Ddr26w5Y040SwFtGcHMqzUd sG6/hKFVoJ5AfeHleCgBa9niwZKinevHRetNF+dUkF0cM3YXQIEZ/5iplVRPnpN9SnBd0m jVtvgN/JzUwPW562uRrSd0VH4QQutVea54R2ziPpkFdkgzl8qHHaPHD+++RtsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnG5x44YGztFl for ; Thu, 08 Jan 2026 20:02:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 8231 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 20:02:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: e4623f1a0c20 - stable/15 - inetd.conf: Correct rsync example List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: e4623f1a0c2072e66dd38990cf6e6e9e4869aa03 Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 20:02:29 +0000 Message-Id: <69600d55.8231.1769569f@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e4623f1a0c2072e66dd38990cf6e6e9e4869aa03 commit e4623f1a0c2072e66dd38990cf6e6e9e4869aa03 Author: Ed Maste AuthorDate: 2026-01-05 14:51:28 +0000 Commit: Ed Maste CommitDate: 2026-01-07 15:47:04 +0000 inetd.conf: Correct rsync example There is no rsyncd binary in the rsync package; rsync is just invoked with --daemon. PR: 122037 Sponsored by: The FreeBSD Foundation (cherry picked from commit 58a14d9596bd9a72683cbd725e817fdabe926139) --- usr.sbin/inetd/inetd.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/inetd/inetd.conf b/usr.sbin/inetd/inetd.conf index e25a77d3ca9c..008c94cd53b3 100644 --- a/usr.sbin/inetd/inetd.conf +++ b/usr.sbin/inetd/inetd.conf @@ -125,7 +125,7 @@ # Example entry for insecure rsync server # This is best combined with encrypted virtual tunnel interfaces, which can be # found with: apropos if_ | grep tunnel -#rsync stream tcp nowait root /usr/local/bin/rsyncd rsyncd --daemon +#rsync stream tcp nowait root /usr/local/bin/rsync rsyncd --daemon # # Let the system respond to date requests via tcpmux #tcpmux/+date stream tcp nowait guest /bin/date date From nobody Thu Jan 8 20:02:30 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnG5z16V2z6MQRw for ; Thu, 08 Jan 2026 20:02:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnG5y5P5sz42l9 for ; Thu, 08 Jan 2026 20: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=1767902550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bKa4yggChz3+/YOqyISZvrOMTy9pyygC+TTgwyvG28w=; b=iDmp5am/rg1T5FWLBeHDb8QJicA0zfwgMxxHvVqqYJRqV24RXgBhSI/KeU7RiXL8BSum6S LQcvkwyXfRmLFuXpFvn+gc+lDp5NGD8+VDWiZ3nPkPcCv1d3x1UCsf2KwldKZaE0DMftJH 6kphFMbYlyl6d35b2iMm+w955wGZmE2ulSA25nwxxMQJRsh4XQTUJqQ4pD6bcUhQV3XxzQ jgd+WkBk7YOTi8AkvXYcX0GCDbDKLWRbF8TDPH9VHFhYAZDle1uUCbQizgvoOOYtZo0aim H/L1Ccky6nx0OqtaGwZI0NHyNZM7UTnADNpY1KJG1Fd0qo6J+H05CmnYtOxqyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767902550; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bKa4yggChz3+/YOqyISZvrOMTy9pyygC+TTgwyvG28w=; b=nfX2wJcQdARE/zATLDkcY4bR89+lbxlY2IKruwPRPZV2yTxOLfmpjyoPVTnFnPRGQtJuoc 6PJ/tv/mH895LNbAZz/uUC+e61pTwiYjXoCzKuRnZPFHz+pleqS/AUGg6qqLQ7sAJU2MKc iTqO0H6zAN+4mGq/hamaOt8b1F+JBgEgSVAN72FySRXVS8KUYETLvdt7v3WWzv2YIBgSmL WKk1hcqoUcI6IX9Odxg0twX3dRBP2SvGgwPro9FuXjIhnuS7+z1Gp5e2aXTfvOs2F2YBfB JSfbjvFH5a4lD3H5aUfGV1zFMeT/SsNpu7B6QW2FbP4GogFN+bSZPKdK2Gn8/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767902550; a=rsa-sha256; cv=none; b=KKGt4hqDd8aVuCQ81sKlZ0OdPR39lvGkRoC+C+q57bVhs9HGxGwYsblKeUj0zVJyxeUvfw R+H6Y0y6P/UsQqlNTohdLDRV8FAZelFnZd2ggKgaPV+V8BuegfJ4X+qMvwZ6Iz8B/JkTcj vGyU60pHvangGrZBcoUi7VUVwBCi9jAHWJj/uiZ4u17AOn5UjdzP+8jneRKnRbjRaNy0yG wYqHLKviltcpmzPdhkuunwK9AAing/21IEfHJqZOvxBd2i9TKMSzp1iiOsE4OKqxhZZbfH v0G0KFHQyMiURClDwUk+Z9hIz0LOU95YaPkviQODZ55uLhotPh3eDza5ARNWeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnG5y4snZztRy for ; Thu, 08 Jan 2026 20:02:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 9d28 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 08 Jan 2026 20:02:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Marian Cingel From: Ed Maste Subject: git: b9f9f445f063 - stable/15 - share/mk: Remove trailing '/' from debug info directories List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b9f9f445f0630781621d33d1ce0154512f0389c6 Auto-Submitted: auto-generated Date: Thu, 08 Jan 2026 20:02:30 +0000 Message-Id: <69600d56.9d28.4d8a7298@gitrepo.freebsd.org> The branch stable/15 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b9f9f445f0630781621d33d1ce0154512f0389c6 commit b9f9f445f0630781621d33d1ce0154512f0389c6 Author: Marian Cingel AuthorDate: 2026-01-04 22:15:01 +0000 Commit: Ed Maste CommitDate: 2026-01-07 15:47:04 +0000 share/mk: Remove trailing '/' from debug info directories Signed-off-by: Marian Cingel Reviewed by: emaste Pull request: https://github.com/freebsd/freebsd-src/pull/1947 (cherry picked from commit 7359df79d3affeccf17f12f16c23ba3d4c5e0346) --- share/mk/bsd.debug.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/mk/bsd.debug.mk b/share/mk/bsd.debug.mk index cf2fb4356aef..b4478ca2e7f2 100644 --- a/share/mk/bsd.debug.mk +++ b/share/mk/bsd.debug.mk @@ -61,7 +61,7 @@ CTFFLAGS+= -g _debuginstall: .if ${MK_DEBUG_FILES} != "no" && defined(DEBUGFILE) .if defined(DEBUGMKDIR) - ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dbg} -d ${DESTDIR}${DEBUGFILEDIR}/ + ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dbg} -d ${DESTDIR}${DEBUGFILEDIR} .endif ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dbg} -o ${DEBUGOWN} -g ${DEBUGGRP} -m ${DEBUGMODE} \ ${DEBUGFILE} ${DESTDIR}${DEBUGFILEDIR}/${DEBUGFILE} From nobody Fri Jan 9 15:54:59 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnmZ04LFdz62hCK for ; Fri, 09 Jan 2026 15:55:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnmZ03YCgz3lmv for ; Fri, 09 Jan 2026 15:55:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767974104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bnqVU5ffkp1MS9y+fHrAbuk0KD675COVzF5Hc8flm7M=; b=qwPkzj4gtdq66F+49M1Qoq+8GvJw3U3jJNczgeXiFTbn9CqmfanZ6+p1snl52LE9xASfMX nXvJxrDCjPdh6wDFcDKxLnHz6iFBOGHGmxQq6+QNg0LdMTvrouX5W/G+8nXt6ytTr3xRsc PKZLCs9/megsucj2o2i7jBZkgxDIoNeI57W3yPk7CK3BV9ZRlNHIu1J4Kh2N9Sk9t+6g31 SdjZia6YuGYhklYpQopmfZkrB7BGo1l8mRbjRzWW1DLFLiKW0SA9r9T4Jf09ExcYHjnE7v buJs96Nm66NYWna1LTgcoqGDFXOGA7aAfGfY8UgAI4LtziKAaGRzXCJwCn8Ygw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767974104; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bnqVU5ffkp1MS9y+fHrAbuk0KD675COVzF5Hc8flm7M=; b=RVw9ZS4Ry2iQMNLbLU42ATNXv+OFf3tuPphIAAIE7Sm63A/FJ5tIy/vA+SVrz+vQwTDFff JmnawCzC2E1rp/52gvtMSZ6q9N4bkt7fjrIJE1DtlIJiROgcW04a4TS9E6+baZpgNkVAFD /Eghclg7yWBCwpCtaTwQvDIlo/AjQ4FKFqO9qbIQKDrE+Zji2QqIKskbVMLqSQfE7IC6N3 2//lRCh2wjX0uCRnfIiQ0+9ScmKAHtsBynjqP+TnKscCMSgC80wBrNvha+zFSiiwgZNCnH 9u0hLe7yNxm8WrRmzH7aQYjrhqHfPj8mtsFoscMt3xEa1OAPAJBm1Sf2QjgFSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767974104; a=rsa-sha256; cv=none; b=XZ+XVf2hXuxQ747kNnCVN6pfu/csp6pPVq0qYV33+ddrua66hwNVMJ7FooO/Ebb7PPTPno 5gbaJzfodVbumIL5u2pcQBVjyEz1RhrZqrdgu2z36kjdL4cV+bciZAvs9AoR/K4B5cRV8N o3OdDGi1pc/3yjyLmfyLJOHr3JdAemyLsPpDe5nRaYzTgjM3QK3+WwpF7ZgE37wvQz03GK e4vwPUTkMuG6uyHyxR2FH7XuP+WA6b80jjEKDvOBe8KlsXfFkzDR4f1lnxpHIF1rpfjf/s yiO7Ju5aQt4vRPQGCewf5cPKrUthIq+GkIExqQwe78gSu4/moRoL1HDWNq3ETA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnmZ038Jjzn1 for ; Fri, 09 Jan 2026 15:55:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26766 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 15:54:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Osipov Subject: git: 852a446f93ca - stable/15 - mrsas.4: Add Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 852a446f93cab8e154a9656eaab7fa84e0af47fb Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 15:54:59 +0000 Message-Id: <696124d3.26766.110bf7a@gitrepo.freebsd.org> The branch stable/15 has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=852a446f93cab8e154a9656eaab7fa84e0af47fb commit 852a446f93cab8e154a9656eaab7fa84e0af47fb Author: Michael Osipov AuthorDate: 2026-01-06 20:31:24 +0000 Commit: Michael Osipov CommitDate: 2026-01-09 15:54:42 +0000 mrsas.4: Add Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116) This is an OEM card from Fujitsu using an LSI SAS2208 ROC controller shipped with many Fujitsu PRIMERGY servers like RX300 S7. Controller description: https://www.fujitsu.com/global/products/computing/servers/primergy/blades/connection/cb-pmod-110426.html Reviewed by: ziaee MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D54566 (cherry picked from commit ccec94bf63de8ee067b03b981a283d9f968c3667) --- share/man/man4/mrsas.4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/man/man4/mrsas.4 b/share/man/man4/mrsas.4 index 8d906b464921..6645835d0bb2 100644 --- a/share/man/man4/mrsas.4 +++ b/share/man/man4/mrsas.4 @@ -35,7 +35,7 @@ .\" are those of the authors and should not be interpreted as representing .\" official policies, either expressed or implied, of the FreeBSD Project. .\" -.Dd August 22, 2025 +.Dd January 6, 2026 .Dt MRSAS 4 .Os .Sh NAME @@ -151,6 +151,7 @@ driver supports the following LSI/Broadcom SATA/SAS RAID controllers: .It DELL PERC H730/P Ta Invader/Fury Ta 12Gb/s .It DELL PERC H710/P Ta Thunderbolt Ta 6Gb/s .It DELL PERC H330 Ta Invader/Fury Ta 12Gb/s +.It Fujitsu D3116 Ta Thunderbolt Ta 6Gb/s .El .Sh CONFIGURATION To disable Online Controller Reset(OCR) for a specific From nobody Fri Jan 9 15:55:28 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnmZS6t7cz62hR3 for ; Fri, 09 Jan 2026 15:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnmZS3bTMz3mHl for ; Fri, 09 Jan 2026 15:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767974128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lvKgjaDdyQU95PDhxPK2lrIL4JHJVp4jaKLmTRw9ztU=; b=W1CIzgc/OXO5jxrdFcjC/8SbpTCscHG/HjdvNApytGU+lemXvy62tuz3r3GtHjuV1++zsE sHeW7yZ3fplZvDilyp8DyCdoMi18Il5CcrZeqr5JDclqQLHgkgqriJSC/dqmb8ma/Yc7Zt q1a/yCDlOpjHgUnqFTguUkSvNabRpoWSKkMc4PvE6qoxa3xPkWHvn6J6v0pyqWFdDjrxZG P0iQvBlVJ9PWFQMxD9FmTQBWDHrLFkef4/64ji6Ja0g136f2gjS4UwVhyc7NVA6PBxplZf P/zMk8dlf48KAszpNPMkqGj2iN03ateYLREjJl6MyqZYtd4ji+VH07wREeGRrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767974128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lvKgjaDdyQU95PDhxPK2lrIL4JHJVp4jaKLmTRw9ztU=; b=P2q9KOeGFhVpeLirGMgP1bYxCe98fqVG+hAyrCXU+GEjrVNnMrdgBErZjxReR+EQYehgqh +VAnfcfHwajpAXJTP0rZ6tHRDjYC84khCtT80T0U0flq/7R/UYF5tHkauGiBPtpPsnLBuV y2a1JMCTgY9Buy2SB4tdLRPbYuU5t4bKU7s52eY0Y9lZ9fromgMTSvPs5cqAzVxqt2ooCc xUH3lgJj5qOCgsvxP2Py/fsrWZS460X7LhCN/W3BVa2TracVbvXYRv/QkHznQkaE27LMqH rfHRYmlqSY7WUKqKsBkrllLlKG2WiDbDwAFKUJX6d8AC01w7svEod8LiRvrtZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767974128; a=rsa-sha256; cv=none; b=awysrHu0Tfo7JZixOYRWXjjBfPmwvZ0kHbOaWOkWThI8MtNi5lJanci9qgIIffEp0u+oEA dExQLA4BjjplQcBVtCeyijXHu/XvyfaAt7PSTPiGlMdqucYR7WjCjJzN8cp6Y2QSmA9PgI TUDfOzJRGkFxm/DCHVIx8AThoCVg36f3vMFtgez7Ueb4iE/klD3S3ycl1qyvDXQLvvsKwR X/KSIRiLYo7IuhTVNPjN50e4CeQfDfUhspbvuKbxamk388vC4+KTKqItwFRhKkqFnWWWA2 UGfQPv8EAoTgqlNrx5oZ6KYM94lQMHzlV14ZhSKxuvxqfbo+qwd50xLZf7IcUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnmZS36DTzbM for ; Fri, 09 Jan 2026 15:55:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26820 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 15:55:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Osipov Subject: git: 653099bcc191 - stable/14 - mrsas.4: Add Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 653099bcc191eba839d7266333618fa6ca915605 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 15:55:28 +0000 Message-Id: <696124f0.26820.1b12191f@gitrepo.freebsd.org> The branch stable/14 has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=653099bcc191eba839d7266333618fa6ca915605 commit 653099bcc191eba839d7266333618fa6ca915605 Author: Michael Osipov AuthorDate: 2026-01-06 20:31:24 +0000 Commit: Michael Osipov CommitDate: 2026-01-09 15:55:15 +0000 mrsas.4: Add Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116) This is an OEM card from Fujitsu using an LSI SAS2208 ROC controller shipped with many Fujitsu PRIMERGY servers like RX300 S7. Controller description: https://www.fujitsu.com/global/products/computing/servers/primergy/blades/connection/cb-pmod-110426.html Reviewed by: ziaee MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D54566 (cherry picked from commit ccec94bf63de8ee067b03b981a283d9f968c3667) --- share/man/man4/mrsas.4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/man/man4/mrsas.4 b/share/man/man4/mrsas.4 index 5f7a0e6e45ea..c128717600c0 100644 --- a/share/man/man4/mrsas.4 +++ b/share/man/man4/mrsas.4 @@ -35,7 +35,7 @@ .\" are those of the authors and should not be interpreted as representing .\" official policies, either expressed or implied, of the FreeBSD Project. .\" -.Dd August 22, 2025 +.Dd January 6, 2026 .Dt MRSAS 4 .Os .Sh NAME @@ -151,6 +151,7 @@ driver supports the following LSI/Broadcom SATA/SAS RAID controllers: .It DELL PERC H730/P Ta Invader/Fury Ta 12Gb/s .It DELL PERC H710/P Ta Thunderbolt Ta 6Gb/s .It DELL PERC H330 Ta Invader/Fury Ta 12Gb/s +.It Fujitsu D3116 Ta Thunderbolt Ta 6Gb/s .El .Sh CONFIGURATION To disable Online Controller Reset(OCR) for a specific From nobody Fri Jan 9 15:56:33 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnmbj479Gz62hcl for ; Fri, 09 Jan 2026 15:56:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnmbj3Qydz3mKG for ; Fri, 09 Jan 2026 15:56:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767974193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zBsQnSX4gobQE9oa4YNCLeWsf9U4gkY9MlNIqpbQN7M=; b=PEZqWZOQanZG7BAGNZJLPm1vghtBkoiJzr+76VQCtRLqgb/XE9IVvjZisLpYoDagyca8di QcDv4ryTZm2ywP62PoQgTutsLZ6SzAX9i1C6qEWTsEBIp7FWQkFNVxgsLeEQY7Ot6PlJxy N3Cpr0GpfnqMuJf698V1KgizMvDq45k/hghDQftKqghUvZ8Asg5aLNt368y9nMafbz25pq 5SAyZWK4pFkRTmkpBq1+J4p0PWMLechKggTJHMC9H2XOSYNbEcWbQ2p++LFpZsmzXp1dCz ptuazTA4FoVVpsg7NjCa1vSGAVvsDli5S58tOIL0y+9eODuUKO6+D9ymnvOX2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767974193; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zBsQnSX4gobQE9oa4YNCLeWsf9U4gkY9MlNIqpbQN7M=; b=in6JzxzKJo3flNTGxpoNOI8SgTyBgpMO5S8odZzvvMw+EnTE4wA5/rxVTC7gpiNrYSFhqT Xnz2zmT5bddrWvqOwyFCFXIuXrHW6lEUL75C4Soob+B1M9KIyc/lYo2sbXaNNhYFevplWP 1+ydlk68INcN76zXx2TrWY2ajzc/Qv5uBnECzCA1rb2i/Z16APb7i1WFNtbDugXfsBfZXV +y2qx4nOC43S+qKOSA+MYOY1PT2FKeSVPs+9c09ZgmOY1kxu4uizXX9vGMK8trF6frtQUJ p3j/1aEyuL4BZDgNql8mUQu7CVyg4KK0Lh/ZguTpynWJ4IOfb6d0WthgQaKs0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767974193; a=rsa-sha256; cv=none; b=LUA2JUtS2w8bX1ThN554wzTpfDGC0ReqXQd+tiIdz2c8Tsb6ZIbem98t6U1DEZKfz26gEZ 1h439Q9S9JkDlQGK+sZwfSrkTL2Y/uC2s6wsqt4of1HShOkgtCTGwSlIIEo/3AfBmPP0qB uhTSw2qO9Ul45guhzudb0HvwNFx1WngDNGL9mnF8i06AAwWw1OG8unNfG1qXIZvjFtL+23 vG+03DoJY+niyCHpy1zyxW9kvIqtIrTXXHww5qYmtSuaYF9tweW96CdrV9REgErnWA2Ysk HRhF6H3QkCSDLKnc0J0V2oplf4AXuHS84FB/RdiTtpiMdF9W8EvB14YB/1oXhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnmbj2r0jzbN for ; Fri, 09 Jan 2026 15:56:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24ded by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 15:56:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Osipov Subject: git: 87b6549375c2 - stable/13 - mrsas.4: Add Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 87b6549375c23a18e2a87e3c03352578d3dcb3af Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 15:56:33 +0000 Message-Id: <69612531.24ded.41dbcd50@gitrepo.freebsd.org> The branch stable/13 has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=87b6549375c23a18e2a87e3c03352578d3dcb3af commit 87b6549375c23a18e2a87e3c03352578d3dcb3af Author: Michael Osipov AuthorDate: 2026-01-06 20:31:24 +0000 Commit: Michael Osipov CommitDate: 2026-01-09 15:56:22 +0000 mrsas.4: Add Fujitsu RAID Controller SAS 6Gbit/s 1GB (D3116) This is an OEM card from Fujitsu using an LSI SAS2208 ROC controller shipped with many Fujitsu PRIMERGY servers like RX300 S7. Controller description: https://www.fujitsu.com/global/products/computing/servers/primergy/blades/connection/cb-pmod-110426.html Reviewed by: ziaee MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D54566 (cherry picked from commit ccec94bf63de8ee067b03b981a283d9f968c3667) --- share/man/man4/mrsas.4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/man/man4/mrsas.4 b/share/man/man4/mrsas.4 index 5f7a0e6e45ea..c128717600c0 100644 --- a/share/man/man4/mrsas.4 +++ b/share/man/man4/mrsas.4 @@ -35,7 +35,7 @@ .\" are those of the authors and should not be interpreted as representing .\" official policies, either expressed or implied, of the FreeBSD Project. .\" -.Dd August 22, 2025 +.Dd January 6, 2026 .Dt MRSAS 4 .Os .Sh NAME @@ -151,6 +151,7 @@ driver supports the following LSI/Broadcom SATA/SAS RAID controllers: .It DELL PERC H730/P Ta Invader/Fury Ta 12Gb/s .It DELL PERC H710/P Ta Thunderbolt Ta 6Gb/s .It DELL PERC H330 Ta Invader/Fury Ta 12Gb/s +.It Fujitsu D3116 Ta Thunderbolt Ta 6Gb/s .El .Sh CONFIGURATION To disable Online Controller Reset(OCR) for a specific From nobody Fri Jan 9 17:43:51 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnpzW4xgKz6B0S4 for ; Fri, 09 Jan 2026 17:43:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnpzW4Jzlz43H8 for ; Fri, 09 Jan 2026 17:43:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767980631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ck+USlPtP5q/1uYlcMcpQhdpXRMuV92L1m6h0xYKvhg=; b=npYZS//X3OBmP4nxt74S2eNJKZ1+nzBPf/6FMao5NGi03kqq3uzUaNrJ5dIw2HOyWAjspO pKVJXXVroFGO9cGBrR3BmCk9aqcD/y45p89q5tJGQ6I2yvTGRYLeyLvP0oX5QL6EUsstA5 QMytPHCMHM1MXNTCCytIDVgZ4iOa3MeVbnOrgyggWzk+OqkXdZd0aj/zb6NnKVY954Hb9+ SkAzyWipgl5Dd1dyyN10lAuijwRWYDiaSTRRHRwM78MxLfIy+xI1waO/gECzuB6H1K0DL0 W4yoq1vfHVn4rOTh1HnITCt9dyJ6gINTtE5csM73FM3O1sAwksBybOOkweppyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767980631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ck+USlPtP5q/1uYlcMcpQhdpXRMuV92L1m6h0xYKvhg=; b=Cu6m2eyzmixzMLseSb+EIyTVVRj3d29ga3jWIeFppoh7joAe8HIPzANy6s9X9VGz/lwTAf LhwlaAuQh+gNaNVO7qqVpA4KYJcxxBQTh0mjgyqhS9K1noztAs2I7r3gppMTIZrcTTxI2f DPNNwsCy4oJ+iOQfOOSXb+9IjUqscebjqSA/nki1lucMl0IeNlAqCBdSTQaObHnQCSAcoK ezxh3nGNEaQ7T/EPEx0E7wWgIvhK2FmW+JcbJHTiwXPHYrLfzqHs7A3luJ/RYhv+Vz9C/V D2LMv7wfWlknmqSi0a900QC3y3V5PgYINzksriQI6NIpbgQRwla5g7mM290R2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767980631; a=rsa-sha256; cv=none; b=mJjwdZJ9FeMuhPx7IdWzQa8w6N4/MaD26Trd0AI2DU/3qQJRgwvIvSnTiWb+Mjmv1xK35d EqQfnUarvkjtCfu1DFrGQOwL6bR1Uyz20uktTd3cEhJIhFy0pomeP2W9WlyUFI2oEkUN5L dfO428fftFyHA2F8EGV0AJCEUbAYtLEC/uXNjEw7jhsM91yXfGfiOVX4N5CvKhC3Zs6Hqw eur9mfGS6qQU1TWPBxPCbvCYgXsDZK4s0JLP1qM7ca3VaPAeL6wvVXi95dZ9rAFNjrSDI2 4onfbHj9yBepgM6agbrn9aWU++zQOqZozhFYNZNXyqak0z6WMRn/of0F4653ig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnpzW3rTqz3KV for ; Fri, 09 Jan 2026 17:43:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38d51 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 17:43:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Hall Subject: git: 256d05617c71 - stable/15 - smartpqi: update to version 4660.0.2002 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrhall X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 256d05617c711b0f6959a10ebc716501e26e4cfa Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 17:43:51 +0000 Message-Id: <69613e57.38d51.5e44ad72@gitrepo.freebsd.org> The branch stable/15 has been updated by jrhall: URL: https://cgit.FreeBSD.org/src/commit/?id=256d05617c711b0f6959a10ebc716501e26e4cfa commit 256d05617c711b0f6959a10ebc716501e26e4cfa Author: John Hall AuthorDate: 2025-08-28 21:11:02 +0000 Commit: John Hall CommitDate: 2026-01-09 17:41:40 +0000 smartpqi: update to version 4660.0.2002 This updates the smartpqi driver to Microchip's latest available public release. Reviewed by: imp Approved by: imp Sponsored by: Microchip Technology Inc. Differential Revision: https://reviews.freebsd.org/D52507 (cherry picked from commit c558eca47970c8467ed0494145f08d1879050bbd) --- share/man/man4/smartpqi.4 | 86 +++++++- sys/dev/smartpqi/smartpqi_cam.c | 53 ++--- sys/dev/smartpqi/smartpqi_cmd.c | 4 +- sys/dev/smartpqi/smartpqi_controllers.h | 371 ++++++++++++++++++++++++++++++++ sys/dev/smartpqi/smartpqi_defines.h | 43 ++-- sys/dev/smartpqi/smartpqi_discovery.c | 167 +++++--------- sys/dev/smartpqi/smartpqi_event.c | 10 +- sys/dev/smartpqi/smartpqi_helper.c | 32 ++- sys/dev/smartpqi/smartpqi_init.c | 13 +- sys/dev/smartpqi/smartpqi_intr.c | 3 +- sys/dev/smartpqi/smartpqi_ioctl.c | 12 +- sys/dev/smartpqi/smartpqi_main.c | 320 +++------------------------ sys/dev/smartpqi/smartpqi_misc.c | 28 +-- sys/dev/smartpqi/smartpqi_prototypes.h | 52 ++--- sys/dev/smartpqi/smartpqi_queue.c | 25 +-- sys/dev/smartpqi/smartpqi_request.c | 104 ++++----- sys/dev/smartpqi/smartpqi_response.c | 14 +- sys/dev/smartpqi/smartpqi_sis.c | 6 +- sys/dev/smartpqi/smartpqi_structures.h | 5 +- 19 files changed, 724 insertions(+), 624 deletions(-) diff --git a/share/man/man4/smartpqi.4 b/share/man/man4/smartpqi.4 index f5fab85d13bd..ef5f903fe422 100644 --- a/share/man/man4/smartpqi.4 +++ b/share/man/man4/smartpqi.4 @@ -1,4 +1,4 @@ -.\" Copyright (C) 2019-2023, Microchip Technology Inc. and its subsidiaries +.\" Copyright (C) 2019-2025, Microchip Technology Inc. and its subsidiaries .\" Copyright (C) 2016-2018, Microsemi Corporation .\" Copyright (C) 2016, PMC-Sierra, Inc. .\" Written by John Hall @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 24, 2023 +.Dd August 28, 2025 .Dt SMARTPQI 4 amd64 .Os .Sh NAME @@ -48,7 +48,7 @@ smartpqi_load="YES" The .Nm driver provides support for Microchip Technology Inc. / Adaptec SmartRaid and -SmartHBA SATA/SAS/NVME PCIe controllers +SmartHBA SATA/SAS/NVMe PCIe controllers .Sh HARDWARE Controllers supported by the .Nm @@ -63,6 +63,86 @@ Adaptec SmartRaid and SmartHBA Controllers OEM Controllers based on the Microchip Technology Inc. SmartROC and SmartIOC Chipsets .El +.Sh DEBUGGING +Driver diagnostic printing is controlled in +.Xr loader.conf 5 +by using the global +.Va hw.smartpqi.debug_level +tunable. +.Pp +The +.Va debug_level +variable is set with an integer value. +The default value is 0x0060 (warn && error). +.Pp +The following levels are available: +.Bl -column "FlagXX" "NameXXXX" "Description" -offset indent +.It Em Flag Ta Em Name Ta Em Description +.It 0x0001 Ta init Ta System initialization operations +.It 0x0002 Ta info Ta Basic information +.It 0x0004 Ta function Ta Used to show function entry and exit +.It 0x0008 Ta io Ta Logging data from controller +.It 0x0010 Ta discovery Ta Device discovery +.It 0x0020 Ta warning Ta Operational warnings +.It 0x0040 Ta error Ta Parameter errors and programming bugs +.It 0x0080 Ta note Ta More detailed information +.El +.Sh DEVICE HINTS +The following tunable values can be set in +.Pa /boot/device.hints +to control the behavior of the +.Nm +driver. +These hints are specified as: +.Bd -literal -offset indent +hint.smartpqi..= +.Ed +.Pp +The supported variables are: +.Bl -tag -width ".Va aio_raid1_write_disable" +.It Va stream_disable +If set to 0, disables Stream Detection. +.Pp +Default is (enabled). +.It Va sata_unique_wwn_disable +If set to 0, disables SATA Unique World Wide Number. +.Pp +Default is (enabled). +.It Va aio_raid1_write_disable +If set to 0, disables acceleration of RAID1 writes +.Pp +Default is (enabled). +.It Va aio_raid5_write_disable +If set to 0, disables acceleration of RAID5 writes +.Pp +Default is (enabled). +.It Va aio_raid6_write_disable +If set to 0, disables acceleration of RAID6 writes +.Pp +Default is (enabled). +.It Va queue_depth +Sets queue depth for the controller. If the queue depth value +is greater than the maximum supported queue size of the driver or +controller, it will be set to the lowest size. If the queue +depth value is lower than the minimum queue depth then this will +be set to the minimum queue depth. +.Pp +Default is driver-determined. +.It Va sg_count +Sets the scatter gather (sg) count. If this sg count is greater +than maximum sg count it will be set to the maximum sg count. +If this sg count is less than minimum sg count it will be set to +the minimum sg count. +.Pp +Default is driver-determined. +.El +.Pp +For example, to disable Stream Detection on the first controller, add +the following line to +.Pa /boot/device.hints : +.Bd -literal -offset indent +hint.smartpqi.0.stream_disable="0" +.Ed .Sh FILES .Bl -tag -width /boot/kernel/smartpqi.ko -compact .It Pa /dev/smartpqi? diff --git a/sys/dev/smartpqi/smartpqi_cam.c b/sys/dev/smartpqi/smartpqi_cam.c index ffdd9fd7da79..93043a296c5d 100644 --- a/sys/dev/smartpqi/smartpqi_cam.c +++ b/sys/dev/smartpqi/smartpqi_cam.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2023 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -71,7 +71,6 @@ update_sim_properties(struct cam_sim *sim, struct ccb_pathinq *cpi) cpi->hba_subvendor = pci_get_subvendor(dev); cpi->hba_subdevice = pci_get_subdevice(dev); - DBG_FUNC("OUT\n"); } @@ -154,10 +153,6 @@ os_remove_device(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) } xpt_async(AC_LOST_DEVICE, tmppath, NULL); xpt_free_path(tmppath); - /* softs->device_list[device->target][device->lun] = NULL; */ - int index = pqisrc_find_device_list_index(softs,device); - if (index >= 0 && index < PQI_MAX_DEVICES) - softs->dev_list[index] = NULL; pqisrc_free_device(softs, device); } @@ -335,7 +330,7 @@ os_io_response_success(rcb_t *rcb) static void copy_sense_data_to_csio(struct ccb_scsiio *csio, - uint8_t *sense_data, uint16_t sense_data_len) + uint8_t const *sense_data, uint16_t sense_data_len) { DBG_IO("IN csio = %p\n", csio); @@ -740,7 +735,7 @@ smartpqi_target_rescan(struct pqisrc_softstate *softs) /* if(softs->device_list[target][lun]){ */ if(softs->dev_list[index] != NULL) { device = softs->dev_list[index]; - DBG_INFO("calling smartpqi_lun_rescan with TL = %d:%d\n",device->target,device->lun); + DBG_INFO("calling smartpqi_lun_rescan with T%d:L%d\n",device->target,device->lun); smartpqi_lun_rescan(softs, device->target, device->lun); } } @@ -821,7 +816,6 @@ pqisrc_io_start(struct cam_sim *sim, union ccb *ccb) if (index == INVALID_ELEM) { ccb->ccb_h.status = CAM_DEV_NOT_THERE; - DBG_INFO("Invalid index/device!!!, Device BTL %u:%d:%d\n", softs->bus_id, target, lun); return ENXIO; } @@ -850,7 +844,7 @@ pqisrc_io_start(struct cam_sim *sim, union ccb *ccb) } /* Check device reset */ if (DEVICE_RESET(dvp)) { - ccb->ccb_h.status = CAM_SCSI_BUSY | CAM_REQ_INPROG | CAM_BUSY; + ccb->ccb_h.status = CAM_BUSY; DBG_WARN("Device %d reset returned busy\n", ccb->ccb_h.target_id); return EBUSY; } @@ -915,7 +909,7 @@ pqisrc_io_start(struct cam_sim *sim, union ccb *ccb) } static inline int -pqi_tmf_status_to_bsd_tmf_status(int pqi_status, rcb_t *rcb) +pqi_tmf_status_to_bsd_tmf_status(int pqi_status, rcb_t const *rcb) { if (PQI_STATUS_SUCCESS == pqi_status && PQI_STATUS_SUCCESS == rcb->status) @@ -931,7 +925,7 @@ static int pqisrc_scsi_abort_task(pqisrc_softstate_t *softs, union ccb *ccb) { rcb_t *rcb = NULL; - struct ccb_hdr *ccb_h = &ccb->ccb_h; + struct ccb_hdr const *ccb_h = &ccb->ccb_h; rcb_t *prcb = ccb->ccb_h.sim_priv.entries[0].ptr; uint32_t tag; int rval; @@ -971,7 +965,7 @@ error_tmf: static int pqisrc_scsi_abort_task_set(pqisrc_softstate_t *softs, union ccb *ccb) { - struct ccb_hdr *ccb_h = &ccb->ccb_h; + struct ccb_hdr const *ccb_h = &ccb->ccb_h; rcb_t *rcb = NULL; uint32_t tag; int rval; @@ -1013,7 +1007,7 @@ pqisrc_target_reset( pqisrc_softstate_t *softs, union ccb *ccb) { /* pqi_scsi_dev_t *devp = softs->device_list[ccb->ccb_h.target_id][ccb->ccb_h.target_lun]; */ - struct ccb_hdr *ccb_h = &ccb->ccb_h; + struct ccb_hdr const *ccb_h = &ccb->ccb_h; rcb_t *rcb = NULL; uint32_t tag; int rval; @@ -1069,7 +1063,7 @@ static void smartpqi_cam_action(struct cam_sim *sim, union ccb *ccb) { struct pqisrc_softstate *softs = cam_sim_softc(sim); - struct ccb_hdr *ccb_h = &ccb->ccb_h; + struct ccb_hdr const *ccb_h = &ccb->ccb_h; DBG_FUNC("IN\n"); @@ -1209,22 +1203,19 @@ smartpqi_async(void *callback_arg, u_int32_t code, } uint32_t t_id = cgd->ccb_h.target_id; - /* if (t_id <= (PQI_CTLR_INDEX - 1)) { */ - if (t_id >= PQI_CTLR_INDEX) { - if (softs != NULL) { - /* pqi_scsi_dev_t *dvp = softs->device_list[t_id][cgd->ccb_h.target_lun]; */ - int lun = cgd->ccb_h.target_lun; - int index = pqisrc_find_btl_list_index(softs,softs->bus_id,t_id,lun); - if (index != INVALID_ELEM) { - pqi_scsi_dev_t *dvp = softs->dev_list[index]; - if (dvp == NULL) { - DBG_ERR("Target is null, target id=%u\n", t_id); - break; - } - smartpqi_adjust_queue_depth(path, dvp->queue_depth); - } - } - } + if (softs != NULL) { + /* pqi_scsi_dev_t *dvp = softs->device_list[t_id][cgd->ccb_h.target_lun]; */ + int lun = cgd->ccb_h.target_lun; + int index = pqisrc_find_btl_list_index(softs,softs->bus_id,t_id,lun); + if (index != INVALID_ELEM) { + pqi_scsi_dev_t const *dvp = softs->dev_list[index]; + if (dvp == NULL) { + DBG_ERR("Target is null, target id=%u\n", t_id); + break; + } + smartpqi_adjust_queue_depth(path, dvp->queue_depth); + } + } break; } default: diff --git a/sys/dev/smartpqi/smartpqi_cmd.c b/sys/dev/smartpqi/smartpqi_cmd.c index 8486ac12df79..b71879aa81f6 100644 --- a/sys/dev/smartpqi/smartpqi_cmd.c +++ b/sys/dev/smartpqi/smartpqi_cmd.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2023 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -35,7 +35,7 @@ pqisrc_submit_cmnd(pqisrc_softstate_t *softs, ib_queue_t *ib_q, void *req) { char *slot = NULL; uint32_t offset; - iu_header_t *hdr = (iu_header_t *)req; + iu_header_t const *hdr = (iu_header_t *)req; /*TODO : Can be fixed a size copying of IU ? */ uint32_t iu_len = hdr->iu_length + 4 ; /* header size */ int i = 0; diff --git a/sys/dev/smartpqi/smartpqi_controllers.h b/sys/dev/smartpqi/smartpqi_controllers.h new file mode 100644 index 000000000000..6356159fd5f7 --- /dev/null +++ b/sys/dev/smartpqi/smartpqi_controllers.h @@ -0,0 +1,371 @@ +/*- + * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. + * + * 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. + */ + +/* + * Supported controllers + */ +struct pqi_ident +{ + u_int16_t vendor; + u_int16_t device; + u_int16_t subvendor; + u_int16_t subdevice; + int hwif; + char *desc; +} pqi_identifiers[] = { + /* (MSCC PM8205 8x12G based) */ + {0x9005, 0x028f, 0x103c, 0x600, PQI_HWIF_SRCV, "P408i-p SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x601, PQI_HWIF_SRCV, "P408e-p SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x602, PQI_HWIF_SRCV, "P408i-a SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x603, PQI_HWIF_SRCV, "P408i-c SR Gen10"}, + {0x9005, 0x028f, 0x1028, 0x1FE0, PQI_HWIF_SRCV, "SmartRAID 3162-8i/eDell"}, + {0x9005, 0x028f, 0x9005, 0x608, PQI_HWIF_SRCV, "SmartRAID 3162-8i/e"}, + {0x9005, 0x028f, 0x103c, 0x609, PQI_HWIF_SRCV, "P408i-sb SR G10"}, + + /* (MSCC PM8225 8x12G based) */ + {0x9005, 0x028f, 0x103c, 0x650, PQI_HWIF_SRCV, "E208i-p SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x651, PQI_HWIF_SRCV, "E208e-p SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x652, PQI_HWIF_SRCV, "E208i-c SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x654, PQI_HWIF_SRCV, "E208i-a SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x655, PQI_HWIF_SRCV, "P408e-m SR Gen10"}, + {0x9005, 0x028f, 0x9005, 0x659, PQI_HWIF_SRCV, "2100C8iOXS"}, + + /* (MSCC PM8221 8x12G based) */ + {0x9005, 0x028f, 0x103c, 0x700, PQI_HWIF_SRCV, "P204i-c SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x701, PQI_HWIF_SRCV, "P204i-b SR Gen10"}, + {0x9005, 0x028f, 0x193d, 0x1104, PQI_HWIF_SRCV, "UN RAID P2404-Mf-4i-2GB"}, + {0x9005, 0x028f, 0x193d, 0x1106, PQI_HWIF_SRCV, "UN RAID P2404-Mf-4i-1GB"}, + {0x9005, 0x028f, 0x193d, 0x1108, PQI_HWIF_SRCV, "UN RAID P4408-Ma-8i-2GB"}, + {0x9005, 0x028f, 0x193d, 0x1109, PQI_HWIF_SRCV, "UN RAID P4408-Mr-8i-2GB"}, + + /* (MSCC PM8204 8x12G based) */ + {0x9005, 0x028f, 0x9005, 0x800, PQI_HWIF_SRCV, "SmartRAID 3154-8i"}, + {0x9005, 0x028f, 0x9005, 0x801, PQI_HWIF_SRCV, "SmartRAID 3152-8i"}, + {0x9005, 0x028f, 0x9005, 0x802, PQI_HWIF_SRCV, "SmartRAID 3151-4i"}, + {0x9005, 0x028f, 0x9005, 0x803, PQI_HWIF_SRCV, "SmartRAID 3101-4i"}, + {0x9005, 0x028f, 0x9005, 0x804, PQI_HWIF_SRCV, "SmartRAID 3154-8e"}, + {0x9005, 0x028f, 0x9005, 0x805, PQI_HWIF_SRCV, "SmartRAID 3102-8i"}, + {0x9005, 0x028f, 0x9005, 0x806, PQI_HWIF_SRCV, "SmartRAID 3100"}, + {0x9005, 0x028f, 0x9005, 0x807, PQI_HWIF_SRCV, "SmartRAID 3162-8i"}, + {0x9005, 0x028f, 0x152d, 0x8a22, PQI_HWIF_SRCV, "QS-8204-8i"}, + {0x9005, 0x028f, 0x193d, 0xf460, PQI_HWIF_SRCV, "UN RAID P460-M4"}, + {0x9005, 0x028f, 0x193d, 0xf461, PQI_HWIF_SRCV, "UN RAID P460-B4"}, + {0x9005, 0x028f, 0x1bd4, 0x004b, PQI_HWIF_SRCV, "PM8204-2GB"}, + {0x9005, 0x028f, 0x1bd4, 0x004c, PQI_HWIF_SRCV, "PM8204-4GB"}, + {0x9005, 0x028f, 0x1ff9, 0x004b, PQI_HWIF_SRCV, "RAID PM8204-2GB"}, + {0x9005, 0x028f, 0x1ff9, 0x004c, PQI_HWIF_SRCV, "RAID PM8204-4GB"}, + {0x9005, 0x028f, 0x193d, 0x0462, PQI_HWIF_SRCV, "UN RAID P460-Mr1-8i-4GB"}, + {0x9005, 0x028f, 0x193d, 0x1105, PQI_HWIF_SRCV, "UN RAID P4408-Mf-8i-2GB"}, + {0x9005, 0x028f, 0x193d, 0x1107, PQI_HWIF_SRCV, "UN RAID P4408-Mf-8i-4GB"}, + {0x9005, 0x028f, 0x193d, 0x1110, PQI_HWIF_SRCV, "UN RAID P4408-Mr-2"}, + {0x9005, 0x028f, 0x1d8d, 0x800, PQI_HWIF_SRCV, "Fiberhome SmartRAID AIS-8204-8i"}, + {0x9005, 0x028f, 0x9005, 0x0808, PQI_HWIF_SRCV, "SmartRAID 3101E-4i"}, + {0x9005, 0x028f, 0x9005, 0x0809, PQI_HWIF_SRCV, "SmartRAID 3102E-8i"}, + {0x9005, 0x028f, 0x9005, 0x080a, PQI_HWIF_SRCV, "SmartRAID 3152-8i/N"}, + {0x9005, 0x028f, 0x1cc4, 0x0101, PQI_HWIF_SRCV, "Ramaxel FBGF-RAD PM8204"}, + {0x9005, 0x028f, 0x1f3a, 0x0104, PQI_HWIF_SRCV, "PL SmartROC PM8204"}, + {0x9005, 0x028f, 0x1f51, 0x1043, PQI_HWIF_SRCV, "SmartRAID P7502-8i"}, + {0x9005, 0x028f, 0x1f51, 0x1045, PQI_HWIF_SRCV, "SmartRAID P7504-8i"}, + {0x9005, 0x028f, 0x1f51, 0x1011, PQI_HWIF_SRCV, "SmartRAID P7504N-8i"}, + {0x9005, 0x028f, 0x207d, 0x4140, PQI_HWIF_SRCV, "HRDT TrustRAID D3152s-8i"}, + {0x9005, 0x028f, 0x207d, 0x4240, PQI_HWIF_SRCV, "HRDT TrustRAID D3154s-8i"}, + + /* (MSCC PM8222 8x12G based) */ + {0x9005, 0x028f, 0x9005, 0x900, PQI_HWIF_SRCV, "SmartHBA 2100-8i"}, + {0x9005, 0x028f, 0x9005, 0x901, PQI_HWIF_SRCV, "SmartHBA 2100-4i"}, + {0x9005, 0x028f, 0x9005, 0x902, PQI_HWIF_SRCV, "HBA 1100-8i"}, + {0x9005, 0x028f, 0x9005, 0x903, PQI_HWIF_SRCV, "HBA 1100-4i"}, + {0x9005, 0x028f, 0x9005, 0x904, PQI_HWIF_SRCV, "SmartHBA 2100-8e"}, + {0x9005, 0x028f, 0x9005, 0x905, PQI_HWIF_SRCV, "HBA 1100-8e"}, + {0x9005, 0x028f, 0x9005, 0x906, PQI_HWIF_SRCV, "SmartHBA 2100-4i4e"}, + {0x9005, 0x028f, 0x9005, 0x907, PQI_HWIF_SRCV, "HBA 1100"}, + {0x9005, 0x028f, 0x9005, 0x908, PQI_HWIF_SRCV, "SmartHBA 2100"}, + {0x9005, 0x028f, 0x9005, 0x90a, PQI_HWIF_SRCV, "SmartHBA 2100A-8i"}, + {0x9005, 0x028f, 0x193d, 0x8460, PQI_HWIF_SRCV, "UN HBA H460-M1"}, + {0x9005, 0x028f, 0x193d, 0x8461, PQI_HWIF_SRCV, "UN HBA H460-B1"}, + {0x9005, 0x028f, 0x193d, 0x8462, PQI_HWIF_SRCV, "UN HBA H460-Mr1-8i"}, + {0x9005, 0x028f, 0x193d, 0xc460, PQI_HWIF_SRCV, "UN RAID P460-M2"}, + {0x9005, 0x028f, 0x193d, 0xc461, PQI_HWIF_SRCV, "UN RAID P460-B2"}, + {0x9005, 0x028f, 0x1bd4, 0x004a, PQI_HWIF_SRCV, "PM8222-SHBA"}, + {0x9005, 0x028f, 0x1ff9, 0x004a, PQI_HWIF_SRCV, "PM8222-SHBA"}, + {0x9005, 0x028f, 0x13fe, 0x8312, PQI_HWIF_SRCV, "MIC-8312BridgeB"}, + {0x9005, 0x028f, 0x1bd4, 0x004f, PQI_HWIF_SRCV, "PM8222-HBA"}, + {0x9005, 0x028f, 0x1ff9, 0x004f, PQI_HWIF_SRCV, "PM8222-HBA"}, + {0x9005, 0x028f, 0x1d8d, 0x908, PQI_HWIF_SRCV, "Fiberhome SmartHBA AIS-8222-8i"}, + {0x9005, 0x028f, 0x1bd4, 0x006C, PQI_HWIF_SRCV, "RS0800M5E8i"}, + {0x9005, 0x028f, 0x1bd4, 0x006D, PQI_HWIF_SRCV, "RS0800M5H8i"}, + {0x9005, 0x028f, 0x1ff9, 0x006C, PQI_HWIF_SRCV, "RS0800M5E8i"}, + {0x9005, 0x028f, 0x1ff9, 0x006D, PQI_HWIF_SRCV, "RS0800M5H8i"}, + {0x9005, 0x028f, 0x1cc4, 0x0201, PQI_HWIF_SRCV, "Ramaxel FBGF-RAD PM8222"}, + {0x9005, 0x028f, 0x1f51, 0x1044, PQI_HWIF_SRCV, "SmartHBA P6500-8i"}, + {0x9005, 0x028f, 0x1f3f, 0x0610, PQI_HWIF_SRCV, "3SNIC SSSRAID 3S610"}, + {0x9005, 0x028f, 0x207d, 0x4840, PQI_HWIF_SRCV, "HRDT TrustHBA H3100s-8i"}, + + /* (SRCx MSCC FVB 24x12G based) */ + {0x9005, 0x028f, 0x103c, 0x1001, PQI_HWIF_SRCV, "MSCC FVB"}, + + /* (MSCC PM8241 24x12G based) */ + + /* (MSCC PM8242 24x12G based) */ + {0x9005, 0x028f, 0x152d, 0x8a37, PQI_HWIF_SRCV, "QS-8242-24i"}, + {0x9005, 0x028f, 0x9005, 0x1300, PQI_HWIF_SRCV, "HBA 1100-8i8e"}, + {0x9005, 0x028f, 0x9005, 0x1301, PQI_HWIF_SRCV, "HBA 1100-24i"}, + {0x9005, 0x028f, 0x9005, 0x1302, PQI_HWIF_SRCV, "SmartHBA 2100-8i8e"}, + {0x9005, 0x028f, 0x9005, 0x1303, PQI_HWIF_SRCV, "SmartHBA 2100-24i"}, + {0x9005, 0x028f, 0x105b, 0x1321, PQI_HWIF_SRCV, "8242-24i"}, + {0x9005, 0x028f, 0x1bd4, 0x0045, PQI_HWIF_SRCV, "SMART-HBA 8242-24i"}, + {0x9005, 0x028f, 0x1ff9, 0x0045, PQI_HWIF_SRCV, "SMART-HBA 8242-24i"}, + {0x9005, 0x028f, 0x1bd4, 0x006B, PQI_HWIF_SRCV, "RS0800M5H24i"}, + {0x9005, 0x028f, 0x1bd4, 0x0070, PQI_HWIF_SRCV, "RS0800M5E24i"}, + {0x9005, 0x028f, 0x1ff9, 0x006B, PQI_HWIF_SRCV, "RS0800M5H24i"}, + {0x9005, 0x028f, 0x1ff9, 0x0070, PQI_HWIF_SRCV, "RS0800M5E24i"}, + + /* (MSCC PM8236 16x12G based) */ + {0x9005, 0x028f, 0x152d, 0x8a24, PQI_HWIF_SRCV, "QS-8236-16i"}, + {0x9005, 0x028f, 0x9005, 0x1380, PQI_HWIF_SRCV, "SmartRAID 3154-16i"}, + {0x9005, 0x028f, 0x1bd4, 0x0046, PQI_HWIF_SRCV, "RAID 8236-16i"}, + {0x9005, 0x028f, 0x1ff9, 0x0046, PQI_HWIF_SRCV, "RAID 8236-16i"}, + {0x9005, 0x028f, 0x1d8d, 0x806, PQI_HWIF_SRCV, "Fiberhome SmartRAID AIS-8236-16i"}, + {0x9005, 0x028f, 0x1cf2, 0x0B27, PQI_HWIF_SRCV, "ZTE SmartROC3100 SDPSA/B-18i 4G"}, + {0x9005, 0x028f, 0x1cf2, 0x0B45, PQI_HWIF_SRCV, "ZTE SmartROC3100 SDPSA/B_L-18i 2G"}, + {0x9005, 0x028f, 0x1cf2, 0x5445, PQI_HWIF_SRCV, "ZTE SmartROC3100 RM241-18i 2G"}, + {0x9005, 0x028f, 0x1cf2, 0x5446, PQI_HWIF_SRCV, "ZTE SmartROC3100 RM242-18i 4G"}, + {0x9005, 0x028f, 0x1cf2, 0x5449, PQI_HWIF_SRCV, "ZTE SmartROC3100 RS241-18i 2G"}, + {0x9005, 0x028f, 0x1cf2, 0x544A, PQI_HWIF_SRCV, "ZTE SmartROC3100 RS242-18i 4G"}, + {0x9005, 0x028f, 0x1cf2, 0x544D, PQI_HWIF_SRCV, "ZTE SmartROC3100 RM241B-18i 2G"}, + {0x9005, 0x028f, 0x1cf2, 0x544E, PQI_HWIF_SRCV, "ZTE SmartROC3100 RM242B-18i 4G"}, + {0x9005, 0x028f, 0x1bd4, 0x006F, PQI_HWIF_SRCV, "RS0804M5R16i"}, + {0x9005, 0x028f, 0x1ff9, 0x006F, PQI_HWIF_SRCV, "RS0804M5R16i"}, + {0x9005, 0x028f, 0x1f51, 0x1010, PQI_HWIF_SRCV, "SmartRAID P7504N-16i"}, + + + + /* (MSCC PM8237 24x12G based) */ + {0x9005, 0x028f, 0x103c, 0x1100, PQI_HWIF_SRCV, "P816i-a SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x1101, PQI_HWIF_SRCV, "P416ie-m SR G10"}, + + /* (MSCC PM8238 16x12G based) */ + {0x9005, 0x028f, 0x152d, 0x8a23, PQI_HWIF_SRCV, "QS-8238-16i"}, + {0x9005, 0x028f, 0x9005, 0x1280, PQI_HWIF_SRCV, "HBA 1100-16i"}, + {0x9005, 0x028f, 0x9005, 0x1281, PQI_HWIF_SRCV, "HBA 1100-16e"}, + {0x9005, 0x028f, 0x105b, 0x1211, PQI_HWIF_SRCV, "8238-16i"}, + {0x9005, 0x028f, 0x1bd4, 0x0048, PQI_HWIF_SRCV, "SMART-HBA 8238-16i"}, + {0x9005, 0x028f, 0x1ff9, 0x0048, PQI_HWIF_SRCV, "SMART-HBA 8238-16i"}, + {0x9005, 0x028f, 0x9005, 0x1282, PQI_HWIF_SRCV, "SmartHBA 2100-16i"}, + {0x9005, 0x028f, 0x1d8d, 0x916, PQI_HWIF_SRCV, "Fiberhome SmartHBA AIS-8238-16i"}, + {0x9005, 0x028f, 0x1458, 0x1000, PQI_HWIF_SRCV, "GIGABYTE SmartHBA CLN1832"}, + {0x9005, 0x028f, 0x1cf2, 0x0B29, PQI_HWIF_SRCV, "ZTE SmartIOC2100 SDPSA/B_I-18i"}, + {0x9005, 0x028f, 0x1cf2, 0x5447, PQI_HWIF_SRCV, "ZTE SmartIOC2100 RM243-18i"}, + {0x9005, 0x028f, 0x1cf2, 0x544B, PQI_HWIF_SRCV, "ZTE SmartIOC2100 RS243-18i"}, + {0x9005, 0x028f, 0x1cf2, 0x544F, PQI_HWIF_SRCV, "ZTE SmartIOC2100 RM243B-18i"}, + {0x9005, 0x028f, 0x1bd4, 0x0071, PQI_HWIF_SRCV, "RS0800M5H16i"}, + {0x9005, 0x028f, 0x1bd4, 0x0072, PQI_HWIF_SRCV, "RS0800M5E16i"}, + {0x9005, 0x028f, 0x1ff9, 0x0071, PQI_HWIF_SRCV, "RS0800M5H16i"}, + {0x9005, 0x028f, 0x1ff9, 0x0072, PQI_HWIF_SRCV, "RS0800M5E16i"}, + {0x9005, 0x028f, 0x1018, 0x8238, PQI_HWIF_SRCV, "Ramaxel SmartHBA RX8238-16i"}, + + /* (MSCC PM8240 24x12G based) */ + {0x9005, 0x028f, 0x152d, 0x8a36, PQI_HWIF_SRCV, "QS-8240-24i"}, + {0x9005, 0x028f, 0x9005, 0x1200, PQI_HWIF_SRCV, "SmartRAID 3154-24i"}, + {0x9005, 0x028f, 0x9005, 0x1201, PQI_HWIF_SRCV, "SmartRAID 3154-8i16e"}, + {0x9005, 0x028f, 0x9005, 0x1202, PQI_HWIF_SRCV, "SmartRAID 3154-8i8e"}, + {0x9005, 0x028f, 0x1bd4, 0x0047, PQI_HWIF_SRCV, "RAID 8240-24i"}, + {0x9005, 0x028f, 0x1ff9, 0x0047, PQI_HWIF_SRCV, "RAID 8240-24i"}, + {0x9005, 0x028f, 0x1dfc, 0x3161, PQI_HWIF_SRCV, "NTCOM SAS3 RAID-24i"}, + {0x9005, 0x028f, 0x1F0C, 0x3161, PQI_HWIF_SRCV, "NT RAID 3100-24i"}, + + /* Huawei ID's */ + {0x9005, 0x028f, 0x19e5, 0xd227, PQI_HWIF_SRCV, "SR465C-M 4G"}, + {0x9005, 0x028f, 0x19e5, 0xd22a, PQI_HWIF_SRCV, "SR765-M"}, + {0x9005, 0x028f, 0x19e5, 0xd228, PQI_HWIF_SRCV, "SR455C-M 2G"}, + {0x9005, 0x028f, 0x19e5, 0xd22c, PQI_HWIF_SRCV, "SR455C-M 4G"}, + {0x9005, 0x028f, 0x19e5, 0xd229, PQI_HWIF_SRCV, "SR155-M"}, + {0x9005, 0x028f, 0x19e5, 0xd22b, PQI_HWIF_SRCV, "SR455C-ME 4G"}, + + /* (MSCC PM8252 8x12G based) */ + {0x9005, 0x028f, 0x193d, 0x110b, PQI_HWIF_SRCV, "UN HBA H4508-Mf-8i"}, + {0x9005, 0x028f, 0x1bd4, 0x0052, PQI_HWIF_SRCV, "MT0801M6E"}, + {0x9005, 0x028f, 0x1bd4, 0x0054, PQI_HWIF_SRCV, "MT0800M6H"}, + {0x9005, 0x028f, 0x1bd4, 0x0086, PQI_HWIF_SRCV, "RT0800M7E"}, + {0x9005, 0x028f, 0x1bd4, 0x0087, PQI_HWIF_SRCV, "RT0800M7H"}, + {0x9005, 0x028f, 0x1ff9, 0x0052, PQI_HWIF_SRCV, "MT0801M6E"}, + {0x9005, 0x028f, 0x1ff9, 0x0054, PQI_HWIF_SRCV, "MT0800M6H"}, + {0x9005, 0x028f, 0x1BD4, 0x00a3, PQI_HWIF_SRCV, "RT0800M6E2i"}, + {0x9005, 0x028f, 0x1ff9, 0x00a3, PQI_HWIF_SRCV, "RT0800M6E2i"}, + {0x9005, 0x028f, 0x1ff9, 0x0086, PQI_HWIF_SRCV, "RT0800M7E"}, + {0x9005, 0x028f, 0x1ff9, 0x0087, PQI_HWIF_SRCV, "RT0800M7H"}, + {0x9005, 0x028f, 0x1f51, 0x1001, PQI_HWIF_SRCV, "SmartHBA P6600-8i"}, + {0x9005, 0x028f, 0x1f51, 0x1003, PQI_HWIF_SRCV, "SmartHBA P6600-8e"}, + {0x9005, 0x028f, 0x9005, 0x1460, PQI_HWIF_SRCV, "HBA 1200"}, + {0x9005, 0x028f, 0x9005, 0x1461, PQI_HWIF_SRCV, "SmartHBA 2200"}, + {0x9005, 0x028f, 0x9005, 0x1462, PQI_HWIF_SRCV, "HBA 1200-8i"}, + {0x9005, 0x028f, 0x1d49, 0x0222, PQI_HWIF_SRCV, "4450-8i HBA"}, + {0x9005, 0x028f, 0x207d, 0x4044, PQI_HWIF_SRCV, "HRDT TrustHBA H4100-8i"}, + {0x9005, 0x028f, 0x207d, 0x4054, PQI_HWIF_SRCV, "HRDT TrustHBA H4100-8e"}, + + /* (MSCC PM8254 32x12G based) */ + {0x9005, 0x028f, 0x1bd4, 0x0051, PQI_HWIF_SRCV, "MT0804M6R"}, + {0x9005, 0x028f, 0x1bd4, 0x0053, PQI_HWIF_SRCV, "MT0808M6R"}, + {0x9005, 0x028f, 0x1bd4, 0x0088, PQI_HWIF_SRCV, "RT0804M7R"}, + {0x9005, 0x028f, 0x1bd4, 0x0089, PQI_HWIF_SRCV, "RT0808M7R"}, + {0x9005, 0x028f, 0x1ff9, 0x0051, PQI_HWIF_SRCV, "MT0804M6R"}, + {0x9005, 0x028f, 0x1ff9, 0x0053, PQI_HWIF_SRCV, "MT0808M6R"}, + {0x9005, 0x028f, 0x1ff9, 0x0088, PQI_HWIF_SRCV, "RT0804M7R"}, + {0x9005, 0x028f, 0x1ff9, 0x0089, PQI_HWIF_SRCV, "RT0808M7R"}, + {0x9005, 0x028f, 0x1f51, 0x1002, PQI_HWIF_SRCV, "SmartRAID P7604-8i"}, + {0x9005, 0x028f, 0x1f51, 0x1004, PQI_HWIF_SRCV, "SmartRAID P7604-8e"}, + {0x9005, 0x028f, 0x1f51, 0x100f, PQI_HWIF_SRCV, "SmartRAID P7604N-8i"}, + {0x9005, 0x028f, 0x9005, 0x14a0, PQI_HWIF_SRCV, "SmartRAID 3254-8i"}, + {0x9005, 0x028f, 0x9005, 0x14a1, PQI_HWIF_SRCV, "SmartRAID 3204-8i"}, + {0x9005, 0x028f, 0x9005, 0x14a2, PQI_HWIF_SRCV, "SmartRAID 3252-8i"}, + {0x9005, 0x028f, 0x9005, 0x14a4, PQI_HWIF_SRCV, "SmartRAID 3254-8i /e"}, + {0x9005, 0x028f, 0x9005, 0x14a5, PQI_HWIF_SRCV, "SmartRAID 3252-8i /e"}, + {0x9005, 0x028f, 0x9005, 0x14a6, PQI_HWIF_SRCV, "SmartRAID 3204-8i /e"}, + {0x9005, 0x028f, 0x1d49, 0x0624, PQI_HWIF_SRCV, "9450-8i 4GB Flash"}, + + /* (MSCC PM8262 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x14c0, PQI_HWIF_SRCV, "SmartHBA 2200-16i"}, + {0x9005, 0x028f, 0x9005, 0x14c1, PQI_HWIF_SRCV, "HBA 1200-16i"}, + {0x9005, 0x028f, 0x9005, 0x14c3, PQI_HWIF_SRCV, "HBA 1200-16e"}, + {0x9005, 0x028f, 0x9005, 0x14c4, PQI_HWIF_SRCV, "HBA 1200-8e"}, + {0x9005, 0x028f, 0x1f51, 0x1005, PQI_HWIF_SRCV, "SmartHBA P6600-16i"}, + {0x9005, 0x028f, 0x1f51, 0x1007, PQI_HWIF_SRCV, "SmartHBA P6600-8i8e"}, + {0x9005, 0x028f, 0x1f51, 0x1009, PQI_HWIF_SRCV, "SmartHBA P6600-16e"}, + {0x9005, 0x028f, 0x1cf2, 0x54dc, PQI_HWIF_SRCV, "ZTE SmartIOC2200 RM346-16i"}, + {0x9005, 0x028f, 0x1cf2, 0x0806, PQI_HWIF_SRCV, "ZTE SmartIOC2200 RS346-16i"}, + {0x9005, 0x028f, 0x1d49, 0x0223, PQI_HWIF_SRCV, "4450-16i HBA"}, + {0x9005, 0x028f, 0x1d49, 0x0224, PQI_HWIF_SRCV, "4450-8e HBA"}, + {0x9005, 0x028f, 0x1d49, 0x0225, PQI_HWIF_SRCV, "4450-16e HBA"}, + {0x9005, 0x028f, 0x1d49, 0x0521, PQI_HWIF_SRCV, "5450-16i"}, + {0x9005, 0x028f, 0x207d, 0x4084, PQI_HWIF_SRCV, "HRDT TrustHBA H4100-16i"}, + {0x9005, 0x028f, 0x207d, 0x4094, PQI_HWIF_SRCV, "HRDT TrustHBA H4100-16e"}, + + /* (MSCC PM8264 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x14b0, PQI_HWIF_SRCV, "SmartRAID 3254-16i"}, + {0x9005, 0x028f, 0x9005, 0x14b1, PQI_HWIF_SRCV, "SmartRAID 3258-16i"}, + {0x9005, 0x028f, 0x1f51, 0x1006, PQI_HWIF_SRCV, "SmartRAID P7608-16i"}, + {0x9005, 0x028f, 0x1f51, 0x1008, PQI_HWIF_SRCV, "SmartRAID P7608-8i8e"}, + {0x9005, 0x028f, 0x1f51, 0x100a, PQI_HWIF_SRCV, "SmartRAID P7608-16e"}, + {0x9005, 0x028f, 0x1cf2, 0x54da, PQI_HWIF_SRCV, "ZTE SmartROC3200 RM344-16i 4G"}, + {0x9005, 0x028f, 0x1cf2, 0x54db, PQI_HWIF_SRCV, "ZTE SmartROC3200 RM345-16i 8G"}, + {0x9005, 0x028f, 0x1cf2, 0x0804, PQI_HWIF_SRCV, "ZTE SmartROC3200 RS344-16i 4G"}, + {0x9005, 0x028f, 0x1cf2, 0x0805, PQI_HWIF_SRCV, "ZTE SmartROC3200 RS345-16i 8G"}, + {0x9005, 0x028f, 0x1f51, 0x100e, PQI_HWIF_SRCV, "SmartRAID P7604N-16i"}, + {0x9005, 0x028f, 0x1d49, 0x0625, PQI_HWIF_SRCV, "9450-16i 4GB Flash"}, + {0x9005, 0x028f, 0x1d49, 0x0626, PQI_HWIF_SRCV, "9450-16i 8GB Flash"}, + + /* (MSCC PM8265 16x12G based) */ + {0x9005, 0x028f, 0x1590, 0x02dc, PQI_HWIF_SRCV, "SR416i-a Gen10+"}, + {0x9005, 0x028f, 0x9005, 0x1470, PQI_HWIF_SRCV, "SmartRAID 3200"}, + {0x9005, 0x028f, 0x9005, 0x1471, PQI_HWIF_SRCV, "SmartRAID 3254-16i /e"}, + {0x9005, 0x028f, 0x9005, 0x1472, PQI_HWIF_SRCV, "SmartRAID 3258-16i /e"}, + {0x9005, 0x028f, 0x9005, 0x1473, PQI_HWIF_SRCV, "SmartRAID 3284-16io /e/uC"}, + {0x9005, 0x028f, 0x9005, 0x1474, PQI_HWIF_SRCV, "SmartRAID 3254-16io /e"}, + {0x9005, 0x028f, 0x9005, 0x1475, PQI_HWIF_SRCV, "SmartRAID 3254-16e /e"}, + + /* (MSCC PM8266 16x12G based) */ + {0x9005, 0x028f, 0x1014, 0x0718, PQI_HWIF_SRCV, "IBM 4-Port 24G SAS"}, + {0x9005, 0x028f, 0x9005, 0x1490, PQI_HWIF_SRCV, "HBA 1200p Ultra"}, + {0x9005, 0x028f, 0x9005, 0x1491, PQI_HWIF_SRCV, "SmartHBA 2200p Ultra"}, + {0x9005, 0x028f, 0x9005, 0x1402, PQI_HWIF_SRCV, "HBA Ultra 1200P-16i"}, + {0x9005, 0x028f, 0x9005, 0x1441, PQI_HWIF_SRCV, "HBA Ultra 1200P-32i"}, + {0x9005, 0x028f, 0x1137, 0x0300, PQI_HWIF_SRCV, "Cisco 24G TriMode M1 HBA LFF 32D UCSC-HBAMP1LL32"}, + + /* (MSCC PM8268 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x14d0, PQI_HWIF_SRCV, "SmartRAID Ultra 3258P-16i"}, + + /* (MSCC PM8269 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x1400, PQI_HWIF_SRCV, "SmartRAID Ultra 3258P-16i /e"}, + {0x9005, 0x028f, 0x1ff9, 0x00a1, PQI_HWIF_SRCV, "RT1608M6R16i"}, + + /* (MSCC PM8270 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x1410, PQI_HWIF_SRCV, "HBA Ultra 1200P-16e"}, + {0x9005, 0x028f, 0x9005, 0x1411, PQI_HWIF_SRCV, "HBA 1200 Ultra"}, + {0x9005, 0x028f, 0x9005, 0x1412, PQI_HWIF_SRCV, "SmartHBA 2200 Ultra"}, + {0x9005, 0x028f, 0x9005, 0x1463, PQI_HWIF_SRCV, "SmartHBA 2200-8io /e"}, + {0x9005, 0x028f, 0x9005, 0x14c2, PQI_HWIF_SRCV, "SmartHBA 2200-16io /e"}, + {0x9005, 0x028f, 0x1337, 0x02fa, PQI_HWIF_SRCV, "Cisco 24G TriMode M1 HBA 16D UCSC-HBA-M1L16"}, + + /* (MSCC PM8271 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x14e0, PQI_HWIF_SRCV, "SmartIOC PM8271"}, + + /* (MSCC PM8272 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x1420, PQI_HWIF_SRCV, "SmartRAID Ultra 3254-16e"}, + {0x9005, 0x028f, 0x1d49, 0x0628, PQI_HWIF_SRCV, "9450-16e 4GB Flash"}, + + /* (MSCC PM8273 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x1430, PQI_HWIF_SRCV, "SmartRAID Ultra 3254-16e /e"}, + {0x9005, 0x028f, 0x1137, 0x02f9, PQI_HWIF_SRCV, "Cisco 24G TriMode M1 RAID 4GB FBWC 16D UCSC-RAID-M1L16"}, + {0x9005, 0x028f, 0x1137, 0x02ff, PQI_HWIF_SRCV, "Cisco 24G TriMode M1 RAID 4GB FBWC 6D UCSX-RAID-M1L6"}, + + /* (MSCC PM8274 16x12G based) */ + {0x9005, 0x028f, 0x1e93, 0x1000, PQI_HWIF_SRCV, "ByteHBA JGH43024-8"}, + {0x9005, 0x028f, 0x1e93, 0x1001, PQI_HWIF_SRCV, "ByteHBA JGH43034-8"}, + {0x9005, 0x028f, 0x1e93, 0x1005, PQI_HWIF_SRCV, "ByteHBA JGH43014-8"}, + {0x9005, 0x028f, 0x1f51, 0x100B, PQI_HWIF_SRCV, "SmartHBA P6600-24i"}, + + /* (MSCC PM8275 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x14f0, PQI_HWIF_SRCV, "SmartIOC PM8275"}, + + /* (MSCC PM8276 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x1480, PQI_HWIF_SRCV, "SmartRAID 3200 Ultra"}, + {0x9005, 0x028f, 0x1e93, 0x1002, PQI_HWIF_SRCV, "ByteHBA JGH44014-8"}, + + /* (MSCC PM8277 16x12G based) */ + {0x9005, 0x028f, 0x1137, 0x02f8, PQI_HWIF_SRCV, "Cisco 24G TriMode M1 RAID 4GB FBWC 32D UCSC-RAID-MP1L32"}, + + /* (MSCC PM8278 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x1440, PQI_HWIF_SRCV, "SmartRAID Ultra 3258P-32i"}, + {0x9005, 0x028f, 0x1d49, 0x0627, PQI_HWIF_SRCV, "9450-32i 8GB Flash"}, + + /* (MSCC PM8279 32x12G based) */ + {0x9005, 0x028f, 0x9005, 0x1450, PQI_HWIF_SRCV, "SmartRAID Ultra 3258P-32i /e"}, + {0x9005, 0x028f, 0x1590, 0x0294, PQI_HWIF_SRCV, "SR932i-p Gen10+"}, + {0x9005, 0x028f, 0x1590, 0x0381, PQI_HWIF_SRCV, "SR932i-p Gen11"}, + {0x9005, 0x028f, 0x1590, 0x0382, PQI_HWIF_SRCV, "SR308i-p Gen11"}, + {0x9005, 0x028f, 0x1590, 0x0383, PQI_HWIF_SRCV, "SR308i-o Gen11"}, + {0x9005, 0x028f, 0x1590, 0x02db, PQI_HWIF_SRCV, "SR416ie-m Gen11"}, + {0x9005, 0x028f, 0x1590, 0x032e, PQI_HWIF_SRCV, "SR416i-o Gen11"}, + {0x9005, 0x028f, 0x9005, 0x1452, PQI_HWIF_SRCV, "SmartRAID 3200p Ultra"}, + {0x9005, 0x028f, 0x1137, 0x02fe, PQI_HWIF_SRCV, "Cisco 24G TriMode M1 RAID LFF 32D UCSC-RAIDMP1LL32"}, + + /* (MSCC HBA/SMARTHBA/CFF SmartRAID - Lenovo 8X12G 16X12G based) */ + {0x9005, 0x028f, 0x1d49, 0x0220, PQI_HWIF_SRCV, "4350-8i SAS/SATA HBA"}, + {0x9005, 0x028f, 0x1d49, 0x0221, PQI_HWIF_SRCV, "4350-16i SAS/SATA HBA"}, + {0x9005, 0x028f, 0x1d49, 0x0520, PQI_HWIF_SRCV, "5350-8i"}, + {0x9005, 0x028f, 0x1d49, 0x0522, PQI_HWIF_SRCV, "5350-8i INTR"}, + {0x9005, 0x028f, 0x1d49, 0x0620, PQI_HWIF_SRCV, "9350-8i 2GB Flash"}, + {0x9005, 0x028f, 0x1d49, 0x0621, PQI_HWIF_SRCV, "9350-8i 2GB Flash INTR"}, + {0x9005, 0x028f, 0x1d49, 0x0622, PQI_HWIF_SRCV, "9350-16i 4GB Flash"}, + {0x9005, 0x028f, 0x1d49, 0x0623, PQI_HWIF_SRCV, "9350-16i 4GB Flash INTR"}, + + {0, 0, 0, 0, 0, 0} +}; + +struct pqi_ident +pqi_family_identifiers[] = { + {0x9005, 0x028f, 0, 0, PQI_HWIF_SRCV, "Smart Array Storage Controller"}, + {0, 0, 0, 0, 0, 0} +}; diff --git a/sys/dev/smartpqi/smartpqi_defines.h b/sys/dev/smartpqi/smartpqi_defines.h index bb0bb2b709aa..fe2edf7a74a9 100644 --- a/sys/dev/smartpqi/smartpqi_defines.h +++ b/sys/dev/smartpqi/smartpqi_defines.h @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2023 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -927,7 +927,7 @@ typedef struct pqi_pci_info typedef struct _driver_info { unsigned char major_version; - unsigned long minor_version; + unsigned char minor_version; unsigned char release_version; unsigned long build_revision; unsigned long max_targets; @@ -938,9 +938,13 @@ typedef struct _driver_info typedef uint8_t *passthru_buf_type_t; #define PQISRC_DRIVER_MAJOR __FreeBSD__ -#define PQISRC_DRIVER_MINOR 4410 +#if __FreeBSD__ <= 14 +#define PQISRC_DRIVER_MINOR 4660 +#else +#define PQISRC_DRIVER_MINOR 0 +#endif #define PQISRC_DRIVER_RELEASE 0 -#define PQISRC_DRIVER_REVISION 2005 +#define PQISRC_DRIVER_REVISION 2002 #define STR(s) # s #define PQISRC_VERSION(a, b, c, d) STR(a.b.c-d) @@ -1234,19 +1238,21 @@ typedef struct sema OS_SEMA_LOCK_T; /* Debug facility */ -#define PQISRC_FLAGS_MASK 0x0000ffff -#define PQISRC_FLAGS_INIT 0x00000001 -#define PQISRC_FLAGS_INFO 0x00000002 -#define PQISRC_FLAGS_FUNC 0x00000004 -#define PQISRC_FLAGS_TRACEIO 0x00000008 -#define PQISRC_FLAGS_DISC 0x00000010 -#define PQISRC_FLAGS_WARN 0x00000020 -#define PQISRC_FLAGS_ERROR 0x00000040 -#define PQISRC_FLAGS_NOTE 0x00000080 +#define PQISRC_FLAGS_MASK 0x0000000000ff +#define PQISRC_FLAGS_INIT 0x0001 +#define PQISRC_FLAGS_INFO 0x0002 +#define PQISRC_FLAGS_FUNC 0x0004 +#define PQISRC_FLAGS_TRACEIO 0x0008 +#define PQISRC_FLAGS_DISC 0x0010 +#define PQISRC_FLAGS_WARN 0x0020 +#define PQISRC_FLAGS_ERROR 0x0040 +#define PQISRC_FLAGS_NOTE 0x0080 -#define PQISRC_LOG_LEVEL (PQISRC_FLAGS_WARN | PQISRC_FLAGS_ERROR | PQISRC_FLAGS_NOTE) +#define PQISRC_LOG_LEVEL (PQISRC_FLAGS_WARN | PQISRC_FLAGS_ERROR) -static int logging_level = PQISRC_LOG_LEVEL; +extern unsigned long logging_level; + +#define DBG_SET_LOGGING_LEVEL(value) logging_level = value & PQISRC_FLAGS_MASK #define DBG_INIT(fmt,args...) \ do { \ @@ -1276,13 +1282,6 @@ static int logging_level = PQISRC_LOG_LEVEL; } \ }while(0); -#define DBG_TRACEIO(fmt,args...) \ - do { \ - if (logging_level & PQISRC_FLAGS_TRACEIO) { \ - printf("[TRACEIO]:[ %s ] [ %d ]"fmt,__func__,__LINE__,##args); \ - } \ - }while(0); - #define DBG_WARN(fmt,args...) \ do { \ if (logging_level & PQISRC_FLAGS_WARN) { \ diff --git a/sys/dev/smartpqi/smartpqi_discovery.c b/sys/dev/smartpqi/smartpqi_discovery.c index ac37c2233762..a7de5a149810 100644 --- a/sys/dev/smartpqi/smartpqi_discovery.c +++ b/sys/dev/smartpqi/smartpqi_discovery.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2023 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -189,7 +189,7 @@ pqisrc_set_btl(pqi_scsi_dev_t *device, int bus, int target, int lun) * devices and multi-lun devices */ boolean_t pqisrc_add_softs_entry(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device, - uint8_t *scsi3addr) + uint8_t const *scsi3addr) { /* Add physical devices with targets that need * targets */ @@ -269,7 +269,7 @@ pqisrc_add_softs_entry(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device, } } DBG_ERR("The device is not a physical, lun or ptraid device" - "B %d: T %d: L %d\n", device->bus, device->target, + "B%d:T%d:L%d\n", device->bus, device->target, device->lun ); return false; @@ -283,7 +283,7 @@ add_device_to_dev_list: softs->dev_list[j] = device; break; } - DBG_NOTE("Added device [%d of %d]: B %d: T %d: L %d\n", + DBG_NOTE("Added device [%d of %d]: B%d:T%d:L%d\n", j, softs->num_devs, device->bus, device->target, device->lun); return true; @@ -307,7 +307,6 @@ pqisrc_find_btl_list_index(pqisrc_softstate_t *softs, if(bus == softs->bus_id && target == temp_device->target && lun == temp_device->lun){ - DBG_DISC("Returning device list index %d\n", index); return index; } @@ -322,7 +321,7 @@ pqisrc_find_btl_list_index(pqisrc_softstate_t *softs, /* Return a given index for a specific device within the * softs dev_list */ int -pqisrc_find_device_list_index(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) +pqisrc_find_device_list_index(pqisrc_softstate_t *softs, pqi_scsi_dev_t const *device) { int index; @@ -346,7 +345,7 @@ pqisrc_find_device_list_index(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) /* Delete a given device from the softs dev_list*/ int -pqisrc_delete_softs_entry(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) +pqisrc_delete_softs_entry(pqisrc_softstate_t *softs, pqi_scsi_dev_t const *device) { int index; @@ -354,8 +353,8 @@ pqisrc_delete_softs_entry(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) if (0 <= index && index < MAX_TARGET_BIT) { softs->dev_list[index] = NULL; softs->num_devs--; - DBG_NOTE("Removing device : B %d: T %d: L %d positioned at %d\n", - device->bus, device->target, device->lun, softs->num_devs); + DBG_NOTE("Removing device: B%d:T%d:L%d positioned at %d\n", + device->bus, device->target, device->lun, index); return PQI_STATUS_SUCCESS; } if (index == INVALID_ELEM) { @@ -414,7 +413,7 @@ pqisrc_build_send_raid_request(pqisrc_softstate_t *softs, struct dma_mem device_ int ret = PQI_STATUS_SUCCESS; ib_queue_t *ib_q = &softs->op_raid_ib_q[PQI_DEFAULT_IB_QUEUE]; - ob_queue_t *ob_q = &softs->op_ob_q[PQI_DEFAULT_IB_QUEUE]; + ob_queue_t const *ob_q = &softs->op_ob_q[PQI_DEFAULT_IB_QUEUE]; rcb_t *rcb = NULL; @@ -740,13 +739,13 @@ pqisrc_get_phys_log_device_list(pqisrc_softstate_t *softs, ret = pqisrc_get_physical_logical_luns(softs, SA_REPORT_PHYS, physical_dev_list, phys_data_length); if (ret) { - DBG_ERR("report physical LUNs failed"); + DBG_ERR("report physical LUNs failed\n"); return ret; } ret = pqisrc_get_physical_logical_luns(softs, SA_REPORT_LOG, logical_dev_list, log_data_length); if (ret) { - DBG_ERR("report logical LUNs failed"); + DBG_ERR("report logical LUNs failed\n"); return ret; } @@ -763,7 +762,7 @@ pqisrc_get_phys_log_device_list(pqisrc_softstate_t *softs, ret = pqisrc_get_queue_lun_list(softs, PQI_LOG_EXT_QUEUE_ENABLE, queue_dev_list, queue_data_length); if (ret) { - DBG_ERR("report logical LUNs failed"); + DBG_ERR("report logical LUNs failed\n"); return ret; } @@ -808,13 +807,13 @@ pqisrc_get_phys_log_device_list(pqisrc_softstate_t *softs, } inline boolean_t -pqisrc_is_external_raid_device(pqi_scsi_dev_t *device) +pqisrc_is_external_raid_device(pqi_scsi_dev_t const *device) { return device->is_external_raid_device; } static inline boolean_t -pqisrc_is_external_raid_addr(uint8_t *scsi3addr) +pqisrc_is_external_raid_addr(uint8_t const *scsi3addr) { return scsi3addr[2] != 0; } @@ -940,12 +939,12 @@ out: /* Validate the RAID map parameters */ static int pqisrc_raid_map_validation(pqisrc_softstate_t *softs, - pqi_scsi_dev_t *device, pqisrc_raid_map_t *raid_map) + pqi_scsi_dev_t const *device, pqisrc_raid_map_t *raid_map) { char *error_msg; uint32_t raidmap_size; uint32_t r5or6_blocks_per_row; -/* unsigned phys_dev_num; */ + /* unsigned phys_dev_num; */ DBG_FUNC("IN\n"); @@ -1033,7 +1032,7 @@ pqisrc_get_device_raidmap(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) if (raidmap_reported_size <= raidmap_alloc_size) break; - DBG_NOTE("Raid map is larger than 1024 entries, request once again"); + DBG_NOTE("Raid map is larger than 1024 entries, request once again\n"); os_mem_free(softs, (char*)raid_map, raidmap_alloc_size); raidmap_alloc_size = raidmap_reported_size; @@ -1331,7 +1330,7 @@ pqisrc_get_physical_device_info(pqisrc_softstate_t *softs, /* Function used to find the entry of the device in a list */ static device_status_t pqisrc_scsi_find_entry(pqisrc_softstate_t *softs, - pqi_scsi_dev_t *device_to_find, pqi_scsi_dev_t **same_device) + pqi_scsi_dev_t const *device_to_find, pqi_scsi_dev_t **same_device) { pqi_scsi_dev_t *device; int i; @@ -1361,7 +1360,7 @@ pqisrc_scsi_find_entry(pqisrc_softstate_t *softs, /* Update the newly added devices as existed device */ static void -pqisrc_exist_device_update(pqisrc_softstate_t *softs, +pqisrc_exist_device_update(pqisrc_softstate_t const *softs, pqi_scsi_dev_t *device_exist, pqi_scsi_dev_t *new_device) { DBG_FUNC("IN\n"); @@ -1395,15 +1394,13 @@ pqisrc_exist_device_update(pqisrc_softstate_t *softs, device_exist->offload_config = new_device->offload_config; device_exist->offload_enabled_pending = new_device->offload_enabled_pending; - if (device_exist->offload_to_mirror) - os_mem_free(softs, - (int *) device_exist->offload_to_mirror, - sizeof(*(device_exist->offload_to_mirror))); + if (device_exist->offload_to_mirror) { + device_exist->temp_offload_to_mirror = device_exist->offload_to_mirror; + } device_exist->offload_to_mirror = new_device->offload_to_mirror; - if (device_exist->raid_map) - os_mem_free(softs, - (char *)device_exist->raid_map, - sizeof(*device_exist->raid_map)); + if (device_exist->raid_map) { + device_exist->temp_raid_map = device_exist->raid_map; + } device_exist->raid_map = new_device->raid_map; /* To prevent these from being freed later. */ new_device->raid_map = NULL; @@ -1416,7 +1413,7 @@ static int pqisrc_add_device(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) { DBG_FUNC("IN\n"); - DBG_NOTE("vendor: %s model: %s bus:%d target:%d lun:%d is_physical_device:0x%x expose_device:0x%x volume_offline 0x%x volume_status 0x%x \n", + DBG_NOTE("vendor: %s model: %s B%d:T%d:L%d is_physical_device:0x%x expose_device:0x%x volume_offline 0x%x volume_status 0x%x \n", device->vendor, device->model, device->bus, device->target, device->lun, device->is_physical_device, device->expose_device, device->volume_offline, device->volume_status); device->invalid = false; @@ -1439,7 +1436,7 @@ void pqisrc_remove_device(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) { *** 1703 LINES SKIPPED *** From nobody Fri Jan 9 17:47:55 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnq4C4Zzgz6B0y2 for ; Fri, 09 Jan 2026 17:47:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnq4C3n0Nz43Zq for ; Fri, 09 Jan 2026 17:47:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767980875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qfuInvP25BRByt0qVVYAivc1rP3NDdDv7RsAuNyWXsk=; b=cpCIZF6/WltrKICruFCvULepDR8lSs6Bq9jDDe1ihQ6Kbs6phZKHHbTaeH6lmXL9aw0otV 9x1sPBMZylcwsatly6mzxUHvvvnLeKFSiix3DYshd0j6tkKGF2degCa1ARALA0YEKGPS5n KRtRrMgXvLYW/1DziqsQtyWXWB64gkGk9zTs1UxwdcD/OhiQivM9XrwrOx0YspacztAdLo nJ841p178ROu8m92x0MF08QGySrvOyA3syqdGYtkoanRf5cgK45Em97gJUzmTwPyxo8vns Jm8bBWSHLPI7FBWr3UgTeNSLmEuxMcZjZUwlI6AwoiTpbm3arFBzrCtLfhn/Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767980875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qfuInvP25BRByt0qVVYAivc1rP3NDdDv7RsAuNyWXsk=; b=KOf7pC8F4qmVXuEu1ByBP7ByV35v+qAq5jLtTw1uDWmcAHBBbxlf2u05XlbTJuavpxqb8L loSbbWAj0mgD7DGi+3S9caDA3dvvCEWyLDdSM9J/gv6TyPxIr1Z24GYboVuv9FR3f9Uw1h r+nPcgbsYCG/Jv9EFQLyq/UUcpVe5n7HDXHFgQjCSilqaa7YIb/uTyCV4gH8g189ZsrS23 IpTs6+P84QDPU1sjEpWwzOTEv7rVnf/EZ57IBlbQAPkTNKlWo23YtJZFLDykP3ma17qSI4 vXmJCnNQV8dKj18B6+hfcsqdlbr0/7tDC5WxW1F01xX93YBO/MFUZmeBPWzoYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767980875; a=rsa-sha256; cv=none; b=CTJvaAHRol2O9XlNAWcLbXeK7RokpNgdD6OkuvHq3qlWqAEeUHpS1jb2+br1zDeYZ36VLB uXhf61q1z7xm5/l/uwCJJycACUc6MWCt7goZ2gcwhbBawjP6K/vdrKx+oGvfsyuyeOyKpe Vs6ERjjZ1GJYwHJTu9CF+PGl5+JchPrebIyuoJqUD2ps7U/ctISQecsZG9wM5CbFBlW2Ww bs/3negvAK4SZgYH0exxUic8Q31JneWFBAKE+Av49d+W/INhbIZ6gUxMovTfPj6QiHKjF0 RePq4nJfMneUBd0Vb8nlJs0fn/6ES3Ch9yvMxrqLG1G4ZeCOCMf3Yg07QtiLrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnq4C366Sz3mT for ; Fri, 09 Jan 2026 17:47:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37762 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 17:47:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Hall Subject: git: ec98cb56861f - stable/14 - smartpqi: update to version 4660.0.2002 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrhall X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ec98cb56861fa1cff372ae006f9c2c6a0fc78649 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 17:47:55 +0000 Message-Id: <69613f4b.37762.44bab395@gitrepo.freebsd.org> The branch stable/14 has been updated by jrhall: URL: https://cgit.FreeBSD.org/src/commit/?id=ec98cb56861fa1cff372ae006f9c2c6a0fc78649 commit ec98cb56861fa1cff372ae006f9c2c6a0fc78649 Author: John Hall AuthorDate: 2025-08-28 21:11:02 +0000 Commit: John Hall CommitDate: 2026-01-09 17:47:23 +0000 smartpqi: update to version 4660.0.2002 This updates the smartpqi driver to Microchip's latest available public release. Reviewed by: imp Approved by: imp Sponsored by: Microchip Technology Inc. Differential Revision: https://reviews.freebsd.org/D52507 (cherry picked from commit c558eca47970c8467ed0494145f08d1879050bbd) --- share/man/man4/smartpqi.4 | 88 +++++++- sys/dev/smartpqi/smartpqi_cam.c | 53 ++--- sys/dev/smartpqi/smartpqi_cmd.c | 4 +- sys/dev/smartpqi/smartpqi_controllers.h | 371 ++++++++++++++++++++++++++++++++ sys/dev/smartpqi/smartpqi_defines.h | 43 ++-- sys/dev/smartpqi/smartpqi_discovery.c | 167 +++++--------- sys/dev/smartpqi/smartpqi_event.c | 10 +- sys/dev/smartpqi/smartpqi_helper.c | 32 ++- sys/dev/smartpqi/smartpqi_init.c | 13 +- sys/dev/smartpqi/smartpqi_intr.c | 3 +- sys/dev/smartpqi/smartpqi_ioctl.c | 12 +- sys/dev/smartpqi/smartpqi_main.c | 320 +++------------------------ sys/dev/smartpqi/smartpqi_misc.c | 28 +-- sys/dev/smartpqi/smartpqi_prototypes.h | 52 ++--- sys/dev/smartpqi/smartpqi_queue.c | 25 +-- sys/dev/smartpqi/smartpqi_request.c | 104 ++++----- sys/dev/smartpqi/smartpqi_response.c | 14 +- sys/dev/smartpqi/smartpqi_sis.c | 6 +- sys/dev/smartpqi/smartpqi_structures.h | 5 +- 19 files changed, 725 insertions(+), 625 deletions(-) diff --git a/share/man/man4/smartpqi.4 b/share/man/man4/smartpqi.4 index 5b7ea923e13e..ef5f903fe422 100644 --- a/share/man/man4/smartpqi.4 +++ b/share/man/man4/smartpqi.4 @@ -1,4 +1,4 @@ -.\" Copyright (C) 2019-2023, Microchip Technology Inc. and its subsidiaries +.\" Copyright (C) 2019-2025, Microchip Technology Inc. and its subsidiaries .\" Copyright (C) 2016-2018, Microsemi Corporation .\" Copyright (C) 2016, PMC-Sierra, Inc. .\" Written by John Hall @@ -24,8 +24,8 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd August 24, 2023 -.Dt SMARTPQI 4 +.Dd August 28, 2025 +.Dt SMARTPQI 4 amd64 .Os .Sh NAME .Nm smartpqi @@ -48,7 +48,7 @@ smartpqi_load="YES" The .Nm driver provides support for Microchip Technology Inc. / Adaptec SmartRaid and -SmartHBA SATA/SAS/NVME PCIe controllers +SmartHBA SATA/SAS/NVMe PCIe controllers .Sh HARDWARE Controllers supported by the .Nm @@ -63,6 +63,86 @@ Adaptec SmartRaid and SmartHBA Controllers OEM Controllers based on the Microchip Technology Inc. SmartROC and SmartIOC Chipsets .El +.Sh DEBUGGING +Driver diagnostic printing is controlled in +.Xr loader.conf 5 +by using the global +.Va hw.smartpqi.debug_level +tunable. +.Pp +The +.Va debug_level +variable is set with an integer value. +The default value is 0x0060 (warn && error). +.Pp +The following levels are available: +.Bl -column "FlagXX" "NameXXXX" "Description" -offset indent +.It Em Flag Ta Em Name Ta Em Description +.It 0x0001 Ta init Ta System initialization operations +.It 0x0002 Ta info Ta Basic information +.It 0x0004 Ta function Ta Used to show function entry and exit +.It 0x0008 Ta io Ta Logging data from controller +.It 0x0010 Ta discovery Ta Device discovery +.It 0x0020 Ta warning Ta Operational warnings +.It 0x0040 Ta error Ta Parameter errors and programming bugs +.It 0x0080 Ta note Ta More detailed information +.El +.Sh DEVICE HINTS +The following tunable values can be set in +.Pa /boot/device.hints +to control the behavior of the +.Nm +driver. +These hints are specified as: +.Bd -literal -offset indent +hint.smartpqi..= +.Ed +.Pp +The supported variables are: +.Bl -tag -width ".Va aio_raid1_write_disable" +.It Va stream_disable +If set to 0, disables Stream Detection. +.Pp +Default is (enabled). +.It Va sata_unique_wwn_disable +If set to 0, disables SATA Unique World Wide Number. +.Pp +Default is (enabled). +.It Va aio_raid1_write_disable +If set to 0, disables acceleration of RAID1 writes +.Pp +Default is (enabled). +.It Va aio_raid5_write_disable +If set to 0, disables acceleration of RAID5 writes +.Pp +Default is (enabled). +.It Va aio_raid6_write_disable +If set to 0, disables acceleration of RAID6 writes +.Pp +Default is (enabled). +.It Va queue_depth +Sets queue depth for the controller. If the queue depth value +is greater than the maximum supported queue size of the driver or +controller, it will be set to the lowest size. If the queue +depth value is lower than the minimum queue depth then this will +be set to the minimum queue depth. +.Pp +Default is driver-determined. +.It Va sg_count +Sets the scatter gather (sg) count. If this sg count is greater +than maximum sg count it will be set to the maximum sg count. +If this sg count is less than minimum sg count it will be set to +the minimum sg count. +.Pp +Default is driver-determined. +.El +.Pp +For example, to disable Stream Detection on the first controller, add +the following line to +.Pa /boot/device.hints : +.Bd -literal -offset indent +hint.smartpqi.0.stream_disable="0" +.Ed .Sh FILES .Bl -tag -width /boot/kernel/smartpqi.ko -compact .It Pa /dev/smartpqi? diff --git a/sys/dev/smartpqi/smartpqi_cam.c b/sys/dev/smartpqi/smartpqi_cam.c index ffdd9fd7da79..93043a296c5d 100644 --- a/sys/dev/smartpqi/smartpqi_cam.c +++ b/sys/dev/smartpqi/smartpqi_cam.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2023 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -71,7 +71,6 @@ update_sim_properties(struct cam_sim *sim, struct ccb_pathinq *cpi) cpi->hba_subvendor = pci_get_subvendor(dev); cpi->hba_subdevice = pci_get_subdevice(dev); - DBG_FUNC("OUT\n"); } @@ -154,10 +153,6 @@ os_remove_device(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) } xpt_async(AC_LOST_DEVICE, tmppath, NULL); xpt_free_path(tmppath); - /* softs->device_list[device->target][device->lun] = NULL; */ - int index = pqisrc_find_device_list_index(softs,device); - if (index >= 0 && index < PQI_MAX_DEVICES) - softs->dev_list[index] = NULL; pqisrc_free_device(softs, device); } @@ -335,7 +330,7 @@ os_io_response_success(rcb_t *rcb) static void copy_sense_data_to_csio(struct ccb_scsiio *csio, - uint8_t *sense_data, uint16_t sense_data_len) + uint8_t const *sense_data, uint16_t sense_data_len) { DBG_IO("IN csio = %p\n", csio); @@ -740,7 +735,7 @@ smartpqi_target_rescan(struct pqisrc_softstate *softs) /* if(softs->device_list[target][lun]){ */ if(softs->dev_list[index] != NULL) { device = softs->dev_list[index]; - DBG_INFO("calling smartpqi_lun_rescan with TL = %d:%d\n",device->target,device->lun); + DBG_INFO("calling smartpqi_lun_rescan with T%d:L%d\n",device->target,device->lun); smartpqi_lun_rescan(softs, device->target, device->lun); } } @@ -821,7 +816,6 @@ pqisrc_io_start(struct cam_sim *sim, union ccb *ccb) if (index == INVALID_ELEM) { ccb->ccb_h.status = CAM_DEV_NOT_THERE; - DBG_INFO("Invalid index/device!!!, Device BTL %u:%d:%d\n", softs->bus_id, target, lun); return ENXIO; } @@ -850,7 +844,7 @@ pqisrc_io_start(struct cam_sim *sim, union ccb *ccb) } /* Check device reset */ if (DEVICE_RESET(dvp)) { - ccb->ccb_h.status = CAM_SCSI_BUSY | CAM_REQ_INPROG | CAM_BUSY; + ccb->ccb_h.status = CAM_BUSY; DBG_WARN("Device %d reset returned busy\n", ccb->ccb_h.target_id); return EBUSY; } @@ -915,7 +909,7 @@ pqisrc_io_start(struct cam_sim *sim, union ccb *ccb) } static inline int -pqi_tmf_status_to_bsd_tmf_status(int pqi_status, rcb_t *rcb) +pqi_tmf_status_to_bsd_tmf_status(int pqi_status, rcb_t const *rcb) { if (PQI_STATUS_SUCCESS == pqi_status && PQI_STATUS_SUCCESS == rcb->status) @@ -931,7 +925,7 @@ static int pqisrc_scsi_abort_task(pqisrc_softstate_t *softs, union ccb *ccb) { rcb_t *rcb = NULL; - struct ccb_hdr *ccb_h = &ccb->ccb_h; + struct ccb_hdr const *ccb_h = &ccb->ccb_h; rcb_t *prcb = ccb->ccb_h.sim_priv.entries[0].ptr; uint32_t tag; int rval; @@ -971,7 +965,7 @@ error_tmf: static int pqisrc_scsi_abort_task_set(pqisrc_softstate_t *softs, union ccb *ccb) { - struct ccb_hdr *ccb_h = &ccb->ccb_h; + struct ccb_hdr const *ccb_h = &ccb->ccb_h; rcb_t *rcb = NULL; uint32_t tag; int rval; @@ -1013,7 +1007,7 @@ pqisrc_target_reset( pqisrc_softstate_t *softs, union ccb *ccb) { /* pqi_scsi_dev_t *devp = softs->device_list[ccb->ccb_h.target_id][ccb->ccb_h.target_lun]; */ - struct ccb_hdr *ccb_h = &ccb->ccb_h; + struct ccb_hdr const *ccb_h = &ccb->ccb_h; rcb_t *rcb = NULL; uint32_t tag; int rval; @@ -1069,7 +1063,7 @@ static void smartpqi_cam_action(struct cam_sim *sim, union ccb *ccb) { struct pqisrc_softstate *softs = cam_sim_softc(sim); - struct ccb_hdr *ccb_h = &ccb->ccb_h; + struct ccb_hdr const *ccb_h = &ccb->ccb_h; DBG_FUNC("IN\n"); @@ -1209,22 +1203,19 @@ smartpqi_async(void *callback_arg, u_int32_t code, } uint32_t t_id = cgd->ccb_h.target_id; - /* if (t_id <= (PQI_CTLR_INDEX - 1)) { */ - if (t_id >= PQI_CTLR_INDEX) { - if (softs != NULL) { - /* pqi_scsi_dev_t *dvp = softs->device_list[t_id][cgd->ccb_h.target_lun]; */ - int lun = cgd->ccb_h.target_lun; - int index = pqisrc_find_btl_list_index(softs,softs->bus_id,t_id,lun); - if (index != INVALID_ELEM) { - pqi_scsi_dev_t *dvp = softs->dev_list[index]; - if (dvp == NULL) { - DBG_ERR("Target is null, target id=%u\n", t_id); - break; - } - smartpqi_adjust_queue_depth(path, dvp->queue_depth); - } - } - } + if (softs != NULL) { + /* pqi_scsi_dev_t *dvp = softs->device_list[t_id][cgd->ccb_h.target_lun]; */ + int lun = cgd->ccb_h.target_lun; + int index = pqisrc_find_btl_list_index(softs,softs->bus_id,t_id,lun); + if (index != INVALID_ELEM) { + pqi_scsi_dev_t const *dvp = softs->dev_list[index]; + if (dvp == NULL) { + DBG_ERR("Target is null, target id=%u\n", t_id); + break; + } + smartpqi_adjust_queue_depth(path, dvp->queue_depth); + } + } break; } default: diff --git a/sys/dev/smartpqi/smartpqi_cmd.c b/sys/dev/smartpqi/smartpqi_cmd.c index 8486ac12df79..b71879aa81f6 100644 --- a/sys/dev/smartpqi/smartpqi_cmd.c +++ b/sys/dev/smartpqi/smartpqi_cmd.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2023 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -35,7 +35,7 @@ pqisrc_submit_cmnd(pqisrc_softstate_t *softs, ib_queue_t *ib_q, void *req) { char *slot = NULL; uint32_t offset; - iu_header_t *hdr = (iu_header_t *)req; + iu_header_t const *hdr = (iu_header_t *)req; /*TODO : Can be fixed a size copying of IU ? */ uint32_t iu_len = hdr->iu_length + 4 ; /* header size */ int i = 0; diff --git a/sys/dev/smartpqi/smartpqi_controllers.h b/sys/dev/smartpqi/smartpqi_controllers.h new file mode 100644 index 000000000000..6356159fd5f7 --- /dev/null +++ b/sys/dev/smartpqi/smartpqi_controllers.h @@ -0,0 +1,371 @@ +/*- + * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. + * + * 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. + */ + +/* + * Supported controllers + */ +struct pqi_ident +{ + u_int16_t vendor; + u_int16_t device; + u_int16_t subvendor; + u_int16_t subdevice; + int hwif; + char *desc; +} pqi_identifiers[] = { + /* (MSCC PM8205 8x12G based) */ + {0x9005, 0x028f, 0x103c, 0x600, PQI_HWIF_SRCV, "P408i-p SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x601, PQI_HWIF_SRCV, "P408e-p SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x602, PQI_HWIF_SRCV, "P408i-a SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x603, PQI_HWIF_SRCV, "P408i-c SR Gen10"}, + {0x9005, 0x028f, 0x1028, 0x1FE0, PQI_HWIF_SRCV, "SmartRAID 3162-8i/eDell"}, + {0x9005, 0x028f, 0x9005, 0x608, PQI_HWIF_SRCV, "SmartRAID 3162-8i/e"}, + {0x9005, 0x028f, 0x103c, 0x609, PQI_HWIF_SRCV, "P408i-sb SR G10"}, + + /* (MSCC PM8225 8x12G based) */ + {0x9005, 0x028f, 0x103c, 0x650, PQI_HWIF_SRCV, "E208i-p SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x651, PQI_HWIF_SRCV, "E208e-p SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x652, PQI_HWIF_SRCV, "E208i-c SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x654, PQI_HWIF_SRCV, "E208i-a SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x655, PQI_HWIF_SRCV, "P408e-m SR Gen10"}, + {0x9005, 0x028f, 0x9005, 0x659, PQI_HWIF_SRCV, "2100C8iOXS"}, + + /* (MSCC PM8221 8x12G based) */ + {0x9005, 0x028f, 0x103c, 0x700, PQI_HWIF_SRCV, "P204i-c SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x701, PQI_HWIF_SRCV, "P204i-b SR Gen10"}, + {0x9005, 0x028f, 0x193d, 0x1104, PQI_HWIF_SRCV, "UN RAID P2404-Mf-4i-2GB"}, + {0x9005, 0x028f, 0x193d, 0x1106, PQI_HWIF_SRCV, "UN RAID P2404-Mf-4i-1GB"}, + {0x9005, 0x028f, 0x193d, 0x1108, PQI_HWIF_SRCV, "UN RAID P4408-Ma-8i-2GB"}, + {0x9005, 0x028f, 0x193d, 0x1109, PQI_HWIF_SRCV, "UN RAID P4408-Mr-8i-2GB"}, + + /* (MSCC PM8204 8x12G based) */ + {0x9005, 0x028f, 0x9005, 0x800, PQI_HWIF_SRCV, "SmartRAID 3154-8i"}, + {0x9005, 0x028f, 0x9005, 0x801, PQI_HWIF_SRCV, "SmartRAID 3152-8i"}, + {0x9005, 0x028f, 0x9005, 0x802, PQI_HWIF_SRCV, "SmartRAID 3151-4i"}, + {0x9005, 0x028f, 0x9005, 0x803, PQI_HWIF_SRCV, "SmartRAID 3101-4i"}, + {0x9005, 0x028f, 0x9005, 0x804, PQI_HWIF_SRCV, "SmartRAID 3154-8e"}, + {0x9005, 0x028f, 0x9005, 0x805, PQI_HWIF_SRCV, "SmartRAID 3102-8i"}, + {0x9005, 0x028f, 0x9005, 0x806, PQI_HWIF_SRCV, "SmartRAID 3100"}, + {0x9005, 0x028f, 0x9005, 0x807, PQI_HWIF_SRCV, "SmartRAID 3162-8i"}, + {0x9005, 0x028f, 0x152d, 0x8a22, PQI_HWIF_SRCV, "QS-8204-8i"}, + {0x9005, 0x028f, 0x193d, 0xf460, PQI_HWIF_SRCV, "UN RAID P460-M4"}, + {0x9005, 0x028f, 0x193d, 0xf461, PQI_HWIF_SRCV, "UN RAID P460-B4"}, + {0x9005, 0x028f, 0x1bd4, 0x004b, PQI_HWIF_SRCV, "PM8204-2GB"}, + {0x9005, 0x028f, 0x1bd4, 0x004c, PQI_HWIF_SRCV, "PM8204-4GB"}, + {0x9005, 0x028f, 0x1ff9, 0x004b, PQI_HWIF_SRCV, "RAID PM8204-2GB"}, + {0x9005, 0x028f, 0x1ff9, 0x004c, PQI_HWIF_SRCV, "RAID PM8204-4GB"}, + {0x9005, 0x028f, 0x193d, 0x0462, PQI_HWIF_SRCV, "UN RAID P460-Mr1-8i-4GB"}, + {0x9005, 0x028f, 0x193d, 0x1105, PQI_HWIF_SRCV, "UN RAID P4408-Mf-8i-2GB"}, + {0x9005, 0x028f, 0x193d, 0x1107, PQI_HWIF_SRCV, "UN RAID P4408-Mf-8i-4GB"}, + {0x9005, 0x028f, 0x193d, 0x1110, PQI_HWIF_SRCV, "UN RAID P4408-Mr-2"}, + {0x9005, 0x028f, 0x1d8d, 0x800, PQI_HWIF_SRCV, "Fiberhome SmartRAID AIS-8204-8i"}, + {0x9005, 0x028f, 0x9005, 0x0808, PQI_HWIF_SRCV, "SmartRAID 3101E-4i"}, + {0x9005, 0x028f, 0x9005, 0x0809, PQI_HWIF_SRCV, "SmartRAID 3102E-8i"}, + {0x9005, 0x028f, 0x9005, 0x080a, PQI_HWIF_SRCV, "SmartRAID 3152-8i/N"}, + {0x9005, 0x028f, 0x1cc4, 0x0101, PQI_HWIF_SRCV, "Ramaxel FBGF-RAD PM8204"}, + {0x9005, 0x028f, 0x1f3a, 0x0104, PQI_HWIF_SRCV, "PL SmartROC PM8204"}, + {0x9005, 0x028f, 0x1f51, 0x1043, PQI_HWIF_SRCV, "SmartRAID P7502-8i"}, + {0x9005, 0x028f, 0x1f51, 0x1045, PQI_HWIF_SRCV, "SmartRAID P7504-8i"}, + {0x9005, 0x028f, 0x1f51, 0x1011, PQI_HWIF_SRCV, "SmartRAID P7504N-8i"}, + {0x9005, 0x028f, 0x207d, 0x4140, PQI_HWIF_SRCV, "HRDT TrustRAID D3152s-8i"}, + {0x9005, 0x028f, 0x207d, 0x4240, PQI_HWIF_SRCV, "HRDT TrustRAID D3154s-8i"}, + + /* (MSCC PM8222 8x12G based) */ + {0x9005, 0x028f, 0x9005, 0x900, PQI_HWIF_SRCV, "SmartHBA 2100-8i"}, + {0x9005, 0x028f, 0x9005, 0x901, PQI_HWIF_SRCV, "SmartHBA 2100-4i"}, + {0x9005, 0x028f, 0x9005, 0x902, PQI_HWIF_SRCV, "HBA 1100-8i"}, + {0x9005, 0x028f, 0x9005, 0x903, PQI_HWIF_SRCV, "HBA 1100-4i"}, + {0x9005, 0x028f, 0x9005, 0x904, PQI_HWIF_SRCV, "SmartHBA 2100-8e"}, + {0x9005, 0x028f, 0x9005, 0x905, PQI_HWIF_SRCV, "HBA 1100-8e"}, + {0x9005, 0x028f, 0x9005, 0x906, PQI_HWIF_SRCV, "SmartHBA 2100-4i4e"}, + {0x9005, 0x028f, 0x9005, 0x907, PQI_HWIF_SRCV, "HBA 1100"}, + {0x9005, 0x028f, 0x9005, 0x908, PQI_HWIF_SRCV, "SmartHBA 2100"}, + {0x9005, 0x028f, 0x9005, 0x90a, PQI_HWIF_SRCV, "SmartHBA 2100A-8i"}, + {0x9005, 0x028f, 0x193d, 0x8460, PQI_HWIF_SRCV, "UN HBA H460-M1"}, + {0x9005, 0x028f, 0x193d, 0x8461, PQI_HWIF_SRCV, "UN HBA H460-B1"}, + {0x9005, 0x028f, 0x193d, 0x8462, PQI_HWIF_SRCV, "UN HBA H460-Mr1-8i"}, + {0x9005, 0x028f, 0x193d, 0xc460, PQI_HWIF_SRCV, "UN RAID P460-M2"}, + {0x9005, 0x028f, 0x193d, 0xc461, PQI_HWIF_SRCV, "UN RAID P460-B2"}, + {0x9005, 0x028f, 0x1bd4, 0x004a, PQI_HWIF_SRCV, "PM8222-SHBA"}, + {0x9005, 0x028f, 0x1ff9, 0x004a, PQI_HWIF_SRCV, "PM8222-SHBA"}, + {0x9005, 0x028f, 0x13fe, 0x8312, PQI_HWIF_SRCV, "MIC-8312BridgeB"}, + {0x9005, 0x028f, 0x1bd4, 0x004f, PQI_HWIF_SRCV, "PM8222-HBA"}, + {0x9005, 0x028f, 0x1ff9, 0x004f, PQI_HWIF_SRCV, "PM8222-HBA"}, + {0x9005, 0x028f, 0x1d8d, 0x908, PQI_HWIF_SRCV, "Fiberhome SmartHBA AIS-8222-8i"}, + {0x9005, 0x028f, 0x1bd4, 0x006C, PQI_HWIF_SRCV, "RS0800M5E8i"}, + {0x9005, 0x028f, 0x1bd4, 0x006D, PQI_HWIF_SRCV, "RS0800M5H8i"}, + {0x9005, 0x028f, 0x1ff9, 0x006C, PQI_HWIF_SRCV, "RS0800M5E8i"}, + {0x9005, 0x028f, 0x1ff9, 0x006D, PQI_HWIF_SRCV, "RS0800M5H8i"}, + {0x9005, 0x028f, 0x1cc4, 0x0201, PQI_HWIF_SRCV, "Ramaxel FBGF-RAD PM8222"}, + {0x9005, 0x028f, 0x1f51, 0x1044, PQI_HWIF_SRCV, "SmartHBA P6500-8i"}, + {0x9005, 0x028f, 0x1f3f, 0x0610, PQI_HWIF_SRCV, "3SNIC SSSRAID 3S610"}, + {0x9005, 0x028f, 0x207d, 0x4840, PQI_HWIF_SRCV, "HRDT TrustHBA H3100s-8i"}, + + /* (SRCx MSCC FVB 24x12G based) */ + {0x9005, 0x028f, 0x103c, 0x1001, PQI_HWIF_SRCV, "MSCC FVB"}, + + /* (MSCC PM8241 24x12G based) */ + + /* (MSCC PM8242 24x12G based) */ + {0x9005, 0x028f, 0x152d, 0x8a37, PQI_HWIF_SRCV, "QS-8242-24i"}, + {0x9005, 0x028f, 0x9005, 0x1300, PQI_HWIF_SRCV, "HBA 1100-8i8e"}, + {0x9005, 0x028f, 0x9005, 0x1301, PQI_HWIF_SRCV, "HBA 1100-24i"}, + {0x9005, 0x028f, 0x9005, 0x1302, PQI_HWIF_SRCV, "SmartHBA 2100-8i8e"}, + {0x9005, 0x028f, 0x9005, 0x1303, PQI_HWIF_SRCV, "SmartHBA 2100-24i"}, + {0x9005, 0x028f, 0x105b, 0x1321, PQI_HWIF_SRCV, "8242-24i"}, + {0x9005, 0x028f, 0x1bd4, 0x0045, PQI_HWIF_SRCV, "SMART-HBA 8242-24i"}, + {0x9005, 0x028f, 0x1ff9, 0x0045, PQI_HWIF_SRCV, "SMART-HBA 8242-24i"}, + {0x9005, 0x028f, 0x1bd4, 0x006B, PQI_HWIF_SRCV, "RS0800M5H24i"}, + {0x9005, 0x028f, 0x1bd4, 0x0070, PQI_HWIF_SRCV, "RS0800M5E24i"}, + {0x9005, 0x028f, 0x1ff9, 0x006B, PQI_HWIF_SRCV, "RS0800M5H24i"}, + {0x9005, 0x028f, 0x1ff9, 0x0070, PQI_HWIF_SRCV, "RS0800M5E24i"}, + + /* (MSCC PM8236 16x12G based) */ + {0x9005, 0x028f, 0x152d, 0x8a24, PQI_HWIF_SRCV, "QS-8236-16i"}, + {0x9005, 0x028f, 0x9005, 0x1380, PQI_HWIF_SRCV, "SmartRAID 3154-16i"}, + {0x9005, 0x028f, 0x1bd4, 0x0046, PQI_HWIF_SRCV, "RAID 8236-16i"}, + {0x9005, 0x028f, 0x1ff9, 0x0046, PQI_HWIF_SRCV, "RAID 8236-16i"}, + {0x9005, 0x028f, 0x1d8d, 0x806, PQI_HWIF_SRCV, "Fiberhome SmartRAID AIS-8236-16i"}, + {0x9005, 0x028f, 0x1cf2, 0x0B27, PQI_HWIF_SRCV, "ZTE SmartROC3100 SDPSA/B-18i 4G"}, + {0x9005, 0x028f, 0x1cf2, 0x0B45, PQI_HWIF_SRCV, "ZTE SmartROC3100 SDPSA/B_L-18i 2G"}, + {0x9005, 0x028f, 0x1cf2, 0x5445, PQI_HWIF_SRCV, "ZTE SmartROC3100 RM241-18i 2G"}, + {0x9005, 0x028f, 0x1cf2, 0x5446, PQI_HWIF_SRCV, "ZTE SmartROC3100 RM242-18i 4G"}, + {0x9005, 0x028f, 0x1cf2, 0x5449, PQI_HWIF_SRCV, "ZTE SmartROC3100 RS241-18i 2G"}, + {0x9005, 0x028f, 0x1cf2, 0x544A, PQI_HWIF_SRCV, "ZTE SmartROC3100 RS242-18i 4G"}, + {0x9005, 0x028f, 0x1cf2, 0x544D, PQI_HWIF_SRCV, "ZTE SmartROC3100 RM241B-18i 2G"}, + {0x9005, 0x028f, 0x1cf2, 0x544E, PQI_HWIF_SRCV, "ZTE SmartROC3100 RM242B-18i 4G"}, + {0x9005, 0x028f, 0x1bd4, 0x006F, PQI_HWIF_SRCV, "RS0804M5R16i"}, + {0x9005, 0x028f, 0x1ff9, 0x006F, PQI_HWIF_SRCV, "RS0804M5R16i"}, + {0x9005, 0x028f, 0x1f51, 0x1010, PQI_HWIF_SRCV, "SmartRAID P7504N-16i"}, + + + + /* (MSCC PM8237 24x12G based) */ + {0x9005, 0x028f, 0x103c, 0x1100, PQI_HWIF_SRCV, "P816i-a SR Gen10"}, + {0x9005, 0x028f, 0x103c, 0x1101, PQI_HWIF_SRCV, "P416ie-m SR G10"}, + + /* (MSCC PM8238 16x12G based) */ + {0x9005, 0x028f, 0x152d, 0x8a23, PQI_HWIF_SRCV, "QS-8238-16i"}, + {0x9005, 0x028f, 0x9005, 0x1280, PQI_HWIF_SRCV, "HBA 1100-16i"}, + {0x9005, 0x028f, 0x9005, 0x1281, PQI_HWIF_SRCV, "HBA 1100-16e"}, + {0x9005, 0x028f, 0x105b, 0x1211, PQI_HWIF_SRCV, "8238-16i"}, + {0x9005, 0x028f, 0x1bd4, 0x0048, PQI_HWIF_SRCV, "SMART-HBA 8238-16i"}, + {0x9005, 0x028f, 0x1ff9, 0x0048, PQI_HWIF_SRCV, "SMART-HBA 8238-16i"}, + {0x9005, 0x028f, 0x9005, 0x1282, PQI_HWIF_SRCV, "SmartHBA 2100-16i"}, + {0x9005, 0x028f, 0x1d8d, 0x916, PQI_HWIF_SRCV, "Fiberhome SmartHBA AIS-8238-16i"}, + {0x9005, 0x028f, 0x1458, 0x1000, PQI_HWIF_SRCV, "GIGABYTE SmartHBA CLN1832"}, + {0x9005, 0x028f, 0x1cf2, 0x0B29, PQI_HWIF_SRCV, "ZTE SmartIOC2100 SDPSA/B_I-18i"}, + {0x9005, 0x028f, 0x1cf2, 0x5447, PQI_HWIF_SRCV, "ZTE SmartIOC2100 RM243-18i"}, + {0x9005, 0x028f, 0x1cf2, 0x544B, PQI_HWIF_SRCV, "ZTE SmartIOC2100 RS243-18i"}, + {0x9005, 0x028f, 0x1cf2, 0x544F, PQI_HWIF_SRCV, "ZTE SmartIOC2100 RM243B-18i"}, + {0x9005, 0x028f, 0x1bd4, 0x0071, PQI_HWIF_SRCV, "RS0800M5H16i"}, + {0x9005, 0x028f, 0x1bd4, 0x0072, PQI_HWIF_SRCV, "RS0800M5E16i"}, + {0x9005, 0x028f, 0x1ff9, 0x0071, PQI_HWIF_SRCV, "RS0800M5H16i"}, + {0x9005, 0x028f, 0x1ff9, 0x0072, PQI_HWIF_SRCV, "RS0800M5E16i"}, + {0x9005, 0x028f, 0x1018, 0x8238, PQI_HWIF_SRCV, "Ramaxel SmartHBA RX8238-16i"}, + + /* (MSCC PM8240 24x12G based) */ + {0x9005, 0x028f, 0x152d, 0x8a36, PQI_HWIF_SRCV, "QS-8240-24i"}, + {0x9005, 0x028f, 0x9005, 0x1200, PQI_HWIF_SRCV, "SmartRAID 3154-24i"}, + {0x9005, 0x028f, 0x9005, 0x1201, PQI_HWIF_SRCV, "SmartRAID 3154-8i16e"}, + {0x9005, 0x028f, 0x9005, 0x1202, PQI_HWIF_SRCV, "SmartRAID 3154-8i8e"}, + {0x9005, 0x028f, 0x1bd4, 0x0047, PQI_HWIF_SRCV, "RAID 8240-24i"}, + {0x9005, 0x028f, 0x1ff9, 0x0047, PQI_HWIF_SRCV, "RAID 8240-24i"}, + {0x9005, 0x028f, 0x1dfc, 0x3161, PQI_HWIF_SRCV, "NTCOM SAS3 RAID-24i"}, + {0x9005, 0x028f, 0x1F0C, 0x3161, PQI_HWIF_SRCV, "NT RAID 3100-24i"}, + + /* Huawei ID's */ + {0x9005, 0x028f, 0x19e5, 0xd227, PQI_HWIF_SRCV, "SR465C-M 4G"}, + {0x9005, 0x028f, 0x19e5, 0xd22a, PQI_HWIF_SRCV, "SR765-M"}, + {0x9005, 0x028f, 0x19e5, 0xd228, PQI_HWIF_SRCV, "SR455C-M 2G"}, + {0x9005, 0x028f, 0x19e5, 0xd22c, PQI_HWIF_SRCV, "SR455C-M 4G"}, + {0x9005, 0x028f, 0x19e5, 0xd229, PQI_HWIF_SRCV, "SR155-M"}, + {0x9005, 0x028f, 0x19e5, 0xd22b, PQI_HWIF_SRCV, "SR455C-ME 4G"}, + + /* (MSCC PM8252 8x12G based) */ + {0x9005, 0x028f, 0x193d, 0x110b, PQI_HWIF_SRCV, "UN HBA H4508-Mf-8i"}, + {0x9005, 0x028f, 0x1bd4, 0x0052, PQI_HWIF_SRCV, "MT0801M6E"}, + {0x9005, 0x028f, 0x1bd4, 0x0054, PQI_HWIF_SRCV, "MT0800M6H"}, + {0x9005, 0x028f, 0x1bd4, 0x0086, PQI_HWIF_SRCV, "RT0800M7E"}, + {0x9005, 0x028f, 0x1bd4, 0x0087, PQI_HWIF_SRCV, "RT0800M7H"}, + {0x9005, 0x028f, 0x1ff9, 0x0052, PQI_HWIF_SRCV, "MT0801M6E"}, + {0x9005, 0x028f, 0x1ff9, 0x0054, PQI_HWIF_SRCV, "MT0800M6H"}, + {0x9005, 0x028f, 0x1BD4, 0x00a3, PQI_HWIF_SRCV, "RT0800M6E2i"}, + {0x9005, 0x028f, 0x1ff9, 0x00a3, PQI_HWIF_SRCV, "RT0800M6E2i"}, + {0x9005, 0x028f, 0x1ff9, 0x0086, PQI_HWIF_SRCV, "RT0800M7E"}, + {0x9005, 0x028f, 0x1ff9, 0x0087, PQI_HWIF_SRCV, "RT0800M7H"}, + {0x9005, 0x028f, 0x1f51, 0x1001, PQI_HWIF_SRCV, "SmartHBA P6600-8i"}, + {0x9005, 0x028f, 0x1f51, 0x1003, PQI_HWIF_SRCV, "SmartHBA P6600-8e"}, + {0x9005, 0x028f, 0x9005, 0x1460, PQI_HWIF_SRCV, "HBA 1200"}, + {0x9005, 0x028f, 0x9005, 0x1461, PQI_HWIF_SRCV, "SmartHBA 2200"}, + {0x9005, 0x028f, 0x9005, 0x1462, PQI_HWIF_SRCV, "HBA 1200-8i"}, + {0x9005, 0x028f, 0x1d49, 0x0222, PQI_HWIF_SRCV, "4450-8i HBA"}, + {0x9005, 0x028f, 0x207d, 0x4044, PQI_HWIF_SRCV, "HRDT TrustHBA H4100-8i"}, + {0x9005, 0x028f, 0x207d, 0x4054, PQI_HWIF_SRCV, "HRDT TrustHBA H4100-8e"}, + + /* (MSCC PM8254 32x12G based) */ + {0x9005, 0x028f, 0x1bd4, 0x0051, PQI_HWIF_SRCV, "MT0804M6R"}, + {0x9005, 0x028f, 0x1bd4, 0x0053, PQI_HWIF_SRCV, "MT0808M6R"}, + {0x9005, 0x028f, 0x1bd4, 0x0088, PQI_HWIF_SRCV, "RT0804M7R"}, + {0x9005, 0x028f, 0x1bd4, 0x0089, PQI_HWIF_SRCV, "RT0808M7R"}, + {0x9005, 0x028f, 0x1ff9, 0x0051, PQI_HWIF_SRCV, "MT0804M6R"}, + {0x9005, 0x028f, 0x1ff9, 0x0053, PQI_HWIF_SRCV, "MT0808M6R"}, + {0x9005, 0x028f, 0x1ff9, 0x0088, PQI_HWIF_SRCV, "RT0804M7R"}, + {0x9005, 0x028f, 0x1ff9, 0x0089, PQI_HWIF_SRCV, "RT0808M7R"}, + {0x9005, 0x028f, 0x1f51, 0x1002, PQI_HWIF_SRCV, "SmartRAID P7604-8i"}, + {0x9005, 0x028f, 0x1f51, 0x1004, PQI_HWIF_SRCV, "SmartRAID P7604-8e"}, + {0x9005, 0x028f, 0x1f51, 0x100f, PQI_HWIF_SRCV, "SmartRAID P7604N-8i"}, + {0x9005, 0x028f, 0x9005, 0x14a0, PQI_HWIF_SRCV, "SmartRAID 3254-8i"}, + {0x9005, 0x028f, 0x9005, 0x14a1, PQI_HWIF_SRCV, "SmartRAID 3204-8i"}, + {0x9005, 0x028f, 0x9005, 0x14a2, PQI_HWIF_SRCV, "SmartRAID 3252-8i"}, + {0x9005, 0x028f, 0x9005, 0x14a4, PQI_HWIF_SRCV, "SmartRAID 3254-8i /e"}, + {0x9005, 0x028f, 0x9005, 0x14a5, PQI_HWIF_SRCV, "SmartRAID 3252-8i /e"}, + {0x9005, 0x028f, 0x9005, 0x14a6, PQI_HWIF_SRCV, "SmartRAID 3204-8i /e"}, + {0x9005, 0x028f, 0x1d49, 0x0624, PQI_HWIF_SRCV, "9450-8i 4GB Flash"}, + + /* (MSCC PM8262 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x14c0, PQI_HWIF_SRCV, "SmartHBA 2200-16i"}, + {0x9005, 0x028f, 0x9005, 0x14c1, PQI_HWIF_SRCV, "HBA 1200-16i"}, + {0x9005, 0x028f, 0x9005, 0x14c3, PQI_HWIF_SRCV, "HBA 1200-16e"}, + {0x9005, 0x028f, 0x9005, 0x14c4, PQI_HWIF_SRCV, "HBA 1200-8e"}, + {0x9005, 0x028f, 0x1f51, 0x1005, PQI_HWIF_SRCV, "SmartHBA P6600-16i"}, + {0x9005, 0x028f, 0x1f51, 0x1007, PQI_HWIF_SRCV, "SmartHBA P6600-8i8e"}, + {0x9005, 0x028f, 0x1f51, 0x1009, PQI_HWIF_SRCV, "SmartHBA P6600-16e"}, + {0x9005, 0x028f, 0x1cf2, 0x54dc, PQI_HWIF_SRCV, "ZTE SmartIOC2200 RM346-16i"}, + {0x9005, 0x028f, 0x1cf2, 0x0806, PQI_HWIF_SRCV, "ZTE SmartIOC2200 RS346-16i"}, + {0x9005, 0x028f, 0x1d49, 0x0223, PQI_HWIF_SRCV, "4450-16i HBA"}, + {0x9005, 0x028f, 0x1d49, 0x0224, PQI_HWIF_SRCV, "4450-8e HBA"}, + {0x9005, 0x028f, 0x1d49, 0x0225, PQI_HWIF_SRCV, "4450-16e HBA"}, + {0x9005, 0x028f, 0x1d49, 0x0521, PQI_HWIF_SRCV, "5450-16i"}, + {0x9005, 0x028f, 0x207d, 0x4084, PQI_HWIF_SRCV, "HRDT TrustHBA H4100-16i"}, + {0x9005, 0x028f, 0x207d, 0x4094, PQI_HWIF_SRCV, "HRDT TrustHBA H4100-16e"}, + + /* (MSCC PM8264 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x14b0, PQI_HWIF_SRCV, "SmartRAID 3254-16i"}, + {0x9005, 0x028f, 0x9005, 0x14b1, PQI_HWIF_SRCV, "SmartRAID 3258-16i"}, + {0x9005, 0x028f, 0x1f51, 0x1006, PQI_HWIF_SRCV, "SmartRAID P7608-16i"}, + {0x9005, 0x028f, 0x1f51, 0x1008, PQI_HWIF_SRCV, "SmartRAID P7608-8i8e"}, + {0x9005, 0x028f, 0x1f51, 0x100a, PQI_HWIF_SRCV, "SmartRAID P7608-16e"}, + {0x9005, 0x028f, 0x1cf2, 0x54da, PQI_HWIF_SRCV, "ZTE SmartROC3200 RM344-16i 4G"}, + {0x9005, 0x028f, 0x1cf2, 0x54db, PQI_HWIF_SRCV, "ZTE SmartROC3200 RM345-16i 8G"}, + {0x9005, 0x028f, 0x1cf2, 0x0804, PQI_HWIF_SRCV, "ZTE SmartROC3200 RS344-16i 4G"}, + {0x9005, 0x028f, 0x1cf2, 0x0805, PQI_HWIF_SRCV, "ZTE SmartROC3200 RS345-16i 8G"}, + {0x9005, 0x028f, 0x1f51, 0x100e, PQI_HWIF_SRCV, "SmartRAID P7604N-16i"}, + {0x9005, 0x028f, 0x1d49, 0x0625, PQI_HWIF_SRCV, "9450-16i 4GB Flash"}, + {0x9005, 0x028f, 0x1d49, 0x0626, PQI_HWIF_SRCV, "9450-16i 8GB Flash"}, + + /* (MSCC PM8265 16x12G based) */ + {0x9005, 0x028f, 0x1590, 0x02dc, PQI_HWIF_SRCV, "SR416i-a Gen10+"}, + {0x9005, 0x028f, 0x9005, 0x1470, PQI_HWIF_SRCV, "SmartRAID 3200"}, + {0x9005, 0x028f, 0x9005, 0x1471, PQI_HWIF_SRCV, "SmartRAID 3254-16i /e"}, + {0x9005, 0x028f, 0x9005, 0x1472, PQI_HWIF_SRCV, "SmartRAID 3258-16i /e"}, + {0x9005, 0x028f, 0x9005, 0x1473, PQI_HWIF_SRCV, "SmartRAID 3284-16io /e/uC"}, + {0x9005, 0x028f, 0x9005, 0x1474, PQI_HWIF_SRCV, "SmartRAID 3254-16io /e"}, + {0x9005, 0x028f, 0x9005, 0x1475, PQI_HWIF_SRCV, "SmartRAID 3254-16e /e"}, + + /* (MSCC PM8266 16x12G based) */ + {0x9005, 0x028f, 0x1014, 0x0718, PQI_HWIF_SRCV, "IBM 4-Port 24G SAS"}, + {0x9005, 0x028f, 0x9005, 0x1490, PQI_HWIF_SRCV, "HBA 1200p Ultra"}, + {0x9005, 0x028f, 0x9005, 0x1491, PQI_HWIF_SRCV, "SmartHBA 2200p Ultra"}, + {0x9005, 0x028f, 0x9005, 0x1402, PQI_HWIF_SRCV, "HBA Ultra 1200P-16i"}, + {0x9005, 0x028f, 0x9005, 0x1441, PQI_HWIF_SRCV, "HBA Ultra 1200P-32i"}, + {0x9005, 0x028f, 0x1137, 0x0300, PQI_HWIF_SRCV, "Cisco 24G TriMode M1 HBA LFF 32D UCSC-HBAMP1LL32"}, + + /* (MSCC PM8268 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x14d0, PQI_HWIF_SRCV, "SmartRAID Ultra 3258P-16i"}, + + /* (MSCC PM8269 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x1400, PQI_HWIF_SRCV, "SmartRAID Ultra 3258P-16i /e"}, + {0x9005, 0x028f, 0x1ff9, 0x00a1, PQI_HWIF_SRCV, "RT1608M6R16i"}, + + /* (MSCC PM8270 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x1410, PQI_HWIF_SRCV, "HBA Ultra 1200P-16e"}, + {0x9005, 0x028f, 0x9005, 0x1411, PQI_HWIF_SRCV, "HBA 1200 Ultra"}, + {0x9005, 0x028f, 0x9005, 0x1412, PQI_HWIF_SRCV, "SmartHBA 2200 Ultra"}, + {0x9005, 0x028f, 0x9005, 0x1463, PQI_HWIF_SRCV, "SmartHBA 2200-8io /e"}, + {0x9005, 0x028f, 0x9005, 0x14c2, PQI_HWIF_SRCV, "SmartHBA 2200-16io /e"}, + {0x9005, 0x028f, 0x1337, 0x02fa, PQI_HWIF_SRCV, "Cisco 24G TriMode M1 HBA 16D UCSC-HBA-M1L16"}, + + /* (MSCC PM8271 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x14e0, PQI_HWIF_SRCV, "SmartIOC PM8271"}, + + /* (MSCC PM8272 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x1420, PQI_HWIF_SRCV, "SmartRAID Ultra 3254-16e"}, + {0x9005, 0x028f, 0x1d49, 0x0628, PQI_HWIF_SRCV, "9450-16e 4GB Flash"}, + + /* (MSCC PM8273 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x1430, PQI_HWIF_SRCV, "SmartRAID Ultra 3254-16e /e"}, + {0x9005, 0x028f, 0x1137, 0x02f9, PQI_HWIF_SRCV, "Cisco 24G TriMode M1 RAID 4GB FBWC 16D UCSC-RAID-M1L16"}, + {0x9005, 0x028f, 0x1137, 0x02ff, PQI_HWIF_SRCV, "Cisco 24G TriMode M1 RAID 4GB FBWC 6D UCSX-RAID-M1L6"}, + + /* (MSCC PM8274 16x12G based) */ + {0x9005, 0x028f, 0x1e93, 0x1000, PQI_HWIF_SRCV, "ByteHBA JGH43024-8"}, + {0x9005, 0x028f, 0x1e93, 0x1001, PQI_HWIF_SRCV, "ByteHBA JGH43034-8"}, + {0x9005, 0x028f, 0x1e93, 0x1005, PQI_HWIF_SRCV, "ByteHBA JGH43014-8"}, + {0x9005, 0x028f, 0x1f51, 0x100B, PQI_HWIF_SRCV, "SmartHBA P6600-24i"}, + + /* (MSCC PM8275 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x14f0, PQI_HWIF_SRCV, "SmartIOC PM8275"}, + + /* (MSCC PM8276 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x1480, PQI_HWIF_SRCV, "SmartRAID 3200 Ultra"}, + {0x9005, 0x028f, 0x1e93, 0x1002, PQI_HWIF_SRCV, "ByteHBA JGH44014-8"}, + + /* (MSCC PM8277 16x12G based) */ + {0x9005, 0x028f, 0x1137, 0x02f8, PQI_HWIF_SRCV, "Cisco 24G TriMode M1 RAID 4GB FBWC 32D UCSC-RAID-MP1L32"}, + + /* (MSCC PM8278 16x12G based) */ + {0x9005, 0x028f, 0x9005, 0x1440, PQI_HWIF_SRCV, "SmartRAID Ultra 3258P-32i"}, + {0x9005, 0x028f, 0x1d49, 0x0627, PQI_HWIF_SRCV, "9450-32i 8GB Flash"}, + + /* (MSCC PM8279 32x12G based) */ + {0x9005, 0x028f, 0x9005, 0x1450, PQI_HWIF_SRCV, "SmartRAID Ultra 3258P-32i /e"}, + {0x9005, 0x028f, 0x1590, 0x0294, PQI_HWIF_SRCV, "SR932i-p Gen10+"}, + {0x9005, 0x028f, 0x1590, 0x0381, PQI_HWIF_SRCV, "SR932i-p Gen11"}, + {0x9005, 0x028f, 0x1590, 0x0382, PQI_HWIF_SRCV, "SR308i-p Gen11"}, + {0x9005, 0x028f, 0x1590, 0x0383, PQI_HWIF_SRCV, "SR308i-o Gen11"}, + {0x9005, 0x028f, 0x1590, 0x02db, PQI_HWIF_SRCV, "SR416ie-m Gen11"}, + {0x9005, 0x028f, 0x1590, 0x032e, PQI_HWIF_SRCV, "SR416i-o Gen11"}, + {0x9005, 0x028f, 0x9005, 0x1452, PQI_HWIF_SRCV, "SmartRAID 3200p Ultra"}, + {0x9005, 0x028f, 0x1137, 0x02fe, PQI_HWIF_SRCV, "Cisco 24G TriMode M1 RAID LFF 32D UCSC-RAIDMP1LL32"}, + + /* (MSCC HBA/SMARTHBA/CFF SmartRAID - Lenovo 8X12G 16X12G based) */ + {0x9005, 0x028f, 0x1d49, 0x0220, PQI_HWIF_SRCV, "4350-8i SAS/SATA HBA"}, + {0x9005, 0x028f, 0x1d49, 0x0221, PQI_HWIF_SRCV, "4350-16i SAS/SATA HBA"}, + {0x9005, 0x028f, 0x1d49, 0x0520, PQI_HWIF_SRCV, "5350-8i"}, + {0x9005, 0x028f, 0x1d49, 0x0522, PQI_HWIF_SRCV, "5350-8i INTR"}, + {0x9005, 0x028f, 0x1d49, 0x0620, PQI_HWIF_SRCV, "9350-8i 2GB Flash"}, + {0x9005, 0x028f, 0x1d49, 0x0621, PQI_HWIF_SRCV, "9350-8i 2GB Flash INTR"}, + {0x9005, 0x028f, 0x1d49, 0x0622, PQI_HWIF_SRCV, "9350-16i 4GB Flash"}, + {0x9005, 0x028f, 0x1d49, 0x0623, PQI_HWIF_SRCV, "9350-16i 4GB Flash INTR"}, + + {0, 0, 0, 0, 0, 0} +}; + +struct pqi_ident +pqi_family_identifiers[] = { + {0x9005, 0x028f, 0, 0, PQI_HWIF_SRCV, "Smart Array Storage Controller"}, + {0, 0, 0, 0, 0, 0} +}; diff --git a/sys/dev/smartpqi/smartpqi_defines.h b/sys/dev/smartpqi/smartpqi_defines.h index bb0bb2b709aa..fe2edf7a74a9 100644 --- a/sys/dev/smartpqi/smartpqi_defines.h +++ b/sys/dev/smartpqi/smartpqi_defines.h @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2023 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -927,7 +927,7 @@ typedef struct pqi_pci_info typedef struct _driver_info { unsigned char major_version; - unsigned long minor_version; + unsigned char minor_version; unsigned char release_version; unsigned long build_revision; unsigned long max_targets; @@ -938,9 +938,13 @@ typedef struct _driver_info typedef uint8_t *passthru_buf_type_t; #define PQISRC_DRIVER_MAJOR __FreeBSD__ -#define PQISRC_DRIVER_MINOR 4410 +#if __FreeBSD__ <= 14 +#define PQISRC_DRIVER_MINOR 4660 +#else +#define PQISRC_DRIVER_MINOR 0 +#endif #define PQISRC_DRIVER_RELEASE 0 -#define PQISRC_DRIVER_REVISION 2005 +#define PQISRC_DRIVER_REVISION 2002 #define STR(s) # s #define PQISRC_VERSION(a, b, c, d) STR(a.b.c-d) @@ -1234,19 +1238,21 @@ typedef struct sema OS_SEMA_LOCK_T; /* Debug facility */ -#define PQISRC_FLAGS_MASK 0x0000ffff -#define PQISRC_FLAGS_INIT 0x00000001 -#define PQISRC_FLAGS_INFO 0x00000002 -#define PQISRC_FLAGS_FUNC 0x00000004 -#define PQISRC_FLAGS_TRACEIO 0x00000008 -#define PQISRC_FLAGS_DISC 0x00000010 -#define PQISRC_FLAGS_WARN 0x00000020 -#define PQISRC_FLAGS_ERROR 0x00000040 -#define PQISRC_FLAGS_NOTE 0x00000080 +#define PQISRC_FLAGS_MASK 0x0000000000ff +#define PQISRC_FLAGS_INIT 0x0001 +#define PQISRC_FLAGS_INFO 0x0002 +#define PQISRC_FLAGS_FUNC 0x0004 +#define PQISRC_FLAGS_TRACEIO 0x0008 +#define PQISRC_FLAGS_DISC 0x0010 +#define PQISRC_FLAGS_WARN 0x0020 +#define PQISRC_FLAGS_ERROR 0x0040 +#define PQISRC_FLAGS_NOTE 0x0080 -#define PQISRC_LOG_LEVEL (PQISRC_FLAGS_WARN | PQISRC_FLAGS_ERROR | PQISRC_FLAGS_NOTE) +#define PQISRC_LOG_LEVEL (PQISRC_FLAGS_WARN | PQISRC_FLAGS_ERROR) -static int logging_level = PQISRC_LOG_LEVEL; +extern unsigned long logging_level; + +#define DBG_SET_LOGGING_LEVEL(value) logging_level = value & PQISRC_FLAGS_MASK #define DBG_INIT(fmt,args...) \ do { \ @@ -1276,13 +1282,6 @@ static int logging_level = PQISRC_LOG_LEVEL; } \ }while(0); -#define DBG_TRACEIO(fmt,args...) \ - do { \ - if (logging_level & PQISRC_FLAGS_TRACEIO) { \ - printf("[TRACEIO]:[ %s ] [ %d ]"fmt,__func__,__LINE__,##args); \ - } \ - }while(0); - #define DBG_WARN(fmt,args...) \ do { \ if (logging_level & PQISRC_FLAGS_WARN) { \ diff --git a/sys/dev/smartpqi/smartpqi_discovery.c b/sys/dev/smartpqi/smartpqi_discovery.c index ac37c2233762..a7de5a149810 100644 --- a/sys/dev/smartpqi/smartpqi_discovery.c +++ b/sys/dev/smartpqi/smartpqi_discovery.c @@ -1,5 +1,5 @@ /*- - * Copyright 2016-2023 Microchip Technology, Inc. and/or its subsidiaries. + * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -189,7 +189,7 @@ pqisrc_set_btl(pqi_scsi_dev_t *device, int bus, int target, int lun) * devices and multi-lun devices */ boolean_t pqisrc_add_softs_entry(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device, - uint8_t *scsi3addr) + uint8_t const *scsi3addr) { /* Add physical devices with targets that need * targets */ @@ -269,7 +269,7 @@ pqisrc_add_softs_entry(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device, } } DBG_ERR("The device is not a physical, lun or ptraid device" - "B %d: T %d: L %d\n", device->bus, device->target, + "B%d:T%d:L%d\n", device->bus, device->target, device->lun ); return false; @@ -283,7 +283,7 @@ add_device_to_dev_list: softs->dev_list[j] = device; break; } - DBG_NOTE("Added device [%d of %d]: B %d: T %d: L %d\n", + DBG_NOTE("Added device [%d of %d]: B%d:T%d:L%d\n", j, softs->num_devs, device->bus, device->target, device->lun); return true; @@ -307,7 +307,6 @@ pqisrc_find_btl_list_index(pqisrc_softstate_t *softs, if(bus == softs->bus_id && target == temp_device->target && lun == temp_device->lun){ - DBG_DISC("Returning device list index %d\n", index); return index; } @@ -322,7 +321,7 @@ pqisrc_find_btl_list_index(pqisrc_softstate_t *softs, /* Return a given index for a specific device within the * softs dev_list */ int -pqisrc_find_device_list_index(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) +pqisrc_find_device_list_index(pqisrc_softstate_t *softs, pqi_scsi_dev_t const *device) { int index; @@ -346,7 +345,7 @@ pqisrc_find_device_list_index(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) /* Delete a given device from the softs dev_list*/ int -pqisrc_delete_softs_entry(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) +pqisrc_delete_softs_entry(pqisrc_softstate_t *softs, pqi_scsi_dev_t const *device) { int index; @@ -354,8 +353,8 @@ pqisrc_delete_softs_entry(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) if (0 <= index && index < MAX_TARGET_BIT) { softs->dev_list[index] = NULL; softs->num_devs--; - DBG_NOTE("Removing device : B %d: T %d: L %d positioned at %d\n", - device->bus, device->target, device->lun, softs->num_devs); + DBG_NOTE("Removing device: B%d:T%d:L%d positioned at %d\n", + device->bus, device->target, device->lun, index); return PQI_STATUS_SUCCESS; } if (index == INVALID_ELEM) { @@ -414,7 +413,7 @@ pqisrc_build_send_raid_request(pqisrc_softstate_t *softs, struct dma_mem device_ int ret = PQI_STATUS_SUCCESS; ib_queue_t *ib_q = &softs->op_raid_ib_q[PQI_DEFAULT_IB_QUEUE]; - ob_queue_t *ob_q = &softs->op_ob_q[PQI_DEFAULT_IB_QUEUE]; + ob_queue_t const *ob_q = &softs->op_ob_q[PQI_DEFAULT_IB_QUEUE]; rcb_t *rcb = NULL; @@ -740,13 +739,13 @@ pqisrc_get_phys_log_device_list(pqisrc_softstate_t *softs, ret = pqisrc_get_physical_logical_luns(softs, SA_REPORT_PHYS, physical_dev_list, phys_data_length); if (ret) { - DBG_ERR("report physical LUNs failed"); + DBG_ERR("report physical LUNs failed\n"); return ret; } ret = pqisrc_get_physical_logical_luns(softs, SA_REPORT_LOG, logical_dev_list, log_data_length); if (ret) { - DBG_ERR("report logical LUNs failed"); + DBG_ERR("report logical LUNs failed\n"); return ret; } @@ -763,7 +762,7 @@ pqisrc_get_phys_log_device_list(pqisrc_softstate_t *softs, ret = pqisrc_get_queue_lun_list(softs, PQI_LOG_EXT_QUEUE_ENABLE, queue_dev_list, queue_data_length); if (ret) { - DBG_ERR("report logical LUNs failed"); + DBG_ERR("report logical LUNs failed\n"); return ret; } @@ -808,13 +807,13 @@ pqisrc_get_phys_log_device_list(pqisrc_softstate_t *softs, } inline boolean_t -pqisrc_is_external_raid_device(pqi_scsi_dev_t *device) +pqisrc_is_external_raid_device(pqi_scsi_dev_t const *device) { return device->is_external_raid_device; } static inline boolean_t -pqisrc_is_external_raid_addr(uint8_t *scsi3addr) +pqisrc_is_external_raid_addr(uint8_t const *scsi3addr) { return scsi3addr[2] != 0; } @@ -940,12 +939,12 @@ out: /* Validate the RAID map parameters */ static int pqisrc_raid_map_validation(pqisrc_softstate_t *softs, - pqi_scsi_dev_t *device, pqisrc_raid_map_t *raid_map) + pqi_scsi_dev_t const *device, pqisrc_raid_map_t *raid_map) { char *error_msg; uint32_t raidmap_size; uint32_t r5or6_blocks_per_row; -/* unsigned phys_dev_num; */ + /* unsigned phys_dev_num; */ DBG_FUNC("IN\n"); @@ -1033,7 +1032,7 @@ pqisrc_get_device_raidmap(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) if (raidmap_reported_size <= raidmap_alloc_size) break; - DBG_NOTE("Raid map is larger than 1024 entries, request once again"); + DBG_NOTE("Raid map is larger than 1024 entries, request once again\n"); os_mem_free(softs, (char*)raid_map, raidmap_alloc_size); raidmap_alloc_size = raidmap_reported_size; @@ -1331,7 +1330,7 @@ pqisrc_get_physical_device_info(pqisrc_softstate_t *softs, /* Function used to find the entry of the device in a list */ static device_status_t pqisrc_scsi_find_entry(pqisrc_softstate_t *softs, - pqi_scsi_dev_t *device_to_find, pqi_scsi_dev_t **same_device) + pqi_scsi_dev_t const *device_to_find, pqi_scsi_dev_t **same_device) { pqi_scsi_dev_t *device; int i; @@ -1361,7 +1360,7 @@ pqisrc_scsi_find_entry(pqisrc_softstate_t *softs, /* Update the newly added devices as existed device */ static void -pqisrc_exist_device_update(pqisrc_softstate_t *softs, +pqisrc_exist_device_update(pqisrc_softstate_t const *softs, pqi_scsi_dev_t *device_exist, pqi_scsi_dev_t *new_device) { DBG_FUNC("IN\n"); @@ -1395,15 +1394,13 @@ pqisrc_exist_device_update(pqisrc_softstate_t *softs, device_exist->offload_config = new_device->offload_config; device_exist->offload_enabled_pending = new_device->offload_enabled_pending; - if (device_exist->offload_to_mirror) - os_mem_free(softs, - (int *) device_exist->offload_to_mirror, - sizeof(*(device_exist->offload_to_mirror))); + if (device_exist->offload_to_mirror) { + device_exist->temp_offload_to_mirror = device_exist->offload_to_mirror; + } device_exist->offload_to_mirror = new_device->offload_to_mirror; - if (device_exist->raid_map) - os_mem_free(softs, - (char *)device_exist->raid_map, - sizeof(*device_exist->raid_map)); + if (device_exist->raid_map) { + device_exist->temp_raid_map = device_exist->raid_map; + } device_exist->raid_map = new_device->raid_map; /* To prevent these from being freed later. */ new_device->raid_map = NULL; @@ -1416,7 +1413,7 @@ static int pqisrc_add_device(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) { DBG_FUNC("IN\n"); - DBG_NOTE("vendor: %s model: %s bus:%d target:%d lun:%d is_physical_device:0x%x expose_device:0x%x volume_offline 0x%x volume_status 0x%x \n", + DBG_NOTE("vendor: %s model: %s B%d:T%d:L%d is_physical_device:0x%x expose_device:0x%x volume_offline 0x%x volume_status 0x%x \n", device->vendor, device->model, device->bus, device->target, device->lun, device->is_physical_device, device->expose_device, device->volume_offline, device->volume_status); device->invalid = false; @@ -1439,7 +1436,7 @@ void *** 1705 LINES SKIPPED *** From nobody Fri Jan 9 18:29:56 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnr0h6sPbz6B3HN for ; Fri, 09 Jan 2026 18:29:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnr0h69KQz476H for ; Fri, 09 Jan 2026 18:29:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767983396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=out6SKl1N1zMoAsxFwgfg1gfEPNcWXP68OzZqWHaGO4=; b=M2Fig/pf/Fx/JwO+W5GkYrXADqMfh3qb9fYQmtedgnWs98z6sDzuAItRGyUyuIc199ha5S jGgF34E7PbMbxubDbXfM7i4cKcvVwnQsYcZJpUxg1tmksU8oWnEBanHteLogU8YjP6lMwr mWBMhr9B66XWVvgyvLINul21cM+Zk9F5r1ntwci7NMIocoSNlQLMSS7eoDM5OzG8uZN+UX ohmn3QLr6kb4OqdGE1/4w0yoRw+TavB5zVlP7BfBp9/WuW0PU0yPY6LW+JSFhNqybhGTRf eAxhfUCicG4ZCTh+nek/cXoRtfunOcoW6hHYAp4xRXhnXZG4U9PnId4IAX5MKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767983396; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=out6SKl1N1zMoAsxFwgfg1gfEPNcWXP68OzZqWHaGO4=; b=Bf4YbOl9oRCLGy2tBekc69UENZaLuwIWlDvRDV9gYCxBIX+DUC8fgFPcefqtGRKyc8cdMz o9ff3bizC6Dp6OLrCQnC77zTBmLV41KtxOjXrc59b35cYGENGhtknKZBzhnx7yhxgVPFgc wr5UH7ARDi9HY2dfwAgdHflKVAWlUZX225ije7yWPsQjDdZyICLDh9Nq1dg4kZnvRAqf71 KKi2XlK1WSPlPa1pGVPbN+GGPh15G5Wioho2KvuSV3niF2oIt7yX7G1HSeTXSeQS6ULwOz EgYJYF2SWDXl/YOHYLMxfidL/KhumY3ZZ4Y8Cv4F8OY45Erz91aLSFO43fWQYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767983396; a=rsa-sha256; cv=none; b=hpqWF4R8gC4pIyq7WczUYFB7/DPufHrDT1bDBpbt+DVn80L2vefVMJ56F1YIYP13dNlZ4v Z+jjF/Z4Kj6knM9QppmOkBTw8eAZ7eRX8WV7WgBrF5Qi9GAggVsxWKywT5QnL+DE+wsode MYa2AFkvFaoojvDlfjVjs7rfhvDjeI3YtuXVLmbHKEoTcSAsymw9jU/td2zIEbIlVr4Q7a Tc9bkNVBedg3fXwT+dfcSse9pQ+2Z9FT6uc3sdpCKCVZ+5rDnC4iUgCtmddFxfw1LQaSm8 AYzWH4YCARtBd3yq/ZQ6FPofGpT0GQHX2IsOWpgotRrjjPpkVvgbRYVRwzfW8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnr0h5mrfz4l9 for ; Fri, 09 Jan 2026 18:29:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d315 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 18:29:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Juraj Lutter Subject: git: bbd0d925e4be - stable/15 - freebsd-base.7: Fix stray -r List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: otis X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: bbd0d925e4beedcd0485c1f92112b33a9b8a88b5 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 18:29:56 +0000 Message-Id: <69614924.3d315.50ca1132@gitrepo.freebsd.org> The branch stable/15 has been updated by otis: URL: https://cgit.FreeBSD.org/src/commit/?id=bbd0d925e4beedcd0485c1f92112b33a9b8a88b5 commit bbd0d925e4beedcd0485c1f92112b33a9b8a88b5 Author: Juraj Lutter AuthorDate: 2026-01-09 09:41:21 +0000 Commit: Juraj Lutter CommitDate: 2026-01-09 18:24:27 +0000 freebsd-base.7: Fix stray -r Remote stray "-r" from the example of installing a toolchain to alternate root. Reviewed by: ivy Differential Revision: https://reviews.freebsd.org/D54611 (cherry picked from commit a556feb99765a8eae96b2077067dd482c9dd3f57) --- share/man/man7/freebsd-base.7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man7/freebsd-base.7 b/share/man/man7/freebsd-base.7 index 07cd7ab5656c..9b2d60fffa67 100644 --- a/share/man/man7/freebsd-base.7 +++ b/share/man/man7/freebsd-base.7 @@ -186,7 +186,7 @@ alternate root (for example, to support cross-compiling software for a different target than the host system): .Bd -literal -offset indent pkg -r /ppcdev -oABI=FreeBSD:16:powerpc64le \e - install -r FreeBSD-set-devel + install FreeBSD-set-devel .Ed .Sh SEE ALSO .Xr build 7 , From nobody Fri Jan 9 18:50:01 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnrRt0vfrz6B41J for ; Fri, 09 Jan 2026 18:50:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnrRs5JmTz49KX for ; Fri, 09 Jan 2026 18:50:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767984601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZL9yTmGfZvzE/eFJNmXMTS7Hu7d2pJITDfitdUt8yds=; b=UIeA+vKt8mIqyiYffcGOAjcDbfpOZPFDnWer2aYkYj+dTW3qFxTQGH2Q0lEjOtau+ierz/ kzCx5V4gRxxaN8FU9maIDedCPvQ5rON7/v4T9lVRGeO2G5QFxkrjI8yg9cGNXvSKJjiFCf Oz+oZuB/ZwIPB0WvnxfCsvnZHJccbZx24lUln1CnE3E3QwFGIA12L1HGiliYNVSXfmrgEL x488rC/d9aaj1qDop6ldjefYUBGIYoyYnCQg4gCv+UAJTAD8XKCF5+iQ1L1FZ6nYvQBLSF p5lvaaUdETTTymT56aDCpKJ2vEf89ViMD/MWuwGoMLThvWkZPPicIFx0cby8KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767984601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZL9yTmGfZvzE/eFJNmXMTS7Hu7d2pJITDfitdUt8yds=; b=fomc/O7Ns5ORo6mwgrRn1j2fk4lRUhWpHMDHPG7s4n/3XpwW/ZvoAn+pNqaRmnixfLSdoa 9ux+XkUJJym+nhJtt/p5vUYgd2UGew4ybx53rgVgFznHFIxa9AwYOXH/A22UYJhkrjwdf5 subvwxrJTu6HqYDSLprfJfYckwS08zhSGljrJY2tnzaCA25D+PjqDWmqZSMn0JNlNtytMp ieUuVj2Ai0dY2Wx93P256o+KHmYA4gp1HqKq7lNRU5LV13lHNC7h/4zuW0RY2JODmiAnTn Sqzb5feZGyXsgUDDYKfrJNIu6ZEQ988XWaYpgqxsnfIrIBMC2l81bU3DLlD3PA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767984601; a=rsa-sha256; cv=none; b=IW+s2j4f+O7i57zx5KKZ+3DmkPbaEo4vwa0iIRGnTQTnBBOYPj41HIipm0fEvP4bkwD0D5 unHDvg8YxcHdHsFRqhmhZVBvEEjvSQQ2qcQD73SzAvPns76OW1QkPrOaHUC3JeG7pYUwX5 nFm6V6rt2NWqtxyTMrlNY3HXP8pgc8s04LRS93aA1AP7a0/Ukmwh6G34lVffXp0VVUjUaI NR11x9ScY/n+xyBc1cChVS6FnZv0hZqI6x8FnjFfvg9zgsyMt5WqW2vASS5Vfuc5CXClPA nrf6clIwk2Po0iLT1Blc6TFcaioXLrLpTXSuYcecbHECIAJACttaXpmTyFQNSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnrRs4bBPz5V5 for ; Fri, 09 Jan 2026 18:50:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4009e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 18:50:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Osipov Subject: git: 1f150b9c73e5 - stable/14 - mrsas.4: Fix devid hex style List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1f150b9c73e5bbb0bb909df70b1edf9c59b16f4a Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 18:50:01 +0000 Message-Id: <69614dd9.4009e.7b2e05d2@gitrepo.freebsd.org> The branch stable/14 has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=1f150b9c73e5bbb0bb909df70b1edf9c59b16f4a commit 1f150b9c73e5bbb0bb909df70b1edf9c59b16f4a Author: Michael Osipov AuthorDate: 2026-01-07 08:04:14 +0000 Commit: Michael Osipov CommitDate: 2026-01-09 18:49:52 +0000 mrsas.4: Fix devid hex style (cherry picked from commit c2b407244f3a939d8b09f9a22d872ebdce5f6b19) --- share/man/man4/mrsas.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/mrsas.4 b/share/man/man4/mrsas.4 index c128717600c0..6645835d0bb2 100644 --- a/share/man/man4/mrsas.4 +++ b/share/man/man4/mrsas.4 @@ -334,7 +334,7 @@ was extended to support up to MR-Fusion .Nm is the new driver reworked by LSI which supports Thunderbolt and onward products. -The SAS+SATA RAID controller with device id 0x005b is referred to as +The SAS+SATA RAID controller with device id 0x005B is referred to as the Thunderbolt controller throughout this man page. .Ed .Bd -ragged From nobody Fri Jan 9 18:52:17 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnrVT1wqJz6B4bw for ; Fri, 09 Jan 2026 18:52:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnrVT0h65z49xy for ; Fri, 09 Jan 2026 18:52:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767984737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PqyWn+SF6BQ5lQbdDWthwCMHetjr53Gr+YtdrKC1TbE=; b=FDvFhPJbu4bypVHEHOvOewiUZjKt4T9E6pJmrQ83t9nJhIsbODpn+Q6ExR7MJPAc4xOZhZ 60s7GmOW0YgXraY4uTzzos0M8zpDaHss8goxUs8GrkLIdBl5vd/wjCQtn6Kwf1Kw1M2Kik EhJREKJUAR+o8u6XAqyMgd7qQsq1xjDJhn5PTrtAqOEbSMjolzKuvrvhRQCrZf5jYOhtlv M5HcIajDJCgKEUaD0JTXQ7+oQFeWn+hLy/gev5TgpD6wBHLnHx+XqXwRtH8maCqhqUWgeP cyvvI8gjKd7LAwmlCOhNiaUKLE3HwLUq59XiuorHjpJcqal9tkSe+7l3ua5j1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767984737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PqyWn+SF6BQ5lQbdDWthwCMHetjr53Gr+YtdrKC1TbE=; b=WZ2AhIyOWzZdVCOZ+Hih3wMolo4Jk5NOjnMyiKyRn5jKhZkeijGRVrwmgLTQHxEn98F55R xxhBhXs0vcKCfVvyh5YtvB6Ec7YQ+hs1kLLgg8N4nKwHcBowEvKoLbgF84znTMjcOKFeGC 6v/zjIpMgoIHPAjY4pInLix7LCKu3YoBS2R7vG44ShktuHfETIs8aB/RKcBIoPl6356I1z d1ACR49Op+z6m9NRFTzgT5YmomM+WIxfbAEhU85Drh90mfUF/WSXNaTrKv+K3JfPsZY1dj WoIStzJZEf10KZEIMANHk7JnNTETEA6E8K6GPI3fZeb7niJDVLwgXtstTpsU0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767984737; a=rsa-sha256; cv=none; b=NSn3ismyRjlZ9vZs4Sr78dZ6ThI2XBvnBLubCTdJ0QA3KKdE2F86wgyp+clMmg/XLRW1Nj WhvhbJyT7Vz3u2qcBex8jqNl6SCHjxojedyQSMD4heeE6xu1L1NoZis5TmpU6Cv4xcOc5v kTmtnHL8YsM/NRCmshpSqGlUCEmoSnkem0bK5aTc0lylZVsDxp359CKUEz/q3BHhtoSUAY CYAvY8uCM27V/tQee9mYSkuaNr4n/g7MH8w37esG/NNslIKQEPhUJaTnqDf9ot3whveQpy TVj0Ehin843rB5ZfAh5Q2xCEUX9GI5B1jZLTYkiRBlOna3YPNMsoGvEKfDTsHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnrVT0FWLz5YD for ; Fri, 09 Jan 2026 18:52:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c877 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 18:52:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Osipov Subject: git: 90f57724ef55 - stable/13 - mrsas.4: Fix devid hex style List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 90f57724ef55da23b255b3e1aa12f2dc4f3f375c Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 18:52:17 +0000 Message-Id: <69614e61.3c877.339226b7@gitrepo.freebsd.org> The branch stable/13 has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=90f57724ef55da23b255b3e1aa12f2dc4f3f375c commit 90f57724ef55da23b255b3e1aa12f2dc4f3f375c Author: Michael Osipov AuthorDate: 2026-01-07 08:04:14 +0000 Commit: Michael Osipov CommitDate: 2026-01-09 18:52:05 +0000 mrsas.4: Fix devid hex style (cherry picked from commit c2b407244f3a939d8b09f9a22d872ebdce5f6b19) --- share/man/man4/mrsas.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/mrsas.4 b/share/man/man4/mrsas.4 index c128717600c0..6645835d0bb2 100644 --- a/share/man/man4/mrsas.4 +++ b/share/man/man4/mrsas.4 @@ -334,7 +334,7 @@ was extended to support up to MR-Fusion .Nm is the new driver reworked by LSI which supports Thunderbolt and onward products. -The SAS+SATA RAID controller with device id 0x005b is referred to as +The SAS+SATA RAID controller with device id 0x005B is referred to as the Thunderbolt controller throughout this man page. .Ed .Bd -ragged From nobody Fri Jan 9 23:27:36 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnyc93TQkz6MYB1 for ; Fri, 09 Jan 2026 23:27:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnyc910WDz3mcV for ; Fri, 09 Jan 2026 23:27:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jNbed3LbGaLbqiqlpJ+Q6DyBXC4FsCCnRlAjfVdPciY=; b=uOxsnQHi9uEDa84eJXDSUL2raNsfqzP3ChYD/xqKhKLu56rRPhP59q6kNlPNNiy4K+eyrX S/IYWckpFzfr2gsi0+Mon6MGj5xjOgjTBp+VK3APd9pmFY5MwScLYtF5Meki4PHniluN5E 2SlEBXRFmao0ZV1GUX0v2r6KimBATkFFCZ5XkWikQsQtgSYIAD6JJH4gZBBjdMTbA8wQLw VUvRbLdyZs8n9rJ+pAJLYgxX8I768a1/od7GGjwql3Jqzs73ino9VBM4Sf7W7ggvePWUML 8htq3ICzbxGz9Bc6tl5lBEzOmc2724xgVOZeRctZNw5mRvXjwjp8mgCAlTKDSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jNbed3LbGaLbqiqlpJ+Q6DyBXC4FsCCnRlAjfVdPciY=; b=D4uxcu16F+m1ihRKX7bujFVmAeug1fmqWHCysETtLfucQ6LYvnpYnhJnofnfJ7ZHR5+vJ4 ue7y3xgzMBg00OY03OqEJnOR1Zgbl0TL7pBiFX3SjfKdYkEicwggPzQk1wo7HH4GyFx5fX Zn8zxCnY/XTtsybI+Vt0V6kCoWGX9rlP8rS9caVfSOinj/D0Q9AUPaamQmjpxo1zfucQ0C Y6Z3YfG5JXhPK4oKHLCKpjcDQjPWcYXBqvAMB1iTiK6QVgnFJHFk5gtafPj52I54c+1jiu 0CPywt2V4GTJc/WvRYvqjer4yd1FrIoHmWWudIDsrGmH5W2m2MXxsytsjViPhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001257; a=rsa-sha256; cv=none; b=Fiq25J96uwGixDIrkG6wIyD19DaPvoKlhN59XegKlQVRhALg6xLx1AuG3DjakFHb43CwTj aIFnNz+BBxhUCl2kTw6aNJQ98sbyptmRJW1yRNf1dbi3U8OEnjcxJ6ILThja9S5ruuagUh 7nJSBVmceP4upgiPruYbGw7D5dEOFkGqsccBbMaIQeM/Z9d8QG2/cKx5nHB0IoO2odynzL AT6q5EJqiOqD6/QNRypivdB914R11lACIcYZh/wS2j6y55VuLOn5/XjjbyVWL1rZ9HMO21 0vjNvTnaLtZRkRwQEe67xtDR1kyytnV+p3lfDKUIy49m2s7CKoKeSp6iwgnWqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnyc9001tzDW5 for ; Fri, 09 Jan 2026 23:27:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3342b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:27:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: ed61d50bd404 - stable/15 - snd_hda: Default to 256 when corb/rirb is invalid List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ed61d50bd404070229a459a98ff1b1e36f6828bb Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:27:36 +0000 Message-Id: <69618ee8.3342b.cdab654@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=ed61d50bd404070229a459a98ff1b1e36f6828bb commit ed61d50bd404070229a459a98ff1b1e36f6828bb Author: Christos Margiolis AuthorDate: 2026-01-02 15:49:33 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:22 +0000 snd_hda: Default to 256 when corb/rirb is invalid PR: 289284 Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D54339 (cherry picked from commit 2455db44ef088797d113397f863d46c50e77134f) --- sys/dev/sound/pci/hda/hdac.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c index ecf2e74000b7..10bda939d606 100644 --- a/sys/dev/sound/pci/hda/hdac.c +++ b/sys/dev/sound/pci/hda/hdac.c @@ -544,9 +544,12 @@ hdac_get_capabilities(struct hdac_softc *sc) HDAC_CORBSIZE_CORBSZCAP_2) sc->corb_size = 2; else { - device_printf(sc->dev, "%s: Invalid corb size (%x)\n", + device_printf(sc->dev, "%s: Hardware reports invalid corb size " + "(%x), defaulting to 256\n", __func__, corbsize); - return (ENXIO); + sc->corb_size = 256; + corbsize = HDAC_CORBSIZE_CORBSIZE(HDAC_CORBSIZE_CORBSIZE_256); + HDAC_WRITE_1(&sc->mem, HDAC_CORBSIZE, corbsize); } rirbsize = HDAC_READ_1(&sc->mem, HDAC_RIRBSIZE); @@ -560,9 +563,12 @@ hdac_get_capabilities(struct hdac_softc *sc) HDAC_RIRBSIZE_RIRBSZCAP_2) sc->rirb_size = 2; else { - device_printf(sc->dev, "%s: Invalid rirb size (%x)\n", + device_printf(sc->dev, "%s: Hardware reports invalid rirb size " + "(%x), defaulting to 256\n", __func__, rirbsize); - return (ENXIO); + sc->rirb_size = 256; + rirbsize = HDAC_RIRBSIZE_RIRBSIZE(HDAC_RIRBSIZE_RIRBSIZE_256); + HDAC_WRITE_1(&sc->mem, HDAC_RIRBSIZE, rirbsize); } HDA_BOOTVERBOSE( From nobody Fri Jan 9 23:27:37 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnycB1Yvdz6MYMl for ; Fri, 09 Jan 2026 23:27:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnycB0P09z3mkX for ; Fri, 09 Jan 2026 23:27:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ltTYZ4G5pFXkp1izDg/hwC1rNITfxBSOwGx/RYQJlWA=; b=UxVtdF56C8RWFANrYy7ApTn5EuXHArXcfmtJy/O9aKt78RUsfIrOChiW5WA93I0v7xmiuE J4NLi8nq2WnZP5PzRUxi7Hprm8KOfyfjH3M44xOvyY59ORtg+RMas1xBfJpA8CQxUXZQsF rs9XXSNbcZ0835N2tgbS/Y3T/7lswKb/cIpydYmmFQFCiPl2EFzaSw63jx9omdUf4cwLuH 1j2mqMbI0bvmccp/8f97hTag82Taw/tIiyQCwaDYm8SeNBi4aVOPyI26yhMtryPG1hytpK Drk63DwroxQ5x+O4DBY/eqRi7mPM5GekUNckRoGXCdKFONDFdDkCO1Wg5wMX+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ltTYZ4G5pFXkp1izDg/hwC1rNITfxBSOwGx/RYQJlWA=; b=nqS7mrhKaW3wqugV6fmTydKKwI1lL72OuxaIJ9XM0Hc27IwJes8KSEEO8JPa/UgINQ9etN iHbBjNHCJbvLBmJS8QlXsfC882adqxL8MWgtZivGM0dqx7rPiY9gwDBFDSIVjcNTyisFUS YP/WOnbf9iCUyiVXDqA9rBfHMMRv5Bfye9ATSqvRpRMhXuOfcL+MQFV4FeD6pnYmpz4vss 41Xnv+EdAQqfywFRXzS6maFWJu6b2x2eRWsURHywL6l+t0tP1le2Yb/yk2BkkicbgY4dHi EWk0GcGZ85IiaiOocGk5PNtErrYm5kJfLCYj3BPWI0VLBGscTlG8YfneFcP0+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001258; a=rsa-sha256; cv=none; b=sxmeljgZsxymF+09dC/qJUFfrFuQAfR6XmE7OMlo/8ibuhbjTX4q5S6D3I1fP15a9zgWWJ YXecVmXYbVtv432WRiVV3Yor1U8RIrRuucnvgRCvfjxt7a7H5U/zFOv8RzuDeuXVpCM8P9 L6i8QLIEVf9erOylGyZjAQzIAoZx9HoU2NFBgyO7MvCw7WqE4n2Hl/95H1fHvtRZLMqqel LQLbMCr+UyfwRxt/8GSqlA5RIxVtN8/7hVq5+IIxbpyCDcTxXmd88KS3pLkef+Gp1shdRo QP16awqYrFon7Ff7TnwpaZsFzBf9PcwEupGyDOfSexkzen5Ga8q+RSfEsKPSmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnyc96sKnzD7T for ; Fri, 09 Jan 2026 23:27:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33a00 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:27:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 353a529d3a75 - stable/15 - sound: Retire pcm_feeder->desc_static List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 353a529d3a75d5473580f5b344895f1082e3d375 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:27:37 +0000 Message-Id: <69618ee9.33a00.6ab0f839@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=353a529d3a75d5473580f5b344895f1082e3d375 commit 353a529d3a75d5473580f5b344895f1082e3d375 Author: Christos Margiolis AuthorDate: 2026-01-02 16:55:44 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:22 +0000 sound: Retire pcm_feeder->desc_static Not sure what the value of this was. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D54103 (cherry picked from commit 84976625da387a266f01b0a566aab447426609f7) --- sys/dev/sound/pcm/feeder.c | 3 +-- sys/dev/sound/pcm/feeder.h | 2 +- sys/dev/sound/pcm/feeder_chain.c | 4 ++-- sys/dev/sound/pcm/feeder_eq.c | 10 +++++----- sys/dev/sound/pcm/feeder_format.c | 14 +++++++------- sys/dev/sound/pcm/feeder_matrix.c | 9 ++++----- sys/dev/sound/pcm/feeder_mixer.c | 10 +++++----- sys/dev/sound/pcm/feeder_rate.c | 8 ++++---- sys/dev/sound/pcm/feeder_volume.c | 14 +++++++------- sys/dev/sound/pcm/sndstat.c | 36 ++++++++++++++++++------------------ 10 files changed, 54 insertions(+), 56 deletions(-) diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index fa4e4e16a133..2a7f54e5d30f 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -75,9 +75,8 @@ feeder_create(struct feeder_class *fc, struct pcm_feederdesc *desc) return NULL; f->class = fc; - f->desc = &(f->desc_static); if (desc != NULL) - *(f->desc) = *desc; + f->desc = *desc; err = FEEDER_INIT(f); if (err) { diff --git a/sys/dev/sound/pcm/feeder.h b/sys/dev/sound/pcm/feeder.h index f1c96d86fda0..ed4ebc91fca7 100644 --- a/sys/dev/sound/pcm/feeder.h +++ b/sys/dev/sound/pcm/feeder.h @@ -51,7 +51,7 @@ struct feeder_class { struct pcm_feeder { KOBJ_FIELDS; int align; - struct pcm_feederdesc *desc, desc_static; + struct pcm_feederdesc desc; void *data; struct feeder_class *class; struct pcm_feeder *source, *parent; diff --git a/sys/dev/sound/pcm/feeder_chain.c b/sys/dev/sound/pcm/feeder_chain.c index 32dd4ca14faf..4ec50d810253 100644 --- a/sys/dev/sound/pcm/feeder_chain.c +++ b/sys/dev/sound/pcm/feeder_chain.c @@ -473,8 +473,8 @@ feeder_build_root(struct pcm_channel *c, struct feeder_chain_desc *cdesc) c->feederflags |= 1 << FEEDER_ROOT; - c->feeder->desc->in = cdesc->current.afmt; - c->feeder->desc->out = cdesc->current.afmt; + c->feeder->desc.in = cdesc->current.afmt; + c->feeder->desc.out = cdesc->current.afmt; return (0); } diff --git a/sys/dev/sound/pcm/feeder_eq.c b/sys/dev/sound/pcm/feeder_eq.c index 3838328fb0bb..4ab7334715d5 100644 --- a/sys/dev/sound/pcm/feeder_eq.c +++ b/sys/dev/sound/pcm/feeder_eq.c @@ -275,16 +275,16 @@ feed_eq_init(struct pcm_feeder *f) { struct feed_eq_info *info; - if (f->desc->in != f->desc->out) + if (f->desc.in != f->desc.out) return (EINVAL); info = malloc(sizeof(*info), M_DEVBUF, M_NOWAIT | M_ZERO); if (info == NULL) return (ENOMEM); - info->fmt = AFMT_ENCODING(f->desc->in); - info->channels = AFMT_CHANNEL(f->desc->in); - info->align = info->channels * AFMT_BPS(f->desc->in); + info->fmt = AFMT_ENCODING(f->desc.in); + info->channels = AFMT_CHANNEL(f->desc.in); + info->align = info->channels * AFMT_BPS(f->desc.in); info->rate = FEEDEQ_RATE_MIN; info->treble.gain = FEEDEQ_L2GAIN(50); @@ -309,7 +309,7 @@ feed_eq_set(struct pcm_feeder *f, int what, int value) if (value < SND_CHN_MIN || value > SND_CHN_MAX) return (EINVAL); info->channels = (uint32_t)value; - info->align = info->channels * AFMT_BPS(f->desc->in); + info->align = info->channels * AFMT_BPS(f->desc.in); feed_eq_reset(info); break; case FEEDEQ_RATE: diff --git a/sys/dev/sound/pcm/feeder_format.c b/sys/dev/sound/pcm/feeder_format.c index d2c4d7618ab4..25103b71d135 100644 --- a/sys/dev/sound/pcm/feeder_format.c +++ b/sys/dev/sound/pcm/feeder_format.c @@ -61,23 +61,23 @@ feed_format_init(struct pcm_feeder *f) { struct feed_format_info *info; - if (f->desc->in == f->desc->out || - AFMT_CHANNEL(f->desc->in) != AFMT_CHANNEL(f->desc->out)) + if (f->desc.in == f->desc.out || + AFMT_CHANNEL(f->desc.in) != AFMT_CHANNEL(f->desc.out)) return (EINVAL); info = malloc(sizeof(*info), M_DEVBUF, M_NOWAIT | M_ZERO); if (info == NULL) return (ENOMEM); - info->channels = AFMT_CHANNEL(f->desc->in); + info->channels = AFMT_CHANNEL(f->desc.in); - info->ibps = AFMT_BPS(f->desc->in); + info->ibps = AFMT_BPS(f->desc.in); info->ialign = info->ibps * info->channels; - info->rdfmt = AFMT_ENCODING(f->desc->in); + info->rdfmt = AFMT_ENCODING(f->desc.in); - info->obps = AFMT_BPS(f->desc->out); + info->obps = AFMT_BPS(f->desc.out); info->oalign = info->obps * info->channels; - info->wrfmt = AFMT_ENCODING(f->desc->out); + info->wrfmt = AFMT_ENCODING(f->desc.out); f->data = info; diff --git a/sys/dev/sound/pcm/feeder_matrix.c b/sys/dev/sound/pcm/feeder_matrix.c index 2c7a3e04690d..198fe86d994f 100644 --- a/sys/dev/sound/pcm/feeder_matrix.c +++ b/sys/dev/sound/pcm/feeder_matrix.c @@ -283,15 +283,15 @@ feed_matrix_init(struct pcm_feeder *f) struct pcmchan_matrix *m_in, *m_out; int ret; - if (AFMT_ENCODING(f->desc->in) != AFMT_ENCODING(f->desc->out)) + if (AFMT_ENCODING(f->desc.in) != AFMT_ENCODING(f->desc.out)) return (EINVAL); info = malloc(sizeof(*info), M_DEVBUF, M_NOWAIT | M_ZERO); if (info == NULL) return (ENOMEM); - info->in = f->desc->in; - info->out = f->desc->out; + info->in = f->desc.in; + info->out = f->desc.out; info->fmt = AFMT_ENCODING(info->in); info->bps = AFMT_BPS(info->in); info->ialign = AFMT_ALIGN(info->in); @@ -413,8 +413,7 @@ feeder_matrix_setup(struct pcm_feeder *f, struct pcmchan_matrix *m_in, struct pcmchan_matrix *m_out) { - if (f == NULL || f->desc == NULL || f->class->type != FEEDER_MATRIX || - f->data == NULL) + if (f == NULL || f->class->type != FEEDER_MATRIX || f->data == NULL) return (EINVAL); return (feed_matrix_setup(f->data, m_in, m_out)); diff --git a/sys/dev/sound/pcm/feeder_mixer.c b/sys/dev/sound/pcm/feeder_mixer.c index 10de42ba727a..74ab633bf3c7 100644 --- a/sys/dev/sound/pcm/feeder_mixer.c +++ b/sys/dev/sound/pcm/feeder_mixer.c @@ -78,16 +78,16 @@ feed_mixer_init(struct pcm_feeder *f) { struct feed_mixer_info *info; - if (f->desc->in != f->desc->out) + if (f->desc.in != f->desc.out) return (EINVAL); info = malloc(sizeof(*info), M_DEVBUF, M_NOWAIT | M_ZERO); if (info == NULL) return (ENOMEM); - info->format = AFMT_ENCODING(f->desc->in); - info->channels = AFMT_CHANNEL(f->desc->in); - info->bps = AFMT_BPS(f->desc->in); + info->format = AFMT_ENCODING(f->desc.in); + info->channels = AFMT_CHANNEL(f->desc.in); + info->bps = AFMT_BPS(f->desc.in); f->data = info; @@ -321,7 +321,7 @@ feed_mixer_feed(struct pcm_feeder *f, struct pcm_channel *c, uint8_t *b, if (mcnt != 0) { memset(b + rcnt, sndbuf_zerodata( - f->desc->out), mcnt); + f->desc.out), mcnt); mcnt = 0; } switch (info->format) { diff --git a/sys/dev/sound/pcm/feeder_rate.c b/sys/dev/sound/pcm/feeder_rate.c index c2c232a97177..7fe8ec856a88 100644 --- a/sys/dev/sound/pcm/feeder_rate.c +++ b/sys/dev/sound/pcm/feeder_rate.c @@ -1109,7 +1109,7 @@ z_resampler_setup(struct pcm_feeder *f) if (!(Z_FACTOR_SAFE(info->z_gx) && Z_FACTOR_SAFE(info->z_gy))) return (EINVAL); - format = f->desc->in; + format = f->desc.in; adaptive = 0; z_scale = 0; @@ -1344,7 +1344,7 @@ z_setup_adaptive_sinc: /* * Zero out head of buffer to avoid pops and clicks. */ - memset(info->z_delay, sndbuf_zerodata(f->desc->out), + memset(info->z_delay, sndbuf_zerodata(f->desc.out), info->z_pos * align); #ifdef Z_DIAGNOSTIC @@ -1508,7 +1508,7 @@ z_resampler_init(struct pcm_feeder *f) struct z_info *info; int ret; - if (f->desc->in != f->desc->out) + if (f->desc.in != f->desc.out) return (EINVAL); info = malloc(sizeof(*info), M_DEVBUF, M_NOWAIT | M_ZERO); @@ -1518,7 +1518,7 @@ z_resampler_init(struct pcm_feeder *f) info->rsrc = Z_RATE_DEFAULT; info->rdst = Z_RATE_DEFAULT; info->quality = feeder_rate_quality; - info->channels = AFMT_CHANNEL(f->desc->in); + info->channels = AFMT_CHANNEL(f->desc.in); f->data = info; diff --git a/sys/dev/sound/pcm/feeder_volume.c b/sys/dev/sound/pcm/feeder_volume.c index 101cc7ba003b..f7c93ca716e6 100644 --- a/sys/dev/sound/pcm/feeder_volume.c +++ b/sys/dev/sound/pcm/feeder_volume.c @@ -151,20 +151,20 @@ feed_volume_init(struct pcm_feeder *f) uint32_t i; int ret; - if (f->desc->in != f->desc->out || - AFMT_CHANNEL(f->desc->in) > SND_CHN_MAX) + if (f->desc.in != f->desc.out || + AFMT_CHANNEL(f->desc.in) > SND_CHN_MAX) return (EINVAL); for (i = 0; i < FEEDVOLUME_TAB_SIZE; i++) { - if (AFMT_ENCODING(f->desc->in) == + if (AFMT_ENCODING(f->desc.in) == feed_volume_info_tab[i].format) { info = malloc(sizeof(*info), M_DEVBUF, M_NOWAIT | M_ZERO); if (info == NULL) return (ENOMEM); - info->bps = AFMT_BPS(f->desc->in); - info->channels = AFMT_CHANNEL(f->desc->in); + info->bps = AFMT_BPS(f->desc.in); + info->channels = AFMT_CHANNEL(f->desc.in); info->apply = feed_volume_info_tab[i].apply; info->volume_class = SND_VOL_C_PCM; info->state = FEEDVOLUME_ENABLE; @@ -332,8 +332,8 @@ feeder_volume_apply_matrix(struct pcm_feeder *f, struct pcmchan_matrix *m) struct feed_volume_info *info; uint32_t i; - if (f == NULL || f->desc == NULL || f->class->type != FEEDER_VOLUME || - f->data == NULL || m == NULL || m->channels < SND_CHN_MIN || + if (f == NULL || f->class->type != FEEDER_VOLUME || f->data == NULL || + m == NULL || m->channels < SND_CHN_MIN || m->channels > SND_CHN_MAX) return (EINVAL); diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c index a7c53ac85eb8..8f414e07757d 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/pcm/sndstat.c @@ -534,24 +534,24 @@ sndstat_build_sound4_nvlist(struct snddev_info *d, nvlist_t **dip) while (f != NULL) { sbuf_printf(&sb, "%s", f->class->name); if (f->class->type == FEEDER_FORMAT) { - snd_afmt2str(f->desc->in, buf, sizeof(buf)); + snd_afmt2str(f->desc.in, buf, sizeof(buf)); sbuf_printf(&sb, "(%s -> ", buf); - snd_afmt2str(f->desc->out, buf, sizeof(buf)); + snd_afmt2str(f->desc.out, buf, sizeof(buf)); sbuf_printf(&sb, "%s)", buf); } else if (f->class->type == FEEDER_MATRIX) { sbuf_printf(&sb, "(%d.%dch -> %d.%dch)", - AFMT_CHANNEL(f->desc->in) - - AFMT_EXTCHANNEL(f->desc->in), - AFMT_EXTCHANNEL(f->desc->in), - AFMT_CHANNEL(f->desc->out) - - AFMT_EXTCHANNEL(f->desc->out), - AFMT_EXTCHANNEL(f->desc->out)); + AFMT_CHANNEL(f->desc.in) - + AFMT_EXTCHANNEL(f->desc.in), + AFMT_EXTCHANNEL(f->desc.in), + AFMT_CHANNEL(f->desc.out) - + AFMT_EXTCHANNEL(f->desc.out), + AFMT_EXTCHANNEL(f->desc.out)); } else if (f->class->type == FEEDER_RATE) { sbuf_printf(&sb, "(%d -> %d)", FEEDER_GET(f, FEEDRATE_SRC), FEEDER_GET(f, FEEDRATE_DST)); } else { - snd_afmt2str(f->desc->out, buf, sizeof(buf)); + snd_afmt2str(f->desc.out, buf, sizeof(buf)); sbuf_printf(&sb, "(%s)", buf); } sbuf_printf(&sb, " -> "); @@ -1330,25 +1330,25 @@ sndstat_prepare_pcm(struct sbuf *s, device_t dev, int verbose) sbuf_printf(s, "%s", f->class->name); if (f->class->type == FEEDER_FORMAT) { sbuf_printf(s, "(0x%08x -> 0x%08x)", - f->desc->in, f->desc->out); + f->desc.in, f->desc.out); } else if (f->class->type == FEEDER_MATRIX) { sbuf_printf(s, "(%d.%d -> %d.%d)", - AFMT_CHANNEL(f->desc->in) - - AFMT_EXTCHANNEL(f->desc->in), - AFMT_EXTCHANNEL(f->desc->in), - AFMT_CHANNEL(f->desc->out) - - AFMT_EXTCHANNEL(f->desc->out), - AFMT_EXTCHANNEL(f->desc->out)); + AFMT_CHANNEL(f->desc.in) - + AFMT_EXTCHANNEL(f->desc.in), + AFMT_EXTCHANNEL(f->desc.in), + AFMT_CHANNEL(f->desc.out) - + AFMT_EXTCHANNEL(f->desc.out), + AFMT_EXTCHANNEL(f->desc.out)); } else if (f->class->type == FEEDER_RATE) { sbuf_printf(s, "(0x%08x q:%d %d -> %d)", - f->desc->out, + f->desc.out, FEEDER_GET(f, FEEDRATE_QUALITY), FEEDER_GET(f, FEEDRATE_SRC), FEEDER_GET(f, FEEDRATE_DST)); } else { sbuf_printf(s, "(0x%08x)", - f->desc->out); + f->desc.out); } sbuf_printf(s, " -> "); f = f->parent; From nobody Fri Jan 9 23:27:39 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnycC41Jrz6MYPg for ; Fri, 09 Jan 2026 23:27:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnycC0Vgcz3mqQ for ; Fri, 09 Jan 2026 23:27:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HMOn14pdN3RYFMce8WD8lgPgUTqgnZromu9qtudwxzo=; b=DA8VKrE0fO4aqhFC4WKPfJ2s1vZCgdAk5pcyqb3wJP/eAPMNkBCpF5ElmS1K+WrZgS1kYY e0zZA86WuZQAh9E8yJwl6YUJuVvJ6GscUDTSq4AE/kR8cA45PF2gF6CvN5AVqqOjuUUGnP EewKaxrR7eddGjbnAhtVUikzQq9FJ5nTMBMwbaWRsHkLZViSNDVN+My/3mRR43z6nZyM6E 89vFI9qLEBZUAxmOCPHyapAeQ1vhbqd/7C7A8t4//UT5CNAGZ6LNNYJFmZEjOLKzZDlUGI SWPnNaq2h9F/ikzYhEHJHS4iqb2tjIkPj1KFWJmaLHPFaiAu/tj9LKsgLr6zmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HMOn14pdN3RYFMce8WD8lgPgUTqgnZromu9qtudwxzo=; b=PR4l7rl1LBGvqPOmNxO+R3gC/YcC60XFhvSChl5/JizxGvHCvNuY4okUdgnRz9vJ+m6ySo xvaAS9yML5D6T920H/2FowjOysHcuK4tyt+C0D6ivyuPtICqVzvabUb6PWWvVqK/7E15H+ DLyCADSkBQfC8JL6HKKQvWNQertjwJbIAp36Jwjfu8q+2P8f2vN5hpeDjAFh1TQImEARDH Jvll+u6J0wJBPZKXoKfB/LvExWU9ljiTZl3gcLkHmvSKVQme4GkRGWqPBIV7qIirjTook0 QKWL0t9rYb7gOkVAOvtmx+z2vmjnzw7IM/H4jy3S8Y0WRYN/2CKbyQxG5CWLkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001259; a=rsa-sha256; cv=none; b=v72hLSaUJ4X2mvO5rE+HFL0BQvwf8XTpKW3GkArtvUN+okRYcvSkuwY5f+g8L4JZZ2wEQL ExNqFYq+Dwc+FrwhM6DPaaqkUVDdRRgJ0b/bmq9TvJkli7PEbQC8siYmZybrybitu/bhLl uEPFqDJVy1UL4T9OXIuCsW0pKrFHfHrvEiDES5yihVAAIQfAi3cdKXu8JWlVS5w3e5ZFWS AMOieNYD2OXurEtLDuhHIq7hGyL50WEgaijTpKa75yT2jq6rsDo+dceUK7hd8mQn8lvGtn KyuwcT6NRx/S20WsjWeoZDXZLMLovKKs/FWpkfDFifNuYpNOg+ST8kOPA2xRHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnycC03c0zTZJ for ; Fri, 09 Jan 2026 23:27:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32669 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:27:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 2985cba88f39 - stable/15 - sound: Update pcm/feeder.h LICENSE List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2985cba88f39fb57e3189520b893c3168302bdc9 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:27:39 +0000 Message-Id: <69618eeb.32669.29bfe404@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=2985cba88f39fb57e3189520b893c3168302bdc9 commit 2985cba88f39fb57e3189520b893c3168302bdc9 Author: Christos Margiolis AuthorDate: 2026-01-02 16:55:47 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:22 +0000 sound: Update pcm/feeder.h LICENSE Sponsored by: The FreeBSD Foundation MFC after: 1 week (cherry picked from commit 2b088823df5b0f28c3839bf381c9517b7b0d60c0) --- sys/dev/sound/pcm/feeder.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/sound/pcm/feeder.h b/sys/dev/sound/pcm/feeder.h index ed4ebc91fca7..b479b108ff93 100644 --- a/sys/dev/sound/pcm/feeder.h +++ b/sys/dev/sound/pcm/feeder.h @@ -4,6 +4,10 @@ * Copyright (c) 2005-2009 Ariff Abdullah * Copyright (c) 1999 Cameron Grant * All rights reserved. + * Copyright (c) 2025 The FreeBSD Foundation + * + * Portions of this software were developed by Christos Margiolis + * 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 From nobody Fri Jan 9 23:27:40 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnycD4yr5z6MY8K for ; Fri, 09 Jan 2026 23:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnycD1M3Tz3mTR for ; Fri, 09 Jan 2026 23:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pm2YkTgBmeSFFjNx6LRPv4a/9GnGSC2jvVcm9nCa8V0=; b=Dj87k7KEHi678SfMDs/OYH60I65XNCZf4lquL2ix+ChoWbU61h0rl5cNyX5qxVHOQsKEQM TBDFSnOFYDHByTJ5d8YXvKY324LTy1bA7fk9M1xqtoiAbmSgZ6Wb6AXy9p2+GGRAWSCIgy pIWB6REdHYvZVMpnhrW5sgVHVByTcZB1Hm8QI7RLz/La4RMjhL5J8L11Bu/zHqPcSjyl5s JwASZC37tp5sQ9hXIoccl/sq8ywiyExNtU4J21p4WjkTwdhYAOJl9ePJaf2rCTrgvK9pBV xsYWu7ELr7iER5Tydm8B9xBbQfV7EHkPYpVetORRSp3lCpOd2Fu4+ojcM2ROmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pm2YkTgBmeSFFjNx6LRPv4a/9GnGSC2jvVcm9nCa8V0=; b=lczB8tK9WRLNUf7tvZDxtG/oYNdW0HvB0SRH0DnmJ3cVhF1dix+Jmp+bjIF+09TzB1mvoU vQZbZWVdUIXCz72Lqfh3xwfOAXokImRa+qC7Cxx6lRdwp98wcLFZezwMjZKIirBBRFMAfA QaWLFHqqLv85rDHqIyFrCbq3jOdXZ/3eFqXDr1NpAoLKLbaB8Kcc3X+lmSwJfu4GSxm6hz +ULeESHlRyKss6+yms04Jv5HyoUsrUFevOtx3xk8AedtNXJgzzr/GPrpUJLdS8EuXhhsEy JyPPhOrlkrUL+MRCj7c9XioEn+bH3sSz+WMC11aSZYBJ1Ogoix6yUxISUqWEYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001260; a=rsa-sha256; cv=none; b=wwos8UOF5fwKsuzoa6Ty7frpAAChqA2kpERCWE0zjiAOr2BpX/XyvFvvWSjw9R/tyEM6k5 72Zx/gW96MfdcbS4hP5KsY1Jy26V14I2jdDG6rv2vA/ATJhO1DMAqLSK0PICXCT16Fu4Lm N2nUzOfv5XP+BaEd3NtNfAwGehD09tlJx6hhpPxEj1tboD91rOJN4eY1POX1i4/3vXiixC z+j0bdiuSIneA3yjUeVZfEI9lOWGATjElHbu/kkmldeXo6VAJZN8kpYrWxGvMNmXw3mdgd voMUOGdlCy9JiRD3u350oRCVItAmHKOak1aB6LfxZqg9KCNQ7gs2k0bzC013QA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnycD0pv5zDZ9 for ; Fri, 09 Jan 2026 23:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31e3f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:27:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 4b01d9267818 - stable/15 - sound: Retire unused pcm_feeder->align List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4b01d92678185a9cbbf5395b3268f4e453d5df65 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:27:40 +0000 Message-Id: <69618eec.31e3f.7c83af78@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=4b01d92678185a9cbbf5395b3268f4e453d5df65 commit 4b01d92678185a9cbbf5395b3268f4e453d5df65 Author: Christos Margiolis AuthorDate: 2026-01-02 16:55:51 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:22 +0000 sound: Retire unused pcm_feeder->align Sponsored by: The FreeBSD Foundation MFC after: 1 week (cherry picked from commit 6002ce537b6a0e524da1a60ccd70493d8cd59b9b) --- sys/dev/sound/pcm/feeder.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/sound/pcm/feeder.h b/sys/dev/sound/pcm/feeder.h index b479b108ff93..1f106787ee83 100644 --- a/sys/dev/sound/pcm/feeder.h +++ b/sys/dev/sound/pcm/feeder.h @@ -54,12 +54,10 @@ struct feeder_class { struct pcm_feeder { KOBJ_FIELDS; - int align; struct pcm_feederdesc desc; void *data; struct feeder_class *class; struct pcm_feeder *source, *parent; - }; void feeder_register(void *p); From nobody Fri Jan 9 23:27:41 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnycF4zdJz6MYBW for ; Fri, 09 Jan 2026 23:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnycF22bFz3mgC for ; Fri, 09 Jan 2026 23:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hibAykuVIMcdZZ8w+QvupJ8oPPh9VF8h7E5S40wBKJ0=; b=iOUjdExraJvzXCONUqBAl6ZxrIwCW5UZBSonnfM/a5vIIxQN56fuiamdneShOpRTGpFt0k NcX4/py8MLrDYd725epu4/44lUMaatt8X3Da9OlEyoAxbinl9sNIfQHrrXEPNfsD2KYUuC ASfBmCcp9ZLojT0CWW/ln0n/4Bkk/0DkjfyFb2Rn/C1QD0r/nWEKlSqva3OcB0w0/25WY4 mrE64r9QWw6KjnQCQAAcd2CLDRIGxsoVSsNh7c5kUcLiA6JhyQpHPRhqk3YD9pjTFkRDwY YTPlSFrH5n7PPIN9mnQpyRIFfpjmb2ddc1pZ14O+fXX9Hk4p8kipGzFgPwwnBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hibAykuVIMcdZZ8w+QvupJ8oPPh9VF8h7E5S40wBKJ0=; b=kxsjL1UHfhAD/EGrImOUcgvovRl9jLRoxqAr/7sZ7wzfvfTr6C+woUg4axOIXdKavo8MJR Uw4dP1Cy1r7+7IcWXlW9lhPzCzuyBnGz3122RwqxsCPNqZuJNCVyWxivTY+hhT2QKqBNHN b/YcFWUJ5SUFbTjHGnjcRC/vpGaQuxlzGDHQzxAhjhEm7KeZ8EeGKpCvYdL2Glw8n40b5E DJwcZUjNyo+2jrZhuP+ky8N7ePoGClO+4OsEUHDbdKbzA+e51ca0pT0z+4vO6wvmRZcuhq y3+CHkyhOhjQv9CpoARX/WYcEUUkf5pTdNsCcoRuYbgdYmvQ8Qi8NUbMM7ZXig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001261; a=rsa-sha256; cv=none; b=DWx3ZDHmryZtN7VTZTr++TNht3bWu2ml3EGCFvw+7xuMyPSKomAGOt9Vm+IWmLCkA/Fn0a yCeTKNTWC8efnLnUyKE0Bt77C9xxYwWbDXlqzbF4vv8zsLM+hdXZLxQEwc8t79GLkwReKD vw5Voehwzpedm6vUc7URxCKQgcmhv7x8srPmOWDgpNEr4K+ea/dZ//ARvr+FwDaDJoH23q 0BVce58XOoQMp9eATolrvmaTsbsv2n6uYxxUqZNOCBG9s/GQKYNrGTsCebMJOdcJ0UZWQH uHCvWNiDC3Pd/H4CiAFtgSLuNcycP6NnHr+k6N9l2gxDf1B0LnpmQPRmKMLn7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnycF1c5DzDFw for ; Fri, 09 Jan 2026 23:27:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30ce9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:27:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 6511bb585517 - stable/15 - sound: Get rid of unnecessary breaks List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6511bb5855173f7e2dd7142e7adf6fb86a8afbd1 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:27:41 +0000 Message-Id: <69618eed.30ce9.ad3de5a@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=6511bb5855173f7e2dd7142e7adf6fb86a8afbd1 commit 6511bb5855173f7e2dd7142e7adf6fb86a8afbd1 Author: Christos Margiolis AuthorDate: 2026-01-02 16:55:54 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:22 +0000 sound: Get rid of unnecessary breaks No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 1 week (cherry picked from commit 21a2aa785d7d7610b3e90e028ae782893d8c095a) --- sys/dev/sound/pci/atiixp.c | 1 - sys/dev/sound/pcm/feeder_eq.c | 2 -- sys/dev/sound/pcm/feeder_format.c | 1 - sys/dev/sound/pcm/feeder_rate.c | 7 ------- sys/dev/sound/pcm/feeder_volume.c | 1 - sys/dev/sound/pcm/mixer.c | 1 - 6 files changed, 13 deletions(-) diff --git a/sys/dev/sound/pci/atiixp.c b/sys/dev/sound/pci/atiixp.c index 12906ecc6253..0d2228ee16cd 100644 --- a/sys/dev/sound/pci/atiixp.c +++ b/sys/dev/sound/pci/atiixp.c @@ -804,7 +804,6 @@ atiixp_chan_trigger(kobj_t obj, void *data, int go) default: atiixp_unlock(sc); return (0); - break; } /* Update bus busy status */ diff --git a/sys/dev/sound/pcm/feeder_eq.c b/sys/dev/sound/pcm/feeder_eq.c index 4ab7334715d5..08e789f6a5ad 100644 --- a/sys/dev/sound/pcm/feeder_eq.c +++ b/sys/dev/sound/pcm/feeder_eq.c @@ -319,7 +319,6 @@ feed_eq_set(struct pcm_feeder *f, int what, int value) if (info->state == FEEDEQ_UNKNOWN) info->state = FEEDEQ_ENABLE; return (feed_eq_setup(info)); - break; case FEEDEQ_TREBLE: case FEEDEQ_BASS: if (value < 0 || value > 100) @@ -343,7 +342,6 @@ feed_eq_set(struct pcm_feeder *f, int what, int value) break; default: return (EINVAL); - break; } return (0); diff --git a/sys/dev/sound/pcm/feeder_format.c b/sys/dev/sound/pcm/feeder_format.c index 25103b71d135..3226aebf9580 100644 --- a/sys/dev/sound/pcm/feeder_format.c +++ b/sys/dev/sound/pcm/feeder_format.c @@ -115,7 +115,6 @@ feed_format_set(struct pcm_feeder *f, int what, int value) break; default: return (EINVAL); - break; } return (0); diff --git a/sys/dev/sound/pcm/feeder_rate.c b/sys/dev/sound/pcm/feeder_rate.c index 7fe8ec856a88..63d7fe11003a 100644 --- a/sys/dev/sound/pcm/feeder_rate.c +++ b/sys/dev/sound/pcm/feeder_rate.c @@ -1469,7 +1469,6 @@ z_resampler_set(struct pcm_feeder *f, int what, int32_t value) break; default: return (EINVAL); - break; } return (z_resampler_setup(f)); @@ -1485,18 +1484,12 @@ z_resampler_get(struct pcm_feeder *f, int what) switch (what) { case Z_RATE_SRC: return (info->rsrc); - break; case Z_RATE_DST: return (info->rdst); - break; case Z_RATE_QUALITY: return (info->quality); - break; case Z_RATE_CHANNELS: return (info->channels); - break; - default: - break; } return (-1); diff --git a/sys/dev/sound/pcm/feeder_volume.c b/sys/dev/sound/pcm/feeder_volume.c index f7c93ca716e6..3e9e3484fba8 100644 --- a/sys/dev/sound/pcm/feeder_volume.c +++ b/sys/dev/sound/pcm/feeder_volume.c @@ -232,7 +232,6 @@ feed_volume_set(struct pcm_feeder *f, int what, int value) break; default: return (EINVAL); - break; } return (ret); diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index f6eb669010b5..55b61ccb4911 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -1071,7 +1071,6 @@ mixer_ioctl_channel(struct cdev *dev, u_long cmd, caddr_t arg, int mode, break; default: return (-1); - break; } pid = td->td_proc->p_pid; From nobody Fri Jan 9 23:27:42 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnycG5tcnz6MXts for ; Fri, 09 Jan 2026 23:27:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnycG2rFZz3mnm for ; Fri, 09 Jan 2026 23:27:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wU5YaTWsc/kXSPAYuFUYwjipPlOdVdRAXT/LtTHDUoc=; b=th2buS/NfMb12jbptg8F8dPTkYg9ST/oUEFv1tmj+0psqOOtgejQNKgD2TeghXJtBrx+N/ YLlHeQGLENkchHJE1CGUV72mbX1QdQHEAZLv4+frqqE3p47nhgxELbl73ecfL0OWLwPFYF R9STp7fliC/vAsh/8xz+OBmyaPqY2kRVdQNAA58bwMJbOScwHDcVXIXZMm72/WD/Nz9ayN VizU+uPyd02cCjsh7Q/Ptd6eH5vufH+UkL3Z4fDWmOr3zDlQuTgEBfUHMAa9awvUJdCdbh u0aUnferkl1yUlx73eNiwkTT84rNsnvt1u5TQ5+/e7SDgr9kIrUFyeugiowf1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wU5YaTWsc/kXSPAYuFUYwjipPlOdVdRAXT/LtTHDUoc=; b=LYlMF5gQJ2jUX9zBt04ootO66JUboWh56ReuGmIVCIhdHXObpdi+xidedAeZQLyu+BIV34 9I3Dx8X9gdFrRfa+MFRTABdQ0+l0WzcrGglTV6yTIfaUt64k99Rq5/akytwCKr54AXlA3k gkIHdLsi18JjmiyQT6/N2V+nTm12mBwhbOE80DEb6gayg+mEVC4QHOHHm8P89Rr8ALEaF7 jBqyztV0zvEQw88XraRY+ItWD/81OX82kglSQLYBKGRb3x1lEkv/mvauhdiZirvoTDb+ZQ p5w/hB6zLOqt5DwvUdFXpI3SXI3RQaK8i23c8pDSOAEyEWyQnMbcYQsQDt80pQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001262; a=rsa-sha256; cv=none; b=B+r+Byizr68yXxnos1QXk752qTWQc43roN8m73Cjz+By1yk84Gx54beJmkXg//kfgyN7PD qeOkEaImvypveychtdv0h9uk2vWqfPMQaYBQTHZtPoPsnImBijKTQH1BhwQw3ZNkqkPLlx yOTXZRgl0Z/XwDRr5ipAIr/+THBga8S7igVYjW/NMoBfTNHcznh0F396YnajJ2xyMoPFNe DGRXw4+T52R4qB1JL1rJR+bKLbKX0KEOO6XYqSuv/F6+yaoXQODeA4cIBYUhlQnUNriorv w1sZ5jpeeeDDAjDlBgHDQn5K7nSCjGDvmVY8yl7V5t4CX7Wliyf3nvbEZqf4Ig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnycG2MhszDFx for ; Fri, 09 Jan 2026 23:27:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32b2d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:27:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 7154f9d06460 - stable/15 - sound: Stop building midi as a module List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7154f9d06460adbeb1f3ad4f972eedd5e78cfb56 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:27:42 +0000 Message-Id: <69618eee.32b2d.abb3ed1@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=7154f9d06460adbeb1f3ad4f972eedd5e78cfb56 commit 7154f9d06460adbeb1f3ad4f972eedd5e78cfb56 Author: Christos Margiolis AuthorDate: 2026-01-02 16:55:57 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:22 +0000 sound: Stop building midi as a module There is no reason for this. The midi functions are used by drivers on-demand anyway. Use SYSINIT(9) instead to do the appropriate (de-)initilizations. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D54125 (cherry picked from commit 45bb10e0ed5a0b87adcae33635400b5bc36337ec) --- sys/dev/sound/midi/midi.c | 44 +++++++------------------------------------- 1 file changed, 7 insertions(+), 37 deletions(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index cca7b93abf5f..bf8d602c75df 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -102,8 +101,6 @@ static struct cdevsw midi_cdevsw = { }; static int midi_destroy(struct snd_midi *, int); -static int midi_load(void); -static int midi_unload(void); SYSCTL_NODE(_hw, OID_AUTO, midi, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "Midi driver"); @@ -701,17 +698,16 @@ midi_destroy(struct snd_midi *m, int midiuninit) return 0; } -static int -midi_load(void) +static void +midi_sysinit(void *data __unused) { sx_init(&mstat_lock, "midistat lock"); TAILQ_INIT(&midi_devs); - - return 0; } +SYSINIT(midi_sysinit, SI_SUB_DRIVERS, SI_ORDER_FIRST, midi_sysinit, NULL); -static int -midi_unload(void) +static void +midi_sysuninit(void *data __unused) { struct snd_midi *m, *tmp; int retval; @@ -731,38 +727,12 @@ midi_unload(void) midistat_unlock(); sx_destroy(&mstat_lock); - return 0; + return; exit: mtx_unlock(&m->lock); midistat_unlock(); if (retval) MIDI_DEBUG(2, printf("midi_unload: failed\n")); - return retval; -} - -static int -midi_modevent(module_t mod, int type, void *data) -{ - int retval; - - retval = 0; - - switch (type) { - case MOD_LOAD: - retval = midi_load(); - break; - - case MOD_UNLOAD: - retval = midi_unload(); - break; - - default: - break; - } - - return retval; } - -DEV_MODULE(midi, midi_modevent, NULL); -MODULE_VERSION(midi, 1); +SYSUNINIT(midi_sysuninit, SI_SUB_DRIVERS, SI_ORDER_FIRST, midi_sysuninit, NULL); From nobody Fri Jan 9 23:27:43 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnycJ0C61z6MYMy for ; Fri, 09 Jan 2026 23:27:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnycH3MmMz3myt for ; Fri, 09 Jan 2026 23:27:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WDMM6SuDE92T0Pezzg7DYcJc4VTbQ7u3gvZespLOoEM=; b=Qqg26p4Sj1+/QkDQKjdBhi2fDpNHG3nsitwUVI81uIq445wufK/JKfRxLd7st+kOP7KPuC VFd2PL8n6q0ZSPejpxUaPuoSz2PBvnMThfcqWvyzdmrZYkYEmI/RHRWnJ2eUS6EFU5eP3g axc3g8nYNMyaC7QIuMpUzpUdLEZw5OPs/frqMACv4Gg8HItkdIhHZIY+i0SASj8mt9d2vf 0x0MewvIB5dCjMANP8xAQrZOCDoZ0y1DaB49xm7EGWZOKCFCfyYh/TreiSLWeRoUlXUSyv PJZMc1wCeVI3DbUFRwn6ZrMV22UG7cjNl44TC8NNNaopKr5n00qYVfkhOqzV+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WDMM6SuDE92T0Pezzg7DYcJc4VTbQ7u3gvZespLOoEM=; b=De4A43QA9vGqI+dwzVstWrz6YFVDaDaqPfec+m8esodlCWj3EntIic3sz3Fyb1rU395jgz gNzbCYH9znBCyoT8aKPsUUvC/g3D2mtxnL1jYXMIaUPOWhwSIGEp02AiO0ZgsZebYcdOv3 /PJlsg4z5WcN/lUDkC6IWZIqxRLGC79qyVHPrc3qDdVuVWrm2BhOBz0tFWg324KSELofdu 5MUMMFvK+E7O8iz3p07bbHY4qJy8+cdXhE5uIbyIDQm1BY0EteOxP5FHGUglu5iMs2HZ67 XPW1IS5/Qi0lbogDS4KTQTrZVeLTaOxS5QRoTR8D4Ngsr2ZkfIMqJFKBSRf9yQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001263; a=rsa-sha256; cv=none; b=ZS9yNUnhvfdEhwiqedTTcRY3+d952MzpPOC0Rglusliw0ACXYhhjkhMlP38s9SAeP2LbmN gMXoWlyyYT75D03a/Fiw2TerDv0tcBe3Hi2Lkv7A56r3JOlUAaSth9h6wOWw4KJeAPGq59 PmH4IyuvlR7qne1tH9DtmJkdWMuLCmQ+urN9Ea8Hp/TX9uVqC0EVZHIlokSHkj4NieKmDG DYo5jHSUJ9VtwjxWb+CQeGrIZTmu+tH1W+Z0jmB1j9g15mL+M4VdNPpUPrIZviPeCuw/pL p4CIzbCr7nBIR/0Z8q+5DDzfEsD+xELASfiDQiKIZ/W4uPRlBMTNm13cy3hiEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnycH2wDlzTWq for ; Fri, 09 Jan 2026 23:27:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32138 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:27:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 3e04a082687c - stable/15 - sound: Retire midi_devs and mstat_lock List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3e04a082687cbb5a8e052f156c6e7ebd03876284 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:27:43 +0000 Message-Id: <69618eef.32138.7072737f@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=3e04a082687cbb5a8e052f156c6e7ebd03876284 commit 3e04a082687cbb5a8e052f156c6e7ebd03876284 Author: Christos Margiolis AuthorDate: 2026-01-02 16:56:02 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:23 +0000 sound: Retire midi_devs and mstat_lock Nowadays midi_devs only has two uses: 1. To verify in midi_init() if a given device unit exists, as well as to calculate the next device unit. Instead, make sure we always get a unique unit and channel number using unr(9). 2. To keep track of all midi devices, so that it can destroy them all at once in midi_sysuninit(). However, since we stopped building midi as a kernel module, there is no reason to do that, simply let the drivers tear down the devices themselves. Also retire mstat_lock since it's only used to protect midi_devs. PR: 261071 Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54126 (cherry picked from commit c508be8ca9578ef6e3e4b31de1baca8038c0e0ae) --- sys/dev/sound/midi/midi.c | 130 ++++++++------------------------------------ sys/dev/sound/midi/midi.h | 7 +-- sys/dev/sound/midi/mpu401.c | 2 +- 3 files changed, 26 insertions(+), 113 deletions(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index bf8d602c75df..8a74732c8907 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -36,12 +36,11 @@ #include #include #include +#include #include #include #include -#include #include -#include #include #include @@ -62,8 +61,8 @@ struct snd_midi { struct mtx lock; /* Protects all but queues */ void *cookie; - int unit; /* Should only be used in midistat */ - int channel; /* Should only be used in midistat */ + int unit; + int channel; int busy; int flags; /* File flags */ @@ -75,13 +74,8 @@ struct snd_midi { int hiwat; /* QLEN(outq)>High-water -> disable * writes from userland */ struct cdev *dev; - TAILQ_ENTRY(snd_midi) link; }; -TAILQ_HEAD(, snd_midi) midi_devs; - -struct sx mstat_lock; - static d_open_t midi_open; static d_close_t midi_close; static d_ioctl_t midi_ioctl; @@ -102,6 +96,9 @@ static struct cdevsw midi_cdevsw = { static int midi_destroy(struct snd_midi *, int); +struct unrhdr *dev_unr = NULL; +struct unrhdr *chn_unr = NULL; + SYSCTL_NODE(_hw, OID_AUTO, midi, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "Midi driver"); @@ -111,70 +108,19 @@ SYSCTL_INT(_hw_midi, OID_AUTO, debug, CTLFLAG_RW, &midi_debug, 0, ""); #define MIDI_DEBUG(l,a) if(midi_debug>=l) a -void -midistat_lock(void) -{ - sx_xlock(&mstat_lock); -} - -void -midistat_unlock(void) -{ - sx_xunlock(&mstat_lock); -} - -void -midistat_lockassert(void) -{ - sx_assert(&mstat_lock, SA_XLOCKED); -} - /* - * Register a new rmidi device. cls midi_if interface unit == 0 means - * auto-assign new unit number unit != 0 already assigned a unit number, eg. - * not the first channel provided by this device. channel, sub-unit - * cookie is passed back on MPU calls Typical device drivers will call with - * unit=0, channel=1..(number of channels) and cookie=soft_c and won't care - * what unit number is used. + * Register a new rmidi device. * - * It is an error to call midi_init with an already used unit/channel combo. + * "cookie" is passed to the MPU calls, and is normally set to the driver's + * softc. */ struct snd_midi * -midi_init(kobj_class_t cls, int unit, int channel, void *cookie) +midi_init(kobj_class_t cls, void *cookie) { struct snd_midi *m; - int i; int inqsize, outqsize; uint8_t *buf; - MIDI_DEBUG(1, printf("midiinit: unit %d/%d.\n", unit, channel)); - midistat_lock(); - /* - * Protect against call with existing unit/channel or auto-allocate a - * new unit number. - */ - i = -1; - TAILQ_FOREACH(m, &midi_devs, link) { - mtx_lock(&m->lock); - if (unit != 0) { - if (m->unit == unit && m->channel == channel) { - mtx_unlock(&m->lock); - goto err0; - } - } else { - /* - * Find a better unit number - */ - if (m->unit > i) - i = m->unit; - } - mtx_unlock(&m->lock); - } - - if (unit == 0) - unit = i + 1; - - MIDI_DEBUG(1, printf("midiinit #2: unit %d/%d.\n", unit, channel)); m = malloc(sizeof(*m), M_MIDI, M_WAITOK | M_ZERO); kobj_init((kobj_t)m, cls); inqsize = MPU_INQSIZE(m, cookie); @@ -211,8 +157,8 @@ midi_init(kobj_class_t cls, int unit, int channel, void *cookie) m->busy = 0; m->flags = 0; - m->unit = unit; - m->channel = channel; + m->unit = alloc_unr(dev_unr); + m->channel = alloc_unr(chn_unr); m->cookie = cookie; if (MPU_INIT(m, cookie)) @@ -221,12 +167,8 @@ midi_init(kobj_class_t cls, int unit, int channel, void *cookie) mtx_unlock(&m->lock); mtx_unlock(&m->qlock); - TAILQ_INSERT_TAIL(&midi_devs, m, link); - - midistat_unlock(); - - m->dev = make_dev(&midi_cdevsw, unit, UID_ROOT, GID_WHEEL, 0666, - "midi%d.%d", unit, channel); + m->dev = make_dev(&midi_cdevsw, m->unit, UID_ROOT, GID_WHEEL, 0666, + "midi%d.%d", m->unit, m->channel); m->dev->si_drv1 = m; return m; @@ -241,8 +183,6 @@ err2: free(MIDIQ_BUF(m->outq), M_MIDI); err1: free(m, M_MIDI); -err0: - midistat_unlock(); MIDI_DEBUG(1, printf("midi_init ended in error\n")); return NULL; } @@ -258,7 +198,6 @@ midi_uninit(struct snd_midi *m) int err; err = EBUSY; - midistat_lock(); mtx_lock(&m->lock); if (m->busy) { if (!(m->rchan || m->wchan)) @@ -280,7 +219,6 @@ midi_uninit(struct snd_midi *m) err: mtx_unlock(&m->lock); exit: - midistat_unlock(); return err; } @@ -680,16 +618,17 @@ midi_poll(struct cdev *i_dev, int events, struct thread *td) static int midi_destroy(struct snd_midi *m, int midiuninit) { - midistat_lockassert(); mtx_assert(&m->lock, MA_OWNED); MIDI_DEBUG(3, printf("midi_destroy\n")); m->dev->si_drv1 = NULL; mtx_unlock(&m->lock); /* XXX */ destroy_dev(m->dev); - TAILQ_REMOVE(&midi_devs, m, link); + /* XXX */ if (midiuninit) MPU_UNINIT(m, m->cookie); + free_unr(dev_unr, m->unit); + free_unr(chn_unr, m->channel); free(MIDIQ_BUF(m->inq), M_MIDI); free(MIDIQ_BUF(m->outq), M_MIDI); mtx_destroy(&m->qlock); @@ -701,38 +640,17 @@ midi_destroy(struct snd_midi *m, int midiuninit) static void midi_sysinit(void *data __unused) { - sx_init(&mstat_lock, "midistat lock"); - TAILQ_INIT(&midi_devs); + dev_unr = new_unrhdr(0, INT_MAX, NULL); + chn_unr = new_unrhdr(0, INT_MAX, NULL); } SYSINIT(midi_sysinit, SI_SUB_DRIVERS, SI_ORDER_FIRST, midi_sysinit, NULL); static void midi_sysuninit(void *data __unused) { - struct snd_midi *m, *tmp; - int retval; - - MIDI_DEBUG(1, printf("midi_unload()\n")); - retval = EBUSY; - midistat_lock(); - TAILQ_FOREACH_SAFE(m, &midi_devs, link, tmp) { - mtx_lock(&m->lock); - if (m->busy) - retval = EBUSY; - else - retval = midi_destroy(m, 1); - if (retval) - goto exit; - } - midistat_unlock(); - - sx_destroy(&mstat_lock); - return; - -exit: - mtx_unlock(&m->lock); - midistat_unlock(); - if (retval) - MIDI_DEBUG(2, printf("midi_unload: failed\n")); + if (dev_unr != NULL) + delete_unrhdr(dev_unr); + if (chn_unr != NULL) + delete_unrhdr(chn_unr); } -SYSUNINIT(midi_sysuninit, SI_SUB_DRIVERS, SI_ORDER_FIRST, midi_sysuninit, NULL); +SYSUNINIT(midi_sysuninit, SI_SUB_DRIVERS, SI_ORDER_ANY, midi_sysuninit, NULL); diff --git a/sys/dev/sound/midi/midi.h b/sys/dev/sound/midi/midi.h index 286e84264ef3..a4e6c2801150 100644 --- a/sys/dev/sound/midi/midi.h +++ b/sys/dev/sound/midi/midi.h @@ -41,12 +41,7 @@ MALLOC_DECLARE(M_MIDI); struct snd_midi; -void midistat_lock(void); -void midistat_unlock(void); -void midistat_lockassert(void); - -struct snd_midi * -midi_init(kobj_class_t _mpu_cls, int _unit, int _channel, void *cookie); +struct snd_midi *midi_init(kobj_class_t _mpu_cls, void *cookie); int midi_uninit(struct snd_midi *_m); int midi_out(struct snd_midi *_m, uint8_t *_buf, int _size); int midi_in(struct snd_midi *_m, uint8_t *_buf, int _size); diff --git a/sys/dev/sound/midi/mpu401.c b/sys/dev/sound/midi/mpu401.c index 7d3edb6323ef..21141a0c8e3c 100644 --- a/sys/dev/sound/midi/mpu401.c +++ b/sys/dev/sound/midi/mpu401.c @@ -157,7 +157,7 @@ mpu401_init(kobj_class_t cls, void *cookie, driver_intr_t softintr, m->cookie = cookie; m->flags = 0; - m->mid = midi_init(&mpu401_class, 0, 0, m); + m->mid = midi_init(&mpu401_class, m); if (!m->mid) goto err; *cb = mpu401_intr; From nobody Fri Jan 9 23:27:44 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnycK2R1vz6MYL5 for ; Fri, 09 Jan 2026 23:27:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnycJ73BCz3mtQ for ; Fri, 09 Jan 2026 23:27:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=emMKT9o+I4s7GPyoEZCywKtFTkMkOzE4vUCnjcjcyVQ=; b=vq4ZUpx74VxlzxDRSY0rJG4tnFEq/5dj3ecnQ9czgJV5yFcePKK1me0VyXvQVtamj1578q 5GjrswN+/cq/Po5pV+YY6io6F01IQP9dUnJzwIpdG0+qMhniB55a621HLZOxLWkLcHhPLy ODFkqNtah/WYs7wnsn4H3fj4bowECAp5DQFmLFLpaAPE3Z6GpOVOR2kxHrdf/SfSvzeGXk HBvBZRjmwkY0Nq0zNf7PDPdSxeE1J7Me71cCUwK6s42CQjKfecxu0jq0aLbV9HC1kmFgS0 Xh5THnBR44YKY36ulh8HuFmyyOvt/6NuBykErJk/kT4vdpmCNjsPEosoMPv1SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=emMKT9o+I4s7GPyoEZCywKtFTkMkOzE4vUCnjcjcyVQ=; b=vBao1MshrFv9jFvW8LzfVcWI4aqBkI9QXOBmD82lxU3l98r4T4svYf8B2hBJkY6FzJCKPq kdtLF+BfpSipVJ6YC3+PTLvYtKAkd0Y12x8OVncTQfJggmB/0BARqH2+yZPP0RhYKrYX0d IxBwUJjhgvS/TS1rf6BHZlzurr5BCZWqDZORisadSnl0lvVxM7/mR/PeC2AukdxBbeU4Ft XRepZnqkF9CFfIEIOAawI88IOjCK7JJJZT/VXZvfTBqwr5BKS5Xy0BS4aM6RyHavbpCY+U lYJpDyE6sOAzw8fU2UNOgVZk6qnLmigvjedD64eNDjm9eucpb6xP+2/jGJNy7g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001265; a=rsa-sha256; cv=none; b=Loj67eAUXzlMTOiKKUS4MsON8qGYqqJRcjt3pP3m6WXoAi+W4vVDPCnwYbuK74cRh+2HVC cn2eBGQZXc9dQBXK2kov76txEmgVtJchDMVoYT+Buij3olc056qCLTUL5f8cCbXg6ZWsyT BmjVvR+FXZWFuC1sJyxMJtn+BFxAJ8M2GyyqleTKW4hhEiUpsaCIUaQ51BVhMNxNbpYcKV 1N0WboY5VK2vLS/l4MRf+rtzNyEeQ5FOLEXcbOIlphHFrOHRR13wO21dQQ9pF7L0K4rWGb 2nxquSSuGjSp1Qmi98MTAL8rh68D956tYfKqV5dGPXGqzNNC/ugffWJYMIzHjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnycJ3VlhzDW8 for ; Fri, 09 Jan 2026 23:27:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31b42 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:27:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 9ad643ff2e50 - stable/15 - snd_dummy: Initial MIDI support List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 9ad643ff2e50dd241b5176f8261287a18d492890 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:27:44 +0000 Message-Id: <69618ef0.31b42.c9f6e14@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=9ad643ff2e50dd241b5176f8261287a18d492890 commit 9ad643ff2e50dd241b5176f8261287a18d492890 Author: Christos Margiolis AuthorDate: 2026-01-02 16:56:07 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:23 +0000 snd_dummy: Initial MIDI support Because testing the midi/ code of sound(4) requires a physical MIDI device, add some basic MIDI support to snd_dummy(4) so that we can test patches to midi/ easier. Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54127 (cherry picked from commit e963472ef8533fb39b581e746cdc2ddc7447dca2) --- sys/dev/sound/dummy.c | 47 +++++++++++++++++++++++++++++++++ sys/modules/sound/driver/dummy/Makefile | 2 +- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/sys/dev/sound/dummy.c b/sys/dev/sound/dummy.c index 74ca1d0c924c..aec76339ae17 100644 --- a/sys/dev/sound/dummy.c +++ b/sys/dev/sound/dummy.c @@ -40,7 +40,10 @@ #endif #include +#include + #include +#include #define DUMMY_NPCHAN 1 #define DUMMY_NRCHAN 1 @@ -66,6 +69,8 @@ struct dummy_softc { struct callout callout; struct mtx lock; bool stopped; + struct mpu401 *mpu; + mpu401_intr_t *mpu_intr; }; static bool @@ -93,6 +98,9 @@ dummy_chan_io(void *arg) struct dummy_chan *ch; int i = 0; + if (sc->mpu_intr) + (sc->mpu_intr)(sc->mpu); + if (sc->stopped) return; @@ -294,6 +302,39 @@ static kobj_method_t dummy_mixer_methods[] = { MIXER_DECLARE(dummy_mixer); +static uint8_t +dummy_mpu_read(struct mpu401 *arg, void *sc, int reg) +{ + return (0); +} + +static void +dummy_mpu_write(struct mpu401 *arg, void *sc, int reg, unsigned char b) +{ +} + +static int +dummy_mpu_uninit(struct mpu401 *arg, void *cookie) +{ + struct dummy_softc *sc = cookie; + + mtx_lock(&sc->lock); + sc->mpu_intr = NULL; + sc->mpu = NULL; + mtx_unlock(&sc->lock); + + return (0); +} + +static kobj_method_t dummy_mpu_methods[] = { + KOBJMETHOD(mpufoi_read, dummy_mpu_read), + KOBJMETHOD(mpufoi_write, dummy_mpu_write), + KOBJMETHOD(mpufoi_uninit, dummy_mpu_uninit), + KOBJMETHOD_END +}; + +static DEFINE_CLASS(dummy_mpu, dummy_mpu_methods, 0); + static void dummy_identify(driver_t *driver, device_t parent) { @@ -354,6 +395,11 @@ dummy_attach(device_t dev) */ make_dev_alias(sc->info.dsp_dev, "dsp.dummy"); + sc->mpu = mpu401_init(&dummy_mpu_class, sc, dummy_chan_io, + &sc->mpu_intr); + if (sc->mpu == NULL) + return (ENXIO); + return (0); } @@ -368,6 +414,7 @@ dummy_detach(device_t dev) mtx_unlock(&sc->lock); callout_drain(&sc->callout); err = pcm_unregister(dev); + mpu401_uninit(sc->mpu); mtx_destroy(&sc->lock); return (err); diff --git a/sys/modules/sound/driver/dummy/Makefile b/sys/modules/sound/driver/dummy/Makefile index fb4127d35073..41dec7c83b4d 100644 --- a/sys/modules/sound/driver/dummy/Makefile +++ b/sys/modules/sound/driver/dummy/Makefile @@ -1,7 +1,7 @@ .PATH: ${SRCTOP}/sys/dev/sound KMOD= snd_dummy -SRCS= bus_if.h device_if.h +SRCS= bus_if.h device_if.h mpufoi_if.h SRCS+= dummy.c .include From nobody Fri Jan 9 23:27:45 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnycK6j1Vz6MY8R for ; Fri, 09 Jan 2026 23:27:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnycK4kjcz3n2Q for ; Fri, 09 Jan 2026 23:27:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J1/4jOshfYMf28wThLxkOAhTL7EcCMgAjXUkSaJaFfg=; b=FWnaoVklSllABv/43+Awy6lgzw6XyaflSGHk/gFhrlEKS9OQ/jhfafZQe+PpE8/pOjqPg3 ztWHtjK3X11qQaySEeda2ddGIUL/1+7TW1N/dG+TlJzd1jfx0JaRwVLqX/lVmXIz/c6+/J +3ieT2Z5fZGch/PlU2fbBXRBQ/VGD4jeBdH3qRG3spMGzqIDDaZX12bVbJUi/4RW0EfeHu EmMJMjyEXSsbuYU6zDhTqrpGgN5CFKJU7MkyEP63y3sVVNZtI8nL0YLfMojgETo4SaQOBw MYTFYuvCx/iqTclwWQeu/Dn3p6uHLBTzs6R+j+t5M5WrATEM6xOtKdn/rMoUOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J1/4jOshfYMf28wThLxkOAhTL7EcCMgAjXUkSaJaFfg=; b=jPArfWIrGY5HfKBguT67CEZjpqkTeEx20gzSz7Le7fkvZFGxxvdlo7vKIGtdENSAfxZ1M6 /0tfHKBSm/YyUiFTXwGF9iiUeJSw3iingVRknK1uyJJtfc5jAzGLG463TTDz/8vuUtDpS3 Brcrdhcm8SFw/Ex1QwEFk+Nmz893sB9rJehRXk6j1TSJVy4JA57t8EeKqgNuMJowkwFAER 52N+jT2fs4btlmgllvxhc96cfvql19yMKrhu73cdOXkvVFlbkWAZRLM6bXKsJTdQVnW0VB uNM/N+IQwMD8HnSc3b555lyzKuxG+z5oTw1pfqcWiwuDoa3du9JU6nxeJtbCGw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001265; a=rsa-sha256; cv=none; b=KzR7oIaLAtqdd95ZLcD+F/JLaWbQasGZjeKQJ6ySEJB2tMk11/svgyBf6rTWZjZj++w/Hy Dm+Hsr0UtlBQzayaGber5ju9XMR3goANqlg1283sb96/DDRzIfoUlGBJ3RWSKi6KgPUHAU a8ScmmT2NphP5paST5/WnjVGni1UeE63Nakhrn+vdrxFvU0jvZBHlRMur4x9SOQClQaWog QPG3P0FA/r8VwOFJq6WrpSdChe2XdB3Et9IffnLmp3BP3JjgUFWz6fzGAM/IYF2nBPqq8A II8SWh4x0GYvkflJ4NfoINjXe9XlbboEmMOIC+7j38W46O8/aDQjZD7LMoFSpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnycK4H1ZzTWr for ; Fri, 09 Jan 2026 23:27:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3266d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:27:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 99ed1fc93f44 - stable/15 - sound: Retire snd_midi->qlock List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 99ed1fc93f44be5eb935762e4fd1dd420200527a Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:27:45 +0000 Message-Id: <69618ef1.3266d.6634094@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=99ed1fc93f44be5eb935762e4fd1dd420200527a commit 99ed1fc93f44be5eb935762e4fd1dd420200527a Author: Christos Margiolis AuthorDate: 2026-01-02 16:56:12 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:23 +0000 sound: Retire snd_midi->qlock snd_midi->qlock is used to protect snd_midi->{in,out}q. However, apart from the numerous LORs present already in the code, there is no reason not to use snd_midi->lock, as we do for the rest of the structure Started by: https://github.com/freebsd/freebsd-src/pull/1902 Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: dev_nicolas-provost.fr Differential Revision: https://reviews.freebsd.org/D54129 (cherry picked from commit 4cc78f5dd7c2e82571ced6e23fa22d48c6cd1697) --- sys/dev/sound/midi/midi.c | 60 +++++++++++++++++------------------------------ 1 file changed, 22 insertions(+), 38 deletions(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index 8a74732c8907..0ed03dbc898b 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -58,7 +58,7 @@ MALLOC_DEFINE(M_MIDI, "midi buffers", "Midi data allocation area"); #define MIDI_NAMELEN 16 struct snd_midi { KOBJ_FIELDS; - struct mtx lock; /* Protects all but queues */ + struct mtx lock; void *cookie; int unit; @@ -67,7 +67,6 @@ struct snd_midi { int busy; int flags; /* File flags */ char name[MIDI_NAMELEN]; - struct mtx qlock; /* Protects inq, outq and flags */ MIDIQ_HEAD(, char) inq, outq; int rchan, wchan; struct selinfo rsel, wsel; @@ -131,10 +130,8 @@ midi_init(kobj_class_t cls, void *cookie) goto err1; mtx_init(&m->lock, "raw midi", NULL, 0); - mtx_init(&m->qlock, "q raw midi", NULL, 0); mtx_lock(&m->lock); - mtx_lock(&m->qlock); if (inqsize) buf = malloc(sizeof(uint8_t) * inqsize, M_MIDI, M_NOWAIT); @@ -165,7 +162,6 @@ midi_init(kobj_class_t cls, void *cookie) goto err2; mtx_unlock(&m->lock); - mtx_unlock(&m->qlock); m->dev = make_dev(&midi_cdevsw, m->unit, UID_ROOT, GID_WHEEL, 0666, "midi%d.%d", m->unit, m->channel); @@ -174,7 +170,6 @@ midi_init(kobj_class_t cls, void *cookie) return m; err2: - mtx_destroy(&m->qlock); mtx_destroy(&m->lock); if (MIDIQ_BUF(m->inq)) @@ -246,17 +241,18 @@ midi_in(struct snd_midi *m, uint8_t *buf, int size) { int used; + mtx_lock(&m->lock); + MIDI_DEBUG(5, printf("midi_in: m=%p size=%d\n", m, size)); -/* - * XXX: locking flub - */ - if (!(m->flags & M_RX)) - return size; + if (!(m->flags & M_RX)) { + /* We should return 0 but this may stop receiving/sending. */ + mtx_unlock(&m->lock); + return (size); + } used = 0; - mtx_lock(&m->qlock); MIDI_DEBUG(6, printf("midi_in: len %jd avail %jd\n", (intmax_t)MIDIQ_LEN(m->inq), (intmax_t)MIDIQ_AVAIL(m->inq))); @@ -265,7 +261,7 @@ midi_in(struct snd_midi *m, uint8_t *buf, int size) MIDIQ_ENQ(m->inq, buf, size); } else { MIDI_DEBUG(4, printf("midi_in: Discarding data qu\n")); - mtx_unlock(&m->qlock); + mtx_unlock(&m->lock); return 0; } if (m->rchan) { @@ -273,7 +269,7 @@ midi_in(struct snd_midi *m, uint8_t *buf, int size) m->rchan = 0; } selwakeup(&m->rsel); - mtx_unlock(&m->qlock); + mtx_unlock(&m->lock); return used; } @@ -285,14 +281,14 @@ midi_out(struct snd_midi *m, uint8_t *buf, int size) { int used; -/* - * XXX: locking flub - */ - if (!(m->flags & M_TXEN)) - return 0; + mtx_lock(&m->lock); MIDI_DEBUG(2, printf("midi_out: %p\n", m)); - mtx_lock(&m->qlock); + if (!(m->flags & M_TXEN)) { + mtx_unlock(&m->lock); + return (0); + } + used = MIN(size, MIDIQ_LEN(m->outq)); MIDI_DEBUG(3, printf("midi_out: used %d\n", used)); if (used) @@ -308,7 +304,7 @@ midi_out(struct snd_midi *m, uint8_t *buf, int size) } selwakeup(&m->wsel); } - mtx_unlock(&m->qlock); + mtx_unlock(&m->lock); return used; } @@ -324,7 +320,6 @@ midi_open(struct cdev *i_dev, int flags, int mode, struct thread *td) return ENXIO; mtx_lock(&m->lock); - mtx_lock(&m->qlock); retval = 0; @@ -365,7 +360,7 @@ midi_open(struct cdev *i_dev, int flags, int mode, struct thread *td) MIDI_DEBUG(2, printf("midi_open: opened.\n")); -err: mtx_unlock(&m->qlock); +err: mtx_unlock(&m->lock); return retval; } @@ -384,7 +379,6 @@ midi_close(struct cdev *i_dev, int flags, int mode, struct thread *td) return ENXIO; mtx_lock(&m->lock); - mtx_lock(&m->qlock); if ((flags & FREAD && !(m->flags & M_RX)) || (flags & FWRITE && !(m->flags & M_TX))) { @@ -405,7 +399,6 @@ midi_close(struct cdev *i_dev, int flags, int mode, struct thread *td) MIDI_DEBUG(1, printf("midi_close: closed, busy = %d.\n", m->busy)); - mtx_unlock(&m->qlock); mtx_unlock(&m->lock); retval = 0; err: return retval; @@ -433,7 +426,6 @@ midi_read(struct cdev *i_dev, struct uio *uio, int ioflag) goto err0; mtx_lock(&m->lock); - mtx_lock(&m->qlock); if (!(m->flags & M_RX)) goto err1; @@ -443,9 +435,8 @@ midi_read(struct cdev *i_dev, struct uio *uio, int ioflag) retval = EWOULDBLOCK; if (ioflag & O_NONBLOCK) goto err1; - mtx_unlock(&m->lock); m->rchan = 1; - retval = msleep(&m->rchan, &m->qlock, + retval = msleep(&m->rchan, &m->lock, PCATCH | PDROP, "midi RX", 0); /* * We slept, maybe things have changed since last @@ -459,7 +450,6 @@ midi_read(struct cdev *i_dev, struct uio *uio, int ioflag) if (retval) goto err0; mtx_lock(&m->lock); - mtx_lock(&m->qlock); m->rchan = 0; if (!m->busy) goto err1; @@ -483,7 +473,7 @@ midi_read(struct cdev *i_dev, struct uio *uio, int ioflag) * If we Made it here then transfer is good */ retval = 0; -err1: mtx_unlock(&m->qlock); +err1: mtx_unlock(&m->lock); err0: MIDI_DEBUG(4, printf("midi_read: ret %d\n", retval)); return retval; @@ -508,7 +498,6 @@ midi_write(struct cdev *i_dev, struct uio *uio, int ioflag) goto err0; mtx_lock(&m->lock); - mtx_lock(&m->qlock); if (!(m->flags & M_TX)) goto err1; @@ -518,10 +507,9 @@ midi_write(struct cdev *i_dev, struct uio *uio, int ioflag) retval = EWOULDBLOCK; if (ioflag & O_NONBLOCK) goto err1; - mtx_unlock(&m->lock); m->wchan = 1; MIDI_DEBUG(3, printf("midi_write msleep\n")); - retval = msleep(&m->wchan, &m->qlock, + retval = msleep(&m->wchan, &m->lock, PCATCH | PDROP, "midi TX", 0); /* * We slept, maybe things have changed since last @@ -534,7 +522,6 @@ midi_write(struct cdev *i_dev, struct uio *uio, int ioflag) if (retval) goto err0; mtx_lock(&m->lock); - mtx_lock(&m->qlock); m->wchan = 0; if (!m->busy) goto err1; @@ -567,7 +554,7 @@ midi_write(struct cdev *i_dev, struct uio *uio, int ioflag) * If we Made it here then transfer is good */ retval = 0; -err1: mtx_unlock(&m->qlock); +err1: mtx_unlock(&m->lock); err0: return retval; } @@ -591,7 +578,6 @@ midi_poll(struct cdev *i_dev, int events, struct thread *td) revents = 0; mtx_lock(&m->lock); - mtx_lock(&m->qlock); if (events & (POLLIN | POLLRDNORM)) { if (!MIDIQ_EMPTY(m->inq)) @@ -607,7 +593,6 @@ midi_poll(struct cdev *i_dev, int events, struct thread *td) } mtx_unlock(&m->lock); - mtx_unlock(&m->qlock); return (revents); } @@ -631,7 +616,6 @@ midi_destroy(struct snd_midi *m, int midiuninit) free_unr(chn_unr, m->channel); free(MIDIQ_BUF(m->inq), M_MIDI); free(MIDIQ_BUF(m->outq), M_MIDI); - mtx_destroy(&m->qlock); mtx_destroy(&m->lock); free(m, M_MIDI); return 0; From nobody Fri Jan 9 23:27:46 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnycL71H7z6MXvF for ; Fri, 09 Jan 2026 23:27:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnycL5lKxz3mwn for ; Fri, 09 Jan 2026 23:27:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kTqJh4HaZnfgoJqw95bryn5tKPqcZ/lw04iiIFZDYU8=; b=PQP/p83oyh6/9rdVMT2alDSJToQvOTxPV9BDU/M7kIkjIthUJbbQH5Smb0P/8BegYe8RYP AAS1H9aeopnfxtQxsmkb9wuCjafOcQZjf+depF+EJNoucaCGzBjf+WHB39Xiem3Loei7H2 xC/Co3r/qhgUhZCo8RZRGjnVgfi3aqfz3t/0ghBxtDNDVr9Gqp+SlFhPHcCxeUXYBhiYcL vJKBUNHFWRjkokETRnFf9+JG2xDosff7CAPo8wQAd+4Owpxcc+TDJNo5ux8VYX0veQX/Du U1647PypKujkx9rlS6Q1SNFLF4HzmfRxk4ZPKwNUsdb2NsttdVBa7gj5ChcZ1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kTqJh4HaZnfgoJqw95bryn5tKPqcZ/lw04iiIFZDYU8=; b=Bc02QBpgKYV0/oLIZRXDJXBiL/tZkB/WYjtPId971ICURCo6QXr9gBjNcgLswjVtZo4CUV JWODAuYBRFvu9i5zifurMlrfgfYDdS5aHAn0hkQiD9+A21jJ4EYgqTGzlD3G3nDMtf+lWF eHaIi1Z4uIbjD2AEyjHgEBYbpSxOtcEwd7tELz6EujKt0jKHZ6Zu2/ed0h9kyoD7qbjOFa j3T9pv94g+KE/mjKDqRDFezcfDl8Pkryxp2I3GdWZquwUTCR0+rVQyriJGC751bFQLaxx7 lMWkPV4aVMCKrTAIr67r3ATBe+z/bErzSWsySpgo0uYgnrqlWNNpJlpZvauvyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001266; a=rsa-sha256; cv=none; b=EgqsZsEF99Mr04kNZ8M2vdL8ajuyOo8MmtQ3J1Xa5ka7yumyqOQ8tEe42s188vILE87uUP eUSTzdbbahiJziYRL6WJbRqvNq2ylAbmmG5mA1ewojPslWPIsbRanWFuqVLLJyrE0On4ni DB06W3WkIGVSnS+5oH+ZAFXrtcMAycf1TKtRy8igzkrs2shUzG2gRAF5Gx7Z7xrca9hR6g Lh2ET6Nhk9/747tzwFO1g0P3wfLz4fBCKncUJB6vz8KH+MHlkITI0yCUhzN9d+VCE8tJ9x UuFMug2VzWHtI4fVzWD9QOv24jzDhbAWUESiNVFkjp8+dyNF9oxmpjl5pExwiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnycL5B71zTWt for ; Fri, 09 Jan 2026 23:27:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32f6a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:27:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 5d794b0d63ab - stable/15 - sound: Update midi/midi.* LICENSE List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 5d794b0d63abc4bc4c4bbff53b4ed270c56425a5 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:27:46 +0000 Message-Id: <69618ef2.32f6a.1e4dcb06@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=5d794b0d63abc4bc4c4bbff53b4ed270c56425a5 commit 5d794b0d63abc4bc4c4bbff53b4ed270c56425a5 Author: Christos Margiolis AuthorDate: 2026-01-02 16:56:15 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:23 +0000 sound: Update midi/midi.* LICENSE Spsonsored by: The FreeBSD Foundation MFC after: 1 week (cherry picked from commit fb945a50e2649c9a1c3a9b38ffb84f53e37abd0a) --- sys/dev/sound/midi/midi.c | 4 ++++ sys/dev/sound/midi/midi.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index 0ed03dbc898b..901e098d4883 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -4,6 +4,10 @@ * Copyright (c) 2003 Mathew Kanner * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. + * Copyright (c) 2025 The FreeBSD Foundation + * + * Portions of this software were developed by Christos Margiolis + * under sponsorship from the FreeBSD Foundation. * * This code is derived from software contributed to The NetBSD Foundation * by Lennart Augustsson (augustss@netbsd.org). diff --git a/sys/dev/sound/midi/midi.h b/sys/dev/sound/midi/midi.h index a4e6c2801150..c012a9d96da6 100644 --- a/sys/dev/sound/midi/midi.h +++ b/sys/dev/sound/midi/midi.h @@ -3,6 +3,10 @@ * * Copyright (c) 2003 Mathew Kanner * All rights reserved. + * Copyright (c) 2025 The FreeBSD Foundation + * + * Portions of this software were developed by Christos Margiolis + * 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 From nobody Fri Jan 9 23:27:47 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnycN1JCSz6MYQ0 for ; Fri, 09 Jan 2026 23:27:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnycM5z6nz3mwt for ; Fri, 09 Jan 2026 23:27:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IDo/3dSS5L0y+jF8h825cZUfuwLLgoRZvzNu/SU3i8I=; b=mV9s85EQCQVwSjTRGpsNguwR+285wH+OJwumpkoFXJXvp7y7nWd8vp3enG+JR6chPuzO1U jH5SMSO3mwc9teilMEbDJEhirWmEZOrM/QfrIG+Akmp/+lepurG4o1yJu4BGYjYIgP1sTn +e/D9ut10UGmzE88xVad/wU2RyfOKO0lRcCD4R4cjHrsUkVbYhEI7nWPJhIOop0/qHpxoj dvgRTYrVHKii9aUIajoVJBTNlGAFhOAO0N+Hj0/WEC1BZyCB2mL/IY4zrpETU70eb6asCt dyHZ0XXKEjDjiB50LY924hkFANZsq0lux5xhaKcWzXmZYv1ddEZQI9dQq/x/MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IDo/3dSS5L0y+jF8h825cZUfuwLLgoRZvzNu/SU3i8I=; b=aw79IwHZh2pQV5ruwEl5jIt3KreUnJ3Dtys0ViteUe3MvO9TAugmYIswUAUyqlZywmPlEQ lCJhRGGW+/ZdecTEhaBiCtalUv5ktImaSGlZyozuJCV4qcJZ6Oicq0E7K6qBH75WX1KhT4 L6TsWkItDa45SpJ4mfZ5gm97+BJsu4Jq/MYngtrxQsut13t7I61OeN8XtNOLBx6xInx0vs lgd16rCvdHxAZ+1ZIAr0ek+dEZhUigJBbQt5IJCLO+8AwDp64AK9TDuo+UuxkzNUnQ/H/1 PqLgeASTdOu9ytPgPpuOCabLGIk9ujo+Wm9bZjNG3pEa20tH6AdHbjFmsKNhFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001267; a=rsa-sha256; cv=none; b=v951Ku1fneRrLZiTqzS46Myo6PitZtBB/xQO1DwxNTjauXiZqX14voPAmjsD3KlKpWYPxl Ej3sbPbN9dJPQ236ZaS6HqxaKbkEYnJuC5TGJCPoMxo0pavPiz0reBDIR2wl7+S1w3PPjI F/6jb0oRhagh1RehITRTrj5CT6U6ADf6+1QPHJvyWlvQ4U3aX7KnfiM2Se8V8BSdhZERx4 1/B4zrqSfKMqlOTwYIh4T9byROXIPgtXOttes2+fvJFTqrgUnUrW4pZjHRVxcVmnS3nQm7 DafNzbZGSedLqAmlrbGfRS6/HSIsHiBkCakUYC8f/3/SypQOzwhm04zGykMeYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnycM5SpczTZM for ; Fri, 09 Jan 2026 23:27:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31e43 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:27:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 8c005f3da817 - stable/15 - sound: Merge midi_destroy() with midi_uninit() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 8c005f3da817456de3fc2f7d186b4898fcdff704 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:27:47 +0000 Message-Id: <69618ef3.31e43.305b701c@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=8c005f3da817456de3fc2f7d186b4898fcdff704 commit 8c005f3da817456de3fc2f7d186b4898fcdff704 Author: Christos Margiolis AuthorDate: 2026-01-02 16:56:19 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:23 +0000 sound: Merge midi_destroy() with midi_uninit() Also always call MPU_UNINIT(). It does not make sense not to if we are deallocating everything. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D54192 (cherry picked from commit d912ea5879cd6b1042671ae3986d496c63be4d49) --- sys/dev/sound/midi/midi.c | 57 ++++++++++++----------------------------------- 1 file changed, 14 insertions(+), 43 deletions(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index 901e098d4883..2567f7412eb8 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -97,8 +97,6 @@ static struct cdevsw midi_cdevsw = { .d_name = "rmidi", }; -static int midi_destroy(struct snd_midi *, int); - struct unrhdr *dev_unr = NULL; struct unrhdr *chn_unr = NULL; @@ -186,21 +184,15 @@ err1: return NULL; } -/* - * midi_uninit does not call MIDI_UNINIT, as since this is the implementors - * entry point. midi_uninit if fact, does not send any methods. A call to - * midi_uninit is a defacto promise that you won't manipulate ch anymore - */ int midi_uninit(struct snd_midi *m) { - int err; - - err = EBUSY; mtx_lock(&m->lock); if (m->busy) { - if (!(m->rchan || m->wchan)) - goto err; + if (!(m->rchan || m->wchan)) { + mtx_unlock(&m->lock); + return (EBUSY); + } if (m->rchan) { wakeup(&m->rchan); @@ -211,14 +203,17 @@ midi_uninit(struct snd_midi *m) m->wchan = 0; } } - err = midi_destroy(m, 0); - if (!err) - goto exit; - -err: mtx_unlock(&m->lock); -exit: - return err; + MPU_UNINIT(m, m->cookie); + destroy_dev(m->dev); + free_unr(dev_unr, m->unit); + free_unr(chn_unr, m->channel); + free(MIDIQ_BUF(m->inq), M_MIDI); + free(MIDIQ_BUF(m->outq), M_MIDI); + mtx_destroy(&m->lock); + free(m, M_MIDI); + + return (0); } #ifdef notdef @@ -601,30 +596,6 @@ midi_poll(struct cdev *i_dev, int events, struct thread *td) return (revents); } -/* - * Single point of midi destructions. - */ -static int -midi_destroy(struct snd_midi *m, int midiuninit) -{ - mtx_assert(&m->lock, MA_OWNED); - - MIDI_DEBUG(3, printf("midi_destroy\n")); - m->dev->si_drv1 = NULL; - mtx_unlock(&m->lock); /* XXX */ - destroy_dev(m->dev); - /* XXX */ - if (midiuninit) - MPU_UNINIT(m, m->cookie); - free_unr(dev_unr, m->unit); - free_unr(chn_unr, m->channel); - free(MIDIQ_BUF(m->inq), M_MIDI); - free(MIDIQ_BUF(m->outq), M_MIDI); - mtx_destroy(&m->lock); - free(m, M_MIDI); - return 0; -} - static void midi_sysinit(void *data __unused) { From nobody Fri Jan 9 23:27:49 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnycQ43kkz6Mp3j for ; Fri, 09 Jan 2026 23:27:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnycQ0Njyz3mvB for ; Fri, 09 Jan 2026 23:27:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jyiohOMxZxQ8iVf5+fJimCeFzYbowak8L11+czpZzeM=; b=tAY7LkEPeZqkRQmdsvYzzvN4QudeLch6zn7dDf8cPwOp14rd+FKmtT1A5yxDco46hwMDZQ UmFPfd8xqYazszKp7HQqjL5i7rzGeg+VwlGASr8k2/ZTnAuxYMrcTvPWsrcQ3Put5MECHO 3LtXlW6wp5aOWXEw1vfW0jKpeABk28cYyl8fSydaA/JXehqpYIXbxZrTuEU+H9sl58Nhl6 VwuyEzj4JhZjVeuQvGeNpd3AE8Eq7vGlm0ahyd9reS/naXwhmJgYyYBK70oRxk4ksJY9gg h9/Z8ZcGeH9no/V/LGAH5234Pu5BwzwT/gTwAMm9ivF9P3JovKRsupePSkqlNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jyiohOMxZxQ8iVf5+fJimCeFzYbowak8L11+czpZzeM=; b=yNzPrNCooYxilQjJoLbs7F0viq5E4K7V2zCcY2cjFHPvYXyfd5iyqR2t/F4P+OQdntYvJL i9aGXJMxE5W/ohcallcbtUDWHsQXXSmCpU3DGJh2OXpJyw4TOr/Hu0A23McgGytJz0BsP8 Ttg+N5aPoNOExXY26c5ARsRJs0siqj2YYoZRMhusPLtV8sU6UBwhaKHkWVifiH5ACae2tA ulUr6/+39bnrIARLtY7fxt1L3UuVu1G4D/38XLNxskLgkrl1ZaQcraHaivUX2UHJ4My/ir kkZmub6mzZ8LC0c2GaFC9/OsPliAXB2nFxQsFuO0905h36H0YUb3QxO8iIEBpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001270; a=rsa-sha256; cv=none; b=V3RvZoPqEkEnsLYoDaB/n20HacVf4q66cZ7xZsmTESSxF80i8t+BXH0lmT3V2R5foH6fzC zZepkLpUlRy6zAwr0gxNIKP24kdRf8/ofwLFn4JqGa6UnFu4cfK68RlcyMg1uug3QK7lF4 VzKBUYOGy/35k5dLKQjSoQwO2hT7KM7nZeEcabbG3oRr6UmYlw8p9rkUd8X0Beo45BUkKS FTmMX3+Q1b4c0bql9VoDffY0b2oUn4bbOWQZx1NpSdQvrpiQ7GvWhDkgbBvpDrAa52XUkF jXIn95ZzqMSlPiQdRU6CxM0mjWuIKh/Zuc+MrdNFfhlL3Clgy67eoI7oVwxYPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnycP6k76zDG0 for ; Fri, 09 Jan 2026 23:27:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32b32 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:27:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 7b86ef4a4f37 - stable/15 - sound: Remove dead if-statement List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 7b86ef4a4f37d7deb3d3b96c2bae507fafeb3dba Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:27:49 +0000 Message-Id: <69618ef5.32b32.744b9c5d@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=7b86ef4a4f37d7deb3d3b96c2bae507fafeb3dba commit 7b86ef4a4f37d7deb3d3b96c2bae507fafeb3dba Author: Christos Margiolis AuthorDate: 2026-01-02 16:56:24 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:23 +0000 sound: Remove dead if-statement No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 1 week (cherry picked from commit d2baf9301be3093c5f53a7ce1de858a0c690cd07) --- sys/dev/sound/midi/midi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index aa039018e207..f54b95daf280 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -432,7 +432,6 @@ midi_read(struct cdev *i_dev, struct uio *uio, int ioflag) goto err0; if (m != i_dev->si_drv1) retval = ENXIO; - /* if (retval && retval != ERESTART) */ if (retval) goto err0; mtx_lock(&m->lock); From nobody Fri Jan 9 23:27:48 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnycP0b1dz6MYQ7 for ; Fri, 09 Jan 2026 23:27:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnycN6gNfz3n35 for ; Fri, 09 Jan 2026 23:27:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2nO2T5SJfmUaVdL2I8SLL89wuWsoQuh4v7J3ql1q2zQ=; b=mg6oUiC52iGWI01O6maSbIqKgDIz52oSLkZcltsJUcjJtLKGlk+OSPg6COucT8Q0BQdsLp 7nDUqsDn3bwTRjs+z7IoWbb1FMzXYrKmTTSvH8oE76OL5WC2QUdoxIzWZJKl8s0QiwN206 CiX36SUQVVciJNXXVF7J4P7YO3YrrPh5JvVp8FWYuqliwBRUW0hNEBYDCoLGoADD7fSWRz E5OpxPbSERTq0sdxresaKjMDwKTyA4zQaLNoHn3f5PclaiygfgQyuETi6YmiuJbPf3wqe3 CZxNC605wwSWylMLEfoqSZ+mkG+aa/TUin6Engz0NGNU+lp0/UtrqJr8uwGbIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2nO2T5SJfmUaVdL2I8SLL89wuWsoQuh4v7J3ql1q2zQ=; b=xaaa51hxd/mImMvsixlvMlazFydXYse4gyIMKncjOHn4AuQ6bFuhqYVbRIXaGUwcmPAHLv rfJYJ/5qmyhWglc1rVZlcwU61J3eUBJKlUaG7MoktEH08tbiNj2Lpu2Z03KzWsByXrKu/1 qp1Pd/XmhO8R5+7B2uVeg4Pys4DNIlAowu4OVnGweJQnERwCnVIitEKKUceCMnCQsxKA9B QKjcg0cBSdoVXIJqsCxpF9AyMh7uuYekvjrEo0mVouiLNrQyte4tg+vC/IH/zZTzZ78sFe SM5BLJRps8FbL29RdtBKkwacERuuXwudz5peIPK7Rhz3WPcatMIx/yHUBRdKjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001268; a=rsa-sha256; cv=none; b=LUmXYGuBnOY34aqVToOyO0rSmr/5j+TxSuq6O2yHh/blRkTUzcs0ZnYxFHTq9f8qp5YBL2 IQ6S+j/LkuGoky5fCgWLl3hMTTOj0zyFomniU2BO16I6/2e1XSmY19jWbvs8BCLN1jOkKQ PFgaIJCSE7/FBcODKBlkXD3ozk2duPJma7wFIroecg6s4C72AVOOM9/zGxwYJFGHhmFw3b tMOrctaHryOAg+KXXnP3HNAex8iQ1AdRdC5yrTkVLgmYXsRlB6OKtoGfZTYBnYEAUufjcX 1IufvjXlSIuw6DGiW0m70SRix1SAk3Pjq9IziQOsJLrPaliU4Xm0XCFHyRWBag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnycN6DLQzTWw for ; Fri, 09 Jan 2026 23:27:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32b31 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:27:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 177ea29c6baf - stable/15 - sound: Retire snd_midi->busy List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 177ea29c6bafc760d084c7bd1871f6d38faa191c Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:27:48 +0000 Message-Id: <69618ef4.32b31.6a74e6fc@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=177ea29c6bafc760d084c7bd1871f6d38faa191c commit 177ea29c6bafc760d084c7bd1871f6d38faa191c Author: Christos Margiolis AuthorDate: 2026-01-02 16:56:22 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:23 +0000 sound: Retire snd_midi->busy Sponsored by: The FreeBSD Foundation MFC after: 1 week (cherry picked from commit d54c782fde63d3b17433551da0b7ec94bc2a5ed4) --- sys/dev/sound/midi/midi.c | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index 2567f7412eb8..aa039018e207 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -68,7 +68,6 @@ struct snd_midi { int unit; int channel; - int busy; int flags; /* File flags */ char name[MIDI_NAMELEN]; MIDIQ_HEAD(, char) inq, outq; @@ -154,7 +153,6 @@ midi_init(kobj_class_t cls, void *cookie) (outqsize && !MIDIQ_BUF(m->outq))) goto err2; - m->busy = 0; m->flags = 0; m->unit = alloc_unr(dev_unr); m->channel = alloc_unr(chn_unr); @@ -188,20 +186,13 @@ int midi_uninit(struct snd_midi *m) { mtx_lock(&m->lock); - if (m->busy) { - if (!(m->rchan || m->wchan)) { - mtx_unlock(&m->lock); - return (EBUSY); - } - - if (m->rchan) { - wakeup(&m->rchan); - m->rchan = 0; - } - if (m->wchan) { - wakeup(&m->wchan); - m->wchan = 0; - } + if (m->rchan) { + wakeup(&m->rchan); + m->rchan = 0; + } + if (m->wchan) { + wakeup(&m->wchan); + m->wchan = 0; } mtx_unlock(&m->lock); MPU_UNINIT(m, m->cookie); @@ -338,7 +329,6 @@ midi_open(struct cdev *i_dev, int flags, int mode, struct thread *td) if (retval) goto err; } - m->busy++; m->rchan = 0; m->wchan = 0; @@ -384,7 +374,6 @@ midi_close(struct cdev *i_dev, int flags, int mode, struct thread *td) retval = ENXIO; goto err; } - m->busy--; oldflags = m->flags; @@ -396,8 +385,6 @@ midi_close(struct cdev *i_dev, int flags, int mode, struct thread *td) if ((m->flags & (M_TXEN | M_RXEN)) != (oldflags & (M_RXEN | M_TXEN))) MPU_CALLBACK(m, m->cookie, m->flags); - MIDI_DEBUG(1, printf("midi_close: closed, busy = %d.\n", m->busy)); - mtx_unlock(&m->lock); retval = 0; err: return retval; @@ -450,8 +437,6 @@ midi_read(struct cdev *i_dev, struct uio *uio, int ioflag) goto err0; mtx_lock(&m->lock); m->rchan = 0; - if (!m->busy) - goto err1; } MIDI_DEBUG(6, printf("midi_read start\n")); /* @@ -522,8 +507,6 @@ midi_write(struct cdev *i_dev, struct uio *uio, int ioflag) goto err0; mtx_lock(&m->lock); m->wchan = 0; - if (!m->busy) - goto err1; } /* From nobody Fri Jan 9 23:27:51 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnycS020Hz6Mp61 for ; Fri, 09 Jan 2026 23: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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnycR0rSYz3mvM for ; Fri, 09 Jan 2026 23:27:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nrhysZh7ag0Yp9Hqbwowl9TQcn/aEdnQR+prxD+BtnY=; b=kaprwoTK/LbNbHCy57FagPNUb2EhaK8MCDGKjVknrI6pRE7N4FvmEFXSHYtNBws9r9Tchs rRzEzvqfMTnf3LPA3rjXD1Na+xi81yRG4c/UpeC57rtayZ+Ikd6gXRIvnXBI3HkJ6fdjIa Y4X/GuxcmBskCJIDtL2k38Zm4NlGL3gtZ7gNjj5VdOM4WXHHG1muAtz3zLIsgBNET5Nmy6 JxUvXBovHC0cYP6s+hv1bf6WurMfkgmsHRrZ+cLDQUqxXq3nWhRbG3CREl6boW51U/hKHw wM4Bv1DTiDLGubJD24McAblxBy7e+gjxcI7BaZdVWT7JNKh+6D0mqjmMHCrh9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nrhysZh7ag0Yp9Hqbwowl9TQcn/aEdnQR+prxD+BtnY=; b=j0j4JW8yj5n7DC/SYYVPMveQtjDXxujOrGBuj9hvpd4ulq3LpXv9C2q5zoz7ZgCkUJPVeF fuHIk98zORV6BFWmCkeAiR5lyxToQRkNHBF6SY0PxqYNFXfybani+VtEYwEMJrbqQk3TEw X2AfurJX8S14y73NQBcmRu5gBSF4WK/gbQMu0OZGhIfKclSsydb8n08xtaD7p0Q1NGfhOg +szcdLjHsevF8V0r+36/KjZVa3PQzzIb9GHt24eO39TSOKrhx+PRBLrFbskp2pFu6mxr7p KjCveGnG52DHT2UfeSGx/qt06gYVc7G56GLdkifLG0lYV62urMUFE2iaVZlSmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001271; a=rsa-sha256; cv=none; b=m4R3A9OjsaTAgBGsPcgS8PaWZjNPcRSs3Dh01mdvkmw31BMimCSiVyOAh/IJRqG1LL6fUR +E/YL9iDtI6vyKGCsnBZSbqbbBo6DJzVgB4ae65WGp5OgjAoybaUdxo2ex7WDMuQc+k/Sg gsNvmi1eqTZWBaUGs8AwyHmuEACLhXaD84MfCqIw3/V5P79IpsFJ6k7zs5F3OJbLG0CLXl +0u8ShGQUjqxxfrRqSnIVQQFVN5VHLAOpCcRXdtxJrH6ROSG5Hs2pOxi66uRIRblvCtakO OciJaLeY5vgIEsBqHCis22N7ahvF3IR5viGDxW/PNoYPuUKEZRpVWqn2ol4ZVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnycR0R1czTZN for ; Fri, 09 Jan 2026 23:27:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31ad4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:27:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: e4f214686bce - stable/15 - sound: Rename midi_cdevsw name to "midi" List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: e4f214686bce7c2caddbce9790b85f0c02a9adaf Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:27:51 +0000 Message-Id: <69618ef7.31ad4.254b5945@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e4f214686bce7c2caddbce9790b85f0c02a9adaf commit e4f214686bce7c2caddbce9790b85f0c02a9adaf Author: Christos Margiolis AuthorDate: 2026-01-02 16:56:27 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:23 +0000 sound: Rename midi_cdevsw name to "midi" Sponsored by: The FreeBSD Foundation MFC after: 1 week (cherry picked from commit d6121f7b508bf889359e116da1efab08f848e129) --- sys/dev/sound/midi/midi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index f54b95daf280..c658c8001b94 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -93,7 +93,7 @@ static struct cdevsw midi_cdevsw = { .d_write = midi_write, .d_ioctl = midi_ioctl, .d_poll = midi_poll, - .d_name = "rmidi", + .d_name = "midi", }; struct unrhdr *dev_unr = NULL; @@ -109,7 +109,7 @@ SYSCTL_INT(_hw_midi, OID_AUTO, debug, CTLFLAG_RW, &midi_debug, 0, ""); #define MIDI_DEBUG(l,a) if(midi_debug>=l) a /* - * Register a new rmidi device. + * Register a new midi device. * * "cookie" is passed to the MPU calls, and is normally set to the driver's * softc. From nobody Fri Jan 9 23:27:52 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnycT3Lgtz6MY8c for ; Fri, 09 Jan 2026 23:27:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnycS1rX9z3n8C for ; Fri, 09 Jan 2026 23: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=1768001272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FG64DitR6Fz7zx2uiGKWKOzWWnPk4negEWohBwZGN5Y=; b=imjjhnmD5y7sVk8zJ1LJAmpxVFfneFSYxzQAusqaiRbTIvarwxOxhh6sHzvLaKLxMdvkj0 fcJdGoWRvjK26zWeJoAVYWm0XkGcHEzcbGAh1hww4CRUwvmrMUdcSapZHOoXztxY1bzNSl 9hfLBMnyYR6paiXYugRzO6PrjtPzOmi5Kc9YnVZGQMkqKnwWzaxVhxB5iKCkraNYkyPrCb iIpLtv39TCdBnCuvra30T+9JN0yzy12NPFCvWltdQOZBw3C2PpV6csd05XQzO+dRsUIMHh EeNYmOft+T4rDLXB3DlIREO3rvEcals+4lFTd2ODFPs3RfBZtn6gzczYD+QHHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001272; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FG64DitR6Fz7zx2uiGKWKOzWWnPk4negEWohBwZGN5Y=; b=vB/SlDygr26M4kxAMLcERgxpIQ9WJ9H51sFqzBqIpjytDKrImV0xN3uzP2o57YMj7pL/1V 8ba62Ub53pH8LPltgDdyo3xo9baBf/HCKP5Np4xbkOyEoj+dkthR+M8dS7qRByYj/6ygM8 gnSI6nG15TeHu7v84Nv0yAwbuR4UWN9e6LeqBZxI0oUEPhBaJpIYk/YhuwFhPw7BvdZ0B3 PqP+0r0cgPEDm1Eoaxtc/YfYBld/lmakeS1hSuHwZsR7ivCnd+BrDuYkbwioozKUhrmtvO qjYWuDzMdzgnjR0NM/jeYnBy/rarHmS5eMmEbIhFoNjHBkCc70jaO9bJzXJn1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001272; a=rsa-sha256; cv=none; b=mkeWE8NtUMNyZ4XG+brcVn31Y2IsnNh5+8Uz8W9yHr87S4Hlor9o8S0Bb7xvtIZfaBRNln FNE9yvRiuTMqxXuxdTIrcSloTn4APJv35wBZKTbmIPmf4VxD2x2WVQXXUzMikMto9roWN8 eAC7orKf67zdoZIzpVUx4OsWoeNVxy1/GdGzbpa/CZ+npvJyNYmG7/3ki38LvZ8850KK4X D8fA92X6Hemmt2bTwy+L5LQ/axwQKW5uxzgWc69GWmHlrnMdhYq8kU/q2XRDMh82yi/6zQ FhqSoOletZiLOqm4OctTFTRz9CzTDqk8ZUM2vqeX/i7pYToS3iCFJB7fVxatwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnycS1JlKzDZD for ; Fri, 09 Jan 2026 23:27:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32f71 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:27:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: b11224d935a3 - stable/15 - sound: Retire MIDI_DEBUG List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: b11224d935a39b4d4ebf78c2b6659f949c1cbb06 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:27:52 +0000 Message-Id: <69618ef8.32f71.21281152@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=b11224d935a39b4d4ebf78c2b6659f949c1cbb06 commit b11224d935a39b4d4ebf78c2b6659f949c1cbb06 Author: Christos Margiolis AuthorDate: 2026-01-02 16:56:29 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:23 +0000 sound: Retire MIDI_DEBUG Better logging will be implemented. Sponsored by: The FreeBSD Foundation MFC after: 1 week (cherry picked from commit c288595c4eac14616f94c5b7eb84aad2eeeffc1f) --- sys/dev/sound/midi/midi.c | 40 +--------------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index c658c8001b94..9b61e972fab9 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -45,7 +45,6 @@ #include #include #include -#include #include #ifdef HAVE_KERNEL_OPTION_HEADERS @@ -99,15 +98,6 @@ static struct cdevsw midi_cdevsw = { struct unrhdr *dev_unr = NULL; struct unrhdr *chn_unr = NULL; -SYSCTL_NODE(_hw, OID_AUTO, midi, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, - "Midi driver"); - -int midi_debug; -/* XXX: should this be moved into debug.midi? */ -SYSCTL_INT(_hw_midi, OID_AUTO, debug, CTLFLAG_RW, &midi_debug, 0, ""); - -#define MIDI_DEBUG(l,a) if(midi_debug>=l) a - /* * Register a new midi device. * @@ -126,7 +116,6 @@ midi_init(kobj_class_t cls, void *cookie) inqsize = MPU_INQSIZE(m, cookie); outqsize = MPU_OUTQSIZE(m, cookie); - MIDI_DEBUG(1, printf("midiinit queues %d/%d.\n", inqsize, outqsize)); if (!inqsize && !outqsize) goto err1; @@ -178,7 +167,6 @@ err2: free(MIDIQ_BUF(m->outq), M_MIDI); err1: free(m, M_MIDI); - MIDI_DEBUG(1, printf("midi_init ended in error\n")); return NULL; } @@ -233,8 +221,6 @@ midi_in(struct snd_midi *m, uint8_t *buf, int size) mtx_lock(&m->lock); - MIDI_DEBUG(5, printf("midi_in: m=%p size=%d\n", m, size)); - if (!(m->flags & M_RX)) { /* We should return 0 but this may stop receiving/sending. */ mtx_unlock(&m->lock); @@ -243,14 +229,10 @@ midi_in(struct snd_midi *m, uint8_t *buf, int size) used = 0; - MIDI_DEBUG(6, printf("midi_in: len %jd avail %jd\n", - (intmax_t)MIDIQ_LEN(m->inq), - (intmax_t)MIDIQ_AVAIL(m->inq))); if (MIDIQ_AVAIL(m->inq) > size) { used = size; MIDIQ_ENQ(m->inq, buf, size); } else { - MIDI_DEBUG(4, printf("midi_in: Discarding data qu\n")); mtx_unlock(&m->lock); return 0; } @@ -273,14 +255,12 @@ midi_out(struct snd_midi *m, uint8_t *buf, int size) mtx_lock(&m->lock); - MIDI_DEBUG(2, printf("midi_out: %p\n", m)); if (!(m->flags & M_TXEN)) { mtx_unlock(&m->lock); return (0); } used = MIN(size, MIDIQ_LEN(m->outq)); - MIDI_DEBUG(3, printf("midi_out: used %d\n", used)); if (used) MIDIQ_DEQ(m->outq, buf, used); if (MIDIQ_EMPTY(m->outq)) { @@ -304,8 +284,6 @@ midi_open(struct cdev *i_dev, int flags, int mode, struct thread *td) struct snd_midi *m = i_dev->si_drv1; int retval; - MIDI_DEBUG(1, printf("midiopen %p %s %s\n", td, - flags & FREAD ? "M_RX" : "", flags & FWRITE ? "M_TX" : "")); if (m == NULL) return ENXIO; @@ -347,8 +325,6 @@ midi_open(struct cdev *i_dev, int flags, int mode, struct thread *td) MPU_CALLBACK(m, m->cookie, m->flags); - MIDI_DEBUG(2, printf("midi_open: opened.\n")); - err: mtx_unlock(&m->lock); return retval; @@ -361,9 +337,6 @@ midi_close(struct cdev *i_dev, int flags, int mode, struct thread *td) int retval; int oldflags; - MIDI_DEBUG(1, printf("midi_close %p %s %s\n", td, - flags & FREAD ? "M_RX" : "", flags & FWRITE ? "M_TX" : "")); - if (m == NULL) return ENXIO; @@ -403,9 +376,6 @@ midi_read(struct cdev *i_dev, struct uio *uio, int ioflag) int used; char buf[MIDI_RSIZE]; - MIDI_DEBUG(5, printf("midiread: count=%lu\n", - (unsigned long)uio->uio_resid)); - retval = EIO; if (m == NULL) @@ -437,7 +407,6 @@ midi_read(struct cdev *i_dev, struct uio *uio, int ioflag) mtx_lock(&m->lock); m->rchan = 0; } - MIDI_DEBUG(6, printf("midi_read start\n")); /* * At this point, it is certain that m->inq has data */ @@ -445,7 +414,6 @@ midi_read(struct cdev *i_dev, struct uio *uio, int ioflag) used = MIN(MIDIQ_LEN(m->inq), uio->uio_resid); used = MIN(used, MIDI_RSIZE); - MIDI_DEBUG(6, printf("midiread: uiomove cc=%d\n", used)); MIDIQ_DEQ(m->inq, buf, used); retval = uiomove(buf, used, uio); if (retval) @@ -458,7 +426,7 @@ midi_read(struct cdev *i_dev, struct uio *uio, int ioflag) retval = 0; err1: mtx_unlock(&m->lock); -err0: MIDI_DEBUG(4, printf("midi_read: ret %d\n", retval)); +err0: return retval; } @@ -475,7 +443,6 @@ midi_write(struct cdev *i_dev, struct uio *uio, int ioflag) int used; char buf[MIDI_WSIZE]; - MIDI_DEBUG(4, printf("midi_write\n")); retval = 0; if (m == NULL) goto err0; @@ -491,7 +458,6 @@ midi_write(struct cdev *i_dev, struct uio *uio, int ioflag) if (ioflag & O_NONBLOCK) goto err1; m->wchan = 1; - MIDI_DEBUG(3, printf("midi_write msleep\n")); retval = msleep(&m->wchan, &m->lock, PCATCH | PDROP, "midi TX", 0); /* @@ -514,11 +480,7 @@ midi_write(struct cdev *i_dev, struct uio *uio, int ioflag) used = MIN(MIDIQ_AVAIL(m->outq), uio->uio_resid); used = MIN(used, MIDI_WSIZE); - MIDI_DEBUG(5, printf("midiout: resid %zd len %jd avail %jd\n", - uio->uio_resid, (intmax_t)MIDIQ_LEN(m->outq), - (intmax_t)MIDIQ_AVAIL(m->outq))); - MIDI_DEBUG(5, printf("midi_write: uiomove cc=%d\n", used)); retval = uiomove(buf, used, uio); if (retval) goto err1; From nobody Fri Jan 9 23:27:53 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnycT6wrlz6Mp63 for ; Fri, 09 Jan 2026 23:27:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnycT2ffRz3n1S for ; Fri, 09 Jan 2026 23:27:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gxvGLLv4hNkcUJiujxSywukJLUj4sJv8DC+NUkEz8zs=; b=fchCdwSgkNBceyRI8DgeIowIzV8az+kwDIhWdRVC0TkQKRi3PI+115EOSPRrCTL9Yvf4XF ahZ4yTyY5ugtchbG/BK6/T4Sen/y4XeovoEVPem+EUH3PzejCxM/DzV++H+hcJcxt9+AJu W2IwZAJX684B9y3Vpbjx/MUnKXrS/y/4/ItDzFm4lru1a2VaqQdneIUNsffk7w4H5kEXE5 BCthjvrqbdCq1Wd8oio2s2r+B5gHFlv8wHaOK+eORQQGggrtWCXKFg04wdFdJHoL9xcfao 7kdPqXxavv9R2QM46opt1yC2kWU1W0xnvPgUYJuzEqfRxYPADoYAPyJuhDySnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gxvGLLv4hNkcUJiujxSywukJLUj4sJv8DC+NUkEz8zs=; b=Rnauc7L9MAz3agHG/KZkGgezE4yB9NnKOmC8qz3pF7MxkU3Kup+QAVnVGqT8FgD+xF/KDa 8VIUVMePbJSZYmfs0rJT/N+ZVBlMFf18xKs5Vr3ybZ2hZ9HA2RLfDcuBA91JwMJbakEUKe t3Av7Safrxtbq9dOrtBAMYlpiYeH5sTaB0oU55vfhocpLuoIQb/VlSSQjNMyBYMiyFJ8K6 Dh4Es5i7uMcAqCZZK77wYmEMYqjcMx/KYQcJ9LnmHl5FLh9DIvQgTjTsB0Qk5uCiOT3xwx hvliWOMuwZmkMRJ+4OH+BZ1ytQItdRJqlqemkSz3BwNDnU9XMljLyIE9WOCdxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001273; a=rsa-sha256; cv=none; b=i6K3/rQaZi4pGQ48EKhMqmISGkPKI3g1Ji6u2m1Bq+cCyj4qZk05UTYHjxYH6VobDG9jgK LGMkFoVT+sRUfWqoZxODVf1jRqUVAs4jVPF42bD0xsxVFhfzzTDkunsqwsITk/4gAO9NsP s4RTQQIIQcbWo3MF2h8eMjmrDQPcJFM+Vl5fOFCJALRazwQTzO89yrR6BrIfDxeykkkdR5 1Azs6GKDCxg85YLnaKoFP1+OzpXPXn67oxkTUzQB5XOsMHbMle/BbtgVq0z6TgJrKCJihn BHwpWT96Kii1K/NFzDKjg3YeRDc8DtIkwseY1yqDL55YCQ8LP5MezOzqcOBlhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnycT29XqzTZR for ; Fri, 09 Jan 2026 23:27:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30ced by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:27:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 60d93337caff - stable/15 - sound: Retire MIDIQ_DEBUG List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 60d93337caff30c68064bc6d68aa38bc9bce5be8 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:27:53 +0000 Message-Id: <69618ef9.30ced.750cb1d9@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=60d93337caff30c68064bc6d68aa38bc9bce5be8 commit 60d93337caff30c68064bc6d68aa38bc9bce5be8 Author: Christos Margiolis AuthorDate: 2026-01-02 16:56:31 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:24 +0000 sound: Retire MIDIQ_DEBUG Sponsored by: The FreeBSD Foundation MFC after: 1 week (cherry picked from commit 3b9e776498a7e3e96c1a351fdd561f25803718df) --- sys/dev/sound/midi/midiq.h | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/sys/dev/sound/midi/midiq.h b/sys/dev/sound/midi/midiq.h index 17def1805363..27958ff4c23e 100644 --- a/sys/dev/sound/midi/midiq.h +++ b/sys/dev/sound/midi/midiq.h @@ -52,38 +52,23 @@ struct name { \ #define MIDIQ_FULL(head) ((head).h == -1) #define MIDIQ_AVAIL(head) (MIDIQ_FULL(head) ? 0 : (head).s - MIDIQ_LENBASE(head)) #define MIDIQ_LEN(head) ((head).s - MIDIQ_AVAIL(head)) -#define MIDIQ_DEBUG 0 /* * No protection against overflow, underflow */ #define MIDIQ_ENQ(head, buf, size) do { \ - if(MIDIQ_DEBUG)\ - printf("#1 %p %p bytes copied %jd tran req s %d h %d t %d\n", \ - &(head).b[(head).h], (buf), \ - (intmax_t)(sizeof(*(head).b) * \ - MIN( (size), (head).s - (head).h) ), \ - (size), (head).h, (head).t); \ MIDIQ_MOVE(&(head).b[(head).h], (buf), sizeof(*(head).b) * MIN((size), (head).s - (head).h)); \ if( (head).s - (head).h < (size) ) { \ - if(MIDIQ_DEBUG) \ - printf("#2 %p %p bytes copied %jd\n", (head).b, (buf) + (head).s - (head).h, (intmax_t)sizeof(*(head).b) * ((size) - (head).s + (head).h) ); \ MIDIQ_MOVE((head).b, (buf) + (head).s - (head).h, sizeof(*(head).b) * ((size) - (head).s + (head).h) ); \ } \ (head).h+=(size); \ (head).h%=(head).s; \ if(MIDIQ_EMPTY(head)) (head).h=-1; \ - if(MIDIQ_DEBUG)\ - printf("#E h %d t %d\n", (head).h, (head).t); \ } while (0) #define MIDIQ_DEQ_I(head, buf, size, move, update) do { \ if(MIDIQ_FULL(head)) (head).h=(head).t; \ - if(MIDIQ_DEBUG)\ - printf("#1 %p %p bytes copied %jd tran req s %d h %d t %d\n", &(head).b[(head).t], (buf), (intmax_t)sizeof(*(head).b) * MIN((size), (head).s - (head).t), (size), (head).h, (head).t); \ if (move) MIDIQ_MOVE((buf), &(head).b[(head).t], sizeof(*(head).b) * MIN((size), (head).s - (head).t)); \ if( (head).s - (head).t < (size) ) { \ - if(MIDIQ_DEBUG) \ - printf("#2 %p %p bytes copied %jd\n", (head).b, (buf) + (head).s - (head).t, (intmax_t)sizeof(*(head).b) * ((size) - (head).s + (head).t) ); \ if (move) MIDIQ_MOVE((buf) + (head).s - (head).t, (head).b, sizeof(*(head).b) * ((size) - (head).s + (head).t) ); \ } \ if (update) { \ @@ -92,8 +77,6 @@ struct name { \ } else { \ if (MIDIQ_EMPTY(head)) (head).h=-1; \ } \ - if(MIDIQ_DEBUG)\ - printf("#E h %d t %d\n", (head).h, (head).t); \ } while (0) #define MIDIQ_SIZE(head) ((head).s) From nobody Fri Jan 9 23:27:54 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnycV6lkDz6MYNP for ; Fri, 09 Jan 2026 23:27:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnycV3lHkz3n46 for ; Fri, 09 Jan 2026 23:27:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6rqKxOqE17efYc1Uua7NoFi4wKI/Za6Bu8oqqs2uhrI=; b=gno1aAntSIrH/UZEN0xVyCRQXStkLr+ljXTovC9A2u8m7Qib8YdfHBYLkk9ouRmGpSCInq A9fBuFLu+RR3riU/H4E0kAFdOFKd1RTp/kTiRDvCkFm4k1zZSMsnElWCe+/sSOLNzRmzXH DudCVK4Rea0Y8523hTJamm4MB4SY77wJb3xlwVnQBd7+3TnuxYZxd+DxNhy7BuFL2xz/bS VYrwRbY0XdIR/2PjYrZxAQ96NRzSVYCqoqptkrtVsZc+qKsYr/a3mHP5aTLnyfvOY8QUzE wrdlfpmx9KIJwLEVsplVBiGiMzWlEU9KuX4qlF9lqieKAqL4hp2NqdbcWkjRFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6rqKxOqE17efYc1Uua7NoFi4wKI/Za6Bu8oqqs2uhrI=; b=yfQOBMSd7p91D1p2bFQBGTDcMLRQPVx2bjKo/LN1oqoRhqtHv3AXMKJPjsXe3TMAldXG/R Lkf91CFBOjt84WyfmZnDiukCV1BT2X8b6o7uT6+2bBRtQQpZ1aXMvoBFxv2/uWEOMiI8xH 7wl/gvnF0QAzD0nUaM+moHxa+cGzQXogs22eT96WPftfA9Qfkcss1Fu+FUxBJZhVeo57TC o3zBZ0ndtW3brE4DBdacd3mvTvT2knG/9GS7OVfXL29vC1l/CXaCFxRLxB7qS/ngsCNxjH F2RufopNyO5reGN0wqB5lE8NADXWYhvUkuNy8g1SQOdomj7b3Y/f7Wn2u/huhg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001274; a=rsa-sha256; cv=none; b=G4wcZuo92HfdWsb9Anj12v6vQf6DmAYetyJ0PVeXndiRIFNWj/ZLazgfevIu6V/U2eVGr6 JegAwrT4HM0ZrNtlVv+OB9GJRb4kHpRIndXzYLaC9nAC08bjS+PDMBNpC0VwpLxmUpkKPq 96tl+IWkjIZzqSiu13cjBfIbybIKpajFz8DwMktNM6Z4amo9n0tKPU6uK2NvnDi8SL2L6v kvPtLa6KoeFoBkATqvqAm4S9RUnRNzrloeT/27ILogdReXjbVOBy8FBmVcGRs+4k0bhmvm blxhHsTqUaloPTNdkf1NP4+qx8wJrO3KLrZFkaplTarnHL3kud0zdXm7PhvNMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnycV379RzTZS for ; Fri, 09 Jan 2026 23:27:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30df1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:27:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 0ed90f4379c4 - stable/15 - sound: Improve snd_midi->{in,out}q allocation List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 0ed90f4379c4cb8a5e3e340c6a9cfc63897ae059 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:27:54 +0000 Message-Id: <69618efa.30df1.665dd6d7@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=0ed90f4379c4cb8a5e3e340c6a9cfc63897ae059 commit 0ed90f4379c4cb8a5e3e340c6a9cfc63897ae059 Author: Christos Margiolis AuthorDate: 2026-01-02 16:56:34 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:24 +0000 sound: Improve snd_midi->{in,out}q allocation Currently we lock and allocate the buffers with M_NOWAIT, without checking if the return value of malloc(). This is not necessary as subsequent check below will eventually check that. However, for correctness, allocate the buffers with M_WAITOK (there is no reason not to) and lock afterwards. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D54131 (cherry picked from commit b9db6c21287311b9e861893c065289d987a75804) --- sys/dev/sound/midi/midi.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index 9b61e972fab9..7f968b6210f5 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -109,7 +109,8 @@ midi_init(kobj_class_t cls, void *cookie) { struct snd_midi *m; int inqsize, outqsize; - uint8_t *buf; + uint8_t *ibuf = NULL; + uint8_t *obuf = NULL; m = malloc(sizeof(*m), M_MIDI, M_WAITOK | M_ZERO); kobj_init((kobj_t)m, cls); @@ -121,26 +122,17 @@ midi_init(kobj_class_t cls, void *cookie) mtx_init(&m->lock, "raw midi", NULL, 0); - mtx_lock(&m->lock); - if (inqsize) - buf = malloc(sizeof(uint8_t) * inqsize, M_MIDI, M_NOWAIT); - else - buf = NULL; + ibuf = malloc(inqsize, M_MIDI, M_WAITOK); + if (outqsize) + obuf = malloc(outqsize, M_MIDI, M_WAITOK); - MIDIQ_INIT(m->inq, buf, inqsize); + mtx_lock(&m->lock); - if (outqsize) - buf = malloc(sizeof(uint8_t) * outqsize, M_MIDI, M_NOWAIT); - else - buf = NULL; m->hiwat = outqsize / 2; - MIDIQ_INIT(m->outq, buf, outqsize); - - if ((inqsize && !MIDIQ_BUF(m->inq)) || - (outqsize && !MIDIQ_BUF(m->outq))) - goto err2; + MIDIQ_INIT(m->inq, ibuf, inqsize); + MIDIQ_INIT(m->outq, obuf, outqsize); m->flags = 0; m->unit = alloc_unr(dev_unr); From nobody Fri Jan 9 23:27:55 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnycX017kz6MYQP for ; Fri, 09 Jan 2026 23:27:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnycW4vP0z3nDt for ; Fri, 09 Jan 2026 23:27:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ai67DrN4q4k50bo3HT96CeNJ8Y5A4zU7fxaQ22v6jB4=; b=f/XcRME42XMtnzL7DYQWBftxoj6Q0hk34CUsawaUULLv8BBvjvTTasHuL2zQS/qjuge4lB 5BXEUuvcTGhsyzrEXyYOBGm6yzDa+QfaVbnOHqffcnmPNYOYlpb8gJG/SSRcqujXdzIa7y /ceuY35yvSTb/UNUckwmOmSYlRS1TIpcnwBbRoNOD0cNMxWllyMlTOEFpfLHi4Q23KeZ4O gw1/3CXthALYeOPXUkZyQNFi5kCLdAlVRas/DeBvAMBdiLl/jeem0lX5K8gUQuEpFBlS3v PqB6kmVmje+Rd8vCbI3mVv1IaND91ghxjv51WDvN2SLETZ8hKV2uawpUIuvHbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001275; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ai67DrN4q4k50bo3HT96CeNJ8Y5A4zU7fxaQ22v6jB4=; b=kTg3pTwh+MFwyRDCRt3o7LFJbOsZTOoj0HDT+UZebRDrLSPwr/nkjM/FYhjahoBmMvTrtD HqCj7A9tsiKX7aW9hFd/4c8+FR4ozeUTDw/pM4NpCR+7Dnj+9b0gKz7Ygh9kO3lyXlkx8I BKZ1YUE05CDYTCuisSiD9w7IlBGm7069U+qIyQRvLHAbGwrHprh/3ij7xIxC8BuxRYeXn8 dC4uEprAfOpApy2duQPjxhxLlng7NBXgvqXVkoVgfHdtoT/LDWuxi4z/OmyBfqF+u0OGL0 kx5VIED2qrDbmfbLCdkDRaFNHodCqgkX/AA1dty9hObLamLGgjPYM7ykPtPD8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001275; a=rsa-sha256; cv=none; b=Z+6rMOCu4+xdXt70edCtsFvdxlhg/Lx4+2/crvMDjbRq3ex++4I6NQkAvtjppDddLCYpB1 TvYrf3prI9AEj2+yg2Z9i5ScejWWYRMz4gFceiUq1SJpodLc8bYYL9gQX5PwcU8dQzAfkE yi3erQTmLrpv53P2ecRP3+0AQ+Q00jqwwusDFA4pOQ8uTloIdpGb0JXNioH7aqpLGoR8fP JBX5g9R8yKXOt/xGryilagzZHCTfsZs+KgkOkKdHgSj/kxvQCr21Obb/Nnty09+Np1UdpN ExnbuoioOLkgKXOSmkWhWLyY4sNFAZEwtxWZohnqHxxN8hndPtMlYlXn0NrXfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnycW4CGRzDWD for ; Fri, 09 Jan 2026 23:27:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32d96 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:27:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 3b9a2db3c2a5 - stable/15 - sound: Move sndstat out of pcm/ List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3b9a2db3c2a5935c79dc65f75441fcc579ba9ffc Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:27:55 +0000 Message-Id: <69618efb.32d96.227680a3@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=3b9a2db3c2a5935c79dc65f75441fcc579ba9ffc commit 3b9a2db3c2a5935c79dc65f75441fcc579ba9ffc Author: Christos Margiolis AuthorDate: 2026-01-02 16:56:41 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:24 +0000 sound: Move sndstat out of pcm/ Needed by follow-up patches that will add sndstat support for midi/ Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D54140 (cherry picked from commit bafa8c951d8cfaec75e774af03d7ab6fadb448b9) --- sys/dev/sound/pcm/sound.c | 1 + sys/dev/sound/pcm/sound.h | 4 ---- sys/dev/sound/{pcm => }/sndstat.c | 4 +++- sys/dev/sound/sndstat.h | 37 +++++++++++++++++++++++++++++++++++++ sys/modules/sound/sound/Makefile | 3 ++- 5 files changed, 43 insertions(+), 6 deletions(-) diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 29dac6b576ae..1e4b2eebdcaa 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 3ba6eb3692ee..de9af6bd5324 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -66,7 +66,6 @@ #include #include #include -#include #include #include #include @@ -167,9 +166,6 @@ void *pcm_getdevinfo(device_t dev); int snd_setup_intr(device_t dev, struct resource *res, int flags, driver_intr_t hand, void *param, void **cookiep); -int sndstat_register(device_t dev, char *str); -int sndstat_unregister(device_t dev); - /* These are the function codes assigned to the children of sound cards. */ enum { SCF_PCM, diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/sndstat.c similarity index 99% rename from sys/dev/sound/pcm/sndstat.c rename to sys/dev/sound/sndstat.c index 8f414e07757d..eee9e0b18108 100644 --- a/sys/dev/sound/pcm/sndstat.c +++ b/sys/dev/sound/sndstat.c @@ -40,13 +40,15 @@ #endif #include +#include #include #include #include -#include +#include #include #include +#include #include "feeder_if.h" diff --git a/sys/dev/sound/sndstat.h b/sys/dev/sound/sndstat.h new file mode 100644 index 000000000000..d6735f74af31 --- /dev/null +++ b/sys/dev/sound/sndstat.h @@ -0,0 +1,37 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 The FreeBSD Foundation + * + * Portions of this software were developed by Christos Margiolis + * 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 _SNDSTAT_H_ +#define _SNDSTAT_H_ + +int sndstat_register(device_t dev, char *str); +int sndstat_unregister(device_t dev); + +#endif /* _SNDSTAT_H_ */ diff --git a/sys/modules/sound/sound/Makefile b/sys/modules/sound/sound/Makefile index f3978e9bd9cc..22884eb5ec71 100644 --- a/sys/modules/sound/sound/Makefile +++ b/sys/modules/sound/sound/Makefile @@ -16,8 +16,9 @@ SRCS+= feeder_eq_gen.h feeder_rate_gen.h snd_fxdiv_gen.h SRCS+= mpu_if.h mpufoi_if.h SRCS+= mpu_if.c mpufoi_if.c SRCS+= ac97.c buffer.c channel.c dsp.c -SRCS+= mixer.c sndstat.c sound.c vchan.c +SRCS+= mixer.c sound.c vchan.c SRCS+= midi.c mpu401.c +SRCS+= sndstat.c feeder_eq_gen.h: ${SYSDIR}/tools/sound/feeder_eq_mkfilter.awk ${AWK} -f ${SYSDIR}/tools/sound/feeder_eq_mkfilter.awk -- ${FEEDER_EQ_PRESETS} > ${.TARGET} From nobody Fri Jan 9 23:27:56 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnycY1D5Wz6Mp46 for ; Fri, 09 Jan 2026 23:27:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnycX5ygvz3n23 for ; Fri, 09 Jan 2026 23:27:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VqjL1WDxTOp9PwRoyz0RKjBBdQUM7uAGBZdnDJctJvk=; b=tgbJjBpCc+adtev8v++HNAwE5qAXJUV1lX4wQ/B22lsJxCRVuQ4wHuMkM2C4twDlZU2YKj K0MIU4AumXPW8h8lmgoXOTPjzX3TiFH0M0G3slDqgTyMDQA77KRs+Ratk4BT2YK5c16XXX nkge5dVqHIQ9kicOkrSLGri5IgA2om55ZR9/PGraKrkVBrUl5UiQdlbo3LR4QtxStG2pzm YYABLtNy7Xp9h3pCHjytHz94S8pBqCrFHY3yHFP/PIJj7mrcKQH5HoeA8dJNKeodHxRulM s9L2IM9YabOgsFVSpCGMshJX4fndPu02i/c3MdNqWhlpIJCz0wGPgHczSMYnhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001276; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VqjL1WDxTOp9PwRoyz0RKjBBdQUM7uAGBZdnDJctJvk=; b=lO757zS8PWZigYR8f9YFA6vXGfH2AC0NKXApl9J6LJ9IMFd1RZWKOdmrkmD9zTuBCcclIm msSPKFUBmb+8tiXL2+dJ7+0z9AL/f8681ybJufjIUgtUKW1GT++NWmF1lQ/gi9G+sjZ1bc MVkArXSTA1ZVwNx6a9iadD7Z7UEtPnQFwUdxzGn/CKIj4fhAfR3FwCx/9pdojlEufNfuQ7 d/FEvpsOIAlCMwKU10NfIgZ3oKOVhKcWqaUPayt7mG281+ed2sE+ulnyYF/aHmsEkBKw5k yCxB2UCE1n80IoVW36lbcBvcAe778ppzj8pvlMMn5enZHvwOMGcvGXFZIxJC8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001276; a=rsa-sha256; cv=none; b=RCx/XjHeITf4oVwyqdX7JHv4iFcxW2U+5eeN4TZeQ1RuOo+uXkEt1hgJKrduTJ1pqxS+ou AB80OUeE2yxyopPl3QkCzqtnNRCqjO1DGxSzM+2k1CoVfbNfFxHQ3Dg/pdQ7xDC1qD556A gVGIGWJZm00ffJmMPSSbMqicRinOra4YmR6889rY31q9/J07827zK3b/pviaNnJu7sFsge wyKB5V5TjcPixTh1pEeATTOSIRLteunnWGFJSGZvRcYPf+jPM571McFdYJFyN+/WNZ8rWO ZXIbB1F/rHiX7LGjYLcbXrUaU5GSlBuDnficl2ndKcFjfyU5G2PM5Tw/ENMHkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnycX5Hq8zDWF for ; Fri, 09 Jan 2026 23:27:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30cf1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:27:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 1cebe00c289f - stable/15 - sound: Take device type into account in sndstat List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 1cebe00c289f574031ffb5abc565fb89c5c8abcf Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:27:56 +0000 Message-Id: <69618efc.30cf1.14b4adbf@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=1cebe00c289f574031ffb5abc565fb89c5c8abcf commit 1cebe00c289f574031ffb5abc565fb89c5c8abcf Author: Christos Margiolis AuthorDate: 2026-01-02 16:56:46 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:24 +0000 sound: Take device type into account in sndstat sndstat will be extended to work with MIDI devices as well, so separate functionality based on the device type. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D54141 (cherry picked from commit 2aa16666e2fa5c98be8d330cd0c32c9dc3801ba7) --- sys/dev/sound/pcm/sound.c | 2 +- sys/dev/sound/sndstat.c | 84 ++++++++++++++++++++++------------------------- sys/dev/sound/sndstat.h | 7 +++- 3 files changed, 47 insertions(+), 46 deletions(-) diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 1e4b2eebdcaa..8ce369bfce5e 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -427,7 +427,7 @@ pcm_register(device_t dev, char *str) else if (snd_unit_auto == 1) snd_unit = pcm_best_unit(snd_unit); - sndstat_register(dev, d->status); + sndstat_register(dev, SNDST_TYPE_PCM, d->status); return (dsp_make_dev(dev)); } diff --git a/sys/dev/sound/sndstat.c b/sys/dev/sound/sndstat.c index eee9e0b18108..b0ac7f7d0824 100644 --- a/sys/dev/sound/sndstat.c +++ b/sys/dev/sound/sndstat.c @@ -52,9 +52,6 @@ #include "feeder_if.h" -#define SS_TYPE_PCM 1 -#define SS_TYPE_MIDI 2 - static d_open_t sndstat_open; static void sndstat_close(void *); static d_read_t sndstat_read; @@ -75,7 +72,8 @@ struct sndstat_entry { TAILQ_ENTRY(sndstat_entry) link; device_t dev; char *str; - int type, unit; + enum sndstat_type type; + int unit; }; struct sndstat_userdev { @@ -688,22 +686,26 @@ sndstat_create_devs_nvlist(nvlist_t **nvlp) return (ENOMEM); TAILQ_FOREACH(ent, &sndstat_devlist, link) { - struct snddev_info *d; - nvlist_t *di; + if (ent->type == SNDST_TYPE_PCM) { + struct snddev_info *d; + nvlist_t *di; - d = device_get_softc(ent->dev); - if (!PCM_REGISTERED(d)) - continue; + d = device_get_softc(ent->dev); + if (!PCM_REGISTERED(d)) + continue; - err = sndstat_build_sound4_nvlist(d, &di); - if (err) - goto done; + err = sndstat_build_sound4_nvlist(d, &di); + if (err) + goto done; - nvlist_append_nvlist_array(nvl, SNDST_DSPS, di); - nvlist_destroy(di); - err = nvlist_error(nvl); - if (err) - goto done; + nvlist_append_nvlist_array(nvl, SNDST_DSPS, di); + nvlist_destroy(di); + err = nvlist_error(nvl); + if (err) + goto done; + } else if (ent->type == SNDST_TYPE_MIDI) { + /* TODO */ + } } TAILQ_FOREACH(pf, &sndstat_filelist, entry) { @@ -1154,22 +1156,14 @@ fail: /************************************************************************/ -int -sndstat_register(device_t dev, char *str) +void +sndstat_register(device_t dev, enum sndstat_type type, char *str) { struct sndstat_entry *ent; struct sndstat_entry *pre; - const char *devtype; - int type, unit; + int unit; unit = device_get_unit(dev); - devtype = device_get_name(dev); - if (!strcmp(devtype, "pcm")) - type = SS_TYPE_PCM; - else if (!strcmp(devtype, "midi")) - type = SS_TYPE_MIDI; - else - return (EINVAL); ent = malloc(sizeof *ent, M_DEVBUF, M_WAITOK | M_ZERO); ent->dev = dev; @@ -1195,8 +1189,6 @@ sndstat_register(device_t dev, char *str) TAILQ_INSERT_BEFORE(pre, ent, link); } SNDSTAT_UNLOCK(); - - return (0); } int @@ -1388,20 +1380,24 @@ sndstat_prepare(struct sndstat_file *pf_self) /* generate list of installed devices */ k = 0; TAILQ_FOREACH(ent, &sndstat_devlist, link) { - d = device_get_softc(ent->dev); - if (!PCM_REGISTERED(d)) - continue; - if (!k++) - sbuf_printf(s, "Installed devices:\n"); - sbuf_printf(s, "%s:", device_get_nameunit(ent->dev)); - sbuf_printf(s, " <%s>", device_get_desc(ent->dev)); - if (snd_verbose > 0) - sbuf_printf(s, " %s", ent->str); - /* XXX Need Giant magic entry ??? */ - PCM_ACQUIRE_QUICK(d); - sndstat_prepare_pcm(s, ent->dev, snd_verbose); - PCM_RELEASE_QUICK(d); - sbuf_printf(s, "\n"); + if (ent->type == SNDST_TYPE_PCM) { + d = device_get_softc(ent->dev); + if (!PCM_REGISTERED(d)) + continue; + if (!k++) + sbuf_printf(s, "Installed devices:\n"); + sbuf_printf(s, "%s:", device_get_nameunit(ent->dev)); + sbuf_printf(s, " <%s>", device_get_desc(ent->dev)); + if (snd_verbose > 0) + sbuf_printf(s, " %s", ent->str); + /* XXX Need Giant magic entry ??? */ + PCM_ACQUIRE_QUICK(d); + sndstat_prepare_pcm(s, ent->dev, snd_verbose); + PCM_RELEASE_QUICK(d); + sbuf_printf(s, "\n"); + } else if (ent->type == SNDST_TYPE_MIDI) { + /* TODO */ + } } if (k == 0) sbuf_printf(s, "No devices installed.\n"); diff --git a/sys/dev/sound/sndstat.h b/sys/dev/sound/sndstat.h index d6735f74af31..3ac0cf48f5a8 100644 --- a/sys/dev/sound/sndstat.h +++ b/sys/dev/sound/sndstat.h @@ -31,7 +31,12 @@ #ifndef _SNDSTAT_H_ #define _SNDSTAT_H_ -int sndstat_register(device_t dev, char *str); +enum sndstat_type { + SNDST_TYPE_PCM, + SNDST_TYPE_MIDI, +}; + +void sndstat_register(device_t dev, enum sndstat_type type, char *str); int sndstat_unregister(device_t dev); #endif /* _SNDSTAT_H_ */ From nobody Fri Jan 9 23:27:59 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnycb6pBvz6MYQT for ; Fri, 09 Jan 2026 23:27:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnycb0t2Kz3nH5 for ; Fri, 09 Jan 2026 23:27:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Je9mhemIJ/7582k23PDhAVk1x6LOnrcX3AP+oXf0RPk=; b=E4LTGbcDXDiuhJ/W591k693FFFZISA8+Objw8SNuHG5E/qZpga1ClW2gzQfSPIdMhVxVjw CmTN3TE7jAbHuSQC//4M+26Rd88zEaq5owwU2dJWJ+w4j1jVmRaKzCY8MkhL78P0qPxo37 FgCQG950MQJKffDr47tcsTOCvckLvoHQ1P0/MAWjJkYKD53SdeZxcXqKxrkmQuPxALqjkF gRS+ovKeBuzwR9yIl7s4NcK/H2lNro2FW/GeCsZJAV3hakWgpKZfUPGbzaQ+9eAPA/rwsj JWAZc+0QJN0D5NbPazbENUGDvWKYVH9xuva+GSsIHMj5yfWtzXoNl0rXxRAmAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Je9mhemIJ/7582k23PDhAVk1x6LOnrcX3AP+oXf0RPk=; b=nmWdGoaoQ2638dNXpJHVJ61Zq6BlbYoIeosMFezSufimNbfCP4fcZi3UdTSh86KXN2Qucu gD9ZauJ4hAedZ/B2i4I6V2iCZYmSOcDF64GI4JeqvkPW/dW5ZoO0V6KRYvL0Cdz3CXwVMb oABUXm6gntUWtWAqi+nR6vVOTd/jRzlIWC5oJrZgsTyY2DnolZf5MMLRkC6B/XT/q2dx8n 6zqoUuZGnT4br3rgUkMTlfVl3JvgekDkI5a5ePlqiI6EK/0s+i0AYfx4em4jZrHZxrtO4Y ZQA3BibspVRWdOnsC9rD4b2Ym+DDxN4rbafnPP54bJPfOwpQpyqfzeIkGINZvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001279; a=rsa-sha256; cv=none; b=jFlnpuhLOPvHWe+OoB7KcYcFJsvsGM7gRMHiF8sVcw1I6+BDqDRwfKflnEGLSyy34IGIi6 XOUYYfXVQ6NIFmUD9ZOD+ZPCob0sw3eX2Fj58RMyOODi9m33XnF+JSaFF54/VutlxKnT90 BjLIIMEZfDMWrmZb10SBibepdq+rhtJOHiELbjYSFScj062R+vWf5sFHTbIngzMJMXyHhN nYjzNCc798g+UmYNTPLztTguQLyIdDH2PP0PgUFbkgplI8VhtbQZjJ8VHTQWfWix/HNkbZ BUdMUlGdrXXYf6oAwUiY1g2qfZhrJxCHuNm2hKAqhVGrPRhNeVXjiAlDH/H8oA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnycb0BcpzDWG for ; Fri, 09 Jan 2026 23:27:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30fec by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:27:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 209cfbb4a9f7 - stable/15 - sound: Get rid of unused midi/midi.c defines List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 209cfbb4a9f721748e5d512807107e95b69198d1 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:27:59 +0000 Message-Id: <69618eff.30fec.1bdacb83@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=209cfbb4a9f721748e5d512807107e95b69198d1 commit 209cfbb4a9f721748e5d512807107e95b69198d1 Author: Christos Margiolis AuthorDate: 2026-01-02 16:56:55 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:24 +0000 sound: Get rid of unused midi/midi.c defines No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 1 week (cherry picked from commit 4a2d1532e84135a50ba8414ceaafc0c3a1bfe94b) --- sys/dev/sound/midi/midi.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index 542282d81842..e0a782bc9a22 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -185,19 +185,6 @@ midi_uninit(struct snd_midi *m) return (0); } -#ifdef notdef -static int midi_lengths[] = {2, 2, 2, 2, 1, 1, 2, 0}; - -#endif /* notdef */ -/* Number of bytes in a MIDI command */ -#define MIDI_LENGTH(d) (midi_lengths[((d) >> 4) & 7]) -#define MIDI_ACK 0xfe -#define MIDI_IS_STATUS(d) ((d) >= 0x80) -#define MIDI_IS_COMMON(d) ((d) >= 0xf0) - -#define MIDI_SYSEX_START 0xF0 -#define MIDI_SYSEX_END 0xF7 - /* * midi_in: process all data until the queue is full, then discards the rest. * Since midi_in is a state machine, data discards can cause it to get out of From nobody Fri Jan 9 23:27:57 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnycZ3xyYz6Mp47 for ; Fri, 09 Jan 2026 23:27:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnycY6v8Xz3nMp for ; Fri, 09 Jan 2026 23:27:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zOx/6ZSuYxAsD6gg43/4dbsQwRI/kVVrikYE+VY1zg8=; b=Yl8SWFPpyybRFg94wuwn6KZkEH7SeEPdjr2/g87uNXB3UhMRriukq72gGpo4dRINk0al3s WvoGc4fSEmJlIFFR9FEGzg6Mn0TC3ioy50kIWPUidmYBAjOfDlDwHn2nJ08Fn9rNE+GIG9 AZ6bFZLEzt6mKx9fDlLTpppL1r+2ZMemWQnh1rc+W4YTnPu05+prNB0RxUGAxSemHjKuAN TgxZIiDthTDfH8+XhoxtmZGErv5cG/y3YcGeNzcUVDiJ4lyWUzTn5WK7IAJyO8su0Aa2cz uLbcRTKu9f2wbInGIov4+dy1c8VLe1BLn2hcPsKGpd8IiqAV5ETXIN5V2Q90iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001278; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zOx/6ZSuYxAsD6gg43/4dbsQwRI/kVVrikYE+VY1zg8=; b=cm9o1zztuaELQs5EP7PrqyKAMUVeVWVw+2ADZmkOLliXHNS2GZ8p2WkjPnRQzHEC51xvYd 1qm2ooa3mv612juSeYFVHyvjeypS6Vg6/j+c4/WMTxBqeymlNQnZi9LxpzEH7sl314NMHM ODaVfF57Of/YuZCFqTo52viIcBSBwegIy6zpMI9vewSyY7a6LvN+K9lgCErkK6Y9briVWN O+LuYT4C3n6XJ2qDkle3ITNpD0kxKJkQbNoojUhcYvssfkqGkO0QalbCJF3YvUmUGkqkIx dJw3qjvOHVOhWhlFL9voOY1/o9m0suGCxNkItdvV3D8Pt4Qbxq5qLjSGgQCiIQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001278; a=rsa-sha256; cv=none; b=F11V9WPmDTo4wwCwIqt5QFyjiKTOx+If7TRzw+AhfbBylw60P+Up5c7aQf1eWk61PTBnQg HH7kRiwb79pIpt5U/aPHMkTKSpwLChxtUsXoYZhWpo5LVCEmZY+xFRVjo08oEwFJMtMOYD /nqC5hGFnnfplrcgW+HCaNL+1IyerPB7TNkqtpGywkQhazoVT97HNnLTJ2toRndJx10drz TbPXtn0Xf5mdbD1xKrK0vvLUu4piQszDV9wbyPS7BLSpwW6DqYLMF4C4VmLrHx0f/+J4kx VO2D+VnRDRgFTe2OWYkL/r94N6DaJw5bs7wDai3ijow6StVi1z1mYMvUxC8QXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnycY6QBfzTZT for ; Fri, 09 Jan 2026 23:27:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30df5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:27:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 4fc99fc60def - stable/15 - sound: Do not check for NULL before free() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4fc99fc60deff5d438748464a17986060be5dda9 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:27:57 +0000 Message-Id: <69618efd.30df5.23e41f5d@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=4fc99fc60deff5d438748464a17986060be5dda9 commit 4fc99fc60deff5d438748464a17986060be5dda9 Author: Christos Margiolis AuthorDate: 2026-01-02 16:56:52 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:24 +0000 sound: Do not check for NULL before free() No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D54174 (cherry picked from commit 792251295cdf6c3e1cbb1aa6291434539632912f) --- sys/dev/sound/dummy.c | 3 +-- sys/dev/sound/fdt/audio_soc.c | 6 ++---- sys/dev/sound/midi/midi.c | 6 ++---- sys/dev/sound/pci/cmi.c | 3 +-- sys/dev/sound/pci/envy24.c | 6 ++---- sys/dev/sound/pci/envy24ht.c | 6 ++---- sys/dev/sound/pci/es137x.c | 3 +-- sys/dev/sound/pci/hdsp-pcm.c | 12 ++++-------- sys/dev/sound/pci/hdspe-pcm.c | 12 ++++-------- sys/dev/sound/pci/via8233.c | 3 +-- sys/dev/sound/pci/via82c686.c | 2 +- sys/dev/sound/pcm/buffer.c | 19 ++++++------------- sys/dev/sound/pcm/dsp.c | 3 +-- sys/dev/sound/pcm/feeder_eq.c | 3 +-- sys/dev/sound/pcm/feeder_format.c | 3 +-- sys/dev/sound/pcm/feeder_matrix.c | 3 +-- sys/dev/sound/pcm/feeder_mixer.c | 3 +-- sys/dev/sound/pcm/feeder_rate.c | 37 ++++++++++++------------------------- sys/dev/sound/pcm/feeder_volume.c | 3 +-- sys/dev/sound/usb/uaudio.c | 6 ++---- 20 files changed, 47 insertions(+), 95 deletions(-) diff --git a/sys/dev/sound/dummy.c b/sys/dev/sound/dummy.c index aec76339ae17..91a198e3d9f6 100644 --- a/sys/dev/sound/dummy.c +++ b/sys/dev/sound/dummy.c @@ -132,8 +132,7 @@ dummy_chan_free(kobj_t obj, void *data) uint8_t *buf; buf = ch->buf->buf; - if (buf != NULL) - free(buf, M_DEVBUF); + free(buf, M_DEVBUF); return (0); } diff --git a/sys/dev/sound/fdt/audio_soc.c b/sys/dev/sound/fdt/audio_soc.c index 84867cb3d781..33269dc302fa 100644 --- a/sys/dev/sound/fdt/audio_soc.c +++ b/sys/dev/sound/fdt/audio_soc.c @@ -250,8 +250,7 @@ audio_soc_chan_free(kobj_t obj, void *data) ausoc_chan = (struct audio_soc_channel *)data; buffer = ausoc_chan->buf->buf; - if (buffer) - free(buffer, M_DEVBUF); + free(buffer, M_DEVBUF); return (0); } @@ -508,8 +507,7 @@ audio_soc_detach(device_t dev) struct audio_soc_aux_node *aux; sc = device_get_softc(dev); - if (sc->name) - free(sc->name, M_DEVBUF); + free(sc->name, M_DEVBUF); while ((aux = SLIST_FIRST(&sc->aux_devs)) != NULL) { SLIST_REMOVE_HEAD(&sc->aux_devs, link); diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index 7f968b6210f5..542282d81842 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -153,10 +153,8 @@ midi_init(kobj_class_t cls, void *cookie) err2: mtx_destroy(&m->lock); - if (MIDIQ_BUF(m->inq)) - free(MIDIQ_BUF(m->inq), M_MIDI); - if (MIDIQ_BUF(m->outq)) - free(MIDIQ_BUF(m->outq), M_MIDI); + free(MIDIQ_BUF(m->inq), M_MIDI); + free(MIDIQ_BUF(m->outq), M_MIDI); err1: free(m, M_MIDI); return NULL; diff --git a/sys/dev/sound/pci/cmi.c b/sys/dev/sound/pci/cmi.c index 99925d236c08..b5465fed5a8b 100644 --- a/sys/dev/sound/pci/cmi.c +++ b/sys/dev/sound/pci/cmi.c @@ -1009,8 +1009,7 @@ cmi_attach(device_t dev) if (sc->reg) bus_release_resource(dev, SYS_RES_IOPORT, sc->regid, sc->reg); mtx_destroy(&sc->lock); - if (sc) - free(sc, M_DEVBUF); + free(sc, M_DEVBUF); return ENXIO; } diff --git a/sys/dev/sound/pci/envy24.c b/sys/dev/sound/pci/envy24.c index 3adb22254b72..50864a9067fd 100644 --- a/sys/dev/sound/pci/envy24.c +++ b/sys/dev/sound/pci/envy24.c @@ -1611,10 +1611,8 @@ envy24chan_free(kobj_t obj, void *data) device_printf(sc->dev, "envy24chan_free()\n"); #endif mtx_lock(&sc->lock); - if (ch->data != NULL) { - free(ch->data, M_ENVY24); - ch->data = NULL; - } + free(ch->data, M_ENVY24); + ch->data = NULL; mtx_unlock(&sc->lock); return 0; diff --git a/sys/dev/sound/pci/envy24ht.c b/sys/dev/sound/pci/envy24ht.c index 2396a340cd84..3aca8f92f708 100644 --- a/sys/dev/sound/pci/envy24ht.c +++ b/sys/dev/sound/pci/envy24ht.c @@ -1522,10 +1522,8 @@ envy24htchan_free(kobj_t obj, void *data) device_printf(sc->dev, "envy24htchan_free()\n"); #endif mtx_lock(&sc->lock); - if (ch->data != NULL) { - free(ch->data, M_ENVY24HT); - ch->data = NULL; - } + free(ch->data, M_ENVY24HT); + ch->data = NULL; mtx_unlock(&sc->lock); return 0; diff --git a/sys/dev/sound/pci/es137x.c b/sys/dev/sound/pci/es137x.c index 4e8c7911e95e..45b953efc3fc 100644 --- a/sys/dev/sound/pci/es137x.c +++ b/sys/dev/sound/pci/es137x.c @@ -1886,8 +1886,7 @@ bad: if (es->reg) bus_release_resource(dev, es->regtype, es->regid, es->reg); mtx_destroy(&es->lock); - if (es) - free(es, M_DEVBUF); + free(es, M_DEVBUF); return (ENXIO); } diff --git a/sys/dev/sound/pci/hdsp-pcm.c b/sys/dev/sound/pci/hdsp-pcm.c index b64cec281388..5a8f2ab57d6c 100644 --- a/sys/dev/sound/pci/hdsp-pcm.c +++ b/sys/dev/sound/pci/hdsp-pcm.c @@ -677,14 +677,10 @@ hdspchan_free(kobj_t obj, void *data) #endif mtx_lock(&sc->lock); - if (ch->data != NULL) { - free(ch->data, M_HDSP); - ch->data = NULL; - } - if (ch->caps != NULL) { - free(ch->caps, M_HDSP); - ch->caps = NULL; - } + free(ch->data, M_HDSP); + ch->data = NULL; + free(ch->caps, M_HDSP); + ch->caps = NULL; mtx_unlock(&sc->lock); return (0); diff --git a/sys/dev/sound/pci/hdspe-pcm.c b/sys/dev/sound/pci/hdspe-pcm.c index d78820732639..678693960e5e 100644 --- a/sys/dev/sound/pci/hdspe-pcm.c +++ b/sys/dev/sound/pci/hdspe-pcm.c @@ -668,14 +668,10 @@ hdspechan_free(kobj_t obj, void *data) #endif mtx_lock(&sc->lock); - if (ch->data != NULL) { - free(ch->data, M_HDSPE); - ch->data = NULL; - } - if (ch->caps != NULL) { - free(ch->caps, M_HDSPE); - ch->caps = NULL; - } + free(ch->data, M_HDSPE); + ch->data = NULL; + free(ch->caps, M_HDSPE); + ch->caps = NULL; mtx_unlock(&sc->lock); return (0); diff --git a/sys/dev/sound/pci/via8233.c b/sys/dev/sound/pci/via8233.c index 6c59397756e0..90e966b864e3 100644 --- a/sys/dev/sound/pci/via8233.c +++ b/sys/dev/sound/pci/via8233.c @@ -1385,8 +1385,7 @@ bad: if (via->sgd_dmat) bus_dma_tag_destroy(via->sgd_dmat); mtx_destroy(&via->lock); - if (via) - free(via, M_DEVBUF); + free(via, M_DEVBUF); return (ENXIO); } diff --git a/sys/dev/sound/pci/via82c686.c b/sys/dev/sound/pci/via82c686.c index fe34583b1a25..144f0ff21fb6 100644 --- a/sys/dev/sound/pci/via82c686.c +++ b/sys/dev/sound/pci/via82c686.c @@ -601,7 +601,7 @@ bad: if (via->sgd_table) bus_dmamem_free(via->sgd_dmat, via->sgd_table, via->sgd_dmamap); if (via->sgd_dmat) bus_dma_tag_destroy(via->sgd_dmat); mtx_destroy(&via->lock); - if (via) free(via, M_DEVBUF); + free(via, M_DEVBUF); return ENXIO; } diff --git a/sys/dev/sound/pcm/buffer.c b/sys/dev/sound/pcm/buffer.c index eb2cbe667bf3..1db9e5661dc8 100644 --- a/sys/dev/sound/pcm/buffer.c +++ b/sys/dev/sound/pcm/buffer.c @@ -129,11 +129,8 @@ sndbuf_setup(struct snd_dbuf *b, void *buf, unsigned int size) void sndbuf_free(struct snd_dbuf *b) { - if (b->tmpbuf) - free(b->tmpbuf, M_DEVBUF); - - if (b->shadbuf) - free(b->shadbuf, M_DEVBUF); + free(b->tmpbuf, M_DEVBUF); + free(b->shadbuf, M_DEVBUF); if (b->buf) { if (b->flags & SNDBUF_F_MANAGED) { @@ -188,8 +185,7 @@ sndbuf_resize(struct snd_dbuf *b, unsigned int blkcnt, unsigned int blksz) printf("%s(): b=%p %p -> %p [%d -> %d : %d]\n", __func__, b, b->tmpbuf, tmpbuf, b->allocsize, allocsize, bufsize); - if (b->tmpbuf != NULL) - free(b->tmpbuf, M_DEVBUF); + free(b->tmpbuf, M_DEVBUF); b->tmpbuf = tmpbuf; b->allocsize = allocsize; } else if (snd_verbose > 3) @@ -225,14 +221,11 @@ sndbuf_remalloc(struct snd_dbuf *b, unsigned int blkcnt, unsigned int blksz) tmpbuf = malloc(allocsize, M_DEVBUF, M_WAITOK); shadbuf = malloc(allocsize, M_DEVBUF, M_WAITOK); CHN_LOCK(b->channel); - if (b->buf != NULL) - free(b->buf, M_DEVBUF); + free(b->buf, M_DEVBUF); b->buf = buf; - if (b->tmpbuf != NULL) - free(b->tmpbuf, M_DEVBUF); + free(b->tmpbuf, M_DEVBUF); b->tmpbuf = tmpbuf; - if (b->shadbuf != NULL) - free(b->shadbuf, M_DEVBUF); + free(b->shadbuf, M_DEVBUF); b->shadbuf = shadbuf; if (snd_verbose > 3) printf("%s(): b=%p %d -> %d [%d]\n", diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 62db4592f206..c1e836691ac7 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -2582,8 +2582,7 @@ dsp_oss_syncgroup(struct pcm_channel *wrch, struct pcm_channel *rdch, oss_syncgr out: if (ret != 0) { - if (smrd != NULL) - free(smrd, M_DEVBUF); + free(smrd, M_DEVBUF); if ((sg != NULL) && SLIST_EMPTY(&sg->members)) { sg_ids[2] = sg->id; SLIST_REMOVE(&snd_pcm_syncgroups, sg, pcmchan_syncgroup, link); diff --git a/sys/dev/sound/pcm/feeder_eq.c b/sys/dev/sound/pcm/feeder_eq.c index 08e789f6a5ad..4cf9d4f6695f 100644 --- a/sys/dev/sound/pcm/feeder_eq.c +++ b/sys/dev/sound/pcm/feeder_eq.c @@ -353,8 +353,7 @@ feed_eq_free(struct pcm_feeder *f) struct feed_eq_info *info; info = f->data; - if (info != NULL) - free(info, M_DEVBUF); + free(info, M_DEVBUF); f->data = NULL; diff --git a/sys/dev/sound/pcm/feeder_format.c b/sys/dev/sound/pcm/feeder_format.c index 3226aebf9580..0747b54cbbae 100644 --- a/sys/dev/sound/pcm/feeder_format.c +++ b/sys/dev/sound/pcm/feeder_format.c @@ -90,8 +90,7 @@ feed_format_free(struct pcm_feeder *f) struct feed_format_info *info; info = f->data; - if (info != NULL) - free(info, M_DEVBUF); + free(info, M_DEVBUF); f->data = NULL; diff --git a/sys/dev/sound/pcm/feeder_matrix.c b/sys/dev/sound/pcm/feeder_matrix.c index 198fe86d994f..cba537c84efd 100644 --- a/sys/dev/sound/pcm/feeder_matrix.c +++ b/sys/dev/sound/pcm/feeder_matrix.c @@ -317,8 +317,7 @@ feed_matrix_free(struct pcm_feeder *f) struct feed_matrix_info *info; info = f->data; - if (info != NULL) - free(info, M_DEVBUF); + free(info, M_DEVBUF); f->data = NULL; diff --git a/sys/dev/sound/pcm/feeder_mixer.c b/sys/dev/sound/pcm/feeder_mixer.c index 74ab633bf3c7..8c58e1c8ef33 100644 --- a/sys/dev/sound/pcm/feeder_mixer.c +++ b/sys/dev/sound/pcm/feeder_mixer.c @@ -100,8 +100,7 @@ feed_mixer_free(struct pcm_feeder *f) struct feed_mixer_info *info; info = f->data; - if (info != NULL) - free(info, M_DEVBUF); + free(info, M_DEVBUF); f->data = NULL; diff --git a/sys/dev/sound/pcm/feeder_rate.c b/sys/dev/sound/pcm/feeder_rate.c index 63d7fe11003a..aee164840c4a 100644 --- a/sys/dev/sound/pcm/feeder_rate.c +++ b/sys/dev/sound/pcm/feeder_rate.c @@ -714,10 +714,8 @@ z_resampler_reset(struct z_info *info) info->z_size = 1; info->z_coeff = NULL; info->z_dcoeff = NULL; - if (info->z_pcoeff != NULL) { - free(info->z_pcoeff, M_DEVBUF); - info->z_pcoeff = NULL; - } + free(info->z_pcoeff, M_DEVBUF); + info->z_pcoeff = NULL; info->z_scale = Z_ONE; info->z_dx = Z_FULL_ONE; info->z_dy = Z_FULL_ONE; @@ -1029,10 +1027,8 @@ z_resampler_build_polyphase(struct z_info *info) int32_t alpha, c, i, z, idx; /* Let this be here first. */ - if (info->z_pcoeff != NULL) { - free(info->z_pcoeff, M_DEVBUF); - info->z_pcoeff = NULL; - } + free(info->z_pcoeff, M_DEVBUF); + info->z_pcoeff = NULL; if (feeder_rate_polyphase_max < 1) return (ENOTSUP); @@ -1154,10 +1150,8 @@ z_resampler_setup(struct pcm_feeder *f) * adaptive mode. */ z_setup_adaptive_sinc: - if (info->z_pcoeff != NULL) { - free(info->z_pcoeff, M_DEVBUF); - info->z_pcoeff = NULL; - } + free(info->z_pcoeff, M_DEVBUF); + info->z_pcoeff = NULL; if (adaptive == 0) { info->z_dy = z_scale << Z_DRIFT_SHIFT; @@ -1333,8 +1327,7 @@ z_setup_adaptive_sinc: if (info->z_delay == NULL || info->z_alloc < i || i <= (info->z_alloc >> 1)) { - if (info->z_delay != NULL) - free(info->z_delay, M_DEVBUF); + free(info->z_delay, M_DEVBUF); info->z_delay = malloc(i, M_DEVBUF, M_NOWAIT | M_ZERO); if (info->z_delay == NULL) return (ENOMEM); @@ -1517,10 +1510,8 @@ z_resampler_init(struct pcm_feeder *f) ret = z_resampler_setup(f); if (ret != 0) { - if (info->z_pcoeff != NULL) - free(info->z_pcoeff, M_DEVBUF); - if (info->z_delay != NULL) - free(info->z_delay, M_DEVBUF); + free(info->z_pcoeff, M_DEVBUF); + free(info->z_delay, M_DEVBUF); free(info, M_DEVBUF); f->data = NULL; } @@ -1534,13 +1525,9 @@ z_resampler_free(struct pcm_feeder *f) struct z_info *info; info = f->data; - if (info != NULL) { - if (info->z_pcoeff != NULL) - free(info->z_pcoeff, M_DEVBUF); - if (info->z_delay != NULL) - free(info->z_delay, M_DEVBUF); - free(info, M_DEVBUF); - } + free(info->z_pcoeff, M_DEVBUF); + free(info->z_delay, M_DEVBUF); + free(info, M_DEVBUF); f->data = NULL; diff --git a/sys/dev/sound/pcm/feeder_volume.c b/sys/dev/sound/pcm/feeder_volume.c index 3e9e3484fba8..fc4ed1bbb0a5 100644 --- a/sys/dev/sound/pcm/feeder_volume.c +++ b/sys/dev/sound/pcm/feeder_volume.c @@ -193,8 +193,7 @@ feed_volume_free(struct pcm_feeder *f) struct feed_volume_info *info; info = f->data; - if (info != NULL) - free(info, M_DEVBUF); + free(info, M_DEVBUF); f->data = NULL; diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index 65c1327ee0f2..86fb5228a990 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -2704,10 +2704,8 @@ error: int uaudio_chan_free(struct uaudio_chan *ch) { - if (ch->buf != NULL) { - free(ch->buf, M_DEVBUF); - ch->buf = NULL; - } + free(ch->buf, M_DEVBUF); + ch->buf = NULL; usbd_transfer_unsetup(ch->xfer, UAUDIO_NCHANBUFS + 1); ch->num_alt = 0; From nobody Fri Jan 9 23:28:00 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnycc4z88z6MYLn for ; Fri, 09 Jan 2026 23:28:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnycc1RJYz3nFl for ; Fri, 09 Jan 2026 23:28:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=62ZCXTFxYYHO5Wic6GBwkkBiMeIMiJN3VzxaD1FGO04=; b=Veg+ezRrqwEn8aL6MGQ1cxZ1txbnBnFLsbkoMxrXXebTMjPWYJ1NHJtm4H1cAdWg8gK1CM qIncr0FnpiYnvhfTishmrfRVqWV1u751W6Em0ohWA7PGadoV5WYBLLtRkj+NzJAB2n9vIM bPRTlLDeGdQqar+wt2dowzikcxJXe1nKo0pShugEfCfD0f4T0lLI5iKNcwuqmKkkQr0hon dPJc4JNyCJaN4ndVbGKcFF16HgwCUmkAlPeXcnyw2m3TaDDOQfzEGSEKUzWAiElgGgNdST CtoQia1ZM86SCPMMeVJMvBS+jZP212MbXsx/8ooYT3ONSmFeoRFyDmQbksMkPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=62ZCXTFxYYHO5Wic6GBwkkBiMeIMiJN3VzxaD1FGO04=; b=fmIqIiJxafLQYQRyOgyRmTz7DFvQDJBnI9jy7ed7Knjj9bSuyLm8Y0kaYxPVDsdvIzHZLJ 9/7wNq6OTYDpaGzk35Wlo0p3ZoCyEmymS+C81ST39gnxGwbCzXAlU7kW+7Olds9JsRceP4 /LpR5wXYgMgNX7uIKPN+ygNiFggkcKpxU6JuWK4Vl7VfvDQl3Dwf5btYbxg8/HHzPsJmrP CQHI/4WxzLX5AqlD/EwZgUM9cWfr5gD0ucyMqvYfY3mCgGodRj0r1TyJBrCr7XmlrRvX9s SbPJYdNK+eKOjqCbKUlOhdPkWMfg38VCnUcgL9jzqTJ3QHvxbfsWB9/e34m7cw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001280; a=rsa-sha256; cv=none; b=WjrA/WCNWX30STR5pAgJdYOnuiFBpSsIq6tJgXEw4bxSUwHdU8jcPisz6qNuStsQ1jWiDS 6qJVjSJqX4CVy6xH19p6guuviXZkArYwlMKii1hRxpWigSy52IR7AwZPhxy7pKNlVyiiFY MRiLJeL6+YL+M90CAaWDkxD36hGp9JWAQXRo9JoFcqOhXdRJhCE7RhXoUCELTo/fZtg1kU nBElQ7hVDLCeQHZslsMH6w5+6GNldcfsMzkO+2ilzd/62PucMZYzsqpyATmdc89AAHVHkq gx/OP2u9Art7yvz6d6mu6hRMoC02Yrduo/LP7BaEBDDelQMScGQueWGw1cZYng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnycc0y01zTX4 for ; Fri, 09 Jan 2026 23:28:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 32d9a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:28:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 2a8f866ede21 - stable/15 - sound: Retire mpu_callbackp() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2a8f866ede21d6cf8ec8ced7c58d72f73d1f8416 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:28:00 +0000 Message-Id: <69618f00.32d9a.22ad239a@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=2a8f866ede21d6cf8ec8ced7c58d72f73d1f8416 commit 2a8f866ede21d6cf8ec8ced7c58d72f73d1f8416 Author: Christos Margiolis AuthorDate: 2026-01-02 16:56:58 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:24 +0000 sound: Retire mpu_callbackp() It is the exact same as mpu_callback(). No functional changed intended. Sponsored by: The FreeBSD Foundation MFC after: 1 week (cherry picked from commit e3b57ceffef0158a72a7a5aedfa9df88b3a8a88b) --- sys/dev/sound/midi/midi.c | 2 +- sys/dev/sound/midi/mpu401.c | 8 -------- sys/dev/sound/midi/mpu_if.m | 6 ------ 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index e0a782bc9a22..bde3c5447705 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -242,7 +242,7 @@ midi_out(struct snd_midi *m, uint8_t *buf, int size) MIDIQ_DEQ(m->outq, buf, used); if (MIDIQ_EMPTY(m->outq)) { m->flags &= ~M_TXEN; - MPU_CALLBACKP(m, m->cookie, m->flags); + MPU_CALLBACK(m, m->cookie, m->flags); } if (used && MIDIQ_AVAIL(m->outq) > m->hiwat) { if (m->wchan) { diff --git a/sys/dev/sound/midi/mpu401.c b/sys/dev/sound/midi/mpu401.c index 21141a0c8e3c..107a53119cdb 100644 --- a/sys/dev/sound/midi/mpu401.c +++ b/sys/dev/sound/midi/mpu401.c @@ -76,7 +76,6 @@ static int mpu401_muninit(struct snd_midi *, void *); static int mpu401_minqsize(struct snd_midi *, void *); static int mpu401_moutqsize(struct snd_midi *, void *); static void mpu401_mcallback(struct snd_midi *, void *, int); -static void mpu401_mcallbackp(struct snd_midi *, void *, int); static kobj_method_t mpu401_methods[] = { KOBJMETHOD(mpu_init, mpu401_minit), @@ -84,7 +83,6 @@ static kobj_method_t mpu401_methods[] = { KOBJMETHOD(mpu_inqsize, mpu401_minqsize), KOBJMETHOD(mpu_outqsize, mpu401_moutqsize), KOBJMETHOD(mpu_callback, mpu401_mcallback), - KOBJMETHOD(mpu_callbackp, mpu401_mcallbackp), KOBJMETHOD_END }; @@ -235,9 +233,3 @@ mpu401_mcallback(struct snd_midi *sm, void *arg, int flags) } m->flags = flags; } - -static void -mpu401_mcallbackp(struct snd_midi *sm, void *arg, int flags) -{ - mpu401_mcallback(sm, arg, flags); -} diff --git a/sys/dev/sound/midi/mpu_if.m b/sys/dev/sound/midi/mpu_if.m index 835d887f703a..07371a0dd726 100644 --- a/sys/dev/sound/midi/mpu_if.m +++ b/sys/dev/sound/midi/mpu_if.m @@ -44,12 +44,6 @@ METHOD int init { void *_cookie; }; -METHOD void callbackp { - struct snd_midi *_kobj; - void *_cookie; - int _flags; -}; - METHOD void callback { struct snd_midi *_kobj; void *_cookie; From nobody Fri Jan 9 23:28:01 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnycd6q3Zz6Mp6G for ; Fri, 09 Jan 2026 23:28:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnycd2bC5z3nCN for ; Fri, 09 Jan 2026 23:28:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V53cD+82CABEvQcKtkX/7kLbRw4K9610P/hnTZNzSQI=; b=Hsf+3dvbrM3OFzTpb1N/9wRdIcc/a/OH6IjWp41VrxwjeRgmgRz/hKJjplRo+9lvwZ1CrW OGtcl0tg20iHvLlo6kHqRoelzipDliUohyB0EB11liHVnh2xgd3z9bfCNVsGZF99Q/LyF7 wpGFPgglYBNdphokFc9QYoZZt799P4EOrOspW7VIpHtbishOf5nJj2xW6GF0UgBO/2TnGK z1dJ7P0W06hBxLhDhawp58JIeyJxfnTzPDEKKdNDX36luum3t6pa3CatQnWEe3kev428SX VcBMBRqQNbLNAcdhJlPuoF13y0cA1C7Zm0JLnhK9jLrQkwHHg2mObe0com67SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V53cD+82CABEvQcKtkX/7kLbRw4K9610P/hnTZNzSQI=; b=ZFFVUoKgSVdwRqs1MVYjvVhxyfMC6WnFZUHo3cmStX82xs7hDscHcnMjgZnokYuezk7DRV ZM2trAoLuJITfsvAyCb4hScE0vk+NnsyclOEIfoNfGcrhsfJW8qY7UkE5cR82alDGZ+CY+ PH7SFYBxhJfMF468H7A1psBmt7bguz3r8/eJSvBG5/nnDjue3l8Y/prbUOXkR9kyxkAAzW zcgh70aEZonN6JWVRfkipMhReEnouRMhrH2FWSvFnLIMdI2KLk8GzjVfC+GKNhfiLrgF/y glY0CFL6uSrcWNBiA3uJhPrIEoNP3Eg9zm+6dow53/Yvhwnaq1+PkSnw8f0uhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001281; a=rsa-sha256; cv=none; b=K7jyAbxtoaJvNPQ4orVAPZ9a+82B2Sw2T0m9tm7TUwLEy0BmwT6c831N5mrY152Y+MgaBd STojr4OR+qT/PUPGXYopskVDOlpZcb9JOeLi2dTyo5tTJNf0ovh6xB5t6OlmNxN+i/xOB0 cPLmaI+H6WK9+p57HWU9P3Wjw1hFrreZRsNDr9Y5Xl1fPNoRygpFJfscL79EKKdFLgoVsh okyAshrPxTCPxLk03rR+vp2o0n9HIKONOfy19vSyTo4LLE+0xacHai1mLslhU39PFA1KL1 eFO4PjE+TV8ohAdQeUfwrTbJnN2M2KCJQEsBjcfONdcvHh0wEAPbxBg/gKgV5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnycd23FdzDQX for ; Fri, 09 Jan 2026 23:28:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31a6e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:28:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: efca6398b7eb - stable/15 - sound: Make mpu_if definitions static List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: efca6398b7eb27ac20383a9ef104337ac9a40c4a Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:28:01 +0000 Message-Id: <69618f01.31a6e.3d82be57@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=efca6398b7eb27ac20383a9ef104337ac9a40c4a commit efca6398b7eb27ac20383a9ef104337ac9a40c4a Author: Christos Margiolis AuthorDate: 2026-01-02 16:57:00 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:24 +0000 sound: Make mpu_if definitions static No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 1 week (cherry picked from commit 3094c5e388df296f1b84579f70a5583ddc3bc26a) --- sys/dev/sound/midi/mpu401.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/sound/midi/mpu401.c b/sys/dev/sound/midi/mpu401.c index 107a53119cdb..500e15c79497 100644 --- a/sys/dev/sound/midi/mpu401.c +++ b/sys/dev/sound/midi/mpu401.c @@ -203,7 +203,7 @@ mpu401_minit(struct snd_midi *sm, void *arg) return 1; } -int +static int mpu401_muninit(struct snd_midi *sm, void *arg) { struct mpu401 *m = arg; @@ -211,13 +211,13 @@ mpu401_muninit(struct snd_midi *sm, void *arg) return MPUFOI_UNINIT(m, m->cookie); } -int +static int mpu401_minqsize(struct snd_midi *sm, void *arg) { return 128; } -int +static int mpu401_moutqsize(struct snd_midi *sm, void *arg) { return 128; From nobody Fri Jan 9 23:28:04 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnych6mmwz6MYRN for ; Fri, 09 Jan 2026 23:28:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnych3DFYz3nLP for ; Fri, 09 Jan 2026 23:28:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SwNu6+mR6FaOrta2uwOHLCxj9b1Ia+9b/ALBB5AqzL8=; b=eALcQylDelkz4IotrcvIHZuwekHai1gWRKEGuNyfuHXeW/uAkGWNJ3AiTg9rrHmCmr5i6O CjhJm4oltXEmxZVVOj7RvLOvM7DlEt7+baXhAEIDXDlfeJR3kQnCYJpNk8qwPSeBoCaCRd 1kRqCkx7Szd4Nv1eoQbXPDfxvgGvc7jyzG8jZIBHdSk3tvaK2BTTnkpWnqgkRVCH2539Aj W8BlaezO6RZfaC6WwWvxhr2hD5jWHnUOwXIrQRT/C43cRSkEOU5mjqPWiMMMyEoZADAstu 8r/hmQxWUDpTJR5bN2sum6YxB7VE2U0TZczYFq6ILcFnnaTPJhfKiTjJzB8sHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SwNu6+mR6FaOrta2uwOHLCxj9b1Ia+9b/ALBB5AqzL8=; b=clM0Zd2Og04yNGUyBMecNB4CLeoX5qDoXwHKT1jmTnH1pr+q8hsiFiuoSxCYaAqEbpS86e LMONXJNV4HkauqXHoexAbP09N9lzvx+hQ7l+WpfyF8+yCkLe6oceQ0/K77vrW45L3bOtl5 8nDikJjFuxVDmsFOdytLrBkx4iELa8/+dg/j6Kjjt3tyuF26g7SaLu9C2hVdYetFyNsxwZ EieLlwaPOQyoJI2So6TbH3Di3WEPimb5rxi6CotjUlfYWOo7Egjs0cTI3Y6YzHoscoHQlW /Kjb9Awj8rgu8s9Qni8mv/pCY6A/9jDaZxYpF6+SsSUd+II3wg6Zh0cuivYHPQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001284; a=rsa-sha256; cv=none; b=fso4xldkUeaNOfyGlIko7pSopW21dO353eFd690kVAV85IV7Yusk8UulA7tCZ04GawGe3u bVLkeQ8HuBlRA82PzQNXY1Gloj0hdKXLBX5zs7BZdKXKC9XDu5lj3qRk20Xb3PcCafN9Zy ecxY6ozj/9gDTxM83KqpM8UOC/vo9Ydskd/WeN9EB98Tnn1Z5T0RI6vHPwjh0IvYGiRCgD Wja3aiBR1rtbvTAFKJe0na8i8976yGaB5R/82HbM7uCr9M4SHJxGU/l6owB3zjoGZcxOUi DJjEHQ78Usoe+CRz2/jkccQjSRpNbm3Njk3iAaneHY6Vdl7yJapFTrhBgz/eXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnych2qfqzTZY for ; Fri, 09 Jan 2026 23:28:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33093 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:28:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 3ecd098ba4b1 - stable/15 - sound: Retire unused snd_midi->name List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 3ecd098ba4b13d38bf154244629a861b0dee87f9 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:28:04 +0000 Message-Id: <69618f04.33093.1bddf437@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=3ecd098ba4b13d38bf154244629a861b0dee87f9 commit 3ecd098ba4b13d38bf154244629a861b0dee87f9 Author: Christos Margiolis AuthorDate: 2026-01-02 16:57:08 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:25 +0000 sound: Retire unused snd_midi->name No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 1 week (cherry picked from commit a9c3bb39bc9181b8762e67c40d00886474e9ae06) --- sys/dev/sound/midi/midi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c index bde3c5447705..c86f5fb41b14 100644 --- a/sys/dev/sound/midi/midi.c +++ b/sys/dev/sound/midi/midi.c @@ -68,7 +68,6 @@ struct snd_midi { int channel; int flags; /* File flags */ - char name[MIDI_NAMELEN]; MIDIQ_HEAD(, char) inq, outq; int rchan, wchan; struct selinfo rsel, wsel; From nobody Fri Jan 9 23:28:03 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnycg5fXLz6MYNs for ; Fri, 09 Jan 2026 23:28:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnycg2y7zz3nCp for ; Fri, 09 Jan 2026 23:28:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zu2Nx0uHo7+VLGbFhMRE+AQdD7FIoVRsT2HqHY1v4ao=; b=obIEGcr2NU40cswGO+MqMM3Aq0MPUjiaPiQ4//JK2dxHTrw1W6RX3pCFrqSClJbn/jO7YQ IzTnOhdLKVJ63kLw/VpvjRbMYe9JxyrLHRgURXuThJ8aJ3qMpPjBSaX1q8oySRhU9brhle ekW2S1KFpOYIShpDtTQ+8RzFRyjo8/B5wrJO+2MuLxTsDUVnCmOtSUPWgueEOWmAUPmn9/ O9tbj1RCWXlQio+EzoezGQXLqwKN4GjEJEHmsz7x4gKeCkflKajl8pPYPUT6VLfEWegOY0 OczdB2O5uC3cU0bPC0rPDdVQNxI/JmFntiv7q1O7loCDfXOeTlya7oJkIm/hJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zu2Nx0uHo7+VLGbFhMRE+AQdD7FIoVRsT2HqHY1v4ao=; b=GlUQMd9EUDdb4jbo4FUsdcLAVXBr8IErahQpHqCIWNiIEbwQ+IzufxqxtPxzvwNl1HvZUs 0H/9wvpV6d9CCKr6H15lJ0qLzSndEEMMKJINiO6qu/mS4L/E6BzK6P6rJg2i/4CMn/cvAr oQ9tvX7rUZO4CQpUW5fONftz2ZAbpkpAlu5J6u/eYJM2KwiGqyZjxFqAdZkfuMruPFmZOw /FodCYtcmAqG7wC0rs1/Aejl0nMqFqY9QHzMcSufj9WYM0bHw43AvenzYFoAzul7eCY2R9 i2mlFqDA2IkpbiCXxCPBL2osLeRDspTBXnl4LgAPIeSQAa3zwLzf4p1QA1U1sw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001283; a=rsa-sha256; cv=none; b=avxQmCuA3tkyTaMlSIKcunuUO7ohdbEyyg0xjrD1Ir3JYLeI5yfAgkXNo4DQuBfqYTqi8F G4juZhC+8c6OSXF/XBqnoceRNBp8eedSCKxfhuAANWn4YDuQygpBK/klqmVRvi5q9/FeUJ f65zjU8LXuTPDgZDdSi22wFFYmveSU12G+XgTnHjGs6WRn/3ZVYmARUZhkISMwkJE39GHK enEVOE6A0JI7i7SQFTzRq5ILOvDCYkA3Wv0zCkGZSZ/7ulSNcYLlASFqXhw2O73ffSs4Bx oofj/5bXhzX48lLneHUvawwaI64yZS8+lUCV7BYCgdY4Hf747WE4Qz/ANb22Ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnycg2NgyzDWJ for ; Fri, 09 Jan 2026 23:28:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31c47 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:28:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 76a53e183957 - stable/15 - sound: Allocate mpu401 with M_WAITOK List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 76a53e1839573968929400a661537f0e91f8700a Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:28:03 +0000 Message-Id: <69618f03.31c47.75246ce9@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=76a53e1839573968929400a661537f0e91f8700a commit 76a53e1839573968929400a661537f0e91f8700a Author: Christos Margiolis AuthorDate: 2026-01-02 16:57:06 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:25 +0000 sound: Allocate mpu401 with M_WAITOK Sponsored by: The FreeBSD Foundation MFC after: 1 week (cherry picked from commit fd1312d3629cda9691c67af6154946cd55467076) --- sys/dev/sound/midi/mpu401.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/dev/sound/midi/mpu401.c b/sys/dev/sound/midi/mpu401.c index 500e15c79497..d3fb6b214d3e 100644 --- a/sys/dev/sound/midi/mpu401.c +++ b/sys/dev/sound/midi/mpu401.c @@ -142,10 +142,7 @@ mpu401_init(kobj_class_t cls, void *cookie, driver_intr_t softintr, struct mpu401 *m; *cb = NULL; - m = malloc(sizeof(*m), M_MIDI, M_NOWAIT | M_ZERO); - - if (!m) - return NULL; + m = malloc(sizeof(*m), M_MIDI, M_WAITOK | M_ZERO); kobj_init((kobj_t)m, cls); From nobody Fri Jan 9 23:28:05 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnycj6ZCfz6Mp6T for ; Fri, 09 Jan 2026 23:28:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnycj3zlqz3n78 for ; Fri, 09 Jan 2026 23:28:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I6bqvOtBT7Mm4YTUE6N8C9D1eTaWpmHCx6IFvLTzgis=; b=COGHCB/jJ8jacySyZLw2jmzTBGPI56IQyY+/JYcoZUMhcWKeDGIxqKEjAsZWRXuwtDx448 fQzuoY8aLoY1rrjJA34vCQff9LenSYGNJfUK5QH4amy6L00qU04PmjDF9fLUvcfFBXquNv d1nHYao8scztp3DdO3LwU8n8Fck0OhvVKbkYfuD1JKkpuksOuLZmJYJWRg/cEK5Mx9T+UW jZZ/xY4qdHP1+gK5ecTn7A7ZT68qNcdYaICKpM1P+bVw38cdVSIlfsTwod+SSzYJ1kvXok LGusPNL9RNB382pDTrZWQOgdW5BhOl8K2Dd/EfJ5DBd7p02m2VExd+/U68lNbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I6bqvOtBT7Mm4YTUE6N8C9D1eTaWpmHCx6IFvLTzgis=; b=UNWU43QFxv0iCI1rFEsbUZYYNPpD2M5A1sXnoiXVmX80T8xb/m/qIhswbI7ZhCG5GC4/21 TcVVbSybMw8YOKvMF61XRQS3jRRdJZUubMX+MM5Pf+uywRjVYphmW1nR0QDFDMkfsdWyBn vBGsf8sTuYafvvRhm7R1Z2FthJq9Q/XtgnZHPUJOmpunR3yeQERM762qdRJWBZhPTplYAU xCN9RKxJs9TvOq+XEjL176gLw7IhYRrI5gs8UsC+z6IO2zk0z9BgrdqskcdY3vt6OCL2TK kw4y4XOsMhDAbwNGYGE+koErC2gGat2k6GsaNYQ10/JzQGlMH6ymtLpmThzFcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001285; a=rsa-sha256; cv=none; b=i2xbRYTQYKmFoaCRB98GAGW7CLOTVa7V7wIopmN0xkhAjgHlTaIMj7W4w0Y9kBmhcIbDiX JnisQ9qFbpf3eWw7JmywTHmac0pKjWh4G8HY6SkarOO/RSg9zyQ3GRzixEzXath7kh0y1P AuY1D8XmJa2Im/3Q9iPhv0z/8f/z7NJv7ImO5o0hwKwly9hT3HJdIfdx1rbTnM27JOA6bM 0Vtu/lwmZXH5zLN8+AeQ+2rNy3V7C8GeK4lrWUprQV6+UxzTzkl6i4uK/3GhV+rUplcW73 h3fwd8HKPf8HxFSdeycW98eRQ+ynJqU5lSPRx1HcStWnlryMhQItGHjQyUVy7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnycj3SJ7zDWL for ; Fri, 09 Jan 2026 23:28:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31ad8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:28:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: f3092142f9ba - stable/15 - snd_uaudio: Do not use pcm_channel->lock to protect uaudio_chan List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: f3092142f9ba0bccf33ca5a45e1cb186b579bae0 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:28:05 +0000 Message-Id: <69618f05.31ad8.428f30ed@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=f3092142f9ba0bccf33ca5a45e1cb186b579bae0 commit f3092142f9ba0bccf33ca5a45e1cb186b579bae0 Author: Christos Margiolis AuthorDate: 2026-01-02 17:20:36 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:25 +0000 snd_uaudio: Do not use pcm_channel->lock to protect uaudio_chan This is a layering violation, but it also makes the control flow confusing; snd_uaudio(4) should have its own lock to protect its structures. Fixes: 5cc34a83e1 ("Revert "sound: Merge chn_intr() with chn_intr_locked()"") Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54102 (cherry picked from commit c234740c9d34c2b953c6010f6a01b0aca9648c08) --- sys/dev/sound/usb/uaudio.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index 86fb5228a990..0987ca12d933 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -232,7 +232,7 @@ struct uaudio_chan { struct pcmchan_caps pcm_cap; /* capabilities */ struct uaudio_chan_alt usb_alt[CHAN_MAX_ALT]; struct snd_dbuf *pcm_buf; - struct mtx *pcm_mtx; /* lock protecting this structure */ + struct mtx lock; /* lock protecting this structure */ struct uaudio_softc *priv_sc; struct pcm_channel *pcm_ch; struct usb_xfer *xfer[UAUDIO_NCHANBUFS + 1]; @@ -1390,9 +1390,9 @@ uaudio_configure_msg_sub(struct uaudio_softc *sc, /* Unsetup prior USB transfers, if any. */ usbd_transfer_unsetup(chan->xfer, UAUDIO_NCHANBUFS + 1); - mtx_lock(chan->pcm_mtx); + mtx_lock(&chan->lock); chan->cur_alt = CHAN_MAX_ALT; - mtx_unlock(chan->pcm_mtx); + mtx_unlock(&chan->lock); /* * The first alternate setting is typically used for @@ -1415,9 +1415,9 @@ uaudio_configure_msg_sub(struct uaudio_softc *sc, return; } - mtx_lock(chan->pcm_mtx); + mtx_lock(&chan->lock); next_alt = chan->set_alt; - mtx_unlock(chan->pcm_mtx); + mtx_unlock(&chan->lock); chan_alt = chan->usb_alt + next_alt; @@ -1474,7 +1474,7 @@ uaudio_configure_msg_sub(struct uaudio_softc *sc, } } if (usbd_transfer_setup(sc->sc_udev, &chan_alt->iface_index, chan->xfer, - chan_alt->usb_cfg, UAUDIO_NCHANBUFS + 1, chan, chan->pcm_mtx)) { + chan_alt->usb_cfg, UAUDIO_NCHANBUFS + 1, chan, &chan->lock)) { DPRINTF("could not allocate USB transfers!\n"); goto error; } @@ -1527,18 +1527,18 @@ uaudio_configure_msg_sub(struct uaudio_softc *sc, #error "Please update code below!" #endif - mtx_lock(chan->pcm_mtx); + mtx_lock(&chan->lock); chan->cur_alt = next_alt; usbd_transfer_start(chan->xfer[0]); usbd_transfer_start(chan->xfer[1]); - mtx_unlock(chan->pcm_mtx); + mtx_unlock(&chan->lock); return; error: usbd_transfer_unsetup(chan->xfer, UAUDIO_NCHANBUFS + 1); - mtx_lock(chan->pcm_mtx); + mtx_lock(&chan->lock); chan->cur_alt = CHAN_MAX_ALT; - mtx_unlock(chan->pcm_mtx); + mtx_unlock(&chan->lock); } static void @@ -2664,7 +2664,7 @@ uaudio_chan_init(struct uaudio_chan *ch, struct snd_dbuf *b, /* store mutex and PCM channel */ ch->pcm_ch = c; - ch->pcm_mtx = &c->lock; + mtx_init(&ch->lock, "uaudio_chan lock", NULL, MTX_DEF); /* compute worst case buffer */ @@ -2690,10 +2690,6 @@ uaudio_chan_init(struct uaudio_chan *ch, struct snd_dbuf *b, ch->pcm_buf = b; ch->max_buf = buf_size; - if (ch->pcm_mtx == NULL) { - DPRINTF("ERROR: PCM channels does not have a mutex!\n"); - goto error; - } return (ch); error: @@ -2707,6 +2703,7 @@ uaudio_chan_free(struct uaudio_chan *ch) free(ch->buf, M_DEVBUF); ch->buf = NULL; usbd_transfer_unsetup(ch->xfer, UAUDIO_NCHANBUFS + 1); + mtx_destroy(&ch->lock); ch->num_alt = 0; From nobody Fri Jan 9 23:28:02 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnycl6Vp2z6MYJW for ; Fri, 09 Jan 2026 23:28:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnycl2c3pz3ncM for ; Fri, 09 Jan 2026 23:28:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xC8cvaQDnxdvMhl6XEyWPyRYr6mVY3TNpQjWdQ+Hsto=; b=TMbzzppHHnl7Mus6ZdxfAj0zqAAghYy0zT1zvlYArdXVv6ePOOD5aM7VEgm1panLg1BrfS bMsnZ+Rhv7YoMvjPZXMxWuGnvjpaHZAhCbupa2l26PzLqI00E+yHOeeOH1h/C39CbpWWjU Wa5l9uAMT0OJ0X1yFlMRM38PloFOA4pdDk0uiKzdw97frKqvsV/18yGKJnFzaNA7i1IffS XyaP8jDHcpd+wGh7ED0xbXuwq2dYcy9Z4mmXcT9Cwp+qPRshJCgSAcHDnWFZANJXPRpWrl mYqCo4nlFbX5xz+ZJQhkDKCimqGKyqGvuo1J7XDSOBiRMe4lt3yA+vc5PMd6IA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001287; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xC8cvaQDnxdvMhl6XEyWPyRYr6mVY3TNpQjWdQ+Hsto=; b=vVm3xSb69FebOPfVw5Qk3zs9+imhN812YSvGGGOJuxGVr/SnR2Zbsrp/dDrp14VHDmcASA s7QBegLhcXuDM76yYYTDDmd3u8ND2i4KU8brwrRVWBOmyLlkJfmcueh9lwGMUugzKBq+wE dnqeEasYsa0Ht+gw9xB2Gd3IvTlKcn43VY6EOyQGC6ugeE8/r7vfnsXrbdY2SVk14+e5rS DCp9ZL2tIwZZMIREOTNJgGyY3YBN/W+ocFac66Gre63aOHoGlfPVW9ftjYUqwq+eqp/S2i YgkDo+dfv3cBwc/I1vMhHbQgwq6M/xApPlXc9rUN6nxMnXRpyElN4zUFW5DM+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001287; a=rsa-sha256; cv=none; b=Hs5bvbGSN88Qnp5Owqe3m2kiPrQPnsRxV/hdlhZ3FZeRXGXDO3VzQ1EFRD8fB03layRJ7v IRyv+XaSW1209sKzs6rnC50qgDKA1HzvMwZBvzbn5nrRFtB5+qqClAzCG2DZYFvsz6mubt Q8GbtDwrkh8iyZX7vKrSqPJQcu5EYiPEH2E0ZRu9MNqcRTW2CQE6D+Puh6+H1ATcKvkF9G rrGXe6AWHN75fZPh7PEO3+F0zLZlYCTpx8s/0n1NGcjCFVoI3Yvz2BASiQ68I2BWP0N6Ca sMmMYyndQ6sY6WEoFu77lK/kjcACyGwv45HuMrICj3El08RyPua+GDktAYx6iQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnycf20wJzDZG for ; Fri, 09 Jan 2026 23:28:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 30cf5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:28:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 2ded9e1e2538 - stable/15 - sound: Get rid of unused MIDIQ macros List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 2ded9e1e2538a8d28b86673e444fd6e200244507 Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:28:02 +0000 Message-Id: <69618f02.30cf5.13d725c5@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=2ded9e1e2538a8d28b86673e444fd6e200244507 commit 2ded9e1e2538a8d28b86673e444fd6e200244507 Author: Christos Margiolis AuthorDate: 2026-01-02 16:57:03 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:25 +0000 sound: Get rid of unused MIDIQ macros No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 1 week (cherry picked from commit 3f8a85a085c710f50b8bcd4efe915268882129d2) --- sys/dev/sound/midi/midiq.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/sound/midi/midiq.h b/sys/dev/sound/midi/midiq.h index 27958ff4c23e..80825974283e 100644 --- a/sys/dev/sound/midi/midiq.h +++ b/sys/dev/sound/midi/midiq.h @@ -83,7 +83,5 @@ struct name { \ #define MIDIQ_CLEAR(head) ((head).h = (head).t = 0) #define MIDIQ_BUF(head) ((head).b) #define MIDIQ_DEQ(head, buf, size) MIDIQ_DEQ_I(head, buf, size, 1, 1) -#define MIDIQ_PEEK(head, buf, size) MIDIQ_DEQ_I(head, buf, size, 1, 0) -#define MIDIQ_POP(head, size) MIDIQ_DEQ_I(head, &head, size, 0, 1) #endif From nobody Fri Jan 9 23:28:06 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dnyck62HYz6Mp4J for ; Fri, 09 Jan 2026 23:28:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dnyck4TXRz3nYr for ; Fri, 09 Jan 2026 23:28:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tXnxyok8PPbW5X87j9nYuZ4XFTq6xMKxFwZRKJg5EfM=; b=ZSkwtbB7fj+AmFUMdBp6MqiIcMrvi11hnheMrmTrPpzSuizzjngskXzswxnE+UzKynf3MK y6AM3nF9HPf94rPasCIsKsE8w4y2/FMkVfSlTYgWmUT+B2Wl2ICQSTVdc0ZYljPktwfed5 EcWetOq3tVpxefasTWWBMGnlowION+FNo6Gspe7j/VlnmX9h65+6G1gh2su1EMJ/f/DxlG FG6pGjm7EnKexSzGC8m5C++7teRwGDZa1vxeCOhxpHvy55fCYQfG3agjjPjxi1w1/b/lzx m0BYfVhwGjpUooIwCK6c2/i/H7Xrl2e/4jUFdglu3qVpxcYgN545pzzSNdgK/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768001286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tXnxyok8PPbW5X87j9nYuZ4XFTq6xMKxFwZRKJg5EfM=; b=vbnkJXGUjgNTkrjZFjoFIjuzgTAQz/E2ft/j/cyidxxsycRo1JRXQ7ZBDuLqWZVFuKWoUf Clcfg8yVIaww2VphX2CXHshb2wDN7LxzUfNgItcTp8Wbnj5huMUWUcBKlANvFGlqLKxaEg RgYA/fzXlbJUcJnOqoHE5vT5Y3kSrkPeOy6PJNkhZoMs147ShsiU2ZPmEkOjM4qPHmdsam UlfHmvfWBgtDRp0WIbWBepWpJAnM4LSJy/I2iZsuJwmsdzlaf0zucz6a/wlVfGxPsCMSxJ NDV+7eufweUA7WnOnN+Qw8zzpRhQx29g849JxQvEbHh5/1I/iEyZImewz4D9Hg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768001286; a=rsa-sha256; cv=none; b=nGIvxd7Tiw/TdO7knXVAqh8jb+7mFWK3OrBgI+LnnBFKtgyBHJ1SCpsRiZ2t+eQorGGQBz Ec0SUOMUoTtMII9FmQnOKLPvffplC1tExZEz6sp827sksDdYsPdRPwysr9q7YOLiQGTWPb /4VthX4B+HbTWpemvvL+VCT/Cxaxi+Z+gTSXTgDOWb3gqN5aD9F7vzrANwXKEX944myluI cH0qdzQbP/VGNObQW1qsCAu0KcY6UeI8jd4UzVRzxC6BOLjCOEtO3cvJhdy9NhJcNAwq8H v7e8JuF6FwI8jA09WkpFPBRMWylTEccGVDuqYkQcMrAp+YGUujWt+u3T4IhJfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dnyck3yPnzD7b for ; Fri, 09 Jan 2026 23:28:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31c4b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 09 Jan 2026 23:28:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 0c7eb49acd36 - stable/15 - sound: Merge chn_intr() with chn_intr_locked() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 0c7eb49acd3666f1db868a5c05ebd91ef7c5499a Auto-Submitted: auto-generated Date: Fri, 09 Jan 2026 23:28:06 +0000 Message-Id: <69618f06.31c4b.20e62b2@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=0c7eb49acd3666f1db868a5c05ebd91ef7c5499a commit 0c7eb49acd3666f1db868a5c05ebd91ef7c5499a Author: Christos Margiolis AuthorDate: 2026-01-02 17:20:41 +0000 Commit: Christos Margiolis CommitDate: 2026-01-09 23:27:25 +0000 sound: Merge chn_intr() with chn_intr_locked() There is no scenario where chn_intr() is called with the channel lock already held. No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D53854 (cherry picked from commit 0794365d5d3cc93940b873553382288a2a2c88c4) --- sys/dev/sound/pcm/channel.c | 20 ++------------------ sys/dev/sound/pcm/channel.h | 1 - 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index 7c3f0e3dc9f0..011dc1427c2e 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -581,30 +581,14 @@ chn_read(struct pcm_channel *c, struct uio *buf) } void -chn_intr_locked(struct pcm_channel *c) +chn_intr(struct pcm_channel *c) { - - CHN_LOCKASSERT(c); - + CHN_LOCK(c); c->interrupts++; - if (c->direction == PCMDIR_PLAY) chn_wrintr(c); else chn_rdintr(c); -} - -void -chn_intr(struct pcm_channel *c) -{ - - if (CHN_LOCKOWNED(c)) { - chn_intr_locked(c); - return; - } - - CHN_LOCK(c); - chn_intr_locked(c); CHN_UNLOCK(c); } diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h index 0b17c4a130a7..6415f5c88984 100644 --- a/sys/dev/sound/pcm/channel.h +++ b/sys/dev/sound/pcm/channel.h @@ -298,7 +298,6 @@ int chn_oss_setorder(struct pcm_channel *, unsigned long long *); int chn_oss_getmask(struct pcm_channel *, uint32_t *); void chn_resetbuf(struct pcm_channel *c); -void chn_intr_locked(struct pcm_channel *c); void chn_intr(struct pcm_channel *c); int chn_abort(struct pcm_channel *c); From nobody Sat Jan 10 02:29:34 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dp2f63x5Yz6N3Mg for ; Sat, 10 Jan 2026 02:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dp2f62yDGz3NXb for ; Sat, 10 Jan 2026 02:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768012174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xTZeWv9ugqwvS/MDkgZY0JEX+ehj0wHcyO/P2kCo2vQ=; b=d4ylOb9PDStBwN5Cl1jg+I82BNcuXwO9eP96v5xU179AD/ognk8PW/Z0MTmqAV4oRJYyG9 0Pp9LC4BapNuR0rLCbaCUsppJRIHnm8P1pYGSBCAg/irEYntnJ1j4u3ZWRcYvIVbdiQWUP OsZZfecQI6BaAhPBtsU247Myna+4tP3zU8TJ+WmRsyt/eTFqmmxi5XJRzBLazJJHMJ31yI uhbRCkXZwWKai6J5RqA/TlKectnAH2Fo7s6W5+ZiADHOvYiBSULhFM2wqEp7HsePa4Khet fuZ1dQ307JS2WHrKcSCqa+MLIeba5fORjW4bcTRXF15gRhH1z8Q/DeLkm4sdGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768012174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xTZeWv9ugqwvS/MDkgZY0JEX+ehj0wHcyO/P2kCo2vQ=; b=kaAWd3MeUXq0ONX9q/BLzT4aiAvKIHBMurxQDy3peWgRu7beYy1b4wA0q8EKigkmR8jRoD xsy5uXjn4amkxV3I7xUJew9teRFo/uIS3rAYkvee0AkbSXPjSlWJ/wCKQ5H9bcb2pBUpa3 Ypga54Qrs/PL9r5LVU+DLSIIPu6LpNwX+LWOwnhNkNG8hUJZKDUlM0AIWBGtxNhuzBEf/T HVgtq2wg7pKld5HFign9BQknFRQgo/qTjNs5KIE74DdzIymrqtsaS2+EH0l/o3UBb3wWcB r0Kxa8zz4mmRxmvVPEfodD1T5kza+ARfnk0+Ob2Zt7e2jZYFjcsl6+XWxqNE1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768012174; a=rsa-sha256; cv=none; b=uTAMJFvPbheXKYcMIWdbeukBXJM8uAbd7R4LshO+N3VripuqOaeQ4UH5KmUDgSgpNdkJDv TdkyEbI1GYky+X06EMi2ClOdD2K6ffqv+bP6pMT5QlGhy7RytYbmusmxxdFasMGhL5Qgkk jj8jzw7kc4qT04Ho6u8Z24Rh2V7WBg1MUIksrblkTf6KcLhgQp0AvZfnOR4sxQ760rgR7g hB1PaQOjYdc21/SLC42ON/zhjLWrtjgzxWCfPyemRfEYB32Axe2LlywDIM5N8/BgF6PKqZ 6JJIz7Df6yzgmRty9hjKcPVg583jBdve2y6gTfPwb4I2xH7Mp4rMfUsJrfk1xA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dp2f61lx7zc7Y for ; Sat, 10 Jan 2026 02:29:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id d04b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 02:29:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 42541e82a8bd - stable/15 - vm_object.h: tweak OBJ_ONEMAPPING comment even more List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 42541e82a8bda81ee69eb25f2035c62273c005d2 Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 02:29:34 +0000 Message-Id: <6961b98e.d04b.63a29997@gitrepo.freebsd.org> The branch stable/15 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=42541e82a8bda81ee69eb25f2035c62273c005d2 commit 42541e82a8bda81ee69eb25f2035c62273c005d2 Author: Konstantin Belousov AuthorDate: 2026-01-07 06:25:46 +0000 Commit: Konstantin Belousov CommitDate: 2026-01-10 02:29:12 +0000 vm_object.h: tweak OBJ_ONEMAPPING comment even more (cherry picked from commit dcb80621bbf9a733b91f1a011af873318fac2709) --- sys/vm/vm_object.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index be712fafb3dc..a7f2e9a2b785 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -197,9 +197,8 @@ struct vm_object { #define OBJ_SPLIT 0x00000400 /* object is being split */ #define OBJ_COLLAPSING 0x00000800 /* Parent of collapse. */ #define OBJ_COLORED 0x00001000 /* pg_color is defined */ -#define OBJ_ONEMAPPING 0x00002000 /* Each page is allowed to have at most - one managed mapping, all in the same - vm_map */ +#define OBJ_ONEMAPPING 0x00002000 /* Each page has at most one managed + mapping, all in the same vm_map */ #define OBJ_PAGERPRIV1 0x00004000 /* Pager private */ #define OBJ_PAGERPRIV2 0x00008000 /* Pager private */ #define OBJ_SYSVSHM 0x00010000 /* SysV SHM */ From nobody Sat Jan 10 03:24:12 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dp3s86RlXz6N6xM for ; Sat, 10 Jan 2026 03:24:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dp3s84Hmdz3SnS for ; Sat, 10 Jan 2026 03:24:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768015452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JdmobJf6KPt36qxfPY1ndtSXmvwaBQIqni9ZWToD9xY=; b=Wa2x7U9uo0KLBDIXl8nZtkAGmEClPcUI12ve/PWbBUYJgWjEowDasbNcKA4bfWXGk4OoEu CU4vf/PgK3iCyEjEsJ0bfJWP/hkyU1tcqf3KLgIXTer7KXRtJMEtrIhWxVWPGA7stfoNFL jyzMVQqyXymsGrxCNrTkFUmxkNCOq0wytR3aJU7g3XHer0HL+fzGowXTKXFgKHzzkF0nuw wQucP9DSo1ExZruDcC3WZ2oO4U0mErhjepmbvWe0bz0l+qI5p5g0/EkhLjnX2nXh+UJbsH PPqP8CG+98mUDSxikHsOXBVACv8xpokej4Xa0R8i7mxVys0ZNhbMUMijk9DG+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768015452; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JdmobJf6KPt36qxfPY1ndtSXmvwaBQIqni9ZWToD9xY=; b=AL2dtxRjH6QTSBWceYVriiXEFZR1lvWxJKgO/FDFeXKBeqAPDDldP6pVIN2/S4q62ASCDd 843Y6Fkp+O7YiQ6NRi5kbshH5rLamfkFodIO0kSx/BOSWMp3+zanGlPFlpr3NZ/6i8ZA2Z AeDe2YsXaRBZfGKujD/iuZc4+rWp6Qocx+1ifDYSoMML8EGBCnyCC5s11MhS8y3l1kFuIh srVkuZTgtrINsJF/iRo6WpdElPAbyLP6MVwTcjJdGZC/9qucyKsngbmTj0iPiKcjg4gN3R 3uRZBnGTxD0k439bDsRKHZIGtLDWAcOy/4PQYot+WFxG8GOhuRsxWd8ymrLfJw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768015452; a=rsa-sha256; cv=none; b=GAz2wREGJOyVorbdGK12uyhJP+l8Go+HqUsC5Z5Z5Ds6hZijAjn+0yVwn66w7hTviKpAYA xOku8Ipq7J+vphzgquPjxIjxg5C7i5ylPnzIII62HLg8a8ggqBwGOGkiBUqWy0RuakVprs WIXazYI4bhru8amQcN6Fqvmlk4PQD4tW1/ccN8O00kHwwaLfqa4pi/qCHKAaA9XK2jXhCU pokLG74UMTjUC850lZm1ygTuhCL+dgwUn4yUFHlUBX5f2UgD95ksfW009bCaXoy7f8S0jc aMUuXdt0stEmYCGhv6YRrR9mMZSjOO8wjMe9tQWvbEaY5bt/4eGIbiKuSdo+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]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dp3s83rpkzddQ for ; Sat, 10 Jan 2026 03:24:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2241a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 03:24:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 0d82ee2726df - stable/14 - vm_object.h: tweak OBJ_ONEMAPPING comment even more List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0d82ee2726dfe21ef08387ac21db8d77031963c6 Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 03:24:12 +0000 Message-Id: <6961c65c.2241a.140d1377@gitrepo.freebsd.org> The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0d82ee2726dfe21ef08387ac21db8d77031963c6 commit 0d82ee2726dfe21ef08387ac21db8d77031963c6 Author: Konstantin Belousov AuthorDate: 2026-01-07 06:25:46 +0000 Commit: Konstantin Belousov CommitDate: 2026-01-10 03:23:42 +0000 vm_object.h: tweak OBJ_ONEMAPPING comment even more (cherry picked from commit dcb80621bbf9a733b91f1a011af873318fac2709) --- sys/vm/vm_object.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h index 6b8a3bf087c3..9a3bba4ef396 100644 --- a/sys/vm/vm_object.h +++ b/sys/vm/vm_object.h @@ -200,9 +200,8 @@ struct vm_object { #define OBJ_SPLIT 0x00000400 /* object is being split */ #define OBJ_COLLAPSING 0x00000800 /* Parent of collapse. */ #define OBJ_COLORED 0x00001000 /* pg_color is defined */ -#define OBJ_ONEMAPPING 0x00002000 /* Each page is allowed to have at most - one managed mapping, all in the same - vm_map */ +#define OBJ_ONEMAPPING 0x00002000 /* Each page has at most one managed + mapping, all in the same vm_map */ #define OBJ_PAGERPRIV1 0x00004000 /* Pager private */ #define OBJ_PAGERPRIV2 0x00008000 /* Pager private */ #define OBJ_SYSVSHM 0x00010000 /* SysV SHM */ From nobody Sat Jan 10 10:22:50 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpF8B5nmHz6B0P8 for ; Sat, 10 Jan 2026 10:22:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpF8B3mjzz46th for ; Sat, 10 Jan 2026 10:22:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768040570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AM3m7YNVv3PdfdBLav2gQiLfSNaEQ4yAx00DRp1li2w=; b=pyCwOX9OV1Wc5j7ZUHl8SwEJeIspsbu4N8yH0us9pwDvHSEoIZnPGwUns90abhyNc9xmUF HJWEP7kIi55QLeG8fQwXugnVY0/3GEUPDTAZbGGI0if+BKE/6LmCIoTF0YAgOkTPZMe9Ww /2jGlCjuXN5qzWiB3juFX+yK7VutWjXla1gr/HBzBc2n8TsPxsWZvbR/1TcGvEgMSCw6Cb vpOPFewgKmcMgiJ7KlJl13l7ZmCpG2xDHpwOeWYuEsx6hHXIwPdv493dVqHseB5DQbICcP tXfUG1s8F/kpyTzdwZGf21fI4AgVtKZC7qSDyHuLThVp9rrQ5RdLQmLjBqjgSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768040570; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AM3m7YNVv3PdfdBLav2gQiLfSNaEQ4yAx00DRp1li2w=; b=XeB0p51o75XdDeJ+Oz1uduxY+Yc78D2e8tWjSpJJ5MCAIJk30h+DWiTUtpWlb6EhJfy9Uh tNCFEQnbkUegjG5F1cl/FH+2h67YzzkB7B0oc/zqQ+elWG9BY0v6EtEo4OFbqT7HruL/lM yowJTijVy2/iHSr3e8yXK3PndiO+nOn+/IYyrZAklNOKEoO27JBNOIT+hqHiSLewu8nBte aUarBX66O/HvRblQytQ5W9O6doZUkOIaH4oYSBhzfWFAveCdXG6024ReXRjc/YCUwEgux9 lOa9aKeeS29hfcBFz0Epl9kliC+Qzxi38h9HBv3DwCea92lRsH6A03IWaLHfJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768040570; a=rsa-sha256; cv=none; b=HDn18E/l83Ewa18ZXFDdEjH2YZvxMaYviun3ErzsW5+aYCkz5pQi//ZdDIL11SLVTieHhY RRH9wLQjY5F6yhPhtO1UejF4jdrAQB2B3veclHF5hHtnimT29cmwgiFKtCncvhCeoDtNVp z8nSE7b57EDxODeEUN2K4394Y0pYCYUR/UVsesCupBfXpahwdrq2XJYaV3pQ/dM+j2YV8P AC2yYwY1iAHiWf52E+UuFMmGXfImJ4IIA5rm+IlXEK7LzMHhJmyVnSIos3ehuGWFClf+I/ PuWMFMNDpJyGX7XONSgDBii5Y5Au411K9lgnTfuui30C2Xc6J4nYCcAAjEt9MA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpF8B390TzrXX for ; Sat, 10 Jan 2026 10:22:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 238da by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 10:22:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 71f4eb518cd9 - stable/15 - pf: don't reject route-to'd too-large packets List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 71f4eb518cd9241b429afebe5333aa1d6b7b46c6 Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 10:22:50 +0000 Message-Id: <6962287a.238da.19dbbc55@gitrepo.freebsd.org> The branch stable/15 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=71f4eb518cd9241b429afebe5333aa1d6b7b46c6 commit 71f4eb518cd9241b429afebe5333aa1d6b7b46c6 Author: Kristof Provost AuthorDate: 2025-12-26 09:58:59 +0000 Commit: Kristof Provost CommitDate: 2026-01-10 09:50:37 +0000 pf: don't reject route-to'd too-large packets If we're sending a packet via pf_route()/pf_route6() we check for packet size and potentially generate ICMP(6) packet too big messages. If we do, don't consider this a rejected packet. That is, return PF_PASS and set the mbuf to NULL rather than returning PF_DROP. This matters for locally generated packets, because with PF_DROP we can end up returning EACCES to userspace, causing the connection to terminate. Instead, with PF_PASS and a NULL mbuf this is translated to PFIL_CONSUMED, which does not return an error to userspace. MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 2e7699355f08258365fb5f65d11ac297e20f78de) --- sys/netpfil/pf/pf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 567615acdf0c..2cd3ee535b85 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -9343,7 +9343,8 @@ pf_route(struct pf_krule *r, struct ifnet *oifp, ifp->if_mtu, pd->af, r, pd->act.rtableid); } SDT_PROBE1(pf, ip, route_to, drop, __LINE__); - action = PF_DROP; + /* Return pass, so we return PFIL_CONSUMED to the stack. */ + action = PF_PASS; goto bad; } @@ -9665,7 +9666,8 @@ pf_route6(struct pf_krule *r, struct ifnet *oifp, pf_send_icmp(m0, ICMP6_PACKET_TOO_BIG, 0, ifp->if_mtu, pd->af, r, pd->act.rtableid); } - action = PF_DROP; + /* Return pass, so we return PFIL_CONSUMED to the stack. */ + action = PF_PASS; SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); goto bad; } From nobody Sat Jan 10 12:33:56 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpJ3k1Gr5z6B8yL; Sat, 10 Jan 2026 12:34:10 +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 4dpJ3j511Pz4Qkc; Sat, 10 Jan 2026 12:34:09 +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 60ACXuok046539; Sat, 10 Jan 2026 14:33:59 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 60ACXuok046539 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 60ACXuxs046537; Sat, 10 Jan 2026 14:33:56 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 10 Jan 2026 14:33:56 +0200 From: Konstantin Belousov To: John Hall Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Subject: Re: git: 256d05617c71 - stable/15 - smartpqi: update to version 4660.0.2002 Message-ID: References: <69613e57.38d51.5e44ad72@gitrepo.freebsd.org> List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <69613e57.38d51.5e44ad72@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.2 X-Spam-Checker-Version: SpamAssassin 4.0.2 (2025-08-27) on tom.home X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dpJ3j511Pz4Qkc On Fri, Jan 09, 2026 at 05:43:51PM +0000, John Hall wrote: > The branch stable/15 has been updated by jrhall: > > URL: https://cgit.FreeBSD.org/src/commit/?id=256d05617c711b0f6959a10ebc716501e26e4cfa > > commit 256d05617c711b0f6959a10ebc716501e26e4cfa > Author: John Hall > AuthorDate: 2025-08-28 21:11:02 +0000 > Commit: John Hall > CommitDate: 2026-01-09 17:41:40 +0000 > > smartpqi: update to version 4660.0.2002 > > This updates the smartpqi driver to Microchip's > latest available public release. > > Reviewed by: imp > Approved by: imp > > Sponsored by: Microchip Technology Inc. > > Differential Revision: https://reviews.freebsd.org/D52507 > > (cherry picked from commit c558eca47970c8467ed0494145f08d1879050bbd) Why the insta-MFC was done? From nobody Sat Jan 10 13:10:20 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpJsS5xvnz6N5YH for ; Sat, 10 Jan 2026 13:10:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpJsS5Nw2z3Hmd for ; Sat, 10 Jan 2026 13:10:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768050620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kdw17zr7s8f8xGiR+ZkY4PNO3swR8LZua1IGEoSQZUc=; b=dCb6WQMBcWkTEo5EggkCS8kZBXAwlCtHYk7DaAzAPF607V7lriWjNEwfdseSYfQTqnRNPh lc6n91pkhr2EDYCvUkFhId/Iz+067NpjvRYGHLM01RiHv0Bt8mpNRLRcqj17QGaozjwap6 t5bS1ZmT+uzIHYfiF09puqHR8x/qcPmPqfDc8B22nkUmrfkCYn7T7RXrQQZdAEzeH4LLi3 pd5RvJXO4pFd29mJq+ngIyVjnva2vC+kBJYBogbg+YCuBZGXon0bf08vbS7IMsjqXluFqR LmoiLe0/vEzlBmwk2E0ve7PXOinJUvkSYqEtpWn5L673Al3wHLZuKllGglrfvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768050620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kdw17zr7s8f8xGiR+ZkY4PNO3swR8LZua1IGEoSQZUc=; b=bZ02pdhvcCvR2/NXDWYmCCUP49lhUvMPZYVtxfzPAdxUgjx/EsqOA8EVgsq6qUaebqj2Ha 4IFI4iQnlHDUWQO7ePQX13cTyVGOpshuWKm1KtfFQJY4VsFWmKpPk/MLKI14pZBC+UwQh+ zN8xiecRKKx0WogsNL1VAsdc929vXuU3n4BzfVE3hKEsDbj98k3glNiXPq1g8CEkT+RNGi y6ZVQ/l6367qAuSr/WAHi/x+6A5iuWUWS7pJd0Ruks38WHIZsG+L8hdEc4aJTfyonPHVnL kufmkvX85RrLfxhoMcqyyC82sHjS9cvY1rORXyVFcxCR/U2o4bJ8ls6MEafuSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768050620; a=rsa-sha256; cv=none; b=uI0BofZDmYpIZtYETQlN7dzMXcc2Oix1O9tsC3d47ldPo/bYP83DruQM2g/uWMt3mt3E5i E7WOB87fBf9RHqIXcddnDKpZzYaBwDKoaEocetH5vdWQfz2maEusR64h8gxY0n2Ouyor+w kBzKgtwLRhQmef1D6sYcmJ+UMLsmX4XEm5ZxtD0zoEoekWrj4JY3JrV9Ss4eyu4ZUrqiXP uD4jeLX8UK1vr9KBATiuh+F1r7kVB6wBn2qAiYTdAxbhXMdyo7HJUKjI8jhsKTqER2iF57 B5xqjbil5DRmabkuPjYWjr7UnCqR3GDs0BFu+Cij30rIsiC4vtAdjdamqhRkAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpJsS4tq4zwZ8 for ; Sat, 10 Jan 2026 13:10:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3cab0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 13:10:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 4e3fbe5cc92e - stable/15 - ng_hci(4): Fix a typo in a source code comment List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 4e3fbe5cc92ef4822877b08e6d40ff38433cf1de Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 13:10:20 +0000 Message-Id: <69624fbc.3cab0.73d0f92d@gitrepo.freebsd.org> The branch stable/15 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=4e3fbe5cc92ef4822877b08e6d40ff38433cf1de commit 4e3fbe5cc92ef4822877b08e6d40ff38433cf1de Author: Gordon Bergling AuthorDate: 2025-12-13 09:51:45 +0000 Commit: Gordon Bergling CommitDate: 2026-01-10 13:08:24 +0000 ng_hci(4): Fix a typo in a source code comment - s/depricated/deprecated/ (cherry picked from commit 756712d745db207085f1fe87dc8258434ec2147d) --- sys/netgraph/bluetooth/include/ng_hci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netgraph/bluetooth/include/ng_hci.h b/sys/netgraph/bluetooth/include/ng_hci.h index ce3291770740..54980e128bba 100644 --- a/sys/netgraph/bluetooth/include/ng_hci.h +++ b/sys/netgraph/bluetooth/include/ng_hci.h @@ -1391,7 +1391,7 @@ typedef struct { typedef ng_hci_status_rp ng_hci_write_iac_lap_rp; -/*0x003b-0x003e commands are depricated v2.0 or later*/ +/*0x003b-0x003e commands are deprecated v2.0 or later*/ #define NG_HCI_OCF_READ_PAGE_SCAN_PERIOD 0x003b /* No command parameter(s) */ typedef struct { From nobody Sat Jan 10 13:10:21 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpJsV3Mqjz6N5YJ for ; Sat, 10 Jan 2026 13:10:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpJsV1Bttz3Hmf for ; Sat, 10 Jan 2026 13:10:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768050622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t67YX2c89NKgOX8hXA8Tofv3tFB74yonJ3odwjiinjI=; b=rTp39Iqcf/Jh7dmTiFGCmKcq7RXD2kmQz0D2ogk6QelMMgzEi6U4dLQPE3rsNsdCrO4EJ9 WufE8FLLBqiWrhccnwyUZWFTUDT9qeHNNQ6Jn7bNP0Khp0B6RF0QE6EDM/0dEcYq/+HWa8 LxmJaasi4ITje6S+1Pj4diqyeMcfyEuvUhp8ay9Al+AFm83Mq3zKwuf7Xcxz5R0DFmV6xJ eUrHNqspObSAAV6mKKtPm2aqLYXSdHldq3X8euKLxYjCBRQMaYUZXQHHRuyNrRJFUL4Pjw B7RatYyLnrhw2QBk15GL7JzJ4Eh1KewVQvi1wyOYWGlHcmdEdp72fJ+hfczuig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768050622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=t67YX2c89NKgOX8hXA8Tofv3tFB74yonJ3odwjiinjI=; b=sk3alc9EbXo6Ilf/Yl3UFu3TrnNnlPyPUolJV4R6uRzLspRs/tsfFFlLw49K7JLQAFnhSu G3St0h/xtF2WY6gZumNmn+QWv+kbU6Abkig4iXuAEeXaz9REElo765RmAs1As7tIim3EUe 4/2urdnGkThY+wc9G095dkwnOWDsP1kUkB5H/9AMFQ8lZuvNI98rBKcAk1h+gi3vOpGZFs tSuRwfoKIeJo12RGVe+SRwTCrMnVw8e8hiDNI8G2wcg0MxnqeasmVfqhkDUPsfvfNs5JnJ /B1oEyvG2exWKwHxWZd+VJzD4S6fDkJpDHdsz+PLoLIyZqb+vP+bQPGRfEjUjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768050622; a=rsa-sha256; cv=none; b=fL4d3P1NS3JDLSm6Bx558FhE+PhzdAJyLd2PVafLJ22drFRXN1TZygWPl1cyWbABqClF/G wp8gTteR5PRNqROz4Z2zj4OxaAjAf/xsyUavKJTpXEjRGVGsblfh5Ahkws+hDJifQ+WYTp lFdeN2pVLp/zNSeuAWBfBdys6tBrCorlW0M/jJFdidlv5OZ4brletaXi75oaoosLC/Yl0q SPbHe6E5UzQ+C2lN2n1nmif1VQkdxwST9Ho+IfLJBQivRDvT76rrbnwYDKMnwqU0EOs1zT F5OkC/68IkJ0cgXCV0JgH/d8+waklo8fhkPHcsmzNrsWuwV/MurxtR3TLyaBRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpJsT5h3szwKT for ; Sat, 10 Jan 2026 13:10:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c624 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 13:10:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 72333f20d0e9 - stable/15 - oce(4): Fix a typo in a device debug message List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 72333f20d0e98860d1d3b27557cf5e30e9150b8a Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 13:10:21 +0000 Message-Id: <69624fbd.3c624.39da56eb@gitrepo.freebsd.org> The branch stable/15 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=72333f20d0e98860d1d3b27557cf5e30e9150b8a commit 72333f20d0e98860d1d3b27557cf5e30e9150b8a Author: Gordon Bergling AuthorDate: 2025-12-13 09:48:56 +0000 Commit: Gordon Bergling CommitDate: 2026-01-10 13:08:42 +0000 oce(4): Fix a typo in a device debug message - s/depricated/deprecated/ (cherry picked from commit a3950d70a499e120c67da884865486e8599229bd) --- sys/dev/oce/oce_mbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/oce/oce_mbox.c b/sys/dev/oce/oce_mbox.c index a51798119761..f24271ed65ae 100644 --- a/sys/dev/oce/oce_mbox.c +++ b/sys/dev/oce/oce_mbox.c @@ -1007,7 +1007,7 @@ error: * @param *stats pointer to where to store statistics * @param reset_stats resets statistics of set * @returns 0 on success, EIO on failure - * @note command depricated in Lancer + * @note command deprecated in Lancer */ #define OCE_MBOX_GET_NIC_STATS(sc, pstats_dma_mem, version) \ int \ From nobody Sat Jan 10 13:10:22 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpJsW1rrFz6N5rs for ; Sat, 10 Jan 2026 13:10:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpJsV6vyQz3HN2 for ; Sat, 10 Jan 2026 13:10:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768050623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V7ye+qGvYpK9XpaKJ4LFeYrb0IDpwhBwhReuID0Y7dE=; b=WYdbze4wDrvHNylgF6WCFCP1HHFep1k0fTrYl01gRAnoMbP+AxIt5Y9AAxUYPN6dhqjHT8 U7jIpWcRUqQ0Fj84sEsdIzBm2wm3f1s6BZ+BzadJ91Sz6jZZvrBk8yIesQRpTKf6b/i5tf KO9LyuHFHKTqNuZRHr57q7MNvvLL7mmDBTteIJx0lyWs3Q8hzJ59B5Zg7BJIhvLLtMEv9c RSs6MPo1kKkorhyCFbI2dvEAcw2oAsS6L5wSFpalxC4EClHX4kckf2jzwg2m36L8LWBnla RV2Xh6FNOy17III6p/3EiH0Ki/yMPrh2bZwJGH5nhQAa1z7LXp6kCEOyMCzpcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768050623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V7ye+qGvYpK9XpaKJ4LFeYrb0IDpwhBwhReuID0Y7dE=; b=eU1igY3RnuKR19zK4tXIAz3oRwvzX9RK2Xmr6siYn+l/eZ+Su7dSBk2qxK3my/fmjHN3+F uYcMqa00L5JxdeIh9YfU6J7E1WNmeXxksJ6Sy1JAmE8yV4jHHySei2Zje/mKUox/w7vcSt FQjWTrwYYMnmFienmFBC7ya9i33XavRhNAEivpmzSITo+tsdgvUjLdJ492sEKFTRM1Wvns dEjHsVy3gyrqwRFVkblh9WHSiyVjDAC4JzqAIb77dNz9yi1WocFN8CBSbW97vS6Q764325 6YCdS1xZFhErjhLHpdTEp1LJROIKtIeFcV/zrUsV/QnAa+8Foh1+DDVOZFiWGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768050623; a=rsa-sha256; cv=none; b=u/l2HEWFmm2sLm3kvVo/tSODIVfO8ugB0EtulNsDYCU5lDRSM9RS+b1d7Z/lMYoiuKxTK5 cH0plcETtkW/pK8isx+yeiaNGvqlkGNwdV2pkO8V0sxPzrUT27hjN8KJ05NJt47kBDFcJi MKN01uymx79kC8dz+jsk3yE7vv7ap53CfzyZ0Ggs/uJYZR5LHPdB/qwIjXlch9V+kW9zLI 49B+6by5vrsp4n8CCHSsL1pmNMaUTDMyc6juhvSePXbIuW+lBX6ob/6X/4jEN25ujFNtPz YjvpiMOOTzakLyh1EWfcK/H00uxx5af9w5O7RpUKkFCK3MPllv8MebkErrys/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]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpJsV6V0bzwDk for ; Sat, 10 Jan 2026 13:10:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c7bf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 13:10:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 0bedd0671358 - stable/15 - altq(4): Fix a typo in a source code comment List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 0bedd0671358ce38ba1c7eea979a647101cecac2 Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 13:10:22 +0000 Message-Id: <69624fbe.3c7bf.6a3d8d82@gitrepo.freebsd.org> The branch stable/15 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=0bedd0671358ce38ba1c7eea979a647101cecac2 commit 0bedd0671358ce38ba1c7eea979a647101cecac2 Author: Gordon Bergling AuthorDate: 2025-12-13 09:50:05 +0000 Commit: Gordon Bergling CommitDate: 2026-01-10 13:09:00 +0000 altq(4): Fix a typo in a source code comment - s/backet/bucket/ (cherry picked from commit 1df4d82bd17ebd7449a6b58c32b65a12269ca068) --- sys/net/altq/altq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/altq/altq.h b/sys/net/altq/altq.h index 1b21007cd457..4963d649038e 100644 --- a/sys/net/altq/altq.h +++ b/sys/net/altq/altq.h @@ -55,7 +55,7 @@ #define ALTQT_CODEL 14 /* CoDel */ #define ALTQT_MAX 15 /* should be max discipline type + 1 */ -/* simple token backet meter profile */ +/* simple token bucket meter profile */ struct tb_profile { u_int64_t rate; /* rate in bit-per-sec */ u_int32_t depth; /* depth in bytes */ From nobody Sat Jan 10 13:10:24 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpJsX1cpXz6N5h3 for ; Sat, 10 Jan 2026 13:10:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpJsX0bqZz3HbP for ; Sat, 10 Jan 2026 13:10:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768050624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dmOHaKvyQ34lKfyCIIOnIXD2vqQPttCg7oLbkqiZN3o=; b=SCkGczwMpKnfI1/KJ7dT2dLMgLDZdowVoqbPtSsTx90EXi/TIgP+j2Ym49fnQ6+JAqGpAS rHj4g+PaJzl12CtICB6aaQTTyZ2BxsB4V+U5u9de0hRQAPBnqhiirCl919Ykdhnr0e7MVP cNJ+OWxLIM/DrWl+6JOr9H/SMelX4r1G3ZHbvy4TTyiJJX0rae80njnOL+sHVyyHyerDTL +DaavcPh3+WQ3xEN6cRYnX7KpqCT7+Yq7rXYqk9EUAePoQgbIIlQbcSTQCGWYZiDCY8hJa ggC5g3HoSfkQeuiMBYAj2mafiavmIHmUZQEF6UHxaofwad07ygKj3qL64hWtVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768050624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dmOHaKvyQ34lKfyCIIOnIXD2vqQPttCg7oLbkqiZN3o=; b=kNKwb8UaA6uD3SUuSy/LULC1w7Ye6NfjeNVSONrBIVnvBvqiesAER3S+faSKx2bZVDgM/p f+9uR2JsAcr1IG1MZ5xVQvHn1Ty3EAIwz0pWx+4OlF4ZTq/J61qBLGc3H8wgUo2Q1AIXES kMfM2DXp/RfSOYgmVnLzqo+Minjo5Fmbi0kulrU7s15JckET8YUX0GnBm5q3w7GuAKOtKa MiKElAPcv1/OUoQjv0tUuoRQ3Gg1PVfj1Eh0y+HIJgD65bVO/3qFrT/7dBaYgt4s+HCRjg L0rsH6I+/agYYcDDuk0IEIKesYUjZeoPR79L8+9nQleDxpXFyosYelrHAsXPFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768050624; a=rsa-sha256; cv=none; b=xreQfW2b8o+TJcQebU956PDGZ8QJbGn+WnxWRkaDcVlvg0Wkve1Ctr2roiBwzjYk08Q2gF E81vMCnnBlB94UZlBfbbwMhETg+diNNOB4Xgq3jytFJ3X2s5hNk5fgh5r43SYWW9J6Cyeu u3uyafKhWGhYM9q9fJBIWMfmoU7OqYi6C1bNKmWl1wdyUOjHvgRy9OJgR3f1sG3pLQpxUj O8fOG0ax4GjF8xiOvMfOrrUO2P+HeqI/imgFqwcmt3eJ3GnHjyc5Dn96Nw/Zfv9c7JOCAO GBfVJDdW5wsNGSY4UCps1T/hCEZKrT/sHUlip5ck8Zn1xeBNpk3+mthfz96Eag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpJsX0Bmxzwc9 for ; Sat, 10 Jan 2026 13:10:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b3df by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 13:10:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 353e9ce09f16 - stable/15 - mmc(4): Fix a typo in a device debug message List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 353e9ce09f16aa0e4decdac84cff9d50298823aa Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 13:10:24 +0000 Message-Id: <69624fc0.3b3df.a4cd872@gitrepo.freebsd.org> The branch stable/15 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=353e9ce09f16aa0e4decdac84cff9d50298823aa commit 353e9ce09f16aa0e4decdac84cff9d50298823aa Author: Gordon Bergling AuthorDate: 2025-12-13 09:47:40 +0000 Commit: Gordon Bergling CommitDate: 2026-01-10 13:09:17 +0000 mmc(4): Fix a typo in a device debug message - s/reseting/resetting/ (cherry picked from commit 3b6f9481a85600cf1f23a819c3afee30fcd4122f) --- sys/cam/mmc/mmc_xpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cam/mmc/mmc_xpt.c b/sys/cam/mmc/mmc_xpt.c index f5f66f5214a8..5c26ee30d36a 100644 --- a/sys/cam/mmc/mmc_xpt.c +++ b/sys/cam/mmc/mmc_xpt.c @@ -632,7 +632,7 @@ mmcprobe_start(struct cam_periph *periph, union ccb *start_ccb) if (host_caps & MMC_CAP_SIGNALING_180) softc->flags |= PROBE_FLAG_HOST_CAN_DO_18V; uint32_t hv = mmc_highest_voltage(softc->host_ocr); - CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_PROBE, ("reseting the bus\n")); + CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_PROBE, ("resetting the bus\n")); init_standard_ccb(start_ccb, XPT_MMC_SET_TRAN_SETTINGS); cts->ios.vdd = hv; cts->ios.bus_mode = opendrain; From nobody Sat Jan 10 13:10:25 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpJsY3JF6z6N5h6 for ; Sat, 10 Jan 2026 13:10:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpJsY1XJcz3Hf1 for ; Sat, 10 Jan 2026 13:10:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768050625; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aun+6HsvpTuB835H5AlPRJ68XLwrbLEPYJKSPj8abio=; b=wYFJ2RXRDa68gn2bP2ELsr73Ha1o/X0FyGeYanj8Sje/hDGNiRFJmL0OUROaH82Fd8gonZ e7Gast8jtWcEk0M5yyD/I/V3oGIYqfAiFcsWy0qQFj8rJyLTxCFxLmSud9kmR6tRzOgO3B 7K1ZkSM+8I+Gixy0MUWMFlALJzsaJl2sbEu3p9koUZjzZzOVCj9UR+t91N7W3XssbKZpvf x87Cxs3P/TDWDaD9R7hDz/2PtAKzM5ZQi4l33Z5/04XrA2R6j20EJIKxySZrf2x39G0ZK0 SBCDA8GGEiYK7Xg9TacdbfAkEJhTtHF6h4tQpSSTs9fCV/LgCLPVODQ81ceMsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768050625; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aun+6HsvpTuB835H5AlPRJ68XLwrbLEPYJKSPj8abio=; b=r5KkEtOFGQLiObIUitsKAztDcRgIsmlIeToPSbpQsBlDKu5QCMhjMW0C5H44S82LvJkC9K hnCLH/a4Y9L4uTC5k6XqMJszOijbf6udXRVct6iELZKbEdeJOWQmQE0lrksEemDCwv3KOY dwgucFXQw4v4BU1y3J1ZhB3JWgCI5cF3ZEuiZFjPo4LGHQFs+nxjg7foZ5yPqTBpI74MVP FbUz7tmYUixl5FxgQ0uQcEmQdo+Guwml17hQZfQa0cv5Vr/8PNRx+PvNXYmnKU72OkWuHR p5B0BrBbUu7nqZXh7loguKGdAjBzgpVhuQbA4cBxQwGZryAxuFLt4lsnWBBFXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768050625; a=rsa-sha256; cv=none; b=awcfYWFnJfUKQbFDmUQOL0wBpo/iNBtUKsW027Me0yIO5kXVibnDscaQCl/kkxVea0+Q35 jlJWwhWwgqqi/3wJNn6jOuZKTSENIliRHBheMXHcPdnaWtmHv7eg7Ck+zc4rkWnPQi571i LQzW9yhTIcxs9PwjYxQRwPuFpWKNB2OSXXJEMxnll+5trtUSsUi2taDCxp32TSgfQSR6FR jWoKZzHCTyqn3vJeKPKDR8RFrjV+k0S2l2BuqLUpVXJQlv+CnPaKHRhiIsbWTgc8wm4m+t QsFhMOmU/UQK4rQZq6eVOyvfaLQE0obzkH+y3zHZcY8nwRsswDbuef9go33lBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpJsY11w2zwJ1 for ; Sat, 10 Jan 2026 13:10:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a46f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 13:10:25 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 6946e9afadef - stable/15 - mps(4): Fix a typo in a device message List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 6946e9afadefb86be9630cbc2fdad4f741f73e5d Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 13:10:25 +0000 Message-Id: <69624fc1.3a46f.4626f75b@gitrepo.freebsd.org> The branch stable/15 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=6946e9afadefb86be9630cbc2fdad4f741f73e5d commit 6946e9afadefb86be9630cbc2fdad4f741f73e5d Author: Gordon Bergling AuthorDate: 2025-12-13 09:43:49 +0000 Commit: Gordon Bergling CommitDate: 2026-01-10 13:09:38 +0000 mps(4): Fix a typo in a device message - s/reseting/resetting/ (cherry picked from commit bcc735cb710fb74d1fb5f7be3d37701343c58ccd) --- sys/dev/mps/mps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/mps/mps.c b/sys/dev/mps/mps.c index 9dfa0471ac0a..357eacf28925 100644 --- a/sys/dev/mps/mps.c +++ b/sys/dev/mps/mps.c @@ -518,7 +518,7 @@ mps_iocfacts_allocate(struct mps_softc *sc, uint8_t attaching) */ if (attaching && ((sc->facts->IOCCapabilities & MPI2_IOCFACTS_CAPABILITY_EVENT_REPLAY) == 0)) { - mps_dprint(sc, MPS_INIT, "No event replay, reseting\n"); + mps_dprint(sc, MPS_INIT, "No event replay, resetting\n"); mps_diag_reset(sc, NO_SLEEP); if ((error = mps_transition_ready(sc)) != 0) { mps_dprint(sc, MPS_INIT|MPS_FAULT, "Failed to " From nobody Sat Jan 10 13:11:15 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpJtX0Hjvz6N66X for ; Sat, 10 Jan 2026 13:11:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpJtW6MDzz3K7M for ; Sat, 10 Jan 2026 13:11:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768050675; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w6HBlRy73x4jcxdFh3VNV6CkWn83YmZkH5hpatLO5FE=; b=E5uAXHZG/CufzHKYHFJx5+R9baVPKnp0mmDxdkPHSSpq/B2+DwYhNuzDT+dws3tLzxt+HM ftq9wygv9Jrc4UOUBtvOE1eHZdx9fNAtDYxhJsKKzLtcV+nUs1t+m4o7+jd9zdDaEYbVYl bWzjybrxpRMulVDXO6agU69oNWPi6nYmAkCQRUpMAeW71xsLKXmN9NWNyiN7LDWWyZn5X3 kVSYmvUJWG81MnqS4j95bwRXNPsIOHeLSG3Dd5R1RCiVV5OUJa4V6h3AGSZiYYfanXHl8v BSDpjQb9xMANTqwUBsJ8SOUVfcwSQ1lOG5xfA48zV5sNcZLaKU/Nz+E97F5/EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768050675; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w6HBlRy73x4jcxdFh3VNV6CkWn83YmZkH5hpatLO5FE=; b=H815q+cvpn7vrpA1QgjSMEmhnMfVAf5O3JV2lSP3qphfzsUkLlK8/znVg2MhuICCOWqV4k HUl+uLGwvuWt0qjPttd/DvNj1Ubzr/O9LQdVo7VdO4FX+qZK2YTOHmqpPe2fX9SXNH/sp3 A4fFF/h4hLRBy8eGl++oJ3K1JcQlxvuzGZ+LgfnZqGDHE31DSxhXFiBqVhQ4CODKnx3PEO e5J5vtt2QC8KMXxz1Lw/pgwEESl3iXdmWBTasyShOZcFv+mdXrhtpgd65vqqTbdiZr8mZP /LbODUSNC8+X62okzR0vFMNBbnjeMnUFZyUC/wGC0LeVQA3DDG8fZipNNUB2hQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768050675; a=rsa-sha256; cv=none; b=dv9vH2FWULMsEF7M1oEhKL9np5f5RCNgu1Uwrrxn/Rb/jUdKjaSUOJmU8aDeuW/dRsIoof 3p1p8DK+PuHlQBKq0h8C1mnrSiB1yHfB/n9LYri6TIVFXiMIdgJ0e7d7+/MM1yLRHNWQcn Rabhc4y8VRYnl4JMEsvFOrRe+0MG3ioVPWbJTb9wV6+EWuoQHYiDLE9wgWljIn9FInA4md Qk/4APngtABNfgkJq50+2m4qsIc7FoQwgkfrzdUiSC1NV+3FXyplLmD9j97CXgIziR8Uii H0vKsh/L2/F9quZ8hkVyq/gy03Rf77+hDCqgq3jh3SELxZiHCXSu0KVSseT0Pw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpJtW5lSDzwrd for ; Sat, 10 Jan 2026 13:11:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ba66 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 13:11:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 001a73c78b38 - stable/14 - ng_hci(4): Fix a typo in a source code comment List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 001a73c78b386735d36521d9c414cc6718e114a1 Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 13:11:15 +0000 Message-Id: <69624ff3.3ba66.450806d7@gitrepo.freebsd.org> The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=001a73c78b386735d36521d9c414cc6718e114a1 commit 001a73c78b386735d36521d9c414cc6718e114a1 Author: Gordon Bergling AuthorDate: 2025-12-13 09:51:45 +0000 Commit: Gordon Bergling CommitDate: 2026-01-10 13:10:58 +0000 ng_hci(4): Fix a typo in a source code comment - s/depricated/deprecated/ (cherry picked from commit 756712d745db207085f1fe87dc8258434ec2147d) --- sys/netgraph/bluetooth/include/ng_hci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netgraph/bluetooth/include/ng_hci.h b/sys/netgraph/bluetooth/include/ng_hci.h index ce3291770740..54980e128bba 100644 --- a/sys/netgraph/bluetooth/include/ng_hci.h +++ b/sys/netgraph/bluetooth/include/ng_hci.h @@ -1391,7 +1391,7 @@ typedef struct { typedef ng_hci_status_rp ng_hci_write_iac_lap_rp; -/*0x003b-0x003e commands are depricated v2.0 or later*/ +/*0x003b-0x003e commands are deprecated v2.0 or later*/ #define NG_HCI_OCF_READ_PAGE_SCAN_PERIOD 0x003b /* No command parameter(s) */ typedef struct { From nobody Sat Jan 10 13:11:34 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpJtv3RPYz6N5l6 for ; Sat, 10 Jan 2026 13:11:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpJtt6kK6z3KMw for ; Sat, 10 Jan 2026 13:11:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768050695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XfQ1ma5N8sEpx4i70o7aXGD3gDeh5zTX0Uk2aFoLj00=; b=Jqp8skQzU8ATiFG5PBLVqwfQzrvtr5QtmQb0K7cJ2S719yIqBS8vXF3FE0DO87UvqxFdPZ QMVN0V/9qMobvhGXR8g6ZRSBWH+4VU0QDcXEBdrA8nXdY7ovFwP6vknwkt6D+EXLteBcXA 9oEfvOa74AQ13/PLECjLJOQzJjFL0Hz9U+RSN7ZAmV/qkTQWdKkIwFvzlzSw0v2/gCCIny z/fgksGexi/EWH70jK80gnmz8gleZPpHy8hmFHBFX+VUWwbqNLFhcWSIQ4oW6a+CelJhDy hzF+38blAMDeN/vq3lB0q7nLAkP1MQ8Hh0ays3KYMDNPnp7Tz1WlgCvF4Pjg1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768050695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XfQ1ma5N8sEpx4i70o7aXGD3gDeh5zTX0Uk2aFoLj00=; b=aLMTaujhO+zSjtMV0dYxVnZW+TiOwbiFyb/KT+xZ6pbK0yuF+cNuXRt2GRBL/ASQwf+G2u iJGOzdyf1Tz7iiTpYYn0+KtrdAIEjQVHbeP7d5LwwXTPbfag+UHRmlnXA064bmqzq7p+fE +JB69kxa/xep2H/rsAGBS/+fMAy4jKzzdzUOEq1tlkIVA2kC7XIubdx0cI88QwOZrvc1wl Hz3GPWUhJKU3IR/F0gYwDSES2DF0jiN6UalCmpH5M7aSR4Zbsrj99xvTjLK6AKvy22M6rr PH+o9aauqS9koShOifX5eBXPP703eNhyAk2hZteCtb8NS7nAdOa1rp0jjjN1lA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768050695; a=rsa-sha256; cv=none; b=TM3RsQh+QID77PnSgj29VQo9VCwAl8TJiASVczHFAMW6OzOTHdedJ5VS/2XfvZTapCPBaQ M4dHCPdhGSUDhk0m3NvUGhc3pMyMZi5GoLckPSN1hVTEUEyWmzqqg3h56FPS6OO8Ujaz++ F+EtwVnEx9P4mHt1ox7Sd/wnvPtPYhX4jzK2e0E5ceoCONG6+ggnRAr5jX5Wp2Ws2qGhLS 70tU135TQ7TVuQorn+Q9Sc7wfG9t/2hYOVlvPL5v9p7bxr4zbsrxq76DYGnozWGMlHT8Am rEUEWH9x9OGX5K7CGT2IdCvTZoljt8dC5WXEQ/dPjSfhtTxM/wz0Smms527wMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpJtt6JnvzwcL for ; Sat, 10 Jan 2026 13:11:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c2ad by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 13:11:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 4c0dc30b761a - stable/14 - oce(4): Fix a typo in a device debug message List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4c0dc30b761a428c81006fbc454c990363736923 Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 13:11:34 +0000 Message-Id: <69625006.3c2ad.b4f6927@gitrepo.freebsd.org> The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=4c0dc30b761a428c81006fbc454c990363736923 commit 4c0dc30b761a428c81006fbc454c990363736923 Author: Gordon Bergling AuthorDate: 2025-12-13 09:48:56 +0000 Commit: Gordon Bergling CommitDate: 2026-01-10 13:11:19 +0000 oce(4): Fix a typo in a device debug message - s/depricated/deprecated/ (cherry picked from commit a3950d70a499e120c67da884865486e8599229bd) --- sys/dev/oce/oce_mbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/oce/oce_mbox.c b/sys/dev/oce/oce_mbox.c index a51798119761..f24271ed65ae 100644 --- a/sys/dev/oce/oce_mbox.c +++ b/sys/dev/oce/oce_mbox.c @@ -1007,7 +1007,7 @@ error: * @param *stats pointer to where to store statistics * @param reset_stats resets statistics of set * @returns 0 on success, EIO on failure - * @note command depricated in Lancer + * @note command deprecated in Lancer */ #define OCE_MBOX_GET_NIC_STATS(sc, pstats_dma_mem, version) \ int \ From nobody Sat Jan 10 13:12:18 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpJvk6vG3z6N66x for ; Sat, 10 Jan 2026 13:12:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpJvk6Ccjz3KbB for ; Sat, 10 Jan 2026 13:12:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768050738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NeLXLmBvqkk1Ld2sUeKeHLyhzil7JUCxmvHN4CJmzTU=; b=LDWrjBOvgyLLufbKrSqceXeGT5vvTJuFTJOfdHo57NpoIUn/FeATT0TD27wrfYE3CggjCR zSMtNdjgrAtZlbfepcIRqnJmZA7RNmV2ZBfGU1OCYmmZR45WHLlNVmHH3yxhFbOAgRIwD3 QEPhvBonunFZjDO7hQdFHAM47mF0BHddHuQlwIyYysEMC2tzInNMOehrVXfNG8koBl3fk0 KBYzriFKGI1iB29FH6Od6EHpvvIBYuh0ni3ICqcMiigFNsCcf9oQbc7BHjWH1QVPTgHB/4 tccnRIq+zud0luzfmw4jxnKzhbebbdRsapxU+RcjlWjbF/Oti+4sjJZcJVcwTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768050738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NeLXLmBvqkk1Ld2sUeKeHLyhzil7JUCxmvHN4CJmzTU=; b=qRuRaZ91+Bycer/wcYKXGcP8BUx3EeqSOnFp64VttoL+75zbTKphQr0Tp4J70dGTQasfH8 DOKmq7rWKSTl8VxVZ1SMOsTLeYz04HwzBAx24I54oKmEhDJaJeOpTJ7guKc7OSRfGztiaG 6ERd81WGjM6GXWkx/0J9wW7F/zLeYU4F1P5zGtsE4srJTxUkVsIYF/cJx/oplc397jGAV+ I9gpM8jDebKXjaN6eHanD+rQLEbw+jiASxI+bJEJpk+2JUEnEPck+UuSC7JX7vspjxz7zP g8qQ9pV59ML74HubOuoeiDA+TWwxxUu0DWYsflgNUyDL5wBpFCpqn38+zx/77A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768050738; a=rsa-sha256; cv=none; b=YO50DuzsnVEiW5cDi34upFSRFSzf75uDjCu3QMDapnxAWaooP4gHKo/t9QLh2lu7USCxFm elUA32SuHqgK/X/GARWBh2Nkrdfq1KtcNcWylLMbQA3rsXIQ8F7rDx9YqZQwG+nv71QPE8 dvY5zKRhPrrGqb/MgvicOfEjG6Hkcfv3Ny7ysexzPZ0D334OnxLS/o/vp+gKwSg7McgXmp mqp8kO4oxKdIBF8tkUhs31yw3V2Cmz8V977dMVc2iuKXJIsKNfatA1Tha8MBjxT88+YEQk qLghvxzv4UH/E6Jhpk8upektjnqLxUps60OWBUlDqhEpcD96X5hj7oIUgxeffw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpJvk5nnDzwZp for ; Sat, 10 Jan 2026 13:12:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c9ba by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 13:12:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: fced0139a3fb - stable/14 - altq(4): Fix a typo in a source code comment List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fced0139a3fb8d11dbee64069f79d5d9ba0b7cb9 Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 13:12:18 +0000 Message-Id: <69625032.3c9ba.516336e1@gitrepo.freebsd.org> The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=fced0139a3fb8d11dbee64069f79d5d9ba0b7cb9 commit fced0139a3fb8d11dbee64069f79d5d9ba0b7cb9 Author: Gordon Bergling AuthorDate: 2025-12-13 09:50:05 +0000 Commit: Gordon Bergling CommitDate: 2026-01-10 13:11:48 +0000 altq(4): Fix a typo in a source code comment - s/backet/bucket/ (cherry picked from commit 1df4d82bd17ebd7449a6b58c32b65a12269ca068) --- sys/net/altq/altq.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/altq/altq.h b/sys/net/altq/altq.h index 1b21007cd457..4963d649038e 100644 --- a/sys/net/altq/altq.h +++ b/sys/net/altq/altq.h @@ -55,7 +55,7 @@ #define ALTQT_CODEL 14 /* CoDel */ #define ALTQT_MAX 15 /* should be max discipline type + 1 */ -/* simple token backet meter profile */ +/* simple token bucket meter profile */ struct tb_profile { u_int64_t rate; /* rate in bit-per-sec */ u_int32_t depth; /* depth in bytes */ From nobody Sat Jan 10 13:12:19 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpJvm1T65z6N5r9 for ; Sat, 10 Jan 2026 13:12:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpJvl6t8dz3Kv3 for ; Sat, 10 Jan 2026 13:12:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768050740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b4znv7T1VSmVfx0iDfvuBh4yWvOuA4bzmo29bEvz1Nk=; b=NZJ3ULED7w86q1HHOPGiIi6IN0p61TKRqD6Zj6sIYOVcrKjsesTmzRY+bUnBHbsqp3m2YU nwPj9+I7AlYdghnO0piSNv8EyS45cJSepY3Ss4MsEf6Xvxn9sM9HItgNl4kUsIiaprlzu9 HUvyTZ9SHT2RklONEuv8NrM40eRv54aMj4c5BqseJRKepoYGul1fNw7pIANkwRLYavQQqQ W47fKxxkpAbpuRt8k5SBH67Z3ng05Dz8Ez1Az8rcusyRQerBfZz3UcTSa9C5decIo16ncM eoyL1I01oFocKssjfXWadhKcT0Ep/FqpbaPPwqMdZo54Gs6zoiChMUwVOInOKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768050740; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b4znv7T1VSmVfx0iDfvuBh4yWvOuA4bzmo29bEvz1Nk=; b=YTgFdlO9hJW5fZSl0moQpX9x5DI9LOWz6kFbNgxl+6if+OZ9Zakb96ieERqjQNjC/Hg5A1 Wx3MlgwF0ybD6zI7zyz0VC0QwgIzHp0GiCXVVSIc40aw2Jq7JvXe8acvle6Lw7HbFSsqIg TMlweUJvG0SSuWrBuXslLyx6jLmkBddWtkX5pwkLTSrlz4O1RQ0KLXNfUfyBKG9aVfjlfn M+8iEQ00fmF3bpR0xfomiucUG8Tgf1YBwbG/a5iHLzXw17MTDIBgkSq8QQBVD3PP26SN0C aD8cSlBC7hKm3Lxx4lhgnM+7Z6fxMWMGNdeHXicAFgmL+pMduUC3xCRB/jNfRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768050740; a=rsa-sha256; cv=none; b=GDmQDExF1gkl+FUydTMMC7P+uIdsi3q8gf9JQ5xoK3jbh82itPsWoGyarjaa19jonUIz27 9XM6SJA2iCXCxUTlj06LsMHsg7IoTI3MO0/VwH/EtdBBM0dFGxIzaJ37X27olTTTJDruxz /4MVpZQAwS2WBAC2KUcZglcGFq6vF46cGxv9Da5+sMa+3tEU/+V9AjBT0mM/Hg1b3RulUx gSR+mMxKnaAMKllOnKdpMGYW0eJ6sgPEp3FqZTx7XoMiJBNuwmD1oHWgLlKjn9NCDxecdQ IJG6v83gPtDIDSm7S3u7hpcVRABTit19UE3VbWHOrYmFpYI9KheB1dGfoLeIJA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpJvl6B5gzwZq for ; Sat, 10 Jan 2026 13:12:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3cab1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 13:12:19 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: cb3ce1408d8b - stable/14 - mmc(4): Fix a typo in a device debug message List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cb3ce1408d8b9b30771f3e3abc36325943d0cbba Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 13:12:19 +0000 Message-Id: <69625033.3cab1.5e11f8dc@gitrepo.freebsd.org> The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=cb3ce1408d8b9b30771f3e3abc36325943d0cbba commit cb3ce1408d8b9b30771f3e3abc36325943d0cbba Author: Gordon Bergling AuthorDate: 2025-12-13 09:47:40 +0000 Commit: Gordon Bergling CommitDate: 2026-01-10 13:12:01 +0000 mmc(4): Fix a typo in a device debug message - s/reseting/resetting/ (cherry picked from commit 3b6f9481a85600cf1f23a819c3afee30fcd4122f) --- sys/cam/mmc/mmc_xpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cam/mmc/mmc_xpt.c b/sys/cam/mmc/mmc_xpt.c index 7280890348c1..5c72d219a389 100644 --- a/sys/cam/mmc/mmc_xpt.c +++ b/sys/cam/mmc/mmc_xpt.c @@ -634,7 +634,7 @@ mmcprobe_start(struct cam_periph *periph, union ccb *start_ccb) if (host_caps & MMC_CAP_SIGNALING_180) softc->flags |= PROBE_FLAG_HOST_CAN_DO_18V; uint32_t hv = mmc_highest_voltage(softc->host_ocr); - CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_PROBE, ("reseting the bus\n")); + CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_PROBE, ("resetting the bus\n")); init_standard_ccb(start_ccb, XPT_MMC_SET_TRAN_SETTINGS); cts->ios.vdd = hv; cts->ios.bus_mode = opendrain; From nobody Sat Jan 10 13:12:37 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpJw541Wnz6N5td for ; Sat, 10 Jan 2026 13:12:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpJw51YRpz3LHZ for ; Sat, 10 Jan 2026 13:12:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768050757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bucarBMmB0BPAfc25n36QaAdXvPy6FEXUrq+O4dH3+E=; b=Qbe5YlS6MBSLRYui3aguyzlR6xgxroGIxCOux+kLmTexCVWfZTXYJgumLcMnb+svBfluDh EauQpG146O1pI/JEZRTdS0K30ii1AZGopd3polDuM/0LZk9vdhNxjUFdhJ9ntX00PVWrJX lCyjSHnDNHy48uA+w0lQGE1TUFIirJV5gYvjp3KXtAZ3bZCf4vt0xlsu/aF+8usURETs64 rjdXOT7ha9gItFvSkYO43gyn47TaFJ3Hp3tP2sydBnrntEiSgCG24FqjbRAI1G8mNgITxj 04APWevA0Dxl3/ucj1xWRyCceD95vqbjtCIN5yo47+F0vAJyt6koB26RJRCZ8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768050757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bucarBMmB0BPAfc25n36QaAdXvPy6FEXUrq+O4dH3+E=; b=J43NxIZBxzzHHrs1Rq67o1TK5BsJJaIHhxAuXp2IDcHxkADcPiaEHvX8wYJsqZ++x4bNUn akhk++8lW6av1O5DMx3TIHYqAn8yRpLoXld/0xFPbkTixuHIakXiu66N6VwDdByG0UwxFy G6vZGQ4tIs7Kb/VXw714Q0TNVqJm0npXxPGMhfLybYsZtX1iZwD8Z2oXd9J/+5tfBBseXE 6OoaVkcgnYro3d/tQ1ut/iQdkHiXC0QN7GzNPoQEG+sg1V+YWeD/MUdshBBx56roZATlAq xWl7cZBUWqODEhh7v+7FP1r1nTXjMi2DPhGE6I2XaUutLGaQWXajrSxa8J4C+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768050757; a=rsa-sha256; cv=none; b=q/hSfD6413fmjUR/xC+FM+WMA/S7L/CVXHr3a2b3HVXWX9J/kvmhVgafyHIU6fgyAV5S8A KEFTNUP3mJ20ZKCqOP1X9teh+xpLcq4QqfL7Des1lZytgzTre3es+KkvYY8MqnsLGGjfjR nZ7JG7oVxkhLeEYwZ6ueehcuzVnhwVP8O/S0dN0YUEe0JzF7MXEtxfI2t6Vc28C5W8NbBW lJhsQzTVbV7R5EO5FZNAHjXhC4oAhLHLruWfWfhTc1rquO5Fzp/lr8jY6QcJnN/ruP1G/M XeXksOsiQl8nHCI73R8zfDhrJL1wOP9k7LYfMDekSp2l84IhSrgmIOmvXFly9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpJw517GKzws2 for ; Sat, 10 Jan 2026 13:12:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3cb4b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 13:12:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: cff07c11c708 - stable/14 - mps(4): Fix a typo in a device message List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: cff07c11c7085e118dae8fc76b374b8e4850bdbb Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 13:12:37 +0000 Message-Id: <69625045.3cb4b.6f859db3@gitrepo.freebsd.org> The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=cff07c11c7085e118dae8fc76b374b8e4850bdbb commit cff07c11c7085e118dae8fc76b374b8e4850bdbb Author: Gordon Bergling AuthorDate: 2025-12-13 09:43:49 +0000 Commit: Gordon Bergling CommitDate: 2026-01-10 13:12:24 +0000 mps(4): Fix a typo in a device message - s/reseting/resetting/ (cherry picked from commit bcc735cb710fb74d1fb5f7be3d37701343c58ccd) --- sys/dev/mps/mps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/mps/mps.c b/sys/dev/mps/mps.c index 9dfa0471ac0a..357eacf28925 100644 --- a/sys/dev/mps/mps.c +++ b/sys/dev/mps/mps.c @@ -518,7 +518,7 @@ mps_iocfacts_allocate(struct mps_softc *sc, uint8_t attaching) */ if (attaching && ((sc->facts->IOCCapabilities & MPI2_IOCFACTS_CAPABILITY_EVENT_REPLAY) == 0)) { - mps_dprint(sc, MPS_INIT, "No event replay, reseting\n"); + mps_dprint(sc, MPS_INIT, "No event replay, resetting\n"); mps_diag_reset(sc, NO_SLEEP); if ((error = mps_transition_ready(sc)) != 0) { mps_dprint(sc, MPS_INIT|MPS_FAULT, "Failed to " From nobody Sat Jan 10 17:04:39 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpQ3q5Fr3z6NM90 for ; Sat, 10 Jan 2026 17:04:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpQ3q4S5nz3ljX for ; Sat, 10 Jan 2026 17:04:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768064679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6rxNxUBPp2NJ90UIQ2Kd4AfHzSOXLE8EylDTwQ8vziU=; b=xJM2Ezd61imyqzVffIF3x9ewhFhRjLIeAWpxjQkh4uMunifBONXeQdU/lonUDQX/ses8Uc /0Hw93s8wEibx8QkKeXZjdbpvgJjdzIokE9aUe/ekwJqjLiV4UIA1CLUHU3T7yrTb4tzj9 Z9SJ2XD5mRHHhfDAEtOBv3b8l8vwAiyw3dgL0do6oJh1bZHM8X7lk94SBhq3hKWjcnJNQr S3OiQucHYWo/o54at5GZWLF7ad68B9M/A4hpA/x4EBaSchvPuQ8M34K1JV2HO25p2eYRbQ josHKM5o+q6mn+28GliQ0yM226T03gpAj9WkUSjmh2RJ1oYABy8G5SxD4To+3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768064679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6rxNxUBPp2NJ90UIQ2Kd4AfHzSOXLE8EylDTwQ8vziU=; b=ptGGcasDH8RotoH7hO/GIrrrDu83LxRgBzTqd7JoeyBcb0hzfvSSjNpib423uVAAZHSxth x414JhM5kPIcYG31Miq04EHH8kCFmO+O5X7XbMY25TfeyS+z/Fjayafzq6kHwSgZcn3zbL CJSbk9hq18atJkdekoCCoXrIAuysurQghT8OM995hFg9lHNpwZ+1oXkeYauzIMHtBr2EEg WGBbw/R3NwboQOHZ8KSa3xBkz/BykixDRwA8Prc7Emg2UMdykmytN3ksuOv/Ku9goQ0/aB poJqyvunHJFtfxUnvWBiBf6Ah6MHWQSK6MN79uiIC7AIMEeMJhjo3OxGocKVAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768064679; a=rsa-sha256; cv=none; b=GUVfj7bU8pEkMlhBCXQXbpB5LVwzfI9oBxKepKoYOAY/vRphWwuSXsodh2UZolD3EzKNQI o0j3pG+Dv1ui8B3HXB7m87kFJmZWsNtI4BBu8OHs3x/0z+6XpUdU1xLvPNd+/xcpwr2J1s rEhhvTRN2+Bw9DwkI1sgT4DmjiALHSP3rophk3pH+t+cGooPdm0G4A08Qnr82Hrxjqgjxs AXnXJd6oIze5NHMptcVvKORcwyLIKmFy0m24W8F4bnhfAS6b1CaSmhXKCNNOuttCvgOvv1 JbxNI6j9TUVFdQFFgtzB32LALLLa6b4PwHk8TJKO+g/agtvlaI4c+S6b1r6Ssg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpQ3q41SMz13pW for ; Sat, 10 Jan 2026 17:04:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 302e3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 17:04:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: William Carrel From: Xin LI Subject: git: c76941a6929d - stable/14 - GCE: Enable vtnet(4) Multiqueue. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: c76941a6929d613fbe8f3f2bbbfae7c6dfdd458b Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 17:04:39 +0000 Message-Id: <696286a7.302e3.2d4d3690@gitrepo.freebsd.org> The branch stable/14 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=c76941a6929d613fbe8f3f2bbbfae7c6dfdd458b commit c76941a6929d613fbe8f3f2bbbfae7c6dfdd458b Author: William Carrel AuthorDate: 2026-01-08 08:51:11 +0000 Commit: Xin LI CommitDate: 2026-01-10 17:04:00 +0000 GCE: Enable vtnet(4) Multiqueue. Removes hw.vtnet.mq_disable=1. This workaround was originally introduced nearly a decade ago to address stability issues on KVM that have long since been resolved in both the FreeBSD driver and the GCE hypervisor. Removing this allows network interrupts to scale across multiple vCPUs. Tested on n2-highcpu-16 VM with 15.0-RELEASE and confirmed multiple queue pairs active and interrupts handling across cores. PR: kern/292081 (cherry picked from commit f604d84618ad478fa46ec374480cbcbc1d93bf07) --- release/tools/gce.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/release/tools/gce.conf b/release/tools/gce.conf index 5ad83bcded53..4eadb1d76b92 100644 --- a/release/tools/gce.conf +++ b/release/tools/gce.conf @@ -43,7 +43,6 @@ beastie_disable="YES" loader_logo="none" hw.memtest.tests="0" console="comconsole,vidconsole" -hw.vtnet.mq_disable=1 kern.timecounter.hardware=ACPI-safe aesni_load="YES" nvme_load="YES" From nobody Sat Jan 10 17:04:40 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpQ3r6WVDz6NM91 for ; Sat, 10 Jan 2026 17:04:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpQ3r588Lz3ljY for ; Sat, 10 Jan 2026 17:04:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768064680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kuFGJckdrhX49rKwk4u0MqWiHszKB1DJi6W0o2Ni3eo=; b=DV1JPRnYJhsRlHOOkH1hxdJsn9IhRcWfMpeboCnF1k+aWD+DT/coeYg9ieVhd2T/4JePzo 6+ssN4KOQigoIB5Z7luhIT9KAWT5gYohwrHp9jug564L2xnjf+0cg5Kt0IhbQwqD1AiK8w CM2N+cB67s/X72hCgm+r/N7Wafw/6IvibEy5OOXCb1ANDj/WRYcsOAGKghPchqS2dP6w8u Doy+EkNvJEV1oS+odAZiTlUUjSSenNT429k9GQwThOkbJrbgZQaaN4M88l4uMre+4fOxvC eVtqKfqS0ToTc5TekVPip075R84equZjW/fpZz6TByJIstFqvLbSFSqUcrzW1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768064680; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kuFGJckdrhX49rKwk4u0MqWiHszKB1DJi6W0o2Ni3eo=; b=Vr7DtJKZBUiCrqwYiNry6J/HHEXXEjMms4O26X7TyJa/y++IoG7PYwnIRNyJhjqFqU9X7N lIKvkq1/9ue+LVXoaP2LgJItGmKe4cqYy9zCT0r54LsWSP9gbQ0NGqFvmzuRIo5EC0GEfk 1yV9CEGX0RjRReepW12/Bme7ruZzZu56kkA/kk66UyoAhF7BsXvo1sgFCCxrfSpSMLE8jX RFcmuP/lsJQpRjcQ9HmW6FX5aJXwQtzY+RtuxcqUzg1ECUHS+4xliG6pDMspSo+7r6k4RU 3KYeXQAKGXxVUkyVaFqmwk7PYFwsQhflscK938Vaik9OFFOeW33WLHZHqZ3kZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768064680; a=rsa-sha256; cv=none; b=WmAUpOhIQ3lWbFSK6oP366dnWp8MjjjEEAKN72fKJJvUYyzcIWT0y4KzwjnFR5XysJLgj5 UmNv4psohHY3HSxhOyxOP2rAdBEBiy3RGkvfPmtfXrbZ/hMzHC9+Xg1Zl0EBqBNqIMnIIl Vfr3dSqxswJe4vDOfxfjccF35OzT3CJDU0bc2DvcG8KHdva/z6CUIR2pyEBJaaEHllUVIi 9inHXrgFa7bTf5MbVl8rnzx/Hzy9YTujOyXsLokKz96O+3xpgW3f7jWnviufBfMtfG+uI8 JiRWHTq9Ow21b2P4N53olb6gTdIzrlrSMvxPSpdVkdM0RGbCCQ6f/ic8DJ3k4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpQ3r4j2wz13ZK for ; Sat, 10 Jan 2026 17:04:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 338d1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 17:04:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: William Carrel From: Xin LI Subject: git: d437d1f1d536 - stable/14 - GCE: Fix growfs path List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: d437d1f1d5367af81417de9e0dc84d6a0e6846a1 Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 17:04:40 +0000 Message-Id: <696286a8.338d1.54e87d98@gitrepo.freebsd.org> The branch stable/14 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=d437d1f1d5367af81417de9e0dc84d6a0e6846a1 commit d437d1f1d5367af81417de9e0dc84d6a0e6846a1 Author: William Carrel AuthorDate: 2026-01-08 08:49:42 +0000 Commit: Xin LI CommitDate: 2026-01-10 17:04:01 +0000 GCE: Fix growfs path The sed command was missing the ${DESTDIR} prefix, meaning it was attempting to modify the build host's /etc/rc.d/growfs instead of the target image's script. Tested in an arm64 builder that builds as non-root. PR: kern/292081 (cherry picked from commit 709c1049fe0c6d0217e81268d4f33f7191474453) --- release/tools/gce.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/tools/gce.conf b/release/tools/gce.conf index 4eadb1d76b92..ef1cf6abea31 100644 --- a/release/tools/gce.conf +++ b/release/tools/gce.conf @@ -26,7 +26,7 @@ vm_extra_install_base() { vm_extra_pre_umount() { # Enable growfs on every boot, not only the first, as as instance's disk can # be enlarged post-creation - sed -i -e '/KEYWORD: firstboot/d' /etc/rc.d/growfs + sed -i -e '/KEYWORD: firstboot/d' ${DESTDIR}/etc/rc.d/growfs cat << EOF >> ${DESTDIR}/etc/rc.conf dumpdev="AUTO" From nobody Sat Jan 10 17:04:41 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpQ3t0mgzz6NLnh for ; Sat, 10 Jan 2026 17:04:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpQ3s6GBNz3ld8 for ; Sat, 10 Jan 2026 17:04:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768064681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pskMT3NNCqhc2Wj2FZWa8oSKHqnkRBIF+r4lx18QvwY=; b=JZPfld4Yr4RdEFGFHEGspbNgdu/qwKShm1Tx4iWKusAUQE0VIZz2lxQmMi/gCzr3O1StjZ LaR3JIw+sWSEoTgDbAAotAdVV53sQderzVs4t/oy0aInVmssqNQzxnFuKAuQhprU2nqyQZ rtLUEXLMa2Gcm8LQpG6jXpuwzeA+KfxikfwDJngX47nexvnWeK3fqFzY4gBgs69MzYYzcu SNsrBujM4uP5UxOxdcooekVkxX2aq/B3WnhpZJ/aqkE8cUfmG8bDAESGlUHvenebjrPq3c hq7hzluR8J96MYnVOEie6PSaz92LDZlsDM1P+AAGqloOu242OkjJYNkfdxS+aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768064681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pskMT3NNCqhc2Wj2FZWa8oSKHqnkRBIF+r4lx18QvwY=; b=x3mL+u17mW4oNXuiJkEH/Q/zcpQO324Xn3XUbVOUUlHweejddPJmI1aHb6ZEPW1j+D7iAG 1wdroUScnxp0Main835YTqw/+dhrt1fsaKvY5VIjgu9X1XGXskSz9eK9Fv+9ak62lz9kNL mGR8/zJDfNJoINcFf66s+o8vGdT2TlR2BwaoQGDfCMV+O+lZ1ersIIO2LmRCu1G5B5q7d8 X3u8i3V/22pAA0F2jjiM8f621o1uYiwbP9gql3YIna6OExBU/7pf2T78iadHYDpM+WUHkZ R2JwP+3RyBExSHVPQS+WRcHutskY6QnhptKmoTkELX7HKex1HKVtfEc6xNHtTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768064681; a=rsa-sha256; cv=none; b=CSODF231f6UFjC+btaikoEh+aYm4Hx6uKyoEwlxc7TEay5FpwTzarH5vlyBsOA1MadWlb7 9Xph5DTDWkeAQulisCS492emJOG3uQafobQyKa8560AIlUoN5Ir/FteXOmlBOf6rnmgSlU trdvYx03oGmgPzCAw2v0HosuCn9VKP4v3Ig+8kX1rBFFDfq7b1/v892eDF0fUZwzOYoNlL hs7gZac+2yhu0RS71nEXJvpAu47wIxqiPIi5hPci5j9e0SQ97NIDxlPW2TGA7ku3G9nufS jpoe0Ed2STziHQ0GwAaiEIWU970tozDNj8fRNh9cgp3FqdqMP1u8iFYaYjaqNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpQ3s5qvlz13Ty for ; Sat, 10 Jan 2026 17:04:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31e4c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 17:04:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: William Carrel From: Xin LI Subject: git: 6c20edf2fdd1 - stable/15 - GCE: Enable vtnet(4) Multiqueue. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 6c20edf2fdd1edf617600367afd46d1ff91e5bb6 Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 17:04:41 +0000 Message-Id: <696286a9.31e4c.71e94b86@gitrepo.freebsd.org> The branch stable/15 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=6c20edf2fdd1edf617600367afd46d1ff91e5bb6 commit 6c20edf2fdd1edf617600367afd46d1ff91e5bb6 Author: William Carrel AuthorDate: 2026-01-08 08:51:11 +0000 Commit: Xin LI CommitDate: 2026-01-10 17:03:08 +0000 GCE: Enable vtnet(4) Multiqueue. Removes hw.vtnet.mq_disable=1. This workaround was originally introduced nearly a decade ago to address stability issues on KVM that have long since been resolved in both the FreeBSD driver and the GCE hypervisor. Removing this allows network interrupts to scale across multiple vCPUs. Tested on n2-highcpu-16 VM with 15.0-RELEASE and confirmed multiple queue pairs active and interrupts handling across cores. PR: kern/292081 (cherry picked from commit f604d84618ad478fa46ec374480cbcbc1d93bf07) --- release/tools/gce.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/release/tools/gce.conf b/release/tools/gce.conf index 558641821b16..e0d7d883fb14 100644 --- a/release/tools/gce.conf +++ b/release/tools/gce.conf @@ -56,7 +56,6 @@ beastie_disable="YES" loader_logo="none" hw.memtest.tests="0" console="comconsole,vidconsole" -hw.vtnet.mq_disable=1 kern.timecounter.hardware=ACPI-safe aesni_load="YES" nvme_load="YES" From nobody Sat Jan 10 17:04:42 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpQ3w0S0dz6NM6t for ; Sat, 10 Jan 2026 17:04:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpQ3t6xJQz3ljj for ; Sat, 10 Jan 2026 17:04:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768064683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/yZZKHawCfe3qD3NpPOqT5UJ/bePZOXDMXSYdD80dJo=; b=AygFAB1qgXIFJVqnmKr406xBuDgvGqxb3WASGXK4obEQczY8aRXMTRUtVzD5PLnfK/OOIn tsIwr5vfhH+G1kRT1hOvQmVBLrwQCcv/DXrwD4EyZTy/cLXBNJRZAkEdsWL1eP//w1RAqX D3h56mlQ/TT20yJnvbk8OI1i9yBuJLGzu8dmfrTaIxtySGVEAEeeYh+t0B1c2EJGGUqHEv eosWNT9kx60cp+M34EKPeMVtBV36MOqcictovfMs1ed+9748+luWMqnZ9Dw03UjPrkS5g4 Un5ljnIprben2Et0TN7gzxyaqvXAiir38nYH5wPwZ/qs4hir9Wuz1Qag6BvahQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768064683; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/yZZKHawCfe3qD3NpPOqT5UJ/bePZOXDMXSYdD80dJo=; b=cTBYpRlV8dvN9MEbJ10D3sfimZ0EtQKI8xUVqUCsKeykO3MfBSNJj5/0lUnJ+hshHnVwGw wvRdyB1U8g87X2cVpmdIewkuueX4ltfd4QJVaagkT+kB6eS/jhekKevDHMu6j3i2aqUdNb CYwvIGs49rOgApFpJ3Qq5SFVxCCTGQJHpIhhewHZKbzpmc5qPv45rTpOpSsb4w3cXXzI4d x3RCNaiegdTab//JQtwTokSY1RV2oAwr10NZ2hfiYFsCs7ywb7LF2zvkeMGnekQEHyUuVH kQjMz4Mm6vFUJAkBNL6BObmTIkcuv8DL+PWbsAk88fluJkbbRDoui1awKC9xvw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768064683; a=rsa-sha256; cv=none; b=b7RuWDyxvGAIqkBVAP8PwyvA29hzruq4xKWTr2lhnk0XK+vc1Y2LVnEDRUTtkm2NXPKU2Y MPtedZawDQZrGw8GF4apvE6Nj0vd7PyAFvgrzSuXVzv3tG5JbI4dlbVBtqL1Y6rFj02NDP 2QhofSfIGmaY+gUi3j7VLDSD4y2YXnKNBsx3ACn8lFl17Yv2P0SpMagaA9thQg4jrFNG+6 174Aj7PLjFwZryfP15X0mLk0EEB80Sg115uN7IJN5khOo/dKbEHjt4mw0F7vbTi6pLz/Rk H5dE5L2xkhUG1xDpR1wn+lwgwbIXqGGdCyjD8AyeOcqQlc64wKrRLSmQELzJ+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpQ3t6JDxz13pZ for ; Sat, 10 Jan 2026 17:04:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31376 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 17:04:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: William Carrel From: Xin LI Subject: git: 24a20efd93be - stable/15 - GCE: Fix growfs path List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/15 X-Git-Reftype: branch X-Git-Commit: 24a20efd93bed43f505ddfc2022e8d02563838a1 Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 17:04:42 +0000 Message-Id: <696286aa.31376.5b66f898@gitrepo.freebsd.org> The branch stable/15 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=24a20efd93bed43f505ddfc2022e8d02563838a1 commit 24a20efd93bed43f505ddfc2022e8d02563838a1 Author: William Carrel AuthorDate: 2026-01-08 08:49:42 +0000 Commit: Xin LI CommitDate: 2026-01-10 17:03:25 +0000 GCE: Fix growfs path The sed command was missing the ${DESTDIR} prefix, meaning it was attempting to modify the build host's /etc/rc.d/growfs instead of the target image's script. Tested in an arm64 builder that builds as non-root. PR: kern/292081 (cherry picked from commit 709c1049fe0c6d0217e81268d4f33f7191474453) --- release/tools/gce.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/tools/gce.conf b/release/tools/gce.conf index e0d7d883fb14..934007759279 100644 --- a/release/tools/gce.conf +++ b/release/tools/gce.conf @@ -39,7 +39,7 @@ vm_extra_pre_umount() { # Enable growfs on every boot, not only the first, as as instance's disk can # be enlarged post-creation - sed -i -e '/KEYWORD: firstboot/d' /etc/rc.d/growfs + sed -i -e '/KEYWORD: firstboot/d' ${DESTDIR}/etc/rc.d/growfs cat << EOF >> ${DESTDIR}/etc/rc.conf dumpdev="AUTO" From nobody Sat Jan 10 21:08:17 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpWTH6r9Mz6MvL7 for ; Sat, 10 Jan 2026 21:08:35 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) (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 4dpWTH4sMpz3Lv4 for ; Sat, 10 Jan 2026 21:08:35 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-34c718c5481so2979614a91.3 for ; Sat, 10 Jan 2026 13:08:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1768079309; x=1768684109; 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=XJD7lL8Q923vF3Jqb+AiHasYz9V8wIYt4pK0hK3h8tk=; b=Pix3/5Ai7QTD/cssFHH97lq6hWfLEYMWjQHwwdrQRRa7w69n2b45i0sW8BhAtl0jG4 NM/4tCgoKVHlx70ckEWzZ1cgWP3iI+VeDdp2R8oP/huoPHS+lJZ2USNR9mDKCMUnmSCi l8XD7NHn4GEi+CLMQznqxZjbRr8q4EXsM/CNLSRfkMmdEfTfAWHhmQTVP4viVUK4gUJd f/C7+Y+c/X9K9Oy1F85o11aB7+ZFv0kWOdfYhCfYvdG+HEvmaTsBoPYQP+b3jFqxxlNC MquKHPT5GvpdZrSXt3yKqh8D4AeWmxaVviqMFXS1V572Bpxwao/GDq2mW6ldAZam8bch eEog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768079309; x=1768684109; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=XJD7lL8Q923vF3Jqb+AiHasYz9V8wIYt4pK0hK3h8tk=; b=EYG4V4shhdQIjUMVOsDsTf9MFRvWDlvBfRiRlc3TMne4BYyFUP4wGDdmhJykjgmeDc qqb2B81N/5EKF9QusDYftJJWRF4CsgHenEGoU/fB97F311d0wEmQUZVanlUxaGk0NZdJ VLv5Vl6O8j67D0MUBlgDcgy56wH1knpspPgMhKpQwb89ubcwSthfStQjFUkO27XMCyfh 837eVkm+82SSTy3FZY72Ift1W8UfGUZiWEKjlLNfIG0a/Vn6izWxwWrrt3aeQ+XQdiCB +lWn0nE9KJKko0HDmS8F8UJWiGBV8O3PjaT2ycXbwIEzMUgM/qG1Mc4BjZ6TsrtYz6CS GEWA== X-Forwarded-Encrypted: i=1; AJvYcCU5uBxkSBetL+rXgyvYCPAuSYOLOZyheQc0IcLsrF3+WGiTSsSr7EE3cRNbG49RvcV96HIJRMi3EIyR3qNWBv308QWaErerwpk=@freebsd.org X-Gm-Message-State: AOJu0YxVk9wzUr7sNH4y3opBgc9dg5O1IWyOJ0MLJUHrSuuHQ+3wlnC6 cMRBiMxJOrqctzLjDDk5ljPIJlEzs87FjB2zDhVRICHMNrhom1rmajGatoyQ3bBEzNj7Z9hnivM azLlm41hJNHk/wPnT1of0clyjlAiybChEmFZOxvBAFw== X-Gm-Gg: AY/fxX5U+AfzN+IqFIxCW0BC4AUIV+JTsq+Wa7UCbFinrdQbqzwFSzk7V611KVtuiXO zkUkTysuyMZpiyImaBqL4wU2/8adIMaY2hRKyS3OTHro1DiwGAwk55a8gfzgc4jFA0d4vuJJf9N NJPzLeoE707r9+dqcM+ztQGuRDPp8uEr8vjvIBG5md8iEI6dabbloDpnh2QyG9FStasqe76dOIC DpdGRwxUoDYeettTrzJlF18UMO2BzFqjHAdLvSOZnrUdZ59Nl+OiX81lH9kad87cQurqSs= X-Google-Smtp-Source: AGHT+IFyfpYRxT3qmP7L2M94El+1O9MgmaDimPjRefXMTdEeIqvPOJRjP/PfybfeRqBDxeBTPUR/tYwGrY8nv2DXCcM= X-Received: by 2002:a17:90b:4c46:b0:340:b912:536 with SMTP id 98e67ed59e1d1-34f68c27d35mr12599820a91.31.1768079309309; Sat, 10 Jan 2026 13:08:29 -0800 (PST) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 References: <69613e57.38d51.5e44ad72@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Sat, 10 Jan 2026 14:08:17 -0700 X-Gm-Features: AZwV_QixOgVoGPm6pyJBgdSq7hGGPfluVb6IIuQcu67FIgts0qRt1fOn-0D0E3s Message-ID: Subject: Re: git: 256d05617c71 - stable/15 - smartpqi: update to version 4660.0.2002 To: Konstantin Belousov Cc: John Hall , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Content-Type: multipart/alternative; boundary="0000000000002a95b306480f0b0b" 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: 4dpWTH4sMpz3Lv4 --0000000000002a95b306480f0b0b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Jan 10, 2026 at 5:34=E2=80=AFAM Konstantin Belousov wrote: > On Fri, Jan 09, 2026 at 05:43:51PM +0000, John Hall wrote: > > The branch stable/15 has been updated by jrhall: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D256d05617c711b0f6959a10ebc71650= 1e26e4cfa > > > > commit 256d05617c711b0f6959a10ebc716501e26e4cfa > > Author: John Hall > > AuthorDate: 2025-08-28 21:11:02 +0000 > > Commit: John Hall > > CommitDate: 2026-01-09 17:41:40 +0000 > > > > smartpqi: update to version 4660.0.2002 > > > > This updates the smartpqi driver to Microchip's > > latest available public release. > > > > Reviewed by: imp > > Approved by: imp > > > > Sponsored by: Microchip Technology Inc. > > > > Differential Revision: https://reviews.freebsd.org/D52507 > > > > (cherry picked from commit c558eca47970c8467ed0494145f08d1879050bbd= ) > > Why the insta-MFC was done? > Oh! That's my fault. I told him it was ok to merge, but had forgotten to mention the 'after two days' part. I focused instead on the nuts and bolts around it. I've added it to my mental list of things to tell my mentees in the future. Warner --0000000000002a95b306480f0b0b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sat, Jan 10,= 2026 at 5:34=E2=80=AFAM Konstantin Belousov <kostikbel@gmail.com> wrote:
On Fri, Jan 09, 2026 at 05:43:51PM +0000, = John Hall wrote:
> The branch stable/15 has been updated by jrhall:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3D256d05617c711b0f6959a10ebc716501e26e4cfa<= /a>
>
> commit 256d05617c711b0f6959a10ebc716501e26e4cfa
> Author:=C2=A0 =C2=A0 =C2=A0John Hall <jrhall@FreeBSD.org>
> AuthorDate: 2025-08-28 21:11:02 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0John Hall <jrhall@FreeBSD.org>
> CommitDate: 2026-01-09 17:41:40 +0000
>
>=C2=A0 =C2=A0 =C2=A0smartpqi: update to version 4660.0.2002
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0This updates the smartpqi driver to Microchip's=
>=C2=A0 =C2=A0 =C2=A0latest available public release.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0Reviewed by: imp
>=C2=A0 =C2=A0 =C2=A0Approved by: imp
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0Sponsored by: Microchip Technology Inc.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0Differential Revision:
https://reviews.fre= ebsd.org/D52507
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0(cherry picked from commit c558eca47970c8467ed04941= 45f08d1879050bbd)

Why the insta-MFC was done?

Oh! That= 9;s my fault. I told him it was ok to merge, but had forgotten=C2=A0to ment= ion the 'after two days' part.
I focused instead on the n= uts and bolts around it. I've added it to my mental list of things to t= ell my
mentees in the future.

Warner
--0000000000002a95b306480f0b0b-- From nobody Sat Jan 10 21:13:29 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpWZy1hhPz6MvPT for ; Sat, 10 Jan 2026 21:13:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpWZy09b5z3MxC for ; Sat, 10 Jan 2026 21:13:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768079610; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DZK03XgoHwDwxvJ3l1Ikho/Nbl8kvTPYWy7Vh/Nhw2M=; b=F3uW++EzM2DXkT72PE0oo1xA+Qqr4vsC0dI9rDUOXEA0q0Fr6Ltkp3toudpleDbETSFdGi rfuiNRJTfwoDdX0uR+wcnyarKdpRqtzY2iGY3LsviaqlYwsVryUmI8hZZhwSGf7/DyNAD3 uq6lW43P6a/MJsvCajwcv0fHINeQKtvoBDUFo0ymiZ6HSA+SmTZmds68A0ZLXFlkq5askh I6ZQmD1aAYe+0BoITwFfZcEU4aBwdU7l+/1KPSRE3nWGuqIOy2VY1Ew+69OEG5t28F4Kqc nKNhsBd4r5L/xTjRdq4hwz7Nb/m+TiWYcfpjtsy3bSkRd6/z0f8bxB5KlD/UAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768079610; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DZK03XgoHwDwxvJ3l1Ikho/Nbl8kvTPYWy7Vh/Nhw2M=; b=UYo/b98EmmxOpGMqY7CV6Z9XhquAfw3zoJXcjBcy8HNNPaaiQDxTxmsyhb0sVTRhTQ3+W5 9LpIccR32F0Wj9KyjK1ugTFv4f0hJ9U1Fwz7pyMag4FRXYbjN2cnOXwRI4AuKhmfgm6AnD scFR5TLWNeW2fFqMcPPyqhxkKuwZ1pZPBSve6RvP5UC8kSARTy4iaLHZhkxHd7xExMFCvl gFOLY5wFc/vgbzmN6vRWt2cBsTYg5wvx0qsRJFLtzrcCgENQT3VewSeEJFBpSKPoN1n4nl Qn5+WCJSkOqGR17Lv/Y+DAidPoPGlFWEtRPLm/WDb6AriJFU3iQ6OX6doszbjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768079610; a=rsa-sha256; cv=none; b=hf9ALCKl3EN57wdbfFXhnYX6Fn0FQTeZbnvBlsvSTTZDUVU6fAa971n2FnsVUdSEwb/X3N Wj9zhpfy4ygeqtbDzOYALxNQw8Xt2lHscw/gpnS+3GATIqH6du8WLZxVEdN0K9K+mmHGrq itOaK97LGq7+Gc8XUWd6hKTB8vmxnlvJTDAP1UeUJ3lvv/OTivfnUDayAz4KDAM8MP0Y/d pGE5ozEVQoqBCpP2dSJttJepC6Ri6YQVz5Bp/KZSK4u8thq3QCW+OZZVeky/AXuVVG4T5U rSbCAgWOMnF0U1JFzt+X1P962mwvePUoJ1B7/bF5ZZWnS6C/rUK1i2MpndNwmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpWZx6qw2z1B6c for ; Sat, 10 Jan 2026 21:13:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2432d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 21:13:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Simon J. Gerraty Subject: git: 11aa32794394 - stable/15 - Update to bmake-20251111 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 11aa32794394d3300b8a7f51ab00006a36987060 Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 21:13:29 +0000 Message-Id: <6962c0f9.2432d.bdb76a2@gitrepo.freebsd.org> The branch stable/15 has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=11aa32794394d3300b8a7f51ab00006a36987060 commit 11aa32794394d3300b8a7f51ab00006a36987060 Author: Simon J. Gerraty AuthorDate: 2025-12-03 18:13:30 +0000 Commit: Simon J. Gerraty CommitDate: 2026-01-10 21:10:53 +0000 Update to bmake-20251111 Merge commit '638c66de4a0faa4c2e815e81cd4021c2387c7e0f' (cherry picked from commit c60f6422ffae3ea85e7b10bad950ad27c463af18) --- contrib/bmake/ChangeLog | 37 ++++++ contrib/bmake/FILES | 2 + contrib/bmake/LICENSE | 6 +- contrib/bmake/VERSION | 2 +- contrib/bmake/bmake.1 | 13 +- contrib/bmake/bmake.cat1 | 12 +- contrib/bmake/boot-strap | 23 +++- contrib/bmake/configure | 53 ++++++-- contrib/bmake/configure.in | 36 ++++- contrib/bmake/install-sh | 11 +- contrib/bmake/main.c | 13 +- contrib/bmake/make.1 | 13 +- contrib/bmake/mk/ChangeLog | 49 +++++++ contrib/bmake/mk/auto.dep.mk | 12 +- contrib/bmake/mk/auto.obj.mk | 11 +- contrib/bmake/mk/autoconf.mk | 11 +- contrib/bmake/mk/autodep.mk | 12 +- contrib/bmake/mk/cc-wrap.mk | 11 +- contrib/bmake/mk/ccm.dep.mk | 12 +- contrib/bmake/mk/compiler.mk | 11 +- contrib/bmake/mk/cython.mk | 12 +- contrib/bmake/mk/dirdeps-cache-update.mk | 11 +- contrib/bmake/mk/dirdeps-options.mk | 11 +- contrib/bmake/mk/dirdeps-targets.mk | 18 +-- contrib/bmake/mk/dpadd.mk | 11 +- contrib/bmake/mk/files.mk | 11 +- contrib/bmake/mk/gendirdeps.mk | 5 +- contrib/bmake/mk/genfiles.mk | 11 +- contrib/bmake/mk/host-target.mk | 12 +- contrib/bmake/mk/host.libnames.mk | 9 +- contrib/bmake/mk/inc.mk | 11 +- contrib/bmake/mk/init.mk | 11 +- contrib/bmake/mk/install-mk | 11 +- contrib/bmake/mk/install-new.mk | 36 ++--- contrib/bmake/mk/install-sh | 11 +- contrib/bmake/mk/java.mk | 12 +- contrib/bmake/mk/jobs.mk | 11 +- contrib/bmake/mk/ldorder.mk | 11 +- contrib/bmake/mk/libnames.mk | 11 +- contrib/bmake/mk/libs.mk | 11 +- contrib/bmake/mk/links.mk | 11 +- contrib/bmake/mk/manifest.mk | 11 +- contrib/bmake/mk/meta.autodep.mk | 12 +- contrib/bmake/mk/meta.stage.mk | 26 ++-- contrib/bmake/mk/meta.subdir.mk | 12 +- contrib/bmake/mk/meta.sys.mk | 12 +- contrib/bmake/mk/meta2deps.sh | 24 +++- contrib/bmake/mk/mkopt.sh | 10 +- contrib/bmake/mk/newlog.sh | 11 +- contrib/bmake/mk/obj.mk | 11 +- contrib/bmake/mk/options.mk | 148 ++++++++++++++------- contrib/bmake/mk/posix.mk | 11 +- contrib/bmake/mk/prlist.mk | 11 +- contrib/bmake/mk/progs.mk | 11 +- contrib/bmake/mk/rst2htm.mk | 11 +- contrib/bmake/mk/rust.mk | 12 +- contrib/bmake/mk/scripts.mk | 11 +- contrib/bmake/mk/setopts.sh | 9 +- contrib/bmake/mk/srctop.mk | 11 +- contrib/bmake/mk/stage-install.sh | 9 +- contrib/bmake/mk/subdir.mk | 11 +- contrib/bmake/mk/suffixes.mk | 11 +- contrib/bmake/mk/sys.clean-env.mk | 11 +- contrib/bmake/mk/sys.debug.mk | 11 +- contrib/bmake/mk/sys.dependfile.mk | 11 +- contrib/bmake/mk/sys.dirdeps.mk | 11 +- contrib/bmake/mk/sys.mk | 11 +- contrib/bmake/mk/sys.vars.mk | 36 +++-- contrib/bmake/mk/target-flags.mk | 13 +- contrib/bmake/mk/warnings.mk | 12 +- contrib/bmake/mk/whats.mk | 11 +- contrib/bmake/mk/yacc.mk | 12 +- contrib/bmake/os.sh | 9 +- contrib/bmake/sigaction.c | 14 +- contrib/bmake/sigcompat.c | 14 +- contrib/bmake/unit-tests/Makefile | 31 ++++- contrib/bmake/unit-tests/Makefile.config.in | 7 +- contrib/bmake/unit-tests/directive-dinclude.mk | 2 +- .../bmake/unit-tests/directive-hyphen-include.mk | 2 +- .../bmake/unit-tests/directive-include-guard.mk | 4 +- contrib/bmake/unit-tests/directive-include.mk | 2 +- contrib/bmake/unit-tests/directive-sinclude.mk | 2 +- contrib/bmake/unit-tests/opt-debug-file.exp | 2 +- contrib/bmake/unit-tests/opt-debug-file.mk | 6 +- contrib/bmake/unit-tests/varmod-sun-shell1.exp | 14 ++ contrib/bmake/unit-tests/varmod-sun-shell1.mk | 25 ++++ contrib/bmake/unit-tests/varname-circumflex.mk | 4 +- contrib/bmake/var.c | 46 ++++++- contrib/bmake/wait.h | 14 +- usr.bin/bmake/Makefile.config | 2 +- usr.bin/bmake/config.h | 4 +- usr.bin/bmake/unit-tests/Makefile | 31 ++++- usr.bin/bmake/unit-tests/Makefile.config | 7 +- 93 files changed, 688 insertions(+), 696 deletions(-) diff --git a/contrib/bmake/ChangeLog b/contrib/bmake/ChangeLog index e8f1567733e4..11b1684bf7d5 100644 --- a/contrib/bmake/ChangeLog +++ b/contrib/bmake/ChangeLog @@ -1,3 +1,40 @@ +2025-11-15 Simon J Gerraty + + * boot-strap: unset more things from env and save a copy + to env.out for debugging. + +2025-11-12 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20251111 + Merge with NetBSD make, pick up + o var.c: add :sh1 which only evaluates command on first reference. + +2025-11-11 Simon J Gerraty + + * configure.in: Force filemon=no for Cygwin and MINGW64_NT + +2025-11-10 Simon J Gerraty + + * unit-tests/Makefile: handle MINGW64_NT + mark some tests broken, filter others as per Cygwin. + +2025-10-23 Simon J Gerraty + + * make.1: document MAKE_VERSION. + +2025-10-22 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20251022 + + * configure.in: Add a check that lua is version 5.2 or later + if not we want to skip running check-expect.lua + +2025-09-16 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250916 + Merge with NetBSD make, pick up + o var.c: avoid compiler warning from hexdigits + 2025-08-04 Simon J Gerraty * VERSION (_MAKE_VERSION): 20250804 diff --git a/contrib/bmake/FILES b/contrib/bmake/FILES index 28465b6a8c39..7f6024418d94 100644 --- a/contrib/bmake/FILES +++ b/contrib/bmake/FILES @@ -760,6 +760,8 @@ unit-tests/varmod-subst.exp unit-tests/varmod-subst.mk unit-tests/varmod-sun-shell.exp unit-tests/varmod-sun-shell.mk +unit-tests/varmod-sun-shell1.exp +unit-tests/varmod-sun-shell1.mk unit-tests/varmod-sysv.exp unit-tests/varmod-sysv.mk unit-tests/varmod-tail.exp diff --git a/contrib/bmake/LICENSE b/contrib/bmake/LICENSE index 0d460e91d230..28832d20a6ef 100644 --- a/contrib/bmake/LICENSE +++ b/contrib/bmake/LICENSE @@ -2,11 +2,11 @@ The individual files in this distribution are copyright their original contributors or assignees. Including: - Copyright (c) 1993-2021, Simon J Gerraty - Copyright (c) 2020, Roland Illig + Copyright (c) 1993-2025, Simon J Gerraty + Copyright (c) 2020-2021, Roland Illig Copyright (c) 2009-2016, Juniper Networks, Inc. Copyright (c) 2009, John Birrell. - Copyright (c) 1997-2021 The NetBSD Foundation, Inc. + Copyright (c) 1997-2025 The NetBSD Foundation, Inc. Copyright (c) 1998 Todd C. Miller Copyright (c) 1989 by Berkeley Softworks Copyright (c) 1988, 1989, 1990, 1992, 1993 diff --git a/contrib/bmake/VERSION b/contrib/bmake/VERSION index e301cfafab72..2c7c307f2a90 100644 --- a/contrib/bmake/VERSION +++ b/contrib/bmake/VERSION @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20250804 +_MAKE_VERSION=20251111 diff --git a/contrib/bmake/bmake.1 b/contrib/bmake/bmake.1 index 01f173bc1a69..a9de459de862 100644 --- a/contrib/bmake/bmake.1 +++ b/contrib/bmake/bmake.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.387 2025/07/02 17:11:56 rillig Exp $ +.\" $NetBSD: make.1,v 1.388 2025/11/12 22:14:07 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd July 2, 2025 +.Dd November 11, 2025 .Dt BMAKE 1 .Os .Sh NAME @@ -945,6 +945,11 @@ include additional unexpanded variable references) are shown. .It Va .MAKE.EXPORTED The list of variables exported by .Nm . +.It Va MAKE_VERSION +This variable indicates the version of +.Nm . +It is typically the date of last import from NetBSD. +It is useful for checking whether certain features are available. .It Va MAKEFILE The top-level makefile that is currently read, as given in the command line. @@ -1881,6 +1886,10 @@ The output of running is the value. .It Cm \&:sh The value is run as a command, and the output becomes the new value. +.It Cm \&:sh1 +The value is run as a command, for the first reference only, and +the output is cached for subsequent references. +This modifier is useful when the result is not expected to change. .It Cm \&::= Ns Ar str The variable is assigned the value .Ar str diff --git a/contrib/bmake/bmake.cat1 b/contrib/bmake/bmake.cat1 index 950437a8db9c..baaad7b4ed70 100644 --- a/contrib/bmake/bmake.cat1 +++ b/contrib/bmake/bmake.cat1 @@ -607,6 +607,11 @@ VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS _._M_A_K_E_._E_X_P_O_R_T_E_D The list of variables exported by bbmmaakkee. + _M_A_K_E___V_E_R_S_I_O_N + This variable indicates the version of bbmmaakkee. It is typically + the date of last import from NetBSD. It is useful for checking + whether certain features are available. + _M_A_K_E_F_I_L_E The top-level makefile that is currently read, as given in the command line. @@ -1190,6 +1195,11 @@ VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS ::sshh The value is run as a command, and the output becomes the new value. + ::sshh11 + The value is run as a command, for the first reference only, and the + output is cached for subsequent references. This modifier is useful + when the result is not expected to change. + ::::==_s_t_r The variable is assigned the value _s_t_r after substitution. This modifier and its variations are useful in obscure situations such as @@ -1864,4 +1874,4 @@ BBUUGGSS attempt to suppress a cascade of unnecessary errors, can result in a seemingly unexplained `*** Error code 6' -FreeBSD 14.2-RELEASE-p1 July 2, 2025 FreeBSD 14.2-RELEASE-p1 +FreeBSD 14.3-RELEASE-p3 November 11, 2025 FreeBSD 14.3-RELEASE-p3 diff --git a/contrib/bmake/boot-strap b/contrib/bmake/boot-strap index b025de52a82b..51e81083b95b 100755 --- a/contrib/bmake/boot-strap +++ b/contrib/bmake/boot-strap @@ -133,7 +133,7 @@ # Simon J. Gerraty # RCSid: -# $Id: boot-strap,v 1.61 2024/03/10 17:51:10 sjg Exp $ +# $Id: boot-strap,v 1.62 2025/11/15 16:53:14 sjg Exp $ # # @(#) Copyright (c) 2001 Simon J. Gerraty # @@ -179,12 +179,25 @@ source_rc() { done } +have() { + case `(type "$1") 2>&1` in + *" found") return 1;; + esac + return 0 +} + +Env() { + have env && env || set +} + cmd_args="$@" # clear some things from the environment that we care about -unset MAKEOBJDIR MAKEOBJDIRPREFIX -# or that might be incompatible -unset MAKE MAKEFLAGS +# any variable starting with any of these prefixes will be unset +for p in MAKE OBJ SB WITH +do + unset ENV `Env | sed -n "/^$p/s,=.*,,p"` +done # --install[-host-target] will set this INSTALL_PREFIX= @@ -381,6 +394,8 @@ objdir="${objdir:-$OBJROOT$HOST_TARGET}" cd "$objdir" || exit 1 # make it absolute objdir=`'pwd'` +# save a copy of our env for debugging +Env > env.out ShareDir() { case "/$1" in diff --git a/contrib/bmake/configure b/contrib/bmake/configure index e34740cd2cfa..9bbdb8d2b36b 100755 --- a/contrib/bmake/configure +++ b/contrib/bmake/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.72 for bmake 20240711. +# Generated by GNU Autoconf 2.72 for bmake 20251111. # # Report bugs to . # @@ -603,8 +603,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='bmake' PACKAGE_TARNAME='bmake' -PACKAGE_VERSION='20240711' -PACKAGE_STRING='bmake 20240711' +PACKAGE_VERSION='20251111' +PACKAGE_STRING='bmake 20251111' PACKAGE_BUGREPORT='sjg@NetBSD.org' PACKAGE_URL='' @@ -644,6 +644,7 @@ ac_func_c_list= ac_subst_vars='LTLIBOBJS UTC_1 _MAKE_VERSION +lua filemon_h use_filemon use_meta @@ -720,6 +721,7 @@ with_makefile with_meta with_filemon with_bmake_strftime +with_lua with_machine with_force_machine with_force_machine_arch @@ -1286,7 +1288,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -'configure' configures bmake 20240711 to adapt to many kinds of systems. +'configure' configures bmake 20251111 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1348,7 +1350,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of bmake 20240711:";; + short | recursive ) echo "Configuration of bmake 20251111:";; esac cat <<\_ACEOF @@ -1371,6 +1373,7 @@ Optional Packages: --without-meta disable use of meta-mode --with-filemon={no,dev,ktrace,path/filemon.h} indicate filemon method for meta-mode. Path to filemon.h implies dev --with-bmake-strftime force use of bmake strftime + --without-lua do not use check-expect.lua --with-machine=MACHINE explicitly set MACHINE --with-force-machine=MACHINE set FORCE_MACHINE --with-force-machine-arch=MACHINE set FORCE_MACHINE_ARCH @@ -1458,7 +1461,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -bmake configure 20240711 +bmake configure 20251111 generated by GNU Autoconf 2.72 Copyright (C) 2023 Free Software Foundation, Inc. @@ -1981,7 +1984,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by bmake $as_me 20240711, which was +It was created by bmake $as_me 20251111, which was generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -2772,6 +2775,13 @@ esac . $srcdir/VERSION OS=`uname -s` +have() { + case `(type "$1") 2>&1` in + *" found") return 1;; + esac + return 0 +} + use_defshell() { case "$defshell_path$DEFSHELL_INDEX" in "") ;; @@ -2867,6 +2877,7 @@ esac else case e in #( e) case "$OS" in +Cygwin*|MINGW*) use_filemon=no;; NetBSD) filemon_h=no use_filemon=ktrace;; *) for d in "/usr/include/dev/filemon" "$prefix/include/dev/filemon" "$srcdir/../../sys/dev/filemon" @@ -2943,6 +2954,29 @@ do PATH=$PATH:$d done export PATH +lua=$LUA + +# Check whether --with-lua was given. +if test ${with_lua+y} +then : + withval=$with_lua; case "${withval}" in +no) lua=:;; +yes) lua= ;; +/*lua*) lua=$withval;; +*) as_fn_error $? "bad value ${withval} given for lua" "$LINENO" 5;; +esac +fi + +if test "x$lua" != x:; then + if have lua; then + lua_version=`${lua:-lua} -v | sed 's/Lua //;s/ *Copy.*//;'` + echo $ECHO_N "checking whether lua version ($lua_version) > 5.2... $ECHO_C" >&6 + case "$lua_version" in + 4.*|5.1.*) lua=:; echo no >&6;; + *) echo yes >&6;; + esac + fi +fi @@ -7277,6 +7311,7 @@ esac + bm_outfiles="Makefile.config unit-tests/Makefile.config make-bootstrap.sh" if test $use_makefile = yes; then bm_outfiles="makefile $bm_outfiles" @@ -7798,7 +7833,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by bmake $as_me 20240711, which was +This file was extended by bmake $as_me 20251111, which was generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7862,7 +7897,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -bmake config.status 20240711 +bmake config.status 20251111 configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" diff --git a/contrib/bmake/configure.in b/contrib/bmake/configure.in index 294246dea60d..f378b57fd14a 100644 --- a/contrib/bmake/configure.in +++ b/contrib/bmake/configure.in @@ -1,11 +1,11 @@ dnl dnl RCSid: -dnl $Id: configure.in,v 1.108 2024/07/13 15:27:00 sjg Exp $ +dnl $Id: configure.in,v 1.111 2025/11/11 18:43:59 sjg Exp $ dnl dnl Process this file with autoconf to produce a configure script dnl AC_PREREQ([2.71]) -AC_INIT([bmake],[20240711],[sjg@NetBSD.org]) +AC_INIT([bmake],[20251111],[sjg@NetBSD.org]) AC_CONFIG_HEADERS(config.h) dnl make srcdir absolute @@ -18,6 +18,14 @@ dnl get _MAKE_VERSION . $srcdir/VERSION OS=`uname -s` +dnl do not trust return from type +have() { + case `(type "$1") 2>&1` in + *" found") return 1;; + esac + return 0 +} + dnl function to set DEFSHELL_INDEX use_defshell() { case "$defshell_path$DEFSHELL_INDEX" in @@ -107,6 +115,7 @@ esac ], [ case "$OS" in +Cygwin*|MINGW*) use_filemon=no;; NetBSD) filemon_h=no use_filemon=ktrace;; *) for d in "/usr/include/dev/filemon" "$prefix/include/dev/filemon" "$srcdir/../../sys/dev/filemon" @@ -187,6 +196,28 @@ do PATH=$PATH:$d done export PATH +dnl +dnl if lua is available check it is version 5.2 or later +lua=$LUA +AC_ARG_WITH(lua, +[ --without-lua do not use check-expect.lua], +[case "${withval}" in +no) lua=:;; +yes) lua= ;; +/*lua*) lua=$withval;; +*) AC_MSG_ERROR(bad value ${withval} given for lua);; +esac]) +if test "x$lua" != x:; then + if have lua; then + lua_version=`${lua:-lua} -v | sed 's/Lua //;s/ *Copy.*//;'` + echo $ECHO_N "checking whether lua version ($lua_version) > 5.2... $ECHO_C" >&6 + case "$lua_version" in + 4.*|5.1.*) lua=:; echo no >&6;; + *) echo yes >&6;; + esac + fi +fi +dnl dnl Solaris's signal.h only privides sigset_t etc if one of dnl _EXTENSIONS_ _POSIX_C_SOURCE or _XOPEN_SOURCE are defined. dnl The later two seem to cause more problems than they solve so if we @@ -580,6 +611,7 @@ AC_SUBST(diff_u) AC_SUBST(use_meta) AC_SUBST(use_filemon) AC_SUBST(filemon_h) +AC_SUBST(lua) AC_SUBST(_MAKE_VERSION) AC_SUBST(UTC_1) bm_outfiles="Makefile.config unit-tests/Makefile.config make-bootstrap.sh" diff --git a/contrib/bmake/install-sh b/contrib/bmake/install-sh index aa35fa94c83a..14ddc8ccd13a 100755 --- a/contrib/bmake/install-sh +++ b/contrib/bmake/install-sh @@ -53,19 +53,12 @@ # Simon J. Gerraty # -# SPDX-License-Identifier: BSD-2-Clause -# # RCSid: -# $Id: install-sh,v 1.26 2024/02/17 17:26:57 sjg Exp $ +# $Id: install-sh,v 1.27 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 1993-2023 Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/main.c b/contrib/bmake/main.c index a773b44f42c4..24a1caef4291 100644 --- a/contrib/bmake/main.c +++ b/contrib/bmake/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.661 2025/07/06 07:11:31 rillig Exp $ */ +/* $NetBSD: main.c,v 1.662 2025/08/09 23:13:28 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -111,7 +111,7 @@ #include "trace.h" /* "@(#)main.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: main.c,v 1.661 2025/07/06 07:11:31 rillig Exp $"); +MAKE_RCSID("$NetBSD: main.c,v 1.662 2025/08/09 23:13:28 rillig Exp $"); #if defined(MAKE_NATIVE) __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 " "The Regents of the University of California. " @@ -390,8 +390,8 @@ MainParseArgJobsInternal(const char *argvalue) progname, argvalue, curdir); exit(2); } - if ((fcntl(tokenPoolReader, F_GETFD, 0) < 0) || - (fcntl(tokenPoolWriter, F_GETFD, 0) < 0)) { + if (fcntl(tokenPoolReader, F_GETFD, 0) < 0 || + fcntl(tokenPoolWriter, F_GETFD, 0) < 0) { tokenPoolReader = -1; tokenPoolWriter = -1; bogusJflag = true; @@ -601,7 +601,7 @@ MainParseArgs(int argc, char **argv) bool inOption, dashDash = false; const char *optspecs = "BC:D:I:J:NST:V:WXd:ef:ij:km:nqrstv:w"; -/* Can't actually use getopt(3) because rescanning is not portable */ + /* Can't actually use getopt(3) because rescanning is not portable */ rearg: inOption = false; @@ -1709,7 +1709,7 @@ ReadMakefile(const char *fname) * placement of the setting here means it gets set to the last * makefile specified, as it is set by SysV make. */ -found: + found: if (!doing_depend) Var_Set(SCOPE_INTERNAL, "MAKEFILE", fname); Parse_File(fname, fd); @@ -1802,7 +1802,6 @@ Cmd_Exec(const char *cmd, char **error) (void)execv(shellPath, UNCONST(args)); _exit(1); - /* NOTREACHED */ case -1: *error = str_concat3("Couldn't exec \"", cmd, "\""); diff --git a/contrib/bmake/make.1 b/contrib/bmake/make.1 index de67759290c4..1a99b50d5e89 100644 --- a/contrib/bmake/make.1 +++ b/contrib/bmake/make.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.387 2025/07/02 17:11:56 rillig Exp $ +.\" $NetBSD: make.1,v 1.388 2025/11/12 22:14:07 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd July 2, 2025 +.Dd November 11, 2025 .Dt MAKE 1 .Os .Sh NAME @@ -956,6 +956,11 @@ include additional unexpanded variable references) are shown. .It Va .MAKE.EXPORTED The list of variables exported by .Nm . +.It Va MAKE_VERSION +This variable indicates the version of +.Nm . +It is typically the date of last import from NetBSD. +It is useful for checking whether certain features are available. .It Va MAKEFILE The top-level makefile that is currently read, as given in the command line. @@ -1892,6 +1897,10 @@ The output of running is the value. .It Cm \&:sh The value is run as a command, and the output becomes the new value. +.It Cm \&:sh1 +The value is run as a command, for the first reference only, and +the output is cached for subsequent references. +This modifier is useful when the result is not expected to change. .It Cm \&::= Ns Ar str The variable is assigned the value .Ar str diff --git a/contrib/bmake/mk/ChangeLog b/contrib/bmake/mk/ChangeLog index fda6d8b02158..daacc97ec045 100644 --- a/contrib/bmake/mk/ChangeLog +++ b/contrib/bmake/mk/ChangeLog @@ -1,3 +1,52 @@ +2025-11-18 Simon J Gerraty + + * sys.vars.mk: set MAKE_POSIX_SHELL to 1 if .SHELL is POSIX, 0 if not. + set isPOSIX_SHELL for use in target scripts. + + * meta.stage.mk: set MAKE_POSIX_SHELL if needed. + + * install-new.mk: use ${isPOSIX_SHELL:Ufalse} to see if we can + avoid running 'expr'. + + * install-new.mk: Allow use of cp or mv - controlled by CPMV_OP + (default mv). + +2025-11-13 Simon J Gerraty + + * sys.vars.mk: add M_sh1 so we can handle older bmake that does + not support :sh1 + +2025-11-11 Simon J Gerraty + + * install-mk (MK_VERSION): 20251111 + + * meta2deps.sh: reset some vars for each new meta file + set meta_file to path of meta file. + If meta2deps appears in DEBUG_SH set -x. + +2025-09-16 Simon J Gerraty + + * options.mk: Add OPTIONS_DEFAULT_DEPENDENT_REQUIRED of the form + OPTION/REQUIRED[/VALUE] + if OPTION is $VALUE (default is "yes"), then REQUIRED must be too. + We add OPTIONS_DEFAULT_DEPENDENT_REQUIRED (sans any /{yes,no}) to + OPTIONS_DEFAULT_DEPENDENT so DEPENDENT/REQUIRED follow the same + processing. + + Also add OPTIONS_FORCED_VALUES of the form OPTION/{yes,no} + we add any OPTIONS_FORCED_NO and OPTIONS_FORCED_YES before + processing. + + Simplify the processing of OPTIONS_DEFAULT_VALUES and + OPTIONS_DEFAULT_DEPENDENT by splitting the tuples and use two + iterator variables in the .for loops. + +2025-08-09 Simon J Gerraty + + * install-mk (MK_VERSION): 20250808 + + * replace sjg license with just BSD-2-Clause SPDX tag + 2025-07-24 Simon J Gerraty * install-mk (MK_VERSION): 20250724 diff --git a/contrib/bmake/mk/auto.dep.mk b/contrib/bmake/mk/auto.dep.mk index 400789a37366..ffd0d528dbcb 100644 --- a/contrib/bmake/mk/auto.dep.mk +++ b/contrib/bmake/mk/auto.dep.mk @@ -1,16 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# RCSid: -# $Id: auto.dep.mk,v 1.12 2024/02/17 17:26:57 sjg Exp $ +# $Id: auto.dep.mk,v 1.13 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2010-2021, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/auto.obj.mk b/contrib/bmake/mk/auto.obj.mk index 4b8c5325b71f..140764860de3 100644 --- a/contrib/bmake/mk/auto.obj.mk +++ b/contrib/bmake/mk/auto.obj.mk @@ -1,15 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: auto.obj.mk,v 1.20 2025/05/17 15:29:55 sjg Exp $ +# $Id: auto.obj.mk,v 1.21 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2004-2025, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/autoconf.mk b/contrib/bmake/mk/autoconf.mk index 24532c4e9eab..26e9515d680c 100644 --- a/contrib/bmake/mk/autoconf.mk +++ b/contrib/bmake/mk/autoconf.mk @@ -1,15 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: autoconf.mk,v 1.20 2024/02/17 17:26:57 sjg Exp $ +# $Id: autoconf.mk,v 1.21 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 1996-2024, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/autodep.mk b/contrib/bmake/mk/autodep.mk index 88a2643bccff..ab04419ba808 100644 --- a/contrib/bmake/mk/autodep.mk +++ b/contrib/bmake/mk/autodep.mk @@ -1,16 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# RCSid: -# $Id: autodep.mk,v 1.43 2024/02/17 17:26:57 sjg Exp $ +# $Id: autodep.mk,v 1.44 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 1999-2024, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/cc-wrap.mk b/contrib/bmake/mk/cc-wrap.mk index 7c1d6165e9df..f8287c30025e 100644 --- a/contrib/bmake/mk/cc-wrap.mk +++ b/contrib/bmake/mk/cc-wrap.mk @@ -1,15 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: cc-wrap.mk,v 1.7 2024/02/17 17:26:57 sjg Exp $ +# $Id: cc-wrap.mk,v 1.8 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2022, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/ccm.dep.mk b/contrib/bmake/mk/ccm.dep.mk index 1809a72e7310..1b31832b8ea9 100644 --- a/contrib/bmake/mk/ccm.dep.mk +++ b/contrib/bmake/mk/ccm.dep.mk @@ -1,16 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# RCSid: -# $Id: ccm.dep.mk,v 1.3 2024/02/17 17:26:57 sjg Exp $ +# $Id: ccm.dep.mk,v 1.4 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2024, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/compiler.mk b/contrib/bmake/mk/compiler.mk index e7a13f0f11d7..32bf55834d03 100644 --- a/contrib/bmake/mk/compiler.mk +++ b/contrib/bmake/mk/compiler.mk @@ -1,15 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: compiler.mk,v 1.14 2024/02/19 00:05:50 sjg Exp $ +# $Id: compiler.mk,v 1.15 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2019, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/cython.mk b/contrib/bmake/mk/cython.mk index 8eda318e187c..d6ef8de0b3d6 100644 --- a/contrib/bmake/mk/cython.mk +++ b/contrib/bmake/mk/cython.mk @@ -1,16 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# RCSid: -# $Id: cython.mk,v 1.10 2024/09/20 06:16:41 sjg Exp $ +# $Id: cython.mk,v 1.11 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2014-2024, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/dirdeps-cache-update.mk b/contrib/bmake/mk/dirdeps-cache-update.mk index 9e7cb8281110..b046b0c04f3f 100644 --- a/contrib/bmake/mk/dirdeps-cache-update.mk +++ b/contrib/bmake/mk/dirdeps-cache-update.mk @@ -1,15 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: dirdeps-cache-update.mk,v 1.23 2024/02/17 17:26:57 sjg Exp $ +# $Id: dirdeps-cache-update.mk,v 1.24 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2020, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/dirdeps-options.mk b/contrib/bmake/mk/dirdeps-options.mk index e12dcec40ac7..d173cb7d1e97 100644 --- a/contrib/bmake/mk/dirdeps-options.mk +++ b/contrib/bmake/mk/dirdeps-options.mk @@ -1,15 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: dirdeps-options.mk,v 1.22 2024/02/17 17:26:57 sjg Exp $ +# $Id: dirdeps-options.mk,v 1.23 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2018-2022, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/dirdeps-targets.mk b/contrib/bmake/mk/dirdeps-targets.mk index a8a547c0ce9b..1d00c5f418d2 100644 --- a/contrib/bmake/mk/dirdeps-targets.mk +++ b/contrib/bmake/mk/dirdeps-targets.mk @@ -1,19 +1,11 @@ -# SPDX-License-Identifier: BSD-2-Clause +# $Id: dirdeps-targets.mk,v 1.29 2025/08/09 22:42:24 sjg Exp $ # -# RCSid: -# $Id: dirdeps-targets.mk,v 1.28 2024/10/19 00:47:38 sjg Exp $ +# @(#) Copyright (c) 2019-2020 Simon J. Gerraty # -# @(#) Copyright (c) 2019-2020 Simon J. Gerraty +# SPDX-License-Identifier: BSD-2-Clause # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are *** 2066 LINES SKIPPED *** From nobody Sat Jan 10 21:33:56 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2X3YtFz6MxF9 for ; Sat, 10 Jan 2026 21:33:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpX2X2yNCz3QgF for ; Sat, 10 Jan 2026 21:33:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2PIL1QYCMbcdwt+Lrimgc1Tq6bS23+AkQQaPKwiwmGk=; b=UEHIqeqIMtWv5VpWofCRffYHXBNW+gaWLR/67h5YRzNt+sp/jCt/cQQMejTrIw6YOEWitH EshZm5NftIAog9HNbNDV+hkAsefSchPdV0HQ/KR/hn+cqOkf+8Xx0P7tpMluqlFY74dmUQ Ty+0oRSkSRRETWjBeFK5dsw13tXuFxdGgGpsYmzt1he1KHC0fCg2N3FVPsNaYczY+bD+2R My/6XUjnu/AYJ/JxVxiVDXrX6Ez+TgiCTX2MUyDVVg5yhe1L3cNmyxXCOZ0hv9wMv5okXQ 4pXlCsV/eDbtQGEJcrw3WrjzLV/3FDUOiKIbCz8aJlIlUzzBFM2iycEpg8/eWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2PIL1QYCMbcdwt+Lrimgc1Tq6bS23+AkQQaPKwiwmGk=; b=NZuDIIL5PlqUZDTP+SXbyEbsqNSfaSKcobG+0dig/dM2zUaeKgPt6t63neUJ9oSpsX6pNU pcFt0PzLqt2IK2k5KN0Bcgt11U0Z9iX1gKR0ckCj8nkSCOfM0N4QJJouPm/sKwpw5K+buQ ADzCxyFPChsMqVfMBC/CiTW7dgPD076LSXitso7Gr7qhR0veBtN1VDXITgbUaL6jeiRRVJ 44sTiBthXgd9ZFu6dvhBV1OjckCazTm4yubVBDKg/KDUmPOoaTpEI+DYWgSJTWDBDfEzoy IGRXefwQYDJRUMNhNZZMNEKc7n3oy6Dx+RCzsoyrnO+NvJZSYtZ8hAooT0gcyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768080836; a=rsa-sha256; cv=none; b=vRFbEAmvrTnZrE9O/S6J07sOR9131KFhOiazmSYz56Kf+H9oOVx0t60BjCJtFvZV0y5JfK i5Gsic0NOyDyIMjYOPUFb6hf/bRCaKAV00LP4dO/KpAiPFH5kd8J7g8TQtfURyTStGdi/z gJ95m6InPETaFPeNe1mNmJeUFjC2MeA6WcP0rPqsbyl9+IUTNfXj+66UftPCBbk9+tlizp TE8K9RLqPv07jBUS2BhT3DocsLZMhpdrjXWcHKiz7YOQfVEaZ0wZ9TSjuCRO+Ok2ySMcXd k6fVpHt1xvBWJ0MSj+qBdFvqIVEQZCGKDuB71fVT6qd4cuL+j3qFUsbL6dVUDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2X2VsJz1BB0 for ; Sat, 10 Jan 2026 21:33:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25b9d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 21:33:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Simon J. Gerraty Subject: git: f580ef8a75c1 - stable/14 - Merge bmake-20230909 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f580ef8a75c133ac75407ee1583cdb9cdb1f98c3 Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 21:33:56 +0000 Message-Id: <6962c5c4.25b9d.5492a1b8@gitrepo.freebsd.org> The branch stable/14 has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=f580ef8a75c133ac75407ee1583cdb9cdb1f98c3 commit f580ef8a75c133ac75407ee1583cdb9cdb1f98c3 Author: Simon J. Gerraty AuthorDate: 2023-09-18 01:05:19 +0000 Commit: Simon J. Gerraty CommitDate: 2026-01-10 21:33:10 +0000 Merge bmake-20230909 Merge commit '1012cf15f75d1e9048779abd07270a37cdba590a' (cherry picked from commit 988758838533b24f5893b36514fe2c68a3f911a2) --- contrib/bmake/ChangeLog | 78 +++++++ contrib/bmake/VERSION | 2 +- contrib/bmake/bmake.1 | 34 +++- contrib/bmake/bmake.cat1 | 48 +++-- contrib/bmake/boot-strap | 4 +- contrib/bmake/cond.c | 23 +-- contrib/bmake/configure | 61 ++++-- contrib/bmake/configure.in | 51 +++-- contrib/bmake/import.sh | 34 +++- contrib/bmake/install-sh | 20 +- contrib/bmake/main.c | 47 ++++- contrib/bmake/make-bootstrap.sh.in | 1 + contrib/bmake/make.1 | 34 +++- contrib/bmake/make.h | 15 +- contrib/bmake/meta.c | 9 +- contrib/bmake/mk/ChangeLog | 43 ++++ contrib/bmake/mk/FILES | 1 + contrib/bmake/mk/dirdeps.mk | 22 +- contrib/bmake/mk/install-mk | 6 +- contrib/bmake/mk/install-sh | 226 +++++++++++++++++++++ contrib/bmake/mk/jobs.mk | 24 ++- contrib/bmake/mk/lib.mk | 6 +- contrib/bmake/mk/meta.autodep.mk | 4 +- contrib/bmake/mk/mk-files.txt | 16 +- contrib/bmake/mk/rst2htm.mk | 8 +- contrib/bmake/mk/sys.mk | 20 +- contrib/bmake/mk/sys/IRIX.mk | 13 +- contrib/bmake/parse.c | 35 ++-- contrib/bmake/unit-tests/Makefile | 22 +- contrib/bmake/unit-tests/cond-cmp-numeric-eq.mk | 7 +- contrib/bmake/unit-tests/cond-cmp-numeric-ge.mk | 4 +- contrib/bmake/unit-tests/cond-cmp-numeric-gt.mk | 6 +- contrib/bmake/unit-tests/cond-cmp-numeric-le.mk | 4 +- contrib/bmake/unit-tests/cond-cmp-numeric-lt.mk | 4 +- contrib/bmake/unit-tests/cond-cmp-numeric-ne.mk | 4 +- contrib/bmake/unit-tests/cond-func-empty.exp | 4 +- contrib/bmake/unit-tests/cond-func-empty.mk | 36 +++- contrib/bmake/unit-tests/cond-op-and.mk | 10 +- contrib/bmake/unit-tests/cond-op-or.mk | 10 +- contrib/bmake/unit-tests/dep-op-missing.exp | 2 +- contrib/bmake/unit-tests/directive-dinclude.exp | 2 +- contrib/bmake/unit-tests/directive-dinclude.mk | 4 +- .../bmake/unit-tests/directive-export-gmake.exp | 6 +- contrib/bmake/unit-tests/directive-export-gmake.mk | 27 ++- contrib/bmake/unit-tests/directive-export.exp | 3 + contrib/bmake/unit-tests/directive-export.mk | 19 +- contrib/bmake/unit-tests/directive-for-escape.exp | 83 +++++--- contrib/bmake/unit-tests/directive-for-escape.mk | 46 ++++- .../bmake/unit-tests/directive-hyphen-include.exp | 2 +- .../bmake/unit-tests/directive-hyphen-include.mk | 4 +- .../bmake/unit-tests/directive-include-guard.exp | 16 +- .../bmake/unit-tests/directive-include-guard.mk | 74 +++---- contrib/bmake/unit-tests/directive-include.exp | 2 +- contrib/bmake/unit-tests/directive-include.mk | 4 +- contrib/bmake/unit-tests/directive-sinclude.exp | 2 +- contrib/bmake/unit-tests/directive-sinclude.mk | 4 +- contrib/bmake/unit-tests/directive.exp | 8 +- contrib/bmake/unit-tests/directive.mk | 10 +- contrib/bmake/unit-tests/opt-debug-graph1.exp | 1 + contrib/bmake/unit-tests/opt-debug-graph2.exp | 1 + contrib/bmake/unit-tests/opt-debug-graph3.exp | 1 + contrib/bmake/unit-tests/opt-jobs.mk | 56 ++++- contrib/bmake/unit-tests/parse.exp | 6 +- contrib/bmake/unit-tests/parse.mk | 8 +- contrib/bmake/unit-tests/suff-main-several.exp | 1 + contrib/bmake/unit-tests/suff-transform-debug.exp | 1 + contrib/bmake/unit-tests/var-op-assign.exp | 2 +- contrib/bmake/unit-tests/var-op-assign.mk | 4 +- contrib/bmake/unit-tests/varmod-gmtime.mk | 31 ++- contrib/bmake/unit-tests/varmod-ifelse.exp | 26 ++- contrib/bmake/unit-tests/varmod-ifelse.mk | 54 ++++- contrib/bmake/unit-tests/varmod-mtime.exp | 9 +- contrib/bmake/unit-tests/varmod-mtime.mk | 86 ++++++-- contrib/bmake/unit-tests/varname-dot-make-jobs.exp | 2 +- contrib/bmake/unit-tests/varname-dot-make-jobs.mk | 27 ++- contrib/bmake/unit-tests/varname.exp | 2 +- contrib/bmake/unit-tests/varname.mk | 4 +- contrib/bmake/var.c | 53 +++-- usr.bin/bmake/Makefile.config | 2 +- usr.bin/bmake/config.h | 4 +- usr.bin/bmake/unit-tests/Makefile | 22 +- 81 files changed, 1309 insertions(+), 408 deletions(-) diff --git a/contrib/bmake/ChangeLog b/contrib/bmake/ChangeLog index dd1fdf110ab4..ec0be0f4027c 100644 --- a/contrib/bmake/ChangeLog +++ b/contrib/bmake/ChangeLog @@ -1,3 +1,81 @@ +2023-09-09 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20230909 + Merge with NetBSD make, pick up + o main.c: allow -j to compute a multiple of ncpu + If _SC_NPROCESSORS_ONLN is supported; and -j arg is a floating + point number or ends in 'C' compute .MAKE.JOBS as a multiple of + _SC_NPROCESSORS_ONLN + .MAKE.JOBS.C will be "yes" if -jC is supported + +2023-08-20 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20230820 + Merge with NetBSD make, pick up + o make.1: note that :localtime is better for %s + o parse.c: improve error messages for invalid input. + o var.c: fix for %s:L:gmtime - set TZ=UTC and use localtime to get + correct result, it is still better to use %s:L:localtime. + +2023-08-18 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20230818 + Merge with NetBSD make, pick up + o meta.c: meta_ignore - check raw path against metaIgnorePaths + to potentially skip call to realpath. + o var.c: be strict when parsing the argument of the ':mtime' modifier + o unit-tests/varmod-mtime.mk: document why '${%s:L:localtime}' + should be used to get an equivalent value to time(3). + +2023-08-16 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20230816 + Merge with NetBSD make, pick up + o cond.c: clean up multiple-inclusion guards + +2023-07-25 Simon J Gerraty + + * unit-tests/Makefile: addd varmod-localtime to BROKEN_TESTS + if configure cannot work out how to control TZ. + Remove varmod-localtime from BROKEN_TESTS for IRIX* + +2023-07-24 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20230723 + + * configure.in: fix the test for wether TZ=Europe/Berlin works. + Depending on the time of year, if run between 22:00 and 00:00 UTC + the check in configure would fail incorrectly. + Take the day into account as well. + +2023-07-18 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20230711 + Merge with NetBSD make, pick up + o make.1: clean up wording, clarify scope of '!' in conditions + +2023-07-15 Simon J Gerraty + + * make-bootstrap.sh.in: set prefix + If configure is run using ksh we get unexpanded ${prefix} in + DEFAULT_SYS_PATH, by ensuring prefix is set we should still get + correct result. + +2023-07-13 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20230711 + bump version for IRIX tweaks + + * make.h: undef OP_NONE if defined + + * unit-tests/Makefile: set BROKEN_TESTS for IRIX + + * configure.in: override INSTALL on IRIX + +2023-06-27 Simon J Gerraty + + * boot-strap op_test: ensure we set TEST_MAKE as we want it. + 2023-06-22 Simon J Gerraty * VERSION (_MAKE_VERSION): 20230622 diff --git a/contrib/bmake/VERSION b/contrib/bmake/VERSION index f82791fcbac8..0cc67de7b22d 100644 --- a/contrib/bmake/VERSION +++ b/contrib/bmake/VERSION @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20230622 +_MAKE_VERSION=20230909 diff --git a/contrib/bmake/bmake.1 b/contrib/bmake/bmake.1 index bfa0f2d74d0a..a658eab6700e 100644 --- a/contrib/bmake/bmake.1 +++ b/contrib/bmake/bmake.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.366 2023/05/10 18:22:33 sjg Exp $ +.\" $NetBSD: make.1,v 1.371 2023/09/10 21:52:36 rillig Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd May 10, 2023 +.Dd September 9, 2023 .Dt BMAKE 1 .Os .Sh NAME @@ -267,6 +267,12 @@ cooperate to avoid overloading the system. Specify the maximum number of jobs that .Nm may have running at any one time. +If +.Ar max_jobs +is a floating point number, or ends with +.Ql C , +then the value is multiplied by the number of CPUs reported online by +.Xr sysconf 3 . The value of .Ar max_jobs is saved in @@ -971,6 +977,11 @@ making it easier to track the degree of parallelism being achieved. The argument to the .Fl j option. +.It Va .MAKE.JOBS.C +A read-only boolean that indicates whether the +.Fl j +option supports use of +.Ql C . .It Va .MAKE.LEVEL The recursion depth of .Nm . @@ -1497,6 +1508,10 @@ The value is interpreted as a format string for using .Xr gmtime 3 , producing the formatted timestamp. +Note: the +.Ql %s +format should only be used with +.Sq Cm \&:localtime . If a .Ar timestamp value is not provided or is 0, the current time is used. @@ -2069,7 +2084,7 @@ only evaluates a conditional as far as is necessary to determine its value. Parentheses can be used to override the operator precedence. The boolean operator .Sq Ic \&! -may be used to logically negate an entire conditional. +may be used to logically negate an expression, typically a function call. It is of higher precedence than .Sq Ic \&&& . .Pp @@ -2119,9 +2134,9 @@ may also be an arithmetic or string comparison. Variable expansion is performed on both sides of the comparison. If both sides are numeric and neither is enclosed in quotes, the comparison is done numerically, otherwise lexicographically. -A string is interpreted as hexadecimal integer if it is preceded by +A string is interpreted as a hexadecimal integer if it is preceded by .Li 0x , -otherwise it is a decimal floating-point number; +otherwise it is interpreted as a decimal floating-point number; octal numbers are not supported. .Pp All comparisons may use the operators @@ -2142,7 +2157,7 @@ and its numeric value (if any) is not zero. When .Nm is evaluating one of these conditional expressions, and it encounters -a (whitespace separated) word it doesn't recognize, either the +a (whitespace-separated) word it doesn't recognize, either the .Dq make or .Dq defined @@ -2165,12 +2180,13 @@ function is applied. .Pp If the conditional evaluates to true, parsing of the makefile continues as before. -If it evaluates to false, the following lines are skipped. -In both cases, this continues until the corresponding +If it evaluates to false, the following lines until the corresponding +.Sq Ic .elif +variant, .Sq Ic .else or .Sq Ic .endif -is found. +are skipped. .Ss For loops For loops are typically used to apply a set of rules to a list of files. The syntax of a for loop is: diff --git a/contrib/bmake/bmake.cat1 b/contrib/bmake/bmake.cat1 index 6f69dfb9f3ad..bdd48dda11db 100644 --- a/contrib/bmake/bmake.cat1 +++ b/contrib/bmake/bmake.cat1 @@ -157,15 +157,17 @@ BMAKE(1) FreeBSD General Commands Manual BMAKE(1) -j max_jobs Specify the maximum number of jobs that bmake may have running at - any one time. The value of max_jobs is saved in .MAKE.JOBS. - Turns compatibility mode off, unless the -B option is also speci- - fied. When compatibility mode is off, all commands associated - with a target are executed in a single shell invocation as op- - posed to the traditional one shell invocation per line. This can - break traditional scripts which change directories on each com- - mand invocation and then expect to start with a fresh environment - on the next line. It is more efficient to correct the scripts - rather than turn backwards compatibility on. + any one time. If max_jobs is a floating point number, or ends + with `C', then the value is multiplied by the number of CPUs re- + ported online by sysconf(3). The value of max_jobs is saved in + .MAKE.JOBS. Turns compatibility mode off, unless the -B option + is also specified. When compatibility mode is off, all commands + associated with a target are executed in a single shell invoca- + tion as opposed to the traditional one shell invocation per line. + This can break traditional scripts which change directories on + each command invocation and then expect to start with a fresh en- + vironment on the next line. It is more efficient to correct the + scripts rather than turn backwards compatibility on. A job token pool with max_jobs tokens is used to control the to- tal number of jobs running. Each instance of bmake will wait for @@ -625,6 +627,10 @@ BMAKE(1) FreeBSD General Commands Manual BMAKE(1) .MAKE.JOBS The argument to the -j option. + .MAKE.JOBS.C + A read-only boolean that indicates whether the -j option supports + use of `C'. + .MAKE.LEVEL The recursion depth of bmake. The top-level instance of bmake has level 0, and each child make has its parent level plus 1. @@ -972,8 +978,9 @@ BMAKE(1) FreeBSD General Commands Manual BMAKE(1) :gmtime[=timestamp] The value is interpreted as a format string for strftime(3), using - gmtime(3), producing the formatted timestamp. If a timestamp value - is not provided or is 0, the current time is used. + gmtime(3), producing the formatted timestamp. Note: the `%s' format + should only be used with `:localtime'. If a timestamp value is not + provided or is 0, the current time is used. :hash Computes a 32-bit hash of the value and encodes it as 8 hex digits. @@ -1313,8 +1320,8 @@ BMAKE(1) FreeBSD General Commands Manual BMAKE(1) bmake only evaluates a conditional as far as is necessary to determine its value. Parentheses can be used to override the operator precedence. - The boolean operator `!' may be used to logically negate an entire condi- - tional. It is of higher precedence than `&&'. + The boolean operator `!' may be used to logically negate an expression, + typically a function call. It is of higher precedence than `&&'. The value of expression may be any of the following function call expres- sions: @@ -1346,9 +1353,9 @@ BMAKE(1) FreeBSD General Commands Manual BMAKE(1) Expression may also be an arithmetic or string comparison. Variable ex- pansion is performed on both sides of the comparison. If both sides are numeric and neither is enclosed in quotes, the comparison is done numeri- - cally, otherwise lexicographically. A string is interpreted as hexadeci- - mal integer if it is preceded by 0x, otherwise it is a decimal floating- - point number; octal numbers are not supported. + cally, otherwise lexicographically. A string is interpreted as a hexa- + decimal integer if it is preceded by 0x, otherwise it is interpreted as a + decimal floating-point number; octal numbers are not supported. All comparisons may use the operators `==' and `!='. Numeric comparisons may also use the operators `<', `<=', `>' and `>='. @@ -1358,16 +1365,15 @@ BMAKE(1) FreeBSD General Commands Manual BMAKE(1) any) is not zero. When bmake is evaluating one of these conditional expressions, and it en- - counters a (whitespace separated) word it doesn't recognize, either the + counters a (whitespace-separated) word it doesn't recognize, either the "make" or "defined" function is applied to it, depending on the form of the conditional. If the form is `.ifdef', `.ifndef' or `.if', the "defined" function is applied. Similarly, if the form is `.ifmake' or `.ifnmake', the "make" function is applied. If the conditional evaluates to true, parsing of the makefile continues - as before. If it evaluates to false, the following lines are skipped. - In both cases, this continues until the corresponding `.else' or `.endif' - is found. + as before. If it evaluates to false, the following lines until the cor- + responding `.elif' variant, `.else' or `.endif' are skipped. For loops For loops are typically used to apply a set of rules to a list of files. @@ -1753,4 +1759,4 @@ BMAKE(1) FreeBSD General Commands Manual BMAKE(1) attempt to suppress a cascade of unnecessary errors, can result in a seemingly unexplained `*** Error code 6' -FreeBSD 13.0 May 10, 2023 FreeBSD 13.0 +FreeBSD 13.0 September 9, 2023 FreeBSD 13.0 diff --git a/contrib/bmake/boot-strap b/contrib/bmake/boot-strap index 8892f2b1c990..f47f0c4fdecd 100755 --- a/contrib/bmake/boot-strap +++ b/contrib/bmake/boot-strap @@ -119,7 +119,7 @@ # Simon J. Gerraty # RCSid: -# $Id: boot-strap,v 1.57 2021/10/22 20:32:21 sjg Exp $ +# $Id: boot-strap,v 1.58 2023/06/27 21:02:19 sjg Exp $ # # @(#) Copyright (c) 2001 Simon J. Gerraty # @@ -420,7 +420,7 @@ op_build() { op_test() { [ -x bmake ] || op_build - Bmake test "$@" TEST_MAKE=$objdir/bmake || exit 1 + Bmake test TEST_MAKE=$objdir/bmake "$@" || exit 1 } op_clean() { diff --git a/contrib/bmake/cond.c b/contrib/bmake/cond.c index 9a389ae6a92d..4ed15ff26184 100644 --- a/contrib/bmake/cond.c +++ b/contrib/bmake/cond.c @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.353 2023/06/23 05:21:10 rillig Exp $ */ +/* $NetBSD: cond.c,v 1.354 2023/08/11 04:56:31 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -92,7 +92,7 @@ #include "dir.h" /* "@(#)cond.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: cond.c,v 1.353 2023/06/23 05:21:10 rillig Exp $"); +MAKE_RCSID("$NetBSD: cond.c,v 1.354 2023/08/11 04:56:31 rillig Exp $"); /* * Conditional expressions conform to this grammar: @@ -224,17 +224,13 @@ ParseWord(const char **pp, bool doEval) if ((ch == '&' || ch == '|') && paren_depth == 0) break; if (ch == '$') { - /* - * Parse the variable expression and install it as - * part of the argument if it's valid. We tell - * Var_Parse to complain on an undefined variable, - * (XXX: but Var_Parse ignores that request) - * so we don't need to do it. Nor do we return an - * error, though perhaps we should. - */ VarEvalMode emode = doEval ? VARE_UNDEFERR : VARE_PARSE_ONLY; + /* + * TODO: make Var_Parse complain about undefined + * variables. + */ FStr nestedVal = Var_Parse(&p, SCOPE_CMDLINE, emode); /* TODO: handle errors */ Buf_AddStr(&word, nestedVal.str); @@ -1267,7 +1263,6 @@ Cond_ExtractGuard(const char *line) { const char *p, *varname; Substring dir; - enum GuardKind kind; Guard *guard; p = line + 1; /* skip the '.' */ @@ -1288,10 +1283,9 @@ Cond_ExtractGuard(const char *line) const char *arg_p = p; free(ParseWord(&p, false)); if (strcmp(p, ")") == 0) { - char *target = ParseWord(&arg_p, true); guard = bmake_malloc(sizeof(*guard)); guard->kind = GK_TARGET; - guard->name = target; + guard->name = ParseWord(&arg_p, true); return guard; } } @@ -1302,9 +1296,8 @@ Cond_ExtractGuard(const char *line) return NULL; found_variable: - kind = GK_VARIABLE; guard = bmake_malloc(sizeof(*guard)); - guard->kind = kind; + guard->kind = GK_VARIABLE; guard->name = bmake_strsedup(varname, p); return guard; } diff --git a/contrib/bmake/configure b/contrib/bmake/configure index 44f016b249e1..9d6130f66c84 100755 --- a/contrib/bmake/configure +++ b/contrib/bmake/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for bmake 20220909. +# Generated by GNU Autoconf 2.71 for bmake 20230723. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='bmake' PACKAGE_TARNAME='bmake' -PACKAGE_VERSION='20220909' -PACKAGE_STRING='bmake 20220909' +PACKAGE_VERSION='20230723' +PACKAGE_STRING='bmake 20230723' PACKAGE_BUGREPORT='sjg@NetBSD.org' PACKAGE_URL='' @@ -1290,7 +1290,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures bmake 20220909 to adapt to many kinds of systems. +\`configure' configures bmake 20230723 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1352,7 +1352,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of bmake 20220909:";; + short | recursive ) echo "Configuration of bmake 20230723:";; esac cat <<\_ACEOF @@ -1367,7 +1367,10 @@ Optional Features: Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-defshell=SHELL use SHELL by default - must be sh compatible, use sh or ksh to pick the internal definitions + --with-defshell=[name=]SHELL use SHELL by default + optional 'name' can be 'sh' to indicate SHELL is sh compatible + eg. --with-defshell=sh=/bin/bsh + use just 'sh' or 'ksh' to pick the internal definitions --without-makefile disable use of generated makefile --without-meta disable use of meta-mode --with-filemon={no,dev,ktrace,path/filemon.h} indicate filemon method for meta-mode. Path to filemon.h implies dev @@ -1458,7 +1461,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -bmake configure 20220909 +bmake configure 20230723 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1965,7 +1968,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by bmake $as_me 20220909, which was +It was created by bmake $as_me 20230723, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -2748,15 +2751,24 @@ use_defshell() { DEFSHELL_INDEX=DEFSHELL_INDEX_CSH;; *ksh) DEFSHELL_INDEX=DEFSHELL_INDEX_KSH;; - sh|/bin/sh) + sh|/bin/sh|*/bsh) DEFSHELL_INDEX=DEFSHELL_INDEX_SH;; + *=*) # eg. sh=/bin/bsh + eval `IFS="="; set -- $1; echo name=$1 defshell_path=$2` + case "$name" in + csh) DEFSHELL_INDEX=DEFSHELL_INDEX_CSH;; + ksh) DEFSHELL_INDEX=DEFSHELL_INDEX_KSH;; + sh) DEFSHELL_INDEX=DEFSHELL_INDEX_SH;; + *) DEFSHELL_INDEX=DEFSHELL_INDEX_CUSTOM;; + esac + ;; *) DEFSHELL_INDEX=DEFSHELL_INDEX_CUSTOM defshell_path=$1 ;; esac - case "$1" in - /bin/*) ;; - */*) defshell_path=$1;; + case "$defshell_path,$1" in + ,/bin/*) ;; + ,*/*) defshell_path=$1;; esac } @@ -2851,21 +2863,22 @@ SCO_SV) # /bin/sh is not usable CPPFLAGS="${CPPFLAGS} -DFORCE_USE_SHELL" ;; esac +# Not everyone groks TZ=Europe/Berlin +# which is used by the localtime tests echo $ECHO_N "checking whether system has timezone Europe/Berlin... $ECHO_C" >&6 -if test -f /usr/share/zoneinfo/Europe/Berlin; then +eval `TZ=UTC date '+utc_H=%H utc_d=%d' 2> /dev/null` +eval `TZ=Europe/Berlin date '+utc1_H=%H utc1_d=%d' 2> /dev/null` +if test ${utc_d-0} -lt ${utc1_d-0} -o ${utc_H-0} -lt ${utc1_H-0}; then echo yes >&6 - # seems a safe bet UTC_1=Europe/Berlin else - utcH=`TZ=UTC date +%H 2> /dev/null` - utc_1H=`TZ=UTC-1 date +%H 2> /dev/null` - if test ${utcH-0} -lt ${utc_1H-0}; then + eval `TZ=UTC-1 date '+utc1_H=%H utc1_d=%d' 2> /dev/null` + if test ${utc_d-0} -lt ${utc1_d-0} -o ${utc_H-0} -lt ${utc1_H-0}; then UTC_1=UTC-1 echo no, using UTC-1 >&6 - else - echo no >&6 fi fi +test "x$UTC_1" = x && echo no >&6 oldPATH=$PATH for d in /usr/gnu/bin do @@ -4870,6 +4883,10 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +# We have to override that on some systems +case "$OS" in +IRIX*) ac_INSTALL=$srcdir/install-sh;; +esac if test -x /usr/bin/getconf; then bmake_path_max=`getconf PATH_MAX / 2> /dev/null` # only a numeric response is useful @@ -4881,6 +4898,8 @@ if test $bmake_path_max -gt 1024; then bmake_path_max=1024 fi echo "Using: BMAKE_PATH_MAX=$bmake_path_max" >&6 +# if type does not work which(1) had better! +# note we cannot rely on type returning non-zero on failure if (type cat) > /dev/null 2>&1; then : which which() { @@ -7555,7 +7574,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by bmake $as_me 20220909, which was +This file was extended by bmake $as_me 20230723, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7619,7 +7638,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -bmake config.status 20220909 +bmake config.status 20230723 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/contrib/bmake/configure.in b/contrib/bmake/configure.in index 669f1d031a73..5b97bc1bed52 100644 --- a/contrib/bmake/configure.in +++ b/contrib/bmake/configure.in @@ -1,11 +1,11 @@ dnl dnl RCSid: -dnl $Id: configure.in,v 1.87 2022/09/09 20:00:53 sjg Exp $ +dnl $Id: configure.in,v 1.97 2023/07/25 20:12:32 sjg Exp $ dnl dnl Process this file with autoconf to produce a configure script dnl AC_PREREQ([2.71]) -AC_INIT([bmake],[20220909],[sjg@NetBSD.org]) +AC_INIT([bmake],[20230723],[sjg@NetBSD.org]) AC_CONFIG_HEADERS(config.h) dnl make srcdir absolute @@ -29,20 +29,32 @@ use_defshell() { DEFSHELL_INDEX=DEFSHELL_INDEX_CSH;; *ksh) DEFSHELL_INDEX=DEFSHELL_INDEX_KSH;; - sh|/bin/sh) + sh|/bin/sh|*/bsh) DEFSHELL_INDEX=DEFSHELL_INDEX_SH;; + *=*) # eg. sh=/bin/bsh + eval `IFS="="; set -- $1; echo name=$1 defshell_path=$2` + case "$name" in + csh) DEFSHELL_INDEX=DEFSHELL_INDEX_CSH;; + ksh) DEFSHELL_INDEX=DEFSHELL_INDEX_KSH;; + sh) DEFSHELL_INDEX=DEFSHELL_INDEX_SH;; + *) DEFSHELL_INDEX=DEFSHELL_INDEX_CUSTOM;; + esac + ;; *) DEFSHELL_INDEX=DEFSHELL_INDEX_CUSTOM defshell_path=$1 ;; esac - case "$1" in - /bin/*) ;; - */*) defshell_path=$1;; + case "$defshell_path,$1" in + ,/bin/*) ;; + ,*/*) defshell_path=$1;; esac } dnl AC_ARG_WITH(defshell, -[ --with-defshell=SHELL use SHELL by default - must be sh compatible, use sh or ksh to pick the internal definitions], +[ --with-defshell=[[name=]]SHELL use SHELL by default + optional 'name' can be 'sh' to indicate SHELL is sh compatible + eg. --with-defshell=sh=/bin/bsh + use just 'sh' or 'ksh' to pick the internal definitions], [case "${withval}" in yes) AC_MSG_ERROR(bad value ${withval} given for bmake DEFSHELL) ;; no) ;; @@ -126,23 +138,22 @@ SCO_SV) # /bin/sh is not usable ;; esac dnl -dnl Not everyone groks TZ=Europe/Berlin -dnl which is used by the localtime tests +# Not everyone groks TZ=Europe/Berlin +# which is used by the localtime tests echo $ECHO_N "checking whether system has timezone Europe/Berlin... $ECHO_C" >&6 -if test -f /usr/share/zoneinfo/Europe/Berlin; then +eval `TZ=UTC date '+utc_H=%H utc_d=%d' 2> /dev/null` +eval `TZ=Europe/Berlin date '+utc1_H=%H utc1_d=%d' 2> /dev/null` +if test ${utc_d-0} -lt ${utc1_d-0} -o ${utc_H-0} -lt ${utc1_H-0}; then echo yes >&6 - # seems a safe bet UTC_1=Europe/Berlin else - utcH=`TZ=UTC date +%H 2> /dev/null` - utc_1H=`TZ=UTC-1 date +%H 2> /dev/null` - if test ${utcH-0} -lt ${utc_1H-0}; then + eval `TZ=UTC-1 date '+utc1_H=%H utc1_d=%d' 2> /dev/null` + if test ${utc_d-0} -lt ${utc1_d-0} -o ${utc_H-0} -lt ${utc1_H-0}; then UTC_1=UTC-1 echo no, using UTC-1 >&6 - else - echo no >&6 fi fi +test "x$UTC_1" = x && echo no >&6 dnl dnl Add some places to look for compilers oldPATH=$PATH @@ -160,6 +171,10 @@ AC_USE_SYSTEM_EXTENSIONS dnl Checks for programs. AC_PROG_CC AC_PROG_INSTALL +# We have to override that on some systems +case "$OS" in +IRIX*) ac_INSTALL=$srcdir/install-sh;; +esac dnl Executable suffix - normally empty; .exe on os2. AC_SUBST(ac_exe_suffix)dnl dnl @@ -177,8 +192,8 @@ fi echo "Using: BMAKE_PATH_MAX=$bmake_path_max" >&6 AC_SUBST(bmake_path_max)dnl dnl -dnl if type does not work which(1) had better! -dnl note we cannot rely on type returning non-zero on failure +# if type does not work which(1) had better! +# note we cannot rely on type returning non-zero on failure if (type cat) > /dev/null 2>&1; then : which which() { diff --git a/contrib/bmake/import.sh b/contrib/bmake/import.sh index a233cba9c9cc..7295a9a982d5 100755 --- a/contrib/bmake/import.sh +++ b/contrib/bmake/import.sh @@ -4,6 +4,7 @@ ECHO= GIT=${GIT:-git} +PAGER=${PAGER:-${LESS:-${MORE:-more}}} # For consistency... Error() { @@ -80,14 +81,41 @@ grep '^+' $TF.diffs | sed 's,^.,,' | sort > $TF.adds grep '^-' $TF.diffs | sed 's,^.,,' | sort > $TF.rms comm -13 $TF.adds $TF.rms > $TF.rm +post=$SB/tmp/bmake-post.sh + +# this is similar to what generates the mail to bmake-announce +gen_import_F() { + echo Import bmake-$VERSION + + if [ -s $post ]; then + last=`sed -n '/ tag/s,.*/,bmake-,p' $post` + else + last="last import" + fi + for C in ChangeLog */ChangeLog + do + $GIT diff --staged $C | + sed -n '/^@@/d;/^\+\+\+/d;/^\+/s,^.,,p' > $TF.C + test -s $TF.C || continue + echo + echo $C since $last + echo + cat $TF.C + done +} + if [ -z "$ECHO" ]; then test -s $TF.rm && xargs rm -f < $TF.rm $GIT add -A - $GIT diff --staged | tee $SB/tmp/bmake-import.diff + gen_import_F > $SB/tmp/bmake-import.F + $GIT diff --staged > $SB/tmp/bmake-import.diff + $PAGER $SB/tmp/bmake-import.F $SB/tmp/bmake-import.diff { echo "$GIT tag -a -m \"Tag bmake/$VERSION\" vendor/NetBSD/bmake/$VERSION" echo "echo \"When ready do: $GIT push --follow-tags\"" - } > $SB/tmp/bmake-post.sh - echo "After you commit, run $SB/tmp/bmake-post.sh" + } > $post + echo "Edit $SB/tmp/bmake-import.F as needed, then:" + echo "$GIT commit -F $SB/tmp/bmake-import.F" + echo "After you commit, run $post" else comm -23 $TF.adds $TF.rms > $TF.add test -s $TF.rm && { echo Removing:; cat $TF.rm; } diff --git a/contrib/bmake/install-sh b/contrib/bmake/install-sh index 1f6720f661a1..1fa52a59de7e 100755 --- a/contrib/bmake/install-sh +++ b/contrib/bmake/install-sh @@ -1,4 +1,5 @@ -: +#!/bin/sh + # NAME: # install.sh - portable version of install(1) # @@ -46,14 +47,14 @@ # BUGS: # The '-i' option is to save your sanity when 'bsd.prog.mk' # insists on haveing a '-o' "owner" option which is doomed to -# fail on many systems. We ignore '-b', '-B' and '-c' options. +# fail on many systems. We ignore '-b' and '-c' options. # # AUTHOR: # Simon J. Gerraty # # RCSid: -# $Id: install-sh,v 1.22 2023/01/28 16:21:19 sjg Exp $ +# $Id: install-sh,v 1.25 2023/07/15 05:33:38 sjg Exp $ # # @(#) Copyright (c) 1993-2023 Simon J. Gerraty # @@ -73,6 +74,7 @@ set -- `getopt B:bpxCNcsdo:g:m:i:f: $*` Mydir=`dirname $0` [ -s $Mydir/.installrc ] && . $Mydir/.installrc +OLD_EXT=.old owner=: group=: mode=: @@ -89,6 +91,7 @@ while : do case "$1" in --) shift; break;; + -[bc]) ;; # ignore -p) CP_p=-p;; -x) set -x;; -B) OLD_EXT=$2; shift;; @@ -155,7 +158,7 @@ add_path /usr/sbin case "$owner" in :) ;; -*) +*) # some systems put chown in odd places add_path /etc add_path /usr/etc ;; @@ -185,16 +188,16 @@ if [ "$mkdirs" ]; then fi # install files -if [ $# -gt 2 ]; then - dest_dir=yes -elif [ $# -eq 1 ]; then +if [ $# -eq 1 ]; then echo "what should I do with $*?" >&2 exit 1 fi # get list of files +files= while [ $# -gt 1 ] do + test "x$files" = x || dest_dir=yes files="$files $1" shift done @@ -202,7 +205,6 @@ done dest=$1 shift - if [ "$dest_dir" = yes -a ! -d $dest ]; then echo "no directory $dest" >&2 exit 1 @@ -218,7 +220,7 @@ do fi $newer $f $t || continue $compare $f $t || continue - [ -f $t ] && { mv -f $t $t.old || exit 1; } + [ -f $t ] && { mv -f $t $t$OLD_EXT || exit 1; } { cp $CP_p $f $t && Setem $t; } || exit 1 done exit 0 diff --git a/contrib/bmake/main.c b/contrib/bmake/main.c index b0a4d003ddf1..b0ce265d34a6 100644 --- a/contrib/bmake/main.c +++ b/contrib/bmake/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.593 2023/03/28 14:39:31 rillig Exp $ */ +/* $NetBSD: main.c,v 1.599 2023/09/10 21:52:36 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -111,7 +111,7 @@ #include "trace.h" /* "@(#)main.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: main.c,v 1.593 2023/03/28 14:39:31 rillig Exp $"); +MAKE_RCSID("$NetBSD: main.c,v 1.599 2023/09/10 21:52:36 rillig Exp $"); #if defined(MAKE_NATIVE) && !defined(lint) __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 " "The Regents of the University of California. " @@ -399,21 +399,44 @@ MainParseArgJobsInternal(const char *argvalue) } static void -MainParseArgJobs(const char *argvalue) +MainParseArgJobs(const char *arg) { - char *p; + const char *p; + char *end; + char v[12]; forceJobs = true; - opts.maxJobs = (int)strtol(argvalue, &p, 0); + opts.maxJobs = (int)strtol(arg, &end, 0); + p = arg + (end - arg); +#ifdef _SC_NPROCESSORS_ONLN + if (*p != '\0') { + double d; + + if (*p == 'C') { + d = (opts.maxJobs > 0) ? opts.maxJobs : 1; + } else if (*p == '.') { + d = strtod(arg, &end); + p = arg + (end - arg); + } else + d = 0; + if (d > 0) { + p = ""; + opts.maxJobs = (int)sysconf(_SC_NPROCESSORS_ONLN); + opts.maxJobs = (int)(d * (double)opts.maxJobs); + } + } +#endif if (*p != '\0' || opts.maxJobs < 1) { (void)fprintf(stderr, - "%s: illegal argument to -j -- must be positive integer!\n", - progname); + "%s: argument '%s' to option '-j' " + "must be a positive number\n", + progname, arg); exit(2); /* Not 1 so -q can distinguish error */ } + snprintf(v, sizeof(v), "%d", opts.maxJobs); Global_Append(MAKEFLAGS, "-j"); - Global_Append(MAKEFLAGS, argvalue); - Global_Set(".MAKE.JOBS", argvalue); + Global_Append(MAKEFLAGS, v); + Global_Set(".MAKE.JOBS", v); maxJobTokens = opts.maxJobs; *** 2784 LINES SKIPPED *** From nobody Sat Jan 10 21:33:57 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2Z0Gm0z6MxNc for ; Sat, 10 Jan 2026 21:33:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpX2Y4X4Sz3QSG for ; Sat, 10 Jan 2026 21:33:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+jUKZg0Z9x47lZ3YTZ/MTQ5YWVpL8jB2T3LCrG2YheA=; b=fhbRxmRg64FoTLB0dEVfx3cmRn2KY2QKIURqdvnqVM2iCo5aPBURRznIJu/ILhWgoHnFGM C9UIb7+UpzIDavW0ynN0hX2LCZ43wORBEhixnqj5nm21GLMUUpskuENwLp8OPJvMv8goIM WrZcvF8nuv/JNLp68B3PuRq+9xaTGTfbabecdRIkWxSchrqQ9/cXaYn6jd4+F969HAukaH CF49PPXfPe+TV1IhpaljwpXS4qOcuPf7xxcckpMH4ev1kO0rkrYvGhUw3YqvUyb+Ih4eWw p7ncg2s8QaAaPD+pXJoQ297yDbwsWzNAll6BglzW8G7PKnTP7IqvZBqxiGaJ3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+jUKZg0Z9x47lZ3YTZ/MTQ5YWVpL8jB2T3LCrG2YheA=; b=SxeZCDimwAmMvTPTTScbcyHzo2p8Te8EMj4Op6zVl3PUFkJtth1jUftpGUj9aJ/hFe4mv2 Zv8zpc/z0UsTBy4Ho3zJ7jYYxVadZ4Baaszu5ZVqPjasMxo7CDLHw0/cCDhsqhAJEBzOIS c5vxwPuQ0N6XM8tGiqn49RKI9RdPtcRhNBmouut+mO5TNgdlz2WrGDNFTLjcIOtzCfMQ6s qlboWaimW+bP/6746XX00u/op9DKKkE03OeGUojZImR0QcckH7POv1g54hpvutaStQ2IKe V3CLR3Ge7Cb/YD/FuLXjmMqlkxZlABIzAa/5ArgzxRbxMGhB59TTVq9kd5KGSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768080837; a=rsa-sha256; cv=none; b=C4j8lAUUo9YfyHoc57lOllMAWyY+v4htmkU5vCsaAh5L/e2m0I1/dr+GFHVlR9vFTCVz79 Lou32q9WB2PJhdbp1QqB3yjRaAYFCGZAQP18TcFnvzFrzxaxZMqr0RMv2GiczFbhEnLlrn 2i4wQ15YjDYyMQEKXmsCVSrgChDgDZzkJbm4Iny9SpGGKCQGPytu0NFApntNebsFT909Jq JzY1NHMBEOjivhv+nagx/i9ZdPb0nDwpjkqmZ7OknlfDRSuFaR0o3JQQ2Ua2FytYDYYouB bH4iZLMbr8ZWRogdWECymSuFdWn81O5mnXBTQFLfCCCFigOkWtjvogC9W+qTcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2Y42CHz1BVm for ; Sat, 10 Jan 2026 21:33:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24eaa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 21:33:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Simon J. Gerraty Subject: git: 4b2e33e48152 - stable/14 - Update to bmake-20240108 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4b2e33e4815262757f998a188821b58b1fe1feea Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 21:33:57 +0000 Message-Id: <6962c5c5.24eaa.7188947b@gitrepo.freebsd.org> The branch stable/14 has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=4b2e33e4815262757f998a188821b58b1fe1feea commit 4b2e33e4815262757f998a188821b58b1fe1feea Author: Simon J. Gerraty AuthorDate: 2024-01-14 01:31:01 +0000 Commit: Simon J. Gerraty CommitDate: 2026-01-10 21:33:11 +0000 Update to bmake-20240108 (cherry picked from commit d5e0a182cf153f8993a633b93d9220c99a89e760) --- contrib/bmake/ChangeLog | 102 +++ contrib/bmake/README | 17 +- contrib/bmake/VERSION | 2 +- contrib/bmake/arch.c | 10 +- contrib/bmake/bmake.1 | 6 +- contrib/bmake/bmake.cat1 | 6 +- contrib/bmake/boot-strap | 16 +- contrib/bmake/bsd.after-import.mk | 17 +- contrib/bmake/buf.c | 6 +- contrib/bmake/buf.h | 4 +- contrib/bmake/compat.c | 65 +- contrib/bmake/cond.c | 111 ++-- contrib/bmake/configure | 34 +- contrib/bmake/configure.in | 16 +- contrib/bmake/dir.c | 330 +++------- contrib/bmake/for.c | 14 +- contrib/bmake/hash.c | 28 +- contrib/bmake/hash.h | 21 +- contrib/bmake/job.c | 139 ++-- contrib/bmake/job.h | 6 +- contrib/bmake/lst.c | 22 +- contrib/bmake/lst.h | 8 +- contrib/bmake/main.c | 156 ++--- contrib/bmake/make.1 | 6 +- contrib/bmake/make.c | 28 +- contrib/bmake/make.h | 5 +- contrib/bmake/meta.c | 6 +- contrib/bmake/mk/ChangeLog | 42 ++ contrib/bmake/mk/compiler.mk | 4 +- contrib/bmake/mk/dirdeps.mk | 17 +- contrib/bmake/mk/dpadd.mk | 14 +- contrib/bmake/mk/gendirdeps.mk | 6 +- contrib/bmake/mk/host-target.mk | 7 +- contrib/bmake/mk/init.mk | 8 +- contrib/bmake/mk/install-mk | 4 +- contrib/bmake/mk/jobs.mk | 5 +- contrib/bmake/mk/lib.mk | 25 +- contrib/bmake/mk/man.mk | 93 ++- contrib/bmake/mk/meta.autodep.mk | 4 +- contrib/bmake/mk/own.mk | 3 +- contrib/bmake/mk/prog.mk | 5 +- contrib/bmake/mk/rst2htm.mk | 3 +- contrib/bmake/os.sh | 0 contrib/bmake/parse.c | 279 +++------ contrib/bmake/str.c | 77 ++- contrib/bmake/str.h | 29 +- contrib/bmake/suff.c | 168 ++--- contrib/bmake/unit-tests/Makefile | 9 +- contrib/bmake/unit-tests/cmd-errors-jobs.exp | 2 +- contrib/bmake/unit-tests/cmd-errors-lint.exp | 2 +- contrib/bmake/unit-tests/cmd-errors.exp | 2 +- contrib/bmake/unit-tests/cmdline-undefined.mk | 4 +- contrib/bmake/unit-tests/comment.mk | 4 +- contrib/bmake/unit-tests/cond-cmp-string.mk | 14 +- contrib/bmake/unit-tests/cond-cmp-unary.mk | 8 +- contrib/bmake/unit-tests/cond-eof.mk | 4 +- contrib/bmake/unit-tests/cond-func-defined.exp | 2 +- contrib/bmake/unit-tests/cond-func-defined.mk | 8 +- contrib/bmake/unit-tests/cond-func-empty.mk | 16 +- contrib/bmake/unit-tests/cond-func-exists.mk | 6 +- contrib/bmake/unit-tests/cond-func.mk | 4 +- contrib/bmake/unit-tests/cond-late.exp | 2 +- contrib/bmake/unit-tests/cond-late.mk | 6 +- contrib/bmake/unit-tests/cond-op-and.mk | 8 +- contrib/bmake/unit-tests/cond-op-or.mk | 8 +- contrib/bmake/unit-tests/cond-short.exp | 2 +- contrib/bmake/unit-tests/cond-short.mk | 23 +- contrib/bmake/unit-tests/cond-token-number.mk | 6 +- contrib/bmake/unit-tests/cond-token-plain.exp | 4 +- contrib/bmake/unit-tests/cond-token-plain.mk | 16 +- contrib/bmake/unit-tests/cond-token-string.exp | 2 +- contrib/bmake/unit-tests/cond-token-string.mk | 10 +- contrib/bmake/unit-tests/cond-token-var.mk | 16 +- contrib/bmake/unit-tests/dep-var.exp | 2 +- contrib/bmake/unit-tests/dep-var.mk | 10 +- contrib/bmake/unit-tests/depsrc-ignore.exp | 2 +- .../bmake/unit-tests/deptgt-delete_on_error.exp | 2 +- contrib/bmake/unit-tests/deptgt-makeflags.exp | 2 +- contrib/bmake/unit-tests/deptgt-makeflags.mk | 6 +- contrib/bmake/unit-tests/deptgt.mk | 6 +- contrib/bmake/unit-tests/dir.mk | 4 +- contrib/bmake/unit-tests/directive-else.mk | 4 +- .../bmake/unit-tests/directive-export-gmake.exp | 1 + contrib/bmake/unit-tests/directive-export-gmake.mk | 25 +- contrib/bmake/unit-tests/directive-export.exp | 6 +- contrib/bmake/unit-tests/directive-export.mk | 10 +- contrib/bmake/unit-tests/directive-for-empty.mk | 12 +- contrib/bmake/unit-tests/directive-for-errors.mk | 14 +- contrib/bmake/unit-tests/directive-for-escape.exp | 4 +- contrib/bmake/unit-tests/directive-for-escape.mk | 12 +- contrib/bmake/unit-tests/directive-for-if.mk | 4 +- contrib/bmake/unit-tests/directive-for.exp | 19 +- contrib/bmake/unit-tests/directive-for.mk | 27 +- contrib/bmake/unit-tests/directive-ifmake.mk | 4 +- contrib/bmake/unit-tests/directive-ifndef.mk | 36 +- .../bmake/unit-tests/directive-include-guard.exp | 16 + .../bmake/unit-tests/directive-include-guard.mk | 188 ++++-- contrib/bmake/unit-tests/directive-warning.mk | 4 +- contrib/bmake/unit-tests/directive.mk | 4 +- contrib/bmake/unit-tests/escape.exp | 36 +- contrib/bmake/unit-tests/escape.mk | 7 +- contrib/bmake/unit-tests/hanoi-include.mk | 7 +- contrib/bmake/unit-tests/jobs-error-indirect.exp | 2 +- .../bmake/unit-tests/jobs-error-nested-make.exp | 2 +- contrib/bmake/unit-tests/jobs-error-nested.exp | 4 +- contrib/bmake/unit-tests/lint.mk | 4 +- contrib/bmake/unit-tests/moderrs.exp | 20 +- contrib/bmake/unit-tests/moderrs.mk | 6 +- contrib/bmake/unit-tests/opt-debug-file.mk | 4 +- contrib/bmake/unit-tests/opt-debug-jobs.mk | 4 +- contrib/bmake/unit-tests/opt-debug-lint.mk | 6 +- contrib/bmake/unit-tests/opt-debug-loud.mk | 6 +- contrib/bmake/unit-tests/opt-debug-var.mk | 4 +- contrib/bmake/unit-tests/parse-var.mk | 6 +- contrib/bmake/unit-tests/recursive.exp | 4 +- contrib/bmake/unit-tests/recursive.mk | 15 +- contrib/bmake/unit-tests/sh-dots.mk | 6 +- contrib/bmake/unit-tests/sh-leading-hyphen.exp | 2 +- contrib/bmake/unit-tests/shell-sh.mk | 4 +- contrib/bmake/unit-tests/unexport.mk | 4 +- contrib/bmake/unit-tests/var-eval-short.mk | 4 +- contrib/bmake/unit-tests/var-op-append.mk | 33 +- contrib/bmake/unit-tests/var-op-assign.mk | 4 +- contrib/bmake/unit-tests/var-op-default.mk | 8 +- contrib/bmake/unit-tests/var-op-expand.mk | 6 +- contrib/bmake/unit-tests/var-op-shell.mk | 20 +- contrib/bmake/unit-tests/var-readonly.exp | 3 + contrib/bmake/unit-tests/var-readonly.mk | 4 +- contrib/bmake/unit-tests/var-recursive.exp | 8 +- contrib/bmake/unit-tests/var-recursive.mk | 4 +- contrib/bmake/unit-tests/var-scope-cmdline.mk | 4 +- .../bmake/unit-tests/var-scope-local-legacy.exp | 2 +- contrib/bmake/unit-tests/var-scope-local-legacy.mk | 22 +- contrib/bmake/unit-tests/var-scope-local.exp | 4 +- contrib/bmake/unit-tests/var-scope-local.mk | 12 +- contrib/bmake/unit-tests/vardebug.exp | 20 +- contrib/bmake/unit-tests/vardebug.mk | 29 +- contrib/bmake/unit-tests/varmisc.exp | 5 +- contrib/bmake/unit-tests/varmisc.mk | 28 +- contrib/bmake/unit-tests/varmod-assign.exp | 32 + contrib/bmake/unit-tests/varmod-assign.mk | 71 ++- contrib/bmake/unit-tests/varmod-defined.exp | 2 +- contrib/bmake/unit-tests/varmod-defined.mk | 10 +- contrib/bmake/unit-tests/varmod-edge.exp | 2 +- contrib/bmake/unit-tests/varmod-edge.mk | 8 +- contrib/bmake/unit-tests/varmod-gmtime.mk | 15 +- contrib/bmake/unit-tests/varmod-ifelse.exp | 20 +- contrib/bmake/unit-tests/varmod-ifelse.mk | 36 +- contrib/bmake/unit-tests/varmod-indirect.mk | 24 +- contrib/bmake/unit-tests/varmod-l-name-to-value.mk | 4 +- contrib/bmake/unit-tests/varmod-localtime.mk | 4 +- contrib/bmake/unit-tests/varmod-loop-varname.mk | 4 +- contrib/bmake/unit-tests/varmod-loop.mk | 6 +- contrib/bmake/unit-tests/varmod-match-escape.mk | 20 +- contrib/bmake/unit-tests/varmod-match.exp | 33 +- contrib/bmake/unit-tests/varmod-match.mk | 317 ++++++---- contrib/bmake/unit-tests/varmod-mtime.exp | 16 +- contrib/bmake/unit-tests/varmod-mtime.mk | 45 +- contrib/bmake/unit-tests/varmod-order.exp | 6 +- contrib/bmake/unit-tests/varmod-range.exp | 21 +- contrib/bmake/unit-tests/varmod-range.mk | 26 +- contrib/bmake/unit-tests/varmod-subst-regex.mk | 57 +- contrib/bmake/unit-tests/varmod-subst.mk | 46 +- contrib/bmake/unit-tests/varmod-sysv.mk | 10 +- contrib/bmake/unit-tests/varmod-to-separator.mk | 4 +- contrib/bmake/unit-tests/varmod-undefined.mk | 6 +- contrib/bmake/unit-tests/varmod.mk | 6 +- contrib/bmake/unit-tests/varname-dot-shell.exp | 10 +- contrib/bmake/unit-tests/varname-dot-suffixes.exp | 20 +- contrib/bmake/unit-tests/varname-dot-suffixes.mk | 19 +- contrib/bmake/unit-tests/varname-empty.exp | 24 +- contrib/bmake/unit-tests/varname-empty.mk | 4 +- .../varname-make_print_var_on_error-jobs.mk | 4 +- contrib/bmake/unit-tests/varname.mk | 4 +- contrib/bmake/unit-tests/varparse-dynamic.mk | 4 +- contrib/bmake/unit-tests/varparse-errors.exp | 28 +- contrib/bmake/unit-tests/varparse-errors.mk | 8 +- contrib/bmake/unit-tests/varparse-mod.mk | 6 +- contrib/bmake/unit-tests/varparse-undef-partial.mk | 13 +- contrib/bmake/util.c | 96 ++- contrib/bmake/var.c | 696 +++++++++------------ usr.bin/bmake/Makefile.config | 2 +- usr.bin/bmake/config.h | 4 +- usr.bin/bmake/unit-tests/Makefile | 9 +- 184 files changed, 2585 insertions(+), 2176 deletions(-) diff --git a/contrib/bmake/ChangeLog b/contrib/bmake/ChangeLog index ec0be0f4027c..4bd41562fb30 100644 --- a/contrib/bmake/ChangeLog +++ b/contrib/bmake/ChangeLog @@ -1,3 +1,105 @@ +2024-01-08 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240108 + Merge with NetBSD make, pick up + o miscellaneous cleanups + +2024-01-06 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240106 + Merge with NetBSD make, pick up + o fix duplicate progname when reporting an unknown target + o unit tests for Cmd_Exec using temp file + +2024-01-05 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240105 + Merge with NetBSD make, pick up + o main.c: Cmd_Exec write cmd to a file if too big + avoid blowing commandline/env limits + +2024-01-02 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240101 + o util.c: flesh out more of strftime + * configure.in: add --with-bmake-strftime + it is not a full implementation but enough to pass all + the unit-tests. + * parse.c: LoadFile do not append \n to empty buffer. + +2023-12-30 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20231230 + Merge with NetBSD make, pick up + o simplify memory allocation for string buffers + o fix declared types of list nodes + o suff.c: clean up freeing of suffixes + o var.c: simplify debug message for the ':@var@...@' modifier + clean up variable handling + +2023-12-26 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20231226 + Merge with NetBSD make, pick up + o compat.c: ensure make's output is correctly ordered with that of + the target when not going to a tty + o main.c: check for shellPath whether to call Shell_Init() + +2023-12-24 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20231224 + Merge with NetBSD make, pick up + o compat.c: check for shellPath whether to call Shell_Init() + tweak the unit test to detect the bug thus fixed. + o make.1: do not claim .SHELL is only used by jobs mode. + +2023-12-22 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20231220 + Merge with NetBSD make, pick up + o str.c: speed up pattern matching in the ':M' modifier + o var.c: fix confusing debug logging when deleting a variable + use consistent debug messages style when ignoring variables + +2023-12-10 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20231210 + Merge with NetBSD make, pick up + o var.c: avoid segfault on empty :C match expression + explain in debug log why variable assignment is ignored. + +2023-12-08 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20231208 + Merge with NetBSD make, pick up + o var.c: ensure fromCmd is set correctly for variables set on + command line. + +2023-11-26 Simon J Gerraty + + * configure.in: disable generation of 'makefile' for + Darwin by default. + + * boot-strap: docuement --without-makefile + +2023-11-24 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20231124 + Merge with NetBSD make, pick up + o main.c: cleanup processing of -j + fix lint warning about strchr + o var.c: more accurate error message for invalid ':mtime' argument + cleanup :[...] modifier + avoid reading beyond substring when comparing + o unit-tests cover all cases of :mtime, test and explain exporting + of variables + o cleanup comments + +2023-09-17 Simon J Gerraty + + * bsd.after-import.mk (ECHO_TAG): FreeBSD no longer uses + $FreeBSD$ tag, so avoid adding it. + 2023-09-09 Simon J Gerraty * VERSION (_MAKE_VERSION): 20230909 diff --git a/contrib/bmake/README b/contrib/bmake/README index a782f6dfc5b5..bf59107db2d3 100644 --- a/contrib/bmake/README +++ b/contrib/bmake/README @@ -6,12 +6,12 @@ Since 1993 I have run it on AIX, BSDi, Darwin, FreeBSD, HP-UX, IRIX, Linux, Minix, OSF, Solaris, SunOS and even UTS. Others have run it on many more systems. -Currently each release is tested on NetBSD, FreeBSD, Solaris and Linux. +Currently each release is tested on Darwin, NetBSD, FreeBSD and Linux. Since 2003 bmake switched to a date based version (first was 20030714) which generally represents the date it was last merged with NetBSD's make. Since then, NetBSD's make is imported within a week of any -interesting changes, so that bmake tracks it very closely. +*interesting* changes, so that bmake tracks it very closely. Building ======== @@ -33,20 +33,27 @@ the GNU standard process of:: ./configure; make; make install +This will *not* work on Darwin or any other system with a case +insensitive filesystem. It depends on a generated ``makefile`` which +is disabled by default on Darwin. + To make much use of bmake you will need the bsd.*.mk macros or my portable *.mk macros which are included with bmake since 20121212 and separately available from -http://www.crufty.net/ftp/pub/sjg/mk.tar.gz -which will be links to the latest versions. +https://www.crufty.net/ftp/pub/sjg/mk.tar.gz +both that and +https://www.crufty.net/ftp/pub/sjg/bmake.tar.gz +will be links to the latest versions. Porting ======= If you encounter a system that bmake does not build or work on *out of the box*, I welcome patches. +Even a report of unit tests which fail is appreciated. If you can provide access to a suitable machine - even better. -More info can be found at http://www.crufty.net/help/sjg/bmake.htm +More info can be found at https://www.crufty.net/help/sjg/bmake.htm --sjg diff --git a/contrib/bmake/VERSION b/contrib/bmake/VERSION index 0cc67de7b22d..ca636f3ab1e2 100644 --- a/contrib/bmake/VERSION +++ b/contrib/bmake/VERSION @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20230909 +_MAKE_VERSION=20240108 diff --git a/contrib/bmake/arch.c b/contrib/bmake/arch.c index 6d2c6e0f1875..b90452149c99 100644 --- a/contrib/bmake/arch.c +++ b/contrib/bmake/arch.c @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.213 2023/02/14 21:08:00 rillig Exp $ */ +/* $NetBSD: arch.c,v 1.214 2023/11/19 22:50:11 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -147,7 +147,7 @@ struct ar_hdr { #include "dir.h" /* "@(#)arch.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: arch.c,v 1.213 2023/02/14 21:08:00 rillig Exp $"); +MAKE_RCSID("$NetBSD: arch.c,v 1.214 2023/11/19 22:50:11 rillig Exp $"); typedef struct List ArchList; typedef struct ListNode ArchListNode; @@ -253,7 +253,7 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *scope) FStr lib; /* Library-part of specification */ FStr mem; /* Member-part of specification */ char saveChar; /* Ending delimiter of member-name */ - bool expandLib; /* Whether the parsed lib contains variable + bool expandLib; /* Whether the parsed lib contains * expressions that need to be expanded */ spec = *pp; @@ -262,7 +262,7 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *scope) for (cp = lib.str; *cp != '(' && *cp != '\0';) { if (*cp == '$') { - /* Expand nested variable expressions. */ + /* Expand nested expressions. */ /* XXX: This code can probably be shortened. */ const char *nested_p = cp; FStr result; @@ -299,7 +299,7 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *scope) mem = FStr_InitRefer(cp); while (*cp != '\0' && *cp != ')' && !ch_isspace(*cp)) { if (*cp == '$') { - /* Expand nested variable expressions. */ + /* Expand nested expressions. */ /* * XXX: This code can probably be shortened. */ diff --git a/contrib/bmake/bmake.1 b/contrib/bmake/bmake.1 index a658eab6700e..55d910b3b204 100644 --- a/contrib/bmake/bmake.1 +++ b/contrib/bmake/bmake.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.371 2023/09/10 21:52:36 rillig Exp $ +.\" $NetBSD: make.1,v 1.372 2023/12/24 16:48:30 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd September 9, 2023 +.Dd December 24, 2023 .Dt BMAKE 1 .Os .Sh NAME @@ -2523,7 +2523,7 @@ set the read-only attribute on the global variables specified as sources. .It Ic .SHELL Sets the shell that .Nm -uses to execute commands in jobs mode. +uses to execute commands. The sources are a set of .Ar field\| Ns Cm \&= Ns Ar value pairs. diff --git a/contrib/bmake/bmake.cat1 b/contrib/bmake/bmake.cat1 index bdd48dda11db..61138ea0f2b6 100644 --- a/contrib/bmake/bmake.cat1 +++ b/contrib/bmake/bmake.cat1 @@ -1599,8 +1599,8 @@ BMAKE(1) FreeBSD General Commands Manual BMAKE(1) set the read-only attribute on the global variables specified as sources. - .SHELL Sets the shell that bmake uses to execute commands in jobs mode. - The sources are a set of field=value pairs. + .SHELL Sets the shell that bmake uses to execute commands. The sources + are a set of field=value pairs. name This is the minimal specification, used to select one of the built-in shell specs; sh, ksh, and csh. @@ -1759,4 +1759,4 @@ BMAKE(1) FreeBSD General Commands Manual BMAKE(1) attempt to suppress a cascade of unnecessary errors, can result in a seemingly unexplained `*** Error code 6' -FreeBSD 13.0 September 9, 2023 FreeBSD 13.0 +FreeBSD 13.0 December 24, 2023 FreeBSD 13.0 diff --git a/contrib/bmake/boot-strap b/contrib/bmake/boot-strap index f47f0c4fdecd..00fa04a0e08b 100755 --- a/contrib/bmake/boot-strap +++ b/contrib/bmake/boot-strap @@ -82,9 +82,23 @@ # # Possibly useful configure_args: # +# --without-makefile +# do not generate 'makefile'. +# +# 'makefile' is used to enable the classic +# './configure; make; make install' dance, but on +# systems with case insensitive filesystems it can lead +# to infinite recursion. +# +# It is disabled by default on Darwin, and Cygwin. +# # --without-meta # disable use of meta mode. # +# Even without filemon(9) meta mode is very useful +# both for debugging build and improving reliability of +# update builds. +# # --without-filemon # disable use of filemon(9) which is currently only # available for NetBSD and FreeBSD. @@ -119,7 +133,7 @@ # Simon J. Gerraty # RCSid: -# $Id: boot-strap,v 1.58 2023/06/27 21:02:19 sjg Exp $ +# $Id: boot-strap,v 1.59 2023/11/26 18:19:43 sjg Exp $ # # @(#) Copyright (c) 2001 Simon J. Gerraty # diff --git a/contrib/bmake/bsd.after-import.mk b/contrib/bmake/bsd.after-import.mk index fec42c9deeed..418caeaa58a6 100644 --- a/contrib/bmake/bsd.after-import.mk +++ b/contrib/bmake/bsd.after-import.mk @@ -1,4 +1,4 @@ -# $Id: bsd.after-import.mk,v 1.17 2021/10/22 06:31:32 sjg Exp $ +# $Id: bsd.after-import.mk,v 1.18 2023/09/18 05:29:23 sjg Exp $ # This makefile is for use when integrating bmake into a BSD build # system. Use this makefile after importing bmake. @@ -68,18 +68,25 @@ MAKEFILE_SED = sed -e '/^MACHINE/d' \ # These are the simple files we want to capture configured_files= config.h Makefile.config unit-tests/Makefile.config +# FreeBSD has dropped their tag with svn +.if ${HOST_OS:NFreeBSD} == "" +ECHO_TAG= : +.else +ECHO_TAG?= echo +.endif + after-import: bootstrap ${MAKEFILE} .for f in ${configured_files:M*.[ch]} @echo Capturing $f @mkdir -p ${${.CURDIR}/$f:L:H} - @(echo '/* $$${HOST_OS}$$ */'; cat ${HOST_OS}/$f) > ${.CURDIR}/$f + @(${ECHO_TAG} '/* $$${HOST_OS}$$ */'; cat ${HOST_OS}/$f) > ${.CURDIR}/$f .endfor .for f in ${configured_files:M*Makefile*} @echo Capturing $f @mkdir -p ${${.CURDIR}/$f:L:H} @(echo '# This is a generated file, do NOT edit!'; \ echo '# See ${_this:S,${SRCTOP}/,,}'; \ - echo '#'; echo '# $$${HOST_OS}$$'; echo; \ + echo '#'; ${ECHO_TAG} '# $$${HOST_OS}$$'; echo; \ echo 'SRCTOP?= $${.CURDIR:${${.CURDIR}/$f:L:H:S,${SRCTOP}/,,:C,[^/]+,H,g:S,/,:,g}}'; echo; \ ${MAKEFILE_SED} ${HOST_OS}/$f ) > ${.CURDIR}/$f .endfor @@ -89,7 +96,7 @@ _makefile: bootstrap ${MAKEFILE} @echo Generating ${.CURDIR}/Makefile @(echo '# This is a generated file, do NOT edit!'; \ echo '# See ${_this:S,${SRCTOP}/,,}'; \ - echo '#'; echo '# $$${HOST_OS}$$'; \ + echo '#'; ${ECHO_TAG} '# $$${HOST_OS}$$'; \ echo; echo 'SRCTOP?= $${.CURDIR:${.CURDIR:S,${SRCTOP}/,,:C,[^/]+,H,g:S,/,:,g}}'; \ echo; echo '# look here first for config.h'; \ echo 'CFLAGS+= -I$${.CURDIR}'; echo; \ @@ -115,7 +122,7 @@ _utmakefile: bootstrap ${MAKEFILE} @mkdir -p ${.CURDIR}/unit-tests @(echo '# This is a generated file, do NOT edit!'; \ echo '# See ${_this:S,${SRCTOP}/,,}'; \ - echo '#'; echo '# $$${HOST_OS}$$'; \ + echo '#'; ${ECHO_TAG} '# $$${HOST_OS}$$'; \ ${MAKEFILE_SED} \ -e '/^UNIT_TESTS/s,=.*,= $${srcdir},' \ ${BMAKE_SRC}/unit-tests/Makefile ) > ${.TARGET} diff --git a/contrib/bmake/buf.c b/contrib/bmake/buf.c index 845a68c46330..fdc6c8ec2b60 100644 --- a/contrib/bmake/buf.c +++ b/contrib/bmake/buf.c @@ -1,4 +1,4 @@ -/* $NetBSD: buf.c,v 1.56 2023/06/01 07:44:10 rillig Exp $ */ +/* $NetBSD: buf.c,v 1.57 2023/12/19 19:33:39 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -69,13 +69,13 @@ * SUCH DAMAGE. */ -/* Automatically-expanding null-terminated character buffers. */ +/* Automatically growing null-terminated buffers of characters. */ #include #include "make.h" /* "@(#)buf.c 8.1 (Berkeley) 6/6/93" */ -MAKE_RCSID("$NetBSD: buf.c,v 1.56 2023/06/01 07:44:10 rillig Exp $"); +MAKE_RCSID("$NetBSD: buf.c,v 1.57 2023/12/19 19:33:39 rillig Exp $"); /* Make space in the buffer for adding at least 16 more bytes. */ void diff --git a/contrib/bmake/buf.h b/contrib/bmake/buf.h index ccd7d513b211..c5e7d539de9e 100644 --- a/contrib/bmake/buf.h +++ b/contrib/bmake/buf.h @@ -1,4 +1,4 @@ -/* $NetBSD: buf.h,v 1.48 2023/06/01 07:44:10 rillig Exp $ */ +/* $NetBSD: buf.h,v 1.49 2023/12/19 19:33:39 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -96,7 +96,7 @@ Buf_Clear(Buffer *buf) buf->data[0] = '\0'; } -/* Buf_AddByte adds a single byte to a buffer. */ +/* Adds a single byte to a buffer. */ MAKE_INLINE void Buf_AddByte(Buffer *buf, char byte) { diff --git a/contrib/bmake/compat.c b/contrib/bmake/compat.c index 221eb64959e6..6f55880cbc54 100644 --- a/contrib/bmake/compat.c +++ b/contrib/bmake/compat.c @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.247 2023/05/04 22:31:17 sjg Exp $ */ +/* $NetBSD: compat.c,v 1.252 2024/01/05 23:22:06 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -94,7 +94,7 @@ #include "pathnames.h" /* "@(#)compat.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: compat.c,v 1.247 2023/05/04 22:31:17 sjg Exp $"); +MAKE_RCSID("$NetBSD: compat.c,v 1.252 2024/01/05 23:22:06 rillig Exp $"); static GNode *curTarg = NULL; static pid_t compatChild; @@ -110,10 +110,8 @@ CompatDeleteTarget(GNode *gn) if (gn != NULL && !GNode_IsPrecious(gn) && (gn->type & OP_PHONY) == 0) { const char *file = GNode_VarTarget(gn); - - if (!opts.noExecute && unlink_file(file) == 0) { + if (!opts.noExecute && unlink_file(file) == 0) Error("*** %s removed", file); - } } } @@ -132,14 +130,11 @@ CompatInterrupt(int signo) CompatDeleteTarget(curTarg); if (curTarg != NULL && !GNode_IsPrecious(curTarg)) { - /* - * Run .INTERRUPT only if hit with interrupt signal - */ + /* Run .INTERRUPT only if hit with interrupt signal. */ if (signo == SIGINT) { GNode *gn = Targ_FindNode(".INTERRUPT"); - if (gn != NULL) { + if (gn != NULL) Compat_Make(gn, gn); - } } } @@ -280,11 +275,9 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln) silent = !DEBUG(LOUD); else if (*cmd == '-') errCheck = false; - else if (*cmd == '+') { + else if (*cmd == '+') doIt = true; - if (shellName == NULL) /* we came here from jobs */ - Shell_Init(); - } else if (!ch_isspace(*cmd)) + else if (!ch_isspace(*cmd)) /* Ignore whitespace for compatibility with gnu make */ break; cmd++; @@ -292,37 +285,25 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln) while (ch_isspace(*cmd)) cmd++; - - /* - * If we did not end up with a command, just skip it. - */ if (cmd[0] == '\0') return true; useShell = UseShell(cmd); - /* - * Print the command before echoing if we're not supposed to be quiet - * for this one. We also print the command if -n given. - */ + if (!silent || !GNode_ShouldExecute(gn)) { printf("%s\n", cmd); fflush(stdout); } - /* - * If we're not supposed to execute any commands, this is as far as - * we go... - */ if (!doIt && !GNode_ShouldExecute(gn)) return true; DEBUG1(JOB, "Execute: '%s'\n", cmd); + if (useShell && shellPath == NULL) + Shell_Init(); /* we need shellPath */ + if (useShell) { - /* - * We need to pass the command off to the shell, typically - * because the command contains a "meta" character. - */ static const char *shargv[5]; /* The following work for any of the builtin shell specs. */ @@ -337,11 +318,6 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln) bp = NULL; mav = NULL; } else { - /* - * No meta-characters, so no need to exec a shell. Break the - * command into words to form an argument vector we can - * execute. - */ Words words = Str_Words(cmd, false); mav = words.words; bp = words.freeIt; @@ -380,24 +356,21 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln) meta_compat_parent(cpid); #endif - /* - * The child is off and running. Now all we can do is wait... - */ + /* The child is off and running. Now all we can do is wait... */ while ((retstat = wait(&reason)) != cpid) { if (retstat > 0) JobReapChild(retstat, reason, false); /* not ours? */ - if (retstat == -1 && errno != EINTR) { + if (retstat == -1 && errno != EINTR) break; - } } if (retstat < 0) Fatal("error in wait: %d: %s", retstat, strerror(errno)); if (WIFSTOPPED(reason)) { - status = WSTOPSIG(reason); /* stopped */ + status = WSTOPSIG(reason); } else if (WIFEXITED(reason)) { - status = WEXITSTATUS(reason); /* exited */ + status = WEXITSTATUS(reason); #if defined(USE_META) && defined(USE_FILEMON_ONCE) if (useMeta) meta_cmd_finish(NULL); @@ -408,7 +381,7 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln) printf("*** Error code %d", status); } } else { - status = WTERMSIG(reason); /* signaled */ + status = WTERMSIG(reason); printf("*** Signal %d", status); } @@ -439,6 +412,7 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln) printf(" (ignored)\n"); status = 0; } + fflush(stdout); } free(cmdStart); @@ -594,10 +568,6 @@ MakeUnmade(GNode *gn, GNode *pgn) gn->type |= OP_SILENT; if (Job_CheckCommands(gn, Fatal)) { - /* - * Our commands are ok, but we still have to worry about - * the -t flag. - */ if (!opts.touch || (gn->type & OP_MAKE)) { curTarg = gn; #ifdef USE_META @@ -781,7 +751,6 @@ Compat_MakeAll(GNodeList *targs) errorNode = gn; } - /* If the user has defined a .END target, run its commands. */ if (errorNode == NULL) { GNode *endNode = Targ_GetEndNode(); Compat_Make(endNode, endNode); diff --git a/contrib/bmake/cond.c b/contrib/bmake/cond.c index 4ed15ff26184..843abc9a92f8 100644 --- a/contrib/bmake/cond.c +++ b/contrib/bmake/cond.c @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.354 2023/08/11 04:56:31 rillig Exp $ */ +/* $NetBSD: cond.c,v 1.359 2023/12/29 12:59:43 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -81,8 +81,7 @@ * of one of the .if directives or the condition in a * ':?then:else' variable modifier. * - * Cond_EndFile - * At the end of reading a makefile, ensure that the + * Cond_EndFile At the end of reading a makefile, ensure that the * conditional directives are well-balanced. */ @@ -92,7 +91,7 @@ #include "dir.h" /* "@(#)cond.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: cond.c,v 1.354 2023/08/11 04:56:31 rillig Exp $"); +MAKE_RCSID("$NetBSD: cond.c,v 1.359 2023/12/29 12:59:43 rillig Exp $"); /* * Conditional expressions conform to this grammar: @@ -154,10 +153,10 @@ typedef struct CondParser { * expanded before it is evaluated, due to ease of implementation. * This means that at the point where the condition is evaluated, * make cannot know anymore whether the left-hand side had originally - * been a variable expression or a plain word. + * been an expression or a plain word. * * In conditional directives like '.if', the left-hand side must - * either be a variable expression, a quoted string or a number. + * either be an expression, a quoted string or a number. */ bool leftUnquotedOK; @@ -166,9 +165,7 @@ typedef struct CondParser { /* * Whether an error message has already been printed for this - * condition. The first available error message is usually the most - * specific one, therefore it makes sense to suppress the standard - * "Malformed conditional" message. + * condition. */ bool printedError; } CondParser; @@ -212,16 +209,16 @@ ParseWord(const char **pp, bool doEval) { const char *p = *pp; Buffer word; - int paren_depth; + int depth; - Buf_InitSize(&word, 16); + Buf_Init(&word); - paren_depth = 0; + depth = 0; for (;;) { char ch = *p; if (ch == '\0' || ch == ' ' || ch == '\t') break; - if ((ch == '&' || ch == '|') && paren_depth == 0) + if ((ch == '&' || ch == '|') && depth == 0) break; if (ch == '$') { VarEvalMode emode = doEval @@ -238,8 +235,8 @@ ParseWord(const char **pp, bool doEval) continue; } if (ch == '(') - paren_depth++; - else if (ch == ')' && --paren_depth < 0) + depth++; + else if (ch == ')' && --depth < 0) break; Buf_AddByte(&word, ch); p++; @@ -258,7 +255,7 @@ ParseFuncArg(CondParser *par, const char **pp, bool doEval, const char *func) const char *p = *pp; char *res; - p++; /* Skip opening '(' - verified by caller */ + p++; /* skip the '(' */ cpp_skip_hspace(&p); res = ParseWord(&p, doEval); cpp_skip_hspace(&p); @@ -383,7 +380,7 @@ is_separator(char ch) } /* - * In a quoted or unquoted string literal or a number, parse a variable + * In a quoted or unquoted string literal or a number, parse an * expression and add its value to the buffer. * * Return whether to continue parsing the leaf. @@ -429,7 +426,7 @@ CondParser_StringExpr(CondParser *par, const char *start, } /* - * Parse a string from a variable expression or an optionally quoted string, + * Parse a string from an expression or an optionally quoted string, * on the left-hand and right-hand sides of comparisons. * * Results: @@ -487,10 +484,6 @@ CondParser_Leaf(CondParser *par, bool doEval, bool unquotedOK, default: if (!unquotedOK && !quoted && *start != '$' && !ch_isdigit(*start)) { - /* - * The left-hand side must be quoted, - * a variable expression or a number. - */ str = FStr_InitRefer(NULL); goto return_str; } @@ -635,7 +628,6 @@ CondParser_Comparison(CondParser *par, bool doEval) CondParser_SkipWhitespace(par); if (!CondParser_ComparisonOp(par, &op)) { - /* Unknown operator, compare against an empty string or 0. */ t = ToToken(doEval && EvalTruthy(par, lhs.str, lhsQuoted)); goto done_lhs; } @@ -667,19 +659,19 @@ done_lhs: static bool CondParser_FuncCallEmpty(CondParser *par, bool doEval, Token *out_token) { - const char *cp = par->p; + const char *p = par->p; Token tok; FStr val; - if (!skip_string(&cp, "empty")) + if (!skip_string(&p, "empty")) return false; - cpp_skip_whitespace(&cp); - if (*cp != '(') + cpp_skip_whitespace(&p); + if (*p != '(') return false; - cp--; /* Make cp[1] point to the '('. */ - val = Var_Parse(&cp, SCOPE_CMDLINE, + p--; /* Make p[1] point to the '('. */ + val = Var_Parse(&p, SCOPE_CMDLINE, doEval ? VARE_WANTRES : VARE_PARSE_ONLY); /* TODO: handle errors */ @@ -692,7 +684,7 @@ CondParser_FuncCallEmpty(CondParser *par, bool doEval, Token *out_token) FStr_Done(&val); *out_token = tok; - par->p = cp; + par->p = p; return true; } @@ -734,7 +726,7 @@ CondParser_FuncCall(CondParser *par, bool doEval, Token *out_token) /* * Parse a comparison that neither starts with '"' nor '$', such as the * unusual 'bare == right' or '3 == ${VAR}', or a simple leaf without - * operator, which is a number, a variable expression or a string literal. + * operator, which is a number, an expression or a string literal. * * TODO: Can this be merged into CondParser_Comparison? */ @@ -743,37 +735,36 @@ CondParser_ComparisonOrLeaf(CondParser *par, bool doEval) { Token t; char *arg; - const char *cp; + const char *p; - /* Push anything numeric through the compare expression */ - cp = par->p; - if (ch_isdigit(cp[0]) || cp[0] == '-' || cp[0] == '+') + p = par->p; + if (ch_isdigit(p[0]) || p[0] == '-' || p[0] == '+') return CondParser_Comparison(par, doEval); /* - * Most likely we have a naked token to apply the default function to. - * However ".if a == b" gets here when the "a" is unquoted and doesn't - * start with a '$'. This surprises people. + * Most likely we have a bare word to apply the default function to. + * However, ".if a == b" gets here when the "a" is unquoted and + * doesn't start with a '$'. This surprises people. * If what follows the function argument is a '=' or '!' then the * syntax would be invalid if we did "defined(a)" - so instead treat * as an expression. */ /* - * XXX: In edge cases, a variable expression may be evaluated twice, + * XXX: In edge cases, an expression may be evaluated twice, * see cond-token-plain.mk, keyword 'twice'. */ *** 11098 LINES SKIPPED *** From nobody Sat Jan 10 21:33:58 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2b1nCsz6MxTS for ; Sat, 10 Jan 2026 21:33:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpX2Z5xbFz3QgP for ; Sat, 10 Jan 2026 21:33:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M1Pv4erD+D6LciBZo4iL8uPKdzfDGLE+8JCGnek1YhU=; b=fY9pyxmlc2CUWbYBckV+Ov84C6xDnC/Vog91qUBWv+DEUwPtW1TblPegtNxGnrN9XMFOQe T3b0QyiR50AFTOW1TKHqUd0BIb0EIRonVy5QFXZVFizaCVecJ4wHLp1kAYZkAWcGa30/6j ai+vQixjFrGiG1cKOFzChKdNT9d+B8RhbylUki1qMv+7pg49z2sYiCQZiEhwps34T3kITu n0AzNJ5HODyiEFFfbPCIUraN521vlpFCezwL/FA4znM+ucAwc9eADmWBEO39XSSTGzKDEG al2zOp84GMr8NqonRkTYL3J0E4NeeGlOZSoa6U0ALcVkX54XnTiR5eRgszeQOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M1Pv4erD+D6LciBZo4iL8uPKdzfDGLE+8JCGnek1YhU=; b=vNAoVekukIYqcUD3+NntmXe7biqTCDZxltWo3khXFOepJr/gqq0ObCw8/u/hRvbwDQitK1 viJ2Oysdmub4NWKMRqEgqBnhhyKuQAvxglHSe/ZDmQsITk2jcYZbNWTcpt2KN/vjIhh2oJ v99PhNfUzFlabHTk2hpXQR7K/Vo4M33wp7znHYXflSZI1lR3uiAQLdHGfqtGR1GIlCLtLm jmwCN725uLbpD0LpGmAzYsO2e2PfwbdCMqkY2WMWjQRXiw5Ke7epq7jMrkoNuotBBydNpM 0RlIdHst8bafF63MVrxZDmrJ7Exf8C8EefnYIcLON1FsIwD7CwrZd+TT4DG4yw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768080838; a=rsa-sha256; cv=none; b=EDmav5DTf+sD5elppklAMY6BwXOgrxsst7mdDzsfuZbzfbp2+QkRtp98815a0FTOnD3wRO g8UJPJUSbekrHEZ6oEb+AFZvk1EZRS6SuR7j+/vuw580LTb/AsU44EW5sBB8JajbTPzaL1 wZBxSNl2NTXpymdo7eEmMmRy0XdlKcbeKs1d8E6IZVDNKNDeG0XwODRuChbf2fi/esFpkC w9A0Jrujq4LUZeTbrhaHec7YZT/i5TPom/qBbMBiz2pdE816FF1V2VdaYfo1PYF/Wastea 46IH7fRODDHw/DyJYtgliF93ZzpJLoufAZ5O1D7NHf/pvsCYX04b4nxyjYFXcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2Z5RXYz1BVn for ; Sat, 10 Jan 2026 21:33:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25e92 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 21:33:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Simon J. Gerraty Subject: git: 72f01a763131 - stable/14 - Merge bmake-20240309 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 72f01a763131bfba351beaa0786bd910d53ca589 Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 21:33:58 +0000 Message-Id: <6962c5c6.25e92.7ba30a5a@gitrepo.freebsd.org> The branch stable/14 has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=72f01a763131bfba351beaa0786bd910d53ca589 commit 72f01a763131bfba351beaa0786bd910d53ca589 Author: Simon J. Gerraty AuthorDate: 2024-03-14 04:54:47 +0000 Commit: Simon J. Gerraty CommitDate: 2026-01-10 21:33:11 +0000 Merge bmake-20240309 Merge commit '368b06ce6b0135d6de13f7265f6dcbaeb791b3bb' (cherry picked from commit c59c3bf34db360695f07735bebc76a768cac5afc) --- contrib/bmake/ChangeLog | 57 + contrib/bmake/Makefile | 7 +- contrib/bmake/VERSION | 2 +- contrib/bmake/arch.c | 8 +- contrib/bmake/bmake.1 | 22 +- contrib/bmake/bmake.cat1 | 2564 +++++++++----------------- contrib/bmake/boot-strap | 17 +- contrib/bmake/compat.c | 8 +- contrib/bmake/cond.c | 66 +- contrib/bmake/config.h.in | 3 + contrib/bmake/configure | 24 +- contrib/bmake/configure.in | 5 +- contrib/bmake/for.c | 6 +- contrib/bmake/import.sh | 2 + contrib/bmake/install-sh | 4 +- contrib/bmake/job.c | 8 +- contrib/bmake/main.c | 39 +- contrib/bmake/make-conf.h | 50 +- contrib/bmake/make.1 | 22 +- contrib/bmake/make.h | 5 +- contrib/bmake/mk/ChangeLog | 80 + contrib/bmake/mk/FILES | 2 + contrib/bmake/mk/auto.dep.mk | 6 +- contrib/bmake/mk/auto.obj.mk | 4 +- contrib/bmake/mk/autoconf.mk | 21 +- contrib/bmake/mk/autodep.mk | 91 +- contrib/bmake/mk/cc-wrap.mk | 4 +- contrib/bmake/mk/ccm.dep.mk | 60 + contrib/bmake/mk/compiler.mk | 6 +- contrib/bmake/mk/cython.mk | 4 +- contrib/bmake/mk/dep.mk | 19 +- contrib/bmake/mk/dirdeps-cache-update.mk | 4 +- contrib/bmake/mk/dirdeps-options.mk | 4 +- contrib/bmake/mk/dirdeps-targets.mk | 7 +- contrib/bmake/mk/doc.mk | 9 +- contrib/bmake/mk/dpadd.mk | 6 +- contrib/bmake/mk/files.mk | 4 +- contrib/bmake/mk/host-target.mk | 16 +- contrib/bmake/mk/inc.mk | 4 +- contrib/bmake/mk/init.mk | 29 +- contrib/bmake/mk/install-mk | 4 +- contrib/bmake/mk/install-new.mk | 4 +- contrib/bmake/mk/install-sh | 4 +- contrib/bmake/mk/java.mk | 3 +- contrib/bmake/mk/jobs.mk | 4 +- contrib/bmake/mk/ldorder.mk | 4 +- contrib/bmake/mk/lib.mk | 28 +- contrib/bmake/mk/libnames.mk | 4 +- contrib/bmake/mk/libs.mk | 4 +- contrib/bmake/mk/links.mk | 4 +- contrib/bmake/mk/man.mk | 22 +- contrib/bmake/mk/manifest.mk | 4 +- contrib/bmake/mk/meta.autodep.mk | 14 +- contrib/bmake/mk/meta.stage.mk | 6 +- contrib/bmake/mk/meta.subdir.mk | 4 +- contrib/bmake/mk/meta.sys.mk | 12 +- contrib/bmake/mk/meta2deps.py | 13 +- contrib/bmake/mk/meta2deps.sh | 4 +- contrib/bmake/mk/mkopt.sh | 4 +- contrib/bmake/mk/newlog.sh | 4 +- contrib/bmake/mk/obj.mk | 11 +- contrib/bmake/mk/options.mk | 4 +- contrib/bmake/mk/own.mk | 30 +- contrib/bmake/mk/posix.mk | 4 +- contrib/bmake/mk/prlist.mk | 4 +- contrib/bmake/mk/prog.mk | 46 +- contrib/bmake/mk/progs.mk | 4 +- contrib/bmake/mk/rst2htm.mk | 4 +- contrib/bmake/mk/scripts.mk | 4 +- contrib/bmake/mk/srctop.mk | 4 +- contrib/bmake/mk/stage-install.sh | 4 +- contrib/bmake/mk/subdir.mk | 131 +- contrib/bmake/mk/suffixes.mk | 195 ++ contrib/bmake/mk/sys.clean-env.mk | 4 +- contrib/bmake/mk/sys.debug.mk | 4 +- contrib/bmake/mk/sys.dependfile.mk | 4 +- contrib/bmake/mk/sys.dirdeps.mk | 9 +- contrib/bmake/mk/sys.mk | 19 +- contrib/bmake/mk/sys.vars.mk | 4 +- contrib/bmake/mk/sys/Generic.mk | 182 +- contrib/bmake/mk/target-flags.mk | 4 +- contrib/bmake/mk/warnings.mk | 4 +- contrib/bmake/mk/whats.mk | 4 +- contrib/bmake/mk/yacc.mk | 4 +- contrib/bmake/parse.c | 22 +- contrib/bmake/suff.c | 8 +- contrib/bmake/targ.c | 5 +- contrib/bmake/unit-tests/Makefile | 11 +- contrib/bmake/unit-tests/var-scope-local.exp | 14 +- contrib/bmake/unit-tests/var-scope-local.mk | 19 +- contrib/bmake/unit-tests/varmod-indirect.mk | 28 +- contrib/bmake/unit-tests/varmod.exp | 10 +- contrib/bmake/unit-tests/varmod.mk | 5 +- contrib/bmake/var.c | 75 +- usr.bin/bmake/Makefile | 2 +- usr.bin/bmake/Makefile.config | 2 +- usr.bin/bmake/config.h | 7 +- usr.bin/bmake/unit-tests/Makefile | 11 +- 98 files changed, 1955 insertions(+), 2400 deletions(-) diff --git a/contrib/bmake/ChangeLog b/contrib/bmake/ChangeLog index 4bd41562fb30..fc1da62fbe54 100644 --- a/contrib/bmake/ChangeLog +++ b/contrib/bmake/ChangeLog @@ -1,3 +1,60 @@ +2024-03-10 Simon J Gerraty + + * boot-strap: tests can take a long time; use a cookie to + skip them if bmake has not been updated since tests last + ran successfully. + + * Makefile: Cygwin handles MANTARGET man + + * unit-tests/Makefile: set BROKEN_TESTS for Cygwin + +2024-03-09 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240309 + Merge with NetBSD make, pick up + o set .ERROR_EXIT to the exit status of .ERROR_TARGET + this allows a .ERROR target to ignore the case of + .ERROR_EXIT==6 which just means that the build actually + failed somewhere else. + +2024-03-04 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240303 + + * var.c: on IRIX we need both inttypes.h and stdint.h + +2024-03-01 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240301 + Merge with NetBSD make, pick up + o export variables with value from target scope + when appropriate. + +2024-02-12 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240212 + Merge with NetBSD make, pick up + o remove unneeded conditional-compilation toggles + INCLUDES, LIBRARIES, POSIX, SYSVINCLUDE, SYSVVARSUB, + GMAKEEXPORT NO_REGEX and SUNSHCMD + + * configure.in: add check for regex.h + + * var.c: replace use of NO_REGEX with HAVE_REGEX_H + +2024-02-04 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240204 + Merge with NetBSD make, pick up + o var.c: fix some lint (-dL) mode parsing issues + +2024-02-02 Simon J Gerraty + + * VERSION: (_MAKE_VERSION): 20240202 + Merge with NetBSD make, pick up + o make.1: note that arg to :D and :U can be empty + o var.c: $$ is not a parse error when .MAKE.SAVE_DOLLARS=no + 2024-01-08 Simon J Gerraty * VERSION (_MAKE_VERSION): 20240108 diff --git a/contrib/bmake/Makefile b/contrib/bmake/Makefile index 22e92b4da9ac..3332dcdeaf2d 100644 --- a/contrib/bmake/Makefile +++ b/contrib/bmake/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.125 2023/05/17 00:15:46 sjg Exp $ +# $Id: Makefile,v 1.126 2024/03/10 17:46:44 sjg Exp $ PROG= bmake @@ -90,9 +90,8 @@ OS := ${.MAKE.OS:U${uname -s:L:sh}} # are we 4.4BSD ? isBSD44:=${BSD44_LIST:M${OS}} -.if ${isBSD44} == "" && ${OS:NDarwin:NLinux} != "" -MANTARGET= cat -INSTALL?=${srcdir}/install-sh +.if ${isBSD44} == "" && ${OS:NCYGWIN*:NDarwin:NLinux} != "" +MANTARGET?= cat .if ${MACHINE} == "sun386" # even I don't have one of these anymore :-) CFLAGS+= -DPORTAR diff --git a/contrib/bmake/VERSION b/contrib/bmake/VERSION index ca636f3ab1e2..5d6ca326700a 100644 --- a/contrib/bmake/VERSION +++ b/contrib/bmake/VERSION @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20240108 +_MAKE_VERSION=20240309 diff --git a/contrib/bmake/arch.c b/contrib/bmake/arch.c index b90452149c99..caec2e148690 100644 --- a/contrib/bmake/arch.c +++ b/contrib/bmake/arch.c @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.214 2023/11/19 22:50:11 rillig Exp $ */ +/* $NetBSD: arch.c,v 1.215 2024/02/07 06:43:02 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -147,7 +147,7 @@ struct ar_hdr { #include "dir.h" /* "@(#)arch.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: arch.c,v 1.214 2023/11/19 22:50:11 rillig Exp $"); +MAKE_RCSID("$NetBSD: arch.c,v 1.215 2024/02/07 06:43:02 rillig Exp $"); typedef struct List ArchList; typedef struct ListNode ArchListNode; @@ -1026,11 +1026,7 @@ Arch_FindLib(GNode *gn, SearchPath *path) gn->path = Dir_FindFile(libName, path); free(libName); -#ifdef LIBRARIES Var_Set(gn, TARGET, gn->name); -#else - Var_Set(gn, TARGET, GNode_Path(gn)); -#endif } /* ARGSUSED */ diff --git a/contrib/bmake/bmake.1 b/contrib/bmake/bmake.1 index 55d910b3b204..d4e937424286 100644 --- a/contrib/bmake/bmake.1 +++ b/contrib/bmake/bmake.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.372 2023/12/24 16:48:30 sjg Exp $ +.\" $NetBSD: make.1,v 1.375 2024/03/10 02:53:37 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd December 24, 2023 +.Dd March 9, 2024 .Dt BMAKE 1 .Os .Sh NAME @@ -879,6 +879,9 @@ Is used in error handling, see .It Va .ERROR_CWD Is used in error handling, see .Va MAKE_PRINT_VAR_ON_ERROR . +.It Va .ERROR_EXIT +Is used in error handling, see +.Va MAKE_PRINT_VAR_ON_ERROR . .It Va .ERROR_META_FILE Is used in error handling in .Dq meta @@ -1185,6 +1188,8 @@ When stops due to an error, it sets .Sq Va .ERROR_TARGET to the name of the target that failed, +.Sq Va .ERROR_EXIT +to the exit status of the failed target, .Sq Va .ERROR_CMD to the commands of the failed target, and in @@ -1775,8 +1780,9 @@ modifier which is later referenced using the index values from .Ql :range . .It Cm \&:U\| Ns Ar newval If the variable is undefined, +the optional .Ar newval -is the value. +(which may be empty) is the value. If the variable is defined, the existing value is returned. This is another ODE make feature. It is handy for setting per-target CFLAGS for instance: @@ -1786,7 +1792,7 @@ If a value is only required if the variable is undefined, use: .It Cm \&:D\| Ns Ar newval If the variable is defined, .Ar newval -is the value. +(which may be empty) is the value. .It Cm \&:L The name of the variable is the value. .It Cm \&:P @@ -2405,11 +2411,9 @@ Any command lines attached to this target are executed after everything else is done successfully. .It Ic .ERROR Any command lines attached to this target are executed when another target fails. -The -.Va .ERROR_TARGET -variable is set to the target that failed. -See also -.Va MAKE_PRINT_VAR_ON_ERROR . +See +.Va MAKE_PRINT_VAR_ON_ERROR +for the variables that will be set. .It Ic .IGNORE Mark each of the sources with the .Ic .IGNORE diff --git a/contrib/bmake/bmake.cat1 b/contrib/bmake/bmake.cat1 index 61138ea0f2b6..7c50930807f4 100644 --- a/contrib/bmake/bmake.cat1 +++ b/contrib/bmake/bmake.cat1 @@ -1,1762 +1,924 @@ -BMAKE(1) FreeBSD General Commands Manual BMAKE(1) +is a program designed to simplify the maintenance of other pro- +grams. Its input is a list of specifications as to the files +upon which programs and other files depend. If no option is +given, tries to open then in order to find the specifications. +If the file exists, it is read, see This manual page is intended +as a reference document only. For a more thorough description of +and makefiles, please refer to (from 1993). prepends the con- +tents of the environment variable to the command line arguments +before parsing them. The options are as follows: Try to be back- +wards compatible by executing a single shell per command and by +making the sources of a dependency line in sequence. Change to +before reading the makefiles or doing anything else. If multiple +options are specified, each is interpreted relative to the previ- +ous one: is equivalent to Define to be 1, in the global scope. +Turn on debugging, and specify which portions of are to print de- +bugging information. Unless the flags are preceded by they are +added to the environment variable and are passed on to any child +make processes. By default, debugging information is printed to +standard error, but this can be changed using the debugging flag. +The debugging output is always unbuffered; in addition, if debug- +ging is enabled but debugging output is not directed to standard +output, the standard output is line buffered. The available are: +Print all possible debugging information; equivalent to specify- +ing all of the debugging flags. Print debugging information +about archive searching and caching. Print debugging information +about the current working directory. Print debugging information +about conditional evaluation. Print debugging information about +directory searching and caching. Print debugging information +about failed commands and targets. Specify where debugging out- +put is written. This must be the last flag, because it consumes +the remainder of the argument. If the character immediately af- +ter the flag is the file is opened in append mode; otherwise the +file is overwritten. If the file name is or debugging output is +written to the standard output or standard error output respec- +tively (and the option has no effect). Otherwise, the output is +written to the named file. If the file name ends with the is re- +placed by the pid. Print debugging information about loop evalu- +ation. Print the input graph before making anything. Print the +input graph after making everything, or before exiting on error. +Print the input graph before exiting on error. Print debugging +information about hash table operations. Print debugging infor- +mation about running multiple shells. Turn on lint checks. This +throws errors for variable assignments that do not parse cor- +rectly, at the time of assignment, so the file and line number +are available. Print commands in Makefiles regardless of whether +or not they are prefixed by or other flags. Also known as behav- +ior. Print debugging information about mode decisions about tar- +gets. Print debugging information about making targets, includ- +ing modification dates. Don't delete the temporary command +scripts created when running commands. These temporary scripts +are created in the directory referred to by the environment vari- +able, or in if is unset or set to the empty string. The tempo- +rary scripts are created by and have names of the form This can +create many files in or so use with care. Print debugging infor- +mation about makefile parsing. Print debugging information about +suffix-transformation rules. Print debugging information about +target list maintenance. Force the option to print raw values of +variables, overriding the default behavior set via Print debug- +ging information about variable assignment and expansion. Run +shell commands with so the actual commands are printed as they +are executed. Let environment variables override global vari- +ables within makefiles. Specify a makefile to read instead of +the default or If is standard input is read. Multiple makefiles +may be specified, and are read in the order specified. Specify a +directory in which to search for makefiles and included make- +files. The system makefile directory (or directories, see the +option) is automatically included as part of this list. Ignore +non-zero exit of shell commands in the makefile. Equivalent to +specifying before each command line in the makefile. This option +should be specified by the user. When the option is in use in a +recursive build, this option is passed by a make to child makes +to allow all the make processes in the build to cooperate to +avoid overloading the system. Specify the maximum number of jobs +that may have running at any one time. If is a floating point +number, or ends with then the value is multiplied by the number +of CPUs reported online by The value of is saved in Turns compat- +ibility mode off, unless the option is also specified. When com- +patibility mode is off, all commands associated with a target are +executed in a single shell invocation as opposed to the tradi- +tional one shell invocation per line. This can break traditional +scripts which change directories on each command invocation and +then expect to start with a fresh environment on the next line. +It is more efficient to correct the scripts rather than turn +backwards compatibility on. A job token pool with tokens is used +to control the total number of jobs running. Each instance of +will wait for a token from the pool before running a new job. +Continue processing after errors are encountered, but only on +those targets that do not depend on the target whose creation +caused the error. Specify a directory in which to search for and +makefiles included via the include statement. The option can be +used multiple times to form a search path. This path overrides +the default system include path Furthermore, the system include +path is appended to the search path used for include statements +(see the option). The system include path can be referenced via +the read-only variable If a directory name in the argument (or +the environment variable) starts with the string searches for the +specified file or directory named in the remaining part of the +argument string. The search starts with the current directory +and then works upward towards the root of the file system. If +the search is successful, the resulting directory replaces the +specification in the argument. This feature allows to easily +search in the current source tree for customized files (e.g., by +using as an argument). Display the commands that would have been +executed, but do not actually execute them unless the target de- +pends on the special source (see below) or the command is pre- +fixed with Display the commands that would have been executed, +but do not actually execute any of them; useful for debugging +top-level makefiles without descending into subdirectories. Do +not execute any commands, instead exit 0 if the specified targets +are up to date, and 1 otherwise. Do not use the built-in rules +specified in the system makefile. Stop processing if an error is +encountered. This is the default behavior and the opposite of Do +not echo any commands as they are executed. Equivalent to speci- +fying before each command line in the makefile. When used with +the flag, append a trace record to for each job started and com- +pleted. Rather than re-building a target as specified in the +makefile, create it or update its modification time to make it +appear up-to-date. Print the value of Do not build any targets. +Multiple instances of this option may be specified; the variables +are printed one per line, with a blank line for each null or un- +defined variable. The value printed is extracted from the global +scope after all makefiles have been read. By default, the raw +variable contents (which may include additional unexpanded vari- +able references) are shown. If contains a it is not interpreted +as a variable name but rather as an expression. Its value is ex- +panded before printing. The value is also expanded before print- +ing if is set to true and the option has not been used to over- +ride it. Note that loop-local and target-local variables, as +well as values taken temporarily by global variables during make- +file processing, are not accessible via this option. The debug +mode can be used to see these at the cost of generating substan- +tial extraneous output. Like but all printed variables are al- +ways expanded to their complete value. The last occurrence of or +decides whether all variables are expanded or not. Treat any +warnings during makefile parsing as errors. Print entering and +leaving directory messages, pre and post processing. Don't ex- +port variables passed on the command line to the environment in- +dividually. Variables passed on the command line are still ex- +ported via the environment variable. This option may be useful +on systems which have a small limit on the size of command argu- +ments. Set the value of the variable to Normally, all values +passed on the command line are also exported to sub-makes in the +environment. The flag disables this behavior. Variable assign- +ments should follow options for POSIX compatibility but no order- +ing is enforced. There are several different types of lines in a +makefile: dependency specifications, shell commands, variable as- +signments, include statements, conditional directives, for loops, +other directives, and comments. Lines may be continued from one +line to the next by ending them with a backslash The trailing +newline character and initial whitespace on the following line +are compressed into a single space. Dependency lines consist of +one or more targets, an operator, and zero or more sources. This +creates a relationship where the targets on the sources and are +customarily created from them. A target is considered out of +date if it does not exist, or if its modification time is less +than that of any of its sources. An out-of-date target is re- +created, but not until all sources have been examined and them- +selves re-created as needed. Three operators may be used: Many +dependency lines may name this target but only one may have at- +tached shell commands. All sources named in all dependency lines +are considered together, and if needed the attached shell com- +mands are run to create or re-create the target. If is inter- +rupted, the target is removed. The same, but the target is al- +ways re-created whether or not it is out of date. Any dependency +line may have attached shell commands, but each one is handled +independently: its sources are considered and the attached shell +commands are run if the target is out of date with respect to +(only) those sources. Thus, different groups of the attached +shell commands may be run depending on the circumstances. Fur- +thermore, unlike for dependency lines with no sources, the at- +tached shell commands are always run. Also unlike the target is +not removed if is interrupted. All dependency lines mentioning a +particular target must use the same operator. Targets and +sources may contain the shell wildcard values and The values and +may only be used as part of the final component of the target or +source, and only match existing files. The value need not neces- +sarily be used to describe existing files. Expansion is in di- +rectory order, not alphabetically as done in the shell. Each +target may have associated with it one or more lines of shell +commands, normally used to create the target. Each of the lines +in this script be preceded by a tab. (For historical reasons, +spaces are not accepted.) While targets can occur in many depen- +dency lines if desired, by default only one of these rules may be +followed by a creation script. If the operator is used, however, +all rules may include scripts, and the respective scripts are ex- +ecuted in the order found. Each line is treated as a separate +shell command, unless the end of line is escaped with a backslash +in which case that line and the next are combined. If the first +characters of the command are any combination of or the command +is treated specially. causes the command not to be echoed before +it is executed. causes the command to be executed even when is +given. This is similar to the effect of the special source, ex- +cept that the effect can be limited to a single line of a script. +in compatibility mode causes any non-zero exit status of the com- +mand line to be ignored. When is run in jobs mode with the en- +tire script for the target is fed to a single instance of the +shell. In compatibility (non-jobs) mode, each command is run in +a separate process. If the command contains any shell meta char- +acters it is passed to the shell; otherwise attempts direct exe- +cution. If a line starts with and the shell has ErrCtl enabled, +failure of the command line is ignored as in compatibility mode. +Otherwise affects the entire job; the script stops at the first +command line that fails, but the target is not deemed to have +failed. Makefiles should be written so that the mode of opera- +tion does not change their behavior. For example, any command +which uses or without the intention of changing the directory for +subsequent commands should be put in parentheses so it executes +in a subshell. To force the use of a single shell, escape the +line breaks so as to make the whole script one command. For ex- +ample: avoid-chdir-side-effects: @echo "Building $@ in +$$(pwd)" @(cd ${.CURDIR} && ${MAKE} $@) @echo +"Back in $$(pwd)" + +ensure-one-shell-regardless-of-mode: @echo "Building $@ +in $$(pwd)"; \ (cd ${.CURDIR} && ${MAKE} $@); \ + echo "Back in $$(pwd)" Since changes the current working +directory to before executing any targets, each child process +starts with that as its current working directory. Variables in +make behave much like macros in the C preprocessor. Variable as- +signments have the form where: is a single-word variable name, +consisting, by tradition, of all upper-case letters, is one of +the variable assignment operators described below, and is inter- +preted according to the variable assignment operator. Whitespace +around and is discarded. The five operators that assign values +to variables are: Assign the value to the variable. Any previous +value is overwritten. Append the value to the current value of +the variable, separating them by a single space. Assign the +value to the variable if it is not already defined. Expand the +value, then assign it to the variable. References to undefined +variables are expanded. This can cause problems when variable +modifiers are used. Expand the value and pass it to the shell +for execution, then assign the output from the child's standard +output to the variable. Any newlines in the result are replaced +with spaces. In most contexts where variables are expanded, ex- +pands to a single dollar sign. In other contexts (most variable +modifiers, string literals in conditions), expands to a single +dollar sign. References to variables have the form or If the +variable name consists of only a single character and the expres- +sion contains no modifiers, the surrounding curly braces or +parentheses are not required. This shorter form is not recom- +mended. If the variable name contains a dollar, the name itself +is expanded first. This allows almost arbitrary variable names, +however names containing dollar, braces, parentheses or white- +space are really best avoided. If the result of expanding a +nested variable expression contains a dollar sign the result is +subject to further expansion. Variable substitution occurs at +four distinct times, depending on where the variable is being +used. Variables in dependency lines are expanded as the line is +read. Variables in conditionals are expanded individually, but +only as far as necessary to determine the result of the condi- +tional. Variables in shell commands are expanded when the shell +command is executed. loop index variables are expanded on each +loop iteration. Note that other variables are not expanded when +composing the body of a loop, so the following example code: .for +i in 1 2 3 a+= ${i} j= ${i} b+= ${j} .endfor + +all: @echo ${a} @echo ${b} prints: 1 2 3 3 3 3 +After the loop is executed: contains which expands to contains +which expands to contains which expands to and further to The +four different classes of variables (in order of increasing +precedence) are: Variables defined as part of environment. Vari- +ables defined in the makefile or in included makefiles. Vari- +ables defined as part of the command line. Variables that are +defined specific to a certain target. Local variables can be set +on a dependency line, unless is set to The rest of the line +(which already has had global variables expanded) is the variable +value. For example: COMPILER_WRAPPERS= ccache distcc icecc + +${OBJS}: .MAKE.META.CMP_FILTER=${COMPILER_WRAPPERS:S,^,N,} Only +the targets are impacted by that filter (in mode) and simply en- +abling/disabling any of the compiler wrappers does not render all +of those targets out-of-date. target-local variable assignments +behave differently in that; Only appends to a previous local as- +signment for the same target and variable. Is redundant with re- +spect to global variables, which have already been expanded. The +seven built-in local variables are: The list of all sources for +this target; also known as The name of the archive file; also +known as In suffix-transformation rules, the name/path of the +source from which the target is to be transformed (the source); +also known as It is not defined in explicit rules. The name of +the archive member; also known as The list of sources for this +target that were deemed out-of-date; also known as The name of +the target with suffix (if declared in removed; also known as The +name of the target; also known as For compatibility with other +makes this is an alias for in archive member rules. The shorter +forms and are permitted for backward compatibility with histori- +cal makefiles and legacy POSIX make and are not recommended. +Variants of these variables with the punctuation followed immedi- +ately by or e.g. are legacy forms equivalent to using the and +modifiers. These forms are accepted for compatibility with make- +files and POSIX but are not recommended. Four of the local vari- +ables may be used in sources on dependency lines because they ex- +pand to the proper value for each target on the line. These +variables are and In addition, sets or knows about the following +variables: The list of all targets encountered in the makefiles. +If evaluated during makefile parsing, lists only those targets +encountered thus far. A path to the directory where was exe- +cuted. Refer to the description of for more details. Is used in +error handling, see Is used in error handling, see Is used in er- +ror handling, see Is used in error handling in mode, see Is used +in error handling, see The directory of the file this makefile +was included from. The filename of the file this makefile was +included from. The machine hardware name, see The machine +processor architecture name, see The name that was executed with +The same as for compatibility. The preferred variable to use is +the environment variable because it is more compatible with other +make variants and cannot be confused with the special target with +the same name. Names the makefile (default from which generated +dependencies are read. If set to do not print error information +at the end. A boolean that controls the default behavior of the +option. If true, variable values printed with are fully ex- +panded; if false, the raw variable contents (which may include +additional unexpanded variable references) are shown. The list +of variables exported by The top-level makefile that is currently +read, as given in the command line. The environment variable may +contain anything that may be specified on command line. Anything +specified on command line is appended to the variable, which is +then added to the environment for all programs that executes. +The numeric group ID of the user running It is read-only. If is +run with the output for each target is prefixed with a token the +first part of which can be controlled via If is empty, no token +is printed. For example, setting to would produce tokens like +making it easier to track the degree of parallelism being +achieved. The argument to the option. A read-only boolean that +indicates whether the option supports use of The recursion depth +of The top-level instance of has level 0, and each child make has +its parent level plus 1. This allows tests like: to protect +things which should only be evaluated in the top-level instance +of The name of the environment variable that stores the level of +nested calls to The ordered list of makefile names (default that +looks for. The list of makefiles read by which is useful for +tracking dependencies. Each makefile is recorded only once, re- +gardless of the number of times read. In mode, provides a list +of prefixes which match the directories controlled by If a file +that was generated outside of but within said bailiwick is miss- +ing, the current target is considered out-of-date. In mode, it +can (very rarely!) be useful to filter command lines before com- +parison. This variable can be set to a set of modifiers that are +applied to each line of the old and new command that differ, if +the filtered commands still differ, the target is considered out- +of-date. In mode, this variable contains a list of all the meta +files updated. If not empty, it can be used to trigger process- +ing of In mode, this variable contains a list of all the meta +files used (updated or not). This list can be used to process +the meta files to extract dependency information. Provides a +list of variable modifiers to apply to each pathname. Ignore if +the expansion is an empty string. Provides a list of path pre- +fixes that should be ignored; because the contents are expected +to change over time. The default list includes: Provides a list +of patterns to match against pathnames. Ignore any that match. +Defines the message printed for each meta file updated in mode. +The default value is: Processed after reading all makefiles. Af- +fects the mode that runs in. It can contain these keywords: Like +puts into mode. Puts into mode, where meta files are created for +each target to capture the command run, the output generated, and +if is available, the system calls which are of interest to The +captured output can be useful when diagnosing errors. By de- +fault, does not create files in This can be overridden by setting +to a value which represents true. If is true, a missing file +makes the target out-of-date. If is true, missing filemon data +makes the target out-of-date. Do not use For debugging, it can +be useful to include the environment in the file. If in mode, +print a clue about the target being built. This is useful if the +build is otherwise running silently. The message printed is the +expanded value of Some makefiles have commands which are simply +not stable. This keyword causes them to be ignored for determin- +ing whether a target is out of date in mode. See also If is +true, when a .meta file is created, mark the target In both com- +pat and parallel mode, do not make the targets in the usual or- +der, but instead randomize their order. This mode can be used to +detect undeclared dependencies between files. Used to create +files in a separate directory, see Used to force a separate di- +rectory for the created files, even if that directory is not +writable, see Used to create files in a separate directory, see +The name of the operating system, see It is read-only. This +variable is used to record the names of variables assigned to on +the command line, so that they may be exported as part of This +behavior can be disabled by assigning an empty value to within a +makefile. Extra variables can be exported from a makefile by ap- +pending their names to is re-exported whenever is modified. If +was built with support, this is set to the path of the device +node. This allows makefiles to test for this support. The +process ID of It is read-only. The parent process ID of It is +read-only. When stops due to an error, it sets to the name of +the target that failed, to the exit status of the failed target, +to the commands of the failed target, and in mode, it also sets +to the and to the path of the meta file (if any) describing the +failed target. It then prints its name and the value of as well +as the value of any variables named in If true, are preserved +when doing assignments. The default is false, for backwards com- +patibility. Set to true for compatability with other makes. If +set to false, becomes per normal evaluation rules. If set to ap- +parent variable assignments in dependency lines are treated as +normal sources. The numeric ID of the user running It is read- +only. This variable is simply assigned a newline character as +its value. It is read-only. This allows expansions using the +modifier to put a newline between iterations of the loop rather +than a space. For example, in case of an error, prints the vari- +able names and their values using: A path to the directory where +the targets are built. Its value is determined by trying to to +the following directories in order and using the first match: +(Only if is set in the environment or on the command line.) +(Only if is set in the environment or on the command line.) +Variable expansion is performed on the value before it is used, +so expressions such as may be used. This is especially useful +with may be modified in the makefile via the special target In +all cases, changes to the specified directory if it exists, and +sets and to that directory before executing any targets. Except +in the case of an explicit target, checks that the specified di- +rectory is writable and ignores it if not. This check can be +skipped by setting the environment variable to The directory name +of the current makefile being parsed. The basename of the cur- +rent makefile being parsed. This variable and are both set only +while the makefiles are being parsed. To retain their current +values, assign them to a variable using assignment with expansion +The space-separated list of directories that searches for files. +To update this search list, use the special target rather than +modifying the variable directly. Is set in POSIX mode, see the +special target. Alternate path to the current directory. nor- +mally sets to the canonical path given by However, if the envi- +ronment variable is set and gives a path to the current direc- +tory, sets to the value of instead. This behavior is disabled if +is set or contains a variable transform. is set to the value of +for all programs which executes. The pathname of the shell used +to run target scripts. It is read-only. The list of known suf- +fixes. It is read-only. The space-separated list of directories +that searches for makefiles, referred to as the system include +path. To update this search list, use the special target rather +than modifying the variable which is read-only. The list of tar- +gets explicitly specified on the command line, if any. The +colon-separated list of directories that searches for files. +This variable is supported for compatibility with old make pro- +grams only, use instead. The general format of a variable expan- +sion is: Each modifier begins with a colon. To escape a colon, +precede it with a backslash A list of indirect modifiers can be +specified via a variable, as follows: + +In this case, the first modifier in the does not start with a +colon, since that colon already occurs in the referencing vari- +able. If any of the modifiers in the contains a dollar sign +these must be doubled to avoid early expansion. Some modifiers +interpret the expression value as a single string, others treat +the expression value as a whitespace-separated list of words. +When splitting a string into words, whitespace can be escaped us- +ing double quotes, single quotes and backslashes, like in the +shell. The quotes and backslashes are retained in the words. +The supported modifiers are: Replaces each word with its suffix. +Replaces each word with its dirname. Selects only those words +that match The standard shell wildcard characters and may be +used. The wildcard characters may be escaped with a backslash As +a consequence of the way values are split into words, matched, +and then joined, the construct removes all leading and trailing +whitespace and normalizes the inter-word spacing to a single +space. This is the opposite of selecting all words which do +match Orders the words lexicographically. Orders the words nu- +merically. A number followed by one of or is multiplied by the +appropriate factor, which is 1024 for 1048576 for or 1073741824 +for Both upper- and lower-case letters are accepted. Orders the +words in reverse lexicographical order. Orders the words in re- +verse numerical order. Shuffles the words. The results are dif- +ferent each time you are referring to the modified variable; use +the assignment with expansion to prevent such behavior. For ex- +ample, LIST= uno due tre quattro RAN- +DOM_LIST= ${LIST:Ox} STATIC_RAN- +DOM_LIST:= ${LIST:Ox} + +all: @echo "${RANDOM_LIST}" @echo "${RAN- +DOM_LIST}" @echo "${STATIC_RANDOM_LIST}" @echo +"${STATIC_RANDOM_LIST}" may produce output similar to: quattro +due tre uno tre due quattro uno due uno quattro tre due uno quat- +tro tre Quotes every shell meta-character in the value, so that +it can be passed safely to the shell. Quotes every shell meta- +character in the value, and also doubles characters so that it +can be passed safely through recursive invocations of This is +equivalent to Replaces each word with everything but its suffix. +The value is an integer sequence representing the words of the +original value, or the supplied The value is interpreted as a +format string for using producing the formatted timestamp. Note: +the format should only be used with If a value is not provided or +is 0, the current time is used. Computes a 32-bit hash of the +value and encodes it as 8 hex digits. The value is interpreted +as a format string for using producing the formatted timestamp. +If a value is not provided or is 0, the current time is used. +Call with each word as pathname; use as the new value. If fails; +use or current time. If is set to then failure will cause an er- +ror. Attempts to convert the value to an absolute path using If +that fails, the value is unchanged. Converts the value to lower- +case letters. When joining the words after a modifier that +treats the value as words, the words are normally separated by a +space. This modifier changes the separator to the character If +is omitted, no separator is used. The common escapes (including +octal numeric codes) work as expected. Converts the value to up- +per-case letters. Causes subsequent modifiers to treat the value +as a single word (possibly containing embedded whitespace). See +also Causes the value to be treated as a list of words. See also +Modifies the first occurrence of in each word of the value, re- +placing it with If a is appended to the last delimiter of the +pattern, all occurrences in each word are replaced. If a is ap- +pended to the last delimiter of the pattern, only the first oc- +currence is affected. If a is appended to the last delimiter of +the pattern, the value is treated as a single word. If begins +with a caret is anchored at the beginning of each word. If ends +with a dollar sign it is anchored at the end of each word. In- +side an ampersand is replaced by (without the anchoring or Any +character may be used as the delimiter for the parts of the modi- +fier string. The anchoring, ampersand and delimiter characters +can be escaped with a backslash Both and may contain nested ex- +pressions. To prevent a dollar sign from starting a nested ex- +pression, escape it with a backslash. The modifier works like +the modifier except that the old and new strings, instead of be- +ing simple strings, are an extended regular expression (see and +an Normally, the first occurrence of the pattern in each word of +the value is substituted with The modifier causes the substitu- +tion to apply to at most one word; the modifier causes the sub- +stitution to apply to as many instances of the search pattern as +occur in the word or words it is found in; the modifier causes +the value to be treated as a single word (possibly containing em- +bedded whitespace). As for the modifier, the and are subjected +to variable expansion before being parsed as regular expressions. +Replaces each word with its last path component (basename). Re- +moves adjacent duplicate words (like If the variable name (not +its value), when parsed as a conditional expression, evaluates to +true, return as its value the otherwise return the Since the +variable name is used as the expression, :? must be the first +modifier after the variable name which, of course, usually con- +tains variable expansions. A common error is trying to use ex- +pressions like which actually tests defined(NUMBERS). To deter- +mine if any words match you need to use something like: This is +the style substitution. It can only be the last modifier speci- +fied, as a in either or is treated as a regular character, not as +the end of the modifier. If does not contain the pattern match- +ing character and the word ends with or equals it, that suffix is +replaced with Otherwise, the first in matches a possibly empty +substring of arbitrary characters, and if the whole pattern is +found in the word, the matching part is replaced with and the +first occurrence of in (if any) is replaced with the substring +matched by the Both and may contain nested expressions. To pre- +vent a dollar sign from starting a nested expression, escape it +with a backslash. This is the loop expansion mechanism from the +OSF Development Environment (ODE) make. Unlike loops, expansion +occurs at the time of reference. For each word in the value, as- +sign the word to the variable named and evaluate The ODE conven- +tion is that should start and end with a period, for example: +However, a single-letter variable is often more readable: Saves +the current variable value in or the named for later reference. +Example usage: M_cmpv.units = 1 1000 1000000 M_cmpv = S,., +,g:_:range:@i@+ $${_:[-$$i]} \ \* +$${M_cmpv.units:[$$i]}@:S,^,expr 0 ,1:sh + + +Here is used to save the result of the modifier which is later +referenced using the index values from If the variable is unde- +fined, the optional (which may be empty) is the value. If the +variable is defined, the existing value is returned. This is an- +other ODE make feature. It is handy for setting per-target +CFLAGS for instance: If a value is only required if the variable +is undefined, use: If the variable is defined, (which may be +empty) is the value. The name of the variable is the value. The +path of the node which has the same name as the variable is the +value. If no such node exists or its path is null, the name of +the variable is used. In order for this modifier to work, the +name (node) must at least have appeared on the right-hand side of +a dependency. The output of running is the value. The value is +run as a command, and the output becomes the new value. The +variable is assigned the value after substitution. This modifier +and its variations are useful in obscure situations such as want- +ing to set a variable at a point where a target's shell commands +are being parsed. These assignment modifiers always expand to +nothing. The helps avoid false matches with the style modifier +and since substitution always occurs, the form is vaguely appro- +priate. As for but only if the variable does not already have a +value. Append to the variable. Assign the output of to the +variable. Selects one or more words from the value, or performs +other operations related to the way in which the value is split +into words. An empty value, or a value that consists entirely of +white-space, is treated as a single word. For the purposes of +the modifier, the words are indexed both forwards using positive +integers (where index 1 represents the first word), and backwards +using negative integers (where index -1 represents the last +word). The is subjected to variable expansion, and the expanded +result is then interpreted as follows: Selects a single word from +the value. Selects all words from to inclusive. For example, +selects all words from the second word to the last word. If is +greater than the words are output in reverse order. For example, +selects all the words from last to first. If the list is already +ordered, this effectively reverses the list, but it is more effi- +cient to use instead of Causes subsequent modifiers to treat the +value as a single word (possibly containing embedded whitespace). +Analogous to the effect of in Bourne shell. Means the same as +Causes subsequent modifiers to treat the value as a sequence of +words delimited by whitespace. Analogous to the effect of in +Bourne shell. Returns the number of words in the value. offers +directives for including makefiles, conditionals and for loops. +All these directives are identified by a line beginning with a +single dot character, followed by the keyword of the directive, +such as or Files are included with either or Variables between +the angle brackets or double quotes are expanded to form the file +name. If angle brackets are used, the included makefile is ex- +pected to be in the system makefile directory. If double quotes +are used, the including makefile's directory and any directories +specified using the option are searched before the system make- +file directory. For compatibility with other make variants, +(without leading dot) is also accepted. If the include statement +is written as or as errors locating and/or opening include files +are ignored. If the include statement is written as not only are +errors locating and/or opening include files ignored, but stale +dependencies within the included file are ignored just like in +The directives for exporting and unexporting variables are: Ex- +port the specified global variable. If no variable list is pro- +vided, all globals are exported except for internal variables +(those that start with This is not affected by the flag, so +should be used with caution. For compatibility with other make +programs, (without leading dot) is also accepted. Appending a +variable name to is equivalent to exporting a variable. The same +as except that the variable is not appended to This allows ex- +porting a value to the environment which is different from that +used by internally. The same as except that variables in the +value are not expanded. The opposite of The specified global is +removed from If no variable list is provided, all globals are un- +exported, and deleted. Unexport all globals previously exported +and clear the environment inherited from the parent. This opera- +tion causes a memory leak of the original environment, so should +be used sparingly. Testing for being 0 would make sense. Also +note that any variables which originated in the parent environ- +ment should be explicitly preserved if desired. For example: +PATH := ${PATH} Would result in an environment containing only +which is the minimal useful environment. Actually is also pushed +into the new environment. The directives for printing messages +to the output are: The message is printed along with the name of +the makefile and line number. The message prefixed by is printed +along with the name of the makefile and line number. The message +is printed along with the name of the makefile and line number, +exits immediately. The directives for conditionals are: Test the +value of an expression. Test whether a variable is defined. +Test whether a variable is not defined. Test the target being +requested. Test the target being requested. Reverse the sense +of the last conditional. A combination of followed by A combina- +tion of followed by A combination of followed by A combination of +followed by A combination of followed by End the body of the con- +ditional. The may be any one of the following: Logical OR. Log- +ical AND; of higher precedence than only evaluates a conditional +as far as is necessary to determine its value. Parentheses can +be used to override the operator precedence. The boolean opera- +tor may be used to logically negate an expression, typically a +function call. It is of higher precedence than The value of may +be any of the following function call expressions: Evaluates to +true if the variable has been defined. Evaluates to true if the +target was specified as part of command line or was declared the +default target (either implicitly or explicitly, see before the +line containing the conditional. Evaluates to true if the expan- +sion of the variable, after applying the modifiers, results in an +empty string. Evaluates to true if the given pathname exists. +If relative, the pathname is searched for on the system search +path (see Evaluates to true if the target has been defined. +Evaluates to true if the target has been defined and has commands +associated with it. may also be an arithmetic or string compari- +son. Variable expansion is performed on both sides of the com- +parison. If both sides are numeric and neither is enclosed in +quotes, the comparison is done numerically, otherwise lexico- +graphically. A string is interpreted as a hexadecimal integer if +it is preceded by otherwise it is interpreted as a decimal float- +ing-point number; octal numbers are not supported. All compar- +isons may use the operators and Numeric comparisons may also use +the operators and If the comparison has neither a comparison op- +erator nor a right side, the expression evaluates to true if it +is nonempty and its numeric value (if any) is not zero. When is *** 5677 LINES SKIPPED *** From nobody Sat Jan 10 21:33:59 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2c3g1yz6MxFn for ; Sat, 10 Jan 2026 21:34:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpX2c0MT8z3QgS for ; Sat, 10 Jan 2026 21:34:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9/jNnpAGJf5w/Wia2HmmaQ2ua8lU0JN+Jpa7d9RGYx4=; b=r99UBsQNXea3+4tVM10rKB2HAVZzfiBTiHv1DVaI7PwJrfxpuDSJGaxEzQntEUufYr5akZ YMgUe2p+nQdOdzEwi1zt7ymuQK6dP5Uq1bFeBaezMS7VcFGiZKP01TNOGjYMEmnB7ABKV7 SQXd3yvG+F2Nj/5umjV9oBG00wsKWpXm4SLqxJ/EuM8EDn7C4SPWZ1+DKJcLWkqkkOkP4w D7+b6XsavScoHBBZqirDsX1joV2Imh44aQuXeMQVgrvECbV49lP6t4fmSgDArpyhx/9c4N IYWuWdiuYeSS+TcjxVo97BnVDGSwIAR725di7VdN3HCkuxFU9ZTA3KLgXg5IVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080840; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9/jNnpAGJf5w/Wia2HmmaQ2ua8lU0JN+Jpa7d9RGYx4=; b=AkLgYXtiiw8zUoxXEGxm9MkKdjb3Qa1tIFjPk+SFWCHY8YRpME123VcvvV4JOyHAVEJEmK qkGO006AHLYXnYe4sCZYw0/GZ4N8u3pEPPllEy8aJqCkjRx8kmOni/l1igvoCVP2wxi4i1 oU0wH3dtXyiBnrelCLXpWdbZaaz6mIayvHMpB4JKUgRfqaS7sTdP50+ACDTx26US3P7R+w 3z5UVbYW9WmsDq0Y+RE58ggjwqC18fInhtsQwWmbUIuSUj0CvS6ZU0if0kCouqmi+TMz5K 8ZhoBkCQ9Pgwfg//zG8J8gqqveSuX6n4S8X5FMZHo4Pc0i0qHXa882d1xB1M2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768080840; a=rsa-sha256; cv=none; b=Y0y7ZuEIli2Dk524521Tc8vhoQ+MNv2TJ6DisIQqpjp3QXWa63S20e7flMAdHi1Bs0rmEY LtYIc534lTS8O7DveWnfHeGJL7d6KbnFES7h2oD4jj+x5/XNoXrbSHNhlkEHyJRe2zhpWE q2ayT5gYFFRTsTmWAHZP9Cb8TcwUQUPGDSukwaER2Wgeq/9rqHJyhfxyxjNQ95DAJHHrwE 0yrL8WwduUU3coYCu/nZ+xUHYOvHPs9mcEJ0QU3wDD8G4O8OVaYhwgVG1grqGkqUy8xBJV AqOUDirC9gfYodfo5AXkmoMgmQPkMzG/ak4CIKa1V2grc77ImT0WMb8kV1gKCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2b6dQGz1Bfh for ; Sat, 10 Jan 2026 21:33:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24f4f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 21:33:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Simon J. Gerraty Subject: git: 1166b90143da - stable/14 - Merge bmake-20240430 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1166b90143dafc2e7f19140cd2492be74ed94348 Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 21:33:59 +0000 Message-Id: <6962c5c7.24f4f.6de1ddb2@gitrepo.freebsd.org> The branch stable/14 has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=1166b90143dafc2e7f19140cd2492be74ed94348 commit 1166b90143dafc2e7f19140cd2492be74ed94348 Author: Simon J. Gerraty AuthorDate: 2024-05-03 22:45:05 +0000 Commit: Simon J. Gerraty CommitDate: 2026-01-10 21:33:11 +0000 Merge bmake-20240430 Merge commit '507951f55039f9d1ceae507d510f8cb68225fbc5' (cherry picked from commit 548bfc56eb0b2cefa0fb8dc2478240bfef610309) --- contrib/bmake/ChangeLog | 75 +- contrib/bmake/Makefile | 6 +- contrib/bmake/Makefile.config.in | 1 + contrib/bmake/VERSION | 2 +- contrib/bmake/arch.c | 250 +- contrib/bmake/bmake.cat1 | 2585 +++++++++++++------- contrib/bmake/buf.c | 31 +- contrib/bmake/buf.h | 3 +- contrib/bmake/compat.c | 6 +- contrib/bmake/cond.c | 19 +- contrib/bmake/configure | 40 +- contrib/bmake/configure.in | 25 +- contrib/bmake/for.c | 15 +- contrib/bmake/job.c | 11 +- contrib/bmake/lst.c | 8 +- contrib/bmake/lst.h | 11 +- contrib/bmake/main.c | 18 +- contrib/bmake/make-bootstrap.sh.in | 1 + contrib/bmake/make.h | 22 +- contrib/bmake/meta.c | 4 +- contrib/bmake/mk/ChangeLog | 36 + contrib/bmake/mk/FILES | 1 + contrib/bmake/mk/init.mk | 4 +- contrib/bmake/mk/install-mk | 6 +- contrib/bmake/mk/meta.autodep.mk | 4 +- contrib/bmake/mk/meta.subdir.mk | 3 +- contrib/bmake/mk/own.mk | 5 +- contrib/bmake/mk/progs.mk | 22 +- contrib/bmake/mk/subdir.mk | 6 +- contrib/bmake/mk/sys.dirdeps.mk | 15 +- contrib/bmake/mk/sys/Cygwin.mk | 21 + contrib/bmake/os.sh | 6 +- contrib/bmake/parse.c | 26 +- contrib/bmake/str.c | 30 +- contrib/bmake/targ.c | 17 +- contrib/bmake/unit-tests/Makefile | 27 +- contrib/bmake/unit-tests/archive.exp | 8 + contrib/bmake/unit-tests/archive.mk | 33 +- contrib/bmake/unit-tests/cmd-errors-jobs.exp | 6 +- contrib/bmake/unit-tests/cmd-errors-jobs.mk | 31 +- contrib/bmake/unit-tests/cmd-errors-lint.exp | 6 +- contrib/bmake/unit-tests/cmd-errors-lint.mk | 11 +- contrib/bmake/unit-tests/cmd-errors.exp | 6 +- contrib/bmake/unit-tests/cmd-errors.mk | 11 +- contrib/bmake/unit-tests/cmdline-undefined.mk | 4 +- contrib/bmake/unit-tests/cmdline.mk | 4 +- contrib/bmake/unit-tests/comment.mk | 8 +- contrib/bmake/unit-tests/cond-cmp-string.mk | 20 +- contrib/bmake/unit-tests/cond-func-defined.exp | 3 - contrib/bmake/unit-tests/cond-func-defined.mk | 11 +- contrib/bmake/unit-tests/cond-token-string.exp | 2 +- contrib/bmake/unit-tests/cond-token-string.mk | 4 +- contrib/bmake/unit-tests/depsrc-end.mk | 4 +- contrib/bmake/unit-tests/depsrc-nopath.exp | 2 + contrib/bmake/unit-tests/depsrc-nopath.mk | 25 +- contrib/bmake/unit-tests/depsrc-phony.mk | 3 +- contrib/bmake/unit-tests/deptgt-phony.exp | 2 +- contrib/bmake/unit-tests/deptgt.exp | 2 +- contrib/bmake/unit-tests/deptgt.mk | 4 +- contrib/bmake/unit-tests/directive-export-impl.exp | 2 + contrib/bmake/unit-tests/directive-for-errors.exp | 2 +- contrib/bmake/unit-tests/directive-for-errors.mk | 4 +- contrib/bmake/unit-tests/directive-for-escape.exp | 1 + contrib/bmake/unit-tests/directive-for-null.exp | 6 +- contrib/bmake/unit-tests/directive-for-null.mk | 14 +- contrib/bmake/unit-tests/directive-for.exp | 2 +- contrib/bmake/unit-tests/directive-for.mk | 4 +- contrib/bmake/unit-tests/directive-include.exp | 2 +- contrib/bmake/unit-tests/directive-include.mk | 4 +- contrib/bmake/unit-tests/directive-undef.exp | 2 +- contrib/bmake/unit-tests/directive-undef.mk | 4 +- contrib/bmake/unit-tests/lint.exp | 2 +- contrib/bmake/unit-tests/moderrs.exp | 12 +- contrib/bmake/unit-tests/opt-chdir.exp | 2 - contrib/bmake/unit-tests/opt-chdir.mk | 8 +- contrib/bmake/unit-tests/opt-debug-errors-jobs.exp | 6 + contrib/bmake/unit-tests/opt-debug-lint.exp | 6 +- contrib/bmake/unit-tests/opt-debug-lint.mk | 8 +- contrib/bmake/unit-tests/opt-debug-parse.exp | 2 + contrib/bmake/unit-tests/opt-file.exp | 4 +- contrib/bmake/unit-tests/opt-file.mk | 12 +- .../bmake/unit-tests/opt-keep-going-indirect.mk | 10 +- contrib/bmake/unit-tests/opt-m-include-dir.mk | 8 +- contrib/bmake/unit-tests/var-eval-short.exp | 4 +- contrib/bmake/unit-tests/var-eval-short.mk | 4 +- contrib/bmake/unit-tests/var-op-expand.exp | 4 +- contrib/bmake/unit-tests/var-op-expand.mk | 6 +- contrib/bmake/unit-tests/vardebug.exp | 2 +- contrib/bmake/unit-tests/vardebug.mk | 4 +- contrib/bmake/unit-tests/varmisc.exp | 20 +- contrib/bmake/unit-tests/varmod-assign.exp | 2 +- contrib/bmake/unit-tests/varmod-assign.mk | 4 +- contrib/bmake/unit-tests/varmod-edge.exp | 6 +- contrib/bmake/unit-tests/varmod-edge.mk | 8 +- contrib/bmake/unit-tests/varmod-gmtime.exp | 10 +- contrib/bmake/unit-tests/varmod-gmtime.mk | 12 +- contrib/bmake/unit-tests/varmod-hash.exp | 6 +- contrib/bmake/unit-tests/varmod-ifelse.exp | 2 +- contrib/bmake/unit-tests/varmod-ifelse.mk | 6 +- contrib/bmake/unit-tests/varmod-indirect.exp | 8 +- contrib/bmake/unit-tests/varmod-indirect.mk | 10 +- contrib/bmake/unit-tests/varmod-localtime.exp | 10 +- contrib/bmake/unit-tests/varmod-localtime.mk | 12 +- contrib/bmake/unit-tests/varmod-loop-delete.exp | 2 +- contrib/bmake/unit-tests/varmod-loop-delete.mk | 4 +- contrib/bmake/unit-tests/varmod-loop-varname.exp | 8 +- contrib/bmake/unit-tests/varmod-loop-varname.mk | 10 +- contrib/bmake/unit-tests/varmod-loop.exp | 2 + contrib/bmake/unit-tests/varmod-match-escape.exp | 6 +- contrib/bmake/unit-tests/varmod-match-escape.mk | 8 +- contrib/bmake/unit-tests/varmod-match.exp | 22 +- contrib/bmake/unit-tests/varmod-match.mk | 54 +- contrib/bmake/unit-tests/varmod-mtime.exp | 12 +- contrib/bmake/unit-tests/varmod-mtime.mk | 14 +- contrib/bmake/unit-tests/varmod-range.exp | 10 +- contrib/bmake/unit-tests/varmod-range.mk | 12 +- contrib/bmake/unit-tests/varmod-subst-regex.exp | 2 +- contrib/bmake/unit-tests/varmod-subst.exp | 2 +- contrib/bmake/unit-tests/varmod-to-separator.exp | 6 +- contrib/bmake/unit-tests/varmod-to-separator.mk | 8 +- contrib/bmake/unit-tests/varmod.exp | 4 +- contrib/bmake/unit-tests/varmod.mk | 6 +- contrib/bmake/unit-tests/varname-dot-shell.exp | 3 + contrib/bmake/unit-tests/varparse-errors.exp | 4 +- contrib/bmake/unit-tests/varparse-errors.mk | 6 +- contrib/bmake/var.c | 159 +- usr.bin/bmake/Makefile | 4 +- usr.bin/bmake/Makefile.config | 3 +- usr.bin/bmake/config.h | 4 +- usr.bin/bmake/unit-tests/Makefile | 27 +- 130 files changed, 2625 insertions(+), 1616 deletions(-) diff --git a/contrib/bmake/ChangeLog b/contrib/bmake/ChangeLog index fc1da62fbe54..a2dd8dd5ed14 100644 --- a/contrib/bmake/ChangeLog +++ b/contrib/bmake/ChangeLog @@ -1,3 +1,74 @@ +2024-04-30 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240430 + Merge with NetBSD make, pick up + o main.c: ensure '.include ' respects MAKESYSPATH. + Dir_FindFile will search .CURDIR first unless ".DOTLAST" is seen. + +2024-04-28 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240428 + Merge with NetBSD make, pick up + o simplify freeing of lists + o arch.c: trim pointless comments + o var.c: delay variable assignments until actually needed + don't reallocate memory after evaluating an expression, result is + almost always short-lived. + +2024-04-26 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240426 + Merge with NetBSD make, pick up + o job.c: in debug output, print the directory in which a job + failed at same time as failed target so it is more easily found in + build log. + +2024-04-24 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240424 + Merge with NetBSD make, pick up + o clean up comments, code and tests + +2024-04-23 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240422 + Merge with NetBSD make, pick up + o var.c: avoid LazyBuf for :*time modifiers. + LazyBuf's are not nul terminated so not suitable for passing to + functions that expect that. These modifiers are used sparingly so + an extra allocation is not a problem. + +2024-04-20 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240420 + Merge with NetBSD make, pick up + o provide more context information for parse/evaluate errors + +2024-04-14 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240414 + Merge with NetBSD make, pick up + o parse.c: print -dp debug info earlier so we see which + .if or .for line is being parsed. + +2024-04-04 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240404 + Merge with NetBSD make, pick up + o fix some unit tests for Cygwin + o parse.c: exit immediately after reading a null byte from a makefile + + * fix generation of bmake.cat1 + +2024-03-19 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240314 + Add/Improve support for Cygwin + o uname -s output isn't useful so allow configure to + set FORCE_MAKE_OS - to force the value of .MAKE.OS + and use Cygwin which matches uname -o + o fix some unit-tests for Cygwin + 2024-03-10 Simon J Gerraty * boot-strap: tests can take a long time; use a cookie to @@ -2175,10 +2246,10 @@ * VERSION (_MAKE_VERSION): 20200418 - * configure.in: use_makefile=no for cygwin et al. + * configure.in: use_makefile=no for Cygwin et al. case insensitive filesystems just don't work if both makefile and Makefile exist. - NOTE: bmake does not support cygwin and likely never will, + NOTE: bmake does not support Cygwin and likely never will, but if brave souls want to try it - help them out. 2020-04-02 Simon J Gerraty diff --git a/contrib/bmake/Makefile b/contrib/bmake/Makefile index 3332dcdeaf2d..65730df7e3df 100644 --- a/contrib/bmake/Makefile +++ b/contrib/bmake/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.126 2024/03/10 17:46:44 sjg Exp $ +# $Id: Makefile,v 1.127 2024/03/19 16:03:23 sjg Exp $ PROG= bmake @@ -48,7 +48,7 @@ CFLAGS+= -I. -I${srcdir} ${XDEFS} -DMAKE_NATIVE CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}} COPTS.main.c+= "-DMAKE_VERSION=\"${_MAKE_VERSION}\"" -.for x in FORCE_MACHINE FORCE_MACHINE_ARCH +.for x in FORCE_MAKE_OS FORCE_MACHINE FORCE_MACHINE_ARCH .ifdef $x COPTS.main.c+= "-D$x=\"${$x}\"" .endif @@ -90,7 +90,7 @@ OS := ${.MAKE.OS:U${uname -s:L:sh}} # are we 4.4BSD ? isBSD44:=${BSD44_LIST:M${OS}} -.if ${isBSD44} == "" && ${OS:NCYGWIN*:NDarwin:NLinux} != "" +.if ${isBSD44} == "" && ${OS:NCygwin:NDarwin:NLinux} != "" MANTARGET?= cat .if ${MACHINE} == "sun386" # even I don't have one of these anymore :-) diff --git a/contrib/bmake/Makefile.config.in b/contrib/bmake/Makefile.config.in index dfc26d90a02a..43ad1b9a397a 100644 --- a/contrib/bmake/Makefile.config.in +++ b/contrib/bmake/Makefile.config.in @@ -5,6 +5,7 @@ _MAKE_VERSION?=@_MAKE_VERSION@ prefix?= @prefix@ srcdir= @srcdir@ CC= @CC@ +@force_make_os@MAKE_OS?= @make_os@ @force_machine@MACHINE?= @machine@ @force_machine_arch@MACHINE_ARCH?= @machine_arch@ DEFAULT_SYS_PATH?= @default_sys_path@ diff --git a/contrib/bmake/VERSION b/contrib/bmake/VERSION index 5d6ca326700a..49a67b80073a 100644 --- a/contrib/bmake/VERSION +++ b/contrib/bmake/VERSION @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20240309 +_MAKE_VERSION=20240430 diff --git a/contrib/bmake/arch.c b/contrib/bmake/arch.c index caec2e148690..4e52532c780a 100644 --- a/contrib/bmake/arch.c +++ b/contrib/bmake/arch.c @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.215 2024/02/07 06:43:02 rillig Exp $ */ +/* $NetBSD: arch.c,v 1.217 2024/04/27 20:41:32 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -147,7 +147,7 @@ struct ar_hdr { #include "dir.h" /* "@(#)arch.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: arch.c,v 1.215 2024/02/07 06:43:02 rillig Exp $"); +MAKE_RCSID("$NetBSD: arch.c,v 1.217 2024/04/27 20:41:32 rillig Exp $"); typedef struct List ArchList; typedef struct ListNode ArchListNode; @@ -155,7 +155,7 @@ typedef struct ListNode ArchListNode; static ArchList archives; /* The archives we've already examined */ typedef struct Arch { - char *name; /* Name of archive */ + char *name; HashTable members; /* All the members of the archive described * by key/value pairs */ char *fnametab; /* Extended name table strings */ @@ -199,12 +199,10 @@ static int ArchSVR4Entry(Arch *, char *, size_t, FILE *); #ifdef CLEANUP static void -ArchFree(void *ap) +ArchFree(Arch *a) { - Arch *a = ap; HashIter hi; - /* Free memory from hash entries */ HashIter_Init(&hi, &a->members); while (HashIter_Next(&hi) != NULL) free(hi.entry->value); @@ -217,32 +215,22 @@ ArchFree(void *ap) #endif /* Return "archive(member)". */ -static char * +MAKE_ATTR_NOINLINE static char * FullName(const char *archive, const char *member) { - size_t len1 = strlen(archive); - size_t len3 = strlen(member); - char *result = bmake_malloc(len1 + 1 + len3 + 1 + 1); - memcpy(result, archive, len1); - memcpy(result + len1, "(", 1); - memcpy(result + len1 + 1, member, len3); - memcpy(result + len1 + 1 + len3, ")", 1 + 1); - return result; + Buffer buf; + Buf_Init(&buf); + Buf_AddStr(&buf, archive); + Buf_AddStr(&buf, "("); + Buf_AddStr(&buf, member); + Buf_AddStr(&buf, ")"); + return Buf_DoneData(&buf); } /* * Parse an archive specification such as "archive.a(member1 member2.${EXT})", - * adding nodes for the expanded members to gns. Nodes are created as - * necessary. - * - * Input: - * pp The start of the specification. - * gns The list on which to place the nodes. - * scope The scope in which to expand variables. - * - * Output: - * return True if it was a valid specification. - * *pp Points to the first non-space after the archive spec. + * adding nodes for the expanded members to gns. If successful, advance pp + * beyond the archive specification and any trailing whitespace. */ bool Arch_ParseArchive(char **pp, GNodeList *gns, GNode *scope) @@ -323,12 +311,6 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *scope) } } - /* - * If the specification ends without a closing parenthesis, - * chances are there's something wrong (like a missing - * backslash), so it's better to return failure than allow - * such things to happen - */ if (*cp == '\0') { Parse_Error(PARSE_FATAL, "No closing parenthesis " @@ -336,9 +318,6 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *scope) return false; } - /* - * If we didn't move anywhere, we must be done - */ if (cp == mem.str) break; @@ -375,8 +354,7 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *scope) /* * Must contain dynamic sources, so we can't * deal with it now. Just create an ARCHV node - * for the thing and let SuffExpandChildren - * handle it. + * and let SuffExpandChildren handle it. */ gn = Targ_GetNode(fullName); gn->type |= OP_ARCHV; @@ -413,13 +391,6 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *scope) gn = Targ_GetNode(fullname); free(fullname); - /* - * We've found the node, but have to make sure the - * rest of the world knows it's an archive member, - * without having to constantly check for parentheses, - * so we type the thing with the OP_ARCHV bit before - * we place it on the end of the provided list. - */ gn->type |= OP_ARCHV; Lst_Append(gns, gn); } @@ -431,23 +402,13 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *scope) FStr_Done(&lib); cp++; /* skip the ')' */ - /* We promised that pp would be set up at the next non-space. */ cpp_skip_whitespace(&cp); *pp += cp - *pp; return true; } /* - * Locate a member of an archive, given the path of the archive and the path - * of the desired member. - * - * Input: - * archive Path to the archive - * member Name of member; only its basename is used. - * addToCache True if archive should be cached if not already so. - * - * Results: - * The ar_hdr for the member, or NULL. + * Locate a member in an archive. * * See ArchFindMember for an almost identical copy of this code. */ @@ -459,15 +420,11 @@ ArchStatMember(const char *archive, const char *member, bool addToCache) size_t size; /* Size of archive member */ char magic[SARMAG]; ArchListNode *ln; - Arch *ar; /* Archive descriptor */ - struct ar_hdr arh; /* archive-member header for reading archive */ + Arch *ar; + struct ar_hdr arh; char memName[MAXPATHLEN + 1]; /* Current member name while hashing. */ - /* - * Because of space constraints and similar things, files are archived - * using their basename, not the entire path. - */ member = str_basename(member); for (ln = archives.first; ln != NULL; ln = ln->next) { @@ -499,11 +456,8 @@ ArchStatMember(const char *archive, const char *member, bool addToCache) if (!addToCache) { /* - * Caller doesn't want the thing cached, just use - * ArchFindMember to read the header for the member out and - * close down the stream again. Since the archive is not to be - * cached, we assume there's no need to allocate extra room - * for the header we're returning, so just declare it static. + * Since the archive is not to be cached, assume there's no + * need to allocate the header, so just declare it static. */ static struct ar_hdr sarh; @@ -515,18 +469,10 @@ ArchStatMember(const char *archive, const char *member, bool addToCache) return &sarh; } - /* - * We don't have this archive on the list yet, so we want to find out - * everything that's in it and cache it so we can get at it quickly. - */ arch = fopen(archive, "r"); if (arch == NULL) return NULL; - /* - * We use the ARMAG string to make sure this is an archive we - * can handle... - */ if (fread(magic, SARMAG, 1, arch) != 1 || strncmp(magic, ARMAG, SARMAG) != 0) { (void)fclose(arch); @@ -543,17 +489,9 @@ ArchStatMember(const char *archive, const char *member, bool addToCache) while (fread(&arh, sizeof arh, 1, arch) == 1) { char *nameend; - /* If the header is bogus, there's no way we can recover. */ if (strncmp(arh.AR_FMAG, ARFMAG, sizeof arh.AR_FMAG) != 0) - goto badarch; + goto bad_archive; - /* - * We need to advance the stream's pointer to the start of the - * next header. Files are padded with newlines to an even-byte - * boundary, so we need to extract the size of the file from - * the 'size' field of the header and round it up during the - * seek. - */ arh.AR_SIZE[sizeof arh.AR_SIZE - 1] = '\0'; size = (size_t)strtol(arh.AR_SIZE, NULL, 10); @@ -572,7 +510,7 @@ ArchStatMember(const char *archive, const char *member, bool addToCache) /* svr4 magic mode; handle it */ switch (ArchSVR4Entry(ar, memName, size, arch)) { case -1: /* Invalid data */ - goto badarch; + goto bad_archive; case 0: /* List of files entry */ continue; default: /* Got the entry */ @@ -596,12 +534,12 @@ ArchStatMember(const char *archive, const char *member, bool addToCache) memName + sizeof AR_EFMT1 - 1); if (elen > MAXPATHLEN) - goto badarch; + goto bad_archive; if (fread(memName, elen, 1, arch) != 1) - goto badarch; + goto bad_archive; memName[elen] = '\0'; if (fseek(arch, -(long)elen, SEEK_CUR) != 0) - goto badarch; + goto bad_archive; if (DEBUG(ARCH) || DEBUG(MAKE)) debug_printf( "ArchStatMember: " @@ -617,21 +555,18 @@ ArchStatMember(const char *archive, const char *member, bool addToCache) HashTable_Set(&ar->members, memName, cached_hdr); } + /* Files are padded with newlines to an even-byte boundary. */ if (fseek(arch, ((long)size + 1) & ~1, SEEK_CUR) != 0) - goto badarch; + goto bad_archive; } fclose(arch); Lst_Append(&archives, ar); - /* - * Now that the archive has been read and cached, we can look into - * the addToCache table to find the desired member's header. - */ return HashTable_FindValue(&ar->members, member); -badarch: +bad_archive: fclose(arch); HashTable_Done(&ar->members); free(ar->fnametab); @@ -736,37 +671,27 @@ ArchiveMember_HasName(const struct ar_hdr *hdr, * In archives created by GNU binutils 2.27, the member names end * with a slash. */ - if (ar_name[namelen] == '/' && - (namelen == ar_name_len || ar_name[namelen + 1] == ' ')) + if (ar_name[namelen] == '/' && ar_name[namelen + 1] == ' ') return true; return false; } /* - * Locate a member of an archive, given the path of the archive and the path - * of the desired member. - * - * Input: - * archive Path to the archive - * member Name of member. If it is a path, only the last - * component is used. - * out_arh Archive header to be filled in - * mode "r" for read-only access, "r+" for read-write access + * Load the header of an archive member. The mode is "r" for read-only + * access, "r+" for read-write access. * - * Output: - * return The archive file, positioned at the start of the - * member's struct ar_hdr, or NULL if the member doesn't - * exist. - * *out_arh The current struct ar_hdr for member. + * Upon successful return, the archive file is positioned at the start of the + * member's struct ar_hdr. In case of a failure or if the member doesn't + * exist, return NULL. * * See ArchStatMember for an almost identical copy of this code. */ static FILE * -ArchFindMember(const char *archive, const char *member, struct ar_hdr *out_arh, - const char *mode) +ArchFindMember(const char *archive, const char *member, + struct ar_hdr *out_arh, const char *mode) { - FILE *arch; /* Stream to archive */ + FILE *arch; int size; /* Size of archive member */ char magic[SARMAG]; size_t len; @@ -775,32 +700,20 @@ ArchFindMember(const char *archive, const char *member, struct ar_hdr *out_arh, if (arch == NULL) return NULL; - /* - * We use the ARMAG string to make sure this is an archive we - * can handle... - */ if (fread(magic, SARMAG, 1, arch) != 1 || strncmp(magic, ARMAG, SARMAG) != 0) { fclose(arch); return NULL; } - /* - * Because of space constraints and similar things, files are archived - * using their basename, not the entire path. - */ + /* Files are archived using their basename, not the entire path. */ member = str_basename(member); - len = strlen(member); while (fread(out_arh, sizeof *out_arh, 1, arch) == 1) { if (strncmp(out_arh->AR_FMAG, ARFMAG, sizeof out_arh->AR_FMAG) != 0) { - /* - * The header is bogus, so the archive is bad - * and there's no way we can recover... - */ fclose(arch); return NULL; } @@ -811,14 +724,6 @@ ArchFindMember(const char *archive, const char *member, struct ar_hdr *out_arh, (int)sizeof out_arh->ar_date, out_arh->ar_date); if (ArchiveMember_HasName(out_arh, member, len)) { - /* - * To make life easier for callers that want to update - * the archive, we reposition the file at the start of - * the header we just read before we return the - * stream. In a more general situation, it might be - * better to leave the file at the actual member, - * rather than its header, but not here. - */ if (fseek(arch, -(long)sizeof *out_arh, SEEK_CUR) != 0) { fclose(arch); @@ -870,15 +775,10 @@ ArchFindMember(const char *archive, const char *member, struct ar_hdr *out_arh, } #endif - /* - * This isn't the member we're after, so we need to advance the - * stream's pointer to the start of the next header. Files are - * padded with newlines to an even-byte boundary, so we need to - * extract the size of the file from the 'size' field of the - * header and round it up during the seek. - */ + /* Advance to the next member. */ out_arh->AR_SIZE[sizeof out_arh->AR_SIZE - 1] = '\0'; size = (int)strtol(out_arh->AR_SIZE, NULL, 10); + /* Files are padded with newlines to an even-byte boundary. */ if (fseek(arch, (size + 1) & ~1L, SEEK_CUR) != 0) { fclose(arch); return NULL; @@ -890,17 +790,9 @@ ArchFindMember(const char *archive, const char *member, struct ar_hdr *out_arh, } /* - * Touch a member of an archive, on disk. - * The GNode's modification time is left as-is. - * - * The st_mtime of the entire archive is also changed. - * For a library, it may be required to run ranlib after this. - * - * Input: - * gn Node of member to touch - * - * Results: - * The 'time' field of the member's header is updated. + * Update the ar_date of the member of an archive, on disk but not in the + * GNode. Update the st_mtime of the entire archive as well. For a library, + * it may be required to run ranlib after this. */ void Arch_Touch(GNode *gn) @@ -1015,9 +907,6 @@ Arch_UpdateMemberMTime(GNode *gn) * TARGET variable for this node to be the node's name. Otherwise, * we set the TARGET variable to be the full path of the library, * as returned by Dir_FindFile. - * - * Input: - * gn Node of library to find */ void Arch_FindLib(GNode *gn, SearchPath *path) @@ -1059,20 +948,18 @@ RanlibOODate(const GNode *gn MAKE_ATTR_UNUSED) } /* - * Decide if a node with the OP_LIB attribute is out-of-date. Called from - * GNode_IsOODate to make its life easier. + * Decide if a node with the OP_LIB attribute is out-of-date. * The library is cached if it hasn't been already. * - * There are several ways for a library to be out-of-date that are - * not available to ordinary files. In addition, there are ways - * that are open to regular files that are not available to - * libraries. + * There are several ways for a library to be out-of-date that are not + * available to ordinary files. In addition, there are ways that are open to + * regular files that are not available to libraries. * - * A library that is only used as a source is never - * considered out-of-date by itself. This does not preclude the - * library's modification time from making its parent be out-of-date. - * A library will be considered out-of-date for any of these reasons, - * given that it is a target on a dependency line somewhere: + * A library that is only used as a source is never considered out-of-date by + * itself. This does not preclude the library's modification time from making + * its parent be out-of-date. A library will be considered out-of-date for + * any of these reasons, given that it is a target on a dependency line + * somewhere: * * Its modification time is less than that of one of its sources * (gn->mtime < gn->youngestChild->mtime). @@ -1092,18 +979,16 @@ bool Arch_LibOODate(GNode *gn) { - if (gn->type & OP_PHONY) { + if (gn->type & OP_PHONY) return true; - } else if (!GNode_IsTarget(gn) && Lst_IsEmpty(&gn->children)) { + if (!GNode_IsTarget(gn) && Lst_IsEmpty(&gn->children)) return false; - } else if ((!Lst_IsEmpty(&gn->children) && gn->youngestChild == NULL) || + if ((!Lst_IsEmpty(&gn->children) && gn->youngestChild == NULL) || (gn->mtime > now) || (gn->youngestChild != NULL && - gn->mtime < gn->youngestChild->mtime)) { + gn->mtime < gn->youngestChild->mtime)) return true; - } else { - return RanlibOODate(gn); - } + return RanlibOODate(gn); } /* Initialize the archives module. */ @@ -1118,26 +1003,25 @@ void Arch_End(void) { #ifdef CLEANUP - Lst_DoneCall(&archives, ArchFree); + ArchListNode *ln; + + for (ln = archives.first; ln != NULL; ln = ln->next) + ArchFree(ln->datum); + Lst_Done(&archives); #endif } bool Arch_IsLib(GNode *gn) { - static const char armag[] = "!\n"; - char buf[sizeof armag - 1]; + char buf[8]; int fd; + bool isLib; if ((fd = open(gn->path, O_RDONLY)) == -1) return false; - - if (read(fd, buf, sizeof buf) != sizeof buf) { - (void)close(fd); - return false; - } - + isLib = read(fd, buf, sizeof buf) == sizeof buf + && memcmp(buf, "!\n", sizeof buf) == 0; (void)close(fd); - - return memcmp(buf, armag, sizeof buf) == 0; + return isLib; } diff --git a/contrib/bmake/bmake.cat1 b/contrib/bmake/bmake.cat1 index 7c50930807f4..f2b05878e7e2 100644 --- a/contrib/bmake/bmake.cat1 +++ b/contrib/bmake/bmake.cat1 @@ -1,924 +1,1783 @@ -is a program designed to simplify the maintenance of other pro- -grams. Its input is a list of specifications as to the files -upon which programs and other files depend. If no option is -given, tries to open then in order to find the specifications. -If the file exists, it is read, see This manual page is intended -as a reference document only. For a more thorough description of -and makefiles, please refer to (from 1993). prepends the con- -tents of the environment variable to the command line arguments -before parsing them. The options are as follows: Try to be back- -wards compatible by executing a single shell per command and by -making the sources of a dependency line in sequence. Change to -before reading the makefiles or doing anything else. If multiple -options are specified, each is interpreted relative to the previ- -ous one: is equivalent to Define to be 1, in the global scope. -Turn on debugging, and specify which portions of are to print de- -bugging information. Unless the flags are preceded by they are -added to the environment variable and are passed on to any child -make processes. By default, debugging information is printed to -standard error, but this can be changed using the debugging flag. -The debugging output is always unbuffered; in addition, if debug- -ging is enabled but debugging output is not directed to standard -output, the standard output is line buffered. The available are: -Print all possible debugging information; equivalent to specify- -ing all of the debugging flags. Print debugging information -about archive searching and caching. Print debugging information -about the current working directory. Print debugging information -about conditional evaluation. Print debugging information about -directory searching and caching. Print debugging information -about failed commands and targets. Specify where debugging out- -put is written. This must be the last flag, because it consumes -the remainder of the argument. If the character immediately af- -ter the flag is the file is opened in append mode; otherwise the -file is overwritten. If the file name is or debugging output is -written to the standard output or standard error output respec- -tively (and the option has no effect). Otherwise, the output is -written to the named file. If the file name ends with the is re- -placed by the pid. Print debugging information about loop evalu- -ation. Print the input graph before making anything. Print the -input graph after making everything, or before exiting on error. -Print the input graph before exiting on error. Print debugging -information about hash table operations. Print debugging infor- -mation about running multiple shells. Turn on lint checks. This -throws errors for variable assignments that do not parse cor- -rectly, at the time of assignment, so the file and line number -are available. Print commands in Makefiles regardless of whether -or not they are prefixed by or other flags. Also known as behav- -ior. Print debugging information about mode decisions about tar- -gets. Print debugging information about making targets, includ- -ing modification dates. Don't delete the temporary command -scripts created when running commands. These temporary scripts -are created in the directory referred to by the environment vari- -able, or in if is unset or set to the empty string. The tempo- -rary scripts are created by and have names of the form This can -create many files in or so use with care. Print debugging infor- -mation about makefile parsing. Print debugging information about -suffix-transformation rules. Print debugging information about -target list maintenance. Force the option to print raw values of -variables, overriding the default behavior set via Print debug- -ging information about variable assignment and expansion. Run -shell commands with so the actual commands are printed as they -are executed. Let environment variables override global vari- -ables within makefiles. Specify a makefile to read instead of -the default or If is standard input is read. Multiple makefiles -may be specified, and are read in the order specified. Specify a -directory in which to search for makefiles and included make- -files. The system makefile directory (or directories, see the -option) is automatically included as part of this list. Ignore -non-zero exit of shell commands in the makefile. Equivalent to -specifying before each command line in the makefile. This option -should be specified by the user. When the option is in use in a -recursive build, this option is passed by a make to child makes -to allow all the make processes in the build to cooperate to -avoid overloading the system. Specify the maximum number of jobs -that may have running at any one time. If is a floating point -number, or ends with then the value is multiplied by the number -of CPUs reported online by The value of is saved in Turns compat- -ibility mode off, unless the option is also specified. When com- -patibility mode is off, all commands associated with a target are -executed in a single shell invocation as opposed to the tradi- -tional one shell invocation per line. This can break traditional -scripts which change directories on each command invocation and -then expect to start with a fresh environment on the next line. -It is more efficient to correct the scripts rather than turn -backwards compatibility on. A job token pool with tokens is used -to control the total number of jobs running. Each instance of -will wait for a token from the pool before running a new job. -Continue processing after errors are encountered, but only on -those targets that do not depend on the target whose creation -caused the error. Specify a directory in which to search for and -makefiles included via the include statement. The option can be -used multiple times to form a search path. This path overrides -the default system include path Furthermore, the system include -path is appended to the search path used for include statements -(see the option). The system include path can be referenced via -the read-only variable If a directory name in the argument (or -the environment variable) starts with the string searches for the -specified file or directory named in the remaining part of the -argument string. The search starts with the current directory -and then works upward towards the root of the file system. If -the search is successful, the resulting directory replaces the -specification in the argument. This feature allows to easily -search in the current source tree for customized files (e.g., by -using as an argument). Display the commands that would have been -executed, but do not actually execute them unless the target de- -pends on the special source (see below) or the command is pre- -fixed with Display the commands that would have been executed, -but do not actually execute any of them; useful for debugging -top-level makefiles without descending into subdirectories. Do -not execute any commands, instead exit 0 if the specified targets -are up to date, and 1 otherwise. Do not use the built-in rules -specified in the system makefile. Stop processing if an error is -encountered. This is the default behavior and the opposite of Do -not echo any commands as they are executed. Equivalent to speci- -fying before each command line in the makefile. When used with -the flag, append a trace record to for each job started and com- -pleted. Rather than re-building a target as specified in the -makefile, create it or update its modification time to make it -appear up-to-date. Print the value of Do not build any targets. -Multiple instances of this option may be specified; the variables -are printed one per line, with a blank line for each null or un- -defined variable. The value printed is extracted from the global -scope after all makefiles have been read. By default, the raw -variable contents (which may include additional unexpanded vari- -able references) are shown. If contains a it is not interpreted -as a variable name but rather as an expression. Its value is ex- -panded before printing. The value is also expanded before print- -ing if is set to true and the option has not been used to over- -ride it. Note that loop-local and target-local variables, as -well as values taken temporarily by global variables during make- -file processing, are not accessible via this option. The debug -mode can be used to see these at the cost of generating substan- -tial extraneous output. Like but all printed variables are al- -ways expanded to their complete value. The last occurrence of or -decides whether all variables are expanded or not. Treat any -warnings during makefile parsing as errors. Print entering and -leaving directory messages, pre and post processing. Don't ex- -port variables passed on the command line to the environment in- -dividually. Variables passed on the command line are still ex- -ported via the environment variable. This option may be useful -on systems which have a small limit on the size of command argu- -ments. Set the value of the variable to Normally, all values -passed on the command line are also exported to sub-makes in the -environment. The flag disables this behavior. Variable assign- -ments should follow options for POSIX compatibility but no order- -ing is enforced. There are several different types of lines in a -makefile: dependency specifications, shell commands, variable as- -signments, include statements, conditional directives, for loops, -other directives, and comments. Lines may be continued from one -line to the next by ending them with a backslash The trailing -newline character and initial whitespace on the following line -are compressed into a single space. Dependency lines consist of -one or more targets, an operator, and zero or more sources. This -creates a relationship where the targets on the sources and are -customarily created from them. A target is considered out of -date if it does not exist, or if its modification time is less -than that of any of its sources. An out-of-date target is re- -created, but not until all sources have been examined and them- -selves re-created as needed. Three operators may be used: Many -dependency lines may name this target but only one may have at- -tached shell commands. All sources named in all dependency lines -are considered together, and if needed the attached shell com- -mands are run to create or re-create the target. If is inter- -rupted, the target is removed. The same, but the target is al- -ways re-created whether or not it is out of date. Any dependency -line may have attached shell commands, but each one is handled -independently: its sources are considered and the attached shell -commands are run if the target is out of date with respect to -(only) those sources. Thus, different groups of the attached -shell commands may be run depending on the circumstances. Fur- -thermore, unlike for dependency lines with no sources, the at- -tached shell commands are always run. Also unlike the target is -not removed if is interrupted. All dependency lines mentioning a -particular target must use the same operator. Targets and -sources may contain the shell wildcard values and The values and -may only be used as part of the final component of the target or -source, and only match existing files. The value need not neces- -sarily be used to describe existing files. Expansion is in di- -rectory order, not alphabetically as done in the shell. Each -target may have associated with it one or more lines of shell -commands, normally used to create the target. Each of the lines -in this script be preceded by a tab. (For historical reasons, *** 6521 LINES SKIPPED *** From nobody Sat Jan 10 21:34:00 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2d4chbz6MxTq for ; Sat, 10 Jan 2026 21:34:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpX2d1Sj0z3QSW for ; Sat, 10 Jan 2026 21:34:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0o4qo35aEFqV/RynCvgyIMNWeYE+tEy1U/zmCDD2uyc=; b=SisS74+w0IKXdh8ZlUWgW3U/7j9H0SZcPfSIzl7KDcMLRYY36B9lxPjbYOnUqcgT9YIIBm 8+Ee3ecH0K719svUMrH4E28py6vXeXy6DVNZtsakAAun9nGRE6IW8OuTa7F73oJliKGMbf NBecbMDOcO9PlHxtgOWPp9W1I4R0qOuBb7WWJ5gP+ZcFLyxpamvxEpqDksphdsPjqhonti D65wiQznvQVkgH+BarePCxr9IVoXr3yFWGjnWJD4Bl1mR90maAMlX+NCJ5tG//DRSjmry2 yGsS2/ho1rkTEuHdOCr+yr5qg+rWxsNUv59YjqtUHPYjjU1Clz/GbLtpiUgzIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0o4qo35aEFqV/RynCvgyIMNWeYE+tEy1U/zmCDD2uyc=; b=XuZ123HcgiShxZcq/LcXbbERReiRjv5rzzl+NXQT5ZwMQqx1dEyajaMC/dlX7VuVN4xJkY hco3wS+Zf0KEMAFCPeuYueEsvr62Up0czjlDfTsx3/Xe1FGLYm9BCQRysK06eaz2Zvi4gJ fOtV8L+gN/CYY8Az3k1Qgsl2UWWTuR/XRMq1yIyeHzaSRy5ajFNbnNDDwhr9iQsKFIwKEV 9LS+K+JpA2SZuKW9LkAl3sgrurkoQm5pBVWPkg3XG3meDewOheb13o2rTqmAE8I1jkNdUL 92L0BzSnuQe5Mo37GfB/4+DlRXsmQIx4rC4GnZk7NdnDEdbjHxr2uDTveLt5Pg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768080841; a=rsa-sha256; cv=none; b=y2xX1/xzNwSkI8ETjYMys3wKXPVCP0uPpc9SatlhWdYyMbROY7rVdTKF878NGPdvaUx617 IsyzBDY1dkZtvayEs4FM60e2nz7g58eOMvTDoqe/L5rpXYSGhaSIC2wNBoHWFTDSz0BZxf psKgdSFhjrdsjIyCHICkdePXdoLubVqfLuX/3KTFL398v/OG+Nx6u8hnvGyQHhEbhSln6R LwMyPx8PRjuSK1rJ+tgFsK8ZfWvht7C2SSXjQjg0CLgA/PT6+Brf9PtzQrbv3kY03A2G5B cTKxChEDKU1o+SGZEBTOrmnSyrAq/OU4oUxC3HpzgjuDYat/w+roPe8sC1d4Kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2d03Kdz1B8C for ; Sat, 10 Jan 2026 21:34:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24cc5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 21:34:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Simon J. Gerraty Subject: git: 1d00ba4aaacf - stable/14 - Merge bmake-20240508 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1d00ba4aaacfb001f17887529ebd6a7552a3f55a Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 21:34:00 +0000 Message-Id: <6962c5c8.24cc5.508f951@gitrepo.freebsd.org> The branch stable/14 has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=1d00ba4aaacfb001f17887529ebd6a7552a3f55a commit 1d00ba4aaacfb001f17887529ebd6a7552a3f55a Author: Simon J. Gerraty AuthorDate: 2024-05-14 05:17:23 +0000 Commit: Simon J. Gerraty CommitDate: 2026-01-10 21:33:11 +0000 Merge bmake-20240508 Merge commit '3c2ab5fddc576e58f3ffa70dc5fa95144646a513' (cherry picked from commit c9f4001f81c4d5778f70f77dc9892d1c4ecfdcdb) --- contrib/bmake/ChangeLog | 8 ++++++++ contrib/bmake/VERSION | 2 +- contrib/bmake/job.c | 7 ++++--- contrib/bmake/main.c | 6 +++--- contrib/bmake/make.h | 5 +++-- contrib/bmake/mk/ChangeLog | 7 +++++++ contrib/bmake/mk/dirdeps.mk | 7 +++++-- contrib/bmake/mk/install-mk | 4 ++-- contrib/bmake/unit-tests/opt-debug-graph1.exp | 2 +- contrib/bmake/unit-tests/opt-debug-graph2.exp | 2 +- contrib/bmake/unit-tests/opt-debug-graph3.exp | 2 +- contrib/bmake/unit-tests/suff-main-several.exp | 2 +- contrib/bmake/unit-tests/suff-transform-debug.exp | 2 +- contrib/bmake/unit-tests/varname-dot-makeoverrides.exp | 6 +++--- contrib/bmake/unit-tests/varname-dot-makeoverrides.mk | 4 ++-- contrib/bmake/var.c | 17 +++++++---------- usr.bin/bmake/Makefile.config | 2 +- 17 files changed, 51 insertions(+), 34 deletions(-) diff --git a/contrib/bmake/ChangeLog b/contrib/bmake/ChangeLog index a2dd8dd5ed14..1ce033887c8f 100644 --- a/contrib/bmake/ChangeLog +++ b/contrib/bmake/ChangeLog @@ -1,3 +1,11 @@ +2024-05-07 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240508 + Merge with NetBSD make, pick up + o make: ensure variables set on command line get added to + .MAKEOVERRIDES (even if they start with '.') so they are passed to + sub-makes. + 2024-04-30 Simon J Gerraty * VERSION (_MAKE_VERSION): 20240430 diff --git a/contrib/bmake/VERSION b/contrib/bmake/VERSION index 49a67b80073a..60aa9ae5069b 100644 --- a/contrib/bmake/VERSION +++ b/contrib/bmake/VERSION @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20240430 +_MAKE_VERSION=20240508 diff --git a/contrib/bmake/job.c b/contrib/bmake/job.c index 6f50c78169b2..541a61294766 100644 --- a/contrib/bmake/job.c +++ b/contrib/bmake/job.c @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.470 2024/04/27 20:41:32 rillig Exp $ */ +/* $NetBSD: job.c,v 1.471 2024/05/07 18:26:22 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -154,7 +154,7 @@ #include "trace.h" /* "@(#)job.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: job.c,v 1.470 2024/04/27 20:41:32 rillig Exp $"); +MAKE_RCSID("$NetBSD: job.c,v 1.471 2024/05/07 18:26:22 sjg Exp $"); /* * A shell defines how the commands are run. All commands for a target are @@ -2190,7 +2190,8 @@ Shell_Init(void) if (shellPath == NULL) InitShellNameAndPath(); - Var_SetWithFlags(SCOPE_CMDLINE, ".SHELL", shellPath, VAR_SET_READONLY); + Var_SetWithFlags(SCOPE_CMDLINE, ".SHELL", shellPath, + VAR_SET_INTERNAL|VAR_SET_READONLY); if (shell->errFlag == NULL) shell->errFlag = ""; if (shell->echoFlag == NULL) diff --git a/contrib/bmake/main.c b/contrib/bmake/main.c index ea834bf669ed..fff294291ccf 100644 --- a/contrib/bmake/main.c +++ b/contrib/bmake/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.614 2024/04/30 16:13:33 sjg Exp $ */ +/* $NetBSD: main.c,v 1.615 2024/05/07 18:26:22 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -111,7 +111,7 @@ #include "trace.h" /* "@(#)main.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: main.c,v 1.614 2024/04/30 16:13:33 sjg Exp $"); +MAKE_RCSID("$NetBSD: main.c,v 1.615 2024/05/07 18:26:22 sjg Exp $"); #if defined(MAKE_NATIVE) __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 " "The Regents of the University of California. " @@ -1411,7 +1411,7 @@ main_Init(int argc, char **argv) Global_Set(".MAKEOVERRIDES", ""); Global_Set("MFLAGS", ""); Global_Set(".ALLTARGETS", ""); - Var_Set(SCOPE_CMDLINE, ".MAKE.LEVEL.ENV", MAKE_LEVEL_ENV); + Global_Set_ReadOnly(".MAKE.LEVEL.ENV", MAKE_LEVEL_ENV); /* Set some other useful variables. */ { diff --git a/contrib/bmake/make.h b/contrib/bmake/make.h index ff85ae4f41db..b7fcc77b91b3 100644 --- a/contrib/bmake/make.h +++ b/contrib/bmake/make.h @@ -1,4 +1,4 @@ -/* $NetBSD: make.h,v 1.332 2024/04/27 20:41:32 rillig Exp $ */ +/* $NetBSD: make.h,v 1.333 2024/05/07 18:26:22 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -1013,7 +1013,8 @@ typedef enum VarSetFlags { * except for another call to Var_Set with the same flag. See the * special targets '.NOREADONLY' and '.READONLY'. */ - VAR_SET_READONLY = 1 << 1 + VAR_SET_READONLY = 1 << 1, + VAR_SET_INTERNAL = 1 << 2 } VarSetFlags; typedef enum VarExportMode { diff --git a/contrib/bmake/mk/ChangeLog b/contrib/bmake/mk/ChangeLog index ee65ea0fadc1..4c3f4f4572c9 100644 --- a/contrib/bmake/mk/ChangeLog +++ b/contrib/bmake/mk/ChangeLog @@ -1,3 +1,10 @@ +2024-05-04 Simon J Gerraty + + * install-mk (MK_VERSION): 20240504 + + * dirdeps.mk: allow BUILD_DIRDEPS_OVERRIDES to pass overrides to + sub-make building DIRDEPS_CACHE. + 2024-04-24 Simon J Gerraty * meta.autodep.mk: do not override start_utc diff --git a/contrib/bmake/mk/dirdeps.mk b/contrib/bmake/mk/dirdeps.mk index b3b34145e8e9..7a9ecd881d7b 100644 --- a/contrib/bmake/mk/dirdeps.mk +++ b/contrib/bmake/mk/dirdeps.mk @@ -1,4 +1,4 @@ -# $Id: dirdeps.mk,v 1.166 2024/01/05 23:16:34 sjg Exp $ +# $Id: dirdeps.mk,v 1.167 2024/05/06 20:41:08 sjg Exp $ # SPDX-License-Identifier: BSD-2-Clause # @@ -581,6 +581,7 @@ BUILD_DIRDEPS_MAKEFILE ?= -f dirdeps.mk # these should generally do BUILD_DIRDEPS_MAKEFILE ?= +BUILD_DIRDEPS_OVERRIDES ?= BUILD_DIRDEPS_TARGETS ?= ${.TARGETS} .if ${DIRDEPS_CACHE} != ${STATIC_DIRDEPS_CACHE:Uno} && ${DIRDEPS_CACHE:M${SRCTOP}/*} == "" @@ -600,7 +601,9 @@ ${DIRDEPS_CACHE}: .META .NOMETA_CMP TARGET_SPEC=${TARGET_SPEC} \ MAKEFLAGS= ${DIRDEP_CACHE_MAKE:U${.MAKE}} -C ${_CURDIR} \ ${BUILD_DIRDEPS_MAKEFILE} \ - ${BUILD_DIRDEPS_TARGETS} BUILD_DIRDEPS_CACHE=yes \ + ${BUILD_DIRDEPS_TARGETS} \ + ${BUILD_DIRDEPS_OVERRIDES} \ + BUILD_DIRDEPS_CACHE=yes \ .MAKE.DEPENDFILE=.none \ ${"${DEBUG_DIRDEPS:Nno}":?DEBUG_DIRDEPS='${DEBUG_DIRDEPS}':} \ ${.MAKEFLAGS:tW:S,-D ,-D,g:tw:M*WITH*} \ diff --git a/contrib/bmake/mk/install-mk b/contrib/bmake/mk/install-mk old mode 100755 new mode 100644 index 97874ac49016..c2962ffee6dc --- a/contrib/bmake/mk/install-mk +++ b/contrib/bmake/mk/install-mk @@ -59,7 +59,7 @@ # Simon J. Gerraty # RCSid: -# $Id: install-mk,v 1.253 2024/04/18 17:18:31 sjg Exp $ +# $Id: install-mk,v 1.254 2024/05/06 20:41:08 sjg Exp $ # # @(#) Copyright (c) 1994-2024 Simon J. Gerraty # @@ -74,7 +74,7 @@ # sjg@crufty.net # -MK_VERSION=20240414 +MK_VERSION=20240504 OWNER= GROUP= MODE=444 diff --git a/contrib/bmake/unit-tests/opt-debug-graph1.exp b/contrib/bmake/unit-tests/opt-debug-graph1.exp index 26777a671119..d01a98a31fdb 100644 --- a/contrib/bmake/unit-tests/opt-debug-graph1.exp +++ b/contrib/bmake/unit-tests/opt-debug-graph1.exp @@ -23,6 +23,7 @@ .MAKE.GID =
.MAKE.JOBS.C =
.MAKE.LEVEL =
+.MAKE.LEVEL.ENV = MAKELEVEL .MAKE.MAKEFILES =
.MAKE.MAKEFILE_PREFERENCE =
.MAKE.OS =
@@ -41,7 +42,6 @@ MACHINE_ARCH =
MAKE =
MFLAGS = -r -k -d g1 #*** Command-line Variables: -.MAKE.LEVEL.ENV = MAKELEVEL #*** Directory Cache: # Stats: 0 hits 2 misses 0 near misses 0 losers (0%) diff --git a/contrib/bmake/unit-tests/opt-debug-graph2.exp b/contrib/bmake/unit-tests/opt-debug-graph2.exp index a5a51413fd38..d4182650baed 100644 --- a/contrib/bmake/unit-tests/opt-debug-graph2.exp +++ b/contrib/bmake/unit-tests/opt-debug-graph2.exp @@ -57,6 +57,7 @@ all : made-target error-target aborted-target .MAKE.GID =
.MAKE.JOBS.C =
.MAKE.LEVEL =
+.MAKE.LEVEL.ENV = MAKELEVEL .MAKE.MAKEFILES =
.MAKE.MAKEFILE_PREFERENCE =
.MAKE.OS =
@@ -75,7 +76,6 @@ MACHINE_ARCH =
MAKE =
MFLAGS = -r -k -d g2 #*** Command-line Variables: -.MAKE.LEVEL.ENV = MAKELEVEL .SHELL =
#*** Directory Cache: diff --git a/contrib/bmake/unit-tests/opt-debug-graph3.exp b/contrib/bmake/unit-tests/opt-debug-graph3.exp index ff88400668fa..fea3c658cb72 100644 --- a/contrib/bmake/unit-tests/opt-debug-graph3.exp +++ b/contrib/bmake/unit-tests/opt-debug-graph3.exp @@ -57,6 +57,7 @@ all : made-target error-target aborted-target .MAKE.GID =
.MAKE.JOBS.C =
.MAKE.LEVEL =
+.MAKE.LEVEL.ENV = MAKELEVEL .MAKE.MAKEFILES =
.MAKE.MAKEFILE_PREFERENCE =
.MAKE.OS =
@@ -75,7 +76,6 @@ MACHINE_ARCH =
MAKE =
MFLAGS = -r -k -d g3 #*** Command-line Variables: -.MAKE.LEVEL.ENV = MAKELEVEL .SHELL =
#*** Directory Cache: diff --git a/contrib/bmake/unit-tests/suff-main-several.exp b/contrib/bmake/unit-tests/suff-main-several.exp index 4391610be742..d19a392f5962 100644 --- a/contrib/bmake/unit-tests/suff-main-several.exp +++ b/contrib/bmake/unit-tests/suff-main-several.exp @@ -88,6 +88,7 @@ ParseDependency(.MAKEFLAGS: -d0 -dg1) .MAKE.GID =
.MAKE.JOBS.C =
.MAKE.LEVEL =
+.MAKE.LEVEL.ENV = MAKELEVEL .MAKE.MAKEFILES =
.MAKE.MAKEFILE_PREFERENCE =
.MAKE.OS =
@@ -106,7 +107,6 @@ MACHINE_ARCH =
MAKE =
MFLAGS = -r -k -d mps -d 0 -d g1 #*** Command-line Variables: -.MAKE.LEVEL.ENV = MAKELEVEL #*** Directory Cache: # Stats: 0 hits 2 misses 0 near misses 0 losers (0%) diff --git a/contrib/bmake/unit-tests/suff-transform-debug.exp b/contrib/bmake/unit-tests/suff-transform-debug.exp index 5d632a22f80a..2e88db58bc8c 100644 --- a/contrib/bmake/unit-tests/suff-transform-debug.exp +++ b/contrib/bmake/unit-tests/suff-transform-debug.exp @@ -14,6 +14,7 @@ .MAKE.GID =
.MAKE.JOBS.C =
.MAKE.LEVEL =
+.MAKE.LEVEL.ENV = MAKELEVEL .MAKE.MAKEFILES =
.MAKE.MAKEFILE_PREFERENCE =
.MAKE.OS =
@@ -32,7 +33,6 @@ MACHINE_ARCH =
MAKE =
MFLAGS = -r -k -d g1 #*** Command-line Variables: -.MAKE.LEVEL.ENV = MAKELEVEL #*** Directory Cache: # Stats: 0 hits 2 misses 0 near misses 0 losers (0%) diff --git a/contrib/bmake/unit-tests/varname-dot-makeoverrides.exp b/contrib/bmake/unit-tests/varname-dot-makeoverrides.exp index 78c0296f8d76..21942ffdc96d 100644 --- a/contrib/bmake/unit-tests/varname-dot-makeoverrides.exp +++ b/contrib/bmake/unit-tests/varname-dot-makeoverrides.exp @@ -1,8 +1,8 @@ all: overrides=<> make -f varname-dot-makeoverrides.mk stage_1 VAR=value stage_1: overrides=< VAR> -make -f varname-dot-makeoverrides.mk stage_2 -stage_2: overrides=< VAR> +make -f varname-dot-makeoverrides.mk stage_2 .VAR=too +stage_2: overrides=< VAR .VAR> make -f varname-dot-makeoverrides.mk stage_3 -stage_3: overrides=< VAR> +stage_3: overrides=< .VAR VAR> exit status 0 diff --git a/contrib/bmake/unit-tests/varname-dot-makeoverrides.mk b/contrib/bmake/unit-tests/varname-dot-makeoverrides.mk index f3f3897f8aa4..966fcb7e0ec9 100644 --- a/contrib/bmake/unit-tests/varname-dot-makeoverrides.mk +++ b/contrib/bmake/unit-tests/varname-dot-makeoverrides.mk @@ -1,4 +1,4 @@ -# $NetBSD: varname-dot-makeoverrides.mk,v 1.5 2023/02/25 06:54:08 rillig Exp $ +# $NetBSD: varname-dot-makeoverrides.mk,v 1.6 2024/05/07 18:26:22 sjg Exp $ # # Tests for the special .MAKEOVERRIDES variable, which lists the names of the # variables that are passed on to child processes via the MAKEFLAGS @@ -13,7 +13,7 @@ all: stage_1: @echo '$@: overrides=<'${.MAKEOVERRIDES:Q}'>' - ${MAKE} -f ${MAKEFILE} stage_2 + ${MAKE} -f ${MAKEFILE} stage_2 .VAR=too stage_2: @echo '$@: overrides=<'${.MAKEOVERRIDES:Q}'>' diff --git a/contrib/bmake/var.c b/contrib/bmake/var.c index f39ce1baa83b..ec0a23e05a67 100644 --- a/contrib/bmake/var.c +++ b/contrib/bmake/var.c @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.1108 2024/04/28 15:10:19 rillig Exp $ */ +/* $NetBSD: var.c,v 1.1109 2024/05/07 18:26:22 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -143,7 +143,7 @@ #include "metachar.h" /* "@(#)var.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: var.c,v 1.1108 2024/04/28 15:10:19 rillig Exp $"); +MAKE_RCSID("$NetBSD: var.c,v 1.1109 2024/05/07 18:26:22 sjg Exp $"); /* * Variables are defined using one of the VAR=value assignments. Their @@ -1048,7 +1048,7 @@ Var_SetWithFlags(GNode *scope, const char *name, const char *val, * exported to the environment (as per POSIX standard), except * for internals. */ - if (!(flags & VAR_SET_NO_EXPORT) && name[0] != '.') { + if (!(flags & VAR_SET_NO_EXPORT)) { /* * If requested, don't export these in the @@ -1057,14 +1057,11 @@ Var_SetWithFlags(GNode *scope, const char *name, const char *val, * command-line settings continue to override * Makefile settings. */ - if (!opts.varNoExportEnv) + if (!opts.varNoExportEnv && name[0] != '.') setenv(name, val, 1); - /* XXX: What about .MAKE.EXPORTED? */ - /* - * XXX: Why not just mark the variable for - * needing export, as in ExportVarPlain? - */ - Global_Append(".MAKEOVERRIDES", name); + + if (!(flags & VAR_SET_INTERNAL)) + Global_Append(".MAKEOVERRIDES", name); } } diff --git a/usr.bin/bmake/Makefile.config b/usr.bin/bmake/Makefile.config index ee717d952846..55bc4a4370ca 100644 --- a/usr.bin/bmake/Makefile.config +++ b/usr.bin/bmake/Makefile.config @@ -6,7 +6,7 @@ SRCTOP?= ${.CURDIR:H:H} # things set by configure -_MAKE_VERSION?=20240430 +_MAKE_VERSION?=20240508 prefix?= /usr srcdir= ${SRCTOP}/contrib/bmake From nobody Sat Jan 10 21:34:02 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2f4lb9z6MxNr for ; Sat, 10 Jan 2026 21:34:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpX2f1D4Qz3Qjm for ; Sat, 10 Jan 2026 21:34:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h+V70Niw3UnXI5KNJDWkg4TH7EZzOM2kDj1ZWxJS7hE=; b=LD0QcjlPw2SCWL7kH5u5wWC21dN3kgwrJdmy+NZnXMOYSV+C1yXd+WKPfHGFJk7hWVDaXK OnhyioO4Luljcg1fM4R32R+FzqRaouftM3YmSSthLCI/6Qx3Od8qn104P7m709Xw7EX8aA SN49pjc5Pax1W+bHJdygf8pt9WekIzdHXVuiAVR+7DDRrXH8YnWKGYij3gSKmH1ExbJCFZ P9ZEPWAdy0ulIfY4p4UPzX69M1Djs5JUSQasLQ9DS2n9yXodgSp4u+oEhZlyNwywivCCg+ JgRNC6NZ91mTtEc6c8ZV4ObtvfU6Hihiq9ajfjt2q3qx78r9vIEubrUL7CFsyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h+V70Niw3UnXI5KNJDWkg4TH7EZzOM2kDj1ZWxJS7hE=; b=sZY7z9f6KkpJZikCOWJRJDzXwGt/Q/UxIIvRFZnILYOJJK0elkcdJ/1SL+/TqrY0i6k7EQ BnjcoxvlSnCTaIT2YOSEhBJ+GHX2xaNQDnLxUsOXPL14I0wwhRDi01sEpfFdw7BpQyzPzT k6jTSSL6Dh/sxZgYWRWaIvkq/u54Q+ybZDf8Tjy/io+FOD4OJGeKc6SDaaolQqy8117AlK KIq1LZ70FDnRpN3+4PubFBCFgF2E3WkvE0mFyxbX4htxzc0mY+ld8yaWSQuRy8px/4TQfB uxJ5hsfzXSx2yXwbGAkCF5Lxq5FxbLQ9PCEky/MfRy6kpLsOHDuRIgxAR7d7HA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768080842; a=rsa-sha256; cv=none; b=Xs8WIFhzdVqqkzGOmaL1Bsy9kfepngipDbYxNZQNJW74CBgjduD8U4xLrah4qaDJL7J/t4 +tv6YPTSO/yJWWVAkv2vgozQOITVOspMpm8WJZlSxxvGXM1SyyDkdjaOXR+c7W/Ty9MsRl wY181Q3CNfBzKN0nQHsvNMny9ZaFdx/OmFGklgnaKXEyaLEIWiIbjXNyQ2dW5Um26Nf4dN E6USq/bhZAJZkcBITzuLQQ52m8INifhFZsEKM9n7XhtdUXgHtp8IrXGulwzJohQLy3HUAR fMnRtGPSkK/B7sEZop0S6mt63oow8Uk/CqbA6H47E9IcWR5GqOVhDJm1e0Tq1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2f0qqdz1BSk for ; Sat, 10 Jan 2026 21:34:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24eae by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 21:34:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Simon J. Gerraty Subject: git: 5d3c3f73b69c - stable/14 - Merge bmake-20240520 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5d3c3f73b69c61cd2630be56642292a676363dd0 Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 21:34:02 +0000 Message-Id: <6962c5ca.24eae.1b82e8a8@gitrepo.freebsd.org> The branch stable/14 has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=5d3c3f73b69c61cd2630be56642292a676363dd0 commit 5d3c3f73b69c61cd2630be56642292a676363dd0 Author: Simon J. Gerraty AuthorDate: 2024-05-23 20:11:02 +0000 Commit: Simon J. Gerraty CommitDate: 2026-01-10 21:33:11 +0000 Merge bmake-20240520 Merge commit '29efb3dcaedd9cbabc6f96f35545baf2c8b28501' (cherry picked from commit 9d3df31ec06fe91c5c67da464f11408474d57174) --- contrib/bmake/ChangeLog | 15 +++++++++ contrib/bmake/VERSION | 2 +- contrib/bmake/dir.c | 51 ++++++++++++++++++++++++++----- contrib/bmake/dir.h | 3 +- contrib/bmake/getopt.c | 6 ++-- contrib/bmake/main.c | 6 ++-- contrib/bmake/parse.c | 6 ++-- contrib/bmake/unit-tests/deptgt-phony.exp | 2 +- usr.bin/bmake/Makefile.config | 2 +- 9 files changed, 71 insertions(+), 22 deletions(-) diff --git a/contrib/bmake/ChangeLog b/contrib/bmake/ChangeLog index 1ce033887c8f..6d8a8228969d 100644 --- a/contrib/bmake/ChangeLog +++ b/contrib/bmake/ChangeLog @@ -1,3 +1,18 @@ +2024-05-20 Simon J Gerraty + + * VERSION (_MAKE_VERSION): + Merge with NetBSD make, pick up + o dir.c: in FindFile restore last search of .CURDIR even for + includes, as a number of existing makefiles are broken otherwise. + +2024-05-19 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240519 + Merge with NetBSD make, pick up + o dir.c: Add Dir_FindInclude, FindFile without looking in .CURDIR. + Also fix Dir_SetSYSPATH to use defSysIncPath if sysIncPath is empty. + o main.c: no need to set .DOTLAST in sysIncPath + 2024-05-07 Simon J Gerraty * VERSION (_MAKE_VERSION): 20240508 diff --git a/contrib/bmake/VERSION b/contrib/bmake/VERSION index 60aa9ae5069b..4af36cf84624 100644 --- a/contrib/bmake/VERSION +++ b/contrib/bmake/VERSION @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20240508 +_MAKE_VERSION=20240520 diff --git a/contrib/bmake/dir.c b/contrib/bmake/dir.c index 5c11d6c794d7..de50b2faf511 100644 --- a/contrib/bmake/dir.c +++ b/contrib/bmake/dir.c @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.286 2023/12/29 18:53:24 rillig Exp $ */ +/* $NetBSD: dir.c,v 1.290 2024/05/20 19:14:12 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -132,7 +132,7 @@ #include "job.h" /* "@(#)dir.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: dir.c,v 1.286 2023/12/29 18:53:24 rillig Exp $"); +MAKE_RCSID("$NetBSD: dir.c,v 1.290 2024/05/20 19:14:12 sjg Exp $"); /* * A search path is a list of CachedDir structures. A CachedDir has in it the @@ -566,10 +566,12 @@ void Dir_SetSYSPATH(void) { CachedDirListNode *ln; - + SearchPath *path = Lst_IsEmpty(&sysIncPath->dirs) + ? defSysIncPath : sysIncPath; + Var_ReadOnly(".SYSPATH", false); Global_Delete(".SYSPATH"); - for (ln = sysIncPath->dirs.first; ln != NULL; ln = ln->next) { + for (ln = path->dirs.first; ln != NULL; ln = ln->next) { CachedDir *dir = ln->datum; Global_Append(".SYSPATH", dir->name); } @@ -1142,15 +1144,16 @@ found: * Input: * name the file to find * path the directories to search, or NULL + * isinclude if true, do not search .CURDIR at all * * Results: * The freshly allocated path to the file, or NULL. */ -char * -Dir_FindFile(const char *name, SearchPath *path) +static char * +FindFile(const char *name, SearchPath *path, bool isinclude) { char *file; /* the current filename to check */ - bool seenDotLast = false; /* true if we should search dot last */ + bool seenDotLast = isinclude; /* true if we should search dot last */ struct cached_stat cst; const char *trailing_dot = "."; const char *base = str_basename(name); @@ -1163,7 +1166,7 @@ Dir_FindFile(const char *name, SearchPath *path) return NULL; } - if (path->dirs.first != NULL) { + if (!seenDotLast && path->dirs.first != NULL) { CachedDir *dir = path->dirs.first->datum; if (dir == dotLast) { seenDotLast = true; @@ -1244,6 +1247,38 @@ Dir_FindFile(const char *name, SearchPath *path) return NULL; } +/* + * Find the file with the given name along the given search path. + * + * Input: + * name the file to find + * path the directories to search, or NULL + * + * Results: + * The freshly allocated path to the file, or NULL. + */ +char * +Dir_FindFile(const char *name, SearchPath *path) +{ + return FindFile(name, path, false); +} + +/* + * Find the include file with the given name along the given search path. + * + * Input: + * name the file to find + * path the directories to search, or NULL + * + * Results: + * The freshly allocated path to the file, or NULL. + */ +char * +Dir_FindInclude(const char *name, SearchPath *path) +{ + return FindFile(name, path, true); +} + /* * Search for 'needle' starting at the directory 'here' and then working our diff --git a/contrib/bmake/dir.h b/contrib/bmake/dir.h index 09cbca8ec4c1..58bfd8c996ef 100644 --- a/contrib/bmake/dir.h +++ b/contrib/bmake/dir.h @@ -1,4 +1,4 @@ -/* $NetBSD: dir.h,v 1.47 2023/01/24 00:24:02 sjg Exp $ */ +/* $NetBSD: dir.h,v 1.48 2024/05/19 20:09:40 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -86,6 +86,7 @@ void Dir_SetSYSPATH(void); bool Dir_HasWildcards(const char *) MAKE_ATTR_USE; void SearchPath_Expand(SearchPath *, const char *, StringList *); char *Dir_FindFile(const char *, SearchPath *) MAKE_ATTR_USE; +char *Dir_FindInclude(const char *, SearchPath *) MAKE_ATTR_USE; char *Dir_FindHereOrAbove(const char *, const char *) MAKE_ATTR_USE; void Dir_UpdateMTime(GNode *, bool); CachedDir *SearchPath_Add(SearchPath *, const char *); diff --git a/contrib/bmake/getopt.c b/contrib/bmake/getopt.c index da29daed2ca8..2afe663acb00 100644 --- a/contrib/bmake/getopt.c +++ b/contrib/bmake/getopt.c @@ -1,4 +1,4 @@ -/* $NetBSD: getopt.c,v 1.29 2014/06/05 22:00:22 christos Exp $ */ +/* $NetBSD: getopt.c,v 1.30 2024/01/19 18:41:38 christos Exp $ */ /* * Copyright (c) 1987, 1993, 1994 @@ -58,8 +58,8 @@ int getopt(int nargc, char * const nargv[], const char *ostr) { extern char *__progname; - static const char *place = EMSG; /* option letter processing */ - char *oli; /* option letter list index */ + static const char *place = EMSG; /* option letter processing */ + const char *oli; /* option letter list index */ #ifndef BSD4_4 if (!__progname) { diff --git a/contrib/bmake/main.c b/contrib/bmake/main.c index fff294291ccf..6c97d648e5a2 100644 --- a/contrib/bmake/main.c +++ b/contrib/bmake/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.615 2024/05/07 18:26:22 sjg Exp $ */ +/* $NetBSD: main.c,v 1.616 2024/05/19 17:55:54 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -111,7 +111,7 @@ #include "trace.h" /* "@(#)main.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: main.c,v 1.615 2024/05/07 18:26:22 sjg Exp $"); +MAKE_RCSID("$NetBSD: main.c,v 1.616 2024/05/19 17:55:54 sjg Exp $"); #if defined(MAKE_NATIVE) __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 " "The Regents of the University of California. " @@ -1174,8 +1174,6 @@ InitDefSysIncPath(char *syspath) else syspath = bmake_strdup(syspath); - /* do NOT search .CURDIR first for .include */ - SearchPath_Add(defSysIncPath, ".DOTLAST"); for (start = syspath; *start != '\0'; start = p) { for (p = start; *p != '\0' && *p != ':'; p++) continue; diff --git a/contrib/bmake/parse.c b/contrib/bmake/parse.c index 54f29ba5ff13..70c6d6fe5157 100644 --- a/contrib/bmake/parse.c +++ b/contrib/bmake/parse.c @@ -1,4 +1,4 @@ -/* $NetBSD: parse.c,v 1.722 2024/04/27 17:33:46 rillig Exp $ */ +/* $NetBSD: parse.c,v 1.723 2024/05/19 20:09:40 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -121,7 +121,7 @@ #include "pathnames.h" /* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: parse.c,v 1.722 2024/04/27 17:33:46 rillig Exp $"); +MAKE_RCSID("$NetBSD: parse.c,v 1.723 2024/05/19 20:09:40 sjg Exp $"); /* Detects a multiple-inclusion guard in a makefile. */ typedef enum { @@ -1269,7 +1269,7 @@ IncludeFile(const char *file, bool isSystem, bool depinc, bool silent) if (fullname == NULL) { SearchPath *path = Lst_IsEmpty(&sysIncPath->dirs) ? defSysIncPath : sysIncPath; - fullname = Dir_FindFile(file, path); + fullname = Dir_FindInclude(file, path); } if (fullname == NULL) { diff --git a/contrib/bmake/unit-tests/deptgt-phony.exp b/contrib/bmake/unit-tests/deptgt-phony.exp index e943091e4cef..1c379b32a33b 100644 --- a/contrib/bmake/unit-tests/deptgt-phony.exp +++ b/contrib/bmake/unit-tests/deptgt-phony.exp @@ -2,7 +2,7 @@ Expanding "depsrc-phony-pr-15164-*-wildcard"... Expanding "deptgt-phony-pr-15164-*-wildcard"... Searching for .depend ... failed. -Searching for .depend ...[dot last]... +Searching for .depend ... . ... failed. Wildcard expanding "all"... diff --git a/usr.bin/bmake/Makefile.config b/usr.bin/bmake/Makefile.config index 55bc4a4370ca..e62d207b70ac 100644 --- a/usr.bin/bmake/Makefile.config +++ b/usr.bin/bmake/Makefile.config @@ -6,7 +6,7 @@ SRCTOP?= ${.CURDIR:H:H} # things set by configure -_MAKE_VERSION?=20240508 +_MAKE_VERSION?=20240520 prefix?= /usr srcdir= ${SRCTOP}/contrib/bmake From nobody Sat Jan 10 21:34:03 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2g5t7pz6MwyX for ; Sat, 10 Jan 2026 21:34:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpX2g2NQ1z3Qjs for ; Sat, 10 Jan 2026 21:34:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RZ+IPVjRnRxQNlkFpqv4FdO3vaoaLw9tfQWQyaiiVuA=; b=tgYcRt4wOX6LHg6XPk90FZ8o30i6ZtWF28s17VZ1GHrD7npDqofwiTESYBTTLfanHqjeKT aqcSMRqAnQQQJxwHTSCWEdovOeeQgvaxuvcvnL2QKPOHwS7NQYouConYECWkz3qLjxHbrr wTf7KGP3+nWdieaA5QuyV7tWCrXvJ0ceEHIqIx+3S0TTbBBPzSEhQzI+HDHTFtL4lofILr SKW0nmaJgQOOs+QyxxCBGnx/bODGvd3Y85PRfxnL4p5+GX3oKulJV0fIh2j1N9ctcNwXHz BUImPqKXK1q+bmw3Qa7I6Gsdsk26SW/9R1BiUMEYYJj2UKPFHFLHKeLaJEatAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RZ+IPVjRnRxQNlkFpqv4FdO3vaoaLw9tfQWQyaiiVuA=; b=G9hIKhMP/7Xxz6h9eXXSiUwvR0HImeG7rMIWmQVFcxHkmgVwS2DE6FPoQxseJiJ4OM9n/Z Qz01KK0x2WGk0z389uvq6pZXwqroyam8K0gxHq52n0ciC3kRU0+PhIjc+oEKFnuLMppzcm ODcIaiy33a060mHeFRcyNDRG4nCVzMd1ci32ad7GFqlpYSooLeyhEITiLSLulkW2b1uqm0 LCmRHx5McJR55u05EXYv3GEFDv54CMWjUUQo2UGwRL7Du5X0nHDHd163spiRgiXNoDsxC7 aK1kVWpgndNn6/yY2uhOKVsLCR9gVF10cQuPFPvVpLgb9UC9ZhTcTclO5qK7Jg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768080843; a=rsa-sha256; cv=none; b=U3xOvWIWuhgO1Q6UDa6kBMZzB/AgtS7ElmOiORjqHcev8SFMwYTMPMe/A2e40myCxbZ8Ei odsFz0TvywvbVGEXw5hr3THCp7gdh4FZupO6dnrAn01CQX5Q6MDVsuna7QPUFG7BJGgDqO uJmF5mU/M1VOuaY2hwjPtUvlgtIvZS/ZRpqmmSmOXMefynqNjRgMEOLEyXaVZTnqzdN97Z FqqMctKbdxw6KVHDizRkAiyPulvOnW1ozbaf2//X526IOid8lGYGkkwnl602sOVRNkFjgi X00ugsrPVX89qBmVMwAbO3IkjpVZF53NbkVJuGe3vNXbD3y+09La5U5asBQrXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2g1zddz1B8D for ; Sat, 10 Jan 2026 21:34:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25b1d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 21:34:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Simon J. Gerraty Subject: git: ba508f1da16d - stable/14 - Merge bmake-20240625 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ba508f1da16dd58684f03f06805b0f668e4c87b2 Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 21:34:03 +0000 Message-Id: <6962c5cb.25b1d.6c5aac51@gitrepo.freebsd.org> The branch stable/14 has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=ba508f1da16dd58684f03f06805b0f668e4c87b2 commit ba508f1da16dd58684f03f06805b0f668e4c87b2 Author: Simon J. Gerraty AuthorDate: 2024-06-29 00:19:51 +0000 Commit: Simon J. Gerraty CommitDate: 2026-01-10 21:33:12 +0000 Merge bmake-20240625 Merge commit 'dbb5be7f07456d02ce444484c683b130439acb45' (cherry picked from commit 8d5c8e21c690b35d0a9a604d6b886fba222cd2fe) --- contrib/bmake/ChangeLog | 49 ++++ contrib/bmake/VERSION | 2 +- contrib/bmake/arch.c | 15 +- contrib/bmake/bmake.1 | 33 ++- contrib/bmake/bmake.cat1 | 26 +- contrib/bmake/compat.c | 57 ++-- contrib/bmake/cond.c | 21 +- contrib/bmake/dir.c | 25 +- contrib/bmake/for.c | 34 +-- contrib/bmake/hash.c | 31 +-- contrib/bmake/hash.h | 4 +- contrib/bmake/job.c | 36 ++- contrib/bmake/main.c | 61 +++-- contrib/bmake/make.1 | 33 ++- contrib/bmake/make.c | 36 +-- contrib/bmake/make.h | 41 +-- contrib/bmake/meta.c | 25 +- contrib/bmake/mk/ChangeLog | 13 + contrib/bmake/mk/dirdeps.mk | 46 +++- contrib/bmake/mk/install-mk | 4 +- contrib/bmake/parse.c | 67 +++-- contrib/bmake/suff.c | 9 +- contrib/bmake/targ.c | 20 +- contrib/bmake/unit-tests/Makefile | 13 +- contrib/bmake/unit-tests/cond-func-empty.mk | 26 +- contrib/bmake/unit-tests/dep-duplicate.exp | 2 +- contrib/bmake/unit-tests/dep-duplicate.mk | 8 +- contrib/bmake/unit-tests/dep-var.exp | 4 +- contrib/bmake/unit-tests/dep-var.mk | 6 +- .../bmake/unit-tests/directive-export-literal.exp | 3 + .../bmake/unit-tests/directive-export-literal.mk | 25 +- contrib/bmake/unit-tests/directive-export.exp | 7 +- contrib/bmake/unit-tests/directive-export.mk | 8 +- contrib/bmake/unit-tests/directive-for-empty.exp | 7 +- contrib/bmake/unit-tests/directive-for-empty.mk | 26 +- contrib/bmake/unit-tests/directive-for-errors.mk | 4 +- contrib/bmake/unit-tests/export-all.mk | 4 +- contrib/bmake/unit-tests/opt-debug-hash.exp | 2 +- contrib/bmake/unit-tests/opt-debug-hash.mk | 7 +- contrib/bmake/unit-tests/parse-var.mk | 10 +- contrib/bmake/unit-tests/recursive.mk | 4 +- contrib/bmake/unit-tests/shell-csh.mk | 4 +- contrib/bmake/unit-tests/suff-incomplete.exp | 2 +- contrib/bmake/unit-tests/suff-main-several.exp | 2 +- contrib/bmake/unit-tests/var-eval-short.exp | 18 +- contrib/bmake/unit-tests/varmod-head.mk | 8 +- contrib/bmake/unit-tests/varmod-ifelse.mk | 4 +- contrib/bmake/unit-tests/varmod-loop.exp | 10 +- contrib/bmake/unit-tests/varmod-loop.mk | 16 +- contrib/bmake/unit-tests/varmod-match-escape.exp | 4 +- contrib/bmake/unit-tests/varmod-match-escape.mk | 6 +- contrib/bmake/unit-tests/varmod-match.exp | 22 +- contrib/bmake/unit-tests/varmod-match.mk | 27 +- contrib/bmake/unit-tests/varmod-sysv.exp | 2 + contrib/bmake/unit-tests/varmod-sysv.mk | 10 +- contrib/bmake/unit-tests/varmod-tail.mk | 10 +- contrib/bmake/unit-tests/varmod-to-separator.exp | 24 +- contrib/bmake/unit-tests/varmod-to-separator.mk | 15 +- contrib/bmake/unit-tests/varmod-undefined.mk | 51 +++- contrib/bmake/unit-tests/varmod.exp | 25 ++ contrib/bmake/unit-tests/varmod.mk | 125 ++++++++- .../bmake/unit-tests/varname-dot-make-level.exp | 3 + contrib/bmake/unit-tests/varname-dot-make-level.mk | 24 +- contrib/bmake/unit-tests/varname-dot-newline.exp | 5 + contrib/bmake/unit-tests/varname-dot-newline.mk | 13 +- contrib/bmake/unit-tests/varname-dot-objdir.exp | 1 + contrib/bmake/unit-tests/varname-dot-objdir.mk | 11 +- contrib/bmake/unit-tests/varparse-errors.mk | 4 +- contrib/bmake/var.c | 298 ++++++++++++--------- usr.bin/bmake/Makefile.config | 2 +- usr.bin/bmake/unit-tests/Makefile | 13 +- 71 files changed, 1029 insertions(+), 584 deletions(-) diff --git a/contrib/bmake/ChangeLog b/contrib/bmake/ChangeLog index 6d8a8228969d..8b6e0b2ea512 100644 --- a/contrib/bmake/ChangeLog +++ b/contrib/bmake/ChangeLog @@ -1,3 +1,52 @@ +2024-06-25 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240625 + Merge with NetBSD make, pick up + o job.c: ensure shellPath is always duped, avoid upsetting free() + +2024-06-16 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240616 + Merge with NetBSD make, pick up + o clean up collection of context information for error messages + o in warnings, move the word "warning" to the front + o var.c: throw an error on attempt to override an internal + read-only variable + +2024-06-10 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240610 + Merge with NetBSD make, pick up + o for.c: remove redundant shortcut for building the .for loop body + +2024-06-02 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240602 + Merge with NetBSD make, pick up + o rename some VarEvalMode constants to better match debug names. + o var.c: avoid out-of-bounds read when parsing indirect modifiers. + +2024-06-01 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240601 + Merge with NetBSD make, pick up + o add .export-all rather than allow .export with no argument + which can happen accidentally. + o if lua is available, run check-expect.lua after unit-tests + o main.c: use snprintf rather than strncpy + fix memory leak when purging realpath cache. + +2024-05-28 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240528 + Merge with NetBSD make, pick up + o fix a number of memory leaks + o replace magic numbers with POSIX FILENO constants + o hash.c: remove dead code from HashTable_DeleteEntry + o main.c: when complaining about unusable .OBJDIR + call PrintOnError if MAKE_DEBUG_OBJDIR_CHECK_WRITABLE is true. + o parse.c: use fewer technical terms in debug message for dependency + 2024-05-20 Simon J Gerraty * VERSION (_MAKE_VERSION): diff --git a/contrib/bmake/VERSION b/contrib/bmake/VERSION index 4af36cf84624..81837cc6765f 100644 --- a/contrib/bmake/VERSION +++ b/contrib/bmake/VERSION @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20240520 +_MAKE_VERSION=20240625 diff --git a/contrib/bmake/arch.c b/contrib/bmake/arch.c index 4e52532c780a..d8b467e02874 100644 --- a/contrib/bmake/arch.c +++ b/contrib/bmake/arch.c @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.217 2024/04/27 20:41:32 rillig Exp $ */ +/* $NetBSD: arch.c,v 1.219 2024/06/02 15:31:25 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -147,7 +147,7 @@ struct ar_hdr { #include "dir.h" /* "@(#)arch.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: arch.c,v 1.217 2024/04/27 20:41:32 rillig Exp $"); +MAKE_RCSID("$NetBSD: arch.c,v 1.219 2024/06/02 15:31:25 rillig Exp $"); typedef struct List ArchList; typedef struct ListNode ArchListNode; @@ -204,7 +204,7 @@ ArchFree(Arch *a) HashIter hi; HashIter_Init(&hi, &a->members); - while (HashIter_Next(&hi) != NULL) + while (HashIter_Next(&hi)) free(hi.entry->value); free(a->name); @@ -257,7 +257,8 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *scope) bool isError; /* XXX: is expanded twice: once here and once below */ - result = Var_Parse(&nested_p, scope, VARE_UNDEFERR); + result = Var_Parse(&nested_p, scope, + VARE_EVAL_DEFINED); /* TODO: handle errors */ isError = result.str == var_Error; FStr_Done(&result); @@ -272,7 +273,7 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *scope) spec[cp++ - spec] = '\0'; if (expandLib) - Var_Expand(&lib, scope, VARE_UNDEFERR); + Var_Expand(&lib, scope, VARE_EVAL_DEFINED); for (;;) { /* @@ -296,7 +297,7 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *scope) const char *nested_p = cp; result = Var_Parse(&nested_p, scope, - VARE_UNDEFERR); + VARE_EVAL_DEFINED); /* TODO: handle errors */ isError = result.str == var_Error; FStr_Done(&result); @@ -341,7 +342,7 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *scope) char *p; const char *unexpandedMem = mem.str; - Var_Expand(&mem, scope, VARE_UNDEFERR); + Var_Expand(&mem, scope, VARE_EVAL_DEFINED); /* * Now form an archive spec and recurse to deal with diff --git a/contrib/bmake/bmake.1 b/contrib/bmake/bmake.1 index d4e937424286..eb30d2173098 100644 --- a/contrib/bmake/bmake.1 +++ b/contrib/bmake/bmake.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.375 2024/03/10 02:53:37 sjg Exp $ +.\" $NetBSD: make.1,v 1.377 2024/06/01 06:26:36 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd March 9, 2024 +.Dd June 1, 2024 .Dt BMAKE 1 .Os .Sh NAME @@ -1143,9 +1143,19 @@ This mode can be used to detect undeclared dependencies between files. Used to create files in a separate directory, see .Va .OBJDIR . .It Va MAKE_OBJDIR_CHECK_WRITABLE -Used to force a separate directory for the created files, -even if that directory is not writable, see -.Va .OBJDIR . +When true, +.Nm +will check that +.Va .OBJDIR +is writable, and issue a warning if not. +.It Va MAKE_DEBUG_OBJDIR_CHECK_WRITABLE +When true and +.Nm +is warning about an unwritable +.Va .OBJDIR , +report the variables listed in +.Va MAKE_PRINT_VAR_ON_ERROR +to help debug. .It Va MAKEOBJDIRPREFIX Used to create files in a separate directory, see .Va .OBJDIR . @@ -1951,12 +1961,7 @@ The directives for exporting and unexporting variables are: .Bl -tag -width Ds .It Ic .export Ar variable No ... Export the specified global variable. -If no variable list is provided, all globals are exported -except for internal variables (those that start with -.Ql \&. ) . -This is not affected by the -.Fl X -flag, so should be used with caution. +.Pp For compatibility with other make programs, .Cm export Ar variable\| Ns Cm \&= Ns Ar value (without leading dot) is also accepted. @@ -1964,6 +1969,12 @@ For compatibility with other make programs, Appending a variable name to .Va .MAKE.EXPORTED is equivalent to exporting a variable. +.It Ic .export-all +Export all globals except for internal variables (those that start with +.Ql \&. ) . +This is not affected by the +.Fl X +flag, so should be used with caution. .It Ic .export-env Ar variable No ... The same as .Ql .export , diff --git a/contrib/bmake/bmake.cat1 b/contrib/bmake/bmake.cat1 index f2b05878e7e2..456885bc634c 100644 --- a/contrib/bmake/bmake.cat1 +++ b/contrib/bmake/bmake.cat1 @@ -756,8 +756,13 @@ VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS Used to create files in a separate directory, see _._O_B_J_D_I_R. _M_A_K_E___O_B_J_D_I_R___C_H_E_C_K___W_R_I_T_A_B_L_E - Used to force a separate directory for the created files, even if - that directory is not writable, see _._O_B_J_D_I_R. + When true, bbmmaakkee will check that _._O_B_J_D_I_R is writable, and issue a + warning if not. + + _M_A_K_E___D_E_B_U_G___O_B_J_D_I_R___C_H_E_C_K___W_R_I_T_A_B_L_E + When true and bbmmaakkee is warning about an unwritable _._O_B_J_D_I_R, + report the variables listed in _M_A_K_E___P_R_I_N_T___V_A_R___O_N___E_R_R_O_R to help + debug. _M_A_K_E_O_B_J_D_I_R_P_R_E_F_I_X Used to create files in a separate directory, see _._O_B_J_D_I_R. @@ -1230,16 +1235,19 @@ DDIIRREECCTTIIVVEESS The directives for exporting and unexporting variables are: ..eexxppoorrtt _v_a_r_i_a_b_l_e ... - Export the specified global variable. If no variable list is - provided, all globals are exported except for internal variables - (those that start with `.'). This is not affected by the --XX - flag, so should be used with caution. For compatibility with - other make programs, eexxppoorrtt _v_a_r_i_a_b_l_e==_v_a_l_u_e (without leading dot) - is also accepted. + Export the specified global variable. + + For compatibility with other make programs, eexxppoorrtt _v_a_r_i_a_b_l_e==_v_a_l_u_e + (without leading dot) is also accepted. Appending a variable name to _._M_A_K_E_._E_X_P_O_R_T_E_D is equivalent to exporting a variable. + ..eexxppoorrtt--aallll + Export all globals except for internal variables (those that + start with `.'). This is not affected by the --XX flag, so should + be used with caution. + ..eexxppoorrtt--eennvv _v_a_r_i_a_b_l_e ... The same as `.export', except that the variable is not appended to _._M_A_K_E_._E_X_P_O_R_T_E_D. This allows exporting a value to the @@ -1780,4 +1788,4 @@ BBUUGGSS attempt to suppress a cascade of unnecessary errors, can result in a seemingly unexplained `*** Error code 6' -FreeBSD 13.2-RELEASE-p10 March 9, 2024 FreeBSD 13.2-RELEASE-p10 +FreeBSD 13.2-RELEASE-p11 June 1, 2024 FreeBSD 13.2-RELEASE-p11 diff --git a/contrib/bmake/compat.c b/contrib/bmake/compat.c index 3a8b1c4b2640..5d1b3ab52344 100644 --- a/contrib/bmake/compat.c +++ b/contrib/bmake/compat.c @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.255 2024/04/20 10:18:55 rillig Exp $ */ +/* $NetBSD: compat.c,v 1.259 2024/06/15 20:02:45 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -94,7 +94,7 @@ #include "pathnames.h" /* "@(#)compat.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: compat.c,v 1.255 2024/04/20 10:18:55 rillig Exp $"); +MAKE_RCSID("$NetBSD: compat.c,v 1.259 2024/06/15 20:02:45 rillig Exp $"); static GNode *curTarg = NULL; static pid_t compatChild; @@ -203,6 +203,24 @@ UseShell(const char *cmd MAKE_ATTR_UNUSED) #endif } +static int +Compat_Spawn(const char **av) +{ + int pid = vfork(); + if (pid < 0) + Fatal("Could not fork"); + + if (pid == 0) { +#ifdef USE_META + if (useMeta) + meta_compat_child(); +#endif + (void)execvp(av[0], (char *const *)UNCONST(av)); + execDie("exec", av[0]); + } + return pid; +} + /* * Execute the next command for a target. If the command returns an error, * the node's made field is set to ERROR and creation stops. @@ -225,21 +243,18 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln) volatile bool errCheck; /* Check errors */ WAIT_T reason; /* Reason for child's death */ WAIT_T status; /* Description of child's death */ - pid_t cpid; /* Child actually found */ pid_t retstat; /* Result of wait */ - const char **volatile av; /* Argument vector for thing to exec */ + const char **av; /* Arguments for the child process */ char **volatile mav; /* Copy of the argument vector for freeing */ bool useShell; /* True if command should be executed using a * shell */ - const char *volatile cmd = cmdp; + const char *cmd = cmdp; silent = (gn->type & OP_SILENT) != OP_NONE; errCheck = !(gn->type & OP_IGNORE); doIt = false; - EvalStack_Push(gn->name, NULL, NULL); - cmdStart = Var_Subst(cmd, gn, VARE_WANTRES); - EvalStack_Pop(); + cmdStart = Var_SubstInTarget(cmd, gn); /* TODO: handle errors */ if (cmdStart[0] == '\0') { @@ -264,11 +279,13 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln) * usual '$$'. */ Lst_Append(&endNode->commands, cmdStart); - return true; + goto register_command; } } if (strcmp(cmdStart, "...") == 0) { gn->type |= OP_SAVE_CMDS; + register_command: + Parse_RegisterCommand(cmdStart); return true; } @@ -288,7 +305,7 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln) while (ch_isspace(*cmd)) cmd++; if (cmd[0] == '\0') - return true; + goto register_command; useShell = UseShell(cmd); @@ -298,7 +315,7 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln) } if (!doIt && !GNode_ShouldExecute(gn)) - return true; + goto register_command; DEBUG1(JOB, "Execute: '%s'\n", cmd); @@ -333,19 +350,7 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln) Var_ReexportVars(gn); - compatChild = cpid = vfork(); - if (cpid < 0) - Fatal("Could not fork"); - - if (cpid == 0) { -#ifdef USE_META - if (useMeta) - meta_compat_child(); -#endif - (void)execvp(av[0], (char *const *)UNCONST(av)); - execDie("exec", av[0]); - } - + compatChild = Compat_Spawn(av); free(mav); free(bp); @@ -355,11 +360,11 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln) #ifdef USE_META if (useMeta) - meta_compat_parent(cpid); + meta_compat_parent(compatChild); #endif /* The child is off and running. Now all we can do is wait... */ - while ((retstat = wait(&reason)) != cpid) { + while ((retstat = wait(&reason)) != compatChild) { if (retstat > 0) JobReapChild(retstat, reason, false); /* not ours? */ if (retstat == -1 && errno != EINTR) diff --git a/contrib/bmake/cond.c b/contrib/bmake/cond.c index 5001677303e2..a6a73fe337dd 100644 --- a/contrib/bmake/cond.c +++ b/contrib/bmake/cond.c @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.363 2024/04/23 22:51:28 rillig Exp $ */ +/* $NetBSD: cond.c,v 1.365 2024/06/02 15:31:25 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -91,7 +91,7 @@ #include "dir.h" /* "@(#)cond.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: cond.c,v 1.363 2024/04/23 22:51:28 rillig Exp $"); +MAKE_RCSID("$NetBSD: cond.c,v 1.365 2024/06/02 15:31:25 rillig Exp $"); /* * Conditional expressions conform to this grammar: @@ -222,8 +222,8 @@ ParseWord(const char **pp, bool doEval) break; if (ch == '$') { VarEvalMode emode = doEval - ? VARE_UNDEFERR - : VARE_PARSE_ONLY; + ? VARE_EVAL_DEFINED + : VARE_PARSE; /* * TODO: make Var_Parse complain about undefined * variables. @@ -396,9 +396,9 @@ CondParser_StringExpr(CondParser *par, const char *start, const char *p; bool atStart; /* true means an expression outside quotes */ - emode = doEval && quoted ? VARE_WANTRES - : doEval ? VARE_UNDEFERR - : VARE_PARSE_ONLY; + emode = doEval && quoted ? VARE_EVAL + : doEval ? VARE_EVAL_DEFINED + : VARE_PARSE; p = par->p; atStart = p == start; @@ -651,8 +651,7 @@ CondParser_FuncCallEmpty(CondParser *par, bool doEval, Token *out_token) return false; p--; /* Make p[1] point to the '('. */ - val = Var_Parse(&p, SCOPE_CMDLINE, - doEval ? VARE_WANTRES : VARE_PARSE_ONLY); + val = Var_Parse(&p, SCOPE_CMDLINE, doEval ? VARE_EVAL : VARE_PARSE); /* TODO: handle errors */ if (val.str == var_Error) @@ -736,8 +735,10 @@ CondParser_ComparisonOrLeaf(CondParser *par, bool doEval) arg = ParseWord(&p, doEval); assert(arg[0] != '\0'); - if (*p == '=' || *p == '!' || *p == '<' || *p == '>') + if (*p == '=' || *p == '!' || *p == '<' || *p == '>') { + free(arg); return CondParser_Comparison(par, doEval); + } par->p = p; /* diff --git a/contrib/bmake/dir.c b/contrib/bmake/dir.c index de50b2faf511..860697120db0 100644 --- a/contrib/bmake/dir.c +++ b/contrib/bmake/dir.c @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.290 2024/05/20 19:14:12 sjg Exp $ */ +/* $NetBSD: dir.c,v 1.294 2024/05/31 05:50:11 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -132,7 +132,7 @@ #include "job.h" /* "@(#)dir.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: dir.c,v 1.290 2024/05/20 19:14:12 sjg Exp $"); +MAKE_RCSID("$NetBSD: dir.c,v 1.294 2024/05/31 05:50:11 rillig Exp $"); /* * A search path is a list of CachedDir structures. A CachedDir has in it the @@ -501,6 +501,18 @@ Dir_InitDot(void) Dir_SetPATH(); /* initialize */ } +#ifdef CLEANUP +static void +FreeCachedTable(HashTable *tbl) +{ + HashIter hi; + HashIter_Init(&hi, tbl); + while (HashIter_Next(&hi)) + free(hi.entry->value); + HashTable_Done(tbl); +} +#endif + /* Clean up the directories module. */ void Dir_End(void) @@ -511,8 +523,8 @@ Dir_End(void) CachedDir_Assign(&dotLast, NULL); SearchPath_Clear(&dirSearchPath); OpenDirs_Done(&openDirs); - HashTable_Done(&mtimes); - HashTable_Done(&lmtimes); + FreeCachedTable(&mtimes); + FreeCachedTable(&lmtimes); #endif } @@ -568,7 +580,7 @@ Dir_SetSYSPATH(void) CachedDirListNode *ln; SearchPath *path = Lst_IsEmpty(&sysIncPath->dirs) ? defSysIncPath : sysIncPath; - + Var_ReadOnly(".SYSPATH", false); Global_Delete(".SYSPATH"); for (ln = path->dirs.first; ln != NULL; ln = ln->next) { @@ -644,7 +656,7 @@ DirMatchFiles(const char *pattern, CachedDir *dir, StringList *expansions) */ HashIter_InitSet(&hi, &dir->files); - while (HashIter_Next(&hi) != NULL) { + while (HashIter_Next(&hi)) { const char *base = hi.entry->key; StrMatchResult res = Str_Match(base, pattern); /* TODO: handle errors from res.error */ @@ -864,6 +876,7 @@ SearchPath_ExpandMiddle(SearchPath *path, const char *pattern, (void)SearchPath_Add(partPath, dirpath); DirExpandPath(wildcardComponent + 1, partPath, expansions); SearchPath_Free(partPath); + free(dirpath); } /* diff --git a/contrib/bmake/for.c b/contrib/bmake/for.c index 91d9b8e13ce6..1563c2313963 100644 --- a/contrib/bmake/for.c +++ b/contrib/bmake/for.c @@ -1,4 +1,4 @@ -/* $NetBSD: for.c,v 1.179 2024/04/01 12:33:27 rillig Exp $ */ +/* $NetBSD: for.c,v 1.182 2024/06/07 18:57:30 rillig Exp $ */ /* * Copyright (c) 1992, The Regents of the University of California. @@ -58,7 +58,7 @@ #include "make.h" /* "@(#)for.c 8.1 (Berkeley) 6/6/93" */ -MAKE_RCSID("$NetBSD: for.c,v 1.179 2024/04/01 12:33:27 rillig Exp $"); +MAKE_RCSID("$NetBSD: for.c,v 1.182 2024/06/07 18:57:30 rillig Exp $"); typedef struct ForLoop { @@ -156,7 +156,8 @@ ForLoop_ParseVarnames(ForLoop *f, const char **pp) cpp_skip_whitespace(&p); if (*p == '\0') { Parse_Error(PARSE_FATAL, "missing `in' in for"); - f->vars.len = 0; + while (f->vars.len > 0) + free(*(char **)Vector_Pop(&f->vars)); return; } @@ -166,7 +167,8 @@ ForLoop_ParseVarnames(ForLoop *f, const char **pp) "invalid character '%c' " "in .for loop variable name", p[len]); - f->vars.len = 0; + while (f->vars.len > 0) + free(*(char **)Vector_Pop(&f->vars)); return; } } @@ -195,7 +197,7 @@ ForLoop_ParseItems(ForLoop *f, const char *p) cpp_skip_whitespace(&p); - items = Var_Subst(p, SCOPE_GLOBAL, VARE_WANTRES); + items = Var_Subst(p, SCOPE_GLOBAL, VARE_EVAL); /* TODO: handle errors */ f->items = Substring_Words(items, false); @@ -329,23 +331,6 @@ ExprLen(const char *s, const char *e) return 0; } -/* - * The .for loop substitutes the items as ${:U...}, which means - * that characters that break this syntax must be backslash-escaped. - */ -static bool -NeedsEscapes(Substring value, char endc) -{ - const char *p; - - for (p = value.start; p != value.end; p++) { - if (*p == ':' || *p == '$' || *p == '\\' || *p == endc || - *p == '\n') - return true; - } - return false; -} - /* * While expanding the body of a .for loop, write the item as a ${:U...} * expression, escaping characters as needed. The result is later unescaped @@ -357,11 +342,6 @@ AddEscaped(Buffer *cmds, Substring item, char endc) const char *p; char ch; - if (!NeedsEscapes(item, endc)) { - Buf_AddRange(cmds, item.start, item.end); - return; - } - for (p = item.start; p != item.end;) { ch = *p; if (ch == '$') { diff --git a/contrib/bmake/hash.c b/contrib/bmake/hash.c index 88d41c2c0f6f..bc7279d7a994 100644 --- a/contrib/bmake/hash.c +++ b/contrib/bmake/hash.c @@ -1,4 +1,4 @@ -/* $NetBSD: hash.c,v 1.74 2023/12/19 19:33:39 rillig Exp $ */ +/* $NetBSD: hash.c,v 1.78 2024/06/05 22:06:53 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -74,7 +74,7 @@ #include "make.h" /* "@(#)hash.c 8.1 (Berkeley) 6/6/93" */ -MAKE_RCSID("$NetBSD: hash.c,v 1.74 2023/12/19 19:33:39 rillig Exp $"); +MAKE_RCSID("$NetBSD: hash.c,v 1.78 2024/06/05 22:06:53 rillig Exp $"); /* * The ratio of # entries to # buckets at which we rebuild the table to @@ -288,24 +288,19 @@ void HashTable_DeleteEntry(HashTable *t, HashEntry *he) { HashEntry **ref = &t->buckets[he->hash & t->bucketsMask]; - HashEntry *p; - - for (; (p = *ref) != NULL; ref = &p->next) { - if (p == he) { - *ref = p->next; - free(p); - t->numEntries--; - return; - } - } - abort(); + + for (; *ref != he; ref = &(*ref)->next) + continue; + *ref = he->next; + free(he); + t->numEntries--; } /* - * Return the next entry in the hash table, or NULL if the end of the table - * is reached. + * Place the next entry from the hash table in hi->entry, or return false if + * the end of the table is reached. */ -HashEntry * +bool HashIter_Next(HashIter *hi) { HashTable *t = hi->table; @@ -318,11 +313,11 @@ HashIter_Next(HashIter *hi) while (he == NULL) { /* find the next nonempty chain */ if (hi->nextBucket >= bucketsSize) - return NULL; + return false; he = buckets[hi->nextBucket++]; } hi->entry = he; - return he; + return true; } void diff --git a/contrib/bmake/hash.h b/contrib/bmake/hash.h index 2bee685b7ebb..9201c65025c7 100644 --- a/contrib/bmake/hash.h +++ b/contrib/bmake/hash.h @@ -1,4 +1,4 @@ -/* $NetBSD: hash.h,v 1.48 2023/12/19 19:33:39 rillig Exp $ */ +/* $NetBSD: hash.h,v 1.50 2024/06/01 10:10:50 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -140,7 +140,7 @@ void HashTable_Set(HashTable *, const char *, void *); void HashTable_DeleteEntry(HashTable *, HashEntry *); void HashTable_DebugStats(HashTable *, const char *); -HashEntry *HashIter_Next(HashIter *); +bool HashIter_Next(HashIter *) MAKE_ATTR_USE; MAKE_INLINE void HashSet_Init(HashSet *set) diff --git a/contrib/bmake/job.c b/contrib/bmake/job.c index 541a61294766..a5c3d704e4a1 100644 --- a/contrib/bmake/job.c +++ b/contrib/bmake/job.c @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.471 2024/05/07 18:26:22 sjg Exp $ */ +/* $NetBSD: job.c,v 1.477 2024/06/25 05:18:38 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -154,7 +154,7 @@ #include "trace.h" /* "@(#)job.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: job.c,v 1.471 2024/05/07 18:26:22 sjg Exp $"); +MAKE_RCSID("$NetBSD: job.c,v 1.477 2024/06/25 05:18:38 rillig Exp $"); /* * A shell defines how the commands are run. All commands for a target are @@ -930,9 +930,7 @@ JobWriteCommand(Job *job, ShellWriter *wr, StringListNode *ln, const char *ucmd) run = GNode_ShouldExecute(job->node); - EvalStack_Push(job->node->name, NULL, NULL); - xcmd = Var_Subst(ucmd, job->node, VARE_WANTRES); - EvalStack_Pop(); + xcmd = Var_SubstInTarget(ucmd, job->node); /* TODO: handle errors */ xcmdStart = xcmd; @@ -1059,11 +1057,10 @@ JobSaveCommands(Job *job) * variables such as .TARGET, .IMPSRC. It is not intended to * expand the other variables as well; see deptgt-end.mk. */ - EvalStack_Push(job->node->name, NULL, NULL); - expanded_cmd = Var_Subst(cmd, job->node, VARE_WANTRES); - EvalStack_Pop(); + expanded_cmd = Var_SubstInTarget(cmd, job->node); /* TODO: handle errors */ Lst_Append(&Targ_GetEndNode()->commands, expanded_cmd); + Parse_RegisterCommand(expanded_cmd); } } @@ -1098,7 +1095,7 @@ DebugFailedJob(const Job *job) debug_printf("\t%s\n", cmd); if (strchr(cmd, '$') != NULL) { - char *xcmd = Var_Subst(cmd, job->node, VARE_WANTRES); + char *xcmd = Var_Subst(cmd, job->node, VARE_EVAL); debug_printf("\t=> %s\n", xcmd); free(xcmd); } @@ -1484,11 +1481,11 @@ JobExec(Job *job, char **argv) * was marked close-on-exec, we must clear that bit in the * new input. */ - if (dup2(fileno(job->cmdFILE), 0) == -1) + if (dup2(fileno(job->cmdFILE), STDIN_FILENO) == -1) execDie("dup2", "job->cmdFILE"); - if (fcntl(0, F_SETFD, 0) == -1) + if (fcntl(STDIN_FILENO, F_SETFD, 0) == -1) execDie("fcntl clear close-on-exec", "stdin"); - if (lseek(0, 0, SEEK_SET) == -1) + if (lseek(STDIN_FILENO, 0, SEEK_SET) == -1) execDie("lseek to 0", "stdin"); if (Always_pass_job_queue || @@ -1506,18 +1503,18 @@ JobExec(Job *job, char **argv) * Set up the child's output to be routed through the pipe * we've created for it. */ - if (dup2(job->outPipe, 1) == -1) + if (dup2(job->outPipe, STDOUT_FILENO) == -1) execDie("dup2", "job->outPipe"); /* * The output channels are marked close on exec. This bit - * was duplicated by the dup2(on some systems), so we have + * was duplicated by dup2 (on some systems), so we have * to clear it before routing the shell's error output to * the same place as its standard output. */ - if (fcntl(1, F_SETFD, 0) == -1) + if (fcntl(STDOUT_FILENO, F_SETFD, 0) == -1) execDie("clear close-on-exec", "stdout"); - if (dup2(1, 2) == -1) + if (dup2(STDOUT_FILENO, STDERR_FILENO) == -1) execDie("dup2", "1, 2"); /* @@ -2172,7 +2169,7 @@ InitShellNameAndPath(void) #ifdef DEFSHELL_CUSTOM if (shellName[0] == '/') { - shellPath = shellName; + shellPath = bmake_strdup(shellName); shellName = str_basename(shellPath); return; } @@ -2229,7 +2226,7 @@ Job_SetPrefix(void) Global_Set(".MAKE.JOB.PREFIX", "---"); targPrefix = Var_Subst("${.MAKE.JOB.PREFIX}", - SCOPE_GLOBAL, VARE_WANTRES); + SCOPE_GLOBAL, VARE_EVAL); /* TODO: handle errors */ } @@ -2525,7 +2522,8 @@ Job_ParseShell(char *line) } } } else { - shellPath = path; + free(UNCONST(shellPath)); + shellPath = bmake_strdup(path); shellName = newShell.name != NULL ? newShell.name : str_basename(path); if (!fullSpec) { diff --git a/contrib/bmake/main.c b/contrib/bmake/main.c index 6c97d648e5a2..de2f486c15d9 100644 --- a/contrib/bmake/main.c +++ b/contrib/bmake/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.616 2024/05/19 17:55:54 sjg Exp $ */ +/* $NetBSD: main.c,v 1.624 2024/06/02 15:31:26 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -111,7 +111,7 @@ #include "trace.h" /* "@(#)main.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: main.c,v 1.616 2024/05/19 17:55:54 sjg Exp $"); +MAKE_RCSID("$NetBSD: main.c,v 1.624 2024/06/02 15:31:26 rillig Exp $"); #if defined(MAKE_NATIVE) __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 " "The Regents of the University of California. " @@ -372,7 +372,7 @@ MainParseArgChdir(const char *argvalue) stat(curdir, &sb) != -1 && sa.st_ino == sb.st_ino && sa.st_dev == sb.st_dev) - strncpy(curdir, argvalue, MAXPATHLEN); + snprintf(curdir, MAXPATHLEN, "%s", argvalue); ignorePWD = true; } @@ -743,6 +743,10 @@ Main_SetObjdir(bool writable, const char *fmt, ...) if ((writable && access(path, W_OK) != 0) || chdir(path) != 0) { (void)fprintf(stderr, "%s: warning: %s: %s.\n", progname, path, strerror(errno)); + /* Allow debugging how we got here - not always obvious */ + if (GetBooleanExpr("${MAKE_DEBUG_OBJDIR_CHECK_WRITABLE}", + false)) + PrintOnError(NULL, ""); return false; } @@ -766,7 +770,7 @@ SetVarObjdir(bool writable, const char *var, const char *suffix) return false; } - Var_Expand(&path, SCOPE_GLOBAL, VARE_WANTRES); + Var_Expand(&path, SCOPE_GLOBAL, VARE_EVAL); (void)Main_SetObjdir(writable, "%s%s", path.str, suffix); @@ -808,8 +812,7 @@ siginfo(int signo MAKE_ATTR_UNUSED) static void MakeMode(void) { - char *mode = Var_Subst("${.MAKE.MODE:tl}", - SCOPE_GLOBAL, VARE_WANTRES); + char *mode = Var_Subst("${.MAKE.MODE:tl}", SCOPE_GLOBAL, VARE_EVAL); /* TODO: handle errors */ if (mode[0] != '\0') { @@ -832,14 +835,14 @@ static void PrintVar(const char *varname, bool expandVars) { if (strchr(varname, '$') != NULL) { - char *evalue = Var_Subst(varname, SCOPE_GLOBAL, VARE_WANTRES); + char *evalue = Var_Subst(varname, SCOPE_GLOBAL, VARE_EVAL); /* TODO: handle errors */ printf("%s\n", evalue); free(evalue); } else if (expandVars) { char *expr = str_concat3("${", varname, "}"); - char *evalue = Var_Subst(expr, SCOPE_GLOBAL, VARE_WANTRES); + char *evalue = Var_Subst(expr, SCOPE_GLOBAL, VARE_EVAL); /* TODO: handle errors */ free(expr); printf("%s\n", evalue); @@ -865,7 +868,7 @@ GetBooleanExpr(const char *expr, bool fallback) char *value; bool res; - value = Var_Subst(expr, SCOPE_GLOBAL, VARE_WANTRES); + value = Var_Subst(expr, SCOPE_GLOBAL, VARE_EVAL); *** 3147 LINES SKIPPED *** From nobody Sat Jan 10 21:34:04 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2j3NKlz6MxD1 for ; Sat, 10 Jan 2026 21:34:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpX2h4hqCz3QWG for ; Sat, 10 Jan 2026 21:34:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hxSqIyyzzYQhAgG8/GDIEJhkzGv1TaWMuBeIx4/gesA=; b=veo8eJBHFQ+qu9HdAVw/b46Lv99DFMOPXEwu3kab82ZKCX18DAtnkEOJBr90Rl0o0CFgZl V8k6ochvMCxQrjs2lTvW5wPa/ztZgPMVbLj/epYHx6ZNBNpExMnoHXUoKo7S0FPty6Izog SigB+FFFsgohlf11w4qX1lJBidxztliecfCUPreRPCrs4xrcilh2rF4p2vTMkxzh9zZRit TbLHfkZIiEdoONX3EpY5EtH3DmlP/TonydJ6FWcSIwmHDvXJetpuG4+dhQ2Yj1hAKmxENn YsNzG9GCGg30hA1ZoXDao2vt/S5GiR0+XtjmUIJTKsh+ncbO+KT+wTMZXDveLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hxSqIyyzzYQhAgG8/GDIEJhkzGv1TaWMuBeIx4/gesA=; b=HtyZSAtjuke3jrgtNpQLlKzUdAyCqemtRdc31PZz9PHVTpJ/143M+3eKt/vKQk31GX2tGV 4WnRYJD7HobSEXcqp04XSzg0b53aQH0J49sgEW/2doGlLbojqP6Pk8xH4bgX/tIuUXM1Hw edEpP44NJqaRDAxoz8zyV1TSPlGQ+3J9xF3eZMqPk4XOtigZqLC2ep+pfsU7KCTN+B2F4a tLg1KrMwIL+H1b6dTynY/Q6ZJDhWnQ2nedovUEmeZJPRTEpq1sMKrL3tOLflrdvh0+xLLy RP3Bo31DHMayXDB9ABZ4dLzfGkO9Kx0oapCukBcb39O0gO/cgGgWw6u4fmmnZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768080844; a=rsa-sha256; cv=none; b=ybI/qBCO85djSsmxtYMPz4ClJlb5tatezRwDQZduBshOOI7bo+iDIxmw3JLUGESEiCwq7e N5TpIAU4xpHC+ahpiHLVEd+pvYH/HPfTI8dhqffNwSUTWY7QiHCyIhPk/U2hR0wJ0SXKzd VSL0mV7JIh7pCpWXoM7bPenTTsxZVvnOSAYc2qVhdTOIZQ3teyTf72qMJxhU1Q08geUldf zi73/Ow/Df9yLcjrqtCWglmkvlAvvygh/JppeKsJkAEEAEVCLz6+u3knhDBCYnOEmAZihv DMAeh1N4XQ6UeELtXjL+QiJ4pl5Hs5LqYNDLbB6599gX0f7CO2aN2ap62X4SOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2h3k4Tz1BVq for ; Sat, 10 Jan 2026 21:34:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23c64 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 21:34:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Simon J. Gerraty Subject: git: fa86ef7f23ae - stable/14 - Merge bmake-20240711 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: fa86ef7f23aee51a6d7dac33d89d657df50aae3c Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 21:34:04 +0000 Message-Id: <6962c5cc.23c64.3244cbe8@gitrepo.freebsd.org> The branch stable/14 has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=fa86ef7f23aee51a6d7dac33d89d657df50aae3c commit fa86ef7f23aee51a6d7dac33d89d657df50aae3c Author: Simon J. Gerraty AuthorDate: 2024-07-20 19:43:11 +0000 Commit: Simon J. Gerraty CommitDate: 2026-01-10 21:33:12 +0000 Merge bmake-20240711 Merge commit '84691af93185c692058ba55fa81a04103f5bf71b' (cherry picked from commit 226192822cddc30cacecd55bccb48f39c653058c) --- contrib/bmake/ChangeLog | 83 ++ contrib/bmake/FILES | 2 + contrib/bmake/VERSION | 2 +- contrib/bmake/arch.c | 10 +- contrib/bmake/bmake.1 | 7 +- contrib/bmake/bmake.cat1 | 73 +- contrib/bmake/compat.c | 28 +- contrib/bmake/cond.c | 8 +- contrib/bmake/config.h.in | 137 +- contrib/bmake/configure | 1338 +++++++++++--------- contrib/bmake/configure.in | 13 +- contrib/bmake/dir.c | 8 +- contrib/bmake/dir.h | 4 +- contrib/bmake/hash.c | 33 +- contrib/bmake/hash.h | 5 +- contrib/bmake/job.c | 18 +- contrib/bmake/job.h | 6 +- contrib/bmake/main.c | 127 +- contrib/bmake/make.1 | 7 +- contrib/bmake/make.h | 20 +- contrib/bmake/meta.c | 3 + contrib/bmake/mk/install-mk | 0 contrib/bmake/parse.c | 31 +- contrib/bmake/str.c | 12 +- contrib/bmake/str.h | 4 +- contrib/bmake/suff.c | 9 +- contrib/bmake/targ.c | 15 +- contrib/bmake/unit-tests/Makefile | 32 +- contrib/bmake/unit-tests/cmd-errors-jobs.exp | 6 +- contrib/bmake/unit-tests/cmd-errors-jobs.mk | 17 +- contrib/bmake/unit-tests/cmd-errors-lint.exp | 4 +- contrib/bmake/unit-tests/cmd-errors-lint.mk | 23 +- contrib/bmake/unit-tests/cmd-errors.exp | 6 +- contrib/bmake/unit-tests/cmd-errors.mk | 21 +- contrib/bmake/unit-tests/compat-error.exp | 2 +- contrib/bmake/unit-tests/cond-cmp-numeric.exp | 2 +- contrib/bmake/unit-tests/cond-func-defined.exp | 2 +- contrib/bmake/unit-tests/cond-func.exp | 12 +- contrib/bmake/unit-tests/cond-func.mk | 13 +- contrib/bmake/unit-tests/cond-late.exp | 5 +- contrib/bmake/unit-tests/cond-late.mk | 14 +- contrib/bmake/unit-tests/cond-op-and.exp | 12 +- contrib/bmake/unit-tests/cond-op-and.mk | 27 +- contrib/bmake/unit-tests/cond-op-not.exp | 2 +- contrib/bmake/unit-tests/cond-op-or.exp | 12 +- contrib/bmake/unit-tests/cond-op-or.mk | 53 +- contrib/bmake/unit-tests/cond-op-parentheses.exp | 2 +- contrib/bmake/unit-tests/cond-op.exp | 2 +- contrib/bmake/unit-tests/cond-short.exp | 2 +- contrib/bmake/unit-tests/cond-token-number.exp | 2 +- contrib/bmake/unit-tests/cond-token-string.exp | 4 +- contrib/bmake/unit-tests/cond-token-string.mk | 4 +- contrib/bmake/unit-tests/dep-op-missing.exp | 1 + contrib/bmake/unit-tests/dep-percent.exp | 2 +- contrib/bmake/unit-tests/dep-var.exp | 2 +- contrib/bmake/unit-tests/dep.exp | 2 +- contrib/bmake/unit-tests/depsrc-ignore.exp | 2 +- .../unit-tests/deptgt-begin-fail-indirect.exp | 2 +- contrib/bmake/unit-tests/deptgt-begin-fail.exp | 2 +- .../bmake/unit-tests/deptgt-delete_on_error.exp | 14 +- contrib/bmake/unit-tests/deptgt-end-fail-all.exp | 2 +- .../bmake/unit-tests/deptgt-end-fail-indirect.exp | 2 +- contrib/bmake/unit-tests/deptgt-end-fail.exp | 30 +- contrib/bmake/unit-tests/deptgt-error.exp | 2 +- contrib/bmake/unit-tests/deptgt-ignore.exp | 2 +- contrib/bmake/unit-tests/deptgt-path-suffix.exp | 2 +- contrib/bmake/unit-tests/deptgt.exp | 5 +- contrib/bmake/unit-tests/deptgt.mk | 21 +- contrib/bmake/unit-tests/directive-dinclude.exp | 3 +- contrib/bmake/unit-tests/directive-elif.exp | 2 +- contrib/bmake/unit-tests/directive-else.exp | 2 +- .../bmake/unit-tests/directive-export-gmake.exp | 1 + contrib/bmake/unit-tests/directive-for-break.exp | 1 + contrib/bmake/unit-tests/directive-for-errors.exp | 16 +- contrib/bmake/unit-tests/directive-for-errors.mk | 18 +- contrib/bmake/unit-tests/directive-for-escape.exp | 114 +- contrib/bmake/unit-tests/directive-for-escape.mk | 96 +- .../unit-tests/directive-for-generating-endif.exp | 5 +- contrib/bmake/unit-tests/directive-for-if.exp | 5 +- contrib/bmake/unit-tests/directive-for-null.exp | 3 +- contrib/bmake/unit-tests/directive-for.exp | 42 +- contrib/bmake/unit-tests/directive-for.mk | 42 +- .../bmake/unit-tests/directive-hyphen-include.exp | 3 +- contrib/bmake/unit-tests/directive-ifmake.exp | 2 +- .../bmake/unit-tests/directive-include-fatal.exp | 2 +- contrib/bmake/unit-tests/directive-include.exp | 4 +- contrib/bmake/unit-tests/directive-include.mk | 4 +- contrib/bmake/unit-tests/directive-info.exp | 2 +- contrib/bmake/unit-tests/directive-sinclude.exp | 3 +- contrib/bmake/unit-tests/directive-undef.exp | 4 +- contrib/bmake/unit-tests/directive-undef.mk | 4 +- .../bmake/unit-tests/directive-unexport-env.exp | 2 +- contrib/bmake/unit-tests/directive-warning.exp | 2 +- contrib/bmake/unit-tests/directive.exp | 2 +- contrib/bmake/unit-tests/doterror.exp | 2 +- .../bmake/unit-tests/jobs-empty-commands-error.exp | 2 +- contrib/bmake/unit-tests/jobs-error-indirect.exp | 4 +- .../bmake/unit-tests/jobs-error-nested-make.exp | 6 +- contrib/bmake/unit-tests/jobs-error-nested.exp | 8 +- contrib/bmake/unit-tests/lint.exp | 2 +- contrib/bmake/unit-tests/moderrs.exp | 110 +- contrib/bmake/unit-tests/moderrs.mk | 78 +- contrib/bmake/unit-tests/opt-debug-errors-jobs.exp | 12 +- contrib/bmake/unit-tests/opt-debug-errors.exp | 2 +- contrib/bmake/unit-tests/opt-debug-file.exp | 8 +- contrib/bmake/unit-tests/opt-debug-file.mk | 15 +- contrib/bmake/unit-tests/opt-debug-graph2.exp | 2 +- contrib/bmake/unit-tests/opt-debug-graph3.exp | 2 +- contrib/bmake/unit-tests/opt-debug-hash.exp | 4 +- contrib/bmake/unit-tests/opt-debug-lint.exp | 6 +- contrib/bmake/unit-tests/opt-debug-lint.mk | 8 +- contrib/bmake/unit-tests/opt-file.exp | 3 +- .../bmake/unit-tests/opt-keep-going-indirect.exp | 8 +- .../bmake/unit-tests/opt-keep-going-multiple.exp | 2 +- contrib/bmake/unit-tests/opt-keep-going.exp | 2 +- .../bmake/unit-tests/opt-warnings-as-errors.exp | 2 +- contrib/bmake/unit-tests/opt.exp | 2 +- contrib/bmake/unit-tests/parse.exp | 2 +- contrib/bmake/unit-tests/posix.exp | 2 +- contrib/bmake/unit-tests/sh-jobs.exp | 2 +- contrib/bmake/unit-tests/suff-add-later.exp | 2 +- contrib/bmake/unit-tests/suff-clear-regular.exp | 2 +- contrib/bmake/unit-tests/suff-clear-single.exp | 2 +- contrib/bmake/unit-tests/suff-main-several.exp | 2 +- contrib/bmake/unit-tests/suff-self.exp | 2 +- .../bmake/unit-tests/suff-transform-endless.exp | 2 +- contrib/bmake/unit-tests/suff-transform-expand.exp | 2 +- contrib/bmake/unit-tests/suff-transform-select.exp | 2 +- contrib/bmake/unit-tests/suff-use.exp | 2 +- contrib/bmake/unit-tests/use-inference.exp | 2 +- contrib/bmake/unit-tests/var-eval-short.exp | 4 +- contrib/bmake/unit-tests/var-eval-short.mk | 4 +- contrib/bmake/unit-tests/var-op-assign.exp | 2 +- contrib/bmake/unit-tests/var-op-expand.exp | 6 +- contrib/bmake/unit-tests/var-op-expand.mk | 6 +- contrib/bmake/unit-tests/var-op-shell.exp | 6 +- contrib/bmake/unit-tests/var-op-shell.mk | 16 +- contrib/bmake/unit-tests/var-recursive.exp | 5 +- contrib/bmake/unit-tests/vardebug.exp | 2 +- contrib/bmake/unit-tests/vardebug.mk | 4 +- contrib/bmake/unit-tests/varmisc.exp | 8 +- contrib/bmake/unit-tests/varmisc.mk | 13 +- contrib/bmake/unit-tests/varmod-assign-shell.exp | 12 +- contrib/bmake/unit-tests/varmod-assign-shell.mk | 18 +- contrib/bmake/unit-tests/varmod-assign.exp | 12 +- contrib/bmake/unit-tests/varmod-assign.mk | 7 +- contrib/bmake/unit-tests/varmod-edge.exp | 33 +- contrib/bmake/unit-tests/varmod-edge.mk | 231 ++-- contrib/bmake/unit-tests/varmod-gmtime.exp | 12 +- contrib/bmake/unit-tests/varmod-gmtime.mk | 12 +- contrib/bmake/unit-tests/varmod-hash.exp | 8 +- contrib/bmake/unit-tests/varmod-ifelse.exp | 52 +- contrib/bmake/unit-tests/varmod-ifelse.mk | 22 +- contrib/bmake/unit-tests/varmod-indirect.exp | 8 +- contrib/bmake/unit-tests/varmod-indirect.mk | 10 +- contrib/bmake/unit-tests/varmod-localtime.exp | 12 +- contrib/bmake/unit-tests/varmod-localtime.mk | 12 +- contrib/bmake/unit-tests/varmod-loop-delete.exp | 4 +- contrib/bmake/unit-tests/varmod-loop-delete.mk | 4 +- contrib/bmake/unit-tests/varmod-loop-varname.exp | 10 +- contrib/bmake/unit-tests/varmod-loop-varname.mk | 10 +- contrib/bmake/unit-tests/varmod-match-escape.exp | 10 +- contrib/bmake/unit-tests/varmod-match-escape.mk | 8 +- contrib/bmake/unit-tests/varmod-match.exp | 20 +- contrib/bmake/unit-tests/varmod-match.mk | 22 +- contrib/bmake/unit-tests/varmod-mtime.exp | 12 +- contrib/bmake/unit-tests/varmod-mtime.mk | 14 +- contrib/bmake/unit-tests/varmod-order.exp | 48 +- contrib/bmake/unit-tests/varmod-order.mk | 32 +- contrib/bmake/unit-tests/varmod-range.exp | 12 +- contrib/bmake/unit-tests/varmod-range.mk | 12 +- contrib/bmake/unit-tests/varmod-select-words.exp | 26 +- contrib/bmake/unit-tests/varmod-shell.exp | 14 +- contrib/bmake/unit-tests/varmod-shell.mk | 14 +- contrib/bmake/unit-tests/varmod-subst-regex.exp | 30 +- contrib/bmake/unit-tests/varmod-subst.exp | 4 +- contrib/bmake/unit-tests/varmod-sun-shell.exp | 16 +- contrib/bmake/unit-tests/varmod-sun-shell.mk | 14 +- contrib/bmake/unit-tests/varmod-sysv.exp | 10 +- contrib/bmake/unit-tests/varmod-sysv.mk | 10 +- contrib/bmake/unit-tests/varmod-to-separator.exp | 44 +- contrib/bmake/unit-tests/varmod-to-separator.mk | 23 +- contrib/bmake/unit-tests/varmod-to-title.exp | 1 + contrib/bmake/unit-tests/varmod-to-title.mk | 31 + contrib/bmake/unit-tests/varmod.exp | 54 +- contrib/bmake/unit-tests/varmod.mk | 38 +- contrib/bmake/unit-tests/varname-dot-newline.exp | 5 +- .../varname-make_print_var_on_error-jobs.exp | 2 +- .../unit-tests/varname-make_print_var_on_error.exp | 2 +- contrib/bmake/unit-tests/varname.exp | 2 +- contrib/bmake/unit-tests/varparse-errors.exp | 44 +- contrib/bmake/unit-tests/varparse-errors.mk | 26 +- contrib/bmake/util.c | 6 +- contrib/bmake/var.c | 165 +-- usr.bin/bmake/Makefile.config | 2 +- usr.bin/bmake/config.h | 141 ++- usr.bin/bmake/unit-tests/Makefile | 32 +- 197 files changed, 2564 insertions(+), 2024 deletions(-) diff --git a/contrib/bmake/ChangeLog b/contrib/bmake/ChangeLog index 8b6e0b2ea512..12774bb5598c 100644 --- a/contrib/bmake/ChangeLog +++ b/contrib/bmake/ChangeLog @@ -1,3 +1,86 @@ +2024-07-13 Simon J Gerraty + + * cleanup redundant differences from NetBSD make + o parse.c: no longer uses mmap + o var.c: check __STDC_VERSION__ not __STDC__ + +2024-07-12 Simon J Gerraty + + * Apply some patches from NetBSD pkgsrc to reduce divergence + o meta.c: requires sys/select.h if available + o var.c: ensure SIZE_MAX has a value + o util.c: ensure SA_RESTART is defined + + * configure.in: use *ksh* rather than just *ksh to match + ksh shell specification. + + * unit-tests/Makefile: expand BROKEN_TESTS for ksh and + mksh in particular + +2024-07-11 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240711 + Merge with NetBSD make, pick up + o compat.c: allow Compat_RunCommand to also handle very long + commands by writing to a temp file when needed. + o main.c: extract the temp file logic recently added to Cmd_Exec + to Cmd_Argv so it can be leveraged by Compat_RunCommand. + +2024-07-09 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240709 + Merge with NetBSD make, pick up + o error out on parse/evaluation errors in shell commands + o var.c: error out on syntax errors in ':M' and ':N' modifiers + +2024-07-07 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240707 + Merge with NetBSD make, pick up + o only generate code for cleanup functions in CLEANUP mode + o hash.c: don't track hash table chain lengths during lookup + unless debugging + o main.c: move initialization of variable scopes to targ.c + o var.c: remove Var_End as it is now unnecessary + +2024-07-06 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240706 + Merge with NetBSD make, pick up + o reduce lint comments about ARGSUSED + o cond.c: error out on conditions containing the operators '&' and '|' + o str.c: error out on a matching malformed matching pattern '[[' + o var.c: in error messages, distinguish parsing from evaluating + in error messages for anonymous variables, log the value + error out on unclosed expressions during parse time + +2024-07-04 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240704 + Merge with NetBSD make, pick up + o add more context information to error messages + o main.c: on error, print the targets to be made + add detailed exit status to message for failed sub-commands + o var.c: error out on the "Bad modifier" error message + +2024-07-01 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240701 + Merge with NetBSD make, pick up + o var.c: add :tt for Title case + +2024-06-30 Simon J Gerraty + + * configure.in: 20240630 further refine check for whether + TZ=Europe/Berlin works + + * VERSION (_MAKE_VERSION): 20240630 + Merge with NetBSD make, pick up + o job.c: reduce use of UNCONST + o main.c: add detailed exit status to message for failed sub-commands + o var.c: error out on some more syntax errors + add more context to "returned non-zero status" message + 2024-06-25 Simon J Gerraty * VERSION (_MAKE_VERSION): 20240625 diff --git a/contrib/bmake/FILES b/contrib/bmake/FILES index e557147c85b1..bfe95a9b6b47 100644 --- a/contrib/bmake/FILES +++ b/contrib/bmake/FILES @@ -759,6 +759,8 @@ unit-tests/varmod-to-one-word.exp unit-tests/varmod-to-one-word.mk unit-tests/varmod-to-separator.exp unit-tests/varmod-to-separator.mk +unit-tests/varmod-to-title.exp +unit-tests/varmod-to-title.mk unit-tests/varmod-to-upper.exp unit-tests/varmod-to-upper.mk unit-tests/varmod-undefined.exp diff --git a/contrib/bmake/VERSION b/contrib/bmake/VERSION index 81837cc6765f..f55bfabc9103 100644 --- a/contrib/bmake/VERSION +++ b/contrib/bmake/VERSION @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20240625 +_MAKE_VERSION=20240711 diff --git a/contrib/bmake/arch.c b/contrib/bmake/arch.c index d8b467e02874..00c72261707f 100644 --- a/contrib/bmake/arch.c +++ b/contrib/bmake/arch.c @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.219 2024/06/02 15:31:25 rillig Exp $ */ +/* $NetBSD: arch.c,v 1.221 2024/07/07 07:50:57 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -147,7 +147,7 @@ struct ar_hdr { #include "dir.h" /* "@(#)arch.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: arch.c,v 1.219 2024/06/02 15:31:25 rillig Exp $"); +MAKE_RCSID("$NetBSD: arch.c,v 1.221 2024/07/07 07:50:57 rillig Exp $"); typedef struct List ArchList; typedef struct ListNode ArchListNode; @@ -818,7 +818,6 @@ Arch_Touch(GNode *gn) * Both the modification time of the library and of the RANLIBMAG member are * set to 'now'. */ -/*ARGSUSED*/ void Arch_TouchLib(GNode *gn MAKE_ATTR_UNUSED) { @@ -919,7 +918,6 @@ Arch_FindLib(GNode *gn, SearchPath *path) Var_Set(gn, TARGET, gn->name); } -/* ARGSUSED */ static bool RanlibOODate(const GNode *gn MAKE_ATTR_UNUSED) { @@ -999,18 +997,18 @@ Arch_Init(void) Lst_Init(&archives); } +#ifdef CLEANUP /* Clean up the archives module. */ void Arch_End(void) { -#ifdef CLEANUP ArchListNode *ln; for (ln = archives.first; ln != NULL; ln = ln->next) ArchFree(ln->datum); Lst_Done(&archives); -#endif } +#endif bool Arch_IsLib(GNode *gn) diff --git a/contrib/bmake/bmake.1 b/contrib/bmake/bmake.1 index eb30d2173098..f7cc15b16c41 100644 --- a/contrib/bmake/bmake.1 +++ b/contrib/bmake/bmake.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.377 2024/06/01 06:26:36 sjg Exp $ +.\" $NetBSD: make.1,v 1.378 2024/07/01 21:02:26 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd June 1, 2024 +.Dd July 1, 2024 .Dt BMAKE 1 .Os .Sh NAME @@ -1575,6 +1575,9 @@ If .Ar c is omitted, no separator is used. The common escapes (including octal numeric codes) work as expected. +.It Cm \&:tt +Converts the first character of each word to upper-case, +and the rest to lower-case letters. .It Cm \&:tu Converts the value to upper-case letters. .It Cm \&:tW diff --git a/contrib/bmake/bmake.cat1 b/contrib/bmake/bmake.cat1 index 456885bc634c..f46f6681320a 100644 --- a/contrib/bmake/bmake.cat1 +++ b/contrib/bmake/bmake.cat1 @@ -506,27 +506,27 @@ VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS The seven built-in local variables are: - _._A_L_L_S_R_C The list of all sources for this target; also known - as `_>'. + _._A_L_L_S_R_C The list of all sources for this target; also known as + `_>'. - _._A_R_C_H_I_V_E The name of the archive file; also known as `_!'. + _._A_R_C_H_I_V_E The name of the archive file; also known as `_!'. - _._I_M_P_S_R_C In suffix-transformation rules, the name/path of the - source from which the target is to be transformed - (the "implied" source); also known as `_<'. It is not - defined in explicit rules. + _._I_M_P_S_R_C In suffix-transformation rules, the name/path of the + source from which the target is to be transformed (the + "implied" source); also known as `_<'. It is not defined + in explicit rules. - _._M_E_M_B_E_R The name of the archive member; also known as `_%'. + _._M_E_M_B_E_R The name of the archive member; also known as `_%'. - _._O_O_D_A_T_E The list of sources for this target that were deemed - out-of-date; also known as `_?'. + _._O_O_D_A_T_E The list of sources for this target that were deemed out- + of-date; also known as `_?'. - _._P_R_E_F_I_X The name of the target with suffix (if declared in - ..SSUUFFFFIIXXEESS) removed; also known as `_*'. + _._P_R_E_F_I_X The name of the target with suffix (if declared in + ..SSUUFFFFIIXXEESS) removed; also known as `_*'. - _._T_A_R_G_E_T The name of the target; also known as `_@'. For - compatibility with other makes this is an alias for - _._A_R_C_H_I_V_E in archive member rules. + _._T_A_R_G_E_T The name of the target; also known as `_@'. For + compatibility with other makes this is an alias for + _._A_R_C_H_I_V_E in archive member rules. The shorter forms (`_>', `_!', `_<', `_%', `_?', `_*', and `_@') are permitted for backward compatibility with historical makefiles and legacy POSIX @@ -1021,6 +1021,9 @@ VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS separator is used. The common escapes (including octal numeric codes) work as expected. + ::tttt Converts the first character of each word to upper-case, and the + rest to lower-case letters. + ::ttuu Converts the value to upper-case letters. ::ttWW Causes subsequent modifiers to treat the value as a single word @@ -1625,37 +1628,33 @@ SSPPEECCIIAALL TTAARRGGEETTSS ..SSHHEELLLL Sets the shell that bbmmaakkee uses to execute commands. The sources are a set of _f_i_e_l_d==_v_a_l_u_e pairs. - name This is the minimal specification, used to - select one of the built-in shell specs; sh, ksh, - and csh. + name This is the minimal specification, used to select + one of the built-in shell specs; sh, ksh, and csh. - path Specifies the absolute path to the shell. + path Specifies the absolute path to the shell. - hasErrCtl Indicates whether the shell supports exit on - error. + hasErrCtl Indicates whether the shell supports exit on error. - check The command to turn on error checking. + check The command to turn on error checking. - ignore The command to disable error checking. + ignore The command to disable error checking. - echo The command to turn on echoing of commands - executed. + echo The command to turn on echoing of commands executed. - quiet The command to turn off echoing of commands - executed. + quiet The command to turn off echoing of commands + executed. - filter The output to filter after issuing the quiet - command. It is typically identical to quiet. + filter The output to filter after issuing the quiet + command. It is typically identical to quiet. - errFlag The flag to pass the shell to enable error - checking. + errFlag The flag to pass the shell to enable error checking. - echoFlag The flag to pass the shell to enable command - echoing. + echoFlag The flag to pass the shell to enable command + echoing. - newline The string literal to pass the shell that - results in a single newline character when used - outside of any quoting characters. + newline The string literal to pass the shell that results in + a single newline character when used outside of any + quoting characters. Example: .SHELL: name=ksh path=/bin/ksh hasErrCtl=true \ @@ -1788,4 +1787,4 @@ BBUUGGSS attempt to suppress a cascade of unnecessary errors, can result in a seemingly unexplained `*** Error code 6' -FreeBSD 13.2-RELEASE-p11 June 1, 2024 FreeBSD 13.2-RELEASE-p11 +FreeBSD 14.1-RELEASE July 1, 2024 FreeBSD 14.1-RELEASE diff --git a/contrib/bmake/compat.c b/contrib/bmake/compat.c index 5d1b3ab52344..23ece245c8a6 100644 --- a/contrib/bmake/compat.c +++ b/contrib/bmake/compat.c @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.259 2024/06/15 20:02:45 rillig Exp $ */ +/* $NetBSD: compat.c,v 1.260 2024/07/11 20:09:16 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -94,7 +94,7 @@ #include "pathnames.h" /* "@(#)compat.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: compat.c,v 1.259 2024/06/15 20:02:45 rillig Exp $"); +MAKE_RCSID("$NetBSD: compat.c,v 1.260 2024/07/11 20:09:16 sjg Exp $"); static GNode *curTarg = NULL; static pid_t compatChild; @@ -249,6 +249,8 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln) bool useShell; /* True if command should be executed using a * shell */ const char *cmd = cmdp; + char cmd_file[MAXPATHLEN]; + size_t cmd_len; silent = (gn->type & OP_SILENT) != OP_NONE; errCheck = !(gn->type & OP_IGNORE); @@ -319,20 +321,20 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln) DEBUG1(JOB, "Execute: '%s'\n", cmd); - if (useShell && shellPath == NULL) - Shell_Init(); /* we need shellPath */ + cmd_len = strlen(cmd); + if (cmd_len > MAKE_CMDLEN_LIMIT) + useShell = true; + else + cmd_file[0] = '\0'; if (useShell) { static const char *shargv[5]; - /* The following work for any of the builtin shell specs. */ - int shargc = 0; - shargv[shargc++] = shellPath; - if (errCheck && shellErrFlag != NULL) - shargv[shargc++] = shellErrFlag; - shargv[shargc++] = DEBUG(SHELL) ? "-xc" : "-c"; - shargv[shargc++] = cmd; - shargv[shargc] = NULL; + if (Cmd_Argv(cmd, cmd_len, shargv, 5, + cmd_file, sizeof(cmd_file), + (errCheck && shellErrFlag != NULL), + DEBUG(SHELL)) < 0) + Fatal("cannot run \"%s\"", cmd); av = shargv; bp = NULL; mav = NULL; @@ -425,6 +427,8 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln) } free(cmdStart); + if (cmd_file[0] != '\0') + unlink(cmd_file); compatChild = 0; if (compatSigno != 0) { bmake_signal(compatSigno, SIG_DFL); diff --git a/contrib/bmake/cond.c b/contrib/bmake/cond.c index a6a73fe337dd..58c0069555e1 100644 --- a/contrib/bmake/cond.c +++ b/contrib/bmake/cond.c @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.365 2024/06/02 15:31:25 rillig Exp $ */ +/* $NetBSD: cond.c,v 1.366 2024/07/06 21:21:09 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -91,7 +91,7 @@ #include "dir.h" /* "@(#)cond.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: cond.c,v 1.365 2024/06/02 15:31:25 rillig Exp $"); +MAKE_RCSID("$NetBSD: cond.c,v 1.366 2024/07/06 21:21:09 rillig Exp $"); /* * Conditional expressions conform to this grammar: @@ -780,7 +780,7 @@ CondParser_Token(CondParser *par, bool doEval) par->p++; if (par->p[0] == '|') par->p++; - else if (opts.strict) { + else { Parse_Error(PARSE_FATAL, "Unknown operator '|'"); par->printedError = true; return TOK_ERROR; @@ -791,7 +791,7 @@ CondParser_Token(CondParser *par, bool doEval) par->p++; if (par->p[0] == '&') par->p++; - else if (opts.strict) { + else { Parse_Error(PARSE_FATAL, "Unknown operator '&'"); par->printedError = true; return TOK_ERROR; diff --git a/contrib/bmake/config.h.in b/contrib/bmake/config.h.in index 3834761a6b87..4fed2573a02b 100644 --- a/contrib/bmake/config.h.in +++ b/contrib/bmake/config.h.in @@ -15,24 +15,24 @@ /* Define to 1 if you have the header file. */ #undef HAVE_AR_H -/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you +/* Define to 1 if you have the declaration of 'sys_siglist', and to 0 if you don't. */ #undef HAVE_DECL_SYS_SIGLIST -/* Define to 1 if you have the header file, and it defines `DIR'. +/* Define to 1 if you have the header file, and it defines 'DIR'. */ #undef HAVE_DIRENT_H -/* Define to 1 if you have the `dirname' function. */ +/* Define to 1 if you have the 'dirname' function. */ #undef HAVE_DIRNAME -/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +/* Define to 1 if you don't have 'vprintf' but do have '_doprnt.' */ #undef HAVE_DOPRNT -/* Define to 1 if you have the `err' function. */ +/* Define to 1 if you have the 'err' function. */ #undef HAVE_ERR -/* Define to 1 if you have the `errx' function. */ +/* Define to 1 if you have the 'errx' function. */ #undef HAVE_ERRX /* Define to 1 if you have the header file. */ @@ -41,25 +41,25 @@ /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H -/* Define to 1 if you have the `fork' function. */ +/* Define to 1 if you have the 'fork' function. */ #undef HAVE_FORK -/* Define to 1 if you have the `getcwd' function. */ +/* Define to 1 if you have the 'getcwd' function. */ #undef HAVE_GETCWD -/* Define to 1 if you have the `getenv' function. */ +/* Define to 1 if you have the 'getenv' function. */ #undef HAVE_GETENV -/* Define to 1 if you have the `getopt' function. */ +/* Define to 1 if you have the 'getopt' function. */ #undef HAVE_GETOPT -/* Define to 1 if you have the `getwd' function. */ +/* Define to 1 if you have the 'getwd' function. */ #undef HAVE_GETWD /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the `killpg' function. */ +/* Define to 1 if you have the 'killpg' function. */ #undef HAVE_KILLPG /* Define to 1 if you have the header file. */ @@ -68,16 +68,13 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H -/* Define to 1 if the system has the type `long long int'. */ +/* Define to 1 if the system has the type 'long long int'. */ #undef HAVE_LONG_LONG_INT /* Define to 1 if you have the header file. */ #undef HAVE_MINIX_CONFIG_H -/* Define to 1 if you have the `mmap' function. */ -#undef HAVE_MMAP - -/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* Define to 1 if you have the header file, and it defines 'DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the header file. */ @@ -86,58 +83,58 @@ /* Define to 1 if you have the header file. */ #undef HAVE_POLL_H -/* Define to 1 if you have the `putenv' function. */ +/* Define to 1 if you have the 'putenv' function. */ #undef HAVE_PUTENV /* Define to 1 if you have the header file. */ #undef HAVE_RANLIB_H -/* Define to 1 if you have the `realpath' function. */ +/* Define to 1 if you have the 'realpath' function. */ #undef HAVE_REALPATH /* Define to 1 if you have the header file. */ #undef HAVE_REGEX_H -/* Define to 1 if you have the `select' function. */ +/* Define to 1 if you have the 'select' function. */ #undef HAVE_SELECT -/* Define to 1 if you have the `setenv' function. */ +/* Define to 1 if you have the 'setenv' function. */ #undef HAVE_SETENV -/* Define to 1 if you have the `setpgid' function. */ +/* Define to 1 if you have the 'setpgid' function. */ #undef HAVE_SETPGID -/* Define to 1 if you have the `setrlimit' function. */ +/* Define to 1 if you have the 'setrlimit' function. */ #undef HAVE_SETRLIMIT -/* Define to 1 if you have the `setsid' function. */ +/* Define to 1 if you have the 'setsid' function. */ #undef HAVE_SETSID -/* Define to 1 if you have the `sigaction' function. */ +/* Define to 1 if you have the 'sigaction' function. */ #undef HAVE_SIGACTION -/* Define to 1 if you have the `sigaddset' function. */ +/* Define to 1 if you have the 'sigaddset' function. */ #undef HAVE_SIGADDSET -/* Define to 1 if you have the `sigpending' function. */ +/* Define to 1 if you have the 'sigpending' function. */ #undef HAVE_SIGPENDING -/* Define to 1 if you have the `sigprocmask' function. */ +/* Define to 1 if you have the 'sigprocmask' function. */ #undef HAVE_SIGPROCMASK -/* Define to 1 if you have the `sigsetmask' function. */ +/* Define to 1 if you have the 'sigsetmask' function. */ #undef HAVE_SIGSETMASK -/* Define to 1 if you have the `sigsuspend' function. */ +/* Define to 1 if you have the 'sigsuspend' function. */ #undef HAVE_SIGSUSPEND -/* Define to 1 if you have the `sigvec' function. */ +/* Define to 1 if you have the 'sigvec' function. */ #undef HAVE_SIGVEC -/* Define to 1 if the system has the type `sig_atomic_t'. */ +/* Define to 1 if the system has the type 'sig_atomic_t'. */ #undef HAVE_SIG_ATOMIC_T -/* Define to 1 if you have the `snprintf' function. */ +/* Define to 1 if you have the 'snprintf' function. */ #undef HAVE_SNPRINTF /* Define to 1 if you have the header file. */ @@ -149,13 +146,13 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H -/* Define to 1 if you have the `strerror' function. */ +/* Define to 1 if you have the 'strerror' function. */ #undef HAVE_STRERROR -/* Define to 1 if you have the `stresep' function. */ +/* Define to 1 if you have the 'stresep' function. */ #undef HAVE_STRESEP -/* Define to 1 if you have the `strftime' function. */ +/* Define to 1 if you have the 'strftime' function. */ #undef HAVE_STRFTIME /* Define to 1 if you have the header file. */ @@ -164,35 +161,35 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H -/* Define to 1 if you have the `strlcpy' function. */ +/* Define to 1 if you have the 'strlcpy' function. */ #undef HAVE_STRLCPY -/* Define to 1 if you have the `strsep' function. */ +/* Define to 1 if you have the 'strsep' function. */ #undef HAVE_STRSEP -/* Define to 1 if you have the `strtod' function. */ +/* Define to 1 if you have the 'strtod' function. */ #undef HAVE_STRTOD -/* Define to 1 if you have the `strtol' function. */ +/* Define to 1 if you have the 'strtol' function. */ #undef HAVE_STRTOL -/* Define to 1 if you have the `strtoll' function. */ +/* Define to 1 if you have the 'strtoll' function. */ #undef HAVE_STRTOLL -/* Define to 1 if you have the `strtoul' function. */ +/* Define to 1 if you have the 'strtoul' function. */ #undef HAVE_STRTOUL -/* Define to 1 if you have the `sysctl' function. */ +/* Define to 1 if you have the 'sysctl' function. */ #undef HAVE_SYSCTL -/* Define to 1 if you have the header file, and it defines `DIR'. +/* Define to 1 if you have the header file, and it defines 'DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MMAN_H -/* Define to 1 if you have the header file, and it defines `DIR'. +/* Define to 1 if you have the header file, and it defines 'DIR'. */ #undef HAVE_SYS_NDIR_H @@ -226,49 +223,49 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* Define to 1 if you have the `unsetenv' function. */ +/* Define to 1 if you have the 'unsetenv' function. */ #undef HAVE_UNSETENV -/* Define to 1 if the system has the type `unsigned long long int'. */ +/* Define to 1 if the system has the type 'unsigned long long int'. */ #undef HAVE_UNSIGNED_LONG_LONG_INT /* Define to 1 if you have the header file. */ #undef HAVE_UTIME_H -/* Define to 1 if you have the `vfork' function. */ +/* Define to 1 if you have the 'vfork' function. */ #undef HAVE_VFORK /* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H -/* Define to 1 if you have the `vprintf' function. */ +/* Define to 1 if you have the 'vprintf' function. */ #undef HAVE_VPRINTF -/* Define to 1 if you have the `vsnprintf' function. */ +/* Define to 1 if you have the 'vsnprintf' function. */ #undef HAVE_VSNPRINTF -/* Define to 1 if you have the `wait3' function. */ +/* Define to 1 if you have the 'wait3' function. */ #undef HAVE_WAIT3 -/* Define to 1 if you have the `wait4' function. */ +/* Define to 1 if you have the 'wait4' function. */ #undef HAVE_WAIT4 -/* Define to 1 if you have the `waitpid' function. */ +/* Define to 1 if you have the 'waitpid' function. */ #undef HAVE_WAITPID -/* Define to 1 if you have the `warn' function. */ +/* Define to 1 if you have the 'warn' function. */ #undef HAVE_WARN -/* Define to 1 if you have the `warnx' function. */ +/* Define to 1 if you have the 'warnx' function. */ #undef HAVE_WARNX /* Define to 1 if you have the header file. */ #undef HAVE_WCHAR_H -/* Define to 1 if `fork' works. */ +/* Define to 1 if 'fork' works. */ #undef HAVE_WORKING_FORK -/* Define to 1 if `vfork' works. */ +/* Define to 1 if 'vfork' works. */ #undef HAVE_WORKING_VFORK /* define if your compiler has __attribute__ */ @@ -292,18 +289,18 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* Define to 1 if the `S_IS*' macros in do not work properly. */ +/* Define to 1 if the 'S_IS*' macros in do not work properly. */ #undef STAT_MACROS_BROKEN -/* Define to 1 if all of the C90 standard headers exist (not just the ones +/* 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. */ #undef STDC_HEADERS -/* Define to 1 if your declares `struct tm'. */ +/* Define to 1 if your declares 'struct tm'. */ #undef TM_IN_SYS_TIME -/* Enable extensions on AIX 3, Interix. */ +/* Enable extensions on AIX, Interix, z/OS. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif @@ -364,11 +361,15 @@ #ifndef __STDC_WANT_IEC_60559_DFP_EXT__ # undef __STDC_WANT_IEC_60559_DFP_EXT__ #endif +/* Enable extensions specified by C23 Annex F. */ +#ifndef __STDC_WANT_IEC_60559_EXT__ +# undef __STDC_WANT_IEC_60559_EXT__ +#endif /* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ #ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ # undef __STDC_WANT_IEC_60559_FUNCS_EXT__ #endif -/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */ #ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ # undef __STDC_WANT_IEC_60559_TYPES_EXT__ #endif @@ -411,10 +412,10 @@ /* C99 function name */ #undef __func__ -/* Define to empty if `const' does not conform to ANSI C. */ +/* Define to empty if 'const' does not conform to ANSI C. */ #undef const -/* Define to `__inline__' or `__inline' if that's what the C compiler +/* Define to '__inline__' or '__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline @@ -424,10 +425,10 @@ such a type exists and the standard includes do not define it. */ #undef int64_t -/* Define to `int' if does not define. */ +/* Define to 'int' if does not define. */ #undef mode_t -/* Define to `long int' if does not define. */ +/* Define to 'long int' if does not define. */ #undef off_t /* Define as a signed integer type capable of holding a process identifier. */ @@ -436,12 +437,12 @@ *** 10759 LINES SKIPPED *** From nobody Sat Jan 10 21:34:05 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2k0BwMz6MxD2 for ; Sat, 10 Jan 2026 21:34:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpX2j6DmYz3Qn2 for ; Sat, 10 Jan 2026 21:34:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=96oPFHumnFQYucEjSb2NzQAiusHq8weqwnvVLkFXPDg=; b=Vx+TkAFEqCquCCWJLIjYYRqFbKjEe8zgG4lPB8xf4b7XSprwtmtDjVHnU9JaC5sR88Qhyh TwKSuUjCbzbzWuFaTcs3FkiKqSkrZ38zmD5jfQZbf8e8A15CVjs1+9JsVG6h8jpqnXzXsb /Q+n/hASBPhny1HIJy1H8tt2v15MT8Kvu4cJSNYVeIoCTHRpZJDSpHgEqXznTxqCkKUyao Tao2vdSM3ByYdsl+1re9oD8mrNHtwx7UTTWCYU1WPbqg/an99IpVRH5lZXiDXWm7CGGIVQ TLrxdptweNbYKy7bno7wIrwBhGNx5gIkZP3AlBQqXx8kauk3MtUlb9p3l6sYjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080845; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=96oPFHumnFQYucEjSb2NzQAiusHq8weqwnvVLkFXPDg=; b=eiy9nff+wkDDjy9Exehj1gwR5r8IMSkbPcbjzL01NV8cxhvraJiD5EbRtQ5wqMJlNXaIUv gsyzWiosAa+qQ4yZ18/QuEmnRotDdPefao3OQpduQObb4kY0IDOD9Ho2XamsW/um3OyErf mhVHE72f8tmKHA7rTu9MA3Lma4F4GahDS1jSrylvSFsIVAFNgMH4Oy/TBcr48imix2EOBw f2OAFubB81HIKYv/qWpV38X28LyNdem3YJU8nwxRktOOSGnuflzTmehQoVnOuzsRKgJfYR lpccVvqjtokcZAlEWJGCbTisi3uwuyvY+JDmEuhhYnbWQswu0NlGjauM1nqbbw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768080845; a=rsa-sha256; cv=none; b=P1SEVosb916PegGGMvMitxqN1yoLuWGZ62gPHEY6Bguq1vQcVKglPsJYgjX6IRn82ekWBl tl5ZUPMMJrwTaL8+MXiZcDTyYmZuStGodXJDUDKm9PiDRDwXEE0qnfj+YgEHhohrPLbvw5 5ctV5JupmFLe1ntjVb0b+/O0lCtyBTrdoKAxshDIuw4Jbt2Ra3uGtQCZFf080tAF7vJKdW ewVPm9ZMmBqwM1WE+qu0920mHKvwsEHY2agQDLToNRUpXkOTw6CHiHBRuD6YYQvFJxrcz9 gGLw74FQ3CjbHd1y7iYebLCPvh0qTR7VCTV5olAcTJCl4fy7qVCjPuOYOTZuOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2j5PXVz1Bfj for ; Sat, 10 Jan 2026 21:34:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23ddb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 21:34:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Simon J. Gerraty Subject: git: 812d0cb17de0 - stable/14 - Merge bmake-20250125 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 812d0cb17de0da39e3eb2fa0c3a365f4ea1cb71a Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 21:34:05 +0000 Message-Id: <6962c5cd.23ddb.5b399734@gitrepo.freebsd.org> The branch stable/14 has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=812d0cb17de0da39e3eb2fa0c3a365f4ea1cb71a commit 812d0cb17de0da39e3eb2fa0c3a365f4ea1cb71a Author: Simon J. Gerraty AuthorDate: 2025-01-30 23:40:08 +0000 Commit: Simon J. Gerraty CommitDate: 2026-01-10 21:33:12 +0000 Merge bmake-20250125 Merge commit '5ad769f660f3d00853bc739f82d9bc62f6a682cb' (cherry picked from commit 6a7405f5a6b639682cacf01e35d561411ff556aa) --- contrib/bmake/ChangeLog | 139 ++++++++++++ contrib/bmake/FILES | 2 + contrib/bmake/Makefile | 139 +++++++----- contrib/bmake/VERSION | 2 +- contrib/bmake/arch.c | 9 +- contrib/bmake/bmake.1 | 47 +++-- contrib/bmake/bmake.cat1 | 34 +-- contrib/bmake/bsd.after-import.mk | 5 +- contrib/bmake/compat.c | 13 +- contrib/bmake/cond.c | 29 ++- contrib/bmake/job.c | 84 ++------ contrib/bmake/job.h | 4 +- contrib/bmake/main.c | 44 ++-- contrib/bmake/make.1 | 35 +++- contrib/bmake/make.h | 21 +- contrib/bmake/mk/ChangeLog | 117 +++++++++++ contrib/bmake/mk/FILES | 3 + contrib/bmake/mk/README | 10 +- contrib/bmake/mk/cython.mk | 43 ++-- contrib/bmake/mk/dirdeps-targets.mk | 5 +- contrib/bmake/mk/dirdeps.mk | 20 +- contrib/bmake/mk/gendirdeps.mk | 4 +- contrib/bmake/mk/genfiles.mk | 26 +++ contrib/bmake/mk/init.mk | 11 +- contrib/bmake/mk/install-mk | 4 +- contrib/bmake/mk/lib.mk | 14 +- contrib/bmake/mk/links.mk | 34 +-- contrib/bmake/mk/meta.sys.mk | 13 +- contrib/bmake/mk/meta2deps.py | 16 +- contrib/bmake/mk/options.mk | 8 +- contrib/bmake/mk/own.mk | 7 +- contrib/bmake/mk/prog.mk | 12 +- contrib/bmake/mk/rust.mk | 203 ++++++++++++++++++ contrib/bmake/mk/setopts.sh | 175 ++++++++++++++++ contrib/bmake/mk/subdir.mk | 10 +- contrib/bmake/mk/sys.mk | 3 +- contrib/bmake/mk/sys.vars.mk | 7 +- contrib/bmake/os.sh | 8 +- contrib/bmake/parse.c | 49 +---- contrib/bmake/suff.c | 6 +- contrib/bmake/unit-tests/Makefile | 23 +- contrib/bmake/unit-tests/archive.exp | 12 ++ contrib/bmake/unit-tests/archive.mk | 20 +- contrib/bmake/unit-tests/cmd-errors-jobs.exp | 76 ++++++- contrib/bmake/unit-tests/cmd-errors-jobs.mk | 123 ++++++++--- contrib/bmake/unit-tests/cmd-errors-lint.exp | 14 +- contrib/bmake/unit-tests/cmd-errors-lint.mk | 17 +- contrib/bmake/unit-tests/cmd-errors.exp | 14 +- contrib/bmake/unit-tests/cmd-errors.mk | 17 +- contrib/bmake/unit-tests/cmd-interrupt.exp | 1 + contrib/bmake/unit-tests/cmd-interrupt.mk | 24 ++- contrib/bmake/unit-tests/cmdline.exp | 4 +- contrib/bmake/unit-tests/cmdline.mk | 8 +- contrib/bmake/unit-tests/cond-cmp-numeric-eq.exp | 4 +- contrib/bmake/unit-tests/cond-cmp-numeric-eq.mk | 6 +- contrib/bmake/unit-tests/cond-cmp-numeric.exp | 2 +- contrib/bmake/unit-tests/cond-cmp-numeric.mk | 4 +- contrib/bmake/unit-tests/cond-cmp-string.exp | 8 +- contrib/bmake/unit-tests/cond-cmp-string.mk | 10 +- contrib/bmake/unit-tests/cond-eof.exp | 6 +- contrib/bmake/unit-tests/cond-eof.mk | 8 +- contrib/bmake/unit-tests/cond-func-commands.mk | 7 +- contrib/bmake/unit-tests/cond-func-defined.exp | 4 +- contrib/bmake/unit-tests/cond-func-defined.mk | 11 +- contrib/bmake/unit-tests/cond-func-empty.exp | 3 +- contrib/bmake/unit-tests/cond-func-empty.mk | 9 +- contrib/bmake/unit-tests/cond-func-exists.mk | 7 +- contrib/bmake/unit-tests/cond-func-make.mk | 7 +- contrib/bmake/unit-tests/cond-func-target.mk | 7 +- contrib/bmake/unit-tests/cond-func.exp | 9 +- contrib/bmake/unit-tests/cond-func.mk | 17 +- contrib/bmake/unit-tests/cond-late.exp | 4 +- contrib/bmake/unit-tests/cond-late.mk | 4 +- contrib/bmake/unit-tests/cond-op-and.exp | 6 +- contrib/bmake/unit-tests/cond-op-and.mk | 8 +- contrib/bmake/unit-tests/cond-op-not.exp | 2 +- contrib/bmake/unit-tests/cond-op-not.mk | 4 +- contrib/bmake/unit-tests/cond-op-or.exp | 6 +- contrib/bmake/unit-tests/cond-op-or.mk | 8 +- contrib/bmake/unit-tests/cond-op-parentheses.exp | 6 +- contrib/bmake/unit-tests/cond-op-parentheses.mk | 8 +- contrib/bmake/unit-tests/cond-op.exp | 14 +- contrib/bmake/unit-tests/cond-op.mk | 16 +- contrib/bmake/unit-tests/cond-token-number.exp | 8 +- contrib/bmake/unit-tests/cond-token-number.mk | 10 +- contrib/bmake/unit-tests/cond-token-plain.exp | 12 +- contrib/bmake/unit-tests/cond-token-plain.mk | 14 +- contrib/bmake/unit-tests/cond-token-string.exp | 20 +- contrib/bmake/unit-tests/cond-token-string.mk | 7 +- contrib/bmake/unit-tests/cond-token-var.exp | 22 +- contrib/bmake/unit-tests/cond-token-var.mk | 65 +++++- contrib/bmake/unit-tests/cond-undef-lint.exp | 10 +- contrib/bmake/unit-tests/cond-undef-lint.mk | 21 +- contrib/bmake/unit-tests/dep-var.exp | 8 +- contrib/bmake/unit-tests/dep-var.mk | 20 +- contrib/bmake/unit-tests/deptgt-makeflags.exp | 2 +- contrib/bmake/unit-tests/deptgt-order.exp | 4 +- contrib/bmake/unit-tests/deptgt.exp | 28 ++- contrib/bmake/unit-tests/deptgt.mk | 12 +- contrib/bmake/unit-tests/directive-export-impl.exp | 38 ++-- contrib/bmake/unit-tests/directive-for-errors.exp | 3 +- contrib/bmake/unit-tests/directive-for-errors.mk | 4 +- contrib/bmake/unit-tests/directive-for-escape.exp | 12 +- contrib/bmake/unit-tests/directive-for-escape.mk | 6 +- contrib/bmake/unit-tests/directive-for.exp | 3 +- contrib/bmake/unit-tests/directive-for.mk | 4 +- contrib/bmake/unit-tests/directive-if-nested.mk | 4 +- contrib/bmake/unit-tests/directive-if.exp | 2 +- contrib/bmake/unit-tests/directive-if.mk | 4 +- .../bmake/unit-tests/directive-include-fatal.exp | 2 +- .../bmake/unit-tests/directive-include-fatal.mk | 4 +- .../bmake/unit-tests/directive-include-guard.exp | 6 +- .../bmake/unit-tests/directive-include-guard.mk | 26 ++- contrib/bmake/unit-tests/directive-include.exp | 3 +- contrib/bmake/unit-tests/directive-include.mk | 6 +- contrib/bmake/unit-tests/directive-undef.exp | 3 +- contrib/bmake/unit-tests/directive-undef.mk | 4 +- contrib/bmake/unit-tests/include-main.exp | 4 +- contrib/bmake/unit-tests/lint.exp | 6 +- contrib/bmake/unit-tests/moderrs.exp | 233 ++++++++++++--------- contrib/bmake/unit-tests/moderrs.mk | 175 +++++++++------- contrib/bmake/unit-tests/opt-debug-lint.exp | 15 +- contrib/bmake/unit-tests/opt-debug-lint.mk | 10 +- contrib/bmake/unit-tests/opt-debug-parse.exp | 14 +- contrib/bmake/unit-tests/opt-debug-var.exp | 8 +- contrib/bmake/unit-tests/opt-debug-var.mk | 19 +- contrib/bmake/unit-tests/suff-incomplete.exp | 12 +- contrib/bmake/unit-tests/suff-main-several.exp | 30 +-- contrib/bmake/unit-tests/suff-rebuild.exp | 22 +- contrib/bmake/unit-tests/suff.exp | 146 +++++++++++++ contrib/bmake/unit-tests/suff.mk | 41 ++++ contrib/bmake/unit-tests/var-eval-short.exp | 12 +- contrib/bmake/unit-tests/var-eval-short.mk | 5 +- contrib/bmake/unit-tests/var-op-expand.exp | 8 +- contrib/bmake/unit-tests/var-op-expand.mk | 6 +- contrib/bmake/unit-tests/var-op-shell.exp | 6 + contrib/bmake/unit-tests/var-op-shell.mk | 11 +- contrib/bmake/unit-tests/var-recursive.exp | 41 ++-- contrib/bmake/unit-tests/var-recursive.mk | 77 +++---- contrib/bmake/unit-tests/vardebug.exp | 51 +++-- contrib/bmake/unit-tests/vardebug.mk | 21 +- contrib/bmake/unit-tests/varmisc.exp | 45 ++-- contrib/bmake/unit-tests/varmisc.mk | 30 +-- contrib/bmake/unit-tests/varmod-assign-shell.exp | 2 +- contrib/bmake/unit-tests/varmod-assign-shell.mk | 4 +- contrib/bmake/unit-tests/varmod-assign.exp | 38 ++-- contrib/bmake/unit-tests/varmod-assign.mk | 27 ++- contrib/bmake/unit-tests/varmod-edge.exp | 29 ++- contrib/bmake/unit-tests/varmod-edge.mk | 20 +- contrib/bmake/unit-tests/varmod-gmtime.exp | 20 +- contrib/bmake/unit-tests/varmod-gmtime.mk | 17 +- contrib/bmake/unit-tests/varmod-hash.exp | 15 +- contrib/bmake/unit-tests/varmod-hash.mk | 9 +- contrib/bmake/unit-tests/varmod-ifelse.exp | 63 +++--- contrib/bmake/unit-tests/varmod-ifelse.mk | 28 ++- contrib/bmake/unit-tests/varmod-indirect.exp | 22 +- contrib/bmake/unit-tests/varmod-indirect.mk | 10 +- contrib/bmake/unit-tests/varmod-localtime.exp | 20 +- contrib/bmake/unit-tests/varmod-localtime.mk | 17 +- contrib/bmake/unit-tests/varmod-loop-delete.exp | 4 +- contrib/bmake/unit-tests/varmod-loop-delete.mk | 4 +- contrib/bmake/unit-tests/varmod-loop-varname.exp | 16 +- contrib/bmake/unit-tests/varmod-loop-varname.mk | 14 +- contrib/bmake/unit-tests/varmod-loop.exp | 10 +- contrib/bmake/unit-tests/varmod-match-escape.exp | 29 +-- contrib/bmake/unit-tests/varmod-match-escape.mk | 8 +- contrib/bmake/unit-tests/varmod-match.exp | 31 ++- contrib/bmake/unit-tests/varmod-match.mk | 23 +- contrib/bmake/unit-tests/varmod-mtime.exp | 23 +- contrib/bmake/unit-tests/varmod-mtime.mk | 19 +- contrib/bmake/unit-tests/varmod-order.exp | 49 +++-- contrib/bmake/unit-tests/varmod-order.mk | 43 ++-- contrib/bmake/unit-tests/varmod-range.exp | 22 +- contrib/bmake/unit-tests/varmod-range.mk | 19 +- contrib/bmake/unit-tests/varmod-select-words.exp | 60 +++--- contrib/bmake/unit-tests/varmod-select-words.mk | 66 +++++- contrib/bmake/unit-tests/varmod-shell.exp | 6 +- contrib/bmake/unit-tests/varmod-shell.mk | 8 +- contrib/bmake/unit-tests/varmod-subst-regex.exp | 73 ++++--- contrib/bmake/unit-tests/varmod-subst-regex.mk | 16 +- contrib/bmake/unit-tests/varmod-subst.exp | 5 +- contrib/bmake/unit-tests/varmod-subst.mk | 3 +- contrib/bmake/unit-tests/varmod-sun-shell.exp | 4 +- contrib/bmake/unit-tests/varmod-sun-shell.mk | 6 +- contrib/bmake/unit-tests/varmod-sysv.exp | 8 +- contrib/bmake/unit-tests/varmod-sysv.mk | 8 +- contrib/bmake/unit-tests/varmod-to-separator.exp | 52 ++--- contrib/bmake/unit-tests/varmod-to-separator.mk | 41 ++-- contrib/bmake/unit-tests/varmod.exp | 65 +++--- contrib/bmake/unit-tests/varmod.mk | 48 ++--- .../bmake/unit-tests/varname-dot-make-level.exp | 10 +- contrib/bmake/unit-tests/varname-dot-make-level.mk | 9 +- contrib/bmake/unit-tests/varname-dot-shell.exp | 30 +-- contrib/bmake/unit-tests/varname-dot-suffixes.exp | 14 +- contrib/bmake/unit-tests/varname.exp | 8 +- contrib/bmake/unit-tests/varname.mk | 6 +- contrib/bmake/unit-tests/varparse-dynamic.exp | 4 +- contrib/bmake/unit-tests/varparse-dynamic.mk | 6 +- contrib/bmake/unit-tests/varparse-errors.exp | 64 ++++-- contrib/bmake/unit-tests/varparse-errors.mk | 44 ++-- contrib/bmake/var.c | 149 ++++++------- usr.bin/bmake/Makefile | 119 ++++++----- usr.bin/bmake/Makefile.config | 2 +- usr.bin/bmake/unit-tests/Makefile | 29 ++- 204 files changed, 3242 insertions(+), 1804 deletions(-) diff --git a/contrib/bmake/ChangeLog b/contrib/bmake/ChangeLog index 12774bb5598c..212b0fcfaacb 100644 --- a/contrib/bmake/ChangeLog +++ b/contrib/bmake/ChangeLog @@ -1,3 +1,142 @@ +2025-01-25 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250125 + Merge with NetBSD make, sync up below change. + + * unit-tests/Makefile: remove $TMPDIR via .END + to avoid failure in test on NFS - since the temp file for the + target script is open and thus gets renamed by the server rather + than removed. + +2025-01-20 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250120 + Merge with NetBSD make, pick up + o use FORK_FUNCTION so it can be forced to fork when doing coverage. + o main.c: avoid memory allocation in error path after exec failure. + +2025-01-16 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250116 + Merge with NetBSD make, pick up + o clarify that undefined expressions are allowed in dependencies + o simplify code for evaluating the '!=' variable assignment + +2025-01-11 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250111 + Merge with NetBSD make, pick up + o replace "Malformed conditional" with "Variable is undefined" + when appropriate + +2025-01-10 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250110 + Merge with NetBSD make, pick up + o job.c: remove some unnecessary layers in job handling + o unit-tests: test expressions based on undefined variables + +2025-01-01 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250101 + Merge with NetBSD make, pick up + o var.c: reduce pointer indirections when unexporting a variable + +2024-12-12 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20241212 + * mk/ updates + +2024-11-24 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20241124 + Merge with NetBSD make, pick up + o var.c: fix confusing error message when overriding a read-only + variable + +2024-11-22 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20241122 + Merge with NetBSD make, pick up + o unit-tests/Makefile: optimize running of tests skip extra cat + in 99% of cases. + +2024-11-15 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20241114 + Merge with NetBSD make, pick up + o make.1: note that MAKEOBJPREFIX should be absolute path + also that it can be set via makefile if suitable care taken. + +2024-11-10 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20241110 + Merge with NetBSD make, pick up + o make: allow .../ (search here and above) in + .MAKE.MAKEFILE_PREFERENCE and -f argument. + +2024-11-03 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20241101 + Merge with NetBSD make, pick up + o parse.c: report filename:linenumber in parse debug output + +2024-09-21 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240921 + Merge with NetBSD make, pick up + o make.1: Only list the defaults for MAKEFILE_PREFERENCE once. + + * Makefile: use genfiles.mk to generate ${MAN} + so that it can be tuned for local site. + Ensure MAN is defined before including Makefile.inc + + * Makefile: use MK_GEN_MAN to make it easier to control whether we + generate ${MAN} + +2024-09-16 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240909 + + * arch.c: fix NetBSD PR 58597 + +2024-09-01 Simon J Gerraty + + * Makefile: use SUBDIR.${MK_TESTS} so that we skip + unit-tests for obj and clean when FreeBSD is building WITHOUT_TESTS + + * VERSION (_MAKE_VERSION): 20240901 + Merge with NetBSD make, pick up + o reduce line length in error messages + o var.c: simplify printing of an evaluation stack element + +2024-08-29 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240828 + Merge with NetBSD make, pick up + o add more context to error message about recursive variables + o treat recursive variables non-fatally - continue parsing to end + of makefile + +2024-08-12 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240808 + Merge with NetBSD make, pick up + o improve some error messages for better clarify and readability + +2024-07-22 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240722 + Merge with NetBSD make, pick up + o job.c: remove dead code + +2024-07-21 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20240720 + Merge with NetBSD make, pick up + o compat.c: do not run commands that have parse or evaluation errors. + o var.c: remove wrong error message about an undefined variable + 2024-07-13 Simon J Gerraty * cleanup redundant differences from NetBSD make diff --git a/contrib/bmake/FILES b/contrib/bmake/FILES index bfe95a9b6b47..c8937c610a4d 100644 --- a/contrib/bmake/FILES +++ b/contrib/bmake/FILES @@ -593,6 +593,8 @@ unit-tests/shell-ksh.exp unit-tests/shell-ksh.mk unit-tests/shell-sh.exp unit-tests/shell-sh.mk +unit-tests/suff.exp +unit-tests/suff.mk unit-tests/suff-add-later.exp unit-tests/suff-add-later.mk unit-tests/suff-clear-regular.exp diff --git a/contrib/bmake/Makefile b/contrib/bmake/Makefile index 65730df7e3df..939b71c5e12c 100644 --- a/contrib/bmake/Makefile +++ b/contrib/bmake/Makefile @@ -1,8 +1,8 @@ -# $Id: Makefile,v 1.127 2024/03/19 16:03:23 sjg Exp $ +# $Id: Makefile,v 1.132 2024/09/22 19:56:26 sjg Exp $ -PROG= bmake +PROG = bmake -SRCS= \ +SRCS = \ arch.c \ buf.c \ compat.c \ @@ -25,6 +25,11 @@ SRCS= \ util.c \ var.c +.MAIN: all + +MAN = ${PROG}.1 +SRCS.${MAN} = ${srcdir}/make.1 + .-include "VERSION" .-include "Makefile.inc" @@ -32,25 +37,26 @@ SRCS= \ .-include "Makefile.config" .if !empty(LIBOBJS) -SRCS+= ${LIBOBJS:T:.o=.c} +SRCS += ${LIBOBJS:T:.o=.c} .endif # just in case -prefix?= /usr -srcdir?= ${.CURDIR} +prefix ?= /usr +srcdir ?= ${.PARSEDIR} +srcdir := ${srcdir} -DEFAULT_SYS_PATH?= ${prefix}/share/mk +DEFAULT_SYS_PATH ?= ${prefix}/share/mk -CPPFLAGS+= -DUSE_META -CFLAGS+= ${CPPFLAGS} -CFLAGS+= -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\" -CFLAGS+= -I. -I${srcdir} ${XDEFS} -DMAKE_NATIVE -CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}} -COPTS.main.c+= "-DMAKE_VERSION=\"${_MAKE_VERSION}\"" +CPPFLAGS += -DUSE_META +CFLAGS += ${CPPFLAGS} +CFLAGS += -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\" +CFLAGS += -I. -I${srcdir} ${XDEFS} -DMAKE_NATIVE +CFLAGS += ${COPTS.${.ALLSRC:M*.c:T:u}} +COPTS.main.c += "-DMAKE_VERSION=\"${_MAKE_VERSION}\"" .for x in FORCE_MAKE_OS FORCE_MACHINE FORCE_MACHINE_ARCH .ifdef $x -COPTS.main.c+= "-D$x=\"${$x}\"" +COPTS.main.c += "-D$x=\"${$x}\"" .endif .endfor @@ -60,8 +66,8 @@ USE_FILEMON ?= no .if ${USE_FILEMON:tl} != "no" .PATH: ${srcdir}/filemon SRCS+= filemon_${USE_FILEMON}.c -COPTS.meta.c+= -DUSE_FILEMON -DUSE_FILEMON_${USE_FILEMON:tu} -COPTS.job.c+= ${COPTS.meta.c} +COPTS.meta.c += -DUSE_FILEMON -DUSE_FILEMON_${USE_FILEMON:tu} +COPTS.job.c += ${COPTS.meta.c} .if ${USE_FILEMON} == "dev" FILEMON_H ?= /usr/include/dev/filemon/filemon.h @@ -76,65 +82,82 @@ COPTS.filemon_ktrace.c += -Wno-error=unused-parameter .PATH: ${srcdir} -.if make(obj) || make(clean) -SUBDIR+= unit-tests -.endif - # start-delete1 for bsd.after-import.mk # we skip a lot of this when building as part of FreeBSD etc. # list of OS's which are derrived from BSD4.4 -BSD44_LIST= NetBSD FreeBSD OpenBSD DragonFly MirBSD Bitrig +BSD44_LIST = NetBSD FreeBSD OpenBSD DragonFly MirBSD Bitrig # we are... OS := ${.MAKE.OS:U${uname -s:L:sh}} # are we 4.4BSD ? -isBSD44:=${BSD44_LIST:M${OS}} +isBSD44 := ${BSD44_LIST:M${OS}} .if ${isBSD44} == "" && ${OS:NCygwin:NDarwin:NLinux} != "" -MANTARGET?= cat +MANTARGET ?= cat .if ${MACHINE} == "sun386" # even I don't have one of these anymore :-) -CFLAGS+= -DPORTAR +CFLAGS += -DPORTAR .elif ${OS} != "SunOS" # assume the worst -SRCS+= sigcompat.c -CFLAGS+= -DSIGNAL_FLAGS=SA_RESTART +SRCS += sigcompat.c +CFLAGS += -DSIGNAL_FLAGS=SA_RESTART .endif .else -MANTARGET?= man +MANTARGET ?= man .endif # turn this on by default - ignored if we are root -WITH_INSTALL_AS_USER= +WITH_INSTALL_AS_USER = # suppress with -DWITHOUT_* -OPTIONS_DEFAULT_YES+= \ +OPTIONS_DEFAULT_YES += \ AUTOCONF_MK \ INSTALL_MK \ - PROG_LINK + PROG_LINK \ + TESTS \ + +OPTIONS_DEFAULT_NO += \ + GEN_MAN \ + PROG_VERSION \ -OPTIONS_DEFAULT_NO+= \ - PROG_VERSION +.if ${PROG} != "make" || ${srcdir} != ${.CURDIR} || !exists(${srcdir}/${MAN}) +WITH_GEN_MAN = 1 +.endif # process options now .include .if ${MK_PROG_VERSION} == "yes" -PROG_NAME= ${PROG}-${_MAKE_VERSION} +PROG_NAME = ${PROG}-${_MAKE_VERSION} .if ${MK_PROG_LINK} == "yes" -SYMLINKS+= ${PROG_NAME} ${BINDIR}/${PROG} +SYMLINKS += ${PROG_NAME} ${BINDIR}/${PROG} .endif .endif EXTRACT_MAN=no # end-delete1 -MAN= ${PROG}.1 -MAN1= ${MAN} +.if make(obj) || make(clean) +SUBDIR.${MK_TESTS} += unit-tests +.endif + +MAN1 = ${MAN} + +.if ${MK_GEN_MAN:Uno} == "yes" + +# we use this to generate ${MAN} +.include <${srcdir}/mk/genfiles.mk> .if ${PROG} != "make" -CLEANFILES+= my.history -.if make(${MAN}) || !exists(${srcdir}/${MAN}) +CLEANFILES += my.history +SED_CMDS.${MAN} += \ + -e '/^.Dt/s/MAKE/${PROG:tu}/' \ + -e '/^.Nm/s/make/${PROG}/' \ + +.endif + +.if ${CLEANFILES:U:Mmy.history} != "" +${MAN}: my.history my.history: @(echo ".Nm"; \ echo "is derived from NetBSD"; \ @@ -142,40 +165,46 @@ my.history: echo "It uses autoconf to facilitate portability to other platforms."; \ echo ".Pp") > $@ -.NOPATH: ${MAN} -${MAN}: make.1 my.history - @echo making $@ - @sed \ - -e '/^.Dt/s/MAKE/${PROG:tu}/' \ - -e 's/^.Nx/NetBSD/' \ - -e '/^.Nm/s/make/${PROG}/' \ +SED_CMDS.${MAN} += \ -e '/^.Sh HISTORY/rmy.history' \ - -e '/^.Sh HISTORY/,$$s,^.Nm,make,' ${srcdir}/make.1 > $@ + -e '/^.Sh HISTORY/,/BUGS/s,^.Nm,make,' \ -all beforeinstall: ${MAN} -_mfromdir=. .endif + +.if ${.MAKE.OS:N*BSD} != "" +# assume .Nx is not supported +SED_CMDS.${MAN} += -e 's/^\.Nx/NetBSD/' +.endif + +# watch out for a late change of PROG +.if !empty(SRCS.${MAN}) +.NOPATH: ${MAN} +${MAN}: ${SRCS.${MAN}} _GENFILES_USE + +all man beforeinstall: ${MAN} +_mfromdir=. .endif +.endif # MK_GEN_MAN -MANTARGET?= cat -MANDEST?= ${MANDIR}/${MANTARGET}1 +MANTARGET ?= cat +MANDEST ?= ${MANDIR}/${MANTARGET}1 .if ${MANTARGET} == "cat" -_mfromdir=${srcdir} +_mfromdir = ${srcdir} .endif .include -CPPFLAGS+= -DMAKE_NATIVE -DHAVE_CONFIG_H +CPPFLAGS += -DMAKE_NATIVE -DHAVE_CONFIG_H COPTS.var.c += -Wno-cast-qual COPTS.job.c += -Wno-format-nonliteral COPTS.parse.c += -Wno-format-nonliteral COPTS.var.c += -Wno-format-nonliteral # Force these -SHAREDIR= ${SHAREDIR.bmake:U${prefix}/share} -BINDIR= ${BINDIR.bmake:U${prefix}/bin} -MANDIR= ${MANDIR.bmake:U${SHAREDIR}/man} +SHAREDIR = ${SHAREDIR.bmake:U${prefix}/share} +BINDIR = ${BINDIR.bmake:U${prefix}/bin} +MANDIR = ${MANDIR.bmake:U${SHAREDIR}/man} ${OBJS}: config.h diff --git a/contrib/bmake/VERSION b/contrib/bmake/VERSION index f55bfabc9103..9d1a987f65d6 100644 --- a/contrib/bmake/VERSION +++ b/contrib/bmake/VERSION @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20240711 +_MAKE_VERSION=20250125 diff --git a/contrib/bmake/arch.c b/contrib/bmake/arch.c index 00c72261707f..77ac7f3c5707 100644 --- a/contrib/bmake/arch.c +++ b/contrib/bmake/arch.c @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.221 2024/07/07 07:50:57 rillig Exp $ */ +/* $NetBSD: arch.c,v 1.222 2024/08/06 17:46:01 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -147,7 +147,7 @@ struct ar_hdr { #include "dir.h" /* "@(#)arch.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: arch.c,v 1.221 2024/07/07 07:50:57 rillig Exp $"); +MAKE_RCSID("$NetBSD: arch.c,v 1.222 2024/08/06 17:46:01 rillig Exp $"); typedef struct List ArchList; typedef struct ListNode ArchListNode; @@ -314,8 +314,7 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *scope) if (*cp == '\0') { Parse_Error(PARSE_FATAL, - "No closing parenthesis " - "in archive specification"); + "Missing ')' in archive specification"); return false; } @@ -416,7 +415,7 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *scope) static struct ar_hdr * ArchStatMember(const char *archive, const char *member, bool addToCache) { -#define AR_MAX_NAME_LEN (sizeof arh.ar_name - 1) +#define AR_MAX_NAME_LEN (sizeof arh.AR_NAME - 1) FILE *arch; size_t size; /* Size of archive member */ char magic[SARMAG]; diff --git a/contrib/bmake/bmake.1 b/contrib/bmake/bmake.1 index f7cc15b16c41..eef2d799b960 100644 --- a/contrib/bmake/bmake.1 +++ b/contrib/bmake/bmake.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.378 2024/07/01 21:02:26 sjg Exp $ +.\" $NetBSD: make.1,v 1.381 2024/11/14 19:30:13 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd July 1, 2024 +.Dd November 14, 2024 .Dt BMAKE 1 .Os .Sh NAME @@ -60,10 +60,11 @@ If no .Fl f Ar makefile option is given, .Nm -tries to open -.Sq Pa makefile -then -.Sq Pa Makefile +looks for the makefiles listed in +.Va .MAKE.MAKEFILE_PREFERENCE +(default +.Sq Pa makefile , +.Sq Pa Makefile ) in order to find the specifications. If the file .Sq Pa .depend @@ -233,15 +234,20 @@ so the actual commands are printed as they are executed. .It Fl e Let environment variables override global variables within makefiles. .It Fl f Ar makefile -Specify a makefile to read instead of the default -.Pa makefile -or -.Pa Makefile . +Specify a makefile to read instead of one of the defaults listed in +.Va .MAKE.MAKEFILE_PREFERENCE . If .Ar makefile is .Ql \&- , standard input is read. +If +.Ar makefile +starts with the string +.Ql \&.../ , +.Nm +searches for the specified path in the rest of the argument +in the current directory and its parents. Multiple makefiles may be specified, and are read in the order specified. .It Fl I Ar directory Specify a directory in which to search for makefiles and included makefiles. @@ -1159,6 +1165,7 @@ to help debug. .It Va MAKEOBJDIRPREFIX Used to create files in a separate directory, see .Va .OBJDIR . +It should be an absolute path. .It Va .MAKE.OS The name of the operating system, see .Xr uname 1 . @@ -2636,12 +2643,18 @@ and .Ev MAKEOBJDIRPREFIX and .Ev MAKEOBJDIR -may only be set in the environment or on the command line to +should be set in the environment or on the command line to .Nm and not as makefile variables; see the description of .Sq Va .OBJDIR for more details. +It is possible to set these via makefile variables but unless done +very early and the +.Sq Ic .OBJDIR +target is used to reset +.Sq Va .OBJDIR , +there may be unexpected side effects. .Sh FILES .Bl -tag -width /usr/share/mk -compact .It .depend @@ -2663,13 +2676,13 @@ An incomplete list of changes in older versions of .Nm : .Pp The way that .for loop variables are substituted changed after -NetBSD 5.0 +.Nx 5.0 so that they still appear to be variable expansions. In particular this stops them being treated as syntax, and removes some obscure problems using them in .if statements. .Pp The way that parallel makes are scheduled changed in -NetBSD 4.0 +.Nx 4.0 so that .ORDER and .WAIT apply recursively to the dependent nodes. The algorithms used may change again in the future. .Ss Other make dialects @@ -2767,21 +2780,21 @@ does not exist ... unless someone creates an file). .Sh BUGS The -make +.Nm syntax is difficult to parse. For instance, finding the end of a variable's use should involve scanning each of the modifiers, using the correct terminator for each field. In many places -make +.Nm just counts {} and () in order to find the end of a variable expansion. .Pp There is no way of escaping a space character in a filename. .Pp In jobs mode, when a target fails; -make +.Nm will put an error token into the job token pool. This will cause all other instances of -make +.Nm using that token pool to abort the build and exit with error code 6. Sometimes the attempt to suppress a cascade of unnecessary errors, can result in a seemingly unexplained diff --git a/contrib/bmake/bmake.cat1 b/contrib/bmake/bmake.cat1 index f46f6681320a..8a1909e684ed 100644 --- a/contrib/bmake/bmake.cat1 +++ b/contrib/bmake/bmake.cat1 @@ -13,9 +13,9 @@ DDEESSCCRRIIPPTTIIOONN bbmmaakkee is a program designed to simplify the maintenance of other programs. Its input is a list of specifications as to the files upon which programs and other files depend. If no --ff _m_a_k_e_f_i_l_e option is - given, bbmmaakkee tries to open `_m_a_k_e_f_i_l_e' then `_M_a_k_e_f_i_l_e' in order to find - the specifications. If the file `_._d_e_p_e_n_d' exists, it is read, see - mkdep(1). + given, bbmmaakkee looks for the makefiles listed in _._M_A_K_E_._M_A_K_E_F_I_L_E___P_R_E_F_E_R_E_N_C_E + (default `_m_a_k_e_f_i_l_e', `_M_a_k_e_f_i_l_e') in order to find the specifications. If + the file `_._d_e_p_e_n_d' exists, it is read, see mkdep(1). This manual page is intended as a reference document only. For a more thorough description of bbmmaakkee and makefiles, please refer to _P_M_a_k_e _- _A @@ -138,9 +138,12 @@ DDEESSCCRRIIPPTTIIOONN makefiles. --ff _m_a_k_e_f_i_l_e - Specify a makefile to read instead of the default _m_a_k_e_f_i_l_e or - _M_a_k_e_f_i_l_e. If _m_a_k_e_f_i_l_e is `-', standard input is read. Multiple - makefiles may be specified, and are read in the order specified. + Specify a makefile to read instead of one of the defaults listed + in _._M_A_K_E_._M_A_K_E_F_I_L_E___P_R_E_F_E_R_E_N_C_E. If _m_a_k_e_f_i_l_e is `-', standard input + is read. If _m_a_k_e_f_i_l_e starts with the string `.../', bbmmaakkee + searches for the specified path in the rest of the argument in + the current directory and its parents. Multiple makefiles may be + specified, and are read in the order specified. --II _d_i_r_e_c_t_o_r_y Specify a directory in which to search for makefiles and included @@ -765,7 +768,8 @@ VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS debug. _M_A_K_E_O_B_J_D_I_R_P_R_E_F_I_X - Used to create files in a separate directory, see _._O_B_J_D_I_R. + Used to create files in a separate directory, see _._O_B_J_D_I_R. It + should be an absolute path. _._M_A_K_E_._O_S The name of the operating system, see uname(1). It is read-only. @@ -1691,9 +1695,11 @@ EENNVVIIRROONNMMEENNTT MACHINE_ARCH, MAKE, MAKEFLAGS, MAKEOBJDIR, MAKEOBJDIRPREFIX, MAKESYSPATH, PWD, and TMPDIR. - MAKEOBJDIRPREFIX and MAKEOBJDIR may only be set in the environment or on + MAKEOBJDIRPREFIX and MAKEOBJDIR should be set in the environment or on the command line to bbmmaakkee and not as makefile variables; see the - description of `_._O_B_J_D_I_R' for more details. + description of `_._O_B_J_D_I_R' for more details. It is possible to set these + via makefile variables but unless done very early and the `..OOBBJJDDIIRR' + target is used to reset `_._O_B_J_D_I_R', there may be unexpected side effects. FFIILLEESS .depend list of dependencies @@ -1774,17 +1780,17 @@ HHIISSTTOORRYY _F_R_C file). BBUUGGSS - The make syntax is difficult to parse. For instance, finding the end of + The bbmmaakkee syntax is difficult to parse. For instance, finding the end of a variable's use should involve scanning each of the modifiers, using the - correct terminator for each field. In many places make just counts {} + correct terminator for each field. In many places bbmmaakkee just counts {} and () in order to find the end of a variable expansion. There is no way of escaping a space character in a filename. - In jobs mode, when a target fails; make will put an error token into the - job token pool. This will cause all other instances of make using that + In jobs mode, when a target fails; bbmmaakkee will put an error token into the + job token pool. This will cause all other instances of bbmmaakkee using that token pool to abort the build and exit with error code 6. Sometimes the attempt to suppress a cascade of unnecessary errors, can result in a seemingly unexplained `*** Error code 6' -FreeBSD 14.1-RELEASE July 1, 2024 FreeBSD 14.1-RELEASE +FreeBSD 14.1-RELEASE-p5 November 14, 2024 FreeBSD 14.1-RELEASE-p5 diff --git a/contrib/bmake/bsd.after-import.mk b/contrib/bmake/bsd.after-import.mk index 418caeaa58a6..f2948b855753 100644 --- a/contrib/bmake/bsd.after-import.mk +++ b/contrib/bmake/bsd.after-import.mk @@ -1,4 +1,4 @@ -# $Id: bsd.after-import.mk,v 1.18 2023/09/18 05:29:23 sjg Exp $ +# $Id: bsd.after-import.mk,v 1.19 2024/09/21 22:44:55 sjg Exp $ # This makefile is for use when integrating bmake into a BSD build # system. Use this makefile after importing bmake. @@ -61,8 +61,7 @@ MAKEFILE_SED = sed -e '/^MACHINE/d' \ -e '/include.*VERSION/d' \ -e '/^CC=/s,=,?=,' \ -e '/^PROG/ { s,=,?=,;s,bmake,$${.CURDIR:T},; }' \ - -e 's,^.-include,.sinclude,' \ - -e '/^\..*include *type & OP_SILENT) != OP_NONE; errCheck = !(gn->type & OP_IGNORE); doIt = false; + parseErrorsBefore = parseErrors; cmdStart = Var_SubstInTarget(cmd, gn); - /* TODO: handle errors */ + if (parseErrors != parseErrorsBefore) { + free(cmdStart); + return false; + } if (cmdStart[0] == '\0') { free(cmdStart); diff --git a/contrib/bmake/cond.c b/contrib/bmake/cond.c index 58c0069555e1..a724ba7ecf26 100644 --- a/contrib/bmake/cond.c +++ b/contrib/bmake/cond.c @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.366 2024/07/06 21:21:09 rillig Exp $ */ +/* $NetBSD: cond.c,v 1.371 2025/01/11 21:21:33 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -91,7 +91,7 @@ #include "dir.h" /* "@(#)cond.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: cond.c,v 1.366 2024/07/06 21:21:09 rillig Exp $"); +MAKE_RCSID("$NetBSD: cond.c,v 1.371 2025/01/11 21:21:33 rillig Exp $"); /* * Conditional expressions conform to this grammar: @@ -221,13 +221,7 @@ ParseWord(const char **pp, bool doEval) if ((ch == '&' || ch == '|') && depth == 0) break; if (ch == '$') { - VarEvalMode emode = doEval - ? VARE_EVAL_DEFINED - : VARE_PARSE; - /* - * TODO: make Var_Parse complain about undefined - * variables. - */ + VarEvalMode emode = doEval ? VARE_EVAL : VARE_PARSE; FStr nestedVal = Var_Parse(&p, SCOPE_CMDLINE, emode); /* TODO: handle errors */ Buf_AddStr(&word, nestedVal.str); @@ -242,7 +236,6 @@ ParseWord(const char **pp, bool doEval) *** 9437 LINES SKIPPED *** From nobody Sat Jan 10 21:34:06 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2l2YF7z6MxPF for ; Sat, 10 Jan 2026 21:34:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpX2l07JKz3QnD for ; Sat, 10 Jan 2026 21:34:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RerorM9EGHTKjixxEP0Rg5UbChmSnHYTR7b56F9C9Dw=; b=vE9SpJgKMlmzyZXXZ/ET9uzwyxBXo6LOgqwmM9t/jxYLJTGJ7J90ZbaSloKvnwGHV0ORZj XypA9L7l3IuGXHKH8SNChUu7JzVUsKrUyqC7SFcQz1bKC2MSDjUcOKd7zDLrVW1Dd74NP2 V1DRbb1KiwWMX5rITsI+FMTGXdvQPvQ8xcIn2hC3ycI6cJhUhYDOPubgthi4pzDPeXyzgQ FS6fYvGg2dxCNHDQwQc5HH6mvmbYgruPwpVH/Zg3BJ7M+l0krK9d0AjnDgSbYSzp47CoOY a+OpNSizL45mQth8TDpBa+qqtMugk1y20Zrhh1r6UYn1q40kXDgKOeqOpYF+Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RerorM9EGHTKjixxEP0Rg5UbChmSnHYTR7b56F9C9Dw=; b=xwD6HS4Oh7+mbArALEpCHXE4Mgp67C2X8JEm/k4tCt9XwkRhg9RfsoKpWMSzM78qVkTToD W19mjAmaGruEHPt7aS9MfcQKQsd8FpyAYmzY4wlzFKnp7MTCc5jVLLdxmv9MGW2jjYyilI nMmbT5+Cbs2gPgZm/6hnxDpCsMqMVKWaIbEe1l+IeHT810wJJ1kDu/VnK68NvyMNg2HvvS Jy1jTpnzVjPo0U3AwWxUeR2KAnqGD8QeY+M33bsgTMAAhRgrdiIQb/7PIOHaiLv+HFifNM 0zR83slzdQw4IaAvOOkDxLNzdRDiCIed2gcrO2t+CeuiQOJ/4ijOJb5oWVEA1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768080847; a=rsa-sha256; cv=none; b=XorDF6XaI8ZMXwHG/ODksY2YV8fmMOVPtVIJUiAYucaIiaR9hovOr0btf6SQv/fK9lggpZ bMusu7cqABcuoFaF5aeoZ0RJUt3xyw1/3a0GNVXbyhg5TnnFD4dAWy3JW4KEqe4G3Gnxc8 MoozuFrzAvvGYzKC05gGiDGgz5Nw/f8hJN9TDb2xA7wra+Vr3ZvDUjAgtcNJLsP9rlyNB3 MqzVMqYOtGtHM8jOkAEYkDnJYs8sEquHImbhTQd8zNBxx76Xn6zFpJPMDBM0kp4pwRgWn/ WbfHcfeqIbuG0BoihxQA0VKhQUnQQQjb7e1bjuiXSXuK9viD8CeubmsnBisj4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2k6Hp7z1B8F for ; Sat, 10 Jan 2026 21:34:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25ba1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 21:34:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Simon J. Gerraty Subject: git: a9319c35e816 - stable/14 - Merge bmake-20250308 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a9319c35e816e0fab5de5d6b6e814667a14d3e7a Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 21:34:06 +0000 Message-Id: <6962c5ce.25ba1.72603123@gitrepo.freebsd.org> The branch stable/14 has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=a9319c35e816e0fab5de5d6b6e814667a14d3e7a commit a9319c35e816e0fab5de5d6b6e814667a14d3e7a Author: Simon J. Gerraty AuthorDate: 2025-03-19 21:06:16 +0000 Commit: Simon J. Gerraty CommitDate: 2026-01-10 21:33:12 +0000 Merge bmake-20250308 (cherry picked from commit d9a65c5de1c9f30ae71ce0be8fb88be9d20d216d) --- contrib/bmake/ChangeLog | 17 +++ contrib/bmake/Makefile | 8 +- contrib/bmake/VERSION | 2 +- contrib/bmake/bmake.cat1 | 2 +- contrib/bmake/bsd.after-import.mk | 39 ++++-- contrib/bmake/job.c | 251 +++++++++++++------------------------- contrib/bmake/main.c | 22 +--- contrib/bmake/make.h | 3 +- contrib/bmake/mk/ChangeLog | 13 ++ contrib/bmake/mk/install-mk | 6 +- contrib/bmake/mk/jobs.mk | 6 +- contrib/bmake/mk/meta.autodep.mk | 20 ++- contrib/bmake/mk/meta.stage.mk | 29 ++++- contrib/bmake/mk/sys.vars.mk | 7 +- contrib/bmake/os.sh | 10 +- usr.bin/bmake/Makefile | 104 ++++++++-------- usr.bin/bmake/Makefile.config | 4 +- usr.bin/bmake/unit-tests/Makefile | 2 +- 18 files changed, 265 insertions(+), 280 deletions(-) diff --git a/contrib/bmake/ChangeLog b/contrib/bmake/ChangeLog index 212b0fcfaacb..15a58e2a0924 100644 --- a/contrib/bmake/ChangeLog +++ b/contrib/bmake/ChangeLog @@ -1,3 +1,20 @@ +2025-03-08 Simon J Gerraty + + * bsd.after-import.mk: by default generate makefiles + closer to BSD style. + + * VERSION (_MAKE_VERSION): 20250308 + Merge with NetBSD make, pick up + o clean up comments and code for parallel mode + o job.c: avoid SIGPIPE for children, call Job_Wait befor abort. + +2025-02-27 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250225 + Merge with NetBSD make, pick up + o job.c: reliably remove targets on interrupt, + by passing signal to children first. + 2025-01-25 Simon J Gerraty * VERSION (_MAKE_VERSION): 20250125 diff --git a/contrib/bmake/Makefile b/contrib/bmake/Makefile index 939b71c5e12c..ba2b2e742d35 100644 --- a/contrib/bmake/Makefile +++ b/contrib/bmake/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.132 2024/09/22 19:56:26 sjg Exp $ +# $Id: Makefile,v 1.133 2025/03/08 20:12:56 sjg Exp $ PROG = bmake @@ -65,7 +65,7 @@ COPTS.main.c += "-D$x=\"${$x}\"" USE_FILEMON ?= no .if ${USE_FILEMON:tl} != "no" .PATH: ${srcdir}/filemon -SRCS+= filemon_${USE_FILEMON}.c +SRCS += filemon_${USE_FILEMON}.c COPTS.meta.c += -DUSE_FILEMON -DUSE_FILEMON_${USE_FILEMON:tu} COPTS.job.c += ${COPTS.meta.c} @@ -134,7 +134,7 @@ SYMLINKS += ${PROG_NAME} ${BINDIR}/${PROG} .endif .endif -EXTRACT_MAN=no +EXTRACT_MAN = no # end-delete1 .if make(obj) || make(clean) @@ -182,7 +182,7 @@ SED_CMDS.${MAN} += -e 's/^\.Nx/NetBSD/' ${MAN}: ${SRCS.${MAN}} _GENFILES_USE all man beforeinstall: ${MAN} -_mfromdir=. +_mfromdir = . .endif .endif # MK_GEN_MAN diff --git a/contrib/bmake/VERSION b/contrib/bmake/VERSION index 9d1a987f65d6..d26469e64381 100644 --- a/contrib/bmake/VERSION +++ b/contrib/bmake/VERSION @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20250125 +_MAKE_VERSION=20250308 diff --git a/contrib/bmake/bmake.cat1 b/contrib/bmake/bmake.cat1 index 8a1909e684ed..7e6f25524a05 100644 --- a/contrib/bmake/bmake.cat1 +++ b/contrib/bmake/bmake.cat1 @@ -1793,4 +1793,4 @@ BBUUGGSS attempt to suppress a cascade of unnecessary errors, can result in a seemingly unexplained `*** Error code 6' -FreeBSD 14.1-RELEASE-p5 November 14, 2024 FreeBSD 14.1-RELEASE-p5 +FreeBSD 14.1-RELEASE-p7 November 14, 2024 FreeBSD 14.1-RELEASE-p7 diff --git a/contrib/bmake/bsd.after-import.mk b/contrib/bmake/bsd.after-import.mk index f2948b855753..74811e98f979 100644 --- a/contrib/bmake/bsd.after-import.mk +++ b/contrib/bmake/bsd.after-import.mk @@ -1,4 +1,4 @@ -# $Id: bsd.after-import.mk,v 1.19 2024/09/21 22:44:55 sjg Exp $ +# $Id: bsd.after-import.mk,v 1.22 2025/03/09 02:56:42 sjg Exp $ # This makefile is for use when integrating bmake into a BSD build # system. Use this makefile after importing bmake. @@ -9,6 +9,7 @@ # The goal is to allow the benefits of autoconf without # the overhead of running configure. +.MAIN: all all: _makefile _utmakefile all: after-import @@ -64,6 +65,18 @@ MAKEFILE_SED = sed -e '/^MACHINE/d' \ -e '/^\..*include * ${.CURDIR}/$f .endfor +.if make(all) +_makefile _utmakefile: bootstrap ${MAKEFILE} +.endif + # this needs the most work -_makefile: bootstrap ${MAKEFILE} +_makefile: @echo Generating ${.CURDIR}/Makefile @(echo '# This is a generated file, do NOT edit!'; \ echo '# See ${_this:S,${SRCTOP}/,,}'; \ echo '#'; ${ECHO_TAG} '# $$${HOST_OS}$$'; \ - echo; echo 'SRCTOP?= $${.CURDIR:${.CURDIR:S,${SRCTOP}/,,:C,[^/]+,H,g:S,/,:,g}}'; \ + echo; echo 'SRCTOP${.space}?= $${.CURDIR:${.CURDIR:S,${SRCTOP}/,,:C,[^/]+,H,g:S,/,:,g}}'; \ echo; echo '# look here first for config.h'; \ - echo 'CFLAGS+= -I$${.CURDIR}'; echo; \ + echo 'CFLAGS${.space}+= -I$${.CURDIR}'; echo; \ echo '# for after-import'; \ - echo 'CLEANDIRS+= ${HOST_OS}'; \ - echo 'CLEANFILES+= bootstrap'; echo; \ + echo 'CLEANDIRS${.space}+= ${HOST_OS}'; \ + echo 'CLEANFILES${.space}+= bootstrap'; echo; \ ${MAKEFILE_SED} \ ${1 2:L:@n@-e '/start-delete$n/,/end-delete$n/d'@} \ ${BMAKE_SRC}/Makefile; \ echo; echo '# override some simple things'; \ - echo 'BINDIR= /usr/bin'; \ - echo 'MANDIR= ${MANDIR:U/usr/share/man}'; \ + echo 'BINDIR${.space}= /usr/bin'; \ + echo 'MANDIR${.space}= ${MANDIR:U/usr/share/man}'; \ echo; echo '# make sure we get this'; \ - echo 'CFLAGS+= $${COPTS.$${.IMPSRC:T}}'; \ + echo 'CFLAGS${.space}+= $${COPTS.$${.IMPSRC:T}}'; \ echo; echo 'after-import: ${_this:S,${SRCTOP},\${SRCTOP},}'; \ echo ' cd $${.CURDIR} && $${.MAKE} -f ${_this:S,${SRCTOP},\${SRCTOP},}'; \ echo ) > ${.TARGET} @cmp -s ${.TARGET} ${.CURDIR}/Makefile || \ mv ${.TARGET} ${.CURDIR}/Makefile -_utmakefile: bootstrap ${MAKEFILE} +_utmakefile: @echo Generating ${.CURDIR}/unit-tests/Makefile @mkdir -p ${.CURDIR}/unit-tests @(echo '# This is a generated file, do NOT edit!'; \ diff --git a/contrib/bmake/job.c b/contrib/bmake/job.c index bd85e6d95fb8..d06b1570ba85 100644 --- a/contrib/bmake/job.c +++ b/contrib/bmake/job.c @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.485 2025/01/19 10:57:10 rillig Exp $ */ +/* $NetBSD: job.c,v 1.489 2025/03/08 20:15:03 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -102,10 +102,7 @@ * define the shell that is used for the creation * commands in jobs mode. * - * Job_Finish Perform any final processing which needs doing. - * This includes the execution of any commands - * which have been/were attached to the .END - * target. It should only be called when the + * Job_Finish Make the .END target. Should only be called when the * job table is empty. * * Job_AbortAll Abort all currently running jobs. Do not handle @@ -154,7 +151,7 @@ #include "trace.h" /* "@(#)job.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: job.c,v 1.485 2025/01/19 10:57:10 rillig Exp $"); +MAKE_RCSID("$NetBSD: job.c,v 1.489 2025/03/08 20:15:03 rillig Exp $"); /* * A shell defines how the commands are run. All commands for a target are @@ -689,7 +686,7 @@ JobPassSig_suspend(int signo) act.sa_flags = 0; (void)sigaction(signo, &act, NULL); - DEBUG1(JOB, "JobPassSig passing signal %d to self.\n", signo); + DEBUG1(JOB, "JobPassSig_suspend passing signal %d to self.\n", signo); (void)kill(getpid(), signo); @@ -1251,8 +1248,16 @@ JobFinish (Job *job, WAIT_T status) if (return_job_token) Job_TokenReturn(); - if (aborting == ABORT_ERROR && jobTokensRunning == 0) - Finish(job_errors); + if (aborting == ABORT_ERROR && jobTokensRunning == 0) { + if (shouldDieQuietly(NULL, -1)) { + /* + * TODO: better clean up properly, to avoid killing + * child processes by SIGPIPE. + */ + exit(2); + } + Fatal("%d error%s", job_errors, job_errors == 1 ? "" : "s"); + } } static void @@ -1962,27 +1967,14 @@ JobRun(GNode *targ) } } -/* - * Handle the exit of a child. Called from Make_Make. - * - * The job descriptor is removed from the list of children. - * - * Notes: - * We do waits, blocking or not, according to the wisdom of our - * caller, until there are no more children to report. For each - * job, call JobFinish to finish things off. - */ void Job_CatchChildren(void) { - int pid; /* pid of dead child */ - WAIT_T status; /* Exit/termination status */ + int pid; + WAIT_T status; - /* Don't even bother if we know there's no one around. */ if (jobTokensRunning == 0) return; - - /* Have we received SIGCHLD since last call? */ if (caught_sigchld == 0) return; caught_sigchld = 0; @@ -2001,21 +1993,19 @@ Job_CatchChildren(void) void JobReapChild(pid_t pid, WAIT_T status, bool isJobs) { - Job *job; /* job descriptor for dead child */ + Job *job; - /* Don't even bother if we know there's no one around. */ if (jobTokensRunning == 0) return; job = JobFindPid(pid, JOB_ST_RUNNING, isJobs); if (job == NULL) { - if (isJobs) { - if (!lurking_children) - Error("Child (%d) status %x not in table?", - pid, status); - } - return; /* not ours */ + if (isJobs && !lurking_children) + Error("Child (%d) status %x not in table?", + pid, status); + return; } + if (WIFSTOPPED(status)) { DEBUG2(JOB, "Process %d (%s) stopped.\n", job->pid, job->node->name); @@ -2047,12 +2037,6 @@ JobReapChild(pid_t pid, WAIT_T status, bool isJobs) JobFinish(job, status); } -/* - * Catch the output from our children, if we're using pipes do so. Otherwise - * just block time until we get a signal(most likely a SIGCHLD) since there's - * no point in just spinning when there's nothing to do and the reaping of a - * child can wait for a while. - */ void Job_CatchOutput(void) { @@ -2062,7 +2046,7 @@ Job_CatchOutput(void) (void)fflush(stdout); - /* The first fd in the list is the job token pipe */ + /* Skip the first fd in the list, as it is the job token pipe. */ do { nready = poll(fds + 1 - wantToken, fdsLen - 1 + wantToken, POLL_MSEC); @@ -2073,13 +2057,12 @@ Job_CatchOutput(void) if (nready > 0 && readyfd(&childExitJob)) { char token = 0; - ssize_t count; - count = read(childExitJob.inPipe, &token, 1); + ssize_t count = read(childExitJob.inPipe, &token, 1); if (count == 1) { if (token == DO_JOB_RESUME[0]) /* * Complete relay requested from our SIGCONT - * handler + * handler. */ JobRestartJobs(); } else if (count == 0) @@ -2160,10 +2143,7 @@ Shell_Init(void) } } -/* - * Return the string literal that is used in the current command shell - * to produce a newline character. - */ +/* Return the shell string literal that results in a newline character. */ const char * Shell_GetNewline(void) { @@ -2192,12 +2172,11 @@ AddSig(int sig, SignalProc handler) } } -/* Initialize the process module. */ void Job_Init(void) { Job_SetPrefix(); - /* Allocate space for all the job info */ + job_table = bmake_malloc((size_t)opts.maxJobs * sizeof *job_table); memset(job_table, 0, (size_t)opts.maxJobs * sizeof *job_table); job_table_end = job_table + opts.maxJobs; @@ -2214,8 +2193,8 @@ Job_Init(void) /* - * There is a non-zero chance that we already have children. - * eg after 'make -f- <status != JOB_ST_RUNNING) - continue; - - gn = job->node; - - JobDeleteTarget(gn); - if (job->pid != 0) { + if (job->status == JOB_ST_RUNNING && job->pid != 0) { DEBUG2(JOB, "JobInterrupt passing signal %d to child %d.\n", signo, job->pid); @@ -2551,6 +2490,14 @@ JobInterrupt(bool runINTERRUPT, int signo) } } + for (job = job_table; job < job_table_end; job++) { + if (job->status == JOB_ST_RUNNING && job->pid != 0) { + int status; + (void)waitpid(job->pid, &status, 0); + JobDeleteTarget(job->node); + } + } + JobSigUnlock(&mask); if (runINTERRUPT && !opts.touch) { @@ -2564,11 +2511,7 @@ JobInterrupt(bool runINTERRUPT, int signo) exit(signo); /* XXX: why signo? */ } -/* - * Do the final processing, i.e. run the commands attached to the .END target. - * - * Return the number of errors reported. - */ +/* Make the .END target, returning the number of job-related errors. */ int Job_Finish(void) { @@ -2584,7 +2527,6 @@ Job_Finish(void) } #ifdef CLEANUP -/* Clean up any memory used by the jobs module. */ void Job_End(void) { @@ -2592,14 +2534,11 @@ Job_End(void) } #endif -/* - * Waits for all running jobs to finish and returns. - * Sets 'aborting' to ABORT_WAIT to prevent other jobs from starting. - */ +/* Waits for all running jobs to finish. */ void Job_Wait(void) { - aborting = ABORT_WAIT; + aborting = ABORT_WAIT; /* Prevent other jobs from starting. */ while (jobTokensRunning != 0) { Job_CatchOutput(); } @@ -2610,14 +2549,12 @@ Job_Wait(void) * Abort all currently running jobs without handling output or anything. * This function is to be called only in the event of a major error. * Most definitely NOT to be called from JobInterrupt. - * - * All children are killed, not just the firstborn. */ void Job_AbortAll(void) { - Job *job; /* the job descriptor in that element */ - WAIT_T foo; + Job *job; + WAIT_T status; aborting = ABORT_ERROR; @@ -2625,25 +2562,18 @@ Job_AbortAll(void) for (job = job_table; job < job_table_end; job++) { if (job->status != JOB_ST_RUNNING) continue; - /* - * kill the child process with increasingly drastic - * signals to make darn sure it's dead. - */ KILLPG(job->pid, SIGINT); KILLPG(job->pid, SIGKILL); } } - /* - * Catch as many children as want to report in at first, then give up - */ - while (waitpid((pid_t)-1, &foo, WNOHANG) > 0) + while (waitpid((pid_t)-1, &status, WNOHANG) > 0) continue; } /* * Tries to restart stopped jobs if there are slots available. - * Called in process context in response to a SIGCONT. + * Called in response to a SIGCONT. */ static void JobRestartJobs(void) @@ -2708,10 +2638,6 @@ clearfd(Job *job) fdsLen--; #if defined(USE_FILEMON) && !defined(USE_FILEMON_DEV) if (useMeta) { - /* - * Sanity check: there should be two fds per job, so the job's - * pollfd number should be even. - */ assert(nfds_per_job() == 2); if (i % 2 != 0) Punt("odd-numbered fd with meta"); @@ -2756,7 +2682,7 @@ JobTokenAdd(void) tok = '+'; /* no error token */ } - /* If we are depositing an error token flush everything else */ + /* If we are depositing an error token, flush everything else. */ while (tok != '+' && read(tokenWaitJob.inPipe, &tok1, 1) == 1) continue; @@ -2766,7 +2692,6 @@ JobTokenAdd(void) continue; } -/* Get a temp file */ int Job_TempFile(const char *pattern, char *tfile, size_t tfile_sz) { @@ -2782,7 +2707,7 @@ Job_TempFile(const char *pattern, char *tfile, size_t tfile_sz) return fd; } -/* Prep the job token pipe in the root make process. */ +/* Prepare the job token pipe in the root make process. */ void Job_ServerStart(int max_tokens, int jp_0, int jp_1) { @@ -2790,7 +2715,6 @@ Job_ServerStart(int max_tokens, int jp_0, int jp_1) char jobarg[64]; if (jp_0 >= 0 && jp_1 >= 0) { - /* Pipe passed in from parent */ tokenWaitJob.inPipe = jp_0; tokenWaitJob.outPipe = jp_1; (void)fcntl(jp_0, F_SETFD, FD_CLOEXEC); @@ -2832,7 +2756,7 @@ Job_TokenReturn(void) /* * Attempt to withdraw a token from the pool. * - * If pool is empty, set wantToken so that we wake up when a token is + * If the pool is empty, set wantToken so that we wake up when a token is * released. * * Returns true if a token was withdrawn, and false if the pool is currently @@ -2871,8 +2795,10 @@ Job_TokenWithdraw(void) while (write(tokenWaitJob.outPipe, &tok, 1) == -1 && errno == EAGAIN) continue; - if (shouldDieQuietly(NULL, 1)) - exit(6); /* we aborted */ + if (shouldDieQuietly(NULL, 1)) { + Job_Wait(); + exit(6); + } Fatal("A failure has been detected " "in another branch of the parallel make"); } @@ -2888,12 +2814,7 @@ Job_TokenWithdraw(void) return true; } -/* - * Run the named target if found. If a filename is specified, then set that - * to the sources. - * - * Exits if the target fails. - */ +/* Make the named target if found, exit if the target fails. */ bool Job_RunTarget(const char *target, const char *fname) { diff --git a/contrib/bmake/main.c b/contrib/bmake/main.c index 0b48b2d59389..9577fb41ee7b 100644 --- a/contrib/bmake/main.c +++ b/contrib/bmake/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.638 2025/01/19 12:59:39 rillig Exp $ */ +/* $NetBSD: main.c,v 1.639 2025/03/07 06:50:34 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -83,9 +83,6 @@ * Fatal Print an error message and exit. * * Punt Abort all jobs and exit with a message. - * - * Finish Finish things up by printing the number of errors - * that occurred, and exit. */ #include @@ -111,7 +108,7 @@ #include "trace.h" /* "@(#)main.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: main.c,v 1.638 2025/01/19 12:59:39 rillig Exp $"); +MAKE_RCSID("$NetBSD: main.c,v 1.639 2025/03/07 06:50:34 rillig Exp $"); #if defined(MAKE_NATIVE) __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 " "The Regents of the University of California. " @@ -1783,7 +1780,7 @@ Cmd_Exec(const char *cmd, char **error) int pipefds[2]; int cpid; /* Child PID */ int pid; /* PID from wait() */ - int status; /* command exit status */ + WAIT_T status; /* command exit status */ Buffer buf; /* buffer to store the result */ ssize_t bytes_read; char *output; @@ -1962,19 +1959,6 @@ DieHorribly(void) exit(2); /* Not 1 so -q can distinguish error */ } -/* - * Called when aborting due to errors in child shell to signal abnormal exit. - * The program exits. - * Errors is the number of errors encountered in Make_Make. - */ -void -Finish(int errs) -{ - if (shouldDieQuietly(NULL, -1)) - exit(2); - Fatal("%d error%s", errs, errs == 1 ? "" : "s"); -} - int unlink_file(const char *file) { diff --git a/contrib/bmake/make.h b/contrib/bmake/make.h index 05714ddfd151..33df57c58198 100644 --- a/contrib/bmake/make.h +++ b/contrib/bmake/make.h @@ -1,4 +1,4 @@ -/* $NetBSD: make.h,v 1.349 2025/01/19 10:57:10 rillig Exp $ */ +/* $NetBSD: make.h,v 1.350 2025/03/07 06:50:34 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -889,7 +889,6 @@ void Error(const char *, ...) MAKE_ATTR_PRINTFLIKE(1, 2); void Fatal(const char *, ...) MAKE_ATTR_PRINTFLIKE(1, 2) MAKE_ATTR_DEAD; void Punt(const char *, ...) MAKE_ATTR_PRINTFLIKE(1, 2) MAKE_ATTR_DEAD; void DieHorribly(void) MAKE_ATTR_DEAD; -void Finish(int) MAKE_ATTR_DEAD; int unlink_file(const char *) MAKE_ATTR_USE; void execDie(const char *, const char *); char *getTmpdir(void) MAKE_ATTR_USE; diff --git a/contrib/bmake/mk/ChangeLog b/contrib/bmake/mk/ChangeLog index 4274d9d3483b..99f4b05be61c 100644 --- a/contrib/bmake/mk/ChangeLog +++ b/contrib/bmake/mk/ChangeLog @@ -1,3 +1,16 @@ +2025-03-14 Simon J Gerraty + + * install-mk (MK_VERSION): 20250314 + + * meta.stage.mk: StageFiles --subdir: preserve the dir part of + each file under $dest + +2025-03-12 Simon J Gerraty + + * meta.autodep.mk: do a better job of handling MAKESYSPATH in + GENDIRDEPS_ENV. If we have MAKE_VERSION >= 20230123 we can just + use .SYSPATH, otherwise it is a bit more complicated. + 2025-01-10 Simon J Gerraty * rust.mk: use RUST_LIBS and RUST_PROGS diff --git a/contrib/bmake/mk/install-mk b/contrib/bmake/mk/install-mk index b455832b7726..d765fbba2251 100644 --- a/contrib/bmake/mk/install-mk +++ b/contrib/bmake/mk/install-mk @@ -59,9 +59,9 @@ # Simon J. Gerraty # RCSid: -# $Id: install-mk,v 1.262 2025/01/05 01:16:19 sjg Exp $ +# $Id: install-mk,v 1.263 2025/03/14 20:29:35 sjg Exp $ # -# @(#) Copyright (c) 1994-2024 Simon J. Gerraty +# @(#) Copyright (c) 1994-2025 Simon J. Gerraty # # This file is provided in the hope that it will # be of use. There is absolutely NO WARRANTY. @@ -74,7 +74,7 @@ # sjg@crufty.net # -MK_VERSION=20250101 +MK_VERSION=20250314 OWNER= GROUP= MODE=444 diff --git a/contrib/bmake/mk/jobs.mk b/contrib/bmake/mk/jobs.mk index f39f1eb178ae..e304e16a9c56 100644 --- a/contrib/bmake/mk/jobs.mk +++ b/contrib/bmake/mk/jobs.mk @@ -1,8 +1,8 @@ # SPDX-License-Identifier: BSD-2-Clause # -# $Id: jobs.mk,v 1.17 2024/02/17 17:26:57 sjg Exp $ +# $Id: jobs.mk,v 1.19 2025/02/03 21:18:44 sjg Exp $ # -# @(#) Copyright (c) 2012-2023, Simon J. Gerraty +# @(#) Copyright (c) 2012-2025, Simon J. Gerraty # # This file is provided in the hope that it will # be of use. There is absolutely NO WARRANTY. @@ -68,7 +68,7 @@ NEWLOG_SH := ${(type newlog.sh) 2> /dev/null:L:sh:M/*} .endif .endif .if !empty(NEWLOG_SH) && exists(${NEWLOG_SH}) -NEWLOG := sh ${NEWLOG_SH} +NEWLOG := ${.SHELL:Ush} ${NEWLOG_SH} JOB_NEWLOG_ARGS ?= -S -n ${JOB_LOG_GENS} .else NEWLOG = : diff --git a/contrib/bmake/mk/meta.autodep.mk b/contrib/bmake/mk/meta.autodep.mk index 55f2d66e56aa..b94891b1b93f 100644 --- a/contrib/bmake/mk/meta.autodep.mk +++ b/contrib/bmake/mk/meta.autodep.mk @@ -1,9 +1,9 @@ # SPDX-License-Identifier: BSD-2-Clause # -# $Id: meta.autodep.mk,v 1.63 2024/04/24 18:56:41 sjg Exp $ +# $Id: meta.autodep.mk,v 1.65 2025/03/14 20:28:42 sjg Exp $ # -# @(#) Copyright (c) 2010, Simon J. Gerraty +# @(#) Copyright (c) 2010-2025, Simon J. Gerraty # # This file is provided in the hope that it will # be of use. There is absolutely NO WARRANTY. @@ -281,14 +281,26 @@ META_FILES := ${META_XTRAS:U:O:u} ${META_FILES:U:T:O:u:${META_FILE_FILTER:ts:}} .export META_FILES .endif +_this_dir := ${_PARSEDIR} +.if ${MAKE_VERSION} < 20230123 # we might have .../ in MAKESYSPATH -_makesyspath:= ${_PARSEDIR} +_makesyspath := ${MAKESYSPATH:U${_this_dir}} +.if ${.MAKEFLAGS:M-m} != "" +_makesyspath := ${.MAKEFLAGS:S,-m ,-m,gW:M-m*:S,-m, ,:ts:}:${_makesyspath} +.endif +_makesyspath := ${_makesyspath:C,\.\.\./[^:]*,${_this_dir},} +GENDIRDEPS_ENV += MAKESYSPATH=${_makesyspath} +.else +# add this if not already there +.SYSPATH: ${_this_dir} +GENDIRDEPS_ENV += MAKESYSPATH=${.SYSPATH:ts:} +.endif + ${_DEPENDFILE}: ${_depend} ${.PARSEDIR}/gendirdeps.mk ${META2DEPS} $${.MAKE.META.CREATED} @echo Checking $@: ${.OODATE:T:[1..8]} @(cd . && ${GENDIRDEPS_ENV} \ SKIP_GENDIRDEPS='${SKIP_GENDIRDEPS:O:u}' \ DPADD='${FORCE_DPADD:O:u}' ${_gendirdeps_mutex} \ - MAKESYSPATH=${_makesyspath} \ ${.MAKE} -f gendirdeps.mk RELDIR=${RELDIR} _DEPENDFILE=${_DEPENDFILE}) @test -s $@ && touch $@; : .endif diff --git a/contrib/bmake/mk/meta.stage.mk b/contrib/bmake/mk/meta.stage.mk index 345df6aae16b..97e4dce83e5d 100644 --- a/contrib/bmake/mk/meta.stage.mk +++ b/contrib/bmake/mk/meta.stage.mk @@ -1,8 +1,8 @@ # SPDX-License-Identifier: BSD-2-Clause # -# $Id: meta.stage.mk,v 1.69 2024/02/17 17:26:57 sjg Exp $ +# $Id: meta.stage.mk,v 1.71 2025/03/14 20:28:42 sjg Exp $ # *** 374 LINES SKIPPED *** From nobody Sat Jan 10 21:34:07 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2m45mQz6MxRc for ; Sat, 10 Jan 2026 21:34:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpX2m18gZz3Qdx for ; Sat, 10 Jan 2026 21:34:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7sjgCeGA/weYAPIwW8Rm0nywtGMGec/vPJFWHazTEBo=; b=xyXW1nbr+qj9MuIUoVpOBiTD+8/Rbry0P63PT9dKuEOUwrQIazSv/2AeQTcHyztiT9WLd1 YPR1ncJtltczS1SMXT5K8gyMLgl/364eDei5hwIfzOTDEQdCbXb6llZmqnhbfjbOEQI2gh H5q3jdT8mOsEYennTEpK3wR0SEin/1D2L3NLOsqDfMv2iMEZbpSfnjqwTFgcHZUuwCWS74 +dC9MczDbffAbjqKC14BrEVtyBzLx1TZeGRUe0Yv9thdg7v/MgRltinTEmMpBHeVAwy2cO Rken8KkFa1VLEMWjNirO6mJjKwzVvWEshIA7BFVbS5u1O+XjPQ/oRR2F7TePUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080848; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7sjgCeGA/weYAPIwW8Rm0nywtGMGec/vPJFWHazTEBo=; b=taGtVbmMaymOcxCBQ1259wz1idTUuLDhrYmdJOcec3zVoDZb4urVFP8hdPEQ/ukKjtPzFC wUcaZT4/px6DvHYlrwhrDvKbsIMPoOi+C3DIdzw1MrQrq0VtpGMnkhYi/G7xdjBoYZkeGB r3Gaq0XtvCykAcL6K5MsFy4goxA5dN+/AeyL7B5n3PLc3d+XV+OqW1RQvQSZC8XZqVZ5Yx 4nU+DVDyAINwzGnF09JJKoQUl6NxcUxZfryzF4VhqvgoL1V4huV4peJJcfHTAJOzTumgJY CNTQGObWmCZYqcyQMX5QDKup4pA2Llpk/ifqx8UGwgzMWgGctTme0EE+G3zkkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768080848; a=rsa-sha256; cv=none; b=IKce6v2+cy6SZfNt3YNr1m8IfvcC/0HzyEfYLW3oIIVzVFg/UHIaYMn7jJCu++mQFDcF0o qQ53mSfUprSXSjBeQyzPJImNWPp2vSmockIEnqgcS5R9gHyrvPZVY/xWkG2p27yKanoVw+ pxlvwMNE3XGY7MO93xO6v/f20wA97NivROWbxKciwmz0QONEzXZdSVW6ZaGLkn/vFjJUeu XzO1Bg/awcvjNqtrfByzef9FAhKSb1KyWWYcG/vM6JlWVOSXC0sxUf6sIYuEZbcfM0whCb Dt1zA3VCznNkFrd145tU2kwBNTki8TCDCIsYzfow+ABzdNIoiC5pDJloYEJPig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2m0fVTz1Bfl for ; Sat, 10 Jan 2026 21:34:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25a58 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 21:34:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Simon J. Gerraty Subject: git: 8a4277b9667c - stable/14 - Merge bmake-20250414 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8a4277b9667c5eb3bd0ab40513df1daa6985c679 Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 21:34:07 +0000 Message-Id: <6962c5cf.25a58.4c16f0a0@gitrepo.freebsd.org> The branch stable/14 has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=8a4277b9667c5eb3bd0ab40513df1daa6985c679 commit 8a4277b9667c5eb3bd0ab40513df1daa6985c679 Author: Simon J. Gerraty AuthorDate: 2025-04-19 20:57:00 +0000 Commit: Simon J. Gerraty CommitDate: 2026-01-10 21:33:13 +0000 Merge bmake-20250414 Merge commit '284d1f7d496806b18558ab55e4654fd5e96d6a3e' (cherry picked from commit 759b177aecbfc49ebc900739954ac56b1aa5fc53) --- contrib/bmake/ChangeLog | 49 ++++++ contrib/bmake/FILES | 6 + contrib/bmake/VERSION | 2 +- contrib/bmake/bmake.1 | 58 ++++++- contrib/bmake/bmake.cat1 | 41 ++++- contrib/bmake/cond.c | 32 ++-- contrib/bmake/dir.c | 6 +- contrib/bmake/for.c | 47 +++--- contrib/bmake/job.c | 38 ++--- contrib/bmake/main.c | 15 +- contrib/bmake/make.1 | 58 ++++++- contrib/bmake/make.h | 5 +- contrib/bmake/meta.c | 32 ++-- contrib/bmake/mk/ChangeLog | 22 +++ contrib/bmake/mk/auto.obj.mk | 13 +- contrib/bmake/mk/genfiles.mk | 5 +- contrib/bmake/mk/init.mk | 21 ++- contrib/bmake/mk/install-mk | 4 +- contrib/bmake/mk/rst2htm.mk | 6 +- contrib/bmake/parse.c | 22 +-- contrib/bmake/unit-tests/Makefile | 15 +- contrib/bmake/unit-tests/archive.exp | 4 +- contrib/bmake/unit-tests/cmd-errors-jobs.exp | 10 +- contrib/bmake/unit-tests/cmd-errors-jobs.mk | 9 +- contrib/bmake/unit-tests/cmd-errors-lint.exp | 5 +- contrib/bmake/unit-tests/cmd-errors-lint.mk | 4 +- contrib/bmake/unit-tests/cmd-errors.exp | 5 +- contrib/bmake/unit-tests/cmd-errors.mk | 4 +- contrib/bmake/unit-tests/cmdline-undefined.exp | 24 +-- contrib/bmake/unit-tests/cond-cmp-numeric-eq.exp | 4 +- contrib/bmake/unit-tests/cond-cmp-numeric.exp | 8 +- contrib/bmake/unit-tests/cond-cmp-string.exp | 16 +- contrib/bmake/unit-tests/cond-cmp-unary.exp | 2 +- contrib/bmake/unit-tests/cond-eof.exp | 6 +- contrib/bmake/unit-tests/cond-func-defined.exp | 4 +- contrib/bmake/unit-tests/cond-func-empty.exp | 2 +- contrib/bmake/unit-tests/cond-func-make.exp | 2 +- contrib/bmake/unit-tests/cond-func.exp | 20 +-- contrib/bmake/unit-tests/cond-late.exp | 2 +- contrib/bmake/unit-tests/cond-op-and-lint.exp | 2 +- contrib/bmake/unit-tests/cond-op-and.exp | 16 +- contrib/bmake/unit-tests/cond-op-not.exp | 12 +- contrib/bmake/unit-tests/cond-op-or-lint.exp | 2 +- contrib/bmake/unit-tests/cond-op-or.exp | 16 +- contrib/bmake/unit-tests/cond-op-parentheses.exp | 8 +- contrib/bmake/unit-tests/cond-op.exp | 36 ++--- contrib/bmake/unit-tests/cond-short.exp | 2 +- contrib/bmake/unit-tests/cond-token-number.exp | 8 +- contrib/bmake/unit-tests/cond-token-plain.exp | 30 ++-- contrib/bmake/unit-tests/cond-token-string.exp | 18 +-- contrib/bmake/unit-tests/cond-token-string.mk | 4 +- contrib/bmake/unit-tests/cond-token-var.exp | 26 +-- contrib/bmake/unit-tests/cond-token-var.mk | 29 +++- contrib/bmake/unit-tests/cond-undef-lint.exp | 6 +- .../bmake/unit-tests/dep-colon-bug-cross-file.exp | 4 +- contrib/bmake/unit-tests/dep-duplicate.exp | 4 +- contrib/bmake/unit-tests/dep-op-missing.exp | 2 +- contrib/bmake/unit-tests/dep.exp | 4 +- contrib/bmake/unit-tests/deptgt-begin.exp | 4 +- contrib/bmake/unit-tests/deptgt-path-suffix.exp | 2 +- contrib/bmake/unit-tests/deptgt.exp | 14 +- contrib/bmake/unit-tests/deptgt.mk | 6 +- contrib/bmake/unit-tests/directive-dinclude.exp | 2 +- contrib/bmake/unit-tests/directive-dinclude.mk | 4 +- contrib/bmake/unit-tests/directive-elif.exp | 36 ++--- contrib/bmake/unit-tests/directive-else.exp | 16 +- contrib/bmake/unit-tests/directive-endfor.exp | 2 +- contrib/bmake/unit-tests/directive-endif.exp | 10 +- contrib/bmake/unit-tests/directive-error.exp | 2 +- .../bmake/unit-tests/directive-export-gmake.exp | 6 +- contrib/bmake/unit-tests/directive-export.exp | 8 +- contrib/bmake/unit-tests/directive-for-break.exp | 4 +- contrib/bmake/unit-tests/directive-for-empty.exp | 2 +- contrib/bmake/unit-tests/directive-for-errors.exp | 25 ++- contrib/bmake/unit-tests/directive-for-errors.mk | 14 +- contrib/bmake/unit-tests/directive-for-escape.exp | 66 ++++---- .../unit-tests/directive-for-generating-endif.exp | 8 +- contrib/bmake/unit-tests/directive-for-if.exp | 6 +- contrib/bmake/unit-tests/directive-for-lines.exp | 12 +- contrib/bmake/unit-tests/directive-for-null.exp | 2 +- contrib/bmake/unit-tests/directive-for-null.mk | 4 +- contrib/bmake/unit-tests/directive-for.exp | 59 ++++--- contrib/bmake/unit-tests/directive-for.mk | 14 +- .../bmake/unit-tests/directive-hyphen-include.exp | 2 +- .../bmake/unit-tests/directive-hyphen-include.mk | 4 +- contrib/bmake/unit-tests/directive-if-nested.exp | 2 +- contrib/bmake/unit-tests/directive-if.exp | 30 ++-- contrib/bmake/unit-tests/directive-ifmake.exp | 14 +- contrib/bmake/unit-tests/directive-ifndef.exp | 2 +- .../bmake/unit-tests/directive-include-fatal.exp | 2 +- .../bmake/unit-tests/directive-include-guard.exp | 168 +++++++++---------- .../bmake/unit-tests/directive-include-guard.mk | 168 +++++++++---------- contrib/bmake/unit-tests/directive-include.exp | 12 +- contrib/bmake/unit-tests/directive-include.mk | 6 +- contrib/bmake/unit-tests/directive-info.exp | 24 +-- .../bmake/unit-tests/directive-misspellings.exp | 84 +++++----- contrib/bmake/unit-tests/directive-sinclude.exp | 2 +- contrib/bmake/unit-tests/directive-sinclude.mk | 4 +- contrib/bmake/unit-tests/directive-undef.exp | 6 +- contrib/bmake/unit-tests/directive-undef.mk | 4 +- .../bmake/unit-tests/directive-unexport-env.exp | 6 +- contrib/bmake/unit-tests/directive-unexport.exp | 8 +- contrib/bmake/unit-tests/directive-warning.exp | 16 +- contrib/bmake/unit-tests/directive.exp | 14 +- contrib/bmake/unit-tests/error.exp | 6 +- contrib/bmake/unit-tests/include-main.exp | 18 +-- contrib/bmake/unit-tests/lint.exp | 1 + contrib/bmake/unit-tests/meta-cmd-cmp.exp | 12 +- contrib/bmake/unit-tests/moderrs.exp | 117 +++++++++----- contrib/bmake/unit-tests/moderrs.mk | 69 ++++---- contrib/bmake/unit-tests/opt-debug-file.exp | 6 +- contrib/bmake/unit-tests/opt-debug-hash.exp | 2 +- contrib/bmake/unit-tests/opt-debug-lint.exp | 10 +- contrib/bmake/unit-tests/opt-debug-lint.mk | 8 +- contrib/bmake/unit-tests/opt-debug-parse.exp | 18 +-- contrib/bmake/unit-tests/opt-debug-var.exp | 4 +- contrib/bmake/unit-tests/opt-file.exp | 2 +- .../bmake/unit-tests/opt-warnings-as-errors.exp | 4 +- contrib/bmake/unit-tests/parse.exp | 6 +- contrib/bmake/unit-tests/posix-execution.exp | 24 +++ contrib/bmake/unit-tests/posix-execution.mk | 59 +++++++ contrib/bmake/unit-tests/posix-expansion.exp | 1 + contrib/bmake/unit-tests/posix-expansion.mk | 22 +++ contrib/bmake/unit-tests/posix-varassign.exp | 1 + contrib/bmake/unit-tests/posix-varassign.mk | 79 +++++++++ contrib/bmake/unit-tests/posix.exp | 28 +--- contrib/bmake/unit-tests/posix.mk | 36 ++--- contrib/bmake/unit-tests/recursive.exp | 4 +- contrib/bmake/unit-tests/var-eval-short.exp | 2 +- contrib/bmake/unit-tests/var-op-assign.exp | 4 +- contrib/bmake/unit-tests/var-op-expand.exp | 8 +- contrib/bmake/unit-tests/var-op-expand.mk | 6 +- contrib/bmake/unit-tests/var-op-shell.exp | 8 +- contrib/bmake/unit-tests/var-recursive.exp | 19 +-- contrib/bmake/unit-tests/var-recursive.mk | 8 +- contrib/bmake/unit-tests/var-scope-cmdline.exp | 4 +- contrib/bmake/unit-tests/vardebug.exp | 5 +- contrib/bmake/unit-tests/vardebug.mk | 7 +- contrib/bmake/unit-tests/varmisc.exp | 9 ++ contrib/bmake/unit-tests/varmod-assign-shell.exp | 4 +- contrib/bmake/unit-tests/varmod-assign.exp | 18 ++- contrib/bmake/unit-tests/varmod-assign.mk | 20 ++- contrib/bmake/unit-tests/varmod-edge.exp | 15 +- contrib/bmake/unit-tests/varmod-edge.mk | 13 +- contrib/bmake/unit-tests/varmod-gmtime.exp | 10 +- contrib/bmake/unit-tests/varmod-hash.exp | 9 +- contrib/bmake/unit-tests/varmod-ifelse.exp | 46 +++--- contrib/bmake/unit-tests/varmod-ifelse.mk | 16 +- contrib/bmake/unit-tests/varmod-indirect.exp | 36 ++--- contrib/bmake/unit-tests/varmod-indirect.mk | 23 ++- contrib/bmake/unit-tests/varmod-localtime.exp | 10 +- contrib/bmake/unit-tests/varmod-loop-delete.exp | 2 +- contrib/bmake/unit-tests/varmod-loop-varname.exp | 8 +- contrib/bmake/unit-tests/varmod-match-escape.exp | 8 +- contrib/bmake/unit-tests/varmod-match.exp | 20 +-- contrib/bmake/unit-tests/varmod-match.mk | 4 +- contrib/bmake/unit-tests/varmod-mtime.exp | 12 +- contrib/bmake/unit-tests/varmod-mtime.mk | 4 +- contrib/bmake/unit-tests/varmod-order.exp | 26 ++- contrib/bmake/unit-tests/varmod-order.mk | 28 ++-- contrib/bmake/unit-tests/varmod-range.exp | 13 +- contrib/bmake/unit-tests/varmod-range.mk | 12 +- contrib/bmake/unit-tests/varmod-select-words.exp | 36 +++-- contrib/bmake/unit-tests/varmod-select-words.mk | 26 +-- contrib/bmake/unit-tests/varmod-shell.exp | 6 +- contrib/bmake/unit-tests/varmod-subst-regex.exp | 17 +- contrib/bmake/unit-tests/varmod-subst.exp | 3 +- contrib/bmake/unit-tests/varmod-subst.mk | 4 +- contrib/bmake/unit-tests/varmod-sun-shell.exp | 4 +- contrib/bmake/unit-tests/varmod-sysv.exp | 4 +- contrib/bmake/unit-tests/varmod-sysv.mk | 29 +++- contrib/bmake/unit-tests/varmod-to-abs.exp | 6 +- contrib/bmake/unit-tests/varmod-to-separator.exp | 26 +-- contrib/bmake/unit-tests/varmod-to-separator.mk | 80 ++++----- contrib/bmake/unit-tests/varmod.exp | 47 +++--- contrib/bmake/unit-tests/varmod.mk | 91 ++++++----- contrib/bmake/unit-tests/varname-dollar.exp | 8 +- .../bmake/unit-tests/varname-dot-make-level.exp | 13 +- contrib/bmake/unit-tests/varname-dot-make-level.mk | 42 ++++- .../varname-dot-make-meta-ignore_filter.exp | 2 +- .../varname-dot-make-meta-ignore_paths.exp | 2 +- .../varname-dot-make-meta-ignore_patterns.exp | 2 +- contrib/bmake/unit-tests/varname-dot-makeflags.exp | 12 +- contrib/bmake/unit-tests/varname-dot-newline.exp | 6 +- contrib/bmake/unit-tests/varname-dot-parsedir.exp | 6 +- contrib/bmake/unit-tests/varname-dot-parsefile.exp | 6 +- contrib/bmake/unit-tests/varname.exp | 6 +- contrib/bmake/unit-tests/varparse-dynamic.exp | 4 +- contrib/bmake/unit-tests/varparse-errors.exp | 47 +++--- contrib/bmake/unit-tests/varparse-errors.mk | 34 +++- contrib/bmake/var.c | 178 ++++++++++----------- usr.bin/bmake/Makefile.config | 2 +- usr.bin/bmake/unit-tests/Makefile | 15 +- 193 files changed, 2032 insertions(+), 1469 deletions(-) diff --git a/contrib/bmake/ChangeLog b/contrib/bmake/ChangeLog index 15a58e2a0924..1ec90b7bccc8 100644 --- a/contrib/bmake/ChangeLog +++ b/contrib/bmake/ChangeLog @@ -1,3 +1,52 @@ +2025-04-14 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250414 + Merge with NetBSD make, pick up + o job.c: clean up job and output handling + o parse.c: after entering POSIX mode, don't leave it again + +2025-04-11 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250411 + Merge with NetBSD make, pick up + o convert more messages to file:line: format + o for.c: condense code for parsing variable names in .for loops + +2025-04-10 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250410 + Merge with NetBSD make, pick up + o cond.c: remove redundant error counter when parsing a condition + +2025-04-04 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250404 + Merge with NetBSD make, pick up + o make.1: better document meta mode. + o var.c: fix error message for undefined variable in conditional. + +2025-03-30 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250330 + Merge with NetBSD make, pick up + o in POSIX compatability mode, give preference to sysV style modifiers. + o in stack trace with details and includes, list the current file + o parse.c: report file location in more common file:line: format. + o var.c: simplify error handling for unknown modifiers + let the ":O" and ":t" modifiers fall back to the ":from=to" modifier + stop parsing after seeing an unknown modifier in an expression + fix error message for unclosed expression and invalid :[...] + add details to errors about ::= modifier + add details about indirect modifiers to the stack traces + in stack traces from target commands, add the command level + +2025-03-23 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250323 + Merge with NetBSD make, pick up + o var.c: just ignore attempts to override a read-only global with + the same value. + 2025-03-08 Simon J Gerraty * bsd.after-import.mk: by default generate makefiles diff --git a/contrib/bmake/FILES b/contrib/bmake/FILES index c8937c610a4d..553f3211f29c 100644 --- a/contrib/bmake/FILES +++ b/contrib/bmake/FILES @@ -555,6 +555,12 @@ unit-tests/parse.exp unit-tests/parse.mk unit-tests/phony-end.exp unit-tests/phony-end.mk +unit-tests/posix-execution.exp +unit-tests/posix-execution.mk +unit-tests/posix-expansion.exp +unit-tests/posix-expansion.mk +unit-tests/posix-varassign.exp +unit-tests/posix-varassign.mk unit-tests/posix.exp unit-tests/posix.mk unit-tests/posix1.exp diff --git a/contrib/bmake/VERSION b/contrib/bmake/VERSION index d26469e64381..4e4949c5fd3e 100644 --- a/contrib/bmake/VERSION +++ b/contrib/bmake/VERSION @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20250308 +_MAKE_VERSION=20250414 diff --git a/contrib/bmake/bmake.1 b/contrib/bmake/bmake.1 index eef2d799b960..9e9f2d03a450 100644 --- a/contrib/bmake/bmake.1 +++ b/contrib/bmake/bmake.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.381 2024/11/14 19:30:13 sjg Exp $ +.\" $NetBSD: make.1,v 1.384 2025/04/04 18:36:47 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd November 14, 2024 +.Dd April 4, 2025 .Dt BMAKE 1 .Os .Sh NAME @@ -1087,11 +1087,61 @@ Puts into .Dq meta mode, where meta files are created for each target -to capture the command run, the output generated, and if +to capture the commands run, the output generated, and if .Xr filemon 4 is available, the system calls which are of interest to .Nm . The captured output can be useful when diagnosing errors. +.Pp +.Nm +will use the information in the meta file to help determine if +a target is out-of-date when the normal dependency rules +indicate it is not. +.Pp +First, +the commands to be executed, +will be compared to those captured previously, +if any differ, +the target is out-of-date. +.Pp +This allows for a huge improvement in the reliability +and efficiency of update builds. +It is no longer necessary for targets to depend on makefiles +just in-case they set a variable that might be relevant. +Mechanisms such as +.Va .MAKE.META.CMP_FILTER +and +.Ic .NOMETA_CMP , +allow limiting or disabling that comparison on a per target basis. +A reference to the variable +.Va .OODATE +can be leveraged to block comparison of certain commands. +For example: +.Ql ${.OODATE:M} +will expand to nothing and have no impact on the target, +its side-effect though, +will be to prevent comparison of any command line it appears on. +For documentation purposes +.Ql ${.OODATE:MNOMETA_CMP} +is useful. +.Pp +If necessary, +.Nm +will then use the information captured by +.Xr filemon 4 , +to check the modification time of any file used in generating +the target, +if any is newer, +the target is out-of-date. +.Pp +Such deep inspection can easily lead to cases where a target is +.Em always +considered out-of-date, which is why +.Va .MAKE.META.IGNORE_FILTER , +.Va .MAKE.META.IGNORE_PATHS +and +.Va .MAKE.META.IGNORE_PATTERNS , +are provided to limit that inspection when necessary. .It Cm curdirOk= Ns Ar bf By default, .Nm @@ -2536,6 +2586,8 @@ is run with the flag, only .Ql posix.mk contributes to the default rules. +In POSIX-compatible mode, the AT&T System V UNIX style substitution +modifier is checked first rather than as a fallback. .It Ic .PRECIOUS Apply the .Ic .PRECIOUS diff --git a/contrib/bmake/bmake.cat1 b/contrib/bmake/bmake.cat1 index 7e6f25524a05..e1340e1c78e0 100644 --- a/contrib/bmake/bmake.cat1 +++ b/contrib/bmake/bmake.cat1 @@ -709,11 +709,44 @@ VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS ccoommppaatt Like --BB, puts bbmmaakkee into "compat" mode. mmeettaa Puts bbmmaakkee into "meta" mode, where meta files are created - for each target to capture the command run, the output + for each target to capture the commands run, the output generated, and if filemon(4) is available, the system calls which are of interest to bbmmaakkee. The captured output can be useful when diagnosing errors. + bbmmaakkee will use the information in the meta file to help + determine if a target is out-of-date when the normal + dependency rules indicate it is not. + + First, the commands to be executed, will be compared to + those captured previously, if any differ, the target is + out-of-date. + + This allows for a huge improvement in the reliability and + efficiency of update builds. It is no longer necessary + for targets to depend on makefiles just in-case they set + a variable that might be relevant. Mechanisms such as + _._M_A_K_E_._M_E_T_A_._C_M_P___F_I_L_T_E_R and ..NNOOMMEETTAA__CCMMPP, allow limiting or + disabling that comparison on a per target basis. A + reference to the variable _._O_O_D_A_T_E can be leveraged to + block comparison of certain commands. For example: + `${.OODATE:M}' will expand to nothing and have no impact + on the target, its side-effect though, will be to prevent + comparison of any command line it appears on. For + documentation purposes `${.OODATE:MNOMETA_CMP}' is + useful. + + If necessary, bbmmaakkee will then use the information + captured by filemon(4), to check the modification time of + any file used in generating the target, if any is newer, + the target is out-of-date. + + Such deep inspection can easily lead to cases where a + target is _a_l_w_a_y_s considered out-of-date, which is why + _._M_A_K_E_._M_E_T_A_._I_G_N_O_R_E___F_I_L_T_E_R, _._M_A_K_E_._M_E_T_A_._I_G_N_O_R_E___P_A_T_H_S and + _._M_A_K_E_._M_E_T_A_._I_G_N_O_R_E___P_A_T_T_E_R_N_S, are provided to limit that + inspection when necessary. + ccuurrddiirrOOkk==_b_f By default, bbmmaakkee does not create _._m_e_t_a files in `_._C_U_R_D_I_R'. This can be overridden by setting _b_f to a @@ -1618,7 +1651,9 @@ SSPPEECCIIAALL TTAARRGGEETTSS variable _%_P_O_S_I_X is set to the value `1003.2' and the makefile `' is included if it exists, to provide POSIX- compatible default rules. If bbmmaakkee is run with the --rr flag, - only `posix.mk' contributes to the default rules. + only `posix.mk' contributes to the default rules. In POSIX- + compatible mode, the AT&T System V UNIX style substitution + modifier is checked first rather than as a fallback. ..PPRREECCIIOOUUSS Apply the ..PPRREECCIIOOUUSS attribute to any specified sources. If no @@ -1793,4 +1828,4 @@ BBUUGGSS attempt to suppress a cascade of unnecessary errors, can result in a seemingly unexplained `*** Error code 6' -FreeBSD 14.1-RELEASE-p7 November 14, 2024 FreeBSD 14.1-RELEASE-p7 +FreeBSD 14.2-RELEASE-p1 April 4, 2025 FreeBSD 14.2-RELEASE-p1 diff --git a/contrib/bmake/cond.c b/contrib/bmake/cond.c index a724ba7ecf26..31fe21c4c8b6 100644 --- a/contrib/bmake/cond.c +++ b/contrib/bmake/cond.c @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.371 2025/01/11 21:21:33 rillig Exp $ */ +/* $NetBSD: cond.c,v 1.372 2025/04/10 21:41:35 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -91,7 +91,7 @@ #include "dir.h" /* "@(#)cond.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: cond.c,v 1.371 2025/01/11 21:21:33 rillig Exp $"); +MAKE_RCSID("$NetBSD: cond.c,v 1.372 2025/04/10 21:41:35 rillig Exp $"); /* * Conditional expressions conform to this grammar: @@ -162,12 +162,6 @@ typedef struct CondParser { const char *p; /* The remaining condition to parse */ Token curr; /* Single push-back token used in parsing */ - - /* - * Whether an error message has already been printed for this - * condition. - */ - bool printedError; } CondParser; static CondResult CondParser_Or(CondParser *, bool); @@ -243,7 +237,7 @@ ParseWord(const char **pp, bool doEval) /* Parse the function argument, including the surrounding parentheses. */ static char * -ParseFuncArg(CondParser *par, const char **pp, bool doEval, const char *func) +ParseFuncArg(const char **pp, bool doEval, const char *func) { const char *p = *pp, *argStart, *argEnd; char *res; @@ -263,7 +257,6 @@ ParseFuncArg(CondParser *par, const char **pp, bool doEval, const char *func) Parse_Error(PARSE_FATAL, "Missing ')' after argument '%.*s' for '%.*s'", (int)(argEnd - argStart), argStart, len, func); - par->printedError = true; free(res); return NULL; } @@ -531,15 +524,13 @@ EvalCompareNum(double lhs, ComparisonOp op, double rhs) } static Token -EvalCompareStr(CondParser *par, const char *lhs, - ComparisonOp op, const char *rhs) +EvalCompareStr(const char *lhs, ComparisonOp op, const char *rhs) { if (op != EQ && op != NE) { Parse_Error(PARSE_FATAL, "Comparison with '%s' requires both operands " "'%s' and '%s' to be numeric", opname[op], lhs, rhs); - par->printedError = true; return TOK_ERROR; } @@ -549,7 +540,7 @@ EvalCompareStr(CondParser *par, const char *lhs, /* Evaluate a comparison, such as "${VAR} == 12345". */ static Token -EvalCompare(CondParser *par, const char *lhs, bool lhsQuoted, +EvalCompare(const char *lhs, bool lhsQuoted, ComparisonOp op, const char *rhs, bool rhsQuoted) { double left, right; @@ -558,7 +549,7 @@ EvalCompare(CondParser *par, const char *lhs, bool lhsQuoted, if (TryParseNumber(lhs, &left) && TryParseNumber(rhs, &right)) return ToToken(EvalCompareNum(left, op, right)); - return EvalCompareStr(par, lhs, op, rhs); + return EvalCompareStr(lhs, op, rhs); } static bool @@ -613,14 +604,13 @@ CondParser_Comparison(CondParser *par, bool doEval) if (par->p[0] == '\0') { Parse_Error(PARSE_FATAL, "Missing right-hand side of operator '%s'", opname[op]); - par->printedError = true; goto done_lhs; } rhs = CondParser_Leaf(par, doEval, true, &rhsQuoted); t = rhs.str == NULL ? TOK_ERROR : !doEval ? TOK_FALSE - : EvalCompare(par, lhs.str, lhsQuoted, op, rhs.str, rhsQuoted); + : EvalCompare(lhs.str, lhsQuoted, op, rhs.str, rhsQuoted); FStr_Done(&rhs); done_lhs: @@ -689,7 +679,7 @@ CondParser_FuncCall(CondParser *par, bool doEval, Token *out_token) if (*p != '(') return false; - arg = ParseFuncArg(par, &p, doEval, fn_name); + arg = ParseFuncArg(&p, doEval, fn_name); *out_token = ToToken(doEval && arg != NULL && arg[0] != '\0' && fn(arg)); free(arg); @@ -779,7 +769,6 @@ CondParser_Token(CondParser *par, bool doEval) par->p++; else { Parse_Error(PARSE_FATAL, "Unknown operator '|'"); - par->printedError = true; return TOK_ERROR; } return TOK_OR; @@ -790,7 +779,6 @@ CondParser_Token(CondParser *par, bool doEval) par->p++; else { Parse_Error(PARSE_FATAL, "Unknown operator '&'"); - par->printedError = true; return TOK_ERROR; } return TOK_AND; @@ -929,15 +917,13 @@ CondEvalExpression(const char *cond, bool plain, par.leftUnquotedOK = leftUnquotedOK; par.p = cond; par.curr = TOK_NONE; - par.printedError = false; DEBUG1(COND, "CondParser_Eval: %s\n", par.p); rval = CondParser_Or(&par, true); if (par.curr != TOK_EOF) rval = CR_ERROR; - if (rval == CR_ERROR && eprint && !par.printedError - && parseErrors == parseErrorsBefore) + if (rval == CR_ERROR && eprint && parseErrors == parseErrorsBefore) Parse_Error(PARSE_FATAL, "Malformed conditional '%s'", cond); return rval; diff --git a/contrib/bmake/dir.c b/contrib/bmake/dir.c index d017a89e4753..106b475bda2a 100644 --- a/contrib/bmake/dir.c +++ b/contrib/bmake/dir.c @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.295 2024/07/07 07:50:57 rillig Exp $ */ +/* $NetBSD: dir.c,v 1.296 2025/04/11 17:21:31 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -132,7 +132,7 @@ #include "job.h" /* "@(#)dir.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: dir.c,v 1.295 2024/07/07 07:50:57 rillig Exp $"); +MAKE_RCSID("$NetBSD: dir.c,v 1.296 2025/04/11 17:21:31 rillig Exp $"); /* * A search path is a list of CachedDir structures. A CachedDir has in it the @@ -1365,7 +1365,7 @@ ResolveMovedDepends(GNode *gn) gn->path = bmake_strdup(fullName); if (!Job_RunTarget(".STALE", gn->fname)) fprintf(stdout, /* XXX: Why stdout? */ - "%s: %s, %u: ignoring stale %s for %s, found %s\n", + "%s: %s:%u: ignoring stale %s for %s, found %s\n", progname, gn->fname, gn->lineno, makeDependfile, gn->name, fullName); diff --git a/contrib/bmake/for.c b/contrib/bmake/for.c index 1563c2313963..2aa1398b1c4c 100644 --- a/contrib/bmake/for.c +++ b/contrib/bmake/for.c @@ -1,4 +1,4 @@ -/* $NetBSD: for.c,v 1.182 2024/06/07 18:57:30 rillig Exp $ */ +/* $NetBSD: for.c,v 1.184 2025/04/11 18:08:17 rillig Exp $ */ /* * Copyright (c) 1992, The Regents of the University of California. @@ -58,7 +58,7 @@ #include "make.h" /* "@(#)for.c 8.1 (Berkeley) 6/6/93" */ -MAKE_RCSID("$NetBSD: for.c,v 1.182 2024/06/07 18:57:30 rillig Exp $"); +MAKE_RCSID("$NetBSD: for.c,v 1.184 2025/04/11 18:08:17 rillig Exp $"); typedef struct ForLoop { @@ -148,38 +148,23 @@ IsValidInVarname(char c) static void ForLoop_ParseVarnames(ForLoop *f, const char **pp) { - const char *p = *pp; + const char *p = *pp, *start; for (;;) { - size_t len; - cpp_skip_whitespace(&p); if (*p == '\0') { Parse_Error(PARSE_FATAL, "missing `in' in for"); - while (f->vars.len > 0) - free(*(char **)Vector_Pop(&f->vars)); - return; + goto cleanup; } - for (len = 0; p[len] != '\0' && !ch_isspace(p[len]); len++) { - if (!IsValidInVarname(p[len])) { - Parse_Error(PARSE_FATAL, - "invalid character '%c' " - "in .for loop variable name", - p[len]); - while (f->vars.len > 0) - free(*(char **)Vector_Pop(&f->vars)); - return; - } - } + for (start = p; *p != '\0' && !ch_isspace(*p); p++) + if (!IsValidInVarname(*p)) + goto invalid_variable_name; - if (len == 2 && p[0] == 'i' && p[1] == 'n') { - p += 2; + if (p - start == 2 && memcmp(start, "in", 2) == 0) break; - } - *(char **)Vector_Push(&f->vars) = bmake_strldup(p, len); - p += len; + *(char **)Vector_Push(&f->vars) = bmake_strsedup(start, p); } if (f->vars.len == 0) { @@ -188,19 +173,27 @@ ForLoop_ParseVarnames(ForLoop *f, const char **pp) } *pp = p; + return; + +invalid_variable_name: + Parse_Error(PARSE_FATAL, + "invalid character '%c' in .for loop variable name", *p); +cleanup: + while (f->vars.len > 0) + free(*(char **)Vector_Pop(&f->vars)); } static bool ForLoop_ParseItems(ForLoop *f, const char *p) { char *items; + int parseErrorsBefore = parseErrors; cpp_skip_whitespace(&p); items = Var_Subst(p, SCOPE_GLOBAL, VARE_EVAL); - /* TODO: handle errors */ - - f->items = Substring_Words(items, false); + f->items = Substring_Words( + parseErrors == parseErrorsBefore ? items : "", false); free(items); if (f->items.len == 1 && Substring_IsEmpty(f->items.words[0])) diff --git a/contrib/bmake/job.c b/contrib/bmake/job.c index d06b1570ba85..2e6f44f722f2 100644 --- a/contrib/bmake/job.c +++ b/contrib/bmake/job.c @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.489 2025/03/08 20:15:03 rillig Exp $ */ +/* $NetBSD: job.c,v 1.492 2025/04/12 13:00:21 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -151,7 +151,7 @@ #include "trace.h" /* "@(#)job.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: job.c,v 1.489 2025/03/08 20:15:03 rillig Exp $"); +MAKE_RCSID("$NetBSD: job.c,v 1.492 2025/04/12 13:00:21 rillig Exp $"); /* * A shell defines how the commands are run. All commands for a target are @@ -427,7 +427,7 @@ static char *shell_freeIt = NULL; /* Allocated memory for custom .SHELL */ static Job *job_table; /* The structures that describe them */ static Job *job_table_end; /* job_table + maxJobs */ -static unsigned int wantToken; +static bool wantToken; static bool lurking_children = false; static bool make_suspended = false; /* Whether we've seen a SIGTSTP (etc) */ @@ -440,7 +440,6 @@ static Job **jobByFdIndex = NULL; static nfds_t fdsLen = 0; static void watchfd(Job *); static void clearfd(Job *); -static bool readyfd(Job *); static char *targPrefix = NULL; /* To identify a job change in the output. */ static Job tokenWaitJob; /* token wait pseudo-job */ @@ -1250,10 +1249,7 @@ JobFinish (Job *job, WAIT_T status) if (aborting == ABORT_ERROR && jobTokensRunning == 0) { if (shouldDieQuietly(NULL, -1)) { - /* - * TODO: better clean up properly, to avoid killing - * child processes by SIGPIPE. - */ + Job_Wait(); exit(2); } Fatal("%d error%s", job_errors, job_errors == 1 ? "" : "s"); @@ -1387,7 +1383,7 @@ Job_CheckCommands(GNode *gn, void (*abortProc)(const char *, ...)) if (gn->flags.fromDepend) { if (!Job_RunTarget(".STALE", gn->fname)) fprintf(stdout, - "%s: %s, %u: ignoring stale %s for %s\n", + "%s: %s:%u: ignoring stale %s for %s\n", progname, gn->fname, gn->lineno, makeDependfile, gn->name); return true; @@ -2046,17 +2042,17 @@ Job_CatchOutput(void) (void)fflush(stdout); - /* Skip the first fd in the list, as it is the job token pipe. */ do { - nready = poll(fds + 1 - wantToken, fdsLen - 1 + wantToken, - POLL_MSEC); + /* Maybe skip the job token pipe. */ + nfds_t skip = wantToken ? 0 : 1; + nready = poll(fds + skip, fdsLen - skip, POLL_MSEC); } while (nready < 0 && errno == EINTR); if (nready < 0) Punt("poll: %s", strerror(errno)); - if (nready > 0 && readyfd(&childExitJob)) { - char token = 0; + if (nready > 0 && childExitJob.inPollfd->revents & POLLIN) { + char token; ssize_t count = read(childExitJob.inPipe, &token, 1); if (count == 1) { if (token == DO_JOB_RESUME[0]) @@ -2180,7 +2176,7 @@ Job_Init(void) job_table = bmake_malloc((size_t)opts.maxJobs * sizeof *job_table); memset(job_table, 0, (size_t)opts.maxJobs * sizeof *job_table); job_table_end = job_table + opts.maxJobs; - wantToken = 0; + wantToken = false; caught_sigchld = 0; aborting = ABORT_NONE; @@ -2659,14 +2655,6 @@ clearfd(Job *job) job->inPollfd = NULL; } -static bool -readyfd(Job *job) -{ - if (job->inPollfd == NULL) - Punt("Polling unwatched job"); - return (job->inPollfd->revents & POLLIN) != 0; -} - /* * Put a token (back) into the job pipe. * This allows a make process to start a build job. @@ -2768,7 +2756,7 @@ Job_TokenWithdraw(void) char tok, tok1; ssize_t count; - wantToken = 0; + wantToken = false; DEBUG3(JOB, "Job_TokenWithdraw(%d): aborting %d, running %d\n", getpid(), aborting, jobTokensRunning); @@ -2782,7 +2770,7 @@ Job_TokenWithdraw(void) if (errno != EAGAIN) Fatal("job pipe read: %s", strerror(errno)); DEBUG1(JOB, "(%d) blocked for token\n", getpid()); - wantToken = 1; + wantToken = true; return false; } diff --git a/contrib/bmake/main.c b/contrib/bmake/main.c index 9577fb41ee7b..3f0da61caf1d 100644 --- a/contrib/bmake/main.c +++ b/contrib/bmake/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.639 2025/03/07 06:50:34 rillig Exp $ */ +/* $NetBSD: main.c,v 1.641 2025/03/31 14:35:22 riastradh Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -108,7 +108,7 @@ #include "trace.h" /* "@(#)main.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: main.c,v 1.639 2025/03/07 06:50:34 rillig Exp $"); +MAKE_RCSID("$NetBSD: main.c,v 1.641 2025/03/31 14:35:22 riastradh Exp $"); #if defined(MAKE_NATIVE) __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 " "The Regents of the University of California. " @@ -2136,12 +2136,17 @@ PrintOnError(GNode *gn, const char *msg) SetErrorVars(gn); { - char *errorVarsValues = Var_Subst( + char *errorVarsValues; + enum PosixState p_s = posix_state; + + posix_state = PS_TOO_LATE; + errorVarsValues = Var_Subst( "${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'\n@}", SCOPE_GLOBAL, VARE_EVAL); /* TODO: handle errors */ printf("%s", errorVarsValues); free(errorVarsValues); + posix_state = p_s; } fflush(stdout); @@ -2160,12 +2165,15 @@ void Main_ExportMAKEFLAGS(bool first) { static bool once = true; + enum PosixState p_s; char *flags; if (once != first) return; once = false; + p_s = posix_state; + posix_state = PS_TOO_LATE; flags = Var_Subst( "${.MAKEFLAGS} ${.MAKEOVERRIDES:O:u:@v@$v=${$v:Q}@}", SCOPE_CMDLINE, VARE_EVAL); @@ -2173,6 +2181,7 @@ Main_ExportMAKEFLAGS(bool first) if (flags[0] != '\0') setenv("MAKEFLAGS", flags, 1); free(flags); + posix_state = p_s; } char * diff --git a/contrib/bmake/make.1 b/contrib/bmake/make.1 index 869dcea3db0c..55276503aae9 100644 --- a/contrib/bmake/make.1 +++ b/contrib/bmake/make.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.381 2024/11/14 19:30:13 sjg Exp $ +.\" $NetBSD: make.1,v 1.384 2025/04/04 18:36:47 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd November 14, 2024 +.Dd April 4, 2025 .Dt MAKE 1 .Os .Sh NAME @@ -1098,11 +1098,61 @@ Puts into .Dq meta mode, where meta files are created for each target -to capture the command run, the output generated, and if +to capture the commands run, the output generated, and if .Xr filemon 4 is available, the system calls which are of interest to .Nm . The captured output can be useful when diagnosing errors. +.Pp +.Nm +will use the information in the meta file to help determine if +a target is out-of-date when the normal dependency rules +indicate it is not. +.Pp +First, +the commands to be executed, +will be compared to those captured previously, +if any differ, +the target is out-of-date. +.Pp +This allows for a huge improvement in the reliability +and efficiency of update builds. +It is no longer necessary for targets to depend on makefiles +just in-case they set a variable that might be relevant. +Mechanisms such as +.Va .MAKE.META.CMP_FILTER +and +.Ic .NOMETA_CMP , +allow limiting or disabling that comparison on a per target basis. +A reference to the variable +.Va .OODATE +can be leveraged to block comparison of certain commands. +For example: +.Ql ${.OODATE:M} +will expand to nothing and have no impact on the target, +its side-effect though, +will be to prevent comparison of any command line it appears on. +For documentation purposes +.Ql ${.OODATE:MNOMETA_CMP} +is useful. +.Pp +If necessary, +.Nm +will then use the information captured by +.Xr filemon 4 , +to check the modification time of any file used in generating +the target, +if any is newer, +the target is out-of-date. +.Pp +Such deep inspection can easily lead to cases where a target is +.Em always +considered out-of-date, which is why +.Va .MAKE.META.IGNORE_FILTER , +.Va .MAKE.META.IGNORE_PATHS +and +.Va .MAKE.META.IGNORE_PATTERNS , +are provided to limit that inspection when necessary. .It Cm curdirOk= Ns Ar bf By default, .Nm @@ -2547,6 +2597,8 @@ is run with the flag, only .Ql posix.mk contributes to the default rules. *** 7042 LINES SKIPPED *** From nobody Sat Jan 10 21:34:09 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2n6hLnz6Mwyl for ; Sat, 10 Jan 2026 21:34:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpX2n3dcbz3QqS for ; Sat, 10 Jan 2026 21:34:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5+AEdHS6PLeepzONprP+HTsB+EtDDbyBwCE/84MvvJA=; b=kZGAwowTd8hwUFQeJM89+EeGLqlqanxCGRhI3OIcRmc7rmTAD6hiLTZMr5paAaFeBy7wGO sE68df3pObSnhTJhtz6luavwzdlyRUYMiSLXNBZLJ5LKn8rk6pUTRY/pW+dyhZUCsG5ITc qEey66kwhpw3tBVolCIugyzX0ofv3g80Z+/PN46PqTN6KTtZ9A55sJ8A8n64WrXQZ+u9Qp 0Ish77sv+nHpqb4fjdL9a2pr98OTphXJHmLW3sGK6pwxC9U+hcNC3ud3bySBdmv3m1EDoJ xUb3hNRrevt+XGtRcoGqews0piUaHMMNRAYN0dibRob8J5t9qctIHeLt0c7EWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080849; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5+AEdHS6PLeepzONprP+HTsB+EtDDbyBwCE/84MvvJA=; b=l46FVA+uCw51G31/t7ZWZhfuOKuxokiOHbYS3QpbHs2il0ckQmI8sYEoyszVE3RVcSKgIy Y8VbZB/vaqLn95eT77r0EKw3gG6GLPOZY18CQKKX8F9vIXdqXInET2nSxmc6jI5FmVKwSo Ez/jWP+sgpyvq1mTi1sNiL4uXkyxm+BQWZTae48ICDsj/+IYJWekL+8VXPjbbuWHzVtJP5 WD7IrRjfkzBNWZ9eAHZ/Wp4ZslUx5wQOfkkHbgN3t1Zvoty/lKkmXDqehEqfIY8B2VtlIE NeXgqKT50ssevLqqkmeEku1GrYrEAmDfXqKpQmNGdvcGaHCrVCWzf/Y4WYwKdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768080849; a=rsa-sha256; cv=none; b=dTK/kJJUwAcxXoxrcIfgatWmbiPuoUe1HorgvXOF31WqXi9DGBDx8F3HkZj1UHTj8sKAiU KaZAfmyi0+GptAfcKHdmNYz9Nj17KfEkte5m2xiiHoM5PWsOz4qCMZRXSzcV3vTbgD4Lur d5MTJnBSe/CweB2qVAV61qgyqUEjOiKtCxHiPQkPVOX6aXc6Ijg9dEn3M+4DKepw3mQPOe kduHa+Y8C6zkX257/q/gY4bQP7Zn2ymvGbgeUkdY7IA1wQW2A4LaNYtXt9SRMGebNTnO18 PX3ja4EyjJYOWWIM0t4hb8mcOl5c3Z/xoeT1djrEldDA3rLdC5miQwUoP73srA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2n1kDFz1Bfn for ; Sat, 10 Jan 2026 21:34:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24eb2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 21:34:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Simon J. Gerraty Subject: git: eb560911563f - stable/14 - Merge bmake-20250618 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: eb560911563f13e56a74167e323fda1cf111e008 Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 21:34:09 +0000 Message-Id: <6962c5d1.24eb2.78b5d6b8@gitrepo.freebsd.org> The branch stable/14 has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=eb560911563f13e56a74167e323fda1cf111e008 commit eb560911563f13e56a74167e323fda1cf111e008 Author: Simon J. Gerraty AuthorDate: 2025-06-28 02:47:23 +0000 Commit: Simon J. Gerraty CommitDate: 2026-01-10 21:33:13 +0000 Merge bmake-20250618 (cherry picked from commit 0b46a53a2f50b5ab0f4598104119a049b9c42cc9) --- contrib/bmake/ChangeLog | 85 ++ contrib/bmake/FILES | 5 + contrib/bmake/VERSION | 2 +- contrib/bmake/bmake.1 | 11 +- contrib/bmake/bmake.cat1 | 7 +- contrib/bmake/compat.c | 32 +- contrib/bmake/cond.c | 10 +- contrib/bmake/dir.c | 6 +- contrib/bmake/for.c | 28 +- contrib/bmake/hash.c | 30 +- contrib/bmake/hash.h | 16 +- contrib/bmake/job.c | 860 ++++++++++----------- contrib/bmake/job.h | 116 +-- contrib/bmake/main.c | 152 ++-- contrib/bmake/make.1 | 11 +- contrib/bmake/make.c | 173 ++--- contrib/bmake/make.h | 20 +- contrib/bmake/make_malloc.c | 6 +- contrib/bmake/meta.c | 24 +- contrib/bmake/meta.h | 4 +- contrib/bmake/mk/ChangeLog | 40 + contrib/bmake/mk/FILES | 29 +- contrib/bmake/mk/auto.obj.mk | 4 +- contrib/bmake/mk/dirdeps2dplibs.mk | 35 + contrib/bmake/mk/gendirdeps.mk | 21 +- contrib/bmake/mk/install-mk | 4 +- contrib/bmake/mk/lib.mk | 4 +- contrib/bmake/mk/libs.mk | 4 +- contrib/bmake/mk/meta.autodep.mk | 55 +- contrib/bmake/mk/meta2deps.py | 23 +- contrib/bmake/mk/meta2deps.sh | 16 +- contrib/bmake/mk/mkopt.sh | 9 +- contrib/bmake/mk/newlog.sh | 64 +- contrib/bmake/mk/progs.mk | 4 +- contrib/bmake/mk/setopts.sh | 20 +- contrib/bmake/mk/sys.mk | 3 +- contrib/bmake/parse.c | 90 ++- contrib/bmake/suff.c | 64 +- contrib/bmake/targ.c | 9 +- contrib/bmake/trace.c | 12 +- contrib/bmake/unit-tests/Makefile | 35 +- contrib/bmake/unit-tests/archive.exp | 4 +- contrib/bmake/unit-tests/check-expect.lua | 190 +++++ contrib/bmake/unit-tests/cmd-errors-jobs.exp | 6 + contrib/bmake/unit-tests/cond-func-empty.exp | 3 +- contrib/bmake/unit-tests/cond-func-empty.mk | 3 +- contrib/bmake/unit-tests/cond-late.exp | 2 +- contrib/bmake/unit-tests/dep-op-missing.exp | 2 +- contrib/bmake/unit-tests/deptgt-suffixes.exp | 1 + contrib/bmake/unit-tests/directive-for-errors.exp | 2 +- contrib/bmake/unit-tests/directive-for-errors.mk | 7 +- contrib/bmake/unit-tests/directive-for-null.exp | 2 +- contrib/bmake/unit-tests/gnode-submake.exp | 2 +- contrib/bmake/unit-tests/job-output.exp | 13 + contrib/bmake/unit-tests/job-output.mk | 41 + contrib/bmake/unit-tests/objdir-writable.exp | 2 +- contrib/bmake/unit-tests/opt-debug-graph1.exp | 3 +- contrib/bmake/unit-tests/opt-debug-graph2.exp | 3 +- contrib/bmake/unit-tests/opt-debug-graph3.exp | 3 +- contrib/bmake/unit-tests/opt-debug-jobs.exp | 20 +- contrib/bmake/unit-tests/opt-file.exp | 2 +- contrib/bmake/unit-tests/opt-jobs-internal.exp | 33 +- contrib/bmake/unit-tests/opt-jobs-internal.mk | 70 +- contrib/bmake/unit-tests/opt-jobs.mk | 2 +- contrib/bmake/unit-tests/opt-touch-jobs.mk | 4 +- contrib/bmake/unit-tests/opt-tracefile.exp | 16 +- contrib/bmake/unit-tests/opt-tracefile.mk | 5 +- contrib/bmake/unit-tests/sh-errctl.exp | 14 +- contrib/bmake/unit-tests/shell-csh.mk | 6 +- contrib/bmake/unit-tests/shell-ksh.exp | 11 +- contrib/bmake/unit-tests/shell-ksh.mk | 42 +- contrib/bmake/unit-tests/suff-main-several.exp | 3 +- contrib/bmake/unit-tests/suff-transform-debug.exp | 3 +- contrib/bmake/unit-tests/var-op-expand.exp | 14 +- contrib/bmake/unit-tests/var-op-expand.mk | 11 +- contrib/bmake/unit-tests/var-recursive.exp | 9 +- contrib/bmake/unit-tests/varmod-assign.exp | 3 + contrib/bmake/unit-tests/varmod-ifelse.exp | 9 + contrib/bmake/unit-tests/varmod-ifelse.mk | 9 +- contrib/bmake/unit-tests/varmod-mtime.exp | 4 +- contrib/bmake/unit-tests/varmod-mtime.mk | 6 +- .../bmake/unit-tests/varname-dot-make-level.exp | 1 + contrib/bmake/unit-tests/varname-dot-makeflags.mk | 2 +- contrib/bmake/unit-tests/varname-dot-newline.exp | 6 +- .../bmake/unit-tests/varname-make_stack_trace.exp | 40 + .../bmake/unit-tests/varname-make_stack_trace.mk | 37 + contrib/bmake/unit-tests/varname.exp | 17 +- contrib/bmake/unit-tests/varname.mk | 68 +- contrib/bmake/unit-tests/varparse-errors.mk | 4 +- contrib/bmake/var.c | 108 ++- usr.bin/bmake/Makefile.config | 2 +- usr.bin/bmake/unit-tests/Makefile | 35 +- 92 files changed, 1870 insertions(+), 1178 deletions(-) diff --git a/contrib/bmake/ChangeLog b/contrib/bmake/ChangeLog index 1ec90b7bccc8..0a5eced2d439 100644 --- a/contrib/bmake/ChangeLog +++ b/contrib/bmake/ChangeLog @@ -1,3 +1,88 @@ +2025-06-18 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250618 + Merge with NetBSD make, pick up + o parse.c: in a warning without location information, + print the stack trace + +2025-06-15 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250615 + Merge with NetBSD make, pick up + o add on-demand inter-process stack traces + o job.c,meta.c: do not discard empty lines in the output of a command + o job.c: add job prefix if necessary in non-default filtered mode + o parse.c,var.c: skip inter-process stack trace when + MAKE_STACK_TRACE=no + +2025-06-12 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250612 + Merge with NetBSD make, pick up + o use a common style for unexpected error messages + o parse.c: add program name to stack traces from sub-makes + add quotes to "in directory" line in stack traces + o var.c: check variable names for invalid characters when there + are no modifiers to apply. This detects and warns about gmake + syntax like: $(addprefix -I, $(LIST)) + +2025-06-09 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250606 + Merge with NetBSD make, pick up + o main.c: fix bug in handling of output of children in jobs mode + +2025-05-28 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250528 + Merge with NetBSD make, pick up + o show contents of MAKEFLAGS in the stack trace. + o main.c: delay warning about bogus -J flag, if we end up in + compat mode before the call to InitMaxJobs, the warning isn't + necessary. + +2025-05-25 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250525 + Merge with NetBSD make, pick up + o main.c: set .CURDIR earlier so it can be reported in some errors. + +2025-05-20 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250520 + Merge with NetBSD make, pick up + o rename variables, remove now-redundant comments + o job.c: clean up building the shell commands in parallel mode + remove timeout for polling in parallel mode + o main.c: clean up error message for malformed internal -J option + +2025-05-11 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250511 + Merge with NetBSD make, pick up + o job.c: rename token pool variables to be more descriptive + move ContinueJobs further up, to eliminate a forward declaration + error out if writing to an internal pipe fails + clean up constant names and function names + use uniform debug log messages for the token pool + in the debug log, replace magic numbers with identifiers + o main.c: clean up error message for malformed internal -J option + o make.c: replace bitset in trace output with descriptive node + attributes + o targ.c: add end marker for -dg1, -dg2 and -dg3 debug log + o var.c: fix order of error messages in the ":?" modifier + +2025-04-25 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250424 + Merge with NetBSD make, pick up + o cleanup; replace unsigned int with just unsigned + Inline the TMPPAT macro, as it is only needed in a single place + o move struct Job from job.h to job.c + o job.c: group the code for handling the job token pool + avoid excessive values of -j + o make.c: fix grammar in debug log message + 2025-04-14 Simon J Gerraty * VERSION (_MAKE_VERSION): 20250414 diff --git a/contrib/bmake/FILES b/contrib/bmake/FILES index 553f3211f29c..8bed07d546a3 100644 --- a/contrib/bmake/FILES +++ b/contrib/bmake/FILES @@ -76,6 +76,7 @@ unit-tests/archive-suffix.exp unit-tests/archive-suffix.mk unit-tests/archive.exp unit-tests/archive.mk +unit-tests/check-expect.lua unit-tests/cmd-errors-jobs.exp unit-tests/cmd-errors-jobs.mk unit-tests/cmd-errors-lint.exp @@ -410,6 +411,8 @@ unit-tests/job-output-long-lines.exp unit-tests/job-output-long-lines.mk unit-tests/job-output-null.exp unit-tests/job-output-null.mk +unit-tests/job-output.exp +unit-tests/job-output.mk unit-tests/jobs-empty-commands-error.exp unit-tests/jobs-empty-commands-error.mk unit-tests/jobs-empty-commands.exp @@ -859,6 +862,8 @@ unit-tests/varname-make_print_var_on_error-jobs.exp unit-tests/varname-make_print_var_on_error-jobs.mk unit-tests/varname-make_print_var_on_error.exp unit-tests/varname-make_print_var_on_error.mk +unit-tests/varname-make_stack_trace.exp +unit-tests/varname-make_stack_trace.mk unit-tests/varname-makefile.exp unit-tests/varname-makefile.mk unit-tests/varname-makeflags.exp diff --git a/contrib/bmake/VERSION b/contrib/bmake/VERSION index 4e4949c5fd3e..1467403891f1 100644 --- a/contrib/bmake/VERSION +++ b/contrib/bmake/VERSION @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20250414 +_MAKE_VERSION=20250618 diff --git a/contrib/bmake/bmake.1 b/contrib/bmake/bmake.1 index 9e9f2d03a450..92ed9e201ea5 100644 --- a/contrib/bmake/bmake.1 +++ b/contrib/bmake/bmake.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.384 2025/04/04 18:36:47 sjg Exp $ +.\" $NetBSD: make.1,v 1.385 2025/06/13 03:51:18 rillig Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd April 4, 2025 +.Dd June 12, 2025 .Dt BMAKE 1 .Os .Sh NAME @@ -2688,6 +2688,7 @@ uses the following environment variables, if they exist: .Ev MAKEOBJDIR , .Ev MAKEOBJDIRPREFIX , .Ev MAKESYSPATH , +.Ev MAKE_STACK_TRACE , .Ev PWD , and .Ev TMPDIR . @@ -2707,6 +2708,12 @@ very early and the target is used to reset .Sq Va .OBJDIR , there may be unexpected side effects. +.Pp +If the +.Ev MAKE_STACK_TRACE +environment variable is set to +.Dq yes , +any stack traces include the call chain of the parent processes. .Sh FILES .Bl -tag -width /usr/share/mk -compact .It .depend diff --git a/contrib/bmake/bmake.cat1 b/contrib/bmake/bmake.cat1 index e1340e1c78e0..667c80898def 100644 --- a/contrib/bmake/bmake.cat1 +++ b/contrib/bmake/bmake.cat1 @@ -1728,7 +1728,7 @@ SSPPEECCIIAALL TTAARRGGEETTSS EENNVVIIRROONNMMEENNTT bbmmaakkee uses the following environment variables, if they exist: MACHINE, MACHINE_ARCH, MAKE, MAKEFLAGS, MAKEOBJDIR, MAKEOBJDIRPREFIX, MAKESYSPATH, - PWD, and TMPDIR. + MAKE_STACK_TRACE, PWD, and TMPDIR. MAKEOBJDIRPREFIX and MAKEOBJDIR should be set in the environment or on the command line to bbmmaakkee and not as makefile variables; see the @@ -1736,6 +1736,9 @@ EENNVVIIRROONNMMEENNTT via makefile variables but unless done very early and the `..OOBBJJDDIIRR' target is used to reset `_._O_B_J_D_I_R', there may be unexpected side effects. + If the MAKE_STACK_TRACE environment variable is set to "yes", any stack + traces include the call chain of the parent processes. + FFIILLEESS .depend list of dependencies makefile first default makefile if no makefile is specified on the @@ -1828,4 +1831,4 @@ BBUUGGSS attempt to suppress a cascade of unnecessary errors, can result in a seemingly unexplained `*** Error code 6' -FreeBSD 14.2-RELEASE-p1 April 4, 2025 FreeBSD 14.2-RELEASE-p1 +FreeBSD 14.2-RELEASE-p1 June 12, 2025 FreeBSD 14.2-RELEASE-p1 diff --git a/contrib/bmake/compat.c b/contrib/bmake/compat.c index 0da929e35b82..7a51a99be4ba 100644 --- a/contrib/bmake/compat.c +++ b/contrib/bmake/compat.c @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.262 2025/01/19 10:57:10 rillig Exp $ */ +/* $NetBSD: compat.c,v 1.267 2025/06/13 03:51:18 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -90,13 +90,16 @@ #include "make.h" #include "dir.h" #include "job.h" +#ifdef USE_META +# include "meta.h" +#endif #include "metachar.h" #include "pathnames.h" /* "@(#)compat.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: compat.c,v 1.262 2025/01/19 10:57:10 rillig Exp $"); +MAKE_RCSID("$NetBSD: compat.c,v 1.267 2025/06/13 03:51:18 rillig Exp $"); -static GNode *curTarg = NULL; +static GNode *curTarg; static pid_t compatChild; static int compatSigno; @@ -107,7 +110,7 @@ static int compatSigno; static void CompatDeleteTarget(GNode *gn) { - if (gn != NULL && !GNode_IsPrecious(gn) && + if (!GNode_IsPrecious(gn) && (gn->type & OP_PHONY) == 0) { const char *file = GNode_VarTarget(gn); if (!opts.noExecute && unlink_file(file) == 0) @@ -127,11 +130,9 @@ CompatDeleteTarget(GNode *gn) static void CompatInterrupt(int signo) { - CompatDeleteTarget(curTarg); - - if (curTarg != NULL && !GNode_IsPrecious(curTarg)) { - /* Run .INTERRUPT only if hit with interrupt signal. */ - if (signo == SIGINT) { + if (curTarg != NULL) { + CompatDeleteTarget(curTarg); + if (signo == SIGINT && !GNode_IsPrecious(curTarg)) { GNode *gn = Targ_FindNode(".INTERRUPT"); if (gn != NULL) Compat_Make(gn, gn); @@ -309,8 +310,6 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln) cmd++; } - while (ch_isspace(*cmd)) - cmd++; if (cmd[0] == '\0') goto register_command; @@ -337,7 +336,7 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln) if (Cmd_Argv(cmd, cmd_len, shargv, 5, cmd_file, sizeof(cmd_file), - (errCheck && shellErrFlag != NULL), + errCheck && shellErrFlag != NULL, DEBUG(SHELL)) < 0) Fatal("cannot run \"%s\"", cmd); av = shargv; @@ -356,6 +355,7 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln) #endif Var_ReexportVars(gn); + Var_ExportStackTrace(gn->name, cmd); compatChild = Compat_Spawn(av); free(mav); @@ -730,7 +730,7 @@ InitSignals(void) } void -Compat_MakeAll(GNodeList *targs) +Compat_MakeAll(GNodeList *targets) { GNode *errorNode = NULL; @@ -753,10 +753,10 @@ Compat_MakeAll(GNodeList *targs) * Expand .USE nodes right now, because they can modify the structure * of the tree. */ - Make_ExpandUse(targs); + Make_ExpandUse(targets); - while (!Lst_IsEmpty(targs)) { - GNode *gn = Lst_Dequeue(targs); + while (!Lst_IsEmpty(targets)) { + GNode *gn = Lst_Dequeue(targets); Compat_Make(gn, gn); if (gn->made == UPTODATE) { diff --git a/contrib/bmake/cond.c b/contrib/bmake/cond.c index 31fe21c4c8b6..f83163cbb50e 100644 --- a/contrib/bmake/cond.c +++ b/contrib/bmake/cond.c @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.372 2025/04/10 21:41:35 rillig Exp $ */ +/* $NetBSD: cond.c,v 1.373 2025/04/22 19:28:50 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -91,7 +91,7 @@ #include "dir.h" /* "@(#)cond.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: cond.c,v 1.372 2025/04/10 21:41:35 rillig Exp $"); +MAKE_RCSID("$NetBSD: cond.c,v 1.373 2025/04/22 19:28:50 rillig Exp $"); /* * Conditional expressions conform to this grammar: @@ -166,7 +166,7 @@ typedef struct CondParser { static CondResult CondParser_Or(CondParser *, bool); -unsigned int cond_depth = 0; /* current .if nesting level */ +unsigned cond_depth = 0; /* current .if nesting level */ /* Names for ComparisonOp. */ static const char opname[][3] = { "<", "<=", ">", ">=", "==", "!=" }; @@ -1028,7 +1028,7 @@ Cond_EvalLine(const char *line) } IfState; static enum IfState *cond_states = NULL; - static unsigned int cond_states_cap = 128; + static unsigned cond_states_cap = 128; bool plain; bool (*evalBare)(const char *); @@ -1221,7 +1221,7 @@ found_variable: void Cond_EndFile(void) { - unsigned int open_conds = cond_depth - CurFile_CondMinDepth(); + unsigned open_conds = cond_depth - CurFile_CondMinDepth(); if (open_conds != 0) { Parse_Error(PARSE_FATAL, "%u open conditional%s", diff --git a/contrib/bmake/dir.c b/contrib/bmake/dir.c index 106b475bda2a..217fd04e162b 100644 --- a/contrib/bmake/dir.c +++ b/contrib/bmake/dir.c @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.296 2025/04/11 17:21:31 rillig Exp $ */ +/* $NetBSD: dir.c,v 1.297 2025/06/12 18:51:05 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -132,7 +132,7 @@ #include "job.h" /* "@(#)dir.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: dir.c,v 1.296 2025/04/11 17:21:31 rillig Exp $"); +MAKE_RCSID("$NetBSD: dir.c,v 1.297 2025/06/12 18:51:05 rillig Exp $"); /* * A search path is a list of CachedDir structures. A CachedDir has in it the @@ -492,7 +492,7 @@ Dir_InitDot(void) dir = SearchPath_Add(NULL, "."); if (dir == NULL) { - Error("Cannot open `.' (%s)", strerror(errno)); + Error("Cannot open \".\": %s", strerror(errno)); exit(2); /* Not 1 so -q can distinguish error */ } diff --git a/contrib/bmake/for.c b/contrib/bmake/for.c index 2aa1398b1c4c..438fb4e84de0 100644 --- a/contrib/bmake/for.c +++ b/contrib/bmake/for.c @@ -1,4 +1,4 @@ -/* $NetBSD: for.c,v 1.184 2025/04/11 18:08:17 rillig Exp $ */ +/* $NetBSD: for.c,v 1.185 2025/04/22 19:28:50 rillig Exp $ */ /* * Copyright (c) 1992, The Regents of the University of California. @@ -58,14 +58,14 @@ #include "make.h" /* "@(#)for.c 8.1 (Berkeley) 6/6/93" */ -MAKE_RCSID("$NetBSD: for.c,v 1.184 2025/04/11 18:08:17 rillig Exp $"); +MAKE_RCSID("$NetBSD: for.c,v 1.185 2025/04/22 19:28:50 rillig Exp $"); typedef struct ForLoop { Vector /* of 'char *' */ vars; /* Iteration variables */ SubstringWords items; /* Substitution items */ Buffer body; /* Unexpanded body of the loop */ - unsigned int nextItem; /* Where to continue iterating */ + unsigned nextItem; /* Where to continue iterating */ } ForLoop; @@ -330,7 +330,7 @@ ExprLen(const char *s, const char *e) * by ApplyModifier_Defined. */ static void -AddEscaped(Buffer *cmds, Substring item, char endc) +AddEscaped(Buffer *body, Substring item, char endc) { const char *p; char ch; @@ -344,18 +344,18 @@ AddEscaped(Buffer *cmds, Substring item, char endc) * XXX: Should a '\' be added here? * See directive-for-escape.mk, ExprLen. */ - Buf_AddBytes(cmds, p, 1 + len); + Buf_AddBytes(body, p, 1 + len); p += 1 + len; continue; } - Buf_AddByte(cmds, '\\'); + Buf_AddByte(body, '\\'); } else if (ch == ':' || ch == '\\' || ch == endc) - Buf_AddByte(cmds, '\\'); + Buf_AddByte(body, '\\'); else if (ch == '\n') { Parse_Error(PARSE_FATAL, "newline in .for value"); ch = ' '; /* prevent newline injection */ } - Buf_AddByte(cmds, ch); + Buf_AddByte(body, ch); p++; } } @@ -365,7 +365,7 @@ AddEscaped(Buffer *cmds, Substring item, char endc) * expression like ${i} or ${i:...} or $(i) or $(i:...) with ":Uvalue". */ static void -ForLoop_SubstVarLong(ForLoop *f, unsigned int firstItem, Buffer *body, +ForLoop_SubstVarLong(ForLoop *f, unsigned firstItem, Buffer *body, const char **pp, char endc, const char **inout_mark) { size_t i; @@ -400,7 +400,7 @@ ForLoop_SubstVarLong(ForLoop *f, unsigned int firstItem, Buffer *body, * expressions like $i with their ${:U...} expansion. */ static void -ForLoop_SubstVarShort(ForLoop *f, unsigned int firstItem, Buffer *body, +ForLoop_SubstVarShort(ForLoop *f, unsigned firstItem, Buffer *body, const char *p, const char **inout_mark) { char ch = *p; @@ -444,7 +444,7 @@ found: * See unit-tests/directive-for-escape.mk. */ static void -ForLoop_SubstBody(ForLoop *f, unsigned int firstItem, Buffer *body) +ForLoop_SubstBody(ForLoop *f, unsigned firstItem, Buffer *body) { const char *p, *end; const char *mark; /* where the last substitution left off */ @@ -479,8 +479,8 @@ For_NextIteration(ForLoop *f, Buffer *body) if (f->nextItem == f->items.len) return false; - f->nextItem += (unsigned int)f->vars.len; - ForLoop_SubstBody(f, f->nextItem - (unsigned int)f->vars.len, body); + f->nextItem += (unsigned)f->vars.len; + ForLoop_SubstBody(f, f->nextItem - (unsigned)f->vars.len, body); if (DEBUG(FOR)) { char *details = ForLoop_Details(f); debug_printf("For: loop body with %s:\n%s", @@ -494,7 +494,7 @@ For_NextIteration(ForLoop *f, Buffer *body) void For_Break(ForLoop *f) { - f->nextItem = (unsigned int)f->items.len; + f->nextItem = (unsigned)f->items.len; } /* Run the .for loop, imitating the actions of an include file. */ diff --git a/contrib/bmake/hash.c b/contrib/bmake/hash.c index e84ef412bdef..663378626b89 100644 --- a/contrib/bmake/hash.c +++ b/contrib/bmake/hash.c @@ -1,4 +1,4 @@ -/* $NetBSD: hash.c,v 1.79 2024/07/07 09:37:00 rillig Exp $ */ +/* $NetBSD: hash.c,v 1.80 2025/04/22 19:28:50 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -74,7 +74,7 @@ #include "make.h" /* "@(#)hash.c 8.1 (Berkeley) 6/6/93" */ -MAKE_RCSID("$NetBSD: hash.c,v 1.79 2024/07/07 09:37:00 rillig Exp $"); +MAKE_RCSID("$NetBSD: hash.c,v 1.80 2025/04/22 19:28:50 rillig Exp $"); /* * The ratio of # entries to # buckets at which we rebuild the table to @@ -83,10 +83,10 @@ MAKE_RCSID("$NetBSD: hash.c,v 1.79 2024/07/07 09:37:00 rillig Exp $"); #define rebuildLimit 3 /* This hash function matches Gosling's Emacs and java.lang.String. */ -static unsigned int +static unsigned Hash_String(const char *key, const char **out_keyEnd) { - unsigned int h; + unsigned h; const char *p; h = 0; @@ -98,10 +98,10 @@ Hash_String(const char *key, const char **out_keyEnd) } /* This hash function matches Gosling's Emacs and java.lang.String. */ -unsigned int +unsigned Hash_Substring(Substring key) { - unsigned int h; + unsigned h; const char *p; h = 0; @@ -111,7 +111,7 @@ Hash_Substring(Substring key) } static HashEntry * -HashTable_Find(HashTable *t, Substring key, unsigned int h) +HashTable_Find(HashTable *t, Substring key, unsigned h) { HashEntry *he; size_t keyLen = Substring_Length(key); @@ -135,7 +135,7 @@ HashTable_Find(HashTable *t, Substring key, unsigned int h) void HashTable_Init(HashTable *t) { - unsigned int n = 16, i; + unsigned n = 16, i; HashEntry **buckets = bmake_malloc(sizeof *buckets * n); for (i = 0; i < n; i++) buckets[i] = NULL; @@ -176,7 +176,7 @@ HashEntry * HashTable_FindEntry(HashTable *t, const char *key) { const char *keyEnd; - unsigned int h = Hash_String(key, &keyEnd); + unsigned h = Hash_String(key, &keyEnd); return HashTable_Find(t, Substring_Init(key, keyEnd), h); } @@ -193,7 +193,7 @@ HashTable_FindValue(HashTable *t, const char *key) * or return NULL. */ void * -HashTable_FindValueBySubstringHash(HashTable *t, Substring key, unsigned int h) +HashTable_FindValueBySubstringHash(HashTable *t, Substring key, unsigned h) { HashEntry *he = HashTable_Find(t, key, h); return he != NULL ? he->value : NULL; @@ -220,10 +220,10 @@ HashTable_MaxChain(const HashTable *t) static void HashTable_Enlarge(HashTable *t) { - unsigned int oldSize = t->bucketsSize; + unsigned oldSize = t->bucketsSize; HashEntry **oldBuckets = t->buckets; - unsigned int newSize = 2 * oldSize; - unsigned int newMask = newSize - 1; + unsigned newSize = 2 * oldSize; + unsigned newMask = newSize - 1; HashEntry **newBuckets = bmake_malloc(sizeof *newBuckets * newSize); size_t i; @@ -257,7 +257,7 @@ HashEntry * HashTable_CreateEntry(HashTable *t, const char *key, bool *out_isNew) { const char *keyEnd; - unsigned int h = Hash_String(key, &keyEnd); + unsigned h = Hash_String(key, &keyEnd); HashEntry *he = HashTable_Find(t, Substring_Init(key, keyEnd), h); if (he != NULL) { @@ -313,7 +313,7 @@ HashIter_Next(HashIter *hi) HashTable *t = hi->table; HashEntry *he = hi->entry; HashEntry **buckets = t->buckets; - unsigned int bucketsSize = t->bucketsSize; + unsigned bucketsSize = t->bucketsSize; if (he != NULL) he = he->next; /* skip the most recently returned entry */ diff --git a/contrib/bmake/hash.h b/contrib/bmake/hash.h index d6f9d03fb3ab..d9cf708dbd91 100644 --- a/contrib/bmake/hash.h +++ b/contrib/bmake/hash.h @@ -1,4 +1,4 @@ -/* $NetBSD: hash.h,v 1.51 2024/07/07 09:37:00 rillig Exp $ */ +/* $NetBSD: hash.h,v 1.52 2025/04/22 19:28:50 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -82,22 +82,22 @@ typedef struct HashEntry { struct HashEntry *next; /* Used to link together all the entries * associated with the same bucket. */ void *value; - unsigned int hash; /* hash value of the key */ + unsigned hash; /* hash value of the key */ char key[1]; /* key string, variable length */ } HashEntry; /* The hash table containing the entries. */ typedef struct HashTable { HashEntry **buckets; - unsigned int bucketsSize; - unsigned int numEntries; - unsigned int bucketsMask; /* Used to select the bucket for a hash. */ + unsigned bucketsSize; + unsigned numEntries; + unsigned bucketsMask; /* Used to select the bucket for a hash. */ } HashTable; /* State of an iteration over all entries in a table. */ typedef struct HashIter { HashTable *table; /* Table being searched. */ - unsigned int nextBucket; /* Next bucket to check (after current). */ + unsigned nextBucket; /* Next bucket to check (after current). */ HashEntry *entry; /* Next entry to check in current bucket. */ } HashIter; @@ -131,8 +131,8 @@ void HashTable_Init(HashTable *); void HashTable_Done(HashTable *); HashEntry *HashTable_FindEntry(HashTable *, const char *) MAKE_ATTR_USE; void *HashTable_FindValue(HashTable *, const char *) MAKE_ATTR_USE; -unsigned int Hash_Substring(Substring) MAKE_ATTR_USE; -void *HashTable_FindValueBySubstringHash(HashTable *, Substring, unsigned int) +unsigned Hash_Substring(Substring) MAKE_ATTR_USE; +void *HashTable_FindValueBySubstringHash(HashTable *, Substring, unsigned) MAKE_ATTR_USE; HashEntry *HashTable_CreateEntry(HashTable *, const char *, bool *); void HashTable_Set(HashTable *, const char *, void *); diff --git a/contrib/bmake/job.c b/contrib/bmake/job.c index 2e6f44f722f2..582870088f2d 100644 --- a/contrib/bmake/job.c +++ b/contrib/bmake/job.c @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.492 2025/04/12 13:00:21 rillig Exp $ */ +/* $NetBSD: job.c,v 1.516 2025/06/13 06:13:19 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -73,45 +73,29 @@ * Create child processes and collect their output. * * Interface: - * Job_Init Called to initialize this module. In addition, - * the .BEGIN target is made, including all of its - * dependencies before this function returns. - * Hence, the makefiles must have been parsed - * before this function is called. + * Job_Init Initialize this module and make the .BEGIN target. * * Job_End Clean up any memory used. * - * Job_Make Start the creation of the given target. + * Job_Make Start making the given target. * * Job_CatchChildren - * Check for and handle the termination of any - * children. This must be called reasonably - * frequently to keep the whole make going at - * a decent clip, since job table entries aren't - * removed until their process is caught this way. + * Handle the termination of any children. * * Job_CatchOutput - * Print any output our children have produced. - * Should also be called fairly frequently to - * keep the user informed of what's going on. - * If no output is waiting, it will block for - * a time given by the SEL_* constants, below, - * or until output is ready. + * Print any output the child processes have produced. * * Job_ParseShell Given a special dependency line with target '.SHELL', * define the shell that is used for the creation * commands in jobs mode. * - * Job_Finish Make the .END target. Should only be called when the + * Job_Finish Make the .END target. Must only be called when the * job table is empty. * - * Job_AbortAll Abort all currently running jobs. Do not handle - * output or do anything for the jobs, just kill them. - * Should only be called in an emergency. + * Job_AbortAll Kill all currently running jobs, in an emergency. * * Job_CheckCommands - * Verify that the commands for a target are - * ok. Provide them if necessary and possible. + * Add fallback commands to a target, if necessary. * * Job_Touch Update a target without really updating it. * @@ -123,7 +107,6 @@ #endif #include #include -#include #include #include "wait.h" @@ -147,11 +130,111 @@ #include "make.h" #include "dir.h" #include "job.h" +#ifdef USE_META +# include "meta.h" +#endif #include "pathnames.h" #include "trace.h" /* "@(#)job.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: job.c,v 1.492 2025/04/12 13:00:21 rillig Exp $"); +MAKE_RCSID("$NetBSD: job.c,v 1.516 2025/06/13 06:13:19 rillig Exp $"); + + +#ifdef USE_SELECT +/* + * Emulate poll() in terms of select(). This is not a complete + * emulation but it is sufficient for make's purposes. + */ + +#define poll emul_poll +#define pollfd emul_pollfd + +struct emul_pollfd { + int fd; + short events; + short revents; +}; + +#define POLLIN 0x0001 +#define POLLOUT 0x0004 + +int emul_poll(struct pollfd *, int, int); +#endif + +struct pollfd; + + +enum JobStatus { + JOB_ST_FREE, /* Job is available */ + JOB_ST_SET_UP, /* Job is allocated but otherwise invalid */ + JOB_ST_RUNNING, /* Job is running, pid valid */ + JOB_ST_FINISHED /* Job is done (i.e. after SIGCHLD) */ +}; + +static const char JobStatus_Name[][9] = { + "free", + "set-up", + "running", + "finished", +}; + +/* + * A Job manages the shell commands that are run to create a single target. + * Each job is run in a separate subprocess by a shell. Several jobs can run + * in parallel. + * + * The shell commands for the target are written to a temporary file, + * then the shell is run with the temporary file as stdin, and the output + * of that shell is captured via a pipe. + * + * When a job is finished, Make_Update updates all parents of the node + * that was just remade, marking them as ready to be made next if all + * other dependencies are finished as well. + */ +struct Job { + /* The process ID of the shell running the commands */ + int pid; + + /* The target the child is making */ + GNode *node; + + /* + * If one of the shell commands is "...", all following commands are + * delayed until the .END node is made. This list node points to the + * first of these commands, if any. + */ + StringListNode *tailCmds; + + /* This is where the shell commands go. */ + FILE *cmdFILE; + + int exit_status; /* from wait4() in signal handler */ + + enum JobStatus status; + + bool suspended; + + /* Ignore non-zero exits */ + bool ignerr; + /* Output the command before or instead of running it. */ + bool echo; + /* Target is a special one. */ + bool special; + + int inPipe; /* Pipe for reading output from job */ + int outPipe; /* Pipe for writing control commands */ + struct pollfd *inPollfd; /* pollfd associated with inPipe */ + +#define JOB_BUFSIZE 1024 + /* Buffer for storing the output of the job, line by line. */ + char outBuf[JOB_BUFSIZE + 1]; + size_t outBufLen; + +#ifdef USE_META + struct BuildMon bm; +#endif +}; + /* * A shell defines how the commands are run. All commands for a target are @@ -280,6 +363,8 @@ static enum { /* Why is the make aborting? */ } aborting = ABORT_NONE; #define JOB_TOKENS "+EI+" /* Token to requeue for each abort state */ +static const char aborting_name[][6] = { "NONE", "ERROR", "INTR", "WAIT" }; + /* Tracks the number of tokens currently "out" to build jobs. */ int jobTokensRunning = 0; @@ -442,11 +527,12 @@ static void watchfd(Job *); static void clearfd(Job *); static char *targPrefix = NULL; /* To identify a job change in the output. */ -static Job tokenWaitJob; /* token wait pseudo-job */ + +static Job tokenPoolJob; /* token wait pseudo-job */ static Job childExitJob; /* child exit pseudo-job */ -#define CHILD_EXIT "." -#define DO_JOB_RESUME "R" +#define CEJ_CHILD_EXITED '.' +#define CEJ_RESUME_JOBS 'R' enum { npseudojobs = 2 /* number of pseudo-jobs */ @@ -457,7 +543,6 @@ static volatile sig_atomic_t caught_sigchld; static void CollectOutput(Job *, bool); static void JobInterrupt(bool, int) MAKE_ATTR_DEAD; -static void JobRestartJobs(void); static void JobSigReset(void); static void @@ -493,17 +578,38 @@ Job_FlagsToString(const Job *job, char *buf, size_t bufsize) job->special ? 'S' : '-'); } +#ifdef USE_META +struct BuildMon * +Job_BuildMon(Job *job) +{ + return &job->bm; +} +#endif + +GNode * +Job_Node(Job *job) +{ + return job->node; +} + *** 5506 LINES SKIPPED *** From nobody Sat Jan 10 21:34:11 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2r3CcLz6MxXG for ; Sat, 10 Jan 2026 21:34:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpX2q4DBSz3QsX for ; Sat, 10 Jan 2026 21:34:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IONFqYLqGgxXY7lHGocrN2IFsoUsFtMDPFjVROBDhGY=; b=pcw2xIsT957mP6Ehk8Uato0HOuSzZh1FB2AdHmnM36cJpJAmFkcbA7V7PsVCWd451hjMYM X83gWCT4ZM0Lq3VlL3b3LpoGSUhmBky4Fqz5jwxE7UstyRyQeiF+kZbzNDf9bIZGGfXw/1 JNei3v2WODtn506/pCO/Wgcwz4v4GmrfwIOmPCMkOI8ZyCtwKC68R3xCUb3MicOdhrWNrr fii/uiBC8y5ch+Hg6vTQB8FdtCzxL40Tv0NUMxqQdmB+PgamiKsrI3LsCU/cIxa5ZBnzNU 3VdREmzSqcbCEK3O2C9M+1JjCPJa8MejgQ7XcY5cupPBwU8a7iV78QUhmO+NPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IONFqYLqGgxXY7lHGocrN2IFsoUsFtMDPFjVROBDhGY=; b=WZbjeSVDHuw7RSHXvYhxvOIQQIoxe84yoSL60G1GvfGMyZ38HSwiHy603/xawS//uquTLS 4r9V6o2CPB9iXCYlU/apMIl1pmKGjZS6dbQK6PDNRbRwdPl9GcX6jhW8RKhFlAxbGgNqvE Ahl33Y/wf2uUPDl2KkGpigeDO3KR+7MZxSauy3kzjmf7tCvW/udIG4pxpHOCFB5FpdCQbv l7cskFLndRYMdx+1aQSEr3l90PywFZ2/IJUmi3Py3m10zqxkv0KKkOEvkZMxmaw93WvJDz Lk8CNaRpwYCuIt2CAjMmAX9/tPQvmH/bGQ6cIfaVGhJkq3wy14K3SWjzaqo1pg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768080851; a=rsa-sha256; cv=none; b=KOYepu2T+Kq8Kmub3LaE6rtveurHMW7mfImjJ/iSY9ZVvdOqkyJxarErt5xV5kTd/s97pd QyPFH326HYSiA730qMP1o+vJtuxGUyilEI3MdaAybE82c+E+4ZskwkyMK8NXqsbyzothAt rapzrkHpXWRUHmpAV3fsIE72IKXvd+PDcDqzykrHaKmp9hM+KB+XEw2EH6OQFzxwWMT9/q 8FtvYs3Z9fHUMmfMZlE1sG6kPpkY2gHV6olf8NI9/nda3Bh+pM7H3B6Xz6qFIDVJQWCSFx ta5d85116QxZEzrcizru+zBQs/7KwUrRv6vxNikyHY+fL4AeVTBZCFERKenAFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2q3qLvz1Bfp for ; Sat, 10 Jan 2026 21:34:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25c8b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 21:34:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Simon J. Gerraty Subject: git: 06366a2188a1 - stable/14 - Merge bmake-20250804 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 06366a2188a13fc22b88a502fd7f9c4d17d91d2e Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 21:34:11 +0000 Message-Id: <6962c5d3.25c8b.1f00ab6e@gitrepo.freebsd.org> The branch stable/14 has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=06366a2188a13fc22b88a502fd7f9c4d17d91d2e commit 06366a2188a13fc22b88a502fd7f9c4d17d91d2e Author: Simon J. Gerraty AuthorDate: 2025-08-05 22:53:26 +0000 Commit: Simon J. Gerraty CommitDate: 2026-01-10 21:33:13 +0000 Merge bmake-20250804 Fixes bug in meta mode output capture. Merge commit '787302bde4d89279180303b753eb73b9bc6820b9' (cherry picked from commit b4894eca1ade4e9cec9afbe76021305d23bf914a) --- contrib/bmake/ChangeLog | 9 +++++++++ contrib/bmake/FILES | 2 ++ contrib/bmake/VERSION | 2 +- contrib/bmake/job.c | 6 +++--- contrib/bmake/meta.c | 8 ++++---- contrib/bmake/meta.h | 4 ++-- contrib/bmake/mk/ChangeLog | 17 +++++++++++++++++ contrib/bmake/mk/install-mk | 4 ++-- contrib/bmake/mk/meta2deps.py | 28 +++++++++++++++++++++++----- contrib/bmake/mk/meta2deps.sh | 14 ++++++++++++-- contrib/bmake/unit-tests/Makefile | 7 +++++-- contrib/bmake/unit-tests/meta-output.exp | 11 +++++++++++ contrib/bmake/unit-tests/meta-output.mk | 30 ++++++++++++++++++++++++++++++ usr.bin/bmake/Makefile.config | 2 +- usr.bin/bmake/unit-tests/Makefile | 7 +++++-- 15 files changed, 127 insertions(+), 24 deletions(-) diff --git a/contrib/bmake/ChangeLog b/contrib/bmake/ChangeLog index 5a1c30a95750..e8f1567733e4 100644 --- a/contrib/bmake/ChangeLog +++ b/contrib/bmake/ChangeLog @@ -1,3 +1,12 @@ +2025-08-04 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250804 + Merge with NetBSD make, pick up + o meta.c: allow printing only partial string to meta file + in jobs mode, otherwise we end up with duplicated output when + buffer does not end in newline. + Add a suitable unit test. + 2025-07-07 Simon J Gerraty * VERSION (_MAKE_VERSION): 20250707 diff --git a/contrib/bmake/FILES b/contrib/bmake/FILES index 1cec16b73ef4..28465b6a8c39 100644 --- a/contrib/bmake/FILES +++ b/contrib/bmake/FILES @@ -431,6 +431,8 @@ unit-tests/make-exported.exp unit-tests/make-exported.mk unit-tests/meta-cmd-cmp.exp unit-tests/meta-cmd-cmp.mk +unit-tests/meta-output.exp +unit-tests/meta-output.mk unit-tests/meta-ignore.inc unit-tests/moderrs.exp unit-tests/moderrs.mk diff --git a/contrib/bmake/VERSION b/contrib/bmake/VERSION index eef1ef4b8ba9..e301cfafab72 100644 --- a/contrib/bmake/VERSION +++ b/contrib/bmake/VERSION @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20250707 +_MAKE_VERSION=20250804 diff --git a/contrib/bmake/job.c b/contrib/bmake/job.c index 0c54e710afeb..e62d1ee84df5 100644 --- a/contrib/bmake/job.c +++ b/contrib/bmake/job.c @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.517 2025/07/06 07:11:31 rillig Exp $ */ +/* $NetBSD: job.c,v 1.519 2025/08/04 15:40:39 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -137,7 +137,7 @@ #include "trace.h" /* "@(#)job.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: job.c,v 1.517 2025/07/06 07:11:31 rillig Exp $"); +MAKE_RCSID("$NetBSD: job.c,v 1.519 2025/08/04 15:40:39 sjg Exp $"); #ifdef USE_SELECT @@ -1884,7 +1884,7 @@ again: SwitchOutputTo(job->node); #ifdef USE_META if (useMeta) - meta_job_output(job, p); + meta_job_output(job, p, (i < max) ? i : max); #endif (void)fwrite(p, 1, (size_t)(job->outBuf + i - p), stdout); (void)fflush(stdout); diff --git a/contrib/bmake/meta.c b/contrib/bmake/meta.c index 5d8d17f19700..f87f51c3b0a3 100644 --- a/contrib/bmake/meta.c +++ b/contrib/bmake/meta.c @@ -1,4 +1,4 @@ -/* $NetBSD: meta.c,v 1.215 2025/06/13 06:13:19 rillig Exp $ */ +/* $NetBSD: meta.c,v 1.219 2025/08/04 18:57:20 rillig Exp $ */ /* * Implement 'meta' mode. @@ -767,7 +767,7 @@ meta_job_error(Job *job, GNode *gn, bool ignerr, int status) } void -meta_job_output(Job *job, const char *cp) +meta_job_output(Job *job, const char *cp, size_t len) { BuildMon *pbm; @@ -790,7 +790,7 @@ meta_job_output(Job *job, const char *cp) cp++; } } - fprintf(pbm->mfp, "%s", cp); + fprintf(pbm->mfp, "%.*s", (int)len, cp); } } @@ -1703,7 +1703,7 @@ meta_compat_parent(pid_t child) fwrite(buf, 1, (size_t)nread, stdout); fflush(stdout); buf[nread] = '\0'; - meta_job_output(NULL, buf); + meta_job_output(NULL, buf, (size_t)nread); } while (false); if (metafd != -1 && FD_ISSET(metafd, &readfds) != 0) { if (meta_job_event(NULL) <= 0) diff --git a/contrib/bmake/meta.h b/contrib/bmake/meta.h index a7478cbc3e5d..4796cdeb3c01 100644 --- a/contrib/bmake/meta.h +++ b/contrib/bmake/meta.h @@ -1,4 +1,4 @@ -/* $NetBSD: meta.h,v 1.13 2025/06/13 06:13:19 rillig Exp $ */ +/* $NetBSD: meta.h,v 1.15 2025/08/04 03:47:26 sjg Exp $ */ /* * Things needed for 'meta' mode. @@ -49,7 +49,7 @@ void meta_job_parent(struct Job *, pid_t); int meta_job_fd(struct Job *) MAKE_ATTR_USE; int meta_job_event(struct Job *) MAKE_ATTR_USE; void meta_job_error(struct Job *, GNode *, bool, int); -void meta_job_output(struct Job *, const char *); +void meta_job_output(struct Job *, const char *, size_t); int meta_cmd_finish(void *); int meta_job_finish(struct Job *); bool meta_oodate(GNode *, bool) MAKE_ATTR_USE; diff --git a/contrib/bmake/mk/ChangeLog b/contrib/bmake/mk/ChangeLog index db524d2343b6..fda6d8b02158 100644 --- a/contrib/bmake/mk/ChangeLog +++ b/contrib/bmake/mk/ChangeLog @@ -1,3 +1,20 @@ +2025-07-24 Simon J Gerraty + + * install-mk (MK_VERSION): 20250724 + + * meta2deps: Allow X record to have 3 or 4 args. + V4 filemon on Linux produces 3 + V5 filemon on FreeBSD produces 4 + +2025-07-22 Simon J Gerraty + + * install-mk (MK_VERSION): 20250721 + + * meta2deps.{py,sh}: detect corrupted filemon output (an issue on + Linux) by checking each record type has the correct number of + words. Throw an error if necessary so that gendirdeps.mk will not + update Makefile.depend + 2025-07-04 Simon J Gerraty * prog.mk: .MADE is a special source not a target! diff --git a/contrib/bmake/mk/install-mk b/contrib/bmake/mk/install-mk old mode 100644 new mode 100755 index 8d354de17cb9..3ed5fd63ee5c --- a/contrib/bmake/mk/install-mk +++ b/contrib/bmake/mk/install-mk @@ -59,7 +59,7 @@ # Simon J. Gerraty # RCSid: -# $Id: install-mk,v 1.266 2025/05/29 01:48:06 sjg Exp $ +# $Id: install-mk,v 1.268 2025/07/24 15:55:48 sjg Exp $ # # @(#) Copyright (c) 1994-2025 Simon J. Gerraty # @@ -74,7 +74,7 @@ # sjg@crufty.net # -MK_VERSION=20250528 +MK_VERSION=20250724 OWNER= GROUP= MODE=444 diff --git a/contrib/bmake/mk/meta2deps.py b/contrib/bmake/mk/meta2deps.py index 70b121003988..77ed86397a0f 100755 --- a/contrib/bmake/mk/meta2deps.py +++ b/contrib/bmake/mk/meta2deps.py @@ -39,7 +39,7 @@ We only pay attention to a subset of the information in the SPDX-License-Identifier: BSD-2-Clause RCSid: - $Id: meta2deps.py,v 1.51 2025/05/16 20:03:43 sjg Exp $ + $Id: meta2deps.py,v 1.54 2025/07/24 16:05:48 sjg Exp $ Copyright (c) 2011-2025, Simon J. Gerraty Copyright (c) 2011-2017, Juniper Networks, Inc. @@ -441,7 +441,7 @@ class MetaFile: # Bye bye We go to some effort to avoid processing a dependency more than once. - Of the above record types only C,E,F,L,R,V and W are of interest. + Of the above record types only C,E,F,L,M,R,V,W and X are of interest. """ version = 0 # unknown @@ -465,8 +465,8 @@ class MetaFile: if self.sb and self.name.startswith(self.sb): error_name = self.name.replace(self.sb+'/','') else: - error_name = self.name - interesting = '#CEFLRVX' + error_name = self.name + interesting = '#CEFLMRVX' for line in f: self.line += 1 # ignore anything we don't care about @@ -475,6 +475,7 @@ class MetaFile: if self.debug > 2: print("input:", line, end=' ', file=self.debug_out) w = line.split() + wlen = len(w) if skip: if w[0] == 'V': @@ -498,6 +499,23 @@ class MetaFile: if line.find('Bye') > 0: eof_token = True continue + else: + # before we go further check we have a sane number of args + # the Linux filemon module is rather unreliable. + if w[0] in 'LM': + elen = 4 + elif w[0] == 'X': + # at least V4 on Linux does 3 args + if wlen == 3: + elen = 3 + else: + elen = 4 + else: + elen = 3 + if self.debug > 2: + print('op={} elen={} wlen={} line="{}"'.format(w[0], elen, wlen, line.strip()), file=self.debug_out) + if wlen != elen: + raise AssertionError('corrupted filemon data: wrong number of words: expected {} got {} in: {}'.format(elen, wlen, line)) pid = int(w[1]) if pid != last_pid: @@ -540,7 +558,7 @@ class MetaFile: print("seen:", w[2], file=self.debug_out) continue # file operations - if w[0] in 'ML': + if w[0] in 'LM': # these are special, tread src as read and # target as write self.parse_path(w[3].strip("'"), cwd, 'W', w) diff --git a/contrib/bmake/mk/meta2deps.sh b/contrib/bmake/mk/meta2deps.sh index e46e5a2e55c1..21c0d0134be5 100755 --- a/contrib/bmake/mk/meta2deps.sh +++ b/contrib/bmake/mk/meta2deps.sh @@ -75,7 +75,7 @@ # RCSid: -# $Id: meta2deps.sh,v 1.22 2025/05/16 20:03:43 sjg Exp $ +# $Id: meta2deps.sh,v 1.24 2025/07/24 15:55:48 sjg Exp $ # SPDX-License-Identifier: BSD-2-Clause # @@ -249,11 +249,21 @@ meta2deps() { ;; *) cat /dev/null "$@";; esac 2> /dev/null | - sed -e 's,^CWD,C C,;/^[#CREFLMVX] /!d' -e "s,',,g" | + sed -e 's,^CWD,C C,;/^[#CREFLMVWX] /!d' -e "s,',,g" | $_excludes | ( version=no epids= xpids= eof_token=no while read op pid path path2 do : op=$op pid=$pid path=$path path2=$path2 + # first a sanity check - filemon on Linux is not very reliable + # path2 should only be non-empty for op L or M + # and it should not contain spaces. + case "$op,$path2" in + \#*) ;; # ok + [LM],) error "missing path2 in: '$op $pid $path'";; + [LMX],*" "*) error "wrong number of words in: '$op $pid $path $path2'";; + *,|[LMX],*) ;; # ok + *) error "wrong number of words in: '$op $pid $path $path2'";; + esac # we track cwd and ldir (of interest) per pid # CWD is bmake's cwd case "$lpid,$pid" in diff --git a/contrib/bmake/unit-tests/Makefile b/contrib/bmake/unit-tests/Makefile index 4e639056815a..f6c298679a62 100644 --- a/contrib/bmake/unit-tests/Makefile +++ b/contrib/bmake/unit-tests/Makefile @@ -1,6 +1,6 @@ -# $Id: Makefile,v 1.240 2025/06/30 18:40:54 sjg Exp $ +# $Id: Makefile,v 1.245 2025/08/05 16:18:07 sjg Exp $ # -# $NetBSD: Makefile,v 1.369 2025/06/29 09:40:13 rillig Exp $ +# $NetBSD: Makefile,v 1.372 2025/08/04 22:44:49 sjg Exp $ # # Unit tests for make(1) # @@ -234,6 +234,7 @@ TESTS+= jobs-error-nested-make TESTS+= lint TESTS+= make-exported TESTS+= meta-cmd-cmp +TESTS+= meta-output TESTS+= moderrs TESTS+= modmisc .if ${.MAKE.UID} > 0 @@ -592,6 +593,7 @@ SED_CMDS.directive-include-guard= \ -e '/^ParseDependency/d' \ -e '/^ParseEOF:/d' SED_CMDS.export= -e '/^[^=_A-Za-z0-9]*=/d' +SED_CMDS.export+= -e '/^DIFF/d' .if ${.MAKE.OS:NCygwin} == "" SED_CMDS.export+= -e '/^WINDIR=/d' -e '/^SYSTEMROOT=/d' .endif @@ -802,6 +804,7 @@ EGREP= grep -E EGREP?= egrep MAKE_TEST_ENV= EGREP="${EGREP}" +MAKE_TEST_ENV+= DIFF="${TOOL_DIFF}" DIFF_FLAGS="${DIFF_FLAGS}" MAKE_TEST_ENV+= MALLOC_OPTIONS="JA" # for jemalloc 100 MAKE_TEST_ENV+= MALLOC_CONF="junk:true" # for jemalloc 510 MAKE_TEST_ENV+= TMPDIR=${TMPDIR} diff --git a/contrib/bmake/unit-tests/meta-output.exp b/contrib/bmake/unit-tests/meta-output.exp new file mode 100644 index 000000000000..37ef54b4e49e --- /dev/null +++ b/contrib/bmake/unit-tests/meta-output.exp @@ -0,0 +1,11 @@ +Test -B output +test1: Done +test2: Done +test3: Done + +Test -j1 output +test1: Done +test2: Done +test3: Done + +exit status 0 diff --git a/contrib/bmake/unit-tests/meta-output.mk b/contrib/bmake/unit-tests/meta-output.mk new file mode 100644 index 000000000000..104091df5d00 --- /dev/null +++ b/contrib/bmake/unit-tests/meta-output.mk @@ -0,0 +1,30 @@ +# + +.MAIN: all + +.if make(output) +.MAKE.MODE= meta curDirOk=true nofilemon +.else +.MAKE.MODE= compat +.endif + +all: output.-B output.-j1 + +_mf := ${.PARSEDIR}/${.PARSEFILE} + +# This output should be accurately reflected in the .meta file. +# We append an extra newline to ${.TARGET} (after it has been +# written to stdout) to match what meta_cmd_finish() will do. +output: .NOPATH + @{ echo Test ${tag} output; \ + for i in 1 2 3; do \ + printf "test$$i: "; sleep 0; echo " Done"; \ + done; echo; } | tee ${.TARGET}; echo >> ${.TARGET} + +# The diff at the end should produce nothing. +output.-B output.-j1: + @{ rm -f ${TMPDIR}/output; mkdir -p ${TMPDIR}/obj; \ + MAKEFLAGS= ${.MAKE} -r -C ${TMPDIR} ${.TARGET:E} tag=${.TARGET:E} -f ${_mf} output; \ + sed '1,/command output/d' ${TMPDIR}/obj/output.meta > ${TMPDIR}/obj/output-meta; \ + ${DIFF:Udiff} ${TMPDIR}/obj/output ${TMPDIR}/obj/output-meta; } + diff --git a/usr.bin/bmake/Makefile.config b/usr.bin/bmake/Makefile.config index 8ff6c81b8c78..2415f9d3882c 100644 --- a/usr.bin/bmake/Makefile.config +++ b/usr.bin/bmake/Makefile.config @@ -6,7 +6,7 @@ SRCTOP?= ${.CURDIR:H:H} # things set by configure -_MAKE_VERSION?=20250707 +_MAKE_VERSION?=20250804 prefix?= /usr srcdir= ${SRCTOP}/contrib/bmake diff --git a/usr.bin/bmake/unit-tests/Makefile b/usr.bin/bmake/unit-tests/Makefile index d4ee6f33f862..66bdc04321e8 100644 --- a/usr.bin/bmake/unit-tests/Makefile +++ b/usr.bin/bmake/unit-tests/Makefile @@ -1,9 +1,9 @@ # This is a generated file, do NOT edit! # See contrib/bmake/bsd.after-import.mk # -# $Id: Makefile,v 1.240 2025/06/30 18:40:54 sjg Exp $ +# $Id: Makefile,v 1.245 2025/08/05 16:18:07 sjg Exp $ # -# $NetBSD: Makefile,v 1.369 2025/06/29 09:40:13 rillig Exp $ +# $NetBSD: Makefile,v 1.372 2025/08/04 22:44:49 sjg Exp $ # # Unit tests for make(1) # @@ -237,6 +237,7 @@ TESTS+= jobs-error-nested-make TESTS+= lint TESTS+= make-exported TESTS+= meta-cmd-cmp +TESTS+= meta-output TESTS+= moderrs TESTS+= modmisc .if ${.MAKE.UID} > 0 @@ -595,6 +596,7 @@ SED_CMDS.directive-include-guard= \ -e '/^ParseDependency/d' \ -e '/^ParseEOF:/d' SED_CMDS.export= -e '/^[^=_A-Za-z0-9]*=/d' +SED_CMDS.export+= -e '/^DIFF/d' .if ${.MAKE.OS:NCygwin} == "" SED_CMDS.export+= -e '/^WINDIR=/d' -e '/^SYSTEMROOT=/d' .endif @@ -805,6 +807,7 @@ EGREP= grep -E EGREP?= egrep MAKE_TEST_ENV= EGREP="${EGREP}" +MAKE_TEST_ENV+= DIFF="${TOOL_DIFF}" DIFF_FLAGS="${DIFF_FLAGS}" MAKE_TEST_ENV+= MALLOC_OPTIONS="JA" # for jemalloc 100 MAKE_TEST_ENV+= MALLOC_CONF="junk:true" # for jemalloc 510 MAKE_TEST_ENV+= TMPDIR=${TMPDIR} From nobody Sat Jan 10 21:34:10 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2q1XX8z6MxVm for ; Sat, 10 Jan 2026 21:34:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpX2p3R93z3Qhd for ; Sat, 10 Jan 2026 21:34:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rGJM+Am14mmWHtIasZoxfZv3p0eycMlYpH9rYdluF5Y=; b=fupAux/P2Ktexo/l1Q34LknPeMIT+/89sNdoNNkuqjDb9VwSTiBTgXOUx6FqEgsuRqaSnP PjjdZsg4tWlnVo4G/CIXAjTwe92MHVcn3+meVIpoQeD517qyTi5ZrpLLYP5CUbzkvK/O69 9SCcEMu+K+QrD9I2HDWccUzpQwlgBgZDQANsenYsnzdNlF3Y22BOVErJJZT/+kS6oDCkuo kSOWDMXCWBg7o8KVo9ojSvEfnVE/pK0CY1OwWY+X7DgxAE3RvqUGcgR09NjNSgyTJpF/H6 LCvzVZKmIpBO5ylzbzX1uDS/GVWFMQLtNlVBdvx72jjr10Tne9wlWcNAFvQTWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rGJM+Am14mmWHtIasZoxfZv3p0eycMlYpH9rYdluF5Y=; b=ARWOsQQ6O7qmOm7qqriMihSMZuOv7/yU1rnUHaEiyh52IUCxkfduKskpbnHOGwluZrrM1U Se8NrTBwwZpjJLdWkuuE6+ipGme/UsX8+BgLtxO9cRCaIRep5p42UwF3sdYpgS54bAUOY7 2BVCXohes9kihRK5BorYgYzi+kmr651YDG7AnYJtUt1fuKedU67KBzBjBn2fVa3sLC3KUQ tjWbjnw//MkbBSUttCFSjjHkNwvh6+CY44nlWd+fu6/GKPgbIlhfSdHJwUCccxHlbsQV1W Dv7dfhH0RCp+EYIjJcggUxVpKiTmn4Lmj3dHwsSinVCZEgdIHGdqvPH6Vt61vg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768080850; a=rsa-sha256; cv=none; b=SwoJ/tgl2n3UYnIRObKxcTWTMm5bsaByv0ur2zgkABTscFB+bOL+YBUujJXar3vZH5dOqS tDbLl8Orkx6/oDKqBlEYtPxhwpNb00asb5sL4660KlrRtRhqz+rVjQz2tG2QacBSIGBFJN BYGhBuXLINnsfxp+BQKF7nDm6JJe6I9WxUGWK9mZf71vXYLhTd49eOVkQyfqsgE0DudMlE QLXLuro2kgborMNRppf+GlZLgzX5jHasoFkoUQBq19oLiVjSmdM6H3QgNeUJFoDV7PMzIW e1lXwksvkh1a/uR4fW+Hekoy0S8bk9bu/CixbJXjpFj6Fh/Z9RRk41oTgjcRow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2p30n1z1B4x for ; Sat, 10 Jan 2026 21:34:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25e96 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 21:34:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Simon J. Gerraty Subject: git: 44ad87f77a84 - stable/14 - Merge bmake-20250707 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 44ad87f77a847b1fcdc9bc0ee8d5532cc889b800 Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 21:34:10 +0000 Message-Id: <6962c5d2.25e96.9841197@gitrepo.freebsd.org> The branch stable/14 has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=44ad87f77a847b1fcdc9bc0ee8d5532cc889b800 commit 44ad87f77a847b1fcdc9bc0ee8d5532cc889b800 Author: Simon J. Gerraty AuthorDate: 2025-07-19 17:37:32 +0000 Commit: Simon J. Gerraty CommitDate: 2026-01-10 21:33:13 +0000 Merge bmake-20250707 Merge commit '3d772e596c1acf76f555c1f51fd8d834e56b0c35' (cherry picked from commit a8c56be47166295d37600ff81fc1857db87b3a9b) --- contrib/bmake/ChangeLog | 27 +++ contrib/bmake/FILES | 8 +- contrib/bmake/VERSION | 2 +- contrib/bmake/arch.c | 6 +- contrib/bmake/bmake.1 | 79 +++++++- contrib/bmake/bmake.cat1 | 45 ++++- contrib/bmake/compat.c | 11 +- contrib/bmake/cond.c | 89 +++++---- contrib/bmake/for.c | 12 +- contrib/bmake/job.c | 42 ++-- contrib/bmake/job.h | 4 +- contrib/bmake/main.c | 54 ++--- contrib/bmake/make.1 | 79 +++++++- contrib/bmake/make.c | 6 +- contrib/bmake/make.h | 5 +- contrib/bmake/make_malloc.c | 7 +- contrib/bmake/mk/ChangeLog | 4 + contrib/bmake/mk/prog.mk | 8 +- contrib/bmake/parse.c | 19 +- contrib/bmake/str.c | 9 +- contrib/bmake/unit-tests/Makefile | 7 +- .../bmake/unit-tests/char-005c-reverse-solidus.exp | 13 ++ .../bmake/unit-tests/char-005c-reverse-solidus.mk | 131 ++++++++++++ contrib/bmake/unit-tests/check-expect.lua | 219 ++++++++++----------- contrib/bmake/unit-tests/cmd-errors-jobs.exp | 4 +- contrib/bmake/unit-tests/cmd-errors-jobs.mk | 6 +- contrib/bmake/unit-tests/cmd-errors-lint.exp | 2 +- contrib/bmake/unit-tests/cmd-errors-lint.mk | 4 +- contrib/bmake/unit-tests/cmd-errors.exp | 2 +- contrib/bmake/unit-tests/cmd-errors.mk | 4 +- contrib/bmake/unit-tests/cmdline-undefined.exp | 20 +- contrib/bmake/unit-tests/cmdline-undefined.mk | 26 +-- contrib/bmake/unit-tests/cond-cmp-numeric-eq.exp | 4 +- contrib/bmake/unit-tests/cond-cmp-numeric-eq.mk | 6 +- contrib/bmake/unit-tests/cond-cmp-numeric.exp | 8 +- contrib/bmake/unit-tests/cond-cmp-numeric.mk | 10 +- contrib/bmake/unit-tests/cond-cmp-string.exp | 16 +- contrib/bmake/unit-tests/cond-cmp-string.mk | 18 +- contrib/bmake/unit-tests/cond-eof.exp | 6 +- contrib/bmake/unit-tests/cond-eof.mk | 8 +- contrib/bmake/unit-tests/cond-func-defined.exp | 4 +- contrib/bmake/unit-tests/cond-func-defined.mk | 6 +- contrib/bmake/unit-tests/cond-func-make.exp | 2 +- contrib/bmake/unit-tests/cond-func-make.mk | 4 +- contrib/bmake/unit-tests/cond-func.exp | 12 +- contrib/bmake/unit-tests/cond-func.mk | 14 +- contrib/bmake/unit-tests/cond-late.exp | 2 +- contrib/bmake/unit-tests/cond-late.mk | 16 +- contrib/bmake/unit-tests/cond-op-and-lint.exp | 2 +- contrib/bmake/unit-tests/cond-op-and-lint.mk | 4 +- contrib/bmake/unit-tests/cond-op-and.exp | 10 +- contrib/bmake/unit-tests/cond-op-and.mk | 12 +- contrib/bmake/unit-tests/cond-op-not.exp | 2 +- contrib/bmake/unit-tests/cond-op-not.mk | 4 +- contrib/bmake/unit-tests/cond-op-or-lint.exp | 2 +- contrib/bmake/unit-tests/cond-op-or-lint.mk | 4 +- contrib/bmake/unit-tests/cond-op-or.exp | 10 +- contrib/bmake/unit-tests/cond-op-or.mk | 12 +- contrib/bmake/unit-tests/cond-op-parentheses.exp | 8 +- contrib/bmake/unit-tests/cond-op-parentheses.mk | 10 +- contrib/bmake/unit-tests/cond-op.exp | 14 +- contrib/bmake/unit-tests/cond-op.mk | 16 +- contrib/bmake/unit-tests/cond-short.exp | 2 +- contrib/bmake/unit-tests/cond-short.mk | 4 +- contrib/bmake/unit-tests/cond-token-number.exp | 8 +- contrib/bmake/unit-tests/cond-token-number.mk | 10 +- contrib/bmake/unit-tests/cond-token-plain.exp | 24 ++- contrib/bmake/unit-tests/cond-token-plain.mk | 50 +++-- contrib/bmake/unit-tests/cond-token-string.exp | 2 +- contrib/bmake/unit-tests/cond-token-string.mk | 4 +- contrib/bmake/unit-tests/cond-token-var.exp | 6 +- contrib/bmake/unit-tests/cond-token-var.mk | 8 +- contrib/bmake/unit-tests/dep-op-missing.exp | 2 +- contrib/bmake/unit-tests/deptgt-begin.exp | 2 +- contrib/bmake/unit-tests/deptgt-begin.mk | 6 +- contrib/bmake/unit-tests/deptgt-path-suffix.exp | 2 +- contrib/bmake/unit-tests/deptgt-path-suffix.mk | 4 +- contrib/bmake/unit-tests/deptgt.exp | 6 +- contrib/bmake/unit-tests/deptgt.mk | 8 +- contrib/bmake/unit-tests/directive-dinclude.exp | 2 +- contrib/bmake/unit-tests/directive-dinclude.mk | 4 +- .../bmake/unit-tests/directive-export-gmake.exp | 2 +- contrib/bmake/unit-tests/directive-export-gmake.mk | 4 +- contrib/bmake/unit-tests/directive-for-errors.exp | 6 +- contrib/bmake/unit-tests/directive-for-errors.mk | 8 +- contrib/bmake/unit-tests/directive-for-escape.exp | 10 +- contrib/bmake/unit-tests/directive-for-escape.mk | 12 +- contrib/bmake/unit-tests/directive-for-lines.exp | 12 +- contrib/bmake/unit-tests/directive-for-lines.mk | 20 +- contrib/bmake/unit-tests/directive-for.exp | 22 +-- contrib/bmake/unit-tests/directive-for.mk | 23 ++- .../bmake/unit-tests/directive-hyphen-include.exp | 2 +- .../bmake/unit-tests/directive-hyphen-include.mk | 4 +- contrib/bmake/unit-tests/directive-if.exp | 2 +- contrib/bmake/unit-tests/directive-if.mk | 4 +- contrib/bmake/unit-tests/directive-include.exp | 2 +- contrib/bmake/unit-tests/directive-include.mk | 4 +- .../bmake/unit-tests/directive-misspellings.exp | 8 +- contrib/bmake/unit-tests/directive-misspellings.mk | 10 +- contrib/bmake/unit-tests/directive-sinclude.exp | 2 +- contrib/bmake/unit-tests/directive-sinclude.mk | 4 +- contrib/bmake/unit-tests/directive-unexport.exp | 2 +- contrib/bmake/unit-tests/directive-unexport.mk | 3 +- contrib/bmake/unit-tests/directive-warning.exp | 6 +- contrib/bmake/unit-tests/directive-warning.mk | 5 +- contrib/bmake/unit-tests/directive.exp | 4 +- contrib/bmake/unit-tests/directive.mk | 6 +- contrib/bmake/unit-tests/moderrs.exp | 14 +- contrib/bmake/unit-tests/moderrs.mk | 16 +- contrib/bmake/unit-tests/opt-debug-file.exp | 6 +- contrib/bmake/unit-tests/opt-debug-file.mk | 14 +- contrib/bmake/unit-tests/opt-debug-lint.exp | 4 +- contrib/bmake/unit-tests/opt-debug-lint.mk | 6 +- contrib/bmake/unit-tests/opt-jobs-internal.exp | 18 +- contrib/bmake/unit-tests/parse.exp | 6 +- contrib/bmake/unit-tests/parse.mk | 8 +- contrib/bmake/unit-tests/var-op-assign.exp | 2 +- contrib/bmake/unit-tests/var-op-assign.mk | 4 +- contrib/bmake/unit-tests/var-op-expand.exp | 14 +- contrib/bmake/unit-tests/var-op-expand.mk | 8 +- contrib/bmake/unit-tests/varmisc.exp | 2 +- contrib/bmake/unit-tests/varmisc.mk | 4 +- contrib/bmake/unit-tests/varmod-edge.exp | 4 +- contrib/bmake/unit-tests/varmod-edge.mk | 6 +- contrib/bmake/unit-tests/varmod-ifelse.exp | 43 ++-- contrib/bmake/unit-tests/varmod-ifelse.mk | 11 +- contrib/bmake/unit-tests/varmod-match-escape.exp | 14 +- contrib/bmake/unit-tests/varmod-match-escape.mk | 10 +- contrib/bmake/unit-tests/varmod-match.exp | 20 +- contrib/bmake/unit-tests/varmod-match.mk | 28 +-- contrib/bmake/unit-tests/varmod-mtime.exp | 6 +- contrib/bmake/unit-tests/varmod-mtime.mk | 8 +- contrib/bmake/unit-tests/varmod-order.exp | 6 +- contrib/bmake/unit-tests/varmod-order.mk | 8 +- contrib/bmake/unit-tests/varmod-range.exp | 2 +- contrib/bmake/unit-tests/varmod-range.mk | 4 +- contrib/bmake/unit-tests/varmod.exp | 49 +++-- contrib/bmake/unit-tests/varmod.mk | 49 +++-- contrib/bmake/unit-tests/varname-circumflex.exp | 9 + contrib/bmake/unit-tests/varname-circumflex.mk | 47 +++++ contrib/bmake/unit-tests/varname-vpath.exp | 8 +- contrib/bmake/unit-tests/varname.exp | 4 +- contrib/bmake/unit-tests/varname.mk | 6 +- contrib/bmake/unit-tests/varparse-errors.exp | 28 +-- contrib/bmake/unit-tests/varparse-errors.mk | 30 +-- contrib/bmake/var.c | 38 ++-- usr.bin/bmake/Makefile.config | 2 +- usr.bin/bmake/unit-tests/Makefile | 7 +- 148 files changed, 1300 insertions(+), 814 deletions(-) diff --git a/contrib/bmake/ChangeLog b/contrib/bmake/ChangeLog index 0a5eced2d439..5a1c30a95750 100644 --- a/contrib/bmake/ChangeLog +++ b/contrib/bmake/ChangeLog @@ -1,3 +1,30 @@ +2025-07-07 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250707 + Merge with NetBSD make, pick up + o cond.c: improve debug log message for 'exists' function. + complain about unfinished escape sequences or string literals. + +2025-07-04 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250704 + Merge with NetBSD make, pick up + o make.1: add a DIAGNOSTICS section for make to reference. + o main.c: simplify the warning for invalid -J by refering to + manual page. + +2025-06-30 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250630 + Merge with NetBSD make, pick up + o consistently use double quotes in error messages + o cond.c: if a condition is erroneous, skip the whole .if/.endif + o make_malloc.c: in cleanup mode, initialize freshly allocated memory + o str.c: error out on an ":M" modifier whose pattern ends with + backslash + o var.c: fix parsing of modifier parts for :gmtime and :localtime + add POSIX $^ support + 2025-06-18 Simon J Gerraty * VERSION (_MAKE_VERSION): 20250618 diff --git a/contrib/bmake/FILES b/contrib/bmake/FILES index 8bed07d546a3..1cec16b73ef4 100644 --- a/contrib/bmake/FILES +++ b/contrib/bmake/FILES @@ -76,6 +76,8 @@ unit-tests/archive-suffix.exp unit-tests/archive-suffix.mk unit-tests/archive.exp unit-tests/archive.mk +unit-tests/char-005c-reverse-solidus.exp +unit-tests/char-005c-reverse-solidus.mk unit-tests/check-expect.lua unit-tests/cmd-errors-jobs.exp unit-tests/cmd-errors-jobs.mk @@ -602,8 +604,6 @@ unit-tests/shell-ksh.exp unit-tests/shell-ksh.mk unit-tests/shell-sh.exp unit-tests/shell-sh.mk -unit-tests/suff.exp -unit-tests/suff.mk unit-tests/suff-add-later.exp unit-tests/suff-add-later.mk unit-tests/suff-clear-regular.exp @@ -634,6 +634,8 @@ unit-tests/suff-transform-select.exp unit-tests/suff-transform-select.mk unit-tests/suff-use.exp unit-tests/suff-use.mk +unit-tests/suff.exp +unit-tests/suff.mk unit-tests/sunshcmd.exp unit-tests/sunshcmd.mk unit-tests/ternary.exp @@ -780,6 +782,8 @@ unit-tests/varmod-unique.exp unit-tests/varmod-unique.mk unit-tests/varmod.exp unit-tests/varmod.mk +unit-tests/varname-circumflex.exp +unit-tests/varname-circumflex.mk unit-tests/varname-dollar.exp unit-tests/varname-dollar.mk unit-tests/varname-dot-alltargets.exp diff --git a/contrib/bmake/VERSION b/contrib/bmake/VERSION index 1467403891f1..eef1ef4b8ba9 100644 --- a/contrib/bmake/VERSION +++ b/contrib/bmake/VERSION @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20250618 +_MAKE_VERSION=20250707 diff --git a/contrib/bmake/arch.c b/contrib/bmake/arch.c index 77ac7f3c5707..87e2b128ae00 100644 --- a/contrib/bmake/arch.c +++ b/contrib/bmake/arch.c @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.222 2024/08/06 17:46:01 rillig Exp $ */ +/* $NetBSD: arch.c,v 1.223 2025/06/28 22:39:27 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -147,7 +147,7 @@ struct ar_hdr { #include "dir.h" /* "@(#)arch.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: arch.c,v 1.222 2024/08/06 17:46:01 rillig Exp $"); +MAKE_RCSID("$NetBSD: arch.c,v 1.223 2025/06/28 22:39:27 rillig Exp $"); typedef struct List ArchList; typedef struct ListNode ArchListNode; @@ -314,7 +314,7 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *scope) if (*cp == '\0') { Parse_Error(PARSE_FATAL, - "Missing ')' in archive specification"); + "Missing \")\" in archive specification"); return false; } diff --git a/contrib/bmake/bmake.1 b/contrib/bmake/bmake.1 index 92ed9e201ea5..01f173bc1a69 100644 --- a/contrib/bmake/bmake.1 +++ b/contrib/bmake/bmake.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.385 2025/06/13 03:51:18 rillig Exp $ +.\" $NetBSD: make.1,v 1.387 2025/07/02 17:11:56 rillig Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd June 12, 2025 +.Dd July 2, 2025 .Dt BMAKE 1 .Os .Sh NAME @@ -785,11 +785,13 @@ Is redundant with respect to global variables, which have already been expanded. .El .Pp -The seven built-in local variables are: +The built-in local variables are: .Bl -tag -width ".Va .ARCHIVE" -offset indent .It Va .ALLSRC The list of all sources for this target; also known as -.Sq Va \&> . +.Sq Va \&> +or +.Sq Va \&^ . .It Va .ARCHIVE The name of the archive file; also known as .Sq Va \&! . @@ -823,6 +825,7 @@ in archive member rules. The shorter forms .Po .Sq Va \&> , +.Sq Va \&^ , .Sq Va \&! , .Sq Va \&< , .Sq Va \&% , @@ -2714,6 +2717,8 @@ If the environment variable is set to .Dq yes , any stack traces include the call chain of the parent processes. +.\" .Sh EXIT STATUS +.\" .Sh ENVIRONMENT .Sh FILES .Bl -tag -width /usr/share/mk -compact .It .depend @@ -2727,6 +2732,68 @@ system makefile .It /usr/share/mk system makefile directory .El +.\" .Sh EXAMPLES +.Sh DIAGNOSTICS +.Bl -tag +.It Dv Invalid internal option \(dq-J\(dq in \(dq Ns Ar directory Ns Dv \(dq +The internal +.Fl J +option coordinates the main +.Nm +process with the sub-make processes to limit +the number of jobs that run in parallel. +The option is passed to all child processes via the +.Ev MAKEFLAGS +environment variable. +To become valid, +this option requires that the target running the sub-make is marked with the +.Dv .MAKE +special source, +or that one of the target's commands directly contains the word +.Dq make +or one of the expressions +.Dq ${MAKE} , +.Dq ${.MAKE} , +.Dq $(MAKE) , +.Dq $(.MAKE) . +If that's not the case, +make issues the above warning and falls back to compat mode. +.Pp +To see the chain of sub-makes that leads to the invalid option, set the +.Ev MAKE_STACK_TRACE +environment variable to +.Dq yes . +.Pp +To run the sub-make in parallel mode, even in dry-run mode (see the +.Fl n +option), add the +.Dv .MAKE +pseudo source to the target. +This is appropriate when the sub-make runs the same target in a subdirectory. +.Pp +To run the sub-make in parallel mode but not in dry-mode, +add a +.Dq ${:D make} +marker to one of the target's commands. +This marker expands to an empty string +and thus does not affect the executed commands. +.\" The marker can even be added before any of the "@+-" modifiers, +.\" so no need to mention this explicitly. +.Pp +To run the sub-make in compat mode, add the +.Fl B +option to its invocation. +This is appropriate when the sub-make is only used to print a variable's +value using the +.Fl v +or +.Fl V +options. +.Pp +To make the sub-make independent from the parent make, unset the +.Ev MAKEFLAGS +environment variable in the target's commands. +.El .Sh COMPATIBILITY The basic make syntax is compatible between different make variants; however the special variables, variable modifiers and conditionals are not. @@ -2813,6 +2880,7 @@ not trying to chain transformations together, etc.) is also reasonably portable. .Sh SEE ALSO .Xr mkdep 1 +.\" .Sh STANDARDS .Sh HISTORY .Nm is derived from NetBSD @@ -2837,6 +2905,8 @@ has been used to FoRCe rebuilding (since the target/dependency does not exist ... unless someone creates an .Pa FRC file). +.\" .Sh AUTHORS +.\" .Sh CAVEATS .Sh BUGS The .Nm @@ -2858,3 +2928,4 @@ using that token pool to abort the build and exit with error code 6. Sometimes the attempt to suppress a cascade of unnecessary errors, can result in a seemingly unexplained .Ql *** Error code 6 +.\" .Sh SECURITY CONSIDERATIONS diff --git a/contrib/bmake/bmake.cat1 b/contrib/bmake/bmake.cat1 index 667c80898def..950437a8db9c 100644 --- a/contrib/bmake/bmake.cat1 +++ b/contrib/bmake/bmake.cat1 @@ -507,10 +507,10 @@ VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS ::== Is redundant with respect to global variables, which have already been expanded. - The seven built-in local variables are: + The built-in local variables are: _._A_L_L_S_R_C The list of all sources for this target; also known as - `_>'. + `_>' or `_^'. _._A_R_C_H_I_V_E The name of the archive file; also known as `_!'. @@ -531,9 +531,9 @@ VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS compatibility with other makes this is an alias for _._A_R_C_H_I_V_E in archive member rules. - The shorter forms (`_>', `_!', `_<', `_%', `_?', `_*', and `_@') are permitted - for backward compatibility with historical makefiles and legacy POSIX - make and are not recommended. + The shorter forms (`_>', `_^', `_!', `_<', `_%', `_?', `_*', and `_@') are + permitted for backward compatibility with historical makefiles and legacy + POSIX make and are not recommended. Variants of these variables with the punctuation followed immediately by `D' or `F', e.g. `$(@D)', are legacy forms equivalent to using the `:H' @@ -1748,6 +1748,39 @@ FFIILLEESS sys.mk system makefile /usr/share/mk system makefile directory +DDIIAAGGNNOOSSTTIICCSS + Invalid internal option "-J" in "_d_i_r_e_c_t_o_r_y" + The internal --JJ option coordinates the main bbmmaakkee process with + the sub-make processes to limit the number of jobs that run in + parallel. The option is passed to all child processes via the + MAKEFLAGS environment variable. To become valid, this option + requires that the target running the sub-make is marked with the + .MAKE special source, or that one of the target's commands + directly contains the word "make" or one of the expressions + "${MAKE}", "${.MAKE}", "$(MAKE)", "$(.MAKE)". If that's not the + case, make issues the above warning and falls back to compat + mode. + + To see the chain of sub-makes that leads to the invalid option, + set the MAKE_STACK_TRACE environment variable to "yes". + + To run the sub-make in parallel mode, even in dry-run mode (see + the --nn option), add the .MAKE pseudo source to the target. This + is appropriate when the sub-make runs the same target in a + subdirectory. + + To run the sub-make in parallel mode but not in dry-mode, add a + "${:D make}" marker to one of the target's commands. This marker + expands to an empty string and thus does not affect the executed + commands. + + To run the sub-make in compat mode, add the --BB option to its + invocation. This is appropriate when the sub-make is only used + to print a variable's value using the --vv or --VV options. + + To make the sub-make independent from the parent make, unset the + MAKEFLAGS environment variable in the target's commands. + CCOOMMPPAATTIIBBIILLIITTYY The basic make syntax is compatible between different make variants; however the special variables, variable modifiers and conditionals are @@ -1831,4 +1864,4 @@ BBUUGGSS attempt to suppress a cascade of unnecessary errors, can result in a seemingly unexplained `*** Error code 6' -FreeBSD 14.2-RELEASE-p1 June 12, 2025 FreeBSD 14.2-RELEASE-p1 +FreeBSD 14.2-RELEASE-p1 July 2, 2025 FreeBSD 14.2-RELEASE-p1 diff --git a/contrib/bmake/compat.c b/contrib/bmake/compat.c index 7a51a99be4ba..f32213bf67e5 100644 --- a/contrib/bmake/compat.c +++ b/contrib/bmake/compat.c @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.267 2025/06/13 03:51:18 rillig Exp $ */ +/* $NetBSD: compat.c,v 1.268 2025/07/06 07:11:31 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -97,7 +97,7 @@ #include "pathnames.h" /* "@(#)compat.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: compat.c,v 1.267 2025/06/13 03:51:18 rillig Exp $"); +MAKE_RCSID("$NetBSD: compat.c,v 1.268 2025/07/06 07:11:31 rillig Exp $"); static GNode *curTarg; static pid_t compatChild; @@ -334,11 +334,8 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln) if (useShell) { static const char *shargv[5]; - if (Cmd_Argv(cmd, cmd_len, shargv, 5, - cmd_file, sizeof(cmd_file), - errCheck && shellErrFlag != NULL, - DEBUG(SHELL)) < 0) - Fatal("cannot run \"%s\"", cmd); + Cmd_Argv(cmd, cmd_len, shargv, cmd_file, sizeof(cmd_file), + errCheck && shellErrFlag != NULL, DEBUG(SHELL)); av = shargv; bp = NULL; mav = NULL; diff --git a/contrib/bmake/cond.c b/contrib/bmake/cond.c index f83163cbb50e..b3613bbadf5d 100644 --- a/contrib/bmake/cond.c +++ b/contrib/bmake/cond.c @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.373 2025/04/22 19:28:50 rillig Exp $ */ +/* $NetBSD: cond.c,v 1.378 2025/07/06 07:56:16 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -77,9 +77,8 @@ * '.if ', '.elifnmake ', '.else', '.endif'. * * Cond_EvalCondition - * Evaluate the conditional, which is either the argument - * of one of the .if directives or the condition in a - * ':?then:else' variable modifier. + * Evaluate a condition, either from one of the .if + * directives, or from a ':?then:else' modifier. * * Cond_EndFile At the end of reading a makefile, ensure that the * conditional directives are well-balanced. @@ -91,14 +90,14 @@ #include "dir.h" /* "@(#)cond.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: cond.c,v 1.373 2025/04/22 19:28:50 rillig Exp $"); +MAKE_RCSID("$NetBSD: cond.c,v 1.378 2025/07/06 07:56:16 rillig Exp $"); /* * Conditional expressions conform to this grammar: * Or -> And ('||' And)* * And -> Term ('&&' Term)* * Term -> Function '(' Argument ')' - * Term -> Leaf Operator Leaf + * Term -> Leaf ComparisonOp Leaf * Term -> Leaf * Term -> '(' Or ')' * Term -> '!' Term @@ -106,7 +105,7 @@ MAKE_RCSID("$NetBSD: cond.c,v 1.373 2025/04/22 19:28:50 rillig Exp $"); * Leaf -> Number * Leaf -> VariableExpression * Leaf -> BareWord - * Operator -> '==' | '!=' | '>' | '<' | '>=' | '<=' + * ComparisonOp -> '==' | '!=' | '>' | '<' | '>=' | '<=' * * BareWord is an unquoted string literal, its evaluation depends on the kind * of '.if' directive. @@ -156,12 +155,12 @@ typedef struct CondParser { * been an expression or a plain word. * * In conditional directives like '.if', the left-hand side must - * either be an expression, a quoted string or a number. + * either be a defined expression, a quoted string or a number. */ bool leftUnquotedOK; const char *p; /* The remaining condition to parse */ - Token curr; /* Single push-back token used in parsing */ + Token curr; /* The push-back token, or TOK_NONE */ } CondParser; static CondResult CondParser_Or(CondParser *, bool); @@ -255,7 +254,7 @@ ParseFuncArg(const char **pp, bool doEval, const char *func) len++; Parse_Error(PARSE_FATAL, - "Missing ')' after argument '%.*s' for '%.*s'", + "Missing \")\" after argument \"%.*s\" for \"%.*s\"", (int)(argEnd - argStart), argStart, len, func); free(res); return NULL; @@ -284,7 +283,8 @@ FuncMake(const char *targetPattern) if (res.error != NULL && !warned) { warned = true; Parse_Error(PARSE_WARNING, - "%s in pattern argument '%s' to function 'make'", + "%s in pattern argument \"%s\" " + "to function \"make\"", res.error, targetPattern); } if (res.matched) @@ -301,14 +301,16 @@ FuncExists(const char *file) char *path; path = Dir_FindFile(file, &dirSearchPath); - DEBUG2(COND, "exists(%s) result is \"%s\"\n", - file, path != NULL ? path : ""); result = path != NULL; + if (result) + DEBUG2(COND, "\"%s\" exists in \"%s\"\n", file, path); + else + DEBUG1(COND, "\"%s\" does not exist\n", file); free(path); return result; } -/* See if the given node exists and is an actual target. */ +/* See if the given node is an actual target. */ static bool FuncTarget(const char *node) { @@ -316,10 +318,7 @@ FuncTarget(const char *node) return gn != NULL && GNode_IsTarget(gn); } -/* - * See if the given node exists and is an actual target with commands - * associated with it. - */ +/* See if the given node is an actual target with commands. */ static bool FuncCommands(const char *node) { @@ -374,38 +373,37 @@ is_separator(char ch) * * Return whether to continue parsing the leaf. * - * Example: .if x${CENTER}y == "${PREFIX}${SUFFIX}" || 0x${HEX} + * Examples: .if x${CENTER}y == "${PREFIX}${SUFFIX}" || 0x${HEX} */ static bool CondParser_StringExpr(CondParser *par, const char *start, bool doEval, bool quoted, - Buffer *buf, FStr *inout_str) + Buffer *buf, FStr *out_str) { VarEvalMode emode; const char *p; - bool atStart; /* true means an expression outside quotes */ + bool outsideQuotes; emode = doEval && quoted ? VARE_EVAL : doEval ? VARE_EVAL_DEFINED_LOUD : VARE_PARSE; p = par->p; - atStart = p == start; - *inout_str = Var_Parse(&p, SCOPE_CMDLINE, emode); - /* TODO: handle errors */ - if (inout_str->str == var_Error) { - FStr_Done(inout_str); - *inout_str = FStr_InitRefer(NULL); + outsideQuotes = p == start; + *out_str = Var_Parse(&p, SCOPE_CMDLINE, emode); + if (out_str->str == var_Error) { + FStr_Done(out_str); + *out_str = FStr_InitRefer(NULL); return false; } par->p = p; - if (atStart && is_separator(par->p[0])) + if (outsideQuotes && is_separator(par->p[0])) return false; - Buf_AddStr(buf, inout_str->str); - FStr_Done(inout_str); - *inout_str = FStr_InitRefer(NULL); /* not finished yet */ + Buf_AddStr(buf, out_str->str); + FStr_Done(out_str); + *out_str = FStr_InitRefer(NULL); /* not finished yet */ return true; } @@ -414,7 +412,7 @@ CondParser_StringExpr(CondParser *par, const char *start, * on the left-hand and right-hand sides of comparisons. * * Return the string without any enclosing quotes, or NULL on error. - * Sets out_quoted if the leaf was a quoted string literal. + * Set out_quoted if the leaf was a quoted string literal. */ static FStr CondParser_Leaf(CondParser *par, bool doEval, bool unquotedOK, @@ -439,12 +437,14 @@ CondParser_Leaf(CondParser *par, bool doEval, bool unquotedOK, if (par->p[0] != '\0') { Buf_AddByte(&buf, par->p[0]); par->p++; - } + } else + Parse_Error(PARSE_FATAL, + "Unfinished backslash escape sequence"); continue; case '"': par->p++; if (quoted) - goto return_buf; /* skip the closing quote */ + goto return_buf; Buf_AddByte(&buf, '"'); continue; case ')': /* see is_separator */ @@ -475,6 +475,9 @@ CondParser_Leaf(CondParser *par, bool doEval, bool unquotedOK, continue; } } + if (quoted) + Parse_Error(PARSE_FATAL, + "Unfinished string literal \"%s\"", start); return_buf: str = FStr_InitOwn(buf.data); buf.data = NULL; @@ -528,8 +531,8 @@ EvalCompareStr(const char *lhs, ComparisonOp op, const char *rhs) { if (op != EQ && op != NE) { Parse_Error(PARSE_FATAL, - "Comparison with '%s' requires both operands " - "'%s' and '%s' to be numeric", + "Comparison with \"%s\" requires both operands " + "\"%s\" and \"%s\" to be numeric", opname[op], lhs, rhs); return TOK_ERROR; } @@ -603,7 +606,7 @@ CondParser_Comparison(CondParser *par, bool doEval) if (par->p[0] == '\0') { Parse_Error(PARSE_FATAL, - "Missing right-hand side of operator '%s'", opname[op]); + "Missing right-hand side of operator \"%s\"", opname[op]); goto done_lhs; } @@ -768,7 +771,7 @@ CondParser_Token(CondParser *par, bool doEval) if (par->p[0] == '|') par->p++; else { - Parse_Error(PARSE_FATAL, "Unknown operator '|'"); + Parse_Error(PARSE_FATAL, "Unknown operator \"|\""); return TOK_ERROR; } return TOK_OR; @@ -778,7 +781,7 @@ CondParser_Token(CondParser *par, bool doEval) if (par->p[0] == '&') par->p++; else { - Parse_Error(PARSE_FATAL, "Unknown operator '&'"); + Parse_Error(PARSE_FATAL, "Unknown operator \"&\""); return TOK_ERROR; } return TOK_AND; @@ -825,7 +828,7 @@ CondParser_Skip(CondParser *par, Token t) /* * Term -> '(' Or ')' * Term -> '!' Term - * Term -> Leaf Operator Leaf + * Term -> Leaf ComparisonOp Leaf * Term -> Leaf */ static CondResult @@ -923,8 +926,10 @@ CondEvalExpression(const char *cond, bool plain, if (par.curr != TOK_EOF) rval = CR_ERROR; - if (rval == CR_ERROR && eprint && parseErrors == parseErrorsBefore) - Parse_Error(PARSE_FATAL, "Malformed conditional '%s'", cond); + if (parseErrors != parseErrorsBefore) + rval = CR_ERROR; + else if (rval == CR_ERROR && eprint) + Parse_Error(PARSE_FATAL, "Malformed conditional \"%s\"", cond); return rval; } diff --git a/contrib/bmake/for.c b/contrib/bmake/for.c index 438fb4e84de0..904853107db8 100644 --- a/contrib/bmake/for.c +++ b/contrib/bmake/for.c @@ -1,4 +1,4 @@ -/* $NetBSD: for.c,v 1.185 2025/04/22 19:28:50 rillig Exp $ */ +/* $NetBSD: for.c,v 1.186 2025/06/28 22:39:27 rillig Exp $ */ /* * Copyright (c) 1992, The Regents of the University of California. @@ -58,7 +58,7 @@ #include "make.h" /* "@(#)for.c 8.1 (Berkeley) 6/6/93" */ -MAKE_RCSID("$NetBSD: for.c,v 1.185 2025/04/22 19:28:50 rillig Exp $"); +MAKE_RCSID("$NetBSD: for.c,v 1.186 2025/06/28 22:39:27 rillig Exp $"); typedef struct ForLoop { @@ -153,7 +153,8 @@ ForLoop_ParseVarnames(ForLoop *f, const char **pp) for (;;) { cpp_skip_whitespace(&p); if (*p == '\0') { - Parse_Error(PARSE_FATAL, "missing `in' in for"); + Parse_Error(PARSE_FATAL, + "Missing \"in\" in .for loop"); goto cleanup; } @@ -168,7 +169,8 @@ ForLoop_ParseVarnames(ForLoop *f, const char **pp) } if (f->vars.len == 0) { - Parse_Error(PARSE_FATAL, "no iteration variables in for"); + Parse_Error(PARSE_FATAL, + "Missing iteration variables in .for loop"); return; } @@ -177,7 +179,7 @@ ForLoop_ParseVarnames(ForLoop *f, const char **pp) invalid_variable_name: Parse_Error(PARSE_FATAL, - "invalid character '%c' in .for loop variable name", *p); + "Invalid character \"%c\" in .for loop variable name", *p); cleanup: while (f->vars.len > 0) free(*(char **)Vector_Pop(&f->vars)); diff --git a/contrib/bmake/job.c b/contrib/bmake/job.c index 582870088f2d..0c54e710afeb 100644 --- a/contrib/bmake/job.c +++ b/contrib/bmake/job.c @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.516 2025/06/13 06:13:19 rillig Exp $ */ +/* $NetBSD: job.c,v 1.517 2025/07/06 07:11:31 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -89,7 +89,7 @@ * define the shell that is used for the creation * commands in jobs mode. * - * Job_Finish Make the .END target. Must only be called when the + * Job_MakeDotEnd Make the .END target. Must only be called when the * job table is empty. * * Job_AbortAll Kill all currently running jobs, in an emergency. @@ -137,7 +137,7 @@ #include "trace.h" /* "@(#)job.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: job.c,v 1.516 2025/06/13 06:13:19 rillig Exp $"); +MAKE_RCSID("$NetBSD: job.c,v 1.517 2025/07/06 07:11:31 rillig Exp $"); #ifdef USE_SELECT @@ -599,7 +599,7 @@ Job_Pid(Job *job) } static void -DumpJobs(const char *where) +JobTable_Dump(const char *where) { const Job *job; char flags[4]; @@ -662,6 +662,13 @@ SetNonblocking(int fd) Punt("SetNonblocking.set: %s", strerror(errno)); } +static void +SetCloseOnExec(int fd) +{ + if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) + Punt("SetCloseOnExec: %s", strerror(errno)); +} + static void JobCreatePipe(Job *job, int minfd) { @@ -683,10 +690,8 @@ JobCreatePipe(Job *job, int minfd) job->inPipe = pipe_fds[0]; job->outPipe = pipe_fds[1]; - if (fcntl(job->inPipe, F_SETFD, FD_CLOEXEC) == -1) - Punt("SetCloseOnExec: %s", strerror(errno)); - if (fcntl(job->outPipe, F_SETFD, FD_CLOEXEC) == -1) - Punt("SetCloseOnExec: %s", strerror(errno)); + SetCloseOnExec(job->inPipe); + SetCloseOnExec(job->outPipe); /* * We mark the input side of the pipe non-blocking; we poll(2) the @@ -822,7 +827,7 @@ JobFindPid(int pid, enum JobStatus status, bool isJobs) return job; } if (DEBUG(JOB) && isJobs) - DumpJobs("no pid"); + JobTable_Dump("no pid"); return NULL; } @@ -1624,7 +1629,7 @@ JobExec(Job *job, char **argv) debug_printf( "JobExec: target %s, pid %d added to jobs table\n", job->node->name, job->pid); - DumpJobs("job started"); + JobTable_Dump("job started"); } JobsTable_Unlock(&mask); } @@ -2433,7 +2438,6 @@ static void JobInterrupt(bool runINTERRUPT, int signo) { Job *job; - GNode *interrupt; sigset_t mask; aborting = ABORT_INTERRUPT; @@ -2460,10 +2464,10 @@ JobInterrupt(bool runINTERRUPT, int signo) JobsTable_Unlock(&mask); if (runINTERRUPT && !opts.touch) { - interrupt = Targ_FindNode(".INTERRUPT"); - if (interrupt != NULL) { + GNode *dotInterrupt = Targ_FindNode(".INTERRUPT"); + if (dotInterrupt != NULL) { opts.ignoreErrors = false; - JobRun(interrupt); + JobRun(dotInterrupt); } } Trace_Log(MAKEINTR, NULL); @@ -2472,15 +2476,15 @@ JobInterrupt(bool runINTERRUPT, int signo) /* Make the .END target, returning the number of job-related errors. */ int -Job_Finish(void) +Job_MakeDotEnd(void) { - GNode *endNode = Targ_GetEndNode(); - if (!Lst_IsEmpty(&endNode->commands) || - !Lst_IsEmpty(&endNode->children)) { + GNode *dotEnd = Targ_GetEndNode(); + if (!Lst_IsEmpty(&dotEnd->commands) || + !Lst_IsEmpty(&dotEnd->children)) { if (job_errors != 0) Error("Errors reported so .END ignored"); else - JobRun(endNode); + JobRun(dotEnd); } return job_errors; } diff --git a/contrib/bmake/job.h b/contrib/bmake/job.h index 901be0eef1dd..2b4b5e59c37e 100644 --- a/contrib/bmake/job.h +++ b/contrib/bmake/job.h @@ -1,4 +1,4 @@ -/* $NetBSD: job.h,v 1.84 2025/04/22 19:28:50 rillig Exp $ */ +/* $NetBSD: job.h,v 1.85 2025/07/06 07:11:31 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -101,7 +101,7 @@ void Job_CatchOutput(void); void Job_Make(GNode *); void Job_Init(void); bool Job_ParseShell(char *) MAKE_ATTR_USE; -int Job_Finish(void); +int Job_MakeDotEnd(void); #ifdef CLEANUP void Job_End(void); #endif diff --git a/contrib/bmake/main.c b/contrib/bmake/main.c index d020ba85f16b..a773b44f42c4 100644 --- a/contrib/bmake/main.c +++ b/contrib/bmake/main.c @@ -1,4 +1,4 @@ *** 4776 LINES SKIPPED *** From nobody Sat Jan 10 21:34:12 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2r5y4tz6Mwyv for ; Sat, 10 Jan 2026 21:34:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dpX2r53Kvz3Qsj for ; Sat, 10 Jan 2026 21:34:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2QPufgcgfDA6eC+J4ZJZooOu24gsOh60bEHix+gOYMQ=; b=d1kBM8hvwVG/otnKjGVIYYE+1KE++0VchfqfPMxmIEhpoOu2oKJ4s68MbTheKce6jMCJnB uzRuT4P7R06Xs3Vt3tDhbiOWXm/iQnkobDrUnQPtGzVPxluhmwOBN9K2kw39AFjiPgoGWl SDzHh1Evcyq7pTaGRiK6uMAuArHezKQ0T2LN+QjAjC3JpAJrDX97i5UcpQmAqfXlSxJvuU WW4t2fAwiCfQrnnRm8957/EQ7CigVmBRqB1JKvh4yoQAh4J8iQBx0v2JcTZdMpSLdPPbsb mVI4YR+ekHGjOxHuAMDR5pJOx0jTUysRGSSeyBEY3cdzpgLsAmFMzIN/R5t6wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768080852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2QPufgcgfDA6eC+J4ZJZooOu24gsOh60bEHix+gOYMQ=; b=Y/TLy4wYr6UA6RjQN2AwgA/Olsi9VT/W60UXKZHWFKAFyFfEPnU7UNIajL+/OUIVkKh1uQ DKCXXUzMvenWZKiWmWD85TvGWNlkJgZAMlNXPkEZqmdwdT/e3yeVHGVD9WJOXwGQWR15AX LZ2tcwcUUUFgstowJLq7JQ0xnq3Xw98NAs3f7g3s6voa+qgycAqq8ZDuGIwMUieihQskDE Pt7vgVnMNXnKYjvWomLMie+lg18mf/J0Z2C6vQvWgWVHedYdTapVfN6nweslSUzTbdoQwx z4zjiD5Iuhv8RibBjgKxwSHJeAjmaDa70b1yFT60bYzqLAvD8vXK7E766RKUOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768080852; a=rsa-sha256; cv=none; b=fI1AP9mJder6suERYd/wPU4WKY6Y6YGUxWSvkCmagcWPN1LreuCD3ZV+UNXx88EY1ZsIW7 bex5yVULpx1QM+Bw3IT12DkJ87Ll4ZBmF8/AxLXtagl60sO3cTqhsfnEETcOdQuBm9ieXn 9w7Fga9PJd+HquyKztyNbZzzmINzybR9GTk4zj/VU933sohzQOCMxZKmXv2CK3PcPqtypw YeBPntyJMC4VA9eLoPb5MjPNPgf6WZcIT1KTC43uJRew35KfAve3E/MJvrEvh2BX3j5mz7 PV6m0DyxGoC1ehRhB/qRUF67KilLZCjChhxRLwhe2Pzgm1SWxx3LKRvgI7xUQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dpX2r4b3Tz1BVt for ; Sat, 10 Jan 2026 21:34:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26529 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 10 Jan 2026 21:34:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Simon J. Gerraty Subject: git: c95f96dea30a - stable/14 - Update to bmake-20251111 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c95f96dea30a26b7d3543961db6e25e677c02c5a Auto-Submitted: auto-generated Date: Sat, 10 Jan 2026 21:34:12 +0000 Message-Id: <6962c5d4.26529.59af9453@gitrepo.freebsd.org> The branch stable/14 has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=c95f96dea30a26b7d3543961db6e25e677c02c5a commit c95f96dea30a26b7d3543961db6e25e677c02c5a Author: Simon J. Gerraty AuthorDate: 2025-12-03 18:13:30 +0000 Commit: Simon J. Gerraty CommitDate: 2026-01-10 21:33:13 +0000 Update to bmake-20251111 Merge commit '638c66de4a0faa4c2e815e81cd4021c2387c7e0f' (cherry picked from commit c60f6422ffae3ea85e7b10bad950ad27c463af18) --- contrib/bmake/ChangeLog | 37 ++++++ contrib/bmake/FILES | 2 + contrib/bmake/LICENSE | 6 +- contrib/bmake/VERSION | 2 +- contrib/bmake/bmake.1 | 13 +- contrib/bmake/bmake.cat1 | 12 +- contrib/bmake/boot-strap | 23 +++- contrib/bmake/configure | 53 ++++++-- contrib/bmake/configure.in | 36 ++++- contrib/bmake/install-sh | 11 +- contrib/bmake/main.c | 13 +- contrib/bmake/make.1 | 13 +- contrib/bmake/mk/ChangeLog | 49 +++++++ contrib/bmake/mk/auto.dep.mk | 12 +- contrib/bmake/mk/auto.obj.mk | 11 +- contrib/bmake/mk/autoconf.mk | 11 +- contrib/bmake/mk/autodep.mk | 12 +- contrib/bmake/mk/cc-wrap.mk | 11 +- contrib/bmake/mk/ccm.dep.mk | 12 +- contrib/bmake/mk/compiler.mk | 11 +- contrib/bmake/mk/cython.mk | 12 +- contrib/bmake/mk/dirdeps-cache-update.mk | 11 +- contrib/bmake/mk/dirdeps-options.mk | 11 +- contrib/bmake/mk/dirdeps-targets.mk | 18 +-- contrib/bmake/mk/dpadd.mk | 11 +- contrib/bmake/mk/files.mk | 11 +- contrib/bmake/mk/gendirdeps.mk | 5 +- contrib/bmake/mk/genfiles.mk | 11 +- contrib/bmake/mk/host-target.mk | 12 +- contrib/bmake/mk/host.libnames.mk | 9 +- contrib/bmake/mk/inc.mk | 11 +- contrib/bmake/mk/init.mk | 11 +- contrib/bmake/mk/install-mk | 11 +- contrib/bmake/mk/install-new.mk | 36 ++--- contrib/bmake/mk/install-sh | 11 +- contrib/bmake/mk/java.mk | 12 +- contrib/bmake/mk/jobs.mk | 11 +- contrib/bmake/mk/ldorder.mk | 11 +- contrib/bmake/mk/libnames.mk | 11 +- contrib/bmake/mk/libs.mk | 11 +- contrib/bmake/mk/links.mk | 11 +- contrib/bmake/mk/manifest.mk | 11 +- contrib/bmake/mk/meta.autodep.mk | 12 +- contrib/bmake/mk/meta.stage.mk | 26 ++-- contrib/bmake/mk/meta.subdir.mk | 12 +- contrib/bmake/mk/meta.sys.mk | 12 +- contrib/bmake/mk/meta2deps.sh | 24 +++- contrib/bmake/mk/mkopt.sh | 10 +- contrib/bmake/mk/newlog.sh | 11 +- contrib/bmake/mk/obj.mk | 11 +- contrib/bmake/mk/options.mk | 148 ++++++++++++++------- contrib/bmake/mk/posix.mk | 11 +- contrib/bmake/mk/prlist.mk | 11 +- contrib/bmake/mk/progs.mk | 11 +- contrib/bmake/mk/rst2htm.mk | 11 +- contrib/bmake/mk/rust.mk | 12 +- contrib/bmake/mk/scripts.mk | 11 +- contrib/bmake/mk/setopts.sh | 9 +- contrib/bmake/mk/srctop.mk | 11 +- contrib/bmake/mk/stage-install.sh | 9 +- contrib/bmake/mk/subdir.mk | 11 +- contrib/bmake/mk/suffixes.mk | 11 +- contrib/bmake/mk/sys.clean-env.mk | 11 +- contrib/bmake/mk/sys.debug.mk | 11 +- contrib/bmake/mk/sys.dependfile.mk | 11 +- contrib/bmake/mk/sys.dirdeps.mk | 11 +- contrib/bmake/mk/sys.mk | 11 +- contrib/bmake/mk/sys.vars.mk | 36 +++-- contrib/bmake/mk/target-flags.mk | 13 +- contrib/bmake/mk/warnings.mk | 12 +- contrib/bmake/mk/whats.mk | 11 +- contrib/bmake/mk/yacc.mk | 12 +- contrib/bmake/os.sh | 9 +- contrib/bmake/sigaction.c | 14 +- contrib/bmake/sigcompat.c | 14 +- contrib/bmake/unit-tests/Makefile | 31 ++++- contrib/bmake/unit-tests/Makefile.config.in | 7 +- contrib/bmake/unit-tests/directive-dinclude.mk | 2 +- .../bmake/unit-tests/directive-hyphen-include.mk | 2 +- .../bmake/unit-tests/directive-include-guard.mk | 4 +- contrib/bmake/unit-tests/directive-include.mk | 2 +- contrib/bmake/unit-tests/directive-sinclude.mk | 2 +- contrib/bmake/unit-tests/opt-debug-file.exp | 2 +- contrib/bmake/unit-tests/opt-debug-file.mk | 6 +- contrib/bmake/unit-tests/varmod-sun-shell1.exp | 14 ++ contrib/bmake/unit-tests/varmod-sun-shell1.mk | 25 ++++ contrib/bmake/unit-tests/varname-circumflex.mk | 4 +- contrib/bmake/var.c | 46 ++++++- contrib/bmake/wait.h | 14 +- usr.bin/bmake/Makefile.config | 2 +- usr.bin/bmake/config.h | 4 +- usr.bin/bmake/unit-tests/Makefile | 31 ++++- usr.bin/bmake/unit-tests/Makefile.config | 7 +- 93 files changed, 688 insertions(+), 696 deletions(-) diff --git a/contrib/bmake/ChangeLog b/contrib/bmake/ChangeLog index e8f1567733e4..11b1684bf7d5 100644 --- a/contrib/bmake/ChangeLog +++ b/contrib/bmake/ChangeLog @@ -1,3 +1,40 @@ +2025-11-15 Simon J Gerraty + + * boot-strap: unset more things from env and save a copy + to env.out for debugging. + +2025-11-12 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20251111 + Merge with NetBSD make, pick up + o var.c: add :sh1 which only evaluates command on first reference. + +2025-11-11 Simon J Gerraty + + * configure.in: Force filemon=no for Cygwin and MINGW64_NT + +2025-11-10 Simon J Gerraty + + * unit-tests/Makefile: handle MINGW64_NT + mark some tests broken, filter others as per Cygwin. + +2025-10-23 Simon J Gerraty + + * make.1: document MAKE_VERSION. + +2025-10-22 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20251022 + + * configure.in: Add a check that lua is version 5.2 or later + if not we want to skip running check-expect.lua + +2025-09-16 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20250916 + Merge with NetBSD make, pick up + o var.c: avoid compiler warning from hexdigits + 2025-08-04 Simon J Gerraty * VERSION (_MAKE_VERSION): 20250804 diff --git a/contrib/bmake/FILES b/contrib/bmake/FILES index 28465b6a8c39..7f6024418d94 100644 --- a/contrib/bmake/FILES +++ b/contrib/bmake/FILES @@ -760,6 +760,8 @@ unit-tests/varmod-subst.exp unit-tests/varmod-subst.mk unit-tests/varmod-sun-shell.exp unit-tests/varmod-sun-shell.mk +unit-tests/varmod-sun-shell1.exp +unit-tests/varmod-sun-shell1.mk unit-tests/varmod-sysv.exp unit-tests/varmod-sysv.mk unit-tests/varmod-tail.exp diff --git a/contrib/bmake/LICENSE b/contrib/bmake/LICENSE index 0d460e91d230..28832d20a6ef 100644 --- a/contrib/bmake/LICENSE +++ b/contrib/bmake/LICENSE @@ -2,11 +2,11 @@ The individual files in this distribution are copyright their original contributors or assignees. Including: - Copyright (c) 1993-2021, Simon J Gerraty - Copyright (c) 2020, Roland Illig + Copyright (c) 1993-2025, Simon J Gerraty + Copyright (c) 2020-2021, Roland Illig Copyright (c) 2009-2016, Juniper Networks, Inc. Copyright (c) 2009, John Birrell. - Copyright (c) 1997-2021 The NetBSD Foundation, Inc. + Copyright (c) 1997-2025 The NetBSD Foundation, Inc. Copyright (c) 1998 Todd C. Miller Copyright (c) 1989 by Berkeley Softworks Copyright (c) 1988, 1989, 1990, 1992, 1993 diff --git a/contrib/bmake/VERSION b/contrib/bmake/VERSION index e301cfafab72..2c7c307f2a90 100644 --- a/contrib/bmake/VERSION +++ b/contrib/bmake/VERSION @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20250804 +_MAKE_VERSION=20251111 diff --git a/contrib/bmake/bmake.1 b/contrib/bmake/bmake.1 index 01f173bc1a69..a9de459de862 100644 --- a/contrib/bmake/bmake.1 +++ b/contrib/bmake/bmake.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.387 2025/07/02 17:11:56 rillig Exp $ +.\" $NetBSD: make.1,v 1.388 2025/11/12 22:14:07 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd July 2, 2025 +.Dd November 11, 2025 .Dt BMAKE 1 .Os .Sh NAME @@ -945,6 +945,11 @@ include additional unexpanded variable references) are shown. .It Va .MAKE.EXPORTED The list of variables exported by .Nm . +.It Va MAKE_VERSION +This variable indicates the version of +.Nm . +It is typically the date of last import from NetBSD. +It is useful for checking whether certain features are available. .It Va MAKEFILE The top-level makefile that is currently read, as given in the command line. @@ -1881,6 +1886,10 @@ The output of running is the value. .It Cm \&:sh The value is run as a command, and the output becomes the new value. +.It Cm \&:sh1 +The value is run as a command, for the first reference only, and +the output is cached for subsequent references. +This modifier is useful when the result is not expected to change. .It Cm \&::= Ns Ar str The variable is assigned the value .Ar str diff --git a/contrib/bmake/bmake.cat1 b/contrib/bmake/bmake.cat1 index 950437a8db9c..baaad7b4ed70 100644 --- a/contrib/bmake/bmake.cat1 +++ b/contrib/bmake/bmake.cat1 @@ -607,6 +607,11 @@ VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS _._M_A_K_E_._E_X_P_O_R_T_E_D The list of variables exported by bbmmaakkee. + _M_A_K_E___V_E_R_S_I_O_N + This variable indicates the version of bbmmaakkee. It is typically + the date of last import from NetBSD. It is useful for checking + whether certain features are available. + _M_A_K_E_F_I_L_E The top-level makefile that is currently read, as given in the command line. @@ -1190,6 +1195,11 @@ VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS ::sshh The value is run as a command, and the output becomes the new value. + ::sshh11 + The value is run as a command, for the first reference only, and the + output is cached for subsequent references. This modifier is useful + when the result is not expected to change. + ::::==_s_t_r The variable is assigned the value _s_t_r after substitution. This modifier and its variations are useful in obscure situations such as @@ -1864,4 +1874,4 @@ BBUUGGSS attempt to suppress a cascade of unnecessary errors, can result in a seemingly unexplained `*** Error code 6' -FreeBSD 14.2-RELEASE-p1 July 2, 2025 FreeBSD 14.2-RELEASE-p1 +FreeBSD 14.3-RELEASE-p3 November 11, 2025 FreeBSD 14.3-RELEASE-p3 diff --git a/contrib/bmake/boot-strap b/contrib/bmake/boot-strap index b025de52a82b..51e81083b95b 100755 --- a/contrib/bmake/boot-strap +++ b/contrib/bmake/boot-strap @@ -133,7 +133,7 @@ # Simon J. Gerraty # RCSid: -# $Id: boot-strap,v 1.61 2024/03/10 17:51:10 sjg Exp $ +# $Id: boot-strap,v 1.62 2025/11/15 16:53:14 sjg Exp $ # # @(#) Copyright (c) 2001 Simon J. Gerraty # @@ -179,12 +179,25 @@ source_rc() { done } +have() { + case `(type "$1") 2>&1` in + *" found") return 1;; + esac + return 0 +} + +Env() { + have env && env || set +} + cmd_args="$@" # clear some things from the environment that we care about -unset MAKEOBJDIR MAKEOBJDIRPREFIX -# or that might be incompatible -unset MAKE MAKEFLAGS +# any variable starting with any of these prefixes will be unset +for p in MAKE OBJ SB WITH +do + unset ENV `Env | sed -n "/^$p/s,=.*,,p"` +done # --install[-host-target] will set this INSTALL_PREFIX= @@ -381,6 +394,8 @@ objdir="${objdir:-$OBJROOT$HOST_TARGET}" cd "$objdir" || exit 1 # make it absolute objdir=`'pwd'` +# save a copy of our env for debugging +Env > env.out ShareDir() { case "/$1" in diff --git a/contrib/bmake/configure b/contrib/bmake/configure index e34740cd2cfa..9bbdb8d2b36b 100755 --- a/contrib/bmake/configure +++ b/contrib/bmake/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.72 for bmake 20240711. +# Generated by GNU Autoconf 2.72 for bmake 20251111. # # Report bugs to . # @@ -603,8 +603,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='bmake' PACKAGE_TARNAME='bmake' -PACKAGE_VERSION='20240711' -PACKAGE_STRING='bmake 20240711' +PACKAGE_VERSION='20251111' +PACKAGE_STRING='bmake 20251111' PACKAGE_BUGREPORT='sjg@NetBSD.org' PACKAGE_URL='' @@ -644,6 +644,7 @@ ac_func_c_list= ac_subst_vars='LTLIBOBJS UTC_1 _MAKE_VERSION +lua filemon_h use_filemon use_meta @@ -720,6 +721,7 @@ with_makefile with_meta with_filemon with_bmake_strftime +with_lua with_machine with_force_machine with_force_machine_arch @@ -1286,7 +1288,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -'configure' configures bmake 20240711 to adapt to many kinds of systems. +'configure' configures bmake 20251111 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1348,7 +1350,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of bmake 20240711:";; + short | recursive ) echo "Configuration of bmake 20251111:";; esac cat <<\_ACEOF @@ -1371,6 +1373,7 @@ Optional Packages: --without-meta disable use of meta-mode --with-filemon={no,dev,ktrace,path/filemon.h} indicate filemon method for meta-mode. Path to filemon.h implies dev --with-bmake-strftime force use of bmake strftime + --without-lua do not use check-expect.lua --with-machine=MACHINE explicitly set MACHINE --with-force-machine=MACHINE set FORCE_MACHINE --with-force-machine-arch=MACHINE set FORCE_MACHINE_ARCH @@ -1458,7 +1461,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -bmake configure 20240711 +bmake configure 20251111 generated by GNU Autoconf 2.72 Copyright (C) 2023 Free Software Foundation, Inc. @@ -1981,7 +1984,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by bmake $as_me 20240711, which was +It was created by bmake $as_me 20251111, which was generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -2772,6 +2775,13 @@ esac . $srcdir/VERSION OS=`uname -s` +have() { + case `(type "$1") 2>&1` in + *" found") return 1;; + esac + return 0 +} + use_defshell() { case "$defshell_path$DEFSHELL_INDEX" in "") ;; @@ -2867,6 +2877,7 @@ esac else case e in #( e) case "$OS" in +Cygwin*|MINGW*) use_filemon=no;; NetBSD) filemon_h=no use_filemon=ktrace;; *) for d in "/usr/include/dev/filemon" "$prefix/include/dev/filemon" "$srcdir/../../sys/dev/filemon" @@ -2943,6 +2954,29 @@ do PATH=$PATH:$d done export PATH +lua=$LUA + +# Check whether --with-lua was given. +if test ${with_lua+y} +then : + withval=$with_lua; case "${withval}" in +no) lua=:;; +yes) lua= ;; +/*lua*) lua=$withval;; +*) as_fn_error $? "bad value ${withval} given for lua" "$LINENO" 5;; +esac +fi + +if test "x$lua" != x:; then + if have lua; then + lua_version=`${lua:-lua} -v | sed 's/Lua //;s/ *Copy.*//;'` + echo $ECHO_N "checking whether lua version ($lua_version) > 5.2... $ECHO_C" >&6 + case "$lua_version" in + 4.*|5.1.*) lua=:; echo no >&6;; + *) echo yes >&6;; + esac + fi +fi @@ -7277,6 +7311,7 @@ esac + bm_outfiles="Makefile.config unit-tests/Makefile.config make-bootstrap.sh" if test $use_makefile = yes; then bm_outfiles="makefile $bm_outfiles" @@ -7798,7 +7833,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by bmake $as_me 20240711, which was +This file was extended by bmake $as_me 20251111, which was generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7862,7 +7897,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -bmake config.status 20240711 +bmake config.status 20251111 configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" diff --git a/contrib/bmake/configure.in b/contrib/bmake/configure.in index 294246dea60d..f378b57fd14a 100644 --- a/contrib/bmake/configure.in +++ b/contrib/bmake/configure.in @@ -1,11 +1,11 @@ dnl dnl RCSid: -dnl $Id: configure.in,v 1.108 2024/07/13 15:27:00 sjg Exp $ +dnl $Id: configure.in,v 1.111 2025/11/11 18:43:59 sjg Exp $ dnl dnl Process this file with autoconf to produce a configure script dnl AC_PREREQ([2.71]) -AC_INIT([bmake],[20240711],[sjg@NetBSD.org]) +AC_INIT([bmake],[20251111],[sjg@NetBSD.org]) AC_CONFIG_HEADERS(config.h) dnl make srcdir absolute @@ -18,6 +18,14 @@ dnl get _MAKE_VERSION . $srcdir/VERSION OS=`uname -s` +dnl do not trust return from type +have() { + case `(type "$1") 2>&1` in + *" found") return 1;; + esac + return 0 +} + dnl function to set DEFSHELL_INDEX use_defshell() { case "$defshell_path$DEFSHELL_INDEX" in @@ -107,6 +115,7 @@ esac ], [ case "$OS" in +Cygwin*|MINGW*) use_filemon=no;; NetBSD) filemon_h=no use_filemon=ktrace;; *) for d in "/usr/include/dev/filemon" "$prefix/include/dev/filemon" "$srcdir/../../sys/dev/filemon" @@ -187,6 +196,28 @@ do PATH=$PATH:$d done export PATH +dnl +dnl if lua is available check it is version 5.2 or later +lua=$LUA +AC_ARG_WITH(lua, +[ --without-lua do not use check-expect.lua], +[case "${withval}" in +no) lua=:;; +yes) lua= ;; +/*lua*) lua=$withval;; +*) AC_MSG_ERROR(bad value ${withval} given for lua);; +esac]) +if test "x$lua" != x:; then + if have lua; then + lua_version=`${lua:-lua} -v | sed 's/Lua //;s/ *Copy.*//;'` + echo $ECHO_N "checking whether lua version ($lua_version) > 5.2... $ECHO_C" >&6 + case "$lua_version" in + 4.*|5.1.*) lua=:; echo no >&6;; + *) echo yes >&6;; + esac + fi +fi +dnl dnl Solaris's signal.h only privides sigset_t etc if one of dnl _EXTENSIONS_ _POSIX_C_SOURCE or _XOPEN_SOURCE are defined. dnl The later two seem to cause more problems than they solve so if we @@ -580,6 +611,7 @@ AC_SUBST(diff_u) AC_SUBST(use_meta) AC_SUBST(use_filemon) AC_SUBST(filemon_h) +AC_SUBST(lua) AC_SUBST(_MAKE_VERSION) AC_SUBST(UTC_1) bm_outfiles="Makefile.config unit-tests/Makefile.config make-bootstrap.sh" diff --git a/contrib/bmake/install-sh b/contrib/bmake/install-sh index aa35fa94c83a..14ddc8ccd13a 100755 --- a/contrib/bmake/install-sh +++ b/contrib/bmake/install-sh @@ -53,19 +53,12 @@ # Simon J. Gerraty # -# SPDX-License-Identifier: BSD-2-Clause -# # RCSid: -# $Id: install-sh,v 1.26 2024/02/17 17:26:57 sjg Exp $ +# $Id: install-sh,v 1.27 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 1993-2023 Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/main.c b/contrib/bmake/main.c index a773b44f42c4..24a1caef4291 100644 --- a/contrib/bmake/main.c +++ b/contrib/bmake/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.661 2025/07/06 07:11:31 rillig Exp $ */ +/* $NetBSD: main.c,v 1.662 2025/08/09 23:13:28 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -111,7 +111,7 @@ #include "trace.h" /* "@(#)main.c 8.3 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: main.c,v 1.661 2025/07/06 07:11:31 rillig Exp $"); +MAKE_RCSID("$NetBSD: main.c,v 1.662 2025/08/09 23:13:28 rillig Exp $"); #if defined(MAKE_NATIVE) __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 " "The Regents of the University of California. " @@ -390,8 +390,8 @@ MainParseArgJobsInternal(const char *argvalue) progname, argvalue, curdir); exit(2); } - if ((fcntl(tokenPoolReader, F_GETFD, 0) < 0) || - (fcntl(tokenPoolWriter, F_GETFD, 0) < 0)) { + if (fcntl(tokenPoolReader, F_GETFD, 0) < 0 || + fcntl(tokenPoolWriter, F_GETFD, 0) < 0) { tokenPoolReader = -1; tokenPoolWriter = -1; bogusJflag = true; @@ -601,7 +601,7 @@ MainParseArgs(int argc, char **argv) bool inOption, dashDash = false; const char *optspecs = "BC:D:I:J:NST:V:WXd:ef:ij:km:nqrstv:w"; -/* Can't actually use getopt(3) because rescanning is not portable */ + /* Can't actually use getopt(3) because rescanning is not portable */ rearg: inOption = false; @@ -1709,7 +1709,7 @@ ReadMakefile(const char *fname) * placement of the setting here means it gets set to the last * makefile specified, as it is set by SysV make. */ -found: + found: if (!doing_depend) Var_Set(SCOPE_INTERNAL, "MAKEFILE", fname); Parse_File(fname, fd); @@ -1802,7 +1802,6 @@ Cmd_Exec(const char *cmd, char **error) (void)execv(shellPath, UNCONST(args)); _exit(1); - /* NOTREACHED */ case -1: *error = str_concat3("Couldn't exec \"", cmd, "\""); diff --git a/contrib/bmake/make.1 b/contrib/bmake/make.1 index de67759290c4..1a99b50d5e89 100644 --- a/contrib/bmake/make.1 +++ b/contrib/bmake/make.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.387 2025/07/02 17:11:56 rillig Exp $ +.\" $NetBSD: make.1,v 1.388 2025/11/12 22:14:07 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd July 2, 2025 +.Dd November 11, 2025 .Dt MAKE 1 .Os .Sh NAME @@ -956,6 +956,11 @@ include additional unexpanded variable references) are shown. .It Va .MAKE.EXPORTED The list of variables exported by .Nm . +.It Va MAKE_VERSION +This variable indicates the version of +.Nm . +It is typically the date of last import from NetBSD. +It is useful for checking whether certain features are available. .It Va MAKEFILE The top-level makefile that is currently read, as given in the command line. @@ -1892,6 +1897,10 @@ The output of running is the value. .It Cm \&:sh The value is run as a command, and the output becomes the new value. +.It Cm \&:sh1 +The value is run as a command, for the first reference only, and +the output is cached for subsequent references. +This modifier is useful when the result is not expected to change. .It Cm \&::= Ns Ar str The variable is assigned the value .Ar str diff --git a/contrib/bmake/mk/ChangeLog b/contrib/bmake/mk/ChangeLog index fda6d8b02158..daacc97ec045 100644 --- a/contrib/bmake/mk/ChangeLog +++ b/contrib/bmake/mk/ChangeLog @@ -1,3 +1,52 @@ +2025-11-18 Simon J Gerraty + + * sys.vars.mk: set MAKE_POSIX_SHELL to 1 if .SHELL is POSIX, 0 if not. + set isPOSIX_SHELL for use in target scripts. + + * meta.stage.mk: set MAKE_POSIX_SHELL if needed. + + * install-new.mk: use ${isPOSIX_SHELL:Ufalse} to see if we can + avoid running 'expr'. + + * install-new.mk: Allow use of cp or mv - controlled by CPMV_OP + (default mv). + +2025-11-13 Simon J Gerraty + + * sys.vars.mk: add M_sh1 so we can handle older bmake that does + not support :sh1 + +2025-11-11 Simon J Gerraty + + * install-mk (MK_VERSION): 20251111 + + * meta2deps.sh: reset some vars for each new meta file + set meta_file to path of meta file. + If meta2deps appears in DEBUG_SH set -x. + +2025-09-16 Simon J Gerraty + + * options.mk: Add OPTIONS_DEFAULT_DEPENDENT_REQUIRED of the form + OPTION/REQUIRED[/VALUE] + if OPTION is $VALUE (default is "yes"), then REQUIRED must be too. + We add OPTIONS_DEFAULT_DEPENDENT_REQUIRED (sans any /{yes,no}) to + OPTIONS_DEFAULT_DEPENDENT so DEPENDENT/REQUIRED follow the same + processing. + + Also add OPTIONS_FORCED_VALUES of the form OPTION/{yes,no} + we add any OPTIONS_FORCED_NO and OPTIONS_FORCED_YES before + processing. + + Simplify the processing of OPTIONS_DEFAULT_VALUES and + OPTIONS_DEFAULT_DEPENDENT by splitting the tuples and use two + iterator variables in the .for loops. + +2025-08-09 Simon J Gerraty + + * install-mk (MK_VERSION): 20250808 + + * replace sjg license with just BSD-2-Clause SPDX tag + 2025-07-24 Simon J Gerraty * install-mk (MK_VERSION): 20250724 diff --git a/contrib/bmake/mk/auto.dep.mk b/contrib/bmake/mk/auto.dep.mk index 400789a37366..ffd0d528dbcb 100644 --- a/contrib/bmake/mk/auto.dep.mk +++ b/contrib/bmake/mk/auto.dep.mk @@ -1,16 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# RCSid: -# $Id: auto.dep.mk,v 1.12 2024/02/17 17:26:57 sjg Exp $ +# $Id: auto.dep.mk,v 1.13 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2010-2021, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/auto.obj.mk b/contrib/bmake/mk/auto.obj.mk index 4b8c5325b71f..140764860de3 100644 --- a/contrib/bmake/mk/auto.obj.mk +++ b/contrib/bmake/mk/auto.obj.mk @@ -1,15 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: auto.obj.mk,v 1.20 2025/05/17 15:29:55 sjg Exp $ +# $Id: auto.obj.mk,v 1.21 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2004-2025, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/autoconf.mk b/contrib/bmake/mk/autoconf.mk index 24532c4e9eab..26e9515d680c 100644 --- a/contrib/bmake/mk/autoconf.mk +++ b/contrib/bmake/mk/autoconf.mk @@ -1,15 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: autoconf.mk,v 1.20 2024/02/17 17:26:57 sjg Exp $ +# $Id: autoconf.mk,v 1.21 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 1996-2024, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/autodep.mk b/contrib/bmake/mk/autodep.mk index 88a2643bccff..ab04419ba808 100644 --- a/contrib/bmake/mk/autodep.mk +++ b/contrib/bmake/mk/autodep.mk @@ -1,16 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# RCSid: -# $Id: autodep.mk,v 1.43 2024/02/17 17:26:57 sjg Exp $ +# $Id: autodep.mk,v 1.44 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 1999-2024, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/cc-wrap.mk b/contrib/bmake/mk/cc-wrap.mk index 7c1d6165e9df..f8287c30025e 100644 --- a/contrib/bmake/mk/cc-wrap.mk +++ b/contrib/bmake/mk/cc-wrap.mk @@ -1,15 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: cc-wrap.mk,v 1.7 2024/02/17 17:26:57 sjg Exp $ +# $Id: cc-wrap.mk,v 1.8 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2022, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/ccm.dep.mk b/contrib/bmake/mk/ccm.dep.mk index 1809a72e7310..1b31832b8ea9 100644 --- a/contrib/bmake/mk/ccm.dep.mk +++ b/contrib/bmake/mk/ccm.dep.mk @@ -1,16 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# RCSid: -# $Id: ccm.dep.mk,v 1.3 2024/02/17 17:26:57 sjg Exp $ +# $Id: ccm.dep.mk,v 1.4 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2024, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/compiler.mk b/contrib/bmake/mk/compiler.mk index e7a13f0f11d7..32bf55834d03 100644 --- a/contrib/bmake/mk/compiler.mk +++ b/contrib/bmake/mk/compiler.mk @@ -1,15 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: compiler.mk,v 1.14 2024/02/19 00:05:50 sjg Exp $ +# $Id: compiler.mk,v 1.15 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2019, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/cython.mk b/contrib/bmake/mk/cython.mk index 8eda318e187c..d6ef8de0b3d6 100644 --- a/contrib/bmake/mk/cython.mk +++ b/contrib/bmake/mk/cython.mk @@ -1,16 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# RCSid: -# $Id: cython.mk,v 1.10 2024/09/20 06:16:41 sjg Exp $ +# $Id: cython.mk,v 1.11 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2014-2024, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/dirdeps-cache-update.mk b/contrib/bmake/mk/dirdeps-cache-update.mk index 9e7cb8281110..b046b0c04f3f 100644 --- a/contrib/bmake/mk/dirdeps-cache-update.mk +++ b/contrib/bmake/mk/dirdeps-cache-update.mk @@ -1,15 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: dirdeps-cache-update.mk,v 1.23 2024/02/17 17:26:57 sjg Exp $ +# $Id: dirdeps-cache-update.mk,v 1.24 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2020, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/dirdeps-options.mk b/contrib/bmake/mk/dirdeps-options.mk index e12dcec40ac7..d173cb7d1e97 100644 --- a/contrib/bmake/mk/dirdeps-options.mk +++ b/contrib/bmake/mk/dirdeps-options.mk @@ -1,15 +1,8 @@ -# SPDX-License-Identifier: BSD-2-Clause -# -# $Id: dirdeps-options.mk,v 1.22 2024/02/17 17:26:57 sjg Exp $ +# $Id: dirdeps-options.mk,v 1.23 2025/08/09 22:42:24 sjg Exp $ # # @(#) Copyright (c) 2018-2022, Simon J. Gerraty # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are -# left intact. +# SPDX-License-Identifier: BSD-2-Clause # # Please send copies of changes and bug-fixes to: # sjg@crufty.net diff --git a/contrib/bmake/mk/dirdeps-targets.mk b/contrib/bmake/mk/dirdeps-targets.mk index a8a547c0ce9b..1d00c5f418d2 100644 --- a/contrib/bmake/mk/dirdeps-targets.mk +++ b/contrib/bmake/mk/dirdeps-targets.mk @@ -1,19 +1,11 @@ -# SPDX-License-Identifier: BSD-2-Clause +# $Id: dirdeps-targets.mk,v 1.29 2025/08/09 22:42:24 sjg Exp $ # -# RCSid: -# $Id: dirdeps-targets.mk,v 1.28 2024/10/19 00:47:38 sjg Exp $ +# @(#) Copyright (c) 2019-2020 Simon J. Gerraty # -# @(#) Copyright (c) 2019-2020 Simon J. Gerraty +# SPDX-License-Identifier: BSD-2-Clause # -# This file is provided in the hope that it will -# be of use. There is absolutely NO WARRANTY. -# Permission to copy, redistribute or otherwise -# use this file is hereby granted provided that -# the above copyright notice and this notice are *** 2066 LINES SKIPPED *** From nobody Sun Jan 11 19:23:00 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dq5510Tccz6NPHk for ; Sun, 11 Jan 2026 19:23:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dq55061KPz3htd for ; Sun, 11 Jan 2026 19:23:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768159380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qucoWpOHbV0e6lBJwVVqlZZ+cBMkLeOAVmg6hRXYA7o=; b=ehC9a8lmCfrWdKykjsUEk1UhB/siMT+rrpjhlsVVw1x70JaMSLbbJKurVs2WbNs0iU6CZs w3QuaPfaKFaaQcENGu5NbXKszNKJjCMN2v4sT6WNDElFo70kZRf4LpgoPglxLFeAUlrmfC NFFx+8rsCehBPtMpy2pELmeV5qI0hTLxptjuqJSgugISuckbWn9jEJozD+MJ7XwfUvmRHi RxsQFbnBax30kZ9wChbuav14IDXNs7BfYXWRvIWmrUQ+cKkWApU9gT2qTO37stPIoYAewN N+er5+lwVbSBm8kdZJ6gz3Bn6QAv7mmQd8qAYs05rEmgHiNP1CLF4c5d6KggmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768159380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qucoWpOHbV0e6lBJwVVqlZZ+cBMkLeOAVmg6hRXYA7o=; b=rv7CooE+F0neWVdMAZPgBCdC+OZHN6C/VUkgAJHIlWceWvnv2xewYBnxx3I/Uz4JgiIDK4 K0p5FSAqH+oSDweO41dwgTe93OyDUrtwrZ3Wiy3YaUspjW4je0l09JEz/dq0G5eXErfFqZ SkDSs4NEkSk2XF8tfzcLYRqgU1ai8HtqtV+Fh7omqhv2xdIUjJXdqE6CcrHm3J8PmcCLqo KLWGjUIBytq2aTffpVUFmJ4q8k84vcmQi6j6+u7bAXVFVZnbBheUfLOu3RL7rV0DONh32S KG6yTzgtbj7/PHdAD4HcmJ9rHID4f6k1EbIFd/rSAIflraoaX+5JiVZoIzUTaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768159380; a=rsa-sha256; cv=none; b=oxVVQjy/TrnepU8BfN8tYGtimW3dGTrDtgRBlilXj4oMuRSXhaVV4oZbCOavGpThAhSHGd FlcAl20LfJeA3f2OVuK9RqM/J0lE+LOcjBWdXCq3E5O1PwZIfrNtKnTboW7XpUgGJ53axb vFLYiA/PnmqsrJ4mDdjt8m5cUgRx/5Ukv2YkiKq4ZAcU5aDuTuKxSuOVIHjOR5M0OhK1dL PkE035jzdWDxwK1KUle7c23aYAdhvWE6jCkV7zZN9m7bs8hmJ1NloDyKOhKfn4b/A7E8bR flaZqXaDE2I9hdQTmC73MDf+14aISWcWhkhBrzRhzCpje668+eUJZbT1MXc1LA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dq5505Skwzt7Q for ; Sun, 11 Jan 2026 19:23:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d6c2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 11 Jan 2026 19:23:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Adrian Chadd Subject: git: a50789d8b89b - stable/15 - powerpc: put the isync inside the TD_LOCK() checking loop List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/15 X-Git-Reftype: branch X-Git-Commit: a50789d8b89bd32199c6a9bf75b48ed8dee1e70d Auto-Submitted: auto-generated Date: Sun, 11 Jan 2026 19:23:00 +0000 Message-Id: <6963f894.3d6c2.4880f123@gitrepo.freebsd.org> The branch stable/15 has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=a50789d8b89bd32199c6a9bf75b48ed8dee1e70d commit a50789d8b89bd32199c6a9bf75b48ed8dee1e70d Author: Adrian Chadd AuthorDate: 2026-01-03 22:52:14 +0000 Commit: Adrian Chadd CommitDate: 2026-01-11 19:21:52 +0000 powerpc: put the isync inside the TD_LOCK() checking loop Fix a narrow window where the lock is unlocked but the checking CPU hasn't flushed things appropriately. Inside this window the CPU inside cpu_switch() will loop forever thinking the destination thread is still blocked/locked even though it is not. This manifests as the system hanging after starting all APs. I've seen this reliably trigger in qemu-system-ppc64 running power9 pseries guests; the more CPUs the more likely it triggers at boot. PR: kern/292167 Differential Revision: https://reviews.freebsd.org/D54478 Reviewed by: jhibbits MFC after: 1 week Relnotes: yes (cherry picked from commit 8df2e542146801fd01675e56724eaa567d04c209) --- sys/powerpc/powerpc/swtch32.S | 2 +- sys/powerpc/powerpc/swtch64.S | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/powerpc/powerpc/swtch32.S b/sys/powerpc/powerpc/swtch32.S index 547e1c5a201b..ef1a397bf74d 100644 --- a/sys/powerpc/powerpc/swtch32.S +++ b/sys/powerpc/powerpc/swtch32.S @@ -141,8 +141,8 @@ cpu_switchin: blocked_loop: lwz %r7,TD_LOCK(%r2) cmpw %r6,%r7 - beq- blocked_loop isync + beq- blocked_loop #endif lwz %r17,TD_PCB(%r2) /* Get new current PCB */ diff --git a/sys/powerpc/powerpc/swtch64.S b/sys/powerpc/powerpc/swtch64.S index 5f80751c8a10..ba37274d32bb 100644 --- a/sys/powerpc/powerpc/swtch64.S +++ b/sys/powerpc/powerpc/swtch64.S @@ -194,8 +194,8 @@ cpu_switchin: blocked_loop: ld %r7,TD_LOCK(%r13) cmpd %r6,%r7 - beq- blocked_loop isync + beq- blocked_loop #endif ld %r17,TD_PCB(%r13) /* Get new PCB */ From nobody Sun Jan 11 19:22:59 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dq5545zDHz6NPNx for ; Sun, 11 Jan 2026 19:23:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dq55458ytz3hWs for ; Sun, 11 Jan 2026 19:23:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768159384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N8xT44sCxZ5rCatenu+WA5T8VlbdRsqK7VAhIWq3ZvY=; b=dsWZI+cWuHbFUBoexM8lncmT9xFxdd4RGb9xRB2r69sTYMaSzQYSNprWI5tAvhBfDRTDzN e5AdLMlYjP1As8vehiDpcbqyjZe8D6NGdK7JgMMjPNMJrz9Z99fmSWqpyls53plgLQkbhX vv9s/wkJVYbvLns1FiJbhNRJz5fbYFS+W5YO2ld2wCLaj9baJELFdWZhmC+DSEkWVWigDb GxzWQ7ht/NA1clGHlptDYiC809MFnRafbLgHfCPG2kV0dK200hR7vwGAAStpjlU1CCJVqY gSrUj1F//kef7NHnP7vYmtN5oVPTtbVwmZHQ2w9fx/1DPNv+VtJW60nxOH5H2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768159384; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=N8xT44sCxZ5rCatenu+WA5T8VlbdRsqK7VAhIWq3ZvY=; b=U0wENg5UKnkZCF72ICCkXw8d653GZRp6mcIxyIBV9KNZVOrioH2YstZZIWQHqokjcM23Oi yBVU7IA40DGXUfFdkMeusoE/VjqxBlRwp8/BQVDMSREsOFGqXF22CKF6HfdcdTPB8CXAql KQBAvNGzFj3QNlswV/SQQfAoMG/yTMuAkGCf0ygPXoN2PxlPlYAHEUYRnLEsmPRkvvBLJq ph7nRVitpEV2ZD324JNAhn/NXKxvl8O0t9wyIUIgw2V01VtcZQR27KA7ZBCy+CROT4N//u 6uIDiqaRnZU1lep7WzBkqezG8uFDC50h6aOhWCC+pJb0+GrNLf9IRUWQ6aWN+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768159384; a=rsa-sha256; cv=none; b=RgzCyoFmUrKaDQ3xJqrpurcJ7uuj+69Y35BY2PK5gTiu/au3HlycAXWZ+SWNU6kVg+L3Va yuBXBxrkMqJ8aVEVUztNXbLWW2wBmGCuG/2v2Ub/a+O6eh6IY9girDgIoD0k8V5l0WRtZf JuDFJ6y0jby5zEyifO1NgeGx8yNJBQYVTE0JyGnZaONTYUF8eIxZ34uvjyrSgrpTRCRBgA QoexnxVxlUwNYrmT38kkcKZIy0cvOv8KCycb//p1k+60+hCVGQywwVZj5B6fS0S0t9SyyM KPC6TU5KP1cskkuXCV1y76yvPStgQdE482nQ+hUXQqwimeVnp3uidKRkKdg6sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dq5544fZ2zv0C for ; Sun, 11 Jan 2026 19:23:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e43e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 11 Jan 2026 19:22:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Jessica Clarke From: Adrian Chadd Subject: git: e5861dc2ea52 - stable/15 - Merge commit faa5141b9be4 from file git (by Christos Zoulas): List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/15 X-Git-Reftype: branch X-Git-Commit: e5861dc2ea529527894b9be2df99f359c0d5b6ef Auto-Submitted: auto-generated Date: Sun, 11 Jan 2026 19:22:59 +0000 Message-Id: <6963f893.3e43e.563516a7@gitrepo.freebsd.org> The branch stable/15 has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=e5861dc2ea529527894b9be2df99f359c0d5b6ef commit e5861dc2ea529527894b9be2df99f359c0d5b6ef Author: Jessica Clarke AuthorDate: 2025-12-31 17:14:55 +0000 Commit: Adrian Chadd CommitDate: 2026-01-11 19:21:47 +0000 Merge commit faa5141b9be4 from file git (by Christos Zoulas): PR/656: harry.sintonen: Fix bug in byte swapping that was caused by the change to make flags uint16_t and cont_level uint8_t. This fixes using a magic.mgc built with a different endianness than file(1) itself, e.g. when building powerpc64 on amd64. PR: 292079 Fixes: ae316d1d1cff ("MFV: file 5.46.") MFC after: 3 days (cherry picked from commit 39047538cf5d8f26112f7b08b3c56967f70f7f94) --- contrib/file/src/apprentice.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/contrib/file/src/apprentice.c b/contrib/file/src/apprentice.c index 5289f8e87267..dde2dd1e0c2d 100644 --- a/contrib/file/src/apprentice.c +++ b/contrib/file/src/apprentice.c @@ -3646,15 +3646,14 @@ file_varint2uintmax_t(const unsigned char *us, int t, size_t *l) file_private void bs1(struct magic *m) { - m->cont_level = swap2(m->cont_level); + m->flag = swap2(m->flag); m->offset = swap4(CAST(uint32_t, m->offset)); m->in_offset = swap4(CAST(uint32_t, m->in_offset)); m->lineno = swap4(CAST(uint32_t, m->lineno)); if (IS_STRING(m->type)) { m->str_range = swap4(m->str_range); m->str_flags = swap4(m->str_flags); - } - else { + } else { m->value.q = swap8(m->value.q); m->num_mask = swap8(m->num_mask); }